@dcl-regenesislabs/mobile-hub 1.0.0-20757928235.commit-b3d789a → 1.0.0-20758375146.commit-52c1b5b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{basic-BQO5o_DD.js → basic-C8gnXMKI.js} +1 -1
- package/assets/{core-DA2gUngt.js → core-BBLJuI_X.js} +4 -4
- package/assets/{features-DXhmrXcq.js → features-xI4TOttq.js} +1 -1
- package/assets/{fortmatic-BzJZzvUF.js → fortmatic-Bigjbinp.js} +1 -1
- package/assets/{index-CJG34S_2.js → index-BZlrjP3Z.js} +1 -1
- package/assets/{index-D68J4FGm.js → index-CZcWiNLw.js} +3 -3
- package/assets/{index-Cp2XRMt-.js → index-Ct2V8Mct.js} +1 -1
- package/assets/{index-DUgkijoM.js → index-DKgoLPJk.js} +1 -1
- package/assets/{index-Dn8UEJKP.js → index-DZdhdqWs.js} +2 -2
- package/assets/index-Dni1mpT6.css +1 -0
- package/assets/{w3m-modal-DghGDwdc.js → w3m-modal-CkqdZmhu.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-emR-Bcq4.css +0 -1
|
@@ -16,8 +16,8 @@ Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}
|
|
|
16
16
|
missingProperty: ${m},
|
|
17
17
|
depsCount: ${p},
|
|
18
18
|
deps: ${y}}`};const o={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(f){const[p,y]=s(f);l(f,p),c(f,y)}};function s({schema:f}){const p={},y={};for(const m in f){if(m==="__proto__")continue;const h=Array.isArray(f[m])?p:y;h[m]=f[m]}return[p,y]}function l(f,p=f.schema){const{gen:y,data:m,it:h}=f;if(Object.keys(p).length===0)return;const O=y.let("missing");for(const C in p){const R=p[C];if(R.length===0)continue;const I=(0,n.propertyInData)(y,m,C,h.opts.ownProperties);f.setParams({property:C,depsCount:R.length,deps:R.join(", ")}),h.allErrors?y.if(I,()=>{for(const N of R)(0,n.checkReportMissingProp)(f,N)}):(y.if((0,i._)`${I} && (${(0,n.checkMissingProp)(f,R,O)})`),(0,n.reportMissingProp)(f,O),y.else())}}e.validatePropertyDeps=l;function c(f,p=f.schema){const{gen:y,data:m,keyword:h,it:O}=f,C=y.name("valid");for(const R in p)(0,t.alwaysValidSchema)(O,p[R])||(y.if((0,n.propertyInData)(y,m,R,O.opts.ownProperties),()=>{const I=f.subschema({keyword:h,schemaProp:R},C);f.mergeValidEvaluated(I,C)},()=>y.var(C,!0)),f.ok(C))}e.validateSchemaDeps=c,e.default=o})(Xp)),Xp}var Kc={},Vw;function lq(){if(Vw)return Kc;Vw=1,Object.defineProperty(Kc,"__esModule",{value:!0});const e=bt(),i=Bt(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},code(o){const{gen:s,schema:l,data:c,it:f}=o;if((0,i.alwaysValidSchema)(f,l))return;const p=s.name("valid");s.forIn("key",c,y=>{o.setParams({propertyName:y}),o.subschema({keyword:"propertyNames",data:y,dataTypes:["string"],propertyName:y,compositeRule:!0},p),s.if((0,e.not)(p),()=>{o.error(!0),f.allErrors||s.break()})}),o.ok(p)}};return Kc.default=n,Kc}var Yc={},Hw;function rM(){if(Hw)return Yc;Hw=1,Object.defineProperty(Yc,"__esModule",{value:!0});const e=ui(),i=bt(),t=Qi(),n=Bt(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,i._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:c,schema:f,parentSchema:p,data:y,errsCount:m,it:h}=l;if(!m)throw new Error("ajv implementation error");const{allErrors:O,opts:C}=h;if(h.props=!0,C.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(h,f))return;const R=(0,e.allSchemaProperties)(p.properties),I=(0,e.allSchemaProperties)(p.patternProperties);N(),l.ok((0,i._)`${m} === ${t.default.errors}`);function N(){c.forIn("key",y,S=>{!R.length&&!I.length?w(S):c.if(_(S),()=>w(S))})}function _(S){let M;if(R.length>8){const F=(0,n.schemaRefOrVal)(h,p.properties,"properties");M=(0,e.isOwnProperty)(c,F,S)}else R.length?M=(0,i.or)(...R.map(F=>(0,i._)`${S} === ${F}`)):M=i.nil;return I.length&&(M=(0,i.or)(M,...I.map(F=>(0,i._)`${(0,e.usePattern)(l,F)}.test(${S})`))),(0,i.not)(M)}function A(S){c.code((0,i._)`delete ${y}[${S}]`)}function w(S){if(C.removeAdditional==="all"||C.removeAdditional&&f===!1){A(S);return}if(f===!1){l.setParams({additionalProperty:S}),l.error(),O||c.break();return}if(typeof f=="object"&&!(0,n.alwaysValidSchema)(h,f)){const M=c.name("valid");C.removeAdditional==="failing"?(v(S,M,!1),c.if((0,i.not)(M),()=>{l.reset(),A(S)})):(v(S,M),O||c.if((0,i.not)(M),()=>c.break()))}}function v(S,M,F){const W={keyword:"additionalProperties",dataProp:S,dataPropType:n.Type.Str};F===!1&&Object.assign(W,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(W,M)}}};return Yc.default=s,Yc}var Xc={},zw;function cq(){if(zw)return Xc;zw=1,Object.defineProperty(Xc,"__esModule",{value:!0});const e=vl(),i=ui(),t=Bt(),n=rM(),o={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,parentSchema:f,data:p,it:y}=s;y.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(y,n.default,"additionalProperties"));const m=(0,i.allSchemaProperties)(c);for(const I of m)y.definedProperties.add(I);y.opts.unevaluated&&m.length&&y.props!==!0&&(y.props=t.mergeEvaluated.props(l,(0,t.toHash)(m),y.props));const h=m.filter(I=>!(0,t.alwaysValidSchema)(y,c[I]));if(h.length===0)return;const O=l.name("valid");for(const I of h)C(I)?R(I):(l.if((0,i.propertyInData)(l,p,I,y.opts.ownProperties)),R(I),y.allErrors||l.else().var(O,!0),l.endIf()),s.it.definedProperties.add(I),s.ok(O);function C(I){return y.opts.useDefaults&&!y.compositeRule&&c[I].default!==void 0}function R(I){s.subschema({keyword:"properties",schemaProp:I,dataProp:I},O)}}};return Xc.default=o,Xc}var Jc={},Ww;function dq(){if(Ww)return Jc;Ww=1,Object.defineProperty(Jc,"__esModule",{value:!0});const e=ui(),i=bt(),t=Bt(),n=Bt(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:l,schema:c,data:f,parentSchema:p,it:y}=s,{opts:m}=y,h=(0,e.allSchemaProperties)(c),O=h.filter(w=>(0,t.alwaysValidSchema)(y,c[w]));if(h.length===0||O.length===h.length&&(!y.opts.unevaluated||y.props===!0))return;const C=m.strictSchema&&!m.allowMatchingProperties&&p.properties,R=l.name("valid");y.props!==!0&&!(y.props instanceof i.Name)&&(y.props=(0,n.evaluatedPropsToName)(l,y.props));const{props:I}=y;N();function N(){for(const w of h)C&&_(w),y.allErrors?A(w):(l.var(R,!0),A(w),l.if(R))}function _(w){for(const v in C)new RegExp(w).test(v)&&(0,t.checkStrictMode)(y,`property ${v} matches pattern ${w} (use allowMatchingProperties)`)}function A(w){l.forIn("key",f,v=>{l.if((0,i._)`${(0,e.usePattern)(s,w)}.test(${v})`,()=>{const S=O.includes(w);S||s.subschema({keyword:"patternProperties",schemaProp:w,dataProp:v,dataPropType:n.Type.Str},R),y.opts.unevaluated&&I!==!0?l.assign((0,i._)`${I}[${v}]`,!0):!S&&!y.allErrors&&l.if((0,i.not)(R),()=>l.break())})})}}};return Jc.default=o,Jc}var Qc={},Gw;function fq(){if(Gw)return Qc;Gw=1,Object.defineProperty(Qc,"__esModule",{value:!0});const e=Bt(),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){const{gen:n,schema:o,it:s}=t;if((0,e.alwaysValidSchema)(s,o)){t.fail();return}const l=n.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),t.failResult(l,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};return Qc.default=i,Qc}var Zc={},Kw;function pq(){if(Kw)return Zc;Kw=1,Object.defineProperty(Zc,"__esModule",{value:!0});const i={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ui().validateUnion,error:{message:"must match a schema in anyOf"}};return Zc.default=i,Zc}var xc={},Yw;function mq(){if(Yw)return xc;Yw=1,Object.defineProperty(xc,"__esModule",{value:!0});const e=bt(),i=Bt(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},code(o){const{gen:s,schema:l,parentSchema:c,it:f}=o;if(!Array.isArray(l))throw new Error("ajv implementation error");if(f.opts.discriminator&&c.discriminator)return;const p=l,y=s.let("valid",!1),m=s.let("passing",null),h=s.name("_valid");o.setParams({passing:m}),s.block(O),o.result(y,()=>o.reset(),()=>o.error(!0));function O(){p.forEach((C,R)=>{let I;(0,i.alwaysValidSchema)(f,C)?s.var(h,!0):I=o.subschema({keyword:"oneOf",schemaProp:R,compositeRule:!0},h),R>0&&s.if((0,e._)`${h} && ${y}`).assign(y,!1).assign(m,(0,e._)`[${m}, ${R}]`).else(),s.if(h,()=>{s.assign(y,!0),s.assign(m,R),I&&o.mergeEvaluated(I,e.Name)})})}}};return xc.default=n,xc}var $c={},Xw;function hq(){if(Xw)return $c;Xw=1,Object.defineProperty($c,"__esModule",{value:!0});const e=Bt(),i={keyword:"allOf",schemaType:"array",code(t){const{gen:n,schema:o,it:s}=t;if(!Array.isArray(o))throw new Error("ajv implementation error");const l=n.name("valid");o.forEach((c,f)=>{if((0,e.alwaysValidSchema)(s,c))return;const p=t.subschema({keyword:"allOf",schemaProp:f},l);t.ok(l),t.mergeEvaluated(p)})}};return $c.default=i,$c}var ed={},Jw;function yq(){if(Jw)return ed;Jw=1,Object.defineProperty(ed,"__esModule",{value:!0});const e=bt(),i=Bt(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:l,parentSchema:c,it:f}=s;c.then===void 0&&c.else===void 0&&(0,i.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const p=o(f,"then"),y=o(f,"else");if(!p&&!y)return;const m=l.let("valid",!0),h=l.name("_valid");if(O(),s.reset(),p&&y){const R=l.let("ifClause");s.setParams({ifClause:R}),l.if(h,C("then",R),C("else",R))}else p?l.if(h,C("then")):l.if((0,e.not)(h),C("else"));s.pass(m,()=>s.error(!0));function O(){const R=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},h);s.mergeEvaluated(R)}function C(R,I){return()=>{const N=s.subschema({keyword:R},h);l.assign(m,h),s.mergeValidEvaluated(N,m),I?l.assign(I,(0,e._)`${R}`):s.setParams({ifClause:R})}}}};function o(s,l){const c=s.schema[l];return c!==void 0&&!(0,i.alwaysValidSchema)(s,c)}return ed.default=n,ed}var td={},Qw;function gq(){if(Qw)return td;Qw=1,Object.defineProperty(td,"__esModule",{value:!0});const e=Bt(),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:n,it:o}){n.if===void 0&&(0,e.checkStrictMode)(o,`"${t}" without "if" is ignored`)}};return td.default=i,td}var Zw;function vq(){if(Zw)return Hc;Zw=1,Object.defineProperty(Hc,"__esModule",{value:!0});const e=eM(),i=aq(),t=tM(),n=oq(),o=sq(),s=uq(),l=lq(),c=rM(),f=cq(),p=dq(),y=fq(),m=pq(),h=mq(),O=hq(),C=yq(),R=gq();function I(N=!1){const _=[y.default,m.default,h.default,O.default,C.default,R.default,l.default,c.default,s.default,f.default,p.default];return N?_.push(i.default,n.default):_.push(e.default,t.default),_.push(o.default),_}return Hc.default=I,Hc}var rd={},nd={},xw;function _q(){if(xw)return nd;xw=1,Object.defineProperty(nd,"__esModule",{value:!0});const e=bt(),t={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,o){const{gen:s,data:l,$data:c,schema:f,schemaCode:p,it:y}=n,{opts:m,errSchemaPath:h,schemaEnv:O,self:C}=y;if(!m.validateFormats)return;c?R():I();function R(){const N=s.scopeValue("formats",{ref:C.formats,code:m.code.formats}),_=s.const("fDef",(0,e._)`${N}[${p}]`),A=s.let("fType"),w=s.let("format");s.if((0,e._)`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>s.assign(A,(0,e._)`${_}.type || "string"`).assign(w,(0,e._)`${_}.validate`),()=>s.assign(A,(0,e._)`"string"`).assign(w,_)),n.fail$data((0,e.or)(v(),S()));function v(){return m.strictSchema===!1?e.nil:(0,e._)`${p} && !${w}`}function S(){const M=O.$async?(0,e._)`(${_}.async ? await ${w}(${l}) : ${w}(${l}))`:(0,e._)`${w}(${l})`,F=(0,e._)`(typeof ${w} == "function" ? ${M} : ${w}.test(${l}))`;return(0,e._)`${w} && ${w} !== true && ${A} === ${o} && !${F}`}}function I(){const N=C.formats[f];if(!N){v();return}if(N===!0)return;const[_,A,w]=S(N);_===o&&n.pass(M());function v(){if(m.strictSchema===!1){C.logger.warn(F());return}throw new Error(F());function F(){return`unknown format "${f}" ignored in schema at path "${h}"`}}function S(F){const W=F instanceof RegExp?(0,e.regexpCode)(F):m.code.formats?(0,e._)`${m.code.formats}${(0,e.getProperty)(f)}`:void 0,J=s.scopeValue("formats",{key:f,ref:F,code:W});return typeof F=="object"&&!(F instanceof RegExp)?[F.type||"string",F.validate,(0,e._)`${J}.validate`]:["string",F,J]}function M(){if(typeof N=="object"&&!(N instanceof RegExp)&&N.async){if(!O.$async)throw new Error("async format in sync schema");return(0,e._)`await ${w}(${l})`}return typeof A=="function"?(0,e._)`${w}(${l})`:(0,e._)`${w}.test(${l})`}}}};return nd.default=t,nd}var $w;function Eq(){if($w)return rd;$w=1,Object.defineProperty(rd,"__esModule",{value:!0});const i=[_q().default];return rd.default=i,rd}var $a={},eS;function bq(){return eS||(eS=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.contentVocabulary=$a.metadataVocabulary=void 0,$a.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],$a.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),$a}var tS;function wq(){if(tS)return Oc;tS=1,Object.defineProperty(Oc,"__esModule",{value:!0});const e=Kk(),i=iq(),t=vq(),n=Eq(),o=bq(),s=[e.default,i.default,(0,t.default)(),n.default,o.metadataVocabulary,o.contentVocabulary];return Oc.default=s,Oc}var id={},Eu={},rS;function Sq(){if(rS)return Eu;rS=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.DiscrError=void 0;var e;return(function(i){i.Tag="tag",i.Mapping="mapping"})(e||(Eu.DiscrError=e={})),Eu}var nS;function Tq(){if(nS)return id;nS=1,Object.defineProperty(id,"__esModule",{value:!0});const e=bt(),i=Sq(),t=V_(),n=Jd(),o=Bt(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:f}})=>c===i.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:c,tag:f,tagName:p}})=>(0,e._)`{error: ${c}, tag: ${p}, tagValue: ${f}}`},code(c){const{gen:f,data:p,schema:y,parentSchema:m,it:h}=c,{oneOf:O}=m;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");const C=y.propertyName;if(typeof C!="string")throw new Error("discriminator: requires propertyName");if(y.mapping)throw new Error("discriminator: mapping is not supported");if(!O)throw new Error("discriminator: requires oneOf keyword");const R=f.let("valid",!1),I=f.const("tag",(0,e._)`${p}${(0,e.getProperty)(C)}`);f.if((0,e._)`typeof ${I} == "string"`,()=>N(),()=>c.error(!1,{discrError:i.DiscrError.Tag,tag:I,tagName:C})),c.ok(R);function N(){const w=A();f.if(!1);for(const v in w)f.elseIf((0,e._)`${I} === ${v}`),f.assign(R,_(w[v]));f.else(),c.error(!1,{discrError:i.DiscrError.Mapping,tag:I,tagName:C}),f.endIf()}function _(w){const v=f.name("valid"),S=c.subschema({keyword:"oneOf",schemaProp:w},v);return c.mergeEvaluated(S,e.Name),v}function A(){var w;const v={},S=F(m);let M=!0;for(let pe=0;pe<O.length;pe++){let Oe=O[pe];if(Oe?.$ref&&!(0,o.schemaHasRulesButRef)(Oe,h.self.RULES)){const be=Oe.$ref;if(Oe=t.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,be),Oe instanceof t.SchemaEnv&&(Oe=Oe.schema),Oe===void 0)throw new n.default(h.opts.uriResolver,h.baseId,be)}const Ae=(w=Oe?.properties)===null||w===void 0?void 0:w[C];if(typeof Ae!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${C}"`);M=M&&(S||F(Oe)),W(Ae,pe)}if(!M)throw new Error(`discriminator: "${C}" must be required`);return v;function F({required:pe}){return Array.isArray(pe)&&pe.includes(C)}function W(pe,Oe){if(pe.const)J(pe.const,Oe);else if(pe.enum)for(const Ae of pe.enum)J(Ae,Oe);else throw new Error(`discriminator: "properties/${C}" must have "const" or "enum"`)}function J(pe,Oe){if(typeof pe!="string"||pe in v)throw new Error(`discriminator: "${C}" values must be unique strings`);v[pe]=Oe}}}};return id.default=l,id}const Aq="http://json-schema.org/draft-07/schema#",Oq="http://json-schema.org/draft-07/schema#",Iq="Core schema meta-schema",Pq={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:[]}},Rq=["object","boolean"],Nq={$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:"#"}},Cq={$schema:Aq,$id:Oq,title:Iq,definitions:Pq,type:Rq,properties:Nq,default:!0};var iS;function Qd(){return iS||(iS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.MissingRefError=i.ValidationError=i.CodeGen=i.Name=i.nil=i.stringify=i.str=i._=i.KeywordCxt=i.Ajv=void 0;const t=zk(),n=wq(),o=Tq(),s=Cq,l=["/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(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const C=this.opts.$data?this.$dataMetaSchema(s,l):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)}}i.Ajv=f,e.exports=i=f,e.exports.Ajv=f,Object.defineProperty(i,"__esModule",{value:!0}),i.default=f;var p=vl();Object.defineProperty(i,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var y=bt();Object.defineProperty(i,"_",{enumerable:!0,get:function(){return y._}}),Object.defineProperty(i,"str",{enumerable:!0,get:function(){return y.str}}),Object.defineProperty(i,"stringify",{enumerable:!0,get:function(){return y.stringify}}),Object.defineProperty(i,"nil",{enumerable:!0,get:function(){return y.nil}}),Object.defineProperty(i,"Name",{enumerable:!0,get:function(){return y.Name}}),Object.defineProperty(i,"CodeGen",{enumerable:!0,get:function(){return y.CodeGen}});var m=F_();Object.defineProperty(i,"ValidationError",{enumerable:!0,get:function(){return m.default}});var h=Jd();Object.defineProperty(i,"MissingRefError",{enumerable:!0,get:function(){return h.default}})})(bc,bc.exports)),bc.exports}var ku={exports:{}},qu={exports:{}},Bu={exports:{}},ad={exports:{}},aS;function Mq(){return aS||(aS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=bt(),n=["undefined","string","number","object","function","boolean","symbol"];function o(){return{keyword:"typeof",schemaType:["string","array"],code(s){const{data:l,schema:c,schemaValue:f}=s;s.fail(typeof c=="string"?(0,t._)`typeof ${l} != ${c}`:(0,t._)`${f}.indexOf(typeof ${l}) < 0`)},metaSchema:{anyOf:[{type:"string",enum:n},{type:"array",items:{type:"string",enum:n}}]}}}i.default=o,e.exports=o})(ad,ad.exports)),ad.exports}var oS=Bu.exports,sS;function jq(){return sS||(sS=1,(function(e,i){var t=oS&&oS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Mq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Bu,Bu.exports)),Bu.exports}var Uu={exports:{}},od={exports:{}},uS;function Lq(){return uS||(uS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t={Object,Array,Function,Number,String,Date,RegExp};typeof Buffer<"u"&&(t.Buffer=Buffer),typeof Promise<"u"&&(t.Promise=Promise);const n=Object.assign(o,{CONSTRUCTORS:t});function o(){return{keyword:"instanceof",schemaType:["string","array"],compile(l){if(typeof l=="string"){const c=s(l);return f=>f instanceof c}if(Array.isArray(l)){const c=l.map(s);return f=>{for(const p of c)if(f instanceof p)return!0;return!1}}throw new Error("ajv implementation error")},metaSchema:{anyOf:[{type:"string"},{type:"array",items:{type:"string"}}]}}}function s(l){const c=t[l];if(c)return c;throw new Error(`invalid "instanceof" keyword value ${l}`)}i.default=n,e.exports=n})(od,od.exports)),od.exports}var lS=Uu.exports,cS;function Dq(){return cS||(cS=1,(function(e,i){var t=lS&&lS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Lq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Uu,Uu.exports)),Uu.exports}var Fu={exports:{}},Vu={exports:{}},sd={},dS;function nM(){if(dS)return sd;dS=1,Object.defineProperty(sd,"__esModule",{value:!0});function e(i){return()=>({keyword:i,type:"number",schemaType:"array",macro:function([n,o]){return t(n,o),i==="range"?{minimum:n,maximum:o}:{exclusiveMinimum:n,exclusiveMaximum:o}},metaSchema:{type:"array",minItems:2,maxItems:2,items:{type:"number"}}});function t(n,o){if(n>o||i==="exclusiveRange"&&n===o)throw new Error("There are no numbers in range")}}return sd.default=e,sd}var fS=Vu.exports,pS;function kq(){return pS||(pS=1,(function(e,i){var t=fS&&fS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const o=(0,t(nM()).default)("range");i.default=o,e.exports=o})(Vu,Vu.exports)),Vu.exports}var mS=Fu.exports,hS;function qq(){return hS||(hS=1,(function(e,i){var t=mS&&mS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(kq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Fu,Fu.exports)),Fu.exports}var Hu={exports:{}},zu={exports:{}},yS=zu.exports,gS;function Bq(){return gS||(gS=1,(function(e,i){var t=yS&&yS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const o=(0,t(nM()).default)("exclusiveRange");i.default=o,e.exports=o})(zu,zu.exports)),zu.exports}var vS=Hu.exports,_S;function Uq(){return _S||(_S=1,(function(e,i){var t=vS&&vS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Bq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Hu,Hu.exports)),Hu.exports}var Wu={exports:{}},ud={exports:{}},eo={},ES;function Zd(){if(ES)return eo;ES=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.usePattern=eo.metaSchemaRef=void 0;const e=bt(),i="http://json-schema.org/schema";function t({defaultMeta:o}={}){return o===!1?{}:{$ref:o||i}}eo.metaSchemaRef=t;function n({gen:o,it:{opts:s}},l,c=s.unicodeRegExp?"u":""){const f=new RegExp(l,c);return o.scopeValue("pattern",{key:f.toString(),ref:f,code:(0,e._)`new RegExp(${l}, ${c})`})}return eo.usePattern=n,eo}var bS;function Fq(){return bS||(bS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=bt(),n=Zd(),o={type:"object",properties:{pattern:{type:"string"},flags:{type:"string",nullable:!0}},required:["pattern"],additionalProperties:!1},s=/^\/(.*)\/([gimuy]*)$/;function l(){return{keyword:"regexp",type:"string",schemaType:["string","object"],code(c){const{data:f,schema:p}=c,y=m(p);c.pass((0,t._)`${y}.test(${f})`);function m(h){if(typeof h=="object")return(0,n.usePattern)(c,h.pattern,h.flags);const O=s.exec(h);if(O)return(0,n.usePattern)(c,O[1],O[2]);throw new Error("cannot parse string into RegExp")}},metaSchema:{anyOf:[{type:"string"},o]}}}i.default=l,e.exports=l})(ud,ud.exports)),ud.exports}var wS=Wu.exports,SS;function Vq(){return SS||(SS=1,(function(e,i){var t=wS&&wS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Fq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Wu,Wu.exports)),Wu.exports}var Gu={exports:{}},ld={exports:{}},TS;function Hq(){return TS||(TS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=bt(),n={trimStart:f=>f.trimStart(),trimEnd:f=>f.trimEnd(),trimLeft:f=>f.trimStart(),trimRight:f=>f.trimEnd(),trim:f=>f.trim(),toLowerCase:f=>f.toLowerCase(),toUpperCase:f=>f.toUpperCase(),toEnumCase:(f,p)=>p?.hash[c(f)]||f},o=Object.assign(s,{transform:n});function s(){return{keyword:"transform",schemaType:"array",before:"enum",code(f){const{gen:p,data:y,schema:m,parentSchema:h,it:O}=f,{parentData:C,parentDataProperty:R}=O,I=m;if(!I.length)return;let N;if(I.includes("toEnumCase")){const A=l(h);N=p.scopeValue("obj",{ref:A,code:(0,t.stringify)(A)})}p.if((0,t._)`typeof ${y} == "string" && ${C} !== undefined`,()=>{p.assign(y,_(I.slice())),p.assign((0,t._)`${C}[${R}]`,y)});function _(A){if(!A.length)return y;const w=A.pop();if(!(w in n))throw new Error(`transform: unknown transformation ${w}`);const v=p.scopeValue("func",{ref:n[w],code:(0,t._)`require("ajv-keywords/dist/definitions/transform").transform${(0,t.getProperty)(w)}`}),S=_(A);return N&&w==="toEnumCase"?(0,t._)`${v}(${S}, ${N})`:(0,t._)`${v}(${S})`}},metaSchema:{type:"array",items:{type:"string",enum:Object.keys(n)}}}}function l(f){const p={hash:{}};if(!f.enum)throw new Error('transform: "toEnumCase" requires "enum"');for(const y of f.enum){if(typeof y!="string")continue;const m=c(y);if(p.hash[m])throw new Error('transform: "toEnumCase" requires all lowercased "enum" values to be unique');p.hash[m]=y}return p}function c(f){return f.toLowerCase()}i.default=o,e.exports=o})(ld,ld.exports)),ld.exports}var AS=Gu.exports,OS;function zq(){return OS||(OS=1,(function(e,i){var t=AS&&AS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Hq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Gu,Gu.exports)),Gu.exports}var Ku={exports:{}},cd={exports:{}},IS;function Wq(){return IS||(IS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=U_(),n=["number","integer","string","boolean","null"];function o(){return{keyword:"uniqueItemProperties",type:"array",schemaType:"array",compile(l,c){const f=s(l,c);return p=>{if(p.length<=1)return!0;for(let y=0;y<l.length;y++){const m=l[y];if(f[y]){const h={};for(const O of p){if(!O||typeof O!="object")continue;let C=O[m];if(!(C&&typeof C=="object")){if(typeof C=="string"&&(C='"'+C),h[C])return!1;h[C]=!0}}}else for(let h=p.length;h--;){const O=p[h];if(!(!O||typeof O!="object"))for(let C=h;C--;){const R=p[C];if(R&&typeof R=="object"&&t(O[m],R[m]))return!1}}}return!0}},metaSchema:{type:"array",items:{type:"string"}}}}i.default=o;function s(l,c){return l.map(f=>{var p,y,m;const h=(m=(y=(p=c.items)===null||p===void 0?void 0:p.properties)===null||y===void 0?void 0:y[f])===null||m===void 0?void 0:m.type;return Array.isArray(h)?!h.includes("object")&&!h.includes("array"):n.includes(h)})}e.exports=o})(cd,cd.exports)),cd.exports}var PS=Ku.exports,RS;function Gq(){return RS||(RS=1,(function(e,i){var t=PS&&PS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Wq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Ku,Ku.exports)),Ku.exports}var Yu={exports:{}},dd={exports:{}},NS;function Kq(){return NS||(NS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});function t(){return{keyword:"allRequired",type:"object",schemaType:"boolean",macro(n,o){if(!n)return!0;const s=Object.keys(o.properties);return s.length===0?!0:{required:s}},dependencies:["properties"]}}i.default=t,e.exports=t})(dd,dd.exports)),dd.exports}var CS=Yu.exports,MS;function Yq(){return MS||(MS=1,(function(e,i){var t=CS&&CS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Kq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Yu,Yu.exports)),Yu.exports}var Xu={exports:{}},Ju={exports:{}},fd={},jS;function iM(){if(jS)return fd;jS=1,Object.defineProperty(fd,"__esModule",{value:!0});function e(i){return()=>({keyword:i,type:"object",schemaType:"array",macro(t){return t.length===0?!0:t.length===1?{required:t}:{[i==="anyRequired"?"anyOf":"oneOf"]:t.map(o=>({required:[o]}))}},metaSchema:{type:"array",items:{type:"string"}}})}return fd.default=e,fd}var LS=Ju.exports,DS;function Xq(){return DS||(DS=1,(function(e,i){var t=LS&&LS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const o=(0,t(iM()).default)("anyRequired");i.default=o,e.exports=o})(Ju,Ju.exports)),Ju.exports}var kS=Xu.exports,qS;function Jq(){return qS||(qS=1,(function(e,i){var t=kS&&kS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Xq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Xu,Xu.exports)),Xu.exports}var Qu={exports:{}},Zu={exports:{}},BS=Zu.exports,US;function Qq(){return US||(US=1,(function(e,i){var t=BS&&BS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const o=(0,t(iM()).default)("oneRequired");i.default=o,e.exports=o})(Zu,Zu.exports)),Zu.exports}var FS=Qu.exports,VS;function Zq(){return VS||(VS=1,(function(e,i){var t=FS&&FS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(Qq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(Qu,Qu.exports)),Qu.exports}var xu={exports:{}},pd={exports:{}},HS;function xq(){return HS||(HS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=bt(),n=Zd(),o={message:({params:{missingPattern:l}})=>(0,t.str)`should have property matching pattern '${l}'`,params:({params:{missingPattern:l}})=>(0,t._)`{missingPattern: ${l}}`};function s(){return{keyword:"patternRequired",type:"object",schemaType:"array",error:o,code(l){const{gen:c,schema:f,data:p}=l;if(f.length===0)return;const y=c.let("valid",!0);for(const h of f)m(h);function m(h){const O=c.let("matched",!1);c.forIn("key",p,C=>{c.assign(O,(0,t._)`${(0,n.usePattern)(l,h)}.test(${C})`),c.if(O,()=>c.break())}),l.setParams({missingPattern:h}),c.assign(y,(0,t.and)(y,O)),l.pass(y)}},metaSchema:{type:"array",items:{type:"string",format:"regex"},uniqueItems:!0}}}i.default=s,e.exports=s})(pd,pd.exports)),pd.exports}var zS=xu.exports,WS;function $q(){return WS||(WS=1,(function(e,i){var t=zS&&zS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(xq()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(xu,xu.exports)),xu.exports}var $u={exports:{}},md={exports:{}},GS;function e1(){return GS||(GS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});function t(){return{keyword:"prohibited",type:"object",schemaType:"array",macro:function(n){return n.length===0?!0:n.length===1?{not:{required:n}}:{not:{anyOf:n.map(o=>({required:[o]}))}}},metaSchema:{type:"array",items:{type:"string"}}}}i.default=t,e.exports=t})(md,md.exports)),md.exports}var KS=$u.exports,YS;function t1(){return YS||(YS=1,(function(e,i){var t=KS&&KS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(e1()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})($u,$u.exports)),$u.exports}var el={exports:{}},hd={exports:{}},XS;function r1(){return XS||(XS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=Zd();function n(l){return{keyword:"deepProperties",type:"object",schemaType:"object",macro:function(c){const f=[];for(const p in c)f.push(o(p,c[p]));return{allOf:f}},metaSchema:{type:"object",propertyNames:{type:"string",format:"json-pointer"},additionalProperties:(0,t.metaSchemaRef)(l)}}}i.default=n;function o(l,c){const f=l.split("/"),p={};let y=p;for(let m=1;m<f.length;m++){let h=f[m];const O=m===f.length-1;h=s(h);const C=y.properties={};let R;if(/[0-9]+/.test(h)){let I=+h;for(R=y.items=[],y.type=["object","array"];I--;)R.push({})}else y.type="object";y=O?c:{},C[h]=y,R&&R.push(y)}return p}function s(l){return l.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(hd,hd.exports)),hd.exports}var JS=el.exports,QS;function n1(){return QS||(QS=1,(function(e,i){var t=JS&&JS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(r1()),o=(s,l)=>s.addKeyword((0,n.default)(l));i.default=o,e.exports=o})(el,el.exports)),el.exports}var tl={exports:{}},yd={exports:{}},ZS;function i1(){return ZS||(ZS=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=bt();function n(){return{keyword:"deepRequired",type:"object",schemaType:"array",code(s){const{schema:l,data:c}=s,f=l.map(y=>(0,t._)`(${p(y)}) === undefined`);s.fail((0,t.or)(...f));function p(y){if(y==="")throw new Error("empty JSON pointer not allowed");const m=y.split("/");let h=c;const O=m.map((C,R)=>R?h=(0,t._)`${h}${(0,t.getProperty)(o(C))}`:h);return(0,t.and)(...O)}},metaSchema:{type:"array",items:{type:"string",format:"json-pointer"}}}}i.default=n;function o(s){return s.replace(/~1/g,"/").replace(/~0/g,"~")}e.exports=n})(yd,yd.exports)),yd.exports}var xS=tl.exports,$S;function a1(){return $S||($S=1,(function(e,i){var t=xS&&xS.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(i1()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(tl,tl.exports)),tl.exports}var rl={exports:{}},gd={exports:{}},eT;function o1(){return eT||(eT=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t={},n={timestamp:()=>()=>Date.now(),datetime:()=>()=>new Date().toISOString(),date:()=>()=>new Date().toISOString().slice(0,10),time:()=>()=>new Date().toISOString().slice(11),random:()=>()=>Math.random(),randomint:y=>{var m;const h=(m=y?.max)!==null&&m!==void 0?m:2;return()=>Math.floor(Math.random()*h)},seq:y=>{var m;const h=(m=y?.name)!==null&&m!==void 0?m:"";return t[h]||(t[h]=0),()=>t[h]++}},o=Object.assign(s,{DEFAULTS:n});function s(){return{keyword:"dynamicDefaults",type:"object",schemaType:["string","object"],modifying:!0,valid:!0,compile(y,m,h){if(!h.opts.useDefaults||h.compositeRule)return()=>!0;const O={};for(const R in y)O[R]=l(y[R]);const C=h.opts.useDefaults==="empty";return R=>{for(const I in y)(R[I]===void 0||C&&(R[I]===null||R[I]===""))&&(R[I]=O[I]());return!0}},metaSchema:{type:"object",additionalProperties:{anyOf:[{type:"string"},{type:"object",additionalProperties:!1,required:["func","args"],properties:{func:{type:"string"},args:{type:"object"}}}]}}}}function l(y){return typeof y=="object"?c(y):f(y)}function c({func:y,args:m}){const h=n[y];return p(y,h),h(m)}function f(y=""){const m=n[y];return p(y,m),m()}function p(y,m){if(!m)throw new Error(`invalid "dynamicDefaults" keyword property value: ${y}`)}i.default=o,e.exports=o})(gd,gd.exports)),gd.exports}var tT=rl.exports,rT;function s1(){return rT||(rT=1,(function(e,i){var t=tT&&tT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(o1()),o=s=>s.addKeyword((0,n.default)());i.default=o,e.exports=o})(rl,rl.exports)),rl.exports}var nl={exports:{}},vd={exports:{}},nT;function u1(){return nT||(nT=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=bt(),n=Zd(),o={message:({params:{schemaProp:l}})=>l?(0,t.str)`should match case "${l}" schema`:(0,t.str)`should match default case schema`,params:({params:{schemaProp:l}})=>l?(0,t._)`{failingCase: ${l}}`:(0,t._)`{failingDefault: true}`};function s(l){const c=(0,n.metaSchemaRef)(l);return[{keyword:"select",schemaType:["string","number","boolean","null"],$data:!0,error:o,dependencies:["selectCases"],code(f){const{gen:p,schemaCode:y,parentSchema:m}=f;f.block$data(t.nil,()=>{const h=p.let("valid",!0),O=p.name("_valid"),C=p.const("value",(0,t._)`${y} === null ? "null" : ${y}`);p.if(!1);for(const R in m.selectCases){f.setParams({schemaProp:R}),p.elseIf((0,t._)`"" + ${C} == ${R}`);const I=f.subschema({keyword:"selectCases",schemaProp:R},O);f.mergeEvaluated(I,t.Name),p.assign(h,O)}if(p.else(),m.selectDefault!==void 0){f.setParams({schemaProp:void 0});const R=f.subschema({keyword:"selectDefault"},O);f.mergeEvaluated(R,t.Name),p.assign(h,O)}p.endIf(),f.pass(h)})}},{keyword:"selectCases",dependencies:["select"],metaSchema:{type:"object",additionalProperties:c}},{keyword:"selectDefault",dependencies:["select","selectCases"],metaSchema:c}]}i.default=s,e.exports=s})(vd,vd.exports)),vd.exports}var iT=nl.exports,aT;function l1(){return aT||(aT=1,(function(e,i){var t=iT&&iT.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(u1()),o=(s,l)=>((0,n.default)(l).forEach(c=>s.addKeyword(c)),s);i.default=o,e.exports=o})(nl,nl.exports)),nl.exports}var oT=qu.exports,sT;function c1(){return sT||(sT=1,(function(e,i){var t=oT&&oT.__importDefault||function(w){return w&&w.__esModule?w:{default:w}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(jq()),o=t(Dq()),s=t(qq()),l=t(Uq()),c=t(Vq()),f=t(zq()),p=t(Gq()),y=t(Yq()),m=t(Jq()),h=t(Zq()),O=t($q()),C=t(t1()),R=t(n1()),I=t(a1()),N=t(s1()),_=t(l1()),A={typeof:n.default,instanceof:o.default,range:s.default,exclusiveRange:l.default,regexp:c.default,transform:f.default,uniqueItemProperties:p.default,allRequired:y.default,anyRequired:m.default,oneRequired:h.default,patternRequired:O.default,prohibited:C.default,deepProperties:R.default,deepRequired:I.default,dynamicDefaults:N.default,select:_.default};i.default=A,e.exports=A})(qu,qu.exports)),qu.exports}var uT=ku.exports,lT;function z_(){return lT||(lT=1,(function(e,i){var t=uT&&uT.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(i,"__esModule",{value:!0});const n=t(c1()),o=(l,c)=>{if(Array.isArray(c)){for(const f of c)s(f)(l);return l}if(c)return s(c)(l),l;for(c in n.default)s(c)(l);return l};o.get=s;function s(l){const c=n.default[l];if(!c)throw new Error("Unknown keyword "+l);return c}i.default=o,e.exports=o,e.exports.default=o})(ku,ku.exports)),ku.exports}var _d={exports:{}},cT;function W_(){return cT||(cT=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0});const t=Qd(),n=bt(),o=ul(),s=vl(),l=gl(),c=Qi(),f="errorMessage",p=new t.Name("emUsed"),y={required:"missingProperty",dependencies:"property",dependentRequired:"property"},m=/\$\{[^}]+\}/,h=/\$\{([^}]+)\}/g,O=/^""\s*\+\s*|\s*\+\s*""$/g;function C(I){return{keyword:f,schemaType:["string","object"],post:!0,code(N){const{gen:_,data:A,schema:w,schemaValue:v,it:S}=N;if(S.createErrors===!1)return;const M=w,F=n.strConcat(c.default.instancePath,S.errorPath);_.if(t._`${c.default.errors} > 0`,()=>{if(typeof M=="object"){const[q,L]=J(M);L&&pe(L),q&&Oe(q),Ae(W(M))}const B=typeof M=="string"?M:M._;B&&be(B),I.keepErrors||Le()});function W({properties:B,items:q}){const L={};if(B){L.props={};for(const H in B)L.props[H]=[]}if(q){L.items={};for(let H=0;H<q.length;H++)L.items[H]=[]}return L}function J(B){let q,L;for(const H in B){if(H==="properties"||H==="items")continue;const le=B[H];if(typeof le=="object"){q||(q={});const ye=q[H]={};for(const fe in le)ye[fe]=[]}else L||(L={}),L[H]=[]}return[q,L]}function pe(B){const q=_.const("emErrors",t.stringify(B)),L=_.const("templates",ce(B,w));_.forOf("err",c.default.vErrors,fe=>_.if(Me(fe,q),()=>_.code(t._`${q}[${fe}.keyword].push(${fe})`).assign(t._`${fe}.${p}`,!0)));const{singleError:H}=I;if(H){const fe=_.let("message",t._`""`),Pe=_.let("paramsErrors",t._`[]`);le(Re=>{_.if(fe,()=>_.code(t._`${fe} += ${typeof H=="string"?H:";"}`)),_.code(t._`${fe} += ${ye(Re)}`),_.assign(Pe,t._`${Pe}.concat(${q}[${Re}])`)}),l.reportError(N,{message:fe,params:t._`{errors: ${Pe}}`})}else le(fe=>l.reportError(N,{message:ye(fe),params:t._`{errors: ${q}[${fe}]}`}));function le(fe){_.forIn("key",q,Pe=>_.if(t._`${q}[${Pe}].length`,()=>fe(Pe)))}function ye(fe){return t._`${fe} in ${L} ? ${L}[${fe}]() : ${v}[${fe}]`}}function Oe(B){const q=_.const("emErrors",t.stringify(B)),L=[];for(const Pe in B)L.push([Pe,ce(B[Pe],w[Pe])]);const H=_.const("templates",_.object(...L)),le=_.scopeValue("obj",{ref:y,code:t.stringify(y)}),ye=_.let("emPropParams"),fe=_.let("emParamsErrors");_.forOf("err",c.default.vErrors,Pe=>_.if(Me(Pe,q),()=>{_.assign(ye,t._`${le}[${Pe}.keyword]`),_.assign(fe,t._`${q}[${Pe}.keyword][${Pe}.params[${ye}]]`),_.if(fe,()=>_.code(t._`${fe}.push(${Pe})`).assign(t._`${Pe}.${p}`,!0))})),_.forIn("key",q,Pe=>_.forIn("keyProp",t._`${q}[${Pe}]`,Re=>{_.assign(fe,t._`${q}[${Pe}][${Re}]`),_.if(t._`${fe}.length`,()=>{const ae=_.const("tmpl",t._`${H}[${Pe}] && ${H}[${Pe}][${Re}]`);l.reportError(N,{message:t._`${ae} ? ${ae}() : ${v}[${Pe}][${Re}]`,params:t._`{errors: ${fe}}`})})}))}function Ae(B){const{props:q,items:L}=B;if(!q&&!L)return;const H=t._`typeof ${A} == "object"`,le=t._`Array.isArray(${A})`,ye=_.let("emErrors");let fe,Pe;const Re=_.let("templates");q&&L?(fe=_.let("emChildKwd"),_.if(H),_.if(le,()=>{ae(L,w.items),_.assign(fe,t.str`items`)},()=>{ae(q,w.properties),_.assign(fe,t.str`properties`)}),Pe=t._`[${fe}]`):L?(_.if(le),ae(L,w.items),Pe=t._`.items`):q&&(_.if(n.and(H,n.not(le))),ae(q,w.properties),Pe=t._`.properties`),_.forOf("err",c.default.vErrors,ue=>Be(ue,ye,Ie=>_.code(t._`${ye}[${Ie}].push(${ue})`).assign(t._`${ue}.${p}`,!0))),_.forIn("key",ye,ue=>_.if(t._`${ye}[${ue}].length`,()=>{l.reportError(N,{message:t._`${ue} in ${Re} ? ${Re}[${ue}]() : ${v}${Pe}[${ue}]`,params:t._`{errors: ${ye}[${ue}]}`}),_.assign(t._`${c.default.vErrors}[${c.default.errors}-1].instancePath`,t._`${F} + "/" + ${ue}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})),_.endIf();function ae(ue,Ie){_.assign(ye,t.stringify(ue)),_.assign(Re,ce(ue,Ie))}}function be(B){const q=_.const("emErrs",t._`[]`);_.forOf("err",c.default.vErrors,L=>_.if(Te(L),()=>_.code(t._`${q}.push(${L})`).assign(t._`${L}.${p}`,!0))),_.if(t._`${q}.length`,()=>l.reportError(N,{message:Y(B),params:t._`{errors: ${q}}`}))}function Le(){const B=_.const("emErrs",t._`[]`);_.forOf("err",c.default.vErrors,q=>_.if(t._`!${q}.${p}`,()=>_.code(t._`${B}.push(${q})`))),_.assign(c.default.vErrors,B).assign(c.default.errors,t._`${B}.length`)}function Me(B,q){return n.and(t._`${B}.keyword !== ${f}`,t._`!${B}.${p}`,t._`${B}.instancePath === ${F}`,t._`${B}.keyword in ${q}`,t._`${B}.schemaPath.indexOf(${S.errSchemaPath}) === 0`,t._`/^\\/[^\\/]*$/.test(${B}.schemaPath.slice(${S.errSchemaPath.length}))`)}function Be(B,q,L){_.if(n.and(t._`${B}.keyword !== ${f}`,t._`!${B}.${p}`,t._`${B}.instancePath.indexOf(${F}) === 0`),()=>{const H=_.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:t._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),le=_.const("emMatches",t._`${H}.exec(${B}.instancePath.slice(${F}.length))`),ye=_.const("emChild",t._`${le} && ${le}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);_.if(t._`${ye} !== undefined && ${ye} in ${q}`,()=>L(ye))})}function Te(B){return n.and(t._`${B}.keyword !== ${f}`,t._`!${B}.${p}`,n.or(t._`${B}.instancePath === ${F}`,n.and(t._`${B}.instancePath.indexOf(${F}) === 0`,t._`${B}.instancePath[${F}.length] === "/"`)),t._`${B}.schemaPath.indexOf(${S.errSchemaPath}) === 0`,t._`${B}.schemaPath[${S.errSchemaPath}.length] === "/"`)}function ce(B,q){const L=[];for(const H in B){const le=q[H];m.test(le)&&L.push([H,j(le)])}return _.object(...L)}function Y(B){return m.test(B)?new o._Code(o.safeStringify(B).replace(h,(q,L)=>`" + JSON.stringify(${s.getData(L,S)}) + "`).replace(O,"")):t.stringify(B)}function j(B){return t._`function(){return ${Y(B)}}`}},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const R=(I,N={})=>{if(!I.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(I.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return I.addKeyword(C(N))};i.default=R,e.exports=R,e.exports.default=R})(_d,_d.exports)),_d.exports}var dT;function ze(){if(dT)return Qn;dT=1;var e=Qn&&Qn.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.validateType=Qn.generateLazyValidator=Qn.Ajv=void 0;const i=e(Qd());Qn.Ajv=i.default;const t=e(z_()),n=e(W_());function o(l,c){let f=null;const p=(y,m)=>{if(!f){const h=new i.default({$data:!0,allErrors:!0});(0,t.default)(h),(0,n.default)(h,{singleError:!0}),c?.forEach(O=>h.addKeyword(O)),f=h.compile(l),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(y,m)};return p}Qn.generateLazyValidator=o;function s(l,c){return l.validate(c)}return Qn.validateType=s,Qn}var fT;function d1(){return fT||(fT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(Bp)),Bp}var Jp={},pT;function f1(){return pT||(pT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const i=ze();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(Jp)),Jp}var mT;function p1(){return mT||(mT=1,(function(e){var i=Qa&&Qa.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Qa&&Qa.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(d1(),e),t(f1(),e)})(Qa)),Qa}var to={},Qp={},hT;function m1(){return hT||(hT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(Qp)),Qp}var Zp={},xp={},yT;function xd(){return yT||(yT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const i=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,i.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.EXOTIC]:50,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},o={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.EXOTIC]:"#E4FFB8",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.EXOTIC]:"#CAFF73",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function l(y){return n[y]}t.getMaxSupply=l;function c(y){return s[y]}t.getColor=c;function f(){return[t.UNIQUE,t.MYTHIC,t.EXOTIC,t.LEGENDARY,t.EPIC,t.RARE,t.UNCOMMON,t.COMMON]}t.getRarities=f;function p(y){return[o[y],s[y]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(xp)),xp}var $p={},gT;function Ho(){return gT||(gT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})($p)),$p}var em={},tm={},vT;function G_(){return vT||(vT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(tm)),tm}var rm={},nm={},_T;function aM(){return _T||(_T=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(nm)),nm}var ET;function K_(){return ET||(ET=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const i=Ho(),t=ze(),n=aM();(function(o){o.schema={oneOf:[Object.assign({},i.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(rm)),rm}var bT;function Y_(){return bT||(bT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const i=ze(),t=G_(),n=K_();(function(o){o.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(em)),em}var ro={},no={},im={},am={},wT;function zo(){return wT||(wT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const i=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,i.generateLazyValidator)(t.schema);t.validate=o=>n(o)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv1||(e.IPFSv1={}))})(am)),am}var ST;function oM(){return ST||(ST=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const i=Ho(),t=zo(),n=ze();var o;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(o=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:Object.assign(Object.assign({},o.schema),{nullable:!0})},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var l;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=y=>p.test(y)})(l=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:l.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(im)),im}var om={},TT;function h1(){return TT||(TT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const i=ze(),t=oM();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(om)),om}var AT;function y1(){return AT||(AT=1,(function(e){var i=no&&no.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=no&&no.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(oM(),e),t(h1(),e)})(no)),no}var sm={},um={},OT;function sM(){return OT||(OT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(um)),um}var lm={},IT;function uM(){return IT||(IT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(lm)),lm}var cm={},PT;function lM(){return PT||(PT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const i=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,i.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(cm)),cm}var dm={},bu={},RT;function X_(){return RT||(RT=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.displayableProperties=void 0,bu.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),bu}var fm={},NT;function cM(){return NT||(NT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(fm)),fm}var pm={},CT;function dM(){return CT||(CT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(pm)),pm}var MT;function g1(){return MT||(MT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const i=ze(),t=X_(),n=sM(),o=lM(),s=cM(),l=dM(),c=uM();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:o.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},creator:{type:"string",nullable:!0,description:"Wallet address of the creator of the scene",pattern:"^(0x[a-fA-F0-9]{40})?$",errorMessage:"Creator must be a valid wallet address"},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:l.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,i.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(dm)),dm}var jT;function v1(){return jT||(jT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var i=sM();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return i.FeatureToggles}});var t=uM();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=lM();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var o=g1();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return o.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return o.RequiredPermission}});var s=cM();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var l=dM();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return l.SpawnPoint}})})(sm)),sm}var io={},mm={},hm={},LT;function fM(){return LT||(LT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(hm)),hm}var DT;function pM(){return DT||(DT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const i=ze(),t=fM();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(mm)),mm}var ym={},kT;function mM(){return kT||(kT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(ym)),ym}var gm={},qT;function J_(){return qT||(qT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const i=xd(),t=ze();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:i.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},o=(0,t.generateLazyValidator)(n);function s(l){return o(l)}e.isStandard=s})(gm)),gm}var vm={},ao={},_m={},BT;function _1(){return BT||(BT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(_m)),_m}var UT;function hM(){return UT||(UT=1,(function(e){var i=ao&&ao.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=ao&&ao.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(_1(),e)})(ao)),ao}var Em={},FT;function Q_(){return FT||(FT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const i=ze();var t;(function(m){m.SINGLE="single",m.ANY="any",m.MULTIPLE="multiple",m.RANGE="range"})(t=e.MappingType||(e.MappingType={}));var n;(function(m){m.MAINNET="mainnet",m.BASE_MAINNET="base_mainnet",m.BASE_SEPOLIA="base_sepolia",m.MONAD_MAINNET="monad_mainnet",m.MONAD_TESTNET="monad_testnet",m.APE_MAINNET="ape_mainnet",m.APE_CALDERA="ape_caldera",m.MATIC="matic",m.SEPOLIA="sepolia",m.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var o;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},m.validate=(0,i.generateLazyValidator)(m.schema)})(o=e.SingleMapping||(e.SingleMapping={}));var s;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.ANY}},required:["type"],additionalProperties:!1},m.validate=(0,i.generateLazyValidator)(m.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var l;(function(m){m._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(O,C){if(!C||!C.from||!C.to)return!1;let{to:R,from:I}=C;return(typeof I!="bigint"||typeof R!="bigint")&&(I=BigInt(I),R=BigInt(R)),I<=R},errors:!1},m.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},m.validate=(0,i.generateLazyValidator)(m.schema,[m._fromLessThanOrEqualTo])})(l=e.RangeMapping||(e.RangeMapping={}));var c;(function(m){m.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},m.validate=(0,i.generateLazyValidator)(m.schema)})(c=e.MultipleMapping||(e.MultipleMapping={}));var f;(function(m){m.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)}},required:["type"],oneOf:[o.schema,s.schema,l.schema,c.schema]},m.validate=(0,i.generateLazyValidator)(m.schema,[l._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(m){m._isMappingsValid={keyword:"_isMappingsValid",validate:function(O,C){try{y(C)}catch{return!1}return!0},errors:!1},m.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:f.schema}},minProperties:1,required:[],additionalProperties:!1};const h=Object.values(n).reduce((O,C)=>(O[C]=m.innerSchema,O),{});m.schema={type:"object",properties:h,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},m.validate=(0,i.generateLazyValidator)(m.schema,[l._fromLessThanOrEqualTo,m._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(h,O,C){super(h),this.existingMapping=O,this.conflictingMapping=C}}e.AddMappingError=p;function y(m={}){const h={};for(const[v,S]of Object.entries(m)){h[v]={};for(const[M,F]of Object.entries(S))for(const W of F)A(v,M,W)}function O(){return JSON.parse(JSON.stringify(h))}function C(v,S,M){const F=BigInt(v);return F>=BigInt(S)&&F<=BigInt(M)}function R(v,S){switch(S.type){case t.SINGLE:return v.id===S.id;case t.MULTIPLE:return S.ids.includes(v.id);case t.RANGE:return C(v.id,S.from,S.to);default:return!1}}function I(v,S){switch(S.type){case t.SINGLE:return v.ids.includes(S.id);case t.MULTIPLE:return v.ids.some(M=>S.ids.includes(M));case t.RANGE:return v.ids.some(M=>C(M,S.from,S.to));default:return!1}}function N(v,S){switch(S.type){case t.SINGLE:return C(S.id,v.from,v.to);case t.MULTIPLE:return S.ids.some(M=>C(M,v.from,v.to));case t.RANGE:return BigInt(v.from)<=BigInt(S.to)&&BigInt(v.to)>=BigInt(S.from)}}function _(v,S){if(v.type===t.ANY||S.type===t.ANY)return!0;switch(v.type){case t.SINGLE:return R(v,S);case t.MULTIPLE:return I(v,S);case t.RANGE:return N(v,S)}}function A(v,S,M){var F,W;const J=S.toLowerCase();h[v]=(F=h[v])!==null&&F!==void 0?F:{},h[v][J]=(W=h[v][J])!==null&&W!==void 0?W:[];for(const pe of h[v][J])if(_(pe,M))throw new p(`Cannot add mapping to contract ${J} on network ${v} because it overlaps with existing mapping`,pe,M);h[v][J].push(M)}function w(v,S,M){var F;return!((F=h[v])===null||F===void 0)&&F[S]?h[v][S].some(W=>{switch(W.type){case t.SINGLE:return W.id===M;case t.ANY:return!0;case t.MULTIPLE:return W.ids.includes(M);case t.RANGE:return BigInt(M)>=BigInt(W.from)&&BigInt(M)<=BigInt(W.to)}}):!1}return{addMapping:A,getMappings:O,includesNft:w}}e.createMappingsHelper=y})(Em)),Em}var VT;function Z_(){return VT||(VT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const i=ze(),t=hM(),n=Q_();e.schema={type:"object",properties:{merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const o={keyword:"_containsHashingKeys",validate:function(c,f){var p;const y=f;return!((p=y?.merkleProof)===null||p===void 0)&&p.hashingKeys?y.merkleProof.hashingKeys.every(m=>y.hasOwnProperty(m)):!1},errors:!1},s=(0,i.generateLazyValidator)(e.schema,[o,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function l(c){return s(c)}e.isThirdParty=l})(vm)),vm}var bm={},wm={},xn={},HT;function yM(){if(HT)return xn;HT=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.isBaseEmote=xn.isBaseAvatar=xn.requiredBaseItemProps=xn.baseItemProperties=void 0;const e=pM(),i=mM(),t=X_();xn.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},i.Metrics.schema),{nullable:!0})}),xn.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const l=s.id.split(":"),c=l[1]==="decentraland",f=l[3]==="base-avatars";return l.length===5&&c&&f}xn.isBaseAvatar=n;function o(s){if(!s||!s.id)return!1;const l=s.id.split(":");return l.length===5&&l[1]==="decentraland"&&l[3]==="base-emotes"}return xn.isBaseEmote=o,xn}var zT;function E1(){return zT||(zT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const i=ze(),t=Ho(),n=Y_(),o=yM(),s=J_(),l=Z_(),c=K_(),f=Q_();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},o.baseItemProperties),s.standardProperties),l.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...o.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...o.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const y={keyword:"_isThirdParty",validate:(h,O)=>!h||(0,l.isThirdParty)(O),errors:!1},m={keyword:"_isBaseAvatar",validate:(h,O)=>!h||(0,o.isBaseAvatar)(O),errors:!1};p.validate=(0,i.generateLazyValidator)(p.schema,[y,m,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(wm)),wm}var WT;function b1(){return WT||(WT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var i=Y_();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return i.WearableRepresentation}});var t=E1();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Ho();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var o=aM();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return o.BodyPartCategory}});var s=K_();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(bm)),bm}var Sm={},Tm={},Am={},Om={},GT;function gM(){return GT||(GT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Om)),Om}var Im={},KT;function vM(){return KT||(KT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const i=ze(),t=G_();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(Im)),Im}var Pm={},YT;function _M(){return YT||(YT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.OutcomeGroup=e.StartAnimation=e.EmoteClip=e.ArmatureId=void 0;const i=ze();var t;(function(o){o.Armature="Armature",o.Armature_Prop="Armature_Prop",o.Armature_Other="Armature_Other"})(t=e.ArmatureId||(e.ArmatureId={})),(function(o){o.schema={type:"string",enum:Object.values(o)},o.validate=(0,i.generateLazyValidator)(o.schema)})(t=e.ArmatureId||(e.ArmatureId={}));var n;(function(o){o.schema={type:"object",properties:{animation:{type:"string",minLength:1,errorMessage:"animation must be a non-empty string (GLB clip name)"}},required:["animation"],additionalProperties:!1,errorMessage:{required:{animation:"animation is required (GLB clip name)"}}},o.validate=(0,i.generateLazyValidator)(o.schema)})(n=e.EmoteClip||(e.EmoteClip={})),(function(o){o.schema={type:"object",properties:{loop:{type:"boolean",errorMessage:"startAnimation.loop must be a boolean"},[t.Armature]:Object.assign(Object.assign({},n.schema),{errorMessage:"startAnimation.Armature is required and must contain valid animation data"}),[t.Armature_Prop]:Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:"startAnimation.Armature_Prop must contain valid animation data when provided"}),audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["loop",t.Armature],additionalProperties:!1,errorMessage:{required:{loop:"startAnimation.loop is required",[t.Armature]:"startAnimation.Armature is required"}}},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.StartAnimation||(e.StartAnimation={})),(function(o){o.schema={type:"object",properties:{title:{type:"string",minLength:1,errorMessage:"outcome.title must be a non-empty string"},loop:{type:"boolean",errorMessage:"outcome.loop must be a boolean"},clips:{type:"object",properties:Object.values(t).reduce((s,l)=>(s[l]=Object.assign(Object.assign({},n.schema),{nullable:!0,errorMessage:`outcome.clips.${l} must contain valid animation data when provided`}),s),{}),additionalProperties:!0,minProperties:1,errorMessage:"outcome.clips must contain at least one armature animation"},audio:{type:"string",nullable:!0,errorMessage:"audio must be a string (audio clip filename) when provided"}},required:["title","loop","clips"],additionalProperties:!1,errorMessage:{required:{title:"outcome.title is required",loop:"outcome.loop is required",clips:"outcome.clips is required"}}},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.OutcomeGroup||(e.OutcomeGroup={}))})(Pm)),Pm}var XT;function EM(){return XT||(XT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const i=gM(),t=ze(),n=vM(),o=_M();(function(s){s.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:i.EmoteCategory.schema,loop:{type:"boolean"},startAnimation:Object.assign(Object.assign({},o.StartAnimation.schema),{nullable:!0}),randomizeOutcomes:{type:"boolean",nullable:!0},outcomes:{type:"array",items:o.OutcomeGroup.schema,minItems:1,maxItems:3,nullable:!0}},required:["category","tags","representations","loop"],dependencies:{startAnimation:["randomizeOutcomes","outcomes"],randomizeOutcomes:["startAnimation","outcomes"],outcomes:["startAnimation","randomizeOutcomes"]},additionalProperties:!0},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Am)),Am}var JT;function w1(){return JT||(JT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const i=bM(),t=ze(),n=yM(),o=J_(),s=Z_(),l=EM();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),o.standardProperties),s.schema.properties),{emoteDataADR74:l.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(y,m)=>!y||(0,i.isThirdParty)(m),errors:!1},p={keyword:"_isBaseEmote",validate:(y,m)=>!y||(0,n.isBaseEmote)(m),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,i.RangeMapping._fromLessThanOrEqualTo,i.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Tm)),Tm}var Rm={},QT;function S1(){return QT||(QT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Rm)),Rm}var Nm={},ZT;function T1(){return ZT||(ZT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=void 0;const i=ze();(function(t){t.SIMPLE_OUTCOME="so",t.MULTIPLE_OUTCOME="mo",t.RANDOM_OUTCOME="ro"})(e.EmoteOutcomeType||(e.EmoteOutcomeType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmoteOutcomeType||(e.EmoteOutcomeType={}))})(Nm)),Nm}var xT;function A1(){return xT||(xT=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteOutcomeType=e.EmotePlayMode=e.EmoteCategory=e.StartAnimation=e.OutcomeGroup=e.EmoteClip=e.ArmatureId=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var i=w1();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return i.Emote}});var t=vM();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=EM();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var o=_M();Object.defineProperty(e,"ArmatureId",{enumerable:!0,get:function(){return o.ArmatureId}}),Object.defineProperty(e,"EmoteClip",{enumerable:!0,get:function(){return o.EmoteClip}}),Object.defineProperty(e,"OutcomeGroup",{enumerable:!0,get:function(){return o.OutcomeGroup}}),Object.defineProperty(e,"StartAnimation",{enumerable:!0,get:function(){return o.StartAnimation}});var s=gM();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return s.EmoteCategory}});var l=S1();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return l.EmotePlayMode}});var c=T1();Object.defineProperty(e,"EmoteOutcomeType",{enumerable:!0,get:function(){return c.EmoteOutcomeType}})})(Sm)),Sm}var $T;function bM(){return $T||($T=1,(function(e){var i=io&&io.__createBinding||(Object.create?(function(p,y,m,h){h===void 0&&(h=m);var O=Object.getOwnPropertyDescriptor(y,m);(!O||("get"in O?!y.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return y[m]}}),Object.defineProperty(p,h,O)}):(function(p,y,m,h){h===void 0&&(h=m),p[h]=y[m]})),t=io&&io.__exportStar||function(p,y){for(var m in p)m!=="default"&&!Object.prototype.hasOwnProperty.call(y,m)&&i(y,p,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=pM();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var o=fM();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return o.Locale}});var s=mM();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var l=G_();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return l.BodyShape}});var c=J_();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=Z_();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(Q_(),e),t(b1(),e),t(A1(),e)})(io)),io}var Cm={},Mm={},eA;function _l(){return eA||(eA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const i=ze();var t;(function(o){o.SIGNER="SIGNER",o.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",o.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",o.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",o.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(o){o.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},o.validate=(0,i.generateLazyValidator)(o.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(o){o.schema={type:"array",items:n.schema,minItems:1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.AuthChain||(e.AuthChain={}))})(Mm)),Mm}var tA;function O1(){return tA||(tA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const i=zo(),t=_l(),n=ze();(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Cm)),Cm}var jm={},Lm={},rA;function wM(){return rA||(rA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const i=zo(),t=ze();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Lm)),Lm}var nA;function SM(){return nA||(nA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const i=zo(),t=wM(),n=ze();(function(o){o.SCENE="scene",o.PROFILE="profile",o.WEARABLE="wearable",o.STORE="store",o.EMOTE="emote",o.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(o){o.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.Entity||(e.Entity={}))})(jm)),jm}var Dm={},iA;function I1(){return iA||(iA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const i=_l(),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:i.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Dm)),Dm}var oo={},km={},aA;function P1(){return aA||(aA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const i=Ho(),t=zo(),n=ze();var o;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(o=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:o.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(km)),km}var oA;function R1(){return oA||(oA=1,(function(e){var i=oo&&oo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=oo&&oo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(P1(),e)})(oo)),oo}var so={},qm={},sA;function TM(){return sA||(sA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationOptOutScope=e.NotificationType=void 0,(function(i){i.BADGE_GRANTED="badge_granted",i.BID_ACCEPTED="bid_accepted",i.BID_RECEIVED="bid_received",i.EVENTS_STARTED="events_started",i.EVENTS_STARTS_SOON="events_starts_soon",i.EVENT_CREATED="event_created",i.GOVERNANCE_ANNOUNCEMENT="governance_announcement",i.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",i.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",i.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",i.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",i.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",i.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",i.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",i.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",i.GOVERNANCE_TENDER_PASSED="governance_tender_passed",i.GOVERNANCE_WHALE_VOTE="governance_whale_vote",i.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",i.ITEM_SOLD="item_sold",i.ITEM_PUBLISHED="item_published",i.LAND_RENTAL_ENDED="rental_ended",i.LAND_RENTED="rental_started",i.REWARD_ASSIGNED="reward_assignment",i.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",i.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",i.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",i.REWARD_DELAYED="reward_delayed",i.REWARD_IN_PROGRESS="reward_in_progress",i.ROYALTIES_EARNED="royalties_earned",i.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",i.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",i.WORLDS_ACCESS_RESTORED="worlds_access_restored",i.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",i.WORLDS_MISSING_RESOURCES="worlds_missing_resources",i.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",i.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",i.CREDITS_GOAL_COMPLETED="credits_goal_completed",i.CREDITS_ON_DEMAND_GRANTED="credits_on_demand_granted",i.STREAMING_KEY_RESET="streaming_key_reset",i.STREAMING_KEY_REVOKE="streaming_key_revoke",i.STREAMING_KEY_EXPIRED="streaming_key_expired",i.STREAMING_TIME_EXCEEDED="streaming_time_exceeded",i.STREAMING_PLACE_UPDATED="streaming_place_updated",i.CREDITS_REMINDER_COMPLETE_GOALS="credits_reminder_complete_goals",i.CREDITS_REMINDER_CLAIM_CREDITS="credits_reminder_claim_credits",i.CREDITS_REMINDER_USAGE="credits_reminder_usage",i.CREDITS_REMINDER_USAGE_24_HOURS="credits_reminder_usage_24_hours",i.CREDITS_REMINDER_DO_NOT_MISS_OUT="credits_reminder_do_not_miss_out",i.CREDITS_NEW_SEASON_REMINDER="credits_new_season_reminder",i.REFERRAL_INVITED_USERS_ACCEPTED="referral_invited_users_accepted",i.REFERRAL_NEW_TIER_REACHED="referral_new_tier_reached",i.COMMUNITY_DELETED="community_deleted",i.COMMUNITY_DELETED_CONTENT_VIOLATION="community_deleted_content_violation",i.COMMUNITY_RENAMED="community_renamed",i.COMMUNITY_MEMBER_BANNED="community_member_banned",i.COMMUNITY_MEMBER_REMOVED="community_member_removed",i.COMMUNITY_REQUEST_TO_JOIN_RECEIVED="community_request_to_join_received",i.COMMUNITY_REQUEST_TO_JOIN_ACCEPTED="community_request_to_join_accepted",i.COMMUNITY_INVITE_RECEIVED="community_invite_received",i.COMMUNITY_OWNERSHIP_TRANSFERRED="community_ownership_transferred",i.COMMUNITY_POST_ADDED="community_post_added",i.COMMUNITY_VOICE_CHAT_STARTED="community_voice_chat_started",i.USER_BANNED_FROM_SCENE="user_banned_from_scene",i.USER_UNBANNED_FROM_SCENE="user_unbanned_from_scene",i.TRANSFER_RECEIVED="transfer_received"})(e.NotificationType||(e.NotificationType={})),(function(i){i.COMMUNITY="community"})(e.NotificationOptOutScope||(e.NotificationOptOutScope={}))})(qm)),qm}var Bm={},Um={},uA;function AM(){return uA||(uA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const i=ze(),t=TM(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},o=Object.values(t.NotificationType).reduce((s,l)=>(s[l]=n,s),{});(function(s){s.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(t.NotificationType),additionalProperties:!1,properties:o}}},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(Um)),Um}var Fm={},lA;function OM(){return lA||(lA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(i){i.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(i.schema.pattern);i.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(Fm)),Fm}var cA;function N1(){return cA||(cA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const i=ze(),t=AM(),n=zo(),o=OM();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},o.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(Bm)),Bm}var dA;function C1(){return dA||(dA=1,(function(e){var i=so&&so.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=so&&so.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(TM(),e),t(N1(),e),t(AM(),e)})(so)),so}var uo={},Vm={},fA;function dn(){return fA||(fA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(i){(function(t){t.BLOCKCHAIN="blockchain",t.CATALYST_DEPLOYMENT="catalyst-deployment",t.WORLD="world",t.CLIENT="client",t.WEB="web",t.MARKETPLACE="marketplace",t.REWARDS="rewards",t.BADGE="badge",t.ASSET_BUNDLE="asset-bundle",t.SOCIAL_SERVICE="social-service",t.CREDITS_SERVICE="credits-service",t.STREAMING="streaming",t.COMMS="comms",t.REFERRAL="referral",t.COMMUNITY="community",t.CAMERA="camera",t.EVENT="event",t.GOVERNANCE="governance"})(i.Type||(i.Type={})),(function(t){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published",n.TRANSFER_RECEIVED="transfer-received"})(t.Blockchain||(t.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(t.Marketplace||(t.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(t.CatalystDeployment||(t.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment",n.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",n.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked",n.WORLDS_ACCESS_RESTORED="worlds_access_restored",n.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",n.WORLDS_MISSING_RESOURCES="worlds_missing_resources"})(t.Worlds||(t.Worlds={})),(function(n){n.LOGGED_IN="logged-in",n.LOGGED_IN_CACHED="logged-in-cached",n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(t.Client||(t.Client={})),(function(n){n.AUTH_IDENTIFY="auth-identify"})(t.Web||(t.Web={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(t.Rewards||(t.Rewards={})),(function(n){n.GRANTED="badge-granted"})(t.Badge||(t.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(t.AssetBundle||(t.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(t.SocialService||(t.SocialService={})),(function(n){n.CREDITS_GOAL_COMPLETED="credits-goal-completed",n.COMPLETE_GOALS_REMINDER="complete-goals-reminder",n.CLAIM_CREDITS_REMINDER="claim-credits-reminder",n.DO_NOT_MISS_OUT_REMINDER="do-not-miss-out-reminder",n.USAGE_REMINDER="usage-reminder",n.USAGE_24_HOURS_REMINDER="usage-24-hours-reminder",n.ON_DEMAND_CREDITS_GRANTED="on-demand-credits-granted",n.NEW_SEASON_REMINDER="new-season-reminder"})(t.CreditsService||(t.CreditsService={})),(function(n){n.STREAMING_KEY_RESET="streaming-key-reset",n.STREAMING_KEY_REVOKE="streaming-key-revoke",n.STREAMING_KEY_EXPIRED="streaming-key-expired",n.STREAMING_TIME_EXCEEDED="streaming-time-exceeded",n.STREAMING_PLACE_UPDATED="streaming-place-updated",n.COMMUNITY_STREAMING_ENDED="community-streaming-ended"})(t.Streaming||(t.Streaming={})),(function(n){n.USER_JOINED_ROOM="user-joined-room",n.USER_LEFT_ROOM="user-left-room",n.USER_BANNED_FROM_SCENE="user-banned-from-scene",n.USER_UNBANNED_FROM_SCENE="user-unbanned-from-scene"})(t.Comms||(t.Comms={})),(function(n){n.REFERRAL_INVITED_USERS_ACCEPTED="referral-invited-users-accepted",n.REFERRAL_NEW_TIER_REACHED="referral-new-tier-reached"})(t.Referral||(t.Referral={})),(function(n){n.DELETED="community-deleted",n.DELETED_CONTENT_VIOLATION="community-deleted-content-violation",n.RENAMED="community-renamed",n.MEMBER_BANNED="community-member-banned",n.MEMBER_REMOVED="community-member-removed",n.REQUEST_TO_JOIN_RECEIVED="community-request-to-join-received",n.REQUEST_TO_JOIN_ACCEPTED="community-request-to-join-accepted",n.INVITE_RECEIVED="community-invite-received",n.OWNERSHIP_TRANSFERRED="community-ownership-transferred",n.POST_ADDED="community-post-added",n.VOICE_CHAT_STARTED="community-voice-chat-started"})(t.Community||(t.Community={})),(function(n){n.PHOTO_TAKEN="photo-taken",n.PHOTO_PRIVACY_CHANGED="photo-privacy-changed"})(t.Camera||(t.Camera={})),(function(n){n.EVENT_CREATED="event-created",n.EVENT_STARTS_SOON="event-starts-soon",n.EVENT_STARTED="event-started",n.EVENT_ENDED="event-ended"})(t.Event||(t.Event={})),(function(n){n.PROPOSAL_ENACTED="governance_proposal_enacted",n.COAUTHOR_REQUESTED="governance_coauthor_requested",n.PITCH_PASSED="governance_pitch_passed",n.TENDER_PASSED="governance_tender_passed",n.AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",n.VOTING_ENDED_VOTER="governance_voting_ended_voter",n.NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",n.NEW_COMMENT_ON_PROJECT_UPDATED="governance_new_comment_on_project_update",n.WHALE_VOTE="governance_whale_vote",n.VOTED_ON_BEHALF="governance_voted_on_behalf",n.CLIFF_ENDED="governance_cliff_ended"})(t.Governance||(t.Governance={}))})(i.SubType||(i.SubType={}))})(e.Events||(e.Events={}))})(Vm)),Vm}var Hm={},pA;function M1(){return pA||(pA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TransferReceivedEvent=e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const i=ze(),t=dn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.BID_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.TRANSFER_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{senderAddress:{type:"string"},receiverAddress:{type:"string"},tokenUri:{type:"string",nullable:!0}},required:["senderAddress","receiverAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.TransferReceivedEvent||(e.TransferReceivedEvent={}))})(Hm)),Hm}var zm={},mA;function j1(){return mA||(mA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const i=_l(),t=ze(),n=SM(),o=dn();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:o.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(o.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:i.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(zm)),zm}var Wm={},hA;function L1(){return hA||(hA=1,Object.defineProperty(Wm,"__esModule",{value:!0})),Wm}var Gm={},yA;function D1(){return yA||(yA=1,Object.defineProperty(Gm,"__esModule",{value:!0})),Gm}var Km={},gA;function k1(){return gA||(gA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const i=ze(),t=dn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.MARKETPLACE},subType:{type:"string",const:t.Events.SubType.Marketplace.BID_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},price:{type:"string"},title:{type:"string"},description:{type:"string"},network:{type:"string"}},required:["address","image","seller","category","link","price","title","network"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(Km)),Km}var Ym={},wu={},vA;function $d(){if(vA)return wu;vA=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.createEventSchema=void 0;function e(i,t,n){return{type:"object",properties:{type:{type:"string",const:i},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return wu.createEventSchema=e,wu}var _A;function q1(){return _A||(_A=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const i=ze(),t=dn(),n=$d(),o={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},s={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(Ym)),Ym}var Xm={},EA;function B1(){return EA||(EA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreditsClaimReminderEvent=e.CreditsDoNotMissOutReminderEvent=e.CreditsUsage24HoursReminderEvent=e.CreditsNewSeasonReminderEvent=e.CreditsUsageReminderEvent=e.CreditsCompleteGoalsReminderEvent=e.CreditsGoalCompletedEvent=e.CreditsOnDemandEvent=e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const i=ze(),t=dn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BADGE},subType:{type:"string",const:t.Events.SubType.Badge.GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{badgeId:{type:"string"},badgeTierName:{type:"string",nullable:!0},badgeName:{type:"string"},badgeImageUrl:{type:"string"},address:{type:"string"}},required:["badgeId","badgeName","badgeImageUrl","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","statusCode","isLods","isWorld","version"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"},version:{type:"string"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},message:{type:"string",nullable:!0}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{requestId:{type:"string"},sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]},receiver:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"},hasClaimedName:{type:"boolean"}},required:["address","name","profileImageUrl","hasClaimedName"]}},required:["requestId","sender","receiver"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.ON_DEMAND_CREDITS_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creditsGranted:{type:"number",minimum:1},address:{type:"string"},granterAddress:{type:"string"}},required:["creditsGranted","address","granterAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsOnDemandEvent||(e.CreditsOnDemandEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.CREDITS_GOAL_COMPLETED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{goalId:{type:"string"},creditsObtained:{type:"number",minimum:0},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},address:{type:"string"}},required:["goalId","creditsObtained","seasonId","weekNumber","address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsGoalCompletedEvent||(e.CreditsGoalCompletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.COMPLETE_GOALS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1},pendingGoalIds:{type:"array",items:{type:"string"},minItems:1}},required:["address","seasonId","weekNumber","pendingGoalIds"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsCompleteGoalsReminderEvent||(e.CreditsCompleteGoalsReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.USAGE_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"},expirationDay:{type:"string"}},required:["address","creditsAmount","expirationDate","expirationDay"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsUsageReminderEvent||(e.CreditsUsageReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.NEW_SEASON_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{addresses:{type:"array",items:{type:"string"}},seasonName:{type:"string"},startDate:{type:"string"},endDate:{type:"string"}},required:["addresses","seasonName","startDate","endDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsNewSeasonReminderEvent||(e.CreditsNewSeasonReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.USAGE_24_HOURS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},creditsAmount:{type:"number",minimum:1},expirationDate:{type:"string"}},required:["address","creditsAmount","expirationDate"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsUsage24HoursReminderEvent||(e.CreditsUsage24HoursReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.DO_NOT_MISS_OUT_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsDoNotMissOutReminderEvent||(e.CreditsDoNotMissOutReminderEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CREDITS_SERVICE},subType:{type:"string",const:t.Events.SubType.CreditsService.CLAIM_CREDITS_REMINDER},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},seasonId:{type:"number",minimum:1},weekNumber:{type:"number",minimum:1}},required:["address","seasonId","weekNumber"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CreditsClaimReminderEvent||(e.CreditsClaimReminderEvent={}))})(Xm)),Xm}var Jm={},bA;function U1(){return bA||(bA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityStreamingEndedEvent=e.StreamingPlaceUpdatedEvent=e.StreamingTimeExceededEvent=e.StreamingKeyExpiredEvent=e.StreamingKeyRevokeEvent=e.StreamingKeyResetEvent=void 0;const i=ze(),t=dn(),n=$d(),o={type:"object",properties:{title:{type:"string"},description:{type:"string"},position:{type:"string"},worldName:{type:"string",nullable:!0},isWorld:{type:"boolean"},url:{type:"string"},address:{type:"string"},image:{type:"string"}},required:["position","isWorld","url","title","description","address","image"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_RESET,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.StreamingKeyResetEvent||(e.StreamingKeyResetEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_REVOKE,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.StreamingKeyRevokeEvent||(e.StreamingKeyRevokeEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_KEY_EXPIRED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.StreamingKeyExpiredEvent||(e.StreamingKeyExpiredEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_TIME_EXCEEDED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.StreamingTimeExceededEvent||(e.StreamingTimeExceededEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.STREAMING_PLACE_UPDATED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.StreamingPlaceUpdatedEvent||(e.StreamingPlaceUpdatedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.STREAMING,t.Events.SubType.Streaming.COMMUNITY_STREAMING_ENDED,{type:"object",properties:{communityId:{type:"string"},totalParticipants:{type:"number"}},required:["communityId","totalParticipants"],additionalProperties:!1}),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.CommunityStreamingEndedEvent||(e.CommunityStreamingEndedEvent={}))})(Jm)),Jm}var Qm={},wA;function F1(){return wA||(wA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.UserUnbannedFromSceneEvent=e.UserBannedFromSceneEvent=e.UserLeftRoomEvent=e.UserJoinedRoomEvent=e.RoomType=void 0;const i=ze(),t=dn();var n;(function(o){o.PRIVATE_MESSAGE="private-message",o.VOICE_CHAT="voice-chat",o.COMMUNITY_VOICE_CHAT="community-voice-chat",o.ISLAND="island",o.SCENE="scene",o.WORLD="world",o.UNKNOWN="unknown"})(n=e.RoomType||(e.RoomType={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_JOINED_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{parcel:{type:"string"},sceneId:{type:"string"},userAddress:{type:"string"},realmName:{type:"string"},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)}},required:["parcel","sceneId","userAddress","realmName","isWorld","roomType"]}},required:["type","subType","key","timestamp","metadata"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.UserJoinedRoomEvent||(e.UserJoinedRoomEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_LEFT_ROOM},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},realmName:{type:"string"},isWorld:{type:"boolean"},roomType:{type:"string",enum:Object.values(n)},sceneId:{type:"string",nullable:!0},islandName:{type:"string",nullable:!0},communityId:{type:"string",nullable:!0},voiceChatId:{type:"string",nullable:!0}},required:["isWorld","userAddress","realmName","roomType"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.UserLeftRoomEvent||(e.UserLeftRoomEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_BANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.UserBannedFromSceneEvent||(e.UserBannedFromSceneEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMS},subType:{type:"string",const:t.Events.SubType.Comms.USER_UNBANNED_FROM_SCENE},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{placeTitle:{type:"string"},userAddress:{type:"string"}},required:["placeTitle","userAddress"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.UserUnbannedFromSceneEvent||(e.UserUnbannedFromSceneEvent={}))})(Qm)),Qm}var Zm={},SA;function V1(){return SA||(SA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReferralNewTierReachedEvent=e.ReferralInvitedUsersAcceptedEvent=void 0;const i=ze(),t=dn(),n=$d(),o={type:"object",properties:{title:{type:"string"},description:{type:"string"},address:{type:"string"},tier:{type:"number",minimum:1},url:{type:"string"},image:{type:"string"},invitedUserAddress:{type:"string"},invitedUsers:{type:"number",minimum:1},rarity:{type:"string",nullable:!0}},required:["address","tier","url","title","description","image","invitedUserAddress"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REFERRAL,t.Events.SubType.Referral.REFERRAL_INVITED_USERS_ACCEPTED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.ReferralInvitedUsersAcceptedEvent||(e.ReferralInvitedUsersAcceptedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.REFERRAL,t.Events.SubType.Referral.REFERRAL_NEW_TIER_REACHED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.ReferralNewTierReachedEvent||(e.ReferralNewTierReachedEvent={}))})(Zm)),Zm}var xm={},TA;function H1(){return TA||(TA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CommunityVoiceChatStartedEvent=e.CommunityOwnershipTransferredEvent=e.CommunityPostAddedEvent=e.CommunityInviteReceivedEvent=e.CommunityRequestToJoinAcceptedEvent=e.CommunityRequestToJoinReceivedEvent=e.CommunityMemberRemovedEvent=e.CommunityMemberBannedEvent=e.CommunityRenamedEvent=e.CommunityDeletedContentViolationEvent=e.CommunityDeletedEvent=void 0;const i=ze(),t=dn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.DELETED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","name","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityDeletedEvent||(e.CommunityDeletedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.DELETED_CONTENT_VIOLATION},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},ownerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","ownerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityDeletedContentViolationEvent||(e.CommunityDeletedContentViolationEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.RENAMED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},oldName:{type:"string"},newName:{type:"string"},memberAddresses:{type:"array",items:{type:"string"}},thumbnailUrl:{type:"string"}},required:["id","oldName","newName","memberAddresses","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityRenamedEvent||(e.CommunityRenamedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.MEMBER_BANNED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityMemberBannedEvent||(e.CommunityMemberBannedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.MEMBER_REMOVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{id:{type:"string"},name:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["id","name","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityMemberRemovedEvent||(e.CommunityMemberRemovedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.REQUEST_TO_JOIN_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},memberName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","memberAddress","memberName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinReceivedEvent||(e.CommunityRequestToJoinReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.REQUEST_TO_JOIN_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityRequestToJoinAcceptedEvent||(e.CommunityRequestToJoinAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.INVITE_RECEIVED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},memberAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","memberAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityInviteReceivedEvent||(e.CommunityInviteReceivedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.POST_ADDED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},postId:{type:"string"},authorAddress:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["addressesToNotify","communityId","communityName","thumbnailUrl","postId","authorAddress"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityPostAddedEvent||(e.CommunityPostAddedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.OWNERSHIP_TRANSFERRED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},oldOwnerAddress:{type:"string"},newOwnerAddress:{type:"string"},thumbnailUrl:{type:"string"}},required:["communityId","communityName","oldOwnerAddress","newOwnerAddress","thumbnailUrl"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityOwnershipTransferredEvent||(e.CommunityOwnershipTransferredEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.COMMUNITY},subType:{type:"string",const:t.Events.SubType.Community.VOICE_CHAT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:1},metadata:{type:"object",properties:{communityId:{type:"string"},communityName:{type:"string"},thumbnailUrl:{type:"string"},addressesToNotify:{type:"array",items:{type:"string"}}},required:["communityId","communityName","thumbnailUrl","addressesToNotify"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CommunityVoiceChatStartedEvent||(e.CommunityVoiceChatStartedEvent={}))})(xm)),xm}var $m={},AA;function z1(){return AA||(AA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PhotoTakenEvent=e.PhotoPrivacyChangedEvent=void 0;const i=ze(),t=dn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CAMERA},subType:{type:"string",const:t.Events.SubType.Camera.PHOTO_PRIVACY_CHANGED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{userAddress:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"}},required:["userAddress","photoId","isPublic"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PhotoPrivacyChangedEvent||(e.PhotoPrivacyChangedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.CAMERA},subType:{type:"string",const:t.Events.SubType.Camera.PHOTO_TAKEN},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sceneId:{type:"string"},userAddress:{type:"string"},realm:{type:"string"},photoId:{type:"string"},isPublic:{type:"boolean"},users:{type:"array",items:{type:"object",properties:{address:{type:"string"},isEmoting:{type:"boolean"}},required:["address","isEmoting"],additionalProperties:!1}},placeId:{type:"string",nullable:!0}},required:["userAddress","realm","photoId","isPublic","users"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PhotoTakenEvent||(e.PhotoTakenEvent={}))})($m)),$m}var eh={},OA;function W1(){return OA||(OA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventEndedEvent=e.EventCreatedEvent=e.EventStartsSoonEvent=e.EventStartedEvent=void 0;const i=ze(),t=dn();(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},communityId:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EventStartedEvent||(e.EventStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_STARTS_SOON},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},link:{type:"string"},startsAt:{type:"string"},endsAt:{type:"string"},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image","link","startsAt","endsAt"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EventStartsSoonEvent||(e.EventStartsSoonEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{name:{type:"string"},image:{type:"string"},communityId:{type:"string"},communityName:{type:"string"},communityThumbnail:{type:"string",nullable:!0},title:{type:"string"},description:{type:"string"},attendee:{type:"string"}},required:["name","image"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EventCreatedEvent||(e.EventCreatedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.EVENT},subType:{type:"string",const:t.Events.SubType.Event.EVENT_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{communityId:{type:"string",nullable:!0},totalAttendees:{type:"number"}},required:["totalAttendees"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EventEndedEvent||(e.EventEndedEvent={}))})(eh)),eh}var th={},IA;function G1(){return IA||(IA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GovernanceCliffEndedEvent=e.GovernanceVotedOnBehalfEvent=e.GovernanceWhaleVoteEvent=e.GovernanceNewCommentOnProjectUpdatedEvent=e.GovernanceNewCommentOnProposalEvent=e.GovernanceVotingEndedVoterEvent=e.GovernanceAuthoredProposalFinishedEvent=e.GovernanceTenderPassedEvent=e.GovernancePitchPassedEvent=e.GovernanceCoauthorRequestedEvent=e.GovernanceProposalEnactedEvent=void 0;const i=ze(),t=dn(),n=$d(),o={type:"object",properties:{proposalId:{type:"string"},proposalTitle:{type:"string"},title:{type:"string"},description:{type:"string"},link:{type:"string"},address:{type:"string"}},required:["proposalId","proposalTitle","title","description","link","address"],additionalProperties:!1};(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PROPOSAL_ENACTED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceProposalEnactedEvent||(e.GovernanceProposalEnactedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.COAUTHOR_REQUESTED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceCoauthorRequestedEvent||(e.GovernanceCoauthorRequestedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.PITCH_PASSED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernancePitchPassedEvent||(e.GovernancePitchPassedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.TENDER_PASSED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceTenderPassedEvent||(e.GovernanceTenderPassedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.AUTHORED_PROPOSAL_FINISHED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceAuthoredProposalFinishedEvent||(e.GovernanceAuthoredProposalFinishedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.VOTING_ENDED_VOTER,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceVotingEndedVoterEvent||(e.GovernanceVotingEndedVoterEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.NEW_COMMENT_ON_PROPOSAL,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceNewCommentOnProposalEvent||(e.GovernanceNewCommentOnProposalEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.NEW_COMMENT_ON_PROJECT_UPDATED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceNewCommentOnProjectUpdatedEvent||(e.GovernanceNewCommentOnProjectUpdatedEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.WHALE_VOTE,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceWhaleVoteEvent||(e.GovernanceWhaleVoteEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.VOTED_ON_BEHALF,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceVotedOnBehalfEvent||(e.GovernanceVotedOnBehalfEvent={})),(function(s){s.schema=(0,n.createEventSchema)(t.Events.Type.GOVERNANCE,t.Events.SubType.Governance.CLIFF_ENDED,o),s.validate=(0,i.generateLazyValidator)(s.schema)})(e.GovernanceCliffEndedEvent||(e.GovernanceCliffEndedEvent={}))})(th)),th}var rh={},PA;function K1(){return PA||(PA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldsMissingResourcesEvent=e.WorldsAccessRestrictedEvent=e.WorldsPermissionGrantedEvent=e.WorldsPermissionRevokedEvent=e.WorldsAccessRestoredEvent=e.WorldDeploymentEvent=void 0;const i=_l(),t=ze(),n=dn();(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.DEPLOYMENT},key:{type:"string"},timestamp:{type:"number",minimum:0},entity:{type:"object",properties:{entityId:{type:"string"},authChain:i.AuthChain.schema},additionalProperties:!0,required:["entityId","authChain"]},contentServerUrls:{type:"array",items:{type:"string"},nullable:!0},force:{type:"boolean",nullable:!0},animation:{type:"string",nullable:!0},lods:{type:"array",items:{type:"string"},nullable:!0}},required:["type","subType","key","timestamp","entity"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldDeploymentEvent||(e.WorldDeploymentEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTORED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},attendee:{type:"string"}},required:["title","description","url","attendee"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldsAccessRestoredEvent||(e.WorldsAccessRestoredEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_REVOKED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldsPermissionRevokedEvent||(e.WorldsPermissionRevokedEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_PERMISSION_GRANTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},world:{type:"string"},permissions:{type:"array",items:{type:"string"}},url:{type:"string"},address:{type:"string"}},required:["title","description","world","permissions","url","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldsPermissionGrantedEvent||(e.WorldsPermissionGrantedEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_ACCESS_RESTRICTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldsAccessRestrictedEvent||(e.WorldsAccessRestrictedEvent={})),(function(o){o.schema={type:"object",properties:{type:{type:"string",const:n.Events.Type.WORLD},subType:{type:"string",const:n.Events.SubType.Worlds.WORLDS_MISSING_RESOURCES},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{title:{type:"string"},description:{type:"string"},url:{type:"string"},when:{type:"number"},address:{type:"string"}},required:["title","description","url","when","address"],additionalProperties:!1}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.WorldsMissingResourcesEvent||(e.WorldsMissingResourcesEvent={}))})(rh)),rh}var RA;function Y1(){return RA||(RA=1,(function(e){var i=uo&&uo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=uo&&uo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(dn(),e),t(M1(),e),t(j1(),e),t(L1(),e),t(D1(),e),t(k1(),e),t(q1(),e),t(B1(),e),t(U1(),e),t(F1(),e),t(V1(),e),t(H1(),e),t(z1(),e),t(W1(),e),t(G1(),e),t(K1(),e)})(uo)),uo}var NA;function x_(){return NA||(NA=1,(function(e){var i=ro&&ro.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=ro&&ro.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(y1(),e),t(v1(),e),t(bM(),e),t(X_(),e),t(hM(),e),t(O1(),e),t(SM(),e),t(I1(),e),t(R1(),e),t(C1(),e),t(Y1(),e)})(ro)),ro}var CA;function X1(){return CA||(CA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const i=xd(),t=Ho(),n=Y_(),o=ze(),s=x_();(function(l){l.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},i.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},l.validate=(0,o.generateLazyValidator)(l.schema)})(e.WearableJson||(e.WearableJson={}))})(Zp)),Zp}var MA;function J1(){return MA||(MA=1,(function(e){var i=to&&to.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=to&&to.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(m1(),e),t(X1(),e)})(to)),to}var jA;function Q1(){return jA||(jA=1,(function(e){var i=Ja&&Ja.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Ja&&Ja.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(p1(),e),t(J1(),e)})(Ja)),Ja}var lo={},nh={},LA;function Z1(){return LA||(LA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(nh)),nh}var ih={},ah={},DA;function IM(){return DA||(DA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const i=ze(),t=ci();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.MATIC_AMOY="Amoy",s.AVALANCHE_MAINNET="Avalanche",s.BINANCE_MAINNET="Binance Smart Chain",s.ARBITRUM_MAINNET="Arbitrum",s.OPTIMISM_MAINNET="Optimism",s.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function o(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return t.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return t.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return t.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return t.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return t.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return t.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=o,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,i.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(ah)),ah}var oh={},kA;function li(){return kA||(kA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(oh)),oh}var qA;function ci(){return qA||(qA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const i=ze(),t=IM(),n=li();var o;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI",p[p.MATIC_AMOY=80002]="MATIC_AMOY",p[p.BSC_MAINNET=56]="BSC_MAINNET",p[p.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",p[p.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",p[p.FANTOM_MAINNET=250]="FANTOM_MAINNET",p[p.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(o=e.ChainId||(e.ChainId={}));function s(p){switch(p){case o.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case o.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case o.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case o.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case o.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case o.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case o.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case o.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case o.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case o.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case o.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case o.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case o.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case o.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function l(p){switch(p){case o.ETHEREUM_MAINNET:return"ethereum";case o.ETHEREUM_ROPSTEN:return"ropsten";case o.ETHEREUM_RINKEBY:return"rinkeby";case o.ETHEREUM_GOERLI:return"goerli";case o.ETHEREUM_KOVAN:return"kovan";case o.ETHEREUM_SEPOLIA:return"sepolia";case o.MATIC_MAINNET:return"matic";case o.MATIC_MUMBAI:return"mumbai";case o.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=l;function c(p){const y={[n.Network.BSC]:o.BSC_MAINNET,[n.Network.OPTIMISM]:o.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:o.ARBITRUM_MAINNET,[n.Network.FANTOM]:o.FANTOM_MAINNET,[n.Network.AVALANCHE]:o.AVALANCHE_MAINNET};switch(p){case o.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y);case o.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_ROPSTEN,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_RINKEBY,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_GOERLI,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_KOVAN,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_SEPOLIA,[n.Network.MATIC]:o.MATIC_AMOY},y);case o.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y);case o.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_MUMBAI,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_AMOY,[n.Network.MATIC]:o.MATIC_AMOY},y);default:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y)}}e.getNetworkMapping=c;function f(p){switch(p){case o.ETHEREUM_MAINNET:case o.ETHEREUM_ROPSTEN:case o.ETHEREUM_GOERLI:case o.ETHEREUM_KOVAN:case o.ETHEREUM_RINKEBY:case o.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case o.MATIC_MAINNET:case o.MATIC_MUMBAI:case o.MATIC_AMOY:return n.Network.MATIC;case o.BSC_MAINNET:return n.Network.BSC;case o.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case o.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case o.FANTOM_MAINNET:return n.Network.FANTOM;case o.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,i.generateLazyValidator)(p.schema)})(o=e.ChainId||(e.ChainId={}))})(ih)),ih}var sh={},BA;function x1(){return BA||(BA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const i=ze(),t=ci(),n=li();(function(o){o.NEWEST="newest",o.NAME="name",o.RECENTLY_REVIEWED="recently_reviewed",o.RECENTLY_LISTED="recently_listed",o.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(o){o.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Collection||(e.Collection={}))})(sh)),sh}var uh={},lh={},UA;function ef(){return UA||(UA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(lh)),lh}var FA;function $1(){return FA||(FA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const i=ze(),t=ci(),n=li(),o=ef();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:o.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(uh)),uh}var ch={},dh={},VA;function PM(){return VA||(VA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const i=ze(),t=ci(),n=x_(),o=li(),s=ef(),l=xd(),c=Ho();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"},outcomeType:{type:"string",nullable:!0}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:o.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,i.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(dh)),dh}var HA;function e2(){return HA||(HA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const i=ze(),t=ci(),n=li(),o=PM(),s=ef();(function(l){l.NAME="name",l.NEWEST="newest",l.RECENTLY_REVIEWED="recently_reviewed",l.RECENTLY_SOLD="recently_sold",l.RECENTLY_LISTED="recently_listed",l.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(l){l.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},tradeContractAddress:{type:"string",nullable:!0},data:o.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},l.validate=(0,i.generateLazyValidator)(l.schema)})(e.Item||(e.Item={}))})(ch)),ch}var fh={},zA;function $_(){return zA||(zA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(fh)),fh}var ph={},WA;function t2(){return WA||(WA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(ph)),ph}var mh={},GA;function r2(){return GA||(GA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const i=ze(),t=ci(),n=li();(function(o){o.RECENTLY_MINTED="recently_minted",o.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(o){o.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Mint||(e.Mint={}))})(mh)),mh}var hh={},KA;function n2(){return KA||(KA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(i){i.NEWEST="newest",i.RECENTLY_SOLD="recently_sold",i.CHEAPEST="cheapest",i.MOST_EXPENSIVE="most_expensive",i.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(i){i.ASC="asc",i.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(hh)),hh}var yh={},YA;function i2(){return YA||(YA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const i=ze(),t=ci(),n=$_(),o=li();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(yh)),yh}var gh={},XA;function a2(){return XA||(XA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(gh)),gh}var vh={},JA;function RM(){return JA||(JA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(vh)),vh}var _h={},QA;function o2(){return QA||(QA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const i=ze(),t=ci(),n=RM(),o=li();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:o.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(_h)),_h}var Eh={},ZA;function s2(){return ZA||(ZA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const i=ze(),t=ci(),n=li();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var o;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(o=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:o.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Eh)),Eh}var bh={},xA;function u2(){return xA||(xA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(i){i.DATE="date",i.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(bh)),bh}var wh={},$A;function l2(){return $A||($A=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(wh)),wh}var Sh={},eO;function c2(){return eO||(eO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(Sh)),Sh}var Th={},tO;function d2(){return tO||(tO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const i=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(o,s){const l=t().validWorldRanges;for(const c of l)if(o>=c.xMin&&o<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(o){o.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.World||(e.World={}))})(Th)),Th}var Ah={},rO;function f2(){return rO||(rO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const i=ze(),t=ci(),n=$_(),o=li();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const l={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};s.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},l.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...l.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},l.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...l.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},l.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...l.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(Ah)),Ah}var Oh={},nO;function p2(){return nO||(nO=1,Object.defineProperty(Oh,"__esModule",{value:!0})),Oh}var Ih={},iO;function m2(){return iO||(iO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(i){i.BID="bid",i.PUBLIC_NFT_ORDER="public_nft_order",i.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(i){i[i.ERC20=1]="ERC20",i[i.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",i[i.ERC721=3]="ERC721",i[i.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(i){i.SENT="sent",i.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(Ih)),Ih}var co={},Ph={},aO;function h2(){return aO||(aO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Ph)),Ph}var Rh={},oO;function y2(){return oO||(oO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewUnityMode=void 0,(function(i){i.AUTH="authentication",i.BUILDER="builder",i.MARKETPLACE="marketplace",i.PROFILE="profile",i.CONFIG="configurator"})(e.PreviewUnityMode||(e.PreviewUnityMode={}))})(Rh)),Rh}var Nh={},sO;function g2(){return sO||(sO=1,Object.defineProperty(Nh,"__esModule",{value:!0})),Nh}var Ch={},uO;function v2(){return uO||(uO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(Ch)),Ch}var Mh={},lO;function _2(){return lO||(lO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(Mh)),Mh}var jh={},cO;function E2(){return cO||(cO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewRenderer=e.PreviewMessageType=void 0;const i=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.BABYLON="babylon",n.UNITY="unity"})(e.PreviewRenderer||(e.PreviewRenderer={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,o,s,l="*")=>{const c={type:o,payload:s};n.postMessage(c,l)};e.sendMessage=t})(jh)),jh}var Lh={},dO;function b2(){return dO||(dO=1,Object.defineProperty(Lh,"__esModule",{value:!0})),Lh}var Dh={},fO;function w2(){return fO||(fO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(Dh)),Dh}var kh={},pO;function S2(){return pO||(pO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(kh)),kh}var qh={},mO;function T2(){return mO||(mO=1,Object.defineProperty(qh,"__esModule",{value:!0})),qh}var Bh={},hO;function A2(){return hO||(hO=1,Object.defineProperty(Bh,"__esModule",{value:!0})),Bh}var Uh={},yO;function O2(){return yO||(yO=1,Object.defineProperty(Uh,"__esModule",{value:!0})),Uh}var Fh={},gO;function I2(){return gO||(gO=1,Object.defineProperty(Fh,"__esModule",{value:!0})),Fh}var Vh={},vO;function P2(){return vO||(vO=1,Object.defineProperty(Vh,"__esModule",{value:!0})),Vh}var Hh={},_O;function R2(){return _O||(_O=1,Object.defineProperty(Hh,"__esModule",{value:!0})),Hh}var zh={},EO;function N2(){return EO||(EO=1,Object.defineProperty(zh,"__esModule",{value:!0})),zh}var Wh={},bO;function C2(){return bO||(bO=1,Object.defineProperty(Wh,"__esModule",{value:!0})),Wh}var wO;function M2(){return wO||(wO=1,(function(e){var i=co&&co.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=co&&co.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(h2(),e),t(y2(),e),t(g2(),e),t(v2(),e),t(_2(),e),t(E2(),e),t(b2(),e),t(w2(),e),t(S2(),e),t(T2(),e),t(A2(),e),t(O2(),e),t(I2(),e),t(P2(),e),t(R2(),e),t(N2(),e),t(C2(),e)})(co)),co}var fo={},Su={},SO;function j2(){if(SO)return Su;SO=1,Object.defineProperty(Su,"__esModule",{value:!0}),Su.isSysLink=void 0;const e=i=>i!==null&&typeof i=="object"&&"sys"in i&&"id"in i.sys;return Su.isSysLink=e,Su}var Tu={},TO;function L2(){if(TO)return Tu;TO=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.ContentfulLocale=void 0;var e;return(function(i){i.enUS="en-US",i.es="es",i.zh="zh"})(e||(e={})),Tu.ContentfulLocale=e,Tu}var Gh={},AO;function D2(){return AO||(AO=1,Object.defineProperty(Gh,"__esModule",{value:!0})),Gh}var OO;function k2(){return OO||(OO=1,(function(e){var i=fo&&fo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=fo&&fo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(j2(),e),t(L2(),e),t(D2(),e)})(fo)),fo}var IO;function q2(){return IO||(IO=1,(function(e){var i=lo&&lo.__createBinding||(Object.create?(function(J,pe,Oe,Ae){Ae===void 0&&(Ae=Oe);var be=Object.getOwnPropertyDescriptor(pe,Oe);(!be||("get"in be?!pe.__esModule:be.writable||be.configurable))&&(be={enumerable:!0,get:function(){return pe[Oe]}}),Object.defineProperty(J,Ae,be)}):(function(J,pe,Oe,Ae){Ae===void 0&&(Ae=Oe),J[Ae]=pe[Oe]})),t=lo&&lo.__exportStar||function(J,pe){for(var Oe in J)Oe!=="default"&&!Object.prototype.hasOwnProperty.call(pe,Oe)&&i(pe,J,Oe)};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=Z1();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var o=ci();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return o.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return o.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return o.getURNProtocol}});var s=IM();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var l=x1();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return l.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return l.CollectionSortBy}});var c=$1();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=e2();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=$_();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var y=t2();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return y.MetaTransaction}});var m=r2();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return m.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return m.MintSortBy}});var h=li();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return h.Network}});var O=ef();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return O.NFTCategory}});var C=PM();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return C.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return C.NFTSortBy}});var R=n2();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return R.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return R.CatalogSortDirection}});var I=i2();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return I.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return I.OrderSortBy}});var N=a2();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return N.ProviderType}});var _=xd();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return _.Rarity}});var A=RM();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return A.SaleType}});var w=o2();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return w.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return w.SaleSortBy}});var v=s2();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 S=u2();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var M=l2();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return M.Store}});var F=c2();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return F.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return F.GenderFilterOption}});var W=d2();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return W.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return W.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return W.isInsideWorldLimits}}),t(f2(),e),t(p2(),e),t(m2(),e),t(M2(),e),t(k2(),e)})(lo)),lo}var Kh={},PO;function B2(){return PO||(PO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const i=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,i.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(Kh)),Kh}var po={},Yh={},Au={},RO;function NM(){if(RO)return Au;RO=1,Object.defineProperty(Au,"__esModule",{value:!0}),Au.isInExceptionBlock=void 0;function e(o,s){return o>=62&&o<=150&&s>=151&&s<=158}function i(o,s){return o>=151&&o<=162&&s>=144&&s<=158}function t(o,s){return o>=151&&o<=163&&s>=59&&s<=143}function n(o,s){return e(o,s)||i(o,s)||t(o,s)}return Au.isInExceptionBlock=n,Au}var NO;function U2(){return NO||(NO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Parcel=e.PARCEL_LIMITS=void 0;const i=ze(),t=NM();e.PARCEL_LIMITS={minX:-150,maxX:150,minY:-150,maxY:150},(function(n){n._isInLimits={keyword:"_isInLimits",validate:function(O,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,i.generateLazyValidator)(n.schema,[n._isInLimits]);function o({x:h,y:O}){return`${h},${O}`}n.parcelToString=o;function s(h){const O=h.match(/^(-?\d+),(-?\d+)$/);if(!O)return null;const[,C,R]=O,I=parseInt(C,10),N=parseInt(R,10);return{x:I,y:N}}n.stringToParcel=s;function l(h){const O=s(h);return O?n.validate(O):!1}n.isParcelStringValid=l;function c(h){const{x:O,y:C}=h;return O>=e.PARCEL_LIMITS.minX&&O<=e.PARCEL_LIMITS.maxX&&C>=e.PARCEL_LIMITS.minY&&C<=e.PARCEL_LIMITS.maxY}n.isInStandardBounds=c;function f(h){return(0,t.isInExceptionBlock)(h.x,h.y)}n.isExceptionParcel=f;function p(h){return c(h)||f(h)}n.isInBounds=p;function y(h){return n.validate(h)}n.isValid=y;function m(h){const O=s(h);return O?n.validate(O):!1}n.isValidString=m})(e.Parcel||(e.Parcel={}))})(Yh)),Yh}var mo={},CO;function F2(){if(CO)return mo;CO=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.validateUrlInstance=mo.validateUrl=void 0;const e={allowLocalhost:!1,allowedPorts:[]};function i(O,C=2){let R=O;for(let I=0;I<C;I++)try{R=decodeURIComponent(R)}catch{break}return R.normalize("NFKC")}function t(O){return/[\u0000-\u001F\u007F-\u009F\u202A-\u202E\u2066-\u2069]/.test(O)}function n(O){return!!(O.username||O.password)}function o(O){return/\\/.test(O)}const s=["80","443"];function l(O,C){return!!O.port&&!C.includes(O.port)}function c(O){const C=O.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(O){if(O.startsWith("//"))return null;try{return{url:new URL(O),wasRelative:!1}}catch{try{return{url:new URL(O,"https://example.com"),wasRelative:!0}}catch{return null}}}function p(O){const C=i(String(O).toLowerCase());return!(t(C)||o(C))}function y(O){return!(!O||O.includes("..")||O.includes("//")||t(O)||o(O))}function m(O,C={}){const R=Object.assign(Object.assign({},e),C),I=[...s,...R.allowedPorts];if(!O||O.length===0||O.length>4096||t(O)||o(O))return!1;const N=i(O);if(t(N)||o(N)||O.startsWith("//"))return!1;const _=f(O);if(!_)return!1;const{url:A,wasRelative:w}=_;if(A.protocol!=="http:"&&A.protocol!=="https:"&&A.protocol!==""||n(A)||o(O)||o(A.href)||!w&&(l(A,I)||!R.allowLocalhost&&A.hostname&&c(A.hostname))||!y(A.pathname)||A.pathname.length>2048)return!1;const v=Array.from(A.searchParams.entries());if(v.length>50||(A.search?A.search.startsWith("?")?A.search.length-1:A.search.length:0)>2048)return!1;for(const[M,F]of v)if(M.length===0||!p(M)||!p(F)||M.length>128||F.length>1024)return!1;return!(A.hash&&t(A.hash))}mo.validateUrl=m;function h(O,C={}){return m(O.toString(),C)}return mo.validateUrlInstance=h,mo}var MO;function V2(){return MO||(MO=1,(function(e){var i=po&&po.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=po&&po.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(U2(),e),t(NM(),e),t(F2(),e)})(po)),po}var jO;function H2(){return jO||(jO=1,(function(e){var i=Jn&&Jn.__createBinding||(Object.create?(function(l,c,f,p){p===void 0&&(p=f);var y=Object.getOwnPropertyDescriptor(c,f);(!y||("get"in y?!c.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,p,y)}):(function(l,c,f,p){p===void 0&&(p=f),l[p]=c[f]})),t=Jn&&Jn.__setModuleDefault||(Object.create?(function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}):function(l,c){l.default=c}),n=Jn&&Jn.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&i(c,l,f);return t(c,l),c},o=Jn&&Jn.__exportStar||function(l,c){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&i(c,l,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(Q1());e.sdk=s,o(ze(),e),o(q2(),e),o(x_(),e),o(zo(),e),o(B2(),e),o(_l(),e),o(wM(),e),o(OM(),e),o(V2(),e)})(Jn)),Jn}var Dn=H2(),ho={},$n={},Ed={exports:{}},bd={exports:{}},LO;function eE(){return LO||(LO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=t;function t(n){if(n==null)throw new TypeError("Expected a string but received a ".concat(n));if(n.constructor.name!=="String")throw new TypeError("Expected a string but received a ".concat(n.constructor.name))}e.exports=i.default,e.exports.default=i.default})(bd,bd.exports)),bd.exports}var wd={exports:{}},DO;function z2(){return DO||(DO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=n;function t(o){return Object.prototype.toString.call(o)==="[object RegExp]"}function n(o,s){for(var l=0;l<s.length;l++){var c=s[l];if(o===c||t(c)&&c.test(o))return!0}return!1}e.exports=i.default,e.exports.default=i.default})(wd,wd.exports)),wd.exports}var Sd={exports:{}},kO;function W2(){return kO||(kO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var t=function(o,s){return o.indexOf(s)!==-1};i.default=t,e.exports=i.default,e.exports.default=i.default})(Sd,Sd.exports)),Sd.exports}var Td={exports:{}},Ad={exports:{}},qO;function CM(){return qO||(qO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=t;function t(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;for(var s in o)typeof n[s]>"u"&&(n[s]=o[s]);return n}e.exports=i.default,e.exports.default=i.default})(Ad,Ad.exports)),Ad.exports}var BO;function G2(){return BO||(BO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=l;var t=o(eE()),n=o(CM());function o(c){return c&&c.__esModule?c:{default:c}}var s={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};function l(c,f){(0,t.default)(c),f=(0,n.default)(f,s),f.allow_trailing_dot&&c[c.length-1]==="."&&(c=c.substring(0,c.length-1)),f.allow_wildcard===!0&&c.indexOf("*.")===0&&(c=c.substring(2));var p=c.split("."),y=p[p.length-1];return f.require_tld&&(p.length<2||!f.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(y)||/\s/.test(y))||!f.allow_numeric_tld&&/^\d+$/.test(y)?!1:p.every(function(m){return!(m.length>63&&!f.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(m)||/[\uff01-\uff5e]/.test(m)||/^-|-$/.test(m)||!f.allow_underscores&&/_/.test(m))})}e.exports=i.default,e.exports.default=i.default})(Td,Td.exports)),Td.exports}var Od={exports:{}},UO;function K2(){return UO||(UO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=y;var t=n(eE());function n(m){return m&&m.__esModule?m:{default:m}}function o(m){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},o(m)}var s="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",l="(".concat(s,"[.]){3}").concat(s),c=new RegExp("^".concat(l,"$")),f="(?:[0-9a-fA-F]{1,4})",p=new RegExp("^("+"(?:".concat(f,":){7}(?:").concat(f,"|:)|")+"(?:".concat(f,":){6}(?:").concat(l,"|:").concat(f,"|:)|")+"(?:".concat(f,":){5}(?::").concat(l,"|(:").concat(f,"){1,2}|:)|")+"(?:".concat(f,":){4}(?:(:").concat(f,"){0,1}:").concat(l,"|(:").concat(f,"){1,3}|:)|")+"(?:".concat(f,":){3}(?:(:").concat(f,"){0,2}:").concat(l,"|(:").concat(f,"){1,4}|:)|")+"(?:".concat(f,":){2}(?:(:").concat(f,"){0,3}:").concat(l,"|(:").concat(f,"){1,5}|:)|")+"(?:".concat(f,":){1}(?:(:").concat(f,"){0,4}:").concat(l,"|(:").concat(f,"){1,6}|:)|")+"(?::((?::".concat(f,"){0,5}:").concat(l,"|(?::").concat(f,"){1,7}|:))")+")(%[0-9a-zA-Z.]{1,})?$");function y(m){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};(0,t.default)(m);var O=(o(h)==="object"?h.version:arguments[1])||"";return O?O.toString()==="4"?c.test(m):O.toString()==="6"?p.test(m):!1:y(m,{version:4})||y(m,{version:6})}e.exports=i.default,e.exports.default=i.default})(Od,Od.exports)),Od.exports}var FO;function Y2(){return FO||(FO=1,(function(e,i){Object.defineProperty(i,"__esModule",{value:!0}),i.default=N;var t=f(eE()),n=f(z2()),o=f(W2()),s=f(G2()),l=f(K2()),c=f(CM());function f(_){return _&&_.__esModule?_:{default:_}}function p(_,A){return C(_)||O(_,A)||m(_,A)||y()}function y(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
19
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m(_,A){if(_){if(typeof _=="string")return h(_,A);var w={}.toString.call(_).slice(8,-1);return w==="Object"&&_.constructor&&(w=_.constructor.name),w==="Map"||w==="Set"?Array.from(_):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?h(_,A):void 0}}function h(_,A){(A==null||A>_.length)&&(A=_.length);for(var w=0,v=Array(A);w<A;w++)v[w]=_[w];return v}function O(_,A){var w=_==null?null:typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(w!=null){var v,S,M,F,W=[],J=!0,pe=!1;try{if(M=(w=w.call(_)).next,A!==0)for(;!(J=(v=M.call(w)).done)&&(W.push(v.value),W.length!==A);J=!0);}catch(Oe){pe=!0,S=Oe}finally{try{if(!J&&w.return!=null&&(F=w.return(),Object(F)!==F))return}finally{if(pe)throw S}}return W}}function C(_){if(Array.isArray(_))return _}var R={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},I=/^\[([^\]]+)\](?::([0-9]+))?$/;function N(_,A){if((0,t.default)(_),!_||/[\s<>]/.test(_)||_.indexOf("mailto:")===0||(A=(0,c.default)(A,R),A.validate_length&&_.length>A.max_allowed_length)||!A.allow_fragments&&(0,o.default)(_,"#")||!A.allow_query_components&&((0,o.default)(_,"?")||(0,o.default)(_,"&")))return!1;var w,v,S,M,F,W,J,pe;J=_.split("#"),_=J.shift(),J=_.split("?"),_=J.shift();var Oe=_.match(/^([a-z][a-z0-9+\-.]*):/i),Ae=!1,be=function(ue){return Ae=!0,w=ue.toLowerCase(),A.require_valid_protocol&&A.protocols.indexOf(w)===-1?!1:_.substring(Oe[0].length)};if(Oe){var Le=Oe[1],Me=_.substring(Oe[0].length),Be=Me.slice(0,2)==="//";if(Be){if(_=be(Le),_===!1)return!1}else{var Te=Me.indexOf("/"),ce=Te===-1?Me:Me.substring(0,Te),Y=ce.indexOf("@");if(Y!==-1){var j=ce.substring(0,Y),B=/^[a-zA-Z0-9\-_.%:]*$/,q=B.test(j),L=/%[0-9a-fA-F]{2}/.test(j);if(q&&!L){if(A.require_protocol)return!1}else if(_=be(Le),_===!1)return!1}else{var H=/^[0-9]/.test(Me);if(H){if(A.require_protocol)return!1}else if(_=be(Le),_===!1)return!1}}}else if(A.require_protocol)return!1;if(_.slice(0,2)==="//"){if(!Ae&&!A.allow_protocol_relative_urls)return!1;_=_.slice(2)}if(_==="")return!1;if(J=_.split("/"),_=J.shift(),_===""&&!A.require_host)return!0;if(J=_.split("@"),J.length>1){if(A.disallow_auth||J[0]===""||(v=J.shift(),v.indexOf(":")>=0&&v.split(":").length>2))return!1;var le=v.split(":"),ye=p(le,2),fe=ye[0],Pe=ye[1];if(fe===""&&Pe==="")return!1}M=J.join("@"),W=null,pe=null;var Re=M.match(I);if(Re?(S="",pe=Re[1],W=Re[2]||null):(J=M.split(":"),S=J.shift(),J.length&&(W=J.join(":"))),W!==null&&W.length>0){if(F=parseInt(W,10),!/^[0-9]+$/.test(W)||F<=0||F>65535)return!1}else if(A.require_port)return!1;return A.host_whitelist?(0,n.default)(S,A.host_whitelist):S===""&&!A.require_host?!0:!(!(0,l.default)(S)&&!(0,s.default)(S,A)&&(!pe||!(0,l.default)(pe,6))||(S=S||pe,A.host_blacklist&&(0,n.default)(S,A.host_blacklist)))}e.exports=i.default,e.exports.default=i.default})(Ed,Ed.exports)),Ed.exports}var Xh={},VO;function MM(){return VO||(VO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var i;(function(c){c.GET="get",c.STORE="store",c.CLEAR="clear",c.PING="ping"})(i||(e.Action=i={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function t(c){return{target:e.SINGLE_SIGN_ON_TARGET,...c}}e.createMessage=t;function n(c){const f=localStorage.getItem(l(c));if(!f)return null;let p;try{p=JSON.parse(f)}catch{return s(c),null}return p.expiration=new Date(p.expiration),p.expiration.getTime()<=Date.now()?(s(c),null):p}e.localStorageGetIdentity=n;function o(c,f){new Date(f.expiration).getTime()>Date.now()&&localStorage.setItem(l(c),JSON.stringify(f))}e.localStorageStoreIdentity=o;function s(c){localStorage.removeItem(l(c))}e.localStorageClearIdentity=s;function l(c){if(!/^0x[a-fA-F0-9]{40}$/.test(c))throw new Error("User must be a valid ethereum address");return`single-sign-on-${c.toLowerCase()}`}})(Xh)),Xh}var HO;function X2(){if(HO)return $n;HO=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.clearIdentity=$n.storeIdentity=$n.getIdentity=$n.init=void 0;const e=Y2(),i=MM(),t=i.SINGLE_SIGN_ON_TARGET,n=500,o=5;let s=0,l="";const c={protocols:["https"],require_protocol:!0};function f(I,N={}){if(!(0,e.default)(I,{...c,...N}))throw new Error(`Invalid url: ${I}`);if(l)throw new Error("Already initialized");const _=document.createElement("iframe");_.id=t,_.src=I,_.style.width="0",_.style.height="0",_.style.border="none",_.style.position="absolute",document.body.appendChild(_),l=I}$n.init=f;async function p(I){let N;try{N=(await O(await h(),i.Action.GET,{user:I})).identity??null}catch(_){R(_),N=(0,i.localStorageGetIdentity)(I)}return N}$n.getIdentity=p;async function y(I,N){try{await O(await h(),i.Action.STORE,{user:I,identity:N})}catch(_){R(_),(0,i.localStorageStoreIdentity)(I,N)}}$n.storeIdentity=y;async function m(I){try{await O(await h(),i.Action.CLEAR,{user:I})}catch(N){R(N),(0,i.localStorageClearIdentity)(I)}}$n.clearIdentity=m;async function h(){if(!l)throw new Error("Not initialized");for(let I=0;I<o;I++){const _=document.getElementById(t)?.contentWindow;if(!_){await C(n);continue}try{await O(_,i.Action.PING,{},n)}catch{continue}return _}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function O(I,N,_,A=0){s++;const w=s;let v=null;const S=new Promise((M,F)=>{v=({data:W})=>{!W||W.target!==i.SINGLE_SIGN_ON_TARGET||W.id!==w||(W.error?F(new Error(W.error)):M(W))},window.addEventListener("message",v)});I.postMessage((0,i.createMessage)({id:w,action:N,..._}),l);try{return await(A?Promise.race([S,new Promise((M,F)=>setTimeout(()=>F(new Error("Did not receive a response in time")),A))]):S)}catch(M){throw M}finally{v&&window.removeEventListener("message",v)}}function C(I){return new Promise(N=>setTimeout(N,I))}function R(I){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",I.message)}return $n}var zO;function J2(){return zO||(zO=1,(function(e){var i=ho&&ho.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=ho&&ho.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(X2(),e),t(MM(),e)})(ho)),ho}var A_=J2(),Jh={},ei={},WO;function Je(){if(WO)return ei;WO=1;var e=ei&&ei.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ei,"__esModule",{value:!0}),ei.validateType=ei.generateLazyValidator=ei.Ajv=void 0;const i=e(Qd());ei.Ajv=i.default;const t=e(z_()),n=e(W_());function o(l,c){let f=null;const p=(y,m)=>{if(!f){const h=new i.default({$data:!0,allErrors:!0});(0,t.default)(h),(0,n.default)(h,{singleError:!0}),c?.forEach(O=>h.addKeyword(O)),f=h.compile(l),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(y,m)};return p}ei.generateLazyValidator=o;function s(l,c){return l.validate(c)}return ei.validateType=s,ei}var Qh={},GO;function jM(){return GO||(GO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const i=Je(),t=qn();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.MATIC_AMOY="Amoy",s.AVALANCHE_MAINNET="Avalanche",s.BINANCE_MAINNET="Binance Smart Chain",s.ARBITRUM_MAINNET="Arbitrum",s.OPTIMISM_MAINNET="Optimism",s.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function o(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return t.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return t.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return t.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return t.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return t.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return t.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=o,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,i.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(Qh)),Qh}var Zh={},KO;function di(){return KO||(KO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const i=Je();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC",t.AVALANCHE="AVALANCHE",t.BSC="BINANCE SMART CHAIN",t.OPTIMISM="OPTIMISM",t.ARBITRUM="ARBITRUM",t.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(Zh)),Zh}var YO;function qn(){return YO||(YO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const i=Je(),t=jM(),n=di();var o;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI",p[p.MATIC_AMOY=80002]="MATIC_AMOY",p[p.BSC_MAINNET=56]="BSC_MAINNET",p[p.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",p[p.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",p[p.FANTOM_MAINNET=250]="FANTOM_MAINNET",p[p.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(o=e.ChainId||(e.ChainId={}));function s(p){switch(p){case o.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case o.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case o.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case o.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case o.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case o.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case o.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case o.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case o.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case o.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case o.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case o.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case o.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case o.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function l(p){switch(p){case o.ETHEREUM_MAINNET:return"ethereum";case o.ETHEREUM_ROPSTEN:return"ropsten";case o.ETHEREUM_RINKEBY:return"rinkeby";case o.ETHEREUM_GOERLI:return"goerli";case o.ETHEREUM_KOVAN:return"kovan";case o.ETHEREUM_SEPOLIA:return"sepolia";case o.MATIC_MAINNET:return"matic";case o.MATIC_MUMBAI:return"mumbai";case o.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=l;function c(p){const y={[n.Network.BSC]:o.BSC_MAINNET,[n.Network.OPTIMISM]:o.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:o.ARBITRUM_MAINNET,[n.Network.FANTOM]:o.FANTOM_MAINNET,[n.Network.AVALANCHE]:o.AVALANCHE_MAINNET};switch(p){case o.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y);case o.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_ROPSTEN,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_RINKEBY,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_GOERLI,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_KOVAN,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_SEPOLIA,[n.Network.MATIC]:o.MATIC_AMOY},y);case o.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y);case o.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_MUMBAI,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_AMOY,[n.Network.MATIC]:o.MATIC_AMOY},y);default:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y)}}e.getNetworkMapping=c;function f(p){switch(p){case o.ETHEREUM_MAINNET:case o.ETHEREUM_ROPSTEN:case o.ETHEREUM_GOERLI:case o.ETHEREUM_KOVAN:case o.ETHEREUM_RINKEBY:case o.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case o.MATIC_MAINNET:case o.MATIC_MUMBAI:case o.MATIC_AMOY:return n.Network.MATIC;case o.BSC_MAINNET:return n.Network.BSC;case o.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case o.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case o.FANTOM_MAINNET:return n.Network.FANTOM;case o.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,i.generateLazyValidator)(p.schema)})(o=e.ChainId||(e.ChainId={}))})(Jh)),Jh}var St=qn(),xh={},XO;function LM(){return XO||(XO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const i=Je();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.MAGIC_TEST="magic_test",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(xh)),xh}var jt=LM(),Gi;(function(e){e.Update="Web3ReactUpdate",e.Error="Web3ReactError",e.Deactivate="Web3ReactDeactivate"})(Gi||(Gi={}));var Id={exports:{}},JO;function Q2(){if(JO)return Id.exports;JO=1;var e=typeof Reflect=="object"?Reflect:null,i=e&&typeof e.apply=="function"?e.apply:function(v,S,M){return Function.prototype.apply.call(v,S,M)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:t=function(v){return Object.getOwnPropertyNames(v)};function n(w){console&&console.warn&&console.warn(w)}var o=Number.isNaN||function(v){return v!==v};function s(){s.init.call(this)}Id.exports=s,Id.exports.once=N,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(w){if(typeof w!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof w)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(w){if(typeof w!="number"||w<0||o(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");l=w}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||o(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function f(w){return w._maxListeners===void 0?s.defaultMaxListeners:w._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(v){for(var S=[],M=1;M<arguments.length;M++)S.push(arguments[M]);var F=v==="error",W=this._events;if(W!==void 0)F=F&&W.error===void 0;else if(!F)return!1;if(F){var J;if(S.length>0&&(J=S[0]),J instanceof Error)throw J;var pe=new Error("Unhandled error."+(J?" ("+J.message+")":""));throw pe.context=J,pe}var Oe=W[v];if(Oe===void 0)return!1;if(typeof Oe=="function")i(Oe,this,S);else for(var Ae=Oe.length,be=C(Oe,Ae),M=0;M<Ae;++M)i(be[M],this,S);return!0};function p(w,v,S,M){var F,W,J;if(c(S),W=w._events,W===void 0?(W=w._events=Object.create(null),w._eventsCount=0):(W.newListener!==void 0&&(w.emit("newListener",v,S.listener?S.listener:S),W=w._events),J=W[v]),J===void 0)J=W[v]=S,++w._eventsCount;else if(typeof J=="function"?J=W[v]=M?[S,J]:[J,S]:M?J.unshift(S):J.push(S),F=f(w),F>0&&J.length>F&&!J.warned){J.warned=!0;var pe=new Error("Possible EventEmitter memory leak detected. "+J.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");pe.name="MaxListenersExceededWarning",pe.emitter=w,pe.type=v,pe.count=J.length,n(pe)}return w}s.prototype.addListener=function(v,S){return p(this,v,S,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(v,S){return p(this,v,S,!0)};function y(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(w,v,S){var M={fired:!1,wrapFn:void 0,target:w,type:v,listener:S},F=y.bind(M);return F.listener=S,M.wrapFn=F,F}s.prototype.once=function(v,S){return c(S),this.on(v,m(this,v,S)),this},s.prototype.prependOnceListener=function(v,S){return c(S),this.prependListener(v,m(this,v,S)),this},s.prototype.removeListener=function(v,S){var M,F,W,J,pe;if(c(S),F=this._events,F===void 0)return this;if(M=F[v],M===void 0)return this;if(M===S||M.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete F[v],F.removeListener&&this.emit("removeListener",v,M.listener||S));else if(typeof M!="function"){for(W=-1,J=M.length-1;J>=0;J--)if(M[J]===S||M[J].listener===S){pe=M[J].listener,W=J;break}if(W<0)return this;W===0?M.shift():R(M,W),M.length===1&&(F[v]=M[0]),F.removeListener!==void 0&&this.emit("removeListener",v,pe||S)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(v){var S,M,F;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[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[v]),this;if(arguments.length===0){var W=Object.keys(M),J;for(F=0;F<W.length;++F)J=W[F],J!=="removeListener"&&this.removeAllListeners(J);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(S=M[v],typeof S=="function")this.removeListener(v,S);else if(S!==void 0)for(F=S.length-1;F>=0;F--)this.removeListener(v,S[F]);return this};function h(w,v,S){var M=w._events;if(M===void 0)return[];var F=M[v];return F===void 0?[]:typeof F=="function"?S?[F.listener||F]:[F]:S?I(F):C(F,F.length)}s.prototype.listeners=function(v){return h(this,v,!0)},s.prototype.rawListeners=function(v){return h(this,v,!1)},s.listenerCount=function(w,v){return typeof w.listenerCount=="function"?w.listenerCount(v):O.call(w,v)},s.prototype.listenerCount=O;function O(w){var v=this._events;if(v!==void 0){var S=v[w];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(w,v){for(var S=new Array(v),M=0;M<v;++M)S[M]=w[M];return S}function R(w,v){for(;v+1<w.length;v++)w[v]=w[v+1];w.pop()}function I(w){for(var v=new Array(w.length),S=0;S<v.length;++S)v[S]=w[S].listener||w[S];return v}function N(w,v){return new Promise(function(S,M){function F(J){w.removeListener(v,W),M(J)}function W(){typeof w.removeListener=="function"&&w.removeListener("error",F),S([].slice.call(arguments))}A(w,v,W,{once:!0}),v!=="error"&&_(w,F,{once:!0})})}function _(w,v,S){typeof w.on=="function"&&A(w,"error",v,S)}function A(w,v,S,M){if(typeof w.on=="function")M.once?w.once(v,S):w.on(v,S);else if(typeof w.addEventListener=="function")w.addEventListener(v,function F(W){M.once&&w.removeEventListener(v,F),S(W)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof w)}return Id.exports}var DM=Q2();const mz=HL(DM);function Z2(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i}var Hs=(function(e){Z2(i,e);function i(n){var o,s=n===void 0?{}:n,l=s.supportedChainIds;return o=e.call(this)||this,o.supportedChainIds=l,o}var t=i.prototype;return t.emitUpdate=function(o){this.emit(Gi.Update,o)},t.emitError=function(o){this.emit(Gi.Error,o)},t.emitDeactivate=function(){this.emit(Gi.Deactivate)},i})(DM.EventEmitter);const x2="modulepreload",$2=function(e){return"https://cdn.decentraland.org/@dcl-regenesislabs/mobile-hub/1.0.0-20757928235.commit-b3d789a/"+e},QO={},ll=function(i,t,n){let o=Promise.resolve();if(t&&t.length>0){let f=function(p){return Promise.all(p.map(y=>Promise.resolve(y).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");o=f(t.map(p=>{if(p=$2(p),p in QO)return;QO[p]=!0;const y=p.endsWith(".css"),m=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${m}`))return;const h=document.createElement("link");if(h.rel=y?"stylesheet":x2,y||(h.as="script"),h.crossOrigin="",h.href=p,c&&h.setAttribute("nonce",c),document.head.appendChild(h),y)return new Promise((O,C)=>{h.addEventListener("load",O),h.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return i().catch(s)})};var ti={},yo={},go={},$h={},ZO;function eB(){return ZO||(ZO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const i=Je();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})($h)),$h}var ey={},xO;function tB(){return xO||(xO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const i=Je();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(ey)),ey}var $O;function rB(){return $O||($O=1,(function(e){var i=go&&go.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=go&&go.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(eB(),e),t(tB(),e)})(go)),go}var vo={},ty={},eI;function nB(){return eI||(eI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const i=Je();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(ty)),ty}var ry={},ny={},tI;function tf(){return tI||(tI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const i=Je();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.EXOTIC="exotic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.EXOTIC]:50,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},o={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.EXOTIC]:"#E4FFB8",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.EXOTIC]:"#CAFF73",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function l(y){return n[y]}t.getMaxSupply=l;function c(y){return s[y]}t.getColor=c;function f(){return[t.UNIQUE,t.MYTHIC,t.EXOTIC,t.LEGENDARY,t.EPIC,t.RARE,t.UNCOMMON,t.COMMON]}t.getRarities=f;function p(y){return[o[y],s[y]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(ny)),ny}var iy={},rI;function Wo(){return rI||(rI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const i=Je();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(iy)),iy}var ay={},oy={},nI;function tE(){return nI||(nI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const i=Je();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(oy)),oy}var sy={},uy={},iI;function kM(){return iI||(iI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const i=Je();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(uy)),uy}var aI;function rE(){return aI||(aI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const i=Wo(),t=Je(),n=kM();(function(o){o.schema={oneOf:[Object.assign({},i.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(sy)),sy}var oI;function nE(){return oI||(oI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const i=Je(),t=tE(),n=rE();(function(o){o.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(ay)),ay}var _o={},Eo={},ly={},cy={},sI;function Go(){return sI||(sI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const i=Je();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,i.generateLazyValidator)(t.schema);t.validate=o=>n(o)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv1||(e.IPFSv1={}))})(cy)),cy}var uI;function qM(){return uI||(uI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const i=Wo(),t=Go(),n=Je();var o;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(o=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:o.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var l;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=y=>p.test(y)})(l=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:l.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(ly)),ly}var dy={},lI;function iB(){return lI||(lI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const i=Je(),t=qM();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(dy)),dy}var cI;function aB(){return cI||(cI=1,(function(e){var i=Eo&&Eo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Eo&&Eo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(qM(),e),t(iB(),e)})(Eo)),Eo}var fy={},py={},dI;function BM(){return dI||(dI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const i=Je();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(py)),py}var my={},fI;function UM(){return fI||(fI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(my)),my}var hy={},pI;function FM(){return pI||(pI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const i=Je();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,i.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(hy)),hy}var yy={},Ou={},mI;function iE(){return mI||(mI=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.displayableProperties=void 0,Ou.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Ou}var gy={},hI;function VM(){return hI||(hI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(gy)),gy}var vy={},yI;function HM(){return yI||(yI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(vy)),vy}var gI;function oB(){return gI||(gI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const i=Je(),t=iE(),n=BM(),o=FM(),s=VM(),l=HM(),c=UM();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:o.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:l.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,i.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(yy)),yy}var vI;function sB(){return vI||(vI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var i=BM();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return i.FeatureToggles}});var t=UM();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=FM();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var o=oB();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return o.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return o.RequiredPermission}});var s=VM();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var l=HM();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return l.SpawnPoint}})})(fy)),fy}var bo={},_y={},Ey={},_I;function zM(){return _I||(_I=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const i=Je();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(Ey)),Ey}var EI;function WM(){return EI||(EI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const i=Je(),t=zM();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(_y)),_y}var by={},bI;function GM(){return bI||(bI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(by)),by}var wy={},wI;function aE(){return wI||(wI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const i=tf(),t=Je();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:i.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},o=(0,t.generateLazyValidator)(n);function s(l){return o(l)}e.isStandard=s})(wy)),wy}var Sy={},wo={},Ty={},SI;function uB(){return SI||(SI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Ty)),Ty}var TI;function KM(){return TI||(TI=1,(function(e){var i=wo&&wo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=wo&&wo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(uB(),e)})(wo)),wo}var Ay={},AI;function oE(){return AI||(AI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const i=Je();var t;(function(m){m.SINGLE="single",m.ANY="any",m.MULTIPLE="multiple",m.RANGE="range"})(t=e.MappingType||(e.MappingType={}));var n;(function(m){m.MAINNET="mainnet",m.MATIC="matic",m.SEPOLIA="sepolia",m.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var o;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},m.validate=(0,i.generateLazyValidator)(m.schema)})(o=e.SingleMapping||(e.SingleMapping={}));var s;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.ANY}},required:["type"],additionalProperties:!1},m.validate=(0,i.generateLazyValidator)(m.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var l;(function(m){m._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(O,C){if(!C||!C.from||!C.to)return!1;let{to:R,from:I}=C;return(typeof I!="bigint"||typeof R!="bigint")&&(I=BigInt(I),R=BigInt(R)),I<=R},errors:!1},m.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},m.validate=(0,i.generateLazyValidator)(m.schema,[m._fromLessThanOrEqualTo])})(l=e.RangeMapping||(e.RangeMapping={}));var c;(function(m){m.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},m.validate=(0,i.generateLazyValidator)(m.schema)})(c=e.MultipleMapping||(e.MultipleMapping={}));var f;(function(m){m.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)}},required:["type"],oneOf:[o.schema,s.schema,l.schema,c.schema]},m.validate=(0,i.generateLazyValidator)(m.schema,[l._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(m){m._isMappingsValid={keyword:"_isMappingsValid",validate:function(O,C){try{y(C)}catch{return!1}return!0},errors:!1},m.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:f.schema}},minProperties:1,required:[],additionalProperties:!1};const h=Object.values(n).reduce((O,C)=>(O[C]=m.innerSchema,O),{});m.schema={type:"object",properties:h,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},m.validate=(0,i.generateLazyValidator)(m.schema,[l._fromLessThanOrEqualTo,m._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(h,O,C){super(h),this.existingMapping=O,this.conflictingMapping=C}}e.AddMappingError=p;function y(m={}){const h={};for(const[v,S]of Object.entries(m)){h[v]={};for(const[M,F]of Object.entries(S))for(const W of F)A(v,M,W)}function O(){return JSON.parse(JSON.stringify(h))}function C(v,S,M){const F=BigInt(v);return F>=BigInt(S)&&F<=BigInt(M)}function R(v,S){switch(S.type){case t.SINGLE:return v.id===S.id;case t.MULTIPLE:return S.ids.includes(v.id);case t.RANGE:return C(v.id,S.from,S.to);default:return!1}}function I(v,S){switch(S.type){case t.SINGLE:return v.ids.includes(S.id);case t.MULTIPLE:return v.ids.some(M=>S.ids.includes(M));case t.RANGE:return v.ids.some(M=>C(M,S.from,S.to));default:return!1}}function N(v,S){switch(S.type){case t.SINGLE:return C(S.id,v.from,v.to);case t.MULTIPLE:return S.ids.some(M=>C(M,v.from,v.to));case t.RANGE:return BigInt(v.from)<=BigInt(S.to)&&BigInt(v.to)>=BigInt(S.from)}}function _(v,S){if(v.type===t.ANY||S.type===t.ANY)return!0;switch(v.type){case t.SINGLE:return R(v,S);case t.MULTIPLE:return I(v,S);case t.RANGE:return N(v,S)}}function A(v,S,M){var F,W;const J=S.toLowerCase();h[v]=(F=h[v])!==null&&F!==void 0?F:{},h[v][J]=(W=h[v][J])!==null&&W!==void 0?W:[];for(const pe of h[v][J])if(_(pe,M))throw new p(`Cannot add mapping to contract ${J} on network ${v} because it overlaps with existing mapping`,pe,M);h[v][J].push(M)}function w(v,S,M){var F;return!((F=h[v])===null||F===void 0)&&F[S]?h[v][S].some(W=>{switch(W.type){case t.SINGLE:return W.id===M;case t.ANY:return!0;case t.MULTIPLE:return W.ids.includes(M);case t.RANGE:return BigInt(M)>=BigInt(W.from)&&BigInt(M)<=BigInt(W.to)}}):!1}return{addMapping:A,getMappings:O,includesNft:w}}e.createMappingsHelper=y})(Ay)),Ay}var OI;function sE(){return OI||(OI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const i=Je(),t=KM(),n=oE();e.schema={type:"object",properties:{merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const o={keyword:"_containsHashingKeys",validate:function(c,f){var p;const y=f;return!((p=y?.merkleProof)===null||p===void 0)&&p.hashingKeys?y.merkleProof.hashingKeys.every(m=>y.hasOwnProperty(m)):!1},errors:!1},s=(0,i.generateLazyValidator)(e.schema,[o,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function l(c){return s(c)}e.isThirdParty=l})(Sy)),Sy}var Oy={},Iy={},ri={},II;function YM(){if(II)return ri;II=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.isBaseEmote=ri.isBaseAvatar=ri.requiredBaseItemProps=ri.baseItemProperties=void 0;const e=WM(),i=GM(),t=iE();ri.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},i.Metrics.schema),{nullable:!0})}),ri.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const l=s.id.split(":"),c=l[1]==="decentraland",f=l[3]==="base-avatars";return l.length===5&&c&&f}ri.isBaseAvatar=n;function o(s){if(!s||!s.id)return!1;const l=s.id.split(":");return l.length===5&&l[1]==="decentraland"&&l[3]==="base-emotes"}return ri.isBaseEmote=o,ri}var PI;function lB(){return PI||(PI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const i=Je(),t=Wo(),n=nE(),o=YM(),s=aE(),l=sE(),c=rE(),f=oE();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},o.baseItemProperties),s.standardProperties),l.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...o.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...o.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const y={keyword:"_isThirdParty",validate:(h,O)=>!h||(0,l.isThirdParty)(O),errors:!1},m={keyword:"_isBaseAvatar",validate:(h,O)=>!h||(0,o.isBaseAvatar)(O),errors:!1};p.validate=(0,i.generateLazyValidator)(p.schema,[y,m,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Iy)),Iy}var RI;function cB(){return RI||(RI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var i=nE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return i.WearableRepresentation}});var t=lB();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Wo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var o=kM();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return o.BodyPartCategory}});var s=rE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(Oy)),Oy}var Py={},Ry={},Ny={},Cy={},NI;function XM(){return NI||(NI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const i=Je();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Cy)),Cy}var My={},CI;function JM(){return CI||(CI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const i=Je(),t=tE();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(My)),My}var MI;function QM(){return MI||(MI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const i=XM(),t=Je(),n=JM();(function(o){o.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:i.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Ny)),Ny}var jI;function dB(){return jI||(jI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const i=ZM(),t=Je(),n=YM(),o=aE(),s=sE(),l=QM();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),o.standardProperties),s.schema.properties),{emoteDataADR74:l.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(y,m)=>!y||(0,i.isThirdParty)(m),errors:!1},p={keyword:"_isBaseEmote",validate:(y,m)=>!y||(0,n.isBaseEmote)(m),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,i.RangeMapping._fromLessThanOrEqualTo,i.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Ry)),Ry}var jy={},LI;function fB(){return LI||(LI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const i=Je();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(jy)),jy}var DI;function pB(){return DI||(DI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var i=dB();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return i.Emote}});var t=JM();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=QM();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var o=XM();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return o.EmoteCategory}});var s=fB();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(Py)),Py}var kI;function ZM(){return kI||(kI=1,(function(e){var i=bo&&bo.__createBinding||(Object.create?(function(p,y,m,h){h===void 0&&(h=m);var O=Object.getOwnPropertyDescriptor(y,m);(!O||("get"in O?!y.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return y[m]}}),Object.defineProperty(p,h,O)}):(function(p,y,m,h){h===void 0&&(h=m),p[h]=y[m]})),t=bo&&bo.__exportStar||function(p,y){for(var m in p)m!=="default"&&!Object.prototype.hasOwnProperty.call(y,m)&&i(y,p,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=WM();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var o=zM();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return o.Locale}});var s=GM();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var l=tE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return l.BodyShape}});var c=aE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=sE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(oE(),e),t(cB(),e),t(pB(),e)})(bo)),bo}var Ly={},Dy={},qI;function rf(){return qI||(qI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const i=Je();var t;(function(o){o.SIGNER="SIGNER",o.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",o.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",o.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",o.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(o){o.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},o.validate=(0,i.generateLazyValidator)(o.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(o){o.schema={type:"array",items:n.schema,minItems:1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.AuthChain||(e.AuthChain={}))})(Dy)),Dy}var BI;function mB(){return BI||(BI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const i=Go(),t=rf(),n=Je();(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Ly)),Ly}var ky={},qy={},UI;function xM(){return UI||(UI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const i=Go(),t=Je();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(qy)),qy}var FI;function $M(){return FI||(FI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const i=Go(),t=xM(),n=Je();(function(o){o.SCENE="scene",o.PROFILE="profile",o.WEARABLE="wearable",o.STORE="store",o.EMOTE="emote",o.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(o){o.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.Entity||(e.Entity={}))})(ky)),ky}var By={},VI;function hB(){return VI||(VI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const i=rf(),t=Je();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:i.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(By)),By}var So={},Uy={},HI;function yB(){return HI||(HI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const i=Wo(),t=Go(),n=Je();var o;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(o=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:o.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Uy)),Uy}var zI;function gB(){return zI||(zI=1,(function(e){var i=So&&So.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=So&&So.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(yB(),e)})(So)),So}var To={},Fy={},WI;function ej(){return WI||(WI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationType=void 0,(function(i){i.BADGE_GRANTED="badge_granted",i.BID_ACCEPTED="bid_accepted",i.BID_RECEIVED="bid_received",i.EVENTS_STARTED="events_started",i.EVENTS_STARTS_SOON="events_starts_soon",i.GOVERNANCE_ANNOUNCEMENT="governance_announcement",i.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",i.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",i.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",i.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",i.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",i.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",i.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",i.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",i.GOVERNANCE_TENDER_PASSED="governance_tender_passed",i.GOVERNANCE_WHALE_VOTE="governance_whale_vote",i.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",i.ITEM_SOLD="item_sold",i.ITEM_PUBLISHED="item_published",i.LAND_RENTAL_ENDED="rental_ended",i.LAND_RENTED="rental_started",i.REWARD_ASSIGNED="reward_assignment",i.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",i.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",i.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",i.REWARD_DELAYED="reward_delayed",i.REWARD_IN_PROGRESS="reward_in_progress",i.ROYALTIES_EARNED="royalties_earned",i.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",i.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",i.WORLDS_ACCESS_RESTORED="worlds_access_restored",i.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",i.WORLDS_MISSING_RESOURCES="worlds_missing_resources",i.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",i.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked"})(e.NotificationType||(e.NotificationType={}))})(Fy)),Fy}var Vy={},Hy={},GI;function tj(){return GI||(GI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const i=Je(),t=ej(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},o=Object.values(t.NotificationType).reduce((s,l)=>(s[l]=n,s),{});(function(s){s.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(t.NotificationType),additionalProperties:!1,properties:o}}},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(Hy)),Hy}var zy={},KI;function rj(){return KI||(KI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(i){i.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(i.schema.pattern);i.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(zy)),zy}var YI;function vB(){return YI||(YI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const i=Je(),t=tj(),n=Go(),o=rj();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},o.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(Vy)),Vy}var XI;function _B(){return XI||(XI=1,(function(e){var i=To&&To.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=To&&To.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(ej(),e),t(vB(),e),t(tj(),e)})(To)),To}var Ao={},Wy={},JI;function zs(){return JI||(JI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(i){(function(t){t.BLOCKCHAIN="blockchain",t.CATALYST_DEPLOYMENT="catalyst-deployment",t.WORLD="world",t.CLIENT="client",t.MARKETPLACE="marketplace",t.REWARDS="rewards",t.BADGE="badge",t.ASSET_BUNDLE="asset-bundle",t.SOCIAL_SERVICE="social-service"})(i.Type||(i.Type={})),(function(t){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published"})(t.Blockchain||(t.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(t.Marketplace||(t.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(t.CatalystDeployment||(t.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment"})(t.Worlds||(t.Worlds={})),(function(n){n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(t.Client||(t.Client={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(t.Rewards||(t.Rewards={})),(function(n){n.GRANTED="badge-granted"})(t.Badge||(t.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(t.AssetBundle||(t.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(t.SocialService||(t.SocialService={}))})(i.SubType||(i.SubType={}))})(e.Events||(e.Events={}))})(Wy)),Wy}var Gy={},QI;function EB(){return QI||(QI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const i=Je(),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,i.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={}))})(Gy)),Gy}var Ky={},ZI;function bB(){return ZI||(ZI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const i=rf(),t=Je(),n=$M(),o=zs();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:o.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(o.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:i.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(Ky)),Ky}var Yy={},xI;function wB(){return xI||(xI=1,Object.defineProperty(Yy,"__esModule",{value:!0})),Yy}var Xy={},$I;function SB(){return $I||($I=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const i=Je(),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,i.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(Xy)),Xy}var Jy={},Iu={},eP;function TB(){if(eP)return Iu;eP=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.createEventSchema=void 0;function e(i,t,n){return{type:"object",properties:{type:{type:"string",const:i},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return Iu.createEventSchema=e,Iu}var tP;function AB(){return tP||(tP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const i=Je(),t=zs(),n=TB(),o={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},s={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(Jy)),Jy}var Qy={},rP;function OB(){return rP||(rP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const i=Je(),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,i.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"}},required:["entityId","platform","statusCode","isLods","isWorld"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"}},required:["address","name","profileImageUrl"]},receiver:{type:"object",properties:{address:{type:"string"}},required:["address"]},message:{type:"string",nullable:!0}},required:["sender"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"}},required:["address","name","profileImageUrl"]},receiver:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["sender"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={}))})(Qy)),Qy}var nP;function IB(){return nP||(nP=1,(function(e){var i=Ao&&Ao.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Ao&&Ao.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(zs(),e),t(EB(),e),t(bB(),e),t(wB(),e),t(SB(),e),t(AB(),e),t(OB(),e)})(Ao)),Ao}var iP;function uE(){return iP||(iP=1,(function(e){var i=_o&&_o.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=_o&&_o.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(aB(),e),t(sB(),e),t(ZM(),e),t(iE(),e),t(KM(),e),t(mB(),e),t($M(),e),t(hB(),e),t(gB(),e),t(_B(),e),t(IB(),e)})(_o)),_o}var aP;function PB(){return aP||(aP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const i=tf(),t=Wo(),n=nE(),o=Je(),s=uE();(function(l){l.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},i.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},l.validate=(0,o.generateLazyValidator)(l.schema)})(e.WearableJson||(e.WearableJson={}))})(ry)),ry}var oP;function RB(){return oP||(oP=1,(function(e){var i=vo&&vo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=vo&&vo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(nB(),e),t(PB(),e)})(vo)),vo}var sP;function NB(){return sP||(sP=1,(function(e){var i=yo&&yo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=yo&&yo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(rB(),e),t(RB(),e)})(yo)),yo}var Oo={},Zy={},uP;function CB(){return uP||(uP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const i=Je();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(Zy)),Zy}var xy={},lP;function MB(){return lP||(lP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const i=Je(),t=qn(),n=di();(function(o){o.NEWEST="newest",o.NAME="name",o.RECENTLY_REVIEWED="recently_reviewed",o.RECENTLY_LISTED="recently_listed",o.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(o){o.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Collection||(e.Collection={}))})(xy)),xy}var $y={},eg={},cP;function nf(){return cP||(cP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const i=Je();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(eg)),eg}var dP;function jB(){return dP||(dP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const i=Je(),t=qn(),n=di(),o=nf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:o.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})($y)),$y}var tg={},rg={},fP;function nj(){return fP||(fP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const i=Je(),t=qn(),n=uE(),o=di(),s=nf(),l=tf(),c=Wo();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:o.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,i.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(rg)),rg}var pP;function LB(){return pP||(pP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const i=Je(),t=qn(),n=di(),o=nj(),s=nf();(function(l){l.NAME="name",l.NEWEST="newest",l.RECENTLY_REVIEWED="recently_reviewed",l.RECENTLY_SOLD="recently_sold",l.RECENTLY_LISTED="recently_listed",l.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(l){l.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},data:o.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},l.validate=(0,i.generateLazyValidator)(l.schema)})(e.Item||(e.Item={}))})(tg)),tg}var ng={},mP;function lE(){return mP||(mP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const i=Je();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(ng)),ng}var ig={},hP;function DB(){return hP||(hP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(ig)),ig}var ag={},yP;function kB(){return yP||(yP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const i=Je(),t=qn(),n=di();(function(o){o.RECENTLY_MINTED="recently_minted",o.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(o){o.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Mint||(e.Mint={}))})(ag)),ag}var og={},gP;function qB(){return gP||(gP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(i){i.NEWEST="newest",i.RECENTLY_SOLD="recently_sold",i.CHEAPEST="cheapest",i.MOST_EXPENSIVE="most_expensive",i.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(i){i.ASC="asc",i.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(og)),og}var sg={},vP;function BB(){return vP||(vP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const i=Je(),t=qn(),n=lE(),o=di();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(sg)),sg}var ug={},_P;function ij(){return _P||(_P=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const i=Je();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(ug)),ug}var lg={},EP;function UB(){return EP||(EP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const i=Je(),t=qn(),n=ij(),o=di();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:o.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(lg)),lg}var cg={},bP;function FB(){return bP||(bP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const i=Je(),t=qn(),n=di();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var o;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(o=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:o.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(cg)),cg}var dg={},wP;function VB(){return wP||(wP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(i){i.DATE="date",i.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(dg)),dg}var fg={},SP;function HB(){return SP||(SP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(fg)),fg}var pg={},TP;function zB(){return TP||(TP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const i=Je();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(pg)),pg}var mg={},AP;function WB(){return AP||(AP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const i=Je();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(o,s){const l=t().validWorldRanges;for(const c of l)if(o>=c.xMin&&o<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(o){o.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.World||(e.World={}))})(mg)),mg}var hg={},OP;function GB(){return OP||(OP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const i=Je(),t=qn(),n=lE(),o=di();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const l={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};s.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},l.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...l.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},l.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...l.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},l.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...l.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(hg)),hg}var yg={},IP;function KB(){return IP||(IP=1,Object.defineProperty(yg,"__esModule",{value:!0})),yg}var gg={},PP;function YB(){return PP||(PP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(i){i.BID="bid",i.PUBLIC_NFT_ORDER="public_nft_order",i.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(i){i[i.ERC20=1]="ERC20",i[i.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",i[i.ERC721=3]="ERC721",i[i.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(i){i.SENT="sent",i.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(gg)),gg}var Io={},vg={},RP;function XB(){return RP||(RP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const i=Je();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(vg)),vg}var _g={},NP;function JB(){return NP||(NP=1,Object.defineProperty(_g,"__esModule",{value:!0})),_g}var Eg={},CP;function QB(){return CP||(CP=1,Object.defineProperty(Eg,"__esModule",{value:!0})),Eg}var bg={},MP;function ZB(){return MP||(MP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const i=Je();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(bg)),bg}var wg={},jP;function xB(){return jP||(jP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const i=Je();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(wg)),wg}var Sg={},LP;function $B(){return LP||(LP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const i=Je();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,o,s,l="*")=>{const c={type:o,payload:s};n.postMessage(c,l)};e.sendMessage=t})(Sg)),Sg}var Tg={},DP;function eU(){return DP||(DP=1,Object.defineProperty(Tg,"__esModule",{value:!0})),Tg}var Ag={},kP;function tU(){return kP||(kP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const i=Je();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(Ag)),Ag}var Og={},qP;function rU(){return qP||(qP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const i=Je();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(Og)),Og}var Ig={},BP;function nU(){return BP||(BP=1,Object.defineProperty(Ig,"__esModule",{value:!0})),Ig}var Pg={},UP;function iU(){return UP||(UP=1,Object.defineProperty(Pg,"__esModule",{value:!0})),Pg}var Rg={},FP;function aU(){return FP||(FP=1,Object.defineProperty(Rg,"__esModule",{value:!0})),Rg}var Ng={},VP;function oU(){return VP||(VP=1,Object.defineProperty(Ng,"__esModule",{value:!0})),Ng}var Cg={},HP;function sU(){return HP||(HP=1,Object.defineProperty(Cg,"__esModule",{value:!0})),Cg}var Mg={},zP;function uU(){return zP||(zP=1,Object.defineProperty(Mg,"__esModule",{value:!0})),Mg}var jg={},WP;function lU(){return WP||(WP=1,Object.defineProperty(jg,"__esModule",{value:!0})),jg}var Lg={},GP;function cU(){return GP||(GP=1,Object.defineProperty(Lg,"__esModule",{value:!0})),Lg}var KP;function dU(){return KP||(KP=1,(function(e){var i=Io&&Io.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Io&&Io.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(XB(),e),t(JB(),e),t(QB(),e),t(ZB(),e),t(xB(),e),t($B(),e),t(eU(),e),t(tU(),e),t(rU(),e),t(nU(),e),t(iU(),e),t(aU(),e),t(oU(),e),t(sU(),e),t(uU(),e),t(lU(),e),t(cU(),e)})(Io)),Io}var Po={},Pu={},YP;function fU(){if(YP)return Pu;YP=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.isSysLink=void 0;const e=i=>i!==null&&typeof i=="object"&&"sys"in i&&"id"in i.sys;return Pu.isSysLink=e,Pu}var Ru={},XP;function pU(){if(XP)return Ru;XP=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.ContentfulLocale=void 0;var e;return(function(i){i.enUS="en-US",i.es="es",i.zh="zh"})(e||(e={})),Ru.ContentfulLocale=e,Ru}var Dg={},JP;function mU(){return JP||(JP=1,Object.defineProperty(Dg,"__esModule",{value:!0})),Dg}var QP;function hU(){return QP||(QP=1,(function(e){var i=Po&&Po.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Po&&Po.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(fU(),e),t(pU(),e),t(mU(),e)})(Po)),Po}var ZP;function yU(){return ZP||(ZP=1,(function(e){var i=Oo&&Oo.__createBinding||(Object.create?(function(J,pe,Oe,Ae){Ae===void 0&&(Ae=Oe);var be=Object.getOwnPropertyDescriptor(pe,Oe);(!be||("get"in be?!pe.__esModule:be.writable||be.configurable))&&(be={enumerable:!0,get:function(){return pe[Oe]}}),Object.defineProperty(J,Ae,be)}):(function(J,pe,Oe,Ae){Ae===void 0&&(Ae=Oe),J[Ae]=pe[Oe]})),t=Oo&&Oo.__exportStar||function(J,pe){for(var Oe in J)Oe!=="default"&&!Object.prototype.hasOwnProperty.call(pe,Oe)&&i(pe,J,Oe)};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=CB();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var o=qn();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return o.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return o.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return o.getURNProtocol}});var s=jM();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var l=MB();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return l.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return l.CollectionSortBy}});var c=jB();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=LB();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=lE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var y=DB();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return y.MetaTransaction}});var m=kB();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return m.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return m.MintSortBy}});var h=di();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return h.Network}});var O=nf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return O.NFTCategory}});var C=nj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return C.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return C.NFTSortBy}});var R=qB();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return R.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return R.CatalogSortDirection}});var I=BB();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return I.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return I.OrderSortBy}});var N=LM();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return N.ProviderType}});var _=tf();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return _.Rarity}});var A=ij();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return A.SaleType}});var w=UB();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return w.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return w.SaleSortBy}});var v=FB();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 S=VB();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var M=HB();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return M.Store}});var F=zB();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return F.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return F.GenderFilterOption}});var W=WB();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return W.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return W.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return W.isInsideWorldLimits}}),t(GB(),e),t(KB(),e),t(YB(),e),t(dU(),e),t(hU(),e)})(Oo)),Oo}var kg={},xP;function gU(){return xP||(xP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(kg)),kg}var $P;function vU(){return $P||($P=1,(function(e){var i=ti&&ti.__createBinding||(Object.create?(function(l,c,f,p){p===void 0&&(p=f);var y=Object.getOwnPropertyDescriptor(c,f);(!y||("get"in y?!c.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,p,y)}):(function(l,c,f,p){p===void 0&&(p=f),l[p]=c[f]})),t=ti&&ti.__setModuleDefault||(Object.create?(function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}):function(l,c){l.default=c}),n=ti&&ti.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&i(c,l,f);return t(c,l),c},o=ti&&ti.__exportStar||function(l,c){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&i(c,l,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(NB());e.sdk=s,o(Je(),e),o(yU(),e),o(uE(),e),o(Go(),e),o(gU(),e),o(rf(),e),o(xM(),e),o(rj(),e)})(ti)),ti}var Fs=vU();const _U=Object.freeze({storageKey:"decentraland-connect-storage-key",[jt.ProviderType.INJECTED]:{},[jt.ProviderType.FORTMATIC]:{apiKeys:{[St.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[St.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:ks(jt.ProviderType.FORTMATIC)},[jt.ProviderType.NETWORK]:{urls:ks(jt.ProviderType.NETWORK)},[jt.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:ks(jt.ProviderType.WALLET_LINK)},[jt.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:ks(jt.ProviderType.WALLET_CONNECT_V2),chains:{[St.ChainId.ETHEREUM_MAINNET]:{chains:[St.ChainId.ETHEREUM_MAINNET],optionalChains:[St.ChainId.MATIC_MAINNET,St.ChainId.ARBITRUM_MAINNET,St.ChainId.OPTIMISM_MAINNET,St.ChainId.AVALANCHE_MAINNET,St.ChainId.BSC_MAINNET,St.ChainId.FANTOM_MAINNET]},[St.ChainId.ETHEREUM_SEPOLIA]:{chains:[St.ChainId.ETHEREUM_SEPOLIA],optionalChains:[St.ChainId.MATIC_AMOY]}}},[jt.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:ks(jt.ProviderType.MAGIC),chains:[St.ChainId.ETHEREUM_MAINNET,St.ChainId.ETHEREUM_SEPOLIA,St.ChainId.MATIC_MAINNET,St.ChainId.MATIC_AMOY,St.ChainId.OPTIMISM_MAINNET,St.ChainId.ARBITRUM_MAINNET,St.ChainId.AVALANCHE_MAINNET,St.ChainId.BSC_MAINNET,St.ChainId.FANTOM_MAINNET]},[jt.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:ks(jt.ProviderType.MAGIC),chains:[St.ChainId.ETHEREUM_MAINNET,St.ChainId.ETHEREUM_SEPOLIA,St.ChainId.MATIC_MAINNET,St.ChainId.MATIC_AMOY,St.ChainId.OPTIMISM_MAINNET,St.ChainId.ARBITRUM_MAINNET,St.ChainId.AVALANCHE_MAINNET,St.ChainId.BSC_MAINNET,St.ChainId.FANTOM_MAINNET]}});function Yi(){return _U}function ks(e){const i={[St.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[St.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[St.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[St.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[St.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[St.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[St.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[St.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[St.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let t="";switch(e){case jt.ProviderType.WALLET_LINK:t="walletlink";break;case jt.ProviderType.FORTMATIC:t="fortmatic";break;case jt.ProviderType.MAGIC:t="magic";break;case jt.ProviderType.MAGIC_TEST:t="magic";break;case jt.ProviderType.WALLET_CONNECT_V2:t="walletconnect-v2";break;case jt.ProviderType.AUTH_SERVER:t="auth-server";break}if(t)for(const n in i)i[n]+=`?project=${t}`;return i}class EU extends Hs{constructor(i){const t=Yi()[Fs.ProviderType.FORTMATIC],n=Object.keys(t.apiKeys).map(o=>Number(o));if(!n.includes(i))throw new Error(`Invariant error: Unsupported chainId ${i}`);super({supportedChainIds:n}),this.apiKey=t.apiKeys[i],this.chainId=i,this.rpcUrl=t.urls[i]}async activate(){if(!this.fortmatic){const{default:t}=await ll(async()=>{const{default:n}=await import("./fortmatic-BzJZzvUF.js").then(o=>o.f);return{default:n}},[]);this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const i=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:i}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(i=>i[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function O_(){return O_=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},O_.apply(this,arguments)}function cE(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i}function I_(e){return I_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},I_(e)}function Ud(e,i){return Ud=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Ud(e,i)}function bU(){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 Dd(e,i,t){return bU()?Dd=Reflect.construct:Dd=function(o,s,l){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(o,c),p=new f;return l&&Ud(p,l.prototype),p},Dd.apply(null,arguments)}function wU(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Fd(e){var i=typeof Map=="function"?new Map:void 0;return Fd=function(n){if(n===null||!wU(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(n))return i.get(n);i.set(n,o)}function o(){return Dd(n,arguments,I_(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Ud(o,n)},Fd(e)}function Pd(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 qs(e,i){try{var t=e()}catch(n){return i(n)}return t&&t.then?t.then(void 0,i):t}function Oi(e){return e.hasOwnProperty("result")?e.result:e}var qg=(function(e){cE(i,e);function i(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="No Ethereum provider was found on window.ethereum.",t}return i})(Fd(Error)),SU=(function(e){cE(i,e);function i(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="The user rejected the request.",t}return i})(Fd(Error)),TU=(function(e){cE(i,e);function i(n){var o;return o=e.call(this,n)||this,o.handleNetworkChanged=o.handleNetworkChanged.bind(Pd(o)),o.handleChainChanged=o.handleChainChanged.bind(Pd(o)),o.handleAccountsChanged=o.handleAccountsChanged.bind(Pd(o)),o.handleClose=o.handleClose.bind(Pd(o)),o}var t=i.prototype;return t.handleChainChanged=function(o){this.emitUpdate({chainId:o,provider:window.ethereum})},t.handleAccountsChanged=function(o){o.length===0?this.emitDeactivate():this.emitUpdate({account:o[0]})},t.handleClose=function(o,s){this.emitDeactivate()},t.handleNetworkChanged=function(o){this.emitUpdate({chainId:o,provider:window.ethereum})},t.activate=function(){try{var o=function(y){if(s)return y;function m(){return O_({provider:window.ethereum},c?{account:c}:{})}var h=(function(){if(!c)return Promise.resolve(window.ethereum.enable().then(function(O){return O&&Oi(O)[0]})).then(function(O){c=O})})();return h&&h.then?h.then(m):m(h)},s=!1,l=this;if(!window.ethereum)throw new qg;window.ethereum.on&&(window.ethereum.on("chainChanged",l.handleChainChanged),window.ethereum.on("accountsChanged",l.handleAccountsChanged),window.ethereum.on("close",l.handleClose),window.ethereum.on("networkChanged",l.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var c,f=qs(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(p){return Oi(p)[0]})).then(function(p){c=p})},function(p){if(p.code===4001)throw new SU});return Promise.resolve(f&&f.then?f.then(o):o(f))}catch(p){return Promise.reject(p)}},t.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(o){return Promise.reject(o)}},t.getChainId=function(){try{var o=function(){function f(){if(!s)try{s=Oi(window.ethereum.send({method:"net_version"}))}catch{}return s||(window.ethereum.isDapper?s=Oi(window.ethereum.cachedResults.net_version):s=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),s}var p=(function(){if(!s){var y=qs(function(){return Promise.resolve(window.ethereum.send("net_version").then(Oi)).then(function(m){s=m})},function(){});if(y&&y.then)return y.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new qg;var s,l=qs(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(Oi)).then(function(c){s=c})},function(){});return Promise.resolve(l&&l.then?l.then(o):o(l))}catch(c){return Promise.reject(c)}},t.getAccount=function(){try{var o=function(){function f(){return s||(s=Oi(window.ethereum.send({method:"eth_accounts"}))[0]),s}var p=(function(){if(!s){var y=qs(function(){return Promise.resolve(window.ethereum.enable().then(function(m){return Oi(m)[0]})).then(function(m){s=m})},function(){});if(y&&y.then)return y.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new qg;var s,l=qs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(c){return Oi(c)[0]})).then(function(c){s=c})},function(){});return Promise.resolve(l&&l.then?l.then(o):o(l))}catch(c){return Promise.reject(c)}},t.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},t.isAuthorized=function(){try{return window.ethereum?Promise.resolve(qs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(o){return Oi(o).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(o){return Promise.reject(o)}},i})(Hs);class AU 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 OU=60*1e3;class IU extends TU{constructor(i){super({supportedChainIds:[i]})}async activate(){const i=new Promise((n,o)=>{setTimeout(()=>{o(new AU)},OU)}),t=super.activate();return Promise.race([t,i])}}var PU="Invariant failed";function eR(e,i){throw new Error(PU)}function aj(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,cl(e,i)}function P_(e){return P_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},P_(e)}function cl(e,i){return cl=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},cl(e,i)}function RU(){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,i,t){return RU()?kd=Reflect.construct:kd=function(o,s,l){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(o,c),p=new f;return l&&cl(p,l.prototype),p},kd.apply(null,arguments)}function NU(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function R_(e){var i=typeof Map=="function"?new Map:void 0;return R_=function(n){if(n===null||!NU(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(n))return i.get(n);i.set(n,o)}function o(){return kd(n,arguments,P_(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),cl(o,n)},R_(e)}var Bg=(function(e){aj(i,e);function i(t,n,o){var s;return s=e.call(this)||this,s.code=n,s.data=o,s.name=s.constructor.name,s.message=t,s}return i})(R_(Error)),CU=function(i,t){var n=this,o=this;this.isMetaMask=!1,this.sendAsync=function(l,c){console.log("sendAsync",l.method,l.params),o.request(l.method,l.params).then(function(f){return c(null,{jsonrpc:"2.0",id:l.id,result:f})}).catch(function(f){return c(f,null)})},this.request=function(l,c){try{return typeof l!="string"&&(c=l.params,l=l.method),Promise.resolve(fetch(n.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:l,params:c}),headers:{"Content-Type":"application/json"}})).then(function(f){if(!f.ok)throw new Bg(f.status+": "+f.statusText,-32e3);return Promise.resolve(f.json()).then(function(p){if("error"in p){var y,m,h;throw new Bg(p==null||(y=p.error)==null?void 0:y.message,p==null||(m=p.error)==null?void 0:m.code,p==null||(h=p.error)==null?void 0:h.data)}else{if("result"in p)return p.result;throw new Bg("Received unexpected JSON-RPC response to "+l+" request.",-32e3,p)}})})}catch(f){return Promise.reject(f)}},this.chainId=i,this.url=t;var s=new URL(t);this.host=s.host,this.path=s.pathname},MU=(function(e){aj(i,e);function i(n){var o,s=n.urls,l=n.defaultChainId;return l||Object.keys(s).length===1||eR(),o=e.call(this,{supportedChainIds:Object.keys(s).map(function(c){return Number(c)})})||this,o.currentChainId=l||Number(Object.keys(s)[0]),o.providers=Object.keys(s).reduce(function(c,f){return c[Number(f)]=new CU(Number(f),s[Number(f)]),c},{}),o}var t=i.prototype;return t.activate=function(){try{var o=this;return Promise.resolve({provider:o.providers[o.currentChainId],chainId:o.currentChainId,account:null})}catch(s){return Promise.reject(s)}},t.getProvider=function(){try{var o=this;return Promise.resolve(o.providers[o.currentChainId])}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var o=this;return Promise.resolve(o.currentChainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){return Promise.resolve(null)},t.deactivate=function(){},t.changeChainId=function(o){Object.keys(this.providers).includes(o.toString())||eR(),this.currentChainId=o,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:o})},i})(Hs);class jU extends MU{constructor(i){super({urls:Yi()[jt.ProviderType.NETWORK].urls,defaultChainId:i})}}function N_(){return N_=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},N_.apply(this,arguments)}function LU(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,C_(e,i)}function C_(e,i){return C_=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},C_(e,i)}function tR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var DU=1,kU=(function(e){LU(i,e);function i(n){var o,s=n.url,l=n.appName,c=n.appLogoUrl,f=n.darkMode,p=n.supportedChainIds;return o=e.call(this,{supportedChainIds:p})||this,o.url=s,o.appName=l,o.appLogoUrl=c,o.darkMode=f||!1,o.handleChainChanged=o.handleChainChanged.bind(tR(o)),o.handleAccountsChanged=o.handleAccountsChanged.bind(tR(o)),o}var t=i.prototype;return t.activate=function(){try{var o=this,s=function(){return Promise.resolve(o.provider.request({method:"eth_requestAccounts"})).then(function(f){var p=f[0];return o.provider.on("chainChanged",o.handleChainChanged),o.provider.on("accountsChanged",o.handleAccountsChanged),{provider:o.provider,account:p}})},l=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)o.provider=window.ethereum;else{var c=(function(){if(!o.walletLink)return Promise.resolve(ll(()=>import("./index-Cp2XRMt-.js").then(f=>f.i),[]).then(function(f){var p;return(p=f?.default)!=null?p:f})).then(function(f){o.walletLink=new f(N_({appName:o.appName,darkMode:o.darkMode},o.appLogoUrl?{appLogoUrl:o.appLogoUrl}:{})),o.provider=o.walletLink.makeWeb3Provider(o.url,DU)})})();if(c&&c.then)return c.then(function(){})}})();return Promise.resolve(l&&l.then?l.then(s):s(l))}catch(c){return Promise.reject(c)}},t.getProvider=function(){try{var o=this;return Promise.resolve(o.provider)}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var o=this;return Promise.resolve(o.provider.chainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){try{var o=this;return Promise.resolve(o.provider.request({method:"eth_requestAccounts"})).then(function(s){return s[0]})}catch(s){return Promise.reject(s)}},t.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},t.close=function(){try{var o=this;return o.provider.close(),o.emitDeactivate(),Promise.resolve()}catch(s){return Promise.reject(s)}},t.handleChainChanged=function(o){this.emitUpdate({chainId:o})},t.handleAccountsChanged=function(o){this.emitUpdate({account:o[0]})},i})(Hs);class qU extends kU{constructor(i){const t=Yi()[Fs.ProviderType.WALLET_LINK];super({url:t.urls[i],appName:t.appName,supportedChainIds:[i]})}}class Ii extends Hs{constructor(i){super({supportedChainIds:(()=>{const{chains:t,optionalChains:n}=Ii.configuration.chains[i];return[...t,...n]})()}),this.desiredChainId=i,this.activate=async()=>{const t=await ll(()=>import("./index-D68J4FGm.js").then(o=>o.R),[]).then(o=>{const{chains:s,optionalChains:l}=Ii.configuration.chains[this.desiredChainId];return o.default.init({projectId:Ii.configuration.projectId,rpcMap:Ii.configuration.urls,chains:s,optionalChains:l,showQrModal:!0,disableProviderPing:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"3000"}},methods:["eth_sendTransaction","personal_sign"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sign","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain"],events:["chainChanged","accountsChanged"],optionalEvents:["disconnect"]})}),n=await t.enable();return t.on("accountsChanged",this.handleAccountsChanged),t.on("chainChanged",this.handleChainChanged),t.on("disconnect",this.handleDisconnect),this.provider=t,{chainId:t.chainId,account:n[0],provider:t}},this.getProvider=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider},this.getChainId=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.chainId},this.getAccount=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.accounts[0]},this.getWalletName=()=>this.provider?.session?.peer.metadata.name,this.deactivate=()=>{},this.close=async()=>{if(this.provider)return this.provider.removeListener("accountsChanged",this.handleAccountsChanged).removeListener("chainChanged",this.handleChainChanged).removeListener("disconnect",this.handleDisconnect).disconnect()},this.handleAccountsChanged=t=>{this.emitUpdate({account:t[0]})},this.handleChainChanged=t=>{this.emitUpdate({chainId:t})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");return this.emitDeactivate()}}}Ii.configuration=Yi()[Fs.ProviderType.WALLET_CONNECT_V2];Ii.clearStorage=e=>{e.removeRegExp(new RegExp("^wc@2:"))};class oj extends Hs{constructor(i,t=!1){super({supportedChainIds:Yi()[Fs.ProviderType.MAGIC].chains}),this.isTest=t,this.activate=async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const o=await this.getProvider(),s=await o.request({method:"eth_accounts"});return this.account=s[0]??null,{provider:o,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const n=await this.magic.wallet.getProvider();return{...n,isMagic:!0,request:new Proxy(n.request,{apply:async(o,s,l)=>{if(l[0]?.method==="wallet_switchEthereumChain")try{const c=parseInt(l[0]?.params[0]?.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(c)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(c),this.emitUpdate({chainId:c}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return o.bind(n)(...l)}}),sendAsync:new Proxy(n.send,{apply:async(o,s,l)=>o.bind(n)(...l)})}},this.getChainId=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId},this.getAccount=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account},this.deactivate=()=>{},this.buildMagicInstance=async n=>{const{Magic:o}=await ll(async()=>{const{Magic:c}=await import("./index-8e4wv-tH.js");return{Magic:c}},__vite__mapDeps([0,1])),{OAuthExtension:s}=await ll(async()=>{const{OAuthExtension:c}=await import("./index-QHMvomuf.js");return{OAuthExtension:c}},__vite__mapDeps([2,1])),l=Yi()[this.isTest?Fs.ProviderType.MAGIC_TEST:Fs.ProviderType.MAGIC];return new o(l.apiKey,{extensions:[new s],network:{rpcUrl:l.urls[n],chainId:n}})},this.chainId=i,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class BU extends oj{constructor(i){super(i,!0)}}class UU{}class FU extends UU{get(i){const t=window.localStorage.getItem(i);return t===null?void 0:t}set(i,t){window.localStorage.setItem(i,t)}remove(i){window.localStorage.removeItem(i)}removeRegExp(i){for(let t=localStorage.length-1;t>=0;t--){const n=localStorage.key(t);n&&i.test(n)&&localStorage.removeItem(n)}}}class Vd{constructor(i){this.provider=i,this.id=0,this.on=(t,n)=>this.provider.on(t,n),this.emit=(t,...n)=>this.provider.emit(t,n),this.removeListener=(t,n)=>this.provider.removeListener(t,n),this.request=async({method:t,params:n})=>this.isModernProvider()?this.provider.request({method:t,params:n}):this.send(t,n),this.sendAsync=async(t,n)=>this.hasSendAsync()?this.provider.sendAsync(t,(o,s)=>{s&&!s.hasOwnProperty("result")?n(o,{id:0,jsonrpc:"2.0",result:s}):n(o,s)}):this.send(t,n)}static adapt(i){const t=new Vd(i);return{...i,on:t.on,emit:t.emit,removeListener:t.removeListener,request:t.request,sendAsync:t.sendAsync,send:t.send.bind(t)}}async send(i,t){let n,o,s;const l=typeof t=="function";if(l){const c=i;o=c.params||[],n=c.method,s=t}else n=i,o=t||[],s=(c,f)=>{if(c)throw c;return f};if(this.isModernProvider()){const[c,f]=await this.provider.request({method:n,params:o}).then(y=>[null,y]).catch(y=>[y,void 0]);return s(c,l?{id:"",jsonrpc:"2.0",result:f}:f)}else{this.patchOldMobile();const[c,f]=l?await new Promise(p=>this.provider.send(i,(y,m)=>{p([y,m])})):await new Promise(p=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:n,params:o},(y,m)=>{p([m&&m.hasOwnProperty("error")?m.error:y,m&&m.hasOwnProperty("result")?m.result:m])}));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 VU{constructor(i){this.storage=i,this.getWalletName=()=>{if(this.connector instanceof Ii)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:t}=Yi();this.storage.remove(t),Ii.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=async()=>{try{await this.disconnect()}catch(t){console.error(t)}}}async connect(i,t=St.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(c){console.error("Error disconnecting previous connection",c)}const n=this.buildConnector(i,t);n.on(Gi.Deactivate,this.handleWeb3ReactDeactivate);let{provider:o,account:s}={};try{const c=await n.activate();o=c.provider,s=c.account}catch(c){throw console.error("Error activating the connector",c),c}(i===jt.ProviderType.MAGIC||i===jt.ProviderType.MAGIC_TEST)&&n.on(Gi.Update,({chainId:c})=>{c&&this.setConnectionData(i,c)});let l=t;if(i===jt.ProviderType.INJECTED){const c=await o.request({method:"eth_chainId"});l=c?parseInt(c,16):l}return this.connector=n,this.setConnectionData(i,l),{provider:Vd.adapt(o),providerType:i,account:s||"",chainId:l}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const i=this.getConnectionData();if(!i)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");if(this.connector)return{provider:await this.connector.getProvider(),providerType:i.providerType,chainId:i.chainId,account:await this.connector.getAccount()};const t=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(i.providerType,i.chainId));return this.promiseOfConnection=void 0,{...t,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const i=[jt.ProviderType.FORTMATIC,jt.ProviderType.WALLET_CONNECT,jt.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?i.unshift(jt.ProviderType.INJECTED):i.unshift(jt.ProviderType.METAMASK_MOBILE),i}async disconnect(){this.connector&&(this.connector.removeAllListeners(Gi.Deactivate),this.connector.removeAllListeners(Gi.Update),this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async createProvider(i,t=St.ChainId.ETHEREUM_MAINNET){const o=await this.buildConnector(i,t).getProvider();return Vd.adapt(o)}buildConnector(i,t){switch(i){case jt.ProviderType.INJECTED:return new IU(t);case jt.ProviderType.FORTMATIC:return new EU(t);case jt.ProviderType.MAGIC:return new oj(t);case jt.ProviderType.MAGIC_TEST:return new BU(t);case jt.ProviderType.WALLET_LINK:return new qU(t);case jt.ProviderType.NETWORK:return new jU(t);case jt.ProviderType.WALLET_CONNECT_V2:return new Ii(t);default:throw new Error(`Invalid provider ${i}`)}}getConnectionData(){const{storageKey:i}=Yi(),t=this.storage.get(i);return t?JSON.parse(t):void 0}setConnectionData(i,t){const{storageKey:n}=Yi(),o=JSON.stringify({providerType:i,chainId:t});this.storage.set(n,o)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}const Ug=new VU(new FU),HU=e=>/^decentraland.(zone|org|today)$/.test(e),zU=async(e,i="https://peer.decentraland.org")=>{try{const n=await(await fetch(`${i}/lambdas/profiles`,{method:"POST",body:JSON.stringify({ids:[e]})})).json();return n.length>0&&n[0]?.avatars?.length>0?n[0].avatars[0]:void 0}catch(t){console.error("Error fetching avatar:",t);return}},WU=e=>({shouldUseBasePath:HU,fetchAvatar:i=>zU(i),...e,debug:e.debug??!1}),GU=e=>({[Dn.ChainId.ETHEREUM_MAINNET]:"Ethereum Mainnet",[Dn.ChainId.ETHEREUM_SEPOLIA]:"Ethereum Sepolia",[Dn.ChainId.MATIC_MAINNET]:"Polygon Mainnet",[Dn.ChainId.MATIC_AMOY]:"Polygon Amoy"})[e]||`Chain ID ${e}`,KU=e=>{const i="0x"+e.toString(16),t=GU(e);switch(e){case Dn.ChainId.MATIC_MAINNET:return{chainId:i,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-mainnet.maticvigil.com/"],blockExplorerUrls:["https://polygonscan.com/"]};case Dn.ChainId.MATIC_AMOY:return{chainId:i,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-amoy.polygon.technology/"],blockExplorerUrls:["https://www.oklink.com/amoy"]};case Dn.ChainId.ETHEREUM_SEPOLIA:return{chainId:i,chainName:t,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.infura.io/v3/"],blockExplorerUrls:["https://sepolia.etherscan.io"]};default:return{chainId:"0x1",chainName:"Ethereum Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.infura.io/v3/"],blockExplorerUrls:["https://etherscan.io"]}}},rR=async e=>{const i=await e.request({method:"eth_chainId"});return parseInt(i,16)},zr=(e,i,t=!1)=>{t&&typeof console<"u"&&console.log(`[Auth] ${e}`,i||"")},YU=(e,i,t)=>{const o=new URLSearchParams(t).get("redirectTo"),s=e.shouldUseBasePath?.(window.location.host)?e.basePath:"",l=o?`${s}${o}`:`${s}${i}${t}`;return`${e.authUrl}/login?redirectTo=${encodeURIComponent(window.location.origin+l)}`},sj=Z.createContext(void 0),XU=({children:e,config:i})=>{const{pathname:t,search:n}=ba(),o=Z.useMemo(()=>WU(i),[i]),[s,l]=Z.useState(),[c,f]=Z.useState(),[p,y]=Z.useState(!1),[m,h]=Z.useState(!1),[O,C]=Z.useState(o.defaultChainId),R=Z.useCallback(()=>{zr("Initiating sign in",{pathname:t,search:n},o.debug);const A=YU(o,t,n);zr("Redirecting to auth",{redirectUrl:A},o.debug),window.location.replace(A)},[t,n,o]),I=Z.useCallback(()=>{try{zr("Signing out",{wallet:s},o.debug),Ug.disconnect(),s&&A_.localStorageClearIdentity(s),l(void 0),f(void 0),y(!1),zr("Sign out completed",void 0,o.debug)}catch(A){console.error("Error during sign-out:",A)}},[s,o.debug]),N=Z.useCallback(async(A=Dn.ChainId.ETHEREUM_MAINNET)=>{try{zr("Changing network",{from:O,to:A},o.debug);const w=await Ug.getProvider();if(!w){console.error("No provider available to switch network"),C(Dn.ChainId.ETHEREUM_MAINNET);return}C(A);try{await w.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+A.toString(16)}]});const v=await rR(w);v!==A&&console.warn("Chain ID did not change as expected"),zr("Network changed successfully",{chainId:v},o.debug)}catch(v){const S=v;S.code===4902?(zr("Adding new chain to wallet",{chainId:A},o.debug),await w.request({method:"wallet_addEthereumChain",params:[KU(A)]}),await rR(w)!==A&&(console.warn("Chain ID not set after adding network"),C(Dn.ChainId.ETHEREUM_MAINNET))):(console.error("Error switching network:",S),C(Dn.ChainId.ETHEREUM_MAINNET))}}catch(w){console.error("Error during network change:",w),C(Dn.ChainId.ETHEREUM_MAINNET)}},[O,o.debug]);Z.useEffect(()=>{(async()=>{try{h(!0),zr("Checking auth status",void 0,o.debug);try{const{account:w,chainId:v}=await Ug.tryPreviousConnection();if(w){zr("Previous connection found",{address:w,chainId:v},o.debug),l(w),C(v);let S=!1;try{const M=A_.localStorageGetIdentity(w);if(M&&M.expiration){const F=new Date(M.expiration),W=new Date;W.getTime()<=F.getTime()?(zr("Identity valid",{expiration:F},o.debug),S=!0):zr("Identity expired",{expiration:F,now:W},o.debug)}else zr("No identity found",void 0,o.debug)}catch(M){console.error("Error checking identity:",M)}if(y(S),S&&o.fetchAvatar)try{zr("Fetching avatar",{address:w},o.debug);const M=await o.fetchAvatar(w);M&&(f(M),zr("Avatar fetched successfully",M,o.debug))}catch(M){console.error("Error fetching avatar:",M)}}else zr("No previous connection found",void 0,o.debug)}catch(w){zr("Previous connection failed",w,o.debug)}}catch(w){console.error("Error checking auth status:",w)}finally{h(!1)}})()},[o.debug,o.fetchAvatar]);const _={wallet:s,avatar:c,chainId:O,isSignedIn:p,isConnecting:m,signIn:R,signOut:I,changeNetwork:N};return K.jsx(sj.Provider,{value:_,children:e})},dE=e=>{const i=Z.useContext(sj);if(i===void 0)throw new Error("useAuth must be used within an AuthProvider");return i};var Ro={},ni={},il={exports:{}};var JU=il.exports,nR;function af(){return nR||(nR=1,(function(e,i){(function(t,n){n(i)})(JU,(function(t){function n(E){if(E.jsonrpc="2.0",!E.id||typeof E.id!="number"||Math.floor(E.id)!==E.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(E)}`);if(!E.method||typeof E.method!="string"||E.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(E)}`);if(!E.params||typeof E.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(E)}`);return E}var o={};function s(){let E,P;const k=new Promise(((X,te)=>{E=oe=>{X(oe),k.isPending=!1},P=oe=>{te(oe),k.isPending=!1}})).catch((X=>Promise.reject(X)));return k.resolve=E,k.reject=P,"finally"in k||(k.finally=X=>{k.then(X),k.catch(X)}),k.isPending=!0,k}Object.defineProperty(o,"__esModule",{value:!0});var l=o.future=s;o.default=s;var c={exports:{}};(function(E){(function(){var P="input is invalid type",k=typeof window=="object",X=k?window:{};X.JS_SHA3_NO_WINDOW&&(k=!1);var te=!k&&typeof self=="object";!X.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?X=VL:te&&(X=self);var oe=!X.JS_SHA3_NO_COMMON_JS&&E.exports,Ne=!X.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",He="0123456789abcdef".split(""),it=[4,1024,262144,67108864],st=[0,8,16,24],pr=[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],zt=[224,256,384,512],We=[128,256],Er=["hex","buffer","arrayBuffer","array","digest"],Wt={128:168,256:136};!X.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(b){return Object.prototype.toString.call(b)==="[object Array]"}),!Ne||!X.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(b){return typeof b=="object"&&b.buffer&&b.buffer.constructor===ArrayBuffer});for(var kt=function(b,V,x){return function(G){return new Ct(b,V,b).update(G)[x]()}},Ar=function(b,V,x){return function(G,re){return new Ct(b,V,re).update(G)[x]()}},An=function(b,V,x){return function(G,re,ee,ie){return ir["cshake"+b].update(G,re,ee,ie)[x]()}},Xr=function(b,V,x){return function(G,re,ee,ie){return ir["kmac"+b].update(G,re,ee,ie)[x]()}},br=function(b,V,x,G){for(var re=0;re<Er.length;++re){var ee=Er[re];b[ee]=V(x,G,ee)}return b},On=function(b,V){var x=kt(b,V,"hex");return x.create=function(){return new Ct(b,V,b)},x.update=function(G){return x.create().update(G)},br(x,kt,b,V)},nn=[{name:"keccak",padding:[1,256,65536,16777216],bits:zt,createMethod:On},{name:"sha3",padding:[6,1536,393216,100663296],bits:zt,createMethod:On},{name:"shake",padding:[31,7936,2031616,520093696],bits:We,createMethod:function(b,V){var x=Ar(b,V,"hex");return x.create=function(G){return new Ct(b,V,G)},x.update=function(G,re){return x.create(re).update(G)},br(x,Ar,b,V)}},{name:"cshake",padding:it,bits:We,createMethod:function(b,V){var x=Wt[b],G=An(b,0,"hex");return G.create=function(re,ee,ie){return ee||ie?new Ct(b,V,re).bytepad([ee,ie],x):ir["shake"+b].create(re)},G.update=function(re,ee,ie,he){return G.create(ee,ie,he).update(re)},br(G,An,b,V)}},{name:"kmac",padding:it,bits:We,createMethod:function(b,V){var x=Wt[b],G=Xr(b,0,"hex");return G.create=function(re,ee,ie){return new lr(b,V,ee).bytepad(["KMAC",ie],x).bytepad([re],x)},G.update=function(re,ee,ie,he){return G.create(re,ie,he).update(ee)},br(G,Xr,b,V)}}],ir={},Br=[],mr=0;mr<nn.length;++mr)for(var In=nn[mr],Fe=In.bits,mn=0;mn<Fe.length;++mn){var Fn=In.name+"_"+Fe[mn];if(Br.push(Fn),ir[Fn]=In.createMethod(Fe[mn],In.padding),In.name!=="sha3"){var yi=In.name+Fe[mn];Br.push(yi),ir[yi]=ir[Fn]}}function Ct(b,V,x){this.blocks=[],this.s=[],this.padding=V,this.outputBits=x,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(b<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=x>>5,this.extraBytes=(31&x)>>3;for(var G=0;G<50;++G)this.s[G]=0}function lr(b,V,x){Ct.call(this,b,V,x)}Ct.prototype.update=function(b){if(this.finalized)throw new Error("finalize already called");var V,x=typeof b;if(x!=="string"){if(x!=="object")throw new Error(P);if(b===null)throw new Error(P);if(Ne&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!(Array.isArray(b)||Ne&&ArrayBuffer.isView(b)))throw new Error(P);V=!0}for(var G,re,ee=this.blocks,ie=this.byteCount,he=b.length,_e=this.blockCount,ve=0,Ge=this.s;ve<he;){if(this.reset)for(this.reset=!1,ee[0]=this.block,G=1;G<_e+1;++G)ee[G]=0;if(V)for(G=this.start;ve<he&&G<ie;++ve)ee[G>>2]|=b[ve]<<st[3&G++];else for(G=this.start;ve<he&&G<ie;++ve)(re=b.charCodeAt(ve))<128?ee[G>>2]|=re<<st[3&G++]:re<2048?(ee[G>>2]|=(192|re>>6)<<st[3&G++],ee[G>>2]|=(128|63&re)<<st[3&G++]):re<55296||re>=57344?(ee[G>>2]|=(224|re>>12)<<st[3&G++],ee[G>>2]|=(128|re>>6&63)<<st[3&G++],ee[G>>2]|=(128|63&re)<<st[3&G++]):(re=65536+((1023&re)<<10|1023&b.charCodeAt(++ve)),ee[G>>2]|=(240|re>>18)<<st[3&G++],ee[G>>2]|=(128|re>>12&63)<<st[3&G++],ee[G>>2]|=(128|re>>6&63)<<st[3&G++],ee[G>>2]|=(128|63&re)<<st[3&G++]);if(this.lastByteIndex=G,G>=ie){for(this.start=G-ie,this.block=ee[_e],G=0;G<_e;++G)Ge[G]^=ee[G];z(Ge),this.reset=!0}else this.start=G}return this},Ct.prototype.encode=function(b,V){var x=255&b,G=1,re=[x];for(x=255&(b>>=8);x>0;)re.unshift(x),x=255&(b>>=8),++G;return V?re.push(G):re.unshift(G),this.update(re),re.length},Ct.prototype.encodeString=function(b){var V,x=typeof b;if(x!=="string"){if(x!=="object")throw new Error(P);if(b===null)throw new Error(P);if(Ne&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!(Array.isArray(b)||Ne&&ArrayBuffer.isView(b)))throw new Error(P);V=!0}var G=0,re=b.length;if(V)G=re;else for(var ee=0;ee<b.length;++ee){var ie=b.charCodeAt(ee);ie<128?G+=1:ie<2048?G+=2:ie<55296||ie>=57344?G+=3:(ie=65536+((1023&ie)<<10|1023&b.charCodeAt(++ee)),G+=4)}return G+=this.encode(8*G),this.update(b),G},Ct.prototype.bytepad=function(b,V){for(var x=this.encode(V),G=0;G<b.length;++G)x+=this.encodeString(b[G]);var re=V-x%V,ee=[];return ee.length=re,this.update(ee),this},Ct.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var b=this.blocks,V=this.lastByteIndex,x=this.blockCount,G=this.s;if(b[V>>2]|=this.padding[3&V],this.lastByteIndex===this.byteCount)for(b[0]=b[x],V=1;V<x+1;++V)b[V]=0;for(b[x-1]|=2147483648,V=0;V<x;++V)G[V]^=b[V];z(G)}},Ct.prototype.toString=Ct.prototype.hex=function(){this.finalize();for(var b,V=this.blockCount,x=this.s,G=this.outputBlocks,re=this.extraBytes,ee=0,ie=0,he="";ie<G;){for(ee=0;ee<V&&ie<G;++ee,++ie)b=x[ee],he+=He[b>>4&15]+He[15&b]+He[b>>12&15]+He[b>>8&15]+He[b>>20&15]+He[b>>16&15]+He[b>>28&15]+He[b>>24&15];ie%V==0&&(z(x),ee=0)}return re&&(b=x[ee],he+=He[b>>4&15]+He[15&b],re>1&&(he+=He[b>>12&15]+He[b>>8&15]),re>2&&(he+=He[b>>20&15]+He[b>>16&15])),he},Ct.prototype.arrayBuffer=function(){this.finalize();var b,V=this.blockCount,x=this.s,G=this.outputBlocks,re=this.extraBytes,ee=0,ie=0,he=this.outputBits>>3;b=re?new ArrayBuffer(G+1<<2):new ArrayBuffer(he);for(var _e=new Uint32Array(b);ie<G;){for(ee=0;ee<V&&ie<G;++ee,++ie)_e[ie]=x[ee];ie%V==0&&z(x)}return re&&(_e[ee]=x[ee],b=b.slice(0,he)),b},Ct.prototype.buffer=Ct.prototype.arrayBuffer,Ct.prototype.digest=Ct.prototype.array=function(){this.finalize();for(var b,V,x=this.blockCount,G=this.s,re=this.outputBlocks,ee=this.extraBytes,ie=0,he=0,_e=[];he<re;){for(ie=0;ie<x&&he<re;++ie,++he)b=he<<2,V=G[ie],_e[b]=255&V,_e[b+1]=V>>8&255,_e[b+2]=V>>16&255,_e[b+3]=V>>24&255;he%x==0&&z(G)}return ee&&(b=he<<2,V=G[ie],_e[b]=255&V,ee>1&&(_e[b+1]=V>>8&255),ee>2&&(_e[b+2]=V>>16&255)),_e},lr.prototype=new Ct,lr.prototype.finalize=function(){return this.encode(this.outputBits,!0),Ct.prototype.finalize.call(this)};var z=function(b){var V,x,G,re,ee,ie,he,_e,ve,Ge,dt,pt,At,Gt,Xt,Pt,Mt,Zt,Vn,gi,vi,Mr,Pn,yr,cr,Kt,Zo,xo,ea,$o,es,ts,Ia,rs,ns,is,as,os,ss,us,ta,_i,ls,Pa,Ra,Na,Ca,Ma,Hn,cs,ds,fs,ja,La,Ei,bi,ps,Mi,ms,Da,ra,na,ka;for(G=0;G<48;G+=2)re=b[0]^b[10]^b[20]^b[30]^b[40],ee=b[1]^b[11]^b[21]^b[31]^b[41],ie=b[2]^b[12]^b[22]^b[32]^b[42],he=b[3]^b[13]^b[23]^b[33]^b[43],_e=b[4]^b[14]^b[24]^b[34]^b[44],ve=b[5]^b[15]^b[25]^b[35]^b[45],Ge=b[6]^b[16]^b[26]^b[36]^b[46],dt=b[7]^b[17]^b[27]^b[37]^b[47],V=(pt=b[8]^b[18]^b[28]^b[38]^b[48])^(ie<<1|he>>>31),x=(At=b[9]^b[19]^b[29]^b[39]^b[49])^(he<<1|ie>>>31),b[0]^=V,b[1]^=x,b[10]^=V,b[11]^=x,b[20]^=V,b[21]^=x,b[30]^=V,b[31]^=x,b[40]^=V,b[41]^=x,V=re^(_e<<1|ve>>>31),x=ee^(ve<<1|_e>>>31),b[2]^=V,b[3]^=x,b[12]^=V,b[13]^=x,b[22]^=V,b[23]^=x,b[32]^=V,b[33]^=x,b[42]^=V,b[43]^=x,V=ie^(Ge<<1|dt>>>31),x=he^(dt<<1|Ge>>>31),b[4]^=V,b[5]^=x,b[14]^=V,b[15]^=x,b[24]^=V,b[25]^=x,b[34]^=V,b[35]^=x,b[44]^=V,b[45]^=x,V=_e^(pt<<1|At>>>31),x=ve^(At<<1|pt>>>31),b[6]^=V,b[7]^=x,b[16]^=V,b[17]^=x,b[26]^=V,b[27]^=x,b[36]^=V,b[37]^=x,b[46]^=V,b[47]^=x,V=Ge^(re<<1|ee>>>31),x=dt^(ee<<1|re>>>31),b[8]^=V,b[9]^=x,b[18]^=V,b[19]^=x,b[28]^=V,b[29]^=x,b[38]^=V,b[39]^=x,b[48]^=V,b[49]^=x,Gt=b[0],Xt=b[1],Na=b[11]<<4|b[10]>>>28,Ca=b[10]<<4|b[11]>>>28,xo=b[20]<<3|b[21]>>>29,ea=b[21]<<3|b[20]>>>29,Da=b[31]<<9|b[30]>>>23,ra=b[30]<<9|b[31]>>>23,_i=b[40]<<18|b[41]>>>14,ls=b[41]<<18|b[40]>>>14,rs=b[2]<<1|b[3]>>>31,ns=b[3]<<1|b[2]>>>31,Pt=b[13]<<12|b[12]>>>20,Mt=b[12]<<12|b[13]>>>20,Ma=b[22]<<10|b[23]>>>22,Hn=b[23]<<10|b[22]>>>22,$o=b[33]<<13|b[32]>>>19,es=b[32]<<13|b[33]>>>19,na=b[42]<<2|b[43]>>>30,ka=b[43]<<2|b[42]>>>30,La=b[5]<<30|b[4]>>>2,Ei=b[4]<<30|b[5]>>>2,is=b[14]<<6|b[15]>>>26,as=b[15]<<6|b[14]>>>26,Zt=b[25]<<11|b[24]>>>21,Vn=b[24]<<11|b[25]>>>21,cs=b[34]<<15|b[35]>>>17,ds=b[35]<<15|b[34]>>>17,ts=b[45]<<29|b[44]>>>3,Ia=b[44]<<29|b[45]>>>3,yr=b[6]<<28|b[7]>>>4,cr=b[7]<<28|b[6]>>>4,bi=b[17]<<23|b[16]>>>9,ps=b[16]<<23|b[17]>>>9,os=b[26]<<25|b[27]>>>7,ss=b[27]<<25|b[26]>>>7,gi=b[36]<<21|b[37]>>>11,vi=b[37]<<21|b[36]>>>11,fs=b[47]<<24|b[46]>>>8,ja=b[46]<<24|b[47]>>>8,Pa=b[8]<<27|b[9]>>>5,Ra=b[9]<<27|b[8]>>>5,Kt=b[18]<<20|b[19]>>>12,Zo=b[19]<<20|b[18]>>>12,Mi=b[29]<<7|b[28]>>>25,ms=b[28]<<7|b[29]>>>25,us=b[38]<<8|b[39]>>>24,ta=b[39]<<8|b[38]>>>24,Mr=b[48]<<14|b[49]>>>18,Pn=b[49]<<14|b[48]>>>18,b[0]=Gt^~Pt&Zt,b[1]=Xt^~Mt&Vn,b[10]=yr^~Kt&xo,b[11]=cr^~Zo&ea,b[20]=rs^~is&os,b[21]=ns^~as&ss,b[30]=Pa^~Na&Ma,b[31]=Ra^~Ca&Hn,b[40]=La^~bi&Mi,b[41]=Ei^~ps&ms,b[2]=Pt^~Zt&gi,b[3]=Mt^~Vn&vi,b[12]=Kt^~xo&$o,b[13]=Zo^~ea&es,b[22]=is^~os&us,b[23]=as^~ss&ta,b[32]=Na^~Ma&cs,b[33]=Ca^~Hn&ds,b[42]=bi^~Mi&Da,b[43]=ps^~ms&ra,b[4]=Zt^~gi&Mr,b[5]=Vn^~vi&Pn,b[14]=xo^~$o&ts,b[15]=ea^~es&Ia,b[24]=os^~us&_i,b[25]=ss^~ta&ls,b[34]=Ma^~cs&fs,b[35]=Hn^~ds&ja,b[44]=Mi^~Da&na,b[45]=ms^~ra&ka,b[6]=gi^~Mr&Gt,b[7]=vi^~Pn&Xt,b[16]=$o^~ts&yr,b[17]=es^~Ia&cr,b[26]=us^~_i&rs,b[27]=ta^~ls&ns,b[36]=cs^~fs&Pa,b[37]=ds^~ja&Ra,b[46]=Da^~na&La,b[47]=ra^~ka&Ei,b[8]=Mr^~Gt&Pt,b[9]=Pn^~Xt&Mt,b[18]=ts^~yr&Kt,b[19]=Ia^~cr&Zo,b[28]=_i^~rs&is,b[29]=ls^~ns&as,b[38]=fs^~Pa&Na,b[39]=ja^~Ra&Ca,b[48]=na^~La&bi,b[49]=ka^~Ei&ps,b[0]^=pr[G],b[1]^=pr[G+1]};if(oe)E.exports=ir;else for(mr=0;mr<Br.length;++mr)X[Br[mr]]=ir[Br[mr]]})()})(c);var f=c.exports,p=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,y=Math.ceil,m=Math.floor,h="[BigNumber Error] ",O=h+"Number primitive has more than 15 significant digits: ",C=1e14,R=14,I=9007199254740991,N=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],_=1e7,A=1e9;function w(E){var P=0|E;return E>0||E===P?P:P-1}function v(E){for(var P,k,X=1,te=E.length,oe=E[0]+"";X<te;){for(P=E[X++]+"",k=R-P.length;k--;P="0"+P);oe+=P}for(te=oe.length;oe.charCodeAt(--te)===48;);return oe.slice(0,te+1||1)}function S(E,P){var k,X,te=E.c,oe=P.c,Ne=E.s,He=P.s,it=E.e,st=P.e;if(!Ne||!He)return null;if(k=te&&!te[0],X=oe&&!oe[0],k||X)return k?X?0:-He:Ne;if(Ne!=He)return Ne;if(k=Ne<0,X=it==st,!te||!oe)return X?0:!te^k?1:-1;if(!X)return it>st^k?1:-1;for(He=(it=te.length)<(st=oe.length)?it:st,Ne=0;Ne<He;Ne++)if(te[Ne]!=oe[Ne])return te[Ne]>oe[Ne]^k?1:-1;return it==st?0:it>st^k?1:-1}function M(E,P,k,X){if(E<P||E>k||E!==m(E))throw Error(h+(X||"Argument")+(typeof E=="number"?E<P||E>k?" out of range: ":" not an integer: ":" not a primitive number: ")+String(E))}function F(E){var P=E.c.length-1;return w(E.e/R)==P&&E.c[P]%2!=0}function W(E,P){return(E.length>1?E.charAt(0)+"."+E.slice(1):E)+(P<0?"e":"e+")+P}function J(E,P,k){var X,te;if(P<0){for(te=k+".";++P;te+=k);E=te+E}else if(++P>(X=E.length)){for(te=k,P-=X;--P;te+=k);E+=te}else P<X&&(E=E.slice(0,P)+"."+E.slice(P));return E}var pe=(function E(P){var k,X,te,oe,Ne,He,it,st,pr,zt,We=Fe.prototype={constructor:Fe,toString:null,valueOf:null},Er=new Fe(1),Wt=20,kt=4,Ar=-7,An=21,Xr=-1e7,br=1e7,On=!1,nn=1,ir=0,Br={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},mr="0123456789abcdefghijklmnopqrstuvwxyz",In=!0;function Fe(z,b){var V,x,G,re,ee,ie,he,_e,ve=this;if(!(ve instanceof Fe))return new Fe(z,b);if(b==null){if(z&&z._isBigNumber===!0)return ve.s=z.s,void(!z.c||z.e>br?ve.c=ve.e=null:z.e<Xr?ve.c=[ve.e=0]:(ve.e=z.e,ve.c=z.c.slice()));if((ie=typeof z=="number")&&0*z==0){if(ve.s=1/z<0?(z=-z,-1):1,z===~~z){for(re=0,ee=z;ee>=10;ee/=10,re++);return void(re>br?ve.c=ve.e=null:(ve.e=re,ve.c=[z]))}_e=String(z)}else{if(!p.test(_e=String(z)))return te(ve,_e,ie);ve.s=_e.charCodeAt(0)==45?(_e=_e.slice(1),-1):1}(re=_e.indexOf("."))>-1&&(_e=_e.replace(".","")),(ee=_e.search(/e/i))>0?(re<0&&(re=ee),re+=+_e.slice(ee+1),_e=_e.substring(0,ee)):re<0&&(re=_e.length)}else{if(M(b,2,mr.length,"Base"),b==10&&In)return Ct(ve=new Fe(z),Wt+ve.e+1,kt);if(_e=String(z),ie=typeof z=="number"){if(0*z!=0)return te(ve,_e,ie,b);if(ve.s=1/z<0?(_e=_e.slice(1),-1):1,Fe.DEBUG&&_e.replace(/^0\.0*|\./,"").length>15)throw Error(O+z)}else ve.s=_e.charCodeAt(0)===45?(_e=_e.slice(1),-1):1;for(V=mr.slice(0,b),re=ee=0,he=_e.length;ee<he;ee++)if(V.indexOf(x=_e.charAt(ee))<0){if(x=="."){if(ee>re){re=he;continue}}else if(!G&&(_e==_e.toUpperCase()&&(_e=_e.toLowerCase())||_e==_e.toLowerCase()&&(_e=_e.toUpperCase()))){G=!0,ee=-1,re=0;continue}return te(ve,String(z),ie,b)}ie=!1,(re=(_e=X(_e,b,10,ve.s)).indexOf("."))>-1?_e=_e.replace(".",""):re=_e.length}for(ee=0;_e.charCodeAt(ee)===48;ee++);for(he=_e.length;_e.charCodeAt(--he)===48;);if(_e=_e.slice(ee,++he)){if(he-=ee,ie&&Fe.DEBUG&&he>15&&(z>I||z!==m(z)))throw Error(O+ve.s*z);if((re=re-ee-1)>br)ve.c=ve.e=null;else if(re<Xr)ve.c=[ve.e=0];else{if(ve.e=re,ve.c=[],ee=(re+1)%R,re<0&&(ee+=R),ee<he){for(ee&&ve.c.push(+_e.slice(0,ee)),he-=R;ee<he;)ve.c.push(+_e.slice(ee,ee+=R));ee=R-(_e=_e.slice(ee)).length}else ee-=he;for(;ee--;_e+="0");ve.c.push(+_e)}}else ve.c=[ve.e=0]}function mn(z,b,V,x){var G,re,ee,ie,he;if(V==null?V=kt:M(V,0,8),!z.c)return z.toString();if(G=z.c[0],ee=z.e,b==null)he=v(z.c),he=x==1||x==2&&(ee<=Ar||ee>=An)?W(he,ee):J(he,ee,"0");else if(re=(z=Ct(new Fe(z),b,V)).e,ie=(he=v(z.c)).length,x==1||x==2&&(b<=re||re<=Ar)){for(;ie<b;he+="0",ie++);he=W(he,re)}else if(b-=ee,he=J(he,re,"0"),re+1>ie){if(--b>0)for(he+=".";b--;he+="0");}else if((b+=re-ie)>0)for(re+1==ie&&(he+=".");b--;he+="0");return z.s<0&&G?"-"+he:he}function Fn(z,b){for(var V,x=1,G=new Fe(z[0]);x<z.length;x++){if(!(V=new Fe(z[x])).s){G=V;break}b.call(G,V)&&(G=V)}return G}function yi(z,b,V){for(var x=1,G=b.length;!b[--G];b.pop());for(G=b[0];G>=10;G/=10,x++);return(V=x+V*R-1)>br?z.c=z.e=null:V<Xr?z.c=[z.e=0]:(z.e=V,z.c=b),z}function Ct(z,b,V,x){var G,re,ee,ie,he,_e,ve,Ge=z.c,dt=N;if(Ge){e:{for(G=1,ie=Ge[0];ie>=10;ie/=10,G++);if((re=b-G)<0)re+=R,ee=b,ve=(he=Ge[_e=0])/dt[G-ee-1]%10|0;else if((_e=y((re+1)/R))>=Ge.length){if(!x)break e;for(;Ge.length<=_e;Ge.push(0));he=ve=0,G=1,ee=(re%=R)-R+1}else{for(he=ie=Ge[_e],G=1;ie>=10;ie/=10,G++);ve=(ee=(re%=R)-R+G)<0?0:he/dt[G-ee-1]%10|0}if(x=x||b<0||Ge[_e+1]!=null||(ee<0?he:he%dt[G-ee-1]),x=V<4?(ve||x)&&(V==0||V==(z.s<0?3:2)):ve>5||ve==5&&(V==4||x||V==6&&(re>0?ee>0?he/dt[G-ee]:0:Ge[_e-1])%10&1||V==(z.s<0?8:7)),b<1||!Ge[0])return Ge.length=0,x?(b-=z.e+1,Ge[0]=dt[(R-b%R)%R],z.e=-b||0):Ge[0]=z.e=0,z;if(re==0?(Ge.length=_e,ie=1,_e--):(Ge.length=_e+1,ie=dt[R-re],Ge[_e]=ee>0?m(he/dt[G-ee]%dt[ee])*ie:0),x)for(;;){if(_e==0){for(re=1,ee=Ge[0];ee>=10;ee/=10,re++);for(ee=Ge[0]+=ie,ie=1;ee>=10;ee/=10,ie++);re!=ie&&(z.e++,Ge[0]==C&&(Ge[0]=1));break}if(Ge[_e]+=ie,Ge[_e]!=C)break;Ge[_e--]=0,ie=1}for(re=Ge.length;Ge[--re]===0;Ge.pop());}z.e>br?z.c=z.e=null:z.e<Xr&&(z.c=[z.e=0])}return z}function lr(z){var b,V=z.e;return V===null?z.toString():(b=v(z.c),b=V<=Ar||V>=An?W(b,V):J(b,V,"0"),z.s<0?"-"+b:b)}return Fe.clone=E,Fe.ROUND_UP=0,Fe.ROUND_DOWN=1,Fe.ROUND_CEIL=2,Fe.ROUND_FLOOR=3,Fe.ROUND_HALF_UP=4,Fe.ROUND_HALF_DOWN=5,Fe.ROUND_HALF_EVEN=6,Fe.ROUND_HALF_CEIL=7,Fe.ROUND_HALF_FLOOR=8,Fe.EUCLID=9,Fe.config=Fe.set=function(z){var b,V;if(z!=null){if(typeof z!="object")throw Error(h+"Object expected: "+z);if(z.hasOwnProperty(b="DECIMAL_PLACES")&&(M(V=z[b],0,A,b),Wt=V),z.hasOwnProperty(b="ROUNDING_MODE")&&(M(V=z[b],0,8,b),kt=V),z.hasOwnProperty(b="EXPONENTIAL_AT")&&((V=z[b])&&V.pop?(M(V[0],-A,0,b),M(V[1],0,A,b),Ar=V[0],An=V[1]):(M(V,-A,A,b),Ar=-(An=V<0?-V:V))),z.hasOwnProperty(b="RANGE"))if((V=z[b])&&V.pop)M(V[0],-A,-1,b),M(V[1],1,A,b),Xr=V[0],br=V[1];else{if(M(V,-A,A,b),!V)throw Error(h+b+" cannot be zero: "+V);Xr=-(br=V<0?-V:V)}if(z.hasOwnProperty(b="CRYPTO")){if((V=z[b])!==!!V)throw Error(h+b+" not true or false: "+V);if(V){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw On=!V,Error(h+"crypto unavailable");On=V}else On=V}if(z.hasOwnProperty(b="MODULO_MODE")&&(M(V=z[b],0,9,b),nn=V),z.hasOwnProperty(b="POW_PRECISION")&&(M(V=z[b],0,A,b),ir=V),z.hasOwnProperty(b="FORMAT")){if(typeof(V=z[b])!="object")throw Error(h+b+" not an object: "+V);Br=V}if(z.hasOwnProperty(b="ALPHABET")){if(typeof(V=z[b])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(V))throw Error(h+b+" invalid: "+V);In=V.slice(0,10)=="0123456789",mr=V}}return{DECIMAL_PLACES:Wt,ROUNDING_MODE:kt,EXPONENTIAL_AT:[Ar,An],RANGE:[Xr,br],CRYPTO:On,MODULO_MODE:nn,POW_PRECISION:ir,FORMAT:Br,ALPHABET:mr}},Fe.isBigNumber=function(z){if(!z||z._isBigNumber!==!0)return!1;if(!Fe.DEBUG)return!0;var b,V,x=z.c,G=z.e,re=z.s;e:if({}.toString.call(x)=="[object Array]"){if((re===1||re===-1)&&G>=-A&&G<=A&&G===m(G)){if(x[0]===0){if(G===0&&x.length===1)return!0;break e}if((b=(G+1)%R)<1&&(b+=R),String(x[0]).length==b){for(b=0;b<x.length;b++)if((V=x[b])<0||V>=C||V!==m(V))break e;if(V!==0)return!0}}}else if(x===null&&G===null&&(re===null||re===1||re===-1))return!0;throw Error(h+"Invalid BigNumber: "+z)},Fe.maximum=Fe.max=function(){return Fn(arguments,We.lt)},Fe.minimum=Fe.min=function(){return Fn(arguments,We.gt)},Fe.random=(oe=9007199254740992,Ne=Math.random()*oe&2097151?function(){return m(Math.random()*oe)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(z){var b,V,x,G,re,ee=0,ie=[],he=new Fe(Er);if(z==null?z=Wt:M(z,0,A),G=y(z/R),On)if(crypto.getRandomValues){for(b=crypto.getRandomValues(new Uint32Array(G*=2));ee<G;)(re=131072*b[ee]+(b[ee+1]>>>11))>=9e15?(V=crypto.getRandomValues(new Uint32Array(2)),b[ee]=V[0],b[ee+1]=V[1]):(ie.push(re%1e14),ee+=2);ee=G/2}else{if(!crypto.randomBytes)throw On=!1,Error(h+"crypto unavailable");for(b=crypto.randomBytes(G*=7);ee<G;)(re=281474976710656*(31&b[ee])+1099511627776*b[ee+1]+4294967296*b[ee+2]+16777216*b[ee+3]+(b[ee+4]<<16)+(b[ee+5]<<8)+b[ee+6])>=9e15?crypto.randomBytes(7).copy(b,ee):(ie.push(re%1e14),ee+=7);ee=G/7}if(!On)for(;ee<G;)(re=Ne())<9e15&&(ie[ee++]=re%1e14);for(G=ie[--ee],z%=R,G&&z&&(re=N[R-z],ie[ee]=m(G/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-=R);for(ee=1,re=ie[0];re>=10;re/=10,ee++);ee<R&&(x-=R-ee)}return he.e=x,he.c=ie,he}),Fe.sum=function(){for(var z=1,b=arguments,V=new Fe(b[0]);z<b.length;)V=V.plus(b[z++]);return V},X=(function(){var z="0123456789";function b(V,x,G,re){for(var ee,ie,he=[0],_e=0,ve=V.length;_e<ve;){for(ie=he.length;ie--;he[ie]*=x);for(he[0]+=re.indexOf(V.charAt(_e++)),ee=0;ee<he.length;ee++)he[ee]>G-1&&(he[ee+1]==null&&(he[ee+1]=0),he[ee+1]+=he[ee]/G|0,he[ee]%=G)}return he.reverse()}return function(V,x,G,re,ee){var ie,he,_e,ve,Ge,dt,pt,At,Gt=V.indexOf("."),Xt=Wt,Pt=kt;for(Gt>=0&&(ve=ir,ir=0,V=V.replace(".",""),dt=(At=new Fe(x)).pow(V.length-Gt),ir=ve,At.c=b(J(v(dt.c),dt.e,"0"),10,G,z),At.e=At.c.length),_e=ve=(pt=b(V,x,G,ee?(ie=mr,z):(ie=z,mr))).length;pt[--ve]==0;pt.pop());if(!pt[0])return ie.charAt(0);if(Gt<0?--_e:(dt.c=pt,dt.e=_e,dt.s=re,pt=(dt=k(dt,At,Xt,Pt,G)).c,Ge=dt.r,_e=dt.e),Gt=pt[he=_e+Xt+1],ve=G/2,Ge=Ge||he<0||pt[he+1]!=null,Ge=Pt<4?(Gt!=null||Ge)&&(Pt==0||Pt==(dt.s<0?3:2)):Gt>ve||Gt==ve&&(Pt==4||Ge||Pt==6&&1&pt[he-1]||Pt==(dt.s<0?8:7)),he<1||!pt[0])V=Ge?J(ie.charAt(1),-Xt,ie.charAt(0)):ie.charAt(0);else{if(pt.length=he,Ge)for(--G;++pt[--he]>G;)pt[he]=0,he||(++_e,pt=[1].concat(pt));for(ve=pt.length;!pt[--ve];);for(Gt=0,V="";Gt<=ve;V+=ie.charAt(pt[Gt++]));V=J(V,_e,ie.charAt(0))}return V}})(),k=(function(){function z(x,G,re){var ee,ie,he,_e,ve=0,Ge=x.length,dt=G%_,pt=G/_|0;for(x=x.slice();Ge--;)ve=((ie=dt*(he=x[Ge]%_)+(ee=pt*he+(_e=x[Ge]/_|0)*dt)%_*_+ve)/re|0)+(ee/_|0)+pt*_e,x[Ge]=ie%re;return ve&&(x=[ve].concat(x)),x}function b(x,G,re,ee){var ie,he;if(re!=ee)he=re>ee?1:-1;else for(ie=he=0;ie<re;ie++)if(x[ie]!=G[ie]){he=x[ie]>G[ie]?1:-1;break}return he}function V(x,G,re,ee){for(var ie=0;re--;)x[re]-=ie,ie=x[re]<G[re]?1:0,x[re]=ie*ee+x[re]-G[re];for(;!x[0]&&x.length>1;x.splice(0,1));}return function(x,G,re,ee,ie){var he,_e,ve,Ge,dt,pt,At,Gt,Xt,Pt,Mt,Zt,Vn,gi,vi,Mr,Pn,yr=x.s==G.s?1:-1,cr=x.c,Kt=G.c;if(!(cr&&cr[0]&&Kt&&Kt[0]))return new Fe(x.s&&G.s&&(cr?!Kt||cr[0]!=Kt[0]:Kt)?cr&&cr[0]==0||!Kt?0*yr:yr/0:NaN);for(Xt=(Gt=new Fe(yr)).c=[],yr=re+(_e=x.e-G.e)+1,ie||(ie=C,_e=w(x.e/R)-w(G.e/R),yr=yr/R|0),ve=0;Kt[ve]==(cr[ve]||0);ve++);if(Kt[ve]>(cr[ve]||0)&&_e--,yr<0)Xt.push(1),Ge=!0;else{for(gi=cr.length,Mr=Kt.length,ve=0,yr+=2,(dt=m(ie/(Kt[0]+1)))>1&&(Kt=z(Kt,dt,ie),cr=z(cr,dt,ie),Mr=Kt.length,gi=cr.length),Vn=Mr,Mt=(Pt=cr.slice(0,Mr)).length;Mt<Mr;Pt[Mt++]=0);Pn=Kt.slice(),Pn=[0].concat(Pn),vi=Kt[0],Kt[1]>=ie/2&&vi++;do{if(dt=0,(he=b(Kt,Pt,Mr,Mt))<0){if(Zt=Pt[0],Mr!=Mt&&(Zt=Zt*ie+(Pt[1]||0)),(dt=m(Zt/vi))>1)for(dt>=ie&&(dt=ie-1),At=(pt=z(Kt,dt,ie)).length,Mt=Pt.length;b(pt,Pt,At,Mt)==1;)dt--,V(pt,Mr<At?Pn:Kt,At,ie),At=pt.length,he=1;else dt==0&&(he=dt=1),At=(pt=Kt.slice()).length;if(At<Mt&&(pt=[0].concat(pt)),V(Pt,pt,Mt,ie),Mt=Pt.length,he==-1)for(;b(Kt,Pt,Mr,Mt)<1;)dt++,V(Pt,Mr<Mt?Pn:Kt,Mt,ie),Mt=Pt.length}else he===0&&(dt++,Pt=[0]);Xt[ve++]=dt,Pt[0]?Pt[Mt++]=cr[Vn]||0:(Pt=[cr[Vn]],Mt=1)}while((Vn++<gi||Pt[0]!=null)&&yr--);Ge=Pt[0]!=null,Xt[0]||Xt.splice(0,1)}if(ie==C){for(ve=1,yr=Xt[0];yr>=10;yr/=10,ve++);Ct(Gt,re+(Gt.e=ve+_e*R-1)+1,ee,Ge)}else Gt.e=_e,Gt.r=+Ge;return Gt}})(),He=/^(-?)0([xbo])(?=\w[\w.]*$)/i,it=/^([^.]+)\.$/,st=/^\.([^.]+)$/,pr=/^-?(Infinity|NaN)$/,zt=/^\s*\+(?=[\w.])|^\s+|\s+$/g,te=function(z,b,V,x){var G,re=V?b:b.replace(zt,"");if(pr.test(re))z.s=isNaN(re)?null:re<0?-1:1;else{if(!V&&(re=re.replace(He,(function(ee,ie,he){return G=(he=he.toLowerCase())=="x"?16:he=="b"?2:8,x&&x!=G?ee:ie})),x&&(G=x,re=re.replace(it,"$1").replace(st,"0.$1")),b!=re))return new Fe(re,G);if(Fe.DEBUG)throw Error(h+"Not a"+(x?" base "+x:"")+" number: "+b);z.s=null}z.c=z.e=null},We.absoluteValue=We.abs=function(){var z=new Fe(this);return z.s<0&&(z.s=1),z},We.comparedTo=function(z,b){return S(this,new Fe(z,b))},We.decimalPlaces=We.dp=function(z,b){var V,x,G,re=this;if(z!=null)return M(z,0,A),b==null?b=kt:M(b,0,8),Ct(new Fe(re),z+re.e+1,b);if(!(V=re.c))return null;if(x=((G=V.length-1)-w(this.e/R))*R,G=V[G])for(;G%10==0;G/=10,x--);return x<0&&(x=0),x},We.dividedBy=We.div=function(z,b){return k(this,new Fe(z,b),Wt,kt)},We.dividedToIntegerBy=We.idiv=function(z,b){return k(this,new Fe(z,b),0,1)},We.exponentiatedBy=We.pow=function(z,b){var V,x,G,re,ee,ie,he,_e,ve=this;if((z=new Fe(z)).c&&!z.isInteger())throw Error(h+"Exponent not an integer: "+lr(z));if(b!=null&&(b=new Fe(b)),ee=z.e>14,!ve.c||!ve.c[0]||ve.c[0]==1&&!ve.e&&ve.c.length==1||!z.c||!z.c[0])return _e=new Fe(Math.pow(+lr(ve),ee?z.s*(2-F(z)):+lr(z))),b?_e.mod(b):_e;if(ie=z.s<0,b){if(b.c?!b.c[0]:!b.s)return new Fe(NaN);(x=!ie&&ve.isInteger()&&b.isInteger())&&(ve=ve.mod(b))}else{if(z.e>9&&(ve.e>0||ve.e<-1||(ve.e==0?ve.c[0]>1||ee&&ve.c[1]>=24e7:ve.c[0]<8e13||ee&&ve.c[0]<=9999975e7)))return re=ve.s<0&&F(z)?-0:0,ve.e>-1&&(re=1/re),new Fe(ie?1/re:re);ir&&(re=y(ir/R+2))}for(ee?(V=new Fe(.5),ie&&(z.s=1),he=F(z)):he=(G=Math.abs(+lr(z)))%2,_e=new Fe(Er);;){if(he){if(!(_e=_e.times(ve)).c)break;re?_e.c.length>re&&(_e.c.length=re):x&&(_e=_e.mod(b))}if(G){if((G=m(G/2))===0)break;he=G%2}else if(Ct(z=z.times(V),z.e+1,1),z.e>14)he=F(z);else{if((G=+lr(z))==0)break;he=G%2}ve=ve.times(ve),re?ve.c&&ve.c.length>re&&(ve.c.length=re):x&&(ve=ve.mod(b))}return x?_e:(ie&&(_e=Er.div(_e)),b?_e.mod(b):re?Ct(_e,ir,kt,void 0):_e)},We.integerValue=function(z){var b=new Fe(this);return z==null?z=kt:M(z,0,8),Ct(b,b.e+1,z)},We.isEqualTo=We.eq=function(z,b){return S(this,new Fe(z,b))===0},We.isFinite=function(){return!!this.c},We.isGreaterThan=We.gt=function(z,b){return S(this,new Fe(z,b))>0},We.isGreaterThanOrEqualTo=We.gte=function(z,b){return(b=S(this,new Fe(z,b)))===1||b===0},We.isInteger=function(){return!!this.c&&w(this.e/R)>this.c.length-2},We.isLessThan=We.lt=function(z,b){return S(this,new Fe(z,b))<0},We.isLessThanOrEqualTo=We.lte=function(z,b){return(b=S(this,new Fe(z,b)))===-1||b===0},We.isNaN=function(){return!this.s},We.isNegative=function(){return this.s<0},We.isPositive=function(){return this.s>0},We.isZero=function(){return!!this.c&&this.c[0]==0},We.minus=function(z,b){var V,x,G,re,ee=this,ie=ee.s;if(b=(z=new Fe(z,b)).s,!ie||!b)return new Fe(NaN);if(ie!=b)return z.s=-b,ee.plus(z);var he=ee.e/R,_e=z.e/R,ve=ee.c,Ge=z.c;if(!he||!_e){if(!ve||!Ge)return ve?(z.s=-b,z):new Fe(Ge?ee:NaN);if(!ve[0]||!Ge[0])return Ge[0]?(z.s=-b,z):new Fe(ve[0]?ee:kt==3?-0:0)}if(he=w(he),_e=w(_e),ve=ve.slice(),ie=he-_e){for((re=ie<0)?(ie=-ie,G=ve):(_e=he,G=Ge),G.reverse(),b=ie;b--;G.push(0));G.reverse()}else for(x=(re=(ie=ve.length)<(b=Ge.length))?ie:b,ie=b=0;b<x;b++)if(ve[b]!=Ge[b]){re=ve[b]<Ge[b];break}if(re&&(G=ve,ve=Ge,Ge=G,z.s=-z.s),(b=(x=Ge.length)-(V=ve.length))>0)for(;b--;ve[V++]=0);for(b=C-1;x>ie;){if(ve[--x]<Ge[x]){for(V=x;V&&!ve[--V];ve[V]=b);--ve[V],ve[x]+=C}ve[x]-=Ge[x]}for(;ve[0]==0;ve.splice(0,1),--_e);return ve[0]?yi(z,ve,_e):(z.s=kt==3?-1:1,z.c=[z.e=0],z)},We.modulo=We.mod=function(z,b){var V,x,G=this;return z=new Fe(z,b),!G.c||!z.s||z.c&&!z.c[0]?new Fe(NaN):!z.c||G.c&&!G.c[0]?new Fe(G):(nn==9?(x=z.s,z.s=1,V=k(G,z,0,3),z.s=x,V.s*=x):V=k(G,z,0,nn),(z=G.minus(V.times(z))).c[0]||nn!=1||(z.s=G.s),z)},We.multipliedBy=We.times=function(z,b){var V,x,G,re,ee,ie,he,_e,ve,Ge,dt,pt,At,Gt,Xt,Pt=this,Mt=Pt.c,Zt=(z=new Fe(z,b)).c;if(!(Mt&&Zt&&Mt[0]&&Zt[0]))return!Pt.s||!z.s||Mt&&!Mt[0]&&!Zt||Zt&&!Zt[0]&&!Mt?z.c=z.e=z.s=null:(z.s*=Pt.s,Mt&&Zt?(z.c=[0],z.e=0):z.c=z.e=null),z;for(x=w(Pt.e/R)+w(z.e/R),z.s*=Pt.s,(he=Mt.length)<(Ge=Zt.length)&&(At=Mt,Mt=Zt,Zt=At,G=he,he=Ge,Ge=G),G=he+Ge,At=[];G--;At.push(0));for(Gt=C,Xt=_,G=Ge;--G>=0;){for(V=0,dt=Zt[G]%Xt,pt=Zt[G]/Xt|0,re=G+(ee=he);re>G;)V=((_e=dt*(_e=Mt[--ee]%Xt)+(ie=pt*_e+(ve=Mt[ee]/Xt|0)*dt)%Xt*Xt+At[re]+V)/Gt|0)+(ie/Xt|0)+pt*ve,At[re--]=_e%Gt;At[re]=V}return V?++x:At.splice(0,1),yi(z,At,x)},We.negated=function(){var z=new Fe(this);return z.s=-z.s||null,z},We.plus=function(z,b){var V,x=this,G=x.s;if(b=(z=new Fe(z,b)).s,!G||!b)return new Fe(NaN);if(G!=b)return z.s=-b,x.minus(z);var re=x.e/R,ee=z.e/R,ie=x.c,he=z.c;if(!re||!ee){if(!ie||!he)return new Fe(G/0);if(!ie[0]||!he[0])return he[0]?z:new Fe(ie[0]?x:0*G)}if(re=w(re),ee=w(ee),ie=ie.slice(),G=re-ee){for(G>0?(ee=re,V=he):(G=-G,V=ie),V.reverse();G--;V.push(0));V.reverse()}for((G=ie.length)-(b=he.length)<0&&(V=he,he=ie,ie=V,b=G),G=0;b;)G=(ie[--b]=ie[b]+he[b]+G)/C|0,ie[b]=C===ie[b]?0:ie[b]%C;return G&&(ie=[G].concat(ie),++ee),yi(z,ie,ee)},We.precision=We.sd=function(z,b){var V,x,G,re=this;if(z!=null&&z!==!!z)return M(z,1,A),b==null?b=kt:M(b,0,8),Ct(new Fe(re),z,b);if(!(V=re.c))return null;if(x=(G=V.length-1)*R+1,G=V[G]){for(;G%10==0;G/=10,x--);for(G=V[0];G>=10;G/=10,x++);}return z&&re.e+1>x&&(x=re.e+1),x},We.shiftedBy=function(z){return M(z,-9007199254740991,I),this.times("1e"+z)},We.squareRoot=We.sqrt=function(){var z,b,V,x,G,re=this,ee=re.c,ie=re.s,he=re.e,_e=Wt+4,ve=new Fe("0.5");if(ie!==1||!ee||!ee[0])return new Fe(!ie||ie<0&&(!ee||ee[0])?NaN:ee?re:1/0);if((ie=Math.sqrt(+lr(re)))==0||ie==1/0?(((b=v(ee)).length+he)%2==0&&(b+="0"),ie=Math.sqrt(+b),he=w((he+1)/2)-(he<0||he%2),V=new Fe(b=ie==1/0?"5e"+he:(b=ie.toExponential()).slice(0,b.indexOf("e")+1)+he)):V=new Fe(ie+""),V.c[0]){for((ie=(he=V.e)+_e)<3&&(ie=0);;)if(G=V,V=ve.times(G.plus(k(re,G,_e,1))),v(G.c).slice(0,ie)===(b=v(V.c)).slice(0,ie)){if(V.e<he&&--ie,(b=b.slice(ie-3,ie+1))!="9999"&&(x||b!="4999")){+b&&(+b.slice(1)||b.charAt(0)!="5")||(Ct(V,V.e+Wt+2,1),z=!V.times(V).eq(re));break}if(!x&&(Ct(G,G.e+Wt+2,0),G.times(G).eq(re))){V=G;break}_e+=4,ie+=4,x=1}}return Ct(V,V.e+Wt+1,kt,z)},We.toExponential=function(z,b){return z!=null&&(M(z,0,A),z++),mn(this,z,b,1)},We.toFixed=function(z,b){return z!=null&&(M(z,0,A),z=z+this.e+1),mn(this,z,b)},We.toFormat=function(z,b,V){var x,G=this;if(V==null)z!=null&&b&&typeof b=="object"?(V=b,b=null):z&&typeof z=="object"?(V=z,z=b=null):V=Br;else if(typeof V!="object")throw Error(h+"Argument not an object: "+V);if(x=G.toFixed(z,b),G.c){var re,ee=x.split("."),ie=+V.groupSize,he=+V.secondaryGroupSize,_e=V.groupSeparator||"",ve=ee[0],Ge=ee[1],dt=G.s<0,pt=dt?ve.slice(1):ve,At=pt.length;if(he&&(re=ie,ie=he,he=re,At-=re),ie>0&&At>0){for(re=At%ie||ie,ve=pt.substr(0,re);re<At;re+=ie)ve+=_e+pt.substr(re,ie);he>0&&(ve+=_e+pt.slice(re)),dt&&(ve="-"+ve)}x=Ge?ve+(V.decimalSeparator||"")+((he=+V.fractionGroupSize)?Ge.replace(new RegExp("\\d{"+he+"}\\B","g"),"$&"+(V.fractionGroupSeparator||"")):Ge):ve}return(V.prefix||"")+x+(V.suffix||"")},We.toFraction=function(z){var b,V,x,G,re,ee,ie,he,_e,ve,Ge,dt,pt=this,At=pt.c;if(z!=null&&(!(ie=new Fe(z)).isInteger()&&(ie.c||ie.s!==1)||ie.lt(Er)))throw Error(h+"Argument "+(ie.isInteger()?"out of range: ":"not an integer: ")+lr(ie));if(!At)return new Fe(pt);for(b=new Fe(Er),_e=V=new Fe(Er),x=he=new Fe(Er),dt=v(At),re=b.e=dt.length-pt.e-1,b.c[0]=N[(ee=re%R)<0?R+ee:ee],z=!z||ie.comparedTo(b)>0?re>0?b:_e:ie,ee=br,br=1/0,ie=new Fe(dt),he.c[0]=0;ve=k(ie,b,0,1),(G=V.plus(ve.times(x))).comparedTo(z)!=1;)V=x,x=G,_e=he.plus(ve.times(G=_e)),he=G,b=ie.minus(ve.times(G=b)),ie=G;return G=k(z.minus(V),x,0,1),he=he.plus(G.times(_e)),V=V.plus(G.times(x)),he.s=_e.s=pt.s,Ge=k(_e,x,re*=2,kt).minus(pt).abs().comparedTo(k(he,V,re,kt).minus(pt).abs())<1?[_e,x]:[he,V],br=ee,Ge},We.toNumber=function(){return+lr(this)},We.toPrecision=function(z,b){return z!=null&&M(z,1,A),mn(this,z,b,2)},We.toString=function(z){var b,V=this,x=V.s,G=V.e;return G===null?x?(b="Infinity",x<0&&(b="-"+b)):b="NaN":(z==null?b=G<=Ar||G>=An?W(v(V.c),G):J(v(V.c),G,"0"):z===10&&In?b=J(v((V=Ct(new Fe(V),Wt+G+1,kt)).c),V.e,"0"):(M(z,2,mr.length,"Base"),b=X(J(v(V.c),G,"0"),10,z,x,!0)),x<0&&V.c[0]&&(b="-"+b)),b},We.valueOf=We.toJSON=function(){return lr(this)},We._isBigNumber=!0,We[Symbol.toStringTag]="BigNumber",We[Symbol.for("nodejs.util.inspect.custom")]=We.valueOf,P!=null&&Fe.set(P),Fe})();const Oe={ROUNDING_MODE:pe.ROUND_DOWN};function Ae(E){return new TextEncoder().encode(E)}function be(E){return typeof E=="string"?be(Te(E)):new TextDecoder().decode(E)}pe.config(Oe);const Le="UNKNOWN_ERROR",Me="INVALID_ARGUMENT";function Be(E,P=Le,k={}){const X=[];Object.keys(k).forEach((Ne=>{try{X.push(Ne+"="+JSON.stringify(k[Ne]))}catch{X.push(Ne+"="+JSON.stringify(k[Ne].toString()))}}));const te=E;X.length&&(E+=" ("+X.join(", ")+")");const oe=new Error(E);return oe.reason=te,oe.code=P,Object.keys(k).forEach((function(Ne){oe[Ne]=k[Ne]})),oe}function Te(E){if(typeof E!="string")throw new Error("hexToBytes only accept strings, got: "+typeof E);if(E.substr(0,2)==="0x")return Te(E.substr(2));const P=new Uint8Array(Math.ceil(E.length/2));let k=0;for(let X=0;X<E.length;X+=2){const te=parseInt(E.substr(X,2),16);if(isNaN(te))throw new Error("Cannot read hex string:"+JSON.stringify(E));P[k]=te,k++}return P}function ce(E){return Array.from(E).map((P=>P.toString(16).padStart(2,"0"))).join("")}function Y(E,P){if(typeof E=="string"){if(P&&P.encoding==="hex"&&typeof E=="string"){let k=E;k.length>2&&k.substr(0,2)==="0x"&&(k=k.substr(2));const X=Te(k);return f.keccak256(X)}return f.keccak256(Ae(E))}return f.keccak256(E)}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 B(E,P,k){return new Array(P-E.length+1).join(k||"0")+E}function q(E){let P="",k=0;const X=E.length;for(E.substring(0,2)==="0x"&&(k=2);k<X;k+=2){const te=parseInt(E.substr(k,2),16);P+=String.fromCharCode(te)}return P}function L(E){return en(E)&&E.name&&E.name.indexOf("(")!==-1?E.name:E.name+"("+le(!1,E.inputs||[]).join(",")+")"}function H(...E){const P=E.reduce(((te,oe)=>te+oe.length),0),k=new Uint8Array(P);let X=0;for(const te of E)k.set(te,X),X+=te.length;return k}function le(E,P){const k=[];return P.forEach((function(X){if(typeof X.components=="object"){if(X.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let te="";const oe=X.type.indexOf("[");oe>=0&&(te=X.type.substring(oe));const Ne=le(E,X.components);k.push("("+Ne.join(",")+")"+te)}else k.push(X.type)})),k}function ye(E){const P=E.indexOf("("),k=E.indexOf(")");return P!==-1&&k!==-1?E.substr(0,P):E}function fe(E){const P=E.indexOf("("),k=E.indexOf(")");return P!==-1&&k!==-1?E.substr(P+1,k-P-1).replace(" ",""):""}function Pe(E){return E==null?E:Dt(E).toNumber()}function Re(E){return Dt(E).toNumber()}function ae(E){return Rr(E)?E.toString(10):""+E}function ue(E){return typeof E=="string"&&!E.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E)?"0x"+E:Xe(E)}function Ie(E){if(typeof E=="string")return E.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E)?Xe(E):"0x"+ce(Ae(E));if(E instanceof Uint8Array)return"0x"+ce(E);throw new Error(`toStringData: Error trying to convert ${E} (${typeof E}) to a hex string.`)}function je(E){return typeof E=="boolean"?E:Dt(E).toNumber()!==0}function qe(E){const P=Dt(E),k=P.toString(16);return P.isLessThan(0)?"-0x"+k.substr(1):"0x"+k}function Xe(E){if(bn(E))return qe(+E);if(Rr(E))return qe(E);if(En(E)){const P=E;if(P.indexOf("-0x")===0)return qe(P);if(P.indexOf("0x")===0)return P;if(!isFinite(P))return ce(Ae(P))}if(E instanceof Uint8Array)return"0x"+ce(E);if(tn(E)||en(E))throw new Error("toHex can only be called with scalar values, not objects or arrays");return qe(E)}function Ht(E){const P=E?E.toLowerCase():"ether",k=j[P];if(k===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 pe(k,10)}function Dt(E){let P=E||0;return Rr(P)?P:(typeof P=="string"&&(P=P.trim()),typeof P!="string"||P.indexOf("0x")!==0&&P.indexOf("-0x")!==0?P instanceof Uint8Array?new pe(ce(P),16):new pe(P,10):new pe(P.replace("0x","").toLowerCase(),16))}function nr(E){return new pe(new Array(E).fill("1").join(""),2)}function Ft(E,P=256){const k=Dt(E).integerValue();return k.isLessThan(0)?nr(P).plus(k).plus(1):k}function Vt(E,P){return B(E.toString(2),P,"0")[0]==="1"}function Gr(E){if(typeof E!="string")throw Be("invalid address",Me,{arg:"address",value:E});if(E.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return E.trim().substring(0,2)!=="0x"&&(E="0x"+E),fn(E);throw Be("invalid address",Me,{arg:"address",value:E})}function sr(E,P=256){if(Vt(E,P)){const k=nr(P);return E.minus(k).minus(1)}return E}function _n(E){return/^0x[0-9a-f]{40}$/i.test(E)}function xr(E){return!!/^(0x)?[0-9a-f]{40}$/i.test(E)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(E)&&!/^(0x)?[0-9A-F]{40}$/.test(E))||$r(E))}function $r(E){const P=E.replace("0x",""),k=Y(P.toLowerCase());for(let X=0;X<40;X++)if(parseInt(k[X],16)>7&&P[X].toUpperCase()!==P[X]||parseInt(k[X],16)<=7&&P[X].toLowerCase()!==P[X])return!1;return!0}function fn(E){if(E===void 0)return"";const P=E.toLowerCase().replace("0x",""),k=Y(P);let X="0x";for(let te=0;te<P.length;te++)parseInt(k[te],16)>7?X+=P[te].toUpperCase():X+=P[te];return X}function ur(E){if(!Array.isArray(E))throw new Error(`Value was not an array: ${JSON.stringify(E)}`);return E}function pn(E){return _n(E)?E:/^[0-9a-f]{40}$/.test(E)?"0x"+E:"0x"+B(Xe(E).substr(2),40)}function Rr(E){return E instanceof pe}function En(E){return typeof E=="string"||E&&E.constructor&&E.constructor.name==="String"}function en(E){return E!==null&&!Array.isArray(E)&&typeof E=="object"}function bn(E){return typeof E=="boolean"}function tn(E){return Array.isArray(E)}var Zi,wn;function Pi(E,P){if(!E)throw new Error("jsonrpc method should be specified!");if(typeof E!="string")throw new Error(`jsonrpc must be a string, got ${typeof E}!`);return t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:E,params:P||[]}}function Ri(E){return Array.isArray(E)?E.every(P):P(E);function P(k){return!!k&&(k.error===void 0||k.error===null)&&k.jsonrpc==="2.0"&&k.id!==null&&"result"in k&&k.result!==void 0}}t.TransactionStatus=void 0,(Zi=t.TransactionStatus||(t.TransactionStatus={})).pending="pending",Zi.confirmed="confirmed",Zi.failed="failed",t.TransactionType=void 0,(wn=t.TransactionType||(t.TransactionType={})).queued="queued",wn.dropped="dropped",wn.replaced="replaced",wn.pending="pending",wn.reverted="reverted",wn.confirmed="confirmed",t.messageId=0;function mi(E){return Dt(E)}function Ni(E){return E==="latest"||E==="pending"||E==="earliest"}function Nr(E){return E===void 0?"latest":Ot(E)}function Ot(E){return E==null?null:Ni(E)?E:Xe(E)}function Kr(E){return E.from&&(E.from=Ce(E.from)),E.to&&(E.to=Ce(E.to)),E.gasPrice!==void 0&&(E.gasPrice=qe(E.gasPrice)),E.gas!==void 0&&(E.gas=qe(E.gas)),E.value!==void 0&&(E.value=qe(E.value)),E.nonce!==void 0&&(E.nonce=qe(E.nonce)),E.data&&!E.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E.data)&&(E.data="0x"+E.data),E}function rn(E){if(typeof E!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(E));if(E.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(E));if(E.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(E));return E}function ne(E){if(typeof E!="object")throw new Error("Did not provide transaction options");if(!E.from)throw new Error('Missing "from" in transaction options');return E.from=Ce(E.from),E.to&&(E.to=Ce(E.to)),E.gasPrice!==void 0&&(E.gasPrice=qe(E.gasPrice)),E.gas!==void 0&&(E.gas=qe(E.gas)),E.value!==void 0&&(E.value=qe(E.value)),E.nonce!==void 0&&(E.nonce=qe(E.nonce)),E.data&&!E.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E.data)&&(E.data="0x"+E.data),E}function U(E){return E?(E.blockNumber!==null&&(E.blockNumber=Re(E.blockNumber)),E.transactionIndex!==null&&(E.transactionIndex=Re(E.transactionIndex)),E.nonce=Re(E.nonce),E.gas=Re(E.gas),E.gasPrice=Dt(E.gasPrice),E.value=Dt(E.value),E):null}function $(E){return E?(E.blockNumber!==null&&(E.blockNumber=Re(E.blockNumber)),E.transactionIndex!==null&&(E.transactionIndex=Re(E.transactionIndex)),E.cumulativeGasUsed=Re(E.cumulativeGasUsed),E.gasUsed=Re(E.gasUsed),E.logs&&tn(E.logs)&&(E.logs=E.logs.map((function(P){return Se(P)}))),E.status=Re(E.status||""),E):null}function me(E){return E?(E.gasLimit=Re(E.gasLimit),E.gasUsed=Re(E.gasUsed),E.size=Re(E.size),E.timestamp=Re(E.timestamp),E.number!==null&&(E.number=Re(E.number)),E.difficulty=Dt(E.difficulty),E.totalDifficulty=Dt(E.totalDifficulty),tn(E.transactions)&&E.transactions.forEach((function(P,k){En(P)||(E.transactions[k]=U(P)||E.transactions[k])})),E):null}function Se(E){return E&&(E.blockNumber&&(E.blockNumber=Re(E.blockNumber)),E.transactionIndex&&(E.transactionIndex=Re(E.transactionIndex)),E.logIndex&&(E.logIndex=Re(E.logIndex)),E)}function Ce(E){if(_n(E))return E;if(xr(E))return"0x"+E;throw new Error(`Invalid address: ${JSON.stringify(E)}`)}function Ke(E){return E}function Ye(E){return E&&(E.startingBlock=Re(E.startingBlock),E.currentBlock=Re(E.currentBlock),E.highestBlock=Re(E.highestBlock),E.knownStates&&(E.knownStates=Re(E.knownStates),E.pulledStates=Re(E.pulledStates)),E)}function mt(E){if(E===null)throw Be("cannot convert null value to array",Me,{arg:"value",value:E});if(E instanceof Uint8Array)return new Uint8Array(E);if(typeof E=="string"){const P=E.match(/^(0x)?[0-9a-fA-F]*$/);if(!P)throw Be("invalid hexidecimal string",Me,{arg:"value",value:E});if(P[1]!=="0x")throw Be("hex string must have 0x prefix",Me,{arg:"value",value:E});(E=E.substring(2)).length%2&&(E="0"+E);const k=[];for(let X=0;X<E.length;X+=2)k.push(parseInt(E.substr(X,2),16));return new Uint8Array(k)}if((function(P){if(!P||parseInt(String(P.length))!==P.length||typeof P=="string")return!1;for(let k=0;k<P.length;k++){const X=P[k];if(X<0||X>=256||parseInt(String(X))!==X)return!1}return!0})(E))return new Uint8Array(E);throw Be("invalid arrayify value",void 0,{arg:"value",value:E,type:typeof E})}function ut(E,P,k){Object.defineProperty(E,P,{enumerable:!0,value:k,writable:!1})}const _t=new pe(-1),Tt=new pe(0),It=new pe(1),er=new pe("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Qt(E){return(function(P,k){function X(Ne){return new Error('unexpected character "'+P[Ne]+'" at position '+Ne+' in "'+P+'"')}const te={type:"",name:"",state:{allowType:!0}};let oe=te;for(let Ne=0;Ne<P.length;Ne++){const He=P[Ne];switch(He){case"(":if(!oe.state.allowParams)throw X(Ne);oe.state.allowType=!1,oe.type=vr(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=vr(oe.type);const it=oe;if(oe=oe.parent,!oe)throw X(Ne);delete it.parent,oe.state.allowParams=!1,oe.state.allowName=!0,oe.state.allowArray=!0;break;case",":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=vr(oe.type);const st={type:"",name:"",parent:oe.parent,state:{allowType:!0}};oe.parent.components.push(st),delete oe.parent,oe=st;break;case" ":oe.state.allowType&&oe.type!==""&&(oe.type=vr(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 X(Ne);oe.type+=He,oe.state.allowArray=!1,oe.state.allowName=!1,oe.state.readArray=!0;break;case"]":if(!oe.state.readArray)throw X(Ne);oe.type+=He,oe.state.readArray=!1,oe.state.allowArray=!0,oe.state.allowName=!0;break;default:if(oe.state.allowType)oe.type+=He,oe.state.allowParams=!0,oe.state.allowArray=!0;else if(oe.state.allowName)oe.name+=He,delete oe.state.allowArray;else{if(!oe.state.readArray)throw X(Ne);oe.type+=He}}}if(oe.parent)throw new Error("unexpected eof");return delete te.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),te.type=vr(te.type),te})(E)}function vr(E){return E.match(/^uint($|[^1-9])/)?E="uint256"+E.substring(4):E.match(/^int($|[^1-9])/)&&(E="int256"+E.substring(3)),E}const qr=new RegExp(/^bytes([0-9]*)$/),Sn=new RegExp(/^(u?int)([0-9]*)$/),Bn=new RegExp(/^(.*)\[([0-9]*)\]$/),xi=function(E,P){const k=E.match(Sn);return k&&parseInt(k[2])<=48?P.toNumber():P};class Cr{constructor(P,k,X,te="",oe){this.coerceFunc=P,this.name=k,this.type=X,this.localName=te,this.dynamic=oe}}class hi extends Cr{constructor(P){super(P.coerceFunc,P.name,P.type,void 0,P.dynamic),ut(this,"coder",P)}encode(P){return this.coder.encode(P)}decode(P,k){return this.coder.decode(P,k)}}class Ks extends Cr{constructor(P,k){super(P,"null","",k,!1)}encode(P){return mt([])}decode(P,k){if(k>P.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function wa(E,P){return new pe(E.toString(2).substr(-P),2)}class wl extends Cr{constructor(P,k,X,te){const oe=(X?"int":"uint")+8*k;super(P,oe,oe,te,!1),this.size=k,this.signed=X}encode(P){try{let k=Dt(P);if(this.signed){let te=wa(er,8*this.size-1);if(k.gt(te))throw new Error("out-of-bounds");if(te=te.plus(It).multipliedBy(_t),k.lt(te))throw new Error("out-of-bounds")}else if(k.lt(Tt)||k.gt(wa(er,8*this.size)))throw new Error("out-of-bounds");k=wa(Ft(k,8*this.size),8*this.size),this.signed&&(k=Ft(sr(k,8*this.size),256));const X=B(Ft(k).toString(16),64);if(X.indexOf("NaN")!==-1)throw Be("invalid number value, NaN",Me,{arg:this.localName,coderType:this.name,value:P,v:k,twosComplement:Ft(k),twosComplement16:Ft(k).toString(16),pad:B(Ft(k).toString(16),64),size:this.size});return Te(X)}catch(k){throw Be("invalid number value",Me,{arg:this.localName,coderType:this.name,value:P,message:k.toString()})}}decode(P,k){if(P.length<k+32)throw Be("insufficient data for "+this.name+" type",Me,{arg:this.localName,coderType:this.name,value:Xe(P.slice(k,k+32))});const X=32-this.size;let te=new pe(ce(P.slice(k+X,k+32)),16);return te=this.signed?sr(te,8*this.size):wa(te,8*this.size),{consumed:32,value:this.coerceFunc(this.name,te)}}}const Un=new wl((function(E,P){return P}),32,!1,"none");class tr extends Cr{constructor(P,k,X){const te="bytes"+k;super(P,te,te,X,!1),this.length=k}encode(P){const k=new Uint8Array(32);try{if(typeof P=="string"&&P.length%2!=0)throw new Error("hex string cannot be odd-length");const X=mt(P);if(X.length>this.length)throw new Error("incorrect data length");k.set(X)}catch(X){throw Be("invalid "+this.name+" value. Use hex strings or Uint8Array",Me,{arg:this.localName,coderType:this.name,value:X.value||P,details:X.message})}return k}decode(P,k){if(P.length<k+32)throw Be("insufficient data for "+this.name+" type",Me,{arg:this.localName,coderType:this.name,value:Xe(P.slice(k,k+32))});return{consumed:32,value:this.coerceFunc(this.name,P.slice(k,k+this.length))}}}function Sl(E){const P=32*Math.ceil(E.length/32),k=new Uint8Array(P-E.length);return H(Un.encode(E.length),E,k)}function Xo(E,P,k){if(E.length<P+32)throw Be("insufficient data for dynamicBytes length",Me,{arg:k,coderType:"dynamicBytes",value:Xe(E.slice(P,P+32))});let X=Un.decode(E,P).value;try{X=X.toNumber()}catch(te){throw te("dynamic bytes count too large",Me,{arg:k,coderType:"dynamicBytes",value:X.toString()})}if(E.length<P+32+X)throw Be("insufficient data for dynamicBytes type",Me,{arg:k,coderType:"dynamicBytes",value:Xe(E.slice(P,P+32+X))});return{consumed:32+32*Math.ceil(X/32),value:E.slice(P+32,P+32+X)}}function Sa(E){return 32*Math.ceil(E/32)}function Ta(E,P){if(!Array.isArray(P)){if(!P||typeof P!="object")throw Be("invalid tuple value",Me,{coderType:"tuple",value:P});{const it=[];E.forEach((function(st){it.push(P[st.localName])})),P=it}}if(E.length!==P.length)throw Be("types/value length mismatch",Me,{coderType:"tuple",value:P});const k=[];E.forEach((function(it,st){k.push({dynamic:it.dynamic,value:it.encode(P[st])})}));let X=0,te=0;k.forEach((function(it){it.dynamic?(X+=32,te+=Sa(it.value.length)):X+=Sa(it.value.length)}));let oe=0,Ne=X;const He=new Uint8Array(X+te);return k.forEach((function(it){it.dynamic?(He.set(Un.encode(Ne),oe),oe+=32,He.set(it.value,Ne),Ne+=Sa(it.value.length)):(He.set(it.value,oe),oe+=Sa(it.value.length))})),He}class ff extends Array{}class Tl extends Cr{constructor(P,k,X,te){super(P,"array",k.type+"["+(X>=0?X:"")+"]",te,X===-1||k.dynamic),this.coder=k,this.length=X}encode(P){if(!Array.isArray(P))throw Be("expected array value",Me,{arg:this.localName,coderType:"array",value:P});let k=this.length,X=new Uint8Array(0);k===-1&&(k=P.length,X=Un.encode(k)),(function(oe,Ne,He){if(He||(He=""),oe<Ne)throw Be("missing argument"+He,"MISSING_ARGUMENT",{count:oe,expectedCount:Ne});if(oe>Ne)throw Be("too many arguments"+He,"UNEXPECTED_ARGUMENT",{count:oe,expectedCount:Ne})})(k,P.length,"in coder array"+(this.localName?" "+this.localName:""));const te=[];for(let oe=0;oe<P.length;oe++)te.push(this.coder);return H(X,Ta(te,P))}decode(P,k){let X=0,te=this.length;if(te===-1){let He;try{He=Un.decode(P,k)}catch(it){throw Be("insufficient data for dynamic array length",Me,{arg:this.localName,coderType:"array",value:it.value})}try{te=He.value.toNumber()}catch{throw Be("array count too large",Me,{arg:this.localName,coderType:"array",value:He.value.toString()})}X+=He.consumed,k+=He.consumed}const oe=[];for(let He=0;He<te;He++)oe.push(new hi(this.coder));const Ne=(function(He,it,st){const pr=st;let zt=0;const We=[];return He.forEach((function(Er){let Wt;if(Er.dynamic){const kt=Un.decode(it,st);Wt=Er.decode(it,pr+kt.value.toNumber()),Wt.consumed=kt.consumed}else Wt=Er.decode(it,st);Wt.value!==void 0&&We.push(Wt.value),st+=Wt.consumed,zt+=Wt.consumed})),{value:We,consumed:zt}})(oe,P,k);return Ne.consumed+=X,Ne.value=this.coerceFunc(this.type,Ne.value),Ne}}class $i extends Cr{constructor(P,k,X){let te=!1;const oe=[];k.forEach((function(Ne){Ne.dynamic&&(te=!0),oe.push(Ne.type)})),super(P,"tuple","tuple("+oe.join(",")+")",X,te),this.coders=k}encode(P){return Ta(this.coders,P)}decode(P,k){const X=(function(te,oe,Ne){const He=Ne;let it=0;const st=new ff;return te.forEach((function(pr){let zt;if(pr.dynamic){const We=Un.decode(oe,Ne);zt=pr.decode(oe,He+We.value.toNumber()),zt.consumed=We.consumed}else zt=pr.decode(oe,Ne);zt.value!==void 0&&st.push(zt.value),Ne+=zt.consumed,it+=zt.consumed})),te.forEach((function(pr,zt){let We=pr.localName;We&&(We==="length"&&(We="_length"),st[We]!==null&&st[We]!==void 0||(st[We]=st[zt]))})),{value:st,consumed:it}})(this.coders,P,k);return X.value=this.coerceFunc(this.type,X.value),X}}const Tn={address:class extends Cr{constructor(E,P){super(E,"address","address",P,!1)}encode(E){const P=new Uint8Array(32),k=E.trim();if(!xr(k))throw Be("invalid address format",Me,{arg:this.localName,coderType:"address",value:E});try{P.set(Te(Ce(k)),12)}catch(X){throw Be(`invalid address (${X.message})`,Me,{arg:this.localName,coderType:"address",value:E})}return P}decode(E,P){if(E.length<P+32)throw Be("insufficuent data for address type",Me,{arg:this.localName,coderType:"address",value:Xe(E.slice(P,P+32)),missingBytes:P+32-E.length});return{consumed:32,value:this.coerceFunc("address",Gr(Xe(E.slice(P+12,P+32))))}}},bool:class extends Cr{constructor(E,P){super(E,"bool","bool",P,!1)}encode(E){return Un.encode(E?1:0)}decode(E,P){try{const k=Un.decode(E,P);return{consumed:k.consumed,value:this.coerceFunc("bool",!k.value.isZero())}}catch(k){throw k.reason==="insufficient data for uint256 type"?Be("insufficient data for boolean type",Me,{arg:this.localName,coderType:"boolean",value:k.value}):k}}},string:class extends Cr{constructor(E,P){super(E,"string","string",P,!0)}encode(E){if(typeof E!="string")throw Be("invalid string value",Me,{arg:this.localName,coderType:"string",value:E});return Sl(Ae(E))}decode(E,P){const k=Xo(E,P,this.localName);return k.value=this.coerceFunc("string",be(k.value)),k}},bytes:class extends Cr{constructor(E,P){super(E,"bytes","bytes",P,!0)}encode(E){try{return Sl(mt(E))}catch(P){throw P("invalid bytes value",Me,{arg:this.localName,coderType:"bytes",value:P.value})}}decode(E,P){const k=Xo(E,P,this.localName);return k.value=this.coerceFunc("bytes",k.value),k}},function:class extends tr{constructor(E,P){super(E,24,P)}}};function Jo(E,P){const k=Tn[P.type];if(k)return new k(E,P.name);let X=P.type.match(Sn);if(X){const te=parseInt(X[2]||"256");if(te===0||te>256||te%8!=0)throw Be("invalid "+X[1]+" bit length",Me,{arg:"param",value:P});return new wl(E,te/8,X[1]==="int",P.name)}if(X=P.type.match(qr),X){const te=parseInt(X[1]);if(te===0||te>32)throw Be("invalid bytes length",Me,{arg:"param",value:P});return new tr(E,te,P.name)}if(X=P.type.match(Bn),X){const te=Object.assign({},P),oe=parseInt(X[2]||"-1");return te.type=X[1],new Tl(E,Jo(E,te),oe,P.name)}if(P.type.substring(0,5)==="tuple")return(function(te,oe,Ne){oe||(oe=[]);const He=oe.map((it=>Jo(te,it)));return new $i(te,He,Ne)})(E,P.components,P.name);if(P.type==="")return new Ks(E,P.name);throw Be("invalid type",Me,{arg:"type",value:P.type,fullType:P})}class Yr{constructor(P){(function(k,X){if(!(k instanceof X))throw Be("missing new","MISSING_NEW",{name:X.name})})(this,Yr),P||(P=xi),ut(this,"coerceFunc",P)}encode(P,k){if(P.length!==k.length)throw Be("types/values length mismatch",Me,{count:{types:P.length,values:k.length},value:{types:P,values:k}});const X=P.map((te=>typeof te=="string"?Qt(te):te)).map((te=>Jo(this.coerceFunc,te)));return new $i(this.coerceFunc,X,"_").encode(k)}decode(P,k){const X=P.map((te=>typeof te=="string"?Qt(te):te)).map((te=>Jo(this.coerceFunc,te)));return new $i(this.coerceFunc,X,"_").decode(k,0).value}}const Al=new Yr;var Ol,tt;function xe(E,P,k,X){var te,oe=arguments.length,Ne=oe<3?P:X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ne=Reflect.decorate(E,P,k,X);else for(var He=E.length-1;He>=0;He--)(te=E[He])&&(Ne=(oe<3?te(Ne):oe>3?te(P,k,Ne):te(P,k))||Ne);return oe>3&&Ne&&Object.defineProperty(P,k,Ne),Ne}function $e(E,P){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(E,P)}t.coder=void 0,(Ol=t.coder||(t.coder={})).encodeParams=function(E,P){return ce(Al.encode(E,P))},Ol.decodeParams=function(E,P){if(E.length>0&&(!P||P==="0x"||P==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return Al.decode(E,Te("0x"+P.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class ft{constructor(P){this.callName=P.callName,this.params=P.params||0,this.inputFormatter=P.inputFormatter||null,this.outputFormatter=P.outputFormatter}validateArgs(P){if(P.length!==this.params)throw k=this.callName,X=P.length,te=this.params,new Error(`Invalid number of input parameters to RPC method "${k}" given: ${X}, expected: ${te}`);var k,X,te}formatInput(P){return this.inputFormatter?this.inputFormatter.map((function(k,X){return k?k(P[X]):P[X]})):P}formatOutput(P){return P!==null?this.outputFormatter(P):null}toPayload(P){const k=this.formatInput(P);return this.validateArgs(k),{method:this.callName,params:k}}async execute(P,...k){const X=this.toPayload(k);if(!P)throw new Error("Missing RequestManager in method#exec");const te=await P.sendAsync(X);return this.formatOutput(te)}}class _r{constructor(P){this.getter=P.getter,this.outputFormatter=P.outputFormatter}formatOutput(P){return this.outputFormatter(P)}async execute(P,...k){const X=await P.sendAsync({method:this.getter,params:[]});return this.formatOutput(X)}}function Il(E){return new Promise((P=>setTimeout(P,E)))}t.eth=void 0,(tt=t.eth||(t.eth={})).eth_getBalance=new ft({callName:"eth_getBalance",params:2,inputFormatter:[Ce,Nr],outputFormatter:mi}),tt.eth_getStorageAt=new ft({callName:"eth_getStorageAt",params:3,inputFormatter:[Ce,Xe,Nr],outputFormatter:ue}),tt.eth_getCode=new ft({callName:"eth_getCode",params:2,inputFormatter:[Ce,Nr],outputFormatter:ue}),tt.eth_getBlockByHash=new ft({callName:"eth_getBlockByHash",params:2,inputFormatter:[Ot,function(E){return!!E}],outputFormatter:me}),tt.eth_getBlockByNumber=new ft({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Ot,function(E){return!!E}],outputFormatter:me}),tt.eth_getUncleByBlockHashAndIndex=new ft({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Ot,Xe],outputFormatter:me}),tt.eth_getUncleByBlockNumberAndIndex=new ft({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Ot,Xe],outputFormatter:me}),tt.eth_getBlockTransactionCountByHash=new ft({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Ot],outputFormatter:Re}),tt.eth_getBlockTransactionCountByNumber=new ft({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Ot],outputFormatter:Re}),tt.eth_getUncleCountByBlockHash=new ft({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Ot],outputFormatter:Re}),tt.eth_getUncleCountByBlockNumber=new ft({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Ot],outputFormatter:Re}),tt.eth_getTransactionByHash=new ft({callName:"eth_getTransactionByHash",params:1,inputFormatter:[rn],outputFormatter:U}),tt.eth_getTransactionByBlockHashAndIndex=new ft({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Ot,Xe],outputFormatter:U}),tt.eth_getTransactionByBlockNumberAndIndex=new ft({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Ot,Xe],outputFormatter:U}),tt.eth_getTransactionReceipt=new ft({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[rn],outputFormatter:$}),tt.eth_getTransactionCount=new ft({callName:"eth_getTransactionCount",params:2,inputFormatter:[Ce,Nr],outputFormatter:Re}),tt.eth_sendRawTransaction=new ft({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:ue}),tt.web3_sha3=new ft({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:ue}),tt.eth_sendTransaction=new ft({callName:"eth_sendTransaction",params:1,inputFormatter:[ne],outputFormatter:ue}),tt.eth_sign=new ft({callName:"eth_sign",params:2,inputFormatter:[Ce,null],outputFormatter:ue}),tt.eth_call=new ft({callName:"eth_call",params:2,inputFormatter:[Kr,Nr],outputFormatter:ue}),tt.eth_estimateGas=new ft({callName:"eth_estimateGas",params:1,inputFormatter:[Kr],outputFormatter:Re}),tt.eth_submitWork=new ft({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:je}),tt.eth_getWork=new ft({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:ur}),tt.eth_coinbase=new _r({getter:"eth_coinbase",outputFormatter:pn}),tt.eth_mining=new _r({getter:"eth_mining",outputFormatter:je}),tt.eth_hashrate=new _r({getter:"eth_hashrate",outputFormatter:Re}),tt.eth_syncing=new _r({getter:"eth_syncing",outputFormatter:Ye}),tt.eth_gasPrice=new _r({getter:"eth_gasPrice",outputFormatter:mi}),tt.eth_accounts=new _r({getter:"eth_accounts",outputFormatter:ur}),tt.eth_blockNumber=new _r({getter:"eth_blockNumber",outputFormatter:Re}),tt.eth_protocolVersion=new _r({getter:"eth_protocolVersion",outputFormatter:Re}),tt.web3_clientVersion=new _r({getter:"web3_clientVersion",outputFormatter:ae}),tt.net_version=new _r({getter:"net_version",outputFormatter:ae}),tt.shh_version=new ft({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Re}),tt.shh_post=new ft({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:je}),tt.personal_newAccount=new ft({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:pn}),tt.personal_importRawKey=new ft({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:pn}),tt.personal_sign=new ft({callName:"personal_sign",params:3,inputFormatter:[Ie,Ce,null],outputFormatter:ue}),tt.personal_ecRecover=new ft({callName:"personal_ecRecover",params:2,inputFormatter:[Ie,null],outputFormatter:pn}),tt.personal_unlockAccount=new ft({callName:"personal_unlockAccount",params:3,inputFormatter:[Ce,null,Pe],outputFormatter:je}),tt.personal_sendTransaction=new ft({callName:"personal_sendTransaction",params:2,inputFormatter:[ne,null],outputFormatter:ue}),tt.personal_lockAccount=new ft({callName:"personal_lockAccount",params:1,inputFormatter:[Ce],outputFormatter:je}),tt.personal_listAccounts=new _r({getter:"personal_listAccounts",outputFormatter:ur}),tt.net_listening=new _r({getter:"net_listening",outputFormatter:je}),tt.net_peerCount=new _r({getter:"net_peerCount",outputFormatter:Re}),tt.eth_newFilter=new ft({callName:"eth_newFilter",params:1,inputFormatter:[Ke],outputFormatter:Xe}),tt.eth_getLogs=new ft({callName:"eth_getLogs",params:1,inputFormatter:[ur],outputFormatter:ur}),tt.eth_newBlockFilter=new ft({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Xe}),tt.eth_newPendingTransactionFilter=new ft({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Xe}),tt.eth_uninstallFilter=new ft({callName:"eth_uninstallFilter",params:1,inputFormatter:[Xe],outputFormatter:je}),tt.eth_getFilterLogs=new ft({callName:"eth_getFilterLogs",params:1,inputFormatter:[Xe],outputFormatter:ur}),tt.eth_getFilterChanges=new ft({callName:"eth_getFilterChanges",params:1,inputFormatter:[Xe],outputFormatter:ur}),tt.eth_submitHashrate=new ft({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:je}),tt.shh_newIdentity=new ft({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:ue}),tt.shh_hasIdentity=new ft({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:je}),tt.shh_newGroup=new ft({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:ue}),tt.shh_addToGroup=new ft({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:je}),tt.shh_newFilter=new ft({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Xe}),tt.shh_uninstallFilter=new ft({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:je}),tt.shh_getLogs=new ft({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:ur}),tt.shh_getFilterMessages=new ft({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:ur}),tt.shh_getFilterChanges=new ft({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:ur}),tt.shh_getMessages=new ft({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:ur});function at(E,P){const k=t.eth[P];if(!k)throw new Error(`Could not find the method/property named ${P.toString()}`);Object.defineProperty(E,P,{value:function(...X){return k.execute(this,...X)}})}class Ze{constructor(P){this.provider=P,this.requests=new Map}async sendAsync(P){const k=await this.provider;if(!k)throw new Error("Provider not set or invalid");const X=Pi(P.method,P.params),te=l();return this.requests.set(X.id,te),k.sendAsync(X,((oe,Ne)=>{this.requests.delete(X.id),oe?te.reject(oe):Ri(Ne)?te.resolve(Ne.result):te.reject((function(He){const it=He&&He.error&&He.error.message?He.error.message:"Invalid JSON RPC response: "+JSON.stringify(He);return new Error(it)})(Ne))})),te}setProvider(P){this.provider=P}async getConfirmedTransaction(P){const k=await this.waitForCompletion(P);if(this.isFailure(k))throw new Error(`Transaction "${P}" failed`);return k}async waitForCompletion(P,k){const X=rn(P);if(await this.isTxDropped(X,k)){const te=await this.getTransactionAndReceipt(X);return Object.assign(Object.assign({},te),{status:t.TransactionStatus.failed})}for(;;){const te=await this.getTransactionAndReceipt(X);if(!this.isPending(te)&&te.receipt)return Object.assign(Object.assign({},te),{status:this.isFailure(te)?t.TransactionStatus.failed:t.TransactionStatus.confirmed});await Il(2e3)}}async getTransaction(P){let k,X=null;const te=rn(P);try{const Ne=(await this.eth_accounts())[0];Ne&&(X=await this.eth_getTransactionCount(Ne,"latest"))}catch{X=null}try{if(k=await this.eth_getTransactionByHash(te),k===null)return null}catch{return null}if(k.blockNumber===null){if(X!==null){if(k.nonce<X)return{hash:te,type:t.TransactionType.replaced,nonce:k.nonce};if(k.nonce>X)return{hash:te,type:t.TransactionType.queued,nonce:k.nonce}}return Object.assign({type:t.TransactionType.pending},k)}let oe;try{if(oe=await this.eth_getTransactionReceipt(te),oe===null||oe.status===0)return Object.assign({type:t.TransactionType.reverted},k)}catch{return null}return Object.assign(Object.assign({type:t.TransactionType.confirmed},k),{receipt:oe})}async isTxDropped(P,k=15){let X=k;for(;X>0;){if(await this.getTransactionAndReceipt(P)!==null)return!1;X-=1,await Il(2e3)}return!0}async getTransactionAndReceipt(P){P=rn(P);const[k,X]=await Promise.all([this.eth_getTransactionByHash(P),this.eth_getTransactionReceipt(P)]);return Object.assign(Object.assign({},k),{receipt:X})}isPending(P){return P&&P.blockNumber===null}isFailure(P){return P&&(!P.receipt||P.receipt.status===0)}}xe([at,$e("design:type",Function)],Ze.prototype,"web3_clientVersion",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"web3_sha3",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"net_version",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"net_peerCount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"net_listening",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_protocolVersion",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_syncing",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_coinbase",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_mining",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_hashrate",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_gasPrice",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_accounts",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_blockNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBalance",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getStorageAt",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionCount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockTransactionCountByHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockTransactionCountByNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleCountByBlockHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleCountByBlockNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getCode",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_sign",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_sendTransaction",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_sendRawTransaction",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_call",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_estimateGas",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockByHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockByNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionByHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionReceipt",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleByBlockHashAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_newFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_newBlockFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_newPendingTransactionFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_uninstallFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getFilterChanges",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getFilterLogs",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getLogs",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getWork",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_submitWork",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_submitHashrate",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_post",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_version",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_newIdentity",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_hasIdentity",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_newGroup",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_addToGroup",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_newFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_uninstallFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_getFilterChanges",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_getMessages",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_unlockAccount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_newAccount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_listAccounts",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_lockAccount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_importRawKey",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_sendTransaction",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_sign",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_ecRecover",void 0);class Ys{constructor(P){this.json=P,this._inputTypes=P.inputs||[],this._outputTypes=P.outputs||[],this._constant=!!P.constant,this._payable=!!P.payable||P.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in P&&!P.constant||P.stateMutability==="nonpayable",this._name=L(P)}extractDefaultBlock(P){return P.length>this._inputTypes.length&&!en(P[P.length-1])&&Nr(P.pop())||"latest"}validateArgs(P){if(P.some((oe=>oe===void 0)))throw new Error("Invalid call, some arguments are undefined");const k=P.filter((function(oe){return!(en(oe)===!0&&tn(oe)===!1&&Rr(oe)===!1&&!(oe instanceof Uint8Array))}));if(k.length!==this._inputTypes.length)throw X=k.length,te=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${X}, expected: ${te}`);var X,te}toPayload(P){let k={to:void 0,data:void 0,value:void 0,from:void 0};P.length>this._inputTypes.length&&en(P[P.length-1])&&(k=P.pop()),this.validateArgs(P);const X=this.signature();let te=t.coder.encodeParams(this._inputTypes,P);return te.indexOf("0x")===0&&(te=te.substr(2)),k.data="0x"+X+te,k}signature(){return Y(this._name).slice(0,8)}unpackOutput(P){if(!P)return;const k=P.length>=2?P.slice(2):P,X=t.coder.decodeParams(this._outputTypes,k);return X.length===1?X[0]:X}async execute(P,k,...X){if(!P)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const te=this.toPayload(X);if(te.to=k,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 P.eth_sendTransaction(te)}{const te=this.extractDefaultBlock(X),oe=this.toPayload(X);oe.to=k;const Ne=await P.eth_call(oe,te);return this.unpackOutput(Ne)}}estimateGas(P,k,...X){if(!(P instanceof Ze))throw new Error("estimateGas needs to receive a RequestManager as first argument");const te=this.toPayload(X);return te.to=k,P.eth_estimateGas(te)}displayName(){return ye(this._name)}typeName(){return fe(this._name)||"void"}attachToContract(P){const k=this.displayName(),X=Object.assign(((...te)=>this.execute(P.requestManager,P.address,...te)),{estimateGas:this.estimateGas.bind(this,P.requestManager,P.address),toPayload:(...te)=>this.toPayload(te),toRPCMessage:(...te)=>{const oe=this.extractDefaultBlock(te),Ne=this.toPayload(te);return Ne.to=P.address,{method:"eth_call",params:[Ne,oe]}},unpackOutput:te=>this.unpackOutput(te)});P[k]||(P[k]=X),P[k][this.typeName()]=X}}function Qo(E){if(E==null)return null;const P=String(E).toString();return P.indexOf("0x")===0?P:ce(Ae(P))}class Ci{constructor(P){this.requestManager=P,this.isStarted=!1,this.isDisposed=!1,this.formatter=k=>k,this.filterId=l(),this.callbacks=[],this.stopSemaphore=l()}async watch(P){if(this.isDisposed)throw new Error("The filter was disposed");P&&(this.callbacks.push(P),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const P=await this.getNewFilter();if(!P)throw new Error("Could not create a filter, response: "+JSON.stringify(P));this.filterId.resolve(P)}catch(P){throw P}this.stopSemaphore=l(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const P=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${P}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const k=await this.getChanges();k&&this.callbacks.forEach((X=>{this.formatter?k.forEach((te=>{X(this.formatter(te))})):k.forEach((te=>X(te)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=l(),setTimeout((P=()=>this.poll(),function(){P().catch((k=>console.error(k)))}),500))}else this.stopSemaphore.resolve(1);var P}}class Aa extends Ci{constructor(P,k,X=(te=>te)){super(P),this.requestManager=P,this.options=k,this.formatter=X,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(te){return Qo(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"?Ot(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Ot(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const P=await this.filterId;return this.requestManager.eth_getFilterLogs(P)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const P=await this.filterId;return this.requestManager.eth_getFilterChanges(P)}async uninstall(){const P=await this.filterId;return this.requestManager.eth_uninstallFilter(P)}}class Oa{constructor(P,k,X){this.requestManager=P,this.address=X,this._anonymous=!1,this._params=k.inputs||[],this._name=L(k),this._anonymous=k.anonymous||!1}types(P){return this._params.filter((function(k){return k.indexed===P}))}displayName(){return ye(this._name)}typeName(){return fe(this._name)||"void"}signature(){return Y(this._name)}encode(P={},k={}){const X={topics:[],address:this.address};k.fromBlock!==void 0&&(X.fromBlock=Ot(k.fromBlock)||void 0),k.toBlock!==void 0&&(X.toBlock=Ot(k.toBlock)||void 0),X.topics=X.topics||[],this._anonymous||X.topics.push("0x"+this.signature());const te=this._params.filter((function(oe){return oe.indexed===!0})).map((function(oe){const Ne=P[oe.name];return Ne==null?null:tn(Ne)?Ne.map((function(He){return"0x"+t.coder.encodeParams([oe],[He])})):"0x"+t.coder.encodeParams([oe],[Ne])}));return X.topics=X.topics.concat(te),X}decode(P){P.data=P.data||"",P.topics=P.topics||[];const k=(this._anonymous?P.topics:P.topics.slice(1)).map((function(He){return He.slice(2)})).join(""),X=t.coder.decodeParams(this.types(!0),k),te=P.data.slice(2),oe=t.coder.decodeParams(this.types(!1),te),Ne=this._params.reduce((function(He,it){return He[it.name]=it.indexed?X.shift():oe.shift(),He}),{});return Object.assign(Object.assign({},Se(P)),{event:this.displayName(),address:P.address,args:Ne})}async execute(P,k){const X=this.encode(P,k),te=this.decode.bind(this);return new Aa(this.requestManager,X,te)}attachToContract(P){const k=this.execute.bind(this),X=this.displayName();P.events[X]||(P.events[X]=k),P.events[X][this.typeName()]=this.execute.bind(this,P)}}class Ut{constructor(P,k,X){this._requestManager=P,this._json=k,this._address=X}encode(P={}){const k={address:this._address};return P.fromBlock!==void 0&&(k.fromBlock=Ot(P.fromBlock)||void 0),P.toBlock!==void 0&&(k.toBlock=Ot(P.toBlock)||void 0),k}decode(P){P.data=P.data||"";const k=tn(P.topics)&&En(P.topics[0])?P.topics[0].slice(2):"",X=this._json.filter((function(te){return k===Y(L(te))}))[0];return X?new Oa(this._requestManager,X,this._address).decode(P):Se(P)}async execute(P){const k=this.encode(P),X=this.decode.bind(this);return new Aa(this._requestManager,k,X)}getAllEventsFunction(){return this.execute.bind(this)}}class Xs{constructor(P,k,X){var te;this.requestManager=P,this.abi=k,this.address=X,this.events={},this.transactionHash=null,this.address=X,this.abi=k,(te=this).abi.filter((function(oe){return oe.type==="function"})).map((function(oe){return new Ys(oe)})).forEach((function(oe){oe.attachToContract(te)})),this.allEvents=(function(oe){const Ne=oe.abi.filter((function(it){return it.type==="event"})),He=new Ut(oe.requestManager,Ne,oe.address);return Ne.map((function(it){return new Oa(oe.requestManager,it,oe.address)})).forEach((function(it){it.attachToContract(oe)})),He.getAllEventsFunction()})(this)}}t.AbstractFilter=Ci,t.BigNumber=pe,t.Contract=Xs,t.ContractFactory=class{constructor(E,P){this.requestManager=E,this.abi=P}async deploy(...E){let P;const k=E[E.length-1];if(en(k)&&!tn(k)&&(P=E.pop()),!P)throw new Error("Missing options object");if(!P.data||typeof P.data!="string")throw new Error("Invalid options.data");if(Re(P.value)>0&&!(this.abi.filter((function(st){return st.type==="constructor"&&st.inputs.length===E.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const X=(te=this.abi,oe=E,te.filter((function(st){return st.type==="constructor"&&st.inputs&&st.inputs.length===oe.length})).map((function(st){return st.inputs||[]})).map((function(st){return t.coder.encodeParams(st,oe)}))[0]||"");var te,oe;P.data+=X,P.gas||(P.gas=await this.requestManager.eth_estimateGas(P));const Ne=await this.requestManager.eth_sendTransaction(P);if(!Ne)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const He=await(async function(st,pr){const zt=l();let We=0;const Er=()=>{We++,We>50?zt.reject(new Error("Contract transaction couldn't be found after 50 blocks")):st.eth_getTransactionReceipt(pr).then((Ar=>{Ar&&Ar.blockHash?zt.resolve(Ar):setTimeout(Er,1e3)}),(Ar=>zt.reject(Ar)))};Er();const Wt=await zt,kt=await st.eth_getCode(Wt.contractAddress,"latest");if(kt&&kt.length>3)return Wt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:kt,receipt:Wt})})(this.requestManager,Ne),it=await this.at(He);return it.transactionHash=Ne,it}async at(E){if(!xr(E))throw new TypeError(`Invalid address ${JSON.stringify(E)}`);return new Xs(this.requestManager,this.abi,E)}},t.EthBlockFilter=class extends Aa{constructor(E){super(E,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},t.EthFilter=Aa,t.EthPendingTransactionFilter=class extends Aa{constructor(E){super(E,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},t.HTTPProvider=class{constructor(E,P={}){this.host=E,this.options=P,this.debug=!1,this.host=E||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(E,P){try{let k=null;k=E instanceof Array?E.map((oe=>n(oe))):n(E);const X=this.options.fetch||globalThis.fetch;if(X===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(k),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+te.body),X(this.host,te).then((async oe=>{if(oe.ok){const Ne=await oe.json();this.debug&&console.log("RECV << "+JSON.stringify(Ne)),Ne.error?P(Object.assign(new Error(Ne.error.json||Ne.error),Ne.error)):P(null,Ne)}else this.debug&&console.log("ERR << "+JSON.stringify(oe)),P(new Error("External error. response code: "+oe.status))}),(oe=>{this.debug&&console.log("ERR << "+JSON.stringify(oe)),P(oe)}))}catch(k){this.debug&&console.log("ERR << "+JSON.stringify(k)),P(k)}}},t.Method=ft,t.Property=_r,t.RequestManager=Ze,t.SHHFilter=class extends Ci{constructor(E,P){super(E),this.requestManager=E,this.options=P,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(k){return Qo(k)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const E=await this.filterId;return this.requestManager.shh_getMessages(E)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const E=await this.filterId;return this.requestManager.shh_getFilterChanges(E)}async uninstall(){const E=await this.filterId;return this.requestManager.shh_uninstallFilter(E)}},t.SolidityEvent=Oa,t.SolidityFunction=Ys,t.WebSocketProvider=class{constructor(E,P={}){this.url=E,this.options=P,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const E=this.connection;this.timeout(new Error("Provider disposed.")),E.then((P=>P.close())).catch((P=>{this.debug&&console.error(P)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(E,P){const k=[];let X;if(E instanceof Array)X=Promise.all(E.map((te=>{const oe=l();try{const Ne=n(te);k.push(Ne),this.responseCallbacks.set(Ne.id,oe)}catch(Ne){oe.reject(Ne)}return oe})));else{const te=l();try{const oe=n(E);k.push(oe),this.responseCallbacks.set(oe.id,te)}catch(oe){te.reject(oe)}X=te}X.then((te=>P(null,te)),(te=>P(te))),this.connection.then((te=>{k.forEach((oe=>{const Ne=JSON.stringify(oe);this.debug&&console.log("SEND >> "+Ne),te.send(Ne)}))}),(te=>{P(te)}))}parseResponse(E){const P=[];return E.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((k=>{let X=k;this.lastChunk&&(X=this.lastChunk+X);let te=null;try{te=JSON.parse(X)}catch{return this.lastChunk=X,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",te&&P.push(te)})),P}processMessage(E){if("id"in E){const P=E.id,k=this.responseCallbacks.get(P);if(!k)return void console.error("Error: Received a response for an unknown request",E);this.responseCallbacks.delete(P),E.error!==void 0&&E.error!==null?k.reject(Object.assign(new Error(E.error.message||E.error),E.error)):"result"in E&&k.resolve(E)}else this.notificationCallbacks.forEach((P=>P(null,E)))}timeout(E){this.connection&&this.connection.isPending||(this.connection=l());const P=E||new Error("Connection timeout");this.responseCallbacks.forEach((k=>k.reject(P))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((k=>k.close())).catch((k=>{this.debug&&console.error(k)})),this.connection&&this.connection.isPending||(this.connection=l()),this.lastChunk="";const E=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!E)throw new Error("Please provide a WebSocketConstructor");const P=new E(this.url,this.options.protocol);P.onopen=()=>{this.connection.resolve(P)},P.onerror=k=>{const X=new Error("Error in web socket");X.data=k,this.timeout(X)},P.onclose=k=>{this.timeout(new Error(`Connection closed (${k&&k.reason||"Unknown reason"})`))},P.onmessage=k=>{const X=typeof k.data=="string"?k.data:"";this.debug&&console.log("RECV << "+k.data),this.parseResponse(X).forEach((te=>{te instanceof Array?te.forEach((oe=>this.processMessage(oe))):this.processMessage(te)}))}}},t.bytesToHex=ce,t.bytesToUtf8String=be,t.concatBytes=H,t.default=Ze,t.extractDisplayName=ye,t.extractTypeName=fe,t.fromAscii=function(E,P=0){let k="";for(let X=0;X<E.length;X++){const te=E.charCodeAt(X).toString(16);k+=te.length<2?"0"+te:te}return"0x"+k.padEnd(P,"0")},t.fromDecimal=qe,t.fromTwosComplement=sr,t.fromWei=function(E,P){const k=Dt(E).dividedBy(Ht(P));return Rr(E)?k:k.toString(10)},t.getAddress=Gr,t.getValueOfUnit=Ht,t.hexToBytes=Te,t.inputAddressFormatter=Ce,t.inputBlockNumberFormatter=Ot,t.inputCallFormatter=Kr,t.inputDefaultBlockNumberFormatter=Nr,t.inputFilterOptions=Ke,t.inputPostFormatter=function(E){return E?(E.ttl=qe(E.ttl),E.workToProve=qe(E.workToProve),E.priority=qe(E.priority),tn(E.topics)||(E.topics=E.topics?[E.topics]:[]),E.topics=E.topics.map((function(P){return P.indexOf("0x")===0?P:"0x"+ce(Ae(P))})),E):null},t.inputTransactionFormatter=ne,t.inputTransactionId=rn,t.isAddress=xr,t.isArray=tn,t.isBigNumber=Rr,t.isBloom=function(E){return!!/^(0x)?[0-9a-f]{512}$/i.test(E)&&!!/^(0x)?[0-9a-f]{512}$/i.test(E)},t.isBoolean=bn,t.isChecksumAddress=$r,t.isFunction=function(E){return typeof E=="function"},t.isHex=function(E){return typeof E=="string"&&/^0x[0-9a-fA-F]+$/.test(E)},t.isJson=function(E){try{return!!JSON.parse(E)}catch{return!1}},t.isObject=en,t.isPredefinedBlockNumber=Ni,t.isStrictAddress=_n,t.isString=En,t.isTopic=function(E){return!!/^(0x)?[0-9a-f]{64}$/i.test(E)&&!!/^(0x)?[0-9a-f]{64}$/i.test(E)},t.isValidResponse=Ri,t.outputBigNumberFormatter=mi,t.outputBlockFormatter=me,t.outputLogFormatter=Se,t.outputPostFormatter=function(E){return E?(E.expiry=Re(E.expiry),E.sent=Re(E.sent),E.ttl=Re(E.ttl),E.workProved=Re(E.workProved),E.topics||(E.topics=[]),E.topics=E.topics.map((function(P){return q(P)})),E):null},t.outputSyncingFormatter=Ye,t.outputTransactionFormatter=U,t.outputTransactionReceiptFormatter=$,t.padLeft=B,t.padRight=function(E,P,k){return E+new Array(P-E.length+1).join(k||"0")},t.sha3=Y,t.signedIsNegative=Vt,t.stringToUtf8Bytes=Ae,t.toAddress=pn,t.toArray=ur,t.toAscii=q,t.toBatchPayload=function(E){return E.map((function(P){return Pi(P.method,P.params)}))},t.toBigNumber=Dt,t.toBoolean=je,t.toChecksumAddress=fn,t.toData=ue,t.toDecimal=Re,t.toHex=Xe,t.toJsonRpcRequest=Pi,t.toNullDecimal=Pe,t.toString=ae,t.toStringData=Ie,t.toTwosComplement=Ft,t.toWei=function(E,P){const k=Dt(E).times(Ht(P));return Rr(E)?k:k.toString(10)},t.transformToFullName=L,Object.defineProperty(t,"__esModule",{value:!0})}))})(il,il.exports)),il.exports}var Nu={},iR;function QU(){if(iR)return Nu;iR=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.SignatureValidator=void 0;const e=af();async function i(t,n){const o=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new e.ContractFactory(t,o).at(n)}return Nu.SignatureValidator=i,Nu}var Fg={},ii={},No={},Co={},Vg={},ai={},aR;function nt(){if(aR)return ai;aR=1;var e=ai&&ai.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ai,"__esModule",{value:!0}),ai.validateType=ai.generateLazyValidator=ai.Ajv=void 0;const i=e(Qd());ai.Ajv=i.default;const t=e(z_()),n=e(W_());function o(l,c){let f=null;const p=(y,m)=>{if(!f){const h=new i.default({$data:!0,allErrors:!0});(0,t.default)(h),(0,n.default)(h,{singleError:!0}),c?.forEach(O=>h.addKeyword(O)),f=h.compile(l),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(y,m)};return p}ai.generateLazyValidator=o;function s(l,c){return l.validate(c)}return ai.validateType=s,ai}var oR;function ZU(){return oR||(oR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const i=nt();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(Vg)),Vg}var Hg={},sR;function xU(){return sR||(sR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const i=nt();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(Hg)),Hg}var uR;function $U(){return uR||(uR=1,(function(e){var i=Co&&Co.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Co&&Co.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(ZU(),e),t(xU(),e)})(Co)),Co}var Mo={},zg={},lR;function eF(){return lR||(lR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const i=nt();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(zg)),zg}var Wg={},Gg={},cR;function of(){return cR||(cR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const i=nt();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},o={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function l(p){return n[p]}t.getMaxSupply=l;function c(p){return s[p]}t.getColor=c;function f(p){return[o[p],s[p]]}t.getGradient=f})(e.Rarity||(e.Rarity={}))})(Gg)),Gg}var Kg={},dR;function Ko(){return dR||(dR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const i=nt();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(Kg)),Kg}var Yg={},Xg={},fR;function fE(){return fR||(fR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const i=nt();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(Xg)),Xg}var Jg={},Qg={},pR;function uj(){return pR||(pR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const i=nt();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(Qg)),Qg}var mR;function pE(){return mR||(mR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const i=Ko(),t=nt(),n=uj();(function(o){o.schema={oneOf:[Object.assign({},i.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(Jg)),Jg}var hR;function mE(){return hR||(hR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const i=nt(),t=fE(),n=pE();(function(o){o.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Yg)),Yg}var jo={},Lo={},Zg={},xg={},yR;function Ws(){return yR||(yR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const i=nt();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,i.generateLazyValidator)(t.schema);t.validate=o=>n(o)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv1||(e.IPFSv1={}))})(xg)),xg}var gR;function lj(){return gR||(gR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const i=Ko(),t=Ws(),n=nt();var o;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(o=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:o.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var l;(function(f){f.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const p=new RegExp(f.schema.pattern,"i");f.validate=y=>p.test(y)})(l=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:l.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(Zg)),Zg}var $g={},vR;function tF(){return vR||(vR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const i=nt(),t=lj();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})($g)),$g}var _R;function rF(){return _R||(_R=1,(function(e){var i=Lo&&Lo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Lo&&Lo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(lj(),e),t(tF(),e)})(Lo)),Lo}var ev={},tv={},ER;function cj(){return ER||(ER=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const i=nt();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(tv)),tv}var rv={},bR;function dj(){return bR||(bR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(rv)),rv}var nv={},wR;function fj(){return wR||(wR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const i=nt();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,i.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(nv)),nv}var iv={},Cu={},SR;function hE(){return SR||(SR=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.displayableProperties=void 0,Cu.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Cu}var av={},TR;function pj(){return TR||(TR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(av)),av}var ov={},AR;function mj(){return AR||(AR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(ov)),ov}var OR;function nF(){return OR||(OR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const i=nt(),t=hE(),n=cj(),o=fj(),s=pj(),l=mj(),c=dj();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:o.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:l.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,i.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(iv)),iv}var IR;function iF(){return IR||(IR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var i=cj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return i.FeatureToggles}});var t=dj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=fj();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var o=nF();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return o.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return o.RequiredPermission}});var s=pj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var l=mj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return l.SpawnPoint}})})(ev)),ev}var Do={},sv={},uv={},PR;function hj(){return PR||(PR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const i=nt();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(uv)),uv}var RR;function yj(){return RR||(RR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const i=nt(),t=hj();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(sv)),sv}var lv={},NR;function gj(){return NR||(NR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(lv)),lv}var cv={},CR;function yE(){return CR||(CR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const i=of(),t=nt();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:i.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},o=(0,t.generateLazyValidator)(n);function s(l){return o(l)}e.isStandard=s})(cv)),cv}var dv={},fv={},MR;function vj(){return MR||(MR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(fv)),fv}var jR;function gE(){return jR||(jR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.thirdPartyProps=void 0;const i=nt(),t=vj();e.thirdPartyProps={merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const n={type:"object",properties:Object.assign({},e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},o={keyword:"_containsHashingKeys",validate:(c,f)=>{var p;const y=f;return!((p=y?.merkleProof)===null||p===void 0)&&p.hashingKeys?y.merkleProof.hashingKeys.every(m=>y.hasOwnProperty(m)):!1},errors:!1},s=(0,i.generateLazyValidator)(n,[o]);function l(c){return s(c)}e.isThirdParty=l})(dv)),dv}var pv={},mv={},Wi={},LR;function _j(){if(LR)return Wi;LR=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.isBaseAvatar=Wi.requiredBaseItemProps=Wi.baseItemProperties=void 0;const e=yj(),i=gj(),t=hE();Wi.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},i.Metrics.schema),{nullable:!0})}),Wi.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(o){if(!o||!o.id)return!1;const s=o.id.split(":"),l=s[1]==="decentraland",c=s[3]==="base-avatars";return s.length===5&&l&&c}return Wi.isBaseAvatar=n,Wi}var DR;function aF(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const i=nt(),t=Ko(),n=mE(),o=_j(),s=yE(),l=gE(),c=pE();(function(f){f.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},o.baseItemProperties),s.standardProperties),l.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...o.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...o.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const p={keyword:"_isThirdParty",validate:(m,h)=>!m||(0,l.isThirdParty)(h),errors:!1},y={keyword:"_isBaseAvatar",validate:(m,h)=>!m||(0,o.isBaseAvatar)(h),errors:!1};f.validate=(0,i.generateLazyValidator)(f.schema,[p,y])})(e.Wearable||(e.Wearable={}))})(mv)),mv}var kR;function oF(){return kR||(kR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var i=mE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return i.WearableRepresentation}});var t=aF();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Ko();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var o=uj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return o.BodyPartCategory}});var s=pE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(pv)),pv}var hv={},yv={},gv={},vv={},qR;function Ej(){return qR||(qR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const i=nt();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(vv)),vv}var _v={},BR;function bj(){return BR||(BR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const i=nt(),t=fE();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(_v)),_v}var UR;function wj(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const i=Ej(),t=nt(),n=bj();(function(o){o.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:i.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(gv)),gv}var FR;function sF(){return FR||(FR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const i=Sj(),t=nt(),n=_j(),o=yE(),s=gE(),l=wj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),o.standardProperties),s.thirdPartyProps),{emoteDataADR74:l.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(p,y)=>!p||(0,i.isThirdParty)(y),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f])})(e.Emote||(e.Emote={}))})(yv)),yv}var Ev={},VR;function uF(){return VR||(VR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const i=nt();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Ev)),Ev}var HR;function lF(){return HR||(HR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var i=sF();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return i.Emote}});var t=bj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=wj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var o=Ej();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return o.EmoteCategory}});var s=uF();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(hv)),hv}var zR;function Sj(){return zR||(zR=1,(function(e){var i=Do&&Do.__createBinding||(Object.create?(function(p,y,m,h){h===void 0&&(h=m);var O=Object.getOwnPropertyDescriptor(y,m);(!O||("get"in O?!y.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return y[m]}}),Object.defineProperty(p,h,O)}):(function(p,y,m,h){h===void 0&&(h=m),p[h]=y[m]})),t=Do&&Do.__exportStar||function(p,y){for(var m in p)m!=="default"&&!Object.prototype.hasOwnProperty.call(y,m)&&i(y,p,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=yj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var o=hj();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return o.Locale}});var s=gj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var l=fE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return l.BodyShape}});var c=yE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=gE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(oF(),e),t(lF(),e)})(Do)),Do}var ko={},WR;function cF(){return WR||(WR=1,(function(e){var i=ko&&ko.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=ko&&ko.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(vj(),e)})(ko)),ko}var bv={},wv={},GR;function vE(){return GR||(GR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const i=nt();var t;(function(o){o.SIGNER="SIGNER",o.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",o.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",o.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",o.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(o){o.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},o.validate=(0,i.generateLazyValidator)(o.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(o){o.schema={type:"array",items:n.schema,minItems:1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.AuthChain||(e.AuthChain={}))})(wv)),wv}var KR;function dF(){return KR||(KR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const i=Ws(),t=vE(),n=nt();(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(bv)),bv}var Sv={},Tv={},YR;function Tj(){return YR||(YR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const i=Ws(),t=nt();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Tv)),Tv}var XR;function fF(){return XR||(XR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const i=Ws(),t=Tj(),n=nt();(function(o){o.SCENE="scene",o.PROFILE="profile",o.WEARABLE="wearable",o.STORE="store",o.EMOTE="emote",o.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(o){o.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.Entity||(e.Entity={}))})(Sv)),Sv}var Av={},JR;function pF(){return JR||(JR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const i=vE(),t=nt();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:i.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Av)),Av}var qo={},Ov={},QR;function mF(){return QR||(QR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const i=Ko(),t=Ws(),n=nt();var o;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(o=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:o.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Ov)),Ov}var ZR;function hF(){return ZR||(ZR=1,(function(e){var i=qo&&qo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=qo&&qo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(mF(),e)})(qo)),qo}var xR;function _E(){return xR||(xR=1,(function(e){var i=jo&&jo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=jo&&jo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(rF(),e),t(iF(),e),t(Sj(),e),t(hE(),e),t(cF(),e),t(dF(),e),t(fF(),e),t(pF(),e),t(hF(),e)})(jo)),jo}var $R;function yF(){return $R||($R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const i=of(),t=Ko(),n=mE(),o=nt(),s=_E();(function(l){l.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},i.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},l.validate=(0,o.generateLazyValidator)(l.schema)})(e.WearableJson||(e.WearableJson={}))})(Wg)),Wg}var eN;function gF(){return eN||(eN=1,(function(e){var i=Mo&&Mo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Mo&&Mo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(eF(),e),t(yF(),e)})(Mo)),Mo}var tN;function vF(){return tN||(tN=1,(function(e){var i=No&&No.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=No&&No.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t($U(),e),t(gF(),e)})(No)),No}var Iv={},Pv={},Rv={},rN;function Aj(){return rN||(rN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const i=nt(),t=pi();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.AVALANCHE_MAINNET="Avalanche Mainnet",s.BINANCE_MAINNET="Binance Smart Chain Mainnet",s.ARBITRUM_MAINNET="Arbitrum One",s.OPTIMISM_MAINNET="Optimism Mainnet",s.FANTOM_MAINNET="Fantom Mainnet"})(n=e.ChainName||(e.ChainName={}));function o(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;default:return null}}e.getChainId=o,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,i.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(Rv)),Rv}var Nv={},nN;function fi(){return nN||(nN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const i=nt();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(Nv)),Nv}var iN;function pi(){return iN||(iN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const i=nt(),t=Aj(),n=fi();var o;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(o=e.ChainId||(e.ChainId={}));function s(p){switch(p){case o.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case o.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case o.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case o.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case o.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case o.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case o.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case o.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;default:return null}}e.getChainName=s;function l(p){switch(p){case o.ETHEREUM_MAINNET:return"ethereum";case o.ETHEREUM_ROPSTEN:return"ropsten";case o.ETHEREUM_RINKEBY:return"rinkeby";case o.ETHEREUM_GOERLI:return"goerli";case o.ETHEREUM_KOVAN:return"kovan";case o.ETHEREUM_SEPOLIA:return"sepolia";case o.MATIC_MAINNET:return"matic";case o.MATIC_MUMBAI:return"mumbai";default:return""}}e.getURNProtocol=l;function c(p){switch(p){case o.ETHEREUM_MAINNET:return{[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET};case o.ETHEREUM_ROPSTEN:return{[n.Network.ETHEREUM]:o.ETHEREUM_ROPSTEN,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_RINKEBY:return{[n.Network.ETHEREUM]:o.ETHEREUM_RINKEBY,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_GOERLI:return{[n.Network.ETHEREUM]:o.ETHEREUM_GOERLI,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_KOVAN:return{[n.Network.ETHEREUM]:o.ETHEREUM_KOVAN,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_SEPOLIA:return{[n.Network.ETHEREUM]:o.ETHEREUM_SEPOLIA,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.MATIC_MAINNET:return{[n.Network.ETHEREUM]:o.MATIC_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET};case o.MATIC_MUMBAI:return{[n.Network.ETHEREUM]:o.MATIC_MUMBAI,[n.Network.MATIC]:o.MATIC_MUMBAI};default:return{[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET}}}e.getNetworkMapping=c;function f(p){switch(p){case o.ETHEREUM_MAINNET:case o.ETHEREUM_ROPSTEN:case o.ETHEREUM_GOERLI:case o.ETHEREUM_KOVAN:case o.ETHEREUM_RINKEBY:case o.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case o.MATIC_MAINNET:case o.MATIC_MUMBAI:return n.Network.MATIC}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,i.generateLazyValidator)(p.schema)})(o=e.ChainId||(e.ChainId={}))})(Pv)),Pv}var Cv={},aN;function EE(){return aN||(aN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const i=nt();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Cv)),Cv}var oN;function _F(){return oN||(oN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const i=nt(),t=pi(),n=EE(),o=fi();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(Iv)),Iv}var Mv={},sN;function EF(){return sN||(sN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const i=nt();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(Mv)),Mv}var jv={},uN;function bF(){return uN||(uN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const i=nt(),t=pi(),n=fi();(function(o){o.NEWEST="newest",o.NAME="name",o.RECENTLY_REVIEWED="recently_reviewed",o.RECENTLY_LISTED="recently_listed",o.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(o){o.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Collection||(e.Collection={}))})(jv)),jv}var Lv={},Dv={},lN;function sf(){return lN||(lN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const i=nt();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Dv)),Dv}var cN;function wF(){return cN||(cN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const i=nt(),t=pi(),n=fi(),o=sf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:o.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(Lv)),Lv}var kv={},qv={},dN;function Oj(){return dN||(dN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const i=nt(),t=pi(),n=_E(),o=fi(),s=sf(),l=of(),c=Ko();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:o.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,i.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(qv)),qv}var fN;function SF(){return fN||(fN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const i=nt(),t=pi(),n=fi(),o=Oj(),s=sf();(function(l){l.NAME="name",l.NEWEST="newest",l.RECENTLY_REVIEWED="recently_reviewed",l.RECENTLY_SOLD="recently_sold",l.RECENTLY_LISTED="recently_listed",l.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(l){l.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:o.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},l.validate=(0,i.generateLazyValidator)(l.schema)})(e.Item||(e.Item={}))})(kv)),kv}var Bv={},pN;function TF(){return pN||(pN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Bv)),Bv}var Uv={},mN;function AF(){return mN||(mN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const i=nt(),t=pi(),n=fi();(function(o){o.RECENTLY_MINTED="recently_minted",o.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(o){o.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Mint||(e.Mint={}))})(Uv)),Uv}var Fv={},hN;function OF(){return hN||(hN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(i){i.NEWEST="newest",i.RECENTLY_SOLD="recently_sold",i.CHEAPEST="cheapest",i.MOST_EXPENSIVE="most_expensive",i.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(i){i.ASC="asc",i.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Fv)),Fv}var Vv={},yN;function IF(){return yN||(yN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const i=nt(),t=pi(),n=EE(),o=fi();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(Vv)),Vv}var Hv={},gN;function PF(){return gN||(gN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const i=nt();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(Hv)),Hv}var zv={},vN;function Ij(){return vN||(vN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const i=nt();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(zv)),zv}var Wv={},_N;function RF(){return _N||(_N=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const i=nt(),t=pi(),n=Ij(),o=fi();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:o.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(Wv)),Wv}var Gv={},EN;function NF(){return EN||(EN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const i=nt(),t=pi(),n=fi();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var o;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(o=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:o.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Gv)),Gv}var Kv={},bN;function CF(){return bN||(bN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(i){i.DATE="date",i.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Kv)),Kv}var Yv={},wN;function MF(){return wN||(wN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(Yv)),Yv}var Xv={},SN;function jF(){return SN||(SN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const i=nt();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(Xv)),Xv}var Jv={},TN;function LF(){return TN||(TN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const i=nt();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(o,s){const l=t().validWorldRanges;for(const c of l)if(o>=c.xMin&&o<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(o){o.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.World||(e.World={}))})(Jv)),Jv}var Bo={},Qv={},AN;function DF(){return AN||(AN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const i=nt();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Qv)),Qv}var Zv={},ON;function kF(){return ON||(ON=1,Object.defineProperty(Zv,"__esModule",{value:!0})),Zv}var xv={},IN;function qF(){return IN||(IN=1,Object.defineProperty(xv,"__esModule",{value:!0})),xv}var $v={},PN;function BF(){return PN||(PN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const i=nt();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})($v)),$v}var e_={},RN;function UF(){return RN||(RN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const i=nt();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(e_)),e_}var t_={},NN;function FF(){return NN||(NN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const i=nt();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,o,s,l="*")=>{const c={type:o,payload:s};n.postMessage(c,l)};e.sendMessage=t})(t_)),t_}var r_={},CN;function VF(){return CN||(CN=1,Object.defineProperty(r_,"__esModule",{value:!0})),r_}var n_={},MN;function HF(){return MN||(MN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const i=nt();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(n_)),n_}var i_={},jN;function zF(){return jN||(jN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const i=nt();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(i_)),i_}var a_={},LN;function WF(){return LN||(LN=1,Object.defineProperty(a_,"__esModule",{value:!0})),a_}var o_={},DN;function GF(){return DN||(DN=1,Object.defineProperty(o_,"__esModule",{value:!0})),o_}var s_={},kN;function KF(){return kN||(kN=1,Object.defineProperty(s_,"__esModule",{value:!0})),s_}var u_={},qN;function YF(){return qN||(qN=1,Object.defineProperty(u_,"__esModule",{value:!0})),u_}var l_={},BN;function XF(){return BN||(BN=1,Object.defineProperty(l_,"__esModule",{value:!0})),l_}var c_={},UN;function JF(){return UN||(UN=1,Object.defineProperty(c_,"__esModule",{value:!0})),c_}var d_={},FN;function QF(){return FN||(FN=1,Object.defineProperty(d_,"__esModule",{value:!0})),d_}var f_={},VN;function ZF(){return VN||(VN=1,Object.defineProperty(f_,"__esModule",{value:!0})),f_}var HN;function xF(){return HN||(HN=1,(function(e){var i=Bo&&Bo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Bo&&Bo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(DF(),e),t(kF(),e),t(qF(),e),t(BF(),e),t(UF(),e),t(FF(),e),t(VF(),e),t(HF(),e),t(zF(),e),t(WF(),e),t(GF(),e),t(KF(),e),t(YF(),e),t(XF(),e),t(JF(),e),t(QF(),e),t(ZF(),e)})(Bo)),Bo}var p_={},zN;function $F(){return zN||(zN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(p_)),p_}var WN;function eV(){return WN||(WN=1,(function(e){var i=ii&&ii.__createBinding||(Object.create?(function(be,Le,Me,Be){Be===void 0&&(Be=Me);var Te=Object.getOwnPropertyDescriptor(Le,Me);(!Te||("get"in Te?!Le.__esModule:Te.writable||Te.configurable))&&(Te={enumerable:!0,get:function(){return Le[Me]}}),Object.defineProperty(be,Be,Te)}):(function(be,Le,Me,Be){Be===void 0&&(Be=Me),be[Be]=Le[Me]})),t=ii&&ii.__setModuleDefault||(Object.create?(function(be,Le){Object.defineProperty(be,"default",{enumerable:!0,value:Le})}):function(be,Le){be.default=Le}),n=ii&&ii.__importStar||function(be){if(be&&be.__esModule)return be;var Le={};if(be!=null)for(var Me in be)Me!=="default"&&Object.prototype.hasOwnProperty.call(be,Me)&&i(Le,be,Me);return t(Le,be),Le},o=ii&&ii.__exportStar||function(be,Le){for(var Me in be)Me!=="default"&&!Object.prototype.hasOwnProperty.call(Le,Me)&&i(Le,be,Me)};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(vF());e.sdk=s,o(nt(),e);var l=_F();Object.defineProperty(e,"Bid",{enumerable:!0,get:function(){return l.Bid}}),Object.defineProperty(e,"BidSortBy",{enumerable:!0,get:function(){return l.BidSortBy}});var c=EF();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return c.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return c.AccountSortBy}});var f=pi();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=Aj();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return p.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return p.getChainId}});var y=bF();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return y.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return y.CollectionSortBy}});var m=wF();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return m.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return m.ContractSortBy}});var h=SF();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return h.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return h.ItemSortBy}});var O=EE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return O.ListingStatus}});var C=TF();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return C.MetaTransaction}});var R=AF();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return R.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return R.MintSortBy}});var I=fi();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return I.Network}});var N=sf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return N.NFTCategory}});var _=Oj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return _.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return _.NFTSortBy}});var A=OF();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return A.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return A.CatalogSortDirection}});var w=IF();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return w.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return w.OrderSortBy}});var v=PF();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return v.ProviderType}});var S=of();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return S.Rarity}});var M=Ij();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return M.SaleType}});var F=RF();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return F.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return F.SaleSortBy}});var W=NF();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return W.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return W.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return W.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return W.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return W.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return W.PeriodCreation}});var J=CF();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return J.AnalyticsDayDataSortBy}});var pe=MF();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return pe.Store}});var Oe=jF();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return Oe.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return Oe.GenderFilterOption}});var Ae=LF();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return Ae.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return Ae.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return Ae.isInsideWorldLimits}}),o(xF(),e),o(_E(),e),o(Ws(),e),o($F(),e),o(vE(),e),o(Tj(),e)})(ii)),ii}var GN;function Pj(){return GN||(GN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const i=eV();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return i.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return i.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return i.AuthLink}})})(Fg)),Fg}var Mu={},KN;function tV(){if(KN)return Mu;KN=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.moveMinutes=void 0;function e(i){const t=new Date;return t.setMinutes(t.getMinutes()+i),t}return Mu.moveMinutes=e,Mu}var Rd={},YN;function rV(){if(YN)return Rd;YN=1,Object.defineProperty(Rd,"__esModule",{value:!0});const e=af();class i{constructor(n,o=!0){this.requestManager=n,this.checkedBlocks={},this.saveBlocks=o,o&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const n=await this.getBlockWrapper("latest"),o=await this.getBlockWrapper(1);this.blockTime=(n.timestamp-o.timestamp)/Number(n.number)-1,this.firstTimestamp=o.timestamp}async getDate(n,o=!0){const s=n/1e3,l=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),s<this.firstTimestamp)return{block:1,timestamp:s};if(s>=l||s>this.savedBlocks.latest.timestamp)return{block:(0,e.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:s};this.checkedBlocks[s]=[];const c=await this.getBlockWrapper(Math.ceil((s-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(s,c,o),timestamp:s}}async findBetter(n,o,s,l=this.blockTime){if(await this.isBetterBlock(n,o,s))return o.number;const c=n-o.timestamp;let f=Math.ceil(c/l);f===0&&(f=c<0?-1:1);const p=await this.getBlockWrapper(this.getNextBlock(n,o.number,f));return l=Math.abs((o.timestamp-p.timestamp)/(o.number-p.number)),this.findBetter(n,p,s,l)}async isBetterBlock(n,o,s){const l=o.timestamp;if(s){if(l<n)return!1;const c=await this.getBlockWrapper(o.number-1);if(l>=n&&c.timestamp<n)return!0}else{if(l>=n)return!1;const c=await this.getBlockWrapper(o.number+1);if(l<n&&c.timestamp>=n)return!0}return!1}getNextBlock(n,o,s){const l=o+s;return this.checkedBlocks[n].includes(l)?this.getNextBlock(n,o,s<0?++s:--s):(this.checkedBlocks[n].push(l),l)}async getBlockWrapper(n){if(!this.saveBlocks){const s=await this.requestManager.eth_getBlockByNumber(n,!1);return{number:(0,e.toBigNumber)(s.number).toNumber(),timestamp:(0,e.toBigNumber)(s.timestamp).toNumber()}}if(this.savedBlocks[n.toString()])return this.savedBlocks[n];if(typeof n=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=n)return this.savedBlocks.latest;const{timestamp:o}=await this.requestManager.eth_getBlockByNumber(n,!1);return this.savedBlocks[n.toString()]={number:(0,e.toBigNumber)(n==="latest"?await this.requestManager.eth_blockNumber():n).toNumber(),timestamp:(0,e.toBigNumber)(o).toNumber()},this.requests++,this.savedBlocks[n.toString()]}}return Rd.default=i,Rd}var kr={},m_={},h_={},Wr={},XN;function bE(){if(XN)return Wr;XN=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.output=Wr.exists=Wr.hash=Wr.bytes=Wr.bool=Wr.number=void 0;function e(c){if(!Number.isSafeInteger(c)||c<0)throw new Error(`Wrong positive integer: ${c}`)}Wr.number=e;function i(c){if(typeof c!="boolean")throw new Error(`Expected boolean, not ${c}`)}Wr.bool=i;function t(c,...f){if(!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length>0&&!f.includes(c.length))throw new TypeError(`Expected Uint8Array of length ${f}, not of length=${c.length}`)}Wr.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)}Wr.hash=n;function o(c,f=!0){if(c.destroyed)throw new Error("Hash instance has been destroyed");if(f&&c.finished)throw new Error("Hash#digest() has already been called")}Wr.exists=o;function s(c,f){t(c);const p=f.outputLen;if(c.length<p)throw new Error(`digestInto() expects output buffer of length at least ${p}`)}Wr.output=s;const l={number:e,bool:i,bytes:t,hash:n,exists:o,output:s};return Wr.default=l,Wr}var y_={},ju={},JN;function nV(){return JN||(JN=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.crypto=void 0,ju.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0}),ju}var QN;function dl(){return QN||(QN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const i=nV(),t=w=>new Uint8Array(w.buffer,w.byteOffset,w.byteLength);e.u8=t;const n=w=>new Uint32Array(w.buffer,w.byteOffset,Math.floor(w.byteLength/4));e.u32=n;const o=w=>new DataView(w.buffer,w.byteOffset,w.byteLength);e.createView=o;const s=(w,v)=>w<<32-v|w>>>v;if(e.rotr=s,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const l=Array.from({length:256},(w,v)=>v.toString(16).padStart(2,"0"));function c(w){if(!(w instanceof Uint8Array))throw new Error("Uint8Array expected");let v="";for(let S=0;S<w.length;S++)v+=l[w[S]];return v}e.bytesToHex=c;function f(w){if(typeof w!="string")throw new TypeError("hexToBytes: expected string, got "+typeof w);if(w.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const v=new Uint8Array(w.length/2);for(let S=0;S<v.length;S++){const M=S*2,F=w.slice(M,M+2),W=Number.parseInt(F,16);if(Number.isNaN(W)||W<0)throw new Error("Invalid byte sequence");v[S]=W}return v}e.hexToBytes=f;const p=async()=>{};e.nextTick=p;async function y(w,v,S){let M=Date.now();for(let F=0;F<w;F++){S(F);const W=Date.now()-M;W>=0&&W<v||(await(0,e.nextTick)(),M+=W)}}e.asyncLoop=y;function m(w){if(typeof w!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof w}`);return new TextEncoder().encode(w)}e.utf8ToBytes=m;function h(w){if(typeof w=="string"&&(w=m(w)),!(w instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof w})`);return w}e.toBytes=h;function O(...w){if(!w.every(M=>M instanceof Uint8Array))throw new Error("Uint8Array list expected");if(w.length===1)return w[0];const v=w.reduce((M,F)=>M+F.length,0),S=new Uint8Array(v);for(let M=0,F=0;M<w.length;M++){const W=w[M];S.set(W,F),F+=W.length}return S}e.concatBytes=O;class C{clone(){return this._cloneInto()}}e.Hash=C;const R=w=>Object.prototype.toString.call(w)==="[object Object]"&&w.constructor===Object;function I(w,v){if(v!==void 0&&(typeof v!="object"||!R(v)))throw new TypeError("Options should be object or undefined");return Object.assign(w,v)}e.checkOpts=I;function N(w){const v=M=>w().update(h(M)).digest(),S=w();return v.outputLen=S.outputLen,v.blockLen=S.blockLen,v.create=()=>w(),v}e.wrapConstructor=N;function _(w){const v=(M,F)=>w(F).update(h(M)).digest(),S=w({});return v.outputLen=S.outputLen,v.blockLen=S.blockLen,v.create=M=>w(M),v}e.wrapConstructorWithOpts=_;function A(w=32){if(i.crypto.web)return i.crypto.web.getRandomValues(new Uint8Array(w));if(i.crypto.node)return new Uint8Array(i.crypto.node.randomBytes(w).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=A})(y_)),y_}var ZN;function iV(){return ZN||(ZN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const i=bE(),t=dl();class n extends t.Hash{constructor(l,c){super(),this.finished=!1,this.destroyed=!1,i.default.hash(l);const f=(0,t.toBytes)(c);if(this.iHash=l.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const p=this.blockLen,y=new Uint8Array(p);y.set(f.length>p?l.create().update(f).digest():f);for(let m=0;m<y.length;m++)y[m]^=54;this.iHash.update(y),this.oHash=l.create();for(let m=0;m<y.length;m++)y[m]^=106;this.oHash.update(y),y.fill(0)}update(l){return i.default.exists(this),this.iHash.update(l),this}digestInto(l){i.default.exists(this),i.default.bytes(l,this.outputLen),this.finished=!0,this.iHash.digestInto(l),this.oHash.update(l),this.oHash.digestInto(l),this.destroy()}digest(){const l=new Uint8Array(this.oHash.outputLen);return this.digestInto(l),l}_cloneInto(l){l||(l=Object.create(Object.getPrototypeOf(this),{}));const{oHash:c,iHash:f,finished:p,destroyed:y,blockLen:m,outputLen:h}=this;return l=l,l.finished=p,l.destroyed=y,l.blockLen=m,l.outputLen=h,l.oHash=c._cloneInto(l.oHash),l.iHash=f._cloneInto(l.iHash),l}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const o=(s,l,c)=>new n(s,l).update(c).digest();e.hmac=o,e.hmac.create=(s,l)=>new n(s,l)})(h_)),h_}var Uo={},Lu={},xN;function aV(){if(xN)return Lu;xN=1,Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.SHA2=void 0;const e=bE(),i=dl();function t(o,s,l,c){if(typeof o.setBigUint64=="function")return o.setBigUint64(s,l,c);const f=BigInt(32),p=BigInt(4294967295),y=Number(l>>f&p),m=Number(l&p),h=c?4:0,O=c?0:4;o.setUint32(s+h,y,c),o.setUint32(s+O,m,c)}class n extends i.Hash{constructor(s,l,c,f){super(),this.blockLen=s,this.outputLen=l,this.padOffset=c,this.isLE=f,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(s),this.view=(0,i.createView)(this.buffer)}update(s){e.default.exists(this);const{view:l,buffer:c,blockLen:f}=this;s=(0,i.toBytes)(s);const p=s.length;for(let y=0;y<p;){const m=Math.min(f-this.pos,p-y);if(m===f){const h=(0,i.createView)(s);for(;f<=p-y;y+=f)this.process(h,y);continue}c.set(s.subarray(y,y+m),this.pos),this.pos+=m,y+=m,this.pos===f&&(this.process(l,0),this.pos=0)}return this.length+=s.length,this.roundClean(),this}digestInto(s){e.default.exists(this),e.default.output(s,this),this.finished=!0;const{buffer:l,view:c,blockLen:f,isLE:p}=this;let{pos:y}=this;l[y++]=128,this.buffer.subarray(y).fill(0),this.padOffset>f-y&&(this.process(c,0),y=0);for(let R=y;R<f;R++)l[R]=0;t(c,f-8,BigInt(this.length*8),p),this.process(c,0);const m=(0,i.createView)(s),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const O=h/4,C=this.get();if(O>C.length)throw new Error("_sha2: outputLen bigger than state");for(let R=0;R<O;R++)m.setUint32(4*R,C[R],p)}digest(){const{buffer:s,outputLen:l}=this;this.digestInto(s);const c=s.slice(0,l);return this.destroy(),c}_cloneInto(s){s||(s=new this.constructor),s.set(...this.get());const{blockLen:l,buffer:c,length:f,finished:p,destroyed:y,pos:m}=this;return s.length=f,s.pos=m,s.finished=p,s.destroyed=y,f%l&&s.buffer.set(c),s}}return Lu.SHA2=n,Lu}var $N;function Rj(){if($N)return Uo;$N=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.sha224=Uo.sha256=void 0;const e=aV(),i=dl(),t=(p,y,m)=>p&y^~p&m,n=(p,y,m)=>p&y^p&m^y&m,o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),l=new Uint32Array(64);class c extends e.SHA2{constructor(){super(64,32,8,!1),this.A=s[0]|0,this.B=s[1]|0,this.C=s[2]|0,this.D=s[3]|0,this.E=s[4]|0,this.F=s[5]|0,this.G=s[6]|0,this.H=s[7]|0}get(){const{A:y,B:m,C:h,D:O,E:C,F:R,G:I,H:N}=this;return[y,m,h,O,C,R,I,N]}set(y,m,h,O,C,R,I,N){this.A=y|0,this.B=m|0,this.C=h|0,this.D=O|0,this.E=C|0,this.F=R|0,this.G=I|0,this.H=N|0}process(y,m){for(let w=0;w<16;w++,m+=4)l[w]=y.getUint32(m,!1);for(let w=16;w<64;w++){const v=l[w-15],S=l[w-2],M=(0,i.rotr)(v,7)^(0,i.rotr)(v,18)^v>>>3,F=(0,i.rotr)(S,17)^(0,i.rotr)(S,19)^S>>>10;l[w]=F+l[w-7]+M+l[w-16]|0}let{A:h,B:O,C,D:R,E:I,F:N,G:_,H:A}=this;for(let w=0;w<64;w++){const v=(0,i.rotr)(I,6)^(0,i.rotr)(I,11)^(0,i.rotr)(I,25),S=A+v+t(I,N,_)+o[w]+l[w]|0,F=((0,i.rotr)(h,2)^(0,i.rotr)(h,13)^(0,i.rotr)(h,22))+n(h,O,C)|0;A=_,_=N,N=I,I=R+S|0,R=C,C=O,O=h,h=S+F|0}h=h+this.A|0,O=O+this.B|0,C=C+this.C|0,R=R+this.D|0,I=I+this.E|0,N=N+this.F|0,_=_+this.G|0,A=A+this.H|0,this.set(h,O,C,R,I,N,_,A)}roundClean(){l.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class f extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}return Uo.sha256=(0,i.wrapConstructor)(()=>new c),Uo.sha224=(0,i.wrapConstructor)(()=>new f),Uo}var g_={};const oV={},sV=Object.freeze(Object.defineProperty({__proto__:null,default:oV},Symbol.toStringTag,{value:"Module"})),uV=zL(sV);var eC;function tC(){return eC||(eC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const i=uV,t=BigInt(0),n=BigInt(1),o=BigInt(2),s=BigInt(3),l=BigInt(8),c=Object.freeze({a:t,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=c;const f=(ne,U)=>(ne+U/o)/U,p={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(ne){const{n:U}=c,$=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),me=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Se=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Ce=$,Ke=BigInt("0x100000000000000000000000000000000"),Ye=f(Ce*ne,U),mt=f(-me*ne,U);let ut=q(ne-Ye*$-mt*Se,U),_t=q(-Ye*me-mt*Ce,U);const Tt=ut>Ke,It=_t>Ke;if(Tt&&(ut=U-ut),It&&(_t=U-_t),ut>Ke||_t>Ke)throw new Error("splitScalarEndo: Endomorphism failed, k="+ne);return{k1neg:Tt,k1:ut,k2neg:It,k2:_t}}},y=32,m=32,h=32,O=y+1,C=2*y+1;function R(ne){const{a:U,b:$}=c,me=q(ne*ne),Se=q(me*ne);return q(Se+U*ne+$)}const I=c.a===t;class N extends Error{constructor(U){super(U)}}function _(ne){if(!(ne instanceof A))throw new TypeError("JacobianPoint expected")}class A{constructor(U,$,me){this.x=U,this.y=$,this.z=me}static fromAffine(U){if(!(U instanceof S))throw new TypeError("JacobianPoint#fromAffine: expected Point");return U.equals(S.ZERO)?A.ZERO:new A(U.x,U.y,n)}static toAffineBatch(U){const $=ye(U.map(me=>me.z));return U.map((me,Se)=>me.toAffine($[Se]))}static normalizeZ(U){return A.toAffineBatch(U).map(A.fromAffine)}equals(U){_(U);const{x:$,y:me,z:Se}=this,{x:Ce,y:Ke,z:Ye}=U,mt=q(Se*Se),ut=q(Ye*Ye),_t=q($*ut),Tt=q(Ce*mt),It=q(q(me*Ye)*ut),er=q(q(Ke*Se)*mt);return _t===Tt&&It===er}negate(){return new A(this.x,q(-this.y),this.z)}double(){const{x:U,y:$,z:me}=this,Se=q(U*U),Ce=q($*$),Ke=q(Ce*Ce),Ye=U+Ce,mt=q(o*(q(Ye*Ye)-Se-Ke)),ut=q(s*Se),_t=q(ut*ut),Tt=q(_t-o*mt),It=q(ut*(mt-Tt)-l*Ke),er=q(o*$*me);return new A(Tt,It,er)}add(U){_(U);const{x:$,y:me,z:Se}=this,{x:Ce,y:Ke,z:Ye}=U;if(Ce===t||Ke===t)return this;if($===t||me===t)return U;const mt=q(Se*Se),ut=q(Ye*Ye),_t=q($*ut),Tt=q(Ce*mt),It=q(q(me*Ye)*ut),er=q(q(Ke*Se)*mt),Qt=q(Tt-_t),vr=q(er-It);if(Qt===t)return vr===t?this.double():A.ZERO;const qr=q(Qt*Qt),Sn=q(Qt*qr),Bn=q(_t*qr),xi=q(vr*vr-Sn-o*Bn),Cr=q(vr*(Bn-xi)-It*Sn),hi=q(Se*Ye*Qt);return new A(xi,Cr,hi)}subtract(U){return this.add(U.negate())}multiplyUnsafe(U){const $=A.ZERO;if(typeof U=="bigint"&&U===t)return $;let me=B(U);if(me===n)return this;if(!I){let Tt=$,It=this;for(;me>t;)me&n&&(Tt=Tt.add(It)),It=It.double(),me>>=n;return Tt}let{k1neg:Se,k1:Ce,k2neg:Ke,k2:Ye}=p.splitScalar(me),mt=$,ut=$,_t=this;for(;Ce>t||Ye>t;)Ce&n&&(mt=mt.add(_t)),Ye&n&&(ut=ut.add(_t)),_t=_t.double(),Ce>>=n,Ye>>=n;return Se&&(mt=mt.negate()),Ke&&(ut=ut.negate()),ut=new A(q(ut.x*p.beta),ut.y,ut.z),mt.add(ut)}precomputeWindow(U){const $=I?128/U+1:256/U+1,me=[];let Se=this,Ce=Se;for(let Ke=0;Ke<$;Ke++){Ce=Se,me.push(Ce);for(let Ye=1;Ye<2**(U-1);Ye++)Ce=Ce.add(Se),me.push(Ce);Se=Ce.double()}return me}wNAF(U,$){!$&&this.equals(A.BASE)&&($=S.BASE);const me=$&&$._WINDOW_SIZE||1;if(256%me)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let Se=$&&v.get($);Se||(Se=this.precomputeWindow(me),$&&me!==1&&(Se=A.normalizeZ(Se),v.set($,Se)));let Ce=A.ZERO,Ke=A.BASE;const Ye=1+(I?128/me:256/me),mt=2**(me-1),ut=BigInt(2**me-1),_t=2**me,Tt=BigInt(me);for(let It=0;It<Ye;It++){const er=It*mt;let Qt=Number(U&ut);U>>=Tt,Qt>mt&&(Qt-=_t,U+=n);const vr=er,qr=er+Math.abs(Qt)-1,Sn=It%2!==0,Bn=Qt<0;Qt===0?Ke=Ke.add(w(Sn,Se[vr])):Ce=Ce.add(w(Bn,Se[qr]))}return{p:Ce,f:Ke}}multiply(U,$){let me=B(U),Se,Ce;if(I){const{k1neg:Ke,k1:Ye,k2neg:mt,k2:ut}=p.splitScalar(me);let{p:_t,f:Tt}=this.wNAF(Ye,$),{p:It,f:er}=this.wNAF(ut,$);_t=w(Ke,_t),It=w(mt,It),It=new A(q(It.x*p.beta),It.y,It.z),Se=_t.add(It),Ce=Tt.add(er)}else{const{p:Ke,f:Ye}=this.wNAF(me,$);Se=Ke,Ce=Ye}return A.normalizeZ([Se,Ce])[0]}toAffine(U){const{x:$,y:me,z:Se}=this,Ce=this.equals(A.ZERO);U==null&&(U=Ce?l:le(Se));const Ke=U,Ye=q(Ke*Ke),mt=q(Ye*Ke),ut=q($*Ye),_t=q(me*mt),Tt=q(Se*Ke);if(Ce)return S.ZERO;if(Tt!==n)throw new Error("invZ was invalid");return new S(ut,_t)}}A.BASE=new A(c.Gx,c.Gy,n),A.ZERO=new A(t,n,t);function w(ne,U){const $=U.negate();return ne?$:U}const v=new WeakMap;class S{constructor(U,$){this.x=U,this.y=$}_setWindowSize(U){this._WINDOW_SIZE=U,v.delete(this)}hasEvenY(){return this.y%o===t}static fromCompressedHex(U){const $=U.length===32,me=Y($?U:U.subarray(1));if(!je(me))throw new Error("Point is not on curve");const Se=R(me);let Ce=H(Se);const Ke=(Ce&n)===n;$?Ke&&(Ce=q(-Ce)):(U[0]&1)===1!==Ke&&(Ce=q(-Ce));const Ye=new S(me,Ce);return Ye.assertValidity(),Ye}static fromUncompressedHex(U){const $=Y(U.subarray(1,y+1)),me=Y(U.subarray(y+1,y*2+1)),Se=new S($,me);return Se.assertValidity(),Se}static fromHex(U){const $=j(U),me=$.length,Se=$[0];if(me===y)return this.fromCompressedHex($);if(me===O&&(Se===2||Se===3))return this.fromCompressedHex($);if(me===C&&Se===4)return this.fromUncompressedHex($);throw new Error(`Point.fromHex: received invalid point. Expected 32-${O} compressed bytes or ${C} uncompressed bytes, not ${me}`)}static fromPrivateKey(U){return S.BASE.multiply(Xe(U))}static fromSignature(U,$,me){const{r:Se,s:Ce}=Dt($);if(![0,1,2,3].includes(me))throw new Error("Cannot recover: invalid recovery bit");const Ke=Pe(j(U)),{n:Ye}=c,mt=me===2||me===3?Se+Ye:Se,ut=le(mt,Ye),_t=q(-Ke*ut,Ye),Tt=q(Ce*ut,Ye),It=me&1?"03":"02",er=S.fromHex(It+Le(mt)),Qt=S.BASE.multiplyAndAddUnsafe(er,_t,Tt);if(!Qt)throw new Error("Cannot recover signature: point at infinify");return Qt.assertValidity(),Qt}toRawBytes(U=!1){return ce(this.toHex(U))}toHex(U=!1){const $=Le(this.x);return U?`${this.hasEvenY()?"02":"03"}${$}`:`04${$}${Le(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const U="Point is not on elliptic curve",{x:$,y:me}=this;if(!je($)||!je(me))throw new Error(U);const Se=q(me*me),Ce=R($);if(q(Se-Ce)!==t)throw new Error(U)}equals(U){return this.x===U.x&&this.y===U.y}negate(){return new S(this.x,q(-this.y))}double(){return A.fromAffine(this).double().toAffine()}add(U){return A.fromAffine(this).add(A.fromAffine(U)).toAffine()}subtract(U){return this.add(U.negate())}multiply(U){return A.fromAffine(this).multiply(U,this).toAffine()}multiplyAndAddUnsafe(U,$,me){const Se=A.fromAffine(this),Ce=$===t||$===n||this!==S.BASE?Se.multiplyUnsafe($):Se.multiply($),Ke=A.fromAffine(U).multiplyUnsafe(me),Ye=Ce.add(Ke);return Ye.equals(A.ZERO)?void 0:Ye.toAffine()}}e.Point=S,S.BASE=new S(c.Gx,c.Gy),S.ZERO=new S(t,t);function M(ne){return Number.parseInt(ne[0],16)>=8?"00"+ne:ne}function F(ne){if(ne.length<2||ne[0]!==2)throw new Error(`Invalid signature integer tag: ${Ae(ne)}`);const U=ne[1],$=ne.subarray(2,U+2);if(!U||$.length!==U)throw new Error("Invalid signature integer: wrong length");if($[0]===0&&$[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:Y($),left:ne.subarray(U+2)}}function W(ne){if(ne.length<2||ne[0]!=48)throw new Error(`Invalid signature tag: ${Ae(ne)}`);if(ne[1]!==ne.length-2)throw new Error("Invalid signature: incorrect length");const{data:U,left:$}=F(ne.subarray(2)),{data:me,left:Se}=F($);if(Se.length)throw new Error(`Invalid signature: left bytes after parsing: ${Ae(Se)}`);return{r:U,s:me}}class J{constructor(U,$){this.r=U,this.s=$,this.assertValidity()}static fromCompact(U){const $=U instanceof Uint8Array,me="Signature.fromCompact";if(typeof U!="string"&&!$)throw new TypeError(`${me}: Expected string or Uint8Array`);const Se=$?Ae(U):U;if(Se.length!==128)throw new Error(`${me}: Expected 64-byte hex`);return new J(Te(Se.slice(0,64)),Te(Se.slice(64,128)))}static fromDER(U){const $=U instanceof Uint8Array;if(typeof U!="string"&&!$)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:me,s:Se}=W($?U:ce(U));return new J(me,Se)}static fromHex(U){return this.fromDER(U)}assertValidity(){const{r:U,s:$}=this;if(!Ie(U))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Ie($))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const U=c.n>>n;return this.s>U}normalizeS(){return this.hasHighS()?new J(this.r,q(-this.s,c.n)):this}toDERRawBytes(){return ce(this.toDERHex())}toDERHex(){const U=M(Be(this.s)),$=M(Be(this.r)),me=U.length/2,Se=$.length/2,Ce=Be(me),Ke=Be(Se);return`30${Be(Se+me+4)}02${Ke}${$}02${Ce}${U}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return ce(this.toCompactHex())}toCompactHex(){return Le(this.r)+Le(this.s)}}e.Signature=J;function pe(...ne){if(!ne.every(me=>me instanceof Uint8Array))throw new Error("Uint8Array list expected");if(ne.length===1)return ne[0];const U=ne.reduce((me,Se)=>me+Se.length,0),$=new Uint8Array(U);for(let me=0,Se=0;me<ne.length;me++){const Ce=ne[me];$.set(Ce,Se),Se+=Ce.length}return $}const Oe=Array.from({length:256},(ne,U)=>U.toString(16).padStart(2,"0"));function Ae(ne){if(!(ne instanceof Uint8Array))throw new Error("Expected Uint8Array");let U="";for(let $=0;$<ne.length;$++)U+=Oe[ne[$]];return U}const be=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function Le(ne){if(typeof ne!="bigint")throw new Error("Expected bigint");if(!(t<=ne&&ne<be))throw new Error("Expected number 0 <= n < 2^256");return ne.toString(16).padStart(64,"0")}function Me(ne){const U=ce(Le(ne));if(U.length!==32)throw new Error("Error: expected 32 bytes");return U}function Be(ne){const U=ne.toString(16);return U.length&1?`0${U}`:U}function Te(ne){if(typeof ne!="string")throw new TypeError("hexToNumber: expected string, got "+typeof ne);return BigInt(`0x${ne}`)}function ce(ne){if(typeof ne!="string")throw new TypeError("hexToBytes: expected string, got "+typeof ne);if(ne.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+ne.length);const U=new Uint8Array(ne.length/2);for(let $=0;$<U.length;$++){const me=$*2,Se=ne.slice(me,me+2),Ce=Number.parseInt(Se,16);if(Number.isNaN(Ce)||Ce<0)throw new Error("Invalid byte sequence");U[$]=Ce}return U}function Y(ne){return Te(Ae(ne))}function j(ne){return ne instanceof Uint8Array?Uint8Array.from(ne):ce(ne)}function B(ne){if(typeof ne=="number"&&Number.isSafeInteger(ne)&&ne>0)return BigInt(ne);if(typeof ne=="bigint"&&Ie(ne))return ne;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function q(ne,U=c.P){const $=ne%U;return $>=t?$:U+$}function L(ne,U){const{P:$}=c;let me=ne;for(;U-- >t;)me*=me,me%=$;return me}function H(ne){const{P:U}=c,$=BigInt(6),me=BigInt(11),Se=BigInt(22),Ce=BigInt(23),Ke=BigInt(44),Ye=BigInt(88),mt=ne*ne*ne%U,ut=mt*mt*ne%U,_t=L(ut,s)*ut%U,Tt=L(_t,s)*ut%U,It=L(Tt,o)*mt%U,er=L(It,me)*It%U,Qt=L(er,Se)*er%U,vr=L(Qt,Ke)*Qt%U,qr=L(vr,Ye)*vr%U,Sn=L(qr,Ke)*Qt%U,Bn=L(Sn,s)*ut%U,xi=L(Bn,Ce)*er%U,Cr=L(xi,$)*mt%U,hi=L(Cr,o);if(hi*hi%U!==ne)throw new Error("Cannot find square root");return hi}function le(ne,U=c.P){if(ne===t||U<=t)throw new Error(`invert: expected positive integers, got n=${ne} mod=${U}`);let $=q(ne,U),me=U,Se=t,Ce=n;for(;$!==t;){const Ye=me/$,mt=me%$,ut=Se-Ce*Ye;me=$,$=mt,Se=Ce,Ce=ut}if(me!==n)throw new Error("invert: does not exist");return q(Se,U)}function ye(ne,U=c.P){const $=new Array(ne.length),me=ne.reduce((Ce,Ke,Ye)=>Ke===t?Ce:($[Ye]=Ce,q(Ce*Ke,U)),n),Se=le(me,U);return ne.reduceRight((Ce,Ke,Ye)=>Ke===t?Ce:($[Ye]=q(Ce*$[Ye],U),q(Ce*Ke,U)),Se),$}function fe(ne){const U=ne.length*8-m*8,$=Y(ne);return U>0?$>>BigInt(U):$}function Pe(ne,U=!1){const $=fe(ne);if(U)return $;const{n:me}=c;return $>=me?$-me:$}let Re,ae;class ue{constructor(U,$){if(this.hashLen=U,this.qByteLen=$,typeof U!="number"||U<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(U).fill(1),this.k=new Uint8Array(U).fill(0),this.counter=0}hmac(...U){return e.utils.hmacSha256(this.k,...U)}hmacSync(...U){return ae(this.k,...U)}checkSync(){if(typeof ae!="function")throw new N("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(U=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),U),this.v=await this.hmac(this.v),U.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),U),this.v=await this.hmac(this.v))}reseedSync(U=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),U),this.v=this.hmacSync(this.v),U.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),U),this.v=this.hmacSync(this.v))}async generate(){this.incr();let U=0;const $=[];for(;U<this.qByteLen;){this.v=await this.hmac(this.v);const me=this.v.slice();$.push(me),U+=this.v.length}return pe(...$)}generateSync(){this.checkSync(),this.incr();let U=0;const $=[];for(;U<this.qByteLen;){this.v=this.hmacSync(this.v);const me=this.v.slice();$.push(me),U+=this.v.length}return pe(...$)}}function Ie(ne){return t<ne&&ne<c.n}function je(ne){return t<ne&&ne<c.P}function qe(ne,U,$,me=!0){const{n:Se}=c,Ce=Pe(ne,!0);if(!Ie(Ce))return;const Ke=le(Ce,Se),Ye=S.BASE.multiply(Ce),mt=q(Ye.x,Se);if(mt===t)return;const ut=q(Ke*q(U+$*mt,Se),Se);if(ut===t)return;let _t=new J(mt,ut),Tt=(Ye.x===_t.r?0:2)|Number(Ye.y&n);return me&&_t.hasHighS()&&(_t=_t.normalizeS(),Tt^=1),{sig:_t,recovery:Tt}}function Xe(ne){let U;if(typeof ne=="bigint")U=ne;else if(typeof ne=="number"&&Number.isSafeInteger(ne)&&ne>0)U=BigInt(ne);else if(typeof ne=="string"){if(ne.length!==2*m)throw new Error("Expected 32 bytes of private key");U=Te(ne)}else if(ne instanceof Uint8Array){if(ne.length!==m)throw new Error("Expected 32 bytes of private key");U=Y(ne)}else throw new TypeError("Expected valid private key");if(!Ie(U))throw new Error("Expected private key: 0 < key < n");return U}function Ht(ne){return ne instanceof S?(ne.assertValidity(),ne):S.fromHex(ne)}function Dt(ne){if(ne instanceof J)return ne.assertValidity(),ne;try{return J.fromDER(ne)}catch{return J.fromCompact(ne)}}function nr(ne,U=!1){return S.fromPrivateKey(ne).toRawBytes(U)}e.getPublicKey=nr;function Ft(ne,U,$,me=!1){return S.fromSignature(ne,U,$).toRawBytes(me)}e.recoverPublicKey=Ft;function Vt(ne){const U=ne instanceof Uint8Array,$=typeof ne=="string",me=(U||$)&&ne.length;return U?me===O||me===C:$?me===O*2||me===C*2:ne instanceof S}function Gr(ne,U,$=!1){if(Vt(ne))throw new TypeError("getSharedSecret: first arg must be private key");if(!Vt(U))throw new TypeError("getSharedSecret: second arg must be public key");const me=Ht(U);return me.assertValidity(),me.multiply(Xe(ne)).toRawBytes($)}e.getSharedSecret=Gr;function sr(ne){const U=ne.length>y?ne.slice(0,y):ne;return Y(U)}function _n(ne){const U=sr(ne),$=q(U,c.n);return xr($<t?U:$)}function xr(ne){return Me(ne)}function $r(ne,U,$){if(ne==null)throw new Error(`sign: expected valid message hash, not "${ne}"`);const me=j(ne),Se=Xe(U),Ce=[xr(Se),_n(me)];if($!=null){$===!0&&($=e.utils.randomBytes(y));const mt=j($);if(mt.length!==y)throw new Error(`sign: Expected ${y} bytes of extra data`);Ce.push(mt)}const Ke=pe(...Ce),Ye=sr(me);return{seed:Ke,m:Ye,d:Se}}function fn(ne,U){const{sig:$,recovery:me}=ne,{der:Se,recovered:Ce}=Object.assign({canonical:!0,der:!0},U),Ke=Se?$.toDERRawBytes():$.toCompactRawBytes();return Ce?[Ke,me]:Ke}async function ur(ne,U,$={}){const{seed:me,m:Se,d:Ce}=$r(ne,U,$.extraEntropy),Ke=new ue(h,m);await Ke.reseed(me);let Ye;for(;!(Ye=qe(await Ke.generate(),Se,Ce,$.canonical));)await Ke.reseed();return fn(Ye,$)}e.sign=ur;function pn(ne,U,$={}){const{seed:me,m:Se,d:Ce}=$r(ne,U,$.extraEntropy),Ke=new ue(h,m);Ke.reseedSync(me);let Ye;for(;!(Ye=qe(Ke.generateSync(),Se,Ce,$.canonical));)Ke.reseedSync();return fn(Ye,$)}e.signSync=pn;const Rr={strict:!0};function En(ne,U,$,me=Rr){let Se;try{Se=Dt(ne),U=j(U)}catch{return!1}const{r:Ce,s:Ke}=Se;if(me.strict&&Se.hasHighS())return!1;const Ye=Pe(U);let mt;try{mt=Ht($)}catch{return!1}const{n:ut}=c,_t=le(Ke,ut),Tt=q(Ye*_t,ut),It=q(Ce*_t,ut),er=S.BASE.multiplyAndAddUnsafe(mt,Tt,It);return er?q(er.x,ut)===Ce:!1}e.verify=En;function en(ne){return q(Y(ne),c.n)}class bn{constructor(U,$){this.r=U,this.s=$,this.assertValidity()}static fromHex(U){const $=j(U);if($.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${$.length}`);const me=Y($.subarray(0,32)),Se=Y($.subarray(32,64));return new bn(me,Se)}assertValidity(){const{r:U,s:$}=this;if(!je(U)||!Ie($))throw new Error("Invalid signature")}toHex(){return Le(this.r)+Le(this.s)}toRawBytes(){return ce(this.toHex())}}function tn(ne){return S.fromPrivateKey(ne).toRawX()}class Zi{constructor(U,$,me=e.utils.randomBytes()){if(U==null)throw new TypeError(`sign: Expected valid message, not "${U}"`);this.m=j(U);const{x:Se,scalar:Ce}=this.getScalar(Xe($));if(this.px=Se,this.d=Ce,this.rand=j(me),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(U){const $=S.fromPrivateKey(U),me=$.hasEvenY()?U:c.n-U;return{point:$,scalar:me,x:$.toRawX()}}initNonce(U,$){return Me(U^Y($))}finalizeNonce(U){const $=q(Y(U),c.n);if($===t)throw new Error("sign: Creation of signature failed. k is zero");const{point:me,x:Se,scalar:Ce}=this.getScalar($);return{R:me,rx:Se,k:Ce}}finalizeSig(U,$,me,Se){return new bn(U.x,q($+me*Se,c.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:U,d:$,px:me,rand:Se}=this,Ce=e.utils.taggedHash,Ke=this.initNonce($,await Ce(Kr.aux,Se)),{R:Ye,rx:mt,k:ut}=this.finalizeNonce(await Ce(Kr.nonce,Ke,me,U)),_t=en(await Ce(Kr.challenge,mt,me,U)),Tt=this.finalizeSig(Ye,ut,_t,$);return await Ni(Tt,U,me)||this.error(),Tt}calcSync(){const{m:U,d:$,px:me,rand:Se}=this,Ce=e.utils.taggedHashSync,Ke=this.initNonce($,Ce(Kr.aux,Se)),{R:Ye,rx:mt,k:ut}=this.finalizeNonce(Ce(Kr.nonce,Ke,me,U)),_t=en(Ce(Kr.challenge,mt,me,U)),Tt=this.finalizeSig(Ye,ut,_t,$);return Nr(Tt,U,me)||this.error(),Tt}}async function wn(ne,U,$){return new Zi(ne,U,$).calc()}function Pi(ne,U,$){return new Zi(ne,U,$).calcSync()}function Ri(ne,U,$){const me=ne instanceof bn,Se=me?ne:bn.fromHex(ne);return me&&Se.assertValidity(),{...Se,m:j(U),P:Ht($)}}function mi(ne,U,$,me){const Se=S.BASE.multiplyAndAddUnsafe(U,Xe($),q(-me,c.n));return!(!Se||!Se.hasEvenY()||Se.x!==ne)}async function Ni(ne,U,$){try{const{r:me,s:Se,m:Ce,P:Ke}=Ri(ne,U,$),Ye=en(await e.utils.taggedHash(Kr.challenge,Me(me),Ke.toRawX(),Ce));return mi(me,Ke,Se,Ye)}catch{return!1}}function Nr(ne,U,$){try{const{r:me,s:Se,m:Ce,P:Ke}=Ri(ne,U,$),Ye=en(e.utils.taggedHashSync(Kr.challenge,Me(me),Ke.toRawX(),Ce));return mi(me,Ke,Se,Ye)}catch(me){if(me instanceof N)throw me;return!1}}e.schnorr={Signature:bn,getPublicKey:tn,sign:wn,verify:Ni,signSync:Pi,verifySync:Nr},S.BASE._setWindowSize(8);const Ot={node:i,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Kr={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},rn={};e.utils={bytesToHex:Ae,hexToBytes:ce,concatBytes:pe,mod:q,invert:le,isValidPrivateKey(ne){try{return Xe(ne),!0}catch{return!1}},_bigintTo32Bytes:Me,_normalizePrivateKey:Xe,hashToPrivateKey:ne=>{ne=j(ne);const U=m+8;if(ne.length<U||ne.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const $=q(Y(ne),c.n-n)+n;return Me($)},randomBytes:(ne=32)=>{if(Ot.web)return Ot.web.getRandomValues(new Uint8Array(ne));if(Ot.node){const{randomBytes:U}=Ot.node;return Uint8Array.from(U(ne))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(m+8)),precompute(ne=8,U=S.BASE){const $=U===S.BASE?U:new S(U.x,U.y);return $._setWindowSize(ne),$.multiply(s),$},sha256:async(...ne)=>{if(Ot.web){const U=await Ot.web.subtle.digest("SHA-256",pe(...ne));return new Uint8Array(U)}else if(Ot.node){const{createHash:U}=Ot.node,$=U("sha256");return ne.forEach(me=>$.update(me)),Uint8Array.from($.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(ne,...U)=>{if(Ot.web){const $=await Ot.web.subtle.importKey("raw",ne,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),me=pe(...U),Se=await Ot.web.subtle.sign("HMAC",$,me);return new Uint8Array(Se)}else if(Ot.node){const{createHmac:$}=Ot.node,me=$("sha256",ne);return U.forEach(Se=>me.update(Se)),Uint8Array.from(me.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(ne,...U)=>{let $=rn[ne];if($===void 0){const me=await e.utils.sha256(Uint8Array.from(ne,Se=>Se.charCodeAt(0)));$=pe(me,me),rn[ne]=$}return e.utils.sha256($,...U)},taggedHashSync:(ne,...U)=>{if(typeof Re!="function")throw new N("sha256Sync is undefined, you need to set it");let $=rn[ne];if($===void 0){const me=Re(Uint8Array.from(ne,Se=>Se.charCodeAt(0)));$=pe(me,me),rn[ne]=$}return Re($,...U)},_JacobianPoint:A},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return Re},set(ne){Re||(Re=ne)}},hmacSha256Sync:{configurable:!1,get(){return ae},set(ne){ae||(ae=ne)}}})})(g_)),g_}var rC;function wE(){return rC||(rC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schnorr=e.Signature=e.Point=e.CURVE=e.utils=e.getSharedSecret=e.recoverPublicKey=e.verify=e.signSync=e.sign=e.getPublicKey=void 0;const i=iV(),t=Rj(),n=tC();var o=tC();Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return o.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return o.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return o.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return o.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return o.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return o.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return o.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return o.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return o.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return o.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return o.schnorr}}),n.utils.hmacSha256Sync=(s,...l)=>{const c=i.hmac.create(t.sha256,s);return l.forEach(f=>c.update(f)),c.digest()}})(m_)),m_}var vt={};function nC(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 al={exports:{}},iC=al.exports,aC;function Nj(){return aC||(aC=1,(function(e,i){var t=iC&&iC.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(i,"__esModule",{value:!0}),i.crypto=i.wrapHash=i.equalsBytes=i.hexToBytes=i.bytesToUtf8=i.utf8ToBytes=i.createView=i.concatBytes=i.toHex=i.bytesToHex=i.assertBytes=i.assertBool=void 0;const n=t(bE()),o=dl(),s=n.default.bool;i.assertBool=s;const l=n.default.bytes;i.assertBytes=l;var c=dl();Object.defineProperty(i,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(i,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(i,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(i,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(i,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}});function f(h){if(!(h instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof h}`);return new TextDecoder().decode(h)}i.bytesToUtf8=f;function p(h){const O=h.startsWith("0x")?h.substring(2):h;return(0,o.hexToBytes)(O)}i.hexToBytes=p;function y(h,O){if(h.length!==O.length)return!1;for(let C=0;C<h.length;C++)if(h[C]!==O[C])return!1;return!0}i.equalsBytes=y;function m(h){return O=>(n.default.bytes(O),h(O))}i.wrapHash=m,i.crypto=(()=>{const h=typeof self=="object"&&"crypto"in self?self.crypto:void 0,O=typeof nC=="function"&&nC.bind(e);return{node:O&&!h?O("crypto"):void 0,web:h}})()})(al,al.exports)),al.exports}var oC;function lV(){if(oC)return vt;oC=1;var e=vt&&vt.__createBinding||(Object.create?(function(ce,Y,j,B){B===void 0&&(B=j);var q=Object.getOwnPropertyDescriptor(Y,j);(!q||("get"in q?!Y.__esModule:q.writable||q.configurable))&&(q={enumerable:!0,get:function(){return Y[j]}}),Object.defineProperty(ce,B,q)}):(function(ce,Y,j,B){B===void 0&&(B=j),ce[B]=Y[j]})),i=vt&&vt.__setModuleDefault||(Object.create?(function(ce,Y){Object.defineProperty(ce,"default",{enumerable:!0,value:Y})}):function(ce,Y){ce.default=Y}),t=vt&&vt.__importStar||function(ce){if(ce&&ce.__esModule)return ce;var Y={};if(ce!=null)for(var j in ce)j!=="default"&&Object.prototype.hasOwnProperty.call(ce,j)&&e(Y,ce,j);return i(Y,ce),Y};Object.defineProperty(vt,"__esModule",{value:!0}),vt.contextRandomize=vt.ecdh=vt.signatureNormalize=vt.signatureImport=vt.signatureExport=vt.privateKeyTweakMul=vt.publicKeyTweakMul=vt.publicKeyTweakAdd=vt.publicKeyCombine=vt.publicKeyNegate=vt.privateKeyNegate=vt.privateKeyTweakAdd=vt.ecdsaVerify=vt.ecdsaRecover=vt.ecdsaSign=vt.publicKeyConvert=vt.publicKeyVerify=vt.publicKeyCreate=vt.privateKeyVerify=vt.createPrivateKey=vt.createPrivateKeySync=void 0;const n=Rj(),o=t(wE()),s=Nj();function l(ce){if(typeof ce!="string")throw new TypeError("hexToNumber: expected string, got "+typeof ce);return BigInt(`0x${ce}`)}const c=ce=>l((0,s.toHex)(ce)),f=ce=>ce.toString(16).padStart(64,"0"),p=ce=>(0,s.hexToBytes)(f(ce)),{mod:y}=o.utils,m=o.CURVE.n;function h(ce=B=>new Uint8Array(B),Y,j){return typeof ce=="function"&&(ce=ce(Y)),(0,s.assertBytes)(ce,Y),j&&ce.set(j),ce}function O(ce){return(0,s.assertBytes)(ce,64),o.Signature.fromCompact(ce)}function C(){return o.utils.randomPrivateKey()}vt.createPrivateKeySync=C;async function R(){return C()}vt.createPrivateKey=R;function I(ce){return(0,s.assertBytes)(ce,32),o.utils.isValidPrivateKey(ce)}vt.privateKeyVerify=I;function N(ce,Y=!0,j){(0,s.assertBytes)(ce,32),(0,s.assertBool)(Y);const B=o.getPublicKey(ce,Y);return h(j,Y?33:65,B)}vt.publicKeyCreate=N;function _(ce){(0,s.assertBytes)(ce,33,65);try{return o.Point.fromHex(ce),!0}catch{return!1}}vt.publicKeyVerify=_;function A(ce,Y=!0,j){(0,s.assertBytes)(ce,33,65),(0,s.assertBool)(Y);const B=o.Point.fromHex(ce).toRawBytes(Y);return h(j,Y?33:65,B)}vt.publicKeyConvert=A;function w(ce,Y,j={noncefn:void 0,data:void 0},B){if((0,s.assertBytes)(ce,32),(0,s.assertBytes)(Y,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[q,L]=o.signSync(ce,Y,{recovered:!0,der:!1});return{signature:h(B,64,q),recid:L}}vt.ecdsaSign=w;function v(ce,Y,j,B=!0,q){(0,s.assertBytes)(j,32),(0,s.assertBool)(B);const L=O(ce).toHex(),H=o.Point.fromSignature(j,L,Y);return h(q,B?33:65,H.toRawBytes(B))}vt.ecdsaRecover=v;function S(ce,Y,j){(0,s.assertBytes)(ce,64),(0,s.assertBytes)(Y,32),(0,s.assertBytes)(j,33,65),(0,s.assertBytes)(ce,64);const B=c(ce.slice(0,32)),q=c(ce.slice(32,64));if(B>=m||q>=m)throw new Error("Cannot parse signature");const L=o.Point.fromHex(j);let H;try{H=O(ce)}catch{return!1}return o.verify(H,Y,L)}vt.ecdsaVerify=S;function M(ce,Y){(0,s.assertBytes)(ce,32),(0,s.assertBytes)(Y,32);let j=c(Y);if(j===0n)throw new Error("Tweak must not be zero");if(j>=m)throw new Error("Tweak bigger than curve order");if(j+=c(ce),j>=m&&(j-=m),j===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return ce.set((0,s.hexToBytes)(f(j))),ce}vt.privateKeyTweakAdd=M;function F(ce){(0,s.assertBytes)(ce,32);const Y=y(-c(ce),m);return ce.set((0,s.hexToBytes)(f(Y))),ce}vt.privateKeyNegate=F;function W(ce,Y=!0,j){(0,s.assertBytes)(ce,33,65),(0,s.assertBool)(Y);const B=o.Point.fromHex(ce).negate();return h(j,Y?33:65,B.toRawBytes(Y))}vt.publicKeyNegate=W;function J(ce,Y=!0,j){if(!Array.isArray(ce)||!ce.length)throw new TypeError(`Expected array with one or more items, not ${ce}`);for(const q of ce)(0,s.assertBytes)(q,33,65);(0,s.assertBool)(Y);const B=ce.map(q=>o.Point.fromHex(q)).reduce((q,L)=>q.add(L),o.Point.ZERO);if(B.equals(o.Point.ZERO))throw new Error("Combined result must not be zero");return h(j,Y?33:65,B.toRawBytes(Y))}vt.publicKeyCombine=J;function pe(ce,Y,j=!0,B){(0,s.assertBytes)(ce,33,65),(0,s.assertBytes)(Y,32),(0,s.assertBool)(j);const q=o.Point.fromHex(ce),L=o.Point.fromPrivateKey(Y),H=q.add(L);if(L.equals(o.Point.ZERO)||H.equals(o.Point.ZERO))throw new Error("Tweak must not be zero");return h(B,j?33:65,H.toRawBytes(j))}vt.publicKeyTweakAdd=pe;function Oe(ce,Y,j=!0,B){(0,s.assertBytes)(ce,33,65),(0,s.assertBytes)(Y,32),(0,s.assertBool)(j);const q=c(Y);if(q===0n)throw new Error("Tweak must not be zero");if(q<=1||q>=m)throw new Error("Tweak is zero or bigger than curve order");const L=o.Point.fromHex(ce).multiply(q);return h(B,j?33:65,L.toRawBytes(j))}vt.publicKeyTweakMul=Oe;function Ae(ce,Y){(0,s.assertBytes)(ce,32),(0,s.assertBytes)(Y,32);const j=c(Y);if(j<=1||j>=m)throw new Error("Tweak is zero or bigger than curve order");const B=y(j*c(ce),m);if(B===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return ce.set((0,s.hexToBytes)(f(B))),ce}vt.privateKeyTweakMul=Ae;function be(ce,Y){const j=O(ce).toRawBytes();return h(Y,72,O(ce).toRawBytes()).slice(0,j.length)}vt.signatureExport=be;function Le(ce,Y){(0,s.assertBytes)(ce);const j=o.Signature.fromDER(ce);return h(Y,64,(0,s.hexToBytes)(j.toCompactHex()))}vt.signatureImport=Le;function Me(ce){const Y=O(ce);return Y.s>m/2n&&ce.set(p(m-Y.s),32),ce}vt.signatureNormalize=Me;function Be(ce,Y,j={},B){if((0,s.assertBytes)(ce,33,65),(0,s.assertBytes)(Y,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 q=o.Point.fromHex(o.getSharedSecret(Y,ce));if(j.hashfn===void 0)return h(B,32,(0,n.sha256)(q.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)(B,32);const L=j.xbuf||new Uint8Array(32);L.set(p(q.x));const H=j.ybuf||new Uint8Array(32);H.set(p(q.y));const le=j.hashfn(L,H,j.data);if(!(le instanceof Uint8Array)||le.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return h(B,32,le)}vt.ecdh=Be;function Te(ce){ce!==null&&(0,s.assertBytes)(ce,32)}return vt.contextRandomize=Te,vt}var sC;function Cj(){if(sC)return kr;sC=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.createUnsafeIdentity=kr.computeAddress=kr.ethSign=kr.createEthereumMessageHash=kr.sign=kr.recoverAddressFromEthSignature=kr.recoverPublicKey=void 0;const e=af(),i=wE(),t=lV();function n(m,h){if(m.length!==65)throw new Error("Invalid signature length"+m.length);const O=m.slice(0,m.length-1),C=m[64]===28?1:0;return(0,t.ecdsaRecover)(O,C,h,!1).slice(1)}kr.recoverPublicKey=n;function o(m){if(m.length!==65)throw new Error("Invalid ethereum signature");const h=m[64];if(h===0||h===1){const O=new Uint8Array(m);return O[64]=h+27,O}return m}function s(m,h){if(typeof m=="string"){if((0,e.isHex)(m))return s((0,e.hexToBytes)(m),h);throw new Error("String signatures must be encoded in hex")}return p(n(o(m),c(h)))}kr.recoverAddressFromEthSignature=s;function l(m,h){const O=(0,t.ecdsaSign)(h,m),C=O.recid===1?"1c":"1b";return(0,e.toHex)(O.signature)+C}kr.sign=l;function c(m){const h=typeof m=="string"?(0,e.stringToUtf8Bytes)(m):m,O=(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 m(_,A){if(_){if(typeof _=="string")return h(_,A);var w={}.toString.call(_).slice(8,-1);return w==="Object"&&_.constructor&&(w=_.constructor.name),w==="Map"||w==="Set"?Array.from(_):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?h(_,A):void 0}}function h(_,A){(A==null||A>_.length)&&(A=_.length);for(var w=0,v=Array(A);w<A;w++)v[w]=_[w];return v}function O(_,A){var w=_==null?null:typeof Symbol<"u"&&_[Symbol.iterator]||_["@@iterator"];if(w!=null){var v,S,M,F,W=[],J=!0,pe=!1;try{if(M=(w=w.call(_)).next,A!==0)for(;!(J=(v=M.call(w)).done)&&(W.push(v.value),W.length!==A);J=!0);}catch(Oe){pe=!0,S=Oe}finally{try{if(!J&&w.return!=null&&(F=w.return(),Object(F)!==F))return}finally{if(pe)throw S}}return W}}function C(_){if(Array.isArray(_))return _}var R={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0,max_allowed_length:2084},I=/^\[([^\]]+)\](?::([0-9]+))?$/;function N(_,A){if((0,t.default)(_),!_||/[\s<>]/.test(_)||_.indexOf("mailto:")===0||(A=(0,c.default)(A,R),A.validate_length&&_.length>A.max_allowed_length)||!A.allow_fragments&&(0,o.default)(_,"#")||!A.allow_query_components&&((0,o.default)(_,"?")||(0,o.default)(_,"&")))return!1;var w,v,S,M,F,W,J,pe;J=_.split("#"),_=J.shift(),J=_.split("?"),_=J.shift();var Oe=_.match(/^([a-z][a-z0-9+\-.]*):/i),Ae=!1,be=function(ue){return Ae=!0,w=ue.toLowerCase(),A.require_valid_protocol&&A.protocols.indexOf(w)===-1?!1:_.substring(Oe[0].length)};if(Oe){var Le=Oe[1],Me=_.substring(Oe[0].length),Be=Me.slice(0,2)==="//";if(Be){if(_=be(Le),_===!1)return!1}else{var Te=Me.indexOf("/"),ce=Te===-1?Me:Me.substring(0,Te),Y=ce.indexOf("@");if(Y!==-1){var j=ce.substring(0,Y),B=/^[a-zA-Z0-9\-_.%:]*$/,q=B.test(j),L=/%[0-9a-fA-F]{2}/.test(j);if(q&&!L){if(A.require_protocol)return!1}else if(_=be(Le),_===!1)return!1}else{var H=/^[0-9]/.test(Me);if(H){if(A.require_protocol)return!1}else if(_=be(Le),_===!1)return!1}}}else if(A.require_protocol)return!1;if(_.slice(0,2)==="//"){if(!Ae&&!A.allow_protocol_relative_urls)return!1;_=_.slice(2)}if(_==="")return!1;if(J=_.split("/"),_=J.shift(),_===""&&!A.require_host)return!0;if(J=_.split("@"),J.length>1){if(A.disallow_auth||J[0]===""||(v=J.shift(),v.indexOf(":")>=0&&v.split(":").length>2))return!1;var le=v.split(":"),ye=p(le,2),fe=ye[0],Pe=ye[1];if(fe===""&&Pe==="")return!1}M=J.join("@"),W=null,pe=null;var Re=M.match(I);if(Re?(S="",pe=Re[1],W=Re[2]||null):(J=M.split(":"),S=J.shift(),J.length&&(W=J.join(":"))),W!==null&&W.length>0){if(F=parseInt(W,10),!/^[0-9]+$/.test(W)||F<=0||F>65535)return!1}else if(A.require_port)return!1;return A.host_whitelist?(0,n.default)(S,A.host_whitelist):S===""&&!A.require_host?!0:!(!(0,l.default)(S)&&!(0,s.default)(S,A)&&(!pe||!(0,l.default)(pe,6))||(S=S||pe,A.host_blacklist&&(0,n.default)(S,A.host_blacklist)))}e.exports=i.default,e.exports.default=i.default})(Ed,Ed.exports)),Ed.exports}var Xh={},VO;function MM(){return VO||(VO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.localStorageClearIdentity=e.localStorageStoreIdentity=e.localStorageGetIdentity=e.createMessage=e.SINGLE_SIGN_ON_TARGET=e.Action=void 0;var i;(function(c){c.GET="get",c.STORE="store",c.CLEAR="clear",c.PING="ping"})(i||(e.Action=i={})),e.SINGLE_SIGN_ON_TARGET="single-sign-on";function t(c){return{target:e.SINGLE_SIGN_ON_TARGET,...c}}e.createMessage=t;function n(c){const f=localStorage.getItem(l(c));if(!f)return null;let p;try{p=JSON.parse(f)}catch{return s(c),null}return p.expiration=new Date(p.expiration),p.expiration.getTime()<=Date.now()?(s(c),null):p}e.localStorageGetIdentity=n;function o(c,f){new Date(f.expiration).getTime()>Date.now()&&localStorage.setItem(l(c),JSON.stringify(f))}e.localStorageStoreIdentity=o;function s(c){localStorage.removeItem(l(c))}e.localStorageClearIdentity=s;function l(c){if(!/^0x[a-fA-F0-9]{40}$/.test(c))throw new Error("User must be a valid ethereum address");return`single-sign-on-${c.toLowerCase()}`}})(Xh)),Xh}var HO;function X2(){if(HO)return $n;HO=1,Object.defineProperty($n,"__esModule",{value:!0}),$n.clearIdentity=$n.storeIdentity=$n.getIdentity=$n.init=void 0;const e=Y2(),i=MM(),t=i.SINGLE_SIGN_ON_TARGET,n=500,o=5;let s=0,l="";const c={protocols:["https"],require_protocol:!0};function f(I,N={}){if(!(0,e.default)(I,{...c,...N}))throw new Error(`Invalid url: ${I}`);if(l)throw new Error("Already initialized");const _=document.createElement("iframe");_.id=t,_.src=I,_.style.width="0",_.style.height="0",_.style.border="none",_.style.position="absolute",document.body.appendChild(_),l=I}$n.init=f;async function p(I){let N;try{N=(await O(await h(),i.Action.GET,{user:I})).identity??null}catch(_){R(_),N=(0,i.localStorageGetIdentity)(I)}return N}$n.getIdentity=p;async function y(I,N){try{await O(await h(),i.Action.STORE,{user:I,identity:N})}catch(_){R(_),(0,i.localStorageStoreIdentity)(I,N)}}$n.storeIdentity=y;async function m(I){try{await O(await h(),i.Action.CLEAR,{user:I})}catch(N){R(N),(0,i.localStorageClearIdentity)(I)}}$n.clearIdentity=m;async function h(){if(!l)throw new Error("Not initialized");for(let I=0;I<o;I++){const _=document.getElementById(t)?.contentWindow;if(!_){await C(n);continue}try{await O(_,i.Action.PING,{},n)}catch{continue}return _}throw new Error("Could not get iframe because it is not ready or cannot be communicated with")}async function O(I,N,_,A=0){s++;const w=s;let v=null;const S=new Promise((M,F)=>{v=({data:W})=>{!W||W.target!==i.SINGLE_SIGN_ON_TARGET||W.id!==w||(W.error?F(new Error(W.error)):M(W))},window.addEventListener("message",v)});I.postMessage((0,i.createMessage)({id:w,action:N,..._}),l);try{return await(A?Promise.race([S,new Promise((M,F)=>setTimeout(()=>F(new Error("Did not receive a response in time")),A))]):S)}catch(M){throw M}finally{v&&window.removeEventListener("message",v)}}function C(I){return new Promise(N=>setTimeout(N,I))}function R(I){console.warn("Could not get identity from iframe, falling back to localStorage. Error:",I.message)}return $n}var zO;function J2(){return zO||(zO=1,(function(e){var i=ho&&ho.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=ho&&ho.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(X2(),e),t(MM(),e)})(ho)),ho}var A_=J2(),Jh={},ei={},WO;function Je(){if(WO)return ei;WO=1;var e=ei&&ei.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ei,"__esModule",{value:!0}),ei.validateType=ei.generateLazyValidator=ei.Ajv=void 0;const i=e(Qd());ei.Ajv=i.default;const t=e(z_()),n=e(W_());function o(l,c){let f=null;const p=(y,m)=>{if(!f){const h=new i.default({$data:!0,allErrors:!0});(0,t.default)(h),(0,n.default)(h,{singleError:!0}),c?.forEach(O=>h.addKeyword(O)),f=h.compile(l),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(y,m)};return p}ei.generateLazyValidator=o;function s(l,c){return l.validate(c)}return ei.validateType=s,ei}var Qh={},GO;function jM(){return GO||(GO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const i=Je(),t=qn();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.MATIC_AMOY="Amoy",s.AVALANCHE_MAINNET="Avalanche",s.BINANCE_MAINNET="Binance Smart Chain",s.ARBITRUM_MAINNET="Arbitrum",s.OPTIMISM_MAINNET="Optimism",s.FANTOM_MAINNET="Fantom"})(n=e.ChainName||(e.ChainName={}));function o(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;case n.MATIC_AMOY:return t.ChainId.MATIC_AMOY;case n.AVALANCHE_MAINNET:return t.ChainId.AVALANCHE_MAINNET;case n.BINANCE_MAINNET:return t.ChainId.BSC_MAINNET;case n.ARBITRUM_MAINNET:return t.ChainId.ARBITRUM_MAINNET;case n.OPTIMISM_MAINNET:return t.ChainId.OPTIMISM_MAINNET;case n.FANTOM_MAINNET:return t.ChainId.FANTOM_MAINNET;default:return null}}e.getChainId=o,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,i.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(Qh)),Qh}var Zh={},KO;function di(){return KO||(KO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const i=Je();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC",t.AVALANCHE="AVALANCHE",t.BSC="BINANCE SMART CHAIN",t.OPTIMISM="OPTIMISM",t.ARBITRUM="ARBITRUM",t.FANTOM="FANTOM"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(Zh)),Zh}var YO;function qn(){return YO||(YO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const i=Je(),t=jM(),n=di();var o;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI",p[p.MATIC_AMOY=80002]="MATIC_AMOY",p[p.BSC_MAINNET=56]="BSC_MAINNET",p[p.OPTIMISM_MAINNET=10]="OPTIMISM_MAINNET",p[p.ARBITRUM_MAINNET=42161]="ARBITRUM_MAINNET",p[p.FANTOM_MAINNET=250]="FANTOM_MAINNET",p[p.AVALANCHE_MAINNET=43114]="AVALANCHE_MAINNET"})(o=e.ChainId||(e.ChainId={}));function s(p){switch(p){case o.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case o.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case o.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case o.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case o.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case o.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case o.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case o.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;case o.MATIC_AMOY:return t.ChainName.MATIC_AMOY;case o.BSC_MAINNET:return t.ChainName.BINANCE_MAINNET;case o.ARBITRUM_MAINNET:return t.ChainName.ARBITRUM_MAINNET;case o.OPTIMISM_MAINNET:return t.ChainName.OPTIMISM_MAINNET;case o.FANTOM_MAINNET:return t.ChainName.FANTOM_MAINNET;case o.AVALANCHE_MAINNET:return t.ChainName.AVALANCHE_MAINNET;default:return null}}e.getChainName=s;function l(p){switch(p){case o.ETHEREUM_MAINNET:return"ethereum";case o.ETHEREUM_ROPSTEN:return"ropsten";case o.ETHEREUM_RINKEBY:return"rinkeby";case o.ETHEREUM_GOERLI:return"goerli";case o.ETHEREUM_KOVAN:return"kovan";case o.ETHEREUM_SEPOLIA:return"sepolia";case o.MATIC_MAINNET:return"matic";case o.MATIC_MUMBAI:return"mumbai";case o.MATIC_AMOY:return"amoy";default:return""}}e.getURNProtocol=l;function c(p){const y={[n.Network.BSC]:o.BSC_MAINNET,[n.Network.OPTIMISM]:o.OPTIMISM_MAINNET,[n.Network.ARBITRUM]:o.ARBITRUM_MAINNET,[n.Network.FANTOM]:o.FANTOM_MAINNET,[n.Network.AVALANCHE]:o.AVALANCHE_MAINNET};switch(p){case o.ETHEREUM_MAINNET:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y);case o.ETHEREUM_ROPSTEN:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_ROPSTEN,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_RINKEBY:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_RINKEBY,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_GOERLI:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_GOERLI,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_KOVAN:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_KOVAN,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.ETHEREUM_SEPOLIA:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_SEPOLIA,[n.Network.MATIC]:o.MATIC_AMOY},y);case o.MATIC_MAINNET:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y);case o.MATIC_MUMBAI:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_MUMBAI,[n.Network.MATIC]:o.MATIC_MUMBAI},y);case o.MATIC_AMOY:return Object.assign({[n.Network.ETHEREUM]:o.MATIC_AMOY,[n.Network.MATIC]:o.MATIC_AMOY},y);default:return Object.assign({[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET},y)}}e.getNetworkMapping=c;function f(p){switch(p){case o.ETHEREUM_MAINNET:case o.ETHEREUM_ROPSTEN:case o.ETHEREUM_GOERLI:case o.ETHEREUM_KOVAN:case o.ETHEREUM_RINKEBY:case o.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case o.MATIC_MAINNET:case o.MATIC_MUMBAI:case o.MATIC_AMOY:return n.Network.MATIC;case o.BSC_MAINNET:return n.Network.BSC;case o.OPTIMISM_MAINNET:return n.Network.OPTIMISM;case o.ARBITRUM_MAINNET:return n.Network.ARBITRUM;case o.FANTOM_MAINNET:return n.Network.FANTOM;case o.AVALANCHE_MAINNET:return n.Network.AVALANCHE}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,i.generateLazyValidator)(p.schema)})(o=e.ChainId||(e.ChainId={}))})(Jh)),Jh}var St=qn(),xh={},XO;function LM(){return XO||(XO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const i=Je();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.MAGIC_TEST="magic_test",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(xh)),xh}var jt=LM(),Gi;(function(e){e.Update="Web3ReactUpdate",e.Error="Web3ReactError",e.Deactivate="Web3ReactDeactivate"})(Gi||(Gi={}));var Id={exports:{}},JO;function Q2(){if(JO)return Id.exports;JO=1;var e=typeof Reflect=="object"?Reflect:null,i=e&&typeof e.apply=="function"?e.apply:function(v,S,M){return Function.prototype.apply.call(v,S,M)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:t=function(v){return Object.getOwnPropertyNames(v)};function n(w){console&&console.warn&&console.warn(w)}var o=Number.isNaN||function(v){return v!==v};function s(){s.init.call(this)}Id.exports=s,Id.exports.once=N,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function c(w){if(typeof w!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof w)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(w){if(typeof w!="number"||w<0||o(w))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+w+".");l=w}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(v){if(typeof v!="number"||v<0||o(v))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+v+".");return this._maxListeners=v,this};function f(w){return w._maxListeners===void 0?s.defaultMaxListeners:w._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(v){for(var S=[],M=1;M<arguments.length;M++)S.push(arguments[M]);var F=v==="error",W=this._events;if(W!==void 0)F=F&&W.error===void 0;else if(!F)return!1;if(F){var J;if(S.length>0&&(J=S[0]),J instanceof Error)throw J;var pe=new Error("Unhandled error."+(J?" ("+J.message+")":""));throw pe.context=J,pe}var Oe=W[v];if(Oe===void 0)return!1;if(typeof Oe=="function")i(Oe,this,S);else for(var Ae=Oe.length,be=C(Oe,Ae),M=0;M<Ae;++M)i(be[M],this,S);return!0};function p(w,v,S,M){var F,W,J;if(c(S),W=w._events,W===void 0?(W=w._events=Object.create(null),w._eventsCount=0):(W.newListener!==void 0&&(w.emit("newListener",v,S.listener?S.listener:S),W=w._events),J=W[v]),J===void 0)J=W[v]=S,++w._eventsCount;else if(typeof J=="function"?J=W[v]=M?[S,J]:[J,S]:M?J.unshift(S):J.push(S),F=f(w),F>0&&J.length>F&&!J.warned){J.warned=!0;var pe=new Error("Possible EventEmitter memory leak detected. "+J.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");pe.name="MaxListenersExceededWarning",pe.emitter=w,pe.type=v,pe.count=J.length,n(pe)}return w}s.prototype.addListener=function(v,S){return p(this,v,S,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(v,S){return p(this,v,S,!0)};function y(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function m(w,v,S){var M={fired:!1,wrapFn:void 0,target:w,type:v,listener:S},F=y.bind(M);return F.listener=S,M.wrapFn=F,F}s.prototype.once=function(v,S){return c(S),this.on(v,m(this,v,S)),this},s.prototype.prependOnceListener=function(v,S){return c(S),this.prependListener(v,m(this,v,S)),this},s.prototype.removeListener=function(v,S){var M,F,W,J,pe;if(c(S),F=this._events,F===void 0)return this;if(M=F[v],M===void 0)return this;if(M===S||M.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete F[v],F.removeListener&&this.emit("removeListener",v,M.listener||S));else if(typeof M!="function"){for(W=-1,J=M.length-1;J>=0;J--)if(M[J]===S||M[J].listener===S){pe=M[J].listener,W=J;break}if(W<0)return this;W===0?M.shift():R(M,W),M.length===1&&(F[v]=M[0]),F.removeListener!==void 0&&this.emit("removeListener",v,pe||S)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(v){var S,M,F;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[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete M[v]),this;if(arguments.length===0){var W=Object.keys(M),J;for(F=0;F<W.length;++F)J=W[F],J!=="removeListener"&&this.removeAllListeners(J);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(S=M[v],typeof S=="function")this.removeListener(v,S);else if(S!==void 0)for(F=S.length-1;F>=0;F--)this.removeListener(v,S[F]);return this};function h(w,v,S){var M=w._events;if(M===void 0)return[];var F=M[v];return F===void 0?[]:typeof F=="function"?S?[F.listener||F]:[F]:S?I(F):C(F,F.length)}s.prototype.listeners=function(v){return h(this,v,!0)},s.prototype.rawListeners=function(v){return h(this,v,!1)},s.listenerCount=function(w,v){return typeof w.listenerCount=="function"?w.listenerCount(v):O.call(w,v)},s.prototype.listenerCount=O;function O(w){var v=this._events;if(v!==void 0){var S=v[w];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(w,v){for(var S=new Array(v),M=0;M<v;++M)S[M]=w[M];return S}function R(w,v){for(;v+1<w.length;v++)w[v]=w[v+1];w.pop()}function I(w){for(var v=new Array(w.length),S=0;S<v.length;++S)v[S]=w[S].listener||w[S];return v}function N(w,v){return new Promise(function(S,M){function F(J){w.removeListener(v,W),M(J)}function W(){typeof w.removeListener=="function"&&w.removeListener("error",F),S([].slice.call(arguments))}A(w,v,W,{once:!0}),v!=="error"&&_(w,F,{once:!0})})}function _(w,v,S){typeof w.on=="function"&&A(w,"error",v,S)}function A(w,v,S,M){if(typeof w.on=="function")M.once?w.once(v,S):w.on(v,S);else if(typeof w.addEventListener=="function")w.addEventListener(v,function F(W){M.once&&w.removeEventListener(v,F),S(W)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof w)}return Id.exports}var DM=Q2();const mz=HL(DM);function Z2(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i}var Hs=(function(e){Z2(i,e);function i(n){var o,s=n===void 0?{}:n,l=s.supportedChainIds;return o=e.call(this)||this,o.supportedChainIds=l,o}var t=i.prototype;return t.emitUpdate=function(o){this.emit(Gi.Update,o)},t.emitError=function(o){this.emit(Gi.Error,o)},t.emitDeactivate=function(){this.emit(Gi.Deactivate)},i})(DM.EventEmitter);const x2="modulepreload",$2=function(e){return"https://cdn.decentraland.org/@dcl-regenesislabs/mobile-hub/1.0.0-20758375146.commit-52c1b5b/"+e},QO={},ll=function(i,t,n){let o=Promise.resolve();if(t&&t.length>0){let f=function(p){return Promise.all(p.map(y=>Promise.resolve(y).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");o=f(t.map(p=>{if(p=$2(p),p in QO)return;QO[p]=!0;const y=p.endsWith(".css"),m=y?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${m}`))return;const h=document.createElement("link");if(h.rel=y?"stylesheet":x2,y||(h.as="script"),h.crossOrigin="",h.href=p,c&&h.setAttribute("nonce",c),document.head.appendChild(h),y)return new Promise((O,C)=>{h.addEventListener("load",O),h.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${p}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return i().catch(s)})};var ti={},yo={},go={},$h={},ZO;function eB(){return ZO||(ZO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const i=Je();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})($h)),$h}var ey={},xO;function tB(){return xO||(xO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const i=Je();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(ey)),ey}var $O;function rB(){return $O||($O=1,(function(e){var i=go&&go.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=go&&go.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(eB(),e),t(tB(),e)})(go)),go}var vo={},ty={},eI;function nB(){return eI||(eI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const i=Je();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(ty)),ty}var ry={},ny={},tI;function tf(){return tI||(tI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const i=Je();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.EXOTIC="exotic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.EXOTIC]:50,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},o={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.EXOTIC]:"#E4FFB8",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.EXOTIC]:"#CAFF73",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function l(y){return n[y]}t.getMaxSupply=l;function c(y){return s[y]}t.getColor=c;function f(){return[t.UNIQUE,t.MYTHIC,t.EXOTIC,t.LEGENDARY,t.EPIC,t.RARE,t.UNCOMMON,t.COMMON]}t.getRarities=f;function p(y){return[o[y],s[y]]}t.getGradient=p})(e.Rarity||(e.Rarity={}))})(ny)),ny}var iy={},rI;function Wo(){return rI||(rI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const i=Je();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(iy)),iy}var ay={},oy={},nI;function tE(){return nI||(nI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const i=Je();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(oy)),oy}var sy={},uy={},iI;function kM(){return iI||(iI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const i=Je();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(uy)),uy}var aI;function rE(){return aI||(aI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const i=Wo(),t=Je(),n=kM();(function(o){o.schema={oneOf:[Object.assign({},i.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(sy)),sy}var oI;function nE(){return oI||(oI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const i=Je(),t=tE(),n=rE();(function(o){o.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(ay)),ay}var _o={},Eo={},ly={},cy={},sI;function Go(){return sI||(sI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const i=Je();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,i.generateLazyValidator)(t.schema);t.validate=o=>n(o)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv1||(e.IPFSv1={}))})(cy)),cy}var uI;function qM(){return uI||(uI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const i=Wo(),t=Go(),n=Je();var o;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(o=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:o.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var l;(function(f){f.schema={type:"string",maxLength:2083,pattern:"^(?:https?):\\/\\/[^\\s/$.?#].[^\\s]*$"};const p=new RegExp(f.schema.pattern,"i");f.validate=y=>p.test(y)})(l=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:l.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(ly)),ly}var dy={},lI;function iB(){return lI||(lI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const i=Je(),t=qM();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})(dy)),dy}var cI;function aB(){return cI||(cI=1,(function(e){var i=Eo&&Eo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Eo&&Eo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(qM(),e),t(iB(),e)})(Eo)),Eo}var fy={},py={},dI;function BM(){return dI||(dI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const i=Je();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(py)),py}var my={},fI;function UM(){return fI||(fI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(my)),my}var hy={},pI;function FM(){return pI||(pI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const i=Je();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,i.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(hy)),hy}var yy={},Ou={},mI;function iE(){return mI||(mI=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.displayableProperties=void 0,Ou.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Ou}var gy={},hI;function VM(){return hI||(hI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(gy)),gy}var vy={},yI;function HM(){return yI||(yI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(vy)),vy}var gI;function oB(){return gI||(gI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const i=Je(),t=iE(),n=BM(),o=FM(),s=VM(),l=HM(),c=UM();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:o.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:l.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,i.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(yy)),yy}var vI;function sB(){return vI||(vI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var i=BM();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return i.FeatureToggles}});var t=UM();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=FM();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var o=oB();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return o.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return o.RequiredPermission}});var s=VM();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var l=HM();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return l.SpawnPoint}})})(fy)),fy}var bo={},_y={},Ey={},_I;function zM(){return _I||(_I=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const i=Je();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(Ey)),Ey}var EI;function WM(){return EI||(EI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const i=Je(),t=zM();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(_y)),_y}var by={},bI;function GM(){return bI||(bI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(by)),by}var wy={},wI;function aE(){return wI||(wI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const i=tf(),t=Je();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:i.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},o=(0,t.generateLazyValidator)(n);function s(l){return o(l)}e.isStandard=s})(wy)),wy}var Sy={},wo={},Ty={},SI;function uB(){return SI||(SI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(Ty)),Ty}var TI;function KM(){return TI||(TI=1,(function(e){var i=wo&&wo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=wo&&wo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(uB(),e)})(wo)),wo}var Ay={},AI;function oE(){return AI||(AI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMappingsHelper=e.AddMappingError=e.Mappings=e.Mapping=e.MultipleMapping=e.RangeMapping=e.AnyMapping=e.SingleMapping=e.ContractNetwork=e.MappingType=void 0;const i=Je();var t;(function(m){m.SINGLE="single",m.ANY="any",m.MULTIPLE="multiple",m.RANGE="range"})(t=e.MappingType||(e.MappingType={}));var n;(function(m){m.MAINNET="mainnet",m.MATIC="matic",m.SEPOLIA="sepolia",m.AMOY="amoy"})(n=e.ContractNetwork||(e.ContractNetwork={}));var o;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.SINGLE},id:{type:"string",pattern:"^[0-9]+$"}},required:["type","id"],additionalProperties:!1},m.validate=(0,i.generateLazyValidator)(m.schema)})(o=e.SingleMapping||(e.SingleMapping={}));var s;(function(m){m.schema={type:"object",properties:{type:{type:"string",const:t.ANY}},required:["type"],additionalProperties:!1},m.validate=(0,i.generateLazyValidator)(m.schema)})(s=e.AnyMapping||(e.AnyMapping={}));var l;(function(m){m._fromLessThanOrEqualTo={keyword:"_fromLessThanOrEqualTo",validate:function(O,C){if(!C||!C.from||!C.to)return!1;let{to:R,from:I}=C;return(typeof I!="bigint"||typeof R!="bigint")&&(I=BigInt(I),R=BigInt(R)),I<=R},errors:!1},m.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},m.validate=(0,i.generateLazyValidator)(m.schema,[m._fromLessThanOrEqualTo])})(l=e.RangeMapping||(e.RangeMapping={}));var c;(function(m){m.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},m.validate=(0,i.generateLazyValidator)(m.schema)})(c=e.MultipleMapping||(e.MultipleMapping={}));var f;(function(m){m.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)}},required:["type"],oneOf:[o.schema,s.schema,l.schema,c.schema]},m.validate=(0,i.generateLazyValidator)(m.schema,[l._fromLessThanOrEqualTo])})(f=e.Mapping||(e.Mapping={})),(function(m){m._isMappingsValid={keyword:"_isMappingsValid",validate:function(O,C){try{y(C)}catch{return!1}return!0},errors:!1},m.innerSchema={type:"object",patternProperties:{"^0x[0-9a-fA-F]{40}$":{type:"array",items:f.schema}},minProperties:1,required:[],additionalProperties:!1};const h=Object.values(n).reduce((O,C)=>(O[C]=m.innerSchema,O),{});m.schema={type:"object",properties:h,minProperties:1,additionalProperties:!1,_isMappingsValid:!0},m.validate=(0,i.generateLazyValidator)(m.schema,[l._fromLessThanOrEqualTo,m._isMappingsValid])})(e.Mappings||(e.Mappings={}));class p extends Error{constructor(h,O,C){super(h),this.existingMapping=O,this.conflictingMapping=C}}e.AddMappingError=p;function y(m={}){const h={};for(const[v,S]of Object.entries(m)){h[v]={};for(const[M,F]of Object.entries(S))for(const W of F)A(v,M,W)}function O(){return JSON.parse(JSON.stringify(h))}function C(v,S,M){const F=BigInt(v);return F>=BigInt(S)&&F<=BigInt(M)}function R(v,S){switch(S.type){case t.SINGLE:return v.id===S.id;case t.MULTIPLE:return S.ids.includes(v.id);case t.RANGE:return C(v.id,S.from,S.to);default:return!1}}function I(v,S){switch(S.type){case t.SINGLE:return v.ids.includes(S.id);case t.MULTIPLE:return v.ids.some(M=>S.ids.includes(M));case t.RANGE:return v.ids.some(M=>C(M,S.from,S.to));default:return!1}}function N(v,S){switch(S.type){case t.SINGLE:return C(S.id,v.from,v.to);case t.MULTIPLE:return S.ids.some(M=>C(M,v.from,v.to));case t.RANGE:return BigInt(v.from)<=BigInt(S.to)&&BigInt(v.to)>=BigInt(S.from)}}function _(v,S){if(v.type===t.ANY||S.type===t.ANY)return!0;switch(v.type){case t.SINGLE:return R(v,S);case t.MULTIPLE:return I(v,S);case t.RANGE:return N(v,S)}}function A(v,S,M){var F,W;const J=S.toLowerCase();h[v]=(F=h[v])!==null&&F!==void 0?F:{},h[v][J]=(W=h[v][J])!==null&&W!==void 0?W:[];for(const pe of h[v][J])if(_(pe,M))throw new p(`Cannot add mapping to contract ${J} on network ${v} because it overlaps with existing mapping`,pe,M);h[v][J].push(M)}function w(v,S,M){var F;return!((F=h[v])===null||F===void 0)&&F[S]?h[v][S].some(W=>{switch(W.type){case t.SINGLE:return W.id===M;case t.ANY:return!0;case t.MULTIPLE:return W.ids.includes(M);case t.RANGE:return BigInt(M)>=BigInt(W.from)&&BigInt(M)<=BigInt(W.to)}}):!1}return{addMapping:A,getMappings:O,includesNft:w}}e.createMappingsHelper=y})(Ay)),Ay}var OI;function sE(){return OI||(OI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.schema=void 0;const i=Je(),t=KM(),n=oE();e.schema={type:"object",properties:{merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]},mappings:Object.assign({nullable:!0},n.Mappings.schema)},required:["merkleProof","content"],_containsHashingKeys:!0};const o={keyword:"_containsHashingKeys",validate:function(c,f){var p;const y=f;return!((p=y?.merkleProof)===null||p===void 0)&&p.hashingKeys?y.merkleProof.hashingKeys.every(m=>y.hasOwnProperty(m)):!1},errors:!1},s=(0,i.generateLazyValidator)(e.schema,[o,n.RangeMapping._fromLessThanOrEqualTo,n.Mappings._isMappingsValid]);function l(c){return s(c)}e.isThirdParty=l})(Sy)),Sy}var Oy={},Iy={},ri={},II;function YM(){if(II)return ri;II=1,Object.defineProperty(ri,"__esModule",{value:!0}),ri.isBaseEmote=ri.isBaseAvatar=ri.requiredBaseItemProps=ri.baseItemProperties=void 0;const e=WM(),i=GM(),t=iE();ri.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},i.Metrics.schema),{nullable:!0})}),ri.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(s){if(!s||!s.id)return!1;const l=s.id.split(":"),c=l[1]==="decentraland",f=l[3]==="base-avatars";return l.length===5&&c&&f}ri.isBaseAvatar=n;function o(s){if(!s||!s.id)return!1;const l=s.id.split(":");return l.length===5&&l[1]==="decentraland"&&l[3]==="base-emotes"}return ri.isBaseEmote=o,ri}var PI;function lB(){return PI||(PI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const i=Je(),t=Wo(),n=nE(),o=YM(),s=aE(),l=sE(),c=rE(),f=oE();(function(p){p.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},o.baseItemProperties),s.standardProperties),l.schema.properties.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity","mappings"],_isBaseAvatar:!0},{required:[...o.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content","mappings"]},{required:[...o.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const y={keyword:"_isThirdParty",validate:(h,O)=>!h||(0,l.isThirdParty)(O),errors:!1},m={keyword:"_isBaseAvatar",validate:(h,O)=>!h||(0,o.isBaseAvatar)(O),errors:!1};p.validate=(0,i.generateLazyValidator)(p.schema,[y,m,f.RangeMapping._fromLessThanOrEqualTo,f.Mappings._isMappingsValid])})(e.Wearable||(e.Wearable={}))})(Iy)),Iy}var RI;function cB(){return RI||(RI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var i=nE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return i.WearableRepresentation}});var t=lB();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Wo();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var o=kM();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return o.BodyPartCategory}});var s=rE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(Oy)),Oy}var Py={},Ry={},Ny={},Cy={},NI;function XM(){return NI||(NI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const i=Je();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(Cy)),Cy}var My={},CI;function JM(){return CI||(CI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const i=Je(),t=tE();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(My)),My}var MI;function QM(){return MI||(MI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const i=XM(),t=Je(),n=JM();(function(o){o.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:i.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(Ny)),Ny}var jI;function dB(){return jI||(jI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const i=ZM(),t=Je(),n=YM(),o=aE(),s=sE(),l=QM();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),o.standardProperties),s.schema.properties),{emoteDataADR74:l.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseEmote:!0},{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(y,m)=>!y||(0,i.isThirdParty)(m),errors:!1},p={keyword:"_isBaseEmote",validate:(y,m)=>!y||(0,n.isBaseEmote)(m),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f,p,i.RangeMapping._fromLessThanOrEqualTo,i.Mappings._isMappingsValid])})(e.Emote||(e.Emote={}))})(Ry)),Ry}var jy={},LI;function fB(){return LI||(LI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const i=Je();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(jy)),jy}var DI;function pB(){return DI||(DI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var i=dB();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return i.Emote}});var t=JM();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=QM();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var o=XM();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return o.EmoteCategory}});var s=fB();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(Py)),Py}var kI;function ZM(){return kI||(kI=1,(function(e){var i=bo&&bo.__createBinding||(Object.create?(function(p,y,m,h){h===void 0&&(h=m);var O=Object.getOwnPropertyDescriptor(y,m);(!O||("get"in O?!y.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return y[m]}}),Object.defineProperty(p,h,O)}):(function(p,y,m,h){h===void 0&&(h=m),p[h]=y[m]})),t=bo&&bo.__exportStar||function(p,y){for(var m in p)m!=="default"&&!Object.prototype.hasOwnProperty.call(y,m)&&i(y,p,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=WM();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var o=zM();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return o.Locale}});var s=GM();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var l=tE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return l.BodyShape}});var c=aE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=sE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(oE(),e),t(cB(),e),t(pB(),e)})(bo)),bo}var Ly={},Dy={},qI;function rf(){return qI||(qI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const i=Je();var t;(function(o){o.SIGNER="SIGNER",o.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",o.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",o.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",o.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(o){o.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},o.validate=(0,i.generateLazyValidator)(o.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(o){o.schema={type:"array",items:n.schema,minItems:1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.AuthChain||(e.AuthChain={}))})(Dy)),Dy}var BI;function mB(){return BI||(BI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const i=Go(),t=rf(),n=Je();(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(Ly)),Ly}var ky={},qy={},UI;function xM(){return UI||(UI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const i=Go(),t=Je();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(qy)),qy}var FI;function $M(){return FI||(FI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const i=Go(),t=xM(),n=Je();(function(o){o.SCENE="scene",o.PROFILE="profile",o.WEARABLE="wearable",o.STORE="store",o.EMOTE="emote",o.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(o){o.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.Entity||(e.Entity={}))})(ky)),ky}var By={},VI;function hB(){return VI||(VI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const i=rf(),t=Je();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:i.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(By)),By}var So={},Uy={},HI;function yB(){return HI||(HI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const i=Wo(),t=Go(),n=Je();var o;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(o=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:o.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Uy)),Uy}var zI;function gB(){return zI||(zI=1,(function(e){var i=So&&So.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=So&&So.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(yB(),e)})(So)),So}var To={},Fy={},WI;function ej(){return WI||(WI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NotificationType=void 0,(function(i){i.BADGE_GRANTED="badge_granted",i.BID_ACCEPTED="bid_accepted",i.BID_RECEIVED="bid_received",i.EVENTS_STARTED="events_started",i.EVENTS_STARTS_SOON="events_starts_soon",i.GOVERNANCE_ANNOUNCEMENT="governance_announcement",i.GOVERNANCE_AUTHORED_PROPOSAL_FINISHED="governance_authored_proposal_finished",i.GOVERNANCE_COAUTHOR_REQUESTED="governance_coauthor_requested",i.GOVERNANCE_CLIFF_ENDED="governance_cliff_ended",i.GOVERNANCE_NEW_COMMENT_ON_PROJECT_UPDATE="governance_new_comment_on_project_update",i.GOVERNANCE_NEW_COMMENT_ON_PROPOSAL="governance_new_comment_on_proposal",i.GOVERNANCE_PROPOSAL_ENACTED="governance_proposal_enacted",i.GOVERNANCE_VOTING_ENDED_VOTER="governance_voting_ended_voter",i.GOVERNANCE_PITCH_PASSED="governance_pitch_passed",i.GOVERNANCE_TENDER_PASSED="governance_tender_passed",i.GOVERNANCE_WHALE_VOTE="governance_whale_vote",i.GOVERNANCE_VOTED_ON_BEHALF="governance_voted_on_behalf",i.ITEM_SOLD="item_sold",i.ITEM_PUBLISHED="item_published",i.LAND_RENTAL_ENDED="rental_ended",i.LAND_RENTED="rental_started",i.REWARD_ASSIGNED="reward_assignment",i.REWARD_CAMPAIGN_OUT_OF_FUNDS="reward_campaign_out_of_funds",i.REWARD_CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="reward_campaign_gas_price_higher_than_expected",i.REWARD_CAMPAIGN_OUT_OF_STOCK="reward_campaign_out_of_stock",i.REWARD_DELAYED="reward_delayed",i.REWARD_IN_PROGRESS="reward_in_progress",i.ROYALTIES_EARNED="royalties_earned",i.SOCIAL_SERVICE_FRIENDSHIP_REQUEST="social_service_friendship_request",i.SOCIAL_SERVICE_FRIENDSHIP_ACCEPTED="social_service_friendship_accepted",i.WORLDS_ACCESS_RESTORED="worlds_access_restored",i.WORLDS_ACCESS_RESTRICTED="worlds_access_restricted",i.WORLDS_MISSING_RESOURCES="worlds_missing_resources",i.WORLDS_PERMISSION_GRANTED="worlds_permission_granted",i.WORLDS_PERMISSION_REVOKED="worlds_permission_revoked"})(e.NotificationType||(e.NotificationType={}))})(Fy)),Fy}var Vy={},Hy={},GI;function tj(){return GI||(GI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SubscriptionDetails=void 0;const i=Je(),t=ej(),n={type:"object",required:["email","in_app"],properties:{email:{type:"boolean"},in_app:{type:"boolean"}}},o=Object.values(t.NotificationType).reduce((s,l)=>(s[l]=n,s),{});(function(s){s.schema={type:"object",required:["ignore_all_email","ignore_all_in_app","message_type"],properties:{ignore_all_email:{type:"boolean"},ignore_all_in_app:{type:"boolean"},message_type:{type:"object",required:Object.values(t.NotificationType),additionalProperties:!1,properties:o}}},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.SubscriptionDetails||(e.SubscriptionDetails={}))})(Hy)),Hy}var zy={},KI;function rj(){return KI||(KI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Email=void 0,(function(i){i.schema={type:"string",pattern:"^[\\w\\-\\.]+@([\\w-]+\\.)+[\\w-]{2,}$"};const t=new RegExp(i.schema.pattern);i.validate=n=>t.test(n)})(e.Email||(e.Email={}))})(zy)),zy}var YI;function vB(){return YI||(YI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Subscription=void 0;const i=Je(),t=tj(),n=Go(),o=rj();(function(s){s.schema={type:"object",required:["address","details"],properties:{address:n.EthAddress.schema,email:Object.assign(Object.assign({},o.Email.schema),{nullable:!0}),details:t.SubscriptionDetails.schema}},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Subscription||(e.Subscription={}))})(Vy)),Vy}var XI;function _B(){return XI||(XI=1,(function(e){var i=To&&To.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=To&&To.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(ej(),e),t(vB(),e),t(tj(),e)})(To)),To}var Ao={},Wy={},JI;function zs(){return JI||(JI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Events=void 0,(function(i){(function(t){t.BLOCKCHAIN="blockchain",t.CATALYST_DEPLOYMENT="catalyst-deployment",t.WORLD="world",t.CLIENT="client",t.MARKETPLACE="marketplace",t.REWARDS="rewards",t.BADGE="badge",t.ASSET_BUNDLE="asset-bundle",t.SOCIAL_SERVICE="social-service"})(i.Type||(i.Type={})),(function(t){(function(n){n.BID_ACCEPTED="bid-accepted",n.ITEM_SOLD="item-sold",n.RENTAL_ENDED="land-rental-ended",n.RENTAL_STARTED="land-rental-started",n.ROYALTIES_EARNED="royalties-earned",n.COLLECTION_CREATED="collection-created",n.ITEM_PUBLISHED="item-published"})(t.Blockchain||(t.Blockchain={})),(function(n){n.BID_RECEIVED="bid-received"})(t.Marketplace||(t.Marketplace={})),(function(n){n.SCENE="scene",n.PROFILE="profile",n.WEARABLE="wearable",n.STORE="store",n.EMOTE="emote",n.OUTFITS="outfits"})(t.CatalystDeployment||(t.CatalystDeployment={})),(function(n){n.DEPLOYMENT="deployment"})(t.Worlds||(t.Worlds={})),(function(n){n.MOVE_TO_PARCEL="move-to-parcel",n.USED_EMOTE="used-emote",n.PASSPORT_OPENED="passport-opened",n.WALKED_DISTANCE="walked-distance",n.VERTICAL_HEIGHT_REACHED="vertical-height-reached"})(t.Client||(t.Client={})),(function(n){n.REWARD_IN_PROGRESS="reward-in-progress",n.REWARD_ASSIGNED="reward-assigned",n.CAMPAIGN_OUT_OF_FUNDS="campaign-out-of-funds",n.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED="campaign-gas-price-higher-than-expected",n.CAMPAIGN_OUT_OF_STOCK="campaign-out-of-stock",n.REWARD_DELAYED="reward-delayed"})(t.Rewards||(t.Rewards={})),(function(n){n.GRANTED="badge-granted"})(t.Badge||(t.Badge={})),(function(n){n.CONVERTED="converted",n.MANUALLY_QUEUED="manually-queued"})(t.AssetBundle||(t.AssetBundle={})),(function(n){n.FRIENDSHIP_REQUEST="friendship-request",n.FRIENDSHIP_ACCEPTED="friendship-accepted"})(t.SocialService||(t.SocialService={}))})(i.SubType||(i.SubType={}))})(e.Events||(e.Events={}))})(Wy)),Wy}var Gy={},QI;function EB(){return QI||(QI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CollectionCreatedEvent=e.RoyaltiesEarnedEvent=e.RentalStartedEvent=e.RentalEndedEvent=e.ItemPublishedEvent=e.ItemSoldEvent=e.BidAcceptedEvent=void 0;const i=Je(),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,i.generateLazyValidator)(n.schema)})(e.BidAcceptedEvent||(e.BidAcceptedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_SOLD},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},buyer:{type:"string"},seller:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},tokenId:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string"}},required:["address","image","seller","category","link","network","title","description"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.ItemSoldEvent||(e.ItemSoldEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ITEM_PUBLISHED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},itemId:{type:"string"},network:{type:"string"},urn:{type:"string"}},required:["creator","category","itemId","network","urn"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.ItemPublishedEvent||(e.ItemPublishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_ENDED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RentalEndedEvent||(e.RentalEndedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.RENTAL_STARTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},contract:{type:"string"},land:{type:"string",nullable:!0},lessor:{type:"string"},tenant:{type:"string"},operator:{type:"string"},startedAt:{type:"string"},endedAt:{type:"string"},tokenId:{type:"string"},link:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","contract","lessor","tenant","operator","startedAt","endedAt","tokenId","link","title"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RentalStartedEvent||(e.RentalStartedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.ROYALTIES_EARNED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{address:{type:"string"},image:{type:"string"},category:{type:"string"},rarity:{type:"string",nullable:!0},link:{type:"string"},nftName:{type:"string",nullable:!0},royaltiesCut:{type:"string"},royaltiesCollector:{type:"string"},network:{type:"string"},title:{type:"string"},description:{type:"string",nullable:!0}},required:["address","image","category","link","royaltiesCut","royaltiesCollector","network","title"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.RoyaltiesEarnedEvent||(e.RoyaltiesEarnedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.BLOCKCHAIN},subType:{type:"string",const:t.Events.SubType.Blockchain.COLLECTION_CREATED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{creator:{type:"string"},name:{type:"string"}},required:["creator","name"]}},required:["type","subType","metadata"],additionalProperties:!1},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.CollectionCreatedEvent||(e.CollectionCreatedEvent={}))})(Gy)),Gy}var Ky={},ZI;function bB(){return ZI||(ZI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalystDeploymentEvent=void 0;const i=rf(),t=Je(),n=$M(),o=zs();(function(s){s.schema={type:"object",properties:{type:{type:"string",const:o.Events.Type.CATALYST_DEPLOYMENT},subType:{type:"string",enum:Object.values(o.Events.SubType.CatalystDeployment)},key:{type:"string"},timestamp:{type:"number",minimum:1},entity:n.Entity.schema,authChain:i.AuthChain.schema},required:["type","subType","entity","authChain","key","timestamp"],additionalProperties:!1},s.validate=(0,t.generateLazyValidator)(s.schema)})(e.CatalystDeploymentEvent||(e.CatalystDeploymentEvent={}))})(Ky)),Ky}var Yy={},xI;function wB(){return xI||(xI=1,Object.defineProperty(Yy,"__esModule",{value:!0})),Yy}var Xy={},$I;function SB(){return $I||($I=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BidReceivedEvent=void 0;const i=Je(),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,i.generateLazyValidator)(n.schema)})(e.BidReceivedEvent||(e.BidReceivedEvent={}))})(Xy)),Xy}var Jy={},Iu={},eP;function TB(){if(eP)return Iu;eP=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.createEventSchema=void 0;function e(i,t,n){return{type:"object",properties:{type:{type:"string",const:i},subType:{type:"string",const:t},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:n},required:["type","subType","key","timestamp","metadata"],additionalProperties:!1}}return Iu.createEventSchema=e,Iu}var tP;function AB(){return tP||(tP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RewardDelayedEvent=e.CampaignOutOfStockEvent=e.CampaignGasPriceHigherThanExpectedEvent=e.CampaignOutOfFundsEvent=e.RewardAssignedEvent=e.RewardInProgressEvent=void 0;const i=Je(),t=zs(),n=TB(),o={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},beneficiary:{type:"string"},tokenName:{type:"string"},tokenImage:{type:"string"},tokenRarity:{type:"string",nullable:!0},tokenCategory:{type:"string",nullable:!0}},required:["title","description","beneficiary","tokenName","tokenImage"],additionalProperties:!1},s={type:"object",properties:{title:{type:"string"},description:{type:"string"},link:{type:"string",nullable:!0},owner:{type:"string"},campaignId:{type:"string"},campaignName:{type:"string"}},required:["title","description","owner","campaignId","campaignName"],additionalProperties:!1};(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_IN_PROGRESS,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardInProgressEvent||(e.RewardInProgressEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_ASSIGNED,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardAssignedEvent||(e.RewardAssignedEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_FUNDS,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignOutOfFundsEvent||(e.CampaignOutOfFundsEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_GAS_PRICE_HIGHER_THAN_EXPECTED,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignGasPriceHigherThanExpectedEvent||(e.CampaignGasPriceHigherThanExpectedEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.CAMPAIGN_OUT_OF_STOCK,s),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.CampaignOutOfStockEvent||(e.CampaignOutOfStockEvent={})),(function(l){l.schema=(0,n.createEventSchema)(t.Events.Type.REWARDS,t.Events.SubType.Rewards.REWARD_DELAYED,o),l.validate=(0,i.generateLazyValidator)(l.schema)})(e.RewardDelayedEvent||(e.RewardDelayedEvent={}))})(Jy)),Jy}var Qy={},rP;function OB(){return rP||(rP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FriendshipAcceptedEvent=e.FriendshipRequestEvent=e.AssetBundleConversionManuallyQueuedEvent=e.AssetBundleConversionFinishedEvent=e.BadgeGrantedEvent=void 0;const i=Je(),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,i.generateLazyValidator)(n.schema)})(e.BadgeGrantedEvent||(e.BadgeGrantedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.CONVERTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},statusCode:{type:"number"},isLods:{type:"boolean"},isWorld:{type:"boolean"}},required:["entityId","platform","statusCode","isLods","isWorld"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.AssetBundleConversionFinishedEvent||(e.AssetBundleConversionFinishedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.ASSET_BUNDLE},subType:{type:"string",const:t.Events.SubType.AssetBundle.MANUALLY_QUEUED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{entityId:{type:"string"},platform:{type:"string",enum:["windows","mac","webgl"]},isLods:{type:"boolean"},isPriority:{type:"boolean"}},required:["entityId","platform","isLods"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.AssetBundleConversionManuallyQueuedEvent||(e.AssetBundleConversionManuallyQueuedEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_REQUEST},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"}},required:["address","name","profileImageUrl"]},receiver:{type:"object",properties:{address:{type:"string"}},required:["address"]},message:{type:"string",nullable:!0}},required:["sender"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.FriendshipRequestEvent||(e.FriendshipRequestEvent={})),(function(n){n.schema={type:"object",properties:{type:{type:"string",const:t.Events.Type.SOCIAL_SERVICE},subType:{type:"string",const:t.Events.SubType.SocialService.FRIENDSHIP_ACCEPTED},key:{type:"string"},timestamp:{type:"number",minimum:0},metadata:{type:"object",properties:{sender:{type:"object",properties:{address:{type:"string"},name:{type:"string"},profileImageUrl:{type:"string"}},required:["address","name","profileImageUrl"]},receiver:{type:"object",properties:{address:{type:"string"}},required:["address"]}},required:["sender"]}},required:["type","subType","key","timestamp","metadata"],additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.FriendshipAcceptedEvent||(e.FriendshipAcceptedEvent={}))})(Qy)),Qy}var nP;function IB(){return nP||(nP=1,(function(e){var i=Ao&&Ao.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Ao&&Ao.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(zs(),e),t(EB(),e),t(bB(),e),t(wB(),e),t(SB(),e),t(AB(),e),t(OB(),e)})(Ao)),Ao}var iP;function uE(){return iP||(iP=1,(function(e){var i=_o&&_o.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=_o&&_o.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(aB(),e),t(sB(),e),t(ZM(),e),t(iE(),e),t(KM(),e),t(mB(),e),t($M(),e),t(hB(),e),t(gB(),e),t(_B(),e),t(IB(),e)})(_o)),_o}var aP;function PB(){return aP||(aP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const i=tf(),t=Wo(),n=nE(),o=Je(),s=uE();(function(l){l.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},i.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema},blockVrmExport:{type:"boolean",nullable:!0},outlineCompatible:{type:"boolean",nullable:!0}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},l.validate=(0,o.generateLazyValidator)(l.schema)})(e.WearableJson||(e.WearableJson={}))})(ry)),ry}var oP;function RB(){return oP||(oP=1,(function(e){var i=vo&&vo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=vo&&vo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(nB(),e),t(PB(),e)})(vo)),vo}var sP;function NB(){return sP||(sP=1,(function(e){var i=yo&&yo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=yo&&yo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(rB(),e),t(RB(),e)})(yo)),yo}var Oo={},Zy={},uP;function CB(){return uP||(uP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const i=Je();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(Zy)),Zy}var xy={},lP;function MB(){return lP||(lP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const i=Je(),t=qn(),n=di();(function(o){o.NEWEST="newest",o.NAME="name",o.RECENTLY_REVIEWED="recently_reviewed",o.RECENTLY_LISTED="recently_listed",o.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(o){o.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Collection||(e.Collection={}))})(xy)),xy}var $y={},eg={},cP;function nf(){return cP||(cP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const i=Je();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(eg)),eg}var dP;function jB(){return dP||(dP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const i=Je(),t=qn(),n=di(),o=nf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:o.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})($y)),$y}var tg={},rg={},fP;function nj(){return fP||(fP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const i=Je(),t=qn(),n=uE(),o=di(),s=nf(),l=tf(),c=Wo();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:o.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,i.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(rg)),rg}var pP;function LB(){return pP||(pP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const i=Je(),t=qn(),n=di(),o=nj(),s=nf();(function(l){l.NAME="name",l.NEWEST="newest",l.RECENTLY_REVIEWED="recently_reviewed",l.RECENTLY_SOLD="recently_sold",l.RECENTLY_LISTED="recently_listed",l.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(l){l.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},tradeId:{type:"string",nullable:!0},data:o.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},utility:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0},tradeExpiresAt:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},l.validate=(0,i.generateLazyValidator)(l.schema)})(e.Item||(e.Item={}))})(tg)),tg}var ng={},mP;function lE(){return mP||(mP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const i=Je();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(ng)),ng}var ig={},hP;function DB(){return hP||(hP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(ig)),ig}var ag={},yP;function kB(){return yP||(yP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const i=Je(),t=qn(),n=di();(function(o){o.RECENTLY_MINTED="recently_minted",o.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(o){o.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Mint||(e.Mint={}))})(ag)),ag}var og={},gP;function qB(){return gP||(gP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(i){i.NEWEST="newest",i.RECENTLY_SOLD="recently_sold",i.CHEAPEST="cheapest",i.MOST_EXPENSIVE="most_expensive",i.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(i){i.ASC="asc",i.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(og)),og}var sg={},vP;function BB(){return vP||(vP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const i=Je(),t=qn(),n=lE(),o=di();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"},tradeId:{type:"string",nullable:!0}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(sg)),sg}var ug={},_P;function ij(){return _P||(_P=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const i=Je();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(ug)),ug}var lg={},EP;function UB(){return EP||(EP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const i=Je(),t=qn(),n=ij(),o=di();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:o.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(lg)),lg}var cg={},bP;function FB(){return bP||(bP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const i=Je(),t=qn(),n=di();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var o;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(o=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:o.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(cg)),cg}var dg={},wP;function VB(){return wP||(wP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(i){i.DATE="date",i.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(dg)),dg}var fg={},SP;function HB(){return SP||(SP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(fg)),fg}var pg={},TP;function zB(){return TP||(TP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const i=Je();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(pg)),pg}var mg={},AP;function WB(){return AP||(AP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const i=Je();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(o,s){const l=t().validWorldRanges;for(const c of l)if(o>=c.xMin&&o<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(o){o.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.World||(e.World={}))})(mg)),mg}var hg={},OP;function GB(){return OP||(OP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const i=Je(),t=qn(),n=lE(),o=di();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){const l={properties:{id:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,contractAddress:{type:"string"},network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidder","seller","price","fingerprint","status","contractAddress","network","chainId","expiresAt","createdAt","updatedAt"]};s.schema={type:"object",required:[],oneOf:[{properties:Object.assign(Object.assign({},l.properties),{tradeId:{type:"string"},tokenId:{type:"string"}}),required:[...l.required,"tradeId","tokenId"]},{type:"object",properties:Object.assign(Object.assign({},l.properties),{tradeId:{type:"string"},itemId:{type:"string"}}),required:[...l.required,"tradeId","itemId"]},{type:"object",properties:Object.assign(Object.assign({},l.properties),{bidAddress:{type:"string"},blockchainId:{type:"string"},blockNumber:{type:"string"},tokenId:{type:"string"}}),required:[...l.required,"bidAddress","blockchainId","blockNumber","tokenId"]}]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(hg)),hg}var yg={},IP;function KB(){return IP||(IP=1,Object.defineProperty(yg,"__esModule",{value:!0})),yg}var gg={},PP;function YB(){return PP||(PP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TradeAssetDirection=e.TradeAssetType=e.TradeType=void 0,(function(i){i.BID="bid",i.PUBLIC_NFT_ORDER="public_nft_order",i.PUBLIC_ITEM_ORDER="public_item_order"})(e.TradeType||(e.TradeType={})),(function(i){i[i.ERC20=1]="ERC20",i[i.USD_PEGGED_MANA=2]="USD_PEGGED_MANA",i[i.ERC721=3]="ERC721",i[i.COLLECTION_ITEM=4]="COLLECTION_ITEM"})(e.TradeAssetType||(e.TradeAssetType={})),(function(i){i.SENT="sent",i.RECEIVED="received"})(e.TradeAssetDirection||(e.TradeAssetDirection={}))})(gg)),gg}var Io={},vg={},RP;function XB(){return RP||(RP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const i=Je();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(vg)),vg}var _g={},NP;function JB(){return NP||(NP=1,Object.defineProperty(_g,"__esModule",{value:!0})),_g}var Eg={},CP;function QB(){return CP||(CP=1,Object.defineProperty(Eg,"__esModule",{value:!0})),Eg}var bg={},MP;function ZB(){return MP||(MP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const i=Je();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})(bg)),bg}var wg={},jP;function xB(){return jP||(jP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const i=Je();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(wg)),wg}var Sg={},LP;function $B(){return LP||(LP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const i=Je();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,o,s,l="*")=>{const c={type:o,payload:s};n.postMessage(c,l)};e.sendMessage=t})(Sg)),Sg}var Tg={},DP;function eU(){return DP||(DP=1,Object.defineProperty(Tg,"__esModule",{value:!0})),Tg}var Ag={},kP;function tU(){return kP||(kP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const i=Je();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(Ag)),Ag}var Og={},qP;function rU(){return qP||(qP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const i=Je();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(Og)),Og}var Ig={},BP;function nU(){return BP||(BP=1,Object.defineProperty(Ig,"__esModule",{value:!0})),Ig}var Pg={},UP;function iU(){return UP||(UP=1,Object.defineProperty(Pg,"__esModule",{value:!0})),Pg}var Rg={},FP;function aU(){return FP||(FP=1,Object.defineProperty(Rg,"__esModule",{value:!0})),Rg}var Ng={},VP;function oU(){return VP||(VP=1,Object.defineProperty(Ng,"__esModule",{value:!0})),Ng}var Cg={},HP;function sU(){return HP||(HP=1,Object.defineProperty(Cg,"__esModule",{value:!0})),Cg}var Mg={},zP;function uU(){return zP||(zP=1,Object.defineProperty(Mg,"__esModule",{value:!0})),Mg}var jg={},WP;function lU(){return WP||(WP=1,Object.defineProperty(jg,"__esModule",{value:!0})),jg}var Lg={},GP;function cU(){return GP||(GP=1,Object.defineProperty(Lg,"__esModule",{value:!0})),Lg}var KP;function dU(){return KP||(KP=1,(function(e){var i=Io&&Io.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Io&&Io.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(XB(),e),t(JB(),e),t(QB(),e),t(ZB(),e),t(xB(),e),t($B(),e),t(eU(),e),t(tU(),e),t(rU(),e),t(nU(),e),t(iU(),e),t(aU(),e),t(oU(),e),t(sU(),e),t(uU(),e),t(lU(),e),t(cU(),e)})(Io)),Io}var Po={},Pu={},YP;function fU(){if(YP)return Pu;YP=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.isSysLink=void 0;const e=i=>i!==null&&typeof i=="object"&&"sys"in i&&"id"in i.sys;return Pu.isSysLink=e,Pu}var Ru={},XP;function pU(){if(XP)return Ru;XP=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.ContentfulLocale=void 0;var e;return(function(i){i.enUS="en-US",i.es="es",i.zh="zh"})(e||(e={})),Ru.ContentfulLocale=e,Ru}var Dg={},JP;function mU(){return JP||(JP=1,Object.defineProperty(Dg,"__esModule",{value:!0})),Dg}var QP;function hU(){return QP||(QP=1,(function(e){var i=Po&&Po.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Po&&Po.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(fU(),e),t(pU(),e),t(mU(),e)})(Po)),Po}var ZP;function yU(){return ZP||(ZP=1,(function(e){var i=Oo&&Oo.__createBinding||(Object.create?(function(J,pe,Oe,Ae){Ae===void 0&&(Ae=Oe);var be=Object.getOwnPropertyDescriptor(pe,Oe);(!be||("get"in be?!pe.__esModule:be.writable||be.configurable))&&(be={enumerable:!0,get:function(){return pe[Oe]}}),Object.defineProperty(J,Ae,be)}):(function(J,pe,Oe,Ae){Ae===void 0&&(Ae=Oe),J[Ae]=pe[Oe]})),t=Oo&&Oo.__exportStar||function(J,pe){for(var Oe in J)Oe!=="default"&&!Object.prototype.hasOwnProperty.call(pe,Oe)&&i(pe,J,Oe)};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=CB();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return n.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return n.AccountSortBy}});var o=qn();Object.defineProperty(e,"ChainId",{enumerable:!0,get:function(){return o.ChainId}}),Object.defineProperty(e,"getChainName",{enumerable:!0,get:function(){return o.getChainName}}),Object.defineProperty(e,"getURNProtocol",{enumerable:!0,get:function(){return o.getURNProtocol}});var s=jM();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return s.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return s.getChainId}});var l=MB();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return l.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return l.CollectionSortBy}});var c=jB();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return c.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return c.ContractSortBy}});var f=LB();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return f.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return f.ItemSortBy}});var p=lE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return p.ListingStatus}});var y=DB();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return y.MetaTransaction}});var m=kB();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return m.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return m.MintSortBy}});var h=di();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return h.Network}});var O=nf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return O.NFTCategory}});var C=nj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return C.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return C.NFTSortBy}});var R=qB();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return R.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return R.CatalogSortDirection}});var I=BB();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return I.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return I.OrderSortBy}});var N=LM();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return N.ProviderType}});var _=tf();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return _.Rarity}});var A=ij();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return A.SaleType}});var w=UB();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return w.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return w.SaleSortBy}});var v=FB();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 S=VB();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return S.AnalyticsDayDataSortBy}});var M=HB();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return M.Store}});var F=zB();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return F.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return F.GenderFilterOption}});var W=WB();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return W.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return W.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return W.isInsideWorldLimits}}),t(GB(),e),t(KB(),e),t(YB(),e),t(dU(),e),t(hU(),e)})(Oo)),Oo}var kg={},xP;function gU(){return xP||(xP=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const i=Je();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},onlyDev:{type:"boolean",nullable:!0},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(kg)),kg}var $P;function vU(){return $P||($P=1,(function(e){var i=ti&&ti.__createBinding||(Object.create?(function(l,c,f,p){p===void 0&&(p=f);var y=Object.getOwnPropertyDescriptor(c,f);(!y||("get"in y?!c.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return c[f]}}),Object.defineProperty(l,p,y)}):(function(l,c,f,p){p===void 0&&(p=f),l[p]=c[f]})),t=ti&&ti.__setModuleDefault||(Object.create?(function(l,c){Object.defineProperty(l,"default",{enumerable:!0,value:c})}):function(l,c){l.default=c}),n=ti&&ti.__importStar||function(l){if(l&&l.__esModule)return l;var c={};if(l!=null)for(var f in l)f!=="default"&&Object.prototype.hasOwnProperty.call(l,f)&&i(c,l,f);return t(c,l),c},o=ti&&ti.__exportStar||function(l,c){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(c,f)&&i(c,l,f)};Object.defineProperty(e,"__esModule",{value:!0}),e.sdk=void 0;const s=n(NB());e.sdk=s,o(Je(),e),o(yU(),e),o(uE(),e),o(Go(),e),o(gU(),e),o(rf(),e),o(xM(),e),o(rj(),e)})(ti)),ti}var Fs=vU();const _U=Object.freeze({storageKey:"decentraland-connect-storage-key",[jt.ProviderType.INJECTED]:{},[jt.ProviderType.FORTMATIC]:{apiKeys:{[St.ChainId.ETHEREUM_MAINNET]:"pk_live_F8E24DF8DD5BCBC5",[St.ChainId.ETHEREUM_SEPOLIA]:"pk_test_5B728BEFE5C10911"},urls:ks(jt.ProviderType.FORTMATIC)},[jt.ProviderType.NETWORK]:{urls:ks(jt.ProviderType.NETWORK)},[jt.ProviderType.WALLET_LINK]:{appName:"Decentraland",urls:ks(jt.ProviderType.WALLET_LINK)},[jt.ProviderType.WALLET_CONNECT_V2]:{projectId:"61570c542c2d66c659492e5b24a41522",urls:ks(jt.ProviderType.WALLET_CONNECT_V2),chains:{[St.ChainId.ETHEREUM_MAINNET]:{chains:[St.ChainId.ETHEREUM_MAINNET],optionalChains:[St.ChainId.MATIC_MAINNET,St.ChainId.ARBITRUM_MAINNET,St.ChainId.OPTIMISM_MAINNET,St.ChainId.AVALANCHE_MAINNET,St.ChainId.BSC_MAINNET,St.ChainId.FANTOM_MAINNET]},[St.ChainId.ETHEREUM_SEPOLIA]:{chains:[St.ChainId.ETHEREUM_SEPOLIA],optionalChains:[St.ChainId.MATIC_AMOY]}}},[jt.ProviderType.MAGIC]:{apiKey:"pk_live_212568025B158355",urls:ks(jt.ProviderType.MAGIC),chains:[St.ChainId.ETHEREUM_MAINNET,St.ChainId.ETHEREUM_SEPOLIA,St.ChainId.MATIC_MAINNET,St.ChainId.MATIC_AMOY,St.ChainId.OPTIMISM_MAINNET,St.ChainId.ARBITRUM_MAINNET,St.ChainId.AVALANCHE_MAINNET,St.ChainId.BSC_MAINNET,St.ChainId.FANTOM_MAINNET]},[jt.ProviderType.MAGIC_TEST]:{apiKey:"pk_live_CE856A4938B36648",urls:ks(jt.ProviderType.MAGIC),chains:[St.ChainId.ETHEREUM_MAINNET,St.ChainId.ETHEREUM_SEPOLIA,St.ChainId.MATIC_MAINNET,St.ChainId.MATIC_AMOY,St.ChainId.OPTIMISM_MAINNET,St.ChainId.ARBITRUM_MAINNET,St.ChainId.AVALANCHE_MAINNET,St.ChainId.BSC_MAINNET,St.ChainId.FANTOM_MAINNET]}});function Yi(){return _U}function ks(e){const i={[St.ChainId.ETHEREUM_MAINNET]:"https://rpc.decentraland.org/mainnet",[St.ChainId.ETHEREUM_SEPOLIA]:"https://rpc.decentraland.org/sepolia",[St.ChainId.MATIC_MAINNET]:"https://rpc.decentraland.org/polygon",[St.ChainId.MATIC_AMOY]:"https://rpc.decentraland.org/amoy",[St.ChainId.ARBITRUM_MAINNET]:"https://rpc.decentraland.org/arbitrum",[St.ChainId.OPTIMISM_MAINNET]:"https://rpc.decentraland.org/optimism",[St.ChainId.AVALANCHE_MAINNET]:"https://rpc.decentraland.org/avalanche",[St.ChainId.BSC_MAINNET]:"https://rpc.decentraland.org/binance",[St.ChainId.FANTOM_MAINNET]:"https://rpc.decentraland.org/fantom"};let t="";switch(e){case jt.ProviderType.WALLET_LINK:t="walletlink";break;case jt.ProviderType.FORTMATIC:t="fortmatic";break;case jt.ProviderType.MAGIC:t="magic";break;case jt.ProviderType.MAGIC_TEST:t="magic";break;case jt.ProviderType.WALLET_CONNECT_V2:t="walletconnect-v2";break;case jt.ProviderType.AUTH_SERVER:t="auth-server";break}if(t)for(const n in i)i[n]+=`?project=${t}`;return i}class EU extends Hs{constructor(i){const t=Yi()[Fs.ProviderType.FORTMATIC],n=Object.keys(t.apiKeys).map(o=>Number(o));if(!n.includes(i))throw new Error(`Invariant error: Unsupported chainId ${i}`);super({supportedChainIds:n}),this.apiKey=t.apiKeys[i],this.chainId=i,this.rpcUrl=t.urls[i]}async activate(){if(!this.fortmatic){const{default:t}=await ll(async()=>{const{default:n}=await import("./fortmatic-Bigjbinp.js").then(o=>o.f);return{default:n}},[]);this.fortmatic=new t(this.apiKey,{rpcUrl:this.rpcUrl,chainId:this.chainId})}const i=await this.fortmatic.getProvider().enable().then(t=>t[0]);return{provider:this.fortmatic.getProvider(),chainId:this.chainId,account:i}}getApiKey(){return this.apiKey}async getProvider(){return this.fortmatic.getProvider()}async getChainId(){return this.chainId}async getAccount(){return this.fortmatic.getProvider().send("eth_accounts").then(i=>i[0])}deactivate(){}close(){return this.fortmatic.user.logout()}}function O_(){return O_=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},O_.apply(this,arguments)}function cE(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i}function I_(e){return I_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},I_(e)}function Ud(e,i){return Ud=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},Ud(e,i)}function bU(){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 Dd(e,i,t){return bU()?Dd=Reflect.construct:Dd=function(o,s,l){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(o,c),p=new f;return l&&Ud(p,l.prototype),p},Dd.apply(null,arguments)}function wU(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Fd(e){var i=typeof Map=="function"?new Map:void 0;return Fd=function(n){if(n===null||!wU(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(n))return i.get(n);i.set(n,o)}function o(){return Dd(n,arguments,I_(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Ud(o,n)},Fd(e)}function Pd(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 qs(e,i){try{var t=e()}catch(n){return i(n)}return t&&t.then?t.then(void 0,i):t}function Oi(e){return e.hasOwnProperty("result")?e.result:e}var qg=(function(e){cE(i,e);function i(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="No Ethereum provider was found on window.ethereum.",t}return i})(Fd(Error)),SU=(function(e){cE(i,e);function i(){var t;return t=e.call(this)||this,t.name=t.constructor.name,t.message="The user rejected the request.",t}return i})(Fd(Error)),TU=(function(e){cE(i,e);function i(n){var o;return o=e.call(this,n)||this,o.handleNetworkChanged=o.handleNetworkChanged.bind(Pd(o)),o.handleChainChanged=o.handleChainChanged.bind(Pd(o)),o.handleAccountsChanged=o.handleAccountsChanged.bind(Pd(o)),o.handleClose=o.handleClose.bind(Pd(o)),o}var t=i.prototype;return t.handleChainChanged=function(o){this.emitUpdate({chainId:o,provider:window.ethereum})},t.handleAccountsChanged=function(o){o.length===0?this.emitDeactivate():this.emitUpdate({account:o[0]})},t.handleClose=function(o,s){this.emitDeactivate()},t.handleNetworkChanged=function(o){this.emitUpdate({chainId:o,provider:window.ethereum})},t.activate=function(){try{var o=function(y){if(s)return y;function m(){return O_({provider:window.ethereum},c?{account:c}:{})}var h=(function(){if(!c)return Promise.resolve(window.ethereum.enable().then(function(O){return O&&Oi(O)[0]})).then(function(O){c=O})})();return h&&h.then?h.then(m):m(h)},s=!1,l=this;if(!window.ethereum)throw new qg;window.ethereum.on&&(window.ethereum.on("chainChanged",l.handleChainChanged),window.ethereum.on("accountsChanged",l.handleAccountsChanged),window.ethereum.on("close",l.handleClose),window.ethereum.on("networkChanged",l.handleNetworkChanged)),window.ethereum.isMetaMask&&(window.ethereum.autoRefreshOnNetworkChange=!1);var c,f=qs(function(){return Promise.resolve(window.ethereum.send("eth_requestAccounts").then(function(p){return Oi(p)[0]})).then(function(p){c=p})},function(p){if(p.code===4001)throw new SU});return Promise.resolve(f&&f.then?f.then(o):o(f))}catch(p){return Promise.reject(p)}},t.getProvider=function(){try{return Promise.resolve(window.ethereum)}catch(o){return Promise.reject(o)}},t.getChainId=function(){try{var o=function(){function f(){if(!s)try{s=Oi(window.ethereum.send({method:"net_version"}))}catch{}return s||(window.ethereum.isDapper?s=Oi(window.ethereum.cachedResults.net_version):s=window.ethereum.chainId||window.ethereum.netVersion||window.ethereum.networkVersion||window.ethereum._chainId),s}var p=(function(){if(!s){var y=qs(function(){return Promise.resolve(window.ethereum.send("net_version").then(Oi)).then(function(m){s=m})},function(){});if(y&&y.then)return y.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new qg;var s,l=qs(function(){return Promise.resolve(window.ethereum.send("eth_chainId").then(Oi)).then(function(c){s=c})},function(){});return Promise.resolve(l&&l.then?l.then(o):o(l))}catch(c){return Promise.reject(c)}},t.getAccount=function(){try{var o=function(){function f(){return s||(s=Oi(window.ethereum.send({method:"eth_accounts"}))[0]),s}var p=(function(){if(!s){var y=qs(function(){return Promise.resolve(window.ethereum.enable().then(function(m){return Oi(m)[0]})).then(function(m){s=m})},function(){});if(y&&y.then)return y.then(function(){})}})();return p&&p.then?p.then(f):f(p)};if(!window.ethereum)throw new qg;var s,l=qs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(c){return Oi(c)[0]})).then(function(c){s=c})},function(){});return Promise.resolve(l&&l.then?l.then(o):o(l))}catch(c){return Promise.reject(c)}},t.deactivate=function(){window.ethereum&&window.ethereum.removeListener&&(window.ethereum.removeListener("chainChanged",this.handleChainChanged),window.ethereum.removeListener("accountsChanged",this.handleAccountsChanged),window.ethereum.removeListener("close",this.handleClose),window.ethereum.removeListener("networkChanged",this.handleNetworkChanged))},t.isAuthorized=function(){try{return window.ethereum?Promise.resolve(qs(function(){return Promise.resolve(window.ethereum.send("eth_accounts").then(function(o){return Oi(o).length>0}))},function(){return!1})):Promise.resolve(!1)}catch(o){return Promise.reject(o)}},i})(Hs);class AU 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 OU=60*1e3;class IU extends TU{constructor(i){super({supportedChainIds:[i]})}async activate(){const i=new Promise((n,o)=>{setTimeout(()=>{o(new AU)},OU)}),t=super.activate();return Promise.race([t,i])}}var PU="Invariant failed";function eR(e,i){throw new Error(PU)}function aj(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,cl(e,i)}function P_(e){return P_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},P_(e)}function cl(e,i){return cl=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},cl(e,i)}function RU(){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,i,t){return RU()?kd=Reflect.construct:kd=function(o,s,l){var c=[null];c.push.apply(c,s);var f=Function.bind.apply(o,c),p=new f;return l&&cl(p,l.prototype),p},kd.apply(null,arguments)}function NU(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function R_(e){var i=typeof Map=="function"?new Map:void 0;return R_=function(n){if(n===null||!NU(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(n))return i.get(n);i.set(n,o)}function o(){return kd(n,arguments,P_(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),cl(o,n)},R_(e)}var Bg=(function(e){aj(i,e);function i(t,n,o){var s;return s=e.call(this)||this,s.code=n,s.data=o,s.name=s.constructor.name,s.message=t,s}return i})(R_(Error)),CU=function(i,t){var n=this,o=this;this.isMetaMask=!1,this.sendAsync=function(l,c){console.log("sendAsync",l.method,l.params),o.request(l.method,l.params).then(function(f){return c(null,{jsonrpc:"2.0",id:l.id,result:f})}).catch(function(f){return c(f,null)})},this.request=function(l,c){try{return typeof l!="string"&&(c=l.params,l=l.method),Promise.resolve(fetch(n.url,{method:"POST",body:JSON.stringify({jsonrpc:"2.0",id:1,method:l,params:c}),headers:{"Content-Type":"application/json"}})).then(function(f){if(!f.ok)throw new Bg(f.status+": "+f.statusText,-32e3);return Promise.resolve(f.json()).then(function(p){if("error"in p){var y,m,h;throw new Bg(p==null||(y=p.error)==null?void 0:y.message,p==null||(m=p.error)==null?void 0:m.code,p==null||(h=p.error)==null?void 0:h.data)}else{if("result"in p)return p.result;throw new Bg("Received unexpected JSON-RPC response to "+l+" request.",-32e3,p)}})})}catch(f){return Promise.reject(f)}},this.chainId=i,this.url=t;var s=new URL(t);this.host=s.host,this.path=s.pathname},MU=(function(e){aj(i,e);function i(n){var o,s=n.urls,l=n.defaultChainId;return l||Object.keys(s).length===1||eR(),o=e.call(this,{supportedChainIds:Object.keys(s).map(function(c){return Number(c)})})||this,o.currentChainId=l||Number(Object.keys(s)[0]),o.providers=Object.keys(s).reduce(function(c,f){return c[Number(f)]=new CU(Number(f),s[Number(f)]),c},{}),o}var t=i.prototype;return t.activate=function(){try{var o=this;return Promise.resolve({provider:o.providers[o.currentChainId],chainId:o.currentChainId,account:null})}catch(s){return Promise.reject(s)}},t.getProvider=function(){try{var o=this;return Promise.resolve(o.providers[o.currentChainId])}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var o=this;return Promise.resolve(o.currentChainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){return Promise.resolve(null)},t.deactivate=function(){},t.changeChainId=function(o){Object.keys(this.providers).includes(o.toString())||eR(),this.currentChainId=o,this.emitUpdate({provider:this.providers[this.currentChainId],chainId:o})},i})(Hs);class jU extends MU{constructor(i){super({urls:Yi()[jt.ProviderType.NETWORK].urls,defaultChainId:i})}}function N_(){return N_=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},N_.apply(this,arguments)}function LU(e,i){e.prototype=Object.create(i.prototype),e.prototype.constructor=e,C_(e,i)}function C_(e,i){return C_=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n},C_(e,i)}function tR(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var DU=1,kU=(function(e){LU(i,e);function i(n){var o,s=n.url,l=n.appName,c=n.appLogoUrl,f=n.darkMode,p=n.supportedChainIds;return o=e.call(this,{supportedChainIds:p})||this,o.url=s,o.appName=l,o.appLogoUrl=c,o.darkMode=f||!1,o.handleChainChanged=o.handleChainChanged.bind(tR(o)),o.handleAccountsChanged=o.handleAccountsChanged.bind(tR(o)),o}var t=i.prototype;return t.activate=function(){try{var o=this,s=function(){return Promise.resolve(o.provider.request({method:"eth_requestAccounts"})).then(function(f){var p=f[0];return o.provider.on("chainChanged",o.handleChainChanged),o.provider.on("accountsChanged",o.handleAccountsChanged),{provider:o.provider,account:p}})},l=(function(){if(window.ethereum&&window.ethereum.isCoinbaseWallet===!0)o.provider=window.ethereum;else{var c=(function(){if(!o.walletLink)return Promise.resolve(ll(()=>import("./index-Ct2V8Mct.js").then(f=>f.i),[]).then(function(f){var p;return(p=f?.default)!=null?p:f})).then(function(f){o.walletLink=new f(N_({appName:o.appName,darkMode:o.darkMode},o.appLogoUrl?{appLogoUrl:o.appLogoUrl}:{})),o.provider=o.walletLink.makeWeb3Provider(o.url,DU)})})();if(c&&c.then)return c.then(function(){})}})();return Promise.resolve(l&&l.then?l.then(s):s(l))}catch(c){return Promise.reject(c)}},t.getProvider=function(){try{var o=this;return Promise.resolve(o.provider)}catch(s){return Promise.reject(s)}},t.getChainId=function(){try{var o=this;return Promise.resolve(o.provider.chainId)}catch(s){return Promise.reject(s)}},t.getAccount=function(){try{var o=this;return Promise.resolve(o.provider.request({method:"eth_requestAccounts"})).then(function(s){return s[0]})}catch(s){return Promise.reject(s)}},t.deactivate=function(){this.provider.removeListener("chainChanged",this.handleChainChanged),this.provider.removeListener("accountsChanged",this.handleAccountsChanged)},t.close=function(){try{var o=this;return o.provider.close(),o.emitDeactivate(),Promise.resolve()}catch(s){return Promise.reject(s)}},t.handleChainChanged=function(o){this.emitUpdate({chainId:o})},t.handleAccountsChanged=function(o){this.emitUpdate({account:o[0]})},i})(Hs);class qU extends kU{constructor(i){const t=Yi()[Fs.ProviderType.WALLET_LINK];super({url:t.urls[i],appName:t.appName,supportedChainIds:[i]})}}class Ii extends Hs{constructor(i){super({supportedChainIds:(()=>{const{chains:t,optionalChains:n}=Ii.configuration.chains[i];return[...t,...n]})()}),this.desiredChainId=i,this.activate=async()=>{const t=await ll(()=>import("./index-CZcWiNLw.js").then(o=>o.R),[]).then(o=>{const{chains:s,optionalChains:l}=Ii.configuration.chains[this.desiredChainId];return o.default.init({projectId:Ii.configuration.projectId,rpcMap:Ii.configuration.urls,chains:s,optionalChains:l,showQrModal:!0,disableProviderPing:!0,qrModalOptions:{themeVariables:{"--wcm-z-index":"3000"}},methods:["eth_sendTransaction","personal_sign"],optionalMethods:["eth_accounts","eth_requestAccounts","eth_sign","eth_signTypedData_v4","wallet_switchEthereumChain","wallet_addEthereumChain"],events:["chainChanged","accountsChanged"],optionalEvents:["disconnect"]})}),n=await t.enable();return t.on("accountsChanged",this.handleAccountsChanged),t.on("chainChanged",this.handleChainChanged),t.on("disconnect",this.handleDisconnect),this.provider=t,{chainId:t.chainId,account:n[0],provider:t}},this.getProvider=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider},this.getChainId=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.chainId},this.getAccount=async()=>{if(!this.provider)throw new Error("Provider is undefined");return this.provider.accounts[0]},this.getWalletName=()=>this.provider?.session?.peer.metadata.name,this.deactivate=()=>{},this.close=async()=>{if(this.provider)return this.provider.removeListener("accountsChanged",this.handleAccountsChanged).removeListener("chainChanged",this.handleChainChanged).removeListener("disconnect",this.handleDisconnect).disconnect()},this.handleAccountsChanged=t=>{this.emitUpdate({account:t[0]})},this.handleChainChanged=t=>{this.emitUpdate({chainId:t})},this.handleDisconnect=()=>{if(!this.provider)throw new Error("Provider is undefined");return this.emitDeactivate()}}}Ii.configuration=Yi()[Fs.ProviderType.WALLET_CONNECT_V2];Ii.clearStorage=e=>{e.removeRegExp(new RegExp("^wc@2:"))};class oj extends Hs{constructor(i,t=!1){super({supportedChainIds:Yi()[Fs.ProviderType.MAGIC].chains}),this.isTest=t,this.activate=async()=>{if(this.magic=await this.buildMagicInstance(this.chainId),!await this.magic.user.isLoggedIn())throw new Error("Magic: user isn't logged in");const o=await this.getProvider(),s=await o.request({method:"eth_accounts"});return this.account=s[0]??null,{provider:o,chainId:this.chainId,account:this.account}},this.getProvider=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");const n=await this.magic.wallet.getProvider();return{...n,isMagic:!0,request:new Proxy(n.request,{apply:async(o,s,l)=>{if(l[0]?.method==="wallet_switchEthereumChain")try{const c=parseInt(l[0]?.params[0]?.chainId,16);return this.supportedChainIds&&!this.supportedChainIds.includes(c)?{code:2020202,message:"Unsupported Magic ChainId"}:(this.magic=await this.buildMagicInstance(c),this.emitUpdate({chainId:c}),null)}catch{return{code:2020201,message:"Error changing the Magic ChainId"}}return o.bind(n)(...l)}}),sendAsync:new Proxy(n.send,{apply:async(o,s,l)=>o.bind(n)(...l)})}},this.getChainId=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.chainId},this.getAccount=async()=>{if(!this.magic)throw new Error("Magic: instance was not initialized");return this.account},this.deactivate=()=>{},this.buildMagicInstance=async n=>{const{Magic:o}=await ll(async()=>{const{Magic:c}=await import("./index-8e4wv-tH.js");return{Magic:c}},__vite__mapDeps([0,1])),{OAuthExtension:s}=await ll(async()=>{const{OAuthExtension:c}=await import("./index-QHMvomuf.js");return{OAuthExtension:c}},__vite__mapDeps([2,1])),l=Yi()[this.isTest?Fs.ProviderType.MAGIC_TEST:Fs.ProviderType.MAGIC];return new o(l.apiKey,{extensions:[new s],network:{rpcUrl:l.urls[n],chainId:n}})},this.chainId=i,this.account=null}close(){if(!this.magic)throw new Error("Magic: instance was not initialized");return this.magic.user.logout()}}class BU extends oj{constructor(i){super(i,!0)}}class UU{}class FU extends UU{get(i){const t=window.localStorage.getItem(i);return t===null?void 0:t}set(i,t){window.localStorage.setItem(i,t)}remove(i){window.localStorage.removeItem(i)}removeRegExp(i){for(let t=localStorage.length-1;t>=0;t--){const n=localStorage.key(t);n&&i.test(n)&&localStorage.removeItem(n)}}}class Vd{constructor(i){this.provider=i,this.id=0,this.on=(t,n)=>this.provider.on(t,n),this.emit=(t,...n)=>this.provider.emit(t,n),this.removeListener=(t,n)=>this.provider.removeListener(t,n),this.request=async({method:t,params:n})=>this.isModernProvider()?this.provider.request({method:t,params:n}):this.send(t,n),this.sendAsync=async(t,n)=>this.hasSendAsync()?this.provider.sendAsync(t,(o,s)=>{s&&!s.hasOwnProperty("result")?n(o,{id:0,jsonrpc:"2.0",result:s}):n(o,s)}):this.send(t,n)}static adapt(i){const t=new Vd(i);return{...i,on:t.on,emit:t.emit,removeListener:t.removeListener,request:t.request,sendAsync:t.sendAsync,send:t.send.bind(t)}}async send(i,t){let n,o,s;const l=typeof t=="function";if(l){const c=i;o=c.params||[],n=c.method,s=t}else n=i,o=t||[],s=(c,f)=>{if(c)throw c;return f};if(this.isModernProvider()){const[c,f]=await this.provider.request({method:n,params:o}).then(y=>[null,y]).catch(y=>[y,void 0]);return s(c,l?{id:"",jsonrpc:"2.0",result:f}:f)}else{this.patchOldMobile();const[c,f]=l?await new Promise(p=>this.provider.send(i,(y,m)=>{p([y,m])})):await new Promise(p=>this.provider.send({jsonrpc:"2.0",id:++this.id,method:n,params:o},(y,m)=>{p([m&&m.hasOwnProperty("error")?m.error:y,m&&m.hasOwnProperty("result")?m.result:m])}));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 VU{constructor(i){this.storage=i,this.getWalletName=()=>{if(this.connector instanceof Ii)return this.connector.getWalletName()},this.clearConnectionData=()=>{const{storageKey:t}=Yi();this.storage.remove(t),Ii.clearStorage(this.storage)},this.handleWeb3ReactDeactivate=async()=>{try{await this.disconnect()}catch(t){console.error(t)}}}async connect(i,t=St.ChainId.ETHEREUM_MAINNET){if(this.connector)try{await this.disconnect()}catch(c){console.error("Error disconnecting previous connection",c)}const n=this.buildConnector(i,t);n.on(Gi.Deactivate,this.handleWeb3ReactDeactivate);let{provider:o,account:s}={};try{const c=await n.activate();o=c.provider,s=c.account}catch(c){throw console.error("Error activating the connector",c),c}(i===jt.ProviderType.MAGIC||i===jt.ProviderType.MAGIC_TEST)&&n.on(Gi.Update,({chainId:c})=>{c&&this.setConnectionData(i,c)});let l=t;if(i===jt.ProviderType.INJECTED){const c=await o.request({method:"eth_chainId"});l=c?parseInt(c,16):l}return this.connector=n,this.setConnectionData(i,l),{provider:Vd.adapt(o),providerType:i,account:s||"",chainId:l}}isConnected(){return!!this.connector&&!!this.getConnectionData()}async tryPreviousConnection(){const i=this.getConnectionData();if(!i)throw new Error("Could not find a valid provider. Make sure to call the `connect` method first");if(this.connector)return{provider:await this.connector.getProvider(),providerType:i.providerType,chainId:i.chainId,account:await this.connector.getAccount()};const t=this.promiseOfConnection?await this.promiseOfConnection:await(this.promiseOfConnection=this.connect(i.providerType,i.chainId));return this.promiseOfConnection=void 0,{...t,chainId:this.getConnectionData().chainId}}getAvailableProviders(){const i=[jt.ProviderType.FORTMATIC,jt.ProviderType.WALLET_CONNECT,jt.ProviderType.WALLET_LINK];return typeof window<"u"&&window.ethereum!==void 0?i.unshift(jt.ProviderType.INJECTED):i.unshift(jt.ProviderType.METAMASK_MOBILE),i}async disconnect(){this.connector&&(this.connector.removeAllListeners(Gi.Deactivate),this.connector.removeAllListeners(Gi.Update),this.connector.deactivate(),this.isClosableConnector()&&await this.connector.close()),this.clearConnectionData(),this.connector=void 0}async getProvider(){if(!this.connector)throw new Error("No valid connector found. Please .connect() first");return this.connector.getProvider()}async createProvider(i,t=St.ChainId.ETHEREUM_MAINNET){const o=await this.buildConnector(i,t).getProvider();return Vd.adapt(o)}buildConnector(i,t){switch(i){case jt.ProviderType.INJECTED:return new IU(t);case jt.ProviderType.FORTMATIC:return new EU(t);case jt.ProviderType.MAGIC:return new oj(t);case jt.ProviderType.MAGIC_TEST:return new BU(t);case jt.ProviderType.WALLET_LINK:return new qU(t);case jt.ProviderType.NETWORK:return new jU(t);case jt.ProviderType.WALLET_CONNECT_V2:return new Ii(t);default:throw new Error(`Invalid provider ${i}`)}}getConnectionData(){const{storageKey:i}=Yi(),t=this.storage.get(i);return t?JSON.parse(t):void 0}setConnectionData(i,t){const{storageKey:n}=Yi(),o=JSON.stringify({providerType:i,chainId:t});this.storage.set(n,o)}isClosableConnector(){return this.connector&&typeof this.connector.close<"u"}}const Ug=new VU(new FU),HU=e=>/^decentraland.(zone|org|today)$/.test(e),zU=async(e,i="https://peer.decentraland.org")=>{try{const n=await(await fetch(`${i}/lambdas/profiles`,{method:"POST",body:JSON.stringify({ids:[e]})})).json();return n.length>0&&n[0]?.avatars?.length>0?n[0].avatars[0]:void 0}catch(t){console.error("Error fetching avatar:",t);return}},WU=e=>({shouldUseBasePath:HU,fetchAvatar:i=>zU(i),...e,debug:e.debug??!1}),GU=e=>({[Dn.ChainId.ETHEREUM_MAINNET]:"Ethereum Mainnet",[Dn.ChainId.ETHEREUM_SEPOLIA]:"Ethereum Sepolia",[Dn.ChainId.MATIC_MAINNET]:"Polygon Mainnet",[Dn.ChainId.MATIC_AMOY]:"Polygon Amoy"})[e]||`Chain ID ${e}`,KU=e=>{const i="0x"+e.toString(16),t=GU(e);switch(e){case Dn.ChainId.MATIC_MAINNET:return{chainId:i,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-mainnet.maticvigil.com/"],blockExplorerUrls:["https://polygonscan.com/"]};case Dn.ChainId.MATIC_AMOY:return{chainId:i,chainName:t,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:["https://rpc-amoy.polygon.technology/"],blockExplorerUrls:["https://www.oklink.com/amoy"]};case Dn.ChainId.ETHEREUM_SEPOLIA:return{chainId:i,chainName:t,nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://sepolia.infura.io/v3/"],blockExplorerUrls:["https://sepolia.etherscan.io"]};default:return{chainId:"0x1",chainName:"Ethereum Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:["https://mainnet.infura.io/v3/"],blockExplorerUrls:["https://etherscan.io"]}}},rR=async e=>{const i=await e.request({method:"eth_chainId"});return parseInt(i,16)},zr=(e,i,t=!1)=>{t&&typeof console<"u"&&console.log(`[Auth] ${e}`,i||"")},YU=(e,i,t)=>{const o=new URLSearchParams(t).get("redirectTo"),s=e.shouldUseBasePath?.(window.location.host)?e.basePath:"",l=o?`${s}${o}`:`${s}${i}${t}`;return`${e.authUrl}/login?redirectTo=${encodeURIComponent(window.location.origin+l)}`},sj=Z.createContext(void 0),XU=({children:e,config:i})=>{const{pathname:t,search:n}=ba(),o=Z.useMemo(()=>WU(i),[i]),[s,l]=Z.useState(),[c,f]=Z.useState(),[p,y]=Z.useState(!1),[m,h]=Z.useState(!1),[O,C]=Z.useState(o.defaultChainId),R=Z.useCallback(()=>{zr("Initiating sign in",{pathname:t,search:n},o.debug);const A=YU(o,t,n);zr("Redirecting to auth",{redirectUrl:A},o.debug),window.location.replace(A)},[t,n,o]),I=Z.useCallback(()=>{try{zr("Signing out",{wallet:s},o.debug),Ug.disconnect(),s&&A_.localStorageClearIdentity(s),l(void 0),f(void 0),y(!1),zr("Sign out completed",void 0,o.debug)}catch(A){console.error("Error during sign-out:",A)}},[s,o.debug]),N=Z.useCallback(async(A=Dn.ChainId.ETHEREUM_MAINNET)=>{try{zr("Changing network",{from:O,to:A},o.debug);const w=await Ug.getProvider();if(!w){console.error("No provider available to switch network"),C(Dn.ChainId.ETHEREUM_MAINNET);return}C(A);try{await w.request({method:"wallet_switchEthereumChain",params:[{chainId:"0x"+A.toString(16)}]});const v=await rR(w);v!==A&&console.warn("Chain ID did not change as expected"),zr("Network changed successfully",{chainId:v},o.debug)}catch(v){const S=v;S.code===4902?(zr("Adding new chain to wallet",{chainId:A},o.debug),await w.request({method:"wallet_addEthereumChain",params:[KU(A)]}),await rR(w)!==A&&(console.warn("Chain ID not set after adding network"),C(Dn.ChainId.ETHEREUM_MAINNET))):(console.error("Error switching network:",S),C(Dn.ChainId.ETHEREUM_MAINNET))}}catch(w){console.error("Error during network change:",w),C(Dn.ChainId.ETHEREUM_MAINNET)}},[O,o.debug]);Z.useEffect(()=>{(async()=>{try{h(!0),zr("Checking auth status",void 0,o.debug);try{const{account:w,chainId:v}=await Ug.tryPreviousConnection();if(w){zr("Previous connection found",{address:w,chainId:v},o.debug),l(w),C(v);let S=!1;try{const M=A_.localStorageGetIdentity(w);if(M&&M.expiration){const F=new Date(M.expiration),W=new Date;W.getTime()<=F.getTime()?(zr("Identity valid",{expiration:F},o.debug),S=!0):zr("Identity expired",{expiration:F,now:W},o.debug)}else zr("No identity found",void 0,o.debug)}catch(M){console.error("Error checking identity:",M)}if(y(S),S&&o.fetchAvatar)try{zr("Fetching avatar",{address:w},o.debug);const M=await o.fetchAvatar(w);M&&(f(M),zr("Avatar fetched successfully",M,o.debug))}catch(M){console.error("Error fetching avatar:",M)}}else zr("No previous connection found",void 0,o.debug)}catch(w){zr("Previous connection failed",w,o.debug)}}catch(w){console.error("Error checking auth status:",w)}finally{h(!1)}})()},[o.debug,o.fetchAvatar]);const _={wallet:s,avatar:c,chainId:O,isSignedIn:p,isConnecting:m,signIn:R,signOut:I,changeNetwork:N};return K.jsx(sj.Provider,{value:_,children:e})},dE=e=>{const i=Z.useContext(sj);if(i===void 0)throw new Error("useAuth must be used within an AuthProvider");return i};var Ro={},ni={},il={exports:{}};var JU=il.exports,nR;function af(){return nR||(nR=1,(function(e,i){(function(t,n){n(i)})(JU,(function(t){function n(E){if(E.jsonrpc="2.0",!E.id||typeof E.id!="number"||Math.floor(E.id)!==E.id)throw new Error(`Invalid RPC message(invalid id) message: ${JSON.stringify(E)}`);if(!E.method||typeof E.method!="string"||E.method.trim().length===0)throw new Error(`Invalid RPC message(invalid method) message: ${JSON.stringify(E)}`);if(!E.params||typeof E.params!="object")throw new Error(`Invalid RPC message(invalid params) message: ${JSON.stringify(E)}`);return E}var o={};function s(){let E,P;const k=new Promise(((X,te)=>{E=oe=>{X(oe),k.isPending=!1},P=oe=>{te(oe),k.isPending=!1}})).catch((X=>Promise.reject(X)));return k.resolve=E,k.reject=P,"finally"in k||(k.finally=X=>{k.then(X),k.catch(X)}),k.isPending=!0,k}Object.defineProperty(o,"__esModule",{value:!0});var l=o.future=s;o.default=s;var c={exports:{}};(function(E){(function(){var P="input is invalid type",k=typeof window=="object",X=k?window:{};X.JS_SHA3_NO_WINDOW&&(k=!1);var te=!k&&typeof self=="object";!X.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node?X=VL:te&&(X=self);var oe=!X.JS_SHA3_NO_COMMON_JS&&E.exports,Ne=!X.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",He="0123456789abcdef".split(""),it=[4,1024,262144,67108864],st=[0,8,16,24],pr=[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],zt=[224,256,384,512],We=[128,256],Er=["hex","buffer","arrayBuffer","array","digest"],Wt={128:168,256:136};!X.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(b){return Object.prototype.toString.call(b)==="[object Array]"}),!Ne||!X.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(b){return typeof b=="object"&&b.buffer&&b.buffer.constructor===ArrayBuffer});for(var kt=function(b,V,x){return function(G){return new Ct(b,V,b).update(G)[x]()}},Ar=function(b,V,x){return function(G,re){return new Ct(b,V,re).update(G)[x]()}},An=function(b,V,x){return function(G,re,ee,ie){return ir["cshake"+b].update(G,re,ee,ie)[x]()}},Xr=function(b,V,x){return function(G,re,ee,ie){return ir["kmac"+b].update(G,re,ee,ie)[x]()}},br=function(b,V,x,G){for(var re=0;re<Er.length;++re){var ee=Er[re];b[ee]=V(x,G,ee)}return b},On=function(b,V){var x=kt(b,V,"hex");return x.create=function(){return new Ct(b,V,b)},x.update=function(G){return x.create().update(G)},br(x,kt,b,V)},nn=[{name:"keccak",padding:[1,256,65536,16777216],bits:zt,createMethod:On},{name:"sha3",padding:[6,1536,393216,100663296],bits:zt,createMethod:On},{name:"shake",padding:[31,7936,2031616,520093696],bits:We,createMethod:function(b,V){var x=Ar(b,V,"hex");return x.create=function(G){return new Ct(b,V,G)},x.update=function(G,re){return x.create(re).update(G)},br(x,Ar,b,V)}},{name:"cshake",padding:it,bits:We,createMethod:function(b,V){var x=Wt[b],G=An(b,0,"hex");return G.create=function(re,ee,ie){return ee||ie?new Ct(b,V,re).bytepad([ee,ie],x):ir["shake"+b].create(re)},G.update=function(re,ee,ie,he){return G.create(ee,ie,he).update(re)},br(G,An,b,V)}},{name:"kmac",padding:it,bits:We,createMethod:function(b,V){var x=Wt[b],G=Xr(b,0,"hex");return G.create=function(re,ee,ie){return new lr(b,V,ee).bytepad(["KMAC",ie],x).bytepad([re],x)},G.update=function(re,ee,ie,he){return G.create(re,ie,he).update(ee)},br(G,Xr,b,V)}}],ir={},Br=[],mr=0;mr<nn.length;++mr)for(var In=nn[mr],Fe=In.bits,mn=0;mn<Fe.length;++mn){var Fn=In.name+"_"+Fe[mn];if(Br.push(Fn),ir[Fn]=In.createMethod(Fe[mn],In.padding),In.name!=="sha3"){var yi=In.name+Fe[mn];Br.push(yi),ir[yi]=ir[Fn]}}function Ct(b,V,x){this.blocks=[],this.s=[],this.padding=V,this.outputBits=x,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(b<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=x>>5,this.extraBytes=(31&x)>>3;for(var G=0;G<50;++G)this.s[G]=0}function lr(b,V,x){Ct.call(this,b,V,x)}Ct.prototype.update=function(b){if(this.finalized)throw new Error("finalize already called");var V,x=typeof b;if(x!=="string"){if(x!=="object")throw new Error(P);if(b===null)throw new Error(P);if(Ne&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!(Array.isArray(b)||Ne&&ArrayBuffer.isView(b)))throw new Error(P);V=!0}for(var G,re,ee=this.blocks,ie=this.byteCount,he=b.length,_e=this.blockCount,ve=0,Ge=this.s;ve<he;){if(this.reset)for(this.reset=!1,ee[0]=this.block,G=1;G<_e+1;++G)ee[G]=0;if(V)for(G=this.start;ve<he&&G<ie;++ve)ee[G>>2]|=b[ve]<<st[3&G++];else for(G=this.start;ve<he&&G<ie;++ve)(re=b.charCodeAt(ve))<128?ee[G>>2]|=re<<st[3&G++]:re<2048?(ee[G>>2]|=(192|re>>6)<<st[3&G++],ee[G>>2]|=(128|63&re)<<st[3&G++]):re<55296||re>=57344?(ee[G>>2]|=(224|re>>12)<<st[3&G++],ee[G>>2]|=(128|re>>6&63)<<st[3&G++],ee[G>>2]|=(128|63&re)<<st[3&G++]):(re=65536+((1023&re)<<10|1023&b.charCodeAt(++ve)),ee[G>>2]|=(240|re>>18)<<st[3&G++],ee[G>>2]|=(128|re>>12&63)<<st[3&G++],ee[G>>2]|=(128|re>>6&63)<<st[3&G++],ee[G>>2]|=(128|63&re)<<st[3&G++]);if(this.lastByteIndex=G,G>=ie){for(this.start=G-ie,this.block=ee[_e],G=0;G<_e;++G)Ge[G]^=ee[G];z(Ge),this.reset=!0}else this.start=G}return this},Ct.prototype.encode=function(b,V){var x=255&b,G=1,re=[x];for(x=255&(b>>=8);x>0;)re.unshift(x),x=255&(b>>=8),++G;return V?re.push(G):re.unshift(G),this.update(re),re.length},Ct.prototype.encodeString=function(b){var V,x=typeof b;if(x!=="string"){if(x!=="object")throw new Error(P);if(b===null)throw new Error(P);if(Ne&&b.constructor===ArrayBuffer)b=new Uint8Array(b);else if(!(Array.isArray(b)||Ne&&ArrayBuffer.isView(b)))throw new Error(P);V=!0}var G=0,re=b.length;if(V)G=re;else for(var ee=0;ee<b.length;++ee){var ie=b.charCodeAt(ee);ie<128?G+=1:ie<2048?G+=2:ie<55296||ie>=57344?G+=3:(ie=65536+((1023&ie)<<10|1023&b.charCodeAt(++ee)),G+=4)}return G+=this.encode(8*G),this.update(b),G},Ct.prototype.bytepad=function(b,V){for(var x=this.encode(V),G=0;G<b.length;++G)x+=this.encodeString(b[G]);var re=V-x%V,ee=[];return ee.length=re,this.update(ee),this},Ct.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var b=this.blocks,V=this.lastByteIndex,x=this.blockCount,G=this.s;if(b[V>>2]|=this.padding[3&V],this.lastByteIndex===this.byteCount)for(b[0]=b[x],V=1;V<x+1;++V)b[V]=0;for(b[x-1]|=2147483648,V=0;V<x;++V)G[V]^=b[V];z(G)}},Ct.prototype.toString=Ct.prototype.hex=function(){this.finalize();for(var b,V=this.blockCount,x=this.s,G=this.outputBlocks,re=this.extraBytes,ee=0,ie=0,he="";ie<G;){for(ee=0;ee<V&&ie<G;++ee,++ie)b=x[ee],he+=He[b>>4&15]+He[15&b]+He[b>>12&15]+He[b>>8&15]+He[b>>20&15]+He[b>>16&15]+He[b>>28&15]+He[b>>24&15];ie%V==0&&(z(x),ee=0)}return re&&(b=x[ee],he+=He[b>>4&15]+He[15&b],re>1&&(he+=He[b>>12&15]+He[b>>8&15]),re>2&&(he+=He[b>>20&15]+He[b>>16&15])),he},Ct.prototype.arrayBuffer=function(){this.finalize();var b,V=this.blockCount,x=this.s,G=this.outputBlocks,re=this.extraBytes,ee=0,ie=0,he=this.outputBits>>3;b=re?new ArrayBuffer(G+1<<2):new ArrayBuffer(he);for(var _e=new Uint32Array(b);ie<G;){for(ee=0;ee<V&&ie<G;++ee,++ie)_e[ie]=x[ee];ie%V==0&&z(x)}return re&&(_e[ee]=x[ee],b=b.slice(0,he)),b},Ct.prototype.buffer=Ct.prototype.arrayBuffer,Ct.prototype.digest=Ct.prototype.array=function(){this.finalize();for(var b,V,x=this.blockCount,G=this.s,re=this.outputBlocks,ee=this.extraBytes,ie=0,he=0,_e=[];he<re;){for(ie=0;ie<x&&he<re;++ie,++he)b=he<<2,V=G[ie],_e[b]=255&V,_e[b+1]=V>>8&255,_e[b+2]=V>>16&255,_e[b+3]=V>>24&255;he%x==0&&z(G)}return ee&&(b=he<<2,V=G[ie],_e[b]=255&V,ee>1&&(_e[b+1]=V>>8&255),ee>2&&(_e[b+2]=V>>16&255)),_e},lr.prototype=new Ct,lr.prototype.finalize=function(){return this.encode(this.outputBits,!0),Ct.prototype.finalize.call(this)};var z=function(b){var V,x,G,re,ee,ie,he,_e,ve,Ge,dt,pt,At,Gt,Xt,Pt,Mt,Zt,Vn,gi,vi,Mr,Pn,yr,cr,Kt,Zo,xo,ea,$o,es,ts,Ia,rs,ns,is,as,os,ss,us,ta,_i,ls,Pa,Ra,Na,Ca,Ma,Hn,cs,ds,fs,ja,La,Ei,bi,ps,Mi,ms,Da,ra,na,ka;for(G=0;G<48;G+=2)re=b[0]^b[10]^b[20]^b[30]^b[40],ee=b[1]^b[11]^b[21]^b[31]^b[41],ie=b[2]^b[12]^b[22]^b[32]^b[42],he=b[3]^b[13]^b[23]^b[33]^b[43],_e=b[4]^b[14]^b[24]^b[34]^b[44],ve=b[5]^b[15]^b[25]^b[35]^b[45],Ge=b[6]^b[16]^b[26]^b[36]^b[46],dt=b[7]^b[17]^b[27]^b[37]^b[47],V=(pt=b[8]^b[18]^b[28]^b[38]^b[48])^(ie<<1|he>>>31),x=(At=b[9]^b[19]^b[29]^b[39]^b[49])^(he<<1|ie>>>31),b[0]^=V,b[1]^=x,b[10]^=V,b[11]^=x,b[20]^=V,b[21]^=x,b[30]^=V,b[31]^=x,b[40]^=V,b[41]^=x,V=re^(_e<<1|ve>>>31),x=ee^(ve<<1|_e>>>31),b[2]^=V,b[3]^=x,b[12]^=V,b[13]^=x,b[22]^=V,b[23]^=x,b[32]^=V,b[33]^=x,b[42]^=V,b[43]^=x,V=ie^(Ge<<1|dt>>>31),x=he^(dt<<1|Ge>>>31),b[4]^=V,b[5]^=x,b[14]^=V,b[15]^=x,b[24]^=V,b[25]^=x,b[34]^=V,b[35]^=x,b[44]^=V,b[45]^=x,V=_e^(pt<<1|At>>>31),x=ve^(At<<1|pt>>>31),b[6]^=V,b[7]^=x,b[16]^=V,b[17]^=x,b[26]^=V,b[27]^=x,b[36]^=V,b[37]^=x,b[46]^=V,b[47]^=x,V=Ge^(re<<1|ee>>>31),x=dt^(ee<<1|re>>>31),b[8]^=V,b[9]^=x,b[18]^=V,b[19]^=x,b[28]^=V,b[29]^=x,b[38]^=V,b[39]^=x,b[48]^=V,b[49]^=x,Gt=b[0],Xt=b[1],Na=b[11]<<4|b[10]>>>28,Ca=b[10]<<4|b[11]>>>28,xo=b[20]<<3|b[21]>>>29,ea=b[21]<<3|b[20]>>>29,Da=b[31]<<9|b[30]>>>23,ra=b[30]<<9|b[31]>>>23,_i=b[40]<<18|b[41]>>>14,ls=b[41]<<18|b[40]>>>14,rs=b[2]<<1|b[3]>>>31,ns=b[3]<<1|b[2]>>>31,Pt=b[13]<<12|b[12]>>>20,Mt=b[12]<<12|b[13]>>>20,Ma=b[22]<<10|b[23]>>>22,Hn=b[23]<<10|b[22]>>>22,$o=b[33]<<13|b[32]>>>19,es=b[32]<<13|b[33]>>>19,na=b[42]<<2|b[43]>>>30,ka=b[43]<<2|b[42]>>>30,La=b[5]<<30|b[4]>>>2,Ei=b[4]<<30|b[5]>>>2,is=b[14]<<6|b[15]>>>26,as=b[15]<<6|b[14]>>>26,Zt=b[25]<<11|b[24]>>>21,Vn=b[24]<<11|b[25]>>>21,cs=b[34]<<15|b[35]>>>17,ds=b[35]<<15|b[34]>>>17,ts=b[45]<<29|b[44]>>>3,Ia=b[44]<<29|b[45]>>>3,yr=b[6]<<28|b[7]>>>4,cr=b[7]<<28|b[6]>>>4,bi=b[17]<<23|b[16]>>>9,ps=b[16]<<23|b[17]>>>9,os=b[26]<<25|b[27]>>>7,ss=b[27]<<25|b[26]>>>7,gi=b[36]<<21|b[37]>>>11,vi=b[37]<<21|b[36]>>>11,fs=b[47]<<24|b[46]>>>8,ja=b[46]<<24|b[47]>>>8,Pa=b[8]<<27|b[9]>>>5,Ra=b[9]<<27|b[8]>>>5,Kt=b[18]<<20|b[19]>>>12,Zo=b[19]<<20|b[18]>>>12,Mi=b[29]<<7|b[28]>>>25,ms=b[28]<<7|b[29]>>>25,us=b[38]<<8|b[39]>>>24,ta=b[39]<<8|b[38]>>>24,Mr=b[48]<<14|b[49]>>>18,Pn=b[49]<<14|b[48]>>>18,b[0]=Gt^~Pt&Zt,b[1]=Xt^~Mt&Vn,b[10]=yr^~Kt&xo,b[11]=cr^~Zo&ea,b[20]=rs^~is&os,b[21]=ns^~as&ss,b[30]=Pa^~Na&Ma,b[31]=Ra^~Ca&Hn,b[40]=La^~bi&Mi,b[41]=Ei^~ps&ms,b[2]=Pt^~Zt&gi,b[3]=Mt^~Vn&vi,b[12]=Kt^~xo&$o,b[13]=Zo^~ea&es,b[22]=is^~os&us,b[23]=as^~ss&ta,b[32]=Na^~Ma&cs,b[33]=Ca^~Hn&ds,b[42]=bi^~Mi&Da,b[43]=ps^~ms&ra,b[4]=Zt^~gi&Mr,b[5]=Vn^~vi&Pn,b[14]=xo^~$o&ts,b[15]=ea^~es&Ia,b[24]=os^~us&_i,b[25]=ss^~ta&ls,b[34]=Ma^~cs&fs,b[35]=Hn^~ds&ja,b[44]=Mi^~Da&na,b[45]=ms^~ra&ka,b[6]=gi^~Mr&Gt,b[7]=vi^~Pn&Xt,b[16]=$o^~ts&yr,b[17]=es^~Ia&cr,b[26]=us^~_i&rs,b[27]=ta^~ls&ns,b[36]=cs^~fs&Pa,b[37]=ds^~ja&Ra,b[46]=Da^~na&La,b[47]=ra^~ka&Ei,b[8]=Mr^~Gt&Pt,b[9]=Pn^~Xt&Mt,b[18]=ts^~yr&Kt,b[19]=Ia^~cr&Zo,b[28]=_i^~rs&is,b[29]=ls^~ns&as,b[38]=fs^~Pa&Na,b[39]=ja^~Ra&Ca,b[48]=na^~La&bi,b[49]=ka^~Ei&ps,b[0]^=pr[G],b[1]^=pr[G+1]};if(oe)E.exports=ir;else for(mr=0;mr<Br.length;++mr)X[Br[mr]]=ir[Br[mr]]})()})(c);var f=c.exports,p=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,y=Math.ceil,m=Math.floor,h="[BigNumber Error] ",O=h+"Number primitive has more than 15 significant digits: ",C=1e14,R=14,I=9007199254740991,N=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],_=1e7,A=1e9;function w(E){var P=0|E;return E>0||E===P?P:P-1}function v(E){for(var P,k,X=1,te=E.length,oe=E[0]+"";X<te;){for(P=E[X++]+"",k=R-P.length;k--;P="0"+P);oe+=P}for(te=oe.length;oe.charCodeAt(--te)===48;);return oe.slice(0,te+1||1)}function S(E,P){var k,X,te=E.c,oe=P.c,Ne=E.s,He=P.s,it=E.e,st=P.e;if(!Ne||!He)return null;if(k=te&&!te[0],X=oe&&!oe[0],k||X)return k?X?0:-He:Ne;if(Ne!=He)return Ne;if(k=Ne<0,X=it==st,!te||!oe)return X?0:!te^k?1:-1;if(!X)return it>st^k?1:-1;for(He=(it=te.length)<(st=oe.length)?it:st,Ne=0;Ne<He;Ne++)if(te[Ne]!=oe[Ne])return te[Ne]>oe[Ne]^k?1:-1;return it==st?0:it>st^k?1:-1}function M(E,P,k,X){if(E<P||E>k||E!==m(E))throw Error(h+(X||"Argument")+(typeof E=="number"?E<P||E>k?" out of range: ":" not an integer: ":" not a primitive number: ")+String(E))}function F(E){var P=E.c.length-1;return w(E.e/R)==P&&E.c[P]%2!=0}function W(E,P){return(E.length>1?E.charAt(0)+"."+E.slice(1):E)+(P<0?"e":"e+")+P}function J(E,P,k){var X,te;if(P<0){for(te=k+".";++P;te+=k);E=te+E}else if(++P>(X=E.length)){for(te=k,P-=X;--P;te+=k);E+=te}else P<X&&(E=E.slice(0,P)+"."+E.slice(P));return E}var pe=(function E(P){var k,X,te,oe,Ne,He,it,st,pr,zt,We=Fe.prototype={constructor:Fe,toString:null,valueOf:null},Er=new Fe(1),Wt=20,kt=4,Ar=-7,An=21,Xr=-1e7,br=1e7,On=!1,nn=1,ir=0,Br={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},mr="0123456789abcdefghijklmnopqrstuvwxyz",In=!0;function Fe(z,b){var V,x,G,re,ee,ie,he,_e,ve=this;if(!(ve instanceof Fe))return new Fe(z,b);if(b==null){if(z&&z._isBigNumber===!0)return ve.s=z.s,void(!z.c||z.e>br?ve.c=ve.e=null:z.e<Xr?ve.c=[ve.e=0]:(ve.e=z.e,ve.c=z.c.slice()));if((ie=typeof z=="number")&&0*z==0){if(ve.s=1/z<0?(z=-z,-1):1,z===~~z){for(re=0,ee=z;ee>=10;ee/=10,re++);return void(re>br?ve.c=ve.e=null:(ve.e=re,ve.c=[z]))}_e=String(z)}else{if(!p.test(_e=String(z)))return te(ve,_e,ie);ve.s=_e.charCodeAt(0)==45?(_e=_e.slice(1),-1):1}(re=_e.indexOf("."))>-1&&(_e=_e.replace(".","")),(ee=_e.search(/e/i))>0?(re<0&&(re=ee),re+=+_e.slice(ee+1),_e=_e.substring(0,ee)):re<0&&(re=_e.length)}else{if(M(b,2,mr.length,"Base"),b==10&&In)return Ct(ve=new Fe(z),Wt+ve.e+1,kt);if(_e=String(z),ie=typeof z=="number"){if(0*z!=0)return te(ve,_e,ie,b);if(ve.s=1/z<0?(_e=_e.slice(1),-1):1,Fe.DEBUG&&_e.replace(/^0\.0*|\./,"").length>15)throw Error(O+z)}else ve.s=_e.charCodeAt(0)===45?(_e=_e.slice(1),-1):1;for(V=mr.slice(0,b),re=ee=0,he=_e.length;ee<he;ee++)if(V.indexOf(x=_e.charAt(ee))<0){if(x=="."){if(ee>re){re=he;continue}}else if(!G&&(_e==_e.toUpperCase()&&(_e=_e.toLowerCase())||_e==_e.toLowerCase()&&(_e=_e.toUpperCase()))){G=!0,ee=-1,re=0;continue}return te(ve,String(z),ie,b)}ie=!1,(re=(_e=X(_e,b,10,ve.s)).indexOf("."))>-1?_e=_e.replace(".",""):re=_e.length}for(ee=0;_e.charCodeAt(ee)===48;ee++);for(he=_e.length;_e.charCodeAt(--he)===48;);if(_e=_e.slice(ee,++he)){if(he-=ee,ie&&Fe.DEBUG&&he>15&&(z>I||z!==m(z)))throw Error(O+ve.s*z);if((re=re-ee-1)>br)ve.c=ve.e=null;else if(re<Xr)ve.c=[ve.e=0];else{if(ve.e=re,ve.c=[],ee=(re+1)%R,re<0&&(ee+=R),ee<he){for(ee&&ve.c.push(+_e.slice(0,ee)),he-=R;ee<he;)ve.c.push(+_e.slice(ee,ee+=R));ee=R-(_e=_e.slice(ee)).length}else ee-=he;for(;ee--;_e+="0");ve.c.push(+_e)}}else ve.c=[ve.e=0]}function mn(z,b,V,x){var G,re,ee,ie,he;if(V==null?V=kt:M(V,0,8),!z.c)return z.toString();if(G=z.c[0],ee=z.e,b==null)he=v(z.c),he=x==1||x==2&&(ee<=Ar||ee>=An)?W(he,ee):J(he,ee,"0");else if(re=(z=Ct(new Fe(z),b,V)).e,ie=(he=v(z.c)).length,x==1||x==2&&(b<=re||re<=Ar)){for(;ie<b;he+="0",ie++);he=W(he,re)}else if(b-=ee,he=J(he,re,"0"),re+1>ie){if(--b>0)for(he+=".";b--;he+="0");}else if((b+=re-ie)>0)for(re+1==ie&&(he+=".");b--;he+="0");return z.s<0&&G?"-"+he:he}function Fn(z,b){for(var V,x=1,G=new Fe(z[0]);x<z.length;x++){if(!(V=new Fe(z[x])).s){G=V;break}b.call(G,V)&&(G=V)}return G}function yi(z,b,V){for(var x=1,G=b.length;!b[--G];b.pop());for(G=b[0];G>=10;G/=10,x++);return(V=x+V*R-1)>br?z.c=z.e=null:V<Xr?z.c=[z.e=0]:(z.e=V,z.c=b),z}function Ct(z,b,V,x){var G,re,ee,ie,he,_e,ve,Ge=z.c,dt=N;if(Ge){e:{for(G=1,ie=Ge[0];ie>=10;ie/=10,G++);if((re=b-G)<0)re+=R,ee=b,ve=(he=Ge[_e=0])/dt[G-ee-1]%10|0;else if((_e=y((re+1)/R))>=Ge.length){if(!x)break e;for(;Ge.length<=_e;Ge.push(0));he=ve=0,G=1,ee=(re%=R)-R+1}else{for(he=ie=Ge[_e],G=1;ie>=10;ie/=10,G++);ve=(ee=(re%=R)-R+G)<0?0:he/dt[G-ee-1]%10|0}if(x=x||b<0||Ge[_e+1]!=null||(ee<0?he:he%dt[G-ee-1]),x=V<4?(ve||x)&&(V==0||V==(z.s<0?3:2)):ve>5||ve==5&&(V==4||x||V==6&&(re>0?ee>0?he/dt[G-ee]:0:Ge[_e-1])%10&1||V==(z.s<0?8:7)),b<1||!Ge[0])return Ge.length=0,x?(b-=z.e+1,Ge[0]=dt[(R-b%R)%R],z.e=-b||0):Ge[0]=z.e=0,z;if(re==0?(Ge.length=_e,ie=1,_e--):(Ge.length=_e+1,ie=dt[R-re],Ge[_e]=ee>0?m(he/dt[G-ee]%dt[ee])*ie:0),x)for(;;){if(_e==0){for(re=1,ee=Ge[0];ee>=10;ee/=10,re++);for(ee=Ge[0]+=ie,ie=1;ee>=10;ee/=10,ie++);re!=ie&&(z.e++,Ge[0]==C&&(Ge[0]=1));break}if(Ge[_e]+=ie,Ge[_e]!=C)break;Ge[_e--]=0,ie=1}for(re=Ge.length;Ge[--re]===0;Ge.pop());}z.e>br?z.c=z.e=null:z.e<Xr&&(z.c=[z.e=0])}return z}function lr(z){var b,V=z.e;return V===null?z.toString():(b=v(z.c),b=V<=Ar||V>=An?W(b,V):J(b,V,"0"),z.s<0?"-"+b:b)}return Fe.clone=E,Fe.ROUND_UP=0,Fe.ROUND_DOWN=1,Fe.ROUND_CEIL=2,Fe.ROUND_FLOOR=3,Fe.ROUND_HALF_UP=4,Fe.ROUND_HALF_DOWN=5,Fe.ROUND_HALF_EVEN=6,Fe.ROUND_HALF_CEIL=7,Fe.ROUND_HALF_FLOOR=8,Fe.EUCLID=9,Fe.config=Fe.set=function(z){var b,V;if(z!=null){if(typeof z!="object")throw Error(h+"Object expected: "+z);if(z.hasOwnProperty(b="DECIMAL_PLACES")&&(M(V=z[b],0,A,b),Wt=V),z.hasOwnProperty(b="ROUNDING_MODE")&&(M(V=z[b],0,8,b),kt=V),z.hasOwnProperty(b="EXPONENTIAL_AT")&&((V=z[b])&&V.pop?(M(V[0],-A,0,b),M(V[1],0,A,b),Ar=V[0],An=V[1]):(M(V,-A,A,b),Ar=-(An=V<0?-V:V))),z.hasOwnProperty(b="RANGE"))if((V=z[b])&&V.pop)M(V[0],-A,-1,b),M(V[1],1,A,b),Xr=V[0],br=V[1];else{if(M(V,-A,A,b),!V)throw Error(h+b+" cannot be zero: "+V);Xr=-(br=V<0?-V:V)}if(z.hasOwnProperty(b="CRYPTO")){if((V=z[b])!==!!V)throw Error(h+b+" not true or false: "+V);if(V){if(typeof crypto>"u"||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw On=!V,Error(h+"crypto unavailable");On=V}else On=V}if(z.hasOwnProperty(b="MODULO_MODE")&&(M(V=z[b],0,9,b),nn=V),z.hasOwnProperty(b="POW_PRECISION")&&(M(V=z[b],0,A,b),ir=V),z.hasOwnProperty(b="FORMAT")){if(typeof(V=z[b])!="object")throw Error(h+b+" not an object: "+V);Br=V}if(z.hasOwnProperty(b="ALPHABET")){if(typeof(V=z[b])!="string"||/^.?$|[+\-.\s]|(.).*\1/.test(V))throw Error(h+b+" invalid: "+V);In=V.slice(0,10)=="0123456789",mr=V}}return{DECIMAL_PLACES:Wt,ROUNDING_MODE:kt,EXPONENTIAL_AT:[Ar,An],RANGE:[Xr,br],CRYPTO:On,MODULO_MODE:nn,POW_PRECISION:ir,FORMAT:Br,ALPHABET:mr}},Fe.isBigNumber=function(z){if(!z||z._isBigNumber!==!0)return!1;if(!Fe.DEBUG)return!0;var b,V,x=z.c,G=z.e,re=z.s;e:if({}.toString.call(x)=="[object Array]"){if((re===1||re===-1)&&G>=-A&&G<=A&&G===m(G)){if(x[0]===0){if(G===0&&x.length===1)return!0;break e}if((b=(G+1)%R)<1&&(b+=R),String(x[0]).length==b){for(b=0;b<x.length;b++)if((V=x[b])<0||V>=C||V!==m(V))break e;if(V!==0)return!0}}}else if(x===null&&G===null&&(re===null||re===1||re===-1))return!0;throw Error(h+"Invalid BigNumber: "+z)},Fe.maximum=Fe.max=function(){return Fn(arguments,We.lt)},Fe.minimum=Fe.min=function(){return Fn(arguments,We.gt)},Fe.random=(oe=9007199254740992,Ne=Math.random()*oe&2097151?function(){return m(Math.random()*oe)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(z){var b,V,x,G,re,ee=0,ie=[],he=new Fe(Er);if(z==null?z=Wt:M(z,0,A),G=y(z/R),On)if(crypto.getRandomValues){for(b=crypto.getRandomValues(new Uint32Array(G*=2));ee<G;)(re=131072*b[ee]+(b[ee+1]>>>11))>=9e15?(V=crypto.getRandomValues(new Uint32Array(2)),b[ee]=V[0],b[ee+1]=V[1]):(ie.push(re%1e14),ee+=2);ee=G/2}else{if(!crypto.randomBytes)throw On=!1,Error(h+"crypto unavailable");for(b=crypto.randomBytes(G*=7);ee<G;)(re=281474976710656*(31&b[ee])+1099511627776*b[ee+1]+4294967296*b[ee+2]+16777216*b[ee+3]+(b[ee+4]<<16)+(b[ee+5]<<8)+b[ee+6])>=9e15?crypto.randomBytes(7).copy(b,ee):(ie.push(re%1e14),ee+=7);ee=G/7}if(!On)for(;ee<G;)(re=Ne())<9e15&&(ie[ee++]=re%1e14);for(G=ie[--ee],z%=R,G&&z&&(re=N[R-z],ie[ee]=m(G/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-=R);for(ee=1,re=ie[0];re>=10;re/=10,ee++);ee<R&&(x-=R-ee)}return he.e=x,he.c=ie,he}),Fe.sum=function(){for(var z=1,b=arguments,V=new Fe(b[0]);z<b.length;)V=V.plus(b[z++]);return V},X=(function(){var z="0123456789";function b(V,x,G,re){for(var ee,ie,he=[0],_e=0,ve=V.length;_e<ve;){for(ie=he.length;ie--;he[ie]*=x);for(he[0]+=re.indexOf(V.charAt(_e++)),ee=0;ee<he.length;ee++)he[ee]>G-1&&(he[ee+1]==null&&(he[ee+1]=0),he[ee+1]+=he[ee]/G|0,he[ee]%=G)}return he.reverse()}return function(V,x,G,re,ee){var ie,he,_e,ve,Ge,dt,pt,At,Gt=V.indexOf("."),Xt=Wt,Pt=kt;for(Gt>=0&&(ve=ir,ir=0,V=V.replace(".",""),dt=(At=new Fe(x)).pow(V.length-Gt),ir=ve,At.c=b(J(v(dt.c),dt.e,"0"),10,G,z),At.e=At.c.length),_e=ve=(pt=b(V,x,G,ee?(ie=mr,z):(ie=z,mr))).length;pt[--ve]==0;pt.pop());if(!pt[0])return ie.charAt(0);if(Gt<0?--_e:(dt.c=pt,dt.e=_e,dt.s=re,pt=(dt=k(dt,At,Xt,Pt,G)).c,Ge=dt.r,_e=dt.e),Gt=pt[he=_e+Xt+1],ve=G/2,Ge=Ge||he<0||pt[he+1]!=null,Ge=Pt<4?(Gt!=null||Ge)&&(Pt==0||Pt==(dt.s<0?3:2)):Gt>ve||Gt==ve&&(Pt==4||Ge||Pt==6&&1&pt[he-1]||Pt==(dt.s<0?8:7)),he<1||!pt[0])V=Ge?J(ie.charAt(1),-Xt,ie.charAt(0)):ie.charAt(0);else{if(pt.length=he,Ge)for(--G;++pt[--he]>G;)pt[he]=0,he||(++_e,pt=[1].concat(pt));for(ve=pt.length;!pt[--ve];);for(Gt=0,V="";Gt<=ve;V+=ie.charAt(pt[Gt++]));V=J(V,_e,ie.charAt(0))}return V}})(),k=(function(){function z(x,G,re){var ee,ie,he,_e,ve=0,Ge=x.length,dt=G%_,pt=G/_|0;for(x=x.slice();Ge--;)ve=((ie=dt*(he=x[Ge]%_)+(ee=pt*he+(_e=x[Ge]/_|0)*dt)%_*_+ve)/re|0)+(ee/_|0)+pt*_e,x[Ge]=ie%re;return ve&&(x=[ve].concat(x)),x}function b(x,G,re,ee){var ie,he;if(re!=ee)he=re>ee?1:-1;else for(ie=he=0;ie<re;ie++)if(x[ie]!=G[ie]){he=x[ie]>G[ie]?1:-1;break}return he}function V(x,G,re,ee){for(var ie=0;re--;)x[re]-=ie,ie=x[re]<G[re]?1:0,x[re]=ie*ee+x[re]-G[re];for(;!x[0]&&x.length>1;x.splice(0,1));}return function(x,G,re,ee,ie){var he,_e,ve,Ge,dt,pt,At,Gt,Xt,Pt,Mt,Zt,Vn,gi,vi,Mr,Pn,yr=x.s==G.s?1:-1,cr=x.c,Kt=G.c;if(!(cr&&cr[0]&&Kt&&Kt[0]))return new Fe(x.s&&G.s&&(cr?!Kt||cr[0]!=Kt[0]:Kt)?cr&&cr[0]==0||!Kt?0*yr:yr/0:NaN);for(Xt=(Gt=new Fe(yr)).c=[],yr=re+(_e=x.e-G.e)+1,ie||(ie=C,_e=w(x.e/R)-w(G.e/R),yr=yr/R|0),ve=0;Kt[ve]==(cr[ve]||0);ve++);if(Kt[ve]>(cr[ve]||0)&&_e--,yr<0)Xt.push(1),Ge=!0;else{for(gi=cr.length,Mr=Kt.length,ve=0,yr+=2,(dt=m(ie/(Kt[0]+1)))>1&&(Kt=z(Kt,dt,ie),cr=z(cr,dt,ie),Mr=Kt.length,gi=cr.length),Vn=Mr,Mt=(Pt=cr.slice(0,Mr)).length;Mt<Mr;Pt[Mt++]=0);Pn=Kt.slice(),Pn=[0].concat(Pn),vi=Kt[0],Kt[1]>=ie/2&&vi++;do{if(dt=0,(he=b(Kt,Pt,Mr,Mt))<0){if(Zt=Pt[0],Mr!=Mt&&(Zt=Zt*ie+(Pt[1]||0)),(dt=m(Zt/vi))>1)for(dt>=ie&&(dt=ie-1),At=(pt=z(Kt,dt,ie)).length,Mt=Pt.length;b(pt,Pt,At,Mt)==1;)dt--,V(pt,Mr<At?Pn:Kt,At,ie),At=pt.length,he=1;else dt==0&&(he=dt=1),At=(pt=Kt.slice()).length;if(At<Mt&&(pt=[0].concat(pt)),V(Pt,pt,Mt,ie),Mt=Pt.length,he==-1)for(;b(Kt,Pt,Mr,Mt)<1;)dt++,V(Pt,Mr<Mt?Pn:Kt,Mt,ie),Mt=Pt.length}else he===0&&(dt++,Pt=[0]);Xt[ve++]=dt,Pt[0]?Pt[Mt++]=cr[Vn]||0:(Pt=[cr[Vn]],Mt=1)}while((Vn++<gi||Pt[0]!=null)&&yr--);Ge=Pt[0]!=null,Xt[0]||Xt.splice(0,1)}if(ie==C){for(ve=1,yr=Xt[0];yr>=10;yr/=10,ve++);Ct(Gt,re+(Gt.e=ve+_e*R-1)+1,ee,Ge)}else Gt.e=_e,Gt.r=+Ge;return Gt}})(),He=/^(-?)0([xbo])(?=\w[\w.]*$)/i,it=/^([^.]+)\.$/,st=/^\.([^.]+)$/,pr=/^-?(Infinity|NaN)$/,zt=/^\s*\+(?=[\w.])|^\s+|\s+$/g,te=function(z,b,V,x){var G,re=V?b:b.replace(zt,"");if(pr.test(re))z.s=isNaN(re)?null:re<0?-1:1;else{if(!V&&(re=re.replace(He,(function(ee,ie,he){return G=(he=he.toLowerCase())=="x"?16:he=="b"?2:8,x&&x!=G?ee:ie})),x&&(G=x,re=re.replace(it,"$1").replace(st,"0.$1")),b!=re))return new Fe(re,G);if(Fe.DEBUG)throw Error(h+"Not a"+(x?" base "+x:"")+" number: "+b);z.s=null}z.c=z.e=null},We.absoluteValue=We.abs=function(){var z=new Fe(this);return z.s<0&&(z.s=1),z},We.comparedTo=function(z,b){return S(this,new Fe(z,b))},We.decimalPlaces=We.dp=function(z,b){var V,x,G,re=this;if(z!=null)return M(z,0,A),b==null?b=kt:M(b,0,8),Ct(new Fe(re),z+re.e+1,b);if(!(V=re.c))return null;if(x=((G=V.length-1)-w(this.e/R))*R,G=V[G])for(;G%10==0;G/=10,x--);return x<0&&(x=0),x},We.dividedBy=We.div=function(z,b){return k(this,new Fe(z,b),Wt,kt)},We.dividedToIntegerBy=We.idiv=function(z,b){return k(this,new Fe(z,b),0,1)},We.exponentiatedBy=We.pow=function(z,b){var V,x,G,re,ee,ie,he,_e,ve=this;if((z=new Fe(z)).c&&!z.isInteger())throw Error(h+"Exponent not an integer: "+lr(z));if(b!=null&&(b=new Fe(b)),ee=z.e>14,!ve.c||!ve.c[0]||ve.c[0]==1&&!ve.e&&ve.c.length==1||!z.c||!z.c[0])return _e=new Fe(Math.pow(+lr(ve),ee?z.s*(2-F(z)):+lr(z))),b?_e.mod(b):_e;if(ie=z.s<0,b){if(b.c?!b.c[0]:!b.s)return new Fe(NaN);(x=!ie&&ve.isInteger()&&b.isInteger())&&(ve=ve.mod(b))}else{if(z.e>9&&(ve.e>0||ve.e<-1||(ve.e==0?ve.c[0]>1||ee&&ve.c[1]>=24e7:ve.c[0]<8e13||ee&&ve.c[0]<=9999975e7)))return re=ve.s<0&&F(z)?-0:0,ve.e>-1&&(re=1/re),new Fe(ie?1/re:re);ir&&(re=y(ir/R+2))}for(ee?(V=new Fe(.5),ie&&(z.s=1),he=F(z)):he=(G=Math.abs(+lr(z)))%2,_e=new Fe(Er);;){if(he){if(!(_e=_e.times(ve)).c)break;re?_e.c.length>re&&(_e.c.length=re):x&&(_e=_e.mod(b))}if(G){if((G=m(G/2))===0)break;he=G%2}else if(Ct(z=z.times(V),z.e+1,1),z.e>14)he=F(z);else{if((G=+lr(z))==0)break;he=G%2}ve=ve.times(ve),re?ve.c&&ve.c.length>re&&(ve.c.length=re):x&&(ve=ve.mod(b))}return x?_e:(ie&&(_e=Er.div(_e)),b?_e.mod(b):re?Ct(_e,ir,kt,void 0):_e)},We.integerValue=function(z){var b=new Fe(this);return z==null?z=kt:M(z,0,8),Ct(b,b.e+1,z)},We.isEqualTo=We.eq=function(z,b){return S(this,new Fe(z,b))===0},We.isFinite=function(){return!!this.c},We.isGreaterThan=We.gt=function(z,b){return S(this,new Fe(z,b))>0},We.isGreaterThanOrEqualTo=We.gte=function(z,b){return(b=S(this,new Fe(z,b)))===1||b===0},We.isInteger=function(){return!!this.c&&w(this.e/R)>this.c.length-2},We.isLessThan=We.lt=function(z,b){return S(this,new Fe(z,b))<0},We.isLessThanOrEqualTo=We.lte=function(z,b){return(b=S(this,new Fe(z,b)))===-1||b===0},We.isNaN=function(){return!this.s},We.isNegative=function(){return this.s<0},We.isPositive=function(){return this.s>0},We.isZero=function(){return!!this.c&&this.c[0]==0},We.minus=function(z,b){var V,x,G,re,ee=this,ie=ee.s;if(b=(z=new Fe(z,b)).s,!ie||!b)return new Fe(NaN);if(ie!=b)return z.s=-b,ee.plus(z);var he=ee.e/R,_e=z.e/R,ve=ee.c,Ge=z.c;if(!he||!_e){if(!ve||!Ge)return ve?(z.s=-b,z):new Fe(Ge?ee:NaN);if(!ve[0]||!Ge[0])return Ge[0]?(z.s=-b,z):new Fe(ve[0]?ee:kt==3?-0:0)}if(he=w(he),_e=w(_e),ve=ve.slice(),ie=he-_e){for((re=ie<0)?(ie=-ie,G=ve):(_e=he,G=Ge),G.reverse(),b=ie;b--;G.push(0));G.reverse()}else for(x=(re=(ie=ve.length)<(b=Ge.length))?ie:b,ie=b=0;b<x;b++)if(ve[b]!=Ge[b]){re=ve[b]<Ge[b];break}if(re&&(G=ve,ve=Ge,Ge=G,z.s=-z.s),(b=(x=Ge.length)-(V=ve.length))>0)for(;b--;ve[V++]=0);for(b=C-1;x>ie;){if(ve[--x]<Ge[x]){for(V=x;V&&!ve[--V];ve[V]=b);--ve[V],ve[x]+=C}ve[x]-=Ge[x]}for(;ve[0]==0;ve.splice(0,1),--_e);return ve[0]?yi(z,ve,_e):(z.s=kt==3?-1:1,z.c=[z.e=0],z)},We.modulo=We.mod=function(z,b){var V,x,G=this;return z=new Fe(z,b),!G.c||!z.s||z.c&&!z.c[0]?new Fe(NaN):!z.c||G.c&&!G.c[0]?new Fe(G):(nn==9?(x=z.s,z.s=1,V=k(G,z,0,3),z.s=x,V.s*=x):V=k(G,z,0,nn),(z=G.minus(V.times(z))).c[0]||nn!=1||(z.s=G.s),z)},We.multipliedBy=We.times=function(z,b){var V,x,G,re,ee,ie,he,_e,ve,Ge,dt,pt,At,Gt,Xt,Pt=this,Mt=Pt.c,Zt=(z=new Fe(z,b)).c;if(!(Mt&&Zt&&Mt[0]&&Zt[0]))return!Pt.s||!z.s||Mt&&!Mt[0]&&!Zt||Zt&&!Zt[0]&&!Mt?z.c=z.e=z.s=null:(z.s*=Pt.s,Mt&&Zt?(z.c=[0],z.e=0):z.c=z.e=null),z;for(x=w(Pt.e/R)+w(z.e/R),z.s*=Pt.s,(he=Mt.length)<(Ge=Zt.length)&&(At=Mt,Mt=Zt,Zt=At,G=he,he=Ge,Ge=G),G=he+Ge,At=[];G--;At.push(0));for(Gt=C,Xt=_,G=Ge;--G>=0;){for(V=0,dt=Zt[G]%Xt,pt=Zt[G]/Xt|0,re=G+(ee=he);re>G;)V=((_e=dt*(_e=Mt[--ee]%Xt)+(ie=pt*_e+(ve=Mt[ee]/Xt|0)*dt)%Xt*Xt+At[re]+V)/Gt|0)+(ie/Xt|0)+pt*ve,At[re--]=_e%Gt;At[re]=V}return V?++x:At.splice(0,1),yi(z,At,x)},We.negated=function(){var z=new Fe(this);return z.s=-z.s||null,z},We.plus=function(z,b){var V,x=this,G=x.s;if(b=(z=new Fe(z,b)).s,!G||!b)return new Fe(NaN);if(G!=b)return z.s=-b,x.minus(z);var re=x.e/R,ee=z.e/R,ie=x.c,he=z.c;if(!re||!ee){if(!ie||!he)return new Fe(G/0);if(!ie[0]||!he[0])return he[0]?z:new Fe(ie[0]?x:0*G)}if(re=w(re),ee=w(ee),ie=ie.slice(),G=re-ee){for(G>0?(ee=re,V=he):(G=-G,V=ie),V.reverse();G--;V.push(0));V.reverse()}for((G=ie.length)-(b=he.length)<0&&(V=he,he=ie,ie=V,b=G),G=0;b;)G=(ie[--b]=ie[b]+he[b]+G)/C|0,ie[b]=C===ie[b]?0:ie[b]%C;return G&&(ie=[G].concat(ie),++ee),yi(z,ie,ee)},We.precision=We.sd=function(z,b){var V,x,G,re=this;if(z!=null&&z!==!!z)return M(z,1,A),b==null?b=kt:M(b,0,8),Ct(new Fe(re),z,b);if(!(V=re.c))return null;if(x=(G=V.length-1)*R+1,G=V[G]){for(;G%10==0;G/=10,x--);for(G=V[0];G>=10;G/=10,x++);}return z&&re.e+1>x&&(x=re.e+1),x},We.shiftedBy=function(z){return M(z,-9007199254740991,I),this.times("1e"+z)},We.squareRoot=We.sqrt=function(){var z,b,V,x,G,re=this,ee=re.c,ie=re.s,he=re.e,_e=Wt+4,ve=new Fe("0.5");if(ie!==1||!ee||!ee[0])return new Fe(!ie||ie<0&&(!ee||ee[0])?NaN:ee?re:1/0);if((ie=Math.sqrt(+lr(re)))==0||ie==1/0?(((b=v(ee)).length+he)%2==0&&(b+="0"),ie=Math.sqrt(+b),he=w((he+1)/2)-(he<0||he%2),V=new Fe(b=ie==1/0?"5e"+he:(b=ie.toExponential()).slice(0,b.indexOf("e")+1)+he)):V=new Fe(ie+""),V.c[0]){for((ie=(he=V.e)+_e)<3&&(ie=0);;)if(G=V,V=ve.times(G.plus(k(re,G,_e,1))),v(G.c).slice(0,ie)===(b=v(V.c)).slice(0,ie)){if(V.e<he&&--ie,(b=b.slice(ie-3,ie+1))!="9999"&&(x||b!="4999")){+b&&(+b.slice(1)||b.charAt(0)!="5")||(Ct(V,V.e+Wt+2,1),z=!V.times(V).eq(re));break}if(!x&&(Ct(G,G.e+Wt+2,0),G.times(G).eq(re))){V=G;break}_e+=4,ie+=4,x=1}}return Ct(V,V.e+Wt+1,kt,z)},We.toExponential=function(z,b){return z!=null&&(M(z,0,A),z++),mn(this,z,b,1)},We.toFixed=function(z,b){return z!=null&&(M(z,0,A),z=z+this.e+1),mn(this,z,b)},We.toFormat=function(z,b,V){var x,G=this;if(V==null)z!=null&&b&&typeof b=="object"?(V=b,b=null):z&&typeof z=="object"?(V=z,z=b=null):V=Br;else if(typeof V!="object")throw Error(h+"Argument not an object: "+V);if(x=G.toFixed(z,b),G.c){var re,ee=x.split("."),ie=+V.groupSize,he=+V.secondaryGroupSize,_e=V.groupSeparator||"",ve=ee[0],Ge=ee[1],dt=G.s<0,pt=dt?ve.slice(1):ve,At=pt.length;if(he&&(re=ie,ie=he,he=re,At-=re),ie>0&&At>0){for(re=At%ie||ie,ve=pt.substr(0,re);re<At;re+=ie)ve+=_e+pt.substr(re,ie);he>0&&(ve+=_e+pt.slice(re)),dt&&(ve="-"+ve)}x=Ge?ve+(V.decimalSeparator||"")+((he=+V.fractionGroupSize)?Ge.replace(new RegExp("\\d{"+he+"}\\B","g"),"$&"+(V.fractionGroupSeparator||"")):Ge):ve}return(V.prefix||"")+x+(V.suffix||"")},We.toFraction=function(z){var b,V,x,G,re,ee,ie,he,_e,ve,Ge,dt,pt=this,At=pt.c;if(z!=null&&(!(ie=new Fe(z)).isInteger()&&(ie.c||ie.s!==1)||ie.lt(Er)))throw Error(h+"Argument "+(ie.isInteger()?"out of range: ":"not an integer: ")+lr(ie));if(!At)return new Fe(pt);for(b=new Fe(Er),_e=V=new Fe(Er),x=he=new Fe(Er),dt=v(At),re=b.e=dt.length-pt.e-1,b.c[0]=N[(ee=re%R)<0?R+ee:ee],z=!z||ie.comparedTo(b)>0?re>0?b:_e:ie,ee=br,br=1/0,ie=new Fe(dt),he.c[0]=0;ve=k(ie,b,0,1),(G=V.plus(ve.times(x))).comparedTo(z)!=1;)V=x,x=G,_e=he.plus(ve.times(G=_e)),he=G,b=ie.minus(ve.times(G=b)),ie=G;return G=k(z.minus(V),x,0,1),he=he.plus(G.times(_e)),V=V.plus(G.times(x)),he.s=_e.s=pt.s,Ge=k(_e,x,re*=2,kt).minus(pt).abs().comparedTo(k(he,V,re,kt).minus(pt).abs())<1?[_e,x]:[he,V],br=ee,Ge},We.toNumber=function(){return+lr(this)},We.toPrecision=function(z,b){return z!=null&&M(z,1,A),mn(this,z,b,2)},We.toString=function(z){var b,V=this,x=V.s,G=V.e;return G===null?x?(b="Infinity",x<0&&(b="-"+b)):b="NaN":(z==null?b=G<=Ar||G>=An?W(v(V.c),G):J(v(V.c),G,"0"):z===10&&In?b=J(v((V=Ct(new Fe(V),Wt+G+1,kt)).c),V.e,"0"):(M(z,2,mr.length,"Base"),b=X(J(v(V.c),G,"0"),10,z,x,!0)),x<0&&V.c[0]&&(b="-"+b)),b},We.valueOf=We.toJSON=function(){return lr(this)},We._isBigNumber=!0,We[Symbol.toStringTag]="BigNumber",We[Symbol.for("nodejs.util.inspect.custom")]=We.valueOf,P!=null&&Fe.set(P),Fe})();const Oe={ROUNDING_MODE:pe.ROUND_DOWN};function Ae(E){return new TextEncoder().encode(E)}function be(E){return typeof E=="string"?be(Te(E)):new TextDecoder().decode(E)}pe.config(Oe);const Le="UNKNOWN_ERROR",Me="INVALID_ARGUMENT";function Be(E,P=Le,k={}){const X=[];Object.keys(k).forEach((Ne=>{try{X.push(Ne+"="+JSON.stringify(k[Ne]))}catch{X.push(Ne+"="+JSON.stringify(k[Ne].toString()))}}));const te=E;X.length&&(E+=" ("+X.join(", ")+")");const oe=new Error(E);return oe.reason=te,oe.code=P,Object.keys(k).forEach((function(Ne){oe[Ne]=k[Ne]})),oe}function Te(E){if(typeof E!="string")throw new Error("hexToBytes only accept strings, got: "+typeof E);if(E.substr(0,2)==="0x")return Te(E.substr(2));const P=new Uint8Array(Math.ceil(E.length/2));let k=0;for(let X=0;X<E.length;X+=2){const te=parseInt(E.substr(X,2),16);if(isNaN(te))throw new Error("Cannot read hex string:"+JSON.stringify(E));P[k]=te,k++}return P}function ce(E){return Array.from(E).map((P=>P.toString(16).padStart(2,"0"))).join("")}function Y(E,P){if(typeof E=="string"){if(P&&P.encoding==="hex"&&typeof E=="string"){let k=E;k.length>2&&k.substr(0,2)==="0x"&&(k=k.substr(2));const X=Te(k);return f.keccak256(X)}return f.keccak256(Ae(E))}return f.keccak256(E)}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 B(E,P,k){return new Array(P-E.length+1).join(k||"0")+E}function q(E){let P="",k=0;const X=E.length;for(E.substring(0,2)==="0x"&&(k=2);k<X;k+=2){const te=parseInt(E.substr(k,2),16);P+=String.fromCharCode(te)}return P}function L(E){return en(E)&&E.name&&E.name.indexOf("(")!==-1?E.name:E.name+"("+le(!1,E.inputs||[]).join(",")+")"}function H(...E){const P=E.reduce(((te,oe)=>te+oe.length),0),k=new Uint8Array(P);let X=0;for(const te of E)k.set(te,X),X+=te.length;return k}function le(E,P){const k=[];return P.forEach((function(X){if(typeof X.components=="object"){if(X.type.substring(0,5)!=="tuple")throw new Error("components found but type is not tuple; report on GitHub");let te="";const oe=X.type.indexOf("[");oe>=0&&(te=X.type.substring(oe));const Ne=le(E,X.components);k.push("("+Ne.join(",")+")"+te)}else k.push(X.type)})),k}function ye(E){const P=E.indexOf("("),k=E.indexOf(")");return P!==-1&&k!==-1?E.substr(0,P):E}function fe(E){const P=E.indexOf("("),k=E.indexOf(")");return P!==-1&&k!==-1?E.substr(P+1,k-P-1).replace(" ",""):""}function Pe(E){return E==null?E:Dt(E).toNumber()}function Re(E){return Dt(E).toNumber()}function ae(E){return Rr(E)?E.toString(10):""+E}function ue(E){return typeof E=="string"&&!E.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E)?"0x"+E:Xe(E)}function Ie(E){if(typeof E=="string")return E.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E)?Xe(E):"0x"+ce(Ae(E));if(E instanceof Uint8Array)return"0x"+ce(E);throw new Error(`toStringData: Error trying to convert ${E} (${typeof E}) to a hex string.`)}function je(E){return typeof E=="boolean"?E:Dt(E).toNumber()!==0}function qe(E){const P=Dt(E),k=P.toString(16);return P.isLessThan(0)?"-0x"+k.substr(1):"0x"+k}function Xe(E){if(bn(E))return qe(+E);if(Rr(E))return qe(E);if(En(E)){const P=E;if(P.indexOf("-0x")===0)return qe(P);if(P.indexOf("0x")===0)return P;if(!isFinite(P))return ce(Ae(P))}if(E instanceof Uint8Array)return"0x"+ce(E);if(tn(E)||en(E))throw new Error("toHex can only be called with scalar values, not objects or arrays");return qe(E)}function Ht(E){const P=E?E.toLowerCase():"ether",k=j[P];if(k===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 pe(k,10)}function Dt(E){let P=E||0;return Rr(P)?P:(typeof P=="string"&&(P=P.trim()),typeof P!="string"||P.indexOf("0x")!==0&&P.indexOf("-0x")!==0?P instanceof Uint8Array?new pe(ce(P),16):new pe(P,10):new pe(P.replace("0x","").toLowerCase(),16))}function nr(E){return new pe(new Array(E).fill("1").join(""),2)}function Ft(E,P=256){const k=Dt(E).integerValue();return k.isLessThan(0)?nr(P).plus(k).plus(1):k}function Vt(E,P){return B(E.toString(2),P,"0")[0]==="1"}function Gr(E){if(typeof E!="string")throw Be("invalid address",Me,{arg:"address",value:E});if(E.trim().match(/^(0x)?[0-9a-fA-F]{40}$/))return E.trim().substring(0,2)!=="0x"&&(E="0x"+E),fn(E);throw Be("invalid address",Me,{arg:"address",value:E})}function sr(E,P=256){if(Vt(E,P)){const k=nr(P);return E.minus(k).minus(1)}return E}function _n(E){return/^0x[0-9a-f]{40}$/i.test(E)}function xr(E){return!!/^(0x)?[0-9a-f]{40}$/i.test(E)&&(!(!/^(0x)?[0-9a-f]{40}$/.test(E)&&!/^(0x)?[0-9A-F]{40}$/.test(E))||$r(E))}function $r(E){const P=E.replace("0x",""),k=Y(P.toLowerCase());for(let X=0;X<40;X++)if(parseInt(k[X],16)>7&&P[X].toUpperCase()!==P[X]||parseInt(k[X],16)<=7&&P[X].toLowerCase()!==P[X])return!1;return!0}function fn(E){if(E===void 0)return"";const P=E.toLowerCase().replace("0x",""),k=Y(P);let X="0x";for(let te=0;te<P.length;te++)parseInt(k[te],16)>7?X+=P[te].toUpperCase():X+=P[te];return X}function ur(E){if(!Array.isArray(E))throw new Error(`Value was not an array: ${JSON.stringify(E)}`);return E}function pn(E){return _n(E)?E:/^[0-9a-f]{40}$/.test(E)?"0x"+E:"0x"+B(Xe(E).substr(2),40)}function Rr(E){return E instanceof pe}function En(E){return typeof E=="string"||E&&E.constructor&&E.constructor.name==="String"}function en(E){return E!==null&&!Array.isArray(E)&&typeof E=="object"}function bn(E){return typeof E=="boolean"}function tn(E){return Array.isArray(E)}var Zi,wn;function Pi(E,P){if(!E)throw new Error("jsonrpc method should be specified!");if(typeof E!="string")throw new Error(`jsonrpc must be a string, got ${typeof E}!`);return t.messageId++,{jsonrpc:"2.0",id:t.messageId,method:E,params:P||[]}}function Ri(E){return Array.isArray(E)?E.every(P):P(E);function P(k){return!!k&&(k.error===void 0||k.error===null)&&k.jsonrpc==="2.0"&&k.id!==null&&"result"in k&&k.result!==void 0}}t.TransactionStatus=void 0,(Zi=t.TransactionStatus||(t.TransactionStatus={})).pending="pending",Zi.confirmed="confirmed",Zi.failed="failed",t.TransactionType=void 0,(wn=t.TransactionType||(t.TransactionType={})).queued="queued",wn.dropped="dropped",wn.replaced="replaced",wn.pending="pending",wn.reverted="reverted",wn.confirmed="confirmed",t.messageId=0;function mi(E){return Dt(E)}function Ni(E){return E==="latest"||E==="pending"||E==="earliest"}function Nr(E){return E===void 0?"latest":Ot(E)}function Ot(E){return E==null?null:Ni(E)?E:Xe(E)}function Kr(E){return E.from&&(E.from=Ce(E.from)),E.to&&(E.to=Ce(E.to)),E.gasPrice!==void 0&&(E.gasPrice=qe(E.gasPrice)),E.gas!==void 0&&(E.gas=qe(E.gas)),E.value!==void 0&&(E.value=qe(E.value)),E.nonce!==void 0&&(E.nonce=qe(E.nonce)),E.data&&!E.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E.data)&&(E.data="0x"+E.data),E}function rn(E){if(typeof E!="string")throw new Error("The provided input for transactionId is not a string, got: "+JSON.stringify(E));if(E.indexOf("0x")!==0)throw new Error("TransactionID must start with 0x, got: "+JSON.stringify(E));if(E.length!==66)throw new Error("TransactionID must be a 32 byte hex, got: "+JSON.stringify(E));return E}function ne(E){if(typeof E!="object")throw new Error("Did not provide transaction options");if(!E.from)throw new Error('Missing "from" in transaction options');return E.from=Ce(E.from),E.to&&(E.to=Ce(E.to)),E.gasPrice!==void 0&&(E.gasPrice=qe(E.gasPrice)),E.gas!==void 0&&(E.gas=qe(E.gas)),E.value!==void 0&&(E.value=qe(E.value)),E.nonce!==void 0&&(E.nonce=qe(E.nonce)),E.data&&!E.data.startsWith("0x")&&/^[A-Za-z0-9]+$/.test(E.data)&&(E.data="0x"+E.data),E}function U(E){return E?(E.blockNumber!==null&&(E.blockNumber=Re(E.blockNumber)),E.transactionIndex!==null&&(E.transactionIndex=Re(E.transactionIndex)),E.nonce=Re(E.nonce),E.gas=Re(E.gas),E.gasPrice=Dt(E.gasPrice),E.value=Dt(E.value),E):null}function $(E){return E?(E.blockNumber!==null&&(E.blockNumber=Re(E.blockNumber)),E.transactionIndex!==null&&(E.transactionIndex=Re(E.transactionIndex)),E.cumulativeGasUsed=Re(E.cumulativeGasUsed),E.gasUsed=Re(E.gasUsed),E.logs&&tn(E.logs)&&(E.logs=E.logs.map((function(P){return Se(P)}))),E.status=Re(E.status||""),E):null}function me(E){return E?(E.gasLimit=Re(E.gasLimit),E.gasUsed=Re(E.gasUsed),E.size=Re(E.size),E.timestamp=Re(E.timestamp),E.number!==null&&(E.number=Re(E.number)),E.difficulty=Dt(E.difficulty),E.totalDifficulty=Dt(E.totalDifficulty),tn(E.transactions)&&E.transactions.forEach((function(P,k){En(P)||(E.transactions[k]=U(P)||E.transactions[k])})),E):null}function Se(E){return E&&(E.blockNumber&&(E.blockNumber=Re(E.blockNumber)),E.transactionIndex&&(E.transactionIndex=Re(E.transactionIndex)),E.logIndex&&(E.logIndex=Re(E.logIndex)),E)}function Ce(E){if(_n(E))return E;if(xr(E))return"0x"+E;throw new Error(`Invalid address: ${JSON.stringify(E)}`)}function Ke(E){return E}function Ye(E){return E&&(E.startingBlock=Re(E.startingBlock),E.currentBlock=Re(E.currentBlock),E.highestBlock=Re(E.highestBlock),E.knownStates&&(E.knownStates=Re(E.knownStates),E.pulledStates=Re(E.pulledStates)),E)}function mt(E){if(E===null)throw Be("cannot convert null value to array",Me,{arg:"value",value:E});if(E instanceof Uint8Array)return new Uint8Array(E);if(typeof E=="string"){const P=E.match(/^(0x)?[0-9a-fA-F]*$/);if(!P)throw Be("invalid hexidecimal string",Me,{arg:"value",value:E});if(P[1]!=="0x")throw Be("hex string must have 0x prefix",Me,{arg:"value",value:E});(E=E.substring(2)).length%2&&(E="0"+E);const k=[];for(let X=0;X<E.length;X+=2)k.push(parseInt(E.substr(X,2),16));return new Uint8Array(k)}if((function(P){if(!P||parseInt(String(P.length))!==P.length||typeof P=="string")return!1;for(let k=0;k<P.length;k++){const X=P[k];if(X<0||X>=256||parseInt(String(X))!==X)return!1}return!0})(E))return new Uint8Array(E);throw Be("invalid arrayify value",void 0,{arg:"value",value:E,type:typeof E})}function ut(E,P,k){Object.defineProperty(E,P,{enumerable:!0,value:k,writable:!1})}const _t=new pe(-1),Tt=new pe(0),It=new pe(1),er=new pe("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Qt(E){return(function(P,k){function X(Ne){return new Error('unexpected character "'+P[Ne]+'" at position '+Ne+' in "'+P+'"')}const te={type:"",name:"",state:{allowType:!0}};let oe=te;for(let Ne=0;Ne<P.length;Ne++){const He=P[Ne];switch(He){case"(":if(!oe.state.allowParams)throw X(Ne);oe.state.allowType=!1,oe.type=vr(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=vr(oe.type);const it=oe;if(oe=oe.parent,!oe)throw X(Ne);delete it.parent,oe.state.allowParams=!1,oe.state.allowName=!0,oe.state.allowArray=!0;break;case",":delete oe.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),oe.type=vr(oe.type);const st={type:"",name:"",parent:oe.parent,state:{allowType:!0}};oe.parent.components.push(st),delete oe.parent,oe=st;break;case" ":oe.state.allowType&&oe.type!==""&&(oe.type=vr(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 X(Ne);oe.type+=He,oe.state.allowArray=!1,oe.state.allowName=!1,oe.state.readArray=!0;break;case"]":if(!oe.state.readArray)throw X(Ne);oe.type+=He,oe.state.readArray=!1,oe.state.allowArray=!0,oe.state.allowName=!0;break;default:if(oe.state.allowType)oe.type+=He,oe.state.allowParams=!0,oe.state.allowArray=!0;else if(oe.state.allowName)oe.name+=He,delete oe.state.allowArray;else{if(!oe.state.readArray)throw X(Ne);oe.type+=He}}}if(oe.parent)throw new Error("unexpected eof");return delete te.state,oe.name==="indexed"&&(oe.indexed=!0,oe.name=""),te.type=vr(te.type),te})(E)}function vr(E){return E.match(/^uint($|[^1-9])/)?E="uint256"+E.substring(4):E.match(/^int($|[^1-9])/)&&(E="int256"+E.substring(3)),E}const qr=new RegExp(/^bytes([0-9]*)$/),Sn=new RegExp(/^(u?int)([0-9]*)$/),Bn=new RegExp(/^(.*)\[([0-9]*)\]$/),xi=function(E,P){const k=E.match(Sn);return k&&parseInt(k[2])<=48?P.toNumber():P};class Cr{constructor(P,k,X,te="",oe){this.coerceFunc=P,this.name=k,this.type=X,this.localName=te,this.dynamic=oe}}class hi extends Cr{constructor(P){super(P.coerceFunc,P.name,P.type,void 0,P.dynamic),ut(this,"coder",P)}encode(P){return this.coder.encode(P)}decode(P,k){return this.coder.decode(P,k)}}class Ks extends Cr{constructor(P,k){super(P,"null","",k,!1)}encode(P){return mt([])}decode(P,k){if(k>P.length)throw new Error("invalid null");return{consumed:0,value:this.coerceFunc("null",void 0)}}}function wa(E,P){return new pe(E.toString(2).substr(-P),2)}class wl extends Cr{constructor(P,k,X,te){const oe=(X?"int":"uint")+8*k;super(P,oe,oe,te,!1),this.size=k,this.signed=X}encode(P){try{let k=Dt(P);if(this.signed){let te=wa(er,8*this.size-1);if(k.gt(te))throw new Error("out-of-bounds");if(te=te.plus(It).multipliedBy(_t),k.lt(te))throw new Error("out-of-bounds")}else if(k.lt(Tt)||k.gt(wa(er,8*this.size)))throw new Error("out-of-bounds");k=wa(Ft(k,8*this.size),8*this.size),this.signed&&(k=Ft(sr(k,8*this.size),256));const X=B(Ft(k).toString(16),64);if(X.indexOf("NaN")!==-1)throw Be("invalid number value, NaN",Me,{arg:this.localName,coderType:this.name,value:P,v:k,twosComplement:Ft(k),twosComplement16:Ft(k).toString(16),pad:B(Ft(k).toString(16),64),size:this.size});return Te(X)}catch(k){throw Be("invalid number value",Me,{arg:this.localName,coderType:this.name,value:P,message:k.toString()})}}decode(P,k){if(P.length<k+32)throw Be("insufficient data for "+this.name+" type",Me,{arg:this.localName,coderType:this.name,value:Xe(P.slice(k,k+32))});const X=32-this.size;let te=new pe(ce(P.slice(k+X,k+32)),16);return te=this.signed?sr(te,8*this.size):wa(te,8*this.size),{consumed:32,value:this.coerceFunc(this.name,te)}}}const Un=new wl((function(E,P){return P}),32,!1,"none");class tr extends Cr{constructor(P,k,X){const te="bytes"+k;super(P,te,te,X,!1),this.length=k}encode(P){const k=new Uint8Array(32);try{if(typeof P=="string"&&P.length%2!=0)throw new Error("hex string cannot be odd-length");const X=mt(P);if(X.length>this.length)throw new Error("incorrect data length");k.set(X)}catch(X){throw Be("invalid "+this.name+" value. Use hex strings or Uint8Array",Me,{arg:this.localName,coderType:this.name,value:X.value||P,details:X.message})}return k}decode(P,k){if(P.length<k+32)throw Be("insufficient data for "+this.name+" type",Me,{arg:this.localName,coderType:this.name,value:Xe(P.slice(k,k+32))});return{consumed:32,value:this.coerceFunc(this.name,P.slice(k,k+this.length))}}}function Sl(E){const P=32*Math.ceil(E.length/32),k=new Uint8Array(P-E.length);return H(Un.encode(E.length),E,k)}function Xo(E,P,k){if(E.length<P+32)throw Be("insufficient data for dynamicBytes length",Me,{arg:k,coderType:"dynamicBytes",value:Xe(E.slice(P,P+32))});let X=Un.decode(E,P).value;try{X=X.toNumber()}catch(te){throw te("dynamic bytes count too large",Me,{arg:k,coderType:"dynamicBytes",value:X.toString()})}if(E.length<P+32+X)throw Be("insufficient data for dynamicBytes type",Me,{arg:k,coderType:"dynamicBytes",value:Xe(E.slice(P,P+32+X))});return{consumed:32+32*Math.ceil(X/32),value:E.slice(P+32,P+32+X)}}function Sa(E){return 32*Math.ceil(E/32)}function Ta(E,P){if(!Array.isArray(P)){if(!P||typeof P!="object")throw Be("invalid tuple value",Me,{coderType:"tuple",value:P});{const it=[];E.forEach((function(st){it.push(P[st.localName])})),P=it}}if(E.length!==P.length)throw Be("types/value length mismatch",Me,{coderType:"tuple",value:P});const k=[];E.forEach((function(it,st){k.push({dynamic:it.dynamic,value:it.encode(P[st])})}));let X=0,te=0;k.forEach((function(it){it.dynamic?(X+=32,te+=Sa(it.value.length)):X+=Sa(it.value.length)}));let oe=0,Ne=X;const He=new Uint8Array(X+te);return k.forEach((function(it){it.dynamic?(He.set(Un.encode(Ne),oe),oe+=32,He.set(it.value,Ne),Ne+=Sa(it.value.length)):(He.set(it.value,oe),oe+=Sa(it.value.length))})),He}class ff extends Array{}class Tl extends Cr{constructor(P,k,X,te){super(P,"array",k.type+"["+(X>=0?X:"")+"]",te,X===-1||k.dynamic),this.coder=k,this.length=X}encode(P){if(!Array.isArray(P))throw Be("expected array value",Me,{arg:this.localName,coderType:"array",value:P});let k=this.length,X=new Uint8Array(0);k===-1&&(k=P.length,X=Un.encode(k)),(function(oe,Ne,He){if(He||(He=""),oe<Ne)throw Be("missing argument"+He,"MISSING_ARGUMENT",{count:oe,expectedCount:Ne});if(oe>Ne)throw Be("too many arguments"+He,"UNEXPECTED_ARGUMENT",{count:oe,expectedCount:Ne})})(k,P.length,"in coder array"+(this.localName?" "+this.localName:""));const te=[];for(let oe=0;oe<P.length;oe++)te.push(this.coder);return H(X,Ta(te,P))}decode(P,k){let X=0,te=this.length;if(te===-1){let He;try{He=Un.decode(P,k)}catch(it){throw Be("insufficient data for dynamic array length",Me,{arg:this.localName,coderType:"array",value:it.value})}try{te=He.value.toNumber()}catch{throw Be("array count too large",Me,{arg:this.localName,coderType:"array",value:He.value.toString()})}X+=He.consumed,k+=He.consumed}const oe=[];for(let He=0;He<te;He++)oe.push(new hi(this.coder));const Ne=(function(He,it,st){const pr=st;let zt=0;const We=[];return He.forEach((function(Er){let Wt;if(Er.dynamic){const kt=Un.decode(it,st);Wt=Er.decode(it,pr+kt.value.toNumber()),Wt.consumed=kt.consumed}else Wt=Er.decode(it,st);Wt.value!==void 0&&We.push(Wt.value),st+=Wt.consumed,zt+=Wt.consumed})),{value:We,consumed:zt}})(oe,P,k);return Ne.consumed+=X,Ne.value=this.coerceFunc(this.type,Ne.value),Ne}}class $i extends Cr{constructor(P,k,X){let te=!1;const oe=[];k.forEach((function(Ne){Ne.dynamic&&(te=!0),oe.push(Ne.type)})),super(P,"tuple","tuple("+oe.join(",")+")",X,te),this.coders=k}encode(P){return Ta(this.coders,P)}decode(P,k){const X=(function(te,oe,Ne){const He=Ne;let it=0;const st=new ff;return te.forEach((function(pr){let zt;if(pr.dynamic){const We=Un.decode(oe,Ne);zt=pr.decode(oe,He+We.value.toNumber()),zt.consumed=We.consumed}else zt=pr.decode(oe,Ne);zt.value!==void 0&&st.push(zt.value),Ne+=zt.consumed,it+=zt.consumed})),te.forEach((function(pr,zt){let We=pr.localName;We&&(We==="length"&&(We="_length"),st[We]!==null&&st[We]!==void 0||(st[We]=st[zt]))})),{value:st,consumed:it}})(this.coders,P,k);return X.value=this.coerceFunc(this.type,X.value),X}}const Tn={address:class extends Cr{constructor(E,P){super(E,"address","address",P,!1)}encode(E){const P=new Uint8Array(32),k=E.trim();if(!xr(k))throw Be("invalid address format",Me,{arg:this.localName,coderType:"address",value:E});try{P.set(Te(Ce(k)),12)}catch(X){throw Be(`invalid address (${X.message})`,Me,{arg:this.localName,coderType:"address",value:E})}return P}decode(E,P){if(E.length<P+32)throw Be("insufficuent data for address type",Me,{arg:this.localName,coderType:"address",value:Xe(E.slice(P,P+32)),missingBytes:P+32-E.length});return{consumed:32,value:this.coerceFunc("address",Gr(Xe(E.slice(P+12,P+32))))}}},bool:class extends Cr{constructor(E,P){super(E,"bool","bool",P,!1)}encode(E){return Un.encode(E?1:0)}decode(E,P){try{const k=Un.decode(E,P);return{consumed:k.consumed,value:this.coerceFunc("bool",!k.value.isZero())}}catch(k){throw k.reason==="insufficient data for uint256 type"?Be("insufficient data for boolean type",Me,{arg:this.localName,coderType:"boolean",value:k.value}):k}}},string:class extends Cr{constructor(E,P){super(E,"string","string",P,!0)}encode(E){if(typeof E!="string")throw Be("invalid string value",Me,{arg:this.localName,coderType:"string",value:E});return Sl(Ae(E))}decode(E,P){const k=Xo(E,P,this.localName);return k.value=this.coerceFunc("string",be(k.value)),k}},bytes:class extends Cr{constructor(E,P){super(E,"bytes","bytes",P,!0)}encode(E){try{return Sl(mt(E))}catch(P){throw P("invalid bytes value",Me,{arg:this.localName,coderType:"bytes",value:P.value})}}decode(E,P){const k=Xo(E,P,this.localName);return k.value=this.coerceFunc("bytes",k.value),k}},function:class extends tr{constructor(E,P){super(E,24,P)}}};function Jo(E,P){const k=Tn[P.type];if(k)return new k(E,P.name);let X=P.type.match(Sn);if(X){const te=parseInt(X[2]||"256");if(te===0||te>256||te%8!=0)throw Be("invalid "+X[1]+" bit length",Me,{arg:"param",value:P});return new wl(E,te/8,X[1]==="int",P.name)}if(X=P.type.match(qr),X){const te=parseInt(X[1]);if(te===0||te>32)throw Be("invalid bytes length",Me,{arg:"param",value:P});return new tr(E,te,P.name)}if(X=P.type.match(Bn),X){const te=Object.assign({},P),oe=parseInt(X[2]||"-1");return te.type=X[1],new Tl(E,Jo(E,te),oe,P.name)}if(P.type.substring(0,5)==="tuple")return(function(te,oe,Ne){oe||(oe=[]);const He=oe.map((it=>Jo(te,it)));return new $i(te,He,Ne)})(E,P.components,P.name);if(P.type==="")return new Ks(E,P.name);throw Be("invalid type",Me,{arg:"type",value:P.type,fullType:P})}class Yr{constructor(P){(function(k,X){if(!(k instanceof X))throw Be("missing new","MISSING_NEW",{name:X.name})})(this,Yr),P||(P=xi),ut(this,"coerceFunc",P)}encode(P,k){if(P.length!==k.length)throw Be("types/values length mismatch",Me,{count:{types:P.length,values:k.length},value:{types:P,values:k}});const X=P.map((te=>typeof te=="string"?Qt(te):te)).map((te=>Jo(this.coerceFunc,te)));return new $i(this.coerceFunc,X,"_").encode(k)}decode(P,k){const X=P.map((te=>typeof te=="string"?Qt(te):te)).map((te=>Jo(this.coerceFunc,te)));return new $i(this.coerceFunc,X,"_").decode(k,0).value}}const Al=new Yr;var Ol,tt;function xe(E,P,k,X){var te,oe=arguments.length,Ne=oe<3?P:X;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ne=Reflect.decorate(E,P,k,X);else for(var He=E.length-1;He>=0;He--)(te=E[He])&&(Ne=(oe<3?te(Ne):oe>3?te(P,k,Ne):te(P,k))||Ne);return oe>3&&Ne&&Object.defineProperty(P,k,Ne),Ne}function $e(E,P){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(E,P)}t.coder=void 0,(Ol=t.coder||(t.coder={})).encodeParams=function(E,P){return ce(Al.encode(E,P))},Ol.decodeParams=function(E,P){if(E.length>0&&(!P||P==="0x"||P==="0X"))throw new Error("Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.");return Al.decode(E,Te("0x"+P.replace(/0x/i,"")))},typeof SuppressedError=="function"&&SuppressedError;class ft{constructor(P){this.callName=P.callName,this.params=P.params||0,this.inputFormatter=P.inputFormatter||null,this.outputFormatter=P.outputFormatter}validateArgs(P){if(P.length!==this.params)throw k=this.callName,X=P.length,te=this.params,new Error(`Invalid number of input parameters to RPC method "${k}" given: ${X}, expected: ${te}`);var k,X,te}formatInput(P){return this.inputFormatter?this.inputFormatter.map((function(k,X){return k?k(P[X]):P[X]})):P}formatOutput(P){return P!==null?this.outputFormatter(P):null}toPayload(P){const k=this.formatInput(P);return this.validateArgs(k),{method:this.callName,params:k}}async execute(P,...k){const X=this.toPayload(k);if(!P)throw new Error("Missing RequestManager in method#exec");const te=await P.sendAsync(X);return this.formatOutput(te)}}class _r{constructor(P){this.getter=P.getter,this.outputFormatter=P.outputFormatter}formatOutput(P){return this.outputFormatter(P)}async execute(P,...k){const X=await P.sendAsync({method:this.getter,params:[]});return this.formatOutput(X)}}function Il(E){return new Promise((P=>setTimeout(P,E)))}t.eth=void 0,(tt=t.eth||(t.eth={})).eth_getBalance=new ft({callName:"eth_getBalance",params:2,inputFormatter:[Ce,Nr],outputFormatter:mi}),tt.eth_getStorageAt=new ft({callName:"eth_getStorageAt",params:3,inputFormatter:[Ce,Xe,Nr],outputFormatter:ue}),tt.eth_getCode=new ft({callName:"eth_getCode",params:2,inputFormatter:[Ce,Nr],outputFormatter:ue}),tt.eth_getBlockByHash=new ft({callName:"eth_getBlockByHash",params:2,inputFormatter:[Ot,function(E){return!!E}],outputFormatter:me}),tt.eth_getBlockByNumber=new ft({callName:"eth_getBlockByNumber",params:2,inputFormatter:[Ot,function(E){return!!E}],outputFormatter:me}),tt.eth_getUncleByBlockHashAndIndex=new ft({callName:"eth_getUncleByBlockHashAndIndex",params:2,inputFormatter:[Ot,Xe],outputFormatter:me}),tt.eth_getUncleByBlockNumberAndIndex=new ft({callName:"eth_getUncleByBlockNumberAndIndex",params:2,inputFormatter:[Ot,Xe],outputFormatter:me}),tt.eth_getBlockTransactionCountByHash=new ft({callName:"eth_getBlockTransactionCountByHash",params:1,inputFormatter:[Ot],outputFormatter:Re}),tt.eth_getBlockTransactionCountByNumber=new ft({callName:"eth_getBlockTransactionCountByNumber",params:1,inputFormatter:[Ot],outputFormatter:Re}),tt.eth_getUncleCountByBlockHash=new ft({callName:"eth_getUncleCountByBlockHash",params:1,inputFormatter:[Ot],outputFormatter:Re}),tt.eth_getUncleCountByBlockNumber=new ft({callName:"eth_getUncleCountByBlockNumber",params:1,inputFormatter:[Ot],outputFormatter:Re}),tt.eth_getTransactionByHash=new ft({callName:"eth_getTransactionByHash",params:1,inputFormatter:[rn],outputFormatter:U}),tt.eth_getTransactionByBlockHashAndIndex=new ft({callName:"eth_getTransactionByBlockHashAndIndex",params:2,inputFormatter:[Ot,Xe],outputFormatter:U}),tt.eth_getTransactionByBlockNumberAndIndex=new ft({callName:"eth_getTransactionByBlockNumberAndIndex",params:2,inputFormatter:[Ot,Xe],outputFormatter:U}),tt.eth_getTransactionReceipt=new ft({callName:"eth_getTransactionReceipt",params:1,inputFormatter:[rn],outputFormatter:$}),tt.eth_getTransactionCount=new ft({callName:"eth_getTransactionCount",params:2,inputFormatter:[Ce,Nr],outputFormatter:Re}),tt.eth_sendRawTransaction=new ft({callName:"eth_sendRawTransaction",params:1,inputFormatter:[null],outputFormatter:ue}),tt.web3_sha3=new ft({callName:"web3_sha3",params:1,inputFormatter:[null],outputFormatter:ue}),tt.eth_sendTransaction=new ft({callName:"eth_sendTransaction",params:1,inputFormatter:[ne],outputFormatter:ue}),tt.eth_sign=new ft({callName:"eth_sign",params:2,inputFormatter:[Ce,null],outputFormatter:ue}),tt.eth_call=new ft({callName:"eth_call",params:2,inputFormatter:[Kr,Nr],outputFormatter:ue}),tt.eth_estimateGas=new ft({callName:"eth_estimateGas",params:1,inputFormatter:[Kr],outputFormatter:Re}),tt.eth_submitWork=new ft({callName:"eth_submitWork",params:3,inputFormatter:[null,null,null],outputFormatter:je}),tt.eth_getWork=new ft({callName:"eth_getWork",params:0,inputFormatter:[],outputFormatter:ur}),tt.eth_coinbase=new _r({getter:"eth_coinbase",outputFormatter:pn}),tt.eth_mining=new _r({getter:"eth_mining",outputFormatter:je}),tt.eth_hashrate=new _r({getter:"eth_hashrate",outputFormatter:Re}),tt.eth_syncing=new _r({getter:"eth_syncing",outputFormatter:Ye}),tt.eth_gasPrice=new _r({getter:"eth_gasPrice",outputFormatter:mi}),tt.eth_accounts=new _r({getter:"eth_accounts",outputFormatter:ur}),tt.eth_blockNumber=new _r({getter:"eth_blockNumber",outputFormatter:Re}),tt.eth_protocolVersion=new _r({getter:"eth_protocolVersion",outputFormatter:Re}),tt.web3_clientVersion=new _r({getter:"web3_clientVersion",outputFormatter:ae}),tt.net_version=new _r({getter:"net_version",outputFormatter:ae}),tt.shh_version=new ft({callName:"shh_version",params:0,inputFormatter:[],outputFormatter:Re}),tt.shh_post=new ft({callName:"shh_post",params:1,inputFormatter:[null],outputFormatter:je}),tt.personal_newAccount=new ft({callName:"personal_newAccount",params:1,inputFormatter:[null],outputFormatter:pn}),tt.personal_importRawKey=new ft({callName:"personal_importRawKey",params:2,inputFormatter:[null,null],outputFormatter:pn}),tt.personal_sign=new ft({callName:"personal_sign",params:3,inputFormatter:[Ie,Ce,null],outputFormatter:ue}),tt.personal_ecRecover=new ft({callName:"personal_ecRecover",params:2,inputFormatter:[Ie,null],outputFormatter:pn}),tt.personal_unlockAccount=new ft({callName:"personal_unlockAccount",params:3,inputFormatter:[Ce,null,Pe],outputFormatter:je}),tt.personal_sendTransaction=new ft({callName:"personal_sendTransaction",params:2,inputFormatter:[ne,null],outputFormatter:ue}),tt.personal_lockAccount=new ft({callName:"personal_lockAccount",params:1,inputFormatter:[Ce],outputFormatter:je}),tt.personal_listAccounts=new _r({getter:"personal_listAccounts",outputFormatter:ur}),tt.net_listening=new _r({getter:"net_listening",outputFormatter:je}),tt.net_peerCount=new _r({getter:"net_peerCount",outputFormatter:Re}),tt.eth_newFilter=new ft({callName:"eth_newFilter",params:1,inputFormatter:[Ke],outputFormatter:Xe}),tt.eth_getLogs=new ft({callName:"eth_getLogs",params:1,inputFormatter:[ur],outputFormatter:ur}),tt.eth_newBlockFilter=new ft({callName:"eth_newBlockFilter",params:0,inputFormatter:[],outputFormatter:Xe}),tt.eth_newPendingTransactionFilter=new ft({callName:"eth_newPendingTransactionFilter",params:0,inputFormatter:[],outputFormatter:Xe}),tt.eth_uninstallFilter=new ft({callName:"eth_uninstallFilter",params:1,inputFormatter:[Xe],outputFormatter:je}),tt.eth_getFilterLogs=new ft({callName:"eth_getFilterLogs",params:1,inputFormatter:[Xe],outputFormatter:ur}),tt.eth_getFilterChanges=new ft({callName:"eth_getFilterChanges",params:1,inputFormatter:[Xe],outputFormatter:ur}),tt.eth_submitHashrate=new ft({callName:"eth_submitHashrate",params:2,inputFormatter:[null,null],outputFormatter:je}),tt.shh_newIdentity=new ft({callName:"shh_newIdentity",params:0,inputFormatter:[],outputFormatter:ue}),tt.shh_hasIdentity=new ft({callName:"shh_hasIdentity",params:1,inputFormatter:[null],outputFormatter:je}),tt.shh_newGroup=new ft({callName:"shh_newGroup",params:0,inputFormatter:[],outputFormatter:ue}),tt.shh_addToGroup=new ft({callName:"shh_addToGroup",params:1,inputFormatter:[null],outputFormatter:je}),tt.shh_newFilter=new ft({callName:"shh_newFilter",params:1,inputFormatter:[null],outputFormatter:Xe}),tt.shh_uninstallFilter=new ft({callName:"shh_uninstallFilter",params:1,inputFormatter:[null],outputFormatter:je}),tt.shh_getLogs=new ft({callName:"shh_getLogs",params:1,inputFormatter:[null],outputFormatter:ur}),tt.shh_getFilterMessages=new ft({callName:"shh_getFilterMessages",params:1,inputFormatter:[null],outputFormatter:ur}),tt.shh_getFilterChanges=new ft({callName:"shh_getFilterChanges",params:1,inputFormatter:[null],outputFormatter:ur}),tt.shh_getMessages=new ft({callName:"shh_getMessages",params:1,inputFormatter:[null],outputFormatter:ur});function at(E,P){const k=t.eth[P];if(!k)throw new Error(`Could not find the method/property named ${P.toString()}`);Object.defineProperty(E,P,{value:function(...X){return k.execute(this,...X)}})}class Ze{constructor(P){this.provider=P,this.requests=new Map}async sendAsync(P){const k=await this.provider;if(!k)throw new Error("Provider not set or invalid");const X=Pi(P.method,P.params),te=l();return this.requests.set(X.id,te),k.sendAsync(X,((oe,Ne)=>{this.requests.delete(X.id),oe?te.reject(oe):Ri(Ne)?te.resolve(Ne.result):te.reject((function(He){const it=He&&He.error&&He.error.message?He.error.message:"Invalid JSON RPC response: "+JSON.stringify(He);return new Error(it)})(Ne))})),te}setProvider(P){this.provider=P}async getConfirmedTransaction(P){const k=await this.waitForCompletion(P);if(this.isFailure(k))throw new Error(`Transaction "${P}" failed`);return k}async waitForCompletion(P,k){const X=rn(P);if(await this.isTxDropped(X,k)){const te=await this.getTransactionAndReceipt(X);return Object.assign(Object.assign({},te),{status:t.TransactionStatus.failed})}for(;;){const te=await this.getTransactionAndReceipt(X);if(!this.isPending(te)&&te.receipt)return Object.assign(Object.assign({},te),{status:this.isFailure(te)?t.TransactionStatus.failed:t.TransactionStatus.confirmed});await Il(2e3)}}async getTransaction(P){let k,X=null;const te=rn(P);try{const Ne=(await this.eth_accounts())[0];Ne&&(X=await this.eth_getTransactionCount(Ne,"latest"))}catch{X=null}try{if(k=await this.eth_getTransactionByHash(te),k===null)return null}catch{return null}if(k.blockNumber===null){if(X!==null){if(k.nonce<X)return{hash:te,type:t.TransactionType.replaced,nonce:k.nonce};if(k.nonce>X)return{hash:te,type:t.TransactionType.queued,nonce:k.nonce}}return Object.assign({type:t.TransactionType.pending},k)}let oe;try{if(oe=await this.eth_getTransactionReceipt(te),oe===null||oe.status===0)return Object.assign({type:t.TransactionType.reverted},k)}catch{return null}return Object.assign(Object.assign({type:t.TransactionType.confirmed},k),{receipt:oe})}async isTxDropped(P,k=15){let X=k;for(;X>0;){if(await this.getTransactionAndReceipt(P)!==null)return!1;X-=1,await Il(2e3)}return!0}async getTransactionAndReceipt(P){P=rn(P);const[k,X]=await Promise.all([this.eth_getTransactionByHash(P),this.eth_getTransactionReceipt(P)]);return Object.assign(Object.assign({},k),{receipt:X})}isPending(P){return P&&P.blockNumber===null}isFailure(P){return P&&(!P.receipt||P.receipt.status===0)}}xe([at,$e("design:type",Function)],Ze.prototype,"web3_clientVersion",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"web3_sha3",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"net_version",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"net_peerCount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"net_listening",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_protocolVersion",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_syncing",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_coinbase",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_mining",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_hashrate",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_gasPrice",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_accounts",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_blockNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBalance",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getStorageAt",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionCount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockTransactionCountByHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockTransactionCountByNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleCountByBlockHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleCountByBlockNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getCode",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_sign",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_sendTransaction",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_sendRawTransaction",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_call",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_estimateGas",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockByHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getBlockByNumber",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionByHash",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionByBlockHashAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionByBlockNumberAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getTransactionReceipt",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleByBlockHashAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getUncleByBlockNumberAndIndex",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_newFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_newBlockFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_newPendingTransactionFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_uninstallFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getFilterChanges",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getFilterLogs",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getLogs",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_getWork",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_submitWork",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"eth_submitHashrate",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_post",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_version",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_newIdentity",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_hasIdentity",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_newGroup",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_addToGroup",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_newFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_uninstallFilter",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_getFilterChanges",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"shh_getMessages",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_unlockAccount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_newAccount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_listAccounts",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_lockAccount",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_importRawKey",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_sendTransaction",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_sign",void 0),xe([at,$e("design:type",Function)],Ze.prototype,"personal_ecRecover",void 0);class Ys{constructor(P){this.json=P,this._inputTypes=P.inputs||[],this._outputTypes=P.outputs||[],this._constant=!!P.constant,this._payable=!!P.payable||P.stateMutability==="payable",this.needsToBeTransaction=this._payable||"constant"in P&&!P.constant||P.stateMutability==="nonpayable",this._name=L(P)}extractDefaultBlock(P){return P.length>this._inputTypes.length&&!en(P[P.length-1])&&Nr(P.pop())||"latest"}validateArgs(P){if(P.some((oe=>oe===void 0)))throw new Error("Invalid call, some arguments are undefined");const k=P.filter((function(oe){return!(en(oe)===!0&&tn(oe)===!1&&Rr(oe)===!1&&!(oe instanceof Uint8Array))}));if(k.length!==this._inputTypes.length)throw X=k.length,te=this._inputTypes.length,new Error(`Invalid number of arguments to Solidity function. given: ${X}, expected: ${te}`);var X,te}toPayload(P){let k={to:void 0,data:void 0,value:void 0,from:void 0};P.length>this._inputTypes.length&&en(P[P.length-1])&&(k=P.pop()),this.validateArgs(P);const X=this.signature();let te=t.coder.encodeParams(this._inputTypes,P);return te.indexOf("0x")===0&&(te=te.substr(2)),k.data="0x"+X+te,k}signature(){return Y(this._name).slice(0,8)}unpackOutput(P){if(!P)return;const k=P.length>=2?P.slice(2):P,X=t.coder.decodeParams(this._outputTypes,k);return X.length===1?X[0]:X}async execute(P,k,...X){if(!P)throw new Error(`Cannot call function ${this.displayName()} because there is no requestManager`);if(this.needsToBeTransaction){const te=this.toPayload(X);if(te.to=k,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 P.eth_sendTransaction(te)}{const te=this.extractDefaultBlock(X),oe=this.toPayload(X);oe.to=k;const Ne=await P.eth_call(oe,te);return this.unpackOutput(Ne)}}estimateGas(P,k,...X){if(!(P instanceof Ze))throw new Error("estimateGas needs to receive a RequestManager as first argument");const te=this.toPayload(X);return te.to=k,P.eth_estimateGas(te)}displayName(){return ye(this._name)}typeName(){return fe(this._name)||"void"}attachToContract(P){const k=this.displayName(),X=Object.assign(((...te)=>this.execute(P.requestManager,P.address,...te)),{estimateGas:this.estimateGas.bind(this,P.requestManager,P.address),toPayload:(...te)=>this.toPayload(te),toRPCMessage:(...te)=>{const oe=this.extractDefaultBlock(te),Ne=this.toPayload(te);return Ne.to=P.address,{method:"eth_call",params:[Ne,oe]}},unpackOutput:te=>this.unpackOutput(te)});P[k]||(P[k]=X),P[k][this.typeName()]=X}}function Qo(E){if(E==null)return null;const P=String(E).toString();return P.indexOf("0x")===0?P:ce(Ae(P))}class Ci{constructor(P){this.requestManager=P,this.isStarted=!1,this.isDisposed=!1,this.formatter=k=>k,this.filterId=l(),this.callbacks=[],this.stopSemaphore=l()}async watch(P){if(this.isDisposed)throw new Error("The filter was disposed");P&&(this.callbacks.push(P),this.isStarted||await this.start())}async start(){if(this.isDisposed)throw new Error("The filter was disposed");if(!this.isStarted){this.isStarted=!0;try{const P=await this.getNewFilter();if(!P)throw new Error("Could not create a filter, response: "+JSON.stringify(P));this.filterId.resolve(P)}catch(P){throw P}this.stopSemaphore=l(),await this.poll()}}async stop(){if(!this.isStarted||this.isDisposed)return;this.isDisposed=!0;const P=await this.filterId;if(this.isStarted=!1,this.stopSemaphore&&await this.stopSemaphore,await this.uninstall()!==!0)throw new Error(`Couldn't stop the eth filter: ${P}`)}async poll(){if(this.isStarted){if(this.callbacks.length){const k=await this.getChanges();k&&this.callbacks.forEach((X=>{this.formatter?k.forEach((te=>{X(this.formatter(te))})):k.forEach((te=>X(te)))}))}this.stopSemaphore.resolve(1),this.isStarted&&(this.stopSemaphore=l(),setTimeout((P=()=>this.poll(),function(){P().catch((k=>console.error(k)))}),500))}else this.stopSemaphore.resolve(1);var P}}class Aa extends Ci{constructor(P,k,X=(te=>te)){super(P),this.requestManager=P,this.options=k,this.formatter=X,this.options=this.options||{},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(te){return Qo(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"?Ot(this.options.fromBlock)||void 0:"latest",toBlock:typeof this.options.toBlock=="number"||typeof this.options.toBlock=="string"?Ot(this.options.toBlock)||void 0:"latest"}}async getLogs(){this.isStarted||await this.start();const P=await this.filterId;return this.requestManager.eth_getFilterLogs(P)}async getNewFilter(){return this.requestManager.eth_newFilter(this.options)}async getChanges(){const P=await this.filterId;return this.requestManager.eth_getFilterChanges(P)}async uninstall(){const P=await this.filterId;return this.requestManager.eth_uninstallFilter(P)}}class Oa{constructor(P,k,X){this.requestManager=P,this.address=X,this._anonymous=!1,this._params=k.inputs||[],this._name=L(k),this._anonymous=k.anonymous||!1}types(P){return this._params.filter((function(k){return k.indexed===P}))}displayName(){return ye(this._name)}typeName(){return fe(this._name)||"void"}signature(){return Y(this._name)}encode(P={},k={}){const X={topics:[],address:this.address};k.fromBlock!==void 0&&(X.fromBlock=Ot(k.fromBlock)||void 0),k.toBlock!==void 0&&(X.toBlock=Ot(k.toBlock)||void 0),X.topics=X.topics||[],this._anonymous||X.topics.push("0x"+this.signature());const te=this._params.filter((function(oe){return oe.indexed===!0})).map((function(oe){const Ne=P[oe.name];return Ne==null?null:tn(Ne)?Ne.map((function(He){return"0x"+t.coder.encodeParams([oe],[He])})):"0x"+t.coder.encodeParams([oe],[Ne])}));return X.topics=X.topics.concat(te),X}decode(P){P.data=P.data||"",P.topics=P.topics||[];const k=(this._anonymous?P.topics:P.topics.slice(1)).map((function(He){return He.slice(2)})).join(""),X=t.coder.decodeParams(this.types(!0),k),te=P.data.slice(2),oe=t.coder.decodeParams(this.types(!1),te),Ne=this._params.reduce((function(He,it){return He[it.name]=it.indexed?X.shift():oe.shift(),He}),{});return Object.assign(Object.assign({},Se(P)),{event:this.displayName(),address:P.address,args:Ne})}async execute(P,k){const X=this.encode(P,k),te=this.decode.bind(this);return new Aa(this.requestManager,X,te)}attachToContract(P){const k=this.execute.bind(this),X=this.displayName();P.events[X]||(P.events[X]=k),P.events[X][this.typeName()]=this.execute.bind(this,P)}}class Ut{constructor(P,k,X){this._requestManager=P,this._json=k,this._address=X}encode(P={}){const k={address:this._address};return P.fromBlock!==void 0&&(k.fromBlock=Ot(P.fromBlock)||void 0),P.toBlock!==void 0&&(k.toBlock=Ot(P.toBlock)||void 0),k}decode(P){P.data=P.data||"";const k=tn(P.topics)&&En(P.topics[0])?P.topics[0].slice(2):"",X=this._json.filter((function(te){return k===Y(L(te))}))[0];return X?new Oa(this._requestManager,X,this._address).decode(P):Se(P)}async execute(P){const k=this.encode(P),X=this.decode.bind(this);return new Aa(this._requestManager,k,X)}getAllEventsFunction(){return this.execute.bind(this)}}class Xs{constructor(P,k,X){var te;this.requestManager=P,this.abi=k,this.address=X,this.events={},this.transactionHash=null,this.address=X,this.abi=k,(te=this).abi.filter((function(oe){return oe.type==="function"})).map((function(oe){return new Ys(oe)})).forEach((function(oe){oe.attachToContract(te)})),this.allEvents=(function(oe){const Ne=oe.abi.filter((function(it){return it.type==="event"})),He=new Ut(oe.requestManager,Ne,oe.address);return Ne.map((function(it){return new Oa(oe.requestManager,it,oe.address)})).forEach((function(it){it.attachToContract(oe)})),He.getAllEventsFunction()})(this)}}t.AbstractFilter=Ci,t.BigNumber=pe,t.Contract=Xs,t.ContractFactory=class{constructor(E,P){this.requestManager=E,this.abi=P}async deploy(...E){let P;const k=E[E.length-1];if(en(k)&&!tn(k)&&(P=E.pop()),!P)throw new Error("Missing options object");if(!P.data||typeof P.data!="string")throw new Error("Invalid options.data");if(Re(P.value)>0&&!(this.abi.filter((function(st){return st.type==="constructor"&&st.inputs.length===E.length}))[0]||{}).payable)throw new Error("Cannot send value to non-payable constructor");const X=(te=this.abi,oe=E,te.filter((function(st){return st.type==="constructor"&&st.inputs&&st.inputs.length===oe.length})).map((function(st){return st.inputs||[]})).map((function(st){return t.coder.encodeParams(st,oe)}))[0]||"");var te,oe;P.data+=X,P.gas||(P.gas=await this.requestManager.eth_estimateGas(P));const Ne=await this.requestManager.eth_sendTransaction(P);if(!Ne)throw new Error("Error while sending contract creation transaction. A TxHash was not retrieved");const He=await(async function(st,pr){const zt=l();let We=0;const Er=()=>{We++,We>50?zt.reject(new Error("Contract transaction couldn't be found after 50 blocks")):st.eth_getTransactionReceipt(pr).then((Ar=>{Ar&&Ar.blockHash?zt.resolve(Ar):setTimeout(Er,1e3)}),(Ar=>zt.reject(Ar)))};Er();const Wt=await zt,kt=await st.eth_getCode(Wt.contractAddress,"latest");if(kt&&kt.length>3)return Wt.contractAddress;throw Object.assign(new Error("The contract code couldn't be stored, please check your gas amount."),{response:kt,receipt:Wt})})(this.requestManager,Ne),it=await this.at(He);return it.transactionHash=Ne,it}async at(E){if(!xr(E))throw new TypeError(`Invalid address ${JSON.stringify(E)}`);return new Xs(this.requestManager,this.abi,E)}},t.EthBlockFilter=class extends Aa{constructor(E){super(E,{})}async getNewFilter(){return this.requestManager.eth_newBlockFilter()}},t.EthFilter=Aa,t.EthPendingTransactionFilter=class extends Aa{constructor(E){super(E,{})}async getNewFilter(){return this.requestManager.eth_newPendingTransactionFilter()}},t.HTTPProvider=class{constructor(E,P={}){this.host=E,this.options=P,this.debug=!1,this.host=E||"http://localhost:8545"}send(){throw new Error("Sync requests are deprecated")}sendAsync(E,P){try{let k=null;k=E instanceof Array?E.map((oe=>n(oe))):n(E);const X=this.options.fetch||globalThis.fetch;if(X===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(k),method:"POST",headers:Object.assign(Object.assign({},this.options.headers),{"Content-Type":"application/json"})};this.debug&&console.log("SEND >> "+te.body),X(this.host,te).then((async oe=>{if(oe.ok){const Ne=await oe.json();this.debug&&console.log("RECV << "+JSON.stringify(Ne)),Ne.error?P(Object.assign(new Error(Ne.error.json||Ne.error),Ne.error)):P(null,Ne)}else this.debug&&console.log("ERR << "+JSON.stringify(oe)),P(new Error("External error. response code: "+oe.status))}),(oe=>{this.debug&&console.log("ERR << "+JSON.stringify(oe)),P(oe)}))}catch(k){this.debug&&console.log("ERR << "+JSON.stringify(k)),P(k)}}},t.Method=ft,t.Property=_r,t.RequestManager=Ze,t.SHHFilter=class extends Ci{constructor(E,P){super(E),this.requestManager=E,this.options=P,this.options=this.options||{topics:[]},this.options.topics=this.options.topics||[],this.options.topics=this.options.topics.map((function(k){return Qo(k)})),this.options={topics:this.options.topics,to:this.options.to}}async getMessages(){const E=await this.filterId;return this.requestManager.shh_getMessages(E)}async getNewFilter(){return this.requestManager.shh_newFilter(this.options)}async getChanges(){const E=await this.filterId;return this.requestManager.shh_getFilterChanges(E)}async uninstall(){const E=await this.filterId;return this.requestManager.shh_uninstallFilter(E)}},t.SolidityEvent=Oa,t.SolidityFunction=Ys,t.WebSocketProvider=class{constructor(E,P={}){this.url=E,this.options=P,this.isDisposed=!1,this.responseCallbacks=new Map,this.notificationCallbacks=new Set,this.debug=!1,this.lastChunk="",this.connect()}dispose(){this.isDisposed=!0;const E=this.connection;this.timeout(new Error("Provider disposed.")),E.then((P=>P.close())).catch((P=>{this.debug&&console.error(P)}))}send(){throw new Error("Sync requests are deprecated")}sendAsync(E,P){const k=[];let X;if(E instanceof Array)X=Promise.all(E.map((te=>{const oe=l();try{const Ne=n(te);k.push(Ne),this.responseCallbacks.set(Ne.id,oe)}catch(Ne){oe.reject(Ne)}return oe})));else{const te=l();try{const oe=n(E);k.push(oe),this.responseCallbacks.set(oe.id,te)}catch(oe){te.reject(oe)}X=te}X.then((te=>P(null,te)),(te=>P(te))),this.connection.then((te=>{k.forEach((oe=>{const Ne=JSON.stringify(oe);this.debug&&console.log("SEND >> "+Ne),te.send(Ne)}))}),(te=>{P(te)}))}parseResponse(E){const P=[];return E.replace(/\}[\n\r]?\{/g,"}|--|{").replace(/\}\][\n\r]?\[\{/g,"}]|--|[{").replace(/\}[\n\r]?\[\{/g,"}|--|[{").replace(/\}\][\n\r]?\{/g,"}]|--|{").split("|--|").forEach((k=>{let X=k;this.lastChunk&&(X=this.lastChunk+X);let te=null;try{te=JSON.parse(X)}catch{return this.lastChunk=X,clearTimeout(this.lastChunkTimeout),void(this.lastChunkTimeout=setTimeout((()=>{this.timeout()}),15e3))}clearTimeout(this.lastChunkTimeout),this.lastChunk="",te&&P.push(te)})),P}processMessage(E){if("id"in E){const P=E.id,k=this.responseCallbacks.get(P);if(!k)return void console.error("Error: Received a response for an unknown request",E);this.responseCallbacks.delete(P),E.error!==void 0&&E.error!==null?k.reject(Object.assign(new Error(E.error.message||E.error),E.error)):"result"in E&&k.resolve(E)}else this.notificationCallbacks.forEach((P=>P(null,E)))}timeout(E){this.connection&&this.connection.isPending||(this.connection=l());const P=E||new Error("Connection timeout");this.responseCallbacks.forEach((k=>k.reject(P))),this.responseCallbacks.clear(),this.isDisposed||setTimeout((()=>this.connect()),1e3)}connect(){this.connection&&!this.connection.isPending&&this.connection.then((k=>k.close())).catch((k=>{this.debug&&console.error(k)})),this.connection&&this.connection.isPending||(this.connection=l()),this.lastChunk="";const E=this.options.WebSocketConstructor||(typeof WebSocket<"u"?WebSocket:void 0);if(!E)throw new Error("Please provide a WebSocketConstructor");const P=new E(this.url,this.options.protocol);P.onopen=()=>{this.connection.resolve(P)},P.onerror=k=>{const X=new Error("Error in web socket");X.data=k,this.timeout(X)},P.onclose=k=>{this.timeout(new Error(`Connection closed (${k&&k.reason||"Unknown reason"})`))},P.onmessage=k=>{const X=typeof k.data=="string"?k.data:"";this.debug&&console.log("RECV << "+k.data),this.parseResponse(X).forEach((te=>{te instanceof Array?te.forEach((oe=>this.processMessage(oe))):this.processMessage(te)}))}}},t.bytesToHex=ce,t.bytesToUtf8String=be,t.concatBytes=H,t.default=Ze,t.extractDisplayName=ye,t.extractTypeName=fe,t.fromAscii=function(E,P=0){let k="";for(let X=0;X<E.length;X++){const te=E.charCodeAt(X).toString(16);k+=te.length<2?"0"+te:te}return"0x"+k.padEnd(P,"0")},t.fromDecimal=qe,t.fromTwosComplement=sr,t.fromWei=function(E,P){const k=Dt(E).dividedBy(Ht(P));return Rr(E)?k:k.toString(10)},t.getAddress=Gr,t.getValueOfUnit=Ht,t.hexToBytes=Te,t.inputAddressFormatter=Ce,t.inputBlockNumberFormatter=Ot,t.inputCallFormatter=Kr,t.inputDefaultBlockNumberFormatter=Nr,t.inputFilterOptions=Ke,t.inputPostFormatter=function(E){return E?(E.ttl=qe(E.ttl),E.workToProve=qe(E.workToProve),E.priority=qe(E.priority),tn(E.topics)||(E.topics=E.topics?[E.topics]:[]),E.topics=E.topics.map((function(P){return P.indexOf("0x")===0?P:"0x"+ce(Ae(P))})),E):null},t.inputTransactionFormatter=ne,t.inputTransactionId=rn,t.isAddress=xr,t.isArray=tn,t.isBigNumber=Rr,t.isBloom=function(E){return!!/^(0x)?[0-9a-f]{512}$/i.test(E)&&!!/^(0x)?[0-9a-f]{512}$/i.test(E)},t.isBoolean=bn,t.isChecksumAddress=$r,t.isFunction=function(E){return typeof E=="function"},t.isHex=function(E){return typeof E=="string"&&/^0x[0-9a-fA-F]+$/.test(E)},t.isJson=function(E){try{return!!JSON.parse(E)}catch{return!1}},t.isObject=en,t.isPredefinedBlockNumber=Ni,t.isStrictAddress=_n,t.isString=En,t.isTopic=function(E){return!!/^(0x)?[0-9a-f]{64}$/i.test(E)&&!!/^(0x)?[0-9a-f]{64}$/i.test(E)},t.isValidResponse=Ri,t.outputBigNumberFormatter=mi,t.outputBlockFormatter=me,t.outputLogFormatter=Se,t.outputPostFormatter=function(E){return E?(E.expiry=Re(E.expiry),E.sent=Re(E.sent),E.ttl=Re(E.ttl),E.workProved=Re(E.workProved),E.topics||(E.topics=[]),E.topics=E.topics.map((function(P){return q(P)})),E):null},t.outputSyncingFormatter=Ye,t.outputTransactionFormatter=U,t.outputTransactionReceiptFormatter=$,t.padLeft=B,t.padRight=function(E,P,k){return E+new Array(P-E.length+1).join(k||"0")},t.sha3=Y,t.signedIsNegative=Vt,t.stringToUtf8Bytes=Ae,t.toAddress=pn,t.toArray=ur,t.toAscii=q,t.toBatchPayload=function(E){return E.map((function(P){return Pi(P.method,P.params)}))},t.toBigNumber=Dt,t.toBoolean=je,t.toChecksumAddress=fn,t.toData=ue,t.toDecimal=Re,t.toHex=Xe,t.toJsonRpcRequest=Pi,t.toNullDecimal=Pe,t.toString=ae,t.toStringData=Ie,t.toTwosComplement=Ft,t.toWei=function(E,P){const k=Dt(E).times(Ht(P));return Rr(E)?k:k.toString(10)},t.transformToFullName=L,Object.defineProperty(t,"__esModule",{value:!0})}))})(il,il.exports)),il.exports}var Nu={},iR;function QU(){if(iR)return Nu;iR=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.SignatureValidator=void 0;const e=af();async function i(t,n){const o=[{constant:!0,inputs:[{name:"hash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"magicValue",type:"bytes4"}],payable:!1,stateMutability:"view",type:"function"}];return await new e.ContractFactory(t,o).at(n)}return Nu.SignatureValidator=i,Nu}var Fg={},ii={},No={},Co={},Vg={},ai={},aR;function nt(){if(aR)return ai;aR=1;var e=ai&&ai.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ai,"__esModule",{value:!0}),ai.validateType=ai.generateLazyValidator=ai.Ajv=void 0;const i=e(Qd());ai.Ajv=i.default;const t=e(z_()),n=e(W_());function o(l,c){let f=null;const p=(y,m)=>{if(!f){const h=new i.default({$data:!0,allErrors:!0});(0,t.default)(h),(0,n.default)(h,{singleError:!0}),c?.forEach(O=>h.addKeyword(O)),f=h.compile(l),Object.defineProperty(p,"errors",{get(){return f?.errors}})}return f(y,m)};return p}ai.generateLazyValidator=o;function s(l,c){return l.validate(c)}return ai.validateType=s,ai}var oR;function ZU(){return oR||(oR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneUpdate=e.SCENE_UPDATE=void 0;const i=nt();e.SCENE_UPDATE="SCENE_UPDATE",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.SCENE_UPDATE]},payload:{type:"object",properties:{sceneId:{type:"string"},sceneType:{type:"string"}},additionalProperties:!1,required:["sceneId","sceneType"]}},required:["payload","type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SceneUpdate||(e.SceneUpdate={}))})(Vg)),Vg}var Hg={},sR;function xU(){return sR||(sR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Update=e.UPDATE=void 0;const i=nt();e.UPDATE="update",(function(t){t.schema={type:"object",properties:{type:{type:"string",enum:[e.UPDATE]}},required:["type"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Update||(e.Update={}))})(Hg)),Hg}var uR;function $U(){return uR||(uR=1,(function(e){var i=Co&&Co.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Co&&Co.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(ZU(),e),t(xU(),e)})(Co)),Co}var Mo={},zg={},lR;function eF(){return lR||(lR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProjectType=void 0;const i=nt();(function(t){t.SCENE="scene",t.SMART_ITEM="smart-item",t.PORTABLE_EXPERIENCE="portable-experience",t.LIBRARY="library"})(e.ProjectType||(e.ProjectType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProjectType||(e.ProjectType={}))})(zg)),zg}var Wg={},Gg={},cR;function of(){return cR||(cR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Rarity=void 0;const i=nt();(function(t){t.UNIQUE="unique",t.MYTHIC="mythic",t.LEGENDARY="legendary",t.EPIC="epic",t.RARE="rare",t.UNCOMMON="uncommon",t.COMMON="common"})(e.Rarity||(e.Rarity={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema);const n={[t.UNIQUE]:1,[t.MYTHIC]:10,[t.LEGENDARY]:100,[t.EPIC]:1e3,[t.RARE]:5e3,[t.UNCOMMON]:1e4,[t.COMMON]:1e5},o={[t.UNIQUE]:"#FFE617",[t.MYTHIC]:"#FB7DE3",[t.LEGENDARY]:"#A657ED",[t.EPIC]:"#6397F2",[t.RARE]:"#3AD682",[t.UNCOMMON]:"#FF8563",[t.COMMON]:"#D4E0E0"},s={[t.UNIQUE]:"#FFB626",[t.MYTHIC]:"#FF63E1",[t.LEGENDARY]:"#842DDA",[t.EPIC]:"#3D85E6",[t.RARE]:"#36CF75",[t.UNCOMMON]:"#ED6D4F",[t.COMMON]:"#ABC1C1"};function l(p){return n[p]}t.getMaxSupply=l;function c(p){return s[p]}t.getColor=c;function f(p){return[o[p],s[p]]}t.getGradient=f})(e.Rarity||(e.Rarity={}))})(Gg)),Gg}var Kg={},dR;function Ko(){return dR||(dR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableCategory=void 0;const i=nt();(function(t){t.EYEBROWS="eyebrows",t.EYES="eyes",t.FACIAL_HAIR="facial_hair",t.HAIR="hair",t.BODY_SHAPE="body_shape",t.MOUTH="mouth",t.UPPER_BODY="upper_body",t.LOWER_BODY="lower_body",t.FEET="feet",t.EARRING="earring",t.EYEWEAR="eyewear",t.HAT="hat",t.HELMET="helmet",t.MASK="mask",t.TIARA="tiara",t.TOP_HEAD="top_head",t.SKIN="skin",t.HANDS_WEAR="hands_wear"})(e.WearableCategory||(e.WearableCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableCategory||(e.WearableCategory={}))})(Kg)),Kg}var Yg={},Xg={},fR;function fE(){return fR||(fR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyShape=void 0;const i=nt();(function(t){t.MALE="urn:decentraland:off-chain:base-avatars:BaseMale",t.FEMALE="urn:decentraland:off-chain:base-avatars:BaseFemale"})(e.BodyShape||(e.BodyShape={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyShape||(e.BodyShape={}))})(Xg)),Xg}var Jg={},Qg={},pR;function uj(){return pR||(pR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.BodyPartCategory=void 0;const i=nt();(function(t){t.HEAD="head",t.HANDS="hands"})(e.BodyPartCategory||(e.BodyPartCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.BodyPartCategory||(e.BodyPartCategory={}))})(Qg)),Qg}var mR;function pE(){return mR||(mR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=void 0;const i=Ko(),t=nt(),n=uj();(function(o){o.schema={oneOf:[Object.assign({},i.WearableCategory.schema),Object.assign({},n.BodyPartCategory.schema)]},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.HideableWearableCategory||(e.HideableWearableCategory={}))})(Jg)),Jg}var hR;function mE(){return hR||(hR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableRepresentation=void 0;const i=nt(),t=fE(),n=pE();(function(o){o.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}}},overrideHides:{type:"array",items:n.HideableWearableCategory.schema},overrideReplaces:{type:"array",items:n.HideableWearableCategory.schema}},required:["bodyShapes","mainFile","contents","overrideHides","overrideReplaces"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.WearableRepresentation||(e.WearableRepresentation={}))})(Yg)),Yg}var jo={},Lo={},Zg={},xg={},yR;function Ws(){return yR||(yR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IPFSv1=e.IPFSv2=e.EthAddress=e.Color3=void 0;const i=nt();(function(t){t.schema={type:"object",required:["r","g","b"],properties:{r:{type:"number",minimum:0,maximum:1},g:{type:"number",minimum:0,maximum:1},b:{type:"number",minimum:0,maximum:1}}};const n=(0,i.generateLazyValidator)(t.schema);t.validate=o=>n(o)})(e.Color3||(e.Color3={})),(function(t){t.schema={type:"string",pattern:"^0x[a-fA-F0-9]{40}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.EthAddress||(e.EthAddress={})),(function(t){t.schema={type:"string",pattern:"^(ba)[a-zA-Z0-9]{57}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv2||(e.IPFSv2={})),(function(t){t.schema={type:"string",pattern:"^(Qm)[a-zA-Z0-9]{44}$"};const n=new RegExp(t.schema.pattern);t.validate=o=>n.test(o)})(e.IPFSv1||(e.IPFSv1={}))})(xg)),xg}var gR;function lj(){return gR||(gR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Avatar=e.Link=e.LinkUrl=e.AvatarInfo=e.Snapshots=void 0;const i=Ko(),t=Ws(),n=nt();var o;(function(f){f.schema={type:"object",required:["face256","body"],properties:{face256:t.IPFSv2.schema,body:t.IPFSv2.schema}},f.validate=(0,n.generateLazyValidator)(f.schema)})(o=e.Snapshots||(e.Snapshots={}));var s;(function(f){f.schema={type:"object",required:["bodyShape","eyes","hair","skin"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema},emotes:{type:"array",items:{type:"object",properties:{slot:{type:"number"},urn:{type:"string"}},required:["slot","urn"]},nullable:!0},snapshots:o.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(s=e.AvatarInfo||(e.AvatarInfo={}));var l;(function(f){f.schema={type:"string",pattern:"^[(http(s)?):\\/\\/(www\\.)?a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)$"};const p=new RegExp(f.schema.pattern,"i");f.validate=y=>p.test(y)})(l=e.LinkUrl||(e.LinkUrl={}));var c;(function(f){f.schema={type:"object",required:["title","url"],properties:{title:{type:"string"},url:l.schema}}})(c=e.Link||(e.Link={})),(function(f){f.schema={type:"object",required:["name","description","ethAddress","version","tutorialStep","avatar","hasClaimedName"],properties:{userId:{type:"string"},name:{type:"string"},description:{type:"string"},links:{type:"array",maxItems:5,items:c.schema,nullable:!0},country:{nullable:!0,type:"string"},employmentStatus:{nullable:!0,type:"string"},gender:{nullable:!0,type:"string"},pronouns:{nullable:!0,type:"string"},relationshipStatus:{nullable:!0,type:"string"},sexualOrientation:{nullable:!0,type:"string"},language:{nullable:!0,type:"string"},profession:{nullable:!0,type:"string"},birthdate:{nullable:!0,type:"number"},realName:{nullable:!0,type:"string"},hobbies:{nullable:!0,type:"string"},ethAddress:t.EthAddress.schema,version:{type:"number"},tutorialStep:{type:"number"},email:{type:"string",nullable:!0},blocked:{type:"array",items:{type:"string"},nullable:!0},muted:{type:"array",items:{type:"string"},nullable:!0},interests:{type:"array",items:{type:"string"},nullable:!0},hasClaimedName:{type:"boolean"},hasConnectedWeb3:{type:"boolean",nullable:!0},avatar:s.schema},additionalProperties:!0},f.validate=(0,n.generateLazyValidator)(f.schema)})(e.Avatar||(e.Avatar={}))})(Zg)),Zg}var $g={},vR;function tF(){return vR||(vR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Profile=void 0;const i=nt(),t=lj();(function(n){n.schema={type:"object",required:["avatars"],properties:{avatars:{type:"array",items:t.Avatar.schema}},additionalProperties:!0},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.Profile||(e.Profile={}))})($g)),$g}var _R;function rF(){return _R||(_R=1,(function(e){var i=Lo&&Lo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Lo&&Lo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(lj(),e),t(tF(),e)})(Lo)),Lo}var ev={},tv={},ER;function cj(){return ER||(ER=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FeatureToggles=e.portableExperiencesToggles=e.toggles=void 0;const i=nt();e.toggles=["enabled","disabled"],e.portableExperiencesToggles=[...e.toggles,"hideUi"],(function(t){t.schema={type:"object",properties:{voiceChat:{type:"string",enum:e.toggles,nullable:!0},portableExperiences:{type:"string",enum:e.portableExperiencesToggles,nullable:!0,errorMessage:`valid options are ${e.portableExperiencesToggles.join(", ")}`}},errorMessage:`valid options are ${e.toggles.join(", ")}`,required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.FeatureToggles||(e.FeatureToggles={}))})(tv)),tv}var rv={},bR;function dj(){return bR||(bR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorldConfiguration=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},skybox:{type:"number",nullable:!0},minimapVisible:{type:"boolean",nullable:!0},miniMapConfig:{type:"object",nullable:!0,properties:{visible:{type:"boolean",nullable:!0},dataImage:{type:"string",nullable:!0},estateImage:{type:"string",nullable:!0}}},skyboxConfig:{type:"object",nullable:!0,properties:{fixedTime:{type:"number",nullable:!0},textures:{type:"array",nullable:!0,items:{type:"string"},oneOf:[{minItems:0,maxItems:0},{minItems:1,maxItems:1},{minItems:6,maxItems:6}],errorMessage:"customSkybox must be an array of 0, 1 or 6 strings"}}},fixedAdapter:{type:"string",nullable:!0},placesConfig:{type:"object",nullable:!0,properties:{optOut:{type:"boolean",nullable:!0}}}},required:[]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WorldConfiguration||(e.WorldConfiguration={}))})(rv)),rv}var nv={},wR;function fj(){return wR||(wR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SceneParcels=void 0;const i=nt();(function(t){t.schema={description:'Describes a scene, a set of parcels whose content is treated as the same entity. A list of parcels is listed, for which one of them is considered the "base" for positioning purposes.',type:"object",properties:{base:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},parcels:{type:"array",items:{type:"string",pattern:"^-?[0-9]+,-?[0-9]+$"},minItems:1}},additionalProperties:!0,required:["base","parcels"]},t.schemaValidator=(0,i.generateLazyValidator)(t.schema),t.validate=n=>t.schemaValidator(n)&&n.parcels.includes(n.base)})(e.SceneParcels||(e.SceneParcels={}))})(nv)),nv}var iv={},Cu={},SR;function hE(){return SR||(SR=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.displayableProperties=void 0,Cu.displayableProperties={menuBarIcon:{description:"Name of the file used as icon for the MenuBar",type:"string",nullable:!0}}),Cu}var av={},TR;function pj(){return TR||(TR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Source=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{version:{type:"number",nullable:!0},origin:{type:"string"},projectId:{type:"string"},point:{type:"object",properties:{x:{type:"integer"},y:{type:"integer"}},nullable:!0,required:["x","y"]},rotation:{type:"string",enum:["north","east","south","west"],nullable:!0},layout:{type:"object",properties:{rows:{type:"integer"},cols:{type:"integer"}},nullable:!0,required:["rows","cols"]},isEmpty:{type:"boolean",nullable:!0}},additionalProperties:!0,required:["origin","projectId"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Source||(e.Source={}))})(av)),av}var ov={},AR;function mj(){return AR||(AR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{name:{type:"string",nullable:!0},position:{type:"object",oneOf:[{$ref:"#single-position"},{$ref:"#multi-position"}],required:["x","y","z"]},default:{type:"boolean",nullable:!0},cameraTarget:{type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"],nullable:!0}},required:["position"],definitions:{"single-position":{$id:"#single-position",type:"object",properties:{x:{type:"number"},y:{type:"number"},z:{type:"number"}},required:["x","y","z"]},"multi-position":{$id:"#multi-position",type:"object",properties:{x:{type:"array",items:{type:"number"},minItems:1},y:{type:"array",items:{type:"number"},minItems:1},z:{type:"array",items:{type:"number"},minItems:1}},required:["x","y","z"]}}},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SpawnPoint||(e.SpawnPoint={}))})(ov)),ov}var OR;function nF(){return OR||(OR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=e.RequiredPermission=void 0;const i=nt(),t=hE(),n=cj(),o=fj(),s=pj(),l=mj(),c=dj();var f;(function(p){p.ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE="ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE",p.ALLOW_TO_TRIGGER_AVATAR_EMOTE="ALLOW_TO_TRIGGER_AVATAR_EMOTE",p.ALLOW_MEDIA_HOSTNAMES="ALLOW_MEDIA_HOSTNAMES",p.USE_WEB3_API="USE_WEB3_API",p.USE_FETCH="USE_FETCH",p.USE_WEBSOCKET="USE_WEBSOCKET",p.OPEN_EXTERNAL_LINK="OPEN_EXTERNAL_LINK"})(f=e.RequiredPermission||(e.RequiredPermission={})),(function(p){p.schema={type:"object",properties:Object.assign(Object.assign({isPortableExperience:{description:"Define the current scene as a Portable Experience",type:"boolean",nullable:!0},main:{description:"File that contains the entry point of the scene's code",type:"string",minLength:1},scene:o.SceneParcels.schema},t.displayableProperties),{display:{description:"Information related to how should this land be displayed apart from the normal rendering of the scene",type:"object",properties:{title:{description:"A name so other users can identify what the contents of this land should be",type:"string",nullable:!0},favicon:{description:"DEPRECATED. Allow the land owner to set up a favicon to this land",type:"string",nullable:!0},description:{description:"A description that will be shown on client's nav map when the scene is selected",type:"string",nullable:!0},navmapThumbnail:{type:"string",nullable:!0}},nullable:!0,required:[]},owner:{type:"string",nullable:!0},contact:{description:"Describe different ways of contacting the land owner",type:"object",properties:{name:{type:"string",nullable:!0},email:{type:"string",nullable:!0},im:{type:"string",nullable:!0},url:{type:"string",nullable:!0}},nullable:!0,required:[]},tags:{type:"array",items:{type:"string",minLength:1},nullable:!0},source:Object.assign(Object.assign({},s.Source.schema),{nullable:!0}),spawnPoints:{type:"array",items:l.SpawnPoint.schema,nullable:!0},requiredPermissions:{type:"array",items:{type:"string",enum:Object.values(f)},uniqueItems:!0,nullable:!0},featureToggles:Object.assign(Object.assign({},n.FeatureToggles.schema),{nullable:!0}),worldConfiguration:Object.assign(Object.assign({},c.WorldConfiguration.schema),{nullable:!0}),allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!0}}),additionalProperties:!0,required:["main","scene"],dependencies:{requiredPermissions:{if:{properties:{requiredPermissions:{type:"array",contains:{const:f.ALLOW_MEDIA_HOSTNAMES}}}},then:{properties:{allowedMediaHostnames:{type:"array",items:{type:"string"},nullable:!1,minItems:1}},required:["allowedMediaHostnames"]},else:{properties:{allowedMediaHostnames:{type:["null","array"],nullable:!0,maxItems:0}}}}}},p.validate=(0,i.generateLazyValidator)(p.schema)})(e.Scene||(e.Scene={}))})(iv)),iv}var IR;function iF(){return IR||(IR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SpawnPoint=e.Source=e.RequiredPermission=e.Scene=e.SceneParcels=e.WorldConfiguration=e.FeatureToggles=void 0;var i=cj();Object.defineProperty(e,"FeatureToggles",{enumerable:!0,get:function(){return i.FeatureToggles}});var t=dj();Object.defineProperty(e,"WorldConfiguration",{enumerable:!0,get:function(){return t.WorldConfiguration}});var n=fj();Object.defineProperty(e,"SceneParcels",{enumerable:!0,get:function(){return n.SceneParcels}});var o=nF();Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return o.Scene}}),Object.defineProperty(e,"RequiredPermission",{enumerable:!0,get:function(){return o.RequiredPermission}});var s=pj();Object.defineProperty(e,"Source",{enumerable:!0,get:function(){return s.Source}});var l=mj();Object.defineProperty(e,"SpawnPoint",{enumerable:!0,get:function(){return l.SpawnPoint}})})(ev)),ev}var Do={},sv={},uv={},PR;function hj(){return PR||(PR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Locale=void 0;const i=nt();(function(t){t.EN="en",t.ES="es"})(e.Locale||(e.Locale={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Locale||(e.Locale={}))})(uv)),uv}var RR;function yj(){return RR||(RR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.I18N=void 0;const i=nt(),t=hj();(function(n){n.schema={type:"object",properties:{code:t.Locale.schema,text:{type:"string"}},additionalProperties:!0,required:["code","text"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.I18N||(e.I18N={}))})(sv)),sv}var lv={},NR;function gj(){return NR||(NR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Metrics=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{triangles:{type:"number"},materials:{type:"number"},textures:{type:"number"},meshes:{type:"number"},bodies:{type:"number"},entities:{type:"number"}},required:["triangles","materials","textures","meshes","bodies","entities"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Metrics||(e.Metrics={}))})(lv)),lv}var cv={},CR;function yE(){return CR||(CR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isStandard=e.standardProperties=void 0;const i=of(),t=nt();e.standardProperties={collectionAddress:{type:"string",nullable:!1},rarity:i.Rarity.schema};const n={type:"object",properties:Object.assign({},e.standardProperties),required:["collectionAddress","rarity"]},o=(0,t.generateLazyValidator)(n);function s(l){return o(l)}e.isStandard=s})(cv)),cv}var dv={},fv={},MR;function vj(){return MR||(MR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MerkleProof=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{proof:{type:"array",items:{type:"string"}},index:{type:"number"},hashingKeys:{type:"array",items:{type:"string"}},entityHash:{type:"string"}},required:["entityHash","hashingKeys","index","proof"],additionalProperties:!0},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MerkleProof||(e.MerkleProof={}))})(fv)),fv}var jR;function gE(){return jR||(jR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.thirdPartyProps=void 0;const i=nt(),t=vj();e.thirdPartyProps={merkleProof:t.MerkleProof.schema,content:{type:"object",nullable:!1,additionalProperties:{type:"string"},required:[]}};const n={type:"object",properties:Object.assign({},e.thirdPartyProps),required:["merkleProof","content"],_containsHashingKeys:!0},o={keyword:"_containsHashingKeys",validate:(c,f)=>{var p;const y=f;return!((p=y?.merkleProof)===null||p===void 0)&&p.hashingKeys?y.merkleProof.hashingKeys.every(m=>y.hasOwnProperty(m)):!1},errors:!1},s=(0,i.generateLazyValidator)(n,[o]);function l(c){return s(c)}e.isThirdParty=l})(dv)),dv}var pv={},mv={},Wi={},LR;function _j(){if(LR)return Wi;LR=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.isBaseAvatar=Wi.requiredBaseItemProps=Wi.baseItemProperties=void 0;const e=yj(),i=gj(),t=hE();Wi.baseItemProperties=Object.assign(Object.assign({},t.displayableProperties),{id:{type:"string"},name:{type:"string"},description:{type:"string"},i18n:{type:"array",items:e.I18N.schema,minItems:1,uniqueItemProperties:["code"],errorMessage:'${0#} array should not have duplicates for "code"'},thumbnail:{type:"string"},image:{type:"string"},metrics:Object.assign(Object.assign({},i.Metrics.schema),{nullable:!0})}),Wi.requiredBaseItemProps=["id","name","description","i18n","thumbnail","image"];function n(o){if(!o||!o.id)return!1;const s=o.id.split(":"),l=s[1]==="decentraland",c=s[3]==="base-avatars";return s.length===5&&l&&c}return Wi.isBaseAvatar=n,Wi}var DR;function aF(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Wearable=void 0;const i=nt(),t=Ko(),n=mE(),o=_j(),s=yE(),l=gE(),c=pE();(function(f){f.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},o.baseItemProperties),s.standardProperties),l.thirdPartyProps),{data:{type:"object",properties:{replaces:{type:"array",items:c.HideableWearableCategory.schema},hides:{type:"array",items:c.HideableWearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:c.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}}),additionalProperties:!0,required:[],oneOf:[{required:["id","i18n"],prohibited:["merkleProof","content","collectionAddress","rarity"],_isBaseAvatar:!0},{required:[...o.requiredBaseItemProps,"data","collectionAddress","rarity"],prohibited:["merkleProof","content"]},{required:[...o.requiredBaseItemProps,"data","merkleProof","content"],prohibited:["collectionAddress","rarity"],_isThirdParty:!0}],errorMessage:{oneOf:"either standard XOR thirdparty properties conditions must be met"}};const p={keyword:"_isThirdParty",validate:(m,h)=>!m||(0,l.isThirdParty)(h),errors:!1},y={keyword:"_isBaseAvatar",validate:(m,h)=>!m||(0,o.isBaseAvatar)(h),errors:!1};f.validate=(0,i.generateLazyValidator)(f.schema,[p,y])})(e.Wearable||(e.Wearable={}))})(mv)),mv}var kR;function oF(){return kR||(kR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HideableWearableCategory=e.BodyPartCategory=e.WearableCategory=e.Wearable=e.WearableRepresentation=void 0;var i=mE();Object.defineProperty(e,"WearableRepresentation",{enumerable:!0,get:function(){return i.WearableRepresentation}});var t=aF();Object.defineProperty(e,"Wearable",{enumerable:!0,get:function(){return t.Wearable}});var n=Ko();Object.defineProperty(e,"WearableCategory",{enumerable:!0,get:function(){return n.WearableCategory}});var o=uj();Object.defineProperty(e,"BodyPartCategory",{enumerable:!0,get:function(){return o.BodyPartCategory}});var s=pE();Object.defineProperty(e,"HideableWearableCategory",{enumerable:!0,get:function(){return s.HideableWearableCategory}})})(pv)),pv}var hv={},yv={},gv={},vv={},qR;function Ej(){return qR||(qR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteCategory=void 0;const i=nt();(function(t){t.DANCE="dance",t.STUNT="stunt",t.GREETINGS="greetings",t.FUN="fun",t.POSES="poses",t.REACTIONS="reactions",t.HORROR="horror",t.MISCELLANEOUS="miscellaneous"})(e.EmoteCategory||(e.EmoteCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmoteCategory||(e.EmoteCategory={}))})(vv)),vv}var _v={},BR;function bj(){return BR||(BR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteRepresentationADR74=void 0;const i=nt(),t=fE();(function(n){n.schema={type:"object",properties:{bodyShapes:{type:"array",items:t.BodyShape.schema,minItems:1,uniqueItems:!0},mainFile:{type:"string",minLength:1},contents:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0,contains:{const:{$data:"2/mainFile"}},errorMessage:{contains:"contents should contain mainFile: ${1/mainFile}"}}},required:["bodyShapes","mainFile","contents"]},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.EmoteRepresentationADR74||(e.EmoteRepresentationADR74={}))})(_v)),_v}var UR;function wj(){return UR||(UR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmoteDataADR74=void 0;const i=Ej(),t=nt(),n=bj();(function(o){o.schema={type:"object",properties:{tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.EmoteRepresentationADR74.schema,minItems:1},category:i.EmoteCategory.schema,loop:{type:"boolean"}},required:["category","tags","representations","loop"],additionalProperties:!0},o.validate=(0,t.generateLazyValidator)(o.schema)})(e.EmoteDataADR74||(e.EmoteDataADR74={}))})(gv)),gv}var FR;function sF(){return FR||(FR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emote=void 0;const i=Sj(),t=nt(),n=_j(),o=yE(),s=gE(),l=wj();(function(c){c.schema={type:"object",properties:Object.assign(Object.assign(Object.assign(Object.assign({},n.baseItemProperties),o.standardProperties),s.thirdPartyProps),{emoteDataADR74:l.EmoteDataADR74.schema}),additionalProperties:!0,required:[...n.requiredBaseItemProps],oneOf:[{required:["emoteDataADR74"],oneOf:[{required:["collectionAddress","rarity"],prohibited:["merkleProof","content"],errorMessage:"standard properties conditions are not met"},{required:["merkleProof","content","id","name","description","i18n","image","thumbnail","emoteDataADR74"],_isThirdParty:!0,prohibited:["collectionAddress","rarity"],errorMessage:"thirdparty properties conditions are not met"}],errorMessage:{oneOf:"emote should have either standard or thirdparty properties"}}],errorMessage:{oneOf:'emote should have "emoteDataADR74" and match its schema'}};const f={keyword:"_isThirdParty",validate:(p,y)=>!p||(0,i.isThirdParty)(y),errors:!1};c.validate=(0,t.generateLazyValidator)(c.schema,[f])})(e.Emote||(e.Emote={}))})(yv)),yv}var Ev={},VR;function uF(){return VR||(VR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=void 0;const i=nt();(function(t){t.SIMPLE="simple",t.LOOP="loop"})(e.EmotePlayMode||(e.EmotePlayMode={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.EmotePlayMode||(e.EmotePlayMode={}))})(Ev)),Ev}var HR;function lF(){return HR||(HR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EmotePlayMode=e.EmoteCategory=e.EmoteDataADR74=e.EmoteRepresentationADR74=e.Emote=void 0;var i=sF();Object.defineProperty(e,"Emote",{enumerable:!0,get:function(){return i.Emote}});var t=bj();Object.defineProperty(e,"EmoteRepresentationADR74",{enumerable:!0,get:function(){return t.EmoteRepresentationADR74}});var n=wj();Object.defineProperty(e,"EmoteDataADR74",{enumerable:!0,get:function(){return n.EmoteDataADR74}});var o=Ej();Object.defineProperty(e,"EmoteCategory",{enumerable:!0,get:function(){return o.EmoteCategory}});var s=uF();Object.defineProperty(e,"EmotePlayMode",{enumerable:!0,get:function(){return s.EmotePlayMode}})})(hv)),hv}var zR;function Sj(){return zR||(zR=1,(function(e){var i=Do&&Do.__createBinding||(Object.create?(function(p,y,m,h){h===void 0&&(h=m);var O=Object.getOwnPropertyDescriptor(y,m);(!O||("get"in O?!y.__esModule:O.writable||O.configurable))&&(O={enumerable:!0,get:function(){return y[m]}}),Object.defineProperty(p,h,O)}):(function(p,y,m,h){h===void 0&&(h=m),p[h]=y[m]})),t=Do&&Do.__exportStar||function(p,y){for(var m in p)m!=="default"&&!Object.prototype.hasOwnProperty.call(y,m)&&i(y,p,m)};Object.defineProperty(e,"__esModule",{value:!0}),e.isThirdParty=e.isStandard=e.BodyShape=e.Metrics=e.Locale=e.I18N=void 0;var n=yj();Object.defineProperty(e,"I18N",{enumerable:!0,get:function(){return n.I18N}});var o=hj();Object.defineProperty(e,"Locale",{enumerable:!0,get:function(){return o.Locale}});var s=gj();Object.defineProperty(e,"Metrics",{enumerable:!0,get:function(){return s.Metrics}});var l=fE();Object.defineProperty(e,"BodyShape",{enumerable:!0,get:function(){return l.BodyShape}});var c=yE();Object.defineProperty(e,"isStandard",{enumerable:!0,get:function(){return c.isStandard}});var f=gE();Object.defineProperty(e,"isThirdParty",{enumerable:!0,get:function(){return f.isThirdParty}}),t(oF(),e),t(lF(),e)})(Do)),Do}var ko={},WR;function cF(){return WR||(WR=1,(function(e){var i=ko&&ko.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=ko&&ko.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(vj(),e)})(ko)),ko}var bv={},wv={},GR;function vE(){return GR||(GR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthChain=e.AuthLink=e.AuthLinkType=void 0;const i=nt();var t;(function(o){o.SIGNER="SIGNER",o.ECDSA_PERSONAL_EPHEMERAL="ECDSA_EPHEMERAL",o.ECDSA_PERSONAL_SIGNED_ENTITY="ECDSA_SIGNED_ENTITY",o.ECDSA_EIP_1654_EPHEMERAL="ECDSA_EIP_1654_EPHEMERAL",o.ECDSA_EIP_1654_SIGNED_ENTITY="ECDSA_EIP_1654_SIGNED_ENTITY"})(t=e.AuthLinkType||(e.AuthLinkType={}));var n;(function(o){o.schema={type:"object",properties:{type:{type:"string",enum:Object.values(t)},payload:{type:"string"},signature:{type:"string",nullable:!0}},required:["payload","type"],if:{properties:{type:{not:{const:t.SIGNER}}}},then:{required:["signature"]},else:{oneOf:[{properties:{signature:{type:"string",const:""}},required:["signature"]},{properties:{signature:{type:"null"}}}]}},o.validate=(0,i.generateLazyValidator)(o.schema)})(n=e.AuthLink||(e.AuthLink={})),(function(o){o.schema={type:"array",items:n.schema,minItems:1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.AuthChain||(e.AuthChain={}))})(wv)),wv}var KR;function dF(){return KR||(KR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PointerChangesSyncDeployment=e.SnapshotSyncDeployment=void 0;const i=Ws(),t=vE(),n=nt();(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.SnapshotSyncDeployment||(e.SnapshotSyncDeployment={})),(function(o){o.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},authChain:t.AuthChain.schema,entityTimestamp:{type:"number",minimum:0},localTimestamp:{type:"number",minimum:0}},oneOf:[{properties:{entityId:i.IPFSv1.schema}},{properties:{entityId:i.IPFSv2.schema}}],required:["entityId","entityType","pointers","localTimestamp","entityTimestamp","authChain"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.PointerChangesSyncDeployment||(e.PointerChangesSyncDeployment={}))})(bv)),bv}var Sv={},Tv={},YR;function Tj(){return YR||(YR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ContentMapping=void 0;const i=Ws(),t=nt();(function(n){n.schema={type:"object",properties:{file:{type:"string",minLength:1},hash:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]}},required:["file","hash"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.ContentMapping||(e.ContentMapping={}))})(Tv)),Tv}var XR;function fF(){return XR||(XR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Entity=e.EntityType=void 0;const i=Ws(),t=Tj(),n=nt();(function(o){o.SCENE="scene",o.PROFILE="profile",o.WEARABLE="wearable",o.STORE="store",o.EMOTE="emote",o.OUTFITS="outfits"})(e.EntityType||(e.EntityType={})),(function(o){o.schema={type:"object",properties:{version:{type:"string",enum:["v3"]},id:{type:"string",oneOf:[i.IPFSv1.schema,i.IPFSv2.schema]},type:{type:"string"},pointers:{type:"array",items:{type:"string",minLength:1}},timestamp:{type:"number",minimum:0},content:{type:"array",items:t.ContentMapping.schema},metadata:{type:"object",nullable:!0}},required:["version","id","type","pointers","timestamp","content"]},o.validate=(0,n.generateLazyValidator)(o.schema)})(e.Entity||(e.Entity={}))})(Sv)),Sv}var Av={},JR;function pF(){return JR||(JR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeploymentWithAuthChain=void 0;const i=vE(),t=nt();(function(n){n.schema={type:"object",properties:{entityId:{type:"string"},entityType:{type:"string"},pointers:{type:"array",items:{type:"string"},minItems:1},localTimestamp:{type:"number",minimum:0},authChain:i.AuthChain.schema},required:["entityId","entityType","pointers","localTimestamp","authChain"]},n.validate=(0,t.generateLazyValidator)(n.schema)})(e.DeploymentWithAuthChain||(e.DeploymentWithAuthChain={}))})(Av)),Av}var qo={},Ov={},QR;function mF(){return QR||(QR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Outfits=e.Outfit=void 0;const i=Ko(),t=Ws(),n=nt();var o;(function(s){s.schema={type:"object",required:["bodyShape","eyes","hair","skin","wearables"],properties:{bodyShape:{type:"string"},eyes:{type:"object",required:["color"],properties:{color:t.Color3.schema}},hair:{type:"object",required:["color"],properties:{color:t.Color3.schema}},skin:{type:"object",required:["color"],properties:{color:t.Color3.schema}},wearables:{type:"array",items:{type:"string"}},forceRender:{type:"array",nullable:!0,items:i.WearableCategory.schema}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(o=e.Outfit||(e.Outfit={})),(function(s){s.schema={type:"object",required:["outfits","namesForExtraSlots"],properties:{outfits:{type:"array",items:{type:"object",required:["slot","outfit"],properties:{slot:{type:"number"},outfit:o.schema}}},namesForExtraSlots:{type:"array",uniqueItems:!0,items:{type:"string"}}},additionalProperties:!0},s.validate=(0,n.generateLazyValidator)(s.schema)})(e.Outfits||(e.Outfits={}))})(Ov)),Ov}var ZR;function hF(){return ZR||(ZR=1,(function(e){var i=qo&&qo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=qo&&qo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(mF(),e)})(qo)),qo}var xR;function _E(){return xR||(xR=1,(function(e){var i=jo&&jo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=jo&&jo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(rF(),e),t(iF(),e),t(Sj(),e),t(hE(),e),t(cF(),e),t(dF(),e),t(fF(),e),t(pF(),e),t(hF(),e)})(jo)),jo}var $R;function yF(){return $R||($R=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WearableJson=void 0;const i=of(),t=Ko(),n=mE(),o=nt(),s=_E();(function(l){l.schema={type:"object",properties:{description:{type:"string"},rarity:Object.assign(Object.assign({},i.Rarity.schema),{nullable:!0}),name:{type:"string"},data:{type:"object",properties:{replaces:{type:"array",items:t.WearableCategory.schema},hides:{type:"array",items:t.WearableCategory.schema},tags:{type:"array",items:{type:"string",minLength:1}},representations:{type:"array",items:n.WearableRepresentation.schema,minItems:1},category:t.WearableCategory.schema,removesDefaultHiding:{type:"array",nullable:!0,items:s.HideableWearableCategory.schema}},required:["replaces","hides","tags","representations","category"]}},additionalProperties:!0,required:["description","name","data"]},l.validate=(0,o.generateLazyValidator)(l.schema)})(e.WearableJson||(e.WearableJson={}))})(Wg)),Wg}var eN;function gF(){return eN||(eN=1,(function(e){var i=Mo&&Mo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Mo&&Mo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(eF(),e),t(yF(),e)})(Mo)),Mo}var tN;function vF(){return tN||(tN=1,(function(e){var i=No&&No.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=No&&No.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t($U(),e),t(gF(),e)})(No)),No}var Iv={},Pv={},Rv={},rN;function Aj(){return rN||(rN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getChainId=e.ChainName=void 0;const i=nt(),t=pi();var n;(function(s){s.ETHEREUM_MAINNET="Ethereum Mainnet",s.ETHEREUM_ROPSTEN="Ropsten",s.ETHEREUM_RINKEBY="Rinkeby",s.ETHEREUM_GOERLI="Goerli",s.ETHEREUM_KOVAN="Kovan",s.ETHEREUM_SEPOLIA="Sepolia",s.MATIC_MAINNET="Polygon",s.MATIC_MUMBAI="Mumbai",s.AVALANCHE_MAINNET="Avalanche Mainnet",s.BINANCE_MAINNET="Binance Smart Chain Mainnet",s.ARBITRUM_MAINNET="Arbitrum One",s.OPTIMISM_MAINNET="Optimism Mainnet",s.FANTOM_MAINNET="Fantom Mainnet"})(n=e.ChainName||(e.ChainName={}));function o(s){switch(s){case n.ETHEREUM_MAINNET:return t.ChainId.ETHEREUM_MAINNET;case n.ETHEREUM_ROPSTEN:return t.ChainId.ETHEREUM_ROPSTEN;case n.ETHEREUM_RINKEBY:return t.ChainId.ETHEREUM_RINKEBY;case n.ETHEREUM_GOERLI:return t.ChainId.ETHEREUM_GOERLI;case n.ETHEREUM_KOVAN:return t.ChainId.ETHEREUM_KOVAN;case n.ETHEREUM_SEPOLIA:return t.ChainId.ETHEREUM_SEPOLIA;case n.MATIC_MAINNET:return t.ChainId.MATIC_MAINNET;case n.MATIC_MUMBAI:return t.ChainId.MATIC_MUMBAI;default:return null}}e.getChainId=o,(function(s){s.schema={type:"string",enum:Object.values(s)},s.validate=(0,i.generateLazyValidator)(s.schema)})(n=e.ChainName||(e.ChainName={}))})(Rv)),Rv}var Nv={},nN;function fi(){return nN||(nN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Network=void 0;const i=nt();(function(t){t.ETHEREUM="ETHEREUM",t.MATIC="MATIC"})(e.Network||(e.Network={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Network||(e.Network={}))})(Nv)),Nv}var iN;function pi(){return iN||(iN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getNetwork=e.getNetworkMapping=e.getURNProtocol=e.getChainName=e.ChainId=void 0;const i=nt(),t=Aj(),n=fi();var o;(function(p){p[p.ETHEREUM_MAINNET=1]="ETHEREUM_MAINNET",p[p.ETHEREUM_ROPSTEN=3]="ETHEREUM_ROPSTEN",p[p.ETHEREUM_RINKEBY=4]="ETHEREUM_RINKEBY",p[p.ETHEREUM_GOERLI=5]="ETHEREUM_GOERLI",p[p.ETHEREUM_KOVAN=42]="ETHEREUM_KOVAN",p[p.ETHEREUM_SEPOLIA=11155111]="ETHEREUM_SEPOLIA",p[p.MATIC_MAINNET=137]="MATIC_MAINNET",p[p.MATIC_MUMBAI=80001]="MATIC_MUMBAI"})(o=e.ChainId||(e.ChainId={}));function s(p){switch(p){case o.ETHEREUM_MAINNET:return t.ChainName.ETHEREUM_MAINNET;case o.ETHEREUM_ROPSTEN:return t.ChainName.ETHEREUM_ROPSTEN;case o.ETHEREUM_RINKEBY:return t.ChainName.ETHEREUM_RINKEBY;case o.ETHEREUM_GOERLI:return t.ChainName.ETHEREUM_GOERLI;case o.ETHEREUM_KOVAN:return t.ChainName.ETHEREUM_KOVAN;case o.ETHEREUM_SEPOLIA:return t.ChainName.ETHEREUM_SEPOLIA;case o.MATIC_MAINNET:return t.ChainName.MATIC_MAINNET;case o.MATIC_MUMBAI:return t.ChainName.MATIC_MUMBAI;default:return null}}e.getChainName=s;function l(p){switch(p){case o.ETHEREUM_MAINNET:return"ethereum";case o.ETHEREUM_ROPSTEN:return"ropsten";case o.ETHEREUM_RINKEBY:return"rinkeby";case o.ETHEREUM_GOERLI:return"goerli";case o.ETHEREUM_KOVAN:return"kovan";case o.ETHEREUM_SEPOLIA:return"sepolia";case o.MATIC_MAINNET:return"matic";case o.MATIC_MUMBAI:return"mumbai";default:return""}}e.getURNProtocol=l;function c(p){switch(p){case o.ETHEREUM_MAINNET:return{[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET};case o.ETHEREUM_ROPSTEN:return{[n.Network.ETHEREUM]:o.ETHEREUM_ROPSTEN,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_RINKEBY:return{[n.Network.ETHEREUM]:o.ETHEREUM_RINKEBY,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_GOERLI:return{[n.Network.ETHEREUM]:o.ETHEREUM_GOERLI,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_KOVAN:return{[n.Network.ETHEREUM]:o.ETHEREUM_KOVAN,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.ETHEREUM_SEPOLIA:return{[n.Network.ETHEREUM]:o.ETHEREUM_SEPOLIA,[n.Network.MATIC]:o.MATIC_MUMBAI};case o.MATIC_MAINNET:return{[n.Network.ETHEREUM]:o.MATIC_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET};case o.MATIC_MUMBAI:return{[n.Network.ETHEREUM]:o.MATIC_MUMBAI,[n.Network.MATIC]:o.MATIC_MUMBAI};default:return{[n.Network.ETHEREUM]:o.ETHEREUM_MAINNET,[n.Network.MATIC]:o.MATIC_MAINNET}}}e.getNetworkMapping=c;function f(p){switch(p){case o.ETHEREUM_MAINNET:case o.ETHEREUM_ROPSTEN:case o.ETHEREUM_GOERLI:case o.ETHEREUM_KOVAN:case o.ETHEREUM_RINKEBY:case o.ETHEREUM_SEPOLIA:return n.Network.ETHEREUM;case o.MATIC_MAINNET:case o.MATIC_MUMBAI:return n.Network.MATIC}}e.getNetwork=f,(function(p){p.schema={type:"number",enum:Object.values(p)},p.validate=(0,i.generateLazyValidator)(p.schema)})(o=e.ChainId||(e.ChainId={}))})(Pv)),Pv}var Cv={},aN;function EE(){return aN||(aN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ListingStatus=void 0;const i=nt();(function(t){t.OPEN="open",t.SOLD="sold",t.CANCELLED="cancelled"})(e.ListingStatus||(e.ListingStatus={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ListingStatus||(e.ListingStatus={}))})(Cv)),Cv}var oN;function _F(){return oN||(oN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Bid=e.BidSortBy=void 0;const i=nt(),t=pi(),n=EE(),o=fi();(function(s){s.RECENTLY_OFFERED="recently_offered",s.RECENTLY_UPDATED="recently_updated",s.MOST_EXPENSIVE="most_expensive"})(e.BidSortBy||(e.BidSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},bidAddress:{type:"string"},bidder:{type:"string"},seller:{type:"string"},price:{type:"string"},fingerprint:{type:"string"},status:n.ListingStatus.schema,blockchainId:{type:"string"},blockNumber:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"}},required:["id","bidAddress","bidder","seller","price","fingerprint","status","blockchainId","blockNumber","contractAddress","tokenId","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Bid||(e.Bid={}))})(Iv)),Iv}var Mv={},sN;function EF(){return sN||(sN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Account=e.AccountSortBy=void 0;const i=nt();(function(t){t.MOST_SALES="most_sales",t.MOST_PURCHASES="most_purchases",t.MOST_SPENT="most_spent",t.MOST_EARNED="most_earned",t.MOST_ROYALTIES="most_royalties",t.MOST_COLLECTIONS="most_collections"})(e.AccountSortBy||(e.AccountSortBy={})),(function(t){t.schema={type:"object",properties:{id:{type:"string"},address:{type:"string"},sales:{type:"integer"},purchases:{type:"integer"},spent:{type:"string"},earned:{type:"string"},royalties:{type:"string"},collections:{type:"number"}},required:["id","address","sales","purchases","spent","earned","royalties","collections"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Account||(e.Account={}))})(Mv)),Mv}var jv={},uN;function bF(){return uN||(uN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=e.CollectionSortBy=void 0;const i=nt(),t=pi(),n=fi();(function(o){o.NEWEST="newest",o.NAME="name",o.RECENTLY_REVIEWED="recently_reviewed",o.RECENTLY_LISTED="recently_listed",o.SIZE="size"})(e.CollectionSortBy||(e.CollectionSortBy={})),(function(o){o.schema={type:"object",properties:{urn:{type:"string"},creator:{type:"string"},name:{type:"string"},contractAddress:{type:"string"},size:{type:"integer"},isOnSale:{type:"boolean"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema,firstListedAt:{type:"integer",nullable:!0}},required:["urn","creator","name","contractAddress","isOnSale","size","createdAt","updatedAt","reviewedAt","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Collection||(e.Collection={}))})(jv)),jv}var Lv={},Dv={},lN;function sf(){return lN||(lN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFTCategory=void 0;const i=nt();(function(t){t.PARCEL="parcel",t.ESTATE="estate",t.WEARABLE="wearable",t.ENS="ens",t.EMOTE="emote"})(e.NFTCategory||(e.NFTCategory={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.NFTCategory||(e.NFTCategory={}))})(Dv)),Dv}var cN;function wF(){return cN||(cN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Contract=e.ContractSortBy=void 0;const i=nt(),t=pi(),n=fi(),o=sf();(function(s){s.NAME="name"})(e.ContractSortBy||(e.ContractSortBy={})),(function(s){s.schema={type:"object",properties:{name:{type:"string"},address:{type:"string"},category:o.NFTCategory.schema,network:n.Network.schema,chainId:t.ChainId.schema},required:["name","address","category","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Contract||(e.Contract={}))})(Lv)),Lv}var kv={},qv={},dN;function Oj(){return dN||(dN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.NFT=e.NFTSortBy=void 0;const i=nt(),t=pi(),n=_E(),o=fi(),s=sf(),l=of(),c=Ko();(function(f){f.NAME="name",f.NEWEST="newest",f.RECENTLY_LISTED="recently_listed",f.RECENTLY_SOLD="recently_sold",f.CHEAPEST="cheapest",f.RENTAL_LISTING_DATE="rental_listing_date",f.RENTAL_DATE="rented_date",f.MAX_RENTAL_PRICE="max_rental_price",f.MIN_RENTAL_PRICE="min_rental_price"})(e.NFTSortBy||(e.NFTSortBy={})),(function(f){f.schema={type:"object",properties:{id:{type:"string"},tokenId:{type:"string"},contractAddress:{type:"string"},activeOrderId:{type:"string",nullable:!0},openRentalId:{type:"string",nullable:!0},owner:{type:"string"},name:{type:"string"},image:{type:"string"},url:{type:"string"},data:{type:"object",nullable:!1,properties:{parcel:{type:"object",properties:{description:{type:["string"],nullable:!0},x:{type:"string"},y:{type:"string"},estate:{type:"object",properties:{tokenId:{type:"string"},name:{type:"string"}},required:["tokenId","name"],nullable:!0}},required:["description","x","y","estate"],nullable:!0},estate:{type:"object",properties:{description:{type:["string"],nullable:!0},size:{type:"integer"},parcels:{type:"array",items:{type:"object",properties:{x:{type:"number"},y:{type:"number"}},required:["x","y"]}}},required:["description","size","parcels"],nullable:!0},wearable:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:c.WearableCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,isSmart:{type:"boolean"}},required:["bodyShapes","category","description","rarity","isSmart"],nullable:!0},ens:{type:"object",properties:{subdomain:{type:"string"}},required:["subdomain"],nullable:!0},emote:{type:"object",properties:{bodyShapes:{type:"array",items:n.BodyShape.schema},category:n.EmoteCategory.schema,description:{type:"string"},rarity:l.Rarity.schema,loop:{type:"boolean"},hasSound:{type:"boolean"},hasGeometry:{type:"boolean"}},required:["bodyShapes","category","description","rarity","loop"],nullable:!0}},required:[]},issuedId:{type:"string",nullable:!0},itemId:{type:"string",nullable:!0},category:s.NFTCategory.schema,network:o.Network.schema,chainId:t.ChainId.schema,createdAt:{type:"integer"},updatedAt:{type:"integer"},soldAt:{type:"integer"},urn:{type:"string",nullable:!0}},required:["id","tokenId","contractAddress","activeOrderId","openRentalId","owner","name","image","url","data","issuedId","itemId","category","network","chainId","createdAt","updatedAt","soldAt"]},f.validate=(0,i.generateLazyValidator)(f.schema)})(e.NFT||(e.NFT={}))})(qv)),qv}var fN;function SF(){return fN||(fN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Item=e.ItemSortBy=void 0;const i=nt(),t=pi(),n=fi(),o=Oj(),s=sf();(function(l){l.NAME="name",l.NEWEST="newest",l.RECENTLY_REVIEWED="recently_reviewed",l.RECENTLY_SOLD="recently_sold",l.RECENTLY_LISTED="recently_listed",l.CHEAPEST="cheapest"})(e.ItemSortBy||(e.ItemSortBy={})),(function(l){l.schema={type:"object",properties:{id:{type:"string"},name:{type:"string"},thumbnail:{type:"string"},url:{type:"string"},category:s.NFTCategory.schema,contractAddress:{type:"string"},itemId:{type:"string"},rarity:{type:"string"},price:{type:"string"},available:{type:"integer"},isOnSale:{type:"boolean"},creator:{type:"string"},beneficiary:{type:"string",nullable:!0},data:o.NFT.schema.properties.data,network:n.Network.schema,chainId:t.ChainId.schema,urn:{type:"string"},createdAt:{type:"integer"},updatedAt:{type:"integer"},reviewedAt:{type:"integer"},soldAt:{type:"integer"},firstListedAt:{type:"integer",nullable:!0},picks:{type:"object",properties:{pickedByUser:{type:"boolean",nullable:!0},count:{type:"integer"}},required:["count"],nullable:!0},minPrice:{type:"string",nullable:!0},minListingPrice:{type:"string",nullable:!0},maxListingPrice:{type:"string",nullable:!0},listings:{type:"integer",nullable:!0},owners:{type:"integer",nullable:!0}},required:["id","name","thumbnail","url","category","contractAddress","itemId","rarity","price","available","isOnSale","creator","data","network","chainId","createdAt","updatedAt","soldAt"]},l.validate=(0,i.generateLazyValidator)(l.schema)})(e.Item||(e.Item={}))})(kv)),kv}var Bv={},pN;function TF(){return pN||(pN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MetaTransaction=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{from:{type:"string"},params:{type:"array",items:[{type:"string"},{type:"string"}],additionalItems:!1,minItems:2}},additionalProperties:!1,required:["from","params"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.MetaTransaction||(e.MetaTransaction={}))})(Bv)),Bv}var Uv={},mN;function AF(){return mN||(mN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Mint=e.MintSortBy=void 0;const i=nt(),t=pi(),n=fi();(function(o){o.RECENTLY_MINTED="recently_minted",o.MOST_EXPENSIVE="most_expensive"})(e.MintSortBy||(e.MintSortBy={})),(function(o){o.schema={type:"object",properties:{id:{type:"string"},creator:{type:"string"},beneficiary:{type:"string"},minter:{type:"string"},price:{type:"string",nullable:!0},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},issuedId:{type:"string"},timestamp:{type:"integer"},network:n.Network.schema,chainId:t.ChainId.schema},required:["id","creator","beneficiary","minter","itemId","tokenId","issuedId","contractAddress","price","timestamp","network","chainId"]},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.Mint||(e.Mint={}))})(Uv)),Uv}var Fv={},hN;function OF(){return hN||(hN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CatalogSortDirection=e.CatalogSortBy=void 0,(function(i){i.NEWEST="newest",i.RECENTLY_SOLD="recently_sold",i.CHEAPEST="cheapest",i.MOST_EXPENSIVE="most_expensive",i.RECENTLY_LISTED="recently_listed"})(e.CatalogSortBy||(e.CatalogSortBy={})),(function(i){i.ASC="asc",i.DESC="desc"})(e.CatalogSortDirection||(e.CatalogSortDirection={}))})(Fv)),Fv}var Vv={},yN;function IF(){return yN||(yN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Order=e.OrderSortBy=void 0;const i=nt(),t=pi(),n=EE(),o=fi();(function(s){s.RECENTLY_LISTED="recently_listed",s.RECENTLY_UPDATED="recently_updated",s.CHEAPEST="cheapest",s.ISSUED_ID_ASC="issued_id_asc",s.ISSUED_ID_DESC="issued_id_desc",s.OLDEST="oldest"})(e.OrderSortBy||(e.OrderSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},marketplaceAddress:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},owner:{type:"string"},buyer:{type:["string"],nullable:!0},price:{type:"string"},status:n.ListingStatus.schema,network:o.Network.schema,chainId:t.ChainId.schema,expiresAt:{type:"integer"},createdAt:{type:"integer"},updatedAt:{type:"integer"},issuedId:{type:"string"}},required:["id","marketplaceAddress","contractAddress","tokenId","owner","buyer","price","status","network","chainId","expiresAt","createdAt","updatedAt"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Order||(e.Order={}))})(Vv)),Vv}var Hv={},gN;function PF(){return gN||(gN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProviderType=void 0;const i=nt();(function(t){t.INJECTED="injected",t.MAGIC="magic",t.FORTMATIC="formatic",t.NETWORK="network",t.WALLET_CONNECT="wallet_connect",t.WALLET_CONNECT_V2="wallet_connect_v2",t.WALLET_LINK="wallet_link",t.METAMASK_MOBILE="metamask_mobile",t.AUTH_SERVER="auth_server"})(e.ProviderType||(e.ProviderType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.ProviderType||(e.ProviderType={}))})(Hv)),Hv}var zv={},vN;function Ij(){return vN||(vN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SaleType=void 0;const i=nt();(function(t){t.ORDER="order",t.BID="bid",t.MINT="mint"})(e.SaleType||(e.SaleType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.SaleType||(e.SaleType={}))})(zv)),zv}var Wv={},_N;function RF(){return _N||(_N=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Sale=e.SaleSortBy=void 0;const i=nt(),t=pi(),n=Ij(),o=fi();(function(s){s.RECENTLY_SOLD="recently_sold",s.MOST_EXPENSIVE="most_expensive"})(e.SaleSortBy||(e.SaleSortBy={})),(function(s){s.schema={type:"object",properties:{id:{type:"string"},type:n.SaleType.schema,buyer:{type:"string"},seller:{type:"string"},price:{type:"string"},contractAddress:{type:"string"},tokenId:{type:"string"},itemId:{type:"string"},txHash:{type:"string"},timestamp:{type:"integer"},network:o.Network.schema,chainId:t.ChainId.schema},required:["id","buyer","seller","itemId","tokenId","price","contractAddress","timestamp","txHash","network","chainId"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.Sale||(e.Sale={}))})(Wv)),Wv}var Gv={},EN;function NF(){return EN||(EN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.RentalListingCreation=e.PeriodCreation=e.RentalsListingsSortBy=e.RentalsListingsFilterByCategory=e.RentalsListingSortDirection=e.RentalStatus=void 0;const i=nt(),t=pi(),n=fi();(function(s){s.OPEN="open",s.CANCELLED="cancelled",s.EXECUTED="executed",s.CLAIMED="claimed"})(e.RentalStatus||(e.RentalStatus={})),(function(s){s.ASC="asc",s.DESC="desc"})(e.RentalsListingSortDirection||(e.RentalsListingSortDirection={})),(function(s){s.PARCEL="parcel",s.ESTATE="estate"})(e.RentalsListingsFilterByCategory||(e.RentalsListingsFilterByCategory={})),(function(s){s.LAND_CREATION_DATE="land_creation_date",s.RENTAL_LISTING_DATE="rental_listing_date",s.RENTAL_DATE="rented_date",s.NAME="name",s.MAX_RENTAL_PRICE="max_rental_price",s.MIN_RENTAL_PRICE="min_rental_price"})(e.RentalsListingsSortBy||(e.RentalsListingsSortBy={}));var o;(function(s){s.schema={type:"object",properties:{minDays:{type:"integer",minimum:0,maximum:2147483647},maxDays:{type:"integer",minimum:0,maximum:2147483647},pricePerDay:{type:"string",pattern:"^[0-9]+$"}},additionalProperties:!1,required:["minDays","maxDays","pricePerDay"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(o=e.PeriodCreation||(e.PeriodCreation={})),(function(s){s.schema={type:"object",properties:{network:n.Network.schema,chainId:t.ChainId.schema,expiration:{type:"number",minimum:0},signature:{type:"string",minLength:1},tokenId:{type:"string",minLength:1},nonces:{type:"array",minItems:3,maxItems:3,items:{minLength:1,type:"string",pattern:"^[0-9]+$"}},contractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},rentalContractAddress:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"},periods:{type:"array",minItems:1,maxItems:100,uniqueItems:!0,items:o.schema},target:{type:"string",pattern:"^0x[a-fA-F0-9]{40}$"}},additionalProperties:!1,required:["network","chainId","expiration","signature","nonces","tokenId","contractAddress","rentalContractAddress","periods","target"]},s.validate=(0,i.generateLazyValidator)(s.schema)})(e.RentalListingCreation||(e.RentalListingCreation={}))})(Gv)),Gv}var Kv={},bN;function CF(){return bN||(bN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnalyticsDayDataSortBy=void 0,(function(i){i.DATE="date",i.MOST_SALES="most_sales"})(e.AnalyticsDayDataSortBy||(e.AnalyticsDayDataSortBy={}))})(Kv)),Kv}var Yv={},wN;function MF(){return wN||(wN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Store=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{id:{type:"string"},version:{type:"number"},owner:{type:"string"},description:{type:"string"},links:{type:"array",items:{type:"object",properties:{name:{type:"string"},url:{type:"string"}},required:["name","url"]}},images:{type:"array",items:{type:"object",properties:{name:{type:"string"},file:{type:"string"}},required:["name","file"]}}},required:["id","version","owner","description","links","images"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.Store||(e.Store={}))})(Yv)),Yv}var Xv={},SN;function jF(){return SN||(SN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.GenderFilterOption=e.WearableGender=void 0;const i=nt();(function(t){t.MALE="male",t.FEMALE="female"})(e.WearableGender||(e.WearableGender={})),(function(t){t.MALE="male",t.FEMALE="female",t.UNISEX="unisex"})(e.GenderFilterOption||(e.GenderFilterOption={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.WearableGender||(e.WearableGender={}))})(Xv)),Xv}var Jv={},TN;function LF(){return TN||(TN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.World=e.isInsideWorldLimits=e.getWorld=void 0;const i=nt();function t(){return{validWorldRanges:[{xMin:-150,yMin:-150,xMax:150,yMax:150},{xMin:62,yMin:151,xMax:162,yMax:158},{xMin:151,yMin:144,xMax:162,yMax:150},{xMin:151,yMin:59,xMax:163,yMax:143}]}}e.getWorld=t;function n(o,s){const l=t().validWorldRanges;for(const c of l)if(o>=c.xMin&&o<=c.xMax&&s>=c.yMin&&s<=c.yMax)return!0;return!1}e.isInsideWorldLimits=n,(function(o){o.schema={type:"object",required:["validWorldRanges"],properties:{validWorldRanges:{type:"array",default:[{xMin:-150,yMin:-150,xMax:150,yMax:150}],items:{type:"object",required:["xMin","yMin","xMax","yMax"],properties:{xMin:{type:"integer"},yMin:{type:"integer"},xMax:{type:"integer"},yMax:{type:"integer"}}}}},additionalProperties:!1},o.validate=(0,i.generateLazyValidator)(o.schema)})(e.World||(e.World={}))})(Jv)),Jv}var Bo={},Qv={},AN;function DF(){return AN||(AN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewCamera=void 0;const i=nt();(function(t){t.STATIC="static",t.INTERACTIVE="interactive"})(e.PreviewCamera||(e.PreviewCamera={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewCamera||(e.PreviewCamera={}))})(Qv)),Qv}var Zv={},ON;function kF(){return ON||(ON=1,Object.defineProperty(Zv,"__esModule",{value:!0})),Zv}var xv={},IN;function qF(){return IN||(IN=1,Object.defineProperty(xv,"__esModule",{value:!0})),xv}var $v={},PN;function BF(){return PN||(PN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmoteEventType=void 0;const i=nt();(function(t){t.ANIMATION_PLAY="animation_play",t.ANIMATION_PAUSE="animation_pause",t.ANIMATION_LOOP="animation_loop",t.ANIMATION_END="animation_end",t.ANIMATION_PLAYING="animation_playing"})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmoteEventType||(e.PreviewEmoteEventType={}))})($v)),$v}var e_={},RN;function UF(){return RN||(RN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewEmote=void 0;const i=nt();(function(t){t.IDLE="idle",t.WALK="walk",t.RUN="run",t.JUMP="jump",t.CLAP="clap",t.DAB="dab",t.DANCE="dance",t.FASHION="fashion",t.FASHION_2="fashion-2",t.FASHION_3="fashion-3",t.FASHION_4="fashion-4",t.LOVE="love",t.MONEY="money",t.FIST_PUMP="fist-pump",t.HEAD_EXPLODE="head-explode",t.WAVE="wave"})(e.PreviewEmote||(e.PreviewEmote={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewEmote||(e.PreviewEmote={}))})(e_)),e_}var t_={},NN;function FF(){return NN||(NN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sendMessage=e.PreviewMessageType=void 0;const i=nt();(function(n){n.READY="ready",n.LOAD="load",n.ERROR="error",n.UPDATE="update",n.CONTROLLER_REQUEST="controller_request",n.CONTROLLER_RESPONSE="controller_response",n.EMOTE_EVENT="emote_event"})(e.PreviewMessageType||(e.PreviewMessageType={})),(function(n){n.schema={type:"string",enum:Object.values(n)},n.validate=(0,i.generateLazyValidator)(n.schema)})(e.PreviewMessageType||(e.PreviewMessageType={}));const t=(n,o,s,l="*")=>{const c={type:o,payload:s};n.postMessage(c,l)};e.sendMessage=t})(t_)),t_}var r_={},CN;function VF(){return CN||(CN=1,Object.defineProperty(r_,"__esModule",{value:!0})),r_}var n_={},MN;function HF(){return MN||(MN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewProjection=void 0;const i=nt();(function(t){t.ORTHOGRAPHIC="orthographic",t.PERSPECTIVE="perspective"})(e.PreviewProjection||(e.PreviewProjection={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewProjection||(e.PreviewProjection={}))})(n_)),n_}var i_={},jN;function zF(){return jN||(jN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PreviewType=void 0;const i=nt();(function(t){t.TEXTURE="texture",t.WEARABLE="wearable",t.AVATAR="avatar"})(e.PreviewType||(e.PreviewType={})),(function(t){t.schema={type:"string",enum:Object.values(t)},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.PreviewType||(e.PreviewType={}))})(i_)),i_}var a_={},LN;function WF(){return LN||(LN=1,Object.defineProperty(a_,"__esModule",{value:!0})),a_}var o_={},DN;function GF(){return DN||(DN=1,Object.defineProperty(o_,"__esModule",{value:!0})),o_}var s_={},kN;function KF(){return kN||(kN=1,Object.defineProperty(s_,"__esModule",{value:!0})),s_}var u_={},qN;function YF(){return qN||(qN=1,Object.defineProperty(u_,"__esModule",{value:!0})),u_}var l_={},BN;function XF(){return BN||(BN=1,Object.defineProperty(l_,"__esModule",{value:!0})),l_}var c_={},UN;function JF(){return UN||(UN=1,Object.defineProperty(c_,"__esModule",{value:!0})),c_}var d_={},FN;function QF(){return FN||(FN=1,Object.defineProperty(d_,"__esModule",{value:!0})),d_}var f_={},VN;function ZF(){return VN||(VN=1,Object.defineProperty(f_,"__esModule",{value:!0})),f_}var HN;function xF(){return HN||(HN=1,(function(e){var i=Bo&&Bo.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Bo&&Bo.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(DF(),e),t(kF(),e),t(qF(),e),t(BF(),e),t(UF(),e),t(FF(),e),t(VF(),e),t(HF(),e),t(zF(),e),t(WF(),e),t(GF(),e),t(KF(),e),t(YF(),e),t(XF(),e),t(JF(),e),t(QF(),e),t(ZF(),e)})(Bo)),Bo}var p_={},zN;function $F(){return zN||(zN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkerAuthorization=void 0;const i=nt();(function(t){t.schema={type:"object",properties:{name:{type:"string"},desc:{type:"string"},startDate:{type:"string",nullable:!0},endDate:{type:"string",nullable:!0},contactInfo:{type:"object",properties:{name:{type:"string"}},required:["name"]},addresses:{type:"array",items:{type:"string"},minItems:1},plots:{type:"array",items:{type:"string"},minItems:1}},required:["name","desc","contactInfo","addresses","plots"]},t.validate=(0,i.generateLazyValidator)(t.schema)})(e.LinkerAuthorization||(e.LinkerAuthorization={}))})(p_)),p_}var WN;function eV(){return WN||(WN=1,(function(e){var i=ii&&ii.__createBinding||(Object.create?(function(be,Le,Me,Be){Be===void 0&&(Be=Me);var Te=Object.getOwnPropertyDescriptor(Le,Me);(!Te||("get"in Te?!Le.__esModule:Te.writable||Te.configurable))&&(Te={enumerable:!0,get:function(){return Le[Me]}}),Object.defineProperty(be,Be,Te)}):(function(be,Le,Me,Be){Be===void 0&&(Be=Me),be[Be]=Le[Me]})),t=ii&&ii.__setModuleDefault||(Object.create?(function(be,Le){Object.defineProperty(be,"default",{enumerable:!0,value:Le})}):function(be,Le){be.default=Le}),n=ii&&ii.__importStar||function(be){if(be&&be.__esModule)return be;var Le={};if(be!=null)for(var Me in be)Me!=="default"&&Object.prototype.hasOwnProperty.call(be,Me)&&i(Le,be,Me);return t(Le,be),Le},o=ii&&ii.__exportStar||function(be,Le){for(var Me in be)Me!=="default"&&!Object.prototype.hasOwnProperty.call(Le,Me)&&i(Le,be,Me)};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(vF());e.sdk=s,o(nt(),e);var l=_F();Object.defineProperty(e,"Bid",{enumerable:!0,get:function(){return l.Bid}}),Object.defineProperty(e,"BidSortBy",{enumerable:!0,get:function(){return l.BidSortBy}});var c=EF();Object.defineProperty(e,"Account",{enumerable:!0,get:function(){return c.Account}}),Object.defineProperty(e,"AccountSortBy",{enumerable:!0,get:function(){return c.AccountSortBy}});var f=pi();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=Aj();Object.defineProperty(e,"ChainName",{enumerable:!0,get:function(){return p.ChainName}}),Object.defineProperty(e,"getChainId",{enumerable:!0,get:function(){return p.getChainId}});var y=bF();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return y.Collection}}),Object.defineProperty(e,"CollectionSortBy",{enumerable:!0,get:function(){return y.CollectionSortBy}});var m=wF();Object.defineProperty(e,"Contract",{enumerable:!0,get:function(){return m.Contract}}),Object.defineProperty(e,"ContractSortBy",{enumerable:!0,get:function(){return m.ContractSortBy}});var h=SF();Object.defineProperty(e,"Item",{enumerable:!0,get:function(){return h.Item}}),Object.defineProperty(e,"ItemSortBy",{enumerable:!0,get:function(){return h.ItemSortBy}});var O=EE();Object.defineProperty(e,"ListingStatus",{enumerable:!0,get:function(){return O.ListingStatus}});var C=TF();Object.defineProperty(e,"MetaTransaction",{enumerable:!0,get:function(){return C.MetaTransaction}});var R=AF();Object.defineProperty(e,"Mint",{enumerable:!0,get:function(){return R.Mint}}),Object.defineProperty(e,"MintSortBy",{enumerable:!0,get:function(){return R.MintSortBy}});var I=fi();Object.defineProperty(e,"Network",{enumerable:!0,get:function(){return I.Network}});var N=sf();Object.defineProperty(e,"NFTCategory",{enumerable:!0,get:function(){return N.NFTCategory}});var _=Oj();Object.defineProperty(e,"NFT",{enumerable:!0,get:function(){return _.NFT}}),Object.defineProperty(e,"NFTSortBy",{enumerable:!0,get:function(){return _.NFTSortBy}});var A=OF();Object.defineProperty(e,"CatalogSortBy",{enumerable:!0,get:function(){return A.CatalogSortBy}}),Object.defineProperty(e,"CatalogSortDirection",{enumerable:!0,get:function(){return A.CatalogSortDirection}});var w=IF();Object.defineProperty(e,"Order",{enumerable:!0,get:function(){return w.Order}}),Object.defineProperty(e,"OrderSortBy",{enumerable:!0,get:function(){return w.OrderSortBy}});var v=PF();Object.defineProperty(e,"ProviderType",{enumerable:!0,get:function(){return v.ProviderType}});var S=of();Object.defineProperty(e,"Rarity",{enumerable:!0,get:function(){return S.Rarity}});var M=Ij();Object.defineProperty(e,"SaleType",{enumerable:!0,get:function(){return M.SaleType}});var F=RF();Object.defineProperty(e,"Sale",{enumerable:!0,get:function(){return F.Sale}}),Object.defineProperty(e,"SaleSortBy",{enumerable:!0,get:function(){return F.SaleSortBy}});var W=NF();Object.defineProperty(e,"RentalStatus",{enumerable:!0,get:function(){return W.RentalStatus}}),Object.defineProperty(e,"RentalsListingSortDirection",{enumerable:!0,get:function(){return W.RentalsListingSortDirection}}),Object.defineProperty(e,"RentalsListingsFilterByCategory",{enumerable:!0,get:function(){return W.RentalsListingsFilterByCategory}}),Object.defineProperty(e,"RentalsListingsSortBy",{enumerable:!0,get:function(){return W.RentalsListingsSortBy}}),Object.defineProperty(e,"RentalListingCreation",{enumerable:!0,get:function(){return W.RentalListingCreation}}),Object.defineProperty(e,"PeriodCreation",{enumerable:!0,get:function(){return W.PeriodCreation}});var J=CF();Object.defineProperty(e,"AnalyticsDayDataSortBy",{enumerable:!0,get:function(){return J.AnalyticsDayDataSortBy}});var pe=MF();Object.defineProperty(e,"Store",{enumerable:!0,get:function(){return pe.Store}});var Oe=jF();Object.defineProperty(e,"WearableGender",{enumerable:!0,get:function(){return Oe.WearableGender}}),Object.defineProperty(e,"GenderFilterOption",{enumerable:!0,get:function(){return Oe.GenderFilterOption}});var Ae=LF();Object.defineProperty(e,"World",{enumerable:!0,get:function(){return Ae.World}}),Object.defineProperty(e,"getWorld",{enumerable:!0,get:function(){return Ae.getWorld}}),Object.defineProperty(e,"isInsideWorldLimits",{enumerable:!0,get:function(){return Ae.isInsideWorldLimits}}),o(xF(),e),o(_E(),e),o(Ws(),e),o($F(),e),o(vE(),e),o(Tj(),e)})(ii)),ii}var GN;function Pj(){return GN||(GN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AuthLink=e.AuthLinkType=e.AuthChain=void 0;const i=eV();Object.defineProperty(e,"AuthChain",{enumerable:!0,get:function(){return i.AuthChain}}),Object.defineProperty(e,"AuthLinkType",{enumerable:!0,get:function(){return i.AuthLinkType}}),Object.defineProperty(e,"AuthLink",{enumerable:!0,get:function(){return i.AuthLink}})})(Fg)),Fg}var Mu={},KN;function tV(){if(KN)return Mu;KN=1,Object.defineProperty(Mu,"__esModule",{value:!0}),Mu.moveMinutes=void 0;function e(i){const t=new Date;return t.setMinutes(t.getMinutes()+i),t}return Mu.moveMinutes=e,Mu}var Rd={},YN;function rV(){if(YN)return Rd;YN=1,Object.defineProperty(Rd,"__esModule",{value:!0});const e=af();class i{constructor(n,o=!0){this.requestManager=n,this.checkedBlocks={},this.saveBlocks=o,o&&(this.savedBlocks={}),this.requests=0}async fillBlockTime(){const n=await this.getBlockWrapper("latest"),o=await this.getBlockWrapper(1);this.blockTime=(n.timestamp-o.timestamp)/Number(n.number)-1,this.firstTimestamp=o.timestamp}async getDate(n,o=!0){const s=n/1e3,l=Date.now()/1e3;if((typeof this.firstTimestamp>"u"||typeof this.blockTime>"u")&&await this.fillBlockTime(),s<this.firstTimestamp)return{block:1,timestamp:s};if(s>=l||s>this.savedBlocks.latest.timestamp)return{block:(0,e.toBigNumber)(await this.requestManager.eth_blockNumber()).toNumber(),timestamp:s};this.checkedBlocks[s]=[];const c=await this.getBlockWrapper(Math.ceil((s-this.firstTimestamp/this.blockTime)/1e3));return{block:await this.findBetter(s,c,o),timestamp:s}}async findBetter(n,o,s,l=this.blockTime){if(await this.isBetterBlock(n,o,s))return o.number;const c=n-o.timestamp;let f=Math.ceil(c/l);f===0&&(f=c<0?-1:1);const p=await this.getBlockWrapper(this.getNextBlock(n,o.number,f));return l=Math.abs((o.timestamp-p.timestamp)/(o.number-p.number)),this.findBetter(n,p,s,l)}async isBetterBlock(n,o,s){const l=o.timestamp;if(s){if(l<n)return!1;const c=await this.getBlockWrapper(o.number-1);if(l>=n&&c.timestamp<n)return!0}else{if(l>=n)return!1;const c=await this.getBlockWrapper(o.number+1);if(l<n&&c.timestamp>=n)return!0}return!1}getNextBlock(n,o,s){const l=o+s;return this.checkedBlocks[n].includes(l)?this.getNextBlock(n,o,s<0?++s:--s):(this.checkedBlocks[n].push(l),l)}async getBlockWrapper(n){if(!this.saveBlocks){const s=await this.requestManager.eth_getBlockByNumber(n,!1);return{number:(0,e.toBigNumber)(s.number).toNumber(),timestamp:(0,e.toBigNumber)(s.timestamp).toNumber()}}if(this.savedBlocks[n.toString()])return this.savedBlocks[n];if(typeof n=="number"&&this.savedBlocks.latest&&this.savedBlocks.latest.number<=n)return this.savedBlocks.latest;const{timestamp:o}=await this.requestManager.eth_getBlockByNumber(n,!1);return this.savedBlocks[n.toString()]={number:(0,e.toBigNumber)(n==="latest"?await this.requestManager.eth_blockNumber():n).toNumber(),timestamp:(0,e.toBigNumber)(o).toNumber()},this.requests++,this.savedBlocks[n.toString()]}}return Rd.default=i,Rd}var kr={},m_={},h_={},Wr={},XN;function bE(){if(XN)return Wr;XN=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.output=Wr.exists=Wr.hash=Wr.bytes=Wr.bool=Wr.number=void 0;function e(c){if(!Number.isSafeInteger(c)||c<0)throw new Error(`Wrong positive integer: ${c}`)}Wr.number=e;function i(c){if(typeof c!="boolean")throw new Error(`Expected boolean, not ${c}`)}Wr.bool=i;function t(c,...f){if(!(c instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(f.length>0&&!f.includes(c.length))throw new TypeError(`Expected Uint8Array of length ${f}, not of length=${c.length}`)}Wr.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)}Wr.hash=n;function o(c,f=!0){if(c.destroyed)throw new Error("Hash instance has been destroyed");if(f&&c.finished)throw new Error("Hash#digest() has already been called")}Wr.exists=o;function s(c,f){t(c);const p=f.outputLen;if(c.length<p)throw new Error(`digestInto() expects output buffer of length at least ${p}`)}Wr.output=s;const l={number:e,bool:i,bytes:t,hash:n,exists:o,output:s};return Wr.default=l,Wr}var y_={},ju={},JN;function nV(){return JN||(JN=1,Object.defineProperty(ju,"__esModule",{value:!0}),ju.crypto=void 0,ju.crypto={node:void 0,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0}),ju}var QN;function dl(){return QN||(QN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.randomBytes=e.wrapConstructorWithOpts=e.wrapConstructor=e.checkOpts=e.Hash=e.concatBytes=e.toBytes=e.utf8ToBytes=e.asyncLoop=e.nextTick=e.hexToBytes=e.bytesToHex=e.isLE=e.rotr=e.createView=e.u32=e.u8=void 0;const i=nV(),t=w=>new Uint8Array(w.buffer,w.byteOffset,w.byteLength);e.u8=t;const n=w=>new Uint32Array(w.buffer,w.byteOffset,Math.floor(w.byteLength/4));e.u32=n;const o=w=>new DataView(w.buffer,w.byteOffset,w.byteLength);e.createView=o;const s=(w,v)=>w<<32-v|w>>>v;if(e.rotr=s,e.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,!e.isLE)throw new Error("Non little-endian hardware is not supported");const l=Array.from({length:256},(w,v)=>v.toString(16).padStart(2,"0"));function c(w){if(!(w instanceof Uint8Array))throw new Error("Uint8Array expected");let v="";for(let S=0;S<w.length;S++)v+=l[w[S]];return v}e.bytesToHex=c;function f(w){if(typeof w!="string")throw new TypeError("hexToBytes: expected string, got "+typeof w);if(w.length%2)throw new Error("hexToBytes: received invalid unpadded hex");const v=new Uint8Array(w.length/2);for(let S=0;S<v.length;S++){const M=S*2,F=w.slice(M,M+2),W=Number.parseInt(F,16);if(Number.isNaN(W)||W<0)throw new Error("Invalid byte sequence");v[S]=W}return v}e.hexToBytes=f;const p=async()=>{};e.nextTick=p;async function y(w,v,S){let M=Date.now();for(let F=0;F<w;F++){S(F);const W=Date.now()-M;W>=0&&W<v||(await(0,e.nextTick)(),M+=W)}}e.asyncLoop=y;function m(w){if(typeof w!="string")throw new TypeError(`utf8ToBytes expected string, got ${typeof w}`);return new TextEncoder().encode(w)}e.utf8ToBytes=m;function h(w){if(typeof w=="string"&&(w=m(w)),!(w instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof w})`);return w}e.toBytes=h;function O(...w){if(!w.every(M=>M instanceof Uint8Array))throw new Error("Uint8Array list expected");if(w.length===1)return w[0];const v=w.reduce((M,F)=>M+F.length,0),S=new Uint8Array(v);for(let M=0,F=0;M<w.length;M++){const W=w[M];S.set(W,F),F+=W.length}return S}e.concatBytes=O;class C{clone(){return this._cloneInto()}}e.Hash=C;const R=w=>Object.prototype.toString.call(w)==="[object Object]"&&w.constructor===Object;function I(w,v){if(v!==void 0&&(typeof v!="object"||!R(v)))throw new TypeError("Options should be object or undefined");return Object.assign(w,v)}e.checkOpts=I;function N(w){const v=M=>w().update(h(M)).digest(),S=w();return v.outputLen=S.outputLen,v.blockLen=S.blockLen,v.create=()=>w(),v}e.wrapConstructor=N;function _(w){const v=(M,F)=>w(F).update(h(M)).digest(),S=w({});return v.outputLen=S.outputLen,v.blockLen=S.blockLen,v.create=M=>w(M),v}e.wrapConstructorWithOpts=_;function A(w=32){if(i.crypto.web)return i.crypto.web.getRandomValues(new Uint8Array(w));if(i.crypto.node)return new Uint8Array(i.crypto.node.randomBytes(w).buffer);throw new Error("The environment doesn't have randomBytes function")}e.randomBytes=A})(y_)),y_}var ZN;function iV(){return ZN||(ZN=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.hmac=void 0;const i=bE(),t=dl();class n extends t.Hash{constructor(l,c){super(),this.finished=!1,this.destroyed=!1,i.default.hash(l);const f=(0,t.toBytes)(c);if(this.iHash=l.create(),typeof this.iHash.update!="function")throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const p=this.blockLen,y=new Uint8Array(p);y.set(f.length>p?l.create().update(f).digest():f);for(let m=0;m<y.length;m++)y[m]^=54;this.iHash.update(y),this.oHash=l.create();for(let m=0;m<y.length;m++)y[m]^=106;this.oHash.update(y),y.fill(0)}update(l){return i.default.exists(this),this.iHash.update(l),this}digestInto(l){i.default.exists(this),i.default.bytes(l,this.outputLen),this.finished=!0,this.iHash.digestInto(l),this.oHash.update(l),this.oHash.digestInto(l),this.destroy()}digest(){const l=new Uint8Array(this.oHash.outputLen);return this.digestInto(l),l}_cloneInto(l){l||(l=Object.create(Object.getPrototypeOf(this),{}));const{oHash:c,iHash:f,finished:p,destroyed:y,blockLen:m,outputLen:h}=this;return l=l,l.finished=p,l.destroyed=y,l.blockLen=m,l.outputLen=h,l.oHash=c._cloneInto(l.oHash),l.iHash=f._cloneInto(l.iHash),l}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const o=(s,l,c)=>new n(s,l).update(c).digest();e.hmac=o,e.hmac.create=(s,l)=>new n(s,l)})(h_)),h_}var Uo={},Lu={},xN;function aV(){if(xN)return Lu;xN=1,Object.defineProperty(Lu,"__esModule",{value:!0}),Lu.SHA2=void 0;const e=bE(),i=dl();function t(o,s,l,c){if(typeof o.setBigUint64=="function")return o.setBigUint64(s,l,c);const f=BigInt(32),p=BigInt(4294967295),y=Number(l>>f&p),m=Number(l&p),h=c?4:0,O=c?0:4;o.setUint32(s+h,y,c),o.setUint32(s+O,m,c)}class n extends i.Hash{constructor(s,l,c,f){super(),this.blockLen=s,this.outputLen=l,this.padOffset=c,this.isLE=f,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(s),this.view=(0,i.createView)(this.buffer)}update(s){e.default.exists(this);const{view:l,buffer:c,blockLen:f}=this;s=(0,i.toBytes)(s);const p=s.length;for(let y=0;y<p;){const m=Math.min(f-this.pos,p-y);if(m===f){const h=(0,i.createView)(s);for(;f<=p-y;y+=f)this.process(h,y);continue}c.set(s.subarray(y,y+m),this.pos),this.pos+=m,y+=m,this.pos===f&&(this.process(l,0),this.pos=0)}return this.length+=s.length,this.roundClean(),this}digestInto(s){e.default.exists(this),e.default.output(s,this),this.finished=!0;const{buffer:l,view:c,blockLen:f,isLE:p}=this;let{pos:y}=this;l[y++]=128,this.buffer.subarray(y).fill(0),this.padOffset>f-y&&(this.process(c,0),y=0);for(let R=y;R<f;R++)l[R]=0;t(c,f-8,BigInt(this.length*8),p),this.process(c,0);const m=(0,i.createView)(s),h=this.outputLen;if(h%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const O=h/4,C=this.get();if(O>C.length)throw new Error("_sha2: outputLen bigger than state");for(let R=0;R<O;R++)m.setUint32(4*R,C[R],p)}digest(){const{buffer:s,outputLen:l}=this;this.digestInto(s);const c=s.slice(0,l);return this.destroy(),c}_cloneInto(s){s||(s=new this.constructor),s.set(...this.get());const{blockLen:l,buffer:c,length:f,finished:p,destroyed:y,pos:m}=this;return s.length=f,s.pos=m,s.finished=p,s.destroyed=y,f%l&&s.buffer.set(c),s}}return Lu.SHA2=n,Lu}var $N;function Rj(){if($N)return Uo;$N=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.sha224=Uo.sha256=void 0;const e=aV(),i=dl(),t=(p,y,m)=>p&y^~p&m,n=(p,y,m)=>p&y^p&m^y&m,o=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),l=new Uint32Array(64);class c extends e.SHA2{constructor(){super(64,32,8,!1),this.A=s[0]|0,this.B=s[1]|0,this.C=s[2]|0,this.D=s[3]|0,this.E=s[4]|0,this.F=s[5]|0,this.G=s[6]|0,this.H=s[7]|0}get(){const{A:y,B:m,C:h,D:O,E:C,F:R,G:I,H:N}=this;return[y,m,h,O,C,R,I,N]}set(y,m,h,O,C,R,I,N){this.A=y|0,this.B=m|0,this.C=h|0,this.D=O|0,this.E=C|0,this.F=R|0,this.G=I|0,this.H=N|0}process(y,m){for(let w=0;w<16;w++,m+=4)l[w]=y.getUint32(m,!1);for(let w=16;w<64;w++){const v=l[w-15],S=l[w-2],M=(0,i.rotr)(v,7)^(0,i.rotr)(v,18)^v>>>3,F=(0,i.rotr)(S,17)^(0,i.rotr)(S,19)^S>>>10;l[w]=F+l[w-7]+M+l[w-16]|0}let{A:h,B:O,C,D:R,E:I,F:N,G:_,H:A}=this;for(let w=0;w<64;w++){const v=(0,i.rotr)(I,6)^(0,i.rotr)(I,11)^(0,i.rotr)(I,25),S=A+v+t(I,N,_)+o[w]+l[w]|0,F=((0,i.rotr)(h,2)^(0,i.rotr)(h,13)^(0,i.rotr)(h,22))+n(h,O,C)|0;A=_,_=N,N=I,I=R+S|0,R=C,C=O,O=h,h=S+F|0}h=h+this.A|0,O=O+this.B|0,C=C+this.C|0,R=R+this.D|0,I=I+this.E|0,N=N+this.F|0,_=_+this.G|0,A=A+this.H|0,this.set(h,O,C,R,I,N,_,A)}roundClean(){l.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class f extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}return Uo.sha256=(0,i.wrapConstructor)(()=>new c),Uo.sha224=(0,i.wrapConstructor)(()=>new f),Uo}var g_={};const oV={},sV=Object.freeze(Object.defineProperty({__proto__:null,default:oV},Symbol.toStringTag,{value:"Module"})),uV=zL(sV);var eC;function tC(){return eC||(eC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.schnorr=e.verify=e.signSync=e.sign=e.getSharedSecret=e.recoverPublicKey=e.getPublicKey=e.Signature=e.Point=e.CURVE=void 0;const i=uV,t=BigInt(0),n=BigInt(1),o=BigInt(2),s=BigInt(3),l=BigInt(8),c=Object.freeze({a:t,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:n,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")});e.CURVE=c;const f=(ne,U)=>(ne+U/o)/U,p={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(ne){const{n:U}=c,$=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),me=-n*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),Se=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),Ce=$,Ke=BigInt("0x100000000000000000000000000000000"),Ye=f(Ce*ne,U),mt=f(-me*ne,U);let ut=q(ne-Ye*$-mt*Se,U),_t=q(-Ye*me-mt*Ce,U);const Tt=ut>Ke,It=_t>Ke;if(Tt&&(ut=U-ut),It&&(_t=U-_t),ut>Ke||_t>Ke)throw new Error("splitScalarEndo: Endomorphism failed, k="+ne);return{k1neg:Tt,k1:ut,k2neg:It,k2:_t}}},y=32,m=32,h=32,O=y+1,C=2*y+1;function R(ne){const{a:U,b:$}=c,me=q(ne*ne),Se=q(me*ne);return q(Se+U*ne+$)}const I=c.a===t;class N extends Error{constructor(U){super(U)}}function _(ne){if(!(ne instanceof A))throw new TypeError("JacobianPoint expected")}class A{constructor(U,$,me){this.x=U,this.y=$,this.z=me}static fromAffine(U){if(!(U instanceof S))throw new TypeError("JacobianPoint#fromAffine: expected Point");return U.equals(S.ZERO)?A.ZERO:new A(U.x,U.y,n)}static toAffineBatch(U){const $=ye(U.map(me=>me.z));return U.map((me,Se)=>me.toAffine($[Se]))}static normalizeZ(U){return A.toAffineBatch(U).map(A.fromAffine)}equals(U){_(U);const{x:$,y:me,z:Se}=this,{x:Ce,y:Ke,z:Ye}=U,mt=q(Se*Se),ut=q(Ye*Ye),_t=q($*ut),Tt=q(Ce*mt),It=q(q(me*Ye)*ut),er=q(q(Ke*Se)*mt);return _t===Tt&&It===er}negate(){return new A(this.x,q(-this.y),this.z)}double(){const{x:U,y:$,z:me}=this,Se=q(U*U),Ce=q($*$),Ke=q(Ce*Ce),Ye=U+Ce,mt=q(o*(q(Ye*Ye)-Se-Ke)),ut=q(s*Se),_t=q(ut*ut),Tt=q(_t-o*mt),It=q(ut*(mt-Tt)-l*Ke),er=q(o*$*me);return new A(Tt,It,er)}add(U){_(U);const{x:$,y:me,z:Se}=this,{x:Ce,y:Ke,z:Ye}=U;if(Ce===t||Ke===t)return this;if($===t||me===t)return U;const mt=q(Se*Se),ut=q(Ye*Ye),_t=q($*ut),Tt=q(Ce*mt),It=q(q(me*Ye)*ut),er=q(q(Ke*Se)*mt),Qt=q(Tt-_t),vr=q(er-It);if(Qt===t)return vr===t?this.double():A.ZERO;const qr=q(Qt*Qt),Sn=q(Qt*qr),Bn=q(_t*qr),xi=q(vr*vr-Sn-o*Bn),Cr=q(vr*(Bn-xi)-It*Sn),hi=q(Se*Ye*Qt);return new A(xi,Cr,hi)}subtract(U){return this.add(U.negate())}multiplyUnsafe(U){const $=A.ZERO;if(typeof U=="bigint"&&U===t)return $;let me=B(U);if(me===n)return this;if(!I){let Tt=$,It=this;for(;me>t;)me&n&&(Tt=Tt.add(It)),It=It.double(),me>>=n;return Tt}let{k1neg:Se,k1:Ce,k2neg:Ke,k2:Ye}=p.splitScalar(me),mt=$,ut=$,_t=this;for(;Ce>t||Ye>t;)Ce&n&&(mt=mt.add(_t)),Ye&n&&(ut=ut.add(_t)),_t=_t.double(),Ce>>=n,Ye>>=n;return Se&&(mt=mt.negate()),Ke&&(ut=ut.negate()),ut=new A(q(ut.x*p.beta),ut.y,ut.z),mt.add(ut)}precomputeWindow(U){const $=I?128/U+1:256/U+1,me=[];let Se=this,Ce=Se;for(let Ke=0;Ke<$;Ke++){Ce=Se,me.push(Ce);for(let Ye=1;Ye<2**(U-1);Ye++)Ce=Ce.add(Se),me.push(Ce);Se=Ce.double()}return me}wNAF(U,$){!$&&this.equals(A.BASE)&&($=S.BASE);const me=$&&$._WINDOW_SIZE||1;if(256%me)throw new Error("Point#wNAF: Invalid precomputation window, must be power of 2");let Se=$&&v.get($);Se||(Se=this.precomputeWindow(me),$&&me!==1&&(Se=A.normalizeZ(Se),v.set($,Se)));let Ce=A.ZERO,Ke=A.BASE;const Ye=1+(I?128/me:256/me),mt=2**(me-1),ut=BigInt(2**me-1),_t=2**me,Tt=BigInt(me);for(let It=0;It<Ye;It++){const er=It*mt;let Qt=Number(U&ut);U>>=Tt,Qt>mt&&(Qt-=_t,U+=n);const vr=er,qr=er+Math.abs(Qt)-1,Sn=It%2!==0,Bn=Qt<0;Qt===0?Ke=Ke.add(w(Sn,Se[vr])):Ce=Ce.add(w(Bn,Se[qr]))}return{p:Ce,f:Ke}}multiply(U,$){let me=B(U),Se,Ce;if(I){const{k1neg:Ke,k1:Ye,k2neg:mt,k2:ut}=p.splitScalar(me);let{p:_t,f:Tt}=this.wNAF(Ye,$),{p:It,f:er}=this.wNAF(ut,$);_t=w(Ke,_t),It=w(mt,It),It=new A(q(It.x*p.beta),It.y,It.z),Se=_t.add(It),Ce=Tt.add(er)}else{const{p:Ke,f:Ye}=this.wNAF(me,$);Se=Ke,Ce=Ye}return A.normalizeZ([Se,Ce])[0]}toAffine(U){const{x:$,y:me,z:Se}=this,Ce=this.equals(A.ZERO);U==null&&(U=Ce?l:le(Se));const Ke=U,Ye=q(Ke*Ke),mt=q(Ye*Ke),ut=q($*Ye),_t=q(me*mt),Tt=q(Se*Ke);if(Ce)return S.ZERO;if(Tt!==n)throw new Error("invZ was invalid");return new S(ut,_t)}}A.BASE=new A(c.Gx,c.Gy,n),A.ZERO=new A(t,n,t);function w(ne,U){const $=U.negate();return ne?$:U}const v=new WeakMap;class S{constructor(U,$){this.x=U,this.y=$}_setWindowSize(U){this._WINDOW_SIZE=U,v.delete(this)}hasEvenY(){return this.y%o===t}static fromCompressedHex(U){const $=U.length===32,me=Y($?U:U.subarray(1));if(!je(me))throw new Error("Point is not on curve");const Se=R(me);let Ce=H(Se);const Ke=(Ce&n)===n;$?Ke&&(Ce=q(-Ce)):(U[0]&1)===1!==Ke&&(Ce=q(-Ce));const Ye=new S(me,Ce);return Ye.assertValidity(),Ye}static fromUncompressedHex(U){const $=Y(U.subarray(1,y+1)),me=Y(U.subarray(y+1,y*2+1)),Se=new S($,me);return Se.assertValidity(),Se}static fromHex(U){const $=j(U),me=$.length,Se=$[0];if(me===y)return this.fromCompressedHex($);if(me===O&&(Se===2||Se===3))return this.fromCompressedHex($);if(me===C&&Se===4)return this.fromUncompressedHex($);throw new Error(`Point.fromHex: received invalid point. Expected 32-${O} compressed bytes or ${C} uncompressed bytes, not ${me}`)}static fromPrivateKey(U){return S.BASE.multiply(Xe(U))}static fromSignature(U,$,me){const{r:Se,s:Ce}=Dt($);if(![0,1,2,3].includes(me))throw new Error("Cannot recover: invalid recovery bit");const Ke=Pe(j(U)),{n:Ye}=c,mt=me===2||me===3?Se+Ye:Se,ut=le(mt,Ye),_t=q(-Ke*ut,Ye),Tt=q(Ce*ut,Ye),It=me&1?"03":"02",er=S.fromHex(It+Le(mt)),Qt=S.BASE.multiplyAndAddUnsafe(er,_t,Tt);if(!Qt)throw new Error("Cannot recover signature: point at infinify");return Qt.assertValidity(),Qt}toRawBytes(U=!1){return ce(this.toHex(U))}toHex(U=!1){const $=Le(this.x);return U?`${this.hasEvenY()?"02":"03"}${$}`:`04${$}${Le(this.y)}`}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){const U="Point is not on elliptic curve",{x:$,y:me}=this;if(!je($)||!je(me))throw new Error(U);const Se=q(me*me),Ce=R($);if(q(Se-Ce)!==t)throw new Error(U)}equals(U){return this.x===U.x&&this.y===U.y}negate(){return new S(this.x,q(-this.y))}double(){return A.fromAffine(this).double().toAffine()}add(U){return A.fromAffine(this).add(A.fromAffine(U)).toAffine()}subtract(U){return this.add(U.negate())}multiply(U){return A.fromAffine(this).multiply(U,this).toAffine()}multiplyAndAddUnsafe(U,$,me){const Se=A.fromAffine(this),Ce=$===t||$===n||this!==S.BASE?Se.multiplyUnsafe($):Se.multiply($),Ke=A.fromAffine(U).multiplyUnsafe(me),Ye=Ce.add(Ke);return Ye.equals(A.ZERO)?void 0:Ye.toAffine()}}e.Point=S,S.BASE=new S(c.Gx,c.Gy),S.ZERO=new S(t,t);function M(ne){return Number.parseInt(ne[0],16)>=8?"00"+ne:ne}function F(ne){if(ne.length<2||ne[0]!==2)throw new Error(`Invalid signature integer tag: ${Ae(ne)}`);const U=ne[1],$=ne.subarray(2,U+2);if(!U||$.length!==U)throw new Error("Invalid signature integer: wrong length");if($[0]===0&&$[1]<=127)throw new Error("Invalid signature integer: trailing length");return{data:Y($),left:ne.subarray(U+2)}}function W(ne){if(ne.length<2||ne[0]!=48)throw new Error(`Invalid signature tag: ${Ae(ne)}`);if(ne[1]!==ne.length-2)throw new Error("Invalid signature: incorrect length");const{data:U,left:$}=F(ne.subarray(2)),{data:me,left:Se}=F($);if(Se.length)throw new Error(`Invalid signature: left bytes after parsing: ${Ae(Se)}`);return{r:U,s:me}}class J{constructor(U,$){this.r=U,this.s=$,this.assertValidity()}static fromCompact(U){const $=U instanceof Uint8Array,me="Signature.fromCompact";if(typeof U!="string"&&!$)throw new TypeError(`${me}: Expected string or Uint8Array`);const Se=$?Ae(U):U;if(Se.length!==128)throw new Error(`${me}: Expected 64-byte hex`);return new J(Te(Se.slice(0,64)),Te(Se.slice(64,128)))}static fromDER(U){const $=U instanceof Uint8Array;if(typeof U!="string"&&!$)throw new TypeError("Signature.fromDER: Expected string or Uint8Array");const{r:me,s:Se}=W($?U:ce(U));return new J(me,Se)}static fromHex(U){return this.fromDER(U)}assertValidity(){const{r:U,s:$}=this;if(!Ie(U))throw new Error("Invalid Signature: r must be 0 < r < n");if(!Ie($))throw new Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){const U=c.n>>n;return this.s>U}normalizeS(){return this.hasHighS()?new J(this.r,q(-this.s,c.n)):this}toDERRawBytes(){return ce(this.toDERHex())}toDERHex(){const U=M(Be(this.s)),$=M(Be(this.r)),me=U.length/2,Se=$.length/2,Ce=Be(me),Ke=Be(Se);return`30${Be(Se+me+4)}02${Ke}${$}02${Ce}${U}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return ce(this.toCompactHex())}toCompactHex(){return Le(this.r)+Le(this.s)}}e.Signature=J;function pe(...ne){if(!ne.every(me=>me instanceof Uint8Array))throw new Error("Uint8Array list expected");if(ne.length===1)return ne[0];const U=ne.reduce((me,Se)=>me+Se.length,0),$=new Uint8Array(U);for(let me=0,Se=0;me<ne.length;me++){const Ce=ne[me];$.set(Ce,Se),Se+=Ce.length}return $}const Oe=Array.from({length:256},(ne,U)=>U.toString(16).padStart(2,"0"));function Ae(ne){if(!(ne instanceof Uint8Array))throw new Error("Expected Uint8Array");let U="";for(let $=0;$<ne.length;$++)U+=Oe[ne[$]];return U}const be=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000");function Le(ne){if(typeof ne!="bigint")throw new Error("Expected bigint");if(!(t<=ne&&ne<be))throw new Error("Expected number 0 <= n < 2^256");return ne.toString(16).padStart(64,"0")}function Me(ne){const U=ce(Le(ne));if(U.length!==32)throw new Error("Error: expected 32 bytes");return U}function Be(ne){const U=ne.toString(16);return U.length&1?`0${U}`:U}function Te(ne){if(typeof ne!="string")throw new TypeError("hexToNumber: expected string, got "+typeof ne);return BigInt(`0x${ne}`)}function ce(ne){if(typeof ne!="string")throw new TypeError("hexToBytes: expected string, got "+typeof ne);if(ne.length%2)throw new Error("hexToBytes: received invalid unpadded hex"+ne.length);const U=new Uint8Array(ne.length/2);for(let $=0;$<U.length;$++){const me=$*2,Se=ne.slice(me,me+2),Ce=Number.parseInt(Se,16);if(Number.isNaN(Ce)||Ce<0)throw new Error("Invalid byte sequence");U[$]=Ce}return U}function Y(ne){return Te(Ae(ne))}function j(ne){return ne instanceof Uint8Array?Uint8Array.from(ne):ce(ne)}function B(ne){if(typeof ne=="number"&&Number.isSafeInteger(ne)&&ne>0)return BigInt(ne);if(typeof ne=="bigint"&&Ie(ne))return ne;throw new TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function q(ne,U=c.P){const $=ne%U;return $>=t?$:U+$}function L(ne,U){const{P:$}=c;let me=ne;for(;U-- >t;)me*=me,me%=$;return me}function H(ne){const{P:U}=c,$=BigInt(6),me=BigInt(11),Se=BigInt(22),Ce=BigInt(23),Ke=BigInt(44),Ye=BigInt(88),mt=ne*ne*ne%U,ut=mt*mt*ne%U,_t=L(ut,s)*ut%U,Tt=L(_t,s)*ut%U,It=L(Tt,o)*mt%U,er=L(It,me)*It%U,Qt=L(er,Se)*er%U,vr=L(Qt,Ke)*Qt%U,qr=L(vr,Ye)*vr%U,Sn=L(qr,Ke)*Qt%U,Bn=L(Sn,s)*ut%U,xi=L(Bn,Ce)*er%U,Cr=L(xi,$)*mt%U,hi=L(Cr,o);if(hi*hi%U!==ne)throw new Error("Cannot find square root");return hi}function le(ne,U=c.P){if(ne===t||U<=t)throw new Error(`invert: expected positive integers, got n=${ne} mod=${U}`);let $=q(ne,U),me=U,Se=t,Ce=n;for(;$!==t;){const Ye=me/$,mt=me%$,ut=Se-Ce*Ye;me=$,$=mt,Se=Ce,Ce=ut}if(me!==n)throw new Error("invert: does not exist");return q(Se,U)}function ye(ne,U=c.P){const $=new Array(ne.length),me=ne.reduce((Ce,Ke,Ye)=>Ke===t?Ce:($[Ye]=Ce,q(Ce*Ke,U)),n),Se=le(me,U);return ne.reduceRight((Ce,Ke,Ye)=>Ke===t?Ce:($[Ye]=q(Ce*$[Ye],U),q(Ce*Ke,U)),Se),$}function fe(ne){const U=ne.length*8-m*8,$=Y(ne);return U>0?$>>BigInt(U):$}function Pe(ne,U=!1){const $=fe(ne);if(U)return $;const{n:me}=c;return $>=me?$-me:$}let Re,ae;class ue{constructor(U,$){if(this.hashLen=U,this.qByteLen=$,typeof U!="number"||U<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(U).fill(1),this.k=new Uint8Array(U).fill(0),this.counter=0}hmac(...U){return e.utils.hmacSha256(this.k,...U)}hmacSync(...U){return ae(this.k,...U)}checkSync(){if(typeof ae!="function")throw new N("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(U=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),U),this.v=await this.hmac(this.v),U.length!==0&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),U),this.v=await this.hmac(this.v))}reseedSync(U=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),U),this.v=this.hmacSync(this.v),U.length!==0&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),U),this.v=this.hmacSync(this.v))}async generate(){this.incr();let U=0;const $=[];for(;U<this.qByteLen;){this.v=await this.hmac(this.v);const me=this.v.slice();$.push(me),U+=this.v.length}return pe(...$)}generateSync(){this.checkSync(),this.incr();let U=0;const $=[];for(;U<this.qByteLen;){this.v=this.hmacSync(this.v);const me=this.v.slice();$.push(me),U+=this.v.length}return pe(...$)}}function Ie(ne){return t<ne&&ne<c.n}function je(ne){return t<ne&&ne<c.P}function qe(ne,U,$,me=!0){const{n:Se}=c,Ce=Pe(ne,!0);if(!Ie(Ce))return;const Ke=le(Ce,Se),Ye=S.BASE.multiply(Ce),mt=q(Ye.x,Se);if(mt===t)return;const ut=q(Ke*q(U+$*mt,Se),Se);if(ut===t)return;let _t=new J(mt,ut),Tt=(Ye.x===_t.r?0:2)|Number(Ye.y&n);return me&&_t.hasHighS()&&(_t=_t.normalizeS(),Tt^=1),{sig:_t,recovery:Tt}}function Xe(ne){let U;if(typeof ne=="bigint")U=ne;else if(typeof ne=="number"&&Number.isSafeInteger(ne)&&ne>0)U=BigInt(ne);else if(typeof ne=="string"){if(ne.length!==2*m)throw new Error("Expected 32 bytes of private key");U=Te(ne)}else if(ne instanceof Uint8Array){if(ne.length!==m)throw new Error("Expected 32 bytes of private key");U=Y(ne)}else throw new TypeError("Expected valid private key");if(!Ie(U))throw new Error("Expected private key: 0 < key < n");return U}function Ht(ne){return ne instanceof S?(ne.assertValidity(),ne):S.fromHex(ne)}function Dt(ne){if(ne instanceof J)return ne.assertValidity(),ne;try{return J.fromDER(ne)}catch{return J.fromCompact(ne)}}function nr(ne,U=!1){return S.fromPrivateKey(ne).toRawBytes(U)}e.getPublicKey=nr;function Ft(ne,U,$,me=!1){return S.fromSignature(ne,U,$).toRawBytes(me)}e.recoverPublicKey=Ft;function Vt(ne){const U=ne instanceof Uint8Array,$=typeof ne=="string",me=(U||$)&&ne.length;return U?me===O||me===C:$?me===O*2||me===C*2:ne instanceof S}function Gr(ne,U,$=!1){if(Vt(ne))throw new TypeError("getSharedSecret: first arg must be private key");if(!Vt(U))throw new TypeError("getSharedSecret: second arg must be public key");const me=Ht(U);return me.assertValidity(),me.multiply(Xe(ne)).toRawBytes($)}e.getSharedSecret=Gr;function sr(ne){const U=ne.length>y?ne.slice(0,y):ne;return Y(U)}function _n(ne){const U=sr(ne),$=q(U,c.n);return xr($<t?U:$)}function xr(ne){return Me(ne)}function $r(ne,U,$){if(ne==null)throw new Error(`sign: expected valid message hash, not "${ne}"`);const me=j(ne),Se=Xe(U),Ce=[xr(Se),_n(me)];if($!=null){$===!0&&($=e.utils.randomBytes(y));const mt=j($);if(mt.length!==y)throw new Error(`sign: Expected ${y} bytes of extra data`);Ce.push(mt)}const Ke=pe(...Ce),Ye=sr(me);return{seed:Ke,m:Ye,d:Se}}function fn(ne,U){const{sig:$,recovery:me}=ne,{der:Se,recovered:Ce}=Object.assign({canonical:!0,der:!0},U),Ke=Se?$.toDERRawBytes():$.toCompactRawBytes();return Ce?[Ke,me]:Ke}async function ur(ne,U,$={}){const{seed:me,m:Se,d:Ce}=$r(ne,U,$.extraEntropy),Ke=new ue(h,m);await Ke.reseed(me);let Ye;for(;!(Ye=qe(await Ke.generate(),Se,Ce,$.canonical));)await Ke.reseed();return fn(Ye,$)}e.sign=ur;function pn(ne,U,$={}){const{seed:me,m:Se,d:Ce}=$r(ne,U,$.extraEntropy),Ke=new ue(h,m);Ke.reseedSync(me);let Ye;for(;!(Ye=qe(Ke.generateSync(),Se,Ce,$.canonical));)Ke.reseedSync();return fn(Ye,$)}e.signSync=pn;const Rr={strict:!0};function En(ne,U,$,me=Rr){let Se;try{Se=Dt(ne),U=j(U)}catch{return!1}const{r:Ce,s:Ke}=Se;if(me.strict&&Se.hasHighS())return!1;const Ye=Pe(U);let mt;try{mt=Ht($)}catch{return!1}const{n:ut}=c,_t=le(Ke,ut),Tt=q(Ye*_t,ut),It=q(Ce*_t,ut),er=S.BASE.multiplyAndAddUnsafe(mt,Tt,It);return er?q(er.x,ut)===Ce:!1}e.verify=En;function en(ne){return q(Y(ne),c.n)}class bn{constructor(U,$){this.r=U,this.s=$,this.assertValidity()}static fromHex(U){const $=j(U);if($.length!==64)throw new TypeError(`SchnorrSignature.fromHex: expected 64 bytes, not ${$.length}`);const me=Y($.subarray(0,32)),Se=Y($.subarray(32,64));return new bn(me,Se)}assertValidity(){const{r:U,s:$}=this;if(!je(U)||!Ie($))throw new Error("Invalid signature")}toHex(){return Le(this.r)+Le(this.s)}toRawBytes(){return ce(this.toHex())}}function tn(ne){return S.fromPrivateKey(ne).toRawX()}class Zi{constructor(U,$,me=e.utils.randomBytes()){if(U==null)throw new TypeError(`sign: Expected valid message, not "${U}"`);this.m=j(U);const{x:Se,scalar:Ce}=this.getScalar(Xe($));if(this.px=Se,this.d=Ce,this.rand=j(me),this.rand.length!==32)throw new TypeError("sign: Expected 32 bytes of aux randomness")}getScalar(U){const $=S.fromPrivateKey(U),me=$.hasEvenY()?U:c.n-U;return{point:$,scalar:me,x:$.toRawX()}}initNonce(U,$){return Me(U^Y($))}finalizeNonce(U){const $=q(Y(U),c.n);if($===t)throw new Error("sign: Creation of signature failed. k is zero");const{point:me,x:Se,scalar:Ce}=this.getScalar($);return{R:me,rx:Se,k:Ce}}finalizeSig(U,$,me,Se){return new bn(U.x,q($+me*Se,c.n)).toRawBytes()}error(){throw new Error("sign: Invalid signature produced")}async calc(){const{m:U,d:$,px:me,rand:Se}=this,Ce=e.utils.taggedHash,Ke=this.initNonce($,await Ce(Kr.aux,Se)),{R:Ye,rx:mt,k:ut}=this.finalizeNonce(await Ce(Kr.nonce,Ke,me,U)),_t=en(await Ce(Kr.challenge,mt,me,U)),Tt=this.finalizeSig(Ye,ut,_t,$);return await Ni(Tt,U,me)||this.error(),Tt}calcSync(){const{m:U,d:$,px:me,rand:Se}=this,Ce=e.utils.taggedHashSync,Ke=this.initNonce($,Ce(Kr.aux,Se)),{R:Ye,rx:mt,k:ut}=this.finalizeNonce(Ce(Kr.nonce,Ke,me,U)),_t=en(Ce(Kr.challenge,mt,me,U)),Tt=this.finalizeSig(Ye,ut,_t,$);return Nr(Tt,U,me)||this.error(),Tt}}async function wn(ne,U,$){return new Zi(ne,U,$).calc()}function Pi(ne,U,$){return new Zi(ne,U,$).calcSync()}function Ri(ne,U,$){const me=ne instanceof bn,Se=me?ne:bn.fromHex(ne);return me&&Se.assertValidity(),{...Se,m:j(U),P:Ht($)}}function mi(ne,U,$,me){const Se=S.BASE.multiplyAndAddUnsafe(U,Xe($),q(-me,c.n));return!(!Se||!Se.hasEvenY()||Se.x!==ne)}async function Ni(ne,U,$){try{const{r:me,s:Se,m:Ce,P:Ke}=Ri(ne,U,$),Ye=en(await e.utils.taggedHash(Kr.challenge,Me(me),Ke.toRawX(),Ce));return mi(me,Ke,Se,Ye)}catch{return!1}}function Nr(ne,U,$){try{const{r:me,s:Se,m:Ce,P:Ke}=Ri(ne,U,$),Ye=en(e.utils.taggedHashSync(Kr.challenge,Me(me),Ke.toRawX(),Ce));return mi(me,Ke,Se,Ye)}catch(me){if(me instanceof N)throw me;return!1}}e.schnorr={Signature:bn,getPublicKey:tn,sign:wn,verify:Ni,signSync:Pi,verifySync:Nr},S.BASE._setWindowSize(8);const Ot={node:i,web:typeof self=="object"&&"crypto"in self?self.crypto:void 0},Kr={challenge:"BIP0340/challenge",aux:"BIP0340/aux",nonce:"BIP0340/nonce"},rn={};e.utils={bytesToHex:Ae,hexToBytes:ce,concatBytes:pe,mod:q,invert:le,isValidPrivateKey(ne){try{return Xe(ne),!0}catch{return!1}},_bigintTo32Bytes:Me,_normalizePrivateKey:Xe,hashToPrivateKey:ne=>{ne=j(ne);const U=m+8;if(ne.length<U||ne.length>1024)throw new Error("Expected valid bytes of private key as per FIPS 186");const $=q(Y(ne),c.n-n)+n;return Me($)},randomBytes:(ne=32)=>{if(Ot.web)return Ot.web.getRandomValues(new Uint8Array(ne));if(Ot.node){const{randomBytes:U}=Ot.node;return Uint8Array.from(U(ne))}else throw new Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>e.utils.hashToPrivateKey(e.utils.randomBytes(m+8)),precompute(ne=8,U=S.BASE){const $=U===S.BASE?U:new S(U.x,U.y);return $._setWindowSize(ne),$.multiply(s),$},sha256:async(...ne)=>{if(Ot.web){const U=await Ot.web.subtle.digest("SHA-256",pe(...ne));return new Uint8Array(U)}else if(Ot.node){const{createHash:U}=Ot.node,$=U("sha256");return ne.forEach(me=>$.update(me)),Uint8Array.from($.digest())}else throw new Error("The environment doesn't have sha256 function")},hmacSha256:async(ne,...U)=>{if(Ot.web){const $=await Ot.web.subtle.importKey("raw",ne,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),me=pe(...U),Se=await Ot.web.subtle.sign("HMAC",$,me);return new Uint8Array(Se)}else if(Ot.node){const{createHmac:$}=Ot.node,me=$("sha256",ne);return U.forEach(Se=>me.update(Se)),Uint8Array.from(me.digest())}else throw new Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(ne,...U)=>{let $=rn[ne];if($===void 0){const me=await e.utils.sha256(Uint8Array.from(ne,Se=>Se.charCodeAt(0)));$=pe(me,me),rn[ne]=$}return e.utils.sha256($,...U)},taggedHashSync:(ne,...U)=>{if(typeof Re!="function")throw new N("sha256Sync is undefined, you need to set it");let $=rn[ne];if($===void 0){const me=Re(Uint8Array.from(ne,Se=>Se.charCodeAt(0)));$=pe(me,me),rn[ne]=$}return Re($,...U)},_JacobianPoint:A},Object.defineProperties(e.utils,{sha256Sync:{configurable:!1,get(){return Re},set(ne){Re||(Re=ne)}},hmacSha256Sync:{configurable:!1,get(){return ae},set(ne){ae||(ae=ne)}}})})(g_)),g_}var rC;function wE(){return rC||(rC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.schnorr=e.Signature=e.Point=e.CURVE=e.utils=e.getSharedSecret=e.recoverPublicKey=e.verify=e.signSync=e.sign=e.getPublicKey=void 0;const i=iV(),t=Rj(),n=tC();var o=tC();Object.defineProperty(e,"getPublicKey",{enumerable:!0,get:function(){return o.getPublicKey}}),Object.defineProperty(e,"sign",{enumerable:!0,get:function(){return o.sign}}),Object.defineProperty(e,"signSync",{enumerable:!0,get:function(){return o.signSync}}),Object.defineProperty(e,"verify",{enumerable:!0,get:function(){return o.verify}}),Object.defineProperty(e,"recoverPublicKey",{enumerable:!0,get:function(){return o.recoverPublicKey}}),Object.defineProperty(e,"getSharedSecret",{enumerable:!0,get:function(){return o.getSharedSecret}}),Object.defineProperty(e,"utils",{enumerable:!0,get:function(){return o.utils}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return o.CURVE}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return o.Point}}),Object.defineProperty(e,"Signature",{enumerable:!0,get:function(){return o.Signature}}),Object.defineProperty(e,"schnorr",{enumerable:!0,get:function(){return o.schnorr}}),n.utils.hmacSha256Sync=(s,...l)=>{const c=i.hmac.create(t.sha256,s);return l.forEach(f=>c.update(f)),c.digest()}})(m_)),m_}var vt={};function nC(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 al={exports:{}},iC=al.exports,aC;function Nj(){return aC||(aC=1,(function(e,i){var t=iC&&iC.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(i,"__esModule",{value:!0}),i.crypto=i.wrapHash=i.equalsBytes=i.hexToBytes=i.bytesToUtf8=i.utf8ToBytes=i.createView=i.concatBytes=i.toHex=i.bytesToHex=i.assertBytes=i.assertBool=void 0;const n=t(bE()),o=dl(),s=n.default.bool;i.assertBool=s;const l=n.default.bytes;i.assertBytes=l;var c=dl();Object.defineProperty(i,"bytesToHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(i,"toHex",{enumerable:!0,get:function(){return c.bytesToHex}}),Object.defineProperty(i,"concatBytes",{enumerable:!0,get:function(){return c.concatBytes}}),Object.defineProperty(i,"createView",{enumerable:!0,get:function(){return c.createView}}),Object.defineProperty(i,"utf8ToBytes",{enumerable:!0,get:function(){return c.utf8ToBytes}});function f(h){if(!(h instanceof Uint8Array))throw new TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof h}`);return new TextDecoder().decode(h)}i.bytesToUtf8=f;function p(h){const O=h.startsWith("0x")?h.substring(2):h;return(0,o.hexToBytes)(O)}i.hexToBytes=p;function y(h,O){if(h.length!==O.length)return!1;for(let C=0;C<h.length;C++)if(h[C]!==O[C])return!1;return!0}i.equalsBytes=y;function m(h){return O=>(n.default.bytes(O),h(O))}i.wrapHash=m,i.crypto=(()=>{const h=typeof self=="object"&&"crypto"in self?self.crypto:void 0,O=typeof nC=="function"&&nC.bind(e);return{node:O&&!h?O("crypto"):void 0,web:h}})()})(al,al.exports)),al.exports}var oC;function lV(){if(oC)return vt;oC=1;var e=vt&&vt.__createBinding||(Object.create?(function(ce,Y,j,B){B===void 0&&(B=j);var q=Object.getOwnPropertyDescriptor(Y,j);(!q||("get"in q?!Y.__esModule:q.writable||q.configurable))&&(q={enumerable:!0,get:function(){return Y[j]}}),Object.defineProperty(ce,B,q)}):(function(ce,Y,j,B){B===void 0&&(B=j),ce[B]=Y[j]})),i=vt&&vt.__setModuleDefault||(Object.create?(function(ce,Y){Object.defineProperty(ce,"default",{enumerable:!0,value:Y})}):function(ce,Y){ce.default=Y}),t=vt&&vt.__importStar||function(ce){if(ce&&ce.__esModule)return ce;var Y={};if(ce!=null)for(var j in ce)j!=="default"&&Object.prototype.hasOwnProperty.call(ce,j)&&e(Y,ce,j);return i(Y,ce),Y};Object.defineProperty(vt,"__esModule",{value:!0}),vt.contextRandomize=vt.ecdh=vt.signatureNormalize=vt.signatureImport=vt.signatureExport=vt.privateKeyTweakMul=vt.publicKeyTweakMul=vt.publicKeyTweakAdd=vt.publicKeyCombine=vt.publicKeyNegate=vt.privateKeyNegate=vt.privateKeyTweakAdd=vt.ecdsaVerify=vt.ecdsaRecover=vt.ecdsaSign=vt.publicKeyConvert=vt.publicKeyVerify=vt.publicKeyCreate=vt.privateKeyVerify=vt.createPrivateKey=vt.createPrivateKeySync=void 0;const n=Rj(),o=t(wE()),s=Nj();function l(ce){if(typeof ce!="string")throw new TypeError("hexToNumber: expected string, got "+typeof ce);return BigInt(`0x${ce}`)}const c=ce=>l((0,s.toHex)(ce)),f=ce=>ce.toString(16).padStart(64,"0"),p=ce=>(0,s.hexToBytes)(f(ce)),{mod:y}=o.utils,m=o.CURVE.n;function h(ce=B=>new Uint8Array(B),Y,j){return typeof ce=="function"&&(ce=ce(Y)),(0,s.assertBytes)(ce,Y),j&&ce.set(j),ce}function O(ce){return(0,s.assertBytes)(ce,64),o.Signature.fromCompact(ce)}function C(){return o.utils.randomPrivateKey()}vt.createPrivateKeySync=C;async function R(){return C()}vt.createPrivateKey=R;function I(ce){return(0,s.assertBytes)(ce,32),o.utils.isValidPrivateKey(ce)}vt.privateKeyVerify=I;function N(ce,Y=!0,j){(0,s.assertBytes)(ce,32),(0,s.assertBool)(Y);const B=o.getPublicKey(ce,Y);return h(j,Y?33:65,B)}vt.publicKeyCreate=N;function _(ce){(0,s.assertBytes)(ce,33,65);try{return o.Point.fromHex(ce),!0}catch{return!1}}vt.publicKeyVerify=_;function A(ce,Y=!0,j){(0,s.assertBytes)(ce,33,65),(0,s.assertBool)(Y);const B=o.Point.fromHex(ce).toRawBytes(Y);return h(j,Y?33:65,B)}vt.publicKeyConvert=A;function w(ce,Y,j={noncefn:void 0,data:void 0},B){if((0,s.assertBytes)(ce,32),(0,s.assertBytes)(Y,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[q,L]=o.signSync(ce,Y,{recovered:!0,der:!1});return{signature:h(B,64,q),recid:L}}vt.ecdsaSign=w;function v(ce,Y,j,B=!0,q){(0,s.assertBytes)(j,32),(0,s.assertBool)(B);const L=O(ce).toHex(),H=o.Point.fromSignature(j,L,Y);return h(q,B?33:65,H.toRawBytes(B))}vt.ecdsaRecover=v;function S(ce,Y,j){(0,s.assertBytes)(ce,64),(0,s.assertBytes)(Y,32),(0,s.assertBytes)(j,33,65),(0,s.assertBytes)(ce,64);const B=c(ce.slice(0,32)),q=c(ce.slice(32,64));if(B>=m||q>=m)throw new Error("Cannot parse signature");const L=o.Point.fromHex(j);let H;try{H=O(ce)}catch{return!1}return o.verify(H,Y,L)}vt.ecdsaVerify=S;function M(ce,Y){(0,s.assertBytes)(ce,32),(0,s.assertBytes)(Y,32);let j=c(Y);if(j===0n)throw new Error("Tweak must not be zero");if(j>=m)throw new Error("Tweak bigger than curve order");if(j+=c(ce),j>=m&&(j-=m),j===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return ce.set((0,s.hexToBytes)(f(j))),ce}vt.privateKeyTweakAdd=M;function F(ce){(0,s.assertBytes)(ce,32);const Y=y(-c(ce),m);return ce.set((0,s.hexToBytes)(f(Y))),ce}vt.privateKeyNegate=F;function W(ce,Y=!0,j){(0,s.assertBytes)(ce,33,65),(0,s.assertBool)(Y);const B=o.Point.fromHex(ce).negate();return h(j,Y?33:65,B.toRawBytes(Y))}vt.publicKeyNegate=W;function J(ce,Y=!0,j){if(!Array.isArray(ce)||!ce.length)throw new TypeError(`Expected array with one or more items, not ${ce}`);for(const q of ce)(0,s.assertBytes)(q,33,65);(0,s.assertBool)(Y);const B=ce.map(q=>o.Point.fromHex(q)).reduce((q,L)=>q.add(L),o.Point.ZERO);if(B.equals(o.Point.ZERO))throw new Error("Combined result must not be zero");return h(j,Y?33:65,B.toRawBytes(Y))}vt.publicKeyCombine=J;function pe(ce,Y,j=!0,B){(0,s.assertBytes)(ce,33,65),(0,s.assertBytes)(Y,32),(0,s.assertBool)(j);const q=o.Point.fromHex(ce),L=o.Point.fromPrivateKey(Y),H=q.add(L);if(L.equals(o.Point.ZERO)||H.equals(o.Point.ZERO))throw new Error("Tweak must not be zero");return h(B,j?33:65,H.toRawBytes(j))}vt.publicKeyTweakAdd=pe;function Oe(ce,Y,j=!0,B){(0,s.assertBytes)(ce,33,65),(0,s.assertBytes)(Y,32),(0,s.assertBool)(j);const q=c(Y);if(q===0n)throw new Error("Tweak must not be zero");if(q<=1||q>=m)throw new Error("Tweak is zero or bigger than curve order");const L=o.Point.fromHex(ce).multiply(q);return h(B,j?33:65,L.toRawBytes(j))}vt.publicKeyTweakMul=Oe;function Ae(ce,Y){(0,s.assertBytes)(ce,32),(0,s.assertBytes)(Y,32);const j=c(Y);if(j<=1||j>=m)throw new Error("Tweak is zero or bigger than curve order");const B=y(j*c(ce),m);if(B===0n)throw new Error("The tweak was out of range or the resulted private key is invalid");return ce.set((0,s.hexToBytes)(f(B))),ce}vt.privateKeyTweakMul=Ae;function be(ce,Y){const j=O(ce).toRawBytes();return h(Y,72,O(ce).toRawBytes()).slice(0,j.length)}vt.signatureExport=be;function Le(ce,Y){(0,s.assertBytes)(ce);const j=o.Signature.fromDER(ce);return h(Y,64,(0,s.hexToBytes)(j.toCompactHex()))}vt.signatureImport=Le;function Me(ce){const Y=O(ce);return Y.s>m/2n&&ce.set(p(m-Y.s),32),ce}vt.signatureNormalize=Me;function Be(ce,Y,j={},B){if((0,s.assertBytes)(ce,33,65),(0,s.assertBytes)(Y,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 q=o.Point.fromHex(o.getSharedSecret(Y,ce));if(j.hashfn===void 0)return h(B,32,(0,n.sha256)(q.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)(B,32);const L=j.xbuf||new Uint8Array(32);L.set(p(q.x));const H=j.ybuf||new Uint8Array(32);H.set(p(q.y));const le=j.hashfn(L,H,j.data);if(!(le instanceof Uint8Array)||le.length!==32)throw new Error("secp256k1.ecdh: invalid options.hashfn output");return h(B,32,le)}vt.ecdh=Be;function Te(ce){ce!==null&&(0,s.assertBytes)(ce,32)}return vt.contextRandomize=Te,vt}var sC;function Cj(){if(sC)return kr;sC=1,Object.defineProperty(kr,"__esModule",{value:!0}),kr.createUnsafeIdentity=kr.computeAddress=kr.ethSign=kr.createEthereumMessageHash=kr.sign=kr.recoverAddressFromEthSignature=kr.recoverPublicKey=void 0;const e=af(),i=wE(),t=lV();function n(m,h){if(m.length!==65)throw new Error("Invalid signature length"+m.length);const O=m.slice(0,m.length-1),C=m[64]===28?1:0;return(0,t.ecdsaRecover)(O,C,h,!1).slice(1)}kr.recoverPublicKey=n;function o(m){if(m.length!==65)throw new Error("Invalid ethereum signature");const h=m[64];if(h===0||h===1){const O=new Uint8Array(m);return O[64]=h+27,O}return m}function s(m,h){if(typeof m=="string"){if((0,e.isHex)(m))return s((0,e.hexToBytes)(m),h);throw new Error("String signatures must be encoded in hex")}return p(n(o(m),c(h)))}kr.recoverAddressFromEthSignature=s;function l(m,h){const O=(0,t.ecdsaSign)(h,m),C=O.recid===1?"1c":"1b";return(0,e.toHex)(O.signature)+C}kr.sign=l;function c(m){const h=typeof m=="string"?(0,e.stringToUtf8Bytes)(m):m,O=(0,e.concatBytes)((0,e.stringToUtf8Bytes)(`Ethereum Signed Message:
|
|
20
20
|
`),(0,e.stringToUtf8Bytes)(String(h.length)),h);return(0,e.hexToBytes)((0,e.sha3)(O))}kr.createEthereumMessageHash=c;function f(m,h){return l(m,c(h))}kr.ethSign=f;function p(m){const h=m.length===65&&m[0]===4?m.slice(1):m;return(0,e.getAddress)((0,e.sha3)(h).substring(24))}kr.computeAddress=p;function y(){const m=i.utils.randomPrivateKey(),h=(0,i.getPublicKey)(m).slice(1),O=p(h);return{privateKey:(0,e.bytesToHex)(m),publicKey:(0,e.bytesToHex)(h),address:O}}return kr.createUnsafeIdentity=y,kr}var uC;function cV(){return uC||(uC=1,(function(e){var i=ni&&ni.__createBinding||(Object.create?(function(W,J,pe,Oe){Oe===void 0&&(Oe=pe);var Ae=Object.getOwnPropertyDescriptor(J,pe);(!Ae||("get"in Ae?!J.__esModule:Ae.writable||Ae.configurable))&&(Ae={enumerable:!0,get:function(){return J[pe]}}),Object.defineProperty(W,Oe,Ae)}):(function(W,J,pe,Oe){Oe===void 0&&(Oe=pe),W[Oe]=J[pe]})),t=ni&&ni.__setModuleDefault||(Object.create?(function(W,J){Object.defineProperty(W,"default",{enumerable:!0,value:J})}):function(W,J){W.default=J}),n=ni&&ni.__importStar||function(W){if(W&&W.__esModule)return W;var J={};if(W!=null)for(var pe in W)pe!=="default"&&Object.prototype.hasOwnProperty.call(W,pe)&&i(J,W,pe);return t(J,W),J},o=ni&&ni.__importDefault||function(W){return W&&W.__esModule?W:{default:W}};Object.defineProperty(e,"__esModule",{value:!0}),e.isValidEIP1271Signature=e.parseEmphemeralPayload=e.getSignedIdentitySignatureType=e.getEphemeralSignatureType=e.EIP_1654_SIGNED_ENTITY_VALIDATOR=e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=e.ECDSA_SIGNED_ENTITY_VALIDATOR=e.SIGNER_VALIDATOR=e.Authenticator=e.ERC1654_MAGIC_VALUE=e.VALID_SIGNATURE=void 0;const s=n(af()),l=QU(),c=Pj(),f=tV(),p=o(rV()),y=Cj();e.VALID_SIGNATURE="VALID_SIGNATURE",e.ERC1654_MAGIC_VALUE="1626ba7e";const m=132;var h;(function(W){async function J(Y,j,B,q=Date.now()){let L="";if(!W.isValidAuthChain(j))return{ok:!1,message:"ERROR: Malformed authChain"};for(const le of j){const ye=F(le.type);try{const{nextAuthority:fe}=await ye(L,le,{provider:B,dateToValidateExpirationInMillis:q});L=fe||""}catch(fe){return{ok:!1,message:`ERROR. Link type: ${le.type}. ${fe.message}.`}}}const H=L===Y;return{ok:H,message:H?void 0:`ERROR: Invalid final authority. Expected: ${Y}. Current ${L}.`}}W.validateSignature=J;function pe(Y){for(const[j,B]of Y.entries())if(j===0&&B.type!==c.AuthLinkType.SIGNER||B.type===c.AuthLinkType.SIGNER&&j!==0)return!1;return!0}W.isValidAuthChain=pe;function Oe(Y){return(0,s.hexToBytes)((0,s.sha3)((0,s.stringToUtf8Bytes)(Y)))}W.createEIP1271MessageHash=Oe;function Ae(Y,j,B){return[{type:c.AuthLinkType.SIGNER,payload:j,signature:""},{type:w(B),payload:Y,signature:B}]}W.createSimpleAuthChain=Ae;function be(Y,j,B,q){const L=(0,f.moveMinutes)(B),H=W.getEphemeralMessage(j.address,L),le=W.createSignature(Y,H),ye=W.createSignature(j,q);return[{type:c.AuthLinkType.SIGNER,payload:Y.address,signature:""},{type:c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL,payload:H,signature:le},{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:q,signature:ye}]}W.createAuthChain=be;async function Le(Y,j,B,q){const L=new Date;L.setMinutes(L.getMinutes()+B);const H=W.getEphemeralMessage(j.address,L),le=await q(H),ye=[{type:c.AuthLinkType.SIGNER,payload:Y,signature:""},{type:A(le),payload:H,signature:le}];return{ephemeralIdentity:j,expiration:L,authChain:ye}}W.initializeAuthChain=Le;function Me(Y,j){const B=W.createSignature(Y.ephemeralIdentity,j);return[...Y.authChain,{type:c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY,payload:j,signature:B}]}W.signPayload=Me,W.createEthereumMessageHash=y.createEthereumMessageHash;function Be(Y,j){return(0,y.ethSign)((0,s.hexToBytes)(Y.privateKey),j)}W.createSignature=Be;function Te(Y){return Y.length>0&&Y[0].type===c.AuthLinkType.SIGNER?Y[0].payload:"Invalid-Owner-Address"}W.ownerAddress=Te;function ce(Y,j){return`Decentraland Login
|
|
21
21
|
Ephemeral address: ${Y}
|
|
22
22
|
Expiration: ${j.toISOString()}`}W.getEphemeralMessage=ce})(h=e.Authenticator||(e.Authenticator={}));const O=async(W,J)=>({nextAuthority:J.payload});e.SIGNER_VALIDATOR=O;const C=async(W,J)=>{if(!J.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_SIGNED_ENTITY_VALIDATOR'");const pe=(0,y.recoverAddressFromEthSignature)(J.signature,J.payload),Oe=W.toLocaleLowerCase(),Ae=pe.toLocaleLowerCase();if(Oe===Ae)return{nextAuthority:J.payload};throw new Error(`Invalid signer address. Expected: ${Oe}. Actual: ${Ae}`)};e.ECDSA_SIGNED_ENTITY_VALIDATOR=C;const R=async(W,J,pe)=>{if(!J.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_PERSONAL_EPHEMERAL_VALIDATOR'");const{message:Oe,ephemeralAddress:Ae,expiration:be}=v(J.payload),Le=pe.dateToValidateExpirationInMillis?pe.dateToValidateExpirationInMillis:Date.now();if(be>Le){const Me=(0,y.recoverAddressFromEthSignature)(J.signature,Oe),Be=W.toLocaleLowerCase(),Te=Me.toLocaleLowerCase();if(Be===Te)return{nextAuthority:Ae};throw new Error(`Invalid signer address. Expected: ${Be}. Actual: ${Te}`)}throw new Error(`Ephemeral key expired. Expiration: ${be}. Test: ${Le}`)};e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR=R;const I=async(W,J,pe)=>{if(!J.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'ECDSA_EIP_1654_EPHEMERAL_VALIDATOR'");const{message:Oe,ephemeralAddress:Ae,expiration:be}=v(J.payload),Le=pe?.dateToValidateExpirationInMillis?pe?.dateToValidateExpirationInMillis:Date.now();if(be>Le&&await M(pe.provider,W,Oe,J.signature,Le))return{nextAuthority:Ae};throw new Error(`Ephemeral key expired. Expiration: ${be}. Test: ${Le}`)};e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR=I;const N=async(W,J,pe)=>{if(!J.signature)throw new Error("Invalid AuthLink. 'signature' must be present for type 'EIP_1654_SIGNED_ENTITY_VALIDATOR'");if(await M(pe.provider,W,J.payload,J.signature,pe.dateToValidateExpirationInMillis))return{nextAuthority:J.payload};throw new Error("Invalid validation")};e.EIP_1654_SIGNED_ENTITY_VALIDATOR=N;const _=async(W,J)=>({error:"Error Validator."});function A(W){return W.length===m?c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL}e.getEphemeralSignatureType=A;function w(W){return W.length===m?c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY}e.getSignedIdentitySignatureType=w;function v(W){const J=W.replace(/\r/g,""),pe=J.split(`
|
|
23
|
-
`),Oe=pe[1].substring(19),Ae=pe[2].substring(12),be=Date.parse(Ae);return{message:J,ephemeralAddress:Oe,expiration:be}}e.parseEmphemeralPayload=v;async function S(W,J,pe,Oe){const Ae=h.createEIP1271MessageHash(J),be=(0,s.hexToBytes)(pe);let Le;try{Le=(0,s.bytesToHex)(await W.isValidSignature(Ae,be,Oe))}catch{}if(Le===e.ERC1654_MAGIC_VALUE)return!0;const Me=(0,y.createEthereumMessageHash)(J);try{Le=(0,s.bytesToHex)(await W.isValidSignature(Me,be,Oe))}catch{}return Le===e.ERC1654_MAGIC_VALUE}e.isValidEIP1271Signature=S;async function M(W,J,pe,Oe,Ae){if(!W)throw new Error("Missing provider");const be=new s.default(W),Le=await(0,l.SignatureValidator)(be,J);let Me=await S(Le,pe,Oe);if(Me)return!0;const Be=new p.default(be);try{const{block:Te}=await Be.getDate(Ae,!1);if(Me=await S(Le,pe,Oe,Te),Me)return!0}catch(Te){throw new Error(`Invalid validation. Error: ${Te.message}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${Me}`)}function F(W){switch(W){case c.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return _}}})(ni)),ni}var lC;function dV(){return lC||(lC=1,(function(e){var i=Ro&&Ro.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Ro&&Ro.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(cV(),e),t(Pj(),e)})(Ro)),Ro}var M_=dV(),Mj=Cj(),fV=wE(),cC=Nj();let Nd=null;const pV="ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";function mV(e){const i=cC.hexToBytes(e),t=fV.getPublicKey(i,!1).slice(1),n=Mj.computeAddress(t);return{privateKey:"0x"+e,publicKey:"0x"+cC.bytesToHex(t),address:n}}async function jj(){if(Nd)return Nd;const e=mV(pV),i=Mj.createUnsafeIdentity();return Nd={identity:await M_.Authenticator.initializeAuthChain(e.address,i,60,async n=>M_.Authenticator.createSignature(e,n)),address:e.address},console.log("[DEV] Using dev identity:",e.address),Nd}function Hd(){const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"}const hV="x-identity-auth-chain-",yV="x-identity-timestamp",gV="x-identity-metadata";function dC(e,i,t,n={}){const o=new URL(e).pathname,s={...t,headers:{...vV(t?.method??"get",o,{origin:location.origin,...n},l=>M_.Authenticator.signPayload(i,l)),...t?.headers}};return fetch(e,s)}function vV(e,i,t,n){const o={},s=_V(e,i,JSON.stringify(t),n);return s.authChain.forEach((l,c)=>{o[`${hV}${c}`]=JSON.stringify(l)}),o[yV]=s.timestamp.toString(),o[gV]=s.metadata,o}function _V(e,i,t,n){const o=Date.now(),l=[e.toLowerCase(),i.toLowerCase(),o.toString(),t].join(":").toLowerCase();return{authChain:n(l),metadata:t,timestamp:o}}function EV(e,i){return async function(n,o,s={}){try{if(Hd()){const{identity:l}=await jj();return dC(n,l,o||{},s)}if(i&&e){const l=A_.localStorageGetIdentity(e);if(l&&l.expiration){const c=new Date(l.expiration);if(new Date().getTime()<=c.getTime())return dC(n,l,o||{},s)}}return fetch(n,o)}catch(l){return console.warn("Error in authenticatedFetch, falling back to regular fetch:",l),fetch(n,o)}}}const Lj=()=>{const{wallet:e,isSignedIn:i}=dE();return Z.useCallback((n,o,s={})=>EV(e,i)(n,o,s),[e,i])};var v_={},Du={},__={},Fo={},fC;function bV(){if(fC)return Fo;fC=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.getEnvFromQueryParam=Fo.getEnvFromTLD=void 0;const e=SE();function i(n){const{host:o}=n;return o.endsWith(".org")||o.endsWith(".co")?e.Env.PRODUCTION:o.endsWith(".today")||o.endsWith(".net")?e.Env.STAGING:o.endsWith(".io")||o.endsWith(".zone")?e.Env.DEVELOPMENT:null}Fo.getEnvFromTLD=i;function t(n){const o=new URLSearchParams(n.search),s=o.get("ENV")||o.get("env");if(s){const l=s.toLowerCase();if((0,e.isEnv)(l))return l}return null}return Fo.getEnvFromQueryParam=t,Fo}var pC;function SE(){return pC||(pC=1,(function(e){var i={};Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=e.getDefaultEnv=e.parseEnvVar=e.isEnv=e.getEnvList=e.Env=void 0;const t=bV();var n;(function(p){p.DEVELOPMENT="dev",p.STAGING="stg",p.PRODUCTION="prod"})(n=e.Env||(e.Env={}));function o(){return Object.values(n)}e.getEnvList=o;function s(p){return o().includes(p)}e.isEnv=s;function l(p){if(s(p))return p;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${p}", possible values are ${o().map(y=>`"${y}"`).join(", ")}.`)}e.parseEnvVar=l;function c(p={}){const{DCL_DEFAULT_ENV:y,REACT_APP_DCL_DEFAULT_ENV:m,VITE_DCL_DEFAULT_ENV:h,GATSBY_DCL_DEFAULT_ENV:O}=p;if(y&&m&&y!==m)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(y&&h&&y!==h)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(y&&O&&y!==O)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(m&&O&&m!==O)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return y?l(y):m?l(m):h?l(h):O?l(O):n.PRODUCTION}e.getDefaultEnv=c;function f(p){if(typeof window<"u"){const m=(0,t.getEnvFromQueryParam)(window.location);if(m)return m;const h=(0,t.getEnvFromTLD)(window.location);if(h)return h}return c(typeof p>"u"&&typeof process=="object"&&typeof i=="object"?i:p)}e.getEnv=f})(__)),__}var mC;function wV(){if(mC)return Du;mC=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.createConfig=void 0;const e=SE();function i(t,n){const o=(0,e.getEnv)(n?.systemEnvVariables),s=t[o];return{get:(l,c="")=>{if(!s)throw new Error(`Could not find a config for env=${o}`);return l in s?s[l]:c},is:l=>o===l,getEnv:()=>o}}return Du.createConfig=i,Du}var hC;function SV(){return hC||(hC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=e.Env=e.createConfig=void 0;var i=wV();Object.defineProperty(e,"createConfig",{enumerable:!0,get:function(){return i.createConfig}});var t=SE();Object.defineProperty(e,"Env",{enumerable:!0,get:function(){return t.Env}}),Object.defineProperty(e,"getEnv",{enumerable:!0,get:function(){return t.getEnv}})})(v_)),v_}var E_=SV();const TV="11155111",AV="development",OV="https://decentraland.zone/auth",IV="https://peer.decentraland.zone",PV="http://localhost:3000",RV={CHAIN_ID:TV,ENVIRONMENT:AV,AUTH_URL:OV,PEER_URL:IV,MOBILE_BFF_URL:PV},NV="1",CV="production",MV="https://decentraland.org/auth",jV="https://peer.decentraland.org",LV="https://mobile-bff.decentraland.org",DV={CHAIN_ID:NV,ENVIRONMENT:CV,AUTH_URL:MV,PEER_URL:jV,MOBILE_BFF_URL:LV},fl=E_.createConfig({[E_.Env.DEVELOPMENT]:RV,[E_.Env.PRODUCTION]:DV},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:"dev"}}),El=fl.get("MOBILE_BFF_URL");function uf(e){return{id:e.id,groupId:e.groupId,worldName:e.worldName,parcels:e.parcels||[],sceneId:e.sceneId,reason:e.reason||void 0,createdAt:e.createdAt,createdBy:e.createdBy}}async function kV(e){const t=await(await e(`${El}/backoffice/bans`)).json();if(!t.ok)throw new Error(t.error||"Failed to fetch bans");return(t.data||[]).map(uf)}async function qV(e,i){const n=await(await e(`${El}/backoffice/bans`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to create group ban");return uf(n.data)}async function BV(e,i){const n=await(await e(`${El}/backoffice/bans`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to create scene ban");return uf(n.data)}async function UV(e,i){const n=await(await e(`${El}/backoffice/bans`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to create world ban");return uf(n.data)}async function b_(e,i){const n=await(await e(`${El}/backoffice/bans/${i}`,{method:"DELETE"})).json();if(!n.ok)throw new Error(n.error||"Failed to delete ban")}function FV(e,i){return e.some(t=>t.groupId===i)}function VV(e,i){if(i.length===0)return!1;const t=zd(i);return e.some(n=>n.groupId===null&&n.worldName===null&&zd(n.parcels)===t)}function HV(e,i){const t=i.trim().toLowerCase();return e.some(n=>n.worldName===t)}function yC(e,i){return e.find(t=>t.groupId===i)}function gC(e,i){if(i.length===0)return;const t=zd(i);return e.find(n=>n.groupId===null&&n.worldName===null&&zd(n.parcels)===t)}function vC(e,i){const t=i.trim().toLowerCase();return e.find(n=>n.worldName===t)}function zd(e){return e.map(i=>`${i.x},${i.y}`).sort().join("|")}function zV(e,i){switch(i.type){case"SET_BANS":return{...e,bans:i.payload,isLoading:!1,error:null};case"ADD_BAN":return{...e,bans:[...e.bans,i.payload]};case"REMOVE_BAN":return{...e,bans:e.bans.filter(t=>t.id!==i.payload)};case"SET_LOADING":return{...e,isLoading:i.payload};case"SET_ERROR":return{...e,error:i.payload,isLoading:!1};default:return e}}const WV={bans:[],isLoading:!1,error:null},Dj=Z.createContext(null);function GV({children:e}){const[i,t]=Z.useReducer(zV,WV),n=Lj(),o=Z.useCallback(async()=>{t({type:"SET_LOADING",payload:!0});try{const A=await kV(n);t({type:"SET_BANS",payload:A})}catch(A){console.error("Failed to fetch bans:",A),t({type:"SET_ERROR",payload:A instanceof Error?A.message:"Failed to fetch bans"})}},[n]);Z.useEffect(()=>{o()},[o]);const s=Z.useCallback(A=>FV(i.bans,A),[i.bans]),l=Z.useCallback(A=>VV(i.bans,A),[i.bans]),c=Z.useCallback(A=>HV(i.bans,A),[i.bans]),f=Z.useCallback(A=>yC(i.bans,A),[i.bans]),p=Z.useCallback(A=>gC(i.bans,A),[i.bans]),y=Z.useCallback(A=>vC(i.bans,A),[i.bans]),m=Z.useCallback(async(A,w)=>{try{const v=await qV(n,{groupId:A.id,reason:w});t({type:"ADD_BAN",payload:v})}catch(v){throw console.error("Failed to ban group:",v),v}},[n]),h=Z.useCallback(async A=>{const w=yC(i.bans,A.id);if(w)try{await b_(n,w.id),t({type:"REMOVE_BAN",payload:w.id})}catch(v){throw console.error("Failed to unban group:",v),v}},[n,i.bans]),O=Z.useCallback(async(A,w)=>{if(A.length!==0)try{const v=await BV(n,{parcels:A,reason:w});t({type:"ADD_BAN",payload:v})}catch(v){throw console.error("Failed to ban scene:",v),v}},[n]),C=Z.useCallback(async A=>{const w=gC(i.bans,A);if(w)try{await b_(n,w.id),t({type:"REMOVE_BAN",payload:w.id})}catch(v){throw console.error("Failed to unban scene:",v),v}},[n,i.bans]),R=Z.useCallback(async(A,w,v)=>{try{const S=await UV(n,{worldName:A,sceneId:w,reason:v});t({type:"ADD_BAN",payload:S})}catch(S){throw console.error("Failed to ban world:",S),S}},[n]),I=Z.useCallback(async A=>{const w=vC(i.bans,A);if(w)try{await b_(n,w.id),t({type:"REMOVE_BAN",payload:w.id})}catch(v){throw console.error("Failed to unban world:",v),v}},[n,i.bans]),N=Z.useCallback(async(A,w,v)=>{if(A){const S=s(A.id),M=v??!S;M&&!S?await m(A):!M&&S&&await h(A)}else if(w&&w.length>0){const S=l(w),M=v??!S;M&&!S?await O(w):!M&&S&&await C(w)}},[s,l,m,h,O,C]),_={state:i,checkGroupBanned:s,checkSceneBanned:l,checkWorldBanned:c,getGroupBan:f,getSceneBan:p,getWorldBan:y,banGroup:m,unbanGroup:h,banScene:O,unbanScene:C,banWorld:R,unbanWorld:I,toggleBan:N,refreshBans:o};return K.jsx(Dj.Provider,{value:_,children:e})}const KV=({tabs:e})=>{const{avatar:i,wallet:t,isSignedIn:n,isConnecting:o,signIn:s,signOut:l}=dE(),[c,f]=Z.useState(!1),[p,y]=Z.useState(null),m=i?.avatar?.snapshots?.face256;return Z.useEffect(()=>{Hd()&&jj().then(({address:h})=>y(h))},[]),o?K.jsxs("div",{className:"navbar-container",children:[K.jsx("div",{className:"navbar-bar",children:e}),K.jsx("div",{className:"navbar-bar",children:K.jsx("button",{className:"navbar-button",disabled:!0,children:"Connecting..."})})]}):Hd()?K.jsxs("div",{className:"navbar-container",children:[K.jsx("div",{className:"navbar-bar",children:e}),K.jsx("div",{className:"navbar-bar",children:K.jsxs("div",{className:"navbar-dev-badge",children:["DEV",p&&K.jsxs("span",{className:"navbar-dev-address",children:[p.slice(0,6),"...",p.slice(-4)]})]})})]}):n?K.jsxs("div",{className:"navbar-container",children:[K.jsx("div",{className:"navbar-bar",children:e}),K.jsxs("div",{className:"navbar-bar navbar-user-bar",children:[K.jsx("button",{className:"navbar-avatar-button",onClick:()=>f(!c),children:m?K.jsx("img",{src:m,alt:"Avatar",className:"navbar-avatar"}):K.jsx("span",{className:"navbar-avatar-placeholder",children:t?.slice(2,4).toUpperCase()})}),c&&K.jsxs(K.Fragment,{children:[K.jsx("div",{className:"navbar-backdrop",onClick:()=>f(!1)}),K.jsxs("div",{className:"navbar-menu",children:[K.jsxs("div",{className:"navbar-menu-address",children:[t?.slice(0,6),"...",t?.slice(-4)]}),K.jsx("button",{className:"navbar-menu-item",onClick:()=>{f(!1),l()},children:"Sign Out"})]})]})]})]}):K.jsxs("div",{className:"navbar-container",children:[K.jsx("div",{className:"navbar-bar",children:e}),K.jsx("div",{className:"navbar-bar",children:K.jsxs("button",{className:"navbar-button",onClick:s,children:[K.jsx("span",{className:"navbar-button-icon",children:"👤"}),"Sign In"]})})]})},YV=({activeView:e,onViewChange:i})=>K.jsxs("div",{className:"app-tabs",children:[K.jsx("button",{className:`app-tab ${e==="map"?"app-tab-active":""}`,onClick:()=>i("map"),children:"Map"}),K.jsx("button",{className:`app-tab ${e==="worlds"?"app-tab-active":""}`,onClick:()=>i("worlds"),children:"Worlds"})]}),kj=Z.createContext(null),_a=40,Ea=8,qj=-152,Bj=-167,_C=-150,EC=163,bC=-150,wC=158,oi=4,SC=.5,TC=10,TE=1,AE=0,OE=0,XV="https://media.githubusercontent.com/media/genesis-city/parcels/new-client-images/maps/lod-0/3/",JV="#1a1a1a",QV="#1a1a1a",AC={viewport:{centerX:AE,centerY:OE,zoom:TE,width:0,height:0},interaction:{isDragging:!1,dragStartX:0,dragStartY:0,hoveredParcel:null}};function Bs(e,i,t){return Math.max(i,Math.min(t,e))}function ZV(e,i){switch(i.type){case"SET_VIEWPORT_SIZE":return{...e,viewport:{...e.viewport,width:i.payload.width,height:i.payload.height}};case"PAN":{const t=Bs(e.viewport.centerX+i.payload.deltaX,_C,EC),n=Bs(e.viewport.centerY+i.payload.deltaY,bC,wC);return{...e,viewport:{...e.viewport,centerX:t,centerY:n}}}case"ZOOM":{const t=Bs(e.viewport.zoom*i.payload.factor,SC,TC);return{...e,viewport:{...e.viewport,zoom:t}}}case"SET_CENTER":return{...e,viewport:{...e.viewport,centerX:Bs(i.payload.x,_C,EC),centerY:Bs(i.payload.y,bC,wC)}};case"SET_ZOOM":return{...e,viewport:{...e.viewport,zoom:Bs(i.payload,SC,TC)}};case"START_DRAG":return{...e,interaction:{...e.interaction,isDragging:!0,dragStartX:i.payload.x,dragStartY:i.payload.y}};case"END_DRAG":return{...e,interaction:{...e.interaction,isDragging:!1}};case"UPDATE_DRAG_START":return{...e,interaction:{...e.interaction,dragStartX:i.payload.x,dragStartY:i.payload.y}};case"SET_HOVERED_PARCEL":return{...e,interaction:{...e.interaction,hoveredParcel:i.payload}};case"RESET_VIEW":return{...e,viewport:{...e.viewport,centerX:AE,centerY:OE,zoom:TE}};default:return e}}function xV({children:e,initialCenter:i,initialZoom:t}){const n={...AC,viewport:{...AC.viewport,centerX:i?.x??AE,centerY:i?.y??OE,zoom:t??TE}},[o,s]=Z.useReducer(ZV,n);return K.jsx(kj.Provider,{value:{state:o,dispatch:s},children:e})}const Uj=Z.createContext(null),lf=fl.get("MOBILE_BFF_URL");function IE(e){return{id:e.id,name:e.name,description:e.description||"",color:e.color,tags:e.tags||[],parcels:e.parcels||[],createdAt:new Date(e.createdAt).getTime(),updatedAt:new Date(e.updatedAt).getTime()}}async function $V(e){const t=await(await e(`${lf}/backoffice/scene-groups`)).json();if(!t.ok)throw new Error(t.error||"Failed to fetch scene groups");return(t.data||[]).map(IE)}async function eH(e,i){const n=await(await e(`${lf}/backoffice/scene-groups`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to create scene group");return IE(n.data)}async function tH(e,i,t){const o=await(await e(`${lf}/backoffice/scene-groups/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json();if(!o.ok||!o.data)throw new Error(o.error||"Failed to update scene group");return IE(o.data)}async function rH(e,i){const n=await(await e(`${lf}/backoffice/scene-groups/${i}`,{method:"DELETE"})).json();if(!n.ok)throw new Error(n.error||"Failed to delete scene group")}const nH={mode:"view",groups:[],selectedParcels:[],selectionColor:null,editingGroupId:null,sidebarOpen:!1,isLoading:!1,error:null};function OC(e,i){return e.x===i.x&&e.y===i.y}function iH(e,i){switch(i.type){case"SET_MODE":return{...e,mode:i.payload,sidebarOpen:i.payload==="groups"?!0:e.sidebarOpen,selectedParcels:i.payload==="groups"?e.selectedParcels:[],selectionColor:i.payload==="groups"?e.selectionColor:null,editingGroupId:i.payload==="groups"?e.editingGroupId:null};case"ADD_GROUP":return{...e,groups:[...e.groups,i.payload],selectedParcels:[],selectionColor:null,isLoading:!1,error:null};case"UPDATE_GROUP":return{...e,groups:e.groups.map(t=>t.id===i.payload.id?i.payload:t),editingGroupId:null,isLoading:!1,error:null};case"DELETE_GROUP":return{...e,groups:e.groups.filter(t=>t.id!==i.payload),editingGroupId:e.editingGroupId===i.payload?null:e.editingGroupId,isLoading:!1,error:null};case"SET_SELECTED_PARCELS":return{...e,selectedParcels:i.payload};case"TOGGLE_PARCEL_SELECTION":{const t=i.payload,n=e.selectedParcels.some(o=>OC(o,t));return{...e,selectedParcels:n?e.selectedParcels.filter(o=>!OC(o,t)):[...e.selectedParcels,t]}}case"CLEAR_SELECTION":return{...e,selectedParcels:[],selectionColor:null};case"SET_EDITING_GROUP":return{...e,editingGroupId:i.payload,sidebarOpen:i.payload!==null?!0:e.sidebarOpen};case"TOGGLE_SIDEBAR":return{...e,sidebarOpen:!e.sidebarOpen};case"SET_SIDEBAR_OPEN":return{...e,sidebarOpen:i.payload};case"SET_SELECTION_COLOR":return{...e,selectionColor:i.payload};case"LOAD_GROUPS":return{...e,groups:i.payload,isLoading:!1,error:null};case"SET_LOADING":return{...e,isLoading:i.payload};case"SET_ERROR":return{...e,error:i.payload,isLoading:!1};default:return e}}function aH({children:e}){const[i,t]=Z.useReducer(iH,nH),n=Lj(),{isSignedIn:o}=dE();Z.useEffect(()=>{if(!(o||Hd())){t({type:"LOAD_GROUPS",payload:[]});return}(async()=>{t({type:"SET_LOADING",payload:!0});try{const y=await $V(n);t({type:"LOAD_GROUPS",payload:y})}catch(y){console.error("Failed to load groups:",y),t({type:"SET_ERROR",payload:y instanceof Error?y.message:"Failed to load groups"})}})()},[o,n]);const s=Z.useCallback(async f=>{t({type:"SET_LOADING",payload:!0});try{const p=await eH(n,f);return t({type:"ADD_GROUP",payload:p}),t({type:"CLEAR_SELECTION"}),p}catch(p){return console.error("Failed to create group:",p),t({type:"SET_ERROR",payload:p instanceof Error?p.message:"Failed to create group"}),null}},[n]),l=Z.useCallback(async(f,p)=>{t({type:"SET_LOADING",payload:!0});try{const y=await tH(n,f,p);return t({type:"UPDATE_GROUP",payload:y}),y}catch(y){return console.error("Failed to update group:",y),t({type:"SET_ERROR",payload:y instanceof Error?y.message:"Failed to update group"}),null}},[n]),c=Z.useCallback(async f=>{t({type:"SET_LOADING",payload:!0});try{return await rH(n,f),t({type:"DELETE_GROUP",payload:f}),!0}catch(p){return console.error("Failed to delete group:",p),t({type:"SET_ERROR",payload:p instanceof Error?p.message:"Failed to delete group"}),!1}},[n]);return K.jsx(Uj.Provider,{value:{state:i,dispatch:t,createGroup:s,updateGroup:l,deleteGroup:c},children:e})}function PE(){const e=Z.useContext(Uj);if(!e)throw new Error("useGroupsContext must be used within a GroupsProvider");return e}function Gs(){return PE().state}function cf(){return PE().dispatch}function RE(){const{createGroup:e,updateGroup:i,deleteGroup:t}=PE();return{createGroup:e,updateGroup:i,deleteGroup:t}}function Fj(){const e=Z.useContext(kj);if(!e)throw new Error("useMapContext must be used within a MapProvider");return e}function Yo(){return Fj().state}function bl(){return Fj().dispatch}function NE(){const e=Z.useContext(Dj);if(!e)throw new Error("useBans must be used within a BansProvider");return e}function df(){const{state:e}=NE();return e}function CE(){const{checkGroupBanned:e,checkSceneBanned:i,checkWorldBanned:t,getGroupBan:n,getSceneBan:o,getWorldBan:s,banGroup:l,unbanGroup:c,banScene:f,unbanScene:p,banWorld:y,unbanWorld:m,toggleBan:h,refreshBans:O}=NE();return{checkGroupBanned:e,checkSceneBanned:i,checkWorldBanned:t,getGroupBan:n,getSceneBan:o,getWorldBan:s,banGroup:l,unbanGroup:c,banScene:f,unbanScene:p,banWorld:y,unbanWorld:m,toggleBan:h,refreshBans:O}}function oH(e){const i=bl(),t=Z.useRef(null),n=Z.useCallback(()=>{if(e.current){const{width:o,height:s}=e.current.getBoundingClientRect();i({type:"SET_VIEWPORT_SIZE",payload:{width:o,height:s}})}},[e,i]);return Z.useEffect(()=>{const o=e.current;if(o)return n(),t.current=new ResizeObserver(()=>{n()}),t.current.observe(o),()=>{t.current?.disconnect()}},[e,n]),{updateSize:n}}function IC(e,i){const t=e-qj,n=i-Bj,o=Math.floor(t/_a),s=Math.floor(n/_a);return{x:Math.max(0,Math.min(Ea-1,o)),y:Math.max(0,Math.min(Ea-1,s))}}function Cd(e,i,t){const{centerX:n,centerY:o,zoom:s,width:l,height:c}=t,f=oi*s,p=e-l/2,y=i-c/2,m=p/f,h=-y/f;return{x:Math.floor(n+m),y:Math.floor(o+h)}}function pl(e,i,t){const{centerX:n,centerY:o,zoom:s,width:l,height:c}=t,f=oi*s,p=l/2+(e-n)*f,y=c/2-(i-o)*f;return{screenX:p,screenY:y}}function sH(e){const{centerX:i,centerY:t,zoom:n,width:o,height:s}=e,l=oi*n,c=o/2/l+_a,f=s/2/l+_a,p=i-c,y=i+c,m=t-f,h=t+f,O=IC(p,m),C=IC(y,h),R=[];for(let I=O.x;I<=C.x;I++)for(let N=O.y;N<=C.y;N++)I>=0&&I<Ea&&N>=0&&N<Ea&&R.push({x:I,y:N});return R}function uH(e,i){return`${XV}${e}%2C${i}.jpg`}function lH(e,i,t){const n=oi*t.zoom,o=_a*n,s=qj+e*_a,l=Bj+i*_a,c=t.width/2+(s-t.centerX)*n,f=t.height/2-(l+_a-t.centerY)*n;return{x:c,y:f,width:o,height:o}}function Md(e,i){return`${e},${i}`}class cH{cache=new Map;loading=new Map;maxCacheSize;onTileLoaded;constructor(i=100,t){this.maxCacheSize=i,this.onTileLoaded=t}setOnTileLoaded(i){this.onTileLoaded=i}getCached(i,t){const n=Md(i,t),o=this.cache.get(n);return o?(o.lastAccessed=Date.now(),o.image):null}isLoading(i,t){const n=Md(i,t);return this.loading.has(n)}async loadTile(i,t){const n=Md(i,t),o=this.cache.get(n);if(o)return o.lastAccessed=Date.now(),o.image;const s=this.loading.get(n);if(s)return s;const l=new Promise((c,f)=>{const p=new Image;p.crossOrigin="anonymous",p.onload=()=>{this.cache.set(n,{image:p,lastAccessed:Date.now()}),this.loading.delete(n),this.evictIfNeeded(),this.onTileLoaded?.(),c(p)},p.onerror=y=>{this.loading.delete(n),f(y)},p.src=uH(i,t)});return this.loading.set(n,l),l}preloadTiles(i){for(const t of i){const n=Md(t.x,t.y);!this.cache.has(n)&&!this.loading.has(n)&&this.loadTile(t.x,t.y).catch(()=>{})}}evictIfNeeded(){if(this.cache.size<=this.maxCacheSize)return;const t=Array.from(this.cache.entries()).sort((n,o)=>n[1].lastAccessed-o[1].lastAccessed).slice(0,this.cache.size-this.maxCacheSize);for(const[n]of t)this.cache.delete(n)}clear(){this.cache.clear(),this.loading.clear()}getStats(){return{cached:this.cache.size,loading:this.loading.size}}}let w_=null;function dH(e){return w_||(w_=new cH(100,e)),w_}function fH(){const{viewport:e}=Yo(),[i,t]=Z.useState(0),n=Z.useRef(dH());Z.useEffect(()=>{n.current.setOnTileLoaded(()=>{t(c=>c+1)})},[]);const o=sH(e);Z.useEffect(()=>{for(const c of o){const f=Ea-1-c.y;n.current.getCached(c.x,f)||n.current.loadTile(c.x,f).catch(()=>{})}},[o]);const s=Z.useCallback((c,f)=>n.current.getCached(c,f),[i]),l=Z.useCallback(c=>{n.current.preloadTiles(c)},[]);return{visibleTiles:o,getTile:s,preloadAdjacentTiles:l,renderTrigger:i}}function pH({canvasRef:e,onParcelClick:i}){const{viewport:t,interaction:n}=Yo(),o=bl(),s=Z.useRef(null),l=Z.useRef(null),c=Z.useCallback(R=>{R.preventDefault(),s.current={x:R.clientX,y:R.clientY},o({type:"START_DRAG",payload:{x:R.clientX,y:R.clientY}})},[o]),f=Z.useCallback(R=>{const I=e.current;if(!I)return;const N=I.getBoundingClientRect(),_=R.clientX-N.left,A=R.clientY-N.top,w=Cd(_,A,t);if(o({type:"SET_HOVERED_PARCEL",payload:w}),n.isDragging){const v=R.clientX-n.dragStartX,S=R.clientY-n.dragStartY,M=oi*t.zoom,F=-v/M,W=S/M;o({type:"PAN",payload:{deltaX:F,deltaY:W}}),o({type:"UPDATE_DRAG_START",payload:{x:R.clientX,y:R.clientY}})}},[e,t,n,o]),p=Z.useCallback(R=>{if(s.current){const I=Math.abs(R.clientX-s.current.x),N=Math.abs(R.clientY-s.current.y);if(I<5&&N<5&&i){const _=e.current;if(_){const A=_.getBoundingClientRect(),w=R.clientX-A.left,v=R.clientY-A.top,S=Cd(w,v,t);i(S)}}}s.current=null,o({type:"END_DRAG"})},[e,t,i,o]),y=Z.useCallback(()=>{o({type:"SET_HOVERED_PARCEL",payload:null}),o({type:"END_DRAG"}),s.current=null},[o]),m=Z.useCallback(R=>{R.preventDefault();const I=e.current;if(!I)return;const N=I.getBoundingClientRect(),_=R.clientX-N.left,A=R.clientY-N.top,w=Cd(_,A,t),v=R.deltaY>0?.97:1.03,S=Math.max(.5,Math.min(10,t.zoom*v)),M=oi*S,F=w.x-(_-t.width/2)/M,W=w.y+(A-t.height/2)/M;o({type:"SET_ZOOM",payload:S}),o({type:"SET_CENTER",payload:{x:F,y:W}})},[e,t,o]),h=Z.useCallback(R=>{if(R.preventDefault(),R.touches.length===1){const I=R.touches[0];s.current={x:I.clientX,y:I.clientY},o({type:"START_DRAG",payload:{x:I.clientX,y:I.clientY}})}else if(R.touches.length===2){const I=R.touches[0].clientX-R.touches[1].clientX,N=R.touches[0].clientY-R.touches[1].clientY;l.current=Math.sqrt(I*I+N*N)}},[o]),O=Z.useCallback(R=>{if(R.preventDefault(),R.touches.length===1&&n.isDragging){const I=R.touches[0],N=I.clientX-n.dragStartX,_=I.clientY-n.dragStartY,A=oi*t.zoom,w=-N/A,v=_/A;o({type:"PAN",payload:{deltaX:w,deltaY:v}}),o({type:"UPDATE_DRAG_START",payload:{x:I.clientX,y:I.clientY}})}else if(R.touches.length===2&&l.current!==null){const I=R.touches[0].clientX-R.touches[1].clientX,N=R.touches[0].clientY-R.touches[1].clientY,_=Math.sqrt(I*I+N*N),A=_/l.current;o({type:"ZOOM",payload:{factor:A}}),l.current=_}},[n,t.zoom,o]),C=Z.useCallback(R=>{if(R.touches.length===0){if(s.current&&i){const I=e.current;if(I){const N=I.getBoundingClientRect(),_=s.current.x-N.left,A=s.current.y-N.top,w=Cd(_,A,t);i(w)}}s.current=null,l.current=null,o({type:"END_DRAG"})}else if(R.touches.length===1){l.current=null;const I=R.touches[0];o({type:"UPDATE_DRAG_START",payload:{x:I.clientX,y:I.clientY}})}},[e,t,i,o]);return Z.useEffect(()=>{const R=e.current;if(R)return R.addEventListener("mousedown",c),R.addEventListener("mousemove",f),R.addEventListener("mouseup",p),R.addEventListener("mouseleave",y),R.addEventListener("wheel",m,{passive:!1}),R.addEventListener("touchstart",h,{passive:!1}),R.addEventListener("touchmove",O,{passive:!1}),R.addEventListener("touchend",C),()=>{R.removeEventListener("mousedown",c),R.removeEventListener("mousemove",f),R.removeEventListener("mouseup",p),R.removeEventListener("mouseleave",y),R.removeEventListener("wheel",m),R.removeEventListener("touchstart",h),R.removeEventListener("touchmove",O),R.removeEventListener("touchend",C)}},[e,c,f,p,y,m,h,O,C]),{isDragging:n.isDragging,hoveredParcel:n.hoveredParcel}}function mH({onParcelClick:e}){const i=Z.useRef(null),t=Z.useRef(null),n=Z.useRef(null),{viewport:o,interaction:s}=Yo(),{getTile:l,renderTrigger:c}=fH();oH(t);const{isDragging:f}=pH({canvasRef:i,onParcelClick:e}),p=Z.useCallback(()=>{const m=i.current;if(!m)return;const h=m.getContext("2d");if(!h)return;const O=window.devicePixelRatio||1,{width:C,height:R}=o;(m.width!==C*O||m.height!==R*O)&&(m.width=C*O,m.height=R*O,m.style.width=`${C}px`,m.style.height=`${R}px`,h.scale(O,O)),h.fillStyle=QV,h.fillRect(0,0,C,R);for(let I=0;I<Ea;I++)for(let N=0;N<Ea;N++){const _=lH(I,N,o);if(_.x+_.width<0||_.x>C||_.y+_.height<0||_.y>R)continue;const A=Ea-1-N,w=l(I,A);w?h.drawImage(w,_.x,_.y,_.width,_.height):(h.fillStyle=JV,h.fillRect(_.x,_.y,_.width,_.height))}if(s.hoveredParcel){const{hoveredParcel:I}=s,N=oi*o.zoom,{screenX:_,screenY:A}=pl(I.x,I.y,o),w=_,v=A-N,S=N,M=Math.max(4,S*.25),F=Math.max(1,S*.08);h.strokeStyle="white",h.lineWidth=F,h.lineCap="square",h.beginPath(),h.moveTo(w,v+M),h.lineTo(w,v),h.lineTo(w+M,v),h.stroke(),h.beginPath(),h.moveTo(w+S-M,v),h.lineTo(w+S,v),h.lineTo(w+S,v+M),h.stroke(),h.beginPath(),h.moveTo(w,v+S-M),h.lineTo(w,v+S),h.lineTo(w+M,v+S),h.stroke(),h.beginPath(),h.moveTo(w+S-M,v+S),h.lineTo(w+S,v+S),h.lineTo(w+S,v+S-M),h.stroke()}},[o,l,s]);Z.useEffect(()=>{const m=()=>{p(),n.current=requestAnimationFrame(m)};return n.current=requestAnimationFrame(m),()=>{n.current!==null&&cancelAnimationFrame(n.current)}},[p,c]);const y=f?"grabbing":"grab";return K.jsx("div",{ref:t,style:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},children:K.jsx("canvas",{ref:i,style:{display:"block",cursor:y,touchAction:"none"}})})}const hH="_mapView_ojr5v_1",yH="_controls_ojr5v_11",gH="_controlButton_ojr5v_21",vH="_coordinateDisplay_ojr5v_45",Us={mapView:hH,controls:yH,controlButton:gH,coordinateDisplay:vH};function _H(){const e=bl(),i=()=>{e({type:"ZOOM",payload:{factor:1.5}})},t=()=>{e({type:"ZOOM",payload:{factor:.67}})},n=()=>{e({type:"RESET_VIEW"})};return K.jsxs("div",{className:Us.controls,children:[K.jsx("button",{className:Us.controlButton,onClick:i,title:"Zoom In","aria-label":"Zoom In",children:"+"}),K.jsx("button",{className:Us.controlButton,onClick:t,title:"Zoom Out","aria-label":"Zoom Out",children:"-"}),K.jsx("button",{className:Us.controlButton,onClick:n,title:"Reset View","aria-label":"Reset View",children:"⌂"})]})}function EH(){const{interaction:e}=Yo(),{hoveredParcel:i}=e;return i?K.jsxs("div",{className:Us.coordinateDisplay,children:[i.x,", ",i.y]}):null}const bH="#00D9FF",wH=.3,SH=2;function TH(){const{viewport:e}=Yo(),{selectedParcels:i,selectionColor:t}=Gs(),n=t||bH,o=oi*e.zoom,s=Z.useMemo(()=>i.map(l=>{const{screenX:c,screenY:f}=pl(l.x,l.y,e);return{key:`${l.x},${l.y}`,x:c,y:f-o,width:o,height:o}}),[i,e,o]);return i.length===0?null:K.jsx("svg",{style:{position:"absolute",top:0,left:0,width:e.width,height:e.height,pointerEvents:"none",overflow:"hidden"},children:s.map(l=>K.jsx("rect",{x:l.x,y:l.y,width:l.width,height:l.height,fill:n,fillOpacity:wH,stroke:n,strokeWidth:SH,strokeDasharray:"4 2"},l.key))})}const AH=.2,OH=1.5,IH=2,S_="#FF4444",PH=2.5;function RH(){const{viewport:e}=Yo(),{groups:i,editingGroupId:t}=Gs(),{checkGroupBanned:n}=CE(),{bans:o}=df(),s=oi*e.zoom,l=Z.useMemo(()=>o.filter(f=>f.groupId===null&&f.worldName===null&&f.parcels.length>0),[o]),c=Z.useMemo(()=>{const f=[];return i.forEach(p=>{const y=p.id===t,m=n(p.id);p.parcels.forEach(h=>{const{screenX:O,screenY:C}=pl(h.x,h.y,e);f.push({key:`group-${p.id}-${h.x},${h.y}`,x:O,y:C-s,width:s,height:s,color:p.color,isEditing:y,isBanned:m})})}),l.forEach(p=>{p.parcels.forEach(y=>{const{screenX:m,screenY:h}=pl(y.x,y.y,e);f.push({key:`ban-${p.id}-${y.x},${y.y}`,x:m,y:h-s,width:s,height:s,color:S_,isEditing:!1,isBanned:!0})})}),f},[i,t,e,s,n,l]);return c.length===0?null:K.jsx("svg",{style:{position:"absolute",top:0,left:0,width:e.width,height:e.height,pointerEvents:"none",overflow:"hidden"},children:c.map(f=>K.jsx("rect",{x:f.x,y:f.y,width:f.width,height:f.height,fill:f.isBanned?S_:f.color,fillOpacity:AH,stroke:f.isBanned?S_:f.color,strokeWidth:f.isBanned?PH:f.isEditing?IH:OH,strokeDasharray:f.isEditing?"6 3":void 0},f.key))})}const NH="_sidebar_1noj2_1",CH="_sidebarCollapsed_1noj2_15",MH="_header_1noj2_42",jH="_headerTitle_1noj2_50",LH="_closeButton_1noj2_57",DH="_content_1noj2_77",kH="_footer_1noj2_83",qH="_button_1noj2_90",BH="_buttonPrimary_1noj2_101",UH="_buttonSecondary_1noj2_115",FH="_groupCard_1noj2_134",VH="_groupCardHeader_1noj2_147",HH="_groupColorDot_1noj2_154",zH="_groupName_1noj2_161",WH="_groupMeta_1noj2_169",GH="_groupTags_1noj2_175",KH="_tag_1noj2_181",YH="_groupActions_1noj2_189",XH="_actionButton_1noj2_197",JH="_actionButtonBan_1noj2_211",QH="_actionButtonUnban_1noj2_220",ZH="_groupCardBanned_1noj2_230",xH="_bannedBadge_1noj2_239",$H="_form_1noj2_252",e3="_formGroup_1noj2_258",t3="_label_1noj2_264",r3="_input_1noj2_270",n3="_textarea_1noj2_284",i3="_colorPicker_1noj2_289",a3="_colorOption_1noj2_295",o3="_colorOptionSelected_1noj2_308",s3="_colorOptionDisabled_1noj2_312",u3="_tagsInput_1noj2_321",l3="_tagInForm_1noj2_332",c3="_tagRemove_1noj2_343",d3="_tagInput_1noj2_353",f3="_emptyState_1noj2_367",p3="_emptyStateIcon_1noj2_373",m3="_emptyStateText_1noj2_379",h3="_selectionInfo_1noj2_385",y3="_selectionInfoText_1noj2_393",g3="_errorMessage_1noj2_400",et={sidebar:NH,sidebarCollapsed:CH,header:MH,headerTitle:jH,closeButton:LH,content:DH,footer:kH,button:qH,buttonPrimary:BH,buttonSecondary:UH,groupCard:FH,groupCardHeader:VH,groupColorDot:HH,groupName:zH,groupMeta:WH,groupTags:GH,tag:KH,groupActions:YH,actionButton:XH,actionButtonBan:JH,actionButtonUnban:QH,groupCardBanned:ZH,bannedBadge:xH,form:$H,formGroup:e3,label:t3,input:r3,textarea:n3,colorPicker:i3,colorOption:a3,colorOptionSelected:o3,colorOptionDisabled:s3,tagsInput:u3,tagInForm:l3,tagRemove:c3,tagInput:d3,emptyState:f3,emptyStateIcon:p3,emptyStateText:m3,selectionInfo:h3,selectionInfoText:y3,errorMessage:g3};function v3({group:e,onEdit:i,onDelete:t,onClick:n,isBanned:o=!1,onBanToggle:s}){const l=p=>{p.stopPropagation(),i(e)},c=p=>{p.stopPropagation(),confirm(`Delete group "${e.name}"?`)&&t(e.id)},f=p=>{p.stopPropagation(),s?.(e,!o)};return K.jsxs("div",{className:`${et.groupCard} ${o?et.groupCardBanned:""}`,onClick:()=>n(e),children:[K.jsxs("div",{className:et.groupCardHeader,children:[K.jsx("div",{className:et.groupColorDot,style:{backgroundColor:e.color}}),K.jsxs("h4",{className:et.groupName,children:[e.name,o&&K.jsx("span",{className:et.bannedBadge,children:"Banned"})]})]}),K.jsxs("p",{className:et.groupMeta,children:[e.parcels.length," parcel",e.parcels.length!==1?"s":"",e.description&&` • ${e.description}`]}),e.tags.length>0&&K.jsx("div",{className:et.groupTags,children:e.tags.map(p=>K.jsx("span",{className:et.tag,children:p},p))}),K.jsxs("div",{className:et.groupActions,children:[K.jsx("button",{className:et.actionButton,onClick:l,children:"Edit"}),K.jsx("button",{className:`${et.actionButton} ${o?et.actionButtonUnban:et.actionButtonBan}`,onClick:f,children:o?"Unban":"Ban"}),K.jsx("button",{className:et.actionButton,onClick:c,children:"Delete"})]})]})}function _3({onEditGroup:e,checkIsBanned:i,onBanToggle:t}){const{groups:n,isLoading:o,error:s}=Gs(),l=cf(),c=bl(),{deleteGroup:f}=RE(),p=async m=>{await f(m)},y=m=>{if(l({type:"SET_EDITING_GROUP",payload:m.id}),m.parcels.length>0){const h=m.parcels.map(w=>w.x),O=m.parcels.map(w=>w.y),C=Math.min(...h),R=Math.max(...h),I=Math.min(...O),N=Math.max(...O),_=(C+R)/2,A=(I+N)/2;c({type:"SET_CENTER",payload:{x:_,y:A}}),c({type:"SET_ZOOM",payload:4})}};return o&&n.length===0?K.jsx("div",{className:et.emptyState,children:K.jsx("p",{className:et.emptyStateText,children:"Loading groups..."})}):s&&n.length===0?K.jsx("div",{className:et.emptyState,children:K.jsx("p",{className:et.emptyStateText,style:{color:"#ff6b6b"},children:s})}):n.length===0?K.jsxs("div",{className:et.emptyState,children:[K.jsx("div",{className:et.emptyStateIcon,children:"□"}),K.jsx("p",{className:et.emptyStateText,children:"No groups yet. Click parcels on the map to select them, then create a group."})]}):K.jsx("div",{children:n.map(m=>K.jsx(v3,{group:m,onEdit:e,onDelete:p,onClick:y,isBanned:i?.(m)??!1,onBanToggle:t},m.id))})}const ol=["#FF6B6B","#4ECDC4","#45B7D1","#96CEB4","#FFEAA7","#DDA0DD","#98D8C8","#F7DC6F","#BB8FCE","#85C1E9"];function E3(e){const i=new Set(e.map(n=>n.color));return ol.find(n=>!i.has(n))||ol[e.length%ol.length]}function b3({editingGroup:e,selectedParcels:i,onCancel:t,onSave:n}){const{groups:o,error:s}=Gs(),l=cf(),{createGroup:c,updateGroup:f}=RE(),[p,y]=Z.useState(!1),m="#00D9FF",h=Z.useMemo(()=>{const be=new Set(o.filter(Le=>Le.id!==e?.id).map(Le=>Le.color));return be.add(m),be},[o,e?.id]),O=Z.useCallback(()=>e?.color?e.color:ol.find(Le=>!h.has(Le))||E3(o),[e?.color,h,o]),[C,R]=Z.useState(e?.name||""),[I,N]=Z.useState(e?.description||""),[_,A]=Z.useState(O),[w,v]=Z.useState(e?.tags||[]),[S,M]=Z.useState(""),F=Z.useMemo(()=>{if(!e)return i;const be=new Set(e.parcels.map(Me=>`${Me.x},${Me.y}`)),Le=i.filter(Me=>!be.has(`${Me.x},${Me.y}`));return[...e.parcels,...Le]},[e,i]),W=!!e;Z.useEffect(()=>{l({type:"SET_SELECTION_COLOR",payload:_})},[_,l]),Z.useEffect(()=>(l({type:"SET_SELECTION_COLOR",payload:_}),()=>{l({type:"SET_SELECTION_COLOR",payload:null})}),[]);const J=async be=>{if(be.preventDefault(),!(!C.trim()||F.length===0||p)){y(!0);try{W&&e?await f(e.id,{name:C.trim(),description:I.trim(),color:_,tags:w,parcels:[...F]})&&n():await c({name:C.trim(),description:I.trim(),color:_,tags:w,parcels:[...F]})&&n()}finally{y(!1)}}},pe=Z.useCallback(()=>{const be=S.trim().toLowerCase();be&&!w.includes(be)&&v([...w,be]),M("")},[S,w]),Oe=be=>{be.key==="Enter"?(be.preventDefault(),pe()):be.key==="Backspace"&&!S&&w.length>0&&v(w.slice(0,-1))},Ae=be=>{v(w.filter(Le=>Le!==be))};return K.jsxs("form",{className:et.form,onSubmit:J,children:[K.jsx("div",{className:et.selectionInfo,children:K.jsxs("p",{className:et.selectionInfoText,children:[F.length," parcel",F.length!==1?"s":""," selected"]})}),K.jsxs("div",{className:et.formGroup,children:[K.jsx("label",{className:et.label,children:"Name *"}),K.jsx("input",{type:"text",className:et.input,value:C,onChange:be=>R(be.target.value),placeholder:"Enter group name",autoFocus:!0})]}),K.jsxs("div",{className:et.formGroup,children:[K.jsx("label",{className:et.label,children:"Description"}),K.jsx("textarea",{className:`${et.input} ${et.textarea}`,value:I,onChange:be=>N(be.target.value),placeholder:"Optional description"})]}),K.jsxs("div",{className:et.formGroup,children:[K.jsx("label",{className:et.label,children:"Color"}),K.jsx("div",{className:et.colorPicker,children:ol.map(be=>{const Le=h.has(be),Me=_===be;return K.jsx("button",{type:"button",className:`${et.colorOption} ${Me?et.colorOptionSelected:""} ${Le?et.colorOptionDisabled:""}`,style:{backgroundColor:be},onClick:()=>!Le&&A(be),disabled:Le,title:Le?"Color already in use":void 0},be)})})]}),K.jsxs("div",{className:et.formGroup,children:[K.jsx("label",{className:et.label,children:"Tags"}),K.jsxs("div",{className:et.tagsInput,children:[w.map(be=>K.jsxs("span",{className:et.tagInForm,children:[be,K.jsx("button",{type:"button",className:et.tagRemove,onClick:()=>Ae(be),children:"×"})]},be)),K.jsx("input",{type:"text",className:et.tagInput,value:S,onChange:be=>M(be.target.value),onKeyDown:Oe,onBlur:pe,placeholder:"Add tag..."})]})]}),s&&K.jsx("div",{className:et.errorMessage,children:s}),K.jsxs("div",{className:et.footer,style:{padding:0,borderTop:"none"},children:[K.jsx("button",{type:"button",className:`${et.button} ${et.buttonSecondary}`,onClick:t,disabled:p,children:"Cancel"}),K.jsx("button",{type:"submit",className:`${et.button} ${et.buttonPrimary}`,disabled:!C.trim()||F.length===0||p,children:p?"Saving...":W?"Save Changes":"Create Group"})]})]})}function w3({onExitSelectMode:e,onEnterSelectMode:i,isSelectMode:t=!1,initialMode:n="list",checkIsBanned:o,onBanToggle:s}){const{sidebarOpen:l,selectedParcels:c,groups:f,editingGroupId:p}=Gs(),y=cf(),[m,h]=Z.useState(n);Z.useEffect(()=>{h(n)},[n]);const O=Z.useCallback(J=>{J.key==="Escape"&&(y({type:"SET_SIDEBAR_OPEN",payload:!1}),e?.())},[y,e]);Z.useEffect(()=>(document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)),[O]);const C=Z.useMemo(()=>m==="edit"&&p&&f.find(J=>J.id===p)||null,[m,p,f]),R=()=>{y({type:"TOGGLE_SIDEBAR"}),l&&e&&e()},I=()=>{h("create"),i?.()},N=J=>{y({type:"SET_EDITING_GROUP",payload:J.id}),h("edit"),i?.()},_=()=>{h("list"),y({type:"SET_EDITING_GROUP",payload:null}),y({type:"CLEAR_SELECTION"}),e?.()},A=()=>{h("list"),y({type:"SET_EDITING_GROUP",payload:null}),y({type:"CLEAR_SELECTION"}),e?.()},w=()=>{y({type:"CLEAR_SELECTION"})},v=()=>{i?.()},S=()=>{e?.()},M=`${et.sidebar} ${l?"":et.sidebarCollapsed}`,F=()=>{switch(m){case"create":return"Create Group";case"edit":return"Edit Group";default:return"Scene Groups"}},W=K.jsxs("div",{className:M,children:[K.jsxs("div",{className:et.header,children:[K.jsx("h3",{className:et.headerTitle,children:F()}),K.jsx("button",{className:et.closeButton,onClick:R,children:"×"})]}),K.jsxs("div",{className:et.content,children:[m==="list"&&K.jsxs(K.Fragment,{children:[c.length>0&&K.jsx("div",{className:et.selectionInfo,children:K.jsxs("p",{className:et.selectionInfoText,children:[c.length," parcel",c.length!==1?"s":""," selected"]})}),K.jsx(_3,{onEditGroup:N,checkIsBanned:o,onBanToggle:s})]}),(m==="create"||m==="edit")&&K.jsx(b3,{editingGroup:C,selectedParcels:c,onCancel:_,onSave:A})]}),m==="list"&&K.jsx("div",{className:et.footer,children:t?c.length>0?K.jsxs(K.Fragment,{children:[K.jsx("button",{className:`${et.button} ${et.buttonSecondary}`,onClick:w,children:"Clear"}),K.jsx("button",{className:`${et.button} ${et.buttonPrimary}`,onClick:I,children:"Create Group"})]}):K.jsxs(K.Fragment,{children:[K.jsx("button",{className:`${et.button} ${et.buttonSecondary}`,onClick:S,children:"Done"}),K.jsx("p",{style:{color:"rgba(255,255,255,0.5)",fontSize:"13px",margin:0,flex:1},children:"Click parcels to select"})]}):K.jsx("button",{className:`${et.button} ${et.buttonPrimary}`,onClick:v,style:{width:"100%"},children:"Select Parcels"})})]});return Yd.createPortal(W,document.body)}const Vj="https://peer.decentraland.org/content";async function Hj(e){const i=`${e.x},${e.y}`;try{const t=await fetch(`${Vj}/entities/active`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pointers:[i]})});if(!t.ok)return console.error("Failed to fetch scene:",t.statusText),null;const n=await t.json();if(n.length===0)return null;const o=n[0];return S3(o)}catch(t){return console.error("Error fetching scene:",t),null}}function S3(e){const i=e.metadata||{},t=i.display||{},n=i.scene;let o=null;if(n?.base){const[f,p]=n.base.split(",").map(Number);!isNaN(f)&&!isNaN(p)&&(o={x:f,y:p})}const l=(n?.parcels||e.pointers).map(f=>{const[p,y]=f.split(",").map(Number);return{x:p,y}}).filter(f=>!isNaN(f.x)&&!isNaN(f.y));let c=null;if(t.navmapThumbnail){const f=e.content.find(p=>p.file===t.navmapThumbnail);f&&(c=`${Vj}/contents/${f.hash}`)}return{entityId:e.id,name:t.title||"Unnamed Scene",description:t.description||"",thumbnail:c,owner:i.owner||i.contact?.name||null,parcels:l,baseParcel:o,deployedAt:new Date(e.timestamp),tags:i.tags||[]}}function T3(e){if(e.length===0)return"";if(e.length===1)return`${e[0].x},${e[0].y}`;const i=Math.min(...e.map(s=>s.x)),t=Math.max(...e.map(s=>s.x)),n=Math.min(...e.map(s=>s.y)),o=Math.max(...e.map(s=>s.y));return i===t&&n===o?`${i},${n}`:`${i},${n} to ${t},${o}`}const A3="_sidebar_fxxme_1",O3="_sidebarCollapsed_fxxme_15",I3="_header_fxxme_19",P3="_headerTitle_fxxme_27",R3="_closeButton_fxxme_34",N3="_content_fxxme_54",C3="_banCard_fxxme_60",M3="_banCardHeader_fxxme_73",j3="_banIcon_fxxme_80",L3="_banTitle_fxxme_88",D3="_banType_fxxme_96",k3="_banMeta_fxxme_107",q3="_banReason_fxxme_113",B3="_redeployWarning_fxxme_122",U3="_banActions_fxxme_131",F3="_actionButton_fxxme_139",V3="_emptyState_fxxme_154",H3="_emptyStateIcon_fxxme_160",z3="_emptyStateText_fxxme_166",W3="_loadingState_fxxme_171",G3="_errorState_fxxme_177",fr={sidebar:A3,sidebarCollapsed:O3,header:I3,headerTitle:P3,closeButton:R3,content:N3,banCard:C3,banCardHeader:M3,banIcon:j3,banTitle:L3,banType:D3,banMeta:k3,banReason:q3,redeployWarning:B3,banActions:U3,actionButton:F3,emptyState:V3,emptyStateIcon:H3,emptyStateText:z3,loadingState:W3,errorState:G3};function K3(e){const i=new Date(e),t=i.getDate().toString().padStart(2,"0"),n=(i.getMonth()+1).toString().padStart(2,"0"),o=i.getFullYear();return`${t}/${n}/${o}`}function Y3(e){return e.length===0?"":e.length===1?`${e[0].x},${e[0].y}`:`${e[0].x},${e[0].y} (+${e.length-1} more)`}function X3(e){return e.groupId?"Group Ban":e.worldName?e.worldName:Y3(e.parcels)}function J3(e){return e.groupId?"Group":e.worldName?"World":"Scene"}function Q3({isOpen:e,onClose:i,onBanClick:t}){const{bans:n,isLoading:o,error:s}=df(),{unbanGroup:l,unbanScene:c,unbanWorld:f}=CE(),[p,y]=Z.useState(new Set),m=n.filter(N=>!N.worldName);Z.useEffect(()=>{if(!e)return;(async()=>{const _=new Set;for(const A of m)if(A.sceneId&&A.parcels.length>0)try{const w=await Hj(A.parcels[0]);w&&w.entityId!==A.sceneId&&_.add(A.id)}catch(w){console.error("Error checking scene redeployment:",w)}y(_)})()},[e,m]);const h=Z.useCallback(N=>{N.key==="Escape"&&i()},[i]);Z.useEffect(()=>{if(e)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,h]);const O=async(N,_)=>{_.stopPropagation();try{N.groupId?await l({id:N.groupId}):N.worldName?await f(N.worldName):N.parcels.length>0&&await c(N.parcels)}catch(A){console.error("Failed to unban:",A)}},C=N=>{t?.(N)},R=`${fr.sidebar} ${e?"":fr.sidebarCollapsed}`,I=K.jsxs("div",{className:R,children:[K.jsxs("div",{className:fr.header,children:[K.jsx("h3",{className:fr.headerTitle,children:K.jsx("span",{children:"Banned Scenes"})}),K.jsx("button",{className:fr.closeButton,onClick:i,children:"x"})]}),K.jsxs("div",{className:fr.content,children:[o&&K.jsx("div",{className:fr.loadingState,children:"Loading bans..."}),s&&K.jsx("div",{className:fr.errorState,children:s}),!o&&!s&&m.length===0&&K.jsxs("div",{className:fr.emptyState,children:[K.jsx("div",{className:fr.emptyStateIcon,children:"🛡️"}),K.jsx("p",{className:fr.emptyStateText,children:"No banned scenes"})]}),!o&&!s&&m.map(N=>K.jsxs("div",{className:fr.banCard,onClick:()=>C(N),children:[K.jsxs("div",{className:fr.banCardHeader,children:[K.jsx("div",{className:fr.banIcon}),K.jsx("h4",{className:fr.banTitle,children:X3(N)}),K.jsx("span",{className:fr.banType,children:J3(N)})]}),K.jsxs("div",{className:fr.banMeta,children:["Banned on ",K3(N.createdAt),N.createdBy&&` by ${N.createdBy.slice(0,6)}...${N.createdBy.slice(-4)}`]}),N.parcels.length>1&&K.jsxs("div",{className:fr.banMeta,children:[N.parcels.length," parcels"]}),p.has(N.id)&&K.jsx("div",{className:fr.redeployWarning,children:"Scene has been re-deployed since ban"}),N.reason&&K.jsxs("div",{className:fr.banReason,children:['"',N.reason,'"']}),K.jsx("div",{className:fr.banActions,children:K.jsx("button",{className:fr.actionButton,onClick:_=>O(N,_),children:"Unban"})})]},N.id))]})]});return Yd.createPortal(I,document.body)}const Z3="_fabContainer_13jbc_1",x3="_fab_13jbc_1",$3="_badge_13jbc_47",e4="_badgeBanned_13jbc_64",t4="_fabBanned_13jbc_69",Vo={fabContainer:Z3,fab:x3,badge:$3,badgeBanned:e4,fabBanned:t4},r4=({onGroupsClick:e,onBansClick:i,disabled:t,groupCount:n=0,banCount:o=0})=>K.jsxs("div",{className:Vo.fabContainer,children:[K.jsxs("button",{className:`${Vo.fab} ${Vo.fabBanned}`,onClick:i,disabled:t,title:"View banned scenes",children:[K.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#FF4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[K.jsx("circle",{cx:"12",cy:"12",r:"10"}),K.jsx("line",{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"})]}),o>0&&K.jsx("span",{className:`${Vo.badge} ${Vo.badgeBanned}`,children:o})]}),K.jsxs("button",{className:Vo.fab,onClick:e,disabled:t,title:"View scene groups",children:[K.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[K.jsx("polygon",{points:"12 2 2 7 12 12 22 7 12 2"}),K.jsx("polyline",{points:"2 17 12 22 22 17"}),K.jsx("polyline",{points:"2 12 12 17 22 12"})]}),n>0&&K.jsx("span",{className:Vo.badge,children:n})]})]}),n4="_sidebar_jtum2_1",i4="_header_jtum2_26",a4="_title_jtum2_34",o4="_closeButton_jtum2_41",s4="_content_jtum2_61",u4="_loading_jtum2_67",l4="_error_jtum2_68",c4="_noScene_jtum2_79",d4="_thumbnailContainer_jtum2_91",f4="_thumbnail_jtum2_91",p4="_field_jtum2_104",m4="_label_jtum2_108",h4="_value_jtum2_118",y4="_valueSmall_jtum2_123",g4="_parcelCount_jtum2_129",v4="_tags_jtum2_135",_4="_tag_jtum2_135",E4="_groupBadge_jtum2_149",b4="_footer_jtum2_171",w4="_banButton_jtum2_179",S4="_banned_jtum2_200",T4="_addToGroupSection_jtum2_211",A4="_groupSelect_jtum2_216",O4="_addToGroupButton_jtum2_242",I4="_disabledMessage_jtum2_264",P4="_removeFromGroupButton_jtum2_275",R4="_banInfo_jtum2_293",N4="_banInfoHeader_jtum2_301",C4="_redeployWarning_jtum2_318",ht={sidebar:n4,header:i4,title:a4,closeButton:o4,content:s4,loading:u4,error:l4,noScene:c4,thumbnailContainer:d4,thumbnail:f4,field:p4,label:m4,value:h4,valueSmall:y4,parcelCount:g4,tags:v4,tag:_4,groupBadge:E4,footer:b4,banButton:w4,banned:S4,addToGroupSection:T4,groupSelect:A4,addToGroupButton:O4,disabledMessage:I4,removeFromGroupButton:P4,banInfo:R4,banInfoHeader:N4,redeployWarning:C4},M4=({parcel:e,group:i,onClose:t,onBanToggle:n,checkIsBanned:o,getBanInfo:s,onSceneLoaded:l,onCreateGroup:c,onAddToGroup:f,onRemoveFromGroup:p,onViewGroup:y,existingGroups:m=[]})=>{const[h,O]=Z.useState(null),[C,R]=Z.useState(!1),[I,N]=Z.useState(null),[_,A]=Z.useState("new"),w=Z.useCallback(fe=>{fe.key==="Escape"&&t()},[t]);Z.useEffect(()=>(document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)),[w]);const v=e?`${e.x},${e.y}`:null;Z.useEffect(()=>{if(!e)return;let fe=!1;return R(!0),N(null),O(null),Hj(e).then(Pe=>{fe||(O(Pe),R(!1),Pe?.parcels&&Pe.parcels.length>0&&l?.(Pe.parcels))}).catch(Pe=>{fe||(console.error("Failed to fetch scene info:",Pe),N("Failed to load scene information"),R(!1))}),()=>{fe=!0}},[v,l]);const S=Z.useMemo(()=>{if(!h?.parcels||h.parcels.length===0)return{belongsToGroup:null,freeParcels:[],allInGroup:!1};const fe=h.parcels;let Pe=null;for(const ue of m){const Ie=new Set(ue.parcels.map(qe=>`${qe.x},${qe.y}`));if(fe.some(qe=>Ie.has(`${qe.x},${qe.y}`))){Pe=ue;break}}const Re=new Set;m.forEach(ue=>{ue.parcels.forEach(Ie=>Re.add(`${Ie.x},${Ie.y}`))});const ae=fe.filter(ue=>!Re.has(`${ue.x},${ue.y}`));return{belongsToGroup:Pe,freeParcels:ae,allInGroup:ae.length===0&&Pe!==null}},[h?.parcels,m]),M=i||S.belongsToGroup||void 0,F=h?.parcels||(e?[e]:[]),W=o?.(M,F)??!1,J=s?.(M,F),pe=Z.useMemo(()=>!J?.sceneId||!h?.entityId?!1:J.sceneId!==h.entityId,[J?.sceneId,h?.entityId]),Oe=()=>{n?.(!W,M,F)},Ae=()=>{h?.parcels&&h.parcels.length>0&&i&&p?.(h.parcels,i.id)},be=()=>{!h?.parcels||h.parcels.length===0||(_==="new"?h.parcels.length>1&&c?.(h.parcels,h.name):_&&f?.(h.parcels,_))},Le=S.belongsToGroup!==null,Me=h?.parcels&&h.parcels.length>1&&c,Be=h?.parcels&&h.parcels.length>0&&m.length>0&&f,Te=!i&&(Me||Be),ce=Le;Z.useEffect(()=>{Me?A("new"):m.length>0&&A(m[0].id)},[Me,m]);const Y=_==="new",j=Y?"Create Group":"Add to Group",B=!_||Y&&(!h?.parcels||h.parcels.length<2),q=h?.parcels||i?.parcels||(e?[e]:[]),L=!C&&!I&&!h,H=i?.name||h?.name||(L?"Empty Parcel":"Loading..."),le=i?.description||h?.description||"",ye=K.jsxs("div",{className:ht.sidebar,children:[K.jsxs("div",{className:ht.header,children:[K.jsx("h3",{className:ht.title,children:L?"Parcel Details":"Scene Details"}),K.jsx("button",{className:ht.closeButton,onClick:t,children:"×"})]}),K.jsx("div",{className:ht.content,children:C?K.jsx("div",{className:ht.loading,children:"Loading scene info..."}):I?K.jsx("div",{className:ht.error,children:I}):K.jsxs(K.Fragment,{children:[h?.thumbnail&&K.jsx("div",{className:ht.thumbnailContainer,children:K.jsx("img",{src:h.thumbnail,alt:H,className:ht.thumbnail,onError:fe=>{fe.target.style.display="none"}})}),L&&K.jsx("div",{className:ht.noScene,children:"No scene deployed"}),!L&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Name"}),K.jsx("div",{className:ht.value,children:H})]}),le&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Description"}),K.jsx("div",{className:ht.valueSmall,children:le})]}),K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Parcels"}),K.jsxs("div",{className:ht.value,children:[T3(q),q.length>1&&K.jsxs("span",{className:ht.parcelCount,children:["(",q.length," parcels)"]})]})]}),h?.owner&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Owner"}),K.jsx("div",{className:ht.valueSmall,children:h.owner})]}),h?.tags&&h.tags.length>0&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Tags"}),K.jsx("div",{className:ht.tags,children:h.tags.map(fe=>K.jsx("span",{className:ht.tag,children:fe},fe))})]}),(i||S.belongsToGroup)&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Scene Group"}),K.jsx("button",{className:ht.groupBadge,style:{backgroundColor:i?.color||S.belongsToGroup?.color},onClick:()=>{const fe=i||S.belongsToGroup;fe&&y?.(fe)},children:i?.name||S.belongsToGroup?.name})]}),h?.deployedAt&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Deployed"}),K.jsx("div",{className:ht.valueSmall,children:h.deployedAt.toLocaleDateString("en-GB")})]}),W&&J&&K.jsxs("div",{className:ht.banInfo,children:[K.jsx("div",{className:ht.banInfoHeader,children:"Ban Details"}),J.reason&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Reason"}),K.jsx("div",{className:ht.valueSmall,children:J.reason})]}),K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Banned On"}),K.jsxs("div",{className:ht.valueSmall,children:[new Date(J.createdAt).toLocaleDateString("en-GB")," at ",new Date(J.createdAt).toLocaleTimeString()]})]}),J.createdBy&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Banned By"}),K.jsx("div",{className:ht.valueSmall,children:J.createdBy})]}),pe&&K.jsx("div",{className:ht.redeployWarning,children:"Scene has been re-deployed since ban"})]})]})}),K.jsxs("div",{className:ht.footer,children:[Te&&!i&&K.jsx("div",{className:ht.addToGroupSection,children:ce?K.jsx("div",{className:ht.disabledMessage,children:"Already in a group"}):K.jsxs(K.Fragment,{children:[K.jsxs("select",{className:ht.groupSelect,value:_,onChange:fe=>A(fe.target.value),children:[Me&&K.jsx("option",{value:"new",children:"Create new group..."}),m.map(fe=>K.jsx("option",{value:fe.id,children:fe.name},fe.id))]}),K.jsx("button",{className:ht.addToGroupButton,onClick:be,disabled:B,children:j})]})}),i&&p&&K.jsx("button",{className:ht.removeFromGroupButton,onClick:Ae,children:"Remove from Group"}),K.jsx("button",{className:`${ht.banButton} ${W?ht.banned:""}`,onClick:Oe,children:W?i||S.belongsToGroup?"Unban Group":"Unban Scene":i||S.belongsToGroup?"Ban Group":"Ban Scene"})]})]});return Yd.createPortal(ye,document.body)},PC="#00D9FF",j4=.25,L4=2;function D4({parcels:e}){const{viewport:i}=Yo(),t=oi*i.zoom,n=Z.useMemo(()=>e.map(o=>{const{screenX:s,screenY:l}=pl(o.x,o.y,i);return{key:`${o.x},${o.y}`,x:s,y:l-t,width:t,height:t}}),[e,i,t]);return e.length===0?null:K.jsx("svg",{style:{position:"absolute",top:0,left:0,width:i.width,height:i.height,pointerEvents:"none",overflow:"hidden"},children:n.map(o=>K.jsx("rect",{x:o.x,y:o.y,width:o.width,height:o.height,fill:PC,fillOpacity:j4,stroke:PC,strokeWidth:L4},o.key))})}function k4({onParcelClick:e}){const{groups:i,sidebarOpen:t}=Gs(),n=cf(),o=bl(),{updateGroup:s,deleteGroup:l}=RE(),{checkGroupBanned:c,checkSceneBanned:f,getGroupBan:p,getSceneBan:y,toggleBan:m}=CE(),{bans:h}=df(),[O,C]=Z.useState("view"),[R,I]=Z.useState(null),[N,_]=Z.useState([]),[A,w]=Z.useState("list"),[v,S]=Z.useState(!1),M=Z.useCallback(ye=>i.find(fe=>fe.parcels.some(Pe=>Pe.x===ye.x&&Pe.y===ye.y))||null,[i]),F=Z.useCallback((ye,fe)=>ye?c(ye.id):fe&&fe.length>0?f(fe):!1,[c,f]),W=Z.useCallback((ye,fe)=>{if(ye)return p(ye.id);if(fe&&fe.length>0)return y(fe)},[p,y]),J=Z.useCallback(async(ye,fe,Pe)=>{try{await m(fe,Pe,ye)}catch(Re){console.error("Failed to toggle ban:",Re)}},[m]),pe=Z.useCallback(ye=>{if(O==="select")n({type:"TOGGLE_PARCEL_SELECTION",payload:ye});else{const fe=M(ye);I({type:"parcel",parcel:ye,group:fe||void 0})}e?.(ye)},[O,n,M,e]),Oe=()=>{I(null),_([]),S(!1),w("list"),n({type:"TOGGLE_SIDEBAR"})},Ae=()=>{I(null),_([]),n({type:"SET_SIDEBAR_OPEN",payload:!1}),S(!v)},be=()=>{S(!1)},Le=Z.useCallback(ye=>{if(!ye.worldName){if(ye.groupId){const fe=i.find(Pe=>Pe.id===ye.groupId);if(fe&&fe.parcels.length>0){const Pe=fe.parcels.reduce((ae,ue)=>ae+ue.x,0)/fe.parcels.length,Re=fe.parcels.reduce((ae,ue)=>ae+ue.y,0)/fe.parcels.length;o({type:"SET_CENTER",payload:{x:Pe,y:Re}}),o({type:"SET_ZOOM",payload:8})}return}if(ye.parcels.length>0){const fe=ye.parcels.reduce((Re,ae)=>Re+ae.x,0)/ye.parcels.length,Pe=ye.parcels.reduce((Re,ae)=>Re+ae.y,0)/ye.parcels.length;o({type:"SET_CENTER",payload:{x:fe,y:Pe}}),o({type:"SET_ZOOM",payload:8})}}},[i,o]),Me=()=>{I(null),_([])},Be=Z.useCallback(ye=>{_(ye)},[]),Te=Z.useCallback((ye,fe)=>{I(null),_([]),n({type:"SET_SELECTED_PARCELS",payload:ye}),C("select"),w("create"),n({type:"SET_SIDEBAR_OPEN",payload:!0})},[n]),ce=Z.useCallback(()=>{const ye=new Set;return i.forEach(fe=>{fe.parcels.forEach(Pe=>ye.add(`${Pe.x},${Pe.y}`))}),ye},[i]),Y=Z.useCallback(async(ye,fe)=>{const Pe=i.find(qe=>qe.id===fe);if(!Pe)return;const Re=ce(),ae=new Set(Pe.parcels.map(qe=>`${qe.x},${qe.y}`)),ue=ye.filter(qe=>{const Xe=`${qe.x},${qe.y}`;return!Re.has(Xe)||ae.has(Xe)});if(ue.length===0)return;const Ie=[...Pe.parcels];ue.forEach(qe=>{ae.has(`${qe.x},${qe.y}`)||Ie.push(qe)});const je=await s(fe,{parcels:Ie});R&&je&&I({...R,group:je})},[i,s,ce,R]),j=Z.useCallback(async(ye,fe)=>{const Pe=i.find(ue=>ue.id===fe);if(!Pe)return;const Re=new Set(ye.map(ue=>`${ue.x},${ue.y}`)),ae=Pe.parcels.filter(ue=>!Re.has(`${ue.x},${ue.y}`));ae.length===0?await l(fe):await s(fe,{parcels:ae}),R&&I({...R,group:void 0})},[i,s,l,R]),B=Z.useCallback(ye=>{I(null),_([]),n({type:"SET_EDITING_GROUP",payload:ye.id}),w("edit"),n({type:"SET_SIDEBAR_OPEN",payload:!0})},[n]),q=Z.useCallback(ye=>c(ye.id),[c]),L=Z.useCallback(async(ye,fe)=>{try{await m(ye,void 0,fe)}catch(Pe){console.error("Failed to toggle group ban:",Pe)}},[m]),H=O==="select",le=R!==null&&!H;return K.jsxs("div",{className:Us.mapView,children:[K.jsx(mH,{onParcelClick:pe}),K.jsx(RH,{}),H&&K.jsx(TH,{}),N.length>0&&K.jsx(D4,{parcels:N}),K.jsx(_H,{}),K.jsx(EH,{}),t&&K.jsx(w3,{onExitSelectMode:()=>{C("view"),w("list")},onEnterSelectMode:()=>C("select"),isSelectMode:H,initialMode:A,checkIsBanned:q,onBanToggle:L}),le&&K.jsx(M4,{parcel:R.parcel,group:R.group,onClose:Me,checkIsBanned:F,getBanInfo:W,onBanToggle:J,onSceneLoaded:Be,onCreateGroup:Te,onAddToGroup:Y,onRemoveFromGroup:j,onViewGroup:B,existingGroups:i}),K.jsx(Q3,{isOpen:v,onClose:be,onBanClick:Le}),K.jsx(r4,{onGroupsClick:Oe,onBansClick:Ae,groupCount:i.length,banCount:h.filter(ye=>!ye.worldName).length})]})}function q4({initialCenter:e,initialZoom:i,onParcelClick:t}){return K.jsx(xV,{initialCenter:e,initialZoom:i,children:K.jsx(aH,{children:K.jsx(k4,{onParcelClick:t})})})}function B4(){const e=i=>{console.log("Clicked parcel:",i.x,i.y)};return K.jsx(q4,{onParcelClick:e})}const U4=fl.get("MOBILE_BFF_URL");async function RC(e){const i=e.trim().toLowerCase(),n=await(await fetch(`${U4}/worlds/${encodeURIComponent(i)}`)).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to fetch world info");return n.data}const F4="_sidebar_q9ld5_1",V4="_header_q9ld5_26",H4="_title_q9ld5_34",z4="_closeButton_q9ld5_41",W4="_content_q9ld5_61",G4="_thumbnailContainer_q9ld5_67",K4="_thumbnail_q9ld5_67",Y4="_field_q9ld5_80",X4="_label_q9ld5_84",J4="_value_q9ld5_94",Q4="_valueSmall_q9ld5_99",Z4="_tags_q9ld5_106",x4="_tag_q9ld5_106",$4="_statusActive_q9ld5_120",ez="_statusBanned_q9ld5_132",tz="_redeployWarning_q9ld5_144",rz="_redeployWarningHeader_q9ld5_152",nz="_redeployWarningText_q9ld5_161",iz="_banInfo_q9ld5_167",az="_banInfoHeader_q9ld5_175",oz="_footer_q9ld5_192",sz="_banButton_q9ld5_200",uz="_banned_q9ld5_226",wt={sidebar:F4,header:V4,title:H4,closeButton:z4,content:W4,thumbnailContainer:G4,thumbnail:K4,field:Y4,label:X4,value:J4,valueSmall:Q4,tags:Z4,tag:x4,statusActive:$4,statusBanned:ez,redeployWarning:tz,redeployWarningHeader:rz,redeployWarningText:nz,banInfo:iz,banInfoHeader:az,footer:oz,banButton:sz,banned:uz},lz=({world:e,ban:i,onClose:t,onBanToggle:n,isBanning:o=!1})=>{const s=Z.useCallback(p=>{p.key==="Escape"&&t()},[t]);Z.useEffect(()=>(document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)),[s]);const l=()=>{n?.(!e.isBanned)},c=e.isBanned&&e.banSceneId&&e.sceneId&&e.banSceneId!==e.sceneId,f=K.jsxs("div",{className:wt.sidebar,children:[K.jsxs("div",{className:wt.header,children:[K.jsx("h3",{className:wt.title,children:"World Details"}),K.jsx("button",{className:wt.closeButton,onClick:t,children:"×"})]}),K.jsxs("div",{className:wt.content,children:[e.thumbnail&&K.jsx("div",{className:wt.thumbnailContainer,children:K.jsx("img",{src:e.thumbnail,alt:e.title,className:wt.thumbnail,onError:p=>{p.target.style.display="none"}})}),K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Name"}),K.jsx("div",{className:wt.value,children:e.title})]}),K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"World Address"}),K.jsx("div",{className:wt.valueSmall,children:e.name})]}),e.description&&K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Description"}),K.jsx("div",{className:wt.valueSmall,children:e.description})]}),e.owner&&K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Owner"}),K.jsx("div",{className:wt.valueSmall,children:e.owner})]}),e.tags&&e.tags.length>0&&K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Tags"}),K.jsx("div",{className:wt.tags,children:e.tags.map(p=>K.jsx("span",{className:wt.tag,children:p},p))})]}),K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Status"}),K.jsx("div",{className:e.isBanned?wt.statusBanned:wt.statusActive,children:e.isBanned?"BANNED":"ACTIVE"})]}),c&&K.jsxs("div",{className:wt.redeployWarning,children:[K.jsx("div",{className:wt.redeployWarningHeader,children:"Redeploy Detected"}),K.jsx("div",{className:wt.redeployWarningText,children:"This world has been redeployed since it was banned. The content may have changed."})]}),e.isBanned&&i&&K.jsxs("div",{className:wt.banInfo,children:[K.jsx("div",{className:wt.banInfoHeader,children:"Ban Details"}),i.reason&&K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Reason"}),K.jsx("div",{className:wt.valueSmall,children:i.reason})]}),K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Banned On"}),K.jsxs("div",{className:wt.valueSmall,children:[new Date(i.createdAt).toLocaleDateString("en-GB")," at ",new Date(i.createdAt).toLocaleTimeString()]})]}),i.createdBy&&K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Banned By"}),K.jsx("div",{className:wt.valueSmall,children:i.createdBy})]})]})]}),K.jsx("div",{className:wt.footer,children:K.jsx("button",{className:`${wt.banButton} ${e.isBanned?wt.banned:""}`,onClick:l,disabled:o,children:o?e.isBanned?"Unbanning...":"Banning...":e.isBanned?"Unban World":"Ban World"})})]});return Yd.createPortal(f,document.body)},cz=()=>{const[e,i]=Z.useState(""),[t,n]=Z.useState(null),[o,s]=Z.useState(!1),[l,c]=Z.useState(null),[f,p]=Z.useState(!1),{banWorld:y,unbanWorld:m,checkWorldBanned:h,getWorldBan:O}=NE(),{bans:C}=df(),R=C.filter(v=>v.worldName!==null),I=async v=>{if(v.preventDefault(),!!e.trim()){s(!0),c(null);try{const S=await RC(e.trim());n({...S,isBanned:h(S.name)})}catch(S){c(S instanceof Error?S.message:"Failed to fetch world info")}finally{s(!1)}}},N=async v=>{if(t){p(!0);try{v?await y(t.name,t.sceneId):await m(t.name),n({...t,isBanned:v,banSceneId:v?t.sceneId:null})}catch(S){console.error("Failed to toggle world ban:",S)}finally{p(!1)}}},_=()=>{n(null),i(""),c(null)},A=async v=>{s(!0),c(null),i(v);try{const S=await RC(v);n({...S,isBanned:h(S.name)})}catch(S){const M=O(v);M?n({name:v,title:v,description:null,thumbnail:null,owner:null,tags:[],sceneId:"",isBanned:!0,banId:M.id,banReason:M.reason||null,banSceneId:M.sceneId}):c(S instanceof Error?S.message:"Failed to fetch world info")}finally{s(!1)}},w=t?O(t.name):void 0;return K.jsxs("div",{className:"worlds-page",children:[K.jsxs("div",{className:"worlds-container",children:[K.jsxs("div",{className:"worlds-search-section",children:[K.jsx("h2",{children:"Search World"}),K.jsxs("form",{className:"worlds-search-box",onSubmit:I,children:[K.jsx("input",{type:"text",value:e,onChange:v=>i(v.target.value),placeholder:"Enter world name (e.g., boedo or boedo.dcl.eth)",className:"worlds-search-input",disabled:o}),K.jsx("button",{type:"submit",className:"worlds-search-button",disabled:o||!e.trim(),children:o?"Searching...":"Search"})]}),l&&K.jsx("div",{className:"worlds-error",children:l})]}),K.jsxs("div",{className:"worlds-list-section",children:[K.jsxs("h3",{children:["Banned Worlds (",R.length,")"]}),R.length===0?K.jsx("p",{className:"worlds-empty-state",children:"No banned worlds yet."}):K.jsx("div",{className:"worlds-cards-grid",children:R.map(v=>K.jsxs("div",{className:"world-card",onClick:()=>A(v.worldName),children:[K.jsx("div",{className:"world-card-name",children:v.worldName}),v.reason&&K.jsx("div",{className:"world-card-reason",children:v.reason}),K.jsxs("div",{className:"world-card-date",children:["Banned: ",new Date(v.createdAt).toLocaleDateString("en-GB")]})]},v.id))})]})]}),t&&K.jsx(lz,{world:t,ban:w,onClose:_,onBanToggle:N,isBanning:f})]})},dz={defaultChainId:Number(fl.get("CHAIN_ID")),authUrl:fl.get("AUTH_URL"),basePath:"/mobile-hub"},fz=/^decentraland.(zone|org|today)$/.test(window.location.host)?"/mobile-hub":"/";function pz(){const[e,i]=Z.useState("map");return K.jsx(vk,{basename:fz,children:K.jsx(XU,{config:dz,children:K.jsxs(GV,{children:[K.jsx(KV,{tabs:K.jsx(YV,{activeView:e,onViewChange:i})}),e==="map"?K.jsx(B4,{}):K.jsx(cz,{})]})})})}ZL.createRoot(document.getElementById("root")).render(K.jsx(Z.StrictMode,{children:K.jsx(pz,{})}));export{ll as _,HL as a,Q2 as b,VL as c,DM as e,zL as g,uV as r,mz as x};
|
|
23
|
+
`),Oe=pe[1].substring(19),Ae=pe[2].substring(12),be=Date.parse(Ae);return{message:J,ephemeralAddress:Oe,expiration:be}}e.parseEmphemeralPayload=v;async function S(W,J,pe,Oe){const Ae=h.createEIP1271MessageHash(J),be=(0,s.hexToBytes)(pe);let Le;try{Le=(0,s.bytesToHex)(await W.isValidSignature(Ae,be,Oe))}catch{}if(Le===e.ERC1654_MAGIC_VALUE)return!0;const Me=(0,y.createEthereumMessageHash)(J);try{Le=(0,s.bytesToHex)(await W.isValidSignature(Me,be,Oe))}catch{}return Le===e.ERC1654_MAGIC_VALUE}e.isValidEIP1271Signature=S;async function M(W,J,pe,Oe,Ae){if(!W)throw new Error("Missing provider");const be=new s.default(W),Le=await(0,l.SignatureValidator)(be,J);let Me=await S(Le,pe,Oe);if(Me)return!0;const Be=new p.default(be);try{const{block:Te}=await Be.getDate(Ae,!1);if(Me=await S(Le,pe,Oe,Te),Me)return!0}catch(Te){throw new Error(`Invalid validation. Error: ${Te.message}`)}throw new Error(`Invalid validation. Expected: ${e.ERC1654_MAGIC_VALUE}. Actual: ${Me}`)}function F(W){switch(W){case c.AuthLinkType.SIGNER:return e.SIGNER_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_EPHEMERAL:return e.ECDSA_PERSONAL_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_PERSONAL_SIGNED_ENTITY:return e.ECDSA_SIGNED_ENTITY_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_EPHEMERAL:return e.ECDSA_EIP_1654_EPHEMERAL_VALIDATOR;case c.AuthLinkType.ECDSA_EIP_1654_SIGNED_ENTITY:return e.EIP_1654_SIGNED_ENTITY_VALIDATOR;default:return _}}})(ni)),ni}var lC;function dV(){return lC||(lC=1,(function(e){var i=Ro&&Ro.__createBinding||(Object.create?(function(n,o,s,l){l===void 0&&(l=s);var c=Object.getOwnPropertyDescriptor(o,s);(!c||("get"in c?!o.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(n,l,c)}):(function(n,o,s,l){l===void 0&&(l=s),n[l]=o[s]})),t=Ro&&Ro.__exportStar||function(n,o){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&i(o,n,s)};Object.defineProperty(e,"__esModule",{value:!0}),t(cV(),e),t(Pj(),e)})(Ro)),Ro}var M_=dV(),Mj=Cj(),fV=wE(),cC=Nj();let Nd=null;const pV="ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80";function mV(e){const i=cC.hexToBytes(e),t=fV.getPublicKey(i,!1).slice(1),n=Mj.computeAddress(t);return{privateKey:"0x"+e,publicKey:"0x"+cC.bytesToHex(t),address:n}}async function jj(){if(Nd)return Nd;const e=mV(pV),i=Mj.createUnsafeIdentity();return Nd={identity:await M_.Authenticator.initializeAuthChain(e.address,i,60,async n=>M_.Authenticator.createSignature(e,n)),address:e.address},console.log("[DEV] Using dev identity:",e.address),Nd}function Hd(){const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"}const hV="x-identity-auth-chain-",yV="x-identity-timestamp",gV="x-identity-metadata";function dC(e,i,t,n={}){const o=new URL(e).pathname,s={...t,headers:{...vV(t?.method??"get",o,{origin:location.origin,...n},l=>M_.Authenticator.signPayload(i,l)),...t?.headers}};return fetch(e,s)}function vV(e,i,t,n){const o={},s=_V(e,i,JSON.stringify(t),n);return s.authChain.forEach((l,c)=>{o[`${hV}${c}`]=JSON.stringify(l)}),o[yV]=s.timestamp.toString(),o[gV]=s.metadata,o}function _V(e,i,t,n){const o=Date.now(),l=[e.toLowerCase(),i.toLowerCase(),o.toString(),t].join(":").toLowerCase();return{authChain:n(l),metadata:t,timestamp:o}}function EV(e,i){return async function(n,o,s={}){try{if(Hd()){const{identity:l}=await jj();return dC(n,l,o||{},s)}if(i&&e){const l=A_.localStorageGetIdentity(e);if(l&&l.expiration){const c=new Date(l.expiration);if(new Date().getTime()<=c.getTime())return dC(n,l,o||{},s)}}return fetch(n,o)}catch(l){return console.warn("Error in authenticatedFetch, falling back to regular fetch:",l),fetch(n,o)}}}const Lj=()=>{const{wallet:e,isSignedIn:i}=dE();return Z.useCallback((n,o,s={})=>EV(e,i)(n,o,s),[e,i])};var v_={},Du={},__={},Fo={},fC;function bV(){if(fC)return Fo;fC=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.getEnvFromQueryParam=Fo.getEnvFromTLD=void 0;const e=SE();function i(n){const{host:o}=n;return o.endsWith(".org")||o.endsWith(".co")?e.Env.PRODUCTION:o.endsWith(".today")||o.endsWith(".net")?e.Env.STAGING:o.endsWith(".io")||o.endsWith(".zone")?e.Env.DEVELOPMENT:null}Fo.getEnvFromTLD=i;function t(n){const o=new URLSearchParams(n.search),s=o.get("ENV")||o.get("env");if(s){const l=s.toLowerCase();if((0,e.isEnv)(l))return l}return null}return Fo.getEnvFromQueryParam=t,Fo}var pC;function SE(){return pC||(pC=1,(function(e){var i={};Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=e.getDefaultEnv=e.parseEnvVar=e.isEnv=e.getEnvList=e.Env=void 0;const t=bV();var n;(function(p){p.DEVELOPMENT="dev",p.STAGING="stg",p.PRODUCTION="prod"})(n=e.Env||(e.Env={}));function o(){return Object.values(n)}e.getEnvList=o;function s(p){return o().includes(p)}e.isEnv=s;function l(p){if(s(p))return p;throw new Error(`Invalid value for DCL_DEFAULT_ENV. Found "${p}", possible values are ${o().map(y=>`"${y}"`).join(", ")}.`)}e.parseEnvVar=l;function c(p={}){const{DCL_DEFAULT_ENV:y,REACT_APP_DCL_DEFAULT_ENV:m,VITE_DCL_DEFAULT_ENV:h,GATSBY_DCL_DEFAULT_ENV:O}=p;if(y&&m&&y!==m)throw new Error("You have defined both DCL_DEFAULT_ENV and REACT_APP_DCL_DEFAULT_ENV with different values");if(y&&h&&y!==h)throw new Error("You have defined both DCL_DEFAULT_ENV and VITE_DCL_DEFAULT_ENV with different values");if(y&&O&&y!==O)throw new Error("You have defined both DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");if(m&&O&&m!==O)throw new Error("You have defined both REACT_APP_DCL_DEFAULT_ENV and GATSBY_DCL_DEFAULT_ENV with different values");return y?l(y):m?l(m):h?l(h):O?l(O):n.PRODUCTION}e.getDefaultEnv=c;function f(p){if(typeof window<"u"){const m=(0,t.getEnvFromQueryParam)(window.location);if(m)return m;const h=(0,t.getEnvFromTLD)(window.location);if(h)return h}return c(typeof p>"u"&&typeof process=="object"&&typeof i=="object"?i:p)}e.getEnv=f})(__)),__}var mC;function wV(){if(mC)return Du;mC=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.createConfig=void 0;const e=SE();function i(t,n){const o=(0,e.getEnv)(n?.systemEnvVariables),s=t[o];return{get:(l,c="")=>{if(!s)throw new Error(`Could not find a config for env=${o}`);return l in s?s[l]:c},is:l=>o===l,getEnv:()=>o}}return Du.createConfig=i,Du}var hC;function SV(){return hC||(hC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=e.Env=e.createConfig=void 0;var i=wV();Object.defineProperty(e,"createConfig",{enumerable:!0,get:function(){return i.createConfig}});var t=SE();Object.defineProperty(e,"Env",{enumerable:!0,get:function(){return t.Env}}),Object.defineProperty(e,"getEnv",{enumerable:!0,get:function(){return t.getEnv}})})(v_)),v_}var E_=SV();const TV="11155111",AV="development",OV="https://decentraland.zone/auth",IV="https://peer.decentraland.zone",PV="https://mobile-bff.decentraland.zone",RV={CHAIN_ID:TV,ENVIRONMENT:AV,AUTH_URL:OV,PEER_URL:IV,MOBILE_BFF_URL:PV},NV="1",CV="production",MV="https://decentraland.org/auth",jV="https://peer.decentraland.org",LV="https://mobile-bff.decentraland.org",DV={CHAIN_ID:NV,ENVIRONMENT:CV,AUTH_URL:MV,PEER_URL:jV,MOBILE_BFF_URL:LV},fl=E_.createConfig({[E_.Env.DEVELOPMENT]:RV,[E_.Env.PRODUCTION]:DV},{systemEnvVariables:{REACT_APP_DCL_DEFAULT_ENV:"dev"}}),El=fl.get("MOBILE_BFF_URL");function uf(e){return{id:e.id,groupId:e.groupId,worldName:e.worldName,parcels:e.parcels||[],sceneId:e.sceneId,reason:e.reason||void 0,createdAt:e.createdAt,createdBy:e.createdBy}}async function kV(e){const t=await(await e(`${El}/backoffice/bans`)).json();if(!t.ok)throw new Error(t.error||"Failed to fetch bans");return(t.data||[]).map(uf)}async function qV(e,i){const n=await(await e(`${El}/backoffice/bans`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to create group ban");return uf(n.data)}async function BV(e,i){const n=await(await e(`${El}/backoffice/bans`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to create scene ban");return uf(n.data)}async function UV(e,i){const n=await(await e(`${El}/backoffice/bans`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to create world ban");return uf(n.data)}async function b_(e,i){const n=await(await e(`${El}/backoffice/bans/${i}`,{method:"DELETE"})).json();if(!n.ok)throw new Error(n.error||"Failed to delete ban")}function FV(e,i){return e.some(t=>t.groupId===i)}function VV(e,i){if(i.length===0)return!1;const t=zd(i);return e.some(n=>n.groupId===null&&n.worldName===null&&zd(n.parcels)===t)}function HV(e,i){const t=i.trim().toLowerCase();return e.some(n=>n.worldName===t)}function yC(e,i){return e.find(t=>t.groupId===i)}function gC(e,i){if(i.length===0)return;const t=zd(i);return e.find(n=>n.groupId===null&&n.worldName===null&&zd(n.parcels)===t)}function vC(e,i){const t=i.trim().toLowerCase();return e.find(n=>n.worldName===t)}function zd(e){return e.map(i=>`${i.x},${i.y}`).sort().join("|")}function zV(e,i){switch(i.type){case"SET_BANS":return{...e,bans:i.payload,isLoading:!1,error:null};case"ADD_BAN":return{...e,bans:[...e.bans,i.payload]};case"REMOVE_BAN":return{...e,bans:e.bans.filter(t=>t.id!==i.payload)};case"SET_LOADING":return{...e,isLoading:i.payload};case"SET_ERROR":return{...e,error:i.payload,isLoading:!1};default:return e}}const WV={bans:[],isLoading:!1,error:null},Dj=Z.createContext(null);function GV({children:e}){const[i,t]=Z.useReducer(zV,WV),n=Lj(),o=Z.useCallback(async()=>{t({type:"SET_LOADING",payload:!0});try{const A=await kV(n);t({type:"SET_BANS",payload:A})}catch(A){console.error("Failed to fetch bans:",A),t({type:"SET_ERROR",payload:A instanceof Error?A.message:"Failed to fetch bans"})}},[n]);Z.useEffect(()=>{o()},[o]);const s=Z.useCallback(A=>FV(i.bans,A),[i.bans]),l=Z.useCallback(A=>VV(i.bans,A),[i.bans]),c=Z.useCallback(A=>HV(i.bans,A),[i.bans]),f=Z.useCallback(A=>yC(i.bans,A),[i.bans]),p=Z.useCallback(A=>gC(i.bans,A),[i.bans]),y=Z.useCallback(A=>vC(i.bans,A),[i.bans]),m=Z.useCallback(async(A,w)=>{try{const v=await qV(n,{groupId:A.id,reason:w});t({type:"ADD_BAN",payload:v})}catch(v){throw console.error("Failed to ban group:",v),v}},[n]),h=Z.useCallback(async A=>{const w=yC(i.bans,A.id);if(w)try{await b_(n,w.id),t({type:"REMOVE_BAN",payload:w.id})}catch(v){throw console.error("Failed to unban group:",v),v}},[n,i.bans]),O=Z.useCallback(async(A,w)=>{if(A.length!==0)try{const v=await BV(n,{parcels:A,reason:w});t({type:"ADD_BAN",payload:v})}catch(v){throw console.error("Failed to ban scene:",v),v}},[n]),C=Z.useCallback(async A=>{const w=gC(i.bans,A);if(w)try{await b_(n,w.id),t({type:"REMOVE_BAN",payload:w.id})}catch(v){throw console.error("Failed to unban scene:",v),v}},[n,i.bans]),R=Z.useCallback(async(A,w,v)=>{try{const S=await UV(n,{worldName:A,sceneId:w,reason:v});t({type:"ADD_BAN",payload:S})}catch(S){throw console.error("Failed to ban world:",S),S}},[n]),I=Z.useCallback(async A=>{const w=vC(i.bans,A);if(w)try{await b_(n,w.id),t({type:"REMOVE_BAN",payload:w.id})}catch(v){throw console.error("Failed to unban world:",v),v}},[n,i.bans]),N=Z.useCallback(async(A,w,v)=>{if(A){const S=s(A.id),M=v??!S;M&&!S?await m(A):!M&&S&&await h(A)}else if(w&&w.length>0){const S=l(w),M=v??!S;M&&!S?await O(w):!M&&S&&await C(w)}},[s,l,m,h,O,C]),_={state:i,checkGroupBanned:s,checkSceneBanned:l,checkWorldBanned:c,getGroupBan:f,getSceneBan:p,getWorldBan:y,banGroup:m,unbanGroup:h,banScene:O,unbanScene:C,banWorld:R,unbanWorld:I,toggleBan:N,refreshBans:o};return K.jsx(Dj.Provider,{value:_,children:e})}const KV=({tabs:e})=>{const{avatar:i,wallet:t,isSignedIn:n,isConnecting:o,signIn:s,signOut:l}=dE(),[c,f]=Z.useState(!1),[p,y]=Z.useState(null),m=i?.avatar?.snapshots?.face256;return Z.useEffect(()=>{Hd()&&jj().then(({address:h})=>y(h))},[]),o?K.jsxs("div",{className:"navbar-container",children:[K.jsx("div",{className:"navbar-bar",children:e}),K.jsx("div",{className:"navbar-bar",children:K.jsx("button",{className:"navbar-button",disabled:!0,children:"Connecting..."})})]}):Hd()?K.jsxs("div",{className:"navbar-container",children:[K.jsx("div",{className:"navbar-bar",children:e}),K.jsx("div",{className:"navbar-bar",children:K.jsxs("div",{className:"navbar-dev-badge",children:["DEV",p&&K.jsxs("span",{className:"navbar-dev-address",children:[p.slice(0,6),"...",p.slice(-4)]})]})})]}):n?K.jsxs("div",{className:"navbar-container",children:[K.jsx("div",{className:"navbar-bar",children:e}),K.jsxs("div",{className:"navbar-bar navbar-user-bar",children:[K.jsx("button",{className:"navbar-avatar-button",onClick:()=>f(!c),children:m?K.jsx("img",{src:m,alt:"Avatar",className:"navbar-avatar"}):K.jsx("span",{className:"navbar-avatar-placeholder",children:t?.slice(2,4).toUpperCase()})}),c&&K.jsxs(K.Fragment,{children:[K.jsx("div",{className:"navbar-backdrop",onClick:()=>f(!1)}),K.jsxs("div",{className:"navbar-menu",children:[K.jsxs("div",{className:"navbar-menu-address",children:[t?.slice(0,6),"...",t?.slice(-4)]}),K.jsx("button",{className:"navbar-menu-item",onClick:()=>{f(!1),l()},children:"Sign Out"})]})]})]})]}):K.jsxs("div",{className:"navbar-container",children:[K.jsx("div",{className:"navbar-bar",children:e}),K.jsx("div",{className:"navbar-bar",children:K.jsxs("button",{className:"navbar-button",onClick:s,children:[K.jsx("span",{className:"navbar-button-icon",children:"👤"}),"Sign In"]})})]})},YV=({activeView:e,onViewChange:i})=>K.jsxs("div",{className:"app-tabs",children:[K.jsx("button",{className:`app-tab ${e==="map"?"app-tab-active":""}`,onClick:()=>i("map"),children:"Map"}),K.jsx("button",{className:`app-tab ${e==="worlds"?"app-tab-active":""}`,onClick:()=>i("worlds"),children:"Worlds"})]}),kj=Z.createContext(null),_a=40,Ea=8,qj=-152,Bj=-167,_C=-150,EC=163,bC=-150,wC=158,oi=4,SC=.5,TC=10,TE=1,AE=0,OE=0,XV="https://media.githubusercontent.com/media/genesis-city/parcels/new-client-images/maps/lod-0/3/",JV="#1a1a1a",QV="#1a1a1a",AC={viewport:{centerX:AE,centerY:OE,zoom:TE,width:0,height:0},interaction:{isDragging:!1,dragStartX:0,dragStartY:0,hoveredParcel:null}};function Bs(e,i,t){return Math.max(i,Math.min(t,e))}function ZV(e,i){switch(i.type){case"SET_VIEWPORT_SIZE":return{...e,viewport:{...e.viewport,width:i.payload.width,height:i.payload.height}};case"PAN":{const t=Bs(e.viewport.centerX+i.payload.deltaX,_C,EC),n=Bs(e.viewport.centerY+i.payload.deltaY,bC,wC);return{...e,viewport:{...e.viewport,centerX:t,centerY:n}}}case"ZOOM":{const t=Bs(e.viewport.zoom*i.payload.factor,SC,TC);return{...e,viewport:{...e.viewport,zoom:t}}}case"SET_CENTER":return{...e,viewport:{...e.viewport,centerX:Bs(i.payload.x,_C,EC),centerY:Bs(i.payload.y,bC,wC)}};case"SET_ZOOM":return{...e,viewport:{...e.viewport,zoom:Bs(i.payload,SC,TC)}};case"START_DRAG":return{...e,interaction:{...e.interaction,isDragging:!0,dragStartX:i.payload.x,dragStartY:i.payload.y}};case"END_DRAG":return{...e,interaction:{...e.interaction,isDragging:!1}};case"UPDATE_DRAG_START":return{...e,interaction:{...e.interaction,dragStartX:i.payload.x,dragStartY:i.payload.y}};case"SET_HOVERED_PARCEL":return{...e,interaction:{...e.interaction,hoveredParcel:i.payload}};case"RESET_VIEW":return{...e,viewport:{...e.viewport,centerX:AE,centerY:OE,zoom:TE}};default:return e}}function xV({children:e,initialCenter:i,initialZoom:t}){const n={...AC,viewport:{...AC.viewport,centerX:i?.x??AE,centerY:i?.y??OE,zoom:t??TE}},[o,s]=Z.useReducer(ZV,n);return K.jsx(kj.Provider,{value:{state:o,dispatch:s},children:e})}const Uj=Z.createContext(null),lf=fl.get("MOBILE_BFF_URL");function IE(e){return{id:e.id,name:e.name,description:e.description||"",color:e.color,tags:e.tags||[],parcels:e.parcels||[],createdAt:new Date(e.createdAt).getTime(),updatedAt:new Date(e.updatedAt).getTime()}}async function $V(e){const t=await(await e(`${lf}/backoffice/scene-groups`)).json();if(!t.ok)throw new Error(t.error||"Failed to fetch scene groups");return(t.data||[]).map(IE)}async function eH(e,i){const n=await(await e(`${lf}/backoffice/scene-groups`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to create scene group");return IE(n.data)}async function tH(e,i,t){const o=await(await e(`${lf}/backoffice/scene-groups/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json();if(!o.ok||!o.data)throw new Error(o.error||"Failed to update scene group");return IE(o.data)}async function rH(e,i){const n=await(await e(`${lf}/backoffice/scene-groups/${i}`,{method:"DELETE"})).json();if(!n.ok)throw new Error(n.error||"Failed to delete scene group")}const nH={mode:"view",groups:[],selectedParcels:[],selectionColor:null,editingGroupId:null,sidebarOpen:!1,isLoading:!1,error:null};function OC(e,i){return e.x===i.x&&e.y===i.y}function iH(e,i){switch(i.type){case"SET_MODE":return{...e,mode:i.payload,sidebarOpen:i.payload==="groups"?!0:e.sidebarOpen,selectedParcels:i.payload==="groups"?e.selectedParcels:[],selectionColor:i.payload==="groups"?e.selectionColor:null,editingGroupId:i.payload==="groups"?e.editingGroupId:null};case"ADD_GROUP":return{...e,groups:[...e.groups,i.payload],selectedParcels:[],selectionColor:null,isLoading:!1,error:null};case"UPDATE_GROUP":return{...e,groups:e.groups.map(t=>t.id===i.payload.id?i.payload:t),editingGroupId:null,isLoading:!1,error:null};case"DELETE_GROUP":return{...e,groups:e.groups.filter(t=>t.id!==i.payload),editingGroupId:e.editingGroupId===i.payload?null:e.editingGroupId,isLoading:!1,error:null};case"SET_SELECTED_PARCELS":return{...e,selectedParcels:i.payload};case"TOGGLE_PARCEL_SELECTION":{const t=i.payload,n=e.selectedParcels.some(o=>OC(o,t));return{...e,selectedParcels:n?e.selectedParcels.filter(o=>!OC(o,t)):[...e.selectedParcels,t]}}case"CLEAR_SELECTION":return{...e,selectedParcels:[],selectionColor:null};case"SET_EDITING_GROUP":return{...e,editingGroupId:i.payload,sidebarOpen:i.payload!==null?!0:e.sidebarOpen};case"TOGGLE_SIDEBAR":return{...e,sidebarOpen:!e.sidebarOpen};case"SET_SIDEBAR_OPEN":return{...e,sidebarOpen:i.payload};case"SET_SELECTION_COLOR":return{...e,selectionColor:i.payload};case"LOAD_GROUPS":return{...e,groups:i.payload,isLoading:!1,error:null};case"SET_LOADING":return{...e,isLoading:i.payload};case"SET_ERROR":return{...e,error:i.payload,isLoading:!1};default:return e}}function aH({children:e}){const[i,t]=Z.useReducer(iH,nH),n=Lj(),{isSignedIn:o}=dE();Z.useEffect(()=>{if(!(o||Hd())){t({type:"LOAD_GROUPS",payload:[]});return}(async()=>{t({type:"SET_LOADING",payload:!0});try{const y=await $V(n);t({type:"LOAD_GROUPS",payload:y})}catch(y){console.error("Failed to load groups:",y),t({type:"SET_ERROR",payload:y instanceof Error?y.message:"Failed to load groups"})}})()},[o,n]);const s=Z.useCallback(async f=>{t({type:"SET_LOADING",payload:!0});try{const p=await eH(n,f);return t({type:"ADD_GROUP",payload:p}),t({type:"CLEAR_SELECTION"}),p}catch(p){return console.error("Failed to create group:",p),t({type:"SET_ERROR",payload:p instanceof Error?p.message:"Failed to create group"}),null}},[n]),l=Z.useCallback(async(f,p)=>{t({type:"SET_LOADING",payload:!0});try{const y=await tH(n,f,p);return t({type:"UPDATE_GROUP",payload:y}),y}catch(y){return console.error("Failed to update group:",y),t({type:"SET_ERROR",payload:y instanceof Error?y.message:"Failed to update group"}),null}},[n]),c=Z.useCallback(async f=>{t({type:"SET_LOADING",payload:!0});try{return await rH(n,f),t({type:"DELETE_GROUP",payload:f}),!0}catch(p){return console.error("Failed to delete group:",p),t({type:"SET_ERROR",payload:p instanceof Error?p.message:"Failed to delete group"}),!1}},[n]);return K.jsx(Uj.Provider,{value:{state:i,dispatch:t,createGroup:s,updateGroup:l,deleteGroup:c},children:e})}function PE(){const e=Z.useContext(Uj);if(!e)throw new Error("useGroupsContext must be used within a GroupsProvider");return e}function Gs(){return PE().state}function cf(){return PE().dispatch}function RE(){const{createGroup:e,updateGroup:i,deleteGroup:t}=PE();return{createGroup:e,updateGroup:i,deleteGroup:t}}function Fj(){const e=Z.useContext(kj);if(!e)throw new Error("useMapContext must be used within a MapProvider");return e}function Yo(){return Fj().state}function bl(){return Fj().dispatch}function NE(){const e=Z.useContext(Dj);if(!e)throw new Error("useBans must be used within a BansProvider");return e}function df(){const{state:e}=NE();return e}function CE(){const{checkGroupBanned:e,checkSceneBanned:i,checkWorldBanned:t,getGroupBan:n,getSceneBan:o,getWorldBan:s,banGroup:l,unbanGroup:c,banScene:f,unbanScene:p,banWorld:y,unbanWorld:m,toggleBan:h,refreshBans:O}=NE();return{checkGroupBanned:e,checkSceneBanned:i,checkWorldBanned:t,getGroupBan:n,getSceneBan:o,getWorldBan:s,banGroup:l,unbanGroup:c,banScene:f,unbanScene:p,banWorld:y,unbanWorld:m,toggleBan:h,refreshBans:O}}function oH(e){const i=bl(),t=Z.useRef(null),n=Z.useCallback(()=>{if(e.current){const{width:o,height:s}=e.current.getBoundingClientRect();i({type:"SET_VIEWPORT_SIZE",payload:{width:o,height:s}})}},[e,i]);return Z.useEffect(()=>{const o=e.current;if(o)return n(),t.current=new ResizeObserver(()=>{n()}),t.current.observe(o),()=>{t.current?.disconnect()}},[e,n]),{updateSize:n}}function IC(e,i){const t=e-qj,n=i-Bj,o=Math.floor(t/_a),s=Math.floor(n/_a);return{x:Math.max(0,Math.min(Ea-1,o)),y:Math.max(0,Math.min(Ea-1,s))}}function Cd(e,i,t){const{centerX:n,centerY:o,zoom:s,width:l,height:c}=t,f=oi*s,p=e-l/2,y=i-c/2,m=p/f,h=-y/f;return{x:Math.floor(n+m),y:Math.floor(o+h)}}function pl(e,i,t){const{centerX:n,centerY:o,zoom:s,width:l,height:c}=t,f=oi*s,p=l/2+(e-n)*f,y=c/2-(i-o)*f;return{screenX:p,screenY:y}}function sH(e){const{centerX:i,centerY:t,zoom:n,width:o,height:s}=e,l=oi*n,c=o/2/l+_a,f=s/2/l+_a,p=i-c,y=i+c,m=t-f,h=t+f,O=IC(p,m),C=IC(y,h),R=[];for(let I=O.x;I<=C.x;I++)for(let N=O.y;N<=C.y;N++)I>=0&&I<Ea&&N>=0&&N<Ea&&R.push({x:I,y:N});return R}function uH(e,i){return`${XV}${e}%2C${i}.jpg`}function lH(e,i,t){const n=oi*t.zoom,o=_a*n,s=qj+e*_a,l=Bj+i*_a,c=t.width/2+(s-t.centerX)*n,f=t.height/2-(l+_a-t.centerY)*n;return{x:c,y:f,width:o,height:o}}function Md(e,i){return`${e},${i}`}class cH{cache=new Map;loading=new Map;maxCacheSize;onTileLoaded;constructor(i=100,t){this.maxCacheSize=i,this.onTileLoaded=t}setOnTileLoaded(i){this.onTileLoaded=i}getCached(i,t){const n=Md(i,t),o=this.cache.get(n);return o?(o.lastAccessed=Date.now(),o.image):null}isLoading(i,t){const n=Md(i,t);return this.loading.has(n)}async loadTile(i,t){const n=Md(i,t),o=this.cache.get(n);if(o)return o.lastAccessed=Date.now(),o.image;const s=this.loading.get(n);if(s)return s;const l=new Promise((c,f)=>{const p=new Image;p.crossOrigin="anonymous",p.onload=()=>{this.cache.set(n,{image:p,lastAccessed:Date.now()}),this.loading.delete(n),this.evictIfNeeded(),this.onTileLoaded?.(),c(p)},p.onerror=y=>{this.loading.delete(n),f(y)},p.src=uH(i,t)});return this.loading.set(n,l),l}preloadTiles(i){for(const t of i){const n=Md(t.x,t.y);!this.cache.has(n)&&!this.loading.has(n)&&this.loadTile(t.x,t.y).catch(()=>{})}}evictIfNeeded(){if(this.cache.size<=this.maxCacheSize)return;const t=Array.from(this.cache.entries()).sort((n,o)=>n[1].lastAccessed-o[1].lastAccessed).slice(0,this.cache.size-this.maxCacheSize);for(const[n]of t)this.cache.delete(n)}clear(){this.cache.clear(),this.loading.clear()}getStats(){return{cached:this.cache.size,loading:this.loading.size}}}let w_=null;function dH(e){return w_||(w_=new cH(100,e)),w_}function fH(){const{viewport:e}=Yo(),[i,t]=Z.useState(0),n=Z.useRef(dH());Z.useEffect(()=>{n.current.setOnTileLoaded(()=>{t(c=>c+1)})},[]);const o=sH(e);Z.useEffect(()=>{for(const c of o){const f=Ea-1-c.y;n.current.getCached(c.x,f)||n.current.loadTile(c.x,f).catch(()=>{})}},[o]);const s=Z.useCallback((c,f)=>n.current.getCached(c,f),[i]),l=Z.useCallback(c=>{n.current.preloadTiles(c)},[]);return{visibleTiles:o,getTile:s,preloadAdjacentTiles:l,renderTrigger:i}}function pH({canvasRef:e,onParcelClick:i}){const{viewport:t,interaction:n}=Yo(),o=bl(),s=Z.useRef(null),l=Z.useRef(null),c=Z.useCallback(R=>{R.preventDefault(),s.current={x:R.clientX,y:R.clientY},o({type:"START_DRAG",payload:{x:R.clientX,y:R.clientY}})},[o]),f=Z.useCallback(R=>{const I=e.current;if(!I)return;const N=I.getBoundingClientRect(),_=R.clientX-N.left,A=R.clientY-N.top,w=Cd(_,A,t);if(o({type:"SET_HOVERED_PARCEL",payload:w}),n.isDragging){const v=R.clientX-n.dragStartX,S=R.clientY-n.dragStartY,M=oi*t.zoom,F=-v/M,W=S/M;o({type:"PAN",payload:{deltaX:F,deltaY:W}}),o({type:"UPDATE_DRAG_START",payload:{x:R.clientX,y:R.clientY}})}},[e,t,n,o]),p=Z.useCallback(R=>{if(s.current){const I=Math.abs(R.clientX-s.current.x),N=Math.abs(R.clientY-s.current.y);if(I<5&&N<5&&i){const _=e.current;if(_){const A=_.getBoundingClientRect(),w=R.clientX-A.left,v=R.clientY-A.top,S=Cd(w,v,t);i(S)}}}s.current=null,o({type:"END_DRAG"})},[e,t,i,o]),y=Z.useCallback(()=>{o({type:"SET_HOVERED_PARCEL",payload:null}),o({type:"END_DRAG"}),s.current=null},[o]),m=Z.useCallback(R=>{R.preventDefault();const I=e.current;if(!I)return;const N=I.getBoundingClientRect(),_=R.clientX-N.left,A=R.clientY-N.top,w=Cd(_,A,t),v=R.deltaY>0?.97:1.03,S=Math.max(.5,Math.min(10,t.zoom*v)),M=oi*S,F=w.x-(_-t.width/2)/M,W=w.y+(A-t.height/2)/M;o({type:"SET_ZOOM",payload:S}),o({type:"SET_CENTER",payload:{x:F,y:W}})},[e,t,o]),h=Z.useCallback(R=>{if(R.preventDefault(),R.touches.length===1){const I=R.touches[0];s.current={x:I.clientX,y:I.clientY},o({type:"START_DRAG",payload:{x:I.clientX,y:I.clientY}})}else if(R.touches.length===2){const I=R.touches[0].clientX-R.touches[1].clientX,N=R.touches[0].clientY-R.touches[1].clientY;l.current=Math.sqrt(I*I+N*N)}},[o]),O=Z.useCallback(R=>{if(R.preventDefault(),R.touches.length===1&&n.isDragging){const I=R.touches[0],N=I.clientX-n.dragStartX,_=I.clientY-n.dragStartY,A=oi*t.zoom,w=-N/A,v=_/A;o({type:"PAN",payload:{deltaX:w,deltaY:v}}),o({type:"UPDATE_DRAG_START",payload:{x:I.clientX,y:I.clientY}})}else if(R.touches.length===2&&l.current!==null){const I=R.touches[0].clientX-R.touches[1].clientX,N=R.touches[0].clientY-R.touches[1].clientY,_=Math.sqrt(I*I+N*N),A=_/l.current;o({type:"ZOOM",payload:{factor:A}}),l.current=_}},[n,t.zoom,o]),C=Z.useCallback(R=>{if(R.touches.length===0){if(s.current&&i){const I=e.current;if(I){const N=I.getBoundingClientRect(),_=s.current.x-N.left,A=s.current.y-N.top,w=Cd(_,A,t);i(w)}}s.current=null,l.current=null,o({type:"END_DRAG"})}else if(R.touches.length===1){l.current=null;const I=R.touches[0];o({type:"UPDATE_DRAG_START",payload:{x:I.clientX,y:I.clientY}})}},[e,t,i,o]);return Z.useEffect(()=>{const R=e.current;if(R)return R.addEventListener("mousedown",c),R.addEventListener("mousemove",f),R.addEventListener("mouseup",p),R.addEventListener("mouseleave",y),R.addEventListener("wheel",m,{passive:!1}),R.addEventListener("touchstart",h,{passive:!1}),R.addEventListener("touchmove",O,{passive:!1}),R.addEventListener("touchend",C),()=>{R.removeEventListener("mousedown",c),R.removeEventListener("mousemove",f),R.removeEventListener("mouseup",p),R.removeEventListener("mouseleave",y),R.removeEventListener("wheel",m),R.removeEventListener("touchstart",h),R.removeEventListener("touchmove",O),R.removeEventListener("touchend",C)}},[e,c,f,p,y,m,h,O,C]),{isDragging:n.isDragging,hoveredParcel:n.hoveredParcel}}function mH({onParcelClick:e}){const i=Z.useRef(null),t=Z.useRef(null),n=Z.useRef(null),{viewport:o,interaction:s}=Yo(),{getTile:l,renderTrigger:c}=fH();oH(t);const{isDragging:f}=pH({canvasRef:i,onParcelClick:e}),p=Z.useCallback(()=>{const m=i.current;if(!m)return;const h=m.getContext("2d");if(!h)return;const O=window.devicePixelRatio||1,{width:C,height:R}=o;(m.width!==C*O||m.height!==R*O)&&(m.width=C*O,m.height=R*O,m.style.width=`${C}px`,m.style.height=`${R}px`,h.scale(O,O)),h.fillStyle=QV,h.fillRect(0,0,C,R);for(let I=0;I<Ea;I++)for(let N=0;N<Ea;N++){const _=lH(I,N,o);if(_.x+_.width<0||_.x>C||_.y+_.height<0||_.y>R)continue;const A=Ea-1-N,w=l(I,A);w?h.drawImage(w,_.x,_.y,_.width,_.height):(h.fillStyle=JV,h.fillRect(_.x,_.y,_.width,_.height))}if(s.hoveredParcel){const{hoveredParcel:I}=s,N=oi*o.zoom,{screenX:_,screenY:A}=pl(I.x,I.y,o),w=_,v=A-N,S=N,M=Math.max(4,S*.25),F=Math.max(1,S*.08);h.strokeStyle="white",h.lineWidth=F,h.lineCap="square",h.beginPath(),h.moveTo(w,v+M),h.lineTo(w,v),h.lineTo(w+M,v),h.stroke(),h.beginPath(),h.moveTo(w+S-M,v),h.lineTo(w+S,v),h.lineTo(w+S,v+M),h.stroke(),h.beginPath(),h.moveTo(w,v+S-M),h.lineTo(w,v+S),h.lineTo(w+M,v+S),h.stroke(),h.beginPath(),h.moveTo(w+S-M,v+S),h.lineTo(w+S,v+S),h.lineTo(w+S,v+S-M),h.stroke()}},[o,l,s]);Z.useEffect(()=>{const m=()=>{p(),n.current=requestAnimationFrame(m)};return n.current=requestAnimationFrame(m),()=>{n.current!==null&&cancelAnimationFrame(n.current)}},[p,c]);const y=f?"grabbing":"grab";return K.jsx("div",{ref:t,style:{position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"hidden"},children:K.jsx("canvas",{ref:i,style:{display:"block",cursor:y,touchAction:"none"}})})}const hH="_mapView_ojr5v_1",yH="_controls_ojr5v_11",gH="_controlButton_ojr5v_21",vH="_coordinateDisplay_ojr5v_45",Us={mapView:hH,controls:yH,controlButton:gH,coordinateDisplay:vH};function _H(){const e=bl(),i=()=>{e({type:"ZOOM",payload:{factor:1.5}})},t=()=>{e({type:"ZOOM",payload:{factor:.67}})},n=()=>{e({type:"RESET_VIEW"})};return K.jsxs("div",{className:Us.controls,children:[K.jsx("button",{className:Us.controlButton,onClick:i,title:"Zoom In","aria-label":"Zoom In",children:"+"}),K.jsx("button",{className:Us.controlButton,onClick:t,title:"Zoom Out","aria-label":"Zoom Out",children:"-"}),K.jsx("button",{className:Us.controlButton,onClick:n,title:"Reset View","aria-label":"Reset View",children:"⌂"})]})}function EH(){const{interaction:e}=Yo(),{hoveredParcel:i}=e;return i?K.jsxs("div",{className:Us.coordinateDisplay,children:[i.x,", ",i.y]}):null}const bH="#00D9FF",wH=.3,SH=2;function TH(){const{viewport:e}=Yo(),{selectedParcels:i,selectionColor:t}=Gs(),n=t||bH,o=oi*e.zoom,s=Z.useMemo(()=>i.map(l=>{const{screenX:c,screenY:f}=pl(l.x,l.y,e);return{key:`${l.x},${l.y}`,x:c,y:f-o,width:o,height:o}}),[i,e,o]);return i.length===0?null:K.jsx("svg",{style:{position:"absolute",top:0,left:0,width:e.width,height:e.height,pointerEvents:"none",overflow:"hidden"},children:s.map(l=>K.jsx("rect",{x:l.x,y:l.y,width:l.width,height:l.height,fill:n,fillOpacity:wH,stroke:n,strokeWidth:SH,strokeDasharray:"4 2"},l.key))})}const AH=.2,OH=1.5,IH=2,S_="#FF4444",PH=2.5;function RH(){const{viewport:e}=Yo(),{groups:i,editingGroupId:t}=Gs(),{checkGroupBanned:n}=CE(),{bans:o}=df(),s=oi*e.zoom,l=Z.useMemo(()=>o.filter(f=>f.groupId===null&&f.worldName===null&&f.parcels.length>0),[o]),c=Z.useMemo(()=>{const f=[];return i.forEach(p=>{const y=p.id===t,m=n(p.id);p.parcels.forEach(h=>{const{screenX:O,screenY:C}=pl(h.x,h.y,e);f.push({key:`group-${p.id}-${h.x},${h.y}`,x:O,y:C-s,width:s,height:s,color:p.color,isEditing:y,isBanned:m})})}),l.forEach(p=>{p.parcels.forEach(y=>{const{screenX:m,screenY:h}=pl(y.x,y.y,e);f.push({key:`ban-${p.id}-${y.x},${y.y}`,x:m,y:h-s,width:s,height:s,color:S_,isEditing:!1,isBanned:!0})})}),f},[i,t,e,s,n,l]);return c.length===0?null:K.jsx("svg",{style:{position:"absolute",top:0,left:0,width:e.width,height:e.height,pointerEvents:"none",overflow:"hidden"},children:c.map(f=>K.jsx("rect",{x:f.x,y:f.y,width:f.width,height:f.height,fill:f.isBanned?S_:f.color,fillOpacity:AH,stroke:f.isBanned?S_:f.color,strokeWidth:f.isBanned?PH:f.isEditing?IH:OH,strokeDasharray:f.isEditing?"6 3":void 0},f.key))})}const NH="_sidebar_1noj2_1",CH="_sidebarCollapsed_1noj2_15",MH="_header_1noj2_42",jH="_headerTitle_1noj2_50",LH="_closeButton_1noj2_57",DH="_content_1noj2_77",kH="_footer_1noj2_83",qH="_button_1noj2_90",BH="_buttonPrimary_1noj2_101",UH="_buttonSecondary_1noj2_115",FH="_groupCard_1noj2_134",VH="_groupCardHeader_1noj2_147",HH="_groupColorDot_1noj2_154",zH="_groupName_1noj2_161",WH="_groupMeta_1noj2_169",GH="_groupTags_1noj2_175",KH="_tag_1noj2_181",YH="_groupActions_1noj2_189",XH="_actionButton_1noj2_197",JH="_actionButtonBan_1noj2_211",QH="_actionButtonUnban_1noj2_220",ZH="_groupCardBanned_1noj2_230",xH="_bannedBadge_1noj2_239",$H="_form_1noj2_252",e3="_formGroup_1noj2_258",t3="_label_1noj2_264",r3="_input_1noj2_270",n3="_textarea_1noj2_284",i3="_colorPicker_1noj2_289",a3="_colorOption_1noj2_295",o3="_colorOptionSelected_1noj2_308",s3="_colorOptionDisabled_1noj2_312",u3="_tagsInput_1noj2_321",l3="_tagInForm_1noj2_332",c3="_tagRemove_1noj2_343",d3="_tagInput_1noj2_353",f3="_emptyState_1noj2_367",p3="_emptyStateIcon_1noj2_373",m3="_emptyStateText_1noj2_379",h3="_selectionInfo_1noj2_385",y3="_selectionInfoText_1noj2_393",g3="_errorMessage_1noj2_400",et={sidebar:NH,sidebarCollapsed:CH,header:MH,headerTitle:jH,closeButton:LH,content:DH,footer:kH,button:qH,buttonPrimary:BH,buttonSecondary:UH,groupCard:FH,groupCardHeader:VH,groupColorDot:HH,groupName:zH,groupMeta:WH,groupTags:GH,tag:KH,groupActions:YH,actionButton:XH,actionButtonBan:JH,actionButtonUnban:QH,groupCardBanned:ZH,bannedBadge:xH,form:$H,formGroup:e3,label:t3,input:r3,textarea:n3,colorPicker:i3,colorOption:a3,colorOptionSelected:o3,colorOptionDisabled:s3,tagsInput:u3,tagInForm:l3,tagRemove:c3,tagInput:d3,emptyState:f3,emptyStateIcon:p3,emptyStateText:m3,selectionInfo:h3,selectionInfoText:y3,errorMessage:g3};function v3({group:e,onEdit:i,onDelete:t,onClick:n,isBanned:o=!1,onBanToggle:s}){const l=p=>{p.stopPropagation(),i(e)},c=p=>{p.stopPropagation(),confirm(`Delete group "${e.name}"?`)&&t(e.id)},f=p=>{p.stopPropagation(),s?.(e,!o)};return K.jsxs("div",{className:`${et.groupCard} ${o?et.groupCardBanned:""}`,onClick:()=>n(e),children:[K.jsxs("div",{className:et.groupCardHeader,children:[K.jsx("div",{className:et.groupColorDot,style:{backgroundColor:e.color}}),K.jsxs("h4",{className:et.groupName,children:[e.name,o&&K.jsx("span",{className:et.bannedBadge,children:"Banned"})]})]}),K.jsxs("p",{className:et.groupMeta,children:[e.parcels.length," parcel",e.parcels.length!==1?"s":"",e.description&&` • ${e.description}`]}),e.tags.length>0&&K.jsx("div",{className:et.groupTags,children:e.tags.map(p=>K.jsx("span",{className:et.tag,children:p},p))}),K.jsxs("div",{className:et.groupActions,children:[K.jsx("button",{className:et.actionButton,onClick:l,children:"Edit"}),K.jsx("button",{className:`${et.actionButton} ${o?et.actionButtonUnban:et.actionButtonBan}`,onClick:f,children:o?"Unban":"Ban"}),K.jsx("button",{className:et.actionButton,onClick:c,children:"Delete"})]})]})}function _3({onEditGroup:e,checkIsBanned:i,onBanToggle:t}){const{groups:n,isLoading:o,error:s}=Gs(),l=cf(),c=bl(),{deleteGroup:f}=RE(),p=async m=>{await f(m)},y=m=>{if(l({type:"SET_EDITING_GROUP",payload:m.id}),m.parcels.length>0){const h=m.parcels.map(w=>w.x),O=m.parcels.map(w=>w.y),C=Math.min(...h),R=Math.max(...h),I=Math.min(...O),N=Math.max(...O),_=(C+R)/2,A=(I+N)/2;c({type:"SET_CENTER",payload:{x:_,y:A}}),c({type:"SET_ZOOM",payload:4})}};return o&&n.length===0?K.jsx("div",{className:et.emptyState,children:K.jsx("p",{className:et.emptyStateText,children:"Loading groups..."})}):s&&n.length===0?K.jsx("div",{className:et.emptyState,children:K.jsx("p",{className:et.emptyStateText,style:{color:"#ff6b6b"},children:s})}):n.length===0?K.jsxs("div",{className:et.emptyState,children:[K.jsx("div",{className:et.emptyStateIcon,children:"□"}),K.jsx("p",{className:et.emptyStateText,children:"No groups yet. Click parcels on the map to select them, then create a group."})]}):K.jsx("div",{children:n.map(m=>K.jsx(v3,{group:m,onEdit:e,onDelete:p,onClick:y,isBanned:i?.(m)??!1,onBanToggle:t},m.id))})}const ol=["#FF6B6B","#4ECDC4","#45B7D1","#96CEB4","#FFEAA7","#DDA0DD","#98D8C8","#F7DC6F","#BB8FCE","#85C1E9"];function E3(e){const i=new Set(e.map(n=>n.color));return ol.find(n=>!i.has(n))||ol[e.length%ol.length]}function b3({editingGroup:e,selectedParcels:i,onCancel:t,onSave:n}){const{groups:o,error:s}=Gs(),l=cf(),{createGroup:c,updateGroup:f}=RE(),[p,y]=Z.useState(!1),m="#00D9FF",h=Z.useMemo(()=>{const be=new Set(o.filter(Le=>Le.id!==e?.id).map(Le=>Le.color));return be.add(m),be},[o,e?.id]),O=Z.useCallback(()=>e?.color?e.color:ol.find(Le=>!h.has(Le))||E3(o),[e?.color,h,o]),[C,R]=Z.useState(e?.name||""),[I,N]=Z.useState(e?.description||""),[_,A]=Z.useState(O),[w,v]=Z.useState(e?.tags||[]),[S,M]=Z.useState(""),F=Z.useMemo(()=>{if(!e)return i;const be=new Set(e.parcels.map(Me=>`${Me.x},${Me.y}`)),Le=i.filter(Me=>!be.has(`${Me.x},${Me.y}`));return[...e.parcels,...Le]},[e,i]),W=!!e;Z.useEffect(()=>{l({type:"SET_SELECTION_COLOR",payload:_})},[_,l]),Z.useEffect(()=>(l({type:"SET_SELECTION_COLOR",payload:_}),()=>{l({type:"SET_SELECTION_COLOR",payload:null})}),[]);const J=async be=>{if(be.preventDefault(),!(!C.trim()||F.length===0||p)){y(!0);try{W&&e?await f(e.id,{name:C.trim(),description:I.trim(),color:_,tags:w,parcels:[...F]})&&n():await c({name:C.trim(),description:I.trim(),color:_,tags:w,parcels:[...F]})&&n()}finally{y(!1)}}},pe=Z.useCallback(()=>{const be=S.trim().toLowerCase();be&&!w.includes(be)&&v([...w,be]),M("")},[S,w]),Oe=be=>{be.key==="Enter"?(be.preventDefault(),pe()):be.key==="Backspace"&&!S&&w.length>0&&v(w.slice(0,-1))},Ae=be=>{v(w.filter(Le=>Le!==be))};return K.jsxs("form",{className:et.form,onSubmit:J,children:[K.jsx("div",{className:et.selectionInfo,children:K.jsxs("p",{className:et.selectionInfoText,children:[F.length," parcel",F.length!==1?"s":""," selected"]})}),K.jsxs("div",{className:et.formGroup,children:[K.jsx("label",{className:et.label,children:"Name *"}),K.jsx("input",{type:"text",className:et.input,value:C,onChange:be=>R(be.target.value),placeholder:"Enter group name",autoFocus:!0})]}),K.jsxs("div",{className:et.formGroup,children:[K.jsx("label",{className:et.label,children:"Description"}),K.jsx("textarea",{className:`${et.input} ${et.textarea}`,value:I,onChange:be=>N(be.target.value),placeholder:"Optional description"})]}),K.jsxs("div",{className:et.formGroup,children:[K.jsx("label",{className:et.label,children:"Color"}),K.jsx("div",{className:et.colorPicker,children:ol.map(be=>{const Le=h.has(be),Me=_===be;return K.jsx("button",{type:"button",className:`${et.colorOption} ${Me?et.colorOptionSelected:""} ${Le?et.colorOptionDisabled:""}`,style:{backgroundColor:be},onClick:()=>!Le&&A(be),disabled:Le,title:Le?"Color already in use":void 0},be)})})]}),K.jsxs("div",{className:et.formGroup,children:[K.jsx("label",{className:et.label,children:"Tags"}),K.jsxs("div",{className:et.tagsInput,children:[w.map(be=>K.jsxs("span",{className:et.tagInForm,children:[be,K.jsx("button",{type:"button",className:et.tagRemove,onClick:()=>Ae(be),children:"×"})]},be)),K.jsx("input",{type:"text",className:et.tagInput,value:S,onChange:be=>M(be.target.value),onKeyDown:Oe,onBlur:pe,placeholder:"Add tag..."})]})]}),s&&K.jsx("div",{className:et.errorMessage,children:s}),K.jsxs("div",{className:et.footer,style:{padding:0,borderTop:"none"},children:[K.jsx("button",{type:"button",className:`${et.button} ${et.buttonSecondary}`,onClick:t,disabled:p,children:"Cancel"}),K.jsx("button",{type:"submit",className:`${et.button} ${et.buttonPrimary}`,disabled:!C.trim()||F.length===0||p,children:p?"Saving...":W?"Save Changes":"Create Group"})]})]})}function w3({onExitSelectMode:e,onEnterSelectMode:i,isSelectMode:t=!1,initialMode:n="list",checkIsBanned:o,onBanToggle:s}){const{sidebarOpen:l,selectedParcels:c,groups:f,editingGroupId:p}=Gs(),y=cf(),[m,h]=Z.useState(n);Z.useEffect(()=>{h(n)},[n]);const O=Z.useCallback(J=>{J.key==="Escape"&&(y({type:"SET_SIDEBAR_OPEN",payload:!1}),e?.())},[y,e]);Z.useEffect(()=>(document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)),[O]);const C=Z.useMemo(()=>m==="edit"&&p&&f.find(J=>J.id===p)||null,[m,p,f]),R=()=>{y({type:"TOGGLE_SIDEBAR"}),l&&e&&e()},I=()=>{h("create"),i?.()},N=J=>{y({type:"SET_EDITING_GROUP",payload:J.id}),h("edit"),i?.()},_=()=>{h("list"),y({type:"SET_EDITING_GROUP",payload:null}),y({type:"CLEAR_SELECTION"}),e?.()},A=()=>{h("list"),y({type:"SET_EDITING_GROUP",payload:null}),y({type:"CLEAR_SELECTION"}),e?.()},w=()=>{y({type:"CLEAR_SELECTION"})},v=()=>{i?.()},S=()=>{e?.()},M=`${et.sidebar} ${l?"":et.sidebarCollapsed}`,F=()=>{switch(m){case"create":return"Create Group";case"edit":return"Edit Group";default:return"Scene Groups"}},W=K.jsxs("div",{className:M,children:[K.jsxs("div",{className:et.header,children:[K.jsx("h3",{className:et.headerTitle,children:F()}),K.jsx("button",{className:et.closeButton,onClick:R,children:"×"})]}),K.jsxs("div",{className:et.content,children:[m==="list"&&K.jsxs(K.Fragment,{children:[c.length>0&&K.jsx("div",{className:et.selectionInfo,children:K.jsxs("p",{className:et.selectionInfoText,children:[c.length," parcel",c.length!==1?"s":""," selected"]})}),K.jsx(_3,{onEditGroup:N,checkIsBanned:o,onBanToggle:s})]}),(m==="create"||m==="edit")&&K.jsx(b3,{editingGroup:C,selectedParcels:c,onCancel:_,onSave:A})]}),m==="list"&&K.jsx("div",{className:et.footer,children:t?c.length>0?K.jsxs(K.Fragment,{children:[K.jsx("button",{className:`${et.button} ${et.buttonSecondary}`,onClick:w,children:"Clear"}),K.jsx("button",{className:`${et.button} ${et.buttonPrimary}`,onClick:I,children:"Create Group"})]}):K.jsxs(K.Fragment,{children:[K.jsx("button",{className:`${et.button} ${et.buttonSecondary}`,onClick:S,children:"Done"}),K.jsx("p",{style:{color:"rgba(255,255,255,0.5)",fontSize:"13px",margin:0,flex:1},children:"Click parcels to select"})]}):K.jsx("button",{className:`${et.button} ${et.buttonPrimary}`,onClick:v,style:{width:"100%"},children:"Select Parcels"})})]});return Yd.createPortal(W,document.body)}const Vj="https://peer.decentraland.org/content";async function Hj(e){const i=`${e.x},${e.y}`;try{const t=await fetch(`${Vj}/entities/active`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({pointers:[i]})});if(!t.ok)return console.error("Failed to fetch scene:",t.statusText),null;const n=await t.json();if(n.length===0)return null;const o=n[0];return S3(o)}catch(t){return console.error("Error fetching scene:",t),null}}function S3(e){const i=e.metadata||{},t=i.display||{},n=i.scene;let o=null;if(n?.base){const[f,p]=n.base.split(",").map(Number);!isNaN(f)&&!isNaN(p)&&(o={x:f,y:p})}const l=(n?.parcels||e.pointers).map(f=>{const[p,y]=f.split(",").map(Number);return{x:p,y}}).filter(f=>!isNaN(f.x)&&!isNaN(f.y));let c=null;if(t.navmapThumbnail){const f=e.content.find(p=>p.file===t.navmapThumbnail);f&&(c=`${Vj}/contents/${f.hash}`)}return{entityId:e.id,name:t.title||"Unnamed Scene",description:t.description||"",thumbnail:c,owner:i.owner||i.contact?.name||null,parcels:l,baseParcel:o,deployedAt:new Date(e.timestamp),tags:i.tags||[]}}function T3(e){if(e.length===0)return"";if(e.length===1)return`${e[0].x},${e[0].y}`;const i=Math.min(...e.map(s=>s.x)),t=Math.max(...e.map(s=>s.x)),n=Math.min(...e.map(s=>s.y)),o=Math.max(...e.map(s=>s.y));return i===t&&n===o?`${i},${n}`:`${i},${n} to ${t},${o}`}const A3="_sidebar_fxxme_1",O3="_sidebarCollapsed_fxxme_15",I3="_header_fxxme_19",P3="_headerTitle_fxxme_27",R3="_closeButton_fxxme_34",N3="_content_fxxme_54",C3="_banCard_fxxme_60",M3="_banCardHeader_fxxme_73",j3="_banIcon_fxxme_80",L3="_banTitle_fxxme_88",D3="_banType_fxxme_96",k3="_banMeta_fxxme_107",q3="_banReason_fxxme_113",B3="_redeployWarning_fxxme_122",U3="_banActions_fxxme_131",F3="_actionButton_fxxme_139",V3="_emptyState_fxxme_154",H3="_emptyStateIcon_fxxme_160",z3="_emptyStateText_fxxme_166",W3="_loadingState_fxxme_171",G3="_errorState_fxxme_177",fr={sidebar:A3,sidebarCollapsed:O3,header:I3,headerTitle:P3,closeButton:R3,content:N3,banCard:C3,banCardHeader:M3,banIcon:j3,banTitle:L3,banType:D3,banMeta:k3,banReason:q3,redeployWarning:B3,banActions:U3,actionButton:F3,emptyState:V3,emptyStateIcon:H3,emptyStateText:z3,loadingState:W3,errorState:G3};function K3(e){const i=new Date(e),t=i.getDate().toString().padStart(2,"0"),n=(i.getMonth()+1).toString().padStart(2,"0"),o=i.getFullYear();return`${t}/${n}/${o}`}function Y3(e){return e.length===0?"":e.length===1?`${e[0].x},${e[0].y}`:`${e[0].x},${e[0].y} (+${e.length-1} more)`}function X3(e){return e.groupId?"Group Ban":e.worldName?e.worldName:Y3(e.parcels)}function J3(e){return e.groupId?"Group":e.worldName?"World":"Scene"}function Q3({isOpen:e,onClose:i,onBanClick:t}){const{bans:n,isLoading:o,error:s}=df(),{unbanGroup:l,unbanScene:c,unbanWorld:f}=CE(),[p,y]=Z.useState(new Set),m=n.filter(N=>!N.worldName);Z.useEffect(()=>{if(!e)return;(async()=>{const _=new Set;for(const A of m)if(A.sceneId&&A.parcels.length>0)try{const w=await Hj(A.parcels[0]);w&&w.entityId!==A.sceneId&&_.add(A.id)}catch(w){console.error("Error checking scene redeployment:",w)}y(_)})()},[e,m]);const h=Z.useCallback(N=>{N.key==="Escape"&&i()},[i]);Z.useEffect(()=>{if(e)return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,h]);const O=async(N,_)=>{_.stopPropagation();try{N.groupId?await l({id:N.groupId}):N.worldName?await f(N.worldName):N.parcels.length>0&&await c(N.parcels)}catch(A){console.error("Failed to unban:",A)}},C=N=>{t?.(N)},R=`${fr.sidebar} ${e?"":fr.sidebarCollapsed}`,I=K.jsxs("div",{className:R,children:[K.jsxs("div",{className:fr.header,children:[K.jsx("h3",{className:fr.headerTitle,children:K.jsx("span",{children:"Banned Scenes"})}),K.jsx("button",{className:fr.closeButton,onClick:i,children:"x"})]}),K.jsxs("div",{className:fr.content,children:[o&&K.jsx("div",{className:fr.loadingState,children:"Loading bans..."}),s&&K.jsx("div",{className:fr.errorState,children:s}),!o&&!s&&m.length===0&&K.jsxs("div",{className:fr.emptyState,children:[K.jsx("div",{className:fr.emptyStateIcon,children:"🛡️"}),K.jsx("p",{className:fr.emptyStateText,children:"No banned scenes"})]}),!o&&!s&&m.map(N=>K.jsxs("div",{className:fr.banCard,onClick:()=>C(N),children:[K.jsxs("div",{className:fr.banCardHeader,children:[K.jsx("div",{className:fr.banIcon}),K.jsx("h4",{className:fr.banTitle,children:X3(N)}),K.jsx("span",{className:fr.banType,children:J3(N)})]}),K.jsxs("div",{className:fr.banMeta,children:["Banned on ",K3(N.createdAt),N.createdBy&&` by ${N.createdBy.slice(0,6)}...${N.createdBy.slice(-4)}`]}),N.parcels.length>1&&K.jsxs("div",{className:fr.banMeta,children:[N.parcels.length," parcels"]}),p.has(N.id)&&K.jsx("div",{className:fr.redeployWarning,children:"Scene has been re-deployed since ban"}),N.reason&&K.jsxs("div",{className:fr.banReason,children:['"',N.reason,'"']}),K.jsx("div",{className:fr.banActions,children:K.jsx("button",{className:fr.actionButton,onClick:_=>O(N,_),children:"Unban"})})]},N.id))]})]});return Yd.createPortal(I,document.body)}const Z3="_fabContainer_13jbc_1",x3="_fab_13jbc_1",$3="_badge_13jbc_47",e4="_badgeBanned_13jbc_64",t4="_fabBanned_13jbc_69",Vo={fabContainer:Z3,fab:x3,badge:$3,badgeBanned:e4,fabBanned:t4},r4=({onGroupsClick:e,onBansClick:i,disabled:t,groupCount:n=0,banCount:o=0})=>K.jsxs("div",{className:Vo.fabContainer,children:[K.jsxs("button",{className:`${Vo.fab} ${Vo.fabBanned}`,onClick:i,disabled:t,title:"View banned scenes",children:[K.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#FF4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[K.jsx("circle",{cx:"12",cy:"12",r:"10"}),K.jsx("line",{x1:"4.93",y1:"4.93",x2:"19.07",y2:"19.07"})]}),o>0&&K.jsx("span",{className:`${Vo.badge} ${Vo.badgeBanned}`,children:o})]}),K.jsxs("button",{className:Vo.fab,onClick:e,disabled:t,title:"View scene groups",children:[K.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[K.jsx("polygon",{points:"12 2 2 7 12 12 22 7 12 2"}),K.jsx("polyline",{points:"2 17 12 22 22 17"}),K.jsx("polyline",{points:"2 12 12 17 22 12"})]}),n>0&&K.jsx("span",{className:Vo.badge,children:n})]})]}),n4="_sidebar_jtum2_1",i4="_header_jtum2_26",a4="_title_jtum2_34",o4="_closeButton_jtum2_41",s4="_content_jtum2_61",u4="_loading_jtum2_67",l4="_error_jtum2_68",c4="_noScene_jtum2_79",d4="_thumbnailContainer_jtum2_91",f4="_thumbnail_jtum2_91",p4="_field_jtum2_104",m4="_label_jtum2_108",h4="_value_jtum2_118",y4="_valueSmall_jtum2_123",g4="_parcelCount_jtum2_129",v4="_tags_jtum2_135",_4="_tag_jtum2_135",E4="_groupBadge_jtum2_149",b4="_footer_jtum2_171",w4="_banButton_jtum2_179",S4="_banned_jtum2_200",T4="_addToGroupSection_jtum2_211",A4="_groupSelect_jtum2_216",O4="_addToGroupButton_jtum2_242",I4="_disabledMessage_jtum2_264",P4="_removeFromGroupButton_jtum2_275",R4="_banInfo_jtum2_293",N4="_banInfoHeader_jtum2_301",C4="_redeployWarning_jtum2_318",ht={sidebar:n4,header:i4,title:a4,closeButton:o4,content:s4,loading:u4,error:l4,noScene:c4,thumbnailContainer:d4,thumbnail:f4,field:p4,label:m4,value:h4,valueSmall:y4,parcelCount:g4,tags:v4,tag:_4,groupBadge:E4,footer:b4,banButton:w4,banned:S4,addToGroupSection:T4,groupSelect:A4,addToGroupButton:O4,disabledMessage:I4,removeFromGroupButton:P4,banInfo:R4,banInfoHeader:N4,redeployWarning:C4},M4=({parcel:e,group:i,onClose:t,onBanToggle:n,checkIsBanned:o,getBanInfo:s,onSceneLoaded:l,onCreateGroup:c,onAddToGroup:f,onRemoveFromGroup:p,onViewGroup:y,existingGroups:m=[]})=>{const[h,O]=Z.useState(null),[C,R]=Z.useState(!1),[I,N]=Z.useState(null),[_,A]=Z.useState("new"),w=Z.useCallback(fe=>{fe.key==="Escape"&&t()},[t]);Z.useEffect(()=>(document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)),[w]);const v=e?`${e.x},${e.y}`:null;Z.useEffect(()=>{if(!e)return;let fe=!1;return R(!0),N(null),O(null),Hj(e).then(Pe=>{fe||(O(Pe),R(!1),Pe?.parcels&&Pe.parcels.length>0&&l?.(Pe.parcels))}).catch(Pe=>{fe||(console.error("Failed to fetch scene info:",Pe),N("Failed to load scene information"),R(!1))}),()=>{fe=!0}},[v,l]);const S=Z.useMemo(()=>{if(!h?.parcels||h.parcels.length===0)return{belongsToGroup:null,freeParcels:[],allInGroup:!1};const fe=h.parcels;let Pe=null;for(const ue of m){const Ie=new Set(ue.parcels.map(qe=>`${qe.x},${qe.y}`));if(fe.some(qe=>Ie.has(`${qe.x},${qe.y}`))){Pe=ue;break}}const Re=new Set;m.forEach(ue=>{ue.parcels.forEach(Ie=>Re.add(`${Ie.x},${Ie.y}`))});const ae=fe.filter(ue=>!Re.has(`${ue.x},${ue.y}`));return{belongsToGroup:Pe,freeParcels:ae,allInGroup:ae.length===0&&Pe!==null}},[h?.parcels,m]),M=i||S.belongsToGroup||void 0,F=h?.parcels||(e?[e]:[]),W=o?.(M,F)??!1,J=s?.(M,F),pe=Z.useMemo(()=>!J?.sceneId||!h?.entityId?!1:J.sceneId!==h.entityId,[J?.sceneId,h?.entityId]),Oe=()=>{n?.(!W,M,F)},Ae=()=>{h?.parcels&&h.parcels.length>0&&i&&p?.(h.parcels,i.id)},be=()=>{!h?.parcels||h.parcels.length===0||(_==="new"?h.parcels.length>1&&c?.(h.parcels,h.name):_&&f?.(h.parcels,_))},Le=S.belongsToGroup!==null,Me=h?.parcels&&h.parcels.length>1&&c,Be=h?.parcels&&h.parcels.length>0&&m.length>0&&f,Te=!i&&(Me||Be),ce=Le;Z.useEffect(()=>{Me?A("new"):m.length>0&&A(m[0].id)},[Me,m]);const Y=_==="new",j=Y?"Create Group":"Add to Group",B=!_||Y&&(!h?.parcels||h.parcels.length<2),q=h?.parcels||i?.parcels||(e?[e]:[]),L=!C&&!I&&!h,H=i?.name||h?.name||(L?"Empty Parcel":"Loading..."),le=i?.description||h?.description||"",ye=K.jsxs("div",{className:ht.sidebar,children:[K.jsxs("div",{className:ht.header,children:[K.jsx("h3",{className:ht.title,children:L?"Parcel Details":"Scene Details"}),K.jsx("button",{className:ht.closeButton,onClick:t,children:"×"})]}),K.jsx("div",{className:ht.content,children:C?K.jsx("div",{className:ht.loading,children:"Loading scene info..."}):I?K.jsx("div",{className:ht.error,children:I}):K.jsxs(K.Fragment,{children:[h?.thumbnail&&K.jsx("div",{className:ht.thumbnailContainer,children:K.jsx("img",{src:h.thumbnail,alt:H,className:ht.thumbnail,onError:fe=>{fe.target.style.display="none"}})}),L&&K.jsx("div",{className:ht.noScene,children:"No scene deployed"}),!L&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Name"}),K.jsx("div",{className:ht.value,children:H})]}),le&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Description"}),K.jsx("div",{className:ht.valueSmall,children:le})]}),K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Parcels"}),K.jsxs("div",{className:ht.value,children:[T3(q),q.length>1&&K.jsxs("span",{className:ht.parcelCount,children:["(",q.length," parcels)"]})]})]}),h?.owner&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Owner"}),K.jsx("div",{className:ht.valueSmall,children:h.owner})]}),h?.tags&&h.tags.length>0&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Tags"}),K.jsx("div",{className:ht.tags,children:h.tags.map(fe=>K.jsx("span",{className:ht.tag,children:fe},fe))})]}),(i||S.belongsToGroup)&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Scene Group"}),K.jsx("button",{className:ht.groupBadge,style:{backgroundColor:i?.color||S.belongsToGroup?.color},onClick:()=>{const fe=i||S.belongsToGroup;fe&&y?.(fe)},children:i?.name||S.belongsToGroup?.name})]}),h?.deployedAt&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Deployed"}),K.jsx("div",{className:ht.valueSmall,children:h.deployedAt.toLocaleDateString("en-GB")})]}),W&&J&&K.jsxs("div",{className:ht.banInfo,children:[K.jsx("div",{className:ht.banInfoHeader,children:"Ban Details"}),J.reason&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Reason"}),K.jsx("div",{className:ht.valueSmall,children:J.reason})]}),K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Banned On"}),K.jsxs("div",{className:ht.valueSmall,children:[new Date(J.createdAt).toLocaleDateString("en-GB")," at ",new Date(J.createdAt).toLocaleTimeString()]})]}),J.createdBy&&K.jsxs("div",{className:ht.field,children:[K.jsx("label",{className:ht.label,children:"Banned By"}),K.jsx("div",{className:ht.valueSmall,children:J.createdBy})]}),pe&&K.jsx("div",{className:ht.redeployWarning,children:"Scene has been re-deployed since ban"})]})]})}),K.jsxs("div",{className:ht.footer,children:[Te&&!i&&K.jsx("div",{className:ht.addToGroupSection,children:ce?K.jsx("div",{className:ht.disabledMessage,children:"Already in a group"}):K.jsxs(K.Fragment,{children:[K.jsxs("select",{className:ht.groupSelect,value:_,onChange:fe=>A(fe.target.value),children:[Me&&K.jsx("option",{value:"new",children:"Create new group..."}),m.map(fe=>K.jsx("option",{value:fe.id,children:fe.name},fe.id))]}),K.jsx("button",{className:ht.addToGroupButton,onClick:be,disabled:B,children:j})]})}),i&&p&&K.jsx("button",{className:ht.removeFromGroupButton,onClick:Ae,children:"Remove from Group"}),K.jsx("button",{className:`${ht.banButton} ${W?ht.banned:""}`,onClick:Oe,children:W?i||S.belongsToGroup?"Unban Group":"Unban Scene":i||S.belongsToGroup?"Ban Group":"Ban Scene"})]})]});return Yd.createPortal(ye,document.body)},PC="#00D9FF",j4=.25,L4=2;function D4({parcels:e}){const{viewport:i}=Yo(),t=oi*i.zoom,n=Z.useMemo(()=>e.map(o=>{const{screenX:s,screenY:l}=pl(o.x,o.y,i);return{key:`${o.x},${o.y}`,x:s,y:l-t,width:t,height:t}}),[e,i,t]);return e.length===0?null:K.jsx("svg",{style:{position:"absolute",top:0,left:0,width:i.width,height:i.height,pointerEvents:"none",overflow:"hidden"},children:n.map(o=>K.jsx("rect",{x:o.x,y:o.y,width:o.width,height:o.height,fill:PC,fillOpacity:j4,stroke:PC,strokeWidth:L4},o.key))})}function k4({onParcelClick:e}){const{groups:i,sidebarOpen:t}=Gs(),n=cf(),o=bl(),{updateGroup:s,deleteGroup:l}=RE(),{checkGroupBanned:c,checkSceneBanned:f,getGroupBan:p,getSceneBan:y,toggleBan:m}=CE(),{bans:h}=df(),[O,C]=Z.useState("view"),[R,I]=Z.useState(null),[N,_]=Z.useState([]),[A,w]=Z.useState("list"),[v,S]=Z.useState(!1),M=Z.useCallback(ye=>i.find(fe=>fe.parcels.some(Pe=>Pe.x===ye.x&&Pe.y===ye.y))||null,[i]),F=Z.useCallback((ye,fe)=>ye?c(ye.id):fe&&fe.length>0?f(fe):!1,[c,f]),W=Z.useCallback((ye,fe)=>{if(ye)return p(ye.id);if(fe&&fe.length>0)return y(fe)},[p,y]),J=Z.useCallback(async(ye,fe,Pe)=>{try{await m(fe,Pe,ye)}catch(Re){console.error("Failed to toggle ban:",Re)}},[m]),pe=Z.useCallback(ye=>{if(O==="select")n({type:"TOGGLE_PARCEL_SELECTION",payload:ye});else{const fe=M(ye);I({type:"parcel",parcel:ye,group:fe||void 0})}e?.(ye)},[O,n,M,e]),Oe=()=>{I(null),_([]),S(!1),w("list"),n({type:"TOGGLE_SIDEBAR"})},Ae=()=>{I(null),_([]),n({type:"SET_SIDEBAR_OPEN",payload:!1}),S(!v)},be=()=>{S(!1)},Le=Z.useCallback(ye=>{if(!ye.worldName){if(ye.groupId){const fe=i.find(Pe=>Pe.id===ye.groupId);if(fe&&fe.parcels.length>0){const Pe=fe.parcels.reduce((ae,ue)=>ae+ue.x,0)/fe.parcels.length,Re=fe.parcels.reduce((ae,ue)=>ae+ue.y,0)/fe.parcels.length;o({type:"SET_CENTER",payload:{x:Pe,y:Re}}),o({type:"SET_ZOOM",payload:8})}return}if(ye.parcels.length>0){const fe=ye.parcels.reduce((Re,ae)=>Re+ae.x,0)/ye.parcels.length,Pe=ye.parcels.reduce((Re,ae)=>Re+ae.y,0)/ye.parcels.length;o({type:"SET_CENTER",payload:{x:fe,y:Pe}}),o({type:"SET_ZOOM",payload:8})}}},[i,o]),Me=()=>{I(null),_([])},Be=Z.useCallback(ye=>{_(ye)},[]),Te=Z.useCallback((ye,fe)=>{I(null),_([]),n({type:"SET_SELECTED_PARCELS",payload:ye}),C("select"),w("create"),n({type:"SET_SIDEBAR_OPEN",payload:!0})},[n]),ce=Z.useCallback(()=>{const ye=new Set;return i.forEach(fe=>{fe.parcels.forEach(Pe=>ye.add(`${Pe.x},${Pe.y}`))}),ye},[i]),Y=Z.useCallback(async(ye,fe)=>{const Pe=i.find(qe=>qe.id===fe);if(!Pe)return;const Re=ce(),ae=new Set(Pe.parcels.map(qe=>`${qe.x},${qe.y}`)),ue=ye.filter(qe=>{const Xe=`${qe.x},${qe.y}`;return!Re.has(Xe)||ae.has(Xe)});if(ue.length===0)return;const Ie=[...Pe.parcels];ue.forEach(qe=>{ae.has(`${qe.x},${qe.y}`)||Ie.push(qe)});const je=await s(fe,{parcels:Ie});R&&je&&I({...R,group:je})},[i,s,ce,R]),j=Z.useCallback(async(ye,fe)=>{const Pe=i.find(ue=>ue.id===fe);if(!Pe)return;const Re=new Set(ye.map(ue=>`${ue.x},${ue.y}`)),ae=Pe.parcels.filter(ue=>!Re.has(`${ue.x},${ue.y}`));ae.length===0?await l(fe):await s(fe,{parcels:ae}),R&&I({...R,group:void 0})},[i,s,l,R]),B=Z.useCallback(ye=>{I(null),_([]),n({type:"SET_EDITING_GROUP",payload:ye.id}),w("edit"),n({type:"SET_SIDEBAR_OPEN",payload:!0})},[n]),q=Z.useCallback(ye=>c(ye.id),[c]),L=Z.useCallback(async(ye,fe)=>{try{await m(ye,void 0,fe)}catch(Pe){console.error("Failed to toggle group ban:",Pe)}},[m]),H=O==="select",le=R!==null&&!H;return K.jsxs("div",{className:Us.mapView,children:[K.jsx(mH,{onParcelClick:pe}),K.jsx(RH,{}),H&&K.jsx(TH,{}),N.length>0&&K.jsx(D4,{parcels:N}),K.jsx(_H,{}),K.jsx(EH,{}),t&&K.jsx(w3,{onExitSelectMode:()=>{C("view"),w("list")},onEnterSelectMode:()=>C("select"),isSelectMode:H,initialMode:A,checkIsBanned:q,onBanToggle:L}),le&&K.jsx(M4,{parcel:R.parcel,group:R.group,onClose:Me,checkIsBanned:F,getBanInfo:W,onBanToggle:J,onSceneLoaded:Be,onCreateGroup:Te,onAddToGroup:Y,onRemoveFromGroup:j,onViewGroup:B,existingGroups:i}),K.jsx(Q3,{isOpen:v,onClose:be,onBanClick:Le}),K.jsx(r4,{onGroupsClick:Oe,onBansClick:Ae,groupCount:i.length,banCount:h.filter(ye=>!ye.worldName).length})]})}function q4({initialCenter:e,initialZoom:i,onParcelClick:t}){return K.jsx(xV,{initialCenter:e,initialZoom:i,children:K.jsx(aH,{children:K.jsx(k4,{onParcelClick:t})})})}function B4(){const e=i=>{console.log("Clicked parcel:",i.x,i.y)};return K.jsx(q4,{onParcelClick:e})}const U4=fl.get("MOBILE_BFF_URL");async function RC(e){const i=e.trim().toLowerCase(),n=await(await fetch(`${U4}/worlds/${encodeURIComponent(i)}`)).json();if(!n.ok||!n.data)throw new Error(n.error||"Failed to fetch world info");return n.data}const F4="_sidebar_q9ld5_1",V4="_header_q9ld5_26",H4="_title_q9ld5_34",z4="_closeButton_q9ld5_41",W4="_content_q9ld5_61",G4="_thumbnailContainer_q9ld5_67",K4="_thumbnail_q9ld5_67",Y4="_field_q9ld5_80",X4="_label_q9ld5_84",J4="_value_q9ld5_94",Q4="_valueSmall_q9ld5_99",Z4="_tags_q9ld5_106",x4="_tag_q9ld5_106",$4="_statusActive_q9ld5_120",ez="_statusBanned_q9ld5_132",tz="_redeployWarning_q9ld5_144",rz="_redeployWarningHeader_q9ld5_152",nz="_redeployWarningText_q9ld5_161",iz="_banInfo_q9ld5_167",az="_banInfoHeader_q9ld5_175",oz="_footer_q9ld5_192",sz="_banButton_q9ld5_200",uz="_banned_q9ld5_226",wt={sidebar:F4,header:V4,title:H4,closeButton:z4,content:W4,thumbnailContainer:G4,thumbnail:K4,field:Y4,label:X4,value:J4,valueSmall:Q4,tags:Z4,tag:x4,statusActive:$4,statusBanned:ez,redeployWarning:tz,redeployWarningHeader:rz,redeployWarningText:nz,banInfo:iz,banInfoHeader:az,footer:oz,banButton:sz,banned:uz},lz=({world:e,ban:i,onClose:t,onBanToggle:n,isBanning:o=!1})=>{const s=Z.useCallback(p=>{p.key==="Escape"&&t()},[t]);Z.useEffect(()=>(document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)),[s]);const l=()=>{n?.(!e.isBanned)},c=e.isBanned&&e.banSceneId&&e.sceneId&&e.banSceneId!==e.sceneId,f=K.jsxs("div",{className:wt.sidebar,children:[K.jsxs("div",{className:wt.header,children:[K.jsx("h3",{className:wt.title,children:"World Details"}),K.jsx("button",{className:wt.closeButton,onClick:t,children:"×"})]}),K.jsxs("div",{className:wt.content,children:[e.thumbnail&&K.jsx("div",{className:wt.thumbnailContainer,children:K.jsx("img",{src:e.thumbnail,alt:e.title,className:wt.thumbnail,onError:p=>{p.target.style.display="none"}})}),K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Name"}),K.jsx("div",{className:wt.value,children:e.title})]}),K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"World Address"}),K.jsx("div",{className:wt.valueSmall,children:e.name})]}),e.description&&K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Description"}),K.jsx("div",{className:wt.valueSmall,children:e.description})]}),e.owner&&K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Owner"}),K.jsx("div",{className:wt.valueSmall,children:e.owner})]}),e.tags&&e.tags.length>0&&K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Tags"}),K.jsx("div",{className:wt.tags,children:e.tags.map(p=>K.jsx("span",{className:wt.tag,children:p},p))})]}),K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Status"}),K.jsx("div",{className:e.isBanned?wt.statusBanned:wt.statusActive,children:e.isBanned?"BANNED":"ACTIVE"})]}),c&&K.jsxs("div",{className:wt.redeployWarning,children:[K.jsx("div",{className:wt.redeployWarningHeader,children:"Redeploy Detected"}),K.jsx("div",{className:wt.redeployWarningText,children:"This world has been redeployed since it was banned. The content may have changed."})]}),e.isBanned&&i&&K.jsxs("div",{className:wt.banInfo,children:[K.jsx("div",{className:wt.banInfoHeader,children:"Ban Details"}),i.reason&&K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Reason"}),K.jsx("div",{className:wt.valueSmall,children:i.reason})]}),K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Banned On"}),K.jsxs("div",{className:wt.valueSmall,children:[new Date(i.createdAt).toLocaleDateString("en-GB")," at ",new Date(i.createdAt).toLocaleTimeString()]})]}),i.createdBy&&K.jsxs("div",{className:wt.field,children:[K.jsx("label",{className:wt.label,children:"Banned By"}),K.jsx("div",{className:wt.valueSmall,children:i.createdBy})]})]})]}),K.jsx("div",{className:wt.footer,children:K.jsx("button",{className:`${wt.banButton} ${e.isBanned?wt.banned:""}`,onClick:l,disabled:o,children:o?e.isBanned?"Unbanning...":"Banning...":e.isBanned?"Unban World":"Ban World"})})]});return Yd.createPortal(f,document.body)},cz=()=>{const[e,i]=Z.useState(""),[t,n]=Z.useState(null),[o,s]=Z.useState(!1),[l,c]=Z.useState(null),[f,p]=Z.useState(!1),{banWorld:y,unbanWorld:m,checkWorldBanned:h,getWorldBan:O}=NE(),{bans:C}=df(),R=C.filter(v=>v.worldName!==null),I=async v=>{if(v.preventDefault(),!!e.trim()){s(!0),c(null);try{const S=await RC(e.trim());n({...S,isBanned:h(S.name)})}catch(S){c(S instanceof Error?S.message:"Failed to fetch world info")}finally{s(!1)}}},N=async v=>{if(t){p(!0);try{v?await y(t.name,t.sceneId):await m(t.name),n({...t,isBanned:v,banSceneId:v?t.sceneId:null})}catch(S){console.error("Failed to toggle world ban:",S)}finally{p(!1)}}},_=()=>{n(null),i(""),c(null)},A=async v=>{s(!0),c(null),i(v);try{const S=await RC(v);n({...S,isBanned:h(S.name)})}catch(S){const M=O(v);M?n({name:v,title:v,description:null,thumbnail:null,owner:null,tags:[],sceneId:"",isBanned:!0,banId:M.id,banReason:M.reason||null,banSceneId:M.sceneId}):c(S instanceof Error?S.message:"Failed to fetch world info")}finally{s(!1)}},w=t?O(t.name):void 0;return K.jsxs("div",{className:"worlds-page",children:[K.jsxs("div",{className:"worlds-container",children:[K.jsxs("div",{className:"worlds-search-section",children:[K.jsx("h2",{children:"Search World"}),K.jsxs("form",{className:"worlds-search-box",onSubmit:I,children:[K.jsx("input",{type:"text",value:e,onChange:v=>i(v.target.value),placeholder:"Enter world name (e.g., boedo or boedo.dcl.eth)",className:"worlds-search-input",disabled:o}),K.jsx("button",{type:"submit",className:"worlds-search-button",disabled:o||!e.trim(),children:o?"Searching...":"Search"})]}),l&&K.jsx("div",{className:"worlds-error",children:l})]}),K.jsxs("div",{className:"worlds-list-section",children:[K.jsxs("h3",{children:["Banned Worlds (",R.length,")"]}),R.length===0?K.jsx("p",{className:"worlds-empty-state",children:"No banned worlds yet."}):K.jsx("div",{className:"worlds-cards-grid",children:R.map(v=>K.jsxs("div",{className:"world-card",onClick:()=>A(v.worldName),children:[K.jsx("div",{className:"world-card-name",children:v.worldName}),v.reason&&K.jsx("div",{className:"world-card-reason",children:v.reason}),K.jsxs("div",{className:"world-card-date",children:["Banned: ",new Date(v.createdAt).toLocaleDateString("en-GB")]})]},v.id))})]})]}),t&&K.jsx(lz,{world:t,ban:w,onClose:_,onBanToggle:N,isBanning:f})]})},dz={defaultChainId:Number(fl.get("CHAIN_ID")),authUrl:fl.get("AUTH_URL"),basePath:"/mobile-hub"},fz=/^decentraland.(zone|org|today)$/.test(window.location.host)?"/mobile-hub":"/";function pz(){const[e,i]=Z.useState("map");return K.jsx(vk,{basename:fz,children:K.jsx(XU,{config:dz,children:K.jsxs(GV,{children:[K.jsx(KV,{tabs:K.jsx(YV,{activeView:e,onViewChange:i})}),e==="map"?K.jsx(B4,{}):K.jsx(cz,{})]})})})}ZL.createRoot(document.getElementById("root")).render(K.jsx(Z.StrictMode,{children:K.jsx(pz,{})}));export{ll as _,HL as a,Q2 as b,VL as c,DM as e,zL as g,uV as r,mz as x};
|