@niftykit/redeemable 0.2.9 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/umd/index.js +1 -1
- package/package.json +4 -4
package/dist/umd/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Redeemable=t():e.Redeemable=t()}(this,(()=>(()=>{var e={103:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="abi/5.7.0"},780:(e,t,r)=>{"use strict";r.d(t,{R:()=>M,$:()=>R});var n=r(640),i=r(221),o=r(11),f=r(103),s=r(848),a=r(549);class c extends s.XI{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,a.Kn)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return(0,a.Kn)((0,n.$m)(e.readValue().toHexString(),20))}}class u extends s.XI{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const l=new o.Yd(f.i);function d(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||l.throwError("cannot encode object for signature with missing names",o.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&l.throwError("cannot encode object for signature with duplicate names",o.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else l.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&l.throwArgumentError("types/value length mismatch","tuple",r);let i=new s.QV(e.wordSize),f=new s.QV(e.wordSize),a=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=f.length;e.encode(f,r);let n=i.writeUpdatableValue();a.push((e=>{n(e+t)}))}else e.encode(i,r)})),a.forEach((e=>{e(i.length)}));let c=e.appendWriter(i);return c+=e.appendWriter(f),c}function h(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),f=n.subReader(r.toNumber());try{i=t.decode(f)}catch(e){if(e.code===o.Yd.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===o.Yd.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));const i=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let e=0;e<r.length;e++){const t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class b extends s.XI{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){Array.isArray(t)||this._throwError("expected array value",t);let r=this.length;-1===r&&(r=t.length,e.writeValue(t.length)),l.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let e=0;e<t.length;e++)n.push(this.coder);return d(e,n,t)}decode(e){let t=this.length;-1===t&&(t=e.readValue().toNumber(),32*t>e._data.length&&l.throwError("insufficient data length",o.Yd.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e<t;e++)r.push(new u(this.coder));return e.coerce(this.name,h(e,r))}}class p extends s.XI{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){return e.writeValue(t?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class m extends s.XI{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=(0,n.lE)(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class y extends m{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,(0,n.Dv)(super.decode(e)))}}class g extends s.XI{constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,n.lE)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return e.coerce(this.name,(0,n.Dv)(e.readBytes(this.size)))}}class v extends s.XI{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}var w=r(528),A=r(711);class E extends s.XI{constructor(e,t,r){const n=(t?"int":"uint")+8*e;super(n,n,r,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let r=w.O$.from(t),n=A.Bz.mask(8*e.wordSize);if(this.signed){let e=n.mask(8*this.size-1);(r.gt(e)||r.lt(e.add(A.fh).mul(A.tL)))&&this._throwError("value out-of-bounds",t)}else(r.lt(A._Y)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}decode(e){let t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}var T=r(222);class k extends m{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,T.Y0)(t))}decode(e){return(0,T.ZN)(super.decode(e))}}class _ extends s.XI{constructor(e,t){let r=!1;const n=[];e.forEach((e=>{e.dynamic&&(r=!0),n.push(e.type)})),super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){return d(e,this.coders,t)}decode(e){return e.coerce(this.name,h(e,this.coders))}}var S=r(155);const x=new o.Yd(f.i),P=new RegExp(/^bytes([0-9]*)$/),N=new RegExp(/^(u?int)([0-9]*)$/);class M{constructor(e){(0,i.zG)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new c(e.name);case"bool":return new p(e.name);case"string":return new k(e.name);case"bytes":return new y(e.name);case"array":return new b(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new _((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new v(e.name)}let t=e.type.match(N);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&x.throwArgumentError("invalid "+t[1]+" bit length","param",e),new E(r/8,"int"===t[1],e.name)}if(t=e.type.match(P),t){let r=parseInt(t[1]);return(0===r||r>32)&&x.throwArgumentError("invalid bytes length","param",e),new g(r,e.name)}return x.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new s.Ej(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new s.QV(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(S._R.from(e))));return new _(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&x.throwError("types/values length mismatch",o.Yd.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(S._R.from(e)))),n=new _(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const i=e.map((e=>this._getCoder(S._R.from(e))));return new _(i,"_").decode(this._getReader((0,n.lE)(t),r))}}const R=new M},848:(e,t,r)=>{"use strict";r.d(t,{BR:()=>c,Ej:()=>d,QV:()=>l,XI:()=>u});var n=r(640),i=r(528),o=r(221),f=r(11),s=r(103);const a=new f.Yd(s.i);function c(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t}class u{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){a.throwArgumentError(e,this.localName,t)}}class l{constructor(e){(0,o.zG)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,n.xs)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,n.zo)(e._data))}writeBytes(e){let t=(0,n.lE)(e);const r=t.length%this.wordSize;return r&&(t=(0,n.zo)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,n.lE)(i.O$.from(e));return t.length>this.wordSize&&a.throwError("value out-of-bounds",f.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,n.zo)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class d{constructor(e,t,r,i){(0,o.zG)(this,"_data",(0,n.lE)(e)),(0,o.zG)(this,"wordSize",t||32),(0,o.zG)(this,"_coerceFunc",r),(0,o.zG)(this,"allowLoose",i),this._offset=0}get data(){return(0,n.Dv)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):d.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:a.throwError("data out-of-bounds",f.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new d(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return i.O$.from(this.readBytes(this.wordSize))}}},155:(e,t,r)=>{"use strict";r.d(t,{HY:()=>y,IC:()=>_,QV:()=>g,Xg:()=>E,YW:()=>T,_R:()=>p,pc:()=>h});var n=r(528),i=r(221),o=r(11),f=r(103);const s=new o.Yd(f.i),a={};let c={calldata:!0,memory:!0,storage:!0},u={calldata:!0,memory:!0};function l(e,t){if("bytes"===e||"string"===e){if(c[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&u[t])return!0;return(c[t]||"payable"===t)&&s.throwArgumentError("invalid modifier","name",t),!1}function d(e,t){for(let r in t)(0,i.zG)(e,r,t[r])}const h=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),b=new RegExp(/^(.*)\[([0-9]*)\]$/);class p{constructor(e,t){e!==a&&s.throwError("use fromString",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),d(this,t);let r=this.type.match(b);d(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:p.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==h.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===h.full?", ":",")+")"):t+=this.type,e!==h.sighash&&(!0===this.indexed&&(t+=" indexed"),e===h.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?p.fromString(e,t):p.fromObject(e)}static fromObject(e){return p.isParamType(e)?e:new p(a,{name:e.name||null,type:S(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(p.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){s.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},f=o;for(let r=0;r<e.length;r++){let o=e[r];switch(o){case"(":f.state.allowType&&""===f.type?f.type="tuple":f.state.allowParams||n(r),f.state.allowType=!1,f.type=S(f.type),f.components=[i(f)],f=f.components[0];break;case")":delete f.state,"indexed"===f.name&&(t||n(r),f.indexed=!0,f.name=""),l(f.type,f.name)&&(f.name=""),f.type=S(f.type);let e=f;f=f.parent,f||n(r),delete e.parent,f.state.allowParams=!1,f.state.allowName=!0,f.state.allowArray=!0;break;case",":delete f.state,"indexed"===f.name&&(t||n(r),f.indexed=!0,f.name=""),l(f.type,f.name)&&(f.name=""),f.type=S(f.type);let s=i(f.parent);f.parent.components.push(s),delete f.parent,f=s;break;case" ":f.state.allowType&&""!==f.type&&(f.type=S(f.type),delete f.state.allowType,f.state.allowName=!0,f.state.allowParams=!0),f.state.allowName&&""!==f.name&&("indexed"===f.name?(t||n(r),f.indexed&&n(r),f.indexed=!0,f.name=""):l(f.type,f.name)?f.name="":f.state.allowName=!1);break;case"[":f.state.allowArray||n(r),f.type+=o,f.state.allowArray=!1,f.state.allowName=!1,f.state.readArray=!0;break;case"]":f.state.readArray||n(r),f.type+=o,f.state.readArray=!1,f.state.allowArray=!0,f.state.allowName=!0;break;default:f.state.allowType?(f.type+=o,f.state.allowParams=!0,f.state.allowArray=!0):f.state.allowName?(f.name+=o,delete f.state.allowArray):f.state.readArray?f.type+=o:n(r)}}return f.parent&&s.throwArgumentError("unexpected eof","param",e),delete o.state,"indexed"===f.name?(t||n(r.length-7),f.indexed&&n(r.length-7),f.indexed=!0,f.name=""):l(f.type,f.name)&&(f.name=""),o.type=S(o.type),o}(e,!!t),p.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(e){return!(null==e||!e._isParamType)}}function m(e,t){return function(e){e=e.trim();let t=[],r="",n=0;for(let i=0;i<e.length;i++){let o=e[i];","===o&&0===n?(t.push(r),r=""):(r+=o,"("===o?n++:")"===o&&(n--,-1===n&&s.throwArgumentError("unbalanced parenthesis","value",e)))}return r&&t.push(r),t}(e).map((e=>p.fromString(e,t)))}class y{constructor(e,t){e!==a&&s.throwError("use a static from method",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),d(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return y.isFragment(e)?e:"string"==typeof e?y.fromString(e):y.fromObject(e)}static fromObject(e){if(y.isFragment(e))return e;switch(e.type){case"function":return T.fromObject(e);case"event":return g.fromObject(e);case"constructor":return E.fromObject(e);case"error":return _.fromObject(e);case"fallback":case"receive":return null}return s.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?g.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?T.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?E.fromString(e.trim()):"error"===e.split(" ")[0]?_.fromString(e.substring(5).trim()):s.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class g extends y{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?g.fromString(e):g.fromObject(e)}static fromObject(e){if(g.isEventFragment(e))return e;"event"!==e.type&&s.throwArgumentError("invalid event object","value",e);const t={name:P(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(p.fromObject):[],type:"event"};return new g(a,t)}static fromString(e){let t=e.match(N);t||s.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:s.warn("unknown modifier: "+e)}})),g.fromObject({name:t[1].trim(),anonymous:r,inputs:m(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function v(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&s.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||s.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=n.O$.from(r[1]),r[0]):e}function w(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function A(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&s.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&s.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||s.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&s.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&s.throwArgumentError("unable to determine stateMutability","value",e),t}class E extends y{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===h.sighash&&s.throwError("cannot format a constructor for sighash",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?E.fromString(e):E.fromObject(e)}static fromObject(e){if(E.isConstructorFragment(e))return e;"constructor"!==e.type&&s.throwArgumentError("invalid constructor object","value",e);let t=A(e);t.constant&&s.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(p.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new E(a,r)}static fromString(e){let t={type:"constructor"},r=(e=v(e,t)).match(N);return r&&"constructor"===r[1].trim()||s.throwArgumentError("invalid constructor string","value",e),t.inputs=m(r[2].trim(),!1),w(r[3].trim(),t),E.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class T extends E{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?T.fromString(e):T.fromObject(e)}static fromObject(e){if(T.isFunctionFragment(e))return e;"function"!==e.type&&s.throwArgumentError("invalid function object","value",e);let t=A(e);const r={type:e.type,name:P(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(p.fromObject):[],outputs:e.outputs?e.outputs.map(p.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new T(a,r)}static fromString(e){let t={type:"function"},r=(e=v(e,t)).split(" returns ");r.length>2&&s.throwArgumentError("invalid function string","value",e);let n=r[0].match(N);if(n||s.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&P(t.name),t.inputs=m(n[2],!1),w(n[3].trim(),t),r.length>1){let n=r[1].match(N);""==n[1].trim()&&""==n[3].trim()||s.throwArgumentError("unexpected tokens","value",e),t.outputs=m(n[2],!1)}else t.outputs=[];return T.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function k(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||s.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class _ extends y{format(e){if(e||(e=h.sighash),h[e]||s.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?_.fromString(e):_.fromObject(e)}static fromObject(e){if(_.isErrorFragment(e))return e;"error"!==e.type&&s.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:P(e.name),inputs:e.inputs?e.inputs.map(p.fromObject):[]};return k(new _(a,t))}static fromString(e){let t={type:"error"},r=e.match(N);return r||s.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&P(t.name),t.inputs=m(r[2],!1),k(_.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function S(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const x=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function P(e){return e&&e.match(x)||s.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const N=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},268:(e,t,r)=>{"use strict";r.d(t,{CC:()=>b,Hk:()=>y,vU:()=>w,vk:()=>p});var n=r(549),i=r(528),o=r(640),f=r(235),s=r(256),a=r(221),c=r(780),u=r(155),l=r(11),d=r(103);const h=new l.Yd(d.i);class b extends a.dk{}class p extends a.dk{}class m extends a.dk{}class y extends a.dk{static isIndexed(e){return!(!e||!e._isIndexed)}}const g={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function v(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class w{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,(0,a.zG)(this,"fragments",t.map((e=>u.HY.from(e))).filter((e=>null!=e))),(0,a.zG)(this,"_abiCoder",(0,a.tu)(new.target,"getAbiCoder")()),(0,a.zG)(this,"functions",{}),(0,a.zG)(this,"errors",{}),(0,a.zG)(this,"events",{}),(0,a.zG)(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void h.warn("duplicate definition - constructor"):void(0,a.zG)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?h.warn("duplicate definition - "+r):t[r]=e})),this.deploy||(0,a.zG)(this,"deploy",u.Xg.from({payable:!1,type:"constructor"})),(0,a.zG)(this,"_isInterface",!0)}format(e){e||(e=u.pc.full),e===u.pc.sighash&&h.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===u.pc.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return c.$}static getAddress(e){return(0,n.Kn)(e)}static getSighash(e){return(0,o.p3)((0,f.id)(e.format()),0,4)}static getEventTopic(e){return(0,f.id)(e.format())}getFunction(e){if((0,o.A7)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];h.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching function","name",t):r.length>1&&h.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[u.YW.fromString(e).format()];return t||h.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,o.A7)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];h.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching event","name",t):r.length>1&&h.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[u.QV.fromString(e).format()];return t||h.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,o.A7)(e)){const t=(0,a.tu)(this.constructor,"getSighash");for(const r in this.errors)if(e===t(this.errors[r]))return this.errors[r];h.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching error","name",t):r.length>1&&h.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[u.YW.fromString(e).format()];return t||h.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,a.tu)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,a.tu)(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=(0,o.lE)(t);return(0,o.Dv)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,o.Dv)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,o.Dv)((0,o.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=(0,o.lE)(t);return(0,o.Dv)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,o.Dv)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.Dv)((0,o.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=(0,o.lE)(t),n=null,i="",f=null,s=null,a=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=(0,o.Dv)(r.slice(0,4)),t=g[e];if(t)f=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,a=t.signature,t.reason&&(n=f[0]),"Error"===s?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(f[0])}`:"Panic"===s&&(i=`; VM Exception while processing transaction: reverted with panic code ${f[0]}`);else try{const t=this.getError(e);f=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,a=t.format()}catch(e){}break}}return h.throwError("call revert exception"+i,l.Yd.errors.CALL_EXCEPTION,{method:e.format(),data:(0,o.Dv)(t),errorArgs:f,errorName:s,errorSignature:a,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.Dv)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&h.throwError("too many arguments for "+e.format(),l.Yd.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?(0,f.id)(t):"bytes"===e.type?(0,s.w)((0,o.Dv)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=i.O$.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,o.$m)((0,o.Dv)(t),32));for(t.forEach(((t,i)=>{let o=e.inputs[i];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?h.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((e=>n(o,e)))):r.push(n(o,t)):null!=t&&h.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&h.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const a=t[o];if(e.indexed)if("string"===e.type)r.push((0,f.id)(a));else if("bytes"===e.type)r.push((0,s.w)(a));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[a]))}else n.push(e),i.push(a)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);(0,o.A7)(r[0],32)&&r[0].toLowerCase()===t||h.throwError("fragment/topic mismatch",l.Yd.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],i=[],f=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(u._R.fromObject({type:"bytes32",name:e.name})),f.push(!0)):(n.push(e),f.push(!1)):(i.push(e),f.push(!1))}));let s=null!=r?this._abiCoder.decode(n,(0,o.zo)(r)):null,a=this._abiCoder.decode(i,t,!0),c=[],d=0,b=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==s)c[t]=new y({_isIndexed:!0,hash:null});else if(f[t])c[t]=new y({_isIndexed:!0,hash:s[b++]});else try{c[t]=s[b++]}catch(e){c[t]=e}else try{c[t]=a[d++]}catch(e){c[t]=e}if(e.name&&null==c[e.name]){const r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:()=>{throw v(`property ${JSON.stringify(e.name)}`,r)}}):c[e.name]=r}}));for(let e=0;e<c.length;e++){const t=c[e];t instanceof Error&&Object.defineProperty(c,e,{enumerable:!0,get:()=>{throw v(`index ${e}`,t)}})}return Object.freeze(c)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new p({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:i.O$.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new b({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=(0,o.Dv)(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new m({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}},772:(e,t,r)=>{"use strict";r.d(t,{Sg:()=>s,zt:()=>a});var n=r(528),i=r(221),o=r(11);const f=new o.Yd("abstract-provider/5.7.0");class s extends i.dk{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class a{constructor(){f.checkAbstract(new.target,a),(0,i.zG)(this,"_isProvider",!0)}getFeeData(){return e=this,t=void 0,o=function*(){const{block:e,gasPrice:t}=yield(0,i.mE)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,o=null,f=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,f=n.O$.from("1500000000"),o=e.baseFeePerGas.mul(2).add(f)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:f,gasPrice:t}},new((r=void 0)||(r=Promise))((function(n,i){function f(e){try{a(o.next(e))}catch(e){i(e)}}function s(e){try{a(o.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((o=o.apply(e,t||[])).next())}));var e,t,r,o}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}},327:(e,t,r)=>{"use strict";r.d(t,{E:()=>c,b:()=>u});var n=r(221),i=r(11),o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};const f=new i.Yd("abstract-signer/5.7.0"),s=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],a=[i.Yd.errors.INSUFFICIENT_FUNDS,i.Yd.errors.NONCE_EXPIRED,i.Yd.errors.REPLACEMENT_UNDERPRICED];class c{constructor(){f.checkAbstract(new.target,c),(0,n.zG)(this,"_isSigner",!0)}getBalance(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return o(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield(0,n.mE)(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return o(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.mE)(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return o(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===s.indexOf(t)&&f.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=(0,n.DC)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&f.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return o(this,void 0,void 0,(function*(){const t=yield(0,n.mE)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&f.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||f.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):f.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&f.throwError("network does not support EIP-1559",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):f.throwError("failed to get consistent fee data",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(a.indexOf(e.code)>=0)throw e;return f.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&f.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield(0,n.mE)(t)}))}_checkProvider(e){this.provider||f.throwError("missing provider",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class u extends c{constructor(e,t){super(),(0,n.zG)(this,"address",e),(0,n.zG)(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{f.throwError(e,i.Yd.errors.UNSUPPORTED_OPERATION,{operation:t})}))}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new u(this.address,e)}}},549:(e,t,r)=>{"use strict";r.d(t,{Kn:()=>h,CR:()=>m,hB:()=>y,vU:()=>p,UJ:()=>b});var n=r(640),i=r(528),o=r(256),f=r(648);const s=new(r(11).Yd)("address/5.7.0");function a(e){(0,n.A7)(e,20)||s.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const i=(0,n.lE)((0,o.w)(r));for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&i[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);const u=Math.floor((l=9007199254740991,Math.log10?Math.log10(l):Math.log(l)/Math.LN10));var l;function d(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>c[e])).join("");for(;t.length>=u;){let e=t.substring(0,u);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function h(e){let t=null;if("string"!=typeof e&&s.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=a(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&s.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==d(e)&&s.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=a("0x"+t)}else s.throwArgumentError("invalid address","address",e);return t}function b(e){try{return h(e),!0}catch(e){}return!1}function p(e){let t=(0,i.t2)(h(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+d("XE00"+t)+t}function m(e){let t=null;try{t=h(e.from)}catch(t){s.throwArgumentError("missing from address","transaction",e)}const r=(0,n.G1)((0,n.lE)(i.O$.from(e.nonce).toHexString()));return h((0,n.p3)((0,o.w)((0,f.encode)([t,r])),12))}function y(e,t,r){return 32!==(0,n.E1)(t)&&s.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.E1)(r)&&s.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),h((0,n.p3)((0,o.w)((0,n.zo)(["0xff",h(e),t,r])),12))}},495:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="bignumber/5.7.0"},528:(e,t,r)=>{"use strict";r.d(t,{O$:()=>b,Zm:()=>d,g$:()=>v,t2:()=>w});var n=r(197),i=r.n(n),o=r(640),f=r(11),s=r(495),a=i().BN;const c=new f.Yd(s.i),u={},l=9007199254740991;function d(e){return null!=e&&(b.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,o.A7)(e)||"bigint"==typeof e||(0,o._t)(e))}let h=!1;class b{constructor(e,t){e!==u&&c.throwError("cannot call constructor directly; use BigNumber.from",f.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return m(y(this).fromTwos(e))}toTwos(e){return m(y(this).toTwos(e))}abs(){return"-"===this._hex[0]?b.from(this._hex.substring(1)):this}add(e){return m(y(this).add(y(e)))}sub(e){return m(y(this).sub(y(e)))}div(e){return b.from(e).isZero()&&g("division-by-zero","div"),m(y(this).div(y(e)))}mul(e){return m(y(this).mul(y(e)))}mod(e){const t=y(e);return t.isNeg()&&g("division-by-zero","mod"),m(y(this).umod(t))}pow(e){const t=y(e);return t.isNeg()&&g("negative-power","pow"),m(y(this).pow(t))}and(e){const t=y(e);return(this.isNegative()||t.isNeg())&&g("unbound-bitwise-result","and"),m(y(this).and(t))}or(e){const t=y(e);return(this.isNegative()||t.isNeg())&&g("unbound-bitwise-result","or"),m(y(this).or(t))}xor(e){const t=y(e);return(this.isNegative()||t.isNeg())&&g("unbound-bitwise-result","xor"),m(y(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&g("negative-width","mask"),m(y(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&g("negative-width","shl"),m(y(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&g("negative-width","shr"),m(y(this).shrn(e))}eq(e){return y(this).eq(y(e))}lt(e){return y(this).lt(y(e))}lte(e){return y(this).lte(y(e))}gt(e){return y(this).gt(y(e))}gte(e){return y(this).gte(y(e))}isNegative(){return"-"===this._hex[0]}isZero(){return y(this).isZero()}toNumber(){try{return y(this).toNumber()}catch(e){g("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return c.throwError("this platform does not support BigInt",f.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,c.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?c.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",f.Yd.errors.UNEXPECTED_ARGUMENT,{}):c.throwError("BigNumber.toString does not accept parameters",f.Yd.errors.UNEXPECTED_ARGUMENT,{})),y(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof b)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new b(u,p(e)):e.match(/^-?[0-9]+$/)?new b(u,p(new a(e))):c.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&g("underflow","BigNumber.from",e),(e>=l||e<=-l)&&g("overflow","BigNumber.from",e),b.from(String(e));const t=e;if("bigint"==typeof t)return b.from(t.toString());if((0,o._t)(t))return b.from((0,o.Dv)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return b.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,o.A7)(e)||"-"===e[0]&&(0,o.A7)(e.substring(1))))return b.from(e)}return c.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function p(e){if("string"!=typeof e)return p(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&c.throwArgumentError("invalid hex","value",e),"0x00"===(e=p(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function m(e){return b.from(p(e))}function y(e){const t=b.from(e).toHexString();return"-"===t[0]?new a("-"+t.substring(3),16):new a(t.substring(2),16)}function g(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),c.throwError(e,f.Yd.errors.NUMERIC_FAULT,n)}function v(e){return new a(e,36).toString(16)}function w(e){return new a(e,16).toString(36)}},640:(e,t,r)=>{"use strict";r.d(t,{lE:()=>c,zo:()=>u,xs:()=>g,E1:()=>m,p3:()=>y,Ou:()=>w,$P:()=>v,$m:()=>A,Dv:()=>p,_t:()=>a,Zq:()=>f,A7:()=>h,gV:()=>T,N:()=>E,G1:()=>l,Bu:()=>d});const n=new(r(11).Yd)("bytes/5.7.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function f(e){return h(e)&&!(e.length%2)||a(e)}function s(e){return"number"==typeof e&&e==e&&e%1==0}function a(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!s(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const r=e[t];if(!s(r)||r<0||r>=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),o(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));const i=[];for(let e=0;e<r.length;e+=2)i.push(parseInt(r.substring(e,e+2),16));return o(new Uint8Array(i))}return a(e)?o(new Uint8Array(e)):n.throwArgumentError("invalid arrayify value","value",e)}function u(e){const t=e.map((e=>c(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),o(n)}function l(e){let t=c(e);if(0===t.length)return t;let r=0;for(;r<t.length&&0===t[r];)r++;return r&&(t=t.slice(r)),t}function d(e,t){(e=c(e)).length>t&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function h(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}const b="0123456789abcdef";function p(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=b[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(a(e)){let t="0x";for(let r=0;r<e.length;r++){let n=e[r];t+=b[(240&n)>>4]+b[15&n]}return t}return n.throwArgumentError("invalid hexlify value","value",e)}function m(e){if("string"!=typeof e)e=p(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function y(e,t,r){return"string"!=typeof e?e=p(e):(!h(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function g(e){let t="0x";return e.forEach((e=>{t+=p(e).substring(2)})),t}function v(e){const t=w(p(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!=typeof e&&(e=p(e)),h(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}function A(e,t){for("string"!=typeof e?e=p(e):h(e)||n.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function E(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(f(e)){let r=c(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64))):65===r.length?(t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=p(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=d(c(t._vs),32);t._vs=p(r);const i=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=p(r);null==t.s?t.s=o:t.s!==o&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=A(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=A(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);const r=c(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const i=p(r);t._vs&&(h(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=A(t._vs,32)),null==t._vs?t._vs=i:t._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function T(e){return p(u([(e=E(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},711:(e,t,r)=>{"use strict";r.d(t,{$B:()=>u,Bz:()=>c,Ce:()=>a,PS:()=>l,Py:()=>s,_Y:()=>o,fh:()=>f,tL:()=>i});var n=r(528);const i=n.O$.from(-1),o=n.O$.from(0),f=n.O$.from(1),s=n.O$.from(2),a=n.O$.from("1000000000000000000"),c=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),u=n.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),l=n.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},503:(e,t,r)=>{"use strict";r.d(t,{VZ:()=>x,CH:()=>P,lV:()=>N});var n=r(848),i=r(268),o=r(772),f=r(327),s=r(549),a=r(528),c=r(640),u=r(221),l=r(390),d=r(11),h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};const b=new d.Yd("contracts/5.7.0"),p={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function m(e,t){return h(this,void 0,void 0,(function*(){const r=yield t;"string"!=typeof r&&b.throwArgumentError("invalid address or ENS name","name",r);try{return(0,s.Kn)(r)}catch(e){}e||b.throwError("a provider or signer is needed to resolve ENS names",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield e.resolveName(r);return null==n&&b.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function y(e,t,r){return h(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>y(e,Array.isArray(t)?t[n]:t[r.name],r)))):"address"===r.type?yield m(e,t):"tuple"===r.type?yield y(e,t,r.components):"array"===r.baseType?Array.isArray(t)?yield Promise.all(t.map((t=>y(e,t,r.arrayChildren)))):Promise.reject(b.makeError("invalid value for array",d.Yd.errors.INVALID_ARGUMENT,{argument:"value",value:t})):t}))}function g(e,t,r){return h(this,void 0,void 0,(function*(){let n={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(n=(0,u.DC)(r.pop())),b.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?n.from?n.from=(0,u.mE)({override:m(e.signer,n.from),signer:e.signer.getAddress()}).then((e=>h(this,void 0,void 0,(function*(){return(0,s.Kn)(e.signer)!==e.override&&b.throwError("Contract with a Signer cannot override from",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})))):n.from=e.signer.getAddress():n.from&&(n.from=m(e.provider,n.from));const i=yield(0,u.mE)({args:y(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:(0,u.mE)(n)||{}}),o=e.interface.encodeFunctionData(t,i.args),f={data:o,to:i.address},p=i.overrides;if(null!=p.nonce&&(f.nonce=a.O$.from(p.nonce).toNumber()),null!=p.gasLimit&&(f.gasLimit=a.O$.from(p.gasLimit)),null!=p.gasPrice&&(f.gasPrice=a.O$.from(p.gasPrice)),null!=p.maxFeePerGas&&(f.maxFeePerGas=a.O$.from(p.maxFeePerGas)),null!=p.maxPriorityFeePerGas&&(f.maxPriorityFeePerGas=a.O$.from(p.maxPriorityFeePerGas)),null!=p.from&&(f.from=p.from),null!=p.type&&(f.type=p.type),null!=p.accessList&&(f.accessList=(0,l.z7)(p.accessList)),null==f.gasLimit&&null!=t.gas){let e=21e3;const r=(0,c.lE)(o);for(let t=0;t<r.length;t++)e+=4,r[t]&&(e+=64);f.gasLimit=a.O$.from(t.gas).add(e)}if(p.value){const e=a.O$.from(p.value);e.isZero()||t.payable||b.throwError("non-payable method cannot override value",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:n.value}),f.value=e}p.customData&&(f.customData=(0,u.DC)(p.customData)),p.ccipReadEnabled&&(f.ccipReadEnabled=!!p.ccipReadEnabled),delete n.nonce,delete n.gasLimit,delete n.gasPrice,delete n.from,delete n.value,delete n.type,delete n.accessList,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.customData,delete n.ccipReadEnabled;const g=Object.keys(n).filter((e=>null!=n[e]));return g.length&&b.throwError(`cannot override ${g.map((e=>JSON.stringify(e))).join(",")}`,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:g}),f}))}function v(e,t){const r=t.wait.bind(t);t.wait=t=>r(t).then((t=>(t.events=t.logs.map((r=>{let n=(0,u.p$)(r),i=null;try{i=e.interface.parseLog(r)}catch(e){}return i&&(n.args=i.args,n.decode=(t,r)=>e.interface.decodeEventLog(i.eventFragment,t,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>e.provider,n.getBlock=()=>e.provider.getBlock(t.blockHash),n.getTransaction=()=>e.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(t),n})),t)))}function w(e,t,r){const n=e.signer||e.provider;return function(...i){return h(this,void 0,void 0,(function*(){let o;if(i.length===t.inputs.length+1&&"object"==typeof i[i.length-1]){const e=(0,u.DC)(i.pop());null!=e.blockTag&&(o=yield e.blockTag),delete e.blockTag,i.push(e)}null!=e.deployTransaction&&(yield e._deployed(o));const f=yield g(e,t,i),s=yield n.call(f,o);try{let n=e.interface.decodeFunctionResult(t,s);return r&&1===t.outputs.length&&(n=n[0]),n}catch(t){throw t.code===d.Yd.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=i,t.transaction=f),t}}))}}function A(e,t,r){return t.constant?w(e,t,r):function(e,t){return function(...r){return h(this,void 0,void 0,(function*(){e.signer||b.throwError("sending a transaction requires a signer",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());const n=yield g(e,t,r),i=yield e.signer.sendTransaction(n);return v(e,i),i}))}}(e,t)}function E(e){return!e.address||null!=e.topics&&0!==e.topics.length?(e.address||"*")+"@"+(e.topics?e.topics.map((e=>Array.isArray(e)?e.join("|"):e)).join(":"):""):"*"}class T{constructor(e,t){(0,u.zG)(this,"tag",e),(0,u.zG)(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter((r=>!(!t&&r.listener===e&&(t=!0,1))))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((e=>e.listener))}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter((t=>{const r=e.slice();return setTimeout((()=>{t.listener.apply(this,r)}),0),!t.once})),t}prepareEvent(e){}getEmit(e){return[e]}}class k extends T{constructor(){super("error",null)}}class _ extends T{constructor(e,t,r,n){const i={address:e};let o=t.getEventTopic(r);n?(o!==n[0]&&b.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(E(i),i),(0,u.zG)(this,"address",e),(0,u.zG)(this,"interface",t),(0,u.zG)(this,"fragment",r)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(e,t)=>this.interface.decodeEventLog(this.fragment,e,t);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=(0,n.BR)(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r}}class S extends T{constructor(e,t){super("*",{address:e}),(0,u.zG)(this,"address",e),(0,u.zG)(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(e,r)=>this.interface.decodeEventLog(t.eventFragment,e,r),e.args=t.args}catch(e){}}}class x{constructor(e,t,r){(0,u.zG)(this,"interface",(0,u.tu)(new.target,"getInterface")(t)),null==r?((0,u.zG)(this,"provider",null),(0,u.zG)(this,"signer",null)):f.E.isSigner(r)?((0,u.zG)(this,"provider",r.provider||null),(0,u.zG)(this,"signer",r)):o.zt.isProvider(r)?((0,u.zG)(this,"provider",r),(0,u.zG)(this,"signer",null)):b.throwArgumentError("invalid signer or provider","signerOrProvider",r),(0,u.zG)(this,"callStatic",{}),(0,u.zG)(this,"estimateGas",{}),(0,u.zG)(this,"functions",{}),(0,u.zG)(this,"populateTransaction",{}),(0,u.zG)(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach((t=>{const r=this.interface.events[t];(0,u.zG)(this.filters,t,((...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,e)}))),e[r.name]||(e[r.name]=[]),e[r.name].push(t)})),Object.keys(e).forEach((t=>{const r=e[t];1===r.length?(0,u.zG)(this.filters,t,this.filters[r[0]]):b.warn(`Duplicate definition of ${t} (${r.join(", ")})`)}))}if((0,u.zG)(this,"_runningEvents",{}),(0,u.zG)(this,"_wrappedEmits",{}),null==e&&b.throwArgumentError("invalid contract address or ENS name","addressOrName",e),(0,u.zG)(this,"address",e),this.provider)(0,u.zG)(this,"resolvedAddress",m(this.provider,e));else try{(0,u.zG)(this,"resolvedAddress",Promise.resolve((0,s.Kn)(e)))}catch(e){b.throwError("provider is required to use ENS name as contract address",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((e=>{}));const n={},i={};Object.keys(this.interface.functions).forEach((e=>{const t=this.interface.functions[e];if(i[e])b.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{i[e]=!0;{const r=t.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(e)}null==this[e]&&(0,u.zG)(this,e,A(this,t,!0)),null==this.functions[e]&&(0,u.zG)(this.functions,e,A(this,t,!1)),null==this.callStatic[e]&&(0,u.zG)(this.callStatic,e,w(this,t,!0)),null==this.populateTransaction[e]&&(0,u.zG)(this.populateTransaction,e,function(e,t){return function(...r){return g(e,t,r)}}(this,t)),null==this.estimateGas[e]&&(0,u.zG)(this.estimateGas,e,function(e,t){const r=e.signer||e.provider;return function(...n){return h(this,void 0,void 0,(function*(){r||b.throwError("estimate require a provider or signer",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield g(e,t,n);return yield r.estimateGas(i)}))}}(this,t))}})),Object.keys(n).forEach((e=>{const t=n[e];if(t.length>1)return;e=e.substring(1);const r=t[0];try{null==this[e]&&(0,u.zG)(this,e,this[r])}catch(e){}null==this.functions[e]&&(0,u.zG)(this.functions,e,this.functions[r]),null==this.callStatic[e]&&(0,u.zG)(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&(0,u.zG)(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&(0,u.zG)(this.estimateGas,e,this.estimateGas[r])}))}static getContractAddress(e){return(0,s.CR)(e)}static getInterface(e){return i.vU.isInterface(e)?e:new i.vU(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,e).then((e=>("0x"===e&&b.throwError("contract not deployed",d.Yd.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(e){this.signer||b.throwError("sending a transactions require a signer",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=(0,u.DC)(e||{});return["from","to"].forEach((function(e){null!=t[e]&&b.throwError("cannot override "+e,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(t)))}connect(e){"string"==typeof e&&(e=new f.b(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,u.zG)(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return i.Hk.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new k);if("event"===e)return this._normalizeRunningEvent(new T("event",null));if("*"===e)return this._normalizeRunningEvent(new S(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new _(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const t=e.topics[0];if("string"!=typeof t)throw new Error("invalid topic");const r=this.interface.getEvent(t);return this._normalizeRunningEvent(new _(this.address,this.interface,r,e.topics))}catch(e){}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new T(E(t),t))}return this._normalizeRunningEvent(new S(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){const n=(0,u.p$)(t);return n.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e))},n.getBlock=()=>this.provider.getBlock(t.blockHash),n.getTransaction=()=>this.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(n),n}_addEventListener(e,t,r){if(this.provider||b.throwError("events require a provider or a signer with a provider",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{const t=e.getEmit(n);this.emit(e.filter,...t)}catch(e){n.decodeError=e.error}null!=e.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r)}}queryFilter(e,t,r){const n=this._getRunningEvent(e),i=(0,u.DC)(n.filter);return"string"==typeof t&&(0,c.A7)(t,32)?(null!=r&&b.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=t):(i.fromBlock=null!=t?t:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((e=>e.map((e=>this._wrapEvent(n,e,null)))))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),n=r.run(t)>0;return this._checkRunningEvents(r),n}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce(((e,t)=>e+this._runningEvents[t].listenerCount()),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(null==e){const e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach((t=>{e.push(t)}));return e}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const e in this._runningEvents){const t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}removeListener(e,t){return this.off(e,t)}}class P extends x{}class N{constructor(e,t,r){let n=null;n="string"==typeof t?t:(0,c._t)(t)?(0,c.Dv)(t):t&&"string"==typeof t.object?t.object:"!","0x"!==n.substring(0,2)&&(n="0x"+n),(!(0,c.A7)(n)||n.length%2)&&b.throwArgumentError("invalid bytecode","bytecode",t),r&&!f.E.isSigner(r)&&b.throwArgumentError("invalid signer","signer",r),(0,u.zG)(this,"bytecode",n),(0,u.zG)(this,"interface",(0,u.tu)(new.target,"getInterface")(e)),(0,u.zG)(this,"signer",r||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){t=(0,u.DC)(e.pop());for(const e in t)if(!p[e])throw new Error("unknown transaction override "+e)}return["data","from","to"].forEach((e=>{null!=t[e]&&b.throwError("cannot override "+e,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value&&(a.O$.from(t.value).isZero()||this.interface.deploy.payable||b.throwError("non-payable constructor cannot override value",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})),b.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=(0,c.Dv)((0,c.zo)([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return h(this,void 0,void 0,(function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),b.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const r=yield y(this.signer,e,this.interface.deploy.inputs);r.push(t);const n=this.getDeployTransaction(...r),i=yield this.signer.sendTransaction(n),o=(0,u.tu)(this.constructor,"getContractAddress")(i),f=(0,u.tu)(this.constructor,"getContract")(o,this.interface,this.signer);return v(f,i),(0,u.zG)(f,"deployTransaction",i),f}))}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){null==e&&b.throwError("missing compiler output",d.Yd.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}static getInterface(e){return P.getInterface(e)}static getContractAddress(e){return(0,s.CR)(e)}static getContract(e,t,r){return new P(e,t,r)}}},235:(e,t,r)=>{"use strict";r.d(t,{id:()=>o});var n=r(256),i=r(222);function o(e){return(0,n.w)((0,i.Y0)(e))}},256:(e,t,r)=>{"use strict";r.d(t,{w:()=>f});var n=r(669),i=r.n(n),o=r(640);function f(e){return"0x"+i().keccak_256((0,o.lE)(e))}},11:(e,t,r)=>{"use strict";r.d(t,{jK:()=>u,Yd:()=>d});let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let f=o.default,s=null;const a=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var c,u;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(c||(c={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(u||(u={}));const l="0123456789abcdef";class d{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",e),f>o[r]||console.log.apply(console,t)}debug(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e<t.length;e++)r+=l[t[e]>>4],r+=l[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let f="";switch(t){case u.NUMERIC_FAULT:{f="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":f+="-"+t;break;case"negative-power":case"negative-width":f+="-unsupported";break;case"unbound-bitwise-result":f+="-unbound-result"}break}case u.CALL_EXCEPTION:case u.INSUFFICIENT_FUNDS:case u.MISSING_NEW:case u.NONCE_EXPIRED:case u.REPLACEMENT_UNDERPRICED:case u.TRANSACTION_REPLACED:case u.UNPREDICTABLE_GAS_LIMIT:f=t}f&&(e+=" [ See: https://links.ethers.org/v5-errors-"+f+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=o,s.code=t,Object.keys(r).forEach((function(e){s[e]=r[e]})),s}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,d.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),a&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:a})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,d.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return s||(s=new d("logger/5.7.0")),s}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?f=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=u,d.levels=c},221:(e,t,r)=>{"use strict";r.d(t,{dk:()=>p,uj:()=>c,p$:()=>b,zG:()=>f,tu:()=>s,mE:()=>a,DC:()=>u});var n=r(11),i=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};const o=new n.Yd("properties/5.7.0");function f(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function s(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function a(e){return i(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function c(e,t){e&&"object"==typeof e||o.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function u(e){const t={};for(const r in e)t[r]=e[r];return t}const l={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function d(e){if(null==e||l[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;r<t.length;r++){let n=null;try{n=e[t[r]]}catch(e){continue}if(!d(n))return!1}return!0}return o.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function h(e){if(d(e))return e;if(Array.isArray(e))return Object.freeze(e.map((e=>b(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&f(t,r,b(n))}return t}return o.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function b(e){return h(e)}class p{constructor(e){for(const t in e)this[t]=b(e[t])}}},648:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>d,encode:()=>c});var n=r(640),i=r(11);const o=new i.Yd("rlp/5.7.0");function f(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function s(e,t,r){let n=0;for(let i=0;i<r;i++)n=256*n+e[t+i];return n}function a(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(a(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=f(t.length);return r.unshift(247+r.length),r.concat(t)}(0,n.Zq)(e)||o.throwArgumentError("RLP object must be BytesLike","object",e);const t=Array.prototype.slice.call((0,n.lE)(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=f(t.length);return r.unshift(183+r.length),r.concat(t)}function c(e){return(0,n.Dv)(a(e))}function u(e,t,r,n){const f=[];for(;r<t+1+n;){const s=l(e,r);f.push(s.result),(r+=s.consumed)>t+1+n&&o.throwError("child data too short",i.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:f}}function l(e,t){if(0===e.length&&o.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",i.Yd.errors.BUFFER_OVERRUN,{});const n=s(e,t+1,r);return t+1+r+n>e.length&&o.throwError("data long segment too short",i.Yd.errors.BUFFER_OVERRUN,{}),u(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{}),u(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});const f=s(e,t+1,r);return t+1+r+f>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{}),{consumed:1+r+f,result:(0,n.Dv)(e.slice(t+1+r,t+1+r+f))}}if(e[t]>=128){const r=e[t]-128;return t+1+r>e.length&&o.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{}),{consumed:1+r,result:(0,n.Dv)(e.slice(t+1,t+1+r))}}return{consumed:1,result:(0,n.Dv)(e[t])}}function d(e){const t=(0,n.lE)(e),r=l(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},459:(e,t,r)=>{"use strict";r.d(t,{Et:()=>J,VW:()=>Q,LO:()=>W});var n=r(197),i=r.n(n),o=r(485),f=r.n(o);function s(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var a=c;function c(e,t){if(!e)throw new Error(t||"Assertion failed")}c.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var u=s((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,f=255&i;o?r.push(o,f):r.push(f)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),l=s((function(e,t){var r=t;r.assert=a,r.toArray=u.toArray,r.zero2=u.zero2,r.toHex=u.toHex,r.encode=u.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),f=0;f<n.length;f++){var s,a=o.andln(i-1);o.isOdd()?(s=a>(i>>1)-1?(i>>1)-a:a,o.isubn(s)):s=0,n[f]=s,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var f,s,a=e.andln(3)+i&3,c=t.andln(3)+o&3;3===a&&(a=-1),3===c&&(c=-1),f=0==(1&a)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?a:-a,r[0].push(f),s=0==(1&c)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==a?c:-c,r[1].push(s),2*i===f+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new(i())(e,"hex","le")}})),d=l.getNAF,h=l.getJSF,b=l.assert;function p(e,t){this.type=e,this.p=new(i())(t.p,16),this.red=t.prime?i().red(t.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=t.n&&new(i())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var m=p;function y(e,t){this.curve=e,this.type=t,this.precomputed=null}p.prototype.point=function(){throw new Error("Not implemented")},p.prototype.validate=function(){throw new Error("Not implemented")},p.prototype._fixedNafMul=function(e,t){b(e.precomputed);var r=e._getDoubles(),n=d(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var o,f,s=[];for(o=0;o<n.length;o+=r.step){f=0;for(var a=o+r.step-1;a>=o;a--)f=(f<<1)+n[a];s.push(f)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),l=i;l>0;l--){for(o=0;o<s.length;o++)(f=s[o])===l?u=u.mixedAdd(r.points[o]):f===-l&&(u=u.mixedAdd(r.points[o].neg()));c=c.add(u)}return c.toP()},p.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=d(t,r,this._bitLength),f=this.jpoint(null,null,null),s=o.length-1;s>=0;s--){for(var a=0;s>=0&&0===o[s];s--)a++;if(s>=0&&a++,f=f.dblp(a),s<0)break;var c=o[s];b(0!==c),f="affine"===e.type?c>0?f.mixedAdd(i[c-1>>1]):f.mixedAdd(i[-c-1>>1].neg()):c>0?f.add(i[c-1>>1]):f.add(i[-c-1>>1].neg())}return"affine"===e.type?f.toP():f},p.prototype._wnafMulAdd=function(e,t,r,n,i){var o,f,s,a=this._wnafT1,c=this._wnafT2,u=this._wnafT3,l=0;for(o=0;o<n;o++){var b=(s=t[o])._getNAFPoints(e);a[o]=b.wnd,c[o]=b.points}for(o=n-1;o>=1;o-=2){var p=o-1,m=o;if(1===a[p]&&1===a[m]){var y=[t[p],null,null,t[m]];0===t[p].y.cmp(t[m].y)?(y[1]=t[p].add(t[m]),y[2]=t[p].toJ().mixedAdd(t[m].neg())):0===t[p].y.cmp(t[m].y.redNeg())?(y[1]=t[p].toJ().mixedAdd(t[m]),y[2]=t[p].add(t[m].neg())):(y[1]=t[p].toJ().mixedAdd(t[m]),y[2]=t[p].toJ().mixedAdd(t[m].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=h(r[p],r[m]);for(l=Math.max(v[0].length,l),u[p]=new Array(l),u[m]=new Array(l),f=0;f<l;f++){var w=0|v[0][f],A=0|v[1][f];u[p][f]=g[3*(w+1)+(A+1)],u[m][f]=0,c[p]=y}}else u[p]=d(r[p],a[p],this._bitLength),u[m]=d(r[m],a[m],this._bitLength),l=Math.max(u[p].length,l),l=Math.max(u[m].length,l)}var E=this.jpoint(null,null,null),T=this._wnafT4;for(o=l;o>=0;o--){for(var k=0;o>=0;){var _=!0;for(f=0;f<n;f++)T[f]=0|u[f][o],0!==T[f]&&(_=!1);if(!_)break;k++,o--}if(o>=0&&k++,E=E.dblp(k),o<0)break;for(f=0;f<n;f++){var S=T[f];0!==S&&(S>0?s=c[f][S-1>>1]:S<0&&(s=c[f][-S-1>>1].neg()),E="affine"===s.type?E.mixedAdd(s):E.add(s))}}for(o=0;o<n;o++)c[o]=null;return i?E:E.toP()},p.BasePoint=y,y.prototype.eq=function(){throw new Error("Not implemented")},y.prototype.validate=function(){return this.curve.validate(this)},p.prototype.decodePoint=function(e,t){e=l.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?b(e[e.length-1]%2==0):7===e[0]&&b(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},y.prototype.encodeCompressed=function(e){return this.encode(e,!0)},y.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},y.prototype.encode=function(e,t){return l.encode(this._encode(t),e)},y.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},y.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},y.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},y.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},y.prototype._getBeta=function(){return null},y.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var g=s((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),v=l.assert;function w(e){m.call(this,"short",e),this.a=new(i())(e.a,16).toRed(this.red),this.b=new(i())(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}g(w,m);var A=w;function E(e,t,r,n){m.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new(i())(t,16),this.y=new(i())(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function T(e,t,r,n){m.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new(i())(0)):(this.x=new(i())(t,16),this.y=new(i())(r,16),this.z=new(i())(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}w.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new(i())(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new(i())(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],v(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new(i())(e.a,16),b:new(i())(e.b,16)}})):this._getEndoBasis(r)}}},w.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i().mont(e),r=new(i())(2).toRed(t).redInvm(),n=r.redNeg(),o=new(i())(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},w.prototype._getEndoBasis=function(e){for(var t,r,n,o,f,s,a,c,u,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),b=new(i())(1),p=new(i())(0),m=new(i())(0),y=new(i())(1),g=0;0!==d.cmpn(0);){var v=h.div(d);c=h.sub(v.mul(d)),u=m.sub(v.mul(b));var w=y.sub(v.mul(p));if(!n&&c.cmp(l)<0)t=a.neg(),r=b,n=c.neg(),o=u;else if(n&&2==++g)break;a=c,h=d,d=c,m=b,b=u,y=p,p=w}f=c.neg(),s=u;var A=n.sqr().add(o.sqr());return f.sqr().add(s.sqr()).cmp(A)>=0&&(f=t,s=r),n.negative&&(n=n.neg(),o=o.neg()),f.negative&&(f=f.neg(),s=s.neg()),[{a:n,b:o},{a:f,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),f=i.mul(r.a),s=o.mul(n.a),a=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(f).sub(s),k2:a.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new(i())(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var f=this._endoSplit(t[o]),s=e[o],a=s._getBeta();f.k1.negative&&(f.k1.ineg(),s=s.neg(!0)),f.k2.negative&&(f.k2.ineg(),a=a.neg(!0)),n[2*o]=s,n[2*o+1]=a,i[2*o]=f.k1,i[2*o+1]=f.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return c},g(E,m.BasePoint),w.prototype.point=function(e,t,r){return new E(this,e,t,r)},w.prototype.pointFromJSON=function(e,t){return E.fromJSON(this,e,t)},E.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},E.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},E.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},E.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},E.prototype.isInfinity=function(){return this.inf},E.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},E.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),f=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,f)},E.prototype.getX=function(){return this.x.fromRed()},E.prototype.getY=function(){return this.y.fromRed()},E.prototype.mul=function(e){return e=new(i())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},E.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},E.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},E.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},E.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},E.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},g(T,m.BasePoint),w.prototype.jpoint=function(e,t,r){return new T(this,e,t,r)},T.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},T.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},T.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),f=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),a=o.redSub(f);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),l=n.redMul(c),d=a.redSqr().redIAdd(u).redISub(l).redISub(l),h=a.redMul(l.redISub(d)).redISub(o.redMul(u)),b=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(d,h,b)},T.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),f=r.redSub(n),s=i.redSub(o);if(0===f.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var a=f.redSqr(),c=a.redMul(f),u=r.redMul(a),l=s.redSqr().redIAdd(c).redISub(u).redISub(u),d=s.redMul(u.redISub(l)).redISub(i.redMul(c)),h=this.z.redMul(f);return this.curve.jpoint(l,d,h)},T.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,f=this.y,s=this.z,a=s.redSqr().redSqr(),c=f.redAdd(f);for(t=0;t<e;t++){var u=o.redSqr(),l=c.redSqr(),d=l.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(a)),b=o.redMul(l),p=h.redSqr().redISub(b.redAdd(b)),m=b.redISub(p),y=h.redMul(m);y=y.redIAdd(y).redISub(d);var g=c.redMul(s);t+1<e&&(a=a.redMul(d)),o=p,s=g,c=y}return this.curve.jpoint(o,c.redMul(i),s)},T.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},T.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),f=this.x.redAdd(i).redSqr().redISub(n).redISub(o);f=f.redIAdd(f);var s=n.redAdd(n).redIAdd(n),a=s.redSqr().redISub(f).redISub(f),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=a,t=s.redMul(f.redISub(a)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),h=this.x.redAdd(l).redSqr().redISub(u).redISub(d);h=h.redIAdd(h);var b=u.redAdd(u).redIAdd(u),p=b.redSqr(),m=d.redIAdd(d);m=(m=m.redIAdd(m)).redIAdd(m),e=p.redISub(h).redISub(h),t=b.redMul(h.redISub(e)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},T.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),f=this.x.redAdd(i).redSqr().redISub(n).redISub(o);f=f.redIAdd(f);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),a=s.redSqr().redISub(f).redISub(f);e=a;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(f.redISub(a)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var b=d.redIAdd(d),p=(b=b.redIAdd(b)).redAdd(b);e=h.redSqr().redISub(p),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(u);var m=l.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=h.redMul(b.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},T.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),f=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),a=t.redAdd(t),c=(a=a.redIAdd(a)).redMul(f),u=s.redSqr().redISub(c.redAdd(c)),l=c.redISub(u),d=f.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=s.redMul(l).redISub(d),b=r.redAdd(r).redMul(n);return this.curve.jpoint(u,h,b)},T.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),f=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(f=(f=(f=f.redIAdd(f)).redAdd(f).redIAdd(f)).redISub(o)).redSqr(),a=n.redIAdd(n);a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a);var c=i.redIAdd(f).redSqr().redISub(o).redISub(s).redISub(a),u=t.redMul(c);u=(u=u.redIAdd(u)).redIAdd(u);var l=this.x.redMul(s).redISub(u);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(c.redMul(a.redISub(c)).redISub(f.redMul(s)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(f).redSqr().redISub(r).redISub(s);return this.curve.jpoint(l,d,h)},T.prototype.mul=function(e,t){return e=new(i())(e,t),this.curve._wnafMul(this,e)},T.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},T.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},T.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},T.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var k=s((function(e,t){var r=t;r.base=m,r.short=A,r.mont=null,r.edwards=null})),_=s((function(e,t){var r,n=t,i=l.assert;function o(e){"short"===e.type?this.curve=new k.short(e):"edwards"===e.type?this.curve=new k.edwards(e):this.curve=new k.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:f().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:f().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:f().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:f().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:f().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:f().sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:f().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:f().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function S(e){if(!(this instanceof S))return new S(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=u.toArray(e.entropy,e.entropyEnc||"hex"),r=u.toArray(e.nonce,e.nonceEnc||"hex"),n=u.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var x=S;S.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},S.prototype._hmac=function(){return new(f().hmac)(this.hash,this.K)},S.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},S.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=u.toArray(e,t),r=u.toArray(r,n),a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},S.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=u.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(r),this._reseed++,u.encode(o,t)};var P=l.assert;function N(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var M=N;N.fromPublic=function(e,t,r){return t instanceof N?t:new N(e,{pub:t,pubEnc:r})},N.fromPrivate=function(e,t,r){return t instanceof N?t:new N(e,{priv:t,privEnc:r})},N.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},N.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},N.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},N.prototype._importPrivate=function(e,t){this.priv=new(i())(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},N.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?P(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||P(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},N.prototype.derive=function(e){return e.validate()||P(e.validate(),"public point not validated"),e.mul(this.priv).getX()},N.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},N.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},N.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var R=l.assert;function C(e,t){if(e instanceof C)return e;this._importDER(e,t)||(R(e.r&&e.s,"Signature without r or s"),this.r=new(i())(e.r,16),this.s=new(i())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var O=C;function I(){this.place=0}function B(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,f=t.place;o<n;o++,f++)i<<=8,i|=e[f],i>>>=0;return!(i<=127)&&(t.place=f,i)}function D(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function F(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}C.prototype._importDER=function(e,t){e=l.toArray(e,t);var r=new I;if(48!==e[r.place++])return!1;var n=B(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=B(e,r);if(!1===o)return!1;var f=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var s=B(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var a=e.slice(r.place,s+r.place);if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new(i())(f),this.s=new(i())(a),this.recoveryParam=null,!0},C.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=D(t),r=D(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];F(n,t.length),(n=n.concat(t)).push(2),F(n,r.length);var i=n.concat(r),o=[48];return F(o,i.length),o=o.concat(i),l.encode(o,e)};var U=function(){throw new Error("unsupported")},L=l.assert;function z(e){if(!(this instanceof z))return new z(e);"string"==typeof e&&(L(Object.prototype.hasOwnProperty.call(_,e),"Unknown curve "+e),e=_[e]),e instanceof _.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var G=z;z.prototype.keyPair=function(e){return new M(this,e)},z.prototype.keyFromPrivate=function(e,t){return M.fromPrivate(this,e,t)},z.prototype.keyFromPublic=function(e,t){return M.fromPublic(this,e,t)},z.prototype.genKeyPair=function(e){e||(e={});for(var t=new x({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||U(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(i())(2));;){var o=new(i())(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},z.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},z.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(i())(e,16));for(var o=this.n.byteLength(),f=t.getPrivate().toArray("be",o),s=e.toArray("be",o),a=new x({hash:this.hash,entropy:f,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new(i())(1)),u=0;;u++){var l=n.k?n.k(u):new(i())(a.generate(this.n.byteLength()));if(!((l=this._truncateToN(l,!0)).cmpn(1)<=0||l.cmp(c)>=0)){var d=this.g.mul(l);if(!d.isInfinity()){var h=d.getX(),b=h.umod(this.n);if(0!==b.cmpn(0)){var p=l.invm(this.n).mul(b.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var m=(d.getY().isOdd()?1:0)|(0!==h.cmp(b)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),m^=1),new O({r:b,s:p,recoveryParam:m})}}}}}},z.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(i())(e,16)),r=this.keyFromPublic(r,n);var o=(t=new O(t,"hex")).r,f=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(f.cmpn(1)<0||f.cmp(this.n)>=0)return!1;var s,a=f.invm(this.n),c=a.mul(e).umod(this.n),u=a.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),u)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),u)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},z.prototype.recoverPubKey=function(e,t,r,n){L((3&r)===r,"The recovery param is more than two bits"),t=new O(t,n);var o=this.n,f=new(i())(e),s=t.r,a=t.s,c=1&r,u=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");s=u?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var l=t.r.invm(o),d=o.sub(f).mul(l).umod(o),h=a.mul(l).umod(o);return this.g.mulAdd(d,s,h)},z.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new O(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var j=s((function(e,t){var r=t;r.version="6.5.4",r.utils=l,r.rand=function(){throw new Error("unsupported")},r.curve=k,r.curves=_,r.ec=G,r.eddsa=null})).ec,Y=r(640),K=r(221);const q=new(r(11).Yd)("signing-key/5.7.0");let H=null;function V(){return H||(H=new j("secp256k1")),H}class J{constructor(e){(0,K.zG)(this,"curve","secp256k1"),(0,K.zG)(this,"privateKey",(0,Y.Dv)(e)),32!==(0,Y.E1)(this.privateKey)&&q.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=V().keyFromPrivate((0,Y.lE)(this.privateKey));(0,K.zG)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,K.zG)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,K.zG)(this,"_isSigningKey",!0)}_addPoint(e){const t=V().keyFromPublic((0,Y.lE)(this.publicKey)),r=V().keyFromPublic((0,Y.lE)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=V().keyFromPrivate((0,Y.lE)(this.privateKey)),r=(0,Y.lE)(e);32!==r.length&&q.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return(0,Y.N)({recoveryParam:n.recoveryParam,r:(0,Y.$m)("0x"+n.r.toString(16),32),s:(0,Y.$m)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=V().keyFromPrivate((0,Y.lE)(this.privateKey)),r=V().keyFromPublic((0,Y.lE)(Q(e)));return(0,Y.$m)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function W(e,t){const r=(0,Y.N)(t),n={r:(0,Y.lE)(r.r),s:(0,Y.lE)(r.s)};return"0x"+V().recoverPubKey((0,Y.lE)(e),n,r.recoveryParam).encode("hex",!1)}function Q(e,t){const r=(0,Y.lE)(e);if(32===r.length){const e=new J(r);return t?"0x"+V().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,Y.Dv)(r):"0x"+V().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+V().keyFromPublic(r).getPublic(!0,"hex"):(0,Y.Dv)(r):q.throwArgumentError("invalid public or private key","key","[REDACTED]")}},222:(e,t,r)=>{"use strict";r.d(t,{Uj:()=>o,te:()=>a,Uw:()=>f,U$:()=>d,uu:()=>h,Y0:()=>u,XL:()=>p,ZN:()=>b});var n=r(640);const i=new(r(11).Yd)("strings/5.7.0");var o,f;function s(e,t,r,n,i){if(e===f.BAD_PREFIX||e===f.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return e===f.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(o||(o={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(f||(f={}));const a=Object.freeze({error:function(e,t,r,n,o){return i.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:s,replace:function(e,t,r,n,i){return e===f.OVERLONG?(n.push(i),0):(n.push(65533),s(e,t,r))}});function c(e,t){null==t&&(t=a.error),e=(0,n.lE)(e);const r=[];let i=0;for(;i<e.length;){const n=e[i++];if(n>>7==0){r.push(n);continue}let o=null,s=null;if(192==(224&n))o=1,s=127;else if(224==(240&n))o=2,s=2047;else{if(240!=(248&n)){i+=t(128==(192&n)?f.UNEXPECTED_CONTINUE:f.BAD_PREFIX,i-1,e,r);continue}o=3,s=65535}if(i-1+o>=e.length){i+=t(f.OVERRUN,i-1,e,r);continue}let a=n&(1<<8-o-1)-1;for(let n=0;n<o;n++){let n=e[i];if(128!=(192&n)){i+=t(f.MISSING_CONTINUE,i,e,r),a=null;break}a=a<<6|63&n,i++}null!==a&&(a>1114111?i+=t(f.OUT_OF_RANGE,i-1-o,e,r,a):a>=55296&&a<=57343?i+=t(f.UTF16_SURROGATE,i-1-o,e,r,a):a<=s?i+=t(f.OVERLONG,i-1-o,e,r,a):r.push(a))}return r}function u(e,t=o.current){t!=o.current&&(i.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return(0,n.lE)(r)}function l(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function d(e,t){return'"'+c(e,t).map((e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?l(e):l(55296+((e-=65536)>>10&1023))+l(56320+(1023&e))})).join("")+'"'}function h(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function b(e,t){return h(c(e,t))}function p(e,t=o.current){return c(u(e,t))}},390:(e,t,r)=>{"use strict";r.d(t,{em:()=>h,z7:()=>E,db:()=>g,Qc:()=>P,RJ:()=>v,qC:()=>S});var n=r(549),i=r(528),o=r(640),f=r(711),s=r(256),a=r(221),c=r(648),u=r(459),l=r(11);const d=new l.Yd("transactions/5.7.0");var h;function b(e){return"0x"===e?null:(0,n.Kn)(e)}function p(e){return"0x"===e?f._Y:i.O$.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(h||(h={}));const m=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],y={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function g(e){const t=(0,u.VW)(e);return(0,n.Kn)((0,o.p3)((0,s.w)((0,o.p3)(t,1)),12))}function v(e,t){return g((0,u.LO)((0,o.lE)(e),t))}function w(e,t){const r=(0,o.G1)(i.O$.from(e).toHexString());return r.length>32&&d.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function A(e,t){return{address:(0,n.Kn)(e),storageKeys:(t||[]).map(((t,r)=>(32!==(0,o.E1)(t)&&d.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function E(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&d.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),A(e[0],e[1])):A(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return A(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function T(e){return E(e).map((e=>[e.address,e.storageKeys]))}function k(e,t){if(null!=e.gasPrice){const t=i.O$.from(e.gasPrice),r=i.O$.from(e.maxFeePerGas||0);t.eq(r)||d.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.Kn)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",T(e.accessList||[])];if(t){const e=(0,o.N)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.G1)(e.r)),r.push((0,o.G1)(e.s))}return(0,o.xs)(["0x02",c.encode(r)])}function _(e,t){const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.Kn)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",T(e.accessList||[])];if(t){const e=(0,o.N)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.G1)(e.r)),r.push((0,o.G1)(e.s))}return(0,o.xs)(["0x01",c.encode(r)])}function S(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&d.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,a.uj)(e,y);const r=[];m.forEach((function(t){let n=e[t.name]||[];const i={};t.numeric&&(i.hexPad="left"),n=(0,o.lE)((0,o.Dv)(n,i)),t.length&&n.length!==t.length&&n.length>0&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,o.G1)(n),n.length>t.maxLength&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push((0,o.Dv)(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!=typeof n&&d.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!(0,o.Zq)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,o.Dv)(n)),r.push("0x"),r.push("0x")),!t)return c.encode(r);const i=(0,o.N)(t);let f=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),f+=2*n+8,i.v>28&&i.v!==f&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==f&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,o.Dv)(f)),r.push((0,o.G1)((0,o.lE)(i.r))),r.push((0,o.G1)((0,o.lE)(i.s))),c.encode(r)}(e,t);switch(e.type){case 1:return _(e,t);case 2:return k(e,t)}return d.throwError(`unsupported transaction type: ${e.type}`,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function x(e,t,r){try{const r=p(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){d.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,o.$m)(t[1],32),e.s=(0,o.$m)(t[2],32);try{const t=(0,s.w)(r(e));e.from=v(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function P(e){const t=(0,o.lE)(e);if(t[0]>127)return function(e){const t=c.decode(e);9!==t.length&&6!==t.length&&d.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:p(t[0]).toNumber(),gasPrice:p(t[1]),gasLimit:p(t[2]),to:b(t[3]),value:p(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=i.O$.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,o.$m)(t[7],32),r.s=(0,o.$m)(t[8],32),i.O$.from(r.r).isZero()&&i.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=t.slice(0,6);0!==r.chainId&&(i.push((0,o.Dv)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);const f=(0,s.w)(c.encode(i));try{r.from=v(f,{r:(0,o.Dv)(r.r),s:(0,o.Dv)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,s.w)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=c.decode(e.slice(1));8!==t.length&&11!==t.length&&d.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.Dv)(e));const r={type:1,chainId:p(t[0]).toNumber(),nonce:p(t[1]).toNumber(),gasPrice:p(t[2]),gasLimit:p(t[3]),to:b(t[4]),value:p(t[5]),data:t[6],accessList:E(t[7])};return 8===t.length||(r.hash=(0,s.w)(e),x(r,t.slice(8),_)),r}(t);case 2:return function(e){const t=c.decode(e.slice(1));9!==t.length&&12!==t.length&&d.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.Dv)(e));const r=p(t[2]),n=p(t[3]),i={type:2,chainId:p(t[0]).toNumber(),nonce:p(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:p(t[4]),to:b(t[5]),value:p(t[6]),data:t[7],accessList:E(t[8])};return 9===t.length||(i.hash=(0,s.w)(e),x(i,t.slice(9),k)),i}(t)}return d.throwError(`unsupported transaction type: ${t[0]}`,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},202:function(e){"use strict";!function(t){function r(e){return parseInt(e)===e}function n(e){if(!r(e.length))return!1;for(var t=0;t<e.length;t++)if(!r(e[t])||e[t]<0||e[t]>255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function f(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var s,a={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r<e.length;){var n=e.charCodeAt(r++);37===n?(t.push(parseInt(e.substr(r,2),16)),r+=2):t.push(n)}return i(t)},fromBytes:function(e){for(var t=[],r=0;r<e.length;){var n=e[r];n<128?(t.push(String.fromCharCode(n)),r++):n>191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},c=(s="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},fromBytes:function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(s[(240&n)>>4]+s[15&n])}return t.join("")}}),u={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],b=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],y=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],w=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],A=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],E=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],T=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],k=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],_=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function S(e){for(var t=[],r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}var x=function(e){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:i(e,!0)}),this._prepare()};x.prototype._prepare=function(){var e=u[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var r,n=4*(e+1),i=this.key.length/4,o=S(this.key);for(t=0;t<i;t++)r=t>>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t];for(var f,s=0,a=i;a<n;){if(f=o[i-1],o[0]^=d[f>>16&255]<<24^d[f>>8&255]<<16^d[255&f]<<8^d[f>>24&255]^l[s]<<24,s+=1,8!=i)for(t=1;t<i;t++)o[t]^=o[t-1];else{for(t=1;t<i/2;t++)o[t]^=o[t-1];for(f=o[i/2-1],o[i/2]^=d[255&f]^d[f>>8&255]<<8^d[f>>16&255]<<16^d[f>>24&255]<<24,t=i/2+1;t<i;t++)o[t]^=o[t-1]}for(t=0;t<i&&a<n;)c=a>>2,h=a%4,this._Ke[c][h]=o[t],this._Kd[e-c][h]=o[t++],a++}for(var c=1;c<e;c++)for(var h=0;h<4;h++)f=this._Kd[c][h],this._Kd[c][h]=E[f>>24&255]^T[f>>16&255]^k[f>>8&255]^_[255&f]},x.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=S(e),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var f=1;f<t;f++){for(i=0;i<4;i++)r[i]=b[n[i]>>24&255]^p[n[(i+1)%4]>>16&255]^m[n[(i+2)%4]>>8&255]^y[255&n[(i+3)%4]]^this._Ke[f][i];n=r.slice()}var s,a=o(16);for(i=0;i<4;i++)s=this._Ke[t][i],a[4*i]=255&(d[n[i]>>24&255]^s>>24),a[4*i+1]=255&(d[n[(i+1)%4]>>16&255]^s>>16),a[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^s>>8),a[4*i+3]=255&(d[255&n[(i+3)%4]]^s);return a},x.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=S(e),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var f=1;f<t;f++){for(i=0;i<4;i++)r[i]=g[n[i]>>24&255]^v[n[(i+3)%4]>>16&255]^w[n[(i+2)%4]>>8&255]^A[255&n[(i+1)%4]]^this._Kd[f][i];n=r.slice()}var s,a=o(16);for(i=0;i<4;i++)s=this._Kd[t][i],a[4*i]=255&(h[n[i]>>24&255]^s>>24),a[4*i+1]=255&(h[n[(i+3)%4]>>16&255]^s>>16),a[4*i+2]=255&(h[n[(i+2)%4]>>8&255]^s>>8),a[4*i+3]=255&(h[255&n[(i+1)%4]]^s);return a};var P=function(e){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new x(e)};P.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16)f(e,r,0,n,n+16),f(r=this._aes.encrypt(r),t,n);return t},P.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16)f(e,r,0,n,n+16),f(r=this._aes.decrypt(r),t,n);return t};var N=function(e,t){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastCipherblock=i(t,!0),this._aes=new x(e)};N.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16){f(e,r,0,n,n+16);for(var s=0;s<16;s++)r[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(r),f(this._lastCipherblock,t,n)}return t},N.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16){f(e,r,0,n,n+16),r=this._aes.decrypt(r);for(var s=0;s<16;s++)t[n+s]=r[s]^this._lastCipherblock[s];f(e,this._lastCipherblock,0,n,n+16)}return t};var M=function(e,t,r){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=o(16);r||(r=1),this.segmentSize=r,this._shiftRegister=i(t,!0),this._aes=new x(e)};M.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,r=i(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)r[n+o]^=t[o];f(this._shiftRegister,this._shiftRegister,0,this.segmentSize),f(r,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r},M.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,r=i(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)r[n+o]^=t[o];f(this._shiftRegister,this._shiftRegister,0,this.segmentSize),f(e,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r};var R=function(e,t){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastPrecipher=i(t,!0),this._lastPrecipherIndex=16,this._aes=new x(e)};R.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[r]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},R.prototype.decrypt=R.prototype.encrypt;var C=function(e){if(!(this instanceof C))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=o(16),this.setValue(e)):this.setBytes(e)};C.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");for(var t=15;t>=0;--t)this._counter[t]=e%256,e>>=8},C.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},C.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var O=function(e,t){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof C||(t=new C(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new x(e)};O.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[r]^=this._remainingCounter[this._remainingCounterIndex++];return t},O.prototype.decrypt=O.prototype.encrypt;var I={AES:x,Counter:C,ModeOfOperation:{ecb:P,cbc:N,cfb:M,ofb:R,ctr:O},utils:{hex:c,utf8:a},padding:{pkcs7:{pad:function(e){var t=16-(e=i(e,!0)).length%16,r=o(e.length+t);f(e,r);for(var n=e.length;n<r.length;n++)r[n]=t;return r},strip:function(e){if((e=i(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n<t;n++)if(e[r+n]!==t)throw new Error("PKCS#7 invalid padding byte");var s=o(r);return f(e,s,0,0,r),s}}},_arrayTest:{coerceArray:i,createArray:o,copyArray:f}};e.exports=I}()},273:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<32;n++){var i=t.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function f(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(t=o(t),r=0;r<e.length;++r){var i=e.charCodeAt(r);t=o(t)^31&i}return t}function s(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var s=(e=n).lastIndexOf("1");if(-1===s)return"No separator character for "+e;if(0===s)return"Missing prefix for "+e;var a=e.slice(0,s),c=e.slice(s+1);if(c.length<6)return"Data too short";var u=f(a);if("string"==typeof u)return u;for(var l=[],d=0;d<c.length;++d){var h=c.charAt(d),b=r[h];if(void 0===b)return"Unknown character "+h;u=o(u)^b,d+6>=c.length||l.push(b)}return 1!==u?"Invalid checksum for "+e:{prefix:a,words:l}}function a(e,t,r,n){for(var i=0,o=0,f=(1<<r)-1,s=[],a=0;a<e.length;++a)for(i=i<<t|e[a],o+=t;o>=r;)o-=r,s.push(i>>o&f);if(n)o>0&&s.push(i<<r-o&f);else{if(o>=t)return"Excess padding";if(i<<r-o&f)return"Non-zero padding"}return s}e.exports={decodeUnsafe:function(){var e=s.apply(null,arguments);if("object"==typeof e)return e},decode:function(e){var t=s.apply(null,arguments);if("object"==typeof t)return t;throw new Error(t)},encode:function(e,r,n){if(n=n||90,e.length+7+r.length>n)throw new TypeError("Exceeds length limit");var i=f(e=e.toLowerCase());if("string"==typeof i)throw new Error(i);for(var s=e+"1",a=0;a<r.length;++a){var c=r[a];if(c>>5!=0)throw new Error("Non 5-bit word");i=o(i)^c,s+=t.charAt(c)}for(a=0;a<6;++a)i=o(i);for(i^=1,a=0;a<6;++a)s+=t.charAt(i>>5*(5-a)&31);return s},toWordsUnsafe:function(e){var t=a(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=a(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=a(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=a(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},197:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var f;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{f="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(196).Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function a(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,f=0,s=Math.min(e.length,r),a=t;a<s;a++){var c=e.charCodeAt(a)-48;o*=i,f=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&f<i,"Invalid character"),o+=f}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,f,s=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)f=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=f<<s&67108863,this.words[o+1]=f>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)f=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=f<<s&67108863,this.words[o+1]=f>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,f=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=a(e,t,n)<<o,this.words[f]|=67108863&i,o>=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=a(e,t,n)<<o,this.words[f]|=67108863&i,o>=18?(o-=18,f+=1,this.words[f]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,f=o%n,s=Math.min(o,o-f)+r,a=0,u=r;u<s;u+=n)a=c(e,u,u+n,t),this.imuln(i),this.words[0]+a<67108864?this.words[0]+=a:this._iaddn(a);if(0!==f){var l=1;for(a=c(e,u,e.length,t),u=0;u<f;u++)l*=t;this.imuln(l),this.words[0]+a<67108864?this.words[0]+=a:this._iaddn(a)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],f=i*o,s=67108863&f,a=f/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var u=a>>>26,l=67108863&a,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var b=c-h|0;u+=(f=(i=0|e.words[b])*(o=0|t.words[h])+l)/67108864|0,l=67108863&f}r.words[c]=0|l,a=0|u}return 0!==a?r.words[c]=0|a:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,f=0;f<this.length;f++){var s=this.words[f],a=(16777215&(s<<i|o)).toString(16);o=s>>>24-i&16777215,(i+=2)>=26&&(i-=26,f--),r=0!==o||f!==this.length-1?d[6-a.length]+a+r:a+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],u=b[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var p=l.modrn(u).toString(e);r=(l=l.idivn(u)).isZero()?p+r:d[c-p.length]+p+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},f&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(f,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var f=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](f,i),f},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var f=this.words[i]<<o|n;e[r++]=255&f,r<e.length&&(e[r++]=f>>8&255),r<e.length&&(e[r++]=f>>16&255),6===o?(r<e.length&&(e[r++]=f>>24&255),n=0,o=0):(n=f>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var f=this.words[i]<<o|n;e[r--]=255&f,r>=0&&(e[r--]=f>>8&255),r>=0&&(e[r--]=f>>16&255),6===o?(r>=0&&(e[r--]=f>>24&255),n=0,o=0):(n=f>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,f=0;f<n.length;f++)o=(t=(0|r.words[f])-(0|n.words[f])+o)>>26,this.words[f]=67108863&t;for(;0!==o&&f<r.length;f++)o=(t=(0|r.words[f])+o)>>26,this.words[f]=67108863&t;if(0===o&&f<r.length&&r!==this)for(;f<r.length;f++)this.words[f]=r.words[f];return this.length=Math.max(this.length,f),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,o,f=e.words,s=t.words,a=r.words,c=0,u=0|f[0],l=8191&u,d=u>>>13,h=0|f[1],b=8191&h,p=h>>>13,m=0|f[2],y=8191&m,g=m>>>13,v=0|f[3],w=8191&v,A=v>>>13,E=0|f[4],T=8191&E,k=E>>>13,_=0|f[5],S=8191&_,x=_>>>13,P=0|f[6],N=8191&P,M=P>>>13,R=0|f[7],C=8191&R,O=R>>>13,I=0|f[8],B=8191&I,D=I>>>13,F=0|f[9],U=8191&F,L=F>>>13,z=0|s[0],G=8191&z,j=z>>>13,Y=0|s[1],K=8191&Y,q=Y>>>13,H=0|s[2],V=8191&H,J=H>>>13,W=0|s[3],Q=8191&W,X=W>>>13,$=0|s[4],Z=8191&$,ee=$>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,fe=ie>>>13,se=0|s[7],ae=8191&se,ce=se>>>13,ue=0|s[8],le=8191&ue,de=ue>>>13,he=0|s[9],be=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(l,G))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(d,G)|0))<<13)|0;c=((o=Math.imul(d,j))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(b,G),i=(i=Math.imul(b,j))+Math.imul(p,G)|0,o=Math.imul(p,j);var ye=(c+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,q)|0)+Math.imul(d,K)|0))<<13)|0;c=((o=o+Math.imul(d,q)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,G),i=(i=Math.imul(y,j))+Math.imul(g,G)|0,o=Math.imul(g,j),n=n+Math.imul(b,K)|0,i=(i=i+Math.imul(b,q)|0)+Math.imul(p,K)|0,o=o+Math.imul(p,q)|0;var ge=(c+(n=n+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,G),i=(i=Math.imul(w,j))+Math.imul(A,G)|0,o=Math.imul(A,j),n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,q)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,q)|0,n=n+Math.imul(b,V)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(p,V)|0,o=o+Math.imul(p,J)|0;var ve=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(T,G),i=(i=Math.imul(T,j))+Math.imul(k,G)|0,o=Math.imul(k,j),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(p,Q)|0,o=o+Math.imul(p,X)|0;var we=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,G),i=(i=Math.imul(S,j))+Math.imul(x,G)|0,o=Math.imul(x,j),n=n+Math.imul(T,K)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(p,Z)|0,o=o+Math.imul(p,ee)|0;var Ae=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(N,G),i=(i=Math.imul(N,j))+Math.imul(M,G)|0,o=Math.imul(M,j),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,q)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,q)|0,n=n+Math.imul(T,V)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(p,re)|0,o=o+Math.imul(p,ne)|0;var Ee=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,fe)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,fe)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(C,G),i=(i=Math.imul(C,j))+Math.imul(O,G)|0,o=Math.imul(O,j),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,q)|0)+Math.imul(M,K)|0,o=o+Math.imul(M,q)|0,n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,fe)|0)+Math.imul(p,oe)|0,o=o+Math.imul(p,fe)|0;var Te=(c+(n=n+Math.imul(l,ae)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(d,ae)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,G),i=(i=Math.imul(B,j))+Math.imul(D,G)|0,o=Math.imul(D,j),n=n+Math.imul(C,K)|0,i=(i=i+Math.imul(C,q)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,q)|0,n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,J)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,fe)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,fe)|0,n=n+Math.imul(b,ae)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(p,ae)|0,o=o+Math.imul(p,ce)|0;var ke=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,j))+Math.imul(L,G)|0,o=Math.imul(L,j),n=n+Math.imul(B,K)|0,i=(i=i+Math.imul(B,q)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,q)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(T,re)|0,i=(i=i+Math.imul(T,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,fe)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,fe)|0,n=n+Math.imul(y,ae)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(g,ae)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(p,le)|0,o=o+Math.imul(p,de)|0;var _e=(c+(n=n+Math.imul(l,be)|0)|0)+((8191&(i=(i=i+Math.imul(l,pe)|0)+Math.imul(d,be)|0))<<13)|0;c=((o=o+Math.imul(d,pe)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(U,K),i=(i=Math.imul(U,q))+Math.imul(L,K)|0,o=Math.imul(L,q),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,fe)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,fe)|0,n=n+Math.imul(w,ae)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,ae)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(y,le)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,de)|0;var Se=(c+(n=n+Math.imul(b,be)|0)|0)+((8191&(i=(i=i+Math.imul(b,pe)|0)+Math.imul(p,be)|0))<<13)|0;c=((o=o+Math.imul(p,pe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,J))+Math.imul(L,V)|0,o=Math.imul(L,J),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,fe)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,fe)|0,n=n+Math.imul(T,ae)|0,i=(i=i+Math.imul(T,ce)|0)+Math.imul(k,ae)|0,o=o+Math.imul(k,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(y,be)|0)|0)+((8191&(i=(i=i+Math.imul(y,pe)|0)+Math.imul(g,be)|0))<<13)|0;c=((o=o+Math.imul(g,pe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,X))+Math.imul(L,Q)|0,o=Math.imul(L,X),n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,fe)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,fe)|0,n=n+Math.imul(S,ae)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(x,ae)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(T,le)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(k,le)|0,o=o+Math.imul(k,de)|0;var Pe=(c+(n=n+Math.imul(w,be)|0)|0)+((8191&(i=(i=i+Math.imul(w,pe)|0)+Math.imul(A,be)|0))<<13)|0;c=((o=o+Math.imul(A,pe)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,Z),i=(i=Math.imul(U,ee))+Math.imul(L,Z)|0,o=Math.imul(L,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,fe)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,fe)|0,n=n+Math.imul(N,ae)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(M,ae)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,de)|0;var Ne=(c+(n=n+Math.imul(T,be)|0)|0)+((8191&(i=(i=i+Math.imul(T,pe)|0)+Math.imul(k,be)|0))<<13)|0;c=((o=o+Math.imul(k,pe)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(L,re)|0,o=Math.imul(L,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,fe)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,fe)|0,n=n+Math.imul(C,ae)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(O,ae)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(N,le)|0,i=(i=i+Math.imul(N,de)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,de)|0;var Me=(c+(n=n+Math.imul(S,be)|0)|0)+((8191&(i=(i=i+Math.imul(S,pe)|0)+Math.imul(x,be)|0))<<13)|0;c=((o=o+Math.imul(x,pe)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,fe))+Math.imul(L,oe)|0,o=Math.imul(L,fe),n=n+Math.imul(B,ae)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(D,ae)|0,o=o+Math.imul(D,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0;var Re=(c+(n=n+Math.imul(N,be)|0)|0)+((8191&(i=(i=i+Math.imul(N,pe)|0)+Math.imul(M,be)|0))<<13)|0;c=((o=o+Math.imul(M,pe)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(U,ae),i=(i=Math.imul(U,ce))+Math.imul(L,ae)|0,o=Math.imul(L,ce),n=n+Math.imul(B,le)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,de)|0;var Ce=(c+(n=n+Math.imul(C,be)|0)|0)+((8191&(i=(i=i+Math.imul(C,pe)|0)+Math.imul(O,be)|0))<<13)|0;c=((o=o+Math.imul(O,pe)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,le),i=(i=Math.imul(U,de))+Math.imul(L,le)|0,o=Math.imul(L,de);var Oe=(c+(n=n+Math.imul(B,be)|0)|0)+((8191&(i=(i=i+Math.imul(B,pe)|0)+Math.imul(D,be)|0))<<13)|0;c=((o=o+Math.imul(D,pe)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Ie=(c+(n=Math.imul(U,be))|0)+((8191&(i=(i=Math.imul(U,pe))+Math.imul(L,be)|0))<<13)|0;return c=((o=Math.imul(L,pe))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,a[0]=me,a[1]=ye,a[2]=ge,a[3]=ve,a[4]=we,a[5]=Ae,a[6]=Ee,a[7]=Te,a[8]=ke,a[9]=_e,a[10]=Se,a[11]=xe,a[12]=Pe,a[13]=Ne,a[14]=Me,a[15]=Re,a[16]=Ce,a[17]=Oe,a[18]=Ie,0!==c&&(a[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var f=i;i=0;for(var s=67108863&n,a=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=a;c++){var u=o-c,l=(0|e.words[u])*(0|t.words[c]),d=67108863&l;s=67108863&(d=d+s|0),i+=(f=(f=f+(l/67108864|0)|0)+(d>>>26)|0)>>>26,f&=67108863}r.words[o]=s,n=f,f=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(e,t,r){return y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(m=p),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?p(this,e,t):r<1024?y(this,e,t):g(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var f=0;f<o;f++)n[f]=t[e[f]],i[f]=r[e[f]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var f=1;f<i;f<<=1)for(var s=f<<1,a=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<i;u+=s)for(var l=a,d=c,h=0;h<f;h++){var b=r[u+h],p=n[u+h],m=r[u+h+f],y=n[u+h+f],g=l*m-d*y;y=l*y+d*m,m=g,r[u+h]=b+m,n[u+h]=p+y,r[u+h+f]=b-m,n[u+h+f]=p-y,h!==s&&(g=a*l-c*d,d=a*d+c*l,l=g)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,f=0;f<t;f++)o+=0|e[f],r[2*f]=8191&o,o>>>=13,r[2*f+1]=8191&o,o>>>=13;for(f=2*t;f<i;++f)r[f]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),f=new Array(n),s=new Array(n),a=new Array(n),c=new Array(n),u=new Array(n),l=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,f,n),this.convert13b(t.words,t.length,c,n),this.transform(f,o,s,a,n,i),this.transform(c,o,u,l,n,i);for(var h=0;h<n;h++){var b=s[h]*u[h]-a[h]*l[h];a[h]=s[h]*l[h]+a[h]*u[h],s[h]=b}return this.conjugate(s,a,n),this.transform(s,a,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,f=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=f>>>26,this.words[i]=67108863&f}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var f=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,a=(0|this.words[t])-s<<r;this.words[t]=a|f,f=s>>>26-r}f&&(this.words[t]=f,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,f=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,a=r;if(i-=f,i=Math.max(0,i),a){for(var c=0;c<f;c++)a.words[c]=this.words[c];a.length=f}if(0===f);else if(this.length>f)for(this.length-=f,c=0;c<this.length;c++)this.words[c]=this.words[c+f];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var l=0|this.words[c];this.words[c]=u<<26-o|l>>>o,u=l&s}return a&&0!==u&&(a.words[a.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,f=e.length+r;this._expand(f);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+s;var a=(0|e.words[i])*t;s=((o-=67108863&a)>>26)-(a/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)s=(o=(0|this.words[i+r])+s)>>26,this.words[i+r]=67108863&o;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,f=0|i.words[i.length-1];0!=(r=26-this._countBits(f))&&(i=i.ushln(r),n.iushln(r),f=0|i.words[i.length-1]);var s,a=n.length-i.length;if("mod"!==t){(s=new o(null)).length=a+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,a);0===u.negative&&(n=u,s&&(s.words[a]=1));for(var l=a-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(d=Math.min(d/f|0,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=d)}return s&&s._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(f=s.mod.neg(),r&&0!==f.negative&&f.iadd(e)),{div:i,mod:f}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(f=s.mod.neg(),r&&0!==f.negative&&f.isub(e)),{div:s.div,mod:f}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,f,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),f=new o(0),s=new o(0),a=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),l=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||f.isOdd())&&(i.iadd(u),f.isub(l)),i.iushrn(1),f.iushrn(1);for(var b=0,p=1;0==(r.words[0]&p)&&b<26;++b,p<<=1);if(b>0)for(r.iushrn(b);b-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(u),a.isub(l)),s.iushrn(1),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),f.isub(a)):(r.isub(t),s.isub(i),a.isub(f))}return{a:s,b:a,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,f=new o(1),s=new o(0),a=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)f.isOdd()&&f.iadd(a),f.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(a),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),f.isub(s)):(r.isub(t),s.isub(f))}return(i=0===t.cmpn(1)?f:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,f=r;0!==o&&f<this.length;f++){var s=0|this.words[f];o=(s+=o)>>>26,s&=67108863,this.words[f]=s}return 0!==o&&(this.words[f]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function T(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function k(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(E,A),E.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var f=0|e.words[i];e.words[i-10]=(f&r)<<4|o>>>22,o=f}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(T,A),i(k,A),i(_,A),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new T;else if("p192"===e)t=new k;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return w[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),f=0;!i.isZero()&&0===i.andln(1);)f++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),a=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(a);)u.redIAdd(a);for(var l=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),b=f;0!==h.cmp(s);){for(var p=h,m=0;0!==p.cmp(s);m++)p=p.redSqr();n(m<b);var y=this.pow(l,new o(1).iushln(b-m-1));d=d.redMul(y),l=y.redSqr(),h=h.redMul(l),b=m}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],f=0,s=0,a=t.bitLength()%26;for(0===a&&(a=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=a-1;u>=0;u--){var l=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==f?(f<<=1,f|=l,(4==++s||0===n&&0===u)&&(i=this.mul(i,r[f]),s=0,f=0)):s=0}a=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,S),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),f=i;return i.cmp(this.m)>=0?f=i.isub(this.m):i.cmpn(0)<0&&(f=i.iadd(this.m)),f._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},825:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseContract:()=>a.VZ,BigNumber:()=>c.O$,Contract:()=>a.CH,ContractFactory:()=>a.lV,FixedNumber:()=>T,Signer:()=>S.E,VoidSigner:()=>S.b,Wallet:()=>at,Wordlist:()=>le,constants:()=>n,errors:()=>l.jK,ethers:()=>s,getDefaultProvider:()=>ri,logger:()=>Ui,providers:()=>i,utils:()=>f,version:()=>Fi,wordlists:()=>pe});var n={};r.r(n),r.d(n,{AddressZero:()=>lt,EtherSymbol:()=>bt,HashZero:()=>ht,MaxInt256:()=>dt.PS,MaxUint256:()=>dt.Bz,MinInt256:()=>dt.$B,NegativeOne:()=>dt.tL,One:()=>dt.fh,Two:()=>dt.Py,WeiPerEther:()=>dt.Ce,Zero:()=>dt._Y});var i={};r.r(i),r.d(i,{AlchemyProvider:()=>un,AlchemyWebSocketProvider:()=>cn,AnkrProvider:()=>bn,BaseProvider:()=>Ur,CloudflareProvider:()=>mn,EtherscanProvider:()=>kn,FallbackProvider:()=>Ln,Formatter:()=>ur,InfuraProvider:()=>Kn,InfuraWebSocketProvider:()=>Yn,IpcProvider:()=>zn,JsonRpcBatchProvider:()=>qn,JsonRpcProvider:()=>Xr,JsonRpcSigner:()=>Jr,NodesmithProvider:()=>Vn,PocketProvider:()=>Qn,Provider:()=>P.zt,Resolver:()=>Br,StaticJsonRpcProvider:()=>on,UrlJsonRpcProvider:()=>fn,Web3Provider:()=>ei,WebSocketProvider:()=>rn,getDefaultProvider:()=>ri,getNetwork:()=>Et,isCommunityResourcable:()=>lr,isCommunityResource:()=>dr,showThrottleMessage:()=>br});var o={};r.r(o),r.d(o,{decode:()=>Tt,encode:()=>kt});var f={};r.r(f),r.d(f,{AbiCoder:()=>ni.R,ConstructorFragment:()=>ii.Xg,ErrorFragment:()=>ii.IC,EventFragment:()=>ii.QV,FormatTypes:()=>ii.pc,Fragment:()=>ii.HY,FunctionFragment:()=>ii.YW,HDNode:()=>Se,Indexed:()=>fi.Hk,Interface:()=>fi.vU,LogDescription:()=>fi.CC,Logger:()=>l.Yd,ParamType:()=>ii._R,RLP:()=>mi,SigningKey:()=>ae.Et,SupportedAlgorithm:()=>Z,TransactionDescription:()=>fi.vk,TransactionTypes:()=>ce.em,UnicodeNormalizationForm:()=>M.Uj,Utf8ErrorFuncs:()=>M.te,Utf8ErrorReason:()=>M.Uw,_TypedDataEncoder:()=>Q,_fetchData:()=>nr,_toEscapedUtf8String:()=>M.U$,accessListify:()=>ce.z7,arrayify:()=>u.lE,base58:()=>$,base64:()=>o,checkProperties:()=>O.uj,checkResultErrors:()=>oi.BR,commify:()=>Ci,computeAddress:()=>ce.db,computeHmac:()=>fe,computePublicKey:()=>ae.VW,concat:()=>u.zo,deepCopy:()=>O.p$,defaultAbiCoder:()=>ni.$,defaultPath:()=>_e,defineReadOnly:()=>O.zG,dnsEncode:()=>Qt,entropyToMnemonic:()=>Ne,fetchJson:()=>ir,formatBytes32String:()=>Pi,formatEther:()=>Bi,formatUnits:()=>Oi,getAccountPath:()=>Re,getAddress:()=>x.Kn,getContractAddress:()=>x.CR,getCreate2Address:()=>x.hB,getIcapAddress:()=>x.vU,getJsonWalletAddress:()=>it,getStatic:()=>O.tu,hashMessage:()=>C,hexConcat:()=>u.xs,hexDataLength:()=>u.E1,hexDataSlice:()=>u.p3,hexStripZeros:()=>u.Ou,hexValue:()=>u.$P,hexZeroPad:()=>u.$m,hexlify:()=>u.Dv,id:()=>B.id,isAddress:()=>x.UJ,isBytes:()=>u._t,isBytesLike:()=>u.Zq,isHexString:()=>u.A7,isValidMnemonic:()=>Me,isValidName:()=>Jt,joinSignature:()=>u.gV,keccak256:()=>N.w,mnemonicToEntropy:()=>Pe,mnemonicToSeed:()=>xe,namehash:()=>Wt,nameprep:()=>xi,parseBytes32String:()=>Ni,parseEther:()=>Di,parseTransaction:()=>ce.Qc,parseUnits:()=>Ii,poll:()=>or,randomBytes:()=>Be,recoverAddress:()=>ce.RJ,recoverPublicKey:()=>ae.LO,resolveProperties:()=>O.mE,ripemd160:()=>ne,serializeTransaction:()=>ce.qC,sha256:()=>ie,sha512:()=>oe,shallowCopy:()=>O.DC,shuffled:()=>_n,solidityKeccak256:()=>bi,solidityPack:()=>hi,soliditySha256:()=>pi,splitSignature:()=>u.N,stripZeros:()=>u.G1,toUtf8Bytes:()=>M.Y0,toUtf8CodePoints:()=>M.XL,toUtf8String:()=>M.ZN,verifyMessage:()=>ct,verifyTypedData:()=>ut,zeroPad:()=>u.Bu});var s={};r.r(s),r.d(s,{BaseContract:()=>a.VZ,BigNumber:()=>c.O$,Contract:()=>a.CH,ContractFactory:()=>a.lV,FixedNumber:()=>T,Signer:()=>S.E,VoidSigner:()=>S.b,Wallet:()=>at,Wordlist:()=>le,constants:()=>n,errors:()=>l.jK,getDefaultProvider:()=>ri,logger:()=>Ui,providers:()=>i,utils:()=>f,version:()=>Fi,wordlists:()=>pe});var a=r(503),c=r(528),u=r(640),l=r(11),d=r(495);const h=new l.Yd(d.i),b={},p=c.O$.from(0),m=c.O$.from(-1);function y(e,t,r,n){const i={fault:t,operation:r};return void 0!==n&&(i.value=n),h.throwError(e,l.Yd.errors.NUMERIC_FAULT,i)}let g="0";for(;g.length<256;)g+=g;function v(e){if("number"!=typeof e)try{e=c.O$.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+g.substring(0,e):h.throwArgumentError("invalid decimal size","decimals",e)}function w(e,t){null==t&&(t=0);const r=v(t),n=(e=c.O$.from(e)).lt(p);n&&(e=e.mul(m));let i=e.mod(r).toString();for(;i.length<r.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];const o=e.div(r).toString();return e=1===r.length?o:o+"."+i,n&&(e="-"+e),e}function A(e,t){null==t&&(t=0);const r=v(t);"string"==typeof e&&e.match(/^-?[0-9.]+$/)||h.throwArgumentError("invalid decimal value","value",e);const n="-"===e.substring(0,1);n&&(e=e.substring(1)),"."===e&&h.throwArgumentError("missing value","value",e);const i=e.split(".");i.length>2&&h.throwArgumentError("too many decimal points","value",e);let o=i[0],f=i[1];for(o||(o="0"),f||(f="0");"0"===f[f.length-1];)f=f.substring(0,f.length-1);for(f.length>r.length-1&&y("fractional component exceeds decimals","underflow","parseFixed"),""===f&&(f="0");f.length<r.length-1;)f+="0";const s=c.O$.from(o),a=c.O$.from(f);let u=s.mul(r).add(a);return n&&(u=u.mul(m)),u}class E{constructor(e,t,r,n){e!==b&&h.throwError("cannot use FixedFormat constructor; use FixedFormat.from",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=t,this.width=r,this.decimals=n,this.name=(t?"":"u")+"fixed"+String(r)+"x"+String(n),this._multiplier=v(n),Object.freeze(this)}static from(e){if(e instanceof E)return e;"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,r=128,n=18;if("string"==typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{const i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||h.throwArgumentError("invalid fixed format","format",e),t="u"!==i[1],r=parseInt(i[2]),n=parseInt(i[3])}else if(e){const i=(t,r,n)=>null==e[t]?n:(typeof e[t]!==r&&h.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&h.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&h.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new E(b,t,r,n)}}class T{constructor(e,t,r,n){e!==b&&h.throwError("cannot use FixedNumber constructor; use FixedNumber.from",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&h.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=A(this._value,this.format.decimals),r=A(e._value,e.format.decimals);return T.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=A(this._value,this.format.decimals),r=A(e._value,e.format.decimals);return T.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=A(this._value,this.format.decimals),r=A(e._value,e.format.decimals);return T.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=A(this._value,this.format.decimals),r=A(e._value,e.format.decimals);return T.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=T.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(k.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=T.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(k.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&h.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=T.from("1"+g.substring(0,e),this.format),n=_.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&h.throwArgumentError("invalid byte width","width",e);const t=c.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,u.$m)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return T.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||(0,c.Zm)(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),T.fromString(w(e,t),E.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=E.from(t),n=A(e,r.decimals);!r.signed&&n.lt(p)&&y("unsigned value cannot be negative","overflow","value",e);let i=null;r.signed?i=n.toTwos(r.width).toHexString():(i=n.toHexString(),i=(0,u.$m)(i,r.width/8));const o=w(n,r.decimals);return new T(b,i,o,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=E.from(t);if((0,u.lE)(e).length>r.width/8)throw new Error("overflow");let n=c.O$.from(e);r.signed&&(n=n.fromTwos(r.width));const i=n.toTwos((r.signed?0:1)+r.width).toHexString(),o=w(n,r.decimals);return new T(b,i,o,r)}static from(e,t){if("string"==typeof e)return T.fromString(e,t);if((0,u._t)(e))return T.fromBytes(e,t);try{return T.fromValue(e,0,t)}catch(e){if(e.code!==l.Yd.errors.INVALID_ARGUMENT)throw e}return h.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const k=T.from(1),_=T.from("0.5");var S=r(327),x=r(549),P=r(772),N=r(256),M=r(222);const R="Ethereum Signed Message:\n";function C(e){return"string"==typeof e&&(e=(0,M.Y0)(e)),(0,N.w)((0,u.zo)([(0,M.Y0)(R),(0,M.Y0)(String(e.length)),e]))}var O=r(221);const I="hash/5.7.0";var B=r(235);const D=new l.Yd(I),F=new Uint8Array(32);F.fill(0);const U=c.O$.from(-1),L=c.O$.from(0),z=c.O$.from(1),G=c.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),j=(0,u.$m)(z.toHexString(),32),Y=(0,u.$m)(L.toHexString(),32),K={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},q=["name","version","chainId","verifyingContract","salt"];function H(e){return function(t){return"string"!=typeof t&&D.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const V={name:H("name"),version:H("version"),chainId:function(e){try{return c.O$.from(e).toString()}catch(e){}return D.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,x.Kn)(e).toLowerCase()}catch(e){}return D.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=(0,u.lE)(e);if(32!==t.length)throw new Error("bad length");return(0,u.Dv)(t)}catch(e){}return D.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function J(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&D.throwArgumentError("invalid numeric width","type",e);const i=G.mask(r?n-1:n),o=r?i.add(z).mul(U):L;return function(t){const r=c.O$.from(t);return(r.lt(o)||r.gt(i))&&D.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),(0,u.$m)(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&D.throwArgumentError("invalid bytes width","type",e),function(t){return(0,u.lE)(t).length!==r&&D.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=(0,u.lE)(e),r=t.length%32;return r?(0,u.xs)([t,F.slice(r)]):(0,u.Dv)(t)}(t)}}}switch(e){case"address":return function(e){return(0,u.$m)((0,x.Kn)(e),32)};case"bool":return function(e){return e?j:Y};case"bytes":return function(e){return(0,N.w)(e)};case"string":return function(e){return(0,B.id)(e)}}return null}function W(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class Q{constructor(e){(0,O.zG)(this,"types",Object.freeze((0,O.p$)(e))),(0,O.zG)(this,"_encoderCache",{}),(0,O.zG)(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const i={};e[n].forEach((o=>{i[o.name]&&D.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(n)}`,"types",e),i[o.name]=!0;const f=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];f===n&&D.throwArgumentError(`circular type reference to ${JSON.stringify(f)}`,"types",e),J(f)||(r[f]||D.throwArgumentError(`unknown type ${JSON.stringify(f)}`,"types",e),r[f].push(n),t[n][f]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?D.throwArgumentError("missing primary type","types",e):i.length>1&&D.throwArgumentError(`ambiguous primary types or unused types: ${i.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,O.zG)(this,"primaryType",i[0]),function i(o,f){f[o]&&D.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),f[o]=!0,Object.keys(t[o]).forEach((e=>{r[e]&&(i(e,f),Object.keys(f).forEach((t=>{n[t][e]=!0})))})),delete f[o]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=W(t,e[t])+r.map((t=>W(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=J(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&D.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(N.w)),(0,N.w)((0,u.xs)(i))}}const r=this.types[e];if(r){const t=(0,B.id)(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?(0,N.w)(n):n}));return n.unshift(t),(0,u.xs)(n)}}return D.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||D.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,N.w)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(J(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&D.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const i=this.types[e];return i?i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{}):D.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Q(e)}static getPrimaryType(e){return Q.from(e).primaryType}static hashStruct(e,t,r){return Q.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=K[r];n||D.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>q.indexOf(e.name)-q.indexOf(t.name))),Q.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,u.xs)(["0x1901",Q.hashDomain(e),Q.from(t).hash(r)])}static hash(e,t,r){return(0,N.w)(Q.encode(e,t,r))}static resolveNames(e,t,r,n){return i=this,o=void 0,s=function*(){e=(0,O.DC)(e);const i={};e.verifyingContract&&!(0,u.A7)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Q.from(t);o.visit(r,((e,t)=>("address"!==e||(0,u.A7)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=o.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:r}},new((f=void 0)||(f=Promise))((function(e,t){function r(e){try{a(s.next(e))}catch(e){t(e)}}function n(e){try{a(s.throw(e))}catch(e){t(e)}}function a(t){var i;t.done?e(t.value):(i=t.value,i instanceof f?i:new f((function(e){e(i)}))).then(r,n)}a((s=s.apply(i,o||[])).next())}));var i,o,f,s}static getPayload(e,t,r){Q.hashDomain(e);const n={},i=[];q.forEach((t=>{const r=e[t];null!=r&&(n[t]=V[t](r),i.push({name:t,type:K[t]}))}));const o=Q.from(t),f=(0,O.DC)(t);return f.EIP712Domain?D.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):f.EIP712Domain=i,o.encode(r),{types:f,domain:n,primaryType:o.primaryType,message:o.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,u.Dv)((0,u.lE)(t));if(e.match(/^u?int/))return c.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&D.throwArgumentError("invalid string","value",t),t}return D.throwArgumentError("unsupported type","type",e)}))}}}class X{constructor(e){(0,O.zG)(this,"alphabet",e),(0,O.zG)(this,"base",e.length),(0,O.zG)(this,"_alphabetMap",{}),(0,O.zG)(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=(0,u.lE)(e);if(0===t.length)return"";let r=[0];for(let e=0;e<t.length;++e){let n=t[e];for(let e=0;e<r.length;++e)n+=r[e]<<8,r[e]=n%this.base,n=n/this.base|0;for(;n>0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e<t.length-1;++e)n+=this._leader;for(let e=r.length-1;e>=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let n=this._alphabetMap[e[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");let i=n;for(let e=0;e<t.length;++e)i+=t[e]*this.base,t[e]=255&i,i>>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return(0,u.lE)(new Uint8Array(t.reverse()))}}new X("abcdefghijklmnopqrstuvwxyz234567");const $=new X("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var Z,ee=r(485),te=r.n(ee);!function(e){e.sha256="sha256",e.sha512="sha512"}(Z||(Z={}));const re=new l.Yd("sha2/5.7.0");function ne(e){return"0x"+te().ripemd160().update((0,u.lE)(e)).digest("hex")}function ie(e){return"0x"+te().sha256().update((0,u.lE)(e)).digest("hex")}function oe(e){return"0x"+te().sha512().update((0,u.lE)(e)).digest("hex")}function fe(e,t,r){return Z[e]||re.throwError("unsupported algorithm "+e,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+te().hmac(te()[e],(0,u.lE)(t)).update((0,u.lE)(r)).digest("hex")}function se(e,t,r,n,i){let o;e=(0,u.lE)(e),t=(0,u.lE)(t);let f=1;const s=new Uint8Array(n),a=new Uint8Array(t.length+4);let c,l;a.set(t);for(let d=1;d<=f;d++){a[t.length]=d>>24&255,a[t.length+1]=d>>16&255,a[t.length+2]=d>>8&255,a[t.length+3]=255&d;let h=(0,u.lE)(fe(i,e,a));o||(o=h.length,l=new Uint8Array(o),f=Math.ceil(n/o),c=n-(f-1)*o),l.set(h);for(let t=1;t<r;t++){h=(0,u.lE)(fe(i,e,h));for(let e=0;e<o;e++)l[e]^=h[e]}const b=(d-1)*o,p=d===f?c:o;s.set((0,u.lE)(l).slice(0,p),b)}return(0,u.Dv)(s)}var ae=r(459),ce=r(390);const ue=new l.Yd("wordlists/5.7.0");class le{constructor(e){ue.checkAbstract(new.target,le),(0,O.zG)(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let r=0;r<2048;r++){const n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,B.id)(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}let de=null;function he(e){if(null==de&&(de="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==le.check(e)))throw de=null,new Error("BIP39 Wordlist for en (English) FAILED")}const be=new class extends le{constructor(){super("en")}getWord(e){return he(this),de[e]}getWordIndex(e){return he(this),de.indexOf(e)}};le.register(be);const pe={en:be},me=new l.Yd("hdnode/5.7.0"),ye=c.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ge=(0,M.Y0)("Bitcoin seed"),ve=2147483648;function we(e){return(1<<e)-1<<8-e}function Ae(e){return(0,u.$m)((0,u.Dv)(e),32)}function Ee(e){return $.encode((0,u.zo)([e,(0,u.p3)(ie(ie(e)),0,4)]))}function Te(e){if(null==e)return pe.en;if("string"==typeof e){const t=pe[e];return null==t&&me.throwArgumentError("unknown locale","wordlist",e),t}return e}const ke={},_e="m/44'/60'/0'/0/0";class Se{constructor(e,t,r,n,i,o,f,s){if(e!==ke)throw new Error("HDNode constructor cannot be called directly");if(t){const e=new ae.Et(t);(0,O.zG)(this,"privateKey",e.privateKey),(0,O.zG)(this,"publicKey",e.compressedPublicKey)}else(0,O.zG)(this,"privateKey",null),(0,O.zG)(this,"publicKey",(0,u.Dv)(r));(0,O.zG)(this,"parentFingerprint",n),(0,O.zG)(this,"fingerprint",(0,u.p3)(ne(ie(this.publicKey)),0,4)),(0,O.zG)(this,"address",(0,ce.db)(this.publicKey)),(0,O.zG)(this,"chainCode",i),(0,O.zG)(this,"index",o),(0,O.zG)(this,"depth",f),null==s?((0,O.zG)(this,"mnemonic",null),(0,O.zG)(this,"path",null)):"string"==typeof s?((0,O.zG)(this,"mnemonic",null),(0,O.zG)(this,"path",s)):((0,O.zG)(this,"mnemonic",s),(0,O.zG)(this,"path",s.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return Ee((0,u.zo)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,u.Dv)(this.depth),this.parentFingerprint,(0,u.$m)((0,u.Dv)(this.index),4),this.chainCode,null!=this.privateKey?(0,u.zo)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Se(ke,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~ve));const r=new Uint8Array(37);if(e&ve){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set((0,u.lE)(this.privateKey),1),t&&(t+="'")}else r.set((0,u.lE)(this.publicKey));for(let t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;const n=(0,u.lE)(fe(Z.sha512,this.chainCode,r)),i=n.slice(0,32),o=n.slice(32);let f=null,s=null;this.privateKey?f=Ae(c.O$.from(i).add(this.privateKey).mod(ye)):s=new ae.Et((0,u.Dv)(i))._addPoint(this.publicKey);let a=t;const l=this.mnemonic;return l&&(a=Object.freeze({phrase:l.phrase,path:t,locale:l.locale||"en"})),new Se(ke,f,s,this.fingerprint,Ae(o),e,this.depth+1,a)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let e=0;e<t.length;e++){const n=t[e];if(n.match(/^[0-9]+'$/)){const e=parseInt(n.substring(0,n.length-1));if(e>=ve)throw new Error("invalid path index - "+n);r=r._derive(ve+e)}else{if(!n.match(/^[0-9]+$/))throw new Error("invalid path component - "+n);{const e=parseInt(n);if(e>=ve)throw new Error("invalid path index - "+n);r=r._derive(e)}}}return r}static _fromSeed(e,t){const r=(0,u.lE)(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=(0,u.lE)(fe(Z.sha512,ge,r));return new Se(ke,Ae(n.slice(0,32)),null,"0x00000000",Ae(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=Ne(Pe(e,r=Te(r)),r),Se._fromSeed(xe(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return Se._fromSeed(e,null)}static fromExtendedKey(e){const t=$.decode(e);82===t.length&&Ee(t.slice(0,78))===e||me.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],n=(0,u.Dv)(t.slice(5,9)),i=parseInt((0,u.Dv)(t.slice(9,13)).substring(2),16),o=(0,u.Dv)(t.slice(13,45)),f=t.slice(45,78);switch((0,u.Dv)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Se(ke,null,(0,u.Dv)(f),n,o,i,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==f[0])break;return new Se(ke,(0,u.Dv)(f.slice(1)),null,n,o,i,r,null)}return me.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function xe(e,t){t||(t="");const r=(0,M.Y0)("mnemonic"+t,M.Uj.NFKD);return se((0,M.Y0)(e,M.Uj.NFKD),r,2048,64,"sha512")}function Pe(e,t){t=Te(t),me.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=(0,u.lE)(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let e=0;e<r.length;e++){let o=t.getWordIndex(r[e].normalize("NFKD"));if(-1===o)throw new Error("invalid mnemonic");for(let e=0;e<11;e++)o&1<<10-e&&(n[i>>3]|=1<<7-i%8),i++}const o=32*r.length/3,f=we(r.length/3);if(((0,u.lE)(ie(n.slice(0,o/8)))[0]&f)!=(n[n.length-1]&f))throw new Error("invalid checksum");return(0,u.Dv)(n.slice(0,o/8))}function Ne(e,t){if(t=Te(t),(e=(0,u.lE)(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let t=0;t<e.length;t++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&(1<<8-n)-1),n+=3);const i=e.length/4,o=(0,u.lE)(ie(e))[0]&we(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,t.join(r.map((e=>t.getWord(e))))}function Me(e,t){try{return Pe(e,t),!0}catch(e){}return!1}function Re(e){return("number"!=typeof e||e<0||e>=ve||e%1)&&me.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}const Ce=new l.Yd("random/5.7.0"),Oe=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();let Ie=Oe.crypto||Oe.msCrypto;function Be(e){(e<=0||e>1024||e%1||e!=e)&&Ce.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return Ie.getRandomValues(t),(0,u.lE)(t)}Ie&&Ie.getRandomValues||(Ce.warn("WARNING: Missing strong random number source"),Ie={getRandomValues:function(e){return Ce.throwError("no secure random source avaialble",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var De=r(202),Fe=r.n(De),Ue=r(689),Le=r.n(Ue);function ze(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,u.lE)(e)}function Ge(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}function je(e){return"string"==typeof e?(0,M.Y0)(e,M.Uj.NFKC):(0,u.lE)(e)}function Ye(e,t){let r=e;const n=t.toLowerCase().split("/");for(let e=0;e<n.length;e++){let t=null;for(const i in r)if(i.toLowerCase()===n[e]){t=r[i];break}if(null===t)return null;r=t}return r}function Ke(e){const t=(0,u.lE)(e);t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=(0,u.Dv)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const qe="json-wallets/5.7.0";const He=new l.Yd(qe);function Ve(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}class Je extends O.dk{isKeystoreAccount(e){return!(!e||!e._isKeystoreAccount)}}function We(e,t){const r=ze(Ye(e,"crypto/ciphertext"));if((0,u.Dv)((0,N.w)((0,u.zo)([t.slice(16,32),r]))).substring(2)!==Ye(e,"crypto/mac").toLowerCase())throw new Error("invalid password");const n=function(e,t,r){if("aes-128-ctr"===Ye(e,"crypto/cipher")){const n=ze(Ye(e,"crypto/cipherparams/iv")),i=new(Fe().Counter)(n),o=new(Fe().ModeOfOperation.ctr)(t,i);return(0,u.lE)(o.decrypt(r))}return null}(e,t.slice(0,16),r);n||He.throwError("unsupported cipher",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const i=t.slice(32,64),o=(0,ce.db)(n);if(e.address){let t=e.address.toLowerCase();if("0x"!==t.substring(0,2)&&(t="0x"+t),(0,x.Kn)(t)!==o)throw new Error("address mismatch")}const f={_isKeystoreAccount:!0,address:o,privateKey:(0,u.Dv)(n)};if("0.1"===Ye(e,"x-ethers/version")){const t=ze(Ye(e,"x-ethers/mnemonicCiphertext")),r=ze(Ye(e,"x-ethers/mnemonicCounter")),n=new(Fe().Counter)(r),o=new(Fe().ModeOfOperation.ctr)(i,n),s=Ye(e,"x-ethers/path")||_e,a=Ye(e,"x-ethers/locale")||"en",c=(0,u.lE)(o.decrypt(t));try{const e=Ne(c,a),t=Se.fromMnemonic(e,null,a).derivePath(s);if(t.privateKey!=f.privateKey)throw new Error("mnemonic mismatch");f.mnemonic=t.mnemonic}catch(e){if(e.code!==l.Yd.errors.INVALID_ARGUMENT||"wordlist"!==e.argument)throw e}}return new Je(f)}function Qe(e,t,r,n,i){return(0,u.lE)(se(e,t,r,n,i))}function Xe(e,t,r,n,i){return Promise.resolve(Qe(e,t,r,n,i))}function $e(e,t,r,n,i){const o=je(t),f=Ye(e,"crypto/kdf");if(f&&"string"==typeof f){const t=function(e,t){return He.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===f.toLowerCase()){const r=ze(Ye(e,"crypto/kdfparams/salt")),s=parseInt(Ye(e,"crypto/kdfparams/n")),a=parseInt(Ye(e,"crypto/kdfparams/r")),c=parseInt(Ye(e,"crypto/kdfparams/p"));s&&a&&c||t("kdf",f),0!=(s&s-1)&&t("N",s);const u=parseInt(Ye(e,"crypto/kdfparams/dklen"));return 32!==u&&t("dklen",u),n(o,r,s,a,c,64,i)}if("pbkdf2"===f.toLowerCase()){const n=ze(Ye(e,"crypto/kdfparams/salt"));let i=null;const f=Ye(e,"crypto/kdfparams/prf");"hmac-sha256"===f?i="sha256":"hmac-sha512"===f?i="sha512":t("prf",f);const s=parseInt(Ye(e,"crypto/kdfparams/c")),a=parseInt(Ye(e,"crypto/kdfparams/dklen"));return 32!==a&&t("dklen",a),r(o,n,s,a,i)}}return He.throwArgumentError("unsupported key-derivation function","kdf",f)}const Ze=new l.Yd(qe);class et extends O.dk{isCrowdsaleAccount(e){return!(!e||!e._isCrowdsaleAccount)}}function tt(e,t){const r=JSON.parse(e);t=je(t);const n=(0,x.Kn)(Ye(r,"ethaddr")),i=ze(Ye(r,"encseed"));i&&i.length%16==0||Ze.throwArgumentError("invalid encseed","json",e);const o=(0,u.lE)(se(t,t,2e3,32,"sha256")).slice(0,16),f=i.slice(0,16),s=i.slice(16),a=new(Fe().ModeOfOperation.cbc)(o,f),c=Fe().padding.pkcs7.strip((0,u.lE)(a.decrypt(s)));let l="";for(let e=0;e<c.length;e++)l+=String.fromCharCode(c[e]);const d=(0,M.Y0)(l),h=(0,N.w)(d);return new et({_isCrowdsaleAccount:!0,address:n,privateKey:h})}function rt(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}function nt(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function it(e){if(rt(e))try{return(0,x.Kn)(JSON.parse(e).ethaddr)}catch(e){return null}if(nt(e))try{return(0,x.Kn)(JSON.parse(e).address)}catch(e){return null}return null}function ot(e,t,r){if(rt(e)){r&&r(0);const n=tt(e,t);return r&&r(1),Promise.resolve(n)}return nt(e)?function(e,t,r){return n=this,i=void 0,f=function*(){const n=JSON.parse(e);return We(n,yield $e(n,t,Xe,Le().scrypt,r))},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{a(f.next(e))}catch(e){t(e)}}function s(e){try{a(f.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(r,s)}a((f=f.apply(n,i||[])).next())}));var n,i,o,f}(e,t,r):Promise.reject(new Error("invalid JSON wallet"))}var ft=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};const st=new l.Yd("wallet/5.7.0");class at extends S.E{constructor(e,t){if(super(),null!=(r=e)&&(0,u.A7)(r.privateKey,32)&&null!=r.address){const t=new ae.Et(e.privateKey);if((0,O.zG)(this,"_signingKey",(()=>t)),(0,O.zG)(this,"address",(0,ce.db)(this.publicKey)),this.address!==(0,x.Kn)(e.address)&&st.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;(0,O.zG)(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||_e,locale:t.locale||"en"})));const r=this.mnemonic,n=Se.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,ce.db)(n.privateKey)!==this.address&&st.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,O.zG)(this,"_mnemonic",(()=>null))}else{if(ae.Et.isSigningKey(e))"secp256k1"!==e.curve&&st.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,O.zG)(this,"_signingKey",(()=>e));else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new ae.Et(e);(0,O.zG)(this,"_signingKey",(()=>t))}(0,O.zG)(this,"_mnemonic",(()=>null)),(0,O.zG)(this,"address",(0,ce.db)(this.publicKey))}var r;t&&!P.zt.isProvider(t)&&st.throwArgumentError("invalid provider","provider",t),(0,O.zG)(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new at(this,e)}signTransaction(e){return(0,O.mE)(e).then((t=>{null!=t.from&&((0,x.Kn)(t.from)!==this.address&&st.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest((0,N.w)((0,ce.qC)(t)));return(0,ce.qC)(t,r)}))}signMessage(e){return ft(this,void 0,void 0,(function*(){return(0,u.gV)(this._signingKey().signDigest(C(e)))}))}_signTypedData(e,t,r){return ft(this,void 0,void 0,(function*(){const n=yield Q.resolveNames(e,t,r,(e=>(null==this.provider&&st.throwError("cannot resolve ENS names without a provider",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return(0,u.gV)(this._signingKey().signDigest(Q.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback");return t||(t={}),function(e,t,r,n){try{if((0,x.Kn)(e.address)!==(0,ce.db)(e.privateKey))throw new Error("address/privateKey mismatch");if(Ve(e)){const t=e.mnemonic;if(Se.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||_e).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(e){return Promise.reject(e)}"function"!=typeof r||n||(n=r,r={}),r||(r={});const i=(0,u.lE)(e.privateKey),o=je(t);let f=null,s=null,a=null;if(Ve(e)){const t=e.mnemonic;f=(0,u.lE)(Pe(t.phrase,t.locale||"en")),s=t.path||_e,a=t.locale||"en"}let c=r.client;c||(c="ethers.js");let l=null;l=r.salt?(0,u.lE)(r.salt):Be(32);let d=null;if(r.iv){if(d=(0,u.lE)(r.iv),16!==d.length)throw new Error("invalid iv")}else d=Be(16);let h=null;if(r.uuid){if(h=(0,u.lE)(r.uuid),16!==h.length)throw new Error("invalid uuid")}else h=Be(16);let b=1<<17,p=8,m=1;return r.scrypt&&(r.scrypt.N&&(b=r.scrypt.N),r.scrypt.r&&(p=r.scrypt.r),r.scrypt.p&&(m=r.scrypt.p)),Le().scrypt(o,l,b,p,m,64,n).then((t=>{const r=(t=(0,u.lE)(t)).slice(0,16),n=t.slice(16,32),o=t.slice(32,64),y=new(Fe().Counter)(d),g=new(Fe().ModeOfOperation.ctr)(r,y),v=(0,u.lE)(g.encrypt(i)),w=(0,N.w)((0,u.zo)([n,v])),A={address:e.address.substring(2).toLowerCase(),id:Ke(h),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,u.Dv)(d).substring(2)},ciphertext:(0,u.Dv)(v).substring(2),kdf:"scrypt",kdfparams:{salt:(0,u.Dv)(l).substring(2),n:b,dklen:32,p:m,r:p},mac:w.substring(2)}};if(f){const e=Be(16),t=new(Fe().Counter)(e),r=new(Fe().ModeOfOperation.ctr)(o,t),n=(0,u.lE)(r.encrypt(f)),i=new Date,l=i.getUTCFullYear()+"-"+Ge(i.getUTCMonth()+1,2)+"-"+Ge(i.getUTCDate(),2)+"T"+Ge(i.getUTCHours(),2)+"-"+Ge(i.getUTCMinutes(),2)+"-"+Ge(i.getUTCSeconds(),2)+".0Z";A["x-ethers"]={client:c,gethFilename:"UTC--"+l+"--"+A.address,mnemonicCounter:(0,u.Dv)(e).substring(2),mnemonicCiphertext:(0,u.Dv)(n).substring(2),path:s,locale:a,version:"0.1"}}return JSON.stringify(A)}))}(this,e,t,r)}static createRandom(e){let t=Be(16);e||(e={}),e.extraEntropy&&(t=(0,u.lE)((0,u.p3)((0,N.w)((0,u.zo)([t,e.extraEntropy])),0,16)));const r=Ne(t,e.locale);return at.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return ot(e,t,r).then((e=>new at(e)))}static fromEncryptedJsonSync(e,t){return new at(function(e,t){if(rt(e))return tt(e,t);if(nt(e))return function(e,t){const r=JSON.parse(e);return We(r,$e(r,t,Qe,Le().syncScrypt))}(e,t);throw new Error("invalid JSON wallet")}(e,t))}static fromMnemonic(e,t,r){return t||(t=_e),new at(Se.fromMnemonic(e,null,r).derivePath(t))}}function ct(e,t){return(0,ce.RJ)(C(e),t)}function ut(e,t,r,n){return(0,ce.RJ)(Q.hash(e,t,r),n)}const lt="0x0000000000000000000000000000000000000000";var dt=r(711);const ht="0x0000000000000000000000000000000000000000000000000000000000000000",bt="Ξ",pt=new l.Yd("networks/5.7.1");function mt(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new t.PocketProvider(e,r.pocket);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new t.AnkrProvider(e,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return mt(e)},t}function yt(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return yt(e,t)},r}const gt={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:mt("homestead")},vt={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:mt("ropsten")},wt={chainId:63,name:"classicMordor",_defaultProvider:yt("https://www.ethercluster.com/mordor","classicMordor")},At={unspecified:{chainId:0,name:"unspecified"},homestead:gt,mainnet:gt,morden:{chainId:2,name:"morden"},ropsten:vt,testnet:vt,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:mt("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:mt("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:mt("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:mt("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:yt("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:wt,classicTestnet:wt,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:yt("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:mt("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:mt("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function Et(e){if(null==e)return null;if("number"==typeof e){for(const t in At){const r=At[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=At[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=At[e.name];if(!t)return"number"!=typeof e.chainId&&pt.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&pt.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var n;return null==r&&t._defaultProvider&&(r=(n=t._defaultProvider)&&"function"==typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}function Tt(e){e=atob(e);const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return(0,u.lE)(t)}function kt(e){e=(0,u.lE)(e);let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function _t(e,t){null==t&&(t=1);const r=[],n=r.forEach,i=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function St(e){return 1&e?~e>>1:e>>1}function xt(e,t){let r=Array(e);for(let n=0,i=-1;n<e;n++)r[n]=i+=1+t();return r}function Pt(e,t){let r=Array(e);for(let n=0,i=0;n<e;n++)r[n]=i+=St(t());return r}function Nt(e,t){let r=xt(e(),e),n=e(),i=xt(n,e),o=function(e,t){let r=Array(e);for(let n=0;n<e;n++)r[n]=1+t();return r}(n,e);for(let e=0;e<n;e++)for(let t=0;t<o[e];t++)r.push(i[e]+t);return t?r.map((e=>t[e])):r}function Mt(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;i<t;i++)Pt(e,r).forEach(((e,t)=>n[t].push(e)));return n}function Rt(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return _t(Mt(i.length,1+e,t).map(((e,t)=>{const o=e[0],f=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[o+t*r,f.map((e=>e+i))]}))})))}function Ct(e,t){return Mt(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const Ot=function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e<n;e++)o.push(i+=r());let f=r(),s=t;t+=f;let a=0,c=0;function u(){return 0==a&&(c=c<<8|e[t++],a=8),c>>--a&1}const l=Math.pow(2,31),d=l>>>1,h=d>>1,b=l-1;let p=0;for(let e=0;e<31;e++)p=p<<1|u();let m=[],y=0,g=l;for(;;){let e=Math.floor(((p-y+1)*i-1)/g),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<o[n]?r=n:t=n}if(0==t)break;m.push(t);let f=y+Math.floor(g*o[t]/i),s=y+Math.floor(g*o[t+1]/i)-1;for(;0==((f^s)&d);)p=p<<1&b|u(),f=f<<1&b,s=s<<1&b|1;for(;f&~s&h;)p=p&d|p<<1&b>>>1|u(),f=f<<1^d,s=(s^d)<<1|d|1;y=f,g=1+s-f}let v=n-4;return m.map((t=>{switch(t-v){case 3:return v+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return v+256+(e[s++]<<8|e[s++]);case 1:return v+e[s++];default:return t-1}}))}(Tt("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))),It=new Set(Nt(Ot)),Bt=new Set(Nt(Ot)),Dt=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(Rt(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(Ct(r,e))}return function(e){const t={};for(let r=0;r<e.length;r++){const n=e[r];t[n[0]]=n[1]}return t}(_t(t))}(Ot),Ft=function(e){let t=Nt(e).sort(((e,t)=>e-t));return function r(){let n=[];for(;;){let i=Nt(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let f=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:f,save:1==i,check:2==i}}()}(Ot),Ut=45,Lt=95;function zt(e){return(0,M.XL)(e)}function Gt(e){return e.filter((e=>65039!=e))}function jt(e){for(let t of e.split(".")){let e=zt(t);try{for(let t=e.lastIndexOf(Lt)-1;t>=0;t--)if(e[t]!==Lt)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===Ut&&e[3]===Ut)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function Yt(e,t){var r;let n,i,o=Ft,f=[],s=e.length;for(t&&(t.length=0);s;){let a=e[--s];if(o=null===(r=o.branches.find((e=>e.set.has(a))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=a;else if(o.check&&a===i)break;f.push(a),o.fe0f&&(f.push(65039),s>0&&65039==e[s-1]&&s--),o.valid&&(n=f.slice(),2==o.valid&&n.splice(1,1),t&&t.push(...e.slice(s).reverse()),e.length=s)}return n}const Kt=new l.Yd(I),qt=new Uint8Array(32);function Ht(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function Vt(e){const t=(0,M.Y0)(function(e){return jt(function(e,t){let r=zt(e).reverse(),n=[];for(;r.length;){let e=Yt(r);if(e){n.push(...t(e));continue}let i=r.pop();if(It.has(i)){n.push(i);continue}if(Bt.has(i))continue;let o=Dt[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...o)}return jt(String.fromCodePoint(...n).normalize("NFC"))}(e,Gt))}(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++)46===t[e]&&(r.push(Ht(t.slice(n,e))),n=e+1);if(n>=t.length)throw new Error("invalid ENS name; empty component");return r.push(Ht(t.slice(n))),r}function Jt(e){try{return 0!==Vt(e).length}catch(e){}return!1}function Wt(e){"string"!=typeof e&&Kt.throwArgumentError("invalid ENS name; not a string","name",e);let t=qt;const r=Vt(e);for(;r.length;)t=(0,N.w)((0,u.zo)([t,(0,N.w)(r.pop())]));return(0,u.Dv)(t)}function Qt(e){return(0,u.Dv)((0,u.zo)(Vt(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}qt.fill(0);var Xt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};function $t(e,t){return Xt(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach(((e,t)=>{o[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{o[e.toLowerCase()]=n.headers.get(e)})),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:(0,u.lE)(new Uint8Array(i))}}))}var Zt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};const er=new l.Yd("web/5.7.1");function tr(e){return new Promise((t=>{setTimeout(t,e)}))}function rr(e,t){if(null==e)return null;if("string"==typeof e)return e;if((0,u.Zq)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,M.ZN)(e)}catch(e){}return(0,u.Dv)(e)}return e}function nr(e,t,r){const n="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;er.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);const i="object"==typeof e?e.throttleCallback:null,o="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;er.assertArgument(o>0&&o%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const f="object"==typeof e&&!!e.errorPassThrough,s={};let a=null;const c={method:"GET"};let u=!1,d=12e4;if("string"==typeof e)a=e;else if("object"==typeof e){if(null!=e&&null!=e.url||er.throwArgumentError("missing URL","connection.url",e),a=e.url,"number"==typeof e.timeout&&e.timeout>0&&(d=e.timeout),e.headers)for(const t in e.headers)s[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(u=!0);if(c.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==a.substring(0,6)&&!0!==e.allowInsecureAuthentication&&er.throwError("basic authentication requires a secure https url",l.Yd.errors.INVALID_ARGUMENT,{argument:"url",url:a,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;s.authorization={key:"Authorization",value:"Basic "+kt((0,M.Y0)(t))}}null!=e.skipFetchSetup&&(c.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(c.fetchOptions=(0,O.DC)(e.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),b=a?a.match(h):null;if(b)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":b[1]||"text/plain"},body:b[2]?Tt(b[3]):(p=b[3],(0,M.Y0)(p.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){er.throwError("processing response error",l.Yd.errors.SERVER_ERROR,{body:rr(b[1],b[2]),error:e,requestBody:null,requestMethod:"GET",url:a})}var p;t&&(c.method="POST",c.body=t,null==s["content-type"]&&(s["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==s["content-length"]&&(s["content-length"]={key:"Content-Length",value:String(t.length)}));const m={};Object.keys(s).forEach((e=>{const t=s[e];m[t.key]=t.value})),c.headers=m;const y=function(){let e=null;return{promise:new Promise((function(t,r){d&&(e=setTimeout((()=>{null!=e&&(e=null,r(er.makeError("timeout",l.Yd.errors.TIMEOUT,{requestBody:rr(c.body,m["content-type"]),requestMethod:c.method,timeout:d,url:a})))}),d))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),g=function(){return Zt(this,void 0,void 0,(function*(){for(let e=0;e<n;e++){let t=null;try{if(t=yield $t(a,c),e<n)if(301===t.statusCode||302===t.statusCode){const e=t.headers.location||"";if("GET"===c.method&&e.match(/^https:/)){a=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(i&&(r=yield i(e,a)),r){let r=0;const n=t.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):o*parseInt(String(Math.random()*Math.pow(2,e))),yield tr(r);continue}}}catch(e){t=e.response,null==t&&(y.cancel(),er.throwError("missing response",l.Yd.errors.SERVER_ERROR,{requestBody:rr(c.body,m["content-type"]),requestMethod:c.method,serverError:e,url:a}))}let s=t.body;if(u&&304===t.statusCode?s=null:!f&&(t.statusCode<200||t.statusCode>=300)&&(y.cancel(),er.throwError("bad response",l.Yd.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:rr(s,t.headers?t.headers["content-type"]:null),requestBody:rr(c.body,m["content-type"]),requestMethod:c.method,url:a})),r)try{const e=yield r(s,t);return y.cancel(),e}catch(r){if(r.throttleRetry&&e<n){let t=!0;if(i&&(t=yield i(e,a)),t){const t=o*parseInt(String(Math.random()*Math.pow(2,e)));yield tr(t);continue}}y.cancel(),er.throwError("processing response error",l.Yd.errors.SERVER_ERROR,{body:rr(s,t.headers?t.headers["content-type"]:null),error:r,requestBody:rr(c.body,m["content-type"]),requestMethod:c.method,url:a})}return y.cancel(),s}return er.throwError("failed response",l.Yd.errors.SERVER_ERROR,{requestBody:rr(c.body,m["content-type"]),requestMethod:c.method,url:a})}))}();return Promise.race([y.promise,g])}function ir(e,t,r){let n=null;if(null!=t){n=(0,M.Y0)(t);const r="string"==typeof e?{url:e}:(0,O.DC)(e);r.headers?0!==Object.keys(r.headers).filter((e=>"content-type"===e.toLowerCase())).length||(r.headers=(0,O.DC)(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},e=r}return nr(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse((0,M.ZN)(e))}catch(t){er.throwError("invalid JSON",l.Yd.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function or(e,t){return t||(t={}),null==(t=(0,O.DC)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let i=null,o=!1;const f=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout((()=>{f()&&n(new Error("timeout"))}),t.timeout));const s=t.retryLimit;let a=0;!function i(){return e().then((function(e){if(void 0!==e)f()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(a++,a>s)return void(f()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,a)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){f()&&n(e)}))}()}))}var fr=r(273),sr=r.n(fr);const ar="providers/5.7.2",cr=new l.Yd(ar);class ur{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),f=this.hex.bind(this),s=this.number.bind(this),a=this.type.bind(this);return e.transaction={hash:o,type:a,accessList:ur.allowNull(this.accessList.bind(this),null),blockHash:ur.allowNull(o,null),blockNumber:ur.allowNull(s,null),transactionIndex:ur.allowNull(s,null),confirmations:ur.allowNull(s,null),from:t,gasPrice:ur.allowNull(r),maxPriorityFeePerGas:ur.allowNull(r),maxFeePerGas:ur.allowNull(r),gasLimit:r,to:ur.allowNull(t,null),value:r,nonce:s,data:i,r:ur.allowNull(this.uint256),s:ur.allowNull(this.uint256),v:ur.allowNull(s),creates:ur.allowNull(t,null),raw:ur.allowNull(i)},e.transactionRequest={from:ur.allowNull(t),nonce:ur.allowNull(s),gasLimit:ur.allowNull(r),gasPrice:ur.allowNull(r),maxPriorityFeePerGas:ur.allowNull(r),maxFeePerGas:ur.allowNull(r),to:ur.allowNull(t),value:ur.allowNull(r),data:ur.allowNull((e=>this.data(e,!0))),type:ur.allowNull(s),accessList:ur.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:s,blockNumber:s,transactionHash:o,address:t,topics:ur.arrayOf(o),data:i,logIndex:s,blockHash:o},e.receipt={to:ur.allowNull(this.address,null),from:ur.allowNull(this.address,null),contractAddress:ur.allowNull(t,null),transactionIndex:s,root:ur.allowNull(f),gasUsed:r,logsBloom:ur.allowNull(i),blockHash:o,transactionHash:o,logs:ur.arrayOf(this.receiptLog.bind(this)),blockNumber:s,confirmations:ur.allowNull(s,null),cumulativeGasUsed:r,effectiveGasPrice:ur.allowNull(r),status:ur.allowNull(s),type:a},e.block={hash:ur.allowNull(o),parentHash:o,number:s,timestamp:s,nonce:ur.allowNull(f),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:ur.allowNull(t),extraData:i,transactions:ur.allowNull(ur.arrayOf(o)),baseFeePerGas:ur.allowNull(r)},e.blockWithTransactions=(0,O.DC)(e.block),e.blockWithTransactions.transactions=ur.allowNull(ur.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ur.allowNull(n,void 0),toBlock:ur.allowNull(n,void 0),blockHash:ur.allowNull(o,void 0),address:ur.allowNull(t,void 0),topics:ur.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ur.allowNull(s),blockHash:ur.allowNull(o),transactionIndex:s,removed:ur.allowNull(this.boolean.bind(this)),address:t,data:ur.allowFalsish(i,"0x"),topics:ur.arrayOf(o),transactionHash:o,logIndex:s},e}accessList(e){return(0,ce.z7)(e||[])}number(e){return"0x"===e?0:c.O$.from(e).toNumber()}type(e){return"0x"===e||null==e?0:c.O$.from(e).toNumber()}bigNumber(e){return c.O$.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,u.A7)(e))?e.toLowerCase():cr.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return(0,x.Kn)(e)}callAddress(e){if(!(0,u.A7)(e,32))return null;const t=(0,x.Kn)((0,u.p3)(e,12));return t===lt?null:t}contractAddress(e){return(0,x.CR)(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||(0,u.A7)(e))return(0,u.$P)(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==(0,u.E1)(r)?cr.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=c.O$.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!(0,u.A7)(e))throw new Error("invalid uint256");return(0,u.$m)(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=ur.check(t,e);return n._difficulty=null==r?null:c.O$.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ur.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&c.O$.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=ur.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;(0,u.A7)(r)&&(r=c.O$.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),(0,u.A7)(r)&&(r=c.O$.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return(0,ce.Qc)(e)}receiptLog(e){return ur.check(this.formats.receiptLog,e)}receipt(e){const t=ur.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=c.O$.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&cr.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):cr.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&cr.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return ur.check(this.formats.filter,e)}filterLog(e){return ur.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const i=e[n](t[n]);void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}function lr(e){return e&&"function"==typeof e.isCommunityResource}function dr(e){return lr(e)&&e.isCommunityResource()}let hr=!1;function br(){hr||(hr=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var pr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};const mr=new l.Yd(ar);function yr(e){return null==e?"null":(32!==(0,u.E1)(e)&&mr.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function gr(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[yr(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return yr(e)})).join("&")}function vr(e){if("string"==typeof e){if(e=e.toLowerCase(),32===(0,u.E1)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+gr(e);if(P.Sg.isForkEvent(e))throw mr.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+gr(e.topics||[])}throw new Error("invalid event - "+e)}function wr(){return(new Date).getTime()}function Ar(e){return new Promise((t=>{setTimeout(t,e)}))}const Er=["block","network","pending","poll"];class Tr{constructor(e,t,r){(0,O.zG)(this,"tag",e),(0,O.zG)(this,"listener",t),(0,O.zG)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const i={};return r.length>0&&(i.topics=r),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Er.indexOf(this.tag)>=0}}const kr={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function _r(e){return(0,u.$m)(c.O$.from(e).toHexString(),32)}function Sr(e){return $.encode((0,u.zo)([e,(0,u.p3)(ie(ie(e)),0,4)]))}const xr=new RegExp("^(ipfs)://(.*)$","i"),Pr=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),xr,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Nr(e,t){try{return(0,M.ZN)(Mr(e,t))}catch(e){}return null}function Mr(e,t){if("0x"===e)return null;const r=c.O$.from((0,u.p3)(e,t,t+32)).toNumber(),n=c.O$.from((0,u.p3)(e,r,r+32)).toNumber();return(0,u.p3)(e,r+32,r+32+n)}function Rr(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):mr.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function Cr(e){const t=(0,u.lE)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function Or(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function Ir(e){const t=[];let r=0;for(let n=0;n<e.length;n++)t.push(null),r+=32;for(let n=0;n<e.length;n++){const i=(0,u.lE)(e[n]);t[n]=Cr(r),t.push(Cr(i.length)),t.push(Or(i)),r+=32+32*Math.ceil(i.length/32)}return(0,u.xs)(t)}class Br{constructor(e,t,r,n){(0,O.zG)(this,"provider",e),(0,O.zG)(this,"name",r),(0,O.zG)(this,"address",e.formatter.address(t)),(0,O.zG)(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((e=>c.O$.from(e).eq(1))).catch((e=>{if(e.code===l.Yd.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return pr(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,u.xs)([e,Wt(this.name),t||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,u.xs)(["0x9061b923",Ir([Qt(this.name),r.data])]));try{let e=yield this.provider.call(r);return(0,u.lE)(e).length%32==4&&mr.throwError("resolver threw error",l.Yd.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=Mr(e,0)),e}catch(e){if(e.code===l.Yd.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return pr(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?Mr(r,0):null}))}_getAddress(e,t){const r=kr[String(e)];if(null==r&&mr.throwError(`unsupported coin type: ${e}`,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=(0,u.lE)(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Sr((0,u.zo)([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Sr((0,u.zo)([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=sr().toWords(n.slice(2));return e.unshift(t),sr().encode(r.prefix,e)}}return null}getAddress(e){return pr(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===ht?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===l.Yd.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",_r(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&mr.throwError("invalid or unsupported coin data",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return pr(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r<Pr.length;r++){const n=t.match(Pr[r]);if(null==n)continue;const i=n[1].toLowerCase();switch(i){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:Rr(t)};case"erc721":case"erc1155":{const r="erc721"===i?"0xc87b56dd":"0x0e89341c";e.push({type:i,content:t});const o=this._resolvedAddress||(yield this.getAddress()),f=(n[2]||"").split("/");if(2!==f.length)return null;const s=yield this.provider.formatter.address(f[0]),a=(0,u.$m)(c.O$.from(f[1]).toHexString(),32);if("erc721"===i){const t=this.provider.formatter.callAddress(yield this.provider.call({to:s,data:(0,u.xs)(["0x6352211e",a])}));if(o!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===i){const t=c.O$.from(yield this.provider.call({to:s,data:(0,u.xs)(["0x00fdd58e",(0,u.$m)(o,32),a])}));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}const l={to:this.provider.formatter.address(f[0]),data:(0,u.xs)([r,a])};let d=Nr(yield this.provider.call(l),0);if(null==d)return null;e.push({type:"metadata-url-base",content:d}),"erc1155"===i&&(d=d.replace("{id}",a.substring(2)),e.push({type:"metadata-url-expanded",content:d})),d.match(/^ipfs:/i)&&(d=Rr(d)),e.push({type:"metadata-url",content:d});const h=yield ir(d);if(!h)return null;e.push({type:"metadata",content:JSON.stringify(h)});let b=h.image;if("string"!=typeof b)return null;if(b.match(/^(https:\/\/|data:)/i));else{if(null==b.match(xr))return null;e.push({type:"url-ipfs",content:b}),b=Rr(b)}return e.push({type:"url",content:b}),{linkage:e,url:b}}}}}catch(e){}return null}))}getContentHash(){return pr(this,void 0,void 0,(function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+$.encode("0x"+t[1])}const r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const e=parseInt(r[3],16);if(r[4].length===2*e)return"ipns://"+$.encode("0x"+r[1])}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];const i=e.match(/^0x90b2c605([0-9a-f]*)$/);if(i&&68===i[1].length){const e={"=":"","+":"-","/":"_"};return"sia://"+kt("0x"+i[1]).replace(/[=+\/]/g,(t=>e[t]))}return mr.throwError("invalid or unsupported content hash data",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return pr(this,void 0,void 0,(function*(){let t=(0,M.Y0)(e);t=(0,u.zo)([_r(64),_r(t.length),t]),t.length%32!=0&&(t=(0,u.zo)([t,(0,u.$m)("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,u.Dv)(t));return null==r||"0x"===r?null:(0,M.ZN)(r)}))}}let Dr=null,Fr=1;class Ur extends P.zt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,O.zG)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=(0,O.tu)(new.target,"getNetwork")(e);t?((0,O.zG)(this,"_network",t),this.emit("network",t,null)):mr.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return pr(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||mr.throwError("no network detected",l.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,O.zG)(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return or((()=>this._ready().then((e=>e),(e=>{if(e.code!==l.Yd.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==Dr&&(Dr=new ur),Dr}static getNetwork(e){return Et(null==e?"homestead":e)}ccipReadFetch(e,t,r){return pr(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e<r.length;e++){const t=r[e],f=t.replace("{sender}",n).replace("{data}",i),s=t.indexOf("{data}")>=0?null:JSON.stringify({data:i,sender:n}),a=yield ir({url:f,errorPassThrough:!0},s,((e,t)=>(e.status=t.statusCode,e)));if(a.data)return a.data;const c=a.message||"unknown error";if(a.status>=400&&a.status<500)return mr.throwError(`response not found during CCIP fetch: ${c}`,l.Yd.errors.SERVER_ERROR,{url:t,errorMessage:c});o.push(c)}return mr.throwError(`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,l.Yd.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(e){return pr(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(wr()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=wr(),r=(0,O.mE)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const i=wr();return(e=c.O$.from(e).toNumber())<this._maxInternalBlockNumber&&(e=this._maxInternalBlockNumber),this._maxInternalBlockNumber=e,this._setFastBlockNumber(e),{blockNumber:e,reqTime:t,respTime:i}}));return this._internalBlockNumber=r,r.catch((e=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return pr(this,void 0,void 0,(function*(){const e=Fr++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)mr.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",mr.makeError("network block skew detected",l.Yd.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(o)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return pr(this,void 0,void 0,(function*(){return mr.throwError("provider does not support network detection",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return pr(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Ar(0),this._network;const r=mr.makeError("underlying network changed",l.Yd.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=wr();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&e<this._fastBlockNumber||(this._fastQueryDate=wr(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return pr(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return pr(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise(((i,o)=>{const f=[];let s=!1;const a=function(){return!!s||(s=!0,f.forEach((e=>{e()})),!1)},c=e=>{e.confirmations<t||a()||i(e)};if(this.on(e,c),f.push((()=>{this.removeListener(e,c)})),n){let r=n.startBlock,i=null;const c=f=>pr(this,void 0,void 0,(function*(){s||(yield Ar(1e3),this.getTransactionCount(n.from).then((u=>pr(this,void 0,void 0,(function*(){if(!s){if(u<=n.nonce)r=f;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3,i<n.startBlock&&(i=n.startBlock));i<=f;){if(s)return;const r=yield this.getBlockWithTransactions(i);for(let i=0;i<r.transactions.length;i++){const f=r.transactions[i];if(f.hash===e)return;if(f.from===n.from&&f.nonce===n.nonce){if(s)return;const r=yield this.waitForTransaction(f.hash,t);if(a())return;let i="replaced";return f.data===n.data&&f.to===n.to&&f.value.eq(n.value)?i="repriced":"0x"===f.data&&f.from===f.to&&f.value.isZero()&&(i="cancelled"),void o(mr.makeError("transaction was replaced",l.Yd.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:this._wrapTransaction(f),hash:e,receipt:r}))}}i++}}s||this.once("block",c)}}))),(e=>{s||this.once("block",c)})))}));if(s)return;this.once("block",c),f.push((()=>{this.removeListener("block",c)}))}if("number"==typeof r&&r>0){const e=setTimeout((()=>{a()||o(mr.makeError("timeout exceeded",l.Yd.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),f.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return pr(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return c.O$.from(e)}catch(t){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,O.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return c.O$.from(n)}catch(e){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,O.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return c.O$.from(n).toNumber()}catch(e){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,O.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return(0,u.Dv)(n)}catch(e){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,O.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>(0,u.$P)(e)))}),i=yield this.perform("getStorageAt",n);try{return(0,u.Dv)(i)}catch(e){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==(0,u.E1)(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&mr.throwError("Transaction hash mismatch from Provider.sendTransaction.",l.Yd.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>pr(this,void 0,void 0,(function*(){let i;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const o=yield this._waitForTransaction(e.hash,t,n,i);return null==o&&0===t?null:(this._emitted["t:"+e.hash]=o.blockNumber,0===o.status&&mr.throwError("transaction failed",l.Yd.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),n}sendTransaction(e){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>(0,u.Dv)(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return pr(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?c.O$.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?(0,u.Dv)(e):null)))})),this.formatter.transactionRequest(yield(0,O.mE)(r))}))}_getFilter(e){return pr(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield(0,O.mE)(t))}))}_call(e,t,r){return pr(this,void 0,void 0,(function*(){r>=10&&mr.throwError("CCIP read exceeded maximum redirections",l.Yd.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===i.substring(0,10)&&(0,u.E1)(i)%32==4)try{const o=(0,u.p3)(i,4),f=(0,u.p3)(o,0,32);c.O$.from(f).eq(n)||mr.throwError("CCIP Read sender did not match",l.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const s=[],a=c.O$.from((0,u.p3)(o,32,64)).toNumber(),d=c.O$.from((0,u.p3)(o,a,a+32)).toNumber(),h=(0,u.p3)(o,a+32);for(let t=0;t<d;t++){const r=Nr(h,32*t);null==r&&mr.throwError("CCIP Read contained corrupt URL string",l.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i}),s.push(r)}const b=Mr(o,64);c.O$.from((0,u.p3)(o,100,128)).isZero()||mr.throwError("CCIP Read callback selector included junk",l.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const p=(0,u.p3)(o,96,100),m=Mr(o,128),y=yield this.ccipReadFetch(e,b,s);null==y&&mr.throwError("CCIP Read disabled or provided no URLs",l.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const g={to:n,data:(0,u.xs)([p,Ir([y,m])])};return this._call(g,t,r+1)}catch(e){if(e.code===l.Yd.errors.SERVER_ERROR)throw e}try{return(0,u.Dv)(i)}catch(r){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:i,error:r})}}))}call(e,t){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,O.mE)({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)}))}estimateGas(e){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,O.mE)({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return c.O$.from(r)}catch(e){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:e})}}))}_getAddress(e){return pr(this,void 0,void 0,(function*(){"string"!=typeof(e=yield e)&&mr.throwArgumentError("invalid address or ENS name","name",e);const t=yield this.resolveName(e);return null==t&&mr.throwError("ENS name not configured",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t}))}_getBlock(e,t){return pr(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;let r=-128;const n={includeTransactions:!!t};if((0,u.A7)(e,32))n.blockHash=e;else try{n.blockTag=yield this._getBlockTag(e),(0,u.A7)(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(t){mr.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return or((()=>pr(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;r<e.transactions.length;r++){const n=e.transactions[r];if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){null==t&&(t=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let e=t-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}}const r=this.formatter.blockWithTransactions(e);return r.transactions=r.transactions.map((e=>this._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return pr(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return or((()=>pr(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return pr(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return or((()=>pr(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,O.mE)({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),ur.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return pr(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return pr(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&mr.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return pr(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new Br(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return pr(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||mr.throwError("network does not support ENS",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+Wt(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return pr(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if((0,u.A7)(e))throw t}"string"!=typeof e&&mr.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return pr(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=Nr(yield this.call({to:r,data:"0x691f3431"+Wt(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return pr(this,void 0,void 0,(function*(){let t=null;if((0,u.A7)(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new Br(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==l.Yd.errors.CALL_EXCEPTION)throw e}try{const e=Nr(yield this.call({to:n,data:"0x691f3431"+Wt(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==l.Yd.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return mr.throwError(e+" not implemented",l.Yd.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new Tr(vr(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],i=vr(e);return this._events=this._events.filter((e=>e.tag!==i||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=vr(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=vr(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,i=vr(e);return this._events=this._events.filter((e=>e.tag!==i||e.listener!=t||!!n||(n=!0,r.push(e),!1))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=vr(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var Lr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};const zr=new l.Yd(ar),Gr=["call","estimateGas"];function jr(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=(0,u.A7)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(const r in e){const n=jr(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return jr(JSON.parse(e),t)}catch(e){}return null}function Yr(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=jr(t,!0);if(e)return e.data;zr.throwError("missing revert data in call exception; Transaction reverted without a reason string",l.Yd.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=jr(t.body,!1);null==r&&(r=jr(t,!1)),r&&zr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===l.Yd.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?i=t.error.message:"string"==typeof t.body?i=t.body:"string"==typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&zr.throwError("insufficient funds for intrinsic transaction cost",l.Yd.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&zr.throwError("nonce has already been used",l.Yd.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&zr.throwError("replacement fee too low",l.Yd.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&zr.throwError("legacy pre-eip-155 transactions not supported",l.Yd.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),Gr.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&zr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function Kr(e){return new Promise((function(t){setTimeout(t,e)}))}function qr(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function Hr(e){return e?e.toLowerCase():e}const Vr={};class Jr extends S.E{constructor(e,t,r){if(super(),e!==Vr)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,O.zG)(this,"provider",t),null==r&&(r=0),"string"==typeof r?((0,O.zG)(this,"_address",this.provider.formatter.address(r)),(0,O.zG)(this,"_index",null)):"number"==typeof r?((0,O.zG)(this,"_index",r),(0,O.zG)(this,"_address",null)):zr.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return zr.throwError("cannot alter JSON-RPC Signer connection",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Wr(Vr,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&zr.throwError("unknown account #"+this._index,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=(0,O.DC)(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=(0,O.DC)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>Lr(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&zr.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),(0,O.mE)({tx:(0,O.mE)(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&zr.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&zr.throwError("user rejected transaction",l.Yd.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),Yr("sendTransaction",e,n))))}))}signTransaction(e){return zr.throwError("signing transactions is unsupported",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Lr(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield or((()=>Lr(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}}))}signMessage(e){return Lr(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,M.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,u.Dv)(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&zr.throwError("user rejected signing",l.Yd.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return Lr(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,M.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,u.Dv)(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&zr.throwError("user rejected signing",l.Yd.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return Lr(this,void 0,void 0,(function*(){const n=yield Q.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Q.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&zr.throwError("user rejected signing",l.Yd.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return Lr(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class Wr extends Jr{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const Qr={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class Xr extends Ur{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=(0,O.tu)(this.constructor,"defaultUrl")()),"string"==typeof e?(0,O.zG)(this,"connection",Object.freeze({url:e})):(0,O.zG)(this,"connection",Object.freeze((0,O.DC)(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Lr(this,void 0,void 0,(function*(){yield Kr(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=(0,O.tu)(this.constructor,"getNetwork");try{return t(c.O$.from(e).toNumber())}catch(t){return zr.throwError("could not detect network",l.Yd.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return zr.throwError("could not detect network",l.Yd.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new Jr(Vr,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,O.p$)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const i=ir(this.connection,JSON.stringify(r),qr).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=i,setTimeout((()=>{this._cache[e]=null}),0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Hr(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Hr(t.address),t.blockTag]];case"getCode":return["eth_getCode",[Hr(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Hr(t.address),(0,u.$m)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[(0,O.tu)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,O.tu)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=Hr(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return Lr(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&c.O$.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=(0,O.DC)(t)).transaction=(0,O.DC)(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&zr.throwError(e+" not implemented",l.Yd.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return Yr(e,r,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return Kr(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=(0,O.DC)(Qr);if(t)for(const e in t)t[e]&&(r[e]=!0);(0,O.uj)(e,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=(0,u.$P)(c.O$.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(n[t]=(0,u.Dv)(e[t]))})),e.accessList&&(n.accessList=(0,ce.z7)(e.accessList)),n}}let $r=null;try{if($r=WebSocket,null==$r)throw new Error("inject please")}catch(e){const t=new l.Yd(ar);$r=function(){t.throwError("WebSockets not supported in this environment",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Zr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};const en=new l.Yd(ar);let tn=1;class rn extends Xr{constructor(e,t){"any"===t&&en.throwError("WebSocketProvider does not support 'any' network yet",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof e?e:"_websocket",t),this._pollingInterval=-1,this._wsReady=!1,"string"==typeof e?(0,O.zG)(this,"_websocket",new $r(this.connection.url)):(0,O.zG)(this,"_websocket",e),(0,O.zG)(this,"_requests",{}),(0,O.zG)(this,"_subs",{}),(0,O.zG)(this,"_subIds",{}),(0,O.zG)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((e=>{this.websocket.send(this._requests[e].payload)}))},this.websocket.onmessage=e=>{const t=e.data,r=JSON.parse(t);if(null!=r.id){const e=String(r.id),n=this._requests[e];if(delete this._requests[e],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let e=null;r.error?(e=new Error(r.error.message||"unknown error"),(0,O.zG)(e,"code",r.error.code||null),(0,O.zG)(e,"response",t)):e=new Error("unknown error"),n.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const e=this._subs[r.params.subscription];e&&e.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){en.throwError("cannot reset events block on WebSocketProvider",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){en.throwError("cannot set polling interval on WebSocketProvider",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Zr(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&en.throwError("cannot set polling on WebSocketProvider",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){const r=tn++;return new Promise(((n,i)=>{const o=JSON.stringify({method:e,params:t,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(e,t){return e?i(e):n(t)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,r){return Zr(this,void 0,void 0,(function*(){let n=this._subIds[e];null==n&&(n=Promise.all(t).then((e=>this.send("eth_subscribe",e))),this._subIds[e]=n);const i=yield n;this._subs[i]={tag:e,processFunc:r}}))}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],(e=>{const t=c.O$.from(e.number).toNumber();this._emitted.block=t,this.emit("block",t)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(e=>{this.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(t=>{null==t.removed&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))}));break;case"tx":{const t=e=>{const t=e.hash;this.getTransactionReceipt(t).then((e=>{e&&this.emit(t,e)}))};t(e),this._subscribe("tx",["newHeads"],(e=>{this._events.filter((e=>"tx"===e.type)).forEach(t)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}_stopEvent(e){let t=e.tag;if("tx"===e.type){if(this._events.filter((e=>"tx"===e.type)).length)return;t="tx"}else if(this.listenerCount(e.event))return;const r=this._subIds[t];r&&(delete this._subIds[t],r.then((e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]))})))}destroy(){return Zr(this,void 0,void 0,(function*(){this.websocket.readyState===$r.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}const nn=new l.Yd(ar);class on extends Xr{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return t=this,r=void 0,i=function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||nn.throwError("no network detected",l.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,O.zG)(this,"_network",t),this.emit("network",t,null))),t},new((n=void 0)||(n=Promise))((function(e,o){function f(e){try{a(i.next(e))}catch(e){o(e)}}function s(e){try{a(i.throw(e))}catch(e){o(e)}}function a(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(f,s)}a((i=i.apply(t,r||[])).next())}));var t,r,n,i}}class fn extends on{constructor(e,t){nn.checkAbstract(new.target,fn),e=(0,O.tu)(new.target,"getNetwork")(e),t=(0,O.tu)(new.target,"getApiKey")(t),super((0,O.tu)(new.target,"getUrl")(e,t),e),"string"==typeof t?(0,O.zG)(this,"apiKey",t):null!=t&&Object.keys(t).forEach((e=>{(0,O.zG)(this,e,t[e])}))}_startPending(){nn.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return nn.throwError("API provider does not support signing",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return nn.throwError("not implemented; sub-classes must override getUrl",l.Yd.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const sn=new l.Yd(ar),an="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class cn extends rn{constructor(e,t){const r=new un(e,t);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),(0,O.zG)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===an}}class un extends fn{static getWebSocketProvider(e,t){return new cn(e,t)}static getApiKey(e){return null==e?an:(e&&"string"!=typeof e&&sn.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;default:sn.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===an&&br(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===an}}const ln=new l.Yd(ar),dn="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function hn(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"matic":return"rpc.ankr.com/polygon/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return ln.throwArgumentError("unsupported network","name",e)}class bn extends fn{isCommunityResource(){return this.apiKey===dn}static getApiKey(e){return null==e?dn:e}static getUrl(e,t){null==t&&(t=dn);const r={allowGzip:!0,url:"https://"+hn(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===dn&&br(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}const pn=new l.Yd(ar);class mn extends fn{static getApiKey(e){return null!=e&&pn.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let r=null;return"homestead"===e.name?r="https://cloudflare-eth.com/":pn.throwArgumentError("unsupported network","network",arguments[0]),r}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return n=this,i=void 0,f=function*(){return"getBlockNumber"===e?(yield r.perform.call(this,"getBlock",{blockTag:"latest"})).number:r.perform.call(this,e,t)},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{a(f.next(e))}catch(e){t(e)}}function s(e){try{a(f.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(r,s)}a((f=f.apply(n,i||[])).next())}));var n,i,o,f}}var yn=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};const gn=new l.Yd(ar);function vn(e){const t={};for(let r in e){if(null==e[r])continue;let n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?(0,u.$P)((0,u.Dv)(n)):"accessList"===r?"["+(0,ce.z7)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]":(0,u.Dv)(n),t[r]=n)}return t}function wn(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!=typeof e.message||!e.message.match(/^OK/)){const t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function An(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){const t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){const t=new Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){const t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function En(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function Tn(e,t,r){if("call"===e&&t.code===l.Yd.errors.SERVER_ERROR){const e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let r=e.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),(0,u.A7)(r))return r;gn.throwError("missing revert data in call exception",l.Yd.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let n=t.message;throw t.code===l.Yd.errors.SERVER_ERROR&&(t.error&&"string"==typeof t.error.message?n=t.error.message:"string"==typeof t.body?n=t.body:"string"==typeof t.responseText&&(n=t.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&gn.throwError("insufficient funds for intrinsic transaction cost",l.Yd.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&gn.throwError("nonce has already been used",l.Yd.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&gn.throwError("replacement fee too low",l.Yd.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&gn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class kn extends Ur{constructor(e,t){super(e),(0,O.zG)(this,"baseUrl",this.getBaseUrl()),(0,O.zG)(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return gn.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){const r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${r}${n}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,r){return yn(this,void 0,void 0,(function*(){const n=r?this.getPostUrl():this.getUrl(e,t),i=r?this.getPostData(e,t):null,o="proxy"===e?An:wn;this.emit("debug",{action:"request",request:n,provider:this});const f={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&br(),Promise.resolve(!0))};let s=null;i&&(f.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},s=Object.keys(i).map((e=>`${e}=${i[e]}`)).join("&"));const a=yield ir(f,s,o||An);return this.emit("debug",{action:"response",request:n,response:(0,O.p$)(a),provider:this}),a}))}detectNetwork(){return yn(this,void 0,void 0,(function*(){return this.network}))}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return yn(this,void 0,void 0,(function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((e=>Tn("sendTransaction",e,t.signedTransaction)));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const e=vn(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(e){return Tn("call",e,t.transaction)}}case"estimateGas":{const e=vn(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(e){return Tn("estimateGas",e,t.transaction)}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=En(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=En(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&gn.throwError("unsupported topic count",l.Yd.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){const r=t.filter.topics[0];"string"==typeof r&&66===r.length||gn.throwError("unsupported topic format",l.Yd.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}const r=yield this.fetch("logs",e);let n={};for(let e=0;e<r.length;e++){const t=r[e];if(null==t.blockHash){if(null==n[t.blockNumber]){const e=yield this.getBlock(t.blockNumber);e&&(n[t.blockNumber]=e.hash)}t.blockHash=n[t.blockNumber]}}return r}case"getEtherPrice":return"homestead"!==this.network.name?0:parseFloat((yield this.fetch("stats",{action:"ethprice"})).ethusd)}return r.perform.call(this,e,t)}))}getHistory(e,t,r){return yn(this,void 0,void 0,(function*(){const n={action:"txlist",address:yield this.resolveName(e),startblock:null==t?0:t,endblock:null==r?99999999:r,sort:"asc"};return(yield this.fetch("account",n)).map((e=>{["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);const t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t}))}))}isCommunityResource(){return null==this.apiKey}}function _n(e){for(let t=(e=e.slice()).length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}var Sn=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))};const xn=new l.Yd(ar);function Pn(){return(new Date).getTime()}function Nn(e){let t=null;for(let r=0;r<e.length;r++){const n=e[r];if(null==n)return null;t?t.name===n.name&&t.chainId===n.chainId&&(t.ensAddress===n.ensAddress||null==t.ensAddress&&null==n.ensAddress)||xn.throwArgumentError("provider mismatch","networks",e):t=n}return t}function Mn(e,t){e=e.slice().sort();const r=Math.floor(e.length/2);if(e.length%2)return e[r];const n=e[r-1],i=e[r];return null!=t&&Math.abs(n-i)>t?null:(n+i)/2}function Rn(e){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("string"==typeof e)return e;if(c.O$.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((e=>Rn(e))));if("object"==typeof e){const t=Object.keys(e);return t.sort(),"{"+t.map((t=>{let r=e[t];return r="function"==typeof r?"[function]":Rn(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}let Cn=1;function On(e){let t=null,r=null,n=new Promise((n=>{t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:e=>(n=n.then(e),n)}}const In=[l.Yd.errors.CALL_EXCEPTION,l.Yd.errors.INSUFFICIENT_FUNDS,l.Yd.errors.NONCE_EXPIRED,l.Yd.errors.REPLACEMENT_UNDERPRICED,l.Yd.errors.UNPREDICTABLE_GAS_LIMIT],Bn=["address","args","errorArgs","errorSignature","method","transaction"];function Dn(e,t){const r={weight:e.weight};return Object.defineProperty(r,"provider",{get:()=>e.provider}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function Fn(e,t){return Sn(this,void 0,void 0,(function*(){const r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:or((()=>new Promise(((n,i)=>{setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))),{oncePoll:r})}))}function Un(e,t,r,n){return Sn(this,void 0,void 0,(function*(){let i=e.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&(0,u.A7)(n.blockTag)&&(i=yield Fn(e,t)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&(0,u.A7)(n.blockTag)&&(i=yield Fn(e,t)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&(0,u.A7)(n.blockTag)&&(i=yield Fn(e,t)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&(0,u.A7)(n.blockTag)&&(i=yield Fn(e,t)),"call"===r&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&(0,u.A7)(r.fromBlock)||r.toBlock&&(0,u.A7)(r.toBlock))&&(i=yield Fn(e,t)),i.getLogs(r)}}return xn.throwError("unknown method error",l.Yd.errors.UNKNOWN_ERROR,{method:r,params:n})}))}class Ln extends Ur{constructor(e,t){0===e.length&&xn.throwArgumentError("missing providers","providers",e);const r=e.map(((e,t)=>{if(P.zt.isProvider(e)){const t=dr(e)?2e3:750,r=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:r})}const r=(0,O.DC)(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=dr(e)?2e3:750),null==r.weight&&(r.weight=1);const n=r.weight;return(n%1||n>512||n<1)&&xn.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,n),Object.freeze(r)})),n=r.reduce(((e,t)=>e+t.weight),0);null==t?t=n/2:t>n&&xn.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let i=Nn(r.map((e=>e.provider.network)));null==i&&(i=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then(e,t)}),0)}))),super(i),(0,O.zG)(this,"providerConfigs",Object.freeze(r)),(0,O.zG)(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Sn(this,void 0,void 0,(function*(){return Nn(yield Promise.all(this.providerConfigs.map((e=>e.provider.getNetwork()))))}))}perform(e,t){return Sn(this,void 0,void 0,(function*(){if("sendTransaction"===e){const e=yield Promise.all(this.providerConfigs.map((e=>e.provider.sendTransaction(t.signedTransaction).then((e=>e.hash),(e=>e)))));for(let t=0;t<e.length;t++){const r=e[t];if("string"==typeof r)return r}throw e[0]}-1===this._highestBlockNumber&&"getBlockNumber"!==e&&(yield this.getBlockNumber());const r=function(e,t,r){let n=Rn;switch(t){case"getBlockNumber":return function(t){const r=t.map((e=>e.result));let n=Mn(t.map((e=>e.result)),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){const t=e.map((e=>e.result));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Mn(e.map((e=>e.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=(0,O.DC)(e)).confirmations=-1,Rn(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=(0,O.DC)(e)).transactions=e.transactions.map((e=>((e=(0,O.DC)(e)).confirmations=-1,e))),Rn(e))}:function(e){return null==e?null:Rn(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){const n={};r.forEach((t=>{const r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));const i=Object.keys(n);for(let e=0;e<i.length;e++){const r=n[i[e]];if(r.count>=t)return r.result}}}(n,e.quorum)}(this,e,t),n=_n(this.providerConfigs.map(O.DC));n.sort(((e,t)=>e.priority-t.priority));const i=this._highestBlockNumber;let o=0,f=!0;for(;;){const s=Pn();let a=n.filter((e=>e.runner&&s-e.start<e.stallTimeout)).reduce(((e,t)=>e+t.weight),0);for(;a<this.quorum&&o<n.length;){const r=n[o++],f=Cn++;r.start=Pn(),r.staller=On(r.stallTimeout),r.staller.wait((()=>{r.staller=null})),r.runner=Un(r,i,e,t).then((n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:f,backend:Dn(r,Pn()),request:{method:e,params:(0,O.p$)(t)},provider:this})}),(n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:f,backend:Dn(r,Pn()),request:{method:e,params:(0,O.p$)(t)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:f,backend:Dn(r,null),request:{method:e,params:(0,O.p$)(t)},provider:this}),a+=r.weight}const c=[];n.forEach((e=>{!e.done&&e.runner&&(c.push(e.runner),e.staller&&c.push(e.staller.getPromise()))})),c.length&&(yield Promise.race(c));const u=n.filter((e=>e.done&&null==e.error));if(u.length>=this.quorum){const e=r(u);if(void 0!==e)return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),e;f||(yield On(100).getPromise()),f=!1}const l=n.reduce(((e,t)=>{if(!t.done||null==t.error)return e;const r=t.error.code;return In.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{});if(Object.keys(l).forEach((e=>{const t=l[e];if(t.weight<this.quorum)return;n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0}));const r=t.error,i={};Bn.forEach((e=>{null!=r[e]&&(i[e]=r[e])})),xn.throwError(r.reason||r.message,e,i)})),0===n.filter((e=>!e.done)).length)break}return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),xn.throwError("failed to meet quorum",l.Yd.errors.SERVER_ERROR,{method:e,params:t,results:n.map((e=>Dn(e))),provider:this})}))}}const zn=null,Gn=new l.Yd(ar),jn="84842078b09946638c03157f83405213";class Yn extends rn{constructor(e,t){const r=new Kn(e,t),n=r.connection;n.password&&Gn.throwError("INFURA WebSocket project secrets unsupported",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"}),super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),(0,O.zG)(this,"apiKey",r.projectId),(0,O.zG)(this,"projectId",r.projectId),(0,O.zG)(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===jn}}class Kn extends fn{static getWebSocketProvider(e,t){return new Yn(e,t)}static getApiKey(e){const t={apiKey:jn,projectId:jn,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(Gn.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),Gn.assertArgument("string"==typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;default:Gn.throwError("unsupported network",l.Yd.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===jn&&br(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}isCommunityResource(){return this.projectId===jn}}class qn extends Xr{send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const n={request:r,resolve:null,reject:null},i=new Promise(((e,t)=>{n.resolve=e,n.reject=t}));return this._pendingBatch.push(n),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const t=e.map((e=>e.request));return this.emit("debug",{action:"requestBatch",request:(0,O.p$)(t),provider:this}),ir(this.connection,JSON.stringify(t)).then((r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach(((e,t)=>{const n=r[t];if(n.error){const t=new Error(n.error.message);t.code=n.error.code,t.data=n.error.data,e.reject(t)}else e.resolve(n.result)}))}),(r=>{this.emit("debug",{action:"response",error:r,request:t,provider:this}),e.forEach((e=>{e.reject(r)}))}))}),10)),i}}const Hn=new l.Yd(ar);class Vn extends fn{static getApiKey(e){return e&&"string"!=typeof e&&Hn.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){Hn.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Hn.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}const Jn=new l.Yd(ar),Wn="62e1ad51b37b8e00394bda3b";class Qn extends fn{static getApiKey(e){const t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=Wn:"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Jn.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:Jn.throwError("unsupported network",l.Yd.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={headers:{},url:`https://${r}/v1/lb/${t.applicationId}`};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}isCommunityResource(){return this.applicationId===Wn}}const Xn=new l.Yd(ar);let $n=1;function Zn(e,t){const r="Web3LegacyFetcher";return function(e,n){const i={method:e,params:n,id:$n++,jsonrpc:"2.0"};return new Promise(((e,n)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,O.p$)(i),provider:this}),t(i,((t,o)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:i,provider:this}),n(t);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:o,provider:this}),o.error){const e=new Error(o.error.message);return e.code=o.error.code,e.data=o.error.data,n(e)}e(o.result)}))}))}}class ei extends Xr{constructor(e,t){null==e&&Xn.throwArgumentError("missing provider","provider",e);let r=null,n=null,i=null;"function"==typeof e?(r="unknown:",n=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),i=e,e.request?(""===r&&(r="eip-1193:"),n=function(e){return function(t,r){null==r&&(r=[]);const n={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,O.p$)(n),provider:this}),e.request(n).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:e,provider:this}),e}))}}(e)):e.sendAsync?n=Zn(0,e.sendAsync.bind(e)):e.send?n=Zn(0,e.send.bind(e)):Xn.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),(0,O.zG)(this,"jsonRpcFetchFunc",n),(0,O.zG)(this,"provider",i)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}const ti=new l.Yd(ar);function ri(e,t){if(null==e&&(e="homestead"),"string"==typeof e){const t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new Xr(e);case"ws":case"wss":return new rn(e);default:ti.throwArgumentError("unsupported URL scheme","network",e)}}const r=Et(e);return r&&r._defaultProvider||ti.throwError("unsupported getDefaultProvider network",l.Yd.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:Ln,AlchemyProvider:un,AnkrProvider:bn,CloudflareProvider:mn,EtherscanProvider:kn,InfuraProvider:Kn,JsonRpcProvider:Xr,NodesmithProvider:Vn,PocketProvider:Qn,Web3Provider:ei,IpcProvider:zn},t)}var ni=r(780),ii=r(155),oi=r(848),fi=r(268);const si=new RegExp("^bytes([0-9]+)$"),ai=new RegExp("^(u?int)([0-9]*)$"),ci=new RegExp("^(.*)\\[([0-9]*)\\]$"),ui="0000000000000000000000000000000000000000000000000000000000000000",li=new l.Yd("solidity/5.7.0");function di(e,t,r){switch(e){case"address":return r?(0,u.Bu)(t,32):(0,u.lE)(t);case"string":return(0,M.Y0)(t);case"bytes":return(0,u.lE)(t);case"bool":return t=t?"0x01":"0x00",r?(0,u.Bu)(t,32):(0,u.lE)(t)}let n=e.match(ai);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!=0||0===i||i>256)&&li.throwArgumentError("invalid number type","type",e),r&&(i=256),t=c.O$.from(t).toTwos(i),(0,u.Bu)(t,i/8)}if(n=e.match(si),n){const i=parseInt(n[1]);return(String(i)!==n[1]||0===i||i>32)&&li.throwArgumentError("invalid bytes type","type",e),(0,u.lE)(t).byteLength!==i&&li.throwArgumentError(`invalid value for ${e}`,"value",t),r?(0,u.lE)((t+ui).substring(0,66)):t}if(n=e.match(ci),n&&Array.isArray(t)){const r=n[1];parseInt(n[2]||String(t.length))!=t.length&&li.throwArgumentError(`invalid array length for ${e}`,"value",t);const i=[];return t.forEach((function(e){i.push(di(r,e,!0))})),(0,u.zo)(i)}return li.throwArgumentError("invalid type","type",e)}function hi(e,t){e.length!=t.length&&li.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(di(e,t[n]))})),(0,u.Dv)((0,u.zo)(r))}function bi(e,t){return(0,N.w)(hi(e,t))}function pi(e,t){return ie(hi(e,t))}var mi=r(648);function yi(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function gi(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}function vi(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n];if(r+=i.l,e>=r&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}const wi=gi("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),Ai="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),Ei=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],Ti=yi("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),ki=yi("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),_i=yi("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");let t=[];for(let r=0;r<e.length;r+=4)t.push(parseInt(e.substring(r,r+4),16));return t})),Si=gi("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function xi(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();let t=(0,M.XL)(e);var r;r=t.map((e=>{if(Ai.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=vi(e,Ei);if(t)return[e+t.s];let r=Ti[e];if(r)return r;let n=ki[e];return n?[e+n[0]]:_i[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=(0,M.XL)((0,M.uu)(t),M.Uj.NFKC),t.forEach((e=>{if(vi(e,Si))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(vi(e,wi))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=(0,M.uu)(t);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}function Pi(e){const t=(0,M.Y0)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,u.Dv)((0,u.zo)([t,ht]).slice(0,32))}function Ni(e){const t=(0,u.lE)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,M.ZN)(t.slice(0,r))}const Mi=new l.Yd("units/5.7.0"),Ri=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Ci(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&Mi.throwArgumentError("invalid value","value",e);let r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);const o=[];for(;r.length;){if(r.length<=3){o.unshift(r);break}{const e=r.length-3;o.unshift(r.substring(e)),r=r.substring(0,e)}}return n+o.join(",")+i}function Oi(e,t){if("string"==typeof t){const e=Ri.indexOf(t);-1!==e&&(t=3*e)}return w(e,null!=t?t:18)}function Ii(e,t){if("string"!=typeof e&&Mi.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=Ri.indexOf(t);-1!==e&&(t=3*e)}return A(e,null!=t?t:18)}function Bi(e){return Oi(e,18)}function Di(e){return Ii(e,18)}const Fi="ethers/5.7.2",Ui=new l.Yd(Fi);try{const e=window;null==e._ethers&&(e._ethers=s)}catch(e){}},485:(e,t,r)=>{var n=t;n.utils=r(212),n.common=r(916),n.sha=r(530),n.ripemd=r(396),n.hmac=r(47),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},916:(e,t,r)=>{"use strict";var n=r(212),i=r(561);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},47:(e,t,r)=>{"use strict";var n=r(212),i=r(561);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},396:(e,t,r)=>{"use strict";var n=r(212),i=r(916),o=n.rotl32,f=n.sum32,s=n.sum32_3,a=n.sum32_4,c=i.BlockHash;function u(){if(!(this instanceof u))return new u;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,c),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],u=this.h[4],g=r,v=n,w=i,A=c,E=u,T=0;T<80;T++){var k=f(o(a(r,l(T,n,i,c),e[b[T]+t],d(T)),m[T]),u);r=u,u=c,c=o(i,10),i=n,n=k,k=f(o(a(g,l(79-T,v,w,A),e[p[T]+t],h(T)),y[T]),E),g=E,E=A,A=o(w,10),w=v,v=k}k=s(this.h[1],i,A),this.h[1]=s(this.h[2],c,E),this.h[2]=s(this.h[3],u,g),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,w),this.h[0]=k},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var b=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},530:(e,t,r)=>{"use strict";t.sha1=r(79),t.sha224=r(823),t.sha256=r(32),t.sha384=r(328),t.sha512=r(168)},79:(e,t,r)=>{"use strict";var n=r(212),i=r(916),o=r(713),f=n.rotl32,s=n.sum32,a=n.sum32_5,c=o.ft_1,u=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=f(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var b=~~(n/20),p=a(f(i,5),c(b,o,u,d),h,r[n],l[b]);h=d,d=u,u=f(o,30),o=i,i=p}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],d),this.h[4]=s(this.h[4],h)},d.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},823:(e,t,r)=>{"use strict";var n=r(212),i=r(32);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},32:(e,t,r)=>{"use strict";var n=r(212),i=r(916),o=r(713),f=r(561),s=n.sum32,a=n.sum32_4,c=n.sum32_5,u=o.ch32,l=o.maj32,d=o.s0_256,h=o.s1_256,b=o.g0_256,p=o.g1_256,m=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(g,m),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=a(p(r[n-2]),r[n-7],b(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],y=this.h[3],g=this.h[4],v=this.h[5],w=this.h[6],A=this.h[7];for(f(this.k.length===r.length),n=0;n<r.length;n++){var E=c(A,h(g),u(g,v,w),this.k[n],r[n]),T=s(d(i),l(i,o,m));A=w,w=v,v=g,g=s(y,E),y=m,m=o,o=i,i=s(E,T)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],m),this.h[3]=s(this.h[3],y),this.h[4]=s(this.h[4],g),this.h[5]=s(this.h[5],v),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],A)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},328:(e,t,r)=>{"use strict";var n=r(212),i=r(168);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},168:(e,t,r)=>{"use strict";var n=r(212),i=r(916),o=r(561),f=n.rotr64_hi,s=n.rotr64_lo,a=n.shr64_hi,c=n.shr64_lo,u=n.sum64,l=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,b=n.sum64_4_lo,p=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var f=t&n^~t&o;return f<0&&(f+=4294967296),f}function E(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function T(e,t,r,n,i,o){var f=t&n^t&o^n&o;return f<0&&(f+=4294967296),f}function k(e,t){var r=f(e,t,28)^f(t,e,2)^f(t,e,7);return r<0&&(r+=4294967296),r}function _(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function S(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function x(e,t){var r=f(e,t,1)^f(e,t,8)^a(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=s(e,t,1)^s(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function N(e,t){var r=s(e,t,19)^s(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,y),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(m=r[n-4],y=r[n-3],g=void 0,(g=f(m,y,19)^f(y,m,29)^a(m,y,6))<0&&(g+=4294967296),g),o=N(r[n-4],r[n-3]),s=r[n-14],c=r[n-13],u=x(r[n-30],r[n-29]),l=P(r[n-30],r[n-29]),d=r[n-32],p=r[n-31];r[n]=h(i,o,s,c,u,l,d,p),r[n+1]=b(i,o,s,c,u,l,d,p)}var m,y,g},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,s=this.W,a=this.h[0],c=this.h[1],h=this.h[2],b=this.h[3],y=this.h[4],g=this.h[5],v=this.h[6],x=this.h[7],P=this.h[8],N=this.h[9],M=this.h[10],R=this.h[11],C=this.h[12],O=this.h[13],I=this.h[14],B=this.h[15];o(this.k.length===s.length);for(var D=0;D<s.length;D+=2){var F=I,U=B,L=(i=void 0,(i=f(r=P,n=N,14)^f(r,n,18)^f(n,r,9))<0&&(i+=4294967296),i),z=S(P,N),G=w(P,0,M,0,C),j=A(0,N,0,R,0,O),Y=this.k[D],K=this.k[D+1],q=s[D],H=s[D+1],V=p(F,U,L,z,G,j,Y,K,q,H),J=m(F,U,L,z,G,j,Y,K,q,H);F=k(a,c),U=_(a,c),L=E(a,0,h,0,y),z=T(0,c,0,b,0,g);var W=l(F,U,L,z),Q=d(F,U,L,z);I=C,B=O,C=M,O=R,M=P,R=N,P=l(v,x,V,J),N=d(x,x,V,J),v=y,x=g,y=h,g=b,h=a,b=c,a=l(V,J,W,Q),c=d(V,J,W,Q)}u(this.h,0,a,c),u(this.h,2,h,b),u(this.h,4,y,g),u(this.h,6,v,x),u(this.h,8,P,N),u(this.h,10,M,R),u(this.h,12,C,O),u(this.h,14,I,B)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},713:(e,t,r)=>{"use strict";var n=r(212).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function f(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?f(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=f,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},212:(e,t,r)=>{"use strict";var n=r(561),i=r(285);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function f(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var f=e.charCodeAt(i);f<128?r[n++]=f:f<2048?(r[n++]=f>>6|192,r[n++]=63&f|128):o(e,i)?(f=65536+((1023&f)<<10)+(1023&e.charCodeAt(++i)),r[n++]=f>>18|240,r[n++]=f>>12&63|128,r[n++]=f>>6&63|128,r[n++]=63&f|128):(r[n++]=f>>12|224,r[n++]=f>>6&63|128,r[n++]=63&f|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=f,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=f(i)),r+=a(i.toString(16))}return r},t.zero2=s,t.zero8=a,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var f=new Array(o/4),s=0,a=t;s<f.length;s++,a+=4){var c;c="big"===i?e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3]:e[a+3]<<24|e[a+2]<<16|e[a+1]<<8|e[a],f[s]=c>>>0}return f},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,f=(o<n?1:0)+r+i;e[t]=f>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,f,s){var a=0,c=t;return a+=(c=c+n>>>0)<t?1:0,a+=(c=c+o>>>0)<o?1:0,e+r+i+f+(a+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,f,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,f,s,a,c){var u=0,l=t;return u+=(l=l+n>>>0)<t?1:0,u+=(l=l+o>>>0)<o?1:0,u+=(l=l+s>>>0)<s?1:0,e+r+i+f+a+(u+=(l=l+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,f,s,a,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},669:(e,t,r)=>{var n;!function(){"use strict";var i="input is invalid type",o="object"==typeof window,f=o?window:{};f.JS_SHA3_NO_WINDOW&&(o=!1);var s=!o&&"object"==typeof self;!f.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?f=r.g:s&&(f=self);var a=!f.JS_SHA3_NO_COMMON_JS&&e.exports,c=r.amdO,u=!f.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),d=[4,1024,262144,67108864],h=[0,8,16,24],b=[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],p=[224,256,384,512],m=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],g={128:168,256:136};!f.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!f.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var v=function(e,t,r){return function(n){return new I(e,t,e).update(n)[r]()}},w=function(e,t,r){return function(n,i){return new I(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return S["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return S["kmac"+e].update(t,n,i,o)[r]()}},T=function(e,t,r,n){for(var i=0;i<y.length;++i){var o=y[i];e[o]=t(r,n,o)}return e},k=function(e,t){var r=v(e,t,"hex");return r.create=function(){return new I(e,t,e)},r.update=function(e){return r.create().update(e)},T(r,v,e,t)},_=[{name:"keccak",padding:[1,256,65536,16777216],bits:p,createMethod:k},{name:"sha3",padding:[6,1536,393216,100663296],bits:p,createMethod:k},{name:"shake",padding:[31,7936,2031616,520093696],bits:m,createMethod:function(e,t){var r=w(e,t,"hex");return r.create=function(r){return new I(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},T(r,w,e,t)}},{name:"cshake",padding:d,bits:m,createMethod:function(e,t){var r=g[e],n=A(e,0,"hex");return n.create=function(n,i,o){return i||o?new I(e,t,n).bytepad([i,o],r):S["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},T(n,A,e,t)}},{name:"kmac",padding:d,bits:m,createMethod:function(e,t){var r=g[e],n=E(e,0,"hex");return n.create=function(n,i,o){return new B(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},T(n,E,e,t)}}],S={},x=[],P=0;P<_.length;++P)for(var N=_[P],M=N.bits,R=0;R<M.length;++R){var C=N.name+"_"+M[R];if(x.push(C),S[C]=N.createMethod(M[R],N.padding),"sha3"!==N.name){var O=N.name+M[R];x.push(O),S[O]=S[C]}}function I(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function B(e,t,r){I.call(this,e,t,r)}I.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var n,o,f=this.blocks,s=this.byteCount,a=e.length,c=this.blockCount,l=0,d=this.s;l<a;){if(this.reset)for(this.reset=!1,f[0]=this.block,n=1;n<c+1;++n)f[n]=0;if(t)for(n=this.start;l<a&&n<s;++l)f[n>>2]|=e[l]<<h[3&n++];else for(n=this.start;l<a&&n<s;++l)(o=e.charCodeAt(l))<128?f[n>>2]|=o<<h[3&n++]:o<2048?(f[n>>2]|=(192|o>>6)<<h[3&n++],f[n>>2]|=(128|63&o)<<h[3&n++]):o<55296||o>=57344?(f[n>>2]|=(224|o>>12)<<h[3&n++],f[n>>2]|=(128|o>>6&63)<<h[3&n++],f[n>>2]|=(128|63&o)<<h[3&n++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++l)),f[n>>2]|=(240|o>>18)<<h[3&n++],f[n>>2]|=(128|o>>12&63)<<h[3&n++],f[n>>2]|=(128|o>>6&63)<<h[3&n++],f[n>>2]|=(128|63&o)<<h[3&n++]);if(this.lastByteIndex=n,n>=s){for(this.start=n-s,this.block=f[c],n=0;n<c;++n)d[n]^=f[n];D(d),this.reset=!0}else this.start=n}return this},I.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},I.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,o=e.length;if(t)n=o;else for(var f=0;f<e.length;++f){var s=e.charCodeAt(f);s<128?n+=1:s<2048?n+=2:s<55296||s>=57344?n+=3:(s=65536+((1023&s)<<10|1023&e.charCodeAt(++f)),n+=4)}return n+=this.encode(8*n),this.update(e),n},I.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,o=[];return o.length=i,this.update(o),this},I.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];D(n)}},I.prototype.toString=I.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,f=0,s="";f<n;){for(o=0;o<t&&f<n;++o,++f)e=r[o],s+=l[e>>4&15]+l[15&e]+l[e>>12&15]+l[e>>8&15]+l[e>>20&15]+l[e>>16&15]+l[e>>28&15]+l[e>>24&15];f%t==0&&(D(r),o=0)}return i&&(e=r[o],s+=l[e>>4&15]+l[15&e],i>1&&(s+=l[e>>12&15]+l[e>>8&15]),i>2&&(s+=l[e>>20&15]+l[e>>16&15])),s},I.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,f=0,s=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s);for(var a=new Uint32Array(e);f<n;){for(o=0;o<t&&f<n;++o,++f)a[f]=r[o];f%t==0&&D(r)}return i&&(a[o]=r[o],e=e.slice(0,s)),e},I.prototype.buffer=I.prototype.arrayBuffer,I.prototype.digest=I.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,f=0,s=0,a=[];s<i;){for(f=0;f<r&&s<i;++f,++s)e=s<<2,t=n[f],a[e]=255&t,a[e+1]=t>>8&255,a[e+2]=t>>16&255,a[e+3]=t>>24&255;s%r==0&&D(n)}return o&&(e=s<<2,t=n[f],a[e]=255&t,o>1&&(a[e+1]=t>>8&255),o>2&&(a[e+2]=t>>16&255)),a},B.prototype=new I,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),I.prototype.finalize.call(this)};var D=function(e){var t,r,n,i,o,f,s,a,c,u,l,d,h,p,m,y,g,v,w,A,E,T,k,_,S,x,P,N,M,R,C,O,I,B,D,F,U,L,z,G,j,Y,K,q,H,V,J,W,Q,X,$,Z,ee,te,re,ne,ie,oe,fe,se,ae,ce,ue;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],f=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],a=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(f<<1|s>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|f>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(a<<1|c>>>31),r=o^(c<<1|a>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=f^(u<<1|l>>>31),r=s^(l<<1|u>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=a^(d<<1|h>>>31),r=c^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=u^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],m=e[1],V=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,N=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ae=e[30]<<9|e[31]>>>23,Y=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,B=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Q=e[23]<<10|e[22]>>>22,R=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,F=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,O=e[45]<<29|e[44]>>>3,I=e[44]<<29|e[45]>>>3,_=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,z=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,Z=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,x=e[18]<<20|e[19]>>>12,P=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,fe=e[28]<<7|e[29]>>>25,G=e[38]<<8|e[39]>>>24,j=e[39]<<8|e[38]>>>24,T=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~y&v,e[1]=m^~g&w,e[10]=_^~x&N,e[11]=S^~P&M,e[20]=B^~F&L,e[21]=D^~U&z,e[30]=q^~V&W,e[31]=H^~J&Q,e[40]=te^~ne&oe,e[41]=re^~ie&fe,e[2]=y^~v&A,e[3]=g^~w&E,e[12]=x^~N&R,e[13]=P^~M&C,e[22]=F^~L&G,e[23]=U^~z&j,e[32]=V^~W&X,e[33]=J^~Q&$,e[42]=ne^~oe&se,e[43]=ie^~fe&ae,e[4]=v^~A&T,e[5]=w^~E&k,e[14]=N^~R&O,e[15]=M^~C&I,e[24]=L^~G&Y,e[25]=z^~j&K,e[34]=W^~X&Z,e[35]=Q^~$&ee,e[44]=oe^~se&ce,e[45]=fe^~ae&ue,e[6]=A^~T&p,e[7]=E^~k&m,e[16]=R^~O&_,e[17]=C^~I&S,e[26]=G^~Y&B,e[27]=j^~K&D,e[36]=X^~Z&q,e[37]=$^~ee&H,e[46]=se^~ce&te,e[47]=ae^~ue&re,e[8]=T^~p&y,e[9]=k^~m&g,e[18]=O^~_&x,e[19]=I^~S&P,e[28]=Y^~B&F,e[29]=K^~D&U,e[38]=Z^~q&V,e[39]=ee^~H&J,e[48]=ce^~te&ne,e[49]=ue^~re&ie,e[0]^=b[n],e[1]^=b[n+1]};if(a)e.exports=S;else{for(P=0;P<x.length;++P)f[x[P]]=S[x[P]];c&&(void 0===(n=function(){return S}.call(t,r,t,e))||(e.exports=n))}}()},561:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},689:function(e){"use strict";!function(t){const r=2147483647;function n(e){const t=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]);let r=1779033703,n=3144134277,i=1013904242,o=2773480762,f=1359893119,s=2600822924,a=528734635,c=1541459225;const u=new Uint32Array(64);function l(e){let l=0,d=e.length;for(;d>=64;){let h,b,p,m,y,g=r,v=n,w=i,A=o,E=f,T=s,k=a,_=c;for(b=0;b<16;b++)p=l+4*b,u[b]=(255&e[p])<<24|(255&e[p+1])<<16|(255&e[p+2])<<8|255&e[p+3];for(b=16;b<64;b++)h=u[b-2],m=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,h=u[b-15],y=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,u[b]=(m+u[b-7]|0)+(y+u[b-16]|0)|0;for(b=0;b<64;b++)m=(((E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&T^~E&k)|0)+(_+(t[b]+u[b]|0)|0)|0,y=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&v^g&w^v&w)|0,_=k,k=T,T=E,E=A+m|0,A=w,w=v,v=g,g=m+y|0;r=r+g|0,n=n+v|0,i=i+w|0,o=o+A|0,f=f+E|0,s=s+T|0,a=a+k|0,c=c+_|0,l+=64,d-=64}}l(e);let d,h=e.length%64,b=e.length/536870912|0,p=e.length<<3,m=h<56?56:120,y=e.slice(e.length-h,e.length);for(y.push(128),d=h+1;d<m;d++)y.push(0);return y.push(b>>>24&255),y.push(b>>>16&255),y.push(b>>>8&255),y.push(b>>>0&255),y.push(p>>>24&255),y.push(p>>>16&255),y.push(p>>>8&255),y.push(p>>>0&255),l(y),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function i(e,t,r){e=e.length<=64?e:n(e);const i=64+t.length+4,o=new Array(i),f=new Array(64);let s,a=[];for(s=0;s<64;s++)o[s]=54;for(s=0;s<e.length;s++)o[s]^=e[s];for(s=0;s<t.length;s++)o[64+s]=t[s];for(s=i-4;s<i;s++)o[s]=0;for(s=0;s<64;s++)f[s]=92;for(s=0;s<e.length;s++)f[s]^=e[s];function c(){for(let e=i-1;e>=i-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)c(),a=a.concat(n(f.concat(n(o)))),r-=32;return r>0&&(c(),a=a.concat(n(f.concat(n(o))).slice(0,r))),a}function o(e,t,r,n,i){let o;for(c(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)a(e,16*o,i,16),s(i,n),c(i,0,e,t+16*o,16);for(o=0;o<r;o++)c(e,t+2*o*16,e,16*o,16);for(o=0;o<r;o++)c(e,t+16*(2*o+1),e,16*(o+r),16)}function f(e,t){return e<<t|e>>>32-t}function s(e,t){c(e,0,t,0,16);for(let e=8;e>0;e-=2)t[4]^=f(t[0]+t[12],7),t[8]^=f(t[4]+t[0],9),t[12]^=f(t[8]+t[4],13),t[0]^=f(t[12]+t[8],18),t[9]^=f(t[5]+t[1],7),t[13]^=f(t[9]+t[5],9),t[1]^=f(t[13]+t[9],13),t[5]^=f(t[1]+t[13],18),t[14]^=f(t[10]+t[6],7),t[2]^=f(t[14]+t[10],9),t[6]^=f(t[2]+t[14],13),t[10]^=f(t[6]+t[2],18),t[3]^=f(t[15]+t[11],7),t[7]^=f(t[3]+t[15],9),t[11]^=f(t[7]+t[3],13),t[15]^=f(t[11]+t[7],18),t[1]^=f(t[0]+t[3],7),t[2]^=f(t[1]+t[0],9),t[3]^=f(t[2]+t[1],13),t[0]^=f(t[3]+t[2],18),t[6]^=f(t[5]+t[4],7),t[7]^=f(t[6]+t[5],9),t[4]^=f(t[7]+t[6],13),t[5]^=f(t[4]+t[7],18),t[11]^=f(t[10]+t[9],7),t[8]^=f(t[11]+t[10],9),t[9]^=f(t[8]+t[11],13),t[10]^=f(t[9]+t[8],18),t[12]^=f(t[15]+t[14],7),t[13]^=f(t[12]+t[15],9),t[14]^=f(t[13]+t[12],13),t[15]^=f(t[14]+t[13],18);for(let r=0;r<16;++r)e[r]+=t[r]}function a(e,t,r,n){for(let i=0;i<n;i++)r[i]^=e[t+i]}function c(e,t,r,n,i){for(;i--;)r[n++]=e[t++]}function u(e){if(!e||"number"!=typeof e.length)return!1;for(let t=0;t<e.length;t++){const r=e[t];if("number"!=typeof r||r%1||r<0||r>=256)return!1}return!0}function l(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function d(e,t,n,f,s,d,h){if(n=l(n,"N"),f=l(f,"r"),s=l(s,"p"),d=l(d,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>r/128/f)throw new Error("N too large");if(f>r/128/s)throw new Error("r too large");if(!u(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!u(t))throw new Error("salt must be an array or buffer");t=Array.prototype.slice.call(t);let b=i(e,t,128*s*f);const p=new Uint32Array(32*s*f);for(let e=0;e<p.length;e++){const t=4*e;p[e]=(255&b[t+3])<<24|(255&b[t+2])<<16|(255&b[t+1])<<8|(255&b[t+0])<<0}const m=new Uint32Array(64*f),y=new Uint32Array(32*f*n),g=32*f,v=new Uint32Array(16),w=new Uint32Array(16),A=s*n*2;let E,T,k=0,_=null,S=!1,x=0,P=0;const N=h?parseInt(1e3/f):4294967295,M="undefined"!=typeof setImmediate?setImmediate:setTimeout,R=function(){if(S)return h(new Error("cancelled"),k/A);let t;switch(x){case 0:T=32*P*f,c(p,T,m,0,g),x=1,E=0;case 1:t=n-E,t>N&&(t=N);for(let e=0;e<t;e++)c(m,0,y,(E+e)*g,g),o(m,g,f,v,w);if(E+=t,k+=t,h){const e=parseInt(1e3*k/A);if(e!==_){if(S=h(null,k/A),S)break;_=e}}if(E<n)break;E=0,x=2;case 2:t=n-E,t>N&&(t=N);for(let e=0;e<t;e++){const e=m[16*(2*f-1)]&n-1;a(y,e*g,m,g),o(m,g,f,v,w)}if(E+=t,k+=t,h){const e=parseInt(1e3*k/A);if(e!==_){if(S=h(null,k/A),S)break;_=e}}if(E<n)break;if(c(m,0,p,T,g),P++,P<s){x=0;break}b=[];for(let e=0;e<p.length;e++)b.push(p[e]>>0&255),b.push(p[e]>>8&255),b.push(p[e]>>16&255),b.push(p[e]>>24&255);const r=i(e,b,d);return h&&h(null,1,r),r}h&&M(R)};if(!h)for(;;){const e=R();if(null!=e)return e}R()}const h={scrypt:function(e,t,r,n,i,o,f){return new Promise((function(s,a){let c=0;f&&f(0),d(e,t,r,n,i,o,(function(e,t,r){if(e)a(e);else if(r)f&&1!==c&&f(1),s(new Uint8Array(r));else if(f&&t!==c)return c=t,f(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(d(e,t,r,n,i,o))}};e.exports=h}()},909:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function f(e){try{a(n.next(e))}catch(e){o(e)}}function s(e){try{a(n.throw(e))}catch(e){o(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(f,s)}a((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,f={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(a){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(f=0)),f;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return f.label++,{value:s[1],done:!1};case 5:f.label++,n=s[1],s=[0];continue;case 7:s=f.ops.pop(),f.trys.pop();continue;default:if(!((i=(i=f.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){f=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){f.label=s[1];break}if(6===s[0]&&f.label<i[1]){f.label=i[1],i=s;break}if(i&&f.label<i[2]){f.label=i[2],f.ops.push(s);break}i[2]&&f.ops.pop(),f.trys.pop();continue}s=t.call(e,f)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var f=r(354),s=o(r(14)),a=r(825),c=r(859),u=function(){function e(e){this.contract={},this.version=1,this.isDev=e}return Object.defineProperty(e.prototype,"apiBaseUrl",{get:function(){return this.isDev?c.API_ENDPOINT_DEV:c.API_ENDPOINT},enumerable:!1,configurable:!0}),e.prototype.init=function(e,t){return n(this,void 0,void 0,(function(){var r,n;return i(this,(function(i){switch(i.label){case 0:if(!a.ethers.utils.isAddress(t))throw new Error("Invalid contract address.");return r="".concat(this.apiBaseUrl,"/v2/redeemables/").concat(t),[4,s.default.get(r,{validateStatus:function(e){return e<500}})];case 1:if(200!==(n=i.sent()).status)throw new Error("Something went wrong.");if(this.version=n.data.version,this.contract=this.version>1?f.TokenCollection__factoryV2.connect(t,e):f.TokenCollection__factory.connect(t,e),!this.contract)throw new Error("Initialization failed.");return[2]}}))}))},e.create=function(t,r,o){return n(this,void 0,void 0,(function(){var n;return i(this,(function(i){switch(i.label){case 0:return[4,(n=new e(o)).init(t,r)];case 1:return i.sent(),[2,n]}}))}))},e.prototype.getRedeemable=function(e){return n(this,void 0,void 0,(function(){var t,r;return i(this,(function(n){switch(n.label){case 0:return this.version>1?[4,this.contract.redeemableAt(e)]:[3,2];case 1:return r=n.sent(),[3,4];case 2:return[4,this.contract.redeemableByIndex(e)];case 3:r=n.sent(),n.label=4;case 4:return[2,{index:e,tokenURI:(t=r)[0],price:t.price,maxAmount:t[3].toNumber(),maxPerWallet:t.maxPerWallet.toNumber(),maxPerMint:t.maxPerMint.toNumber(),redeemedCount:t.redeemedCount.toNumber(),merkleRoot:t.merkleRoot,active:t.active,nonce:t.nonce}]}}))}))},e.prototype.redeem=function(e,t,r){return n(this,void 0,void 0,(function(){var n;return i(this,(function(i){switch(i.label){case 0:return[4,this.getRedeemable(e)];case 1:return n=i.sent(),this.version>1?[4,this.contract.redeem(n.index,t,r,[],{value:n.price.mul(t)})]:[3,3];case 2:case 4:return[2,i.sent()];case 3:return[4,this.contract["redeem(uint256,uint256,bytes)"](n.index,t,r,{value:n.price.mul(t)})]}}))}))},e.prototype.presaleRedeem=function(e,t,r,o){return n(this,void 0,void 0,(function(){var n;return i(this,(function(i){switch(i.label){case 0:return[4,this.getRedeemable(e)];case 1:return n=i.sent(),this.version>1?[4,this.contract.redeem(n.index,t,r,o,{value:n.price.mul(t)})]:[3,3];case 2:case 4:return[2,i.sent()];case 3:return[4,this.contract["redeem(uint256,uint256,bytes,bytes32[])"](n.index,t,r,o,{value:n.price.mul(t)})]}}))}))},e.prototype.burn=function(e){return this.contract.burn(e)},e}();t.default=u},859:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.API_ENDPOINT=t.API_ENDPOINT_DEV=void 0,t.API_ENDPOINT_DEV="https://api-testnet.niftykit.com",t.API_ENDPOINT="https://api.niftykit.com"},368:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(909));t.default=i.default},354:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DropCollection__factory:()=>y,TokenCollection__factory:()=>c,TokenCollection__factoryV2:()=>h});var n,i=r(268),o=r(503),f=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"RedeemableCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"collector",type:"address"},{indexed:!0,internalType:"uint256",name:"redeemableId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"TokenRedeemed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"uri",type:"string"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"maxAmount",type:"uint256"},{internalType:"uint256",name:"maxPerWallet",type:"uint256"},{internalType:"uint256",name:"maxPerMint",type:"uint256"}],name:"createRedeemable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"address",name:"treasury_",type:"address"},{internalType:"address",name:"royalty_",type:"address"},{internalType:"uint96",name:"royaltyFee_",type:"uint96"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"invalidate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"},{internalType:"uint256",name:"numberOfTokens",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"redeem",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"},{internalType:"uint256",name:"numberOfTokens",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"redeem",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"redeemableByIndex",outputs:[{internalType:"string",name:"uri",type:"string"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"maxAmount",type:"uint256"},{internalType:"uint256",name:"maxPerWallet",type:"uint256"},{internalType:"uint256",name:"maxPerMint",type:"uint256"},{internalType:"uint256",name:"redeemedCount",type:"uint256"},{internalType:"bytes32",name:"merkleRoot",type:"bytes32"},{internalType:"bool",name:"active",type:"bool"},{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"},{internalType:"uint256",name:"_salePrice",type:"uint256"}],name:"royaltyInfo",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setDefaultRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"},{internalType:"bytes32",name:"newRoot",type:"bytes32"}],name:"setMerkleRoot",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setTokenRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newTreasury",type:"address"}],name:"setTreasury",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalRedeemables",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalRevenue",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"treasury",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],a="0x608060405234801561001057600080fd5b50615ca780620000216000396000f3fe60806040526004361061026a5760003560e01c80635944c75311610153578063b88d4fde116100cb578063d0def5211161007f578063ea4caca511610064578063ea4caca514610715578063f0f442601461074a578063f2fde38b1461076a57600080fd5b8063d0def5211461069f578063e985e9c5146106bf57600080fd5b8063bf2d9e0b116100b0578063bf2d9e0b14610654578063c13e33f31461066a578063c87b56dd1461067f57600080fd5b8063b88d4fde14610621578063b9b607471461064157600080fd5b8063715018a61161012257806395d89b411161010757806395d89b41146105cc578063a22cb465146105e1578063afef7c041461060157600080fd5b8063715018a61461058c5780638da5cb5b146105a157600080fd5b80635944c7531461050057806361d027b3146105205780636352211e1461054c57806370a082311461056c57600080fd5b80631ea1afdb116101e65780632f745c59116101b557806342842e0e1161019a57806342842e0e146104a057806342966c68146104c05780634f6ccce7146104e057600080fd5b80632f745c591461046b5780633ccfd60b1461048b57600080fd5b80631ea1afdb146103bf57806320c5429b146103df57806323b872dd146103ff5780632a55205a1461041f57600080fd5b8063081812fc1161023d5780630daf00bc116102225780630daf00bc1461036057806318160ddd1461038057806318712c211461039f57600080fd5b8063081812fc146102fb578063095ea7b31461034057600080fd5b806301ffc9a71461026f5780630449015a146102a457806304634d8d146102b957806306fdde03146102d9575b600080fd5b34801561027b57600080fd5b5061028f61028a366004615303565b61078a565b60405190151581526020015b60405180910390f35b6102b76102b2366004615362565b61079b565b005b3480156102c557600080fd5b506102b76102d43660046153f5565b610ddf565b3480156102e557600080fd5b506102ee610e6e565b60405161029b919061549e565b34801561030757600080fd5b5061031b6103163660046154b1565b610f00565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161029b565b34801561034c57600080fd5b506102b761035b3660046154ca565b610fda565b34801561036c57600080fd5b506102b761037b3660046155d7565b611167565b34801561038c57600080fd5b506099545b60405190815260200161029b565b3480156103ab57600080fd5b506102b76103ba366004615634565b611321565b3480156103cb57600080fd5b506102b76103da3660046154b1565b611434565b3480156103eb57600080fd5b506102b76103fa3660046154b1565b611565565b34801561040b57600080fd5b506102b761041a366004615656565b61169c565b34801561042b57600080fd5b5061043f61043a366004615634565b61173e565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091520161029b565b34801561047757600080fd5b506103916104863660046154ca565b611837565b34801561049757600080fd5b506102b7611906565b3480156104ac57600080fd5b506102b76104bb366004615656565b611aef565b3480156104cc57600080fd5b506102b76104db3660046154b1565b611b0a565b3480156104ec57600080fd5b506103916104fb3660046154b1565b611bab565b34801561050c57600080fd5b506102b761051b366004615692565b611c69565b34801561052c57600080fd5b5061012e5473ffffffffffffffffffffffffffffffffffffffff1661031b565b34801561055857600080fd5b5061031b6105673660046154b1565b611cf5565b34801561057857600080fd5b506103916105873660046156ce565b611da7565b34801561059857600080fd5b506102b7611e75565b3480156105ad57600080fd5b5060fb5473ffffffffffffffffffffffffffffffffffffffff1661031b565b3480156105d857600080fd5b506102ee611f02565b3480156105ed57600080fd5b506102b76105fc3660046156e9565b611f11565b34801561060d57600080fd5b506102b761061c366004615725565b611f1c565b34801561062d57600080fd5b506102b761063c3660046157bb565b611fe5565b6102b761064f366004615837565b61208d565b34801561066057600080fd5b5061012f54610391565b34801561067657600080fd5b506103916126fb565b34801561068b57600080fd5b506102ee61069a3660046154b1565b61270c565b3480156106ab57600080fd5b506102b76106ba3660046158e9565b612717565b3480156106cb57600080fd5b5061028f6106da366004615937565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152606a6020908152604080832093909416825291909152205460ff1690565b34801561072157600080fd5b506107356107303660046154b1565b6127a2565b60405161029b99989796959493929190615961565b34801561075657600080fd5b506102b76107653660046156ce565b612915565b34801561077657600080fd5b506102b76107853660046156ce565b6129de565b6000610795826129e7565b92915050565b8383838360006101966000868152602001908152602001600020604051806101200160405290816000820180546107d1906159b7565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906159b7565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e0808301919091526008909201546101009091015281015190915061091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a2031000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6020810151349061093090866129f2565b1115610998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56616c756520696e636f727265637400000000000000000000000000000000006044820152606401610916565b60608101516000868152610197602052604081206109e291879190335b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205490612a05565b1115610a4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203100000000000000000000000000000000006044820152606401610916565b604081015160a0820151610a5e9086612a05565b1115610ac6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203200000000000000000000000000000000006044820152606401610916565b60fb5473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd984848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050610100850151610bd39150610b43908a90612a05565b604051602001610b5591815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b90612a11565b73ffffffffffffffffffffffffffffffffffffffff1614610c56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203200000000000000000000000000000000000000006044820152606401610916565b6000898152610196602052604080822081516101208101909252805482908290610c7f906159b7565b80601f0160208091040260200160405190810160405280929190818152602001828054610cab906159b7565b8015610cf85780601f10610ccd57610100808354040283529160200191610cf8565b820191906000526020600020905b815481529060010190602001808311610cdb57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c080830191909152600783015460ff16151560e08301526008909201546101009091015281015190915015610dc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203300000000000000000000000000000000000000006044820152606401610916565b610dd38a8a612a35565b50505050505050505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314610e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b610e6a8282612cae565b5050565b606060658054610e7d906159b7565b80601f0160208091040260200160405190810160405280929190818152602001828054610ea9906159b7565b8015610ef65780601f10610ecb57610100808354040283529160200191610ef6565b820191906000526020600020905b815481529060010190602001808311610ed957829003601f168201915b5050505050905090565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff16610fb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610916565b5060009081526069602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610fe582611cf5565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610916565b3373ffffffffffffffffffffffffffffffffffffffff821614806110cc57506110cc81336106da565b611158576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610916565b6111628383612e27565b505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146111e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b60006111f46101955490565b905061120561019580546001019055565b604080516101208101825287815260208082018890528183018790526060820186905260808201859052600060a0830181905260c08301819052600160e08401526101008301819052848152610196825292909220815180519293919261126f9284920190615206565b50602082015160018201556040808301516002830155606083015160038301556080830151600483015560a0830151600583015560c0830151600683015560e08301516007830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055610100909201516008909101555181907f722868ecddb510067469fb495ac2904c250692c67941ad0bd36e01c2059fc77890600090a2505050505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146113a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000828152610196602052604090206007015460ff1661141e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b6000918252610196602052604090912060060155565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146114b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000818152610196602052604090206007015460ff16611531576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b6000818152610196602052604090206008015461154f906001612a05565b6000918252610196602052604090912060080155565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146115e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000818152610196602052604090206007015460ff16611662576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b60009081526101966020526040902060070180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6116a7335b82612ec7565b611733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610916565b611162838383613037565b600082815260ca6020908152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169282019290925282916117f957506040805180820190915260c95473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b60208101516000906127109061181d906bffffffffffffffffffffffff1687615a3a565b6118279190615aa6565b91519350909150505b9250929050565b600061184283611da7565b82106118d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610916565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152609760209081526040808320938352929052205490565b60004711611970576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f302062616c616e636500000000000000000000000000000000000000000000006044820152606401610916565b61012d546040517f9af608c9000000000000000000000000000000000000000000000000000000008152306004820152479160009173ffffffffffffffffffffffffffffffffffffffff90911690639af608c99060240160206040518083038186803b1580156119df57600080fd5b505afa1580156119f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a179190615aba565b61012d546040517fb9bff4bb0000000000000000000000000000000000000000000000000000000081526004810183905291925073ffffffffffffffffffffffffffffffffffffffff169063b9bff4bb90602401600060405180830381600087803b158015611a8557600080fd5b505af1158015611a99573d6000803e3d6000fd5b505061012d54611ac2925073ffffffffffffffffffffffffffffffffffffffff169050826132a9565b61012e54610e6a9073ffffffffffffffffffffffffffffffffffffffff16611aea8484613403565b6132a9565b61116283838360405180602001604052806000815250611fe5565b611b13336116a1565b611b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610916565b611ba88161340f565b50565b6000611bb660995490565b8210611c44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610916565b60998281548110611c5757611c57615ad3565b90600052602060002001549050919050565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314611cea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b611162838383613418565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610916565b600073ffffffffffffffffffffffffffffffffffffffff8216611e4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610916565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526068602052604090205490565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314611ef6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b611f0060006135a2565b565b606060668054610e7d906159b7565b610e6a338383613619565b6000611f28600161373f565b90508015611f5d57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b611f6a86868686866138ca565b611f726139e4565b611f7a6139e4565b8015611fdd57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b611fef3383612ec7565b61207b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610916565b61208784848484613a7b565b50505050565b8585858560006101966000868152602001908152602001600020604051806101200160405290816000820180546120c3906159b7565b80601f01602080910402602001604051908101604052809291908181526020018280546120ef906159b7565b801561213c5780601f106121115761010080835404028352916020019161213c565b820191906000526020600020905b81548152906001019060200180831161211f57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e0808301919091526008909201546101009091015281015190915061220c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203100000000000000000000000000000000000000006044820152606401610916565b6020810151349061221d90866129f2565b1115612285576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56616c756520696e636f727265637400000000000000000000000000000000006044820152606401610916565b60608101516000868152610197602052604081206122a691879190336109b5565b111561230e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203100000000000000000000000000000000006044820152606401610916565b604081015160a08201516123229086612a05565b111561238a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203200000000000000000000000000000000006044820152606401610916565b60fb5473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661240784848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050610100850151610bd39150610b43908a90612a05565b73ffffffffffffffffffffffffffffffffffffffff1614612484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203200000000000000000000000000000000000000006044820152606401610916565b60008b81526101966020526040808220815161012081019092528054829082906124ad906159b7565b80601f01602080910402602001604051908101604052809291908181526020018280546124d9906159b7565b80156125265780601f106124fb57610100808354040283529160200191612526565b820191906000526020600020905b81548152906001019060200180831161250957829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c080830191909152600783015460ff16151560e0830152600890920154610100909101528101519091506125f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203300000000000000000000000000000000000000006044820152606401610916565b61267d88888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060c08301516040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260340160405160208183030381529060405280519060200120613b1e565b6126e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203400000000000000000000000000000000000000006044820152606401610916565b6126ed8c8c612a35565b505050505050505050505050565b60006127076101955490565b905090565b606061079582613b34565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314612798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b610e6a8282613ce7565b6060600080600080600080600080600061019660008c8152602001908152602001600020604051806101200160405290816000820180546127e2906159b7565b80601f016020809104026020016040519081016040528092919081815260200182805461280e906159b7565b801561285b5780601f106128305761010080835404028352916020019161285b565b820191906000526020600020905b81548152906001019060200180831161283e57829003601f168201915b505050505081526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820160009054906101000a900460ff161515151581526020016008820154815250509050806000015181602001518260400151836060015184608001518560a001518660c001518760e00151886101000151995099509950995099509950995099509950509193959799909294969850565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314612996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b61012e80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611ba881613d18565b600061079582613e45565b60006129fe8284615a3a565b9392505050565b60006129fe8284615b02565b6000806000612a208585613e9b565b91509150612a2d81613f08565b509392505050565b6000828152610196602052604080822081516101208101909252805482908290612a5e906159b7565b80601f0160208091040260200160405190810160405280929190818152602001828054612a8a906159b7565b8015612ad75780601f10612aac57610100808354040283529160200191612ad7565b820191906000526020600020905b815481529060010190602001808311612aba57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e08201526008909101546101009091015261012f54909150612b489034612a05565b61012f5560a0810151612b5b9083612a05565b600084815261019660209081526040808320600501939093556101979052908120612b8991849190336109b5565b6000848152610197602090815260408083203384529091528120919091555b82811015612bcd57612bbb338351613ce7565b80612bc581615b1a565b915050612ba8565b5061012d546040517f107e9cf100000000000000000000000000000000000000000000000000000000815234600482015273ffffffffffffffffffffffffffffffffffffffff9091169063107e9cf190602401600060405180830381600087803b158015612c3a57600080fd5b505af1158015612c4e573d6000803e3d6000fd5b5050505082612c5a3390565b73ffffffffffffffffffffffffffffffffffffffff167fac100af3f918c30d71d2bfb00d975e36374d10738748c899376504e76c70bc7384604051612ca191815260200190565b60405180910390a3505050565b6127106bffffffffffffffffffffffff82161115612d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff8216612dcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610916565b6040805180820190915273ffffffffffffffffffffffffffffffffffffffff9092168083526bffffffffffffffffffffffff9091166020909201829052740100000000000000000000000000000000000000009091021760c955565b600081815260696020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190612e8182611cf5565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff16612f78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610916565b6000612f8383611cf5565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612ff1575073ffffffffffffffffffffffffffffffffffffffff8082166000908152606a602090815260408083209388168352929052205460ff165b8061302f57508373ffffffffffffffffffffffffffffffffffffffff1661301784610f00565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff1661305782611cf5565b73ffffffffffffffffffffffffffffffffffffffff16146130fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff821661319c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610916565b6131a7838383614161565b6131b2600082612e27565b73ffffffffffffffffffffffffffffffffffffffff831660009081526068602052604081208054600192906131e8908490615b53565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152606860205260408120805460019290613223908490615b02565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b80471015613313576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610916565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461336d576040519150601f19603f3d011682016040523d82523d6000602084013e613372565b606091505b5050905080611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610916565b60006129fe8284615b53565b611ba88161416c565b6127106bffffffffffffffffffffffff821611156134b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff8216613535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610916565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff93841681526bffffffffffffffffffffffff9283166020808301918252600096875260ca9052919094209351905190911674010000000000000000000000000000000000000000029116179055565b60fb805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156136af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610916565b73ffffffffffffffffffffffffffffffffffffffff8381166000818152606a602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101612ca1565b60008054610100900460ff16156137f6578160ff1660011480156137625750303b155b6137ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610916565b506000919050565b60005460ff80841691161061388d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610916565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff92909216919091179055600190565b919050565b600054610100900460ff16613961576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b61396b85856141ae565b6139736139e4565b61397b6139e4565b61398361424f565b61012d8054337fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915561012e805490911673ffffffffffffffffffffffffffffffffffffffff85161790556139dd8282612cae565b5050505050565b600054610100900460ff16611f00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b613a86848484613037565b613a92848484846142ef565b612087576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b600082613b2b85846144ee565b14949350505050565b60008181526067602052604090205460609073ffffffffffffffffffffffffffffffffffffffff16613be8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006064820152608401610916565b6000828152610130602052604081208054613c02906159b7565b80601f0160208091040260200160405190810160405280929190818152602001828054613c2e906159b7565b8015613c7b5780601f10613c5057610100808354040283529160200191613c7b565b820191906000526020600020905b815481529060010190602001808311613c5e57829003601f168201915b505050505090506000613c9960408051602081019091526000815290565b9050805160001415613cac575092915050565b815115613cde578082604051602001613cc6929190615b6a565b60405160208183030381529060405292505050919050565b61302f8461455a565b6000613cf36101945490565b9050613d0461019480546001019055565b613d0e8382614676565b6111628183614690565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314613d99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b73ffffffffffffffffffffffffffffffffffffffff8116613e3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610916565b611ba8816135a2565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610795575061079582614761565b600080825160411415613ed25760208301516040840151606085015160001a613ec6878285856147b7565b94509450505050611830565b825160401415613efc5760208301516040840151613ef18683836148cf565b935093505050611830565b50600090506002611830565b6000816004811115613f1c57613f1c615b99565b1415613f255750565b6001816004811115613f3957613f39615b99565b1415613fa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610916565b6002816004811115613fb557613fb5615b99565b141561401d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610916565b600381600481111561403157614031615b99565b14156140bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610916565b60048160048111156140d3576140d3615b99565b1415611ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610916565b611162838383614921565b6141758161492c565b600081815261013060205260409020805461418f906159b7565b159050611ba857600081815261013060205260408120611ba89161528a565b600054610100900460ff16614245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b610e6a8282614a05565b600054610100900460ff166142e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b611f00336135a2565b600073ffffffffffffffffffffffffffffffffffffffff84163b156144e3576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290614366903390899088908890600401615bc8565b602060405180830381600087803b15801561438057600080fd5b505af19250505080156143ce575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526143cb91810190615c11565b60015b614498573d8080156143fc576040519150601f19603f3d011682016040523d82523d6000602084013e614401565b606091505b508051614490576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061302f565b506001949350505050565b600081815b8451811015612a2d57600085828151811061451057614510615ad3565b602002602001015190508083116145365760008381526020829052604090209250614547565b600081815260208490526040902092505b508061455281615b1a565b9150506144f3565b60008181526067602052604090205460609073ffffffffffffffffffffffffffffffffffffffff1661460e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610916565b600061462560408051602081019091526000815290565b9050600081511161464557604051806020016040528060008152506129fe565b8061464f84614ac3565b604051602001614660929190615b6a565b6040516020818303038152906040529392505050565b610e6a828260405180602001604052806000815250614bf5565b60008281526067602052604090205473ffffffffffffffffffffffffffffffffffffffff16614741576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610916565b600082815261013060209081526040909120825161116292840190615206565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610795575061079582614c98565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156147ee57506000905060036148c6565b8460ff16601b1415801561480657508460ff16601c14155b1561481757506000905060046148c6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561486b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166148bf576000600192509250506148c6565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83168161490560ff86901c601b615b02565b9050614913878288856147b7565b935093505050935093915050565b611162838383614d7b565b600061493782611cf5565b905061494581600084614161565b614950600083612e27565b73ffffffffffffffffffffffffffffffffffffffff81166000908152606860205260408120805460019290614986908490615b53565b909155505060008281526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555183919073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600054610100900460ff16614a9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b8151614aaf906065906020850190615206565b508051611162906066906020840190615206565b606081614b0357505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115614b2d5780614b1781615b1a565b9150614b269050600a83615aa6565b9150614b07565b60008167ffffffffffffffff811115614b4857614b486154f4565b6040519080825280601f01601f191660200182016040528015614b72576020820181803683370190505b5090505b841561302f57614b87600183615b53565b9150614b94600a86615c2e565b614b9f906030615b02565b60f81b818381518110614bb457614bb4615ad3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350614bee600a86615aa6565b9450614b76565b614bff8383614e81565b614c0c60008484846142ef565b611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480614d2b57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061079557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610795565b73ffffffffffffffffffffffffffffffffffffffff8316614de357614dde81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b614e20565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614614e2057614e20838261504f565b73ffffffffffffffffffffffffffffffffffffffff8216614e445761116281615106565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146111625761116282826151b5565b73ffffffffffffffffffffffffffffffffffffffff8216614efe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610916565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1615614f8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610916565b614f9660008383614161565b73ffffffffffffffffffffffffffffffffffffffff82166000908152606860205260408120805460019290614fcc908490615b02565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161505c84611da7565b6150669190615b53565b6000838152609860205260409020549091508082146150c65773ffffffffffffffffffffffffffffffffffffffff841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b50600091825260986020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352609781528383209183525290812055565b60995460009061511890600190615b53565b6000838152609a60205260408120546099805493945090928490811061514057615140615ad3565b90600052602060002001549050806099838154811061516157615161615ad3565b6000918252602080832090910192909255828152609a9091526040808220849055858252812055609980548061519957615199615c42565b6001900381819060005260206000200160009055905550505050565b60006151c083611da7565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b828054615212906159b7565b90600052602060002090601f016020900481019282615234576000855561527a565b82601f1061524d57805160ff191683800117855561527a565b8280016001018555821561527a579182015b8281111561527a57825182559160200191906001019061525f565b506152869291506152c0565b5090565b508054615296906159b7565b6000825580601f106152a6575050565b601f016020900490600052602060002090810190611ba891905b5b8082111561528657600081556001016152c1565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611ba857600080fd5b60006020828403121561531557600080fd5b81356129fe816152d5565b60008083601f84011261533257600080fd5b50813567ffffffffffffffff81111561534a57600080fd5b60208301915083602082850101111561183057600080fd5b6000806000806060858703121561537857600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561539d57600080fd5b6153a987828801615320565b95989497509550505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146138c557600080fd5b80356bffffffffffffffffffffffff811681146138c557600080fd5b6000806040838503121561540857600080fd5b615411836153b5565b915061541f602084016153d9565b90509250929050565b60005b8381101561544357818101518382015260200161542b565b838111156120875750506000910152565b6000815180845261546c816020860160208601615428565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006129fe6020830184615454565b6000602082840312156154c357600080fd5b5035919050565b600080604083850312156154dd57600080fd5b6154e6836153b5565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff8084111561553e5761553e6154f4565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715615584576155846154f4565b8160405280935085815286868601111561559d57600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126155c857600080fd5b6129fe83833560208501615523565b600080600080600060a086880312156155ef57600080fd5b853567ffffffffffffffff81111561560657600080fd5b615612888289016155b7565b9860208801359850604088013597606081013597506080013595509350505050565b6000806040838503121561564757600080fd5b50508035926020909101359150565b60008060006060848603121561566b57600080fd5b615674846153b5565b9250615682602085016153b5565b9150604084013590509250925092565b6000806000606084860312156156a757600080fd5b833592506156b7602085016153b5565b91506156c5604085016153d9565b90509250925092565b6000602082840312156156e057600080fd5b6129fe826153b5565b600080604083850312156156fc57600080fd5b615705836153b5565b91506020830135801515811461571a57600080fd5b809150509250929050565b600080600080600060a0868803121561573d57600080fd5b853567ffffffffffffffff8082111561575557600080fd5b61576189838a016155b7565b9650602088013591508082111561577757600080fd5b50615784888289016155b7565b945050615793604087016153b5565b92506157a1606087016153b5565b91506157af608087016153d9565b90509295509295909350565b600080600080608085870312156157d157600080fd5b6157da856153b5565b93506157e8602086016153b5565b925060408501359150606085013567ffffffffffffffff81111561580b57600080fd5b8501601f8101871361581c57600080fd5b61582b87823560208401615523565b91505092959194509250565b6000806000806000806080878903121561585057600080fd5b8635955060208701359450604087013567ffffffffffffffff8082111561587657600080fd5b6158828a838b01615320565b9096509450606089013591508082111561589b57600080fd5b818901915089601f8301126158af57600080fd5b8135818111156158be57600080fd5b8a60208260051b85010111156158d357600080fd5b6020830194508093505050509295509295509295565b600080604083850312156158fc57600080fd5b615905836153b5565b9150602083013567ffffffffffffffff81111561592157600080fd5b61592d858286016155b7565b9150509250929050565b6000806040838503121561594a57600080fd5b615953836153b5565b915061541f602084016153b5565b60006101208083526159758184018d615454565b602084019b909b52505060408101979097526060870195909552608086019390935260a085019190915260c0840152151560e083015261010090910152919050565b600181811c908216806159cb57607f821691505b60208210811415615a05577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615a7257615a72615a0b565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615ab557615ab5615a77565b500490565b600060208284031215615acc57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008219821115615b1557615b15615a0b565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615b4c57615b4c615a0b565b5060010190565b600082821015615b6557615b65615a0b565b500390565b60008351615b7c818460208801615428565b835190830190615b90818360208801615428565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152615c076080830184615454565b9695505050505050565b600060208284031215615c2357600080fd5b81516129fe816152d5565b600082615c3d57615c3d615a77565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220559a0d6ec60fa121a42b1af801ffe7053ec3b9c6367d27186dac275407cf5b4564736f6c63430008090033",c=function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this;return(n=t.length>1?e.apply(this,t)||this:e.call(this,s,a,t[0])||this).contractName="TokenCollection",n}return f(t,e),t.prototype.deploy=function(t){return e.prototype.deploy.call(this,t||{})},t.prototype.getDeployTransaction=function(t){return e.prototype.getDeployTransaction.call(this,t||{})},t.prototype.attach=function(t){return e.prototype.attach.call(this,t)},t.prototype.connect=function(t){return e.prototype.connect.call(this,t)},t.createInterface=function(){return new i.vU(s)},t.connect=function(e,t){return new o.CH(e,s,t)},t.bytecode=a,t.abi=s,t}(o.lV),u=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),l=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"NewOwnerIsZeroAddress",type:"error"},{inputs:[],name:"NoHandoverRequest",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"operator",type:"bytes32"},{indexed:!1,internalType:"bool",name:"allowed",type:"bool"}],name:"OperatorAllowed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"operator",type:"bytes32"},{indexed:!1,internalType:"bool",name:"blocked",type:"bool"}],name:"OperatorBlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"OwnershipHandoverCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"OwnershipHandoverRequested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"RedeemableCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"roles",type:"uint256"}],name:"RolesUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"redeemableId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"TokenRedeemed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"ADMIN_ROLE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"BURNER_ROLE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MANAGER_ROLE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cancelOwnershipHandover",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pendingOwner",type:"address"}],name:"completeOwnershipHandover",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"uri",type:"string"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"maxQuantity",type:"uint256"},{internalType:"uint256",name:"maxPerWallet",type:"uint256"},{internalType:"uint256",name:"maxPerMint",type:"uint256"}],name:"createRedeemable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"roles",type:"uint256"}],name:"grantRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"roles",type:"uint256"}],name:"hasAllRoles",outputs:[{internalType:"bool",name:"result",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"roles",type:"uint256"}],name:"hasAnyRole",outputs:[{internalType:"bool",name:"result",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"},{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"address",name:"treasury_",type:"address"},{internalType:"address",name:"royalty_",type:"address"},{internalType:"uint96",name:"royaltyFee_",type:"uint96"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"invalidate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"operator",type:"bytes32"}],name:"isAllowedOperator",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"isOperator",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"operator",type:"bytes32"}],name:"isBlockedOperator",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"operatorRegistry",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"roles",type:"uint256"}],name:"ordinalsFromRoles",outputs:[{internalType:"uint8[]",name:"ordinals",type:"uint8[]"}],stateMutability:"pure",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"result",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pendingOwner",type:"address"}],name:"ownershipHandoverExpiresAt",outputs:[{internalType:"uint256",name:"result",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ownershipHandoverValidFor",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"redeem",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"redeemableAt",outputs:[{components:[{internalType:"string",name:"tokenURI",type:"string"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"maxQuantity",type:"uint256"},{internalType:"uint256",name:"maxPerWallet",type:"uint256"},{internalType:"uint256",name:"maxPerMint",type:"uint256"},{internalType:"uint256",name:"redeemedCount",type:"uint256"},{internalType:"bytes32",name:"merkleRoot",type:"bytes32"},{internalType:"bool",name:"active",type:"bool"},{internalType:"uint256",name:"nonce",type:"uint256"}],internalType:"struct Redeemables.Redeemable",name:"data",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"roles",type:"uint256"}],name:"renounceRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"requestOwnershipHandover",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"roles",type:"uint256"}],name:"revokeRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"ordinals",type:"uint8[]"}],name:"rolesFromOrdinals",outputs:[{internalType:"uint256",name:"roles",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"rolesOf",outputs:[{internalType:"uint256",name:"roles",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"},{internalType:"uint256",name:"_salePrice",type:"uint256"}],name:"royaltyInfo",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"operator",type:"bytes32"},{internalType:"bool",name:"allowed",type:"bool"}],name:"setAllowedOperator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"operator",type:"bytes32"},{internalType:"bool",name:"blocked",type:"bool"}],name:"setBlockedOperator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setDefaultRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"},{internalType:"bytes32",name:"newRoot",type:"bytes32"}],name:"setMerkleRoot",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"registry",type:"address"}],name:"setOperatorRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setTokenRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"newUri",type:"string"}],name:"setTokenURI",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newTreasury",type:"address"}],name:"setTreasury",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalRedeemables",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalRevenue",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"treasury",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"unsetOperatorRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],d="0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6148cd80620000f46000396000f3fe6080604052600436106103975760003560e01c80635944c753116101dc578063b88d4fde11610102578063d3fc9864116100a0578063f04e283e1161006f578063f04e283e14610ad5578063f0f4426014610af5578063f2fde38b14610b15578063fee81cf414610b3557600080fd5b8063d3fc986414610a62578063d7533f0214610a82578063e985e9c514610aa0578063ec87621c14610ac057600080fd5b8063bf2d9e0b116100dc578063bf2d9e0b146109f8578063bfa9aadc14610a0d578063c13e33f314610a2d578063c87b56dd14610a4257600080fd5b8063b88d4fde14610995578063b9358c81146109b5578063b9b60747146109e557600080fd5b80637359e41f1161017a5780639b93bdd1116101495780639b93bdd1146109155780639d28fb8614610935578063a22cb46514610955578063afe735471461097557600080fd5b80637359e41f146108a557806375b238fc146108d25780638da5cb5b146108e757806395d89b411461090057600080fd5b8063691ebfb7116101b6578063691ebfb71461081357806370a0823114610840578063715018a61461086057806371dbf0a71461087557600080fd5b80635944c753146107b557806361d027b3146107d55780636352211e146107f357600080fd5b806323b872dd116102c157806342842e0e1161025f578063514e62fc1161022e578063514e62fc14610736578063521242c21461076d57806354d1f13d1461078257806358c2225b1461079757600080fd5b806342842e0e146106b657806342966c68146106d65780634a4ee7b1146106f65780634f6ccce71461071657600080fd5b80632a55205a1161029b5780632a55205a146106115780632de94807146106505780632f745c59146106815780633ccfd60b146106a157600080fd5b806323b872dd146105c757806325692962146105e7578063282c51f3146105fc57600080fd5b8063162094c4116103395780631c10893f116103085780631c10893f146105305780631cd64df4146105505780631ea1afdb1461058757806320c5429b146105a757600080fd5b8063162094c4146104bb57806318160ddd146104db578063183a4f6e146104f057806318712c211461051057600080fd5b8063081812fc11610375578063081812fc14610415578063095ea7b31461044d5780630daf00bc1461046d57806313a661ed1461048d57600080fd5b806301ffc9a71461039c57806304634d8d146103d157806306fdde03146103f3575b600080fd5b3480156103a857600080fd5b506103bc6103b7366004613c3d565b610b66565b60405190151581526020015b60405180910390f35b3480156103dd57600080fd5b506103f16103ec366004613c8d565b610ba4565b005b3480156103ff57600080fd5b50610408610be9565b6040516103c89190613d18565b34801561042157600080fd5b50610435610430366004613d2b565b610c7b565b6040516001600160a01b0390911681526020016103c8565b34801561045957600080fd5b506103f1610468366004613d44565b610ca2565b34801561047957600080fd5b506103f1610488366004613e2b565b610d6b565b34801561049957600080fd5b506104ad6104a8366004613e87565b610db6565b6040519081526020016103c8565b3480156104c757600080fd5b506103f16104d6366004613f3f565b610de9565b3480156104e757600080fd5b5060d4546104ad565b3480156104fc57600080fd5b506103f161050b366004613d2b565b610e29565b34801561051c57600080fd5b506103f161052b366004613f85565b610e36565b34801561053c57600080fd5b506103f161054b366004613d44565b610e76565b34801561055c57600080fd5b506103bc61056b366004613d44565b60609190911b638b78c6d8176000908152602090205481161490565b34801561059357600080fd5b506103f16105a2366004613d2b565b610e9f565b3480156105b357600080fd5b506103f16105c2366004613d2b565b610ede565b3480156105d357600080fd5b506103f16105e2366004613fa7565b610f1d565b3480156105f357600080fd5b506103f1610f4f565b34801561060857600080fd5b506104ad600481565b34801561061d57600080fd5b5061063161062c366004613f85565b610f9f565b604080516001600160a01b0390931683526020830191909152016103c8565b34801561065c57600080fd5b506104ad61066b366004613fe3565b60601b638b78c6d8176000908152602090205490565b34801561068d57600080fd5b506104ad61069c366004613d44565b61104d565b3480156106ad57600080fd5b506103f16110e3565b3480156106c257600080fd5b506103f16106d1366004613fa7565b611254565b3480156106e257600080fd5b506103f16106f1366004613d2b565b61126f565b34801561070257600080fd5b506103f1610711366004613d44565b61129d565b34801561072257600080fd5b506104ad610731366004613d2b565b6112c2565b34801561074257600080fd5b506103bc610751366004613d44565b60609190911b638b78c6d8176000908152602090205416151590565b34801561077957600080fd5b506103f1611355565b34801561078e57600080fd5b506103f161139e565b3480156107a357600080fd5b50609b546001600160a01b0316610435565b3480156107c157600080fd5b506103f16107d0366004613ffe565b6113db565b3480156107e157600080fd5b50609c546001600160a01b0316610435565b3480156107ff57600080fd5b5061043561080e366004613d2b565b61141c565b34801561081f57600080fd5b5061083361082e366004613d2b565b61147c565b6040516103c8919061403a565b34801561084c57600080fd5b506104ad61085b366004613fe3565b6115d8565b34801561086c57600080fd5b506103f161165e565b34801561088157600080fd5b506103bc610890366004613d2b565b6000908152609e602052604090205460ff1690565b3480156108b157600080fd5b506108c56108c0366004613d2b565b61169a565b6040516103c891906140bd565b3480156108de57600080fd5b506104ad600181565b3480156108f357600080fd5b50638b78c6d81954610435565b34801561090c57600080fd5b506104086116e2565b34801561092157600080fd5b506103f1610930366004614114565b6116f1565b34801561094157600080fd5b506103f1610950366004613fe3565b611780565b34801561096157600080fd5b506103f1610970366004614137565b61182a565b34801561098157600080fd5b506103f1610990366004614114565b6118ea565b3480156109a157600080fd5b506103f16109b0366004614161565b611970565b3480156109c157600080fd5b506103bc6109d0366004613d2b565b6000908152609f602052604090205460ff1690565b6103f16109f3366004614220565b6119a2565b348015610a0457600080fd5b50609d546104ad565b348015610a1957600080fd5b506103f1610a283660046142d0565b611a54565b348015610a3957600080fd5b506104ad611b9f565b348015610a4e57600080fd5b50610408610a5d366004613d2b565b611baf565b348015610a6e57600080fd5b506103f1610a7d366004614374565b611bba565b348015610a8e57600080fd5b506040516202a30081526020016103c8565b348015610aac57600080fd5b506103bc610abb3660046143ca565b611bfb565b348015610acc57600080fd5b506104ad600281565b348015610ae157600080fd5b506103f1610af0366004613fe3565b611cf6565b348015610b0157600080fd5b506103f1610b10366004613fe3565b611d66565b348015610b2157600080fd5b506103f1610b30366004613fe3565b611dbf565b348015610b4157600080fd5b506104ad610b50366004613fe3565b60601b63389a75e1176000908152602090205490565b6000610b7182611e14565b80610b805750610b8082611e54565b80610b8f5750610b8f82611e79565b80610b9e5750610b9e82611e54565b92915050565b6001638b78c6d83360601b176000528060206000205416610bda57638b78c6d819543314610bda576382b429006000526004601cfd5b610be48383611e9e565b505050565b606060a08054610bf8906143f4565b80601f0160208091040260200160405190810160405280929190818152602001828054610c24906143f4565b8015610c715780601f10610c4657610100808354040283529160200191610c71565b820191906000526020600020905b815481529060010190602001808311610c5457829003601f168201915b5050505050905090565b6000610c8682611f58565b50600090815260a460205260409020546001600160a01b031690565b609b5482906001600160a01b031615610d6157609b54604051632aeb048b60e01b81526001600160a01b0383811660048301526000921690632aeb048b90602401602060405180830381865afa158015610d00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d24919061442e565b6000818152609f602052604090205490915060ff1615610d5f5760405162461bcd60e51b8152600401610d5690614447565b60405180910390fd5b505b610be48383611fb7565b6002638b78c6d83360601b176000528060206000205416610da157638b78c6d819543314610da1576382b429006000526004601cfd5b610dae86868686866120c7565b505050505050565b600060208201825160051b81015b808214610de257600160ff8351161b83179250602082019150610dc4565b5050919050565b6002638b78c6d83360601b176000528060206000205416610e1f57638b78c6d819543314610e1f576382b429006000526004601cfd5b610be483836121d9565b610e33338261226d565b50565b6002638b78c6d83360601b176000528060206000205416610e6c57638b78c6d819543314610e6c576382b429006000526004601cfd5b610be483836122be565b638b78c6d819543314610e91576382b429006000526004601cfd5b610e9b8282612304565b5050565b6002638b78c6d83360601b176000528060206000205416610ed557638b78c6d819543314610ed5576382b429006000526004601cfd5b610e9b82612350565b6002638b78c6d83360601b176000528060206000205416610f1457638b78c6d819543314610f14576382b429006000526004601cfd5b610e9b826123b3565b610f28335b826123ff565b610f445760405162461bcd60e51b8152600401610d5690614493565b610be483838361245e565b60006202a3006001600160401b03164201905063389a75e13360601b1760005280602060002055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b60008281526069602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916110145750604080518082019091526068546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611033906001600160601b0316876144f7565b61103d919061452c565b91519350909150505b9250929050565b6000611058836115d8565b82106110ba5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d56565b506001600160a01b0391909116600090815260d260209081526040808320938352929052205490565b6001638b78c6d83360601b17600052806020600020541661111957638b78c6d819543314611119576382b429006000526004601cfd5b600047116111555760405162461bcd60e51b8152602060048201526009602482015268302062616c616e636560b81b6044820152606401610d56565b609a54604051639af608c960e01b81523060048201526001600160a01b039091169047906000908390639af608c990602401602060405180830381865afa1580156111a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c8919061442e565b60405163b9bff4bb60e01b8152600481018290529091506001600160a01b0384169063b9bff4bb90602401600060405180830381600087803b15801561120d57600080fd5b505af1158015611221573d6000803e3d6000fd5b5050505061122f8382612605565b609c5461124e906001600160a01b0316611249848461271e565b612605565b50505050565b610be483838360405180602001604052806000815250611970565b61127833610f22565b6112945760405162461bcd60e51b8152600401610d5690614493565b610e338161272a565b638b78c6d8195433146112b8576382b429006000526004601cfd5b610e9b828261226d565b60006112cd60d45490565b82106113305760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d56565b60d4828154811061134357611343614540565b90600052602060002001549050919050565b6001638b78c6d83360601b17600052806020600020541661138b57638b78c6d81954331461138b576382b429006000526004601cfd5b50609b80546001600160a01b0319169055565b63389a75e13360601b176000526000602060002055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6001638b78c6d83360601b17600052806020600020541661141157638b78c6d819543314611411576382b429006000526004601cfd5b61124e848484612733565b600081815260a260205260408120546001600160a01b031680610b9e5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d56565b6114d060405180610120016040528060608152602001600081526020016000815260200160008152602001600081526020016000815260200160008019168152602001600015158152602001600081525090565b60008281526034602052604090819020815161012081019092528054829082906114f9906143f4565b80601f0160208091040260200160405190810160405280929190818152602001828054611525906143f4565b80156115725780601f1061154757610100808354040283529160200191611572565b820191906000526020600020905b81548152906001019060200180831161155557829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e08201526008909101546101009091015292915050565b60006001600160a01b0382166116425760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d56565b506001600160a01b0316600090815260a3602052604090205490565b638b78c6d819543314611679576382b429006000526004601cfd5b600033600080516020614878833981519152600080a36000638b78c6d81955565b606060206040510160005b8082526001841660051b820191508360011c935083156116c7576001016116a5565b5060405191508060405260208201810360051c825250919050565b606060a18054610bf8906143f4565b6002638b78c6d83360601b17600052806020600020541661172757638b78c6d819543314611727576382b429006000526004601cfd5b6000838152609f6020908152604091829020805460ff1916851515908117909155915191825284917ffd502da418dbb99d2724cacf064b43af780fe7b6607b623466711e8a99dedc3991015b60405180910390a2505050565b6001638b78c6d83360601b1760005280602060002054166117b657638b78c6d8195433146117b6576382b429006000526004601cfd5b6117c782632aeb048b60e01b6127fe565b6118075760405162461bcd60e51b8152602060048201526011602482015270496e76616c696420496e7465726661636560781b6044820152606401610d56565b50609b80546001600160a01b0319166001600160a01b0392909216919091179055565b609b5482906001600160a01b0316156118e057609b54604051632aeb048b60e01b81526001600160a01b0383811660048301526000921690632aeb048b90602401602060405180830381865afa158015611888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ac919061442e565b6000818152609f602052604090205490915060ff16156118de5760405162461bcd60e51b8152600401610d5690614447565b505b610be4838361281a565b6002638b78c6d83360601b17600052806020600020541661192057638b78c6d819543314611920576382b429006000526004601cfd5b6000838152609e6020908152604091829020805460ff1916851515908117909155915191825284917f50e00cc379ab7d213a199e50fb1aff65f74b67b5131bc6ebb6516f47b2542e659101611773565b61197a33836123ff565b6119965760405162461bcd60e51b8152600401610d5690614493565b61124e84848484612825565b60006119ad8761147c565b609d549091506119bd9034612858565b609d55609a5460405163107e9cf160e01b81523460048201526001600160a01b039091169063107e9cf190602401600060405180830381600087803b158015611a0557600080fd5b505af1158015611a19573d6000803e3d6000fd5b50505050611a30611a273390565b82518890612864565b611a4b87878787611a44638b78c6d8195490565b88886128a9565b50505050505050565b600054610100900460ff1615808015611a745750600054600160ff909116105b80611a8e5750303b158015611a8e575060005460ff166001145b611af15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d56565b6000805460ff191660011790558015611b14576000805461ff0019166101001790555b611b1e8686612c8a565b611b26612cbb565b611b2e612cbb565b611b36612cbb565b611b4287858585612ce4565b611b5161016880546001019055565b8015611a4b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b6000611baa60335490565b905090565b6060610b9e82612d4f565b6002638b78c6d83360601b176000528060206000205416611bf057638b78c6d819543314611bf0576382b429006000526004601cfd5b61124e848484612864565b609b546000906001600160a01b031615611cc557609b54604051632aeb048b60e01b81526001600160a01b0384811660048301526000921690632aeb048b90602401602060405180830381865afa158015611c5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7e919061442e565b6000818152609e602052604090205490915060ff1615611ca2576001915050610b9e565b6000818152609f602052604090205460ff1615611cc3576000915050610b9e565b505b6001600160a01b03808416600090815260a5602090815260408083209386168352929052205460ff165b9392505050565b638b78c6d819543314611d11576382b429006000526004601cfd5b8060601b60601c905063389a75e18160601b1760005260206000208054421115611d4357636f5e88186000526004601cfd5b60008155508033600080516020614878833981519152600080a3638b78c6d81955565b6001638b78c6d83360601b176000528060206000205416611d9c57638b78c6d819543314611d9c576382b429006000526004601cfd5b50609c80546001600160a01b0319166001600160a01b0392909216919091179055565b638b78c6d819543314611dda576382b429006000526004601cfd5b6001600160a01b031680611df657637448fbae6000526004601cfd5b8033600080516020614878833981519152600080a3638b78c6d81955565b60006001600160e01b031982166380ac58cd60e01b1480611e4557506001600160e01b03198216635b5e139f60e01b145b80610b9e5750610b9e82611e79565b60006001600160e01b0319821663780e9d6360e01b1480610b9e5750610b9e82611e14565b60006001600160e01b03198216632fea6ab760e21b1480610b9e5750610b9e82612e58565b6127106001600160601b0382161115611ec95760405162461bcd60e51b8152600401610d5690614556565b6001600160a01b038216611f1f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610d56565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217606855565b600081815260a260205260409020546001600160a01b0316610e335760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d56565b6000611fc28261141c565b9050806001600160a01b0316836001600160a01b03160361202f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d56565b336001600160a01b038216148061204b575061204b8133611bfb565b6120bd5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d56565b610be48383612e8d565b60006120d260335490565b90506120e2603380546001019055565b604080516101208101825287815260208082018890528183018790526060820186905260808201859052600060a0830181905260c08301819052600160e084015261010083018190528481526034909152919091208151819061214590826145e6565b50602082015160018201556040808301516002830155606083015160038301556080830151600483015560a0830151600583015560c0830151600683015560e083015160078301805460ff1916911515919091179055610100909201516008909101555181907f722868ecddb510067469fb495ac2904c250692c67941ad0bd36e01c2059fc77890600090a2505050505050565b600082815260a260205260409020546001600160a01b03166122545760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610d56565b600082815261010460205260409020610be482826145e6565b638b78c6d88260601b176000526020600020805482811681189050808255808460601b60601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a350505050565b60008281526034602052604090206007015460ff166122ef5760405162461bcd60e51b8152600401610d56906146a5565b60009182526034602052604090912060060155565b638b78c6d88260601b17600052602060002081815417808255808460601b60601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a350505050565b60008181526034602052604090206007015460ff166123815760405162461bcd60e51b8152600401610d56906146a5565b60008181526034602052604090206008015461239e906001612858565b60009182526034602052604090912060080155565b60008181526034602052604090206007015460ff166123e45760405162461bcd60e51b8152600401610d56906146a5565b6000908152603460205260409020600701805460ff19169055565b60008061240b8361141c565b9050806001600160a01b0316846001600160a01b0316148061243257506124328185611bfb565b806124565750836001600160a01b031661244b84610c7b565b6001600160a01b0316145b949350505050565b826001600160a01b03166124718261141c565b6001600160a01b0316146124d55760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d56565b6001600160a01b0382166125375760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d56565b612542838383612efb565b61254d600082612e8d565b6001600160a01b038316600090815260a3602052604081208054600192906125769084906146c9565b90915550506001600160a01b038216600090815260a3602052604081208054600192906125a49084906146e0565b9091555050600081815260a2602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b804710156126555760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d56565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146126a2576040519150601f19603f3d011682016040523d82523d6000602084013e6126a7565b606091505b5050905080610be45760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d56565b6000611cef82846146c9565b610e3381612f06565b6127106001600160601b038216111561275e5760405162461bcd60e51b8152600401610d5690614556565b6001600160a01b0382166127b45760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610d56565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752606990529190942093519051909116600160a01b029116179055565b600061280983612f48565b8015611cef5750611cef8383612f7b565b610e9b338383613004565b61283084848461245e565b61283c848484846130d2565b61124e5760405162461bcd60e51b8152600401610d56906146f8565b6000611cef82846146e0565b60005b8281101561124e57600061287b6101685490565b905061288c61016880546001019055565b61289685826131d3565b6128a081846121d9565b50600101612867565b60006128b48861147c565b90508060e001516128d75760405162461bcd60e51b8152600401610d56906146a5565b602081015134906128e890896131ed565b11156129285760405162461bcd60e51b815260206004820152600f60248201526e15985b1d59481a5b98dbdc9c9958dd608a1b6044820152606401610d56565b80608001518711156129745760405162461bcd60e51b8152602060048201526015602482015274115e18d959591959081b585e081c195c881b5a5b9d605a1b6044820152606401610d56565b604081015160a08201516129889089612858565b11156129cc5760405162461bcd60e51b8152602060048201526013602482015272115e18d959591959081b585e08185b5bdd5b9d606a1b6044820152606401610d56565b606081015160008981526035602090815260408083203384529091529020546129f59089612858565b1115612a435760405162461bcd60e51b815260206004820152601760248201527f4578636565646564206d6178207065722077616c6c65740000000000000000006044820152606401610d56565b836001600160a01b0316612b1387878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050610100850151612b0d9150612a9b908d90612858565b604051602001612aad91815260200190565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b906131f9565b6001600160a01b031614612b5d5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610d56565b60c081015115612c1757612bdb83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060c08301516040516bffffffffffffffffffffffff193360601b1660208201526034016040516020818303038152906040528051906020012061321d565b612c175760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610d56565b60008881526034602090815260408083206005018054600190810190915560358352818420338086529084529382902080549091019055518981528a92917fac100af3f918c30d71d2bfb00d975e36374d10738748c899376504e76c70bc73910160405180910390a35050505050505050565b600054610100900460ff16612cb15760405162461bcd60e51b8152600401610d569061474a565b610e9b8282613233565b600054610100900460ff16612ce25760405162461bcd60e51b8152600401610d569061474a565b565b600054610100900460ff16612d0b5760405162461bcd60e51b8152600401610d569061474a565b612d1484613273565b612d1c612cbb565b609a8054336001600160a01b031991821617909155609c80549091166001600160a01b03851617905561124e8282611e9e565b6060612d5a82611f58565b6000828152610104602052604081208054612d74906143f4565b80601f0160208091040260200160405190810160405280929190818152602001828054612da0906143f4565b8015612ded5780601f10612dc257610100808354040283529160200191612ded565b820191906000526020600020905b815481529060010190602001808311612dd057829003601f168201915b505050505090506000612e0b60408051602081019091526000815290565b90508051600003612e1d575092915050565b815115612e4f578082604051602001612e37929190614795565b60405160208183030381529060405292505050919050565b6124568461329d565b60006001600160e01b0319821663152a902d60e11b1480610b9e57506301ffc9a760e01b6001600160e01b0319831614610b9e565b600081815260a46020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612ec28261141c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b610be4838383613310565b612f0f816133c8565b6000818152610104602052604090208054612f29906143f4565b159050610e3357600081815261010460205260408120610e3391613bd9565b6000612f5b826301ffc9a760e01b612f7b565b8015610b9e5750612f74826001600160e01b0319612f7b565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d91506000519050828015612fed575060208210155b8015612ff95750600081115b979650505050505050565b816001600160a01b0316836001600160a01b0316036130655760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d56565b6001600160a01b03838116600081815260a56020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006001600160a01b0384163b156131c857604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906131169033908990889088906004016147c4565b6020604051808303816000875af1925050508015613151575060408051601f3d908101601f1916820190925261314e91810190614801565b60015b6131ae573d80801561317f576040519150601f19603f3d011682016040523d82523d6000602084013e613184565b606091505b5080516000036131a65760405162461bcd60e51b8152600401610d56906146f8565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612456565b506001949350505050565b610e9b82826040518060200160405280600081525061346f565b6000611cef82846144f7565b600080600061320885856134a2565b91509150613215816134e4565b509392505050565b60008261322a858461369a565b14949350505050565b600054610100900460ff1661325a5760405162461bcd60e51b8152600401610d569061474a565b60a061326683826145e6565b5060a1610be482826145e6565b6001600160a01b0316638b78c6d8198190558060006000805160206148788339815191528180a350565b60606132a882611f58565b60006132bf60408051602081019091526000815290565b905060008151116132df5760405180602001604052806000815250611cef565b806132e9846136df565b6040516020016132fa929190614795565b6040516020818303038152906040529392505050565b6001600160a01b03831661336b576133668160d48054600083815260d560205260408120829055600182018355919091527f9780e26d96b1f2a9a18ef8fc72d589dbf03ef788137b64f43897e83a91e7feec0155565b61338e565b816001600160a01b0316836001600160a01b03161461338e5761338e83826137df565b6001600160a01b0382166133a557610be48161387c565b826001600160a01b0316826001600160a01b031614610be457610be4828261392b565b60006133d38261141c565b90506133e181600084612efb565b6133ec600083612e8d565b6001600160a01b038116600090815260a3602052604081208054600192906134159084906146c9565b9091555050600082815260a2602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b613479838361396f565b61348660008484846130d2565b610be45760405162461bcd60e51b8152600401610d56906146f8565b60008082516041036134d85760208301516040840151606085015160001a6134cc87828585613abd565b94509450505050611046565b50600090506002611046565b60008160048111156134f8576134f861481e565b036135005750565b60018160048111156135145761351461481e565b036135615760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610d56565b60028160048111156135755761357561481e565b036135c25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d56565b60038160048111156135d6576135d661481e565b0361362e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d56565b60048160048111156136425761364261481e565b03610e335760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d56565b600081815b8451811015613215576136cb828683815181106136be576136be614540565b6020026020010151613baa565b9150806136d781614834565b91505061369f565b6060816000036137065750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613730578061371a81614834565b91506137299050600a8361452c565b915061370a565b6000816001600160401b0381111561374a5761374a613d6e565b6040519080825280601f01601f191660200182016040528015613774576020820181803683370190505b5090505b8415612456576137896001836146c9565b9150613796600a8661484d565b6137a19060306146e0565b60f81b8183815181106137b6576137b6614540565b60200101906001600160f81b031916908160001a9053506137d8600a8661452c565b9450613778565b600060016137ec846115d8565b6137f691906146c9565b600083815260d36020526040902054909150808214613849576001600160a01b038416600090815260d260209081526040808320858452825280832054848452818420819055835260d390915290208190555b50600091825260d3602090815260408084208490556001600160a01b03909416835260d281528383209183525290812055565b60d45460009061388e906001906146c9565b600083815260d5602052604081205460d480549394509092849081106138b6576138b6614540565b906000526020600020015490508060d483815481106138d7576138d7614540565b600091825260208083209091019290925582815260d5909152604080822084905585825281205560d480548061390f5761390f614861565b6001900381819060005260206000200160009055905550505050565b6000613936836115d8565b6001600160a01b03909316600090815260d260209081526040808320868452825280832085905593825260d39052919091209190915550565b6001600160a01b0382166139c55760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d56565b600081815260a260205260409020546001600160a01b031615613a2a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d56565b613a3660008383612efb565b6001600160a01b038216600090815260a360205260408120805460019290613a5f9084906146e0565b9091555050600081815260a2602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613af45750600090506003613ba1565b8460ff16601b14158015613b0c57508460ff16601c14155b15613b1d5750600090506004613ba1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613b71573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613b9a57600060019250925050613ba1565b9150600090505b94509492505050565b6000818310613bc6576000828152602084905260409020611cef565b6000838152602083905260409020611cef565b508054613be5906143f4565b6000825580601f10613bf5575050565b601f016020900490600052602060002090810190610e3391905b80821115613c235760008155600101613c0f565b5090565b6001600160e01b031981168114610e3357600080fd5b600060208284031215613c4f57600080fd5b8135611cef81613c27565b80356001600160a01b0381168114613c7157600080fd5b919050565b80356001600160601b0381168114613c7157600080fd5b60008060408385031215613ca057600080fd5b613ca983613c5a565b9150613cb760208401613c76565b90509250929050565b60005b83811015613cdb578181015183820152602001613cc3565b8381111561124e5750506000910152565b60008151808452613d04816020860160208601613cc0565b601f01601f19169290920160200192915050565b602081526000611cef6020830184613cec565b600060208284031215613d3d57600080fd5b5035919050565b60008060408385031215613d5757600080fd5b613d6083613c5a565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613dac57613dac613d6e565b604052919050565b60006001600160401b03831115613dcd57613dcd613d6e565b613de0601f8401601f1916602001613d84565b9050828152838383011115613df457600080fd5b828260208301376000602084830101529392505050565b600082601f830112613e1c57600080fd5b611cef83833560208501613db4565b600080600080600060a08688031215613e4357600080fd5b85356001600160401b03811115613e5957600080fd5b613e6588828901613e0b565b9860208801359850604088013597606081013597506080013595509350505050565b60006020808385031215613e9a57600080fd5b82356001600160401b0380821115613eb157600080fd5b818501915085601f830112613ec557600080fd5b813581811115613ed757613ed7613d6e565b8060051b9150613ee8848301613d84565b8181529183018401918481019088841115613f0257600080fd5b938501935b83851015613f33578435925060ff83168314613f235760008081fd5b8282529385019390850190613f07565b98975050505050505050565b60008060408385031215613f5257600080fd5b8235915060208301356001600160401b03811115613f6f57600080fd5b613f7b85828601613e0b565b9150509250929050565b60008060408385031215613f9857600080fd5b50508035926020909101359150565b600080600060608486031215613fbc57600080fd5b613fc584613c5a565b9250613fd360208501613c5a565b9150604084013590509250925092565b600060208284031215613ff557600080fd5b611cef82613c5a565b60008060006060848603121561401357600080fd5b8335925061402360208501613c5a565b915061403160408501613c76565b90509250925092565b6020815260008251610120806020850152614059610140850183613cec565b9150602085015160408501526040850151606085015260608501516080850152608085015160a085015260a085015160c085015260c085015160e085015260e08501516101006140ac8187018315159052565b959095015193019290925250919050565b6020808252825182820181905260009190848201906040850190845b818110156140f857835160ff16835292840192918401916001016140d9565b50909695505050505050565b80358015158114613c7157600080fd5b6000806040838503121561412757600080fd5b82359150613cb760208401614104565b6000806040838503121561414a57600080fd5b61415383613c5a565b9150613cb760208401614104565b6000806000806080858703121561417757600080fd5b61418085613c5a565b935061418e60208601613c5a565b92506040850135915060608501356001600160401b038111156141b057600080fd5b8501601f810187136141c157600080fd5b6141d087823560208401613db4565b91505092959194509250565b60008083601f8401126141ee57600080fd5b5081356001600160401b0381111561420557600080fd5b6020830191508360208260051b850101111561104657600080fd5b6000806000806000806080878903121561423957600080fd5b863595506020870135945060408701356001600160401b038082111561425e57600080fd5b818901915089601f83011261427257600080fd5b81358181111561428157600080fd5b8a602082850101111561429357600080fd5b6020830196508095505060608901359150808211156142b157600080fd5b506142be89828a016141dc565b979a9699509497509295939492505050565b60008060008060008060c087890312156142e957600080fd5b6142f287613c5a565b955060208701356001600160401b038082111561430e57600080fd5b61431a8a838b01613e0b565b9650604089013591508082111561433057600080fd5b5061433d89828a01613e0b565b94505061434c60608801613c5a565b925061435a60808801613c5a565b915061436860a08801613c76565b90509295509295509295565b60008060006060848603121561438957600080fd5b61439284613c5a565b92506020840135915060408401356001600160401b038111156143b457600080fd5b6143c086828701613e0b565b9150509250925092565b600080604083850312156143dd57600080fd5b6143e683613c5a565b9150613cb760208401613c5a565b600181811c9082168061440857607f821691505b60208210810361442857634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561444057600080fd5b5051919050565b6020808252602c908201527f4f70657261746f7220686173206265656e20626c6f636b656420627920636f6e60408201526b3a3930b1ba1037bbb732b91760a11b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615614511576145116144e1565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261453b5761453b614516565b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b601f821115610be457600081815260208120601f850160051c810160208610156145c75750805b601f850160051c820191505b81811015610dae578281556001016145d3565b81516001600160401b038111156145ff576145ff613d6e565b6146138161460d84546143f4565b846145a0565b602080601f83116001811461464857600084156146305750858301515b600019600386901b1c1916600185901b178555610dae565b600085815260208120601f198616915b8281101561467757888601518255948401946001909101908401614658565b50858210156146955787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020808252600a90820152694e6f742061637469766560b01b604082015260600190565b6000828210156146db576146db6144e1565b500390565b600082198211156146f3576146f36144e1565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600083516147a7818460208801613cc0565b8351908301906147bb818360208801613cc0565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906147f790830184613cec565b9695505050505050565b60006020828403121561481357600080fd5b8151611cef81613c27565b634e487b7160e01b600052602160045260246000fd5b600060018201614846576148466144e1565b5060010190565b60008261485c5761485c614516565b500690565b634e487b7160e01b600052603160045260246000fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a264697066735822122099dde4802314b9e1f4c38da49ac82adb44e44ce5590540fe919aad3692f96e6964736f6c634300080f0033",h=function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.length>1?e.apply(this,t)||this:e.call(this,l,d,t[0])||this}return u(t,e),t.prototype.deploy=function(t){return e.prototype.deploy.call(this,t||{})},t.prototype.getDeployTransaction=function(t){return e.prototype.getDeployTransaction.call(this,t||{})},t.prototype.attach=function(t){return e.prototype.attach.call(this,t)},t.prototype.connect=function(t){return e.prototype.connect.call(this,t)},t.createInterface=function(){return new i.vU(l)},t.connect=function(e,t){return new o.CH(e,l,t)},t.bytecode=d,t.abi=l,t}(o.lV),b=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ApprovalCallerNotOwnerNorApproved",type:"error"},{inputs:[],name:"ApprovalQueryForNonexistentToken",type:"error"},{inputs:[],name:"ApproveToCaller",type:"error"},{inputs:[],name:"BalanceQueryForZeroAddress",type:"error"},{inputs:[],name:"InvalidQueryRange",type:"error"},{inputs:[],name:"MintERC2309QuantityExceedsLimit",type:"error"},{inputs:[],name:"MintToZeroAddress",type:"error"},{inputs:[],name:"MintZeroQuantity",type:"error"},{inputs:[],name:"OwnerQueryForNonexistentToken",type:"error"},{inputs:[],name:"OwnershipNotInitializedForExtraData",type:"error"},{inputs:[],name:"TransferCallerNotOwnerNorApproved",type:"error"},{inputs:[],name:"TransferFromIncorrectOwner",type:"error"},{inputs:[],name:"TransferToNonERC721ReceiverImplementer",type:"error"},{inputs:[],name:"TransferToZeroAddress",type:"error"},{inputs:[],name:"URIQueryForNonexistentToken",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"fromTokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"toTokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"ConsecutiveTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64[]",name:"quantities",type:"uint64[]"},{internalType:"address[]",name:"recipients",type:"address[]"}],name:"batchAirdrop",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"explicitOwnershipOf",outputs:[{components:[{internalType:"address",name:"addr",type:"address"},{internalType:"uint64",name:"startTimestamp",type:"uint64"},{internalType:"bool",name:"burned",type:"bool"},{internalType:"uint24",name:"extraData",type:"uint24"}],internalType:"struct IERC721AUpgradeable.TokenOwnership",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"explicitOwnershipsOf",outputs:[{components:[{internalType:"address",name:"addr",type:"address"},{internalType:"uint64",name:"startTimestamp",type:"uint64"},{internalType:"bool",name:"burned",type:"bool"},{internalType:"uint24",name:"extraData",type:"uint24"}],internalType:"struct IERC721AUpgradeable.TokenOwnership[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"address",name:"treasury_",type:"address"},{internalType:"address",name:"royalty_",type:"address"},{internalType:"uint96",name:"royaltyFee_",type:"uint96"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxPerMint",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxPerWallet",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64",name:"quantity",type:"uint64"}],name:"mint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"quantity",type:"uint64"}],name:"mintTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"presaleActive",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64",name:"quantity",type:"uint64"},{internalType:"uint256",name:"allowed",type:"uint256"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"presaleMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"quantity",type:"uint64"},{internalType:"uint256",name:"allowed",type:"uint256"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"presaleMintTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"price",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"},{internalType:"uint256",name:"_salePrice",type:"uint256"}],name:"royaltyInfo",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"saleActive",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"newBaseURI",type:"string"}],name:"setBaseURI",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setDefaultRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newRoot",type:"bytes32"}],name:"setMerkleRoot",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setTokenRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newTreasury",type:"address"}],name:"setTreasury",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newMaxAmount",type:"uint256"},{internalType:"uint256",name:"newMaxPerMint",type:"uint256"},{internalType:"uint256",name:"newMaxPerWallet",type:"uint256"},{internalType:"uint256",name:"newPrice",type:"uint256"},{internalType:"bool",name:"presale",type:"bool"}],name:"startSale",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopSale",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"tokensOfOwner",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"start",type:"uint256"},{internalType:"uint256",name:"stop",type:"uint256"}],name:"tokensOfOwnerIn",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalRevenue",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"treasury",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],m="0x608060405260d2805461ffff191690553480156200001c57600080fd5b50620000276200002d565b620000ef565b600054610100900460ff16156200009a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000ed576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6138cd80620000ff6000396000f3fe6080604052600436106102675760003560e01c8063715018a611610144578063b88d4fde116100b6578063e36b0b371161007a578063e36b0b3714610725578063e985e9c51461073a578063f0f442601461075a578063f2fde38b1461077a578063fb9d09c81461079a578063fd51fae8146107ad57600080fd5b8063b88d4fde14610683578063bf2d9e0b146106a3578063c23dc68f146106b8578063c87b56dd146106e5578063d53ab5011461070557600080fd5b806393d756aa1161010857806393d756aa146105e657806395d89b41146105f957806399a2557a1461060e578063a035b1fe1461062e578063a22cb46514610643578063afef7c041461066357600080fd5b8063715018a614610546578063789e3a551461055b5780637cb647591461057b5780638462151c1461059b5780638da5cb5b146105c857600080fd5b8063453c2310116101dd5780635bbb2177116101a15780635bbb2177146104895780635f48f393146104b657806361d027b3146104cb5780636352211e146104e957806368428a1b1461050957806370a082311461052657600080fd5b8063453c231014610407578063507e094f1461041c57806353135ca01461043157806355f804b3146104495780635944c7531461046957600080fd5b806318160ddd1161022f57806318160ddd1461033d57806323b872dd146103605780632a55205a14610380578063386bacdc146103bf5780633ccfd60b146103d257806342842e0e146103e757600080fd5b806301ffc9a71461026c57806304634d8d146102a157806306fdde03146102c3578063081812fc146102e5578063095ea7b31461031d575b600080fd5b34801561027857600080fd5b5061028c610287366004612ca8565b6107c0565b60405190151581526020015b60405180910390f35b3480156102ad57600080fd5b506102c16102bc366004612cf8565b6107eb565b005b3480156102cf57600080fd5b506102d8610801565b6040516102989190612d83565b3480156102f157600080fd5b50610305610300366004612d96565b61089c565b6040516001600160a01b039091168152602001610298565b34801561032957600080fd5b506102c1610338366004612daf565b6108e9565b34801561034957600080fd5b50610352610997565b604051908152602001610298565b34801561036c57600080fd5b506102c161037b366004612dd9565b6109b7565b34801561038c57600080fd5b506103a061039b366004612e15565b610bae565b604080516001600160a01b039093168352602083019190915201610298565b6102c16103cd366004612e92565b610c5c565b3480156103de57600080fd5b506102c1610ebe565b3480156103f357600080fd5b506102c1610402366004612dd9565b610ff8565b34801561041357600080fd5b5060d054610352565b34801561042857600080fd5b5060cf54610352565b34801561043d57600080fd5b5060d25460ff1661028c565b34801561045557600080fd5b506102c1610464366004612f96565b611013565b34801561047557600080fd5b506102c1610484366004612fca565b611027565b34801561049557600080fd5b506104a96104a4366004613006565b61103a565b6040516102989190613083565b3480156104c257600080fd5b5060ce54610352565b3480156104d757600080fd5b5060ca546001600160a01b0316610305565b3480156104f557600080fd5b50610305610504366004612d96565b611105565b34801561051557600080fd5b5060d254610100900460ff1661028c565b34801561053257600080fd5b506103526105413660046130c5565b611110565b34801561055257600080fd5b506102c1611178565b34801561056757600080fd5b506102c16105763660046130f0565b61118c565b34801561058757600080fd5b506102c1610596366004612d96565b6111c0565b3480156105a757600080fd5b506105bb6105b63660046130c5565b6111cd565b6040516102989190613139565b3480156105d457600080fd5b506033546001600160a01b0316610305565b6102c16105f4366004613171565b6112d5565b34801561060557600080fd5b506102d8611447565b34801561061a57600080fd5b506105bb61062936600461319b565b61145f565b34801561063a57600080fd5b5060d154610352565b34801561064f57600080fd5b506102c161065e3660046131ce565b6115e5565b34801561066f57600080fd5b506102c161067e3660046131f8565b61168b565b34801561068f57600080fd5b506102c161069e366004613281565b6118bc565b3480156106af57600080fd5b5060cb54610352565b3480156106c457600080fd5b506106d86106d3366004612d96565b611906565b60405161029891906132fc565b3480156106f157600080fd5b506102d8610700366004612d96565b611993565b34801561071157600080fd5b506102c161072036600461330a565b611a16565b34801561073157600080fd5b506102c1611ad4565b34801561074657600080fd5b5061028c610755366004613369565b611ae9565b34801561076657600080fd5b506102c16107753660046130c5565b611b26565b34801561078657600080fd5b506102c16107953660046130c5565b611b50565b6102c16107a8366004613393565b611b5c565b6102c16107bb3660046133ae565b611cce565b60006001600160e01b03198216635d129f8f60e01b14806107e557506107e582611f14565b92915050565b6107f3611f62565b6107fd8282611fbc565b5050565b606061080b612076565b60020180546108199061341c565b80601f01602080910402602001604051908101604052809291908181526020018280546108459061341c565b80156108925780601f1061086757610100808354040283529160200191610892565b820191906000526020600020905b81548152906001019060200180831161087557829003601f168201915b5050505050905090565b60006108a78261209a565b6108c4576040516333d1c03960e21b815260040160405180910390fd5b6108cc612076565b60009283526006016020525060409020546001600160a01b031690565b60006108f482611105565b9050336001600160a01b0382161461092d576109108133611ae9565b61092d576040516367d9dca160e11b815260040160405180910390fd5b82610936612076565b6000848152600691909101602052604080822080546001600160a01b0319166001600160a01b0394851617905551849286811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a4505050565b600060016109a3612076565b600101546109af612076565b540303919050565b60006109c2826120e3565b9050836001600160a01b0316816001600160a01b0316146109f55760405162a1148160e81b815260040160405180910390fd5b600080610a0184612177565b91509150610a268187610a113390565b6001600160a01b039081169116811491141790565b610a5157610a348633611ae9565b610a5157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610a7857604051633a954ecd60e21b815260040160405180910390fd5b8015610a8357600082555b610a8b612076565b6001600160a01b0387166000908152600591909101602052604090208054600019019055610ab7612076565b6001600160a01b03861660008181526005929092016020526040909120805460010190554260a01b17600160e11b17610aee612076565b60008681526004919091016020526040812091909155600160e11b84169003610b645760018401610b1d612076565b600082815260049190910160205260408120549003610b6257610b3e612076565b548114610b625783610b4e612076565b600083815260049190910160205260409020555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60008281526098602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610c235750604080518082019091526097546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610c42906001600160601b03168761346c565b610c4c919061348b565b91519350909150505b9250929050565b836000816001600160401b031611610c8f5760405162461bcd60e51b8152600401610c86906134ad565b60405180910390fd5b600060ce5411610ca0576001610cc1565b60ce54610cbe826001600160401b0316610cb8610997565b9061219f565b11155b610cdd5760405162461bcd60e51b8152600401610c86906134d4565b60cf54816001600160401b03161115610d085760405162461bcd60e51b8152600401610c8690613501565b600085610d14336121ab565b610d1e9190613530565b60d2546001600160401b0391909116915060ff16610d735760405162461bcd60e51b815260206004820152601260248201527150726573616c65206e6f742061637469766560701b6044820152606401610c86565b60cc54600003610db75760405162461bcd60e51b815260206004820152600f60248201526e141c995cd85b19481b9bdd081cd95d608a1b6044820152606401610c86565b60d054811115610dd95760405162461bcd60e51b8152600401610c869061355b565b84811115610df95760405162461bcd60e51b8152600401610c869061355b565b610e768484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060cc546040516bffffffffffffffffffffffff193360601b166020820152603481018b905290925060540190505b604051602081830303815290604052805190602001206121de565b610eb45760405162461bcd60e51b815260206004820152600f60248201526e141c995cd85b19481a5b9d985b1a59608a1b6044820152606401610c86565b610ba686336121f4565b60004711610efa5760405162461bcd60e51b8152602060048201526009602482015268302062616c616e636560b81b6044820152606401610c86565b60c954604051639af608c960e01b81523060048201526001600160a01b039091169047906000908390639af608c990602401602060405180830381865afa158015610f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6d9190613592565b60405163b9bff4bb60e01b8152600481018290529091506001600160a01b0384169063b9bff4bb90602401600060405180830381600087803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b50505050610fd483826122e9565b60ca54610ff3906001600160a01b0316610fee8484612402565b6122e9565b505050565b610ff3838383604051806020016040528060008152506118bc565b61101b611f62565b60cd6107fd82826135f1565b61102f611f62565b610ff383838361240e565b6060816000816001600160401b0381111561105757611057612eeb565b6040519080825280602002602001820160405280156110a957816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816110755790505b50905060005b8281146110fc576110d78686838181106110cb576110cb6136b0565b90506020020135611906565b8282815181106110e9576110e96136b0565b60209081029190910101526001016110af565b50949350505050565b60006107e5826120e3565b60006001600160a01b038216611139576040516323d3ad8160e21b815260040160405180910390fd5b6001600160401b03611149612076565b6005016000846001600160a01b03166001600160a01b0316815260200190815260200160002054169050919050565b611180611f62565b61118a60006124d9565b565b611194611f62565b60d2805491151561ffff199092169190911761010017905560ce9390935560cf9190915560d05560d155565b6111c8611f62565b60cc55565b606060008060006111dd85611110565b90506000816001600160401b038111156111f9576111f9612eeb565b604051908082528060200260200182016040528015611222578160200160208202803683370190505b50905061124f60408051608081018252600080825260208201819052918101829052606081019190915290565b60015b8386146112c9576112628161252b565b915081604001516112c15781516001600160a01b03161561128257815194505b876001600160a01b0316856001600160a01b0316036112c157808387806001019850815181106112b4576112b46136b0565b6020026020010181815250505b600101611252565b50909695505050505050565b806000816001600160401b0316116112ff5760405162461bcd60e51b8152600401610c86906134ad565b600060ce541161131057600161132b565b60ce54611328826001600160401b0316610cb8610997565b11155b6113475760405162461bcd60e51b8152600401610c86906134d4565b60cf54816001600160401b031611156113725760405162461bcd60e51b8152600401610c8690613501565b60d25460ff16156113b65760405162461bcd60e51b815260206004820152600e60248201526d50726573616c652061637469766560901b6044820152606401610c86565b60d254610100900460ff166113ff5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b6044820152606401610c86565b60d0548261140c856121ab565b6114169190613530565b6001600160401b0316111561143d5760405162461bcd60e51b8152600401610c869061355b565b610ff382846121f4565b6060611451612076565b60030180546108199061341c565b606081831061148157604051631960ccad60e11b815260040160405180910390fd5b60008061148c612572565b9050600185101561149c57600194505b808411156114a8578093505b60006114b387611110565b9050848610156114d257858503818110156114cc578091505b506114d6565b5060005b6000816001600160401b038111156114f0576114f0612eeb565b604051908082528060200260200182016040528015611519578160200160208202803683370190505b5090508160000361152f5793506115de92505050565b600061153a88611906565b90506000816040015161154b575080515b885b88811415801561155d5750848714155b156115d25761156b8161252b565b925082604001516115ca5782516001600160a01b03161561158b57825191505b8a6001600160a01b0316826001600160a01b0316036115ca57808488806001019950815181106115bd576115bd6136b0565b6020026020010181815250505b60010161154d565b50505092835250909150505b9392505050565b336001600160a01b0383160361160e5760405163b06307db60e01b815260040160405180910390fd5b80611617612076565b336000818152600792909201602090815260408084206001600160a01b03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60008051602061387883398151915254610100900460ff166116c0576000805160206138788339815191525460ff16156116c4565b303b155b6117365760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401610c86565b60008051602061387883398151915254610100900460ff1615801561177257600080516020613878833981519152805461ffff19166101011790555b600054610100900460ff16158080156117925750600054600160ff909116105b806117ac5750303b1580156117ac575060005460ff166001145b61180f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c86565b6000805460ff191660011790558015611832576000805461ff0019166101001790555b61183c8787612582565b6118446125c0565b61184f8585856125fc565b8015611895576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b508015610ba6575050600080516020613878833981519152805461ff001916905550505050565b6118c78484846109b7565b6001600160a01b0383163b15611900576118e384848484612666565b611900576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60408051608081018252600080825260208201819052918101829052606081019190915260408051608081018252600080825260208201819052918101829052606081019190915260018310806119645750611960612572565b8310155b1561196f5792915050565b6119788361252b565b905080604001511561198a5792915050565b6115de83612752565b606061199e8261209a565b6119bb57604051630a14c4b560e41b815260040160405180910390fd5b60006119c5612787565b905080516000036119e557604051806020016040528060008152506115de565b806119ef84612796565b604051602001611a009291906136c6565b6040516020818303038152906040529392505050565b611a1e611f62565b80838114611a625760405162461bcd60e51b8152602060048201526011602482015270496e76616c696420417267756d656e747360781b6044820152606401610c86565b60005b81811015610ba657611acc848483818110611a8257611a826136b0565b9050602002016020810190611a9791906130c5565b878784818110611aa957611aa96136b0565b9050602002016020810190611abe9190613393565b6001600160401b03166127e5565b600101611a65565b611adc611f62565b60d2805461ffff19169055565b6000611af3612076565b6001600160a01b039384166000908152600791909101602090815260408083209490951682529290925250205460ff1690565b611b2e611f62565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b611b59816127ff565b50565b806000816001600160401b031611611b865760405162461bcd60e51b8152600401610c86906134ad565b600060ce5411611b97576001611bb2565b60ce54611baf826001600160401b0316610cb8610997565b11155b611bce5760405162461bcd60e51b8152600401610c86906134d4565b60cf54816001600160401b03161115611bf95760405162461bcd60e51b8152600401610c8690613501565b60d25460ff1615611c3d5760405162461bcd60e51b815260206004820152600e60248201526d50726573616c652061637469766560901b6044820152606401610c86565b60d254610100900460ff16611c865760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b6044820152606401610c86565b60d05482611c93336121ab565b611c9d9190613530565b6001600160401b03161115611cc45760405162461bcd60e51b8152600401610c869061355b565b6107fd82336121f4565b836000816001600160401b031611611cf85760405162461bcd60e51b8152600401610c86906134ad565b600060ce5411611d09576001611d24565b60ce54611d21826001600160401b0316610cb8610997565b11155b611d405760405162461bcd60e51b8152600401610c86906134d4565b60cf54816001600160401b03161115611d6b5760405162461bcd60e51b8152600401610c8690613501565b600085611d77886121ab565b611d819190613530565b60d2546001600160401b0391909116915060ff16611dd65760405162461bcd60e51b815260206004820152601260248201527150726573616c65206e6f742061637469766560701b6044820152606401610c86565b60cc54600003611e1a5760405162461bcd60e51b815260206004820152600f60248201526e141c995cd85b19481b9bdd081cd95d608a1b6044820152606401610c86565b60d054811115611e3c5760405162461bcd60e51b8152600401610c869061355b565b84811115611e5c5760405162461bcd60e51b8152600401610c869061355b565b611ec38484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060cc546040516bffffffffffffffffffffffff1960608e901b166020820152603481018b90529092506054019050610e5b565b611f015760405162461bcd60e51b815260206004820152600f60248201526e141c995cd85b19481a5b9d985b1a59608a1b6044820152606401610c86565b611f0b86886121f4565b50505050505050565b60006301ffc9a760e01b6001600160e01b031983161480611f4557506380ac58cd60e01b6001600160e01b03198316145b806107e55750506001600160e01b031916635b5e139f60e01b1490565b6033546001600160a01b0316331461118a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c86565b6127106001600160601b0382161115611fe75760405162461bcd60e51b8152600401610c86906136ec565b6001600160a01b03821661203d5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610c86565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217609755565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b6000816001111580156120b457506120b0612076565b5482105b80156107e55750600160e01b6120c8612076565b60008481526004919091016020526040902054161592915050565b6000818060011161215e576120f6612076565b5481101561215e576000612108612076565b600083815260049190910160205260408120549150600160e01b8216900361215c575b806000036115de5761213b612076565b6000199092016000818152600493909301602052604090922054905061212b565b505b604051636f96cda160e11b815260040160405180910390fd5b6000806000612184612076565b60009485526006016020525050604090912080549092909150565b60006115de8284613736565b600060c06121b7612076565b6001600160a01b03909316600090815260059390930160205260409092205490911c919050565b6000826121eb8584612875565b14949350505050565b60d154349061220c906001600160401b0385166128c2565b111561224c5760405162461bcd60e51b815260206004820152600f60248201526e15985b1d59481a5b98dbdc9c9958dd608a1b6044820152606401610c86565b60cb54612259903461219f565b60cb55612279818361226a826121ab565b6122749190613530565b6128ce565b60c95460405163107e9cf160e01b81523460048201526001600160a01b039091169063107e9cf190602401600060405180830381600087803b1580156122be57600080fd5b505af11580156122d2573d6000803e3d6000fd5b505050506107fd81836001600160401b0316612937565b804710156123395760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610c86565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612386576040519150601f19603f3d011682016040523d82523d6000602084013e61238b565b606091505b5050905080610ff35760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610c86565b60006115de828461374e565b6127106001600160601b03821611156124395760405162461bcd60e51b8152600401610c86906136ec565b6001600160a01b03821661248f5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610c86565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752609890529190942093519051909116600160a01b029116179055565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040805160808101825260008082526020820181905291810182905260608101919091526107e561255a612076565b60008481526004919091016020526040902054612a72565b600061257c612076565b54919050565b60008051602061387883398151915254610100900460ff166125b65760405162461bcd60e51b8152600401610c8690613765565b6107fd8282612ab9565b60008051602061387883398151915254610100900460ff166125f45760405162461bcd60e51b8152600401610c8690613765565b61118a612b2c565b600054610100900460ff166126235760405162461bcd60e51b8152600401610c86906137b9565b61262b612b60565b612633612b8f565b60c98054336001600160a01b03199182161790915560ca80549091166001600160a01b038516179055610ff38282611fbc565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061269b903390899088908890600401613804565b6020604051808303816000875af19250505080156126d6575060408051601f3d908101601f191682019092526126d391810190613841565b60015b612734573d808015612704576040519150601f19603f3d011682016040523d82523d6000602084013e612709565b606091505b50805160000361272c576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6040805160808101825260008082526020820181905291810182905260608101919091526107e5612782836120e3565b612a72565b606060cd80546108199061341c565b604080516080810191829052607f0190826030600a8206018353600a90045b80156127d357600183039250600a81066030018353600a90046127b5565b50819003601f19909101908152919050565b6107fd828260405180602001604052806000815250612bb6565b612807611f62565b6001600160a01b03811661286c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c86565b611b59816124d9565b600081815b84518110156128ba576128a682868381518110612899576128996136b0565b6020026020010151612c33565b9150806128b28161385e565b91505061287a565b509392505050565b60006115de828461346c565b60006128d8612076565b6001600160a01b038416600090815260059190910160205260409020546001600160c01b031660c083901b1790508181612910612076565b6001600160a01b039095166000908152600595909501602052604090942093909355505050565b6000612941612076565b54905060008290036129665760405163b562e8dd60e01b815260040160405180910390fd5b68010000000000000001820261297a612076565b6001600160a01b038516600081815260059290920160205260409091208054929092019091554260a01b6001841460e11b17176129b5612076565b600083815260049190910160205260408120919091556001600160a01b0384169083830190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612a3f57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612a07565b5081600003612a6057604051622e076360e81b815260040160405180910390fd5b80612a69612076565b5550610ff39050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b60008051602061387883398151915254610100900460ff16612aed5760405162461bcd60e51b8152600401610c8690613765565b81612af6612076565b60020190612b0490826135f1565b5080612b0e612076565b60030190612b1c90826135f1565b506001612b27612076565b555050565b60008051602061387883398151915254610100900460ff1661118a5760405162461bcd60e51b8152600401610c8690613765565b600054610100900460ff16612b875760405162461bcd60e51b8152600401610c86906137b9565b61118a612c62565b600054610100900460ff1661118a5760405162461bcd60e51b8152600401610c86906137b9565b612bc08383612937565b6001600160a01b0383163b15610ff3576000612bda612076565b5490508281035b612bf46000868380600101945086612666565b612c11576040516368d2bf6b60e11b815260040160405180910390fd5b818110612be15781612c21612076565b5414612c2c57600080fd5b5050505050565b6000818310612c4f5760008281526020849052604090206115de565b60008381526020839052604090206115de565b600054610100900460ff16612c895760405162461bcd60e51b8152600401610c86906137b9565b61118a336124d9565b6001600160e01b031981168114611b5957600080fd5b600060208284031215612cba57600080fd5b81356115de81612c92565b80356001600160a01b0381168114612cdc57600080fd5b919050565b80356001600160601b0381168114612cdc57600080fd5b60008060408385031215612d0b57600080fd5b612d1483612cc5565b9150612d2260208401612ce1565b90509250929050565b60005b83811015612d46578181015183820152602001612d2e565b838111156119005750506000910152565b60008151808452612d6f816020860160208601612d2b565b601f01601f19169290920160200192915050565b6020815260006115de6020830184612d57565b600060208284031215612da857600080fd5b5035919050565b60008060408385031215612dc257600080fd5b612dcb83612cc5565b946020939093013593505050565b600080600060608486031215612dee57600080fd5b612df784612cc5565b9250612e0560208501612cc5565b9150604084013590509250925092565b60008060408385031215612e2857600080fd5b50508035926020909101359150565b80356001600160401b0381168114612cdc57600080fd5b60008083601f840112612e6057600080fd5b5081356001600160401b03811115612e7757600080fd5b6020830191508360208260051b8501011115610c5557600080fd5b60008060008060608587031215612ea857600080fd5b612eb185612e37565b93506020850135925060408501356001600160401b03811115612ed357600080fd5b612edf87828801612e4e565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115612f1b57612f1b612eeb565b604051601f8501601f19908116603f01168101908282118183101715612f4357612f43612eeb565b81604052809350858152868686011115612f5c57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612f8757600080fd5b6115de83833560208501612f01565b600060208284031215612fa857600080fd5b81356001600160401b03811115612fbe57600080fd5b61274a84828501612f76565b600080600060608486031215612fdf57600080fd5b83359250612fef60208501612cc5565b9150612ffd60408501612ce1565b90509250925092565b6000806020838503121561301957600080fd5b82356001600160401b0381111561302f57600080fd5b61303b85828601612e4e565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b818110156112c9576130b2838551613047565b928401926080929092019160010161309f565b6000602082840312156130d757600080fd5b6115de82612cc5565b80358015158114612cdc57600080fd5b600080600080600060a0868803121561310857600080fd5b8535945060208601359350604086013592506060860135915061312d608087016130e0565b90509295509295909350565b6020808252825182820181905260009190848201906040850190845b818110156112c957835183529284019291840191600101613155565b6000806040838503121561318457600080fd5b61318d83612cc5565b9150612d2260208401612e37565b6000806000606084860312156131b057600080fd5b6131b984612cc5565b95602085013595506040909401359392505050565b600080604083850312156131e157600080fd5b6131ea83612cc5565b9150612d22602084016130e0565b600080600080600060a0868803121561321057600080fd5b85356001600160401b038082111561322757600080fd5b61323389838a01612f76565b9650602088013591508082111561324957600080fd5b5061325688828901612f76565b94505061326560408701612cc5565b925061327360608701612cc5565b915061312d60808701612ce1565b6000806000806080858703121561329757600080fd5b6132a085612cc5565b93506132ae60208601612cc5565b92506040850135915060608501356001600160401b038111156132d057600080fd5b8501601f810187136132e157600080fd5b6132f087823560208401612f01565b91505092959194509250565b608081016107e58284613047565b6000806000806040858703121561332057600080fd5b84356001600160401b038082111561333757600080fd5b61334388838901612e4e565b9096509450602087013591508082111561335c57600080fd5b50612edf87828801612e4e565b6000806040838503121561337c57600080fd5b61338583612cc5565b9150612d2260208401612cc5565b6000602082840312156133a557600080fd5b6115de82612e37565b6000806000806000608086880312156133c657600080fd5b6133cf86612cc5565b94506133dd60208701612e37565b93506040860135925060608601356001600160401b038111156133ff57600080fd5b61340b88828901612e4e565b969995985093965092949392505050565b600181811c9082168061343057607f821691505b60208210810361345057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561348657613486613456565b500290565b6000826134a857634e487b7160e01b600052601260045260246000fd5b500490565b6020808252600d908201526c05175616e74697479206973203609c1b604082015260600190565b6020808252601390820152724578636565646564206d617820737570706c7960681b604082015260600190565b602080825260159082015274115e18d959591959081b585e081c195c881b5a5b9d605a1b604082015260600190565b60006001600160401b0380831681851680830382111561355257613552613456565b01949350505050565b60208082526017908201527f4578636565646564206d6178207065722077616c6c6574000000000000000000604082015260600190565b6000602082840312156135a457600080fd5b5051919050565b601f821115610ff357600081815260208120601f850160051c810160208610156135d25750805b601f850160051c820191505b81811015610ba6578281556001016135de565b81516001600160401b0381111561360a5761360a612eeb565b61361e81613618845461341c565b846135ab565b602080601f831160018114613653576000841561363b5750858301515b600019600386901b1c1916600185901b178555610ba6565b600085815260208120601f198616915b8281101561368257888601518255948401946001909101908401613663565b50858210156136a05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600083516136d8818460208801612d2b565b835190830190613552818360208801612d2b565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b6000821982111561374957613749613456565b500190565b60008282101561376057613760613456565b500390565b60208082526034908201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604082015273206973206e6f7420696e697469616c697a696e6760601b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061383790830184612d57565b9695505050505050565b60006020828403121561385357600080fd5b81516115de81612c92565b60006001820161387057613870613456565b506001019056feee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa2646970667358221220cf8381a350c2c94763f0a755372f4941dd6ed579a50e95d3176e1e0cab8f85aa64736f6c634300080f0033",y=function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.length>1?e.apply(this,t)||this:e.call(this,p,m,t[0])||this}return b(t,e),t.prototype.deploy=function(t){return e.prototype.deploy.call(this,t||{})},t.prototype.getDeployTransaction=function(t){return e.prototype.getDeployTransaction.call(this,t||{})},t.prototype.attach=function(t){return e.prototype.attach.call(this,t)},t.prototype.connect=function(t){return e.prototype.connect.call(this,t)},t.createInterface=function(){return new i.vU(p)},t.connect=function(e,t){return new o.CH(e,p,t)},t.bytecode=m,t.abi=p,t}(o.lV)},196:()=>{},14:(e,t,r)=>{"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,f=(s=Object.create(null),e=>{const t=i.call(e);return s[t]||(s[t]=t.slice(8,-1).toLowerCase())});var s;const a=e=>(e=e.toLowerCase(),t=>f(t)===e),c=e=>t=>typeof t===e,{isArray:u}=Array,l=c("undefined"),d=a("ArrayBuffer"),h=c("string"),b=c("function"),p=c("number"),m=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==f(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g=a("Date"),v=a("File"),w=a("Blob"),A=a("FileList"),E=a("URLSearchParams");function T(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),u(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let f;for(n=0;n<o;n++)f=i[n],t.call(null,e[f],f,e)}}function k(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,S=e=>!l(e)&&e!==_,x=(P="undefined"!=typeof Uint8Array&&o(Uint8Array),e=>P&&e instanceof P);var P;const N=a("HTMLFormElement"),M=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),R=a("RegExp"),C=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};T(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},O="abcdefghijklmnopqrstuvwxyz",I="0123456789",B={DIGIT:I,ALPHA:O,ALPHA_DIGIT:O+O.toUpperCase()+I},D=a("AsyncFunction");var F={isArray:u,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=f(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:h,isNumber:p,isBoolean:e=>!0===e||!1===e,isObject:m,isPlainObject:y,isUndefined:l,isDate:g,isFile:v,isBlob:w,isRegExp:R,isFunction:b,isStream:e=>m(e)&&b(e.pipe),isURLSearchParams:E,isTypedArray:x,isFileList:A,forEach:T,merge:function e(){const{caseless:t}=S(this)&&this||{},r={},n=(n,i)=>{const o=t&&k(r,i)||i;y(r[o])&&y(n)?r[o]=e(r[o],n):y(n)?r[o]=e({},n):u(n)?r[o]=n.slice():r[o]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&T(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:i}={})=>(T(t,((t,i)=>{r&&b(t)?e[i]=n(t,r):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,f,s;const a={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),f=i.length;f-- >0;)s=i[f],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&o(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:f,kindOfTest:a,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!p(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:N,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:C,freezeMethods:e=>{C(e,((t,r)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];b(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return u(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:k,global:_,isContextDefined:S,ALPHABET:B,generateString:(e=16,t=B.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(m(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=u(e)?[]:{};return T(e,((e,t)=>{const o=r(e,n+1);!l(o)&&(i[t]=o)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:D,isThenable:e=>e&&(m(e)||b(e))&&b(e.then)&&b(e.catch)};function U(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}F.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const L=U.prototype,z={};function G(e){return F.isPlainObject(e)||F.isArray(e)}function j(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function Y(e,t,r){return e?e.concat(t).map((function(e,t){return e=j(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{z[e]={value:e}})),Object.defineProperties(U,z),Object.defineProperty(L,"isAxiosError",{value:!0}),U.from=(e,t,r,n,i,o)=>{const f=Object.create(L);return F.toFlatObject(e,f,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),U.call(f,e.message,t,r,n,i),f.cause=e,f.name=e.name,o&&Object.assign(f,o),f};const K=F.toFlatObject(F,{},null,(function(e){return/^is[A-Z]/.test(e)}));function q(e,t,r){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=F.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!F.isUndefined(t[e])}))).metaTokens,i=r.visitor||c,o=r.dots,f=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function a(e){if(null===e)return"";if(F.isDate(e))return e.toISOString();if(!s&&F.isBlob(e))throw new U("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(e)||F.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(F.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&function(e){return F.isArray(e)&&!e.some(G)}(e)||(F.isFileList(e)||F.endsWith(r,"[]"))&&(s=F.toArray(e)))return r=j(r),s.forEach((function(e,n){!F.isUndefined(e)&&null!==e&&t.append(!0===f?Y([r],n,o):null===f?r:r+"[]",a(e))})),!1;return!!G(e)||(t.append(Y(i,r,o),a(e)),!1)}const u=[],l=Object.assign(K,{defaultVisitor:c,convertValue:a,isVisitable:G});if(!F.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!F.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),F.forEach(r,(function(r,o){!0===(!(F.isUndefined(r)||null===r)&&i.call(t,r,F.isString(o)?o.trim():o,n,l))&&e(r,n?n.concat(o):[o])})),u.pop()}}(e),t}function H(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function V(e,t){this._pairs=[],e&&q(e,this,t)}const J=V.prototype;function W(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Q(e,t,r){if(!t)return e;const n=r&&r.encode||W,i=r&&r.serialize;let o;if(o=i?i(t,r):F.isURLSearchParams(t)?t.toString():new V(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}J.append=function(e,t){this._pairs.push([e,t])},J.toString=function(e){const t=e?function(t){return e.call(this,t,H)}:H;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var X=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},$={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:V,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ee="undefined"!=typeof window&&"undefined"!=typeof document,te=(re="undefined"!=typeof navigator&&navigator.product,ee&&["ReactNative","NativeScript","NS"].indexOf(re)<0);var re;const ne="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ie={...Object.freeze({__proto__:null,hasBrowserEnv:ee,hasStandardBrowserWebWorkerEnv:ne,hasStandardBrowserEnv:te}),...Z};function oe(e){function t(e,r,n,i){let o=e[i++];const f=Number.isFinite(+o),s=i>=e.length;return o=!o&&F.isArray(n)?n.length:o,s?(F.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!f):(n[o]&&F.isObject(n[o])||(n[o]=[]),t(e,r,n[o],i)&&F.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!f)}if(F.isFormData(e)&&F.isFunction(e.entries)){const r={};return F.forEachEntry(e,((e,n)=>{t(function(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const fe={transitional:$,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=F.isObject(e);if(i&&F.isHTMLForm(e)&&(e=new FormData(e)),F.isFormData(e))return n&&n?JSON.stringify(oe(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return q(e,new ie.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ie.isNode&&F.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=F.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return q(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(F.isString(e))try{return(0,JSON.parse)(e),F.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||fe.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&F.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw U.from(e,U.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ie.classes.FormData,Blob:ie.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],(e=>{fe.headers[e]={}}));var se=fe;const ae=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ce=Symbol("internals");function ue(e){return e&&String(e).trim().toLowerCase()}function le(e){return!1===e||null==e?e:F.isArray(e)?e.map(le):String(e)}function de(e,t,r,n,i){return F.isFunction(n)?n.call(this,t,r):(i&&(t=r),F.isString(t)?F.isString(n)?-1!==t.indexOf(n):F.isRegExp(n)?n.test(t):void 0:void 0)}class he{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=ue(t);if(!i)throw new Error("header name must be a non-empty string");const o=F.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=le(e))}const o=(e,t)=>F.forEach(e,((e,r)=>i(e,r,t)));return F.isPlainObject(e)||e instanceof this.constructor?o(e,t):F.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&ae[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=ue(e)){const r=F.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(F.isFunction(t))return t.call(this,e,r);if(F.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ue(e)){const r=F.findKey(this,e);return!(!r||void 0===this[r]||t&&!de(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=ue(e)){const i=F.findKey(r,e);!i||t&&!de(0,r[i],i,t)||(delete r[i],n=!0)}}return F.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!de(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return F.forEach(this,((n,i)=>{const o=F.findKey(r,i);if(o)return t[o]=le(n),void delete t[i];const f=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();f!==i&&delete t[i],t[f]=le(n),r[f]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&F.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[ce]=this[ce]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ue(e);t[n]||(function(e,t){const r=F.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return F.isArray(e)?e.forEach(n):n(e),this}}he.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(he.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),F.freezeMethods(he);var be=he;function pe(e,t){const r=this||se,n=t||r,i=be.from(n.headers);let o=n.data;return F.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function me(e){return!(!e||!e.__CANCEL__)}function ye(e,t,r){U.call(this,null==e?"canceled":e,U.ERR_CANCELED,t,r),this.name="CanceledError"}F.inherits(ye,U,{__CANCEL__:!0});var ge=ie.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const f=[e+"="+encodeURIComponent(t)];F.isNumber(r)&&f.push("expires="+new Date(r).toGMTString()),F.isString(n)&&f.push("path="+n),F.isString(i)&&f.push("domain="+i),!0===o&&f.push("secure"),document.cookie=f.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ve(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var we=ie.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=F.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function Ae(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,f=0;return t=void 0!==t?t:1e3,function(s){const a=Date.now(),c=n[f];i||(i=a),r[o]=s,n[o]=a;let u=f,l=0;for(;u!==o;)l+=r[u++],u%=e;if(o=(o+1)%e,o===f&&(f=(f+1)%e),a-i<t)return;const d=c&&a-c;return d?Math.round(1e3*l/d):void 0}}(50,250);return i=>{const o=i.loaded,f=i.lengthComputable?i.total:void 0,s=o-r,a=n(s);r=o;const c={loaded:o,total:f,progress:f?o/f:void 0,bytes:s,rate:a||void 0,estimated:a&&f&&o<=f?(f-o)/a:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const Ee={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=be.from(e.headers).normalize();let o,f,{responseType:s,withXSRFToken:a}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(F.isFormData(n))if(ie.hasStandardBrowserEnv||ie.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(f=i.getContentType())){const[e,...t]=f?f.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let u=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const l=ve(e.baseURL,e.url);function d(){if(!u)return;const n=be.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new U("Request failed with status code "+r.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:s&&"text"!==s&&"json"!==s?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),Q(l,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(d)},u.onabort=function(){u&&(r(new U("Request aborted",U.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new U("Network Error",U.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||$;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new U(t,n.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,u)),u=null},ie.hasStandardBrowserEnv&&(a&&F.isFunction(a)&&(a=a(e)),a||!1!==a&&we(l))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ge.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in u&&F.forEach(i.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),F.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),s&&"json"!==s&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",Ae(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Ae(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{u&&(r(!t||t.type?new ye(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);h&&-1===ie.protocols.indexOf(h)?r(new U("Unsupported protocol "+h+":",U.ERR_BAD_REQUEST,e)):u.send(n||null)}))}};F.forEach(Ee,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Te=e=>`- ${e}`,ke=e=>F.isFunction(e)||null===e||!1===e;var _e=e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!ke(r)&&(n=Ee[(t=String(r)).toLowerCase()],void 0===n))throw new U(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new U("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Te).join("\n"):" "+Te(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Se(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ye(null,e)}function xe(e){return Se(e),e.headers=be.from(e.headers),e.data=pe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),_e(e.adapter||se.adapter)(e).then((function(t){return Se(e),t.data=pe.call(e,e.transformResponse,t),t.headers=be.from(t.headers),t}),(function(t){return me(t)||(Se(e),t&&t.response&&(t.response.data=pe.call(e,e.transformResponse,t.response),t.response.headers=be.from(t.response.headers))),Promise.reject(t)}))}const Pe=e=>e instanceof be?e.toJSON():e;function Ne(e,t){t=t||{};const r={};function n(e,t,r){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:r},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function i(e,t,r){return F.isUndefined(t)?F.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!F.isUndefined(t))return n(void 0,t)}function f(e,t){return F.isUndefined(t)?F.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const a={url:o,method:o,data:o,baseURL:f,transformRequest:f,transformResponse:f,paramsSerializer:f,timeout:f,timeoutMessage:f,withCredentials:f,withXSRFToken:f,adapter:f,responseType:f,xsrfCookieName:f,xsrfHeaderName:f,onUploadProgress:f,onDownloadProgress:f,decompress:f,maxContentLength:f,maxBodyLength:f,beforeRedirect:f,transport:f,httpAgent:f,httpsAgent:f,cancelToken:f,socketPath:f,responseEncoding:f,validateStatus:s,headers:(e,t)=>i(Pe(e),Pe(t),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=a[n]||i,f=o(e[n],t[n],n);F.isUndefined(f)&&o!==s||(r[n]=f)})),r}const Me={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Me[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Re={};Me.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new U(n(i," has been removed"+(t?" in "+t:"")),U.ERR_DEPRECATED);return t&&!Re[i]&&(Re[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};var Ce={assertOptions:function(e,t,r){if("object"!=typeof e)throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],f=t[o];if(f){const t=e[o],r=void 0===t||f(t,o,e);if(!0!==r)throw new U("option "+o+" must be "+r,U.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new U("Unknown option "+o,U.ERR_BAD_OPTION)}},validators:Me};const Oe=Ce.validators;class Ie{constructor(e){this.defaults=e,this.interceptors={request:new X,response:new X}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ne(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Ce.assertOptions(r,{silentJSONParsing:Oe.transitional(Oe.boolean),forcedJSONParsing:Oe.transitional(Oe.boolean),clarifyTimeoutError:Oe.transitional(Oe.boolean)},!1),null!=n&&(F.isFunction(n)?t.paramsSerializer={serialize:n}:Ce.assertOptions(n,{encode:Oe.function,serialize:Oe.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&F.merge(i.common,i[t.method]);i&&F.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=be.concat(o,i);const f=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,f.unshift(e.fulfilled,e.rejected))}));const a=[];let c;this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)}));let u,l=0;if(!s){const e=[xe.bind(this),void 0];for(e.unshift.apply(e,f),e.push.apply(e,a),u=e.length,c=Promise.resolve(t);l<u;)c=c.then(e[l++],e[l++]);return c}u=f.length;let d=t;for(l=0;l<u;){const e=f[l++],t=f[l++];try{d=e(d)}catch(e){t.call(this,e);break}}try{c=xe.call(this,d)}catch(e){return Promise.reject(e)}for(l=0,u=a.length;l<u;)c=c.then(a[l++],a[l++]);return c}getUri(e){return Q(ve((e=Ne(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}F.forEach(["delete","get","head","options"],(function(e){Ie.prototype[e]=function(t,r){return this.request(Ne(r||{},{method:e,url:t,data:(r||{}).data}))}})),F.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(Ne(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ie.prototype[e]=t(),Ie.prototype[e+"Form"]=t(!0)}));var Be=Ie;class De{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new ye(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new De((function(t){e=t})),cancel:e}}}var Fe=De;const Ue={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ue).forEach((([e,t])=>{Ue[t]=e}));var Le=Ue;const ze=function e(t){const r=new Be(t),i=n(Be.prototype.request,r);return F.extend(i,Be.prototype,r,{allOwnKeys:!0}),F.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return e(Ne(t,r))},i}(se);ze.Axios=Be,ze.CanceledError=ye,ze.CancelToken=Fe,ze.isCancel=me,ze.VERSION="1.6.2",ze.toFormData=q,ze.AxiosError=U,ze.Cancel=ze.CanceledError,ze.all=function(e){return Promise.all(e)},ze.spread=function(e){return function(t){return e.apply(null,t)}},ze.isAxiosError=function(e){return F.isObject(e)&&!0===e.isAxiosError},ze.mergeConfig=Ne,ze.AxiosHeaders=be,ze.formToJSON=e=>oe(F.isHTMLForm(e)?new FormData(e):e),ze.getAdapter=_e,ze.HttpStatusCode=Le,ze.default=ze,e.exports=ze}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.amdO={},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n=r(368);return n.default})()));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Redeemable=t():e.Redeemable=t()}(this,(()=>(()=>{var e={103:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="abi/5.8.0"},780:(e,t,r)=>{"use strict";r.d(t,{R:()=>M,$:()=>R});var n=r(640),i=r(221),o=r(11),s=r(103),a=r(848),f=r(549);class c extends a.XI{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,f.Kn)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return(0,f.Kn)((0,n.$m)(e.readValue().toHexString(),20))}}class u extends a.XI{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const l=new o.Yd(s.i);function d(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||l.throwError("cannot encode object for signature with missing names",o.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&l.throwError("cannot encode object for signature with duplicate names",o.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else l.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&l.throwArgumentError("types/value length mismatch","tuple",r);let i=new a.QV(e.wordSize),s=new a.QV(e.wordSize),f=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=i.writeUpdatableValue();f.push((e=>{n(e+t)}))}else e.encode(i,r)})),f.forEach((e=>{e(i.length)}));let c=e.appendWriter(i);return c+=e.appendWriter(s),c}function h(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let i=null;if(t.dynamic){let r=e.readValue(),s=n.subReader(r.toNumber());try{i=t.decode(s)}catch(e){if(e.code===o.Yd.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===o.Yd.errors.BUFFER_OVERRUN)throw e;i=e,i.baseType=t.name,i.name=t.localName,i.type=t.type}null!=i&&r.push(i)}));const i=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==i[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const o=r[t];o instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}}):r[n]=o}));for(let e=0;e<r.length;e++){const t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class b extends a.XI{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){Array.isArray(t)||this._throwError("expected array value",t);let r=this.length;-1===r&&(r=t.length,e.writeValue(t.length)),l.checkArgumentCount(t.length,r,"coder array"+(this.localName?" "+this.localName:""));let n=[];for(let e=0;e<t.length;e++)n.push(this.coder);return d(e,n,t)}decode(e){let t=this.length;-1===t&&(t=e.readValue().toNumber(),32*t>e._data.length&&l.throwError("insufficient data length",o.Yd.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e<t;e++)r.push(new u(this.coder));return e.coerce(this.name,h(e,r))}}class p extends a.XI{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){return e.writeValue(t?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}}class m extends a.XI{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=(0,n.lE)(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class y extends m{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,(0,n.Dv)(super.decode(e)))}}class g extends a.XI{constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),this.size=e}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,n.lE)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return e.coerce(this.name,(0,n.Dv)(e.readBytes(this.size)))}}class v extends a.XI{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}}var w=r(528),A=r(711);class E extends a.XI{constructor(e,t,r){const n=(t?"int":"uint")+8*e;super(n,n,r,!1),this.size=e,this.signed=t}defaultValue(){return 0}encode(e,t){let r=w.O$.from(t),n=A.Bz.mask(8*e.wordSize);if(this.signed){let e=n.mask(8*this.size-1);(r.gt(e)||r.lt(e.add(A.fh).mul(A.tL)))&&this._throwError("value out-of-bounds",t)}else(r.lt(A._Y)||r.gt(n.mask(8*this.size)))&&this._throwError("value out-of-bounds",t);return r=r.toTwos(8*this.size).mask(8*this.size),this.signed&&(r=r.fromTwos(8*this.size).toTwos(8*e.wordSize)),e.writeValue(r)}decode(e){let t=e.readValue().mask(8*this.size);return this.signed&&(t=t.fromTwos(8*this.size)),e.coerce(this.name,t)}}var k=r(222);class T extends m{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,k.Y0)(t))}decode(e){return(0,k.ZN)(super.decode(e))}}class _ extends a.XI{constructor(e,t){let r=!1;const n=[];e.forEach((e=>{e.dynamic&&(r=!0),n.push(e.type)})),super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){return d(e,this.coders,t)}decode(e){return e.coerce(this.name,h(e,this.coders))}}var S=r(155);const x=new o.Yd(s.i),N=new RegExp(/^bytes([0-9]*)$/),P=new RegExp(/^(u?int)([0-9]*)$/);class M{constructor(e){(0,i.zG)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new c(e.name);case"bool":return new p(e.name);case"string":return new T(e.name);case"bytes":return new y(e.name);case"array":return new b(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new _((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new v(e.name)}let t=e.type.match(P);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&x.throwArgumentError("invalid "+t[1]+" bit length","param",e),new E(r/8,"int"===t[1],e.name)}if(t=e.type.match(N),t){let r=parseInt(t[1]);return(0===r||r>32)&&x.throwArgumentError("invalid bytes length","param",e),new g(r,e.name)}return x.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new a.Ej(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new a.QV(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(S._R.from(e))));return new _(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&x.throwError("types/values length mismatch",o.Yd.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(S._R.from(e)))),n=new _(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){const i=e.map((e=>this._getCoder(S._R.from(e))));return new _(i,"_").decode(this._getReader((0,n.lE)(t),r))}}const R=new M},848:(e,t,r)=>{"use strict";r.d(t,{BR:()=>c,Ej:()=>d,QV:()=>l,XI:()=>u});var n=r(640),i=r(528),o=r(221),s=r(11),a=r(103);const f=new s.Yd(a.i);function c(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t}class u{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){f.throwArgumentError(e,this.localName,t)}}class l{constructor(e){(0,o.zG)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,n.xs)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,n.zo)(e._data))}writeBytes(e){let t=(0,n.lE)(e);const r=t.length%this.wordSize;return r&&(t=(0,n.zo)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,n.lE)(i.O$.from(e));return t.length>this.wordSize&&f.throwError("value out-of-bounds",s.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,n.zo)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class d{constructor(e,t,r,i){(0,o.zG)(this,"_data",(0,n.lE)(e)),(0,o.zG)(this,"wordSize",t||32),(0,o.zG)(this,"_coerceFunc",r),(0,o.zG)(this,"allowLoose",i),this._offset=0}get data(){return(0,n.Dv)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):d.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:f.throwError("data out-of-bounds",s.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new d(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return i.O$.from(this.readBytes(this.wordSize))}}},155:(e,t,r)=>{"use strict";r.d(t,{HY:()=>y,IC:()=>_,QV:()=>g,Xg:()=>E,YW:()=>k,_R:()=>p,pc:()=>h});var n=r(528),i=r(221),o=r(11),s=r(103);const a=new o.Yd(s.i),f={};let c={calldata:!0,memory:!0,storage:!0},u={calldata:!0,memory:!0};function l(e,t){if("bytes"===e||"string"===e){if(c[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&u[t])return!0;return(c[t]||"payable"===t)&&a.throwArgumentError("invalid modifier","name",t),!1}function d(e,t){for(let r in t)(0,i.zG)(e,r,t[r])}const h=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),b=new RegExp(/^(.*)\[([0-9]*)\]$/);class p{constructor(e,t){e!==f&&a.throwError("use fromString",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),d(this,t);let r=this.type.match(b);d(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:p.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==h.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===h.full?", ":",")+")"):t+=this.type,e!==h.sighash&&(!0===this.indexed&&(t+=" indexed"),e===h.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?p.fromString(e,t):p.fromObject(e)}static fromObject(e){return p.isParamType(e)?e:new p(f,{name:e.name||null,type:S(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(p.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){a.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function i(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let o={type:"",name:"",state:{allowType:!0}},s=o;for(let r=0;r<e.length;r++){let o=e[r];switch(o){case"(":s.state.allowType&&""===s.type?s.type="tuple":s.state.allowParams||n(r),s.state.allowType=!1,s.type=S(s.type),s.components=[i(s)],s=s.components[0];break;case")":delete s.state,"indexed"===s.name&&(t||n(r),s.indexed=!0,s.name=""),l(s.type,s.name)&&(s.name=""),s.type=S(s.type);let e=s;s=s.parent,s||n(r),delete e.parent,s.state.allowParams=!1,s.state.allowName=!0,s.state.allowArray=!0;break;case",":delete s.state,"indexed"===s.name&&(t||n(r),s.indexed=!0,s.name=""),l(s.type,s.name)&&(s.name=""),s.type=S(s.type);let a=i(s.parent);s.parent.components.push(a),delete s.parent,s=a;break;case" ":s.state.allowType&&""!==s.type&&(s.type=S(s.type),delete s.state.allowType,s.state.allowName=!0,s.state.allowParams=!0),s.state.allowName&&""!==s.name&&("indexed"===s.name?(t||n(r),s.indexed&&n(r),s.indexed=!0,s.name=""):l(s.type,s.name)?s.name="":s.state.allowName=!1);break;case"[":s.state.allowArray||n(r),s.type+=o,s.state.allowArray=!1,s.state.allowName=!1,s.state.readArray=!0;break;case"]":s.state.readArray||n(r),s.type+=o,s.state.readArray=!1,s.state.allowArray=!0,s.state.allowName=!0;break;default:s.state.allowType?(s.type+=o,s.state.allowParams=!0,s.state.allowArray=!0):s.state.allowName?(s.name+=o,delete s.state.allowArray):s.state.readArray?s.type+=o:n(r)}}return s.parent&&a.throwArgumentError("unexpected eof","param",e),delete o.state,"indexed"===s.name?(t||n(r.length-7),s.indexed&&n(r.length-7),s.indexed=!0,s.name=""):l(s.type,s.name)&&(s.name=""),o.type=S(o.type),o}(e,!!t),p.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components});var r}static isParamType(e){return!(null==e||!e._isParamType)}}function m(e,t){return function(e){e=e.trim();let t=[],r="",n=0;for(let i=0;i<e.length;i++){let o=e[i];","===o&&0===n?(t.push(r),r=""):(r+=o,"("===o?n++:")"===o&&(n--,-1===n&&a.throwArgumentError("unbalanced parenthesis","value",e)))}return r&&t.push(r),t}(e).map((e=>p.fromString(e,t)))}class y{constructor(e,t){e!==f&&a.throwError("use a static from method",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),d(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return y.isFragment(e)?e:"string"==typeof e?y.fromString(e):y.fromObject(e)}static fromObject(e){if(y.isFragment(e))return e;switch(e.type){case"function":return k.fromObject(e);case"event":return g.fromObject(e);case"constructor":return E.fromObject(e);case"error":return _.fromObject(e);case"fallback":case"receive":return null}return a.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?g.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?k.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?E.fromString(e.trim()):"error"===e.split(" ")[0]?_.fromString(e.substring(5).trim()):a.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class g extends y{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?g.fromString(e):g.fromObject(e)}static fromObject(e){if(g.isEventFragment(e))return e;"event"!==e.type&&a.throwArgumentError("invalid event object","value",e);const t={name:N(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(p.fromObject):[],type:"event"};return new g(f,t)}static fromString(e){let t=e.match(P);t||a.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:a.warn("unknown modifier: "+e)}})),g.fromObject({name:t[1].trim(),anonymous:r,inputs:m(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function v(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&a.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||a.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=n.O$.from(r[1]),r[0]):e}function w(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function A(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&a.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&a.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||a.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&a.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&a.throwArgumentError("unable to determine stateMutability","value",e),t}class E extends y{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===h.sighash&&a.throwError("cannot format a constructor for sighash",o.Yd.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?E.fromString(e):E.fromObject(e)}static fromObject(e){if(E.isConstructorFragment(e))return e;"constructor"!==e.type&&a.throwArgumentError("invalid constructor object","value",e);let t=A(e);t.constant&&a.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(p.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new E(f,r)}static fromString(e){let t={type:"constructor"},r=(e=v(e,t)).match(P);return r&&"constructor"===r[1].trim()||a.throwArgumentError("invalid constructor string","value",e),t.inputs=m(r[2].trim(),!1),w(r[3].trim(),t),E.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class k extends E{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",e!==h.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?k.fromString(e):k.fromObject(e)}static fromObject(e){if(k.isFunctionFragment(e))return e;"function"!==e.type&&a.throwArgumentError("invalid function object","value",e);let t=A(e);const r={type:e.type,name:N(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(p.fromObject):[],outputs:e.outputs?e.outputs.map(p.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new k(f,r)}static fromString(e){let t={type:"function"},r=(e=v(e,t)).split(" returns ");r.length>2&&a.throwArgumentError("invalid function string","value",e);let n=r[0].match(P);if(n||a.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&N(t.name),t.inputs=m(n[2],!1),w(n[3].trim(),t),r.length>1){let n=r[1].match(P);""==n[1].trim()&&""==n[3].trim()||a.throwArgumentError("unexpected tokens","value",e),t.outputs=m(n[2],!1)}else t.outputs=[];return k.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function T(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||a.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class _ extends y{format(e){if(e||(e=h.sighash),h[e]||a.throwArgumentError("invalid format type","format",e),e===h.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==h.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===h.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?_.fromString(e):_.fromObject(e)}static fromObject(e){if(_.isErrorFragment(e))return e;"error"!==e.type&&a.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:N(e.name),inputs:e.inputs?e.inputs.map(p.fromObject):[]};return T(new _(f,t))}static fromString(e){let t={type:"error"},r=e.match(P);return r||a.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&N(t.name),t.inputs=m(r[2],!1),T(_.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function S(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const x=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function N(e){return e&&e.match(x)||a.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const P=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},268:(e,t,r)=>{"use strict";r.d(t,{CC:()=>b,Hk:()=>y,vU:()=>w,vk:()=>p});var n=r(549),i=r(528),o=r(640),s=r(235),a=r(256),f=r(221),c=r(780),u=r(155),l=r(11),d=r(103);const h=new l.Yd(d.i);class b extends f.dk{}class p extends f.dk{}class m extends f.dk{}class y extends f.dk{static isIndexed(e){return!(!e||!e._isIndexed)}}const g={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function v(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class w{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,(0,f.zG)(this,"fragments",t.map((e=>u.HY.from(e))).filter((e=>null!=e))),(0,f.zG)(this,"_abiCoder",(0,f.tu)(new.target,"getAbiCoder")()),(0,f.zG)(this,"functions",{}),(0,f.zG)(this,"errors",{}),(0,f.zG)(this,"events",{}),(0,f.zG)(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void h.warn("duplicate definition - constructor"):void(0,f.zG)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?h.warn("duplicate definition - "+r):t[r]=e})),this.deploy||(0,f.zG)(this,"deploy",u.Xg.from({payable:!1,type:"constructor"})),(0,f.zG)(this,"_isInterface",!0)}format(e){e||(e=u.pc.full),e===u.pc.sighash&&h.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===u.pc.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return c.$}static getAddress(e){return(0,n.Kn)(e)}static getSighash(e){return(0,o.p3)((0,s.id)(e.format()),0,4)}static getEventTopic(e){return(0,s.id)(e.format())}getFunction(e){if((0,o.A7)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];h.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching function","name",t):r.length>1&&h.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[u.YW.fromString(e).format()];return t||h.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,o.A7)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];h.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching event","name",t):r.length>1&&h.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[u.QV.fromString(e).format()];return t||h.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,o.A7)(e)){const t=(0,f.tu)(this.constructor,"getSighash");for(const r in this.errors)if(e===t(this.errors[r]))return this.errors[r];h.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?h.throwArgumentError("no matching error","name",t):r.length>1&&h.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[u.YW.fromString(e).format()];return t||h.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,f.tu)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,f.tu)(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=(0,o.lE)(t);return(0,o.Dv)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,o.Dv)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,o.Dv)((0,o.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=(0,o.lE)(t);return(0,o.Dv)(r.slice(0,4))!==this.getSighash(e)&&h.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,o.Dv)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.Dv)((0,o.zo)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=(0,o.lE)(t),n=null,i="",s=null,a=null,f=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=(0,o.Dv)(r.slice(0,4)),t=g[e];if(t)s=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,f=t.signature,t.reason&&(n=s[0]),"Error"===a?i=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(s[0])}`:"Panic"===a&&(i=`; VM Exception while processing transaction: reverted with panic code ${s[0]}`);else try{const t=this.getError(e);s=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,f=t.format()}catch(e){}break}}return h.throwError("call revert exception"+i,l.Yd.errors.CALL_EXCEPTION,{method:e.format(),data:(0,o.Dv)(t),errorArgs:s,errorName:a,errorSignature:f,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.Dv)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&h.throwError("too many arguments for "+e.format(),l.Yd.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?(0,s.id)(t):"bytes"===e.type?(0,a.w)((0,o.Dv)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=i.O$.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,o.$m)((0,o.Dv)(t),32));for(t.forEach(((t,i)=>{let o=e.inputs[i];o.indexed?null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?h.throwArgumentError("filtering with tuples or arrays not supported","contract."+o.name,t):Array.isArray(t)?r.push(t.map((e=>n(o,e)))):r.push(n(o,t)):null!=t&&h.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&h.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const f=t[o];if(e.indexed)if("string"===e.type)r.push((0,s.id)(f));else if("bytes"===e.type)r.push((0,a.w)(f));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[f]))}else n.push(e),i.push(f)})),{data:this._abiCoder.encode(n,i),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);(0,o.A7)(r[0],32)&&r[0].toLowerCase()===t||h.throwError("fragment/topic mismatch",l.Yd.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],i=[],s=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(u._R.fromObject({type:"bytes32",name:e.name})),s.push(!0)):(n.push(e),s.push(!1)):(i.push(e),s.push(!1))}));let a=null!=r?this._abiCoder.decode(n,(0,o.zo)(r)):null,f=this._abiCoder.decode(i,t,!0),c=[],d=0,b=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==a)c[t]=new y({_isIndexed:!0,hash:null});else if(s[t])c[t]=new y({_isIndexed:!0,hash:a[b++]});else try{c[t]=a[b++]}catch(e){c[t]=e}else try{c[t]=f[d++]}catch(e){c[t]=e}if(e.name&&null==c[e.name]){const r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:()=>{throw v(`property ${JSON.stringify(e.name)}`,r)}}):c[e.name]=r}}));for(let e=0;e<c.length;e++){const t=c[e];t instanceof Error&&Object.defineProperty(c,e,{enumerable:!0,get:()=>{throw v(`index ${e}`,t)}})}return Object.freeze(c)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new p({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:i.O$.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new b({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=(0,o.Dv)(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new m({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}},772:(e,t,r)=>{"use strict";r.d(t,{Sg:()=>a,zt:()=>f});var n=r(528),i=r(221),o=r(11);const s=new o.Yd("abstract-provider/5.8.0");class a extends i.dk{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class f{constructor(){s.checkAbstract(new.target,f),(0,i.zG)(this,"_isProvider",!0)}getFeeData(){return e=this,t=void 0,o=function*(){const{block:e,gasPrice:t}=yield(0,i.mE)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,o=null,s=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,s=n.O$.from("1500000000"),o=e.baseFeePerGas.mul(2).add(s)),{lastBaseFeePerGas:r,maxFeePerGas:o,maxPriorityFeePerGas:s,gasPrice:t}},new((r=void 0)||(r=Promise))((function(n,i){function s(e){try{f(o.next(e))}catch(e){i(e)}}function a(e){try{f(o.throw(e))}catch(e){i(e)}}function f(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((o=o.apply(e,t||[])).next())}));var e,t,r,o}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}},327:(e,t,r)=>{"use strict";r.d(t,{E:()=>c,b:()=>u});var n=r(221),i=r(11),o=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};const s=new i.Yd("abstract-signer/5.8.0"),a=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],f=[i.Yd.errors.INSUFFICIENT_FUNDS,i.Yd.errors.NONCE_EXPIRED,i.Yd.errors.REPLACEMENT_UNDERPRICED];class c{constructor(){s.checkAbstract(new.target,c),(0,n.zG)(this,"_isSigner",!0)}getBalance(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return o(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield(0,n.mE)(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return o(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.mE)(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return o(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return o(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return o(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===a.indexOf(t)&&s.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=(0,n.DC)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&s.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return o(this,void 0,void 0,(function*(){const t=yield(0,n.mE)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&s.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||s.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):s.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&s.throwError("network does not support EIP-1559",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):s.throwError("failed to get consistent fee data",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(f.indexOf(e.code)>=0)throw e;return s.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&s.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield(0,n.mE)(t)}))}_checkProvider(e){this.provider||s.throwError("missing provider",i.Yd.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class u extends c{constructor(e,t){super(),(0,n.zG)(this,"address",e),(0,n.zG)(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{s.throwError(e,i.Yd.errors.UNSUPPORTED_OPERATION,{operation:t})}))}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new u(this.address,e)}}},549:(e,t,r)=>{"use strict";r.d(t,{Kn:()=>h,CR:()=>m,hB:()=>y,vU:()=>p,UJ:()=>b});var n=r(640),i=r(528),o=r(256),s=r(648);const a=new(r(11).Yd)("address/5.8.0");function f(e){(0,n.A7)(e,20)||a.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const i=(0,n.lE)((0,o.w)(r));for(let e=0;e<40;e+=2)i[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&i[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);const u=Math.floor((l=9007199254740991,Math.log10?Math.log10(l):Math.log(l)/Math.LN10));var l;function d(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>c[e])).join("");for(;t.length>=u;){let e=t.substring(0,u);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function h(e){let t=null;if("string"!=typeof e&&a.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=f(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&a.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==d(e)&&a.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=f("0x"+t)}else a.throwArgumentError("invalid address","address",e);return t}function b(e){try{return h(e),!0}catch(e){}return!1}function p(e){let t=(0,i.t2)(h(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+d("XE00"+t)+t}function m(e){let t=null;try{t=h(e.from)}catch(t){a.throwArgumentError("missing from address","transaction",e)}const r=(0,n.G1)((0,n.lE)(i.O$.from(e.nonce).toHexString()));return h((0,n.p3)((0,o.w)((0,s.encode)([t,r])),12))}function y(e,t,r){return 32!==(0,n.E1)(t)&&a.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.E1)(r)&&a.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),h((0,n.p3)((0,o.w)((0,n.zo)(["0xff",h(e),t,r])),12))}},495:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});const n="bignumber/5.8.0"},528:(e,t,r)=>{"use strict";r.d(t,{O$:()=>b,Zm:()=>d,g$:()=>v,t2:()=>w});var n=r(197),i=r.n(n),o=r(640),s=r(11),a=r(495),f=i().BN;const c=new s.Yd(a.i),u={},l=9007199254740991;function d(e){return null!=e&&(b.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,o.A7)(e)||"bigint"==typeof e||(0,o._t)(e))}let h=!1;class b{constructor(e,t){e!==u&&c.throwError("cannot call constructor directly; use BigNumber.from",s.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return m(y(this).fromTwos(e))}toTwos(e){return m(y(this).toTwos(e))}abs(){return"-"===this._hex[0]?b.from(this._hex.substring(1)):this}add(e){return m(y(this).add(y(e)))}sub(e){return m(y(this).sub(y(e)))}div(e){return b.from(e).isZero()&&g("division-by-zero","div"),m(y(this).div(y(e)))}mul(e){return m(y(this).mul(y(e)))}mod(e){const t=y(e);return t.isNeg()&&g("division-by-zero","mod"),m(y(this).umod(t))}pow(e){const t=y(e);return t.isNeg()&&g("negative-power","pow"),m(y(this).pow(t))}and(e){const t=y(e);return(this.isNegative()||t.isNeg())&&g("unbound-bitwise-result","and"),m(y(this).and(t))}or(e){const t=y(e);return(this.isNegative()||t.isNeg())&&g("unbound-bitwise-result","or"),m(y(this).or(t))}xor(e){const t=y(e);return(this.isNegative()||t.isNeg())&&g("unbound-bitwise-result","xor"),m(y(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&g("negative-width","mask"),m(y(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&g("negative-width","shl"),m(y(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&g("negative-width","shr"),m(y(this).shrn(e))}eq(e){return y(this).eq(y(e))}lt(e){return y(this).lt(y(e))}lte(e){return y(this).lte(y(e))}gt(e){return y(this).gt(y(e))}gte(e){return y(this).gte(y(e))}isNegative(){return"-"===this._hex[0]}isZero(){return y(this).isZero()}toNumber(){try{return y(this).toNumber()}catch(e){g("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return c.throwError("this platform does not support BigInt",s.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?h||(h=!0,c.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?c.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",s.Yd.errors.UNEXPECTED_ARGUMENT,{}):c.throwError("BigNumber.toString does not accept parameters",s.Yd.errors.UNEXPECTED_ARGUMENT,{})),y(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof b)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new b(u,p(e)):e.match(/^-?[0-9]+$/)?new b(u,p(new f(e))):c.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&g("underflow","BigNumber.from",e),(e>=l||e<=-l)&&g("overflow","BigNumber.from",e),b.from(String(e));const t=e;if("bigint"==typeof t)return b.from(t.toString());if((0,o._t)(t))return b.from((0,o.Dv)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return b.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,o.A7)(e)||"-"===e[0]&&(0,o.A7)(e.substring(1))))return b.from(e)}return c.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function p(e){if("string"!=typeof e)return p(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&c.throwArgumentError("invalid hex","value",e),"0x00"===(e=p(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function m(e){return b.from(p(e))}function y(e){const t=b.from(e).toHexString();return"-"===t[0]?new f("-"+t.substring(3),16):new f(t.substring(2),16)}function g(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),c.throwError(e,s.Yd.errors.NUMERIC_FAULT,n)}function v(e){return new f(e,36).toString(16)}function w(e){return new f(e,16).toString(36)}},640:(e,t,r)=>{"use strict";r.d(t,{lE:()=>c,zo:()=>u,xs:()=>g,E1:()=>m,p3:()=>y,Ou:()=>w,$P:()=>v,$m:()=>A,Dv:()=>p,_t:()=>f,Zq:()=>s,A7:()=>h,gV:()=>k,N:()=>E,G1:()=>l,Bu:()=>d});const n=new(r(11).Yd)("bytes/5.8.0");function i(e){return!!e.toHexString}function o(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return o(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function s(e){return h(e)&&!(e.length%2)||f(e)}function a(e){return"number"==typeof e&&e==e&&e%1==0}function f(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!a(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){const r=e[t];if(!a(r)||r<0||r>=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),o(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e)&&(e=e.toHexString()),h(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));const i=[];for(let e=0;e<r.length;e+=2)i.push(parseInt(r.substring(e,e+2),16));return o(new Uint8Array(i))}return f(e)?o(new Uint8Array(e)):n.throwArgumentError("invalid arrayify value","value",e)}function u(e){const t=e.map((e=>c(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),o(n)}function l(e){let t=c(e);if(0===t.length)return t;let r=0;for(;r<t.length&&0===t[r];)r++;return r&&(t=t.slice(r)),t}function d(e,t){(e=c(e)).length>t&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),o(r)}function h(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}const b="0123456789abcdef";function p(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=b[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),i(e))return e.toHexString();if(h(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(f(e)){let t="0x";for(let r=0;r<e.length;r++){let n=e[r];t+=b[(240&n)>>4]+b[15&n]}return t}return n.throwArgumentError("invalid hexlify value","value",e)}function m(e){if("string"!=typeof e)e=p(e);else if(!h(e)||e.length%2)return null;return(e.length-2)/2}function y(e,t,r){return"string"!=typeof e?e=p(e):(!h(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function g(e){let t="0x";return e.forEach((e=>{t+=p(e).substring(2)})),t}function v(e){const t=w(p(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!=typeof e&&(e=p(e)),h(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t<e.length&&"0"===e[t];)t++;return"0x"+e.substring(t)}function A(e,t){for("string"!=typeof e?e=p(e):h(e)||n.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function E(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(s(e)){let r=c(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64))):65===r.length?(t.r=p(r.slice(0,32)),t.s=p(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=p(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=d(c(t._vs),32);t._vs=p(r);const i=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=i:t.recoveryParam!==i&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const o=p(r);null==t.s?t.s=o:t.s!==o&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&h(t.r)?t.r=A(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&h(t.s)?t.s=A(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);const r=c(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const i=p(r);t._vs&&(h(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=A(t._vs,32)),null==t._vs?t._vs=i:t._vs!==i&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function k(e){return p(u([(e=E(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},711:(e,t,r)=>{"use strict";r.d(t,{$B:()=>u,Bz:()=>c,Ce:()=>f,PS:()=>l,Py:()=>a,_Y:()=>o,fh:()=>s,tL:()=>i});var n=r(528);const i=n.O$.from(-1),o=n.O$.from(0),s=n.O$.from(1),a=n.O$.from(2),f=n.O$.from("1000000000000000000"),c=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),u=n.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),l=n.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},503:(e,t,r)=>{"use strict";r.d(t,{VZ:()=>x,CH:()=>N,lV:()=>P});var n=r(848),i=r(268),o=r(772),s=r(327),a=r(549),f=r(528),c=r(640),u=r(221),l=r(390),d=r(11),h=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};const b=new d.Yd("contracts/5.8.0"),p={chainId:!0,data:!0,from:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0,customData:!0,ccipReadEnabled:!0};function m(e,t){return h(this,void 0,void 0,(function*(){const r=yield t;"string"!=typeof r&&b.throwArgumentError("invalid address or ENS name","name",r);try{return(0,a.Kn)(r)}catch(e){}e||b.throwError("a provider or signer is needed to resolve ENS names",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});const n=yield e.resolveName(r);return null==n&&b.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n}))}function y(e,t,r){return h(this,void 0,void 0,(function*(){return Array.isArray(r)?yield Promise.all(r.map(((r,n)=>y(e,Array.isArray(t)?t[n]:t[r.name],r)))):"address"===r.type?yield m(e,t):"tuple"===r.type?yield y(e,t,r.components):"array"===r.baseType?Array.isArray(t)?yield Promise.all(t.map((t=>y(e,t,r.arrayChildren)))):Promise.reject(b.makeError("invalid value for array",d.Yd.errors.INVALID_ARGUMENT,{argument:"value",value:t})):t}))}function g(e,t,r){return h(this,void 0,void 0,(function*(){let n={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(n=(0,u.DC)(r.pop())),b.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?n.from?n.from=(0,u.mE)({override:m(e.signer,n.from),signer:e.signer.getAddress()}).then((e=>h(this,void 0,void 0,(function*(){return(0,a.Kn)(e.signer)!==e.override&&b.throwError("Contract with a Signer cannot override from",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})))):n.from=e.signer.getAddress():n.from&&(n.from=m(e.provider,n.from));const i=yield(0,u.mE)({args:y(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:(0,u.mE)(n)||{}}),o=e.interface.encodeFunctionData(t,i.args),s={data:o,to:i.address},p=i.overrides;if(null!=p.nonce&&(s.nonce=f.O$.from(p.nonce).toNumber()),null!=p.gasLimit&&(s.gasLimit=f.O$.from(p.gasLimit)),null!=p.gasPrice&&(s.gasPrice=f.O$.from(p.gasPrice)),null!=p.maxFeePerGas&&(s.maxFeePerGas=f.O$.from(p.maxFeePerGas)),null!=p.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=f.O$.from(p.maxPriorityFeePerGas)),null!=p.from&&(s.from=p.from),null!=p.type&&(s.type=p.type),null!=p.accessList&&(s.accessList=(0,l.z7)(p.accessList)),null==s.gasLimit&&null!=t.gas){let e=21e3;const r=(0,c.lE)(o);for(let t=0;t<r.length;t++)e+=4,r[t]&&(e+=64);s.gasLimit=f.O$.from(t.gas).add(e)}if(p.value){const e=f.O$.from(p.value);e.isZero()||t.payable||b.throwError("non-payable method cannot override value",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:n.value}),s.value=e}p.customData&&(s.customData=(0,u.DC)(p.customData)),p.ccipReadEnabled&&(s.ccipReadEnabled=!!p.ccipReadEnabled),delete n.nonce,delete n.gasLimit,delete n.gasPrice,delete n.from,delete n.value,delete n.type,delete n.accessList,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.customData,delete n.ccipReadEnabled;const g=Object.keys(n).filter((e=>null!=n[e]));return g.length&&b.throwError(`cannot override ${g.map((e=>JSON.stringify(e))).join(",")}`,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:g}),s}))}function v(e,t){const r=t.wait.bind(t);t.wait=t=>r(t).then((t=>(t.events=t.logs.map((r=>{let n=(0,u.p$)(r),i=null;try{i=e.interface.parseLog(r)}catch(e){}return i&&(n.args=i.args,n.decode=(t,r)=>e.interface.decodeEventLog(i.eventFragment,t,r),n.event=i.name,n.eventSignature=i.signature),n.removeListener=()=>e.provider,n.getBlock=()=>e.provider.getBlock(t.blockHash),n.getTransaction=()=>e.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>Promise.resolve(t),n})),t)))}function w(e,t,r){const n=e.signer||e.provider;return function(...i){return h(this,void 0,void 0,(function*(){let o;if(i.length===t.inputs.length+1&&"object"==typeof i[i.length-1]){const e=(0,u.DC)(i.pop());null!=e.blockTag&&(o=yield e.blockTag),delete e.blockTag,i.push(e)}null!=e.deployTransaction&&(yield e._deployed(o));const s=yield g(e,t,i),a=yield n.call(s,o);try{let n=e.interface.decodeFunctionResult(t,a);return r&&1===t.outputs.length&&(n=n[0]),n}catch(t){throw t.code===d.Yd.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=i,t.transaction=s),t}}))}}function A(e,t,r){return t.constant?w(e,t,r):function(e,t){return function(...r){return h(this,void 0,void 0,(function*(){e.signer||b.throwError("sending a transaction requires a signer",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());const n=yield g(e,t,r),i=yield e.signer.sendTransaction(n);return v(e,i),i}))}}(e,t)}function E(e){return!e.address||null!=e.topics&&0!==e.topics.length?(e.address||"*")+"@"+(e.topics?e.topics.map((e=>Array.isArray(e)?e.join("|"):e)).join(":"):""):"*"}class k{constructor(e,t){(0,u.zG)(this,"tag",e),(0,u.zG)(this,"filter",t),this._listeners=[]}addListener(e,t){this._listeners.push({listener:e,once:t})}removeListener(e){let t=!1;this._listeners=this._listeners.filter((r=>!(!t&&r.listener===e&&(t=!0,1))))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map((e=>e.listener))}listenerCount(){return this._listeners.length}run(e){const t=this.listenerCount();return this._listeners=this._listeners.filter((t=>{const r=e.slice();return setTimeout((()=>{t.listener.apply(this,r)}),0),!t.once})),t}prepareEvent(e){}getEmit(e){return[e]}}class T extends k{constructor(){super("error",null)}}class _ extends k{constructor(e,t,r,n){const i={address:e};let o=t.getEventTopic(r);n?(o!==n[0]&&b.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(E(i),i),(0,u.zG)(this,"address",e),(0,u.zG)(this,"interface",t),(0,u.zG)(this,"fragment",r)}prepareEvent(e){super.prepareEvent(e),e.event=this.fragment.name,e.eventSignature=this.fragment.format(),e.decode=(e,t)=>this.interface.decodeEventLog(this.fragment,e,t);try{e.args=this.interface.decodeEventLog(this.fragment,e.data,e.topics)}catch(t){e.args=null,e.decodeError=t}}getEmit(e){const t=(0,n.BR)(e.args);if(t.length)throw t[0].error;const r=(e.args||[]).slice();return r.push(e),r}}class S extends k{constructor(e,t){super("*",{address:e}),(0,u.zG)(this,"address",e),(0,u.zG)(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{const t=this.interface.parseLog(e);e.event=t.name,e.eventSignature=t.signature,e.decode=(e,r)=>this.interface.decodeEventLog(t.eventFragment,e,r),e.args=t.args}catch(e){}}}class x{constructor(e,t,r){(0,u.zG)(this,"interface",(0,u.tu)(new.target,"getInterface")(t)),null==r?((0,u.zG)(this,"provider",null),(0,u.zG)(this,"signer",null)):s.E.isSigner(r)?((0,u.zG)(this,"provider",r.provider||null),(0,u.zG)(this,"signer",r)):o.zt.isProvider(r)?((0,u.zG)(this,"provider",r),(0,u.zG)(this,"signer",null)):b.throwArgumentError("invalid signer or provider","signerOrProvider",r),(0,u.zG)(this,"callStatic",{}),(0,u.zG)(this,"estimateGas",{}),(0,u.zG)(this,"functions",{}),(0,u.zG)(this,"populateTransaction",{}),(0,u.zG)(this,"filters",{});{const e={};Object.keys(this.interface.events).forEach((t=>{const r=this.interface.events[t];(0,u.zG)(this.filters,t,((...e)=>({address:this.address,topics:this.interface.encodeFilterTopics(r,e)}))),e[r.name]||(e[r.name]=[]),e[r.name].push(t)})),Object.keys(e).forEach((t=>{const r=e[t];1===r.length?(0,u.zG)(this.filters,t,this.filters[r[0]]):b.warn(`Duplicate definition of ${t} (${r.join(", ")})`)}))}if((0,u.zG)(this,"_runningEvents",{}),(0,u.zG)(this,"_wrappedEmits",{}),null==e&&b.throwArgumentError("invalid contract address or ENS name","addressOrName",e),(0,u.zG)(this,"address",e),this.provider)(0,u.zG)(this,"resolvedAddress",m(this.provider,e));else try{(0,u.zG)(this,"resolvedAddress",Promise.resolve((0,a.Kn)(e)))}catch(e){b.throwError("provider is required to use ENS name as contract address",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch((e=>{}));const n={},i={};Object.keys(this.interface.functions).forEach((e=>{const t=this.interface.functions[e];if(i[e])b.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);else{i[e]=!0;{const r=t.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(e)}null==this[e]&&(0,u.zG)(this,e,A(this,t,!0)),null==this.functions[e]&&(0,u.zG)(this.functions,e,A(this,t,!1)),null==this.callStatic[e]&&(0,u.zG)(this.callStatic,e,w(this,t,!0)),null==this.populateTransaction[e]&&(0,u.zG)(this.populateTransaction,e,function(e,t){return function(...r){return g(e,t,r)}}(this,t)),null==this.estimateGas[e]&&(0,u.zG)(this.estimateGas,e,function(e,t){const r=e.signer||e.provider;return function(...n){return h(this,void 0,void 0,(function*(){r||b.throwError("estimate require a provider or signer",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});const i=yield g(e,t,n);return yield r.estimateGas(i)}))}}(this,t))}})),Object.keys(n).forEach((e=>{const t=n[e];if(t.length>1)return;e=e.substring(1);const r=t[0];try{null==this[e]&&(0,u.zG)(this,e,this[r])}catch(e){}null==this.functions[e]&&(0,u.zG)(this.functions,e,this.functions[r]),null==this.callStatic[e]&&(0,u.zG)(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&(0,u.zG)(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&(0,u.zG)(this.estimateGas,e,this.estimateGas[r])}))}static getContractAddress(e){return(0,a.CR)(e)}static getInterface(e){return i.vU.isInterface(e)?e:new i.vU(e)}deployed(){return this._deployed()}_deployed(e){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then((()=>this)):this._deployedPromise=this.provider.getCode(this.address,e).then((e=>("0x"===e&&b.throwError("contract not deployed",d.Yd.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this)))),this._deployedPromise}fallback(e){this.signer||b.throwError("sending a transactions require a signer",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});const t=(0,u.DC)(e||{});return["from","to"].forEach((function(e){null!=t[e]&&b.throwError("cannot override "+e,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.to=this.resolvedAddress,this.deployed().then((()=>this.signer.sendTransaction(t)))}connect(e){"string"==typeof e&&(e=new s.b(e,this.provider));const t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,u.zG)(t,"deployTransaction",this.deployTransaction),t}attach(e){return new this.constructor(e,this.interface,this.signer||this.provider)}static isIndexed(e){return i.Hk.isIndexed(e)}_normalizeRunningEvent(e){return this._runningEvents[e.tag]?this._runningEvents[e.tag]:e}_getRunningEvent(e){if("string"==typeof e){if("error"===e)return this._normalizeRunningEvent(new T);if("event"===e)return this._normalizeRunningEvent(new k("event",null));if("*"===e)return this._normalizeRunningEvent(new S(this.address,this.interface));const t=this.interface.getEvent(e);return this._normalizeRunningEvent(new _(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{const t=e.topics[0];if("string"!=typeof t)throw new Error("invalid topic");const r=this.interface.getEvent(t);return this._normalizeRunningEvent(new _(this.address,this.interface,r,e.topics))}catch(e){}const t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new k(E(t),t))}return this._normalizeRunningEvent(new S(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];const t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){const n=(0,u.p$)(t);return n.removeListener=()=>{r&&(e.removeListener(r),this._checkRunningEvents(e))},n.getBlock=()=>this.provider.getBlock(t.blockHash),n.getTransaction=()=>this.provider.getTransaction(t.transactionHash),n.getTransactionReceipt=()=>this.provider.getTransactionReceipt(t.transactionHash),e.prepareEvent(n),n}_addEventListener(e,t,r){if(this.provider||b.throwError("events require a provider or a signer with a provider",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){const r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{const t=e.getEmit(n);this.emit(e.filter,...t)}catch(e){n.decodeError=e.error}null!=e.filter&&this.emit("event",n),null!=n.decodeError&&this.emit("error",n.decodeError,n)};this._wrappedEmits[e.tag]=r,null!=e.filter&&this.provider.on(e.filter,r)}}queryFilter(e,t,r){const n=this._getRunningEvent(e),i=(0,u.DC)(n.filter);return"string"==typeof t&&(0,c.A7)(t,32)?(null!=r&&b.throwArgumentError("cannot specify toBlock with blockhash","toBlock",r),i.blockHash=t):(i.fromBlock=null!=t?t:0,i.toBlock=null!=r?r:"latest"),this.provider.getLogs(i).then((e=>e.map((e=>this._wrapEvent(n,e,null)))))}on(e,t){return this._addEventListener(this._getRunningEvent(e),t,!1),this}once(e,t){return this._addEventListener(this._getRunningEvent(e),t,!0),this}emit(e,...t){if(!this.provider)return!1;const r=this._getRunningEvent(e),n=r.run(t)>0;return this._checkRunningEvents(r),n}listenerCount(e){return this.provider?null==e?Object.keys(this._runningEvents).reduce(((e,t)=>e+this._runningEvents[t].listenerCount()),0):this._getRunningEvent(e).listenerCount():0}listeners(e){if(!this.provider)return[];if(null==e){const e=[];for(let t in this._runningEvents)this._runningEvents[t].listeners().forEach((t=>{e.push(t)}));return e}return this._getRunningEvent(e).listeners()}removeAllListeners(e){if(!this.provider)return this;if(null==e){for(const e in this._runningEvents){const t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t)}return this}const t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;const r=this._getRunningEvent(e);return r.removeListener(t),this._checkRunningEvents(r),this}removeListener(e,t){return this.off(e,t)}}class N extends x{}class P{constructor(e,t,r){let n=null;n="string"==typeof t?t:(0,c._t)(t)?(0,c.Dv)(t):t&&"string"==typeof t.object?t.object:"!","0x"!==n.substring(0,2)&&(n="0x"+n),(!(0,c.A7)(n)||n.length%2)&&b.throwArgumentError("invalid bytecode","bytecode",t),r&&!s.E.isSigner(r)&&b.throwArgumentError("invalid signer","signer",r),(0,u.zG)(this,"bytecode",n),(0,u.zG)(this,"interface",(0,u.tu)(new.target,"getInterface")(e)),(0,u.zG)(this,"signer",r||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){t=(0,u.DC)(e.pop());for(const e in t)if(!p[e])throw new Error("unknown transaction override "+e)}return["data","from","to"].forEach((e=>{null!=t[e]&&b.throwError("cannot override "+e,d.Yd.errors.UNSUPPORTED_OPERATION,{operation:e})})),t.value&&(f.O$.from(t.value).isZero()||this.interface.deploy.payable||b.throwError("non-payable constructor cannot override value",d.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})),b.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=(0,c.Dv)((0,c.zo)([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return h(this,void 0,void 0,(function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),b.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");const r=yield y(this.signer,e,this.interface.deploy.inputs);r.push(t);const n=this.getDeployTransaction(...r),i=yield this.signer.sendTransaction(n),o=(0,u.tu)(this.constructor,"getContractAddress")(i),s=(0,u.tu)(this.constructor,"getContract")(o,this.interface,this.signer);return v(s,i),(0,u.zG)(s,"deployTransaction",i),s}))}attach(e){return this.constructor.getContract(e,this.interface,this.signer)}connect(e){return new this.constructor(this.interface,this.bytecode,e)}static fromSolidity(e,t){null==e&&b.throwError("missing compiler output",d.Yd.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n=null;return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}static getInterface(e){return N.getInterface(e)}static getContractAddress(e){return(0,a.CR)(e)}static getContract(e,t,r){return new N(e,t,r)}}},235:(e,t,r)=>{"use strict";r.d(t,{id:()=>o});var n=r(256),i=r(222);function o(e){return(0,n.w)((0,i.Y0)(e))}},256:(e,t,r)=>{"use strict";r.d(t,{w:()=>s});var n=r(669),i=r.n(n),o=r(640);function s(e){return"0x"+i().keccak_256((0,o.lE)(e))}},11:(e,t,r)=>{"use strict";r.d(t,{jK:()=>u,Yd:()=>d});let n=!1,i=!1;const o={debug:1,default:2,info:2,warning:3,error:4,off:5};let s=o.default,a=null;const f=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var c,u;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(c||(c={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(u||(u={}));const l="0123456789abcdef";class d{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==o[r]&&this.throwArgumentError("invalid log level name","logLevel",e),s>o[r]||console.log.apply(console,t)}debug(...e){this._log(d.levels.DEBUG,e)}info(...e){this._log(d.levels.INFO,e)}warn(...e){this._log(d.levels.WARNING,e)}makeError(e,t,r){if(i)return this.makeError("censored error",t,{});t||(t=d.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e<t.length;e++)r+=l[t[e]>>4],r+=l[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const o=e;let s="";switch(t){case u.NUMERIC_FAULT:{s="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":s+="-"+t;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case u.CALL_EXCEPTION:case u.INSUFFICIENT_FUNDS:case u.MISSING_NEW:case u.NONCE_EXPIRED:case u.REPLACEMENT_UNDERPRICED:case u.TRANSACTION_REPLACED:case u.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const a=new Error(e);return a.reason=o,a.code=t,Object.keys(r).forEach((function(e){a[e]=r[e]})),a}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,d.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),f&&this.throwError("platform missing String.prototype.normalize",d.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:f})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,d.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,d.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,d.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",d.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",d.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return a||(a=new d("logger/5.8.0")),a}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",d.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}i=!!e,n=!!t}static setLogLevel(e){const t=o[e.toLowerCase()];null!=t?s=t:d.globalLogger().warn("invalid log level - "+e)}static from(e){return new d(e)}}d.errors=u,d.levels=c},221:(e,t,r)=>{"use strict";r.d(t,{dk:()=>p,uj:()=>c,p$:()=>b,zG:()=>s,tu:()=>a,mE:()=>f,DC:()=>u});var n=r(11),i=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};const o=new n.Yd("properties/5.8.0");function s(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function a(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function f(e){return i(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function c(e,t){e&&"object"==typeof e||o.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||o.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function u(e){const t={};for(const r in e)t[r]=e[r];return t}const l={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function d(e){if(null==e||l[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;r<t.length;r++){let n=null;try{n=e[t[r]]}catch(e){continue}if(!d(n))return!1}return!0}return o.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function h(e){if(d(e))return e;if(Array.isArray(e))return Object.freeze(e.map((e=>b(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&s(t,r,b(n))}return t}return o.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function b(e){return h(e)}class p{constructor(e){for(const t in e)this[t]=b(e[t])}}},648:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>d,encode:()=>c});var n=r(640),i=r(11);const o=new i.Yd("rlp/5.8.0");function s(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function a(e,t,r){let n=0;for(let i=0;i<r;i++)n=256*n+e[t+i];return n}function f(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(f(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=s(t.length);return r.unshift(247+r.length),r.concat(t)}(0,n.Zq)(e)||o.throwArgumentError("RLP object must be BytesLike","object",e);const t=Array.prototype.slice.call((0,n.lE)(e));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=s(t.length);return r.unshift(183+r.length),r.concat(t)}function c(e){return(0,n.Dv)(f(e))}function u(e,t,r,n){const s=[];for(;r<t+1+n;){const a=l(e,r);s.push(a.result),(r+=a.consumed)>t+1+n&&o.throwError("child data too short",i.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function l(e,t){if(0===e.length&&o.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",i.Yd.errors.BUFFER_OVERRUN,{});const n=a(e,t+1,r);return t+1+r+n>e.length&&o.throwError("data long segment too short",i.Yd.errors.BUFFER_OVERRUN,{}),u(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{}),u(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{});const s=a(e,t+1,r);return t+1+r+s>e.length&&o.throwError("data array too short",i.Yd.errors.BUFFER_OVERRUN,{}),{consumed:1+r+s,result:(0,n.Dv)(e.slice(t+1+r,t+1+r+s))}}if(e[t]>=128){const r=e[t]-128;return t+1+r>e.length&&o.throwError("data too short",i.Yd.errors.BUFFER_OVERRUN,{}),{consumed:1+r,result:(0,n.Dv)(e.slice(t+1,t+1+r))}}return{consumed:1,result:(0,n.Dv)(e[t])}}function d(e){const t=(0,n.lE)(e),r=l(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},459:(e,t,r)=>{"use strict";r.d(t,{Et:()=>J,VW:()=>Q,LO:()=>W});var n=r(197),i=r.n(n),o=r(485),s=r.n(o);function a(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var f=c;function c(e,t){if(!e)throw new Error(t||"Assertion failed")}c.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var u=a((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}})),l=a((function(e,t){var r=t;r.assert=f,r.toArray=u.toArray,r.zero2=u.zero2,r.toHex=u.toHex,r.encode=u.encode,r.getNAF=function(e,t,r){var n,i=new Array(Math.max(e.bitLength(),r)+1);for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<t+1,s=e.clone();for(n=0;n<i.length;n++){var a,f=s.andln(o-1);s.isOdd()?(a=f>(o>>1)-1?(o>>1)-f:f,s.isubn(a)):a=0,i[n]=a,s.iushrn(1)}return i},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var s,a,f=e.andln(3)+i&3,c=t.andln(3)+o&3;3===f&&(f=-1),3===c&&(c=-1),s=0==(1&f)?0:3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?f:-f,r[0].push(s),a=0==(1&c)?0:3!=(n=t.andln(7)+o&7)&&5!==n||2!==f?c:-c,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new(i())(e,"hex","le")}})),d=l.getNAF,h=l.getJSF,b=l.assert;function p(e,t){this.type=e,this.p=new(i())(t.p,16),this.red=t.prime?i().red(t.prime):i().mont(this.p),this.zero=new(i())(0).toRed(this.red),this.one=new(i())(1).toRed(this.red),this.two=new(i())(2).toRed(this.red),this.n=t.n&&new(i())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var m=p;function y(e,t){this.curve=e,this.type=t,this.precomputed=null}p.prototype.point=function(){throw new Error("Not implemented")},p.prototype.validate=function(){throw new Error("Not implemented")},p.prototype._fixedNafMul=function(e,t){b(e.precomputed);var r=e._getDoubles(),n=d(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var o,s,a=[];for(o=0;o<n.length;o+=r.step){s=0;for(var f=o+r.step-1;f>=o;f--)s=(s<<1)+n[f];a.push(s)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),l=i;l>0;l--){for(o=0;o<a.length;o++)(s=a[o])===l?u=u.mixedAdd(r.points[o]):s===-l&&(u=u.mixedAdd(r.points[o].neg()));c=c.add(u)}return c.toP()},p.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=d(t,r,this._bitLength),s=this.jpoint(null,null,null),a=o.length-1;a>=0;a--){for(var f=0;a>=0&&0===o[a];a--)f++;if(a>=0&&f++,s=s.dblp(f),a<0)break;var c=o[a];b(0!==c),s="affine"===e.type?c>0?s.mixedAdd(i[c-1>>1]):s.mixedAdd(i[-c-1>>1].neg()):c>0?s.add(i[c-1>>1]):s.add(i[-c-1>>1].neg())}return"affine"===e.type?s.toP():s},p.prototype._wnafMulAdd=function(e,t,r,n,i){var o,s,a,f=this._wnafT1,c=this._wnafT2,u=this._wnafT3,l=0;for(o=0;o<n;o++){var b=(a=t[o])._getNAFPoints(e);f[o]=b.wnd,c[o]=b.points}for(o=n-1;o>=1;o-=2){var p=o-1,m=o;if(1===f[p]&&1===f[m]){var y=[t[p],null,null,t[m]];0===t[p].y.cmp(t[m].y)?(y[1]=t[p].add(t[m]),y[2]=t[p].toJ().mixedAdd(t[m].neg())):0===t[p].y.cmp(t[m].y.redNeg())?(y[1]=t[p].toJ().mixedAdd(t[m]),y[2]=t[p].add(t[m].neg())):(y[1]=t[p].toJ().mixedAdd(t[m]),y[2]=t[p].toJ().mixedAdd(t[m].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],v=h(r[p],r[m]);for(l=Math.max(v[0].length,l),u[p]=new Array(l),u[m]=new Array(l),s=0;s<l;s++){var w=0|v[0][s],A=0|v[1][s];u[p][s]=g[3*(w+1)+(A+1)],u[m][s]=0,c[p]=y}}else u[p]=d(r[p],f[p],this._bitLength),u[m]=d(r[m],f[m],this._bitLength),l=Math.max(u[p].length,l),l=Math.max(u[m].length,l)}var E=this.jpoint(null,null,null),k=this._wnafT4;for(o=l;o>=0;o--){for(var T=0;o>=0;){var _=!0;for(s=0;s<n;s++)k[s]=0|u[s][o],0!==k[s]&&(_=!1);if(!_)break;T++,o--}if(o>=0&&T++,E=E.dblp(T),o<0)break;for(s=0;s<n;s++){var S=k[s];0!==S&&(S>0?a=c[s][S-1>>1]:S<0&&(a=c[s][-S-1>>1].neg()),E="affine"===a.type?E.mixedAdd(a):E.add(a))}}for(o=0;o<n;o++)c[o]=null;return i?E:E.toP()},p.BasePoint=y,y.prototype.eq=function(){throw new Error("Not implemented")},y.prototype.validate=function(){return this.curve.validate(this)},p.prototype.decodePoint=function(e,t){e=l.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?b(e[e.length-1]%2==0):7===e[0]&&b(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},y.prototype.encodeCompressed=function(e){return this.encode(e,!0)},y.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},y.prototype.encode=function(e,t){return l.encode(this._encode(t),e)},y.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},y.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},y.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},y.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},y.prototype._getBeta=function(){return null},y.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var g=a((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),v=l.assert;function w(e){m.call(this,"short",e),this.a=new(i())(e.a,16).toRed(this.red),this.b=new(i())(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}g(w,m);var A=w;function E(e,t,r,n){m.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new(i())(t,16),this.y=new(i())(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function k(e,t,r,n){m.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new(i())(0)):(this.x=new(i())(t,16),this.y=new(i())(r,16),this.z=new(i())(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}w.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new(i())(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new(i())(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],v(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new(i())(e.a,16),b:new(i())(e.b,16)}})):this._getEndoBasis(r)}}},w.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i().mont(e),r=new(i())(2).toRed(t).redInvm(),n=r.redNeg(),o=new(i())(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},w.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,f,c,u,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,h=this.n.clone(),b=new(i())(1),p=new(i())(0),m=new(i())(0),y=new(i())(1),g=0;0!==d.cmpn(0);){var v=h.div(d);c=h.sub(v.mul(d)),u=m.sub(v.mul(b));var w=y.sub(v.mul(p));if(!n&&c.cmp(l)<0)t=f.neg(),r=b,n=c.neg(),o=u;else if(n&&2==++g)break;f=c,h=d,d=c,m=b,b=u,y=p,p=w}s=c.neg(),a=u;var A=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(A)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),f=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:f.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new(i())(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],f=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),f=f.neg(!0)),n[2*o]=a,n[2*o+1]=f,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),u=0;u<2*o;u++)n[u]=null,i[u]=null;return c},g(E,m.BasePoint),w.prototype.point=function(e,t,r){return new E(this,e,t,r)},w.prototype.pointFromJSON=function(e,t){return E.fromJSON(this,e,t)},E.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},E.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},E.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},E.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},E.prototype.isInfinity=function(){return this.inf},E.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},E.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},E.prototype.getX=function(){return this.x.fromRed()},E.prototype.getY=function(){return this.y.fromRed()},E.prototype.mul=function(e){return e=new(i())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},E.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},E.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},E.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},E.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},E.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},g(k,m.BasePoint),w.prototype.jpoint=function(e,t,r){return new k(this,e,t,r)},k.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},k.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},k.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),f=o.redSub(s);if(0===a.cmpn(0))return 0!==f.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),l=n.redMul(c),d=f.redSqr().redIAdd(u).redISub(l).redISub(l),h=f.redMul(l.redISub(d)).redISub(o.redMul(u)),b=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(d,h,b)},k.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var f=s.redSqr(),c=f.redMul(s),u=r.redMul(f),l=a.redSqr().redIAdd(c).redISub(u).redISub(u),d=a.redMul(u.redISub(l)).redISub(i.redMul(c)),h=this.z.redMul(s);return this.curve.jpoint(l,d,h)},k.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,f=a.redSqr().redSqr(),c=s.redAdd(s);for(t=0;t<e;t++){var u=o.redSqr(),l=c.redSqr(),d=l.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(n.redMul(f)),b=o.redMul(l),p=h.redSqr().redISub(b.redAdd(b)),m=b.redISub(p),y=h.redMul(m);y=y.redIAdd(y).redISub(d);var g=c.redMul(a);t+1<e&&(f=f.redMul(d)),o=p,a=g,c=y}return this.curve.jpoint(o,c.redMul(i),a)},k.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},k.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),f=a.redSqr().redISub(s).redISub(s),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=f,t=a.redMul(s.redISub(f)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),l=this.y.redSqr(),d=l.redSqr(),h=this.x.redAdd(l).redSqr().redISub(u).redISub(d);h=h.redIAdd(h);var b=u.redAdd(u).redIAdd(u),p=b.redSqr(),m=d.redIAdd(d);m=(m=m.redIAdd(m)).redIAdd(m),e=p.redISub(h).redISub(h),t=b.redMul(h.redISub(e)).redISub(m),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},k.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),f=a.redSqr().redISub(s).redISub(s);e=f;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=a.redMul(s.redISub(f)).redISub(c),r=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),l=this.y.redSqr(),d=this.x.redMul(l),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var b=d.redIAdd(d),p=(b=b.redIAdd(b)).redAdd(b);e=h.redSqr().redISub(p),r=this.y.redAdd(this.z).redSqr().redISub(l).redISub(u);var m=l.redSqr();m=(m=(m=m.redIAdd(m)).redIAdd(m)).redIAdd(m),t=h.redMul(b.redISub(e)).redISub(m)}return this.curve.jpoint(e,t,r)},k.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),f=t.redAdd(t),c=(f=f.redIAdd(f)).redMul(s),u=a.redSqr().redISub(c.redAdd(c)),l=c.redISub(u),d=s.redSqr();d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=a.redMul(l).redISub(d),b=r.redAdd(r).redMul(n);return this.curve.jpoint(u,h,b)},k.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),f=n.redIAdd(n);f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var c=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(f),u=t.redMul(c);u=(u=u.redIAdd(u)).redIAdd(u);var l=this.x.redMul(a).redISub(u);l=(l=l.redIAdd(l)).redIAdd(l);var d=this.y.redMul(c.redMul(f.redISub(c)).redISub(s.redMul(a)));d=(d=(d=d.redIAdd(d)).redIAdd(d)).redIAdd(d);var h=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(l,d,h)},k.prototype.mul=function(e,t){return e=new(i())(e,t),this.curve._wnafMul(this,e)},k.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},k.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},k.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},k.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var T=a((function(e,t){var r=t;r.base=m,r.short=A,r.mont=null,r.edwards=null})),_=a((function(e,t){var r,n=t,i=l.assert;function o(e){"short"===e.type?this.curve=new T.short(e):"edwards"===e.type?this.curve=new T.edwards(e):this.curve=new T.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,i(this.g.validate(),"Invalid curve"),i(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function a(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new o(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=o,a("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:s().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),a("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:s().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),a("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:s().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),a("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:s().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),a("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:s().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),a("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s().sha256,gRed:!1,g:["9"]}),a("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:s().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}a("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:s().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function S(e){if(!(this instanceof S))return new S(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=u.toArray(e.entropy,e.entropyEnc||"hex"),r=u.toArray(e.nonce,e.nonceEnc||"hex"),n=u.toArray(e.pers,e.persEnc||"hex");f(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var x=S;S.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},S.prototype._hmac=function(){return new(s().hmac)(this.hash,this.K)},S.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},S.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=u.toArray(e,t),r=u.toArray(r,n),f(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},S.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=u.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(r),this._reseed++,u.encode(o,t)};var N=l.assert;function P(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var M=P;P.fromPublic=function(e,t,r){return t instanceof P?t:new P(e,{pub:t,pubEnc:r})},P.fromPrivate=function(e,t,r){return t instanceof P?t:new P(e,{priv:t,privEnc:r})},P.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},P.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},P.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},P.prototype._importPrivate=function(e,t){this.priv=new(i())(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},P.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?N(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||N(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},P.prototype.derive=function(e){return e.validate()||N(e.validate(),"public point not validated"),e.mul(this.priv).getX()},P.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},P.prototype.verify=function(e,t,r){return this.ec.verify(e,t,this,void 0,r)},P.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var R=l.assert;function C(e,t){if(e instanceof C)return e;this._importDER(e,t)||(R(e.r&&e.s,"Signature without r or s"),this.r=new(i())(e.r,16),this.s=new(i())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var O=C;function I(){this.place=0}function B(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;if(0===e[t.place])return!1;for(var i=0,o=0,s=t.place;o<n;o++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function D(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function F(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}C.prototype._importDER=function(e,t){e=l.toArray(e,t);var r=new I;if(48!==e[r.place++])return!1;var n=B(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=B(e,r);if(!1===o)return!1;if(0!=(128&e[r.place]))return!1;var s=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var a=B(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;if(0!=(128&e[r.place]))return!1;var f=e.slice(r.place,a+r.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new(i())(s),this.s=new(i())(f),this.recoveryParam=null,!0},C.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=D(t),r=D(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];F(n,t.length),(n=n.concat(t)).push(2),F(n,r.length);var i=n.concat(r),o=[48];return F(o,i.length),o=o.concat(i),l.encode(o,e)};var U=function(){throw new Error("unsupported")},L=l.assert;function z(e){if(!(this instanceof z))return new z(e);"string"==typeof e&&(L(Object.prototype.hasOwnProperty.call(_,e),"Unknown curve "+e),e=_[e]),e instanceof _.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var G=z;z.prototype.keyPair=function(e){return new M(this,e)},z.prototype.keyFromPrivate=function(e,t){return M.fromPrivate(this,e,t)},z.prototype.keyFromPublic=function(e,t){return M.fromPublic(this,e,t)},z.prototype.genKeyPair=function(e){e||(e={});for(var t=new x({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||U(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(i())(2));;){var o=new(i())(t.generate(r));if(!(o.cmp(n)>0))return o.iaddn(1),this.keyFromPrivate(o)}},z.prototype._truncateToN=function(e,t,r){var n;if(i().isBN(e)||"number"==typeof e)n=(e=new(i())(e,16)).byteLength();else if("object"==typeof e)n=e.length,e=new(i())(e,16);else{var o=e.toString();n=o.length+1>>>1,e=new(i())(o,16)}"number"!=typeof r&&(r=8*n);var s=r-this.n.bitLength();return s>0&&(e=e.ushrn(s)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},z.prototype.sign=function(e,t,r,n){if("object"==typeof r&&(n=r,r=null),n||(n={}),"string"!=typeof e&&"number"!=typeof e&&!i().isBN(e)){L("object"==typeof e&&e&&"number"==typeof e.length,"Expected message to be an array-like, a hex string, or a BN instance"),L(e.length>>>0===e.length);for(var o=0;o<e.length;o++)L((255&e[o])===e[o])}t=this.keyFromPrivate(t,r),e=this._truncateToN(e,!1,n.msgBitLength),L(!e.isNeg(),"Can not sign a negative message");var s=this.n.byteLength(),a=t.getPrivate().toArray("be",s),f=e.toArray("be",s);L(new(i())(f).eq(e),"Can not sign message");for(var c=new x({hash:this.hash,entropy:a,nonce:f,pers:n.pers,persEnc:n.persEnc||"utf8"}),u=this.n.sub(new(i())(1)),l=0;;l++){var d=n.k?n.k(l):new(i())(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(u)>=0)){var h=this.g.mul(d);if(!h.isInfinity()){var b=h.getX(),p=b.umod(this.n);if(0!==p.cmpn(0)){var m=d.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var y=(h.getY().isOdd()?1:0)|(0!==b.cmp(p)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),y^=1),new O({r:p,s:m,recoveryParam:y})}}}}}},z.prototype.verify=function(e,t,r,n,i){i||(i={}),e=this._truncateToN(e,!1,i.msgBitLength),r=this.keyFromPublic(r,n);var o=(t=new O(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,f=s.invm(this.n),c=f.mul(e).umod(this.n),u=f.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),u)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),u)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},z.prototype.recoverPubKey=function(e,t,r,n){L((3&r)===r,"The recovery param is more than two bits"),t=new O(t,n);var o=this.n,s=new(i())(e),a=t.r,f=t.s,c=1&r,u=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");a=u?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var l=t.r.invm(o),d=o.sub(s).mul(l).umod(o),h=f.mul(l).umod(o);return this.g.mulAdd(d,a,h)},z.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new O(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var j=a((function(e,t){var r=t;r.version="6.6.1",r.utils=l,r.rand=function(){throw new Error("unsupported")},r.curve=T,r.curves=_,r.ec=G,r.eddsa=null})).ec,Y=r(640),q=r(221);const K=new(r(11).Yd)("signing-key/5.8.0");let H=null;function V(){return H||(H=new j("secp256k1")),H}class J{constructor(e){(0,q.zG)(this,"curve","secp256k1"),(0,q.zG)(this,"privateKey",(0,Y.Dv)(e)),32!==(0,Y.E1)(this.privateKey)&&K.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=V().keyFromPrivate((0,Y.lE)(this.privateKey));(0,q.zG)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,q.zG)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,q.zG)(this,"_isSigningKey",!0)}_addPoint(e){const t=V().keyFromPublic((0,Y.lE)(this.publicKey)),r=V().keyFromPublic((0,Y.lE)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=V().keyFromPrivate((0,Y.lE)(this.privateKey)),r=(0,Y.lE)(e);32!==r.length&&K.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return(0,Y.N)({recoveryParam:n.recoveryParam,r:(0,Y.$m)("0x"+n.r.toString(16),32),s:(0,Y.$m)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=V().keyFromPrivate((0,Y.lE)(this.privateKey)),r=V().keyFromPublic((0,Y.lE)(Q(e)));return(0,Y.$m)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function W(e,t){const r=(0,Y.N)(t),n={r:(0,Y.lE)(r.r),s:(0,Y.lE)(r.s)};return"0x"+V().recoverPubKey((0,Y.lE)(e),n,r.recoveryParam).encode("hex",!1)}function Q(e,t){const r=(0,Y.lE)(e);if(32===r.length){const e=new J(r);return t?"0x"+V().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,Y.Dv)(r):"0x"+V().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+V().keyFromPublic(r).getPublic(!0,"hex"):(0,Y.Dv)(r):K.throwArgumentError("invalid public or private key","key","[REDACTED]")}},222:(e,t,r)=>{"use strict";r.d(t,{Uj:()=>o,te:()=>f,Uw:()=>s,U$:()=>d,uu:()=>h,Y0:()=>u,XL:()=>p,ZN:()=>b});var n=r(640);const i=new(r(11).Yd)("strings/5.8.0");var o,s;function a(e,t,r,n,i){if(e===s.BAD_PREFIX||e===s.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return e===s.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(o||(o={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(s||(s={}));const f=Object.freeze({error:function(e,t,r,n,o){return i.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:a,replace:function(e,t,r,n,i){return e===s.OVERLONG?(n.push(i),0):(n.push(65533),a(e,t,r))}});function c(e,t){null==t&&(t=f.error),e=(0,n.lE)(e);const r=[];let i=0;for(;i<e.length;){const n=e[i++];if(n>>7==0){r.push(n);continue}let o=null,a=null;if(192==(224&n))o=1,a=127;else if(224==(240&n))o=2,a=2047;else{if(240!=(248&n)){i+=t(128==(192&n)?s.UNEXPECTED_CONTINUE:s.BAD_PREFIX,i-1,e,r);continue}o=3,a=65535}if(i-1+o>=e.length){i+=t(s.OVERRUN,i-1,e,r);continue}let f=n&(1<<8-o-1)-1;for(let n=0;n<o;n++){let n=e[i];if(128!=(192&n)){i+=t(s.MISSING_CONTINUE,i,e,r),f=null;break}f=f<<6|63&n,i++}null!==f&&(f>1114111?i+=t(s.OUT_OF_RANGE,i-1-o,e,r,f):f>=55296&&f<=57343?i+=t(s.UTF16_SURROGATE,i-1-o,e,r,f):f<=a?i+=t(s.OVERLONG,i-1-o,e,r,f):r.push(f))}return r}function u(e,t=o.current){t!=o.current&&(i.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const i=e.charCodeAt(t);if(t>=e.length||56320!=(64512&i))throw new Error("invalid utf-8 string");const o=65536+((1023&n)<<10)+(1023&i);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return(0,n.lE)(r)}function l(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function d(e,t){return'"'+c(e,t).map((e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?l(e):l(55296+((e-=65536)>>10&1023))+l(56320+(1023&e))})).join("")+'"'}function h(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function b(e,t){return h(c(e,t))}function p(e,t=o.current){return c(u(e,t))}},390:(e,t,r)=>{"use strict";r.d(t,{em:()=>h,z7:()=>E,db:()=>g,Qc:()=>N,RJ:()=>v,qC:()=>S});var n=r(549),i=r(528),o=r(640),s=r(711),a=r(256),f=r(221),c=r(648),u=r(459),l=r(11);const d=new l.Yd("transactions/5.8.0");var h;function b(e){return"0x"===e?null:(0,n.Kn)(e)}function p(e){return"0x"===e?s._Y:i.O$.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(h||(h={}));const m=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],y={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function g(e){const t=(0,u.VW)(e);return(0,n.Kn)((0,o.p3)((0,a.w)((0,o.p3)(t,1)),12))}function v(e,t){return g((0,u.LO)((0,o.lE)(e),t))}function w(e,t){const r=(0,o.G1)(i.O$.from(e).toHexString());return r.length>32&&d.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function A(e,t){return{address:(0,n.Kn)(e),storageKeys:(t||[]).map(((t,r)=>(32!==(0,o.E1)(t)&&d.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function E(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&d.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),A(e[0],e[1])):A(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return A(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function k(e){return E(e).map((e=>[e.address,e.storageKeys]))}function T(e,t){if(null!=e.gasPrice){const t=i.O$.from(e.gasPrice),r=i.O$.from(e.maxFeePerGas||0);t.eq(r)||d.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.Kn)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",k(e.accessList||[])];if(t){const e=(0,o.N)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.G1)(e.r)),r.push((0,o.G1)(e.s))}return(0,o.xs)(["0x02",c.encode(r)])}function _(e,t){const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.Kn)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",k(e.accessList||[])];if(t){const e=(0,o.N)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,o.G1)(e.r)),r.push((0,o.G1)(e.s))}return(0,o.xs)(["0x01",c.encode(r)])}function S(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&d.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,f.uj)(e,y);const r=[];m.forEach((function(t){let n=e[t.name]||[];const i={};t.numeric&&(i.hexPad="left"),n=(0,o.lE)((0,o.Dv)(n,i)),t.length&&n.length!==t.length&&n.length>0&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,o.G1)(n),n.length>t.maxLength&&d.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push((0,o.Dv)(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!=typeof n&&d.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!(0,o.Zq)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,o.Dv)(n)),r.push("0x"),r.push("0x")),!t)return c.encode(r);const i=(0,o.N)(t);let s=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),s+=2*n+8,i.v>28&&i.v!==s&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==s&&d.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,o.Dv)(s)),r.push((0,o.G1)((0,o.lE)(i.r))),r.push((0,o.G1)((0,o.lE)(i.s))),c.encode(r)}(e,t);switch(e.type){case 1:return _(e,t);case 2:return T(e,t)}return d.throwError(`unsupported transaction type: ${e.type}`,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function x(e,t,r){try{const r=p(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){d.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,o.$m)(t[1],32),e.s=(0,o.$m)(t[2],32);try{const t=(0,a.w)(r(e));e.from=v(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function N(e){const t=(0,o.lE)(e);if(t[0]>127)return function(e){const t=c.decode(e);9!==t.length&&6!==t.length&&d.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:p(t[0]).toNumber(),gasPrice:p(t[1]),gasLimit:p(t[2]),to:b(t[3]),value:p(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=i.O$.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,o.$m)(t[7],32),r.s=(0,o.$m)(t[8],32),i.O$.from(r.r).isZero()&&i.O$.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const i=t.slice(0,6);0!==r.chainId&&(i.push((0,o.Dv)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);const s=(0,a.w)(c.encode(i));try{r.from=v(s,{r:(0,o.Dv)(r.r),s:(0,o.Dv)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,a.w)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=c.decode(e.slice(1));8!==t.length&&11!==t.length&&d.throwArgumentError("invalid component count for transaction type: 1","payload",(0,o.Dv)(e));const r={type:1,chainId:p(t[0]).toNumber(),nonce:p(t[1]).toNumber(),gasPrice:p(t[2]),gasLimit:p(t[3]),to:b(t[4]),value:p(t[5]),data:t[6],accessList:E(t[7])};return 8===t.length||(r.hash=(0,a.w)(e),x(r,t.slice(8),_)),r}(t);case 2:return function(e){const t=c.decode(e.slice(1));9!==t.length&&12!==t.length&&d.throwArgumentError("invalid component count for transaction type: 2","payload",(0,o.Dv)(e));const r=p(t[2]),n=p(t[3]),i={type:2,chainId:p(t[0]).toNumber(),nonce:p(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:p(t[4]),to:b(t[5]),value:p(t[6]),data:t[7],accessList:E(t[8])};return 9===t.length||(i.hash=(0,a.w)(e),x(i,t.slice(9),T)),i}(t)}return d.throwError(`unsupported transaction type: ${t[0]}`,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},202:function(e){"use strict";!function(t){function r(e){return parseInt(e)===e}function n(e){if(!r(e.length))return!1;for(var t=0;t<e.length;t++)if(!r(e[t])||e[t]<0||e[t]>255)return!1;return!0}function i(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function o(e){return new Uint8Array(e)}function s(e,t,r,n,i){null==n&&null==i||(e=e.slice?e.slice(n,i):Array.prototype.slice.call(e,n,i)),t.set(e,r)}var a,f={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r<e.length;){var n=e.charCodeAt(r++);37===n?(t.push(parseInt(e.substr(r,2),16)),r+=2):t.push(n)}return i(t)},fromBytes:function(e){for(var t=[],r=0;r<e.length;){var n=e[r];n<128?(t.push(String.fromCharCode(n)),r++):n>191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},c=(a="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r<e.length;r+=2)t.push(parseInt(e.substr(r,2),16));return t},fromBytes:function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r];t.push(a[(240&n)>>4]+a[15&n])}return t.join("")}}),u={16:10,24:12,32:14},l=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],h=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],b=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],p=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],m=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],y=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],v=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],w=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],A=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],E=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],k=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],T=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],_=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function S(e){for(var t=[],r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}var x=function(e){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:i(e,!0)}),this._prepare()};x.prototype._prepare=function(){var e=u[this.key.length];if(null==e)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var t=0;t<=e;t++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var r,n=4*(e+1),i=this.key.length/4,o=S(this.key);for(t=0;t<i;t++)r=t>>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t];for(var s,a=0,f=i;f<n;){if(s=o[i-1],o[0]^=d[s>>16&255]<<24^d[s>>8&255]<<16^d[255&s]<<8^d[s>>24&255]^l[a]<<24,a+=1,8!=i)for(t=1;t<i;t++)o[t]^=o[t-1];else{for(t=1;t<i/2;t++)o[t]^=o[t-1];for(s=o[i/2-1],o[i/2]^=d[255&s]^d[s>>8&255]<<8^d[s>>16&255]<<16^d[s>>24&255]<<24,t=i/2+1;t<i;t++)o[t]^=o[t-1]}for(t=0;t<i&&f<n;)c=f>>2,h=f%4,this._Ke[c][h]=o[t],this._Kd[e-c][h]=o[t++],f++}for(var c=1;c<e;c++)for(var h=0;h<4;h++)s=this._Kd[c][h],this._Kd[c][h]=E[s>>24&255]^k[s>>16&255]^T[s>>8&255]^_[255&s]},x.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=S(e),i=0;i<4;i++)n[i]^=this._Ke[0][i];for(var s=1;s<t;s++){for(i=0;i<4;i++)r[i]=b[n[i]>>24&255]^p[n[(i+1)%4]>>16&255]^m[n[(i+2)%4]>>8&255]^y[255&n[(i+3)%4]]^this._Ke[s][i];n=r.slice()}var a,f=o(16);for(i=0;i<4;i++)a=this._Ke[t][i],f[4*i]=255&(d[n[i]>>24&255]^a>>24),f[4*i+1]=255&(d[n[(i+1)%4]>>16&255]^a>>16),f[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^a>>8),f[4*i+3]=255&(d[255&n[(i+3)%4]]^a);return f},x.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=S(e),i=0;i<4;i++)n[i]^=this._Kd[0][i];for(var s=1;s<t;s++){for(i=0;i<4;i++)r[i]=g[n[i]>>24&255]^v[n[(i+3)%4]>>16&255]^w[n[(i+2)%4]>>8&255]^A[255&n[(i+1)%4]]^this._Kd[s][i];n=r.slice()}var a,f=o(16);for(i=0;i<4;i++)a=this._Kd[t][i],f[4*i]=255&(h[n[i]>>24&255]^a>>24),f[4*i+1]=255&(h[n[(i+3)%4]>>16&255]^a>>16),f[4*i+2]=255&(h[n[(i+2)%4]>>8&255]^a>>8),f[4*i+3]=255&(h[255&n[(i+1)%4]]^a);return f};var N=function(e){if(!(this instanceof N))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new x(e)};N.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16)s(e,r,0,n,n+16),s(r=this._aes.encrypt(r),t,n);return t},N.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16)s(e,r,0,n,n+16),s(r=this._aes.decrypt(r),t,n);return t};var P=function(e,t){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastCipherblock=i(t,!0),this._aes=new x(e)};P.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16){s(e,r,0,n,n+16);for(var a=0;a<16;a++)r[a]^=this._lastCipherblock[a];this._lastCipherblock=this._aes.encrypt(r),s(this._lastCipherblock,t,n)}return t},P.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var t=o(e.length),r=o(16),n=0;n<e.length;n+=16){s(e,r,0,n,n+16),r=this._aes.decrypt(r);for(var a=0;a<16;a++)t[n+a]=r[a]^this._lastCipherblock[a];s(e,this._lastCipherblock,0,n,n+16)}return t};var M=function(e,t,r){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 size)")}else t=o(16);r||(r=1),this.segmentSize=r,this._shiftRegister=i(t,!0),this._aes=new x(e)};M.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var t,r=i(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)r[n+o]^=t[o];s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(r,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r},M.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var t,r=i(e,!0),n=0;n<r.length;n+=this.segmentSize){t=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)r[n+o]^=t[o];s(this._shiftRegister,this._shiftRegister,0,this.segmentSize),s(e,this._shiftRegister,16-this.segmentSize,n,n+this.segmentSize)}return r};var R=function(e,t){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",t){if(16!=t.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastPrecipher=i(t,!0),this._lastPrecipherIndex=16,this._aes=new x(e)};R.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),t[r]^=this._lastPrecipher[this._lastPrecipherIndex++];return t},R.prototype.decrypt=R.prototype.encrypt;var C=function(e){if(!(this instanceof C))throw Error("Counter must be instanitated with `new`");0===e||e||(e=1),"number"==typeof e?(this._counter=o(16),this.setValue(e)):this.setBytes(e)};C.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw new Error("invalid counter value (must be an integer)");for(var t=15;t>=0;--t)this._counter[t]=e%256,e>>=8},C.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},C.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var O=function(e,t){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof C||(t=new C(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new x(e)};O.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[r]^=this._remainingCounter[this._remainingCounterIndex++];return t},O.prototype.decrypt=O.prototype.encrypt;var I={AES:x,Counter:C,ModeOfOperation:{ecb:N,cbc:P,cfb:M,ofb:R,ctr:O},utils:{hex:c,utf8:f},padding:{pkcs7:{pad:function(e){var t=16-(e=i(e,!0)).length%16,r=o(e.length+t);s(e,r);for(var n=e.length;n<r.length;n++)r[n]=t;return r},strip:function(e){if((e=i(e,!0)).length<16)throw new Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n<t;n++)if(e[r+n]!==t)throw new Error("PKCS#7 invalid padding byte");var a=o(r);return s(e,a,0,0,r),a}}},_arrayTest:{coerceArray:i,createArray:o,copyArray:s}};e.exports=I}()},273:e=>{"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<32;n++){var i=t.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(e){var t=e>>25;return(33554431&e)<<5^996825010&-(t>>0&1)^642813549&-(t>>1&1)^513874426&-(t>>2&1)^1027748829&-(t>>3&1)^705979059&-(t>>4&1)}function s(e){for(var t=1,r=0;r<e.length;++r){var n=e.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+e+")";t=o(t)^n>>5}for(t=o(t),r=0;r<e.length;++r){var i=e.charCodeAt(r);t=o(t)^31&i}return t}function a(e,t){if(t=t||90,e.length<8)return e+" too short";if(e.length>t)return"Exceeds length limit";var n=e.toLowerCase(),i=e.toUpperCase();if(e!==n&&e!==i)return"Mixed-case string "+e;var a=(e=n).lastIndexOf("1");if(-1===a)return"No separator character for "+e;if(0===a)return"Missing prefix for "+e;var f=e.slice(0,a),c=e.slice(a+1);if(c.length<6)return"Data too short";var u=s(f);if("string"==typeof u)return u;for(var l=[],d=0;d<c.length;++d){var h=c.charAt(d),b=r[h];if(void 0===b)return"Unknown character "+h;u=o(u)^b,d+6>=c.length||l.push(b)}return 1!==u?"Invalid checksum for "+e:{prefix:f,words:l}}function f(e,t,r,n){for(var i=0,o=0,s=(1<<r)-1,a=[],f=0;f<e.length;++f)for(i=i<<t|e[f],o+=t;o>=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<<r-o&s);else{if(o>=t)return"Excess padding";if(i<<r-o&s)return"Non-zero padding"}return a}e.exports={decodeUnsafe:function(){var e=a.apply(null,arguments);if("object"==typeof e)return e},decode:function(e){var t=a.apply(null,arguments);if("object"==typeof t)return t;throw new Error(t)},encode:function(e,r,n){if(n=n||90,e.length+7+r.length>n)throw new TypeError("Exceeds length limit");var i=s(e=e.toLowerCase());if("string"==typeof i)throw new Error(i);for(var a=e+"1",f=0;f<r.length;++f){var c=r[f];if(c>>5!=0)throw new Error("Non 5-bit word");i=o(i)^c,a+=t.charAt(c)}for(f=0;f<6;++f)i=o(i);for(i^=1,f=0;f<6;++f)a+=t.charAt(i>>5*(5-f)&31);return a},toWordsUnsafe:function(e){var t=f(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=f(e,8,5,!0);if(Array.isArray(t))return t;throw new Error(t)},fromWordsUnsafe:function(e){var t=f(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=f(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}}},197:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(196).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function f(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),f=t;f<a;f++){var c=e.charCodeAt(f)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=f(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=f(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,f=0,u=r;u<a;u+=n)f=c(e,u,u+n,t),this.imuln(i),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f);if(0!==s){var l=1;for(f=c(e,u,e.length,t),u=0;u<s;u++)l*=t;this.imuln(l),this.words[0]+f<67108864?this.words[0]+=f:this._iaddn(f)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(e){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,f=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var u=f>>>26,l=67108863&f,d=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=d;h++){var b=c-h|0;u+=(s=(i=0|e.words[b])*(o=0|t.words[h])+l)/67108864|0,l=67108863&s}r.words[c]=0|l,f=0|u}return 0!==f?r.words[c]=0|f:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],f=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?d[6-f.length]+f+r:f+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],u=b[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var p=l.modrn(u).toString(e);r=(l=l.idivn(u)).isZero()?p+r:d[c-p.length]+p+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var m=function(e,t,r){var n,i,o,s=e.words,a=t.words,f=r.words,c=0,u=0|s[0],l=8191&u,d=u>>>13,h=0|s[1],b=8191&h,p=h>>>13,m=0|s[2],y=8191&m,g=m>>>13,v=0|s[3],w=8191&v,A=v>>>13,E=0|s[4],k=8191&E,T=E>>>13,_=0|s[5],S=8191&_,x=_>>>13,N=0|s[6],P=8191&N,M=N>>>13,R=0|s[7],C=8191&R,O=R>>>13,I=0|s[8],B=8191&I,D=I>>>13,F=0|s[9],U=8191&F,L=F>>>13,z=0|a[0],G=8191&z,j=z>>>13,Y=0|a[1],q=8191&Y,K=Y>>>13,H=0|a[2],V=8191&H,J=H>>>13,W=0|a[3],Q=8191&W,X=W>>>13,$=0|a[4],Z=8191&$,ee=$>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],fe=8191&ae,ce=ae>>>13,ue=0|a[8],le=8191&ue,de=ue>>>13,he=0|a[9],be=8191&he,pe=he>>>13;r.negative=e.negative^t.negative,r.length=19;var me=(c+(n=Math.imul(l,G))|0)+((8191&(i=(i=Math.imul(l,j))+Math.imul(d,G)|0))<<13)|0;c=((o=Math.imul(d,j))+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(b,G),i=(i=Math.imul(b,j))+Math.imul(p,G)|0,o=Math.imul(p,j);var ye=(c+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(d,q)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,G),i=(i=Math.imul(y,j))+Math.imul(g,G)|0,o=Math.imul(g,j),n=n+Math.imul(b,q)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(p,q)|0,o=o+Math.imul(p,K)|0;var ge=(c+(n=n+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,J)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(w,G),i=(i=Math.imul(w,j))+Math.imul(A,G)|0,o=Math.imul(A,j),n=n+Math.imul(y,q)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(g,q)|0,o=o+Math.imul(g,K)|0,n=n+Math.imul(b,V)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(p,V)|0,o=o+Math.imul(p,J)|0;var ve=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(d,Q)|0))<<13)|0;c=((o=o+Math.imul(d,X)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(k,G),i=(i=Math.imul(k,j))+Math.imul(T,G)|0,o=Math.imul(T,j),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(y,V)|0,i=(i=i+Math.imul(y,J)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(p,Q)|0,o=o+Math.imul(p,X)|0;var we=(c+(n=n+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(S,G),i=(i=Math.imul(S,j))+Math.imul(x,G)|0,o=Math.imul(x,j),n=n+Math.imul(k,q)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(T,q)|0,o=o+Math.imul(T,K)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(A,V)|0,o=o+Math.imul(A,J)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(p,Z)|0,o=o+Math.imul(p,ee)|0;var Ae=(c+(n=n+Math.imul(l,re)|0)|0)+((8191&(i=(i=i+Math.imul(l,ne)|0)+Math.imul(d,re)|0))<<13)|0;c=((o=o+Math.imul(d,ne)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(P,G),i=(i=Math.imul(P,j))+Math.imul(M,G)|0,o=Math.imul(M,j),n=n+Math.imul(S,q)|0,i=(i=i+Math.imul(S,K)|0)+Math.imul(x,q)|0,o=o+Math.imul(x,K)|0,n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,J)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,J)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,X)|0,n=n+Math.imul(y,Z)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(p,re)|0,o=o+Math.imul(p,ne)|0;var Ee=(c+(n=n+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,se)|0)+Math.imul(d,oe)|0))<<13)|0;c=((o=o+Math.imul(d,se)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(C,G),i=(i=Math.imul(C,j))+Math.imul(O,G)|0,o=Math.imul(O,j),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(M,q)|0,o=o+Math.imul(M,K)|0,n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,J)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,J)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,X)|0,n=n+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,se)|0)+Math.imul(p,oe)|0,o=o+Math.imul(p,se)|0;var ke=(c+(n=n+Math.imul(l,fe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ce)|0)+Math.imul(d,fe)|0))<<13)|0;c=((o=o+Math.imul(d,ce)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,G),i=(i=Math.imul(B,j))+Math.imul(D,G)|0,o=Math.imul(D,j),n=n+Math.imul(C,q)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(O,q)|0,o=o+Math.imul(O,K)|0,n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,J)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,X)|0,n=n+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0,n=n+Math.imul(b,fe)|0,i=(i=i+Math.imul(b,ce)|0)+Math.imul(p,fe)|0,o=o+Math.imul(p,ce)|0;var Te=(c+(n=n+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;c=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,G),i=(i=Math.imul(U,j))+Math.imul(L,G)|0,o=Math.imul(L,j),n=n+Math.imul(B,q)|0,i=(i=i+Math.imul(B,K)|0)+Math.imul(D,q)|0,o=o+Math.imul(D,K)|0,n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,J)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,X)|0,n=n+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,ee)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(T,re)|0,o=o+Math.imul(T,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,se)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,ce)|0,n=n+Math.imul(b,le)|0,i=(i=i+Math.imul(b,de)|0)+Math.imul(p,le)|0,o=o+Math.imul(p,de)|0;var _e=(c+(n=n+Math.imul(l,be)|0)|0)+((8191&(i=(i=i+Math.imul(l,pe)|0)+Math.imul(d,be)|0))<<13)|0;c=((o=o+Math.imul(d,pe)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(U,q),i=(i=Math.imul(U,K))+Math.imul(L,q)|0,o=Math.imul(L,K),n=n+Math.imul(B,V)|0,i=(i=i+Math.imul(B,J)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,J)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(P,Z)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,ee)|0,n=n+Math.imul(S,re)|0,i=(i=i+Math.imul(S,ne)|0)+Math.imul(x,re)|0,o=o+Math.imul(x,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,ce)|0,n=n+Math.imul(y,le)|0,i=(i=i+Math.imul(y,de)|0)+Math.imul(g,le)|0,o=o+Math.imul(g,de)|0;var Se=(c+(n=n+Math.imul(b,be)|0)|0)+((8191&(i=(i=i+Math.imul(b,pe)|0)+Math.imul(p,be)|0))<<13)|0;c=((o=o+Math.imul(p,pe)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,V),i=(i=Math.imul(U,J))+Math.imul(L,V)|0,o=Math.imul(L,J),n=n+Math.imul(B,Q)|0,i=(i=i+Math.imul(B,X)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,X)|0,n=n+Math.imul(C,Z)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(O,Z)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(M,re)|0,o=o+Math.imul(M,ne)|0,n=n+Math.imul(S,oe)|0,i=(i=i+Math.imul(S,se)|0)+Math.imul(x,oe)|0,o=o+Math.imul(x,se)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(T,fe)|0,o=o+Math.imul(T,ce)|0,n=n+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(A,le)|0,o=o+Math.imul(A,de)|0;var xe=(c+(n=n+Math.imul(y,be)|0)|0)+((8191&(i=(i=i+Math.imul(y,pe)|0)+Math.imul(g,be)|0))<<13)|0;c=((o=o+Math.imul(g,pe)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,Q),i=(i=Math.imul(U,X))+Math.imul(L,Q)|0,o=Math.imul(L,X),n=n+Math.imul(B,Z)|0,i=(i=i+Math.imul(B,ee)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,ee)|0,n=n+Math.imul(C,re)|0,i=(i=i+Math.imul(C,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,se)|0)+Math.imul(M,oe)|0,o=o+Math.imul(M,se)|0,n=n+Math.imul(S,fe)|0,i=(i=i+Math.imul(S,ce)|0)+Math.imul(x,fe)|0,o=o+Math.imul(x,ce)|0,n=n+Math.imul(k,le)|0,i=(i=i+Math.imul(k,de)|0)+Math.imul(T,le)|0,o=o+Math.imul(T,de)|0;var Ne=(c+(n=n+Math.imul(w,be)|0)|0)+((8191&(i=(i=i+Math.imul(w,pe)|0)+Math.imul(A,be)|0))<<13)|0;c=((o=o+Math.imul(A,pe)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(U,Z),i=(i=Math.imul(U,ee))+Math.imul(L,Z)|0,o=Math.imul(L,ee),n=n+Math.imul(B,re)|0,i=(i=i+Math.imul(B,ne)|0)+Math.imul(D,re)|0,o=o+Math.imul(D,ne)|0,n=n+Math.imul(C,oe)|0,i=(i=i+Math.imul(C,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(P,fe)|0,i=(i=i+Math.imul(P,ce)|0)+Math.imul(M,fe)|0,o=o+Math.imul(M,ce)|0,n=n+Math.imul(S,le)|0,i=(i=i+Math.imul(S,de)|0)+Math.imul(x,le)|0,o=o+Math.imul(x,de)|0;var Pe=(c+(n=n+Math.imul(k,be)|0)|0)+((8191&(i=(i=i+Math.imul(k,pe)|0)+Math.imul(T,be)|0))<<13)|0;c=((o=o+Math.imul(T,pe)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,re),i=(i=Math.imul(U,ne))+Math.imul(L,re)|0,o=Math.imul(L,ne),n=n+Math.imul(B,oe)|0,i=(i=i+Math.imul(B,se)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,se)|0,n=n+Math.imul(C,fe)|0,i=(i=i+Math.imul(C,ce)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(P,le)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(M,le)|0,o=o+Math.imul(M,de)|0;var Me=(c+(n=n+Math.imul(S,be)|0)|0)+((8191&(i=(i=i+Math.imul(S,pe)|0)+Math.imul(x,be)|0))<<13)|0;c=((o=o+Math.imul(x,pe)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,oe),i=(i=Math.imul(U,se))+Math.imul(L,oe)|0,o=Math.imul(L,se),n=n+Math.imul(B,fe)|0,i=(i=i+Math.imul(B,ce)|0)+Math.imul(D,fe)|0,o=o+Math.imul(D,ce)|0,n=n+Math.imul(C,le)|0,i=(i=i+Math.imul(C,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0;var Re=(c+(n=n+Math.imul(P,be)|0)|0)+((8191&(i=(i=i+Math.imul(P,pe)|0)+Math.imul(M,be)|0))<<13)|0;c=((o=o+Math.imul(M,pe)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(U,fe),i=(i=Math.imul(U,ce))+Math.imul(L,fe)|0,o=Math.imul(L,ce),n=n+Math.imul(B,le)|0,i=(i=i+Math.imul(B,de)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,de)|0;var Ce=(c+(n=n+Math.imul(C,be)|0)|0)+((8191&(i=(i=i+Math.imul(C,pe)|0)+Math.imul(O,be)|0))<<13)|0;c=((o=o+Math.imul(O,pe)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,le),i=(i=Math.imul(U,de))+Math.imul(L,le)|0,o=Math.imul(L,de);var Oe=(c+(n=n+Math.imul(B,be)|0)|0)+((8191&(i=(i=i+Math.imul(B,pe)|0)+Math.imul(D,be)|0))<<13)|0;c=((o=o+Math.imul(D,pe)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863;var Ie=(c+(n=Math.imul(U,be))|0)+((8191&(i=(i=Math.imul(U,pe))+Math.imul(L,be)|0))<<13)|0;return c=((o=Math.imul(L,pe))+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,f[0]=me,f[1]=ye,f[2]=ge,f[3]=ve,f[4]=we,f[5]=Ae,f[6]=Ee,f[7]=ke,f[8]=Te,f[9]=_e,f[10]=Se,f[11]=xe,f[12]=Ne,f[13]=Pe,f[14]=Me,f[15]=Re,f[16]=Ce,f[17]=Oe,f[18]=Ie,0!==c&&(f[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,f=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=f;c++){var u=o-c,l=(0|e.words[u])*(0|t.words[c]),d=67108863&l;a=67108863&(d=d+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(d>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function g(e,t,r){return y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(m=p),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?m(this,e,t):r<63?p(this,e,t):r<1024?y(this,e,t):g(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,f=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var l=f,d=c,h=0;h<s;h++){var b=r[u+h],p=n[u+h],m=r[u+h+s],y=n[u+h+s],g=l*m-d*y;y=l*y+d*m,m=g,r[u+h]=b+m,n[u+h]=p+y,r[u+h+s]=b-m,n[u+h+s]=p-y,h!==a&&(g=f*l-c*d,d=f*d+c*l,l=g)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),f=new Array(n),c=new Array(n),u=new Array(n),l=new Array(n),d=r.words;d.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,f,n,i),this.transform(c,o,u,l,n,i);for(var h=0;h<n;h++){var b=a[h]*u[h]-f[h]*l[h];f[h]=a[h]*l[h]+f[h]*u[h],a[h]=b}return this.conjugate(a,f,n),this.transform(a,f,d,o,n,i),this.conjugate(d,o,n),this.normalize13b(d,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,f=(0|this.words[t])-a<<r;this.words[t]=f|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,f=r;if(i-=s,i=Math.max(0,i),f){for(var c=0;c<s;c++)f.words[c]=this.words[c];f.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var l=0|this.words[c];this.words[c]=u<<26-o|l>>>o,u=l&a}return f&&0!==u&&(f.words[f.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var f=(0|e.words[i])*t;a=((o-=67108863&f)>>26)-(f/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,f=n.length-i.length;if("mod"!==t){(a=new o(null)).length=f+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var u=n.clone()._ishlnsubmul(i,1,f);0===u.negative&&(n=u,a&&(a.words[f]=1));for(var l=f-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(d=Math.min(d/s|0,67108863),n._ishlnsubmul(i,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=d)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),f=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),l=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(u),s.isub(l)),i.iushrn(1),s.iushrn(1);for(var b=0,p=1;0==(r.words[0]&p)&&b<26;++b,p<<=1);if(b>0)for(r.iushrn(b);b-- >0;)(a.isOdd()||f.isOdd())&&(a.iadd(u),f.isub(l)),a.iushrn(1),f.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(f)):(r.isub(t),a.isub(i),f.isub(s))}return{a,b:f,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),f=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(f),s.iushrn(1);for(var l=0,d=1;0==(r.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(f),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new S(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function A(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){A.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function T(){A.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){A.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}A.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},A.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},A.prototype.split=function(e,t){e.iushrn(this.n,0,t)},A.prototype.imulK=function(e){return e.imul(this.k)},i(E,A),E.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},E.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(k,A),i(T,A),i(_,A),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new E;else if("p224"===e)t=new k;else if("p192"===e)t=new T;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return w[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),f=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(f);)u.redIAdd(f);for(var l=this.pow(u,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),b=s;0!==h.cmp(a);){for(var p=h,m=0;0!==p.cmp(a);m++)p=p.redSqr();n(m<b);var y=this.pow(l,new o(1).iushln(b-m-1));d=d.redMul(y),l=y.redSqr(),h=h.redMul(l),b=m}return d},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,f=t.bitLength()%26;for(0===f&&(f=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],u=f-1;u>=0;u--){var l=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===n&&0===u)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}f=26}return i},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new x(e)},i(x,S),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},226:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BaseContract:()=>f.VZ,BigNumber:()=>c.O$,Contract:()=>f.CH,ContractFactory:()=>f.lV,FixedNumber:()=>k,Signer:()=>S.E,VoidSigner:()=>S.b,Wallet:()=>ft,Wordlist:()=>le,constants:()=>n,errors:()=>l.jK,ethers:()=>a,getDefaultProvider:()=>ii,logger:()=>zi,providers:()=>i,utils:()=>s,version:()=>Li,wordlists:()=>pe});var n={};r.r(n),r.d(n,{AddressZero:()=>lt,EtherSymbol:()=>bt,HashZero:()=>ht,MaxInt256:()=>dt.PS,MaxUint256:()=>dt.Bz,MinInt256:()=>dt.$B,NegativeOne:()=>dt.tL,One:()=>dt.fh,Two:()=>dt.Py,WeiPerEther:()=>dt.Ce,Zero:()=>dt._Y});var i={};r.r(i),r.d(i,{AlchemyProvider:()=>un,AlchemyWebSocketProvider:()=>cn,AnkrProvider:()=>bn,BaseProvider:()=>Ur,CloudflareProvider:()=>mn,EtherscanProvider:()=>Tn,FallbackProvider:()=>Ln,Formatter:()=>ur,InfuraProvider:()=>qn,InfuraWebSocketProvider:()=>Yn,IpcProvider:()=>zn,JsonRpcBatchProvider:()=>Kn,JsonRpcProvider:()=>Xr,JsonRpcSigner:()=>Jr,NodesmithProvider:()=>Vn,PocketProvider:()=>Qn,Provider:()=>N.zt,QuickNodeProvider:()=>$n,Resolver:()=>Br,StaticJsonRpcProvider:()=>on,UrlJsonRpcProvider:()=>sn,Web3Provider:()=>ri,WebSocketProvider:()=>rn,getDefaultProvider:()=>ii,getNetwork:()=>Et,isCommunityResourcable:()=>lr,isCommunityResource:()=>dr,showThrottleMessage:()=>br});var o={};r.r(o),r.d(o,{decode:()=>kt,encode:()=>Tt});var s={};r.r(s),r.d(s,{AbiCoder:()=>oi.R,ConstructorFragment:()=>si.Xg,ErrorFragment:()=>si.IC,EventFragment:()=>si.QV,FormatTypes:()=>si.pc,Fragment:()=>si.HY,FunctionFragment:()=>si.YW,HDNode:()=>Se,Indexed:()=>fi.Hk,Interface:()=>fi.vU,LogDescription:()=>fi.CC,Logger:()=>l.Yd,ParamType:()=>si._R,RLP:()=>gi,SigningKey:()=>fe.Et,SupportedAlgorithm:()=>Z,TransactionDescription:()=>fi.vk,TransactionTypes:()=>ce.em,UnicodeNormalizationForm:()=>M.Uj,Utf8ErrorFuncs:()=>M.te,Utf8ErrorReason:()=>M.Uw,_TypedDataEncoder:()=>Q,_fetchData:()=>nr,_toEscapedUtf8String:()=>M.U$,accessListify:()=>ce.z7,arrayify:()=>u.lE,base58:()=>$,base64:()=>o,checkProperties:()=>O.uj,checkResultErrors:()=>ai.BR,commify:()=>Ii,computeAddress:()=>ce.db,computeHmac:()=>se,computePublicKey:()=>fe.VW,concat:()=>u.zo,deepCopy:()=>O.p$,defaultAbiCoder:()=>oi.$,defaultPath:()=>_e,defineReadOnly:()=>O.zG,dnsEncode:()=>Qt,entropyToMnemonic:()=>Pe,fetchJson:()=>ir,formatBytes32String:()=>Mi,formatEther:()=>Fi,formatUnits:()=>Bi,getAccountPath:()=>Re,getAddress:()=>x.Kn,getContractAddress:()=>x.CR,getCreate2Address:()=>x.hB,getIcapAddress:()=>x.vU,getJsonWalletAddress:()=>it,getStatic:()=>O.tu,hashMessage:()=>C,hexConcat:()=>u.xs,hexDataLength:()=>u.E1,hexDataSlice:()=>u.p3,hexStripZeros:()=>u.Ou,hexValue:()=>u.$P,hexZeroPad:()=>u.$m,hexlify:()=>u.Dv,id:()=>B.id,isAddress:()=>x.UJ,isBytes:()=>u._t,isBytesLike:()=>u.Zq,isHexString:()=>u.A7,isValidMnemonic:()=>Me,isValidName:()=>Jt,joinSignature:()=>u.gV,keccak256:()=>P.w,mnemonicToEntropy:()=>Ne,mnemonicToSeed:()=>xe,namehash:()=>Wt,nameprep:()=>Pi,parseBytes32String:()=>Ri,parseEther:()=>Ui,parseTransaction:()=>ce.Qc,parseUnits:()=>Di,poll:()=>or,randomBytes:()=>Be,recoverAddress:()=>ce.RJ,recoverPublicKey:()=>fe.LO,resolveProperties:()=>O.mE,ripemd160:()=>ne,serializeTransaction:()=>ce.qC,sha256:()=>ie,sha512:()=>oe,shallowCopy:()=>O.DC,shuffled:()=>_n,solidityKeccak256:()=>mi,solidityPack:()=>pi,soliditySha256:()=>yi,splitSignature:()=>u.N,stripZeros:()=>u.G1,toUtf8Bytes:()=>M.Y0,toUtf8CodePoints:()=>M.XL,toUtf8String:()=>M.ZN,verifyMessage:()=>ct,verifyTypedData:()=>ut,zeroPad:()=>u.Bu});var a={};r.r(a),r.d(a,{BaseContract:()=>f.VZ,BigNumber:()=>c.O$,Contract:()=>f.CH,ContractFactory:()=>f.lV,FixedNumber:()=>k,Signer:()=>S.E,VoidSigner:()=>S.b,Wallet:()=>ft,Wordlist:()=>le,constants:()=>n,errors:()=>l.jK,getDefaultProvider:()=>ii,logger:()=>zi,providers:()=>i,utils:()=>s,version:()=>Li,wordlists:()=>pe});var f=r(503),c=r(528),u=r(640),l=r(11),d=r(495);const h=new l.Yd(d.i),b={},p=c.O$.from(0),m=c.O$.from(-1);function y(e,t,r,n){const i={fault:t,operation:r};return void 0!==n&&(i.value=n),h.throwError(e,l.Yd.errors.NUMERIC_FAULT,i)}let g="0";for(;g.length<256;)g+=g;function v(e){if("number"!=typeof e)try{e=c.O$.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+g.substring(0,e):h.throwArgumentError("invalid decimal size","decimals",e)}function w(e,t){null==t&&(t=0);const r=v(t),n=(e=c.O$.from(e)).lt(p);n&&(e=e.mul(m));let i=e.mod(r).toString();for(;i.length<r.length-1;)i="0"+i;i=i.match(/^([0-9]*[1-9]|0)(0*)/)[1];const o=e.div(r).toString();return e=1===r.length?o:o+"."+i,n&&(e="-"+e),e}function A(e,t){null==t&&(t=0);const r=v(t);"string"==typeof e&&e.match(/^-?[0-9.]+$/)||h.throwArgumentError("invalid decimal value","value",e);const n="-"===e.substring(0,1);n&&(e=e.substring(1)),"."===e&&h.throwArgumentError("missing value","value",e);const i=e.split(".");i.length>2&&h.throwArgumentError("too many decimal points","value",e);let o=i[0],s=i[1];for(o||(o="0"),s||(s="0");"0"===s[s.length-1];)s=s.substring(0,s.length-1);for(s.length>r.length-1&&y("fractional component exceeds decimals","underflow","parseFixed"),""===s&&(s="0");s.length<r.length-1;)s+="0";const a=c.O$.from(o),f=c.O$.from(s);let u=a.mul(r).add(f);return n&&(u=u.mul(m)),u}class E{constructor(e,t,r,n){e!==b&&h.throwError("cannot use FixedFormat constructor; use FixedFormat.from",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.signed=t,this.width=r,this.decimals=n,this.name=(t?"":"u")+"fixed"+String(r)+"x"+String(n),this._multiplier=v(n),Object.freeze(this)}static from(e){if(e instanceof E)return e;"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,r=128,n=18;if("string"==typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{const i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||h.throwArgumentError("invalid fixed format","format",e),t="u"!==i[1],r=parseInt(i[2]),n=parseInt(i[3])}else if(e){const i=(t,r,n)=>null==e[t]?n:(typeof e[t]!==r&&h.throwArgumentError("invalid fixed format ("+t+" not "+r+")","format."+t,e[t]),e[t]);t=i("signed","boolean",t),r=i("width","number",r),n=i("decimals","number",n)}return r%8&&h.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&h.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new E(b,t,r,n)}}class k{constructor(e,t,r,n){e!==b&&h.throwError("cannot use FixedNumber constructor; use FixedNumber.from",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new FixedFormat"}),this.format=n,this._hex=t,this._value=r,this._isFixedNumber=!0,Object.freeze(this)}_checkFormat(e){this.format.name!==e.format.name&&h.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);const t=A(this._value,this.format.decimals),r=A(e._value,e.format.decimals);return k.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);const t=A(this._value,this.format.decimals),r=A(e._value,e.format.decimals);return k.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);const t=A(this._value,this.format.decimals),r=A(e._value,e.format.decimals);return k.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);const t=A(this._value,this.format.decimals),r=A(e._value,e.format.decimals);return k.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=k.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(T.toFormat(t.format))),t}ceiling(){const e=this.toString().split(".");1===e.length&&e.push("0");let t=k.from(e[0],this.format);const r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(T.toFormat(t.format))),t}round(e){null==e&&(e=0);const t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&h.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;const r=k.from("1"+g.substring(0,e),this.format),n=_.toFormat(this.format);return this.mulUnsafe(r).addUnsafe(n).floor().divUnsafe(r)}isZero(){return"0.0"===this._value||"0"===this._value}isNegative(){return"-"===this._value[0]}toString(){return this._value}toHexString(e){if(null==e)return this._hex;e%8&&h.throwArgumentError("invalid byte width","width",e);const t=c.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,u.$m)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return k.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||(0,c.Zm)(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),k.fromString(w(e,t),E.from(r))}static fromString(e,t){null==t&&(t="fixed");const r=E.from(t),n=A(e,r.decimals);!r.signed&&n.lt(p)&&y("unsigned value cannot be negative","overflow","value",e);let i=null;r.signed?i=n.toTwos(r.width).toHexString():(i=n.toHexString(),i=(0,u.$m)(i,r.width/8));const o=w(n,r.decimals);return new k(b,i,o,r)}static fromBytes(e,t){null==t&&(t="fixed");const r=E.from(t);if((0,u.lE)(e).length>r.width/8)throw new Error("overflow");let n=c.O$.from(e);r.signed&&(n=n.fromTwos(r.width));const i=n.toTwos((r.signed?0:1)+r.width).toHexString(),o=w(n,r.decimals);return new k(b,i,o,r)}static from(e,t){if("string"==typeof e)return k.fromString(e,t);if((0,u._t)(e))return k.fromBytes(e,t);try{return k.fromValue(e,0,t)}catch(e){if(e.code!==l.Yd.errors.INVALID_ARGUMENT)throw e}return h.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!(!e||!e._isFixedNumber)}}const T=k.from(1),_=k.from("0.5");var S=r(327),x=r(549),N=r(772),P=r(256),M=r(222);const R="Ethereum Signed Message:\n";function C(e){return"string"==typeof e&&(e=(0,M.Y0)(e)),(0,P.w)((0,u.zo)([(0,M.Y0)(R),(0,M.Y0)(String(e.length)),e]))}var O=r(221);const I="hash/5.8.0";var B=r(235);const D=new l.Yd(I),F=new Uint8Array(32);F.fill(0);const U=c.O$.from(-1),L=c.O$.from(0),z=c.O$.from(1),G=c.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),j=(0,u.$m)(z.toHexString(),32),Y=(0,u.$m)(L.toHexString(),32),q={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},K=["name","version","chainId","verifyingContract","salt"];function H(e){return function(t){return"string"!=typeof t&&D.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const V={name:H("name"),version:H("version"),chainId:function(e){try{return c.O$.from(e).toString()}catch(e){}return D.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,x.Kn)(e).toLowerCase()}catch(e){}return D.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=(0,u.lE)(e);if(32!==t.length)throw new Error("bad length");return(0,u.Dv)(t)}catch(e){}return D.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function J(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&D.throwArgumentError("invalid numeric width","type",e);const i=G.mask(r?n-1:n),o=r?i.add(z).mul(U):L;return function(t){const r=c.O$.from(t);return(r.lt(o)||r.gt(i))&&D.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),(0,u.$m)(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&D.throwArgumentError("invalid bytes width","type",e),function(t){return(0,u.lE)(t).length!==r&&D.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=(0,u.lE)(e),r=t.length%32;return r?(0,u.xs)([t,F.slice(r)]):(0,u.Dv)(t)}(t)}}}switch(e){case"address":return function(e){return(0,u.$m)((0,x.Kn)(e),32)};case"bool":return function(e){return e?j:Y};case"bytes":return function(e){return(0,P.w)(e)};case"string":return function(e){return(0,B.id)(e)}}return null}function W(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class Q{constructor(e){(0,O.zG)(this,"types",Object.freeze((0,O.p$)(e))),(0,O.zG)(this,"_encoderCache",{}),(0,O.zG)(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const i={};e[n].forEach((o=>{i[o.name]&&D.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(n)}`,"types",e),i[o.name]=!0;const s=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===n&&D.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e),J(s)||(r[s]||D.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",e),r[s].push(n),t[n][s]=!0)}))}const i=Object.keys(r).filter((e=>0===r[e].length));0===i.length?D.throwArgumentError("missing primary type","types",e):i.length>1&&D.throwArgumentError(`ambiguous primary types or unused types: ${i.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,O.zG)(this,"primaryType",i[0]),function i(o,s){s[o]&&D.throwArgumentError(`circular type reference to ${JSON.stringify(o)}`,"types",e),s[o]=!0,Object.keys(t[o]).forEach((e=>{r[e]&&(i(e,s),Object.keys(s).forEach((t=>{n[t][e]=!0})))})),delete s[o]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=W(t,e[t])+r.map((t=>W(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=J(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&D.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(P.w)),(0,P.w)((0,u.xs)(i))}}const r=this.types[e];if(r){const t=(0,B.id)(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?(0,P.w)(n):n}));return n.unshift(t),(0,u.xs)(n)}}return D.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||D.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,P.w)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(J(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&D.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const i=this.types[e];return i?i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{}):D.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new Q(e)}static getPrimaryType(e){return Q.from(e).primaryType}static hashStruct(e,t,r){return Q.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=q[r];n||D.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>K.indexOf(e.name)-K.indexOf(t.name))),Q.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,u.xs)(["0x1901",Q.hashDomain(e),Q.from(t).hash(r)])}static hash(e,t,r){return(0,P.w)(Q.encode(e,t,r))}static resolveNames(e,t,r,n){return i=this,o=void 0,a=function*(){e=(0,O.DC)(e);const i={};e.verifyingContract&&!(0,u.A7)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=Q.from(t);o.visit(r,((e,t)=>("address"!==e||(0,u.A7)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),r=o.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t)),{domain:e,value:r}},new((s=void 0)||(s=Promise))((function(e,t){function r(e){try{f(a.next(e))}catch(e){t(e)}}function n(e){try{f(a.throw(e))}catch(e){t(e)}}function f(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(r,n)}f((a=a.apply(i,o||[])).next())}));var i,o,s,a}static getPayload(e,t,r){Q.hashDomain(e);const n={},i=[];K.forEach((t=>{const r=e[t];null!=r&&(n[t]=V[t](r),i.push({name:t,type:q[t]}))}));const o=Q.from(t),s=(0,O.DC)(t);return s.EIP712Domain?D.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):s.EIP712Domain=i,o.encode(r),{types:s,domain:n,primaryType:o.primaryType,message:o.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,u.Dv)((0,u.lE)(t));if(e.match(/^u?int/))return c.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&D.throwArgumentError("invalid string","value",t),t}return D.throwArgumentError("unsupported type","type",e)}))}}}class X{constructor(e){(0,O.zG)(this,"alphabet",e),(0,O.zG)(this,"base",e.length),(0,O.zG)(this,"_alphabetMap",{}),(0,O.zG)(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=(0,u.lE)(e);if(0===t.length)return"";let r=[0];for(let e=0;e<t.length;++e){let n=t[e];for(let e=0;e<r.length;++e)n+=r[e]<<8,r[e]=n%this.base,n=n/this.base|0;for(;n>0;)r.push(n%this.base),n=n/this.base|0}let n="";for(let e=0;0===t[e]&&e<t.length-1;++e)n+=this._leader;for(let e=r.length-1;e>=0;--e)n+=this.alphabet[r[e]];return n}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r<e.length;r++){let n=this._alphabetMap[e[r]];if(void 0===n)throw new Error("Non-base"+this.base+" character");let i=n;for(let e=0;e<t.length;++e)i+=t[e]*this.base,t[e]=255&i,i>>=8;for(;i>0;)t.push(255&i),i>>=8}for(let r=0;e[r]===this._leader&&r<e.length-1;++r)t.push(0);return(0,u.lE)(new Uint8Array(t.reverse()))}}new X("abcdefghijklmnopqrstuvwxyz234567");const $=new X("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz");var Z,ee=r(485),te=r.n(ee);!function(e){e.sha256="sha256",e.sha512="sha512"}(Z||(Z={}));const re=new l.Yd("sha2/5.8.0");function ne(e){return"0x"+te().ripemd160().update((0,u.lE)(e)).digest("hex")}function ie(e){return"0x"+te().sha256().update((0,u.lE)(e)).digest("hex")}function oe(e){return"0x"+te().sha512().update((0,u.lE)(e)).digest("hex")}function se(e,t,r){return Z[e]||re.throwError("unsupported algorithm "+e,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+te().hmac(te()[e],(0,u.lE)(t)).update((0,u.lE)(r)).digest("hex")}function ae(e,t,r,n,i){let o;e=(0,u.lE)(e),t=(0,u.lE)(t);let s=1;const a=new Uint8Array(n),f=new Uint8Array(t.length+4);let c,l;f.set(t);for(let d=1;d<=s;d++){f[t.length]=d>>24&255,f[t.length+1]=d>>16&255,f[t.length+2]=d>>8&255,f[t.length+3]=255&d;let h=(0,u.lE)(se(i,e,f));o||(o=h.length,l=new Uint8Array(o),s=Math.ceil(n/o),c=n-(s-1)*o),l.set(h);for(let t=1;t<r;t++){h=(0,u.lE)(se(i,e,h));for(let e=0;e<o;e++)l[e]^=h[e]}const b=(d-1)*o,p=d===s?c:o;a.set((0,u.lE)(l).slice(0,p),b)}return(0,u.Dv)(a)}var fe=r(459),ce=r(390);const ue=new l.Yd("wordlists/5.8.0");class le{constructor(e){ue.checkAbstract(new.target,le),(0,O.zG)(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){const t=[];for(let r=0;r<2048;r++){const n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,B.id)(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}let de=null;function he(e){if(null==de&&(de="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==le.check(e)))throw de=null,new Error("BIP39 Wordlist for en (English) FAILED")}const be=new class extends le{constructor(){super("en")}getWord(e){return he(this),de[e]}getWordIndex(e){return he(this),de.indexOf(e)}};le.register(be);const pe={en:be},me=new l.Yd("hdnode/5.8.0"),ye=c.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),ge=(0,M.Y0)("Bitcoin seed"),ve=2147483648;function we(e){return(1<<e)-1<<8-e}function Ae(e){return(0,u.$m)((0,u.Dv)(e),32)}function Ee(e){return $.encode((0,u.zo)([e,(0,u.p3)(ie(ie(e)),0,4)]))}function ke(e){if(null==e)return pe.en;if("string"==typeof e){const t=pe[e];return null==t&&me.throwArgumentError("unknown locale","wordlist",e),t}return e}const Te={},_e="m/44'/60'/0'/0/0";class Se{constructor(e,t,r,n,i,o,s,a){if(e!==Te)throw new Error("HDNode constructor cannot be called directly");if(t){const e=new fe.Et(t);(0,O.zG)(this,"privateKey",e.privateKey),(0,O.zG)(this,"publicKey",e.compressedPublicKey)}else(0,O.zG)(this,"privateKey",null),(0,O.zG)(this,"publicKey",(0,u.Dv)(r));(0,O.zG)(this,"parentFingerprint",n),(0,O.zG)(this,"fingerprint",(0,u.p3)(ne(ie(this.publicKey)),0,4)),(0,O.zG)(this,"address",(0,ce.db)(this.publicKey)),(0,O.zG)(this,"chainCode",i),(0,O.zG)(this,"index",o),(0,O.zG)(this,"depth",s),null==a?((0,O.zG)(this,"mnemonic",null),(0,O.zG)(this,"path",null)):"string"==typeof a?((0,O.zG)(this,"mnemonic",null),(0,O.zG)(this,"path",a)):((0,O.zG)(this,"mnemonic",a),(0,O.zG)(this,"path",a.path))}get extendedKey(){if(this.depth>=256)throw new Error("Depth too large!");return Ee((0,u.zo)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,u.Dv)(this.depth),this.parentFingerprint,(0,u.$m)((0,u.Dv)(this.index),4),this.chainCode,null!=this.privateKey?(0,u.zo)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new Se(Te,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw new Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(e&~ve));const r=new Uint8Array(37);if(e&ve){if(!this.privateKey)throw new Error("cannot derive child of neutered node");r.set((0,u.lE)(this.privateKey),1),t&&(t+="'")}else r.set((0,u.lE)(this.publicKey));for(let t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;const n=(0,u.lE)(se(Z.sha512,this.chainCode,r)),i=n.slice(0,32),o=n.slice(32);let s=null,a=null;this.privateKey?s=Ae(c.O$.from(i).add(this.privateKey).mod(ye)):a=new fe.Et((0,u.Dv)(i))._addPoint(this.publicKey);let f=t;const l=this.mnemonic;return l&&(f=Object.freeze({phrase:l.phrase,path:t,locale:l.locale||"en"})),new Se(Te,s,a,this.fingerprint,Ae(o),e,this.depth+1,f)}derivePath(e){const t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let e=0;e<t.length;e++){const n=t[e];if(n.match(/^[0-9]+'$/)){const e=parseInt(n.substring(0,n.length-1));if(e>=ve)throw new Error("invalid path index - "+n);r=r._derive(ve+e)}else{if(!n.match(/^[0-9]+$/))throw new Error("invalid path component - "+n);{const e=parseInt(n);if(e>=ve)throw new Error("invalid path index - "+n);r=r._derive(e)}}}return r}static _fromSeed(e,t){const r=(0,u.lE)(e);if(r.length<16||r.length>64)throw new Error("invalid seed");const n=(0,u.lE)(se(Z.sha512,ge,r));return new Se(Te,Ae(n.slice(0,32)),null,"0x00000000",Ae(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=Pe(Ne(e,r=ke(r)),r),Se._fromSeed(xe(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return Se._fromSeed(e,null)}static fromExtendedKey(e){const t=$.decode(e);82===t.length&&Ee(t.slice(0,78))===e||me.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");const r=t[4],n=(0,u.Dv)(t.slice(5,9)),i=parseInt((0,u.Dv)(t.slice(9,13)).substring(2),16),o=(0,u.Dv)(t.slice(13,45)),s=t.slice(45,78);switch((0,u.Dv)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new Se(Te,null,(0,u.Dv)(s),n,o,i,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==s[0])break;return new Se(Te,(0,u.Dv)(s.slice(1)),null,n,o,i,r,null)}return me.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function xe(e,t){t||(t="");const r=(0,M.Y0)("mnemonic"+t,M.Uj.NFKD);return ae((0,M.Y0)(e,M.Uj.NFKD),r,2048,64,"sha512")}function Ne(e,t){t=ke(t),me.checkNormalize();const r=t.split(e);if(r.length%3!=0)throw new Error("invalid mnemonic");const n=(0,u.lE)(new Uint8Array(Math.ceil(11*r.length/8)));let i=0;for(let e=0;e<r.length;e++){let o=t.getWordIndex(r[e].normalize("NFKD"));if(-1===o)throw new Error("invalid mnemonic");for(let e=0;e<11;e++)o&1<<10-e&&(n[i>>3]|=1<<7-i%8),i++}const o=32*r.length/3,s=we(r.length/3);if(((0,u.lE)(ie(n.slice(0,o/8)))[0]&s)!=(n[n.length-1]&s))throw new Error("invalid checksum");return(0,u.Dv)(n.slice(0,o/8))}function Pe(e,t){if(t=ke(t),(e=(0,u.lE)(e)).length%4!=0||e.length<16||e.length>32)throw new Error("invalid entropy");const r=[0];let n=11;for(let t=0;t<e.length;t++)n>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],n-=8):(r[r.length-1]<<=n,r[r.length-1]|=e[t]>>8-n,r.push(e[t]&(1<<8-n)-1),n+=3);const i=e.length/4,o=(0,u.lE)(ie(e))[0]&we(i);return r[r.length-1]<<=i,r[r.length-1]|=o>>8-i,t.join(r.map((e=>t.getWord(e))))}function Me(e,t){try{return Ne(e,t),!0}catch(e){}return!1}function Re(e){return("number"!=typeof e||e<0||e>=ve||e%1)&&me.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}const Ce=new l.Yd("random/5.8.0"),Oe=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}();let Ie=Oe.crypto||Oe.msCrypto;function Be(e){(e<=0||e>1024||e%1||e!=e)&&Ce.throwArgumentError("invalid length","length",e);const t=new Uint8Array(e);return Ie.getRandomValues(t),(0,u.lE)(t)}Ie&&Ie.getRandomValues||(Ce.warn("WARNING: Missing strong random number source"),Ie={getRandomValues:function(e){return Ce.throwError("no secure random source avaialble",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}});var De=r(202),Fe=r.n(De),Ue=r(689),Le=r.n(Ue);function ze(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,u.lE)(e)}function Ge(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}function je(e){return"string"==typeof e?(0,M.Y0)(e,M.Uj.NFKC):(0,u.lE)(e)}function Ye(e,t){let r=e;const n=t.toLowerCase().split("/");for(let e=0;e<n.length;e++){let t=null;for(const i in r)if(i.toLowerCase()===n[e]){t=r[i];break}if(null===t)return null;r=t}return r}function qe(e){const t=(0,u.lE)(e);t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=(0,u.Dv)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}const Ke="json-wallets/5.8.0";const He=new l.Yd(Ke);function Ve(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}class Je extends O.dk{isKeystoreAccount(e){return!(!e||!e._isKeystoreAccount)}}function We(e,t){const r=ze(Ye(e,"crypto/ciphertext"));if((0,u.Dv)((0,P.w)((0,u.zo)([t.slice(16,32),r]))).substring(2)!==Ye(e,"crypto/mac").toLowerCase())throw new Error("invalid password");const n=function(e,t,r){if("aes-128-ctr"===Ye(e,"crypto/cipher")){const n=ze(Ye(e,"crypto/cipherparams/iv")),i=new(Fe().Counter)(n),o=new(Fe().ModeOfOperation.ctr)(t,i);return(0,u.lE)(o.decrypt(r))}return null}(e,t.slice(0,16),r);n||He.throwError("unsupported cipher",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});const i=t.slice(32,64),o=(0,ce.db)(n);if(e.address){let t=e.address.toLowerCase();if("0x"!==t.substring(0,2)&&(t="0x"+t),(0,x.Kn)(t)!==o)throw new Error("address mismatch")}const s={_isKeystoreAccount:!0,address:o,privateKey:(0,u.Dv)(n)};if("0.1"===Ye(e,"x-ethers/version")){const t=ze(Ye(e,"x-ethers/mnemonicCiphertext")),r=ze(Ye(e,"x-ethers/mnemonicCounter")),n=new(Fe().Counter)(r),o=new(Fe().ModeOfOperation.ctr)(i,n),a=Ye(e,"x-ethers/path")||_e,f=Ye(e,"x-ethers/locale")||"en",c=(0,u.lE)(o.decrypt(t));try{const e=Pe(c,f),t=Se.fromMnemonic(e,null,f).derivePath(a);if(t.privateKey!=s.privateKey)throw new Error("mnemonic mismatch");s.mnemonic=t.mnemonic}catch(e){if(e.code!==l.Yd.errors.INVALID_ARGUMENT||"wordlist"!==e.argument)throw e}}return new Je(s)}function Qe(e,t,r,n,i){return(0,u.lE)(ae(e,t,r,n,i))}function Xe(e,t,r,n,i){return Promise.resolve(Qe(e,t,r,n,i))}function $e(e,t,r,n,i){const o=je(t),s=Ye(e,"crypto/kdf");if(s&&"string"==typeof s){const t=function(e,t){return He.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===s.toLowerCase()){const r=ze(Ye(e,"crypto/kdfparams/salt")),a=parseInt(Ye(e,"crypto/kdfparams/n")),f=parseInt(Ye(e,"crypto/kdfparams/r")),c=parseInt(Ye(e,"crypto/kdfparams/p"));a&&f&&c||t("kdf",s),0!=(a&a-1)&&t("N",a);const u=parseInt(Ye(e,"crypto/kdfparams/dklen"));return 32!==u&&t("dklen",u),n(o,r,a,f,c,64,i)}if("pbkdf2"===s.toLowerCase()){const n=ze(Ye(e,"crypto/kdfparams/salt"));let i=null;const s=Ye(e,"crypto/kdfparams/prf");"hmac-sha256"===s?i="sha256":"hmac-sha512"===s?i="sha512":t("prf",s);const a=parseInt(Ye(e,"crypto/kdfparams/c")),f=parseInt(Ye(e,"crypto/kdfparams/dklen"));return 32!==f&&t("dklen",f),r(o,n,a,f,i)}}return He.throwArgumentError("unsupported key-derivation function","kdf",s)}const Ze=new l.Yd(Ke);class et extends O.dk{isCrowdsaleAccount(e){return!(!e||!e._isCrowdsaleAccount)}}function tt(e,t){const r=JSON.parse(e);t=je(t);const n=(0,x.Kn)(Ye(r,"ethaddr")),i=ze(Ye(r,"encseed"));i&&i.length%16==0||Ze.throwArgumentError("invalid encseed","json",e);const o=(0,u.lE)(ae(t,t,2e3,32,"sha256")).slice(0,16),s=i.slice(0,16),a=i.slice(16),f=new(Fe().ModeOfOperation.cbc)(o,s),c=Fe().padding.pkcs7.strip((0,u.lE)(f.decrypt(a)));let l="";for(let e=0;e<c.length;e++)l+=String.fromCharCode(c[e]);const d=(0,M.Y0)(l),h=(0,P.w)(d);return new et({_isCrowdsaleAccount:!0,address:n,privateKey:h})}function rt(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}function nt(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}function it(e){if(rt(e))try{return(0,x.Kn)(JSON.parse(e).ethaddr)}catch(e){return null}if(nt(e))try{return(0,x.Kn)(JSON.parse(e).address)}catch(e){return null}return null}function ot(e,t,r){if(rt(e)){r&&r(0);const n=tt(e,t);return r&&r(1),Promise.resolve(n)}return nt(e)?function(e,t,r){return n=this,i=void 0,s=function*(){const n=JSON.parse(e);return We(n,yield $e(n,t,Xe,Le().scrypt,r))},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{f(s.next(e))}catch(e){t(e)}}function a(e){try{f(s.throw(e))}catch(e){t(e)}}function f(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(r,a)}f((s=s.apply(n,i||[])).next())}));var n,i,o,s}(e,t,r):Promise.reject(new Error("invalid JSON wallet"))}var st=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};const at=new l.Yd("wallet/5.8.0");class ft extends S.E{constructor(e,t){if(super(),null!=(r=e)&&(0,u.A7)(r.privateKey,32)&&null!=r.address){const t=new fe.Et(e.privateKey);if((0,O.zG)(this,"_signingKey",(()=>t)),(0,O.zG)(this,"address",(0,ce.db)(this.publicKey)),this.address!==(0,x.Kn)(e.address)&&at.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){const t=e.mnemonic;return t&&t.phrase}(e)){const t=e.mnemonic;(0,O.zG)(this,"_mnemonic",(()=>({phrase:t.phrase,path:t.path||_e,locale:t.locale||"en"})));const r=this.mnemonic,n=Se.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,ce.db)(n.privateKey)!==this.address&&at.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,O.zG)(this,"_mnemonic",(()=>null))}else{if(fe.Et.isSigningKey(e))"secp256k1"!==e.curve&&at.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,O.zG)(this,"_signingKey",(()=>e));else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);const t=new fe.Et(e);(0,O.zG)(this,"_signingKey",(()=>t))}(0,O.zG)(this,"_mnemonic",(()=>null)),(0,O.zG)(this,"address",(0,ce.db)(this.publicKey))}var r;t&&!N.zt.isProvider(t)&&at.throwArgumentError("invalid provider","provider",t),(0,O.zG)(this,"provider",t||null)}get mnemonic(){return this._mnemonic()}get privateKey(){return this._signingKey().privateKey}get publicKey(){return this._signingKey().publicKey}getAddress(){return Promise.resolve(this.address)}connect(e){return new ft(this,e)}signTransaction(e){return(0,O.mE)(e).then((t=>{null!=t.from&&((0,x.Kn)(t.from)!==this.address&&at.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);const r=this._signingKey().signDigest((0,P.w)((0,ce.qC)(t)));return(0,ce.qC)(t,r)}))}signMessage(e){return st(this,void 0,void 0,(function*(){return(0,u.gV)(this._signingKey().signDigest(C(e)))}))}_signTypedData(e,t,r){return st(this,void 0,void 0,(function*(){const n=yield Q.resolveNames(e,t,r,(e=>(null==this.provider&&at.throwError("cannot resolve ENS names without a provider",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e))));return(0,u.gV)(this._signingKey().signDigest(Q.hash(n.domain,t,n.value)))}))}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback");return t||(t={}),function(e,t,r,n){try{if((0,x.Kn)(e.address)!==(0,ce.db)(e.privateKey))throw new Error("address/privateKey mismatch");if(Ve(e)){const t=e.mnemonic;if(Se.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||_e).privateKey!=e.privateKey)throw new Error("mnemonic mismatch")}}catch(e){return Promise.reject(e)}"function"!=typeof r||n||(n=r,r={}),r||(r={});const i=(0,u.lE)(e.privateKey),o=je(t);let s=null,a=null,f=null;if(Ve(e)){const t=e.mnemonic;s=(0,u.lE)(Ne(t.phrase,t.locale||"en")),a=t.path||_e,f=t.locale||"en"}let c=r.client;c||(c="ethers.js");let l=null;l=r.salt?(0,u.lE)(r.salt):Be(32);let d=null;if(r.iv){if(d=(0,u.lE)(r.iv),16!==d.length)throw new Error("invalid iv")}else d=Be(16);let h=null;if(r.uuid){if(h=(0,u.lE)(r.uuid),16!==h.length)throw new Error("invalid uuid")}else h=Be(16);let b=1<<17,p=8,m=1;return r.scrypt&&(r.scrypt.N&&(b=r.scrypt.N),r.scrypt.r&&(p=r.scrypt.r),r.scrypt.p&&(m=r.scrypt.p)),Le().scrypt(o,l,b,p,m,64,n).then((t=>{const r=(t=(0,u.lE)(t)).slice(0,16),n=t.slice(16,32),o=t.slice(32,64),y=new(Fe().Counter)(d),g=new(Fe().ModeOfOperation.ctr)(r,y),v=(0,u.lE)(g.encrypt(i)),w=(0,P.w)((0,u.zo)([n,v])),A={address:e.address.substring(2).toLowerCase(),id:qe(h),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,u.Dv)(d).substring(2)},ciphertext:(0,u.Dv)(v).substring(2),kdf:"scrypt",kdfparams:{salt:(0,u.Dv)(l).substring(2),n:b,dklen:32,p:m,r:p},mac:w.substring(2)}};if(s){const e=Be(16),t=new(Fe().Counter)(e),r=new(Fe().ModeOfOperation.ctr)(o,t),n=(0,u.lE)(r.encrypt(s)),i=new Date,l=i.getUTCFullYear()+"-"+Ge(i.getUTCMonth()+1,2)+"-"+Ge(i.getUTCDate(),2)+"T"+Ge(i.getUTCHours(),2)+"-"+Ge(i.getUTCMinutes(),2)+"-"+Ge(i.getUTCSeconds(),2)+".0Z";A["x-ethers"]={client:c,gethFilename:"UTC--"+l+"--"+A.address,mnemonicCounter:(0,u.Dv)(e).substring(2),mnemonicCiphertext:(0,u.Dv)(n).substring(2),path:a,locale:f,version:"0.1"}}return JSON.stringify(A)}))}(this,e,t,r)}static createRandom(e){let t=Be(16);e||(e={}),e.extraEntropy&&(t=(0,u.lE)((0,u.p3)((0,P.w)((0,u.zo)([t,e.extraEntropy])),0,16)));const r=Pe(t,e.locale);return ft.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return ot(e,t,r).then((e=>new ft(e)))}static fromEncryptedJsonSync(e,t){return new ft(function(e,t){if(rt(e))return tt(e,t);if(nt(e))return function(e,t){const r=JSON.parse(e);return We(r,$e(r,t,Qe,Le().syncScrypt))}(e,t);throw new Error("invalid JSON wallet")}(e,t))}static fromMnemonic(e,t,r){return t||(t=_e),new ft(Se.fromMnemonic(e,null,r).derivePath(t))}}function ct(e,t){return(0,ce.RJ)(C(e),t)}function ut(e,t,r,n){return(0,ce.RJ)(Q.hash(e,t,r),n)}const lt="0x0000000000000000000000000000000000000000";var dt=r(711);const ht="0x0000000000000000000000000000000000000000000000000000000000000000",bt="Ξ",pt=new l.Yd("networks/5.8.0");function mt(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const i=["goerli","ropsten","rinkeby","sepolia"];try{const o=new t.PocketProvider(e,r.pocket);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const i=["ropsten"],o=new t.AnkrProvider(e,r.ankr);o.network&&-1===i.indexOf(o.network.name)&&n.push(o)}catch(e){}if(t.QuickNodeProvider&&"-"!==r.quicknode)try{n.push(new t.QuickNodeProvider(e,r.quicknode))}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let i=1;return null!=r.quorum?i=r.quorum:"homestead"===e&&(i=2),new t.FallbackProvider(n,i)}return n[0]};return t.renetwork=function(e){return mt(e)},t}function yt(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return yt(e,t)},r}const gt={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:mt("homestead")},vt={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:mt("ropsten")},wt={chainId:63,name:"classicMordor",_defaultProvider:yt("https://www.ethercluster.com/mordor","classicMordor")},At={unspecified:{chainId:0,name:"unspecified"},homestead:gt,mainnet:gt,morden:{chainId:2,name:"morden"},ropsten:vt,testnet:vt,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:mt("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:mt("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:mt("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"sepolia",_defaultProvider:mt("sepolia")},holesky:{chainId:17e3,name:"holesky",_defaultProvider:mt("holesky")},classic:{chainId:61,name:"classic",_defaultProvider:yt("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:wt,classicTestnet:wt,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:yt("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:mt("matic")},maticmum:{chainId:80001,name:"maticmum",_defaultProvider:mt("maticmum")},optimism:{chainId:10,name:"optimism",_defaultProvider:mt("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},"optimism-sepolia":{chainId:11155420,name:"optimism-sepolia"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},"arbitrum-sepolia":{chainId:421614,name:"arbitrum-sepolia"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function Et(e){if(null==e)return null;if("number"==typeof e){for(const t in At){const r=At[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=At[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=At[e.name];if(!t)return"number"!=typeof e.chainId&&pt.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&pt.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var n;return null==r&&t._defaultProvider&&(r=(n=t._defaultProvider)&&"function"==typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}function kt(e){e=atob(e);const t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return(0,u.lE)(t)}function Tt(e){e=(0,u.lE)(e);let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function _t(e,t){null==t&&(t=1);const r=[],n=r.forEach,i=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?i(e,t-1):r.push(e)}))};return i(e,t),r}function St(e){return 1&e?~e>>1:e>>1}function xt(e,t){let r=Array(e);for(let n=0,i=-1;n<e;n++)r[n]=i+=1+t();return r}function Nt(e,t){let r=Array(e);for(let n=0,i=0;n<e;n++)r[n]=i+=St(t());return r}function Pt(e,t){let r=xt(e(),e),n=e(),i=xt(n,e),o=function(e,t){let r=Array(e);for(let n=0;n<e;n++)r[n]=1+t();return r}(n,e);for(let e=0;e<n;e++)for(let t=0;t<o[e];t++)r.push(i[e]+t);return t?r.map((e=>t[e])):r}function Mt(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let i=0;i<t;i++)Nt(e,r).forEach(((e,t)=>n[t].push(e)));return n}function Rt(e,t){let r=1+t(),n=t(),i=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return _t(Mt(i.length,1+e,t).map(((e,t)=>{const o=e[0],s=e.slice(1);return Array(i[t]).fill(void 0).map(((e,t)=>{let i=t*n;return[o+t*r,s.map((e=>e+i))]}))})))}function Ct(e,t){return Mt(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const Ot=function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e<n;e++)o.push(i+=r());let s=r(),a=t;t+=s;let f=0,c=0;function u(){return 0==f&&(c=c<<8|e[t++],f=8),c>>--f&1}const l=Math.pow(2,31),d=l>>>1,h=d>>1,b=l-1;let p=0;for(let e=0;e<31;e++)p=p<<1|u();let m=[],y=0,g=l;for(;;){let e=Math.floor(((p-y+1)*i-1)/g),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<o[n]?r=n:t=n}if(0==t)break;m.push(t);let s=y+Math.floor(g*o[t]/i),a=y+Math.floor(g*o[t+1]/i)-1;for(;0==((s^a)&d);)p=p<<1&b|u(),s=s<<1&b,a=a<<1&b|1;for(;s&~a&h;)p=p&d|p<<1&b>>>1|u(),s=s<<1^d,a=(a^d)<<1|d|1;y=s,g=1+a-s}let v=n-4;return m.map((t=>{switch(t-v){case 3:return v+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return v+256+(e[a++]<<8|e[a++]);case 1:return v+e[a++];default:return t-1}}))}(kt("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))),It=new Set(Pt(Ot)),Bt=new Set(Pt(Ot)),Dt=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(Rt(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(Ct(r,e))}return function(e){const t={};for(let r=0;r<e.length;r++){const n=e[r];t[n[0]]=n[1]}return t}(_t(t))}(Ot),Ft=function(e){let t=Pt(e).sort(((e,t)=>e-t));return function r(){let n=[];for(;;){let i=Pt(e,t);if(0==i.length)break;n.push({set:new Set(i),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let i=e(),o=i%3;i=i/3|0;let s=!!(1&i);return i>>=1,{branches:n,valid:o,fe0f:s,save:1==i,check:2==i}}()}(Ot),Ut=45,Lt=95;function zt(e){return(0,M.XL)(e)}function Gt(e){return e.filter((e=>65039!=e))}function jt(e){for(let t of e.split(".")){let e=zt(t);try{for(let t=e.lastIndexOf(Lt)-1;t>=0;t--)if(e[t]!==Lt)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===Ut&&e[3]===Ut)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function Yt(e,t){var r;let n,i,o=Ft,s=[],a=e.length;for(t&&(t.length=0);a;){let f=e[--a];if(o=null===(r=o.branches.find((e=>e.set.has(f))))||void 0===r?void 0:r.node,!o)break;if(o.save)i=f;else if(o.check&&f===i)break;s.push(f),o.fe0f&&(s.push(65039),a>0&&65039==e[a-1]&&a--),o.valid&&(n=s.slice(),2==o.valid&&n.splice(1,1),t&&t.push(...e.slice(a).reverse()),e.length=a)}return n}const qt=new l.Yd(I),Kt=new Uint8Array(32);function Ht(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function Vt(e){const t=(0,M.Y0)(function(e){return jt(function(e,t){let r=zt(e).reverse(),n=[];for(;r.length;){let e=Yt(r);if(e){n.push(...t(e));continue}let i=r.pop();if(It.has(i)){n.push(i);continue}if(Bt.has(i))continue;let o=Dt[i];if(!o)throw new Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`);n.push(...o)}return jt(String.fromCodePoint(...n).normalize("NFC"))}(e,Gt))}(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++)46===t[e]&&(r.push(Ht(t.slice(n,e))),n=e+1);if(n>=t.length)throw new Error("invalid ENS name; empty component");return r.push(Ht(t.slice(n))),r}function Jt(e){try{return 0!==Vt(e).length}catch(e){}return!1}function Wt(e){"string"!=typeof e&&qt.throwArgumentError("invalid ENS name; not a string","name",e);let t=Kt;const r=Vt(e);for(;r.length;)t=(0,P.w)((0,u.zo)([t,(0,P.w)(r.pop())]));return(0,u.Dv)(t)}function Qt(e){return(0,u.Dv)((0,u.zo)(Vt(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}Kt.fill(0);var Xt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};function $t(e,t){return Xt(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),i=yield n.arrayBuffer(),o={};return n.headers.forEach?n.headers.forEach(((e,t)=>{o[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{o[e.toLowerCase()]=n.headers.get(e)})),{headers:o,statusCode:n.status,statusMessage:n.statusText,body:(0,u.lE)(new Uint8Array(i))}}))}var Zt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};const er=new l.Yd("web/5.8.0");function tr(e){return new Promise((t=>{setTimeout(t,e)}))}function rr(e,t){if(null==e)return null;if("string"==typeof e)return e;if((0,u.Zq)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,M.ZN)(e)}catch(e){}return(0,u.Dv)(e)}return e}function nr(e,t,r){const n="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;er.assertArgument(n>0&&n%1==0,"invalid connection throttle limit","connection.throttleLimit",n);const i="object"==typeof e?e.throttleCallback:null,o="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;er.assertArgument(o>0&&o%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",o);const s="object"==typeof e&&!!e.errorPassThrough,a={};let f=null;const c={method:"GET"};let u=!1,d=12e4;if("string"==typeof e)f=e;else if("object"==typeof e){if(null!=e&&null!=e.url||er.throwArgumentError("missing URL","connection.url",e),f=e.url,"number"==typeof e.timeout&&e.timeout>0&&(d=e.timeout),e.headers)for(const t in e.headers)a[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(u=!0);if(c.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==f.substring(0,6)&&!0!==e.allowInsecureAuthentication&&er.throwError("basic authentication requires a secure https url",l.Yd.errors.INVALID_ARGUMENT,{argument:"url",url:f,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;a.authorization={key:"Authorization",value:"Basic "+Tt((0,M.Y0)(t))}}null!=e.skipFetchSetup&&(c.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(c.fetchOptions=(0,O.DC)(e.fetchOptions))}const h=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),b=f?f.match(h):null;if(b)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":b[1]||"text/plain"},body:b[2]?kt(b[3]):(p=b[3],(0,M.Y0)(p.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){er.throwError("processing response error",l.Yd.errors.SERVER_ERROR,{body:rr(b[1],b[2]),error:e,requestBody:null,requestMethod:"GET",url:f})}var p;t&&(c.method="POST",c.body=t,null==a["content-type"]&&(a["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==a["content-length"]&&(a["content-length"]={key:"Content-Length",value:String(t.length)}));const m={};Object.keys(a).forEach((e=>{const t=a[e];m[t.key]=t.value})),c.headers=m;const y=function(){let e=null;return{promise:new Promise((function(t,r){d&&(e=setTimeout((()=>{null!=e&&(e=null,r(er.makeError("timeout",l.Yd.errors.TIMEOUT,{requestBody:rr(c.body,m["content-type"]),requestMethod:c.method,timeout:d,url:f})))}),d))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),g=function(){return Zt(this,void 0,void 0,(function*(){for(let e=0;e<n;e++){let t=null;try{if(t=yield $t(f,c),e<n)if(301===t.statusCode||302===t.statusCode){const e=t.headers.location||"";if("GET"===c.method&&e.match(/^https:/)){f=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(i&&(r=yield i(e,f)),r){let r=0;const n=t.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):o*parseInt(String(Math.random()*Math.pow(2,e))),yield tr(r);continue}}}catch(e){t=e.response,null==t&&(y.cancel(),er.throwError("missing response",l.Yd.errors.SERVER_ERROR,{requestBody:rr(c.body,m["content-type"]),requestMethod:c.method,serverError:e,url:f}))}let a=t.body;if(u&&304===t.statusCode?a=null:!s&&(t.statusCode<200||t.statusCode>=300)&&(y.cancel(),er.throwError("bad response",l.Yd.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:rr(a,t.headers?t.headers["content-type"]:null),requestBody:rr(c.body,m["content-type"]),requestMethod:c.method,url:f})),r)try{const e=yield r(a,t);return y.cancel(),e}catch(r){if(r.throttleRetry&&e<n){let t=!0;if(i&&(t=yield i(e,f)),t){const t=o*parseInt(String(Math.random()*Math.pow(2,e)));yield tr(t);continue}}y.cancel(),er.throwError("processing response error",l.Yd.errors.SERVER_ERROR,{body:rr(a,t.headers?t.headers["content-type"]:null),error:r,requestBody:rr(c.body,m["content-type"]),requestMethod:c.method,url:f})}return y.cancel(),a}return er.throwError("failed response",l.Yd.errors.SERVER_ERROR,{requestBody:rr(c.body,m["content-type"]),requestMethod:c.method,url:f})}))}();return Promise.race([y.promise,g])}function ir(e,t,r){let n=null;if(null!=t){n=(0,M.Y0)(t);const r="string"==typeof e?{url:e}:(0,O.DC)(e);r.headers?0!==Object.keys(r.headers).filter((e=>"content-type"===e.toLowerCase())).length||(r.headers=(0,O.DC)(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},e=r}return nr(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse((0,M.ZN)(e))}catch(t){er.throwError("invalid JSON",l.Yd.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function or(e,t){return t||(t={}),null==(t=(0,O.DC)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let i=null,o=!1;const s=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout((()=>{s()&&n(new Error("timeout"))}),t.timeout));const a=t.retryLimit;let f=0;!function i(){return e().then((function(e){if(void 0!==e)s()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",i);else if(t.onceBlock)t.onceBlock.once("block",i);else if(!o){if(f++,f>a)return void(s()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,f)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null}),(function(e){s()&&n(e)}))}()}))}var sr=r(273),ar=r.n(sr);const fr="providers/5.8.0",cr=new l.Yd(fr);class ur{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){const e={},t=this.address.bind(this),r=this.bigNumber.bind(this),n=this.blockTag.bind(this),i=this.data.bind(this),o=this.hash.bind(this),s=this.hex.bind(this),a=this.number.bind(this),f=this.type.bind(this);return e.transaction={hash:o,type:f,accessList:ur.allowNull(this.accessList.bind(this),null),blockHash:ur.allowNull(o,null),blockNumber:ur.allowNull(a,null),transactionIndex:ur.allowNull(a,null),confirmations:ur.allowNull(a,null),from:t,gasPrice:ur.allowNull(r),maxPriorityFeePerGas:ur.allowNull(r),maxFeePerGas:ur.allowNull(r),gasLimit:r,to:ur.allowNull(t,null),value:r,nonce:a,data:i,r:ur.allowNull(this.uint256),s:ur.allowNull(this.uint256),v:ur.allowNull(a),creates:ur.allowNull(t,null),raw:ur.allowNull(i)},e.transactionRequest={from:ur.allowNull(t),nonce:ur.allowNull(a),gasLimit:ur.allowNull(r),gasPrice:ur.allowNull(r),maxPriorityFeePerGas:ur.allowNull(r),maxFeePerGas:ur.allowNull(r),to:ur.allowNull(t),value:ur.allowNull(r),data:ur.allowNull((e=>this.data(e,!0))),type:ur.allowNull(a),accessList:ur.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:a,blockNumber:a,transactionHash:o,address:t,topics:ur.arrayOf(o),data:i,logIndex:a,blockHash:o},e.receipt={to:ur.allowNull(this.address,null),from:ur.allowNull(this.address,null),contractAddress:ur.allowNull(t,null),transactionIndex:a,root:ur.allowNull(s),gasUsed:r,logsBloom:ur.allowNull(i),blockHash:o,transactionHash:o,logs:ur.arrayOf(this.receiptLog.bind(this)),blockNumber:a,confirmations:ur.allowNull(a,null),cumulativeGasUsed:r,effectiveGasPrice:ur.allowNull(r),status:ur.allowNull(a),type:f},e.block={hash:ur.allowNull(o),parentHash:o,number:a,timestamp:a,nonce:ur.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:ur.allowNull(t),extraData:i,transactions:ur.allowNull(ur.arrayOf(o)),baseFeePerGas:ur.allowNull(r)},e.blockWithTransactions=(0,O.DC)(e.block),e.blockWithTransactions.transactions=ur.allowNull(ur.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:ur.allowNull(n,void 0),toBlock:ur.allowNull(n,void 0),blockHash:ur.allowNull(o,void 0),address:ur.allowNull(t,void 0),topics:ur.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:ur.allowNull(a),blockHash:ur.allowNull(o),transactionIndex:a,removed:ur.allowNull(this.boolean.bind(this)),address:t,data:ur.allowFalsish(i,"0x"),topics:ur.arrayOf(o),transactionHash:o,logIndex:a},e}accessList(e){return(0,ce.z7)(e||[])}number(e){return"0x"===e?0:c.O$.from(e).toNumber()}type(e){return"0x"===e||null==e?0:c.O$.from(e).toNumber()}bigNumber(e){return c.O$.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;if("false"===e)return!1}throw new Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,u.A7)(e))?e.toLowerCase():cr.throwArgumentError("invalid hash","value",e)}data(e,t){const r=this.hex(e,t);if(r.length%2!=0)throw new Error("invalid data; odd-length - "+e);return r}address(e){return(0,x.Kn)(e)}callAddress(e){if(!(0,u.A7)(e,32))return null;const t=(0,x.Kn)((0,u.p3)(e,12));return t===lt?null:t}contractAddress(e){return(0,x.CR)(e)}blockTag(e){if(null==e)return"latest";if("earliest"===e)return"0x0";switch(e){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return e}if("number"==typeof e||(0,u.A7)(e))return(0,u.$P)(e);throw new Error("invalid blockTag")}hash(e,t){const r=this.hex(e,t);return 32!==(0,u.E1)(r)?cr.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;const t=c.O$.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!(0,u.A7)(e))throw new Error("invalid uint256");return(0,u.$m)(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);const r=null!=e._difficulty?e._difficulty:e.difficulty,n=ur.check(t,e);return n._difficulty=null==r?null:c.O$.from(r),n}block(e){return this._block(e,this.formats.block)}blockWithTransactions(e){return this._block(e,this.formats.blockWithTransactions)}transactionRequest(e){return ur.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&c.O$.from(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=this.contractAddress(e)),1!==e.type&&2!==e.type||null!=e.accessList||(e.accessList=[]);const t=ur.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;(0,u.A7)(r)&&(r=c.O$.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),(0,u.A7)(r)&&(r=c.O$.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&(r=(t.v-35)/2,r<0&&(r=0),r=parseInt(r)),"number"!=typeof r&&(r=0),t.chainId=r}return t.blockHash&&"x"===t.blockHash.replace(/0/g,"")&&(t.blockHash=null),t}transaction(e){return(0,ce.Qc)(e)}receiptLog(e){return ur.check(this.formats.receiptLog,e)}receipt(e){const t=ur.check(this.formats.receipt,e);if(null!=t.root)if(t.root.length<=4){const e=c.O$.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&cr.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):cr.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&cr.throwArgumentError("invalid root hash","value.root",t.root);return null!=t.status&&(t.byzantium=!0),t}topics(e){return Array.isArray(e)?e.map((e=>this.topics(e))):null!=e?this.hash(e,!0):null}filter(e){return ur.check(this.formats.filter,e)}filterLog(e){return ur.check(this.formats.filterLog,e)}static check(e,t){const r={};for(const n in e)try{const i=e[n](t[n]);void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}static allowNull(e,t){return function(r){return null==r?t:e(r)}}static allowFalsish(e,t){return function(r){return r?e(r):t}}static arrayOf(e){return function(t){if(!Array.isArray(t))throw new Error("not an array");const r=[];return t.forEach((function(t){r.push(e(t))})),r}}}function lr(e){return e&&"function"==typeof e.isCommunityResource}function dr(e){return lr(e)&&e.isCommunityResource()}let hr=!1;function br(){hr||(hr=!0,console.log("========= NOTICE ========="),console.log("Request-Rate Exceeded (this message will not be repeated)"),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.io/api-keys/"),console.log("=========================="))}var pr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};const mr=new l.Yd(fr);function yr(e){return null==e?"null":(32!==(0,u.E1)(e)&&mr.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function gr(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map((e=>{if(Array.isArray(e)){const t={};e.forEach((e=>{t[yr(e)]=!0}));const r=Object.keys(t);return r.sort(),r.join("|")}return yr(e)})).join("&")}function vr(e){if("string"==typeof e){if(e=e.toLowerCase(),32===(0,u.E1)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter:*:"+gr(e);if(N.Sg.isForkEvent(e))throw mr.warn("not implemented"),new Error("not implemented");if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+gr(e.topics||[])}throw new Error("invalid event - "+e)}function wr(){return(new Date).getTime()}function Ar(e){return new Promise((t=>{setTimeout(t,e)}))}const Er=["block","network","pending","poll"];class kr{constructor(e,t,r){(0,O.zG)(this,"tag",e),(0,O.zG)(this,"listener",t),(0,O.zG)(this,"once",r),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){const e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){const e=this.tag.split(":");if("filter"!==e[0])return null;const t=e[1],r=""===(n=e[2])?[]:n.split(/&/g).map((e=>{if(""===e)return[];const t=e.split("|").map((e=>"null"===e?null:e));return 1===t.length?t[0]:t}));var n;const i={};return r.length>0&&(i.topics=r),t&&"*"!==t&&(i.address=t),i}pollable(){return this.tag.indexOf(":")>=0||Er.indexOf(this.tag)>=0}}const Tr={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function _r(e){return(0,u.$m)(c.O$.from(e).toHexString(),32)}function Sr(e){return $.encode((0,u.zo)([e,(0,u.p3)(ie(ie(e)),0,4)]))}const xr=new RegExp("^(ipfs)://(.*)$","i"),Nr=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),xr,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function Pr(e,t){try{return(0,M.ZN)(Mr(e,t))}catch(e){}return null}function Mr(e,t){if("0x"===e)return null;const r=c.O$.from((0,u.p3)(e,t,t+32)).toNumber(),n=c.O$.from((0,u.p3)(e,r,r+32)).toNumber();return(0,u.p3)(e,r+32,r+32+n)}function Rr(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):mr.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function Cr(e){const t=(0,u.lE)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function Or(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}function Ir(e){const t=[];let r=0;for(let n=0;n<e.length;n++)t.push(null),r+=32;for(let n=0;n<e.length;n++){const i=(0,u.lE)(e[n]);t[n]=Cr(r),t.push(Cr(i.length)),t.push(Or(i)),r+=32+32*Math.ceil(i.length/32)}return(0,u.xs)(t)}class Br{constructor(e,t,r,n){(0,O.zG)(this,"provider",e),(0,O.zG)(this,"name",r),(0,O.zG)(this,"address",e.formatter.address(t)),(0,O.zG)(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then((e=>c.O$.from(e).eq(1))).catch((e=>{if(e.code===l.Yd.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e}))),this._supportsEip2544}_fetch(e,t){return pr(this,void 0,void 0,(function*(){const r={to:this.address,ccipReadEnabled:!0,data:(0,u.xs)([e,Wt(this.name),t||"0x"])};let n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,u.xs)(["0x9061b923",Ir([Qt(this.name),r.data])]));try{let e=yield this.provider.call(r);return(0,u.lE)(e).length%32==4&&mr.throwError("resolver threw error",l.Yd.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=Mr(e,0)),e}catch(e){if(e.code===l.Yd.errors.CALL_EXCEPTION)return null;throw e}}))}_fetchBytes(e,t){return pr(this,void 0,void 0,(function*(){const r=yield this._fetch(e,t);return null!=r?Mr(r,0):null}))}_getAddress(e,t){const r=Tr[String(e)];if(null==r&&mr.throwError(`unsupported coin type: ${e}`,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);const n=(0,u.lE)(t);if(null!=r.p2pkh){const e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Sr((0,u.zo)([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){const e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){const t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return Sr((0,u.zo)([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){const e=n[1];let t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){const e=ar().toWords(n.slice(2));return e.unshift(t),ar().encode(r.prefix,e)}}return null}getAddress(e){return pr(this,void 0,void 0,(function*(){if(null==e&&(e=60),60===e)try{const e=yield this._fetch("0x3b3b57de");return"0x"===e||e===ht?null:this.provider.formatter.callAddress(e)}catch(e){if(e.code===l.Yd.errors.CALL_EXCEPTION)return null;throw e}const t=yield this._fetchBytes("0xf1cb7e06",_r(e));if(null==t||"0x"===t)return null;const r=this._getAddress(e,t);return null==r&&mr.throwError("invalid or unsupported coin data",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r}))}getAvatar(){return pr(this,void 0,void 0,(function*(){const e=[{type:"name",content:this.name}];try{const t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r<Nr.length;r++){const n=t.match(Nr[r]);if(null==n)continue;const i=n[1].toLowerCase();switch(i){case"https":return e.push({type:"url",content:t}),{linkage:e,url:t};case"data":return e.push({type:"data",content:t}),{linkage:e,url:t};case"ipfs":return e.push({type:"ipfs",content:t}),{linkage:e,url:Rr(t)};case"erc721":case"erc1155":{const r="erc721"===i?"0xc87b56dd":"0x0e89341c";e.push({type:i,content:t});const o=this._resolvedAddress||(yield this.getAddress()),s=(n[2]||"").split("/");if(2!==s.length)return null;const a=yield this.provider.formatter.address(s[0]),f=(0,u.$m)(c.O$.from(s[1]).toHexString(),32);if("erc721"===i){const t=this.provider.formatter.callAddress(yield this.provider.call({to:a,data:(0,u.xs)(["0x6352211e",f])}));if(o!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===i){const t=c.O$.from(yield this.provider.call({to:a,data:(0,u.xs)(["0x00fdd58e",(0,u.$m)(o,32),f])}));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}const l={to:this.provider.formatter.address(s[0]),data:(0,u.xs)([r,f])};let d=Pr(yield this.provider.call(l),0);if(null==d)return null;e.push({type:"metadata-url-base",content:d}),"erc1155"===i&&(d=d.replace("{id}",f.substring(2)),e.push({type:"metadata-url-expanded",content:d})),d.match(/^ipfs:/i)&&(d=Rr(d)),e.push({type:"metadata-url",content:d});const h=yield ir(d);if(!h)return null;e.push({type:"metadata",content:JSON.stringify(h)});let b=h.image;if("string"!=typeof b)return null;if(b.match(/^(https:\/\/|data:)/i));else{if(null==b.match(xr))return null;e.push({type:"url-ipfs",content:b}),b=Rr(b)}return e.push({type:"url",content:b}),{linkage:e,url:b}}}}}catch(e){}return null}))}getContentHash(){return pr(this,void 0,void 0,(function*(){const e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;const t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+$.encode("0x"+t[1])}const r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){const e=parseInt(r[3],16);if(r[4].length===2*e)return"ipns://"+$.encode("0x"+r[1])}const n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];const i=e.match(/^0x90b2c605([0-9a-f]*)$/);if(i&&68===i[1].length){const e={"=":"","+":"-","/":"_"};return"sia://"+Tt("0x"+i[1]).replace(/[=+\/]/g,(t=>e[t]))}return mr.throwError("invalid or unsupported content hash data",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})}))}getText(e){return pr(this,void 0,void 0,(function*(){let t=(0,M.Y0)(e);t=(0,u.zo)([_r(64),_r(t.length),t]),t.length%32!=0&&(t=(0,u.zo)([t,(0,u.$m)("0x",32-e.length%32)]));const r=yield this._fetchBytes("0x59d1d43c",(0,u.Dv)(t));return null==r||"0x"===r?null:(0,M.ZN)(r)}))}}let Dr=null,Fr=1;class Ur extends N.zt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,O.zG)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch((e=>{})),this._ready().catch((e=>{}));else{const t=(0,O.tu)(new.target,"getNetwork")(e);t?((0,O.zG)(this,"_network",t),this.emit("network",t,null)):mr.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return pr(this,void 0,void 0,(function*(){if(null==this._network){let e=null;if(this._networkPromise)try{e=yield this._networkPromise}catch(e){}null==e&&(e=yield this.detectNetwork()),e||mr.throwError("no network detected",l.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,O.zG)(this,"_network",e),this.emit("network",e,null))}return this._network}))}get ready(){return or((()=>this._ready().then((e=>e),(e=>{if(e.code!==l.Yd.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))))}static getFormatter(){return null==Dr&&(Dr=new ur),Dr}static getNetwork(e){return Et(null==e?"homestead":e)}ccipReadFetch(e,t,r){return pr(this,void 0,void 0,(function*(){if(this.disableCcipRead||0===r.length)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e<r.length;e++){const t=r[e],s=t.replace("{sender}",n).replace("{data}",i),a=t.indexOf("{data}")>=0?null:JSON.stringify({data:i,sender:n}),f=yield ir({url:s,errorPassThrough:!0},a,((e,t)=>(e.status=t.statusCode,e)));if(f.data)return f.data;const c=f.message||"unknown error";if(f.status>=400&&f.status<500)return mr.throwError(`response not found during CCIP fetch: ${c}`,l.Yd.errors.SERVER_ERROR,{url:t,errorMessage:c});o.push(c)}return mr.throwError(`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,l.Yd.errors.SERVER_ERROR,{urls:r,errorMessages:o})}))}_getInternalBlockNumber(e){return pr(this,void 0,void 0,(function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){const t=this._internalBlockNumber;try{const r=yield t;if(wr()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}const t=wr(),r=(0,O.mE)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then((e=>null),(e=>e))}).then((({blockNumber:e,networkError:n})=>{if(n)throw this._internalBlockNumber===r&&(this._internalBlockNumber=null),n;const i=wr();return(e=c.O$.from(e).toNumber())<this._maxInternalBlockNumber&&(e=this._maxInternalBlockNumber),this._maxInternalBlockNumber=e,this._setFastBlockNumber(e),{blockNumber:e,reqTime:t,respTime:i}}));return this._internalBlockNumber=r,r.catch((e=>{this._internalBlockNumber===r&&(this._internalBlockNumber=null)})),(yield r).blockNumber}))}poll(){return pr(this,void 0,void 0,(function*(){const e=Fr++,t=[];let r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(e){return void this.emit("error",e)}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r!==this._lastBlockNumber){if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)mr.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",mr.makeError("network block skew detected",l.Yd.errors.NETWORK_ERROR,{blockNumber:r,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",r);else for(let e=this._emitted.block+1;e<=r;e++)this.emit("block",e);this._emitted.block!==r&&(this._emitted.block=r,Object.keys(this._emitted).forEach((e=>{if("block"===e)return;const t=this._emitted[e];"pending"!==t&&r-t>12&&delete this._emitted[e]}))),-2===this._lastBlockNumber&&(this._lastBlockNumber=r-1),this._events.forEach((e=>{switch(e.type){case"tx":{const r=e.hash;let n=this.getTransactionReceipt(r).then((e=>e&&null!=e.blockNumber?(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e),null):null)).catch((e=>{this.emit("error",e)}));t.push(n);break}case"filter":if(!e._inflight){e._inflight=!0,-2===e._lastBlockNumber&&(e._lastBlockNumber=r-1);const n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;const i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);const o=this.getLogs(n).then((t=>{e._inflight=!1,0!==t.length&&t.forEach((t=>{t.blockNumber>e._lastBlockNumber&&(e._lastBlockNumber=t.blockNumber),this._emitted["b:"+t.blockHash]=t.blockNumber,this._emitted["t:"+t.transactionHash]=t.blockNumber,this.emit(n,t)}))})).catch((t=>{this.emit("error",t),e._inflight=!1}));t.push(o)}}})),this._lastBlockNumber=r,Promise.all(t).then((()=>{this.emit("didPoll",e)})).catch((e=>{this.emit("error",e)}))}else this.emit("didPoll",e)}))}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return pr(this,void 0,void 0,(function*(){return mr.throwError("provider does not support network detection",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})}))}getNetwork(){return pr(this,void 0,void 0,(function*(){const e=yield this._ready(),t=yield this.detectNetwork();if(e.chainId!==t.chainId){if(this.anyNetwork)return this._network=t,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",t,e),yield Ar(0),this._network;const r=mr.makeError("underlying network changed",l.Yd.errors.NETWORK_ERROR,{event:"changed",network:e,detectedNetwork:t});throw this.emit("error",r),r}return e}))}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then((e=>{this._setFastBlockNumber(e)}),(e=>{})),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(e){e&&!this._poller?(this._poller=setInterval((()=>{this.poll()}),this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout((()=>{this.poll(),this._bootstrapPoll=setTimeout((()=>{this._poller||this.poll(),this._bootstrapPoll=null}),this.pollingInterval)}),0))):!e&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(e){if("number"!=typeof e||e<=0||parseInt(String(e))!=e)throw new Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval((()=>{this.poll()}),this._pollingInterval))}_getFastBlockNumber(){const e=wr();return e-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=e,this._fastBlockNumberPromise=this.getBlockNumber().then((e=>((null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e),this._fastBlockNumber)))),this._fastBlockNumberPromise}_setFastBlockNumber(e){null!=this._fastBlockNumber&&e<this._fastBlockNumber||(this._fastQueryDate=wr(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return pr(this,void 0,void 0,(function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)}))}_waitForTransaction(e,t,r,n){return pr(this,void 0,void 0,(function*(){const i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise(((i,o)=>{const s=[];let a=!1;const f=function(){return!!a||(a=!0,s.forEach((e=>{e()})),!1)},c=e=>{e.confirmations<t||f()||i(e)};if(this.on(e,c),s.push((()=>{this.removeListener(e,c)})),n){let r=n.startBlock,i=null;const c=s=>pr(this,void 0,void 0,(function*(){a||(yield Ar(1e3),this.getTransactionCount(n.from).then((u=>pr(this,void 0,void 0,(function*(){if(!a){if(u<=n.nonce)r=s;else{{const t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3,i<n.startBlock&&(i=n.startBlock));i<=s;){if(a)return;const r=yield this.getBlockWithTransactions(i);for(let i=0;i<r.transactions.length;i++){const s=r.transactions[i];if(s.hash===e)return;if(s.from===n.from&&s.nonce===n.nonce){if(a)return;const r=yield this.waitForTransaction(s.hash,t);if(f())return;let i="replaced";return s.data===n.data&&s.to===n.to&&s.value.eq(n.value)?i="repriced":"0x"===s.data&&s.from===s.to&&s.value.isZero()&&(i="cancelled"),void o(mr.makeError("transaction was replaced",l.Yd.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:this._wrapTransaction(s),hash:e,receipt:r}))}}i++}}a||this.once("block",c)}}))),(e=>{a||this.once("block",c)})))}));if(a)return;this.once("block",c),s.push((()=>{this.removeListener("block",c)}))}if("number"==typeof r&&r>0){const e=setTimeout((()=>{f()||o(mr.makeError("timeout exceeded",l.Yd.errors.TIMEOUT,{timeout:r}))}),r);e.unref&&e.unref(),s.push((()=>{clearTimeout(e)}))}}))}))}getBlockNumber(){return pr(this,void 0,void 0,(function*(){return this._getInternalBlockNumber(0)}))}getGasPrice(){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const e=yield this.perform("getGasPrice",{});try{return c.O$.from(e)}catch(t){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}}))}getBalance(e,t){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,O.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return c.O$.from(n)}catch(e){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}}))}getTransactionCount(e,t){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,O.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return c.O$.from(n).toNumber()}catch(e){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}}))}getCode(e,t){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,O.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return(0,u.Dv)(n)}catch(e){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}}))}getStorageAt(e,t,r){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const n=yield(0,O.mE)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then((e=>(0,u.$P)(e)))}),i=yield this.perform("getStorageAt",n);try{return(0,u.Dv)(i)}catch(e){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:e})}}))}_wrapTransaction(e,t,r){if(null!=t&&32!==(0,u.E1)(t))throw new Error("invalid response - sendTransaction");const n=e;return null!=t&&e.hash!==t&&mr.throwError("Transaction hash mismatch from Provider.sendTransaction.",l.Yd.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>pr(this,void 0,void 0,(function*(){let i;null==t&&(t=1),null==n&&(n=0),0!==t&&null!=r&&(i={data:e.data,from:e.from,nonce:e.nonce,to:e.to,value:e.value,startBlock:r});const o=yield this._waitForTransaction(e.hash,t,n,i);return null==o&&0===t?null:(this._emitted["t:"+e.hash]=o.blockNumber,0===o.status&&mr.throwError("transaction failed",l.Yd.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)})),n}sendTransaction(e){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield Promise.resolve(e).then((e=>(0,u.Dv)(e))),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);const n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{const e=yield this.perform("sendTransaction",{signedTransaction:t});return this._wrapTransaction(r,e,n)}catch(e){throw e.transaction=r,e.transactionHash=r.hash,e}}))}_getTransactionRequest(e){return pr(this,void 0,void 0,(function*(){const t=yield e,r={};return["from","to"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?this._getAddress(e):null)))})),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?c.O$.from(e):null)))})),["type"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>null!=e?e:null)))})),t.accessList&&(r.accessList=this.formatter.accessList(t.accessList)),["data"].forEach((e=>{null!=t[e]&&(r[e]=Promise.resolve(t[e]).then((e=>e?(0,u.Dv)(e):null)))})),this.formatter.transactionRequest(yield(0,O.mE)(r))}))}_getFilter(e){return pr(this,void 0,void 0,(function*(){e=yield e;const t={};return null!=e.address&&(t.address=this._getAddress(e.address)),["blockHash","topics"].forEach((r=>{null!=e[r]&&(t[r]=e[r])})),["fromBlock","toBlock"].forEach((r=>{null!=e[r]&&(t[r]=this._getBlockTag(e[r]))})),this.formatter.filter(yield(0,O.mE)(t))}))}_call(e,t,r){return pr(this,void 0,void 0,(function*(){r>=10&&mr.throwError("CCIP read exceeded maximum redirections",l.Yd.errors.SERVER_ERROR,{redirects:r,transaction:e});const n=e.to,i=yield this.perform("call",{transaction:e,blockTag:t});if(r>=0&&"latest"===t&&null!=n&&"0x556f1830"===i.substring(0,10)&&(0,u.E1)(i)%32==4)try{const o=(0,u.p3)(i,4),s=(0,u.p3)(o,0,32);c.O$.from(s).eq(n)||mr.throwError("CCIP Read sender did not match",l.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const a=[],f=c.O$.from((0,u.p3)(o,32,64)).toNumber(),d=c.O$.from((0,u.p3)(o,f,f+32)).toNumber(),h=(0,u.p3)(o,f+32);for(let t=0;t<d;t++){const r=Pr(h,32*t);null==r&&mr.throwError("CCIP Read contained corrupt URL string",l.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i}),a.push(r)}const b=Mr(o,64);c.O$.from((0,u.p3)(o,100,128)).isZero()||mr.throwError("CCIP Read callback selector included junk",l.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const p=(0,u.p3)(o,96,100),m=Mr(o,128),y=yield this.ccipReadFetch(e,b,a);null==y&&mr.throwError("CCIP Read disabled or provided no URLs",l.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});const g={to:n,data:(0,u.xs)([p,Ir([y,m])])};return this._call(g,t,r+1)}catch(e){if(e.code===l.Yd.errors.SERVER_ERROR)throw e}try{return(0,u.Dv)(i)}catch(r){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:i,error:r})}}))}call(e,t){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const r=yield(0,O.mE)({transaction:this._getTransactionRequest(e),blockTag:this._getBlockTag(t),ccipReadEnabled:Promise.resolve(e.ccipReadEnabled)});return this._call(r.transaction,r.blockTag,r.ccipReadEnabled?0:-1)}))}estimateGas(e){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,O.mE)({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return c.O$.from(r)}catch(e){return mr.throwError("bad result from backend",l.Yd.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:e})}}))}_getAddress(e){return pr(this,void 0,void 0,(function*(){"string"!=typeof(e=yield e)&&mr.throwArgumentError("invalid address or ENS name","name",e);const t=yield this.resolveName(e);return null==t&&mr.throwError("ENS name not configured",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t}))}_getBlock(e,t){return pr(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;let r=-128;const n={includeTransactions:!!t};if((0,u.A7)(e,32))n.blockHash=e;else try{n.blockTag=yield this._getBlockTag(e),(0,u.A7)(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(t){mr.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return or((()=>pr(this,void 0,void 0,(function*(){const e=yield this.perform("getBlock",n);if(null==e)return null!=n.blockHash&&null==this._emitted["b:"+n.blockHash]||null!=n.blockTag&&r>this._emitted.block?null:void 0;if(t){let t=null;for(let r=0;r<e.transactions.length;r++){const n=e.transactions[r];if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){null==t&&(t=yield this._getInternalBlockNumber(100+2*this.pollingInterval));let e=t-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}}const r=this.formatter.blockWithTransactions(e);return r.transactions=r.transactions.map((e=>this._wrapTransaction(e))),r}return this.formatter.block(e)}))),{oncePoll:this})}))}getBlock(e){return this._getBlock(e,!1)}getBlockWithTransactions(e){return this._getBlock(e,!0)}getTransaction(e){return pr(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return or((()=>pr(this,void 0,void 0,(function*(){const r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;const n=this.formatter.transactionResponse(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return this._wrapTransaction(n)}))),{oncePoll:this})}))}getTransactionReceipt(e){return pr(this,void 0,void 0,(function*(){yield this.getNetwork(),e=yield e;const t={transactionHash:this.formatter.hash(e,!0)};return or((()=>pr(this,void 0,void 0,(function*(){const r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;const n=this.formatter.receipt(r);if(null==n.blockNumber)n.confirmations=0;else if(null==n.confirmations){let e=(yield this._getInternalBlockNumber(100+2*this.pollingInterval))-n.blockNumber+1;e<=0&&(e=1),n.confirmations=e}return n}))),{oncePoll:this})}))}getLogs(e){return pr(this,void 0,void 0,(function*(){yield this.getNetwork();const t=yield(0,O.mE)({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);return r.forEach((e=>{null==e.removed&&(e.removed=!1)})),ur.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)}))}getEtherPrice(){return pr(this,void 0,void 0,(function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})}))}_getBlockTag(e){return pr(this,void 0,void 0,(function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&mr.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return t+=e,t<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)}))}getResolver(e){return pr(this,void 0,void 0,(function*(){let t=e;for(;;){if(""===t||"."===t)return null;if("eth"!==e&&"eth"===t)return null;const r=yield this._getResolver(t,"getResolver");if(null!=r){const n=new Br(this,r,e);return t===e||(yield n.supportsWildcard())?n:null}t=t.split(".").slice(1).join(".")}}))}_getResolver(e,t){return pr(this,void 0,void 0,(function*(){null==t&&(t="ENS");const r=yield this.getNetwork();r.ensAddress||mr.throwError("network does not support ENS",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{const t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+Wt(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null}))}resolveName(e){return pr(this,void 0,void 0,(function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if((0,u.A7)(e))throw t}"string"!=typeof e&&mr.throwArgumentError("invalid ENS name","name",e);const t=yield this.getResolver(e);return t?yield t.getAddress():null}))}lookupAddress(e){return pr(this,void 0,void 0,(function*(){e=yield e;const t=(e=this.formatter.address(e)).substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;const n=Pr(yield this.call({to:r,data:"0x691f3431"+Wt(t).substring(2)}),0);return(yield this.resolveName(n))!=e?null:n}))}getAvatar(e){return pr(this,void 0,void 0,(function*(){let t=null;if((0,u.A7)(e)){const r=this.formatter.address(e).substring(2).toLowerCase()+".addr.reverse",n=yield this._getResolver(r,"getAvatar");if(!n)return null;t=new Br(this,n,r);try{const e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==l.Yd.errors.CALL_EXCEPTION)throw e}try{const e=Pr(yield this.call({to:n,data:"0x691f3431"+Wt(r).substring(2)}),0);t=yield this.getResolver(e)}catch(e){if(e.code!==l.Yd.errors.CALL_EXCEPTION)throw e;return null}}else if(t=yield this.getResolver(e),!t)return null;const r=yield t.getAvatar();return null==r?null:r.url}))}perform(e,t){return mr.throwError(e+" not implemented",l.Yd.errors.NOT_IMPLEMENTED,{operation:e})}_startEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_stopEvent(e){this.polling=this._events.filter((e=>e.pollable())).length>0}_addEventListener(e,t,r){const n=new kr(vr(e),t,r);return this._events.push(n),this._startEvent(n),this}on(e,t){return this._addEventListener(e,t,!1)}once(e,t){return this._addEventListener(e,t,!0)}emit(e,...t){let r=!1,n=[],i=vr(e);return this._events=this._events.filter((e=>e.tag!==i||(setTimeout((()=>{e.listener.apply(this,t)}),0),r=!0,!e.once||(n.push(e),!1)))),n.forEach((e=>{this._stopEvent(e)})),r}listenerCount(e){if(!e)return this._events.length;let t=vr(e);return this._events.filter((e=>e.tag===t)).length}listeners(e){if(null==e)return this._events.map((e=>e.listener));let t=vr(e);return this._events.filter((e=>e.tag===t)).map((e=>e.listener))}off(e,t){if(null==t)return this.removeAllListeners(e);const r=[];let n=!1,i=vr(e);return this._events=this._events.filter((e=>e.tag!==i||e.listener!=t||!!n||(n=!0,r.push(e),!1))),r.forEach((e=>{this._stopEvent(e)})),this}removeAllListeners(e){let t=[];if(null==e)t=this._events,this._events=[];else{const r=vr(e);this._events=this._events.filter((e=>e.tag!==r||(t.push(e),!1)))}return t.forEach((e=>{this._stopEvent(e)})),this}}var Lr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};const zr=new l.Yd(fr),Gr=["call","estimateGas"];function jr(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){const r=(0,u.A7)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(const r in e){const n=jr(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return jr(JSON.parse(e),t)}catch(e){}return null}function Yr(e,t,r){const n=r.transaction||r.signedTransaction;if("call"===e){const e=jr(t,!0);if(e)return e.data;zr.throwError("missing revert data in call exception; Transaction reverted without a reason string",l.Yd.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=jr(t.body,!1);null==r&&(r=jr(t,!1)),r&&zr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===l.Yd.errors.SERVER_ERROR&&t.error&&"string"==typeof t.error.message?i=t.error.message:"string"==typeof t.body?i=t.body:"string"==typeof t.responseText&&(i=t.responseText),i=(i||"").toLowerCase(),i.match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&zr.throwError("insufficient funds for intrinsic transaction cost",l.Yd.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&zr.throwError("nonce has already been used",l.Yd.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&zr.throwError("replacement fee too low",l.Yd.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&zr.throwError("legacy pre-eip-155 transactions not supported",l.Yd.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),Gr.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&zr.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function qr(e){return new Promise((function(t){setTimeout(t,e)}))}function Kr(e){if(e.error){const t=new Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function Hr(e){return e?e.toLowerCase():e}const Vr={};class Jr extends S.E{constructor(e,t,r){if(super(),e!==Vr)throw new Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,O.zG)(this,"provider",t),null==r&&(r=0),"string"==typeof r?((0,O.zG)(this,"_address",this.provider.formatter.address(r)),(0,O.zG)(this,"_index",null)):"number"==typeof r?((0,O.zG)(this,"_index",r),(0,O.zG)(this,"_address",null)):zr.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return zr.throwError("cannot alter JSON-RPC Signer connection",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new Wr(Vr,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then((e=>(e.length<=this._index&&zr.throwError("unknown account #"+this._index,l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index]))))}sendUncheckedTransaction(e){e=(0,O.DC)(e);const t=this.getAddress().then((e=>(e&&(e=e.toLowerCase()),e)));if(null==e.gasLimit){const r=(0,O.DC)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then((e=>Lr(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.provider.resolveName(e);return null==t&&zr.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))))),(0,O.mE)({tx:(0,O.mE)(e),sender:t}).then((({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&zr.throwArgumentError("from address mismatch","transaction",e):t.from=r;const n=this.provider.constructor.hexlifyTransaction(t,{from:!0});return this.provider.send("eth_sendTransaction",[n]).then((e=>e),(e=>("string"==typeof e.message&&e.message.match(/user denied/i)&&zr.throwError("user rejected transaction",l.Yd.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),Yr("sendTransaction",e,n))))}))}signTransaction(e){return zr.throwError("signing transactions is unsupported",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return Lr(this,void 0,void 0,(function*(){const t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield or((()=>Lr(this,void 0,void 0,(function*(){const e=yield this.provider.getTransaction(r);if(null!==e)return this.provider._wrapTransaction(e,r,t)}))),{oncePoll:this.provider})}catch(e){throw e.transactionHash=r,e}}))}signMessage(e){return Lr(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,M.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,u.Dv)(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&zr.throwError("user rejected signing",l.Yd.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}}))}_legacySignMessage(e){return Lr(this,void 0,void 0,(function*(){const t="string"==typeof e?(0,M.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,u.Dv)(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&zr.throwError("user rejected signing",l.Yd.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}}))}_signTypedData(e,t,r){return Lr(this,void 0,void 0,(function*(){const n=yield Q.resolveNames(e,t,r,(e=>this.provider.resolveName(e))),i=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[i.toLowerCase(),JSON.stringify(Q.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&zr.throwError("user rejected signing",l.Yd.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),e}}))}unlock(e){return Lr(this,void 0,void 0,(function*(){const t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])}))}}class Wr extends Jr{sendTransaction(e){return this.sendUncheckedTransaction(e).then((e=>({hash:e,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:t=>this.provider.waitForTransaction(e,t)})))}}const Qr={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class Xr extends Ur{constructor(e,t){let r=t;null==r&&(r=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then((t=>{e(t)}),(e=>{t(e)}))}),0)}))),super(r),e||(e=(0,O.tu)(this.constructor,"defaultUrl")()),"string"==typeof e?(0,O.zG)(this,"connection",Object.freeze({url:e})):(0,O.zG)(this,"connection",Object.freeze((0,O.DC)(e))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout((()=>{this._cache.detectNetwork=null}),0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return Lr(this,void 0,void 0,(function*(){yield qr(0);let e=null;try{e=yield this.send("eth_chainId",[])}catch(t){try{e=yield this.send("net_version",[])}catch(e){}}if(null!=e){const t=(0,O.tu)(this.constructor,"getNetwork");try{return t(c.O$.from(e).toNumber())}catch(t){return zr.throwError("could not detect network",l.Yd.errors.NETWORK_ERROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return zr.throwError("could not detect network",l.Yd.errors.NETWORK_ERROR,{event:"noNetwork"})}))}getSigner(e){return new Jr(Vr,this,e)}getUncheckedSigner(e){return this.getSigner(e).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then((e=>e.map((e=>this.formatter.address(e)))))}send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,O.p$)(r),provider:this});const n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];const i=ir(this.connection,JSON.stringify(r),Kr).then((e=>(this.emit("debug",{action:"response",request:r,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:r,provider:this}),e}));return n&&(this._cache[e]=i,setTimeout((()=>{this._cache[e]=null}),0)),i}prepareRequest(e,t){switch(e){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[Hr(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[Hr(t.address),t.blockTag]];case"getCode":return["eth_getCode",[Hr(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[Hr(t.address),(0,u.$m)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":return t.blockTag?["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]]:t.blockHash?["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]]:null;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":return["eth_call",[(0,O.tu)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0}),t.blockTag]];case"estimateGas":return["eth_estimateGas",[(0,O.tu)(this.constructor,"hexlifyTransaction")(t.transaction,{from:!0})]];case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=Hr(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return Lr(this,void 0,void 0,(function*(){if("call"===e||"estimateGas"===e){const e=t.transaction;if(e&&null!=e.type&&c.O$.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){const r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=(0,O.DC)(t)).transaction=(0,O.DC)(e),delete t.transaction.type)}}const r=this.prepareRequest(e,t);null==r&&zr.throwError(e+" not implemented",l.Yd.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return Yr(e,r,t)}}))}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;const e=this,t=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=t,t.then((function(r){return function n(){e.send("eth_getFilterChanges",[r]).then((function(r){if(e._pendingFilter!=t)return null;let n=Promise.resolve();return r.forEach((function(t){e._emitted["t:"+t.toLowerCase()]="pending",n=n.then((function(){return e.getTransaction(t).then((function(t){return e.emit("pending",t),null}))}))})),n.then((function(){return qr(1e3)}))})).then((function(){if(e._pendingFilter==t)return setTimeout((function(){n()}),0),null;e.send("eth_uninstallFilter",[r])})).catch((e=>{}))}(),r})).catch((e=>{}))}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){const r=(0,O.DC)(Qr);if(t)for(const e in t)t[e]&&(r[e]=!0);(0,O.uj)(e,r);const n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((function(t){if(null==e[t])return;const r=(0,u.$P)(c.O$.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r})),["from","to","data"].forEach((function(t){null!=e[t]&&(n[t]=(0,u.Dv)(e[t]))})),e.accessList&&(n.accessList=(0,ce.z7)(e.accessList)),n}}let $r=null;try{if($r=WebSocket,null==$r)throw new Error("inject please")}catch(e){const t=new l.Yd(fr);$r=function(){t.throwError("WebSockets not supported in this environment",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var Zr=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};const en=new l.Yd(fr);let tn=1;class rn extends Xr{constructor(e,t){"any"===t&&en.throwError("WebSocketProvider does not support 'any' network yet",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),super("string"==typeof e?e:"_websocket",t),this._pollingInterval=-1,this._wsReady=!1,"string"==typeof e?(0,O.zG)(this,"_websocket",new $r(this.connection.url)):(0,O.zG)(this,"_websocket",e),(0,O.zG)(this,"_requests",{}),(0,O.zG)(this,"_subs",{}),(0,O.zG)(this,"_subIds",{}),(0,O.zG)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>{this._wsReady=!0,Object.keys(this._requests).forEach((e=>{this.websocket.send(this._requests[e].payload)}))},this.websocket.onmessage=e=>{const t=e.data,r=JSON.parse(t);if(null!=r.id){const e=String(r.id),n=this._requests[e];if(delete this._requests[e],void 0!==r.result)n.callback(null,r.result),this.emit("debug",{action:"response",request:JSON.parse(n.payload),response:r.result,provider:this});else{let e=null;r.error?(e=new Error(r.error.message||"unknown error"),(0,O.zG)(e,"code",r.error.code||null),(0,O.zG)(e,"response",t)):e=new Error("unknown error"),n.callback(e,void 0),this.emit("debug",{action:"response",error:e,request:JSON.parse(n.payload),provider:this})}}else if("eth_subscription"===r.method){const e=this._subs[r.params.subscription];e&&e.processFunc(r.params.result)}else console.warn("this should not happen")};const r=setInterval((()=>{this.emit("poll")}),1e3);r.unref&&r.unref()}get websocket(){return this._websocket}detectNetwork(){return this._detectNetwork}get pollingInterval(){return 0}resetEventsBlock(e){en.throwError("cannot reset events block on WebSocketProvider",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){en.throwError("cannot set polling interval on WebSocketProvider",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return Zr(this,void 0,void 0,(function*(){return null}))}set polling(e){e&&en.throwError("cannot set polling on WebSocketProvider",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){const r=tn++;return new Promise(((n,i)=>{const o=JSON.stringify({method:e,params:t,id:r,jsonrpc:"2.0"});this.emit("debug",{action:"request",request:JSON.parse(o),provider:this}),this._requests[String(r)]={callback:function(e,t){return e?i(e):n(t)},payload:o},this._wsReady&&this.websocket.send(o)}))}static defaultUrl(){return"ws://localhost:8546"}_subscribe(e,t,r){return Zr(this,void 0,void 0,(function*(){let n=this._subIds[e];null==n&&(n=Promise.all(t).then((e=>this.send("eth_subscribe",e))),this._subIds[e]=n);const i=yield n;this._subs[i]={tag:e,processFunc:r}}))}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],(e=>{const t=c.O$.from(e.number).toNumber();this._emitted.block=t,this.emit("block",t)}));break;case"pending":this._subscribe("pending",["newPendingTransactions"],(e=>{this.emit("pending",e)}));break;case"filter":this._subscribe(e.tag,["logs",this._getFilter(e.filter)],(t=>{null==t.removed&&(t.removed=!1),this.emit(e.filter,this.formatter.filterLog(t))}));break;case"tx":{const t=e=>{const t=e.hash;this.getTransactionReceipt(t).then((e=>{e&&this.emit(t,e)}))};t(e),this._subscribe("tx",["newHeads"],(e=>{this._events.filter((e=>"tx"===e.type)).forEach(t)}));break}case"debug":case"poll":case"willPoll":case"didPoll":case"error":break;default:console.log("unhandled:",e)}}_stopEvent(e){let t=e.tag;if("tx"===e.type){if(this._events.filter((e=>"tx"===e.type)).length)return;t="tx"}else if(this.listenerCount(e.event))return;const r=this._subIds[t];r&&(delete this._subIds[t],r.then((e=>{this._subs[e]&&(delete this._subs[e],this.send("eth_unsubscribe",[e]))})))}destroy(){return Zr(this,void 0,void 0,(function*(){this.websocket.readyState===$r.CONNECTING&&(yield new Promise((e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}}))),this.websocket.close(1e3)}))}}const nn=new l.Yd(fr);class on extends Xr{detectNetwork(){const e=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return t=this,r=void 0,i=function*(){let t=this.network;return null==t&&(t=yield e.detectNetwork.call(this),t||nn.throwError("no network detected",l.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,O.zG)(this,"_network",t),this.emit("network",t,null))),t},new((n=void 0)||(n=Promise))((function(e,o){function s(e){try{f(i.next(e))}catch(e){o(e)}}function a(e){try{f(i.throw(e))}catch(e){o(e)}}function f(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(s,a)}f((i=i.apply(t,r||[])).next())}));var t,r,n,i}}class sn extends on{constructor(e,t){nn.checkAbstract(new.target,sn),e=(0,O.tu)(new.target,"getNetwork")(e),t=(0,O.tu)(new.target,"getApiKey")(t),super((0,O.tu)(new.target,"getUrl")(e,t),e),"string"==typeof t?(0,O.zG)(this,"apiKey",t):null!=t&&Object.keys(t).forEach((e=>{(0,O.zG)(this,e,t[e])}))}_startPending(){nn.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return nn.throwError("API provider does not support signing",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return nn.throwError("not implemented; sub-classes must override getUrl",l.Yd.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}const an=new l.Yd(fr),fn="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class cn extends rn{constructor(e,t){const r=new un(e,t);super(r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi."),r.network),(0,O.zG)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===fn}}class un extends sn{static getWebSocketProvider(e,t){return new cn(e,t)}static getApiKey(e){return null==e?fn:(e&&"string"!=typeof e&&an.throwArgumentError("invalid apiKey","apiKey",e),e)}static getUrl(e,t){let r=null;switch(e.name){case"homestead":r="eth-mainnet.alchemyapi.io/v2/";break;case"goerli":r="eth-goerli.g.alchemy.com/v2/";break;case"sepolia":r="eth-sepolia.g.alchemy.com/v2/";break;case"matic":r="polygon-mainnet.g.alchemy.com/v2/";break;case"maticmum":r="polygon-mumbai.g.alchemy.com/v2/";break;case"arbitrum":r="arb-mainnet.g.alchemy.com/v2/";break;case"arbitrum-goerli":r="arb-goerli.g.alchemy.com/v2/";break;case"arbitrum-sepolia":r="arb-sepolia.g.alchemy.com/v2/";break;case"optimism":r="opt-mainnet.g.alchemy.com/v2/";break;case"optimism-goerli":r="opt-goerli.g.alchemy.com/v2/";break;case"optimism-sepolia":r="opt-sepolia.g.alchemy.com/v2/";break;default:an.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===fn&&br(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===fn}}const ln=new l.Yd(fr),dn="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";function hn(e){switch(e){case"homestead":return"rpc.ankr.com/eth/";case"ropsten":return"rpc.ankr.com/eth_ropsten/";case"rinkeby":return"rpc.ankr.com/eth_rinkeby/";case"goerli":return"rpc.ankr.com/eth_goerli/";case"sepolia":return"rpc.ankr.com/eth_sepolia/";case"matic":return"rpc.ankr.com/polygon/";case"maticmum":return"rpc.ankr.com/polygon_mumbai/";case"optimism":return"rpc.ankr.com/optimism/";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet/";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia/";case"arbitrum":return"rpc.ankr.com/arbitrum/"}return ln.throwArgumentError("unsupported network","name",e)}class bn extends sn{isCommunityResource(){return this.apiKey===dn}static getApiKey(e){return null==e?dn:e}static getUrl(e,t){null==t&&(t=dn);const r={allowGzip:!0,url:"https://"+hn(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===dn&&br(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}const pn=new l.Yd(fr);class mn extends sn{static getApiKey(e){return null!=e&&pn.throwArgumentError("apiKey not supported for cloudflare","apiKey",e),null}static getUrl(e,t){let r=null;return"homestead"===e.name?r="https://cloudflare-eth.com/":pn.throwArgumentError("unsupported network","network",arguments[0]),r}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return n=this,i=void 0,s=function*(){return"getBlockNumber"===e?(yield r.perform.call(this,"getBlock",{blockTag:"latest"})).number:r.perform.call(this,e,t)},new((o=void 0)||(o=Promise))((function(e,t){function r(e){try{f(s.next(e))}catch(e){t(e)}}function a(e){try{f(s.throw(e))}catch(e){t(e)}}function f(t){var n;t.done?e(t.value):(n=t.value,n instanceof o?n:new o((function(e){e(n)}))).then(r,a)}f((s=s.apply(n,i||[])).next())}));var n,i,o,s}}var yn=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};const gn=new l.Yd(fr);function vn(e){const t={};for(let r in e){if(null==e[r])continue;let n=e[r];"type"===r&&0===n||(n={type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r]?(0,u.$P)((0,u.Dv)(n)):"accessList"===r?"["+(0,ce.z7)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]":(0,u.Dv)(n),t[r]=n)}return t}function wn(e){if(0==e.status&&("No records found"===e.message||"No transactions found"===e.message))return e.result;if(1!=e.status||"string"!=typeof e.message||!e.message.match(/^OK/)){const t=new Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function An(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){const t=new Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){const t=new Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){const t=new Error(e.error.message||"unknown error");throw e.error.code&&(t.code=e.error.code),e.error.data&&(t.data=e.error.data),t}return e.result}function En(e){if("pending"===e)throw new Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function kn(e,t,r){if("call"===e&&t.code===l.Yd.errors.SERVER_ERROR){const e=t.error;if(e&&(e.message.match(/reverted/i)||e.message.match(/VM execution error/i))){let r=e.data;if(r&&(r="0x"+r.replace(/^.*0x/i,"")),(0,u.A7)(r))return r;gn.throwError("missing revert data in call exception",l.Yd.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let n=t.message;throw t.code===l.Yd.errors.SERVER_ERROR&&(t.error&&"string"==typeof t.error.message?n=t.error.message:"string"==typeof t.body?n=t.body:"string"==typeof t.responseText&&(n=t.responseText)),n=(n||"").toLowerCase(),n.match(/insufficient funds/)&&gn.throwError("insufficient funds for intrinsic transaction cost",l.Yd.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&gn.throwError("nonce has already been used",l.Yd.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&gn.throwError("replacement fee too low",l.Yd.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&gn.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",l.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class Tn extends Ur{constructor(e,t){super(e),(0,O.zG)(this,"baseUrl",this.getBaseUrl()),(0,O.zG)(this,"apiKey",t||null)}getBaseUrl(){switch(this.network?this.network.name:"invalid"){case"homestead":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"matic":return"https://api.polygonscan.com";case"maticmum":return"https://api-testnet.polygonscan.com";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}return gn.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){const r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),""),n=this.apiKey?`&apikey=${this.apiKey}`:"";return`${this.baseUrl}/api?module=${e}${r}${n}`}getPostUrl(){return`${this.baseUrl}/api`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t}fetch(e,t,r){return yn(this,void 0,void 0,(function*(){const n=r?this.getPostUrl():this.getUrl(e,t),i=r?this.getPostData(e,t):null,o="proxy"===e?An:wn;this.emit("debug",{action:"request",request:n,provider:this});const s={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&br(),Promise.resolve(!0))};let a=null;i&&(s.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},a=Object.keys(i).map((e=>`${e}=${i[e]}`)).join("&"));const f=yield ir(s,a,o||An);return this.emit("debug",{action:"response",request:n,response:(0,O.p$)(f),provider:this}),f}))}detectNetwork(){return yn(this,void 0,void 0,(function*(){return this.network}))}perform(e,t){const r=Object.create(null,{perform:{get:()=>super.perform}});return yn(this,void 0,void 0,(function*(){switch(e){case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getBalance":return this.fetch("account",{action:"balance",address:t.address,tag:t.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:t.address,tag:t.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:t.address,tag:t.blockTag});case"getStorageAt":return this.fetch("proxy",{action:"eth_getStorageAt",address:t.address,position:t.position,tag:t.blockTag});case"sendTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:t.signedTransaction},!0).catch((e=>kn("sendTransaction",e,t.signedTransaction)));case"getBlock":if(t.blockTag)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:t.blockTag,boolean:t.includeTransactions?"true":"false"});throw new Error("getBlock by blockHash not implemented");case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:t.transactionHash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:t.transactionHash});case"call":{if("latest"!==t.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const e=vn(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(e){return kn("call",e,t.transaction)}}case"estimateGas":{const e=vn(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(e){return kn("estimateGas",e,t.transaction)}}case"getLogs":{const e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=En(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=En(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&gn.throwError("unsupported topic count",l.Yd.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){const r=t.filter.topics[0];"string"==typeof r&&66===r.length||gn.throwError("unsupported topic format",l.Yd.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}const r=yield this.fetch("logs",e);let n={};for(let e=0;e<r.length;e++){const t=r[e];if(null==t.blockHash){if(null==n[t.blockNumber]){const e=yield this.getBlock(t.blockNumber);e&&(n[t.blockNumber]=e.hash)}t.blockHash=n[t.blockNumber]}}return r}case"getEtherPrice":return"homestead"!==this.network.name?0:parseFloat((yield this.fetch("stats",{action:"ethprice"})).ethusd)}return r.perform.call(this,e,t)}))}getHistory(e,t,r){return yn(this,void 0,void 0,(function*(){const n={action:"txlist",address:yield this.resolveName(e),startblock:null==t?0:t,endblock:null==r?99999999:r,sort:"asc"};return(yield this.fetch("account",n)).map((e=>{["contractAddress","to"].forEach((function(t){""==e[t]&&delete e[t]})),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);const t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t}))}))}isCommunityResource(){return null==this.apiKey}}function _n(e){for(let t=(e=e.slice()).length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}var Sn=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))};const xn=new l.Yd(fr);function Nn(){return(new Date).getTime()}function Pn(e){let t=null;for(let r=0;r<e.length;r++){const n=e[r];if(null==n)return null;t?t.name===n.name&&t.chainId===n.chainId&&(t.ensAddress===n.ensAddress||null==t.ensAddress&&null==n.ensAddress)||xn.throwArgumentError("provider mismatch","networks",e):t=n}return t}function Mn(e,t){e=e.slice().sort();const r=Math.floor(e.length/2);if(e.length%2)return e[r];const n=e[r-1],i=e[r];return null!=t&&Math.abs(n-i)>t?null:(n+i)/2}function Rn(e){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("string"==typeof e)return e;if(c.O$.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map((e=>Rn(e))));if("object"==typeof e){const t=Object.keys(e);return t.sort(),"{"+t.map((t=>{let r=e[t];return r="function"==typeof r?"[function]":Rn(r),JSON.stringify(t)+":"+r})).join(",")+"}"}throw new Error("unknown value type: "+typeof e)}let Cn=1;function On(e){let t=null,r=null,n=new Promise((n=>{t=function(){r&&(clearTimeout(r),r=null),n()},r=setTimeout(t,e)}));return{cancel:t,getPromise:function(){return n},wait:e=>(n=n.then(e),n)}}const In=[l.Yd.errors.CALL_EXCEPTION,l.Yd.errors.INSUFFICIENT_FUNDS,l.Yd.errors.NONCE_EXPIRED,l.Yd.errors.REPLACEMENT_UNDERPRICED,l.Yd.errors.UNPREDICTABLE_GAS_LIMIT],Bn=["address","args","errorArgs","errorSignature","method","transaction"];function Dn(e,t){const r={weight:e.weight};return Object.defineProperty(r,"provider",{get:()=>e.provider}),e.start&&(r.start=e.start),t&&(r.duration=t-e.start),e.done&&(e.error?r.error=e.error:r.result=e.result||null),r}function Fn(e,t){return Sn(this,void 0,void 0,(function*(){const r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:or((()=>new Promise(((n,i)=>{setTimeout((function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}),0)}))),{oncePoll:r})}))}function Un(e,t,r,n){return Sn(this,void 0,void 0,(function*(){let i=e.provider;switch(r){case"getBlockNumber":case"getGasPrice":return i[r]();case"getEtherPrice":if(i.getEtherPrice)return i.getEtherPrice();break;case"getBalance":case"getTransactionCount":case"getCode":return n.blockTag&&(0,u.A7)(n.blockTag)&&(i=yield Fn(e,t)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&(0,u.A7)(n.blockTag)&&(i=yield Fn(e,t)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&(0,u.A7)(n.blockTag)&&(i=yield Fn(e,t)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":return n.blockTag&&(0,u.A7)(n.blockTag)&&(i=yield Fn(e,t)),"call"===r&&n.blockTag?i[r](n.transaction,n.blockTag):i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&(0,u.A7)(r.fromBlock)||r.toBlock&&(0,u.A7)(r.toBlock))&&(i=yield Fn(e,t)),i.getLogs(r)}}return xn.throwError("unknown method error",l.Yd.errors.UNKNOWN_ERROR,{method:r,params:n})}))}class Ln extends Ur{constructor(e,t){0===e.length&&xn.throwArgumentError("missing providers","providers",e);const r=e.map(((e,t)=>{if(N.zt.isProvider(e)){const t=dr(e)?2e3:750,r=1;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:r})}const r=(0,O.DC)(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=dr(e)?2e3:750),null==r.weight&&(r.weight=1);const n=r.weight;return(n%1||n>512||n<1)&&xn.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,n),Object.freeze(r)})),n=r.reduce(((e,t)=>e+t.weight),0);null==t?t=n/2:t>n&&xn.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let i=Pn(r.map((e=>e.provider.network)));null==i&&(i=new Promise(((e,t)=>{setTimeout((()=>{this.detectNetwork().then(e,t)}),0)}))),super(i),(0,O.zG)(this,"providerConfigs",Object.freeze(r)),(0,O.zG)(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return Sn(this,void 0,void 0,(function*(){return Pn(yield Promise.all(this.providerConfigs.map((e=>e.provider.getNetwork()))))}))}perform(e,t){return Sn(this,void 0,void 0,(function*(){if("sendTransaction"===e){const e=yield Promise.all(this.providerConfigs.map((e=>e.provider.sendTransaction(t.signedTransaction).then((e=>e.hash),(e=>e)))));for(let t=0;t<e.length;t++){const r=e[t];if("string"==typeof r)return r}throw e[0]}-1===this._highestBlockNumber&&"getBlockNumber"!==e&&(yield this.getBlockNumber());const r=function(e,t,r){let n=Rn;switch(t){case"getBlockNumber":return function(t){const r=t.map((e=>e.result));let n=Mn(t.map((e=>e.result)),2);if(null!=n)return n=Math.ceil(n),r.indexOf(n+1)>=0&&n++,n>=e._highestBlockNumber&&(e._highestBlockNumber=n),e._highestBlockNumber};case"getGasPrice":return function(e){const t=e.map((e=>e.result));return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return Mn(e.map((e=>e.result)))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":n=function(e){return null==e?null:((e=(0,O.DC)(e)).confirmations=-1,Rn(e))};break;case"getBlock":n=r.includeTransactions?function(e){return null==e?null:((e=(0,O.DC)(e)).transactions=e.transactions.map((e=>((e=(0,O.DC)(e)).confirmations=-1,e))),Rn(e))}:function(e){return null==e?null:Rn(e)};break;default:throw new Error("unknown method: "+t)}return function(e,t){return function(r){const n={};r.forEach((t=>{const r=e(t.result);n[r]||(n[r]={count:0,result:t.result}),n[r].count++}));const i=Object.keys(n);for(let e=0;e<i.length;e++){const r=n[i[e]];if(r.count>=t)return r.result}}}(n,e.quorum)}(this,e,t),n=_n(this.providerConfigs.map(O.DC));n.sort(((e,t)=>e.priority-t.priority));const i=this._highestBlockNumber;let o=0,s=!0;for(;;){const a=Nn();let f=n.filter((e=>e.runner&&a-e.start<e.stallTimeout)).reduce(((e,t)=>e+t.weight),0);for(;f<this.quorum&&o<n.length;){const r=n[o++],s=Cn++;r.start=Nn(),r.staller=On(r.stallTimeout),r.staller.wait((()=>{r.staller=null})),r.runner=Un(r,i,e,t).then((n=>{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:Dn(r,Nn()),request:{method:e,params:(0,O.p$)(t)},provider:this})}),(n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:Dn(r,Nn()),request:{method:e,params:(0,O.p$)(t)},provider:this})})),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:s,backend:Dn(r,null),request:{method:e,params:(0,O.p$)(t)},provider:this}),f+=r.weight}const c=[];n.forEach((e=>{!e.done&&e.runner&&(c.push(e.runner),e.staller&&c.push(e.staller.getPromise()))})),c.length&&(yield Promise.race(c));const u=n.filter((e=>e.done&&null==e.error));if(u.length>=this.quorum){const e=r(u);if(void 0!==e)return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),e;s||(yield On(100).getPromise()),s=!1}const l=n.reduce(((e,t)=>{if(!t.done||null==t.error)return e;const r=t.error.code;return In.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e}),{});if(Object.keys(l).forEach((e=>{const t=l[e];if(t.weight<this.quorum)return;n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0}));const r=t.error,i={};Bn.forEach((e=>{null!=r[e]&&(i[e]=r[e])})),xn.throwError(r.reason||r.message,e,i)})),0===n.filter((e=>!e.done)).length)break}return n.forEach((e=>{e.staller&&e.staller.cancel(),e.cancelled=!0})),xn.throwError("failed to meet quorum",l.Yd.errors.SERVER_ERROR,{method:e,params:t,results:n.map((e=>Dn(e))),provider:this})}))}}const zn=null,Gn=new l.Yd(fr),jn="84842078b09946638c03157f83405213";class Yn extends rn{constructor(e,t){const r=new qn(e,t),n=r.connection;n.password&&Gn.throwError("INFURA WebSocket project secrets unsupported",l.Yd.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"}),super(n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),e),(0,O.zG)(this,"apiKey",r.projectId),(0,O.zG)(this,"projectId",r.projectId),(0,O.zG)(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===jn}}class qn extends sn{static getWebSocketProvider(e,t){return new Yn(e,t)}static getApiKey(e){const t={apiKey:jn,projectId:jn,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(Gn.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),Gn.assertArgument("string"==typeof e.projectSecret,"invalid projectSecret","projectSecret","[REDACTED]"),t.projectId=e.projectId,t.projectSecret=e.projectSecret):e.projectId&&(t.projectId=e.projectId),t.apiKey=t.projectId),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"homestead":r="mainnet.infura.io";break;case"goerli":r="goerli.infura.io";break;case"sepolia":r="sepolia.infura.io";break;case"matic":r="polygon-mainnet.infura.io";break;case"maticmum":r="polygon-mumbai.infura.io";break;case"optimism":r="optimism-mainnet.infura.io";break;case"optimism-goerli":r="optimism-goerli.infura.io";break;case"optimism-sepolia":r="optimism-sepolia.infura.io";break;case"arbitrum":r="arbitrum-mainnet.infura.io";break;case"arbitrum-goerli":r="arbitrum-goerli.infura.io";break;case"arbitrum-sepolia":r="arbitrum-sepolia.infura.io";break;default:Gn.throwError("unsupported network",l.Yd.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===jn&&br(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}isCommunityResource(){return this.projectId===jn}}class Kn extends Xr{send(e,t){const r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);const n={request:r,resolve:null,reject:null},i=new Promise(((e,t)=>{n.resolve=e,n.reject=t}));return this._pendingBatch.push(n),this._pendingBatchAggregator||(this._pendingBatchAggregator=setTimeout((()=>{const e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;const t=e.map((e=>e.request));return this.emit("debug",{action:"requestBatch",request:(0,O.p$)(t),provider:this}),ir(this.connection,JSON.stringify(t)).then((r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach(((e,t)=>{const n=r[t];if(n.error){const t=new Error(n.error.message);t.code=n.error.code,t.data=n.error.data,e.reject(t)}else e.resolve(n.result)}))}),(r=>{this.emit("debug",{action:"response",error:r,request:t,provider:this}),e.forEach((e=>{e.reject(r)}))}))}),10)),i}}const Hn=new l.Yd(fr);class Vn extends sn{static getApiKey(e){return e&&"string"!=typeof e&&Hn.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){Hn.warn("NodeSmith will be discontinued on 2019-12-20; please migrate to another platform.");let r=null;switch(e.name){case"homestead":r="https://ethereum.api.nodesmith.io/v1/mainnet/jsonrpc";break;case"ropsten":r="https://ethereum.api.nodesmith.io/v1/ropsten/jsonrpc";break;case"rinkeby":r="https://ethereum.api.nodesmith.io/v1/rinkeby/jsonrpc";break;case"goerli":r="https://ethereum.api.nodesmith.io/v1/goerli/jsonrpc";break;case"kovan":r="https://ethereum.api.nodesmith.io/v1/kovan/jsonrpc";break;default:Hn.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}const Jn=new l.Yd(fr),Wn="62e1ad51b37b8e00394bda3b";class Qn extends sn{static getApiKey(e){const t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=Wn:"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:Jn.throwArgumentError("unsupported PocketProvider apiKey","apiKey",e),t}static getUrl(e,t){let r=null;switch(e?e.name:"unknown"){case"goerli":r="eth-goerli.gateway.pokt.network";break;case"homestead":r="eth-mainnet.gateway.pokt.network";break;case"kovan":r="poa-kovan.gateway.pokt.network";break;case"matic":r="poly-mainnet.gateway.pokt.network";break;case"maticmum":r="polygon-mumbai-rpc.gateway.pokt.network";break;case"rinkeby":r="eth-rinkeby.gateway.pokt.network";break;case"ropsten":r="eth-ropsten.gateway.pokt.network";break;default:Jn.throwError("unsupported network",l.Yd.errors.INVALID_ARGUMENT,{argument:"network",value:e})}const n={headers:{},url:`https://${r}/v1/lb/${t.applicationId}`};return null!=t.applicationSecretKey&&(n.user="",n.password=t.applicationSecretKey),n}isCommunityResource(){return this.applicationId===Wn}}const Xn=new l.Yd(fr);class $n extends sn{static getApiKey(e){return e&&"string"!=typeof e&&Xn.throwArgumentError("invalid apiKey","apiKey",e),e||"919b412a057b5e9c9b6dce193c5a60242d6efadb"}static getUrl(e,t){let r=null;switch(e.name){case"homestead":r="ethers.quiknode.pro";break;case"goerli":r="ethers.ethereum-goerli.quiknode.pro";break;case"sepolia":r="ethers.ethereum-sepolia.quiknode.pro";break;case"holesky":r="ethers.ethereum-holesky.quiknode.pro";break;case"arbitrum":r="ethers.arbitrum-mainnet.quiknode.pro";break;case"arbitrum-goerli":r="ethers.arbitrum-goerli.quiknode.pro";break;case"arbitrum-sepolia":r="ethers.arbitrum-sepolia.quiknode.pro";break;case"base":r="ethers.base-mainnet.quiknode.pro";break;case"base-goerli":r="ethers.base-goerli.quiknode.pro";break;case"base-spolia":r="ethers.base-sepolia.quiknode.pro";break;case"bnb":r="ethers.bsc.quiknode.pro";break;case"bnbt":r="ethers.bsc-testnet.quiknode.pro";break;case"matic":r="ethers.matic.quiknode.pro";break;case"maticmum":r="ethers.matic-testnet.quiknode.pro";break;case"optimism":r="ethers.optimism.quiknode.pro";break;case"optimism-goerli":r="ethers.optimism-goerli.quiknode.pro";break;case"optimism-sepolia":r="ethers.optimism-sepolia.quiknode.pro";break;case"xdai":r="ethers.xdai.quiknode.pro";break;default:Xn.throwArgumentError("unsupported network","network",arguments[0])}return"https://"+r+"/"+t}}const Zn=new l.Yd(fr);let ei=1;function ti(e,t){const r="Web3LegacyFetcher";return function(e,n){const i={method:e,params:n,id:ei++,jsonrpc:"2.0"};return new Promise(((e,n)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,O.p$)(i),provider:this}),t(i,((t,o)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:i,provider:this}),n(t);if(this.emit("debug",{action:"response",fetcher:r,request:i,response:o,provider:this}),o.error){const e=new Error(o.error.message);return e.code=o.error.code,e.data=o.error.data,n(e)}e(o.result)}))}))}}class ri extends Xr{constructor(e,t){null==e&&Zn.throwArgumentError("missing provider","provider",e);let r=null,n=null,i=null;"function"==typeof e?(r="unknown:",n=e):(r=e.host||e.path||"",!r&&e.isMetaMask&&(r="metamask"),i=e,e.request?(""===r&&(r="eip-1193:"),n=function(e){return function(t,r){null==r&&(r=[]);const n={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,O.p$)(n),provider:this}),e.request(n).then((e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:n,error:e,provider:this}),e}))}}(e)):e.sendAsync?n=ti(0,e.sendAsync.bind(e)):e.send?n=ti(0,e.send.bind(e)):Zn.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),(0,O.zG)(this,"jsonRpcFetchFunc",n),(0,O.zG)(this,"provider",i)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}const ni=new l.Yd(fr);function ii(e,t){if(null==e&&(e="homestead"),"string"==typeof e){const t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new Xr(e);case"ws":case"wss":return new rn(e);default:ni.throwArgumentError("unsupported URL scheme","network",e)}}const r=Et(e);return r&&r._defaultProvider||ni.throwError("unsupported getDefaultProvider network",l.Yd.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:Ln,AlchemyProvider:un,AnkrProvider:bn,CloudflareProvider:mn,EtherscanProvider:Tn,InfuraProvider:qn,JsonRpcProvider:Xr,NodesmithProvider:Vn,PocketProvider:Qn,QuickNodeProvider:$n,Web3Provider:ri,IpcProvider:zn},t)}var oi=r(780),si=r(155),ai=r(848),fi=r(268);const ci=new RegExp("^bytes([0-9]+)$"),ui=new RegExp("^(u?int)([0-9]*)$"),li=new RegExp("^(.*)\\[([0-9]*)\\]$"),di="0000000000000000000000000000000000000000000000000000000000000000",hi=new l.Yd("solidity/5.8.0");function bi(e,t,r){switch(e){case"address":return r?(0,u.Bu)(t,32):(0,u.lE)(t);case"string":return(0,M.Y0)(t);case"bytes":return(0,u.lE)(t);case"bool":return t=t?"0x01":"0x00",r?(0,u.Bu)(t,32):(0,u.lE)(t)}let n=e.match(ui);if(n){let i=parseInt(n[2]||"256");return(n[2]&&String(i)!==n[2]||i%8!=0||0===i||i>256)&&hi.throwArgumentError("invalid number type","type",e),r&&(i=256),t=c.O$.from(t).toTwos(i),(0,u.Bu)(t,i/8)}if(n=e.match(ci),n){const i=parseInt(n[1]);return(String(i)!==n[1]||0===i||i>32)&&hi.throwArgumentError("invalid bytes type","type",e),(0,u.lE)(t).byteLength!==i&&hi.throwArgumentError(`invalid value for ${e}`,"value",t),r?(0,u.lE)((t+di).substring(0,66)):t}if(n=e.match(li),n&&Array.isArray(t)){const r=n[1];parseInt(n[2]||String(t.length))!=t.length&&hi.throwArgumentError(`invalid array length for ${e}`,"value",t);const i=[];return t.forEach((function(e){i.push(bi(r,e,!0))})),(0,u.zo)(i)}return hi.throwArgumentError("invalid type","type",e)}function pi(e,t){e.length!=t.length&&hi.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(bi(e,t[n]))})),(0,u.Dv)((0,u.zo)(r))}function mi(e,t){return(0,P.w)(pi(e,t))}function yi(e,t){return ie(pi(e,t))}var gi=r(648);function vi(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach((e=>{let i=e.split(":");r+=parseInt(i[0],16),n[r]=t(i[1])})),n}function wi(e){let t=0;return e.split(",").map((e=>{let r=e.split("-");1===r.length?r[1]="0":""===r[1]&&(r[1]="1");let n=t+parseInt(r[0],16);return t=parseInt(r[1],16),{l:n,h:t}}))}function Ai(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n];if(r+=i.l,e>=r&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}const Ei=wi("221,13-1b,5f-,40-10,51-f,11-3,3-3,2-2,2-4,8,2,15,2d,28-8,88,48,27-,3-5,11-20,27-,8,28,3-5,12,18,b-a,1c-4,6-16,2-d,2-2,2,1b-4,17-9,8f-,10,f,1f-2,1c-34,33-14e,4,36-,13-,6-2,1a-f,4,9-,3-,17,8,2-2,5-,2,8-,3-,4-8,2-3,3,6-,16-6,2-,7-3,3-,17,8,3,3,3-,2,6-3,3-,4-a,5,2-6,10-b,4,8,2,4,17,8,3,6-,b,4,4-,2-e,2-4,b-10,4,9-,3-,17,8,3-,5-,9-2,3-,4-7,3-3,3,4-3,c-10,3,7-2,4,5-2,3,2,3-2,3-2,4-2,9,4-3,6-2,4,5-8,2-e,d-d,4,9,4,18,b,6-3,8,4,5-6,3-8,3-3,b-11,3,9,4,18,b,6-3,8,4,5-6,3-6,2,3-3,b-11,3,9,4,18,11-3,7-,4,5-8,2-7,3-3,b-11,3,13-2,19,a,2-,8-2,2-3,7,2,9-11,4-b,3b-3,1e-24,3,2-,3,2-,2-5,5,8,4,2,2-,3,e,4-,6,2,7-,b-,3-21,49,23-5,1c-3,9,25,10-,2-2f,23,6,3,8-2,5-5,1b-45,27-9,2a-,2-3,5b-4,45-4,53-5,8,40,2,5-,8,2,5-,28,2,5-,20,2,5-,8,2,5-,8,8,18,20,2,5-,8,28,14-5,1d-22,56-b,277-8,1e-2,52-e,e,8-a,18-8,15-b,e,4,3-b,5e-2,b-15,10,b-5,59-7,2b-555,9d-3,5b-5,17-,7-,27-,7-,9,2,2,2,20-,36,10,f-,7,14-,4,a,54-3,2-6,6-5,9-,1c-10,13-1d,1c-14,3c-,10-6,32-b,240-30,28-18,c-14,a0,115-,3,66-,b-76,5,5-,1d,24,2,5-2,2,8-,35-2,19,f-10,1d-3,311-37f,1b,5a-b,d7-19,d-3,41,57-,68-4,29-3,5f,29-37,2e-2,25-c,2c-2,4e-3,30,78-3,64-,20,19b7-49,51a7-59,48e-2,38-738,2ba5-5b,222f-,3c-94,8-b,6-4,1b,6,2,3,3,6d-20,16e-f,41-,37-7,2e-2,11-f,5-b,18-,b,14,5-3,6,88-,2,bf-2,7-,7-,7-,4-2,8,8-9,8-2ff,20,5-b,1c-b4,27-,27-cbb1,f7-9,28-2,b5-221,56,48,3-,2-,3-,5,d,2,5,3,42,5-,9,8,1d,5,6,2-2,8,153-3,123-3,33-27fd,a6da-5128,21f-5df,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3-fffd,3,2-1d,61-ff7d"),ki="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map((e=>parseInt(e,16))),Ti=[{h:25,s:32,l:65},{h:30,s:32,e:[23],l:127},{h:54,s:1,e:[48],l:64,d:2},{h:14,s:1,l:57,d:2},{h:44,s:1,l:17,d:2},{h:10,s:1,e:[2,6,8],l:61,d:2},{h:16,s:1,l:68,d:2},{h:84,s:1,e:[18,24,66],l:19,d:2},{h:26,s:32,e:[17],l:435},{h:22,s:1,l:71,d:2},{h:15,s:80,l:40},{h:31,s:32,l:16},{h:32,s:1,l:80,d:2},{h:52,s:1,l:42,d:2},{h:12,s:1,l:55,d:2},{h:40,s:1,e:[38],l:15,d:2},{h:14,s:1,l:48,d:2},{h:37,s:48,l:49},{h:148,s:1,l:6351,d:2},{h:88,s:1,l:160,d:2},{h:15,s:16,l:704},{h:25,s:26,l:854},{h:25,s:32,l:55915},{h:37,s:40,l:1247},{h:25,s:-119711,l:53248},{h:25,s:-119763,l:52},{h:25,s:-119815,l:52},{h:25,s:-119867,e:[1,4,5,7,8,11,12,17],l:52},{h:25,s:-119919,l:52},{h:24,s:-119971,e:[2,7,8,17],l:52},{h:24,s:-120023,e:[2,7,13,15,16,17],l:52},{h:25,s:-120075,l:52},{h:25,s:-120127,l:52},{h:25,s:-120179,l:52},{h:25,s:-120231,l:52},{h:25,s:-120283,l:52},{h:25,s:-120335,l:52},{h:24,s:-119543,e:[17],l:56},{h:24,s:-119601,e:[17],l:58},{h:24,s:-119659,e:[17],l:58},{h:24,s:-119717,e:[17],l:58},{h:24,s:-119775,e:[17],l:58}],_i=vi("b5:3bc,c3:ff,7:73,2:253,5:254,3:256,1:257,5:259,1:25b,3:260,1:263,2:269,1:268,5:26f,1:272,2:275,7:280,3:283,5:288,3:28a,1:28b,5:292,3f:195,1:1bf,29:19e,125:3b9,8b:3b2,1:3b8,1:3c5,3:3c6,1:3c0,1a:3ba,1:3c1,1:3c3,2:3b8,1:3b5,1bc9:3b9,1c:1f76,1:1f77,f:1f7a,1:1f7b,d:1f78,1:1f79,1:1f7c,1:1f7d,107:63,5:25b,4:68,1:68,1:68,3:69,1:69,1:6c,3:6e,4:70,1:71,1:72,1:72,1:72,7:7a,2:3c9,2:7a,2:6b,1:e5,1:62,1:63,3:65,1:66,2:6d,b:3b3,1:3c0,6:64,1b574:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3,20:3b8,1a:3c3"),Si=vi("179:1,2:1,2:1,5:1,2:1,a:4f,a:1,8:1,2:1,2:1,3:1,5:1,3:1,4:1,2:1,3:1,4:1,8:2,1:1,2:2,1:1,2:2,27:2,195:26,2:25,1:25,1:25,2:40,2:3f,1:3f,33:1,11:-6,1:-9,1ac7:-3a,6d:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,b:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,c:-8,2:-8,2:-8,2:-8,9:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,1:-8,49:-8,1:-8,1:-4a,1:-4a,d:-56,1:-56,1:-56,1:-56,d:-8,1:-8,f:-8,1:-8,3:-7"),xi=vi("df:00730073,51:00690307,19:02BC006E,a7:006A030C,18a:002003B9,16:03B903080301,20:03C503080301,1d7:05650582,190f:00680331,1:00740308,1:0077030A,1:0079030A,1:006102BE,b6:03C50313,2:03C503130300,2:03C503130301,2:03C503130342,2a:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F0003B9,1:1F0103B9,1:1F0203B9,1:1F0303B9,1:1F0403B9,1:1F0503B9,1:1F0603B9,1:1F0703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F2003B9,1:1F2103B9,1:1F2203B9,1:1F2303B9,1:1F2403B9,1:1F2503B9,1:1F2603B9,1:1F2703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,1:1F6003B9,1:1F6103B9,1:1F6203B9,1:1F6303B9,1:1F6403B9,1:1F6503B9,1:1F6603B9,1:1F6703B9,3:1F7003B9,1:03B103B9,1:03AC03B9,2:03B10342,1:03B1034203B9,5:03B103B9,6:1F7403B9,1:03B703B9,1:03AE03B9,2:03B70342,1:03B7034203B9,5:03B703B9,6:03B903080300,1:03B903080301,3:03B90342,1:03B903080342,b:03C503080300,1:03C503080301,1:03C10313,2:03C50342,1:03C503080342,b:1F7C03B9,1:03C903B9,1:03CE03B9,2:03C90342,1:03C9034203B9,5:03C903B9,ac:00720073,5b:00B00063,6:00B00066,d:006E006F,a:0073006D,1:00740065006C,1:0074006D,124f:006800700061,2:00610075,2:006F0076,b:00700061,1:006E0061,1:03BC0061,1:006D0061,1:006B0061,1:006B0062,1:006D0062,1:00670062,3:00700066,1:006E0066,1:03BC0066,4:0068007A,1:006B0068007A,1:006D0068007A,1:00670068007A,1:00740068007A,15:00700061,1:006B00700061,1:006D00700061,1:006700700061,8:00700076,1:006E0076,1:03BC0076,1:006D0076,1:006B0076,1:006D0076,1:00700077,1:006E0077,1:03BC0077,1:006D0077,1:006B0077,1:006D0077,1:006B03C9,1:006D03C9,2:00620071,3:00632215006B0067,1:0063006F002E,1:00640062,1:00670079,2:00680070,2:006B006B,1:006B006D,9:00700068,2:00700070006D,1:00700072,2:00730076,1:00770062,c723:00660066,1:00660069,1:0066006C,1:006600660069,1:00660066006C,1:00730074,1:00730074,d:05740576,1:05740565,1:0574056B,1:057E0576,1:0574056D",(function(e){if(e.length%4!=0)throw new Error("bad data");let t=[];for(let r=0;r<e.length;r+=4)t.push(parseInt(e.substring(r,r+4),16));return t})),Ni=wi("80-20,2a0-,39c,32,f71,18e,7f2-f,19-7,30-4,7-5,f81-b,5,a800-20ff,4d1-1f,110,fa-6,d174-7,2e84-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,ffff-,2,1f-5f,ff7f-20001");function Pi(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();let t=(0,M.XL)(e);var r;r=t.map((e=>{if(ki.indexOf(e)>=0)return[];if(e>=65024&&e<=65039)return[];let t=function(e){let t=Ai(e,Ti);if(t)return[e+t.s];let r=_i[e];if(r)return r;let n=Si[e];return n?[e+n[0]]:xi[e]||null}(e);return t||[e]})),t=r.reduce(((e,t)=>(t.forEach((t=>{e.push(t)})),e)),[]),t=(0,M.XL)((0,M.uu)(t),M.Uj.NFKC),t.forEach((e=>{if(Ai(e,Ni))throw new Error("STRINGPREP_CONTAINS_PROHIBITED")})),t.forEach((e=>{if(Ai(e,Ei))throw new Error("STRINGPREP_CONTAINS_UNASSIGNED")}));let n=(0,M.uu)(t);if("-"===n.substring(0,1)||"--"===n.substring(2,4)||"-"===n.substring(n.length-1))throw new Error("invalid hyphen");return n}function Mi(e){const t=(0,M.Y0)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,u.Dv)((0,u.zo)([t,ht]).slice(0,32))}function Ri(e){const t=(0,u.lE)(e);if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,M.ZN)(t.slice(0,r))}const Ci=new l.Yd("units/5.8.0"),Oi=["wei","kwei","mwei","gwei","szabo","finney","ether"];function Ii(e){const t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&Ci.throwArgumentError("invalid value","value",e);let r=t[0],n="";for("-"===r.substring(0,1)&&(n="-",r=r.substring(1));"0"===r.substring(0,1);)r=r.substring(1);""===r&&(r="0");let i="";for(2===t.length&&(i="."+(t[1]||"0"));i.length>2&&"0"===i[i.length-1];)i=i.substring(0,i.length-1);const o=[];for(;r.length;){if(r.length<=3){o.unshift(r);break}{const e=r.length-3;o.unshift(r.substring(e)),r=r.substring(0,e)}}return n+o.join(",")+i}function Bi(e,t){if("string"==typeof t){const e=Oi.indexOf(t);-1!==e&&(t=3*e)}return w(e,null!=t?t:18)}function Di(e,t){if("string"!=typeof e&&Ci.throwArgumentError("value must be a string","value",e),"string"==typeof t){const e=Oi.indexOf(t);-1!==e&&(t=3*e)}return A(e,null!=t?t:18)}function Fi(e){return Bi(e,18)}function Ui(e){return Di(e,18)}const Li="ethers/5.8.0",zi=new l.Yd(Li);try{const e=window;null==e._ethers&&(e._ethers=a)}catch(e){}},485:(e,t,r)=>{var n=t;n.utils=r(212),n.common=r(916),n.sha=r(530),n.ripemd=r(396),n.hmac=r(47),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},916:(e,t,r)=>{"use strict";var n=r(212),i=r(561);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},47:(e,t,r)=>{"use strict";var n=r(212),i=r(561);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},396:(e,t,r)=>{"use strict";var n=r(212),i=r(916),o=n.rotl32,s=n.sum32,a=n.sum32_3,f=n.sum32_4,c=i.BlockHash;function u(){if(!(this instanceof u))return new u;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function d(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(u,c),t.ripemd160=u,u.blockSize=512,u.outSize=160,u.hmacStrength=192,u.padLength=64,u.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],u=this.h[4],g=r,v=n,w=i,A=c,E=u,k=0;k<80;k++){var T=s(o(f(r,l(k,n,i,c),e[b[k]+t],d(k)),m[k]),u);r=u,u=c,c=o(i,10),i=n,n=T,T=s(o(f(g,l(79-k,v,w,A),e[p[k]+t],h(k)),y[k]),E),g=E,E=A,A=o(w,10),w=v,v=T}T=a(this.h[1],i,A),this.h[1]=a(this.h[2],c,E),this.h[2]=a(this.h[3],u,g),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=T},u.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var b=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],p=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},530:(e,t,r)=>{"use strict";t.sha1=r(79),t.sha224=r(823),t.sha256=r(32),t.sha384=r(328),t.sha512=r(168)},79:(e,t,r)=>{"use strict";var n=r(212),i=r(916),o=r(713),s=n.rotl32,a=n.sum32,f=n.sum32_5,c=o.ft_1,u=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function d(){if(!(this instanceof d))return new d;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(d,u),e.exports=d,d.blockSize=512,d.outSize=160,d.hmacStrength=80,d.padLength=64,d.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],u=this.h[2],d=this.h[3],h=this.h[4];for(n=0;n<r.length;n++){var b=~~(n/20),p=f(s(i,5),c(b,o,u,d),h,r[n],l[b]);h=d,d=u,u=s(o,30),o=i,i=p}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],u),this.h[3]=a(this.h[3],d),this.h[4]=a(this.h[4],h)},d.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},823:(e,t,r)=>{"use strict";var n=r(212),i=r(32);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},32:(e,t,r)=>{"use strict";var n=r(212),i=r(916),o=r(713),s=r(561),a=n.sum32,f=n.sum32_4,c=n.sum32_5,u=o.ch32,l=o.maj32,d=o.s0_256,h=o.s1_256,b=o.g0_256,p=o.g1_256,m=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function g(){if(!(this instanceof g))return new g;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(g,m),e.exports=g,g.blockSize=512,g.outSize=256,g.hmacStrength=192,g.padLength=64,g.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=f(p(r[n-2]),r[n-7],b(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],m=this.h[2],y=this.h[3],g=this.h[4],v=this.h[5],w=this.h[6],A=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var E=c(A,h(g),u(g,v,w),this.k[n],r[n]),k=a(d(i),l(i,o,m));A=w,w=v,v=g,g=a(y,E),y=m,m=o,o=i,i=a(E,k)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],m),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],g),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],A)},g.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},328:(e,t,r)=>{"use strict";var n=r(212),i=r(168);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},168:(e,t,r)=>{"use strict";var n=r(212),i=r(916),o=r(561),s=n.rotr64_hi,a=n.rotr64_lo,f=n.shr64_hi,c=n.shr64_lo,u=n.sum64,l=n.sum64_hi,d=n.sum64_lo,h=n.sum64_4_hi,b=n.sum64_4_lo,p=n.sum64_5_hi,m=n.sum64_5_lo,y=i.BlockHash,g=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=g,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function A(e,t,r,n,i,o){var s=t&n^~t&o;return s<0&&(s+=4294967296),s}function E(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function k(e,t,r,n,i,o){var s=t&n^t&o^n&o;return s<0&&(s+=4294967296),s}function T(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function _(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function S(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,1)^s(e,t,8)^f(e,t,7);return r<0&&(r+=4294967296),r}function N(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,y),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(m=r[n-4],y=r[n-3],g=void 0,(g=s(m,y,19)^s(y,m,29)^f(m,y,6))<0&&(g+=4294967296),g),o=P(r[n-4],r[n-3]),a=r[n-14],c=r[n-13],u=x(r[n-30],r[n-29]),l=N(r[n-30],r[n-29]),d=r[n-32],p=r[n-31];r[n]=h(i,o,a,c,u,l,d,p),r[n+1]=b(i,o,a,c,u,l,d,p)}var m,y,g},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,a=this.W,f=this.h[0],c=this.h[1],h=this.h[2],b=this.h[3],y=this.h[4],g=this.h[5],v=this.h[6],x=this.h[7],N=this.h[8],P=this.h[9],M=this.h[10],R=this.h[11],C=this.h[12],O=this.h[13],I=this.h[14],B=this.h[15];o(this.k.length===a.length);for(var D=0;D<a.length;D+=2){var F=I,U=B,L=(i=void 0,(i=s(r=N,n=P,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),z=S(N,P),G=w(N,0,M,0,C),j=A(0,P,0,R,0,O),Y=this.k[D],q=this.k[D+1],K=a[D],H=a[D+1],V=p(F,U,L,z,G,j,Y,q,K,H),J=m(F,U,L,z,G,j,Y,q,K,H);F=T(f,c),U=_(f,c),L=E(f,0,h,0,y),z=k(0,c,0,b,0,g);var W=l(F,U,L,z),Q=d(F,U,L,z);I=C,B=O,C=M,O=R,M=N,R=P,N=l(v,x,V,J),P=d(x,x,V,J),v=y,x=g,y=h,g=b,h=f,b=c,f=l(V,J,W,Q),c=d(V,J,W,Q)}u(this.h,0,f,c),u(this.h,2,h,b),u(this.h,4,y,g),u(this.h,6,v,x),u(this.h,8,N,P),u(this.h,10,M,R),u(this.h,12,C,O),u(this.h,14,I,B)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},713:(e,t,r)=>{"use strict";var n=r(212).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},212:(e,t,r)=>{"use strict";var n=r(561),i=r(285);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function f(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=s(i)),r+=f(i.toString(16))}return r},t.zero2=a,t.zero8=f,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var s=new Array(o/4),a=0,f=t;a<s.length;a++,f+=4){var c;c="big"===i?e[f]<<24|e[f+1]<<16|e[f+2]<<8|e[f+3]:e[f+3]<<24|e[f+2]<<16|e[f+1]<<8|e[f],s[a]=c>>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o<n?1:0)+r+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var f=0,c=t;return f+=(c=c+n>>>0)<t?1:0,f+=(c=c+o>>>0)<o?1:0,e+r+i+s+(f+=(c=c+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,f,c){var u=0,l=t;return u+=(l=l+n>>>0)<t?1:0,u+=(l=l+o>>>0)<o?1:0,u+=(l=l+a>>>0)<a?1:0,e+r+i+s+f+(u+=(l=l+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,f,c){return t+n+o+a+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},285:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},669:(e,t,r)=>{var n;!function(){"use strict";var i="input is invalid type",o="object"==typeof window,s=o?window:{};s.JS_SHA3_NO_WINDOW&&(o=!1);var a=!o&&"object"==typeof self;!s.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?s=r.g:a&&(s=self);var f=!s.JS_SHA3_NO_COMMON_JS&&e.exports,c=r.amdO,u=!s.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,l="0123456789abcdef".split(""),d=[4,1024,262144,67108864],h=[0,8,16,24],b=[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],p=[224,256,384,512],m=[128,256],y=["hex","buffer","arrayBuffer","array","digest"],g={128:168,256:136};!s.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!u||!s.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"==typeof e&&e.buffer&&e.buffer.constructor===ArrayBuffer});for(var v=function(e,t,r){return function(n){return new I(e,t,e).update(n)[r]()}},w=function(e,t,r){return function(n,i){return new I(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return S["cshake"+e].update(t,n,i,o)[r]()}},E=function(e,t,r){return function(t,n,i,o){return S["kmac"+e].update(t,n,i,o)[r]()}},k=function(e,t,r,n){for(var i=0;i<y.length;++i){var o=y[i];e[o]=t(r,n,o)}return e},T=function(e,t){var r=v(e,t,"hex");return r.create=function(){return new I(e,t,e)},r.update=function(e){return r.create().update(e)},k(r,v,e,t)},_=[{name:"keccak",padding:[1,256,65536,16777216],bits:p,createMethod:T},{name:"sha3",padding:[6,1536,393216,100663296],bits:p,createMethod:T},{name:"shake",padding:[31,7936,2031616,520093696],bits:m,createMethod:function(e,t){var r=w(e,t,"hex");return r.create=function(r){return new I(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},k(r,w,e,t)}},{name:"cshake",padding:d,bits:m,createMethod:function(e,t){var r=g[e],n=A(e,0,"hex");return n.create=function(n,i,o){return i||o?new I(e,t,n).bytepad([i,o],r):S["shake"+e].create(n)},n.update=function(e,t,r,i){return n.create(t,r,i).update(e)},k(n,A,e,t)}},{name:"kmac",padding:d,bits:m,createMethod:function(e,t){var r=g[e],n=E(e,0,"hex");return n.create=function(n,i,o){return new B(e,t,i).bytepad(["KMAC",o],r).bytepad([n],r)},n.update=function(e,t,r,i){return n.create(e,r,i).update(t)},k(n,E,e,t)}}],S={},x=[],N=0;N<_.length;++N)for(var P=_[N],M=P.bits,R=0;R<M.length;++R){var C=P.name+"_"+M[R];if(x.push(C),S[C]=P.createMethod(M[R],P.padding),"sha3"!==P.name){var O=P.name+M[R];x.push(O),S[O]=S[C]}}function I(e,t,r){this.blocks=[],this.s=[],this.padding=t,this.outputBits=r,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(e<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3;for(var n=0;n<50;++n)this.s[n]=0}function B(e,t,r){I.call(this,e,t,r)}I.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}for(var n,o,s=this.blocks,a=this.byteCount,f=e.length,c=this.blockCount,l=0,d=this.s;l<f;){if(this.reset)for(this.reset=!1,s[0]=this.block,n=1;n<c+1;++n)s[n]=0;if(t)for(n=this.start;l<f&&n<a;++l)s[n>>2]|=e[l]<<h[3&n++];else for(n=this.start;l<f&&n<a;++l)(o=e.charCodeAt(l))<128?s[n>>2]|=o<<h[3&n++]:o<2048?(s[n>>2]|=(192|o>>6)<<h[3&n++],s[n>>2]|=(128|63&o)<<h[3&n++]):o<55296||o>=57344?(s[n>>2]|=(224|o>>12)<<h[3&n++],s[n>>2]|=(128|o>>6&63)<<h[3&n++],s[n>>2]|=(128|63&o)<<h[3&n++]):(o=65536+((1023&o)<<10|1023&e.charCodeAt(++l)),s[n>>2]|=(240|o>>18)<<h[3&n++],s[n>>2]|=(128|o>>12&63)<<h[3&n++],s[n>>2]|=(128|o>>6&63)<<h[3&n++],s[n>>2]|=(128|63&o)<<h[3&n++]);if(this.lastByteIndex=n,n>=a){for(this.start=n-a,this.block=s[c],n=0;n<c;++n)d[n]^=s[n];D(d),this.reset=!0}else this.start=n}return this},I.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(r=255&(e>>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},I.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(i);if(null===e)throw new Error(i);if(u&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||u&&ArrayBuffer.isView(e)))throw new Error(i);t=!0}var n=0,o=e.length;if(t)n=o;else for(var s=0;s<e.length;++s){var a=e.charCodeAt(s);a<128?n+=1:a<2048?n+=2:a<55296||a>=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++s)),n+=4)}return n+=this.encode(8*n),this.update(e),n},I.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n<e.length;++n)r+=this.encodeString(e[n]);var i=t-r%t,o=[];return o.length=i,this.update(o),this},I.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex,r=this.blockCount,n=this.s;if(e[t>>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];D(n)}},I.prototype.toString=I.prototype.hex=function(){this.finalize();for(var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a="";s<n;){for(o=0;o<t&&s<n;++o,++s)e=r[o],a+=l[e>>4&15]+l[15&e]+l[e>>12&15]+l[e>>8&15]+l[e>>20&15]+l[e>>16&15]+l[e>>28&15]+l[e>>24&15];s%t==0&&(D(r),o=0)}return i&&(e=r[o],a+=l[e>>4&15]+l[15&e],i>1&&(a+=l[e>>12&15]+l[e>>8&15]),i>2&&(a+=l[e>>20&15]+l[e>>16&15])),a},I.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,s=0,a=this.outputBits>>3;e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var f=new Uint32Array(e);s<n;){for(o=0;o<t&&s<n;++o,++s)f[s]=r[o];s%t==0&&D(r)}return i&&(f[o]=r[o],e=e.slice(0,a)),e},I.prototype.buffer=I.prototype.arrayBuffer,I.prototype.digest=I.prototype.array=function(){this.finalize();for(var e,t,r=this.blockCount,n=this.s,i=this.outputBlocks,o=this.extraBytes,s=0,a=0,f=[];a<i;){for(s=0;s<r&&a<i;++s,++a)e=a<<2,t=n[s],f[e]=255&t,f[e+1]=t>>8&255,f[e+2]=t>>16&255,f[e+3]=t>>24&255;a%r==0&&D(n)}return o&&(e=a<<2,t=n[s],f[e]=255&t,o>1&&(f[e+1]=t>>8&255),o>2&&(f[e+2]=t>>16&255)),f},B.prototype=new I,B.prototype.finalize=function(){return this.encode(this.outputBits,!0),I.prototype.finalize.call(this)};var D=function(e){var t,r,n,i,o,s,a,f,c,u,l,d,h,p,m,y,g,v,w,A,E,k,T,_,S,x,N,P,M,R,C,O,I,B,D,F,U,L,z,G,j,Y,q,K,H,V,J,W,Q,X,$,Z,ee,te,re,ne,ie,oe,se,ae,fe,ce,ue;for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],a=e[3]^e[13]^e[23]^e[33]^e[43],f=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],u=e[6]^e[16]^e[26]^e[36]^e[46],l=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|a>>>31),r=(h=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(f<<1|c>>>31),r=o^(c<<1|f>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(u<<1|l>>>31),r=a^(l<<1|u>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=f^(d<<1|h>>>31),r=c^(h<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=u^(i<<1|o>>>31),r=l^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],m=e[1],V=e[11]<<4|e[10]>>>28,J=e[10]<<4|e[11]>>>28,P=e[20]<<3|e[21]>>>29,M=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,fe=e[30]<<9|e[31]>>>23,Y=e[40]<<18|e[41]>>>14,q=e[41]<<18|e[40]>>>14,B=e[2]<<1|e[3]>>>31,D=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,g=e[12]<<12|e[13]>>>20,W=e[22]<<10|e[23]>>>22,Q=e[23]<<10|e[22]>>>22,R=e[33]<<13|e[32]>>>19,C=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,ue=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,F=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,v=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,X=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,O=e[45]<<29|e[44]>>>3,I=e[44]<<29|e[45]>>>3,_=e[6]<<28|e[7]>>>4,S=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,L=e[26]<<25|e[27]>>>7,z=e[27]<<25|e[26]>>>7,A=e[36]<<21|e[37]>>>11,E=e[37]<<21|e[36]>>>11,Z=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,K=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,x=e[18]<<20|e[19]>>>12,N=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,se=e[28]<<7|e[29]>>>25,G=e[38]<<8|e[39]>>>24,j=e[39]<<8|e[38]>>>24,k=e[48]<<14|e[49]>>>18,T=e[49]<<14|e[48]>>>18,e[0]=p^~y&v,e[1]=m^~g&w,e[10]=_^~x&P,e[11]=S^~N&M,e[20]=B^~F&L,e[21]=D^~U&z,e[30]=K^~V&W,e[31]=H^~J&Q,e[40]=te^~ne&oe,e[41]=re^~ie&se,e[2]=y^~v&A,e[3]=g^~w&E,e[12]=x^~P&R,e[13]=N^~M&C,e[22]=F^~L&G,e[23]=U^~z&j,e[32]=V^~W&X,e[33]=J^~Q&$,e[42]=ne^~oe&ae,e[43]=ie^~se&fe,e[4]=v^~A&k,e[5]=w^~E&T,e[14]=P^~R&O,e[15]=M^~C&I,e[24]=L^~G&Y,e[25]=z^~j&q,e[34]=W^~X&Z,e[35]=Q^~$&ee,e[44]=oe^~ae&ce,e[45]=se^~fe&ue,e[6]=A^~k&p,e[7]=E^~T&m,e[16]=R^~O&_,e[17]=C^~I&S,e[26]=G^~Y&B,e[27]=j^~q&D,e[36]=X^~Z&K,e[37]=$^~ee&H,e[46]=ae^~ce&te,e[47]=fe^~ue&re,e[8]=k^~p&y,e[9]=T^~m&g,e[18]=O^~_&x,e[19]=I^~S&N,e[28]=Y^~B&F,e[29]=q^~D&U,e[38]=Z^~K&V,e[39]=ee^~H&J,e[48]=ce^~te&ne,e[49]=ue^~re&ie,e[0]^=b[n],e[1]^=b[n+1]};if(f)e.exports=S;else{for(N=0;N<x.length;++N)s[x[N]]=S[x[N]];c&&(void 0===(n=function(){return S}.call(t,r,t,e))||(e.exports=n))}}()},561:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},689:function(e){"use strict";!function(t){const r=2147483647;function n(e){const t=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]);let r=1779033703,n=3144134277,i=1013904242,o=2773480762,s=1359893119,a=2600822924,f=528734635,c=1541459225;const u=new Uint32Array(64);function l(e){let l=0,d=e.length;for(;d>=64;){let h,b,p,m,y,g=r,v=n,w=i,A=o,E=s,k=a,T=f,_=c;for(b=0;b<16;b++)p=l+4*b,u[b]=(255&e[p])<<24|(255&e[p+1])<<16|(255&e[p+2])<<8|255&e[p+3];for(b=16;b<64;b++)h=u[b-2],m=(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10,h=u[b-15],y=(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3,u[b]=(m+u[b-7]|0)+(y+u[b-16]|0)|0;for(b=0;b<64;b++)m=(((E>>>6|E<<26)^(E>>>11|E<<21)^(E>>>25|E<<7))+(E&k^~E&T)|0)+(_+(t[b]+u[b]|0)|0)|0,y=((g>>>2|g<<30)^(g>>>13|g<<19)^(g>>>22|g<<10))+(g&v^g&w^v&w)|0,_=T,T=k,k=E,E=A+m|0,A=w,w=v,v=g,g=m+y|0;r=r+g|0,n=n+v|0,i=i+w|0,o=o+A|0,s=s+E|0,a=a+k|0,f=f+T|0,c=c+_|0,l+=64,d-=64}}l(e);let d,h=e.length%64,b=e.length/536870912|0,p=e.length<<3,m=h<56?56:120,y=e.slice(e.length-h,e.length);for(y.push(128),d=h+1;d<m;d++)y.push(0);return y.push(b>>>24&255),y.push(b>>>16&255),y.push(b>>>8&255),y.push(b>>>0&255),y.push(p>>>24&255),y.push(p>>>16&255),y.push(p>>>8&255),y.push(p>>>0&255),l(y),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,f>>>24&255,f>>>16&255,f>>>8&255,f>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function i(e,t,r){e=e.length<=64?e:n(e);const i=64+t.length+4,o=new Array(i),s=new Array(64);let a,f=[];for(a=0;a<64;a++)o[a]=54;for(a=0;a<e.length;a++)o[a]^=e[a];for(a=0;a<t.length;a++)o[64+a]=t[a];for(a=i-4;a<i;a++)o[a]=0;for(a=0;a<64;a++)s[a]=92;for(a=0;a<e.length;a++)s[a]^=e[a];function c(){for(let e=i-1;e>=i-4;e--){if(o[e]++,o[e]<=255)return;o[e]=0}}for(;r>=32;)c(),f=f.concat(n(s.concat(n(o)))),r-=32;return r>0&&(c(),f=f.concat(n(s.concat(n(o))).slice(0,r))),f}function o(e,t,r,n,i){let o;for(c(e,16*(2*r-1),i,0,16),o=0;o<2*r;o++)f(e,16*o,i,16),a(i,n),c(i,0,e,t+16*o,16);for(o=0;o<r;o++)c(e,t+2*o*16,e,16*o,16);for(o=0;o<r;o++)c(e,t+16*(2*o+1),e,16*(o+r),16)}function s(e,t){return e<<t|e>>>32-t}function a(e,t){c(e,0,t,0,16);for(let e=8;e>0;e-=2)t[4]^=s(t[0]+t[12],7),t[8]^=s(t[4]+t[0],9),t[12]^=s(t[8]+t[4],13),t[0]^=s(t[12]+t[8],18),t[9]^=s(t[5]+t[1],7),t[13]^=s(t[9]+t[5],9),t[1]^=s(t[13]+t[9],13),t[5]^=s(t[1]+t[13],18),t[14]^=s(t[10]+t[6],7),t[2]^=s(t[14]+t[10],9),t[6]^=s(t[2]+t[14],13),t[10]^=s(t[6]+t[2],18),t[3]^=s(t[15]+t[11],7),t[7]^=s(t[3]+t[15],9),t[11]^=s(t[7]+t[3],13),t[15]^=s(t[11]+t[7],18),t[1]^=s(t[0]+t[3],7),t[2]^=s(t[1]+t[0],9),t[3]^=s(t[2]+t[1],13),t[0]^=s(t[3]+t[2],18),t[6]^=s(t[5]+t[4],7),t[7]^=s(t[6]+t[5],9),t[4]^=s(t[7]+t[6],13),t[5]^=s(t[4]+t[7],18),t[11]^=s(t[10]+t[9],7),t[8]^=s(t[11]+t[10],9),t[9]^=s(t[8]+t[11],13),t[10]^=s(t[9]+t[8],18),t[12]^=s(t[15]+t[14],7),t[13]^=s(t[12]+t[15],9),t[14]^=s(t[13]+t[12],13),t[15]^=s(t[14]+t[13],18);for(let r=0;r<16;++r)e[r]+=t[r]}function f(e,t,r,n){for(let i=0;i<n;i++)r[i]^=e[t+i]}function c(e,t,r,n,i){for(;i--;)r[n++]=e[t++]}function u(e){if(!e||"number"!=typeof e.length)return!1;for(let t=0;t<e.length;t++){const r=e[t];if("number"!=typeof r||r%1||r<0||r>=256)return!1}return!0}function l(e,t){if("number"!=typeof e||e%1)throw new Error("invalid "+t);return e}function d(e,t,n,s,a,d,h){if(n=l(n,"N"),s=l(s,"r"),a=l(a,"p"),d=l(d,"dkLen"),0===n||0!=(n&n-1))throw new Error("N must be power of 2");if(n>r/128/s)throw new Error("N too large");if(s>r/128/a)throw new Error("r too large");if(!u(e))throw new Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!u(t))throw new Error("salt must be an array or buffer");t=Array.prototype.slice.call(t);let b=i(e,t,128*a*s);const p=new Uint32Array(32*a*s);for(let e=0;e<p.length;e++){const t=4*e;p[e]=(255&b[t+3])<<24|(255&b[t+2])<<16|(255&b[t+1])<<8|(255&b[t+0])<<0}const m=new Uint32Array(64*s),y=new Uint32Array(32*s*n),g=32*s,v=new Uint32Array(16),w=new Uint32Array(16),A=a*n*2;let E,k,T=0,_=null,S=!1,x=0,N=0;const P=h?parseInt(1e3/s):4294967295,M="undefined"!=typeof setImmediate?setImmediate:setTimeout,R=function(){if(S)return h(new Error("cancelled"),T/A);let t;switch(x){case 0:k=32*N*s,c(p,k,m,0,g),x=1,E=0;case 1:t=n-E,t>P&&(t=P);for(let e=0;e<t;e++)c(m,0,y,(E+e)*g,g),o(m,g,s,v,w);if(E+=t,T+=t,h){const e=parseInt(1e3*T/A);if(e!==_){if(S=h(null,T/A),S)break;_=e}}if(E<n)break;E=0,x=2;case 2:t=n-E,t>P&&(t=P);for(let e=0;e<t;e++){const e=m[16*(2*s-1)]&n-1;f(y,e*g,m,g),o(m,g,s,v,w)}if(E+=t,T+=t,h){const e=parseInt(1e3*T/A);if(e!==_){if(S=h(null,T/A),S)break;_=e}}if(E<n)break;if(c(m,0,p,k,g),N++,N<a){x=0;break}b=[];for(let e=0;e<p.length;e++)b.push(p[e]>>0&255),b.push(p[e]>>8&255),b.push(p[e]>>16&255),b.push(p[e]>>24&255);const r=i(e,b,d);return h&&h(null,1,r),r}h&&M(R)};if(!h)for(;;){const e=R();if(null!=e)return e}R()}const h={scrypt:function(e,t,r,n,i,o,s){return new Promise((function(a,f){let c=0;s&&s(0),d(e,t,r,n,i,o,(function(e,t,r){if(e)f(e);else if(r)s&&1!==c&&s(1),a(new Uint8Array(r));else if(s&&t!==c)return c=t,s(t)}))}))},syncScrypt:function(e,t,r,n,i,o){return new Uint8Array(d(e,t,r,n,i,o))}};e.exports=h}()},909:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{f(n.next(e))}catch(e){o(e)}}function a(e){try{f(n.throw(e))}catch(e){o(e)}}function f(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}f((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(f){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,f])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var s=r(354),a=o(r(14)),f=r(226),c=r(859),u=function(){function e(e){this.contract={},this.version=1,this.isDev=e}return Object.defineProperty(e.prototype,"apiBaseUrl",{get:function(){return this.isDev?c.API_ENDPOINT_DEV:c.API_ENDPOINT},enumerable:!1,configurable:!0}),e.prototype.init=function(e,t){return n(this,void 0,void 0,(function(){var r,n;return i(this,(function(i){switch(i.label){case 0:if(!f.ethers.utils.isAddress(t))throw new Error("Invalid contract address.");return r="".concat(this.apiBaseUrl,"/v2/redeemables/").concat(t),[4,a.default.get(r,{validateStatus:function(e){return e<500}})];case 1:if(200!==(n=i.sent()).status)throw new Error("Something went wrong.");if(this.version=n.data.version,this.contract=this.version>1?s.TokenCollection__factoryV2.connect(t,e):s.TokenCollection__factory.connect(t,e),!this.contract)throw new Error("Initialization failed.");return[2]}}))}))},e.create=function(t,r,o){return n(this,void 0,void 0,(function(){var n;return i(this,(function(i){switch(i.label){case 0:return[4,(n=new e(o)).init(t,r)];case 1:return i.sent(),[2,n]}}))}))},e.prototype.getRedeemable=function(e){return n(this,void 0,void 0,(function(){var t,r;return i(this,(function(n){switch(n.label){case 0:return this.version>1?[4,this.contract.redeemableAt(e)]:[3,2];case 1:return r=n.sent(),[3,4];case 2:return[4,this.contract.redeemableByIndex(e)];case 3:r=n.sent(),n.label=4;case 4:return[2,{index:e,tokenURI:(t=r)[0],price:t.price,maxAmount:t[3].toNumber(),maxPerWallet:t.maxPerWallet.toNumber(),maxPerMint:t.maxPerMint.toNumber(),redeemedCount:t.redeemedCount.toNumber(),merkleRoot:t.merkleRoot,active:t.active,nonce:t.nonce}]}}))}))},e.prototype.redeem=function(e,t,r){return n(this,void 0,void 0,(function(){var n;return i(this,(function(i){switch(i.label){case 0:return[4,this.getRedeemable(e)];case 1:return n=i.sent(),this.version>1?[4,this.contract.redeem(n.index,t,r,[],{value:n.price.mul(t)})]:[3,3];case 2:case 4:return[2,i.sent()];case 3:return[4,this.contract["redeem(uint256,uint256,bytes)"](n.index,t,r,{value:n.price.mul(t)})]}}))}))},e.prototype.presaleRedeem=function(e,t,r,o){return n(this,void 0,void 0,(function(){var n;return i(this,(function(i){switch(i.label){case 0:return[4,this.getRedeemable(e)];case 1:return n=i.sent(),this.version>1?[4,this.contract.redeem(n.index,t,r,o,{value:n.price.mul(t)})]:[3,3];case 2:case 4:return[2,i.sent()];case 3:return[4,this.contract["redeem(uint256,uint256,bytes,bytes32[])"](n.index,t,r,o,{value:n.price.mul(t)})]}}))}))},e.prototype.burn=function(e){return this.contract.burn(e)},e}();t.default=u},859:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.API_ENDPOINT=t.API_ENDPOINT_DEV=void 0,t.API_ENDPOINT_DEV="https://api-testnet.niftykit.com",t.API_ENDPOINT="https://api.niftykit.com"},368:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(909));t.default=i.default},354:(e,t,r)=>{"use strict";r.r(t),r.d(t,{DropCollection__factory:()=>y,TokenCollection__factory:()=>c,TokenCollection__factoryV2:()=>h});var n,i=r(268),o=r(503),s=(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"RedeemableCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"collector",type:"address"},{indexed:!0,internalType:"uint256",name:"redeemableId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"TokenRedeemed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"uri",type:"string"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"maxAmount",type:"uint256"},{internalType:"uint256",name:"maxPerWallet",type:"uint256"},{internalType:"uint256",name:"maxPerMint",type:"uint256"}],name:"createRedeemable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"address",name:"treasury_",type:"address"},{internalType:"address",name:"royalty_",type:"address"},{internalType:"uint96",name:"royaltyFee_",type:"uint96"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"invalidate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"},{internalType:"uint256",name:"numberOfTokens",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"}],name:"redeem",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"},{internalType:"uint256",name:"numberOfTokens",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"redeem",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"redeemableByIndex",outputs:[{internalType:"string",name:"uri",type:"string"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"maxAmount",type:"uint256"},{internalType:"uint256",name:"maxPerWallet",type:"uint256"},{internalType:"uint256",name:"maxPerMint",type:"uint256"},{internalType:"uint256",name:"redeemedCount",type:"uint256"},{internalType:"bytes32",name:"merkleRoot",type:"bytes32"},{internalType:"bool",name:"active",type:"bool"},{internalType:"uint256",name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"},{internalType:"uint256",name:"_salePrice",type:"uint256"}],name:"royaltyInfo",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setDefaultRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"},{internalType:"bytes32",name:"newRoot",type:"bytes32"}],name:"setMerkleRoot",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setTokenRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newTreasury",type:"address"}],name:"setTreasury",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalRedeemables",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalRevenue",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"treasury",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],f="0x608060405234801561001057600080fd5b50615ca780620000216000396000f3fe60806040526004361061026a5760003560e01c80635944c75311610153578063b88d4fde116100cb578063d0def5211161007f578063ea4caca511610064578063ea4caca514610715578063f0f442601461074a578063f2fde38b1461076a57600080fd5b8063d0def5211461069f578063e985e9c5146106bf57600080fd5b8063bf2d9e0b116100b0578063bf2d9e0b14610654578063c13e33f31461066a578063c87b56dd1461067f57600080fd5b8063b88d4fde14610621578063b9b607471461064157600080fd5b8063715018a61161012257806395d89b411161010757806395d89b41146105cc578063a22cb465146105e1578063afef7c041461060157600080fd5b8063715018a61461058c5780638da5cb5b146105a157600080fd5b80635944c7531461050057806361d027b3146105205780636352211e1461054c57806370a082311461056c57600080fd5b80631ea1afdb116101e65780632f745c59116101b557806342842e0e1161019a57806342842e0e146104a057806342966c68146104c05780634f6ccce7146104e057600080fd5b80632f745c591461046b5780633ccfd60b1461048b57600080fd5b80631ea1afdb146103bf57806320c5429b146103df57806323b872dd146103ff5780632a55205a1461041f57600080fd5b8063081812fc1161023d5780630daf00bc116102225780630daf00bc1461036057806318160ddd1461038057806318712c211461039f57600080fd5b8063081812fc146102fb578063095ea7b31461034057600080fd5b806301ffc9a71461026f5780630449015a146102a457806304634d8d146102b957806306fdde03146102d9575b600080fd5b34801561027b57600080fd5b5061028f61028a366004615303565b61078a565b60405190151581526020015b60405180910390f35b6102b76102b2366004615362565b61079b565b005b3480156102c557600080fd5b506102b76102d43660046153f5565b610ddf565b3480156102e557600080fd5b506102ee610e6e565b60405161029b919061549e565b34801561030757600080fd5b5061031b6103163660046154b1565b610f00565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161029b565b34801561034c57600080fd5b506102b761035b3660046154ca565b610fda565b34801561036c57600080fd5b506102b761037b3660046155d7565b611167565b34801561038c57600080fd5b506099545b60405190815260200161029b565b3480156103ab57600080fd5b506102b76103ba366004615634565b611321565b3480156103cb57600080fd5b506102b76103da3660046154b1565b611434565b3480156103eb57600080fd5b506102b76103fa3660046154b1565b611565565b34801561040b57600080fd5b506102b761041a366004615656565b61169c565b34801561042b57600080fd5b5061043f61043a366004615634565b61173e565b6040805173ffffffffffffffffffffffffffffffffffffffff909316835260208301919091520161029b565b34801561047757600080fd5b506103916104863660046154ca565b611837565b34801561049757600080fd5b506102b7611906565b3480156104ac57600080fd5b506102b76104bb366004615656565b611aef565b3480156104cc57600080fd5b506102b76104db3660046154b1565b611b0a565b3480156104ec57600080fd5b506103916104fb3660046154b1565b611bab565b34801561050c57600080fd5b506102b761051b366004615692565b611c69565b34801561052c57600080fd5b5061012e5473ffffffffffffffffffffffffffffffffffffffff1661031b565b34801561055857600080fd5b5061031b6105673660046154b1565b611cf5565b34801561057857600080fd5b506103916105873660046156ce565b611da7565b34801561059857600080fd5b506102b7611e75565b3480156105ad57600080fd5b5060fb5473ffffffffffffffffffffffffffffffffffffffff1661031b565b3480156105d857600080fd5b506102ee611f02565b3480156105ed57600080fd5b506102b76105fc3660046156e9565b611f11565b34801561060d57600080fd5b506102b761061c366004615725565b611f1c565b34801561062d57600080fd5b506102b761063c3660046157bb565b611fe5565b6102b761064f366004615837565b61208d565b34801561066057600080fd5b5061012f54610391565b34801561067657600080fd5b506103916126fb565b34801561068b57600080fd5b506102ee61069a3660046154b1565b61270c565b3480156106ab57600080fd5b506102b76106ba3660046158e9565b612717565b3480156106cb57600080fd5b5061028f6106da366004615937565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152606a6020908152604080832093909416825291909152205460ff1690565b34801561072157600080fd5b506107356107303660046154b1565b6127a2565b60405161029b99989796959493929190615961565b34801561075657600080fd5b506102b76107653660046156ce565b612915565b34801561077657600080fd5b506102b76107853660046156ce565b6129de565b6000610795826129e7565b92915050565b8383838360006101966000868152602001908152602001600020604051806101200160405290816000820180546107d1906159b7565b80601f01602080910402602001604051908101604052809291908181526020018280546107fd906159b7565b801561084a5780601f1061081f5761010080835404028352916020019161084a565b820191906000526020600020905b81548152906001019060200180831161082d57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e0808301919091526008909201546101009091015281015190915061091f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a2031000000000000000000000000000000000000000060448201526064015b60405180910390fd5b6020810151349061093090866129f2565b1115610998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56616c756520696e636f727265637400000000000000000000000000000000006044820152606401610916565b60608101516000868152610197602052604081206109e291879190335b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205490612a05565b1115610a4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203100000000000000000000000000000000006044820152606401610916565b604081015160a0820151610a5e9086612a05565b1115610ac6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203200000000000000000000000000000000006044820152606401610916565b60fb5473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd984848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050610100850151610bd39150610b43908a90612a05565b604051602001610b5591815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b90612a11565b73ffffffffffffffffffffffffffffffffffffffff1614610c56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203200000000000000000000000000000000000000006044820152606401610916565b6000898152610196602052604080822081516101208101909252805482908290610c7f906159b7565b80601f0160208091040260200160405190810160405280929190818152602001828054610cab906159b7565b8015610cf85780601f10610ccd57610100808354040283529160200191610cf8565b820191906000526020600020905b815481529060010190602001808311610cdb57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c080830191909152600783015460ff16151560e08301526008909201546101009091015281015190915015610dc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203300000000000000000000000000000000000000006044820152606401610916565b610dd38a8a612a35565b50505050505050505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314610e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b610e6a8282612cae565b5050565b606060658054610e7d906159b7565b80601f0160208091040260200160405190810160405280929190818152602001828054610ea9906159b7565b8015610ef65780601f10610ecb57610100808354040283529160200191610ef6565b820191906000526020600020905b815481529060010190602001808311610ed957829003601f168201915b5050505050905090565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff16610fb1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610916565b5060009081526069602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610fe582611cf5565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610916565b3373ffffffffffffffffffffffffffffffffffffffff821614806110cc57506110cc81336106da565b611158576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610916565b6111628383612e27565b505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146111e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b60006111f46101955490565b905061120561019580546001019055565b604080516101208101825287815260208082018890528183018790526060820186905260808201859052600060a0830181905260c08301819052600160e08401526101008301819052848152610196825292909220815180519293919261126f9284920190615206565b50602082015160018201556040808301516002830155606083015160038301556080830151600483015560a0830151600583015560c0830151600683015560e08301516007830180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055610100909201516008909101555181907f722868ecddb510067469fb495ac2904c250692c67941ad0bd36e01c2059fc77890600090a2505050505050565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146113a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000828152610196602052604090206007015460ff1661141e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b6000918252610196602052604090912060060155565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146114b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000818152610196602052604090206007015460ff16611531576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b6000818152610196602052604090206008015461154f906001612a05565b6000918252610196602052604090912060080155565b60fb5473ffffffffffffffffffffffffffffffffffffffff1633146115e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b6000818152610196602052604090206007015460ff16611662576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f496e76616c69642052656465656d61626c6500000000000000000000000000006044820152606401610916565b60009081526101966020526040902060070180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b6116a7335b82612ec7565b611733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610916565b611162838383613037565b600082815260ca6020908152604080832081518083019092525473ffffffffffffffffffffffffffffffffffffffff8116808352740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169282019290925282916117f957506040805180820190915260c95473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1660208201525b60208101516000906127109061181d906bffffffffffffffffffffffff1687615a3a565b6118279190615aa6565b91519350909150505b9250929050565b600061184283611da7565b82106118d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610916565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152609760209081526040808320938352929052205490565b60004711611970576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f302062616c616e636500000000000000000000000000000000000000000000006044820152606401610916565b61012d546040517f9af608c9000000000000000000000000000000000000000000000000000000008152306004820152479160009173ffffffffffffffffffffffffffffffffffffffff90911690639af608c99060240160206040518083038186803b1580156119df57600080fd5b505afa1580156119f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a179190615aba565b61012d546040517fb9bff4bb0000000000000000000000000000000000000000000000000000000081526004810183905291925073ffffffffffffffffffffffffffffffffffffffff169063b9bff4bb90602401600060405180830381600087803b158015611a8557600080fd5b505af1158015611a99573d6000803e3d6000fd5b505061012d54611ac2925073ffffffffffffffffffffffffffffffffffffffff169050826132a9565b61012e54610e6a9073ffffffffffffffffffffffffffffffffffffffff16611aea8484613403565b6132a9565b61116283838360405180602001604052806000815250611fe5565b611b13336116a1565b611b9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610916565b611ba88161340f565b50565b6000611bb660995490565b8210611c44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610916565b60998281548110611c5757611c57615ad3565b90600052602060002001549050919050565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314611cea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b611162838383613418565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610916565b600073ffffffffffffffffffffffffffffffffffffffff8216611e4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610916565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526068602052604090205490565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314611ef6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b611f0060006135a2565b565b606060668054610e7d906159b7565b610e6a338383613619565b6000611f28600161373f565b90508015611f5d57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b611f6a86868686866138ca565b611f726139e4565b611f7a6139e4565b8015611fdd57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050505050565b611fef3383612ec7565b61207b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610916565b61208784848484613a7b565b50505050565b8585858560006101966000868152602001908152602001600020604051806101200160405290816000820180546120c3906159b7565b80601f01602080910402602001604051908101604052809291908181526020018280546120ef906159b7565b801561213c5780601f106121115761010080835404028352916020019161213c565b820191906000526020600020905b81548152906001019060200180831161211f57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e0808301919091526008909201546101009091015281015190915061220c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203100000000000000000000000000000000000000006044820152606401610916565b6020810151349061221d90866129f2565b1115612285576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f56616c756520696e636f727265637400000000000000000000000000000000006044820152606401610916565b60608101516000868152610197602052604081206122a691879190336109b5565b111561230e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203100000000000000000000000000000000006044820152606401610916565b604081015160a08201516123229086612a05565b111561238a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4578636565646564206d61783a203200000000000000000000000000000000006044820152606401610916565b60fb5473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661240784848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050610100850151610bd39150610b43908a90612a05565b73ffffffffffffffffffffffffffffffffffffffff1614612484576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203200000000000000000000000000000000000000006044820152606401610916565b60008b81526101966020526040808220815161012081019092528054829082906124ad906159b7565b80601f01602080910402602001604051908101604052809291908181526020018280546124d9906159b7565b80156125265780601f106124fb57610100808354040283529160200191612526565b820191906000526020600020905b81548152906001019060200180831161250957829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c080830191909152600783015460ff16151560e0830152600890920154610100909101528101519091506125f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203300000000000000000000000000000000000000006044820152606401610916565b61267d88888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060c08301516040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260340160405160208183030381529060405280519060200120613b1e565b6126e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f742076616c69643a203400000000000000000000000000000000000000006044820152606401610916565b6126ed8c8c612a35565b505050505050505050505050565b60006127076101955490565b905090565b606061079582613b34565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314612798576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b610e6a8282613ce7565b6060600080600080600080600080600061019660008c8152602001908152602001600020604051806101200160405290816000820180546127e2906159b7565b80601f016020809104026020016040519081016040528092919081815260200182805461280e906159b7565b801561285b5780601f106128305761010080835404028352916020019161285b565b820191906000526020600020905b81548152906001019060200180831161283e57829003601f168201915b505050505081526020016001820154815260200160028201548152602001600382015481526020016004820154815260200160058201548152602001600682015481526020016007820160009054906101000a900460ff161515151581526020016008820154815250509050806000015181602001518260400151836060015184608001518560a001518660c001518760e00151886101000151995099509950995099509950995099509950509193959799909294969850565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314612996576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b61012e80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b611ba881613d18565b600061079582613e45565b60006129fe8284615a3a565b9392505050565b60006129fe8284615b02565b6000806000612a208585613e9b565b91509150612a2d81613f08565b509392505050565b6000828152610196602052604080822081516101208101909252805482908290612a5e906159b7565b80601f0160208091040260200160405190810160405280929190818152602001828054612a8a906159b7565b8015612ad75780601f10612aac57610100808354040283529160200191612ad7565b820191906000526020600020905b815481529060010190602001808311612aba57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e08201526008909101546101009091015261012f54909150612b489034612a05565b61012f5560a0810151612b5b9083612a05565b600084815261019660209081526040808320600501939093556101979052908120612b8991849190336109b5565b6000848152610197602090815260408083203384529091528120919091555b82811015612bcd57612bbb338351613ce7565b80612bc581615b1a565b915050612ba8565b5061012d546040517f107e9cf100000000000000000000000000000000000000000000000000000000815234600482015273ffffffffffffffffffffffffffffffffffffffff9091169063107e9cf190602401600060405180830381600087803b158015612c3a57600080fd5b505af1158015612c4e573d6000803e3d6000fd5b5050505082612c5a3390565b73ffffffffffffffffffffffffffffffffffffffff167fac100af3f918c30d71d2bfb00d975e36374d10738748c899376504e76c70bc7384604051612ca191815260200190565b60405180910390a3505050565b6127106bffffffffffffffffffffffff82161115612d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff8216612dcb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610916565b6040805180820190915273ffffffffffffffffffffffffffffffffffffffff9092168083526bffffffffffffffffffffffff9091166020909201829052740100000000000000000000000000000000000000009091021760c955565b600081815260696020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190612e8182611cf5565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff16612f78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610916565b6000612f8383611cf5565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612ff1575073ffffffffffffffffffffffffffffffffffffffff8082166000908152606a602090815260408083209388168352929052205460ff165b8061302f57508373ffffffffffffffffffffffffffffffffffffffff1661301784610f00565b73ffffffffffffffffffffffffffffffffffffffff16145b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff1661305782611cf5565b73ffffffffffffffffffffffffffffffffffffffff16146130fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff821661319c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610916565b6131a7838383614161565b6131b2600082612e27565b73ffffffffffffffffffffffffffffffffffffffff831660009081526068602052604081208054600192906131e8908490615b53565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152606860205260408120805460019290613223908490615b02565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b80471015613313576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610916565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461336d576040519150601f19603f3d011682016040523d82523d6000602084013e613372565b606091505b5050905080611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610916565b60006129fe8284615b53565b611ba88161416c565b6127106bffffffffffffffffffffffff821611156134b8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c2065786365656460448201527f2073616c655072696365000000000000000000000000000000000000000000006064820152608401610916565b73ffffffffffffffffffffffffffffffffffffffff8216613535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610916565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff93841681526bffffffffffffffffffffffff9283166020808301918252600096875260ca9052919094209351905190911674010000000000000000000000000000000000000000029116179055565b60fb805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156136af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610916565b73ffffffffffffffffffffffffffffffffffffffff8381166000818152606a602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101612ca1565b60008054610100900460ff16156137f6578160ff1660011480156137625750303b155b6137ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610916565b506000919050565b60005460ff80841691161061388d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610916565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff92909216919091179055600190565b919050565b600054610100900460ff16613961576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b61396b85856141ae565b6139736139e4565b61397b6139e4565b61398361424f565b61012d8054337fffffffffffffffffffffffff00000000000000000000000000000000000000009182161790915561012e805490911673ffffffffffffffffffffffffffffffffffffffff85161790556139dd8282612cae565b5050505050565b600054610100900460ff16611f00576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b613a86848484613037565b613a92848484846142ef565b612087576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b600082613b2b85846144ee565b14949350505050565b60008181526067602052604090205460609073ffffffffffffffffffffffffffffffffffffffff16613be8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e0000000000000000000000000000006064820152608401610916565b6000828152610130602052604081208054613c02906159b7565b80601f0160208091040260200160405190810160405280929190818152602001828054613c2e906159b7565b8015613c7b5780601f10613c5057610100808354040283529160200191613c7b565b820191906000526020600020905b815481529060010190602001808311613c5e57829003601f168201915b505050505090506000613c9960408051602081019091526000815290565b9050805160001415613cac575092915050565b815115613cde578082604051602001613cc6929190615b6a565b60405160208183030381529060405292505050919050565b61302f8461455a565b6000613cf36101945490565b9050613d0461019480546001019055565b613d0e8382614676565b6111628183614690565b60fb5473ffffffffffffffffffffffffffffffffffffffff163314613d99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610916565b73ffffffffffffffffffffffffffffffffffffffff8116613e3c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610916565b611ba8816135a2565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610795575061079582614761565b600080825160411415613ed25760208301516040840151606085015160001a613ec6878285856147b7565b94509450505050611830565b825160401415613efc5760208301516040840151613ef18683836148cf565b935093505050611830565b50600090506002611830565b6000816004811115613f1c57613f1c615b99565b1415613f255750565b6001816004811115613f3957613f39615b99565b1415613fa1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610916565b6002816004811115613fb557613fb5615b99565b141561401d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610916565b600381600481111561403157614031615b99565b14156140bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610916565b60048160048111156140d3576140d3615b99565b1415611ba8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610916565b611162838383614921565b6141758161492c565b600081815261013060205260409020805461418f906159b7565b159050611ba857600081815261013060205260408120611ba89161528a565b600054610100900460ff16614245576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b610e6a8282614a05565b600054610100900460ff166142e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b611f00336135a2565b600073ffffffffffffffffffffffffffffffffffffffff84163b156144e3576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290614366903390899088908890600401615bc8565b602060405180830381600087803b15801561438057600080fd5b505af19250505080156143ce575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526143cb91810190615c11565b60015b614498573d8080156143fc576040519150601f19603f3d011682016040523d82523d6000602084013e614401565b606091505b508051614490576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061302f565b506001949350505050565b600081815b8451811015612a2d57600085828151811061451057614510615ad3565b602002602001015190508083116145365760008381526020829052604090209250614547565b600081815260208490526040902092505b508061455281615b1a565b9150506144f3565b60008181526067602052604090205460609073ffffffffffffffffffffffffffffffffffffffff1661460e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610916565b600061462560408051602081019091526000815290565b9050600081511161464557604051806020016040528060008152506129fe565b8061464f84614ac3565b604051602001614660929190615b6a565b6040516020818303038152906040529392505050565b610e6a828260405180602001604052806000815250614bf5565b60008281526067602052604090205473ffffffffffffffffffffffffffffffffffffffff16614741576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e0000000000000000000000000000000000006064820152608401610916565b600082815261013060209081526040909120825161116292840190615206565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610795575061079582614c98565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156147ee57506000905060036148c6565b8460ff16601b1415801561480657508460ff16601c14155b1561481757506000905060046148c6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561486b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166148bf576000600192509250506148c6565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83168161490560ff86901c601b615b02565b9050614913878288856147b7565b935093505050935093915050565b611162838383614d7b565b600061493782611cf5565b905061494581600084614161565b614950600083612e27565b73ffffffffffffffffffffffffffffffffffffffff81166000908152606860205260408120805460019290614986908490615b53565b909155505060008281526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555183919073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600054610100900460ff16614a9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610916565b8151614aaf906065906020850190615206565b508051611162906066906020840190615206565b606081614b0357505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115614b2d5780614b1781615b1a565b9150614b269050600a83615aa6565b9150614b07565b60008167ffffffffffffffff811115614b4857614b486154f4565b6040519080825280601f01601f191660200182016040528015614b72576020820181803683370190505b5090505b841561302f57614b87600183615b53565b9150614b94600a86615c2e565b614b9f906030615b02565b60f81b818381518110614bb457614bb4615ad3565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350614bee600a86615aa6565b9450614b76565b614bff8383614e81565b614c0c60008484846142ef565b611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610916565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd000000000000000000000000000000000000000000000000000000001480614d2b57507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061079557507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610795565b73ffffffffffffffffffffffffffffffffffffffff8316614de357614dde81609980546000838152609a60205260408120829055600182018355919091527f72a152ddfb8e864297c917af52ea6c1c68aead0fee1a62673fcc7e0c94979d000155565b614e20565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614614e2057614e20838261504f565b73ffffffffffffffffffffffffffffffffffffffff8216614e445761116281615106565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146111625761116282826151b5565b73ffffffffffffffffffffffffffffffffffffffff8216614efe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610916565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1615614f8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610916565b614f9660008383614161565b73ffffffffffffffffffffffffffffffffffffffff82166000908152606860205260408120805460019290614fcc908490615b02565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000600161505c84611da7565b6150669190615b53565b6000838152609860205260409020549091508082146150c65773ffffffffffffffffffffffffffffffffffffffff841660009081526097602090815260408083208584528252808320548484528184208190558352609890915290208190555b50600091825260986020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352609781528383209183525290812055565b60995460009061511890600190615b53565b6000838152609a60205260408120546099805493945090928490811061514057615140615ad3565b90600052602060002001549050806099838154811061516157615161615ad3565b6000918252602080832090910192909255828152609a9091526040808220849055858252812055609980548061519957615199615c42565b6001900381819060005260206000200160009055905550505050565b60006151c083611da7565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152609760209081526040808320868452825280832085905593825260989052919091209190915550565b828054615212906159b7565b90600052602060002090601f016020900481019282615234576000855561527a565b82601f1061524d57805160ff191683800117855561527a565b8280016001018555821561527a579182015b8281111561527a57825182559160200191906001019061525f565b506152869291506152c0565b5090565b508054615296906159b7565b6000825580601f106152a6575050565b601f016020900490600052602060002090810190611ba891905b5b8082111561528657600081556001016152c1565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611ba857600080fd5b60006020828403121561531557600080fd5b81356129fe816152d5565b60008083601f84011261533257600080fd5b50813567ffffffffffffffff81111561534a57600080fd5b60208301915083602082850101111561183057600080fd5b6000806000806060858703121561537857600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561539d57600080fd5b6153a987828801615320565b95989497509550505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146138c557600080fd5b80356bffffffffffffffffffffffff811681146138c557600080fd5b6000806040838503121561540857600080fd5b615411836153b5565b915061541f602084016153d9565b90509250929050565b60005b8381101561544357818101518382015260200161542b565b838111156120875750506000910152565b6000815180845261546c816020860160208601615428565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006129fe6020830184615454565b6000602082840312156154c357600080fd5b5035919050565b600080604083850312156154dd57600080fd5b6154e6836153b5565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600067ffffffffffffffff8084111561553e5761553e6154f4565b604051601f85017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715615584576155846154f4565b8160405280935085815286868601111561559d57600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126155c857600080fd5b6129fe83833560208501615523565b600080600080600060a086880312156155ef57600080fd5b853567ffffffffffffffff81111561560657600080fd5b615612888289016155b7565b9860208801359850604088013597606081013597506080013595509350505050565b6000806040838503121561564757600080fd5b50508035926020909101359150565b60008060006060848603121561566b57600080fd5b615674846153b5565b9250615682602085016153b5565b9150604084013590509250925092565b6000806000606084860312156156a757600080fd5b833592506156b7602085016153b5565b91506156c5604085016153d9565b90509250925092565b6000602082840312156156e057600080fd5b6129fe826153b5565b600080604083850312156156fc57600080fd5b615705836153b5565b91506020830135801515811461571a57600080fd5b809150509250929050565b600080600080600060a0868803121561573d57600080fd5b853567ffffffffffffffff8082111561575557600080fd5b61576189838a016155b7565b9650602088013591508082111561577757600080fd5b50615784888289016155b7565b945050615793604087016153b5565b92506157a1606087016153b5565b91506157af608087016153d9565b90509295509295909350565b600080600080608085870312156157d157600080fd5b6157da856153b5565b93506157e8602086016153b5565b925060408501359150606085013567ffffffffffffffff81111561580b57600080fd5b8501601f8101871361581c57600080fd5b61582b87823560208401615523565b91505092959194509250565b6000806000806000806080878903121561585057600080fd5b8635955060208701359450604087013567ffffffffffffffff8082111561587657600080fd5b6158828a838b01615320565b9096509450606089013591508082111561589b57600080fd5b818901915089601f8301126158af57600080fd5b8135818111156158be57600080fd5b8a60208260051b85010111156158d357600080fd5b6020830194508093505050509295509295509295565b600080604083850312156158fc57600080fd5b615905836153b5565b9150602083013567ffffffffffffffff81111561592157600080fd5b61592d858286016155b7565b9150509250929050565b6000806040838503121561594a57600080fd5b615953836153b5565b915061541f602084016153b5565b60006101208083526159758184018d615454565b602084019b909b52505060408101979097526060870195909552608086019390935260a085019190915260c0840152151560e083015261010090910152919050565b600181811c908216806159cb57607f821691505b60208210811415615a05577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615a7257615a72615a0b565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082615ab557615ab5615a77565b500490565b600060208284031215615acc57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008219821115615b1557615b15615a0b565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615b4c57615b4c615a0b565b5060010190565b600082821015615b6557615b65615a0b565b500390565b60008351615b7c818460208801615428565b835190830190615b90818360208801615428565b01949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152615c076080830184615454565b9695505050505050565b600060208284031215615c2357600080fd5b81516129fe816152d5565b600082615c3d57615c3d615a77565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220559a0d6ec60fa121a42b1af801ffe7053ec3b9c6367d27186dac275407cf5b4564736f6c63430008090033",c=function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=this;return(n=t.length>1?e.apply(this,t)||this:e.call(this,a,f,t[0])||this).contractName="TokenCollection",n}return s(t,e),t.prototype.deploy=function(t){return e.prototype.deploy.call(this,t||{})},t.prototype.getDeployTransaction=function(t){return e.prototype.getDeployTransaction.call(this,t||{})},t.prototype.attach=function(t){return e.prototype.attach.call(this,t)},t.prototype.connect=function(t){return e.prototype.connect.call(this,t)},t.createInterface=function(){return new i.vU(a)},t.connect=function(e,t){return new o.CH(e,a,t)},t.bytecode=f,t.abi=a,t}(o.lV),u=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),l=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"NewOwnerIsZeroAddress",type:"error"},{inputs:[],name:"NoHandoverRequest",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"operator",type:"bytes32"},{indexed:!1,internalType:"bool",name:"allowed",type:"bool"}],name:"OperatorAllowed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"operator",type:"bytes32"},{indexed:!1,internalType:"bool",name:"blocked",type:"bool"}],name:"OperatorBlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"OwnershipHandoverCanceled",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"pendingOwner",type:"address"}],name:"OwnershipHandoverRequested",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"oldOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"RedeemableCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"uint256",name:"roles",type:"uint256"}],name:"RolesUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"redeemableId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"quantity",type:"uint256"}],name:"TokenRedeemed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"ADMIN_ROLE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"BURNER_ROLE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MANAGER_ROLE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cancelOwnershipHandover",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"pendingOwner",type:"address"}],name:"completeOwnershipHandover",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"uri",type:"string"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"maxQuantity",type:"uint256"},{internalType:"uint256",name:"maxPerWallet",type:"uint256"},{internalType:"uint256",name:"maxPerMint",type:"uint256"}],name:"createRedeemable",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"roles",type:"uint256"}],name:"grantRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"roles",type:"uint256"}],name:"hasAllRoles",outputs:[{internalType:"bool",name:"result",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"roles",type:"uint256"}],name:"hasAnyRole",outputs:[{internalType:"bool",name:"result",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner_",type:"address"},{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"address",name:"treasury_",type:"address"},{internalType:"address",name:"royalty_",type:"address"},{internalType:"uint96",name:"royaltyFee_",type:"uint96"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"invalidate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"operator",type:"bytes32"}],name:"isAllowedOperator",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"isOperator",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"operator",type:"bytes32"}],name:"isBlockedOperator",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"operatorRegistry",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"roles",type:"uint256"}],name:"ordinalsFromRoles",outputs:[{internalType:"uint8[]",name:"ordinals",type:"uint8[]"}],stateMutability:"pure",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"result",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"pendingOwner",type:"address"}],name:"ownershipHandoverExpiresAt",outputs:[{internalType:"uint256",name:"result",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"ownershipHandoverValidFor",outputs:[{internalType:"uint64",name:"",type:"uint64"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"bytes",name:"signature",type:"bytes"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"redeem",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"redeemableAt",outputs:[{components:[{internalType:"string",name:"tokenURI",type:"string"},{internalType:"uint256",name:"price",type:"uint256"},{internalType:"uint256",name:"maxQuantity",type:"uint256"},{internalType:"uint256",name:"maxPerWallet",type:"uint256"},{internalType:"uint256",name:"maxPerMint",type:"uint256"},{internalType:"uint256",name:"redeemedCount",type:"uint256"},{internalType:"bytes32",name:"merkleRoot",type:"bytes32"},{internalType:"bool",name:"active",type:"bool"},{internalType:"uint256",name:"nonce",type:"uint256"}],internalType:"struct Redeemables.Redeemable",name:"data",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"roles",type:"uint256"}],name:"renounceRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"requestOwnershipHandover",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"}],name:"revoke",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"},{internalType:"uint256",name:"roles",type:"uint256"}],name:"revokeRoles",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8[]",name:"ordinals",type:"uint8[]"}],name:"rolesFromOrdinals",outputs:[{internalType:"uint256",name:"roles",type:"uint256"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"rolesOf",outputs:[{internalType:"uint256",name:"roles",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"},{internalType:"uint256",name:"_salePrice",type:"uint256"}],name:"royaltyInfo",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"operator",type:"bytes32"},{internalType:"bool",name:"allowed",type:"bool"}],name:"setAllowedOperator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"operator",type:"bytes32"},{internalType:"bool",name:"blocked",type:"bool"}],name:"setBlockedOperator",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setDefaultRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"redeemableId",type:"uint256"},{internalType:"bytes32",name:"newRoot",type:"bytes32"}],name:"setMerkleRoot",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"registry",type:"address"}],name:"setOperatorRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setTokenRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"newUri",type:"string"}],name:"setTokenURI",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newTreasury",type:"address"}],name:"setTreasury",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"index",type:"uint256"}],name:"tokenOfOwnerByIndex",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalRedeemables",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalRevenue",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"treasury",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"unsetOperatorRegistry",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],d="0x60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6148cd80620000f46000396000f3fe6080604052600436106103975760003560e01c80635944c753116101dc578063b88d4fde11610102578063d3fc9864116100a0578063f04e283e1161006f578063f04e283e14610ad5578063f0f4426014610af5578063f2fde38b14610b15578063fee81cf414610b3557600080fd5b8063d3fc986414610a62578063d7533f0214610a82578063e985e9c514610aa0578063ec87621c14610ac057600080fd5b8063bf2d9e0b116100dc578063bf2d9e0b146109f8578063bfa9aadc14610a0d578063c13e33f314610a2d578063c87b56dd14610a4257600080fd5b8063b88d4fde14610995578063b9358c81146109b5578063b9b60747146109e557600080fd5b80637359e41f1161017a5780639b93bdd1116101495780639b93bdd1146109155780639d28fb8614610935578063a22cb46514610955578063afe735471461097557600080fd5b80637359e41f146108a557806375b238fc146108d25780638da5cb5b146108e757806395d89b411461090057600080fd5b8063691ebfb7116101b6578063691ebfb71461081357806370a0823114610840578063715018a61461086057806371dbf0a71461087557600080fd5b80635944c753146107b557806361d027b3146107d55780636352211e146107f357600080fd5b806323b872dd116102c157806342842e0e1161025f578063514e62fc1161022e578063514e62fc14610736578063521242c21461076d57806354d1f13d1461078257806358c2225b1461079757600080fd5b806342842e0e146106b657806342966c68146106d65780634a4ee7b1146106f65780634f6ccce71461071657600080fd5b80632a55205a1161029b5780632a55205a146106115780632de94807146106505780632f745c59146106815780633ccfd60b146106a157600080fd5b806323b872dd146105c757806325692962146105e7578063282c51f3146105fc57600080fd5b8063162094c4116103395780631c10893f116103085780631c10893f146105305780631cd64df4146105505780631ea1afdb1461058757806320c5429b146105a757600080fd5b8063162094c4146104bb57806318160ddd146104db578063183a4f6e146104f057806318712c211461051057600080fd5b8063081812fc11610375578063081812fc14610415578063095ea7b31461044d5780630daf00bc1461046d57806313a661ed1461048d57600080fd5b806301ffc9a71461039c57806304634d8d146103d157806306fdde03146103f3575b600080fd5b3480156103a857600080fd5b506103bc6103b7366004613c3d565b610b66565b60405190151581526020015b60405180910390f35b3480156103dd57600080fd5b506103f16103ec366004613c8d565b610ba4565b005b3480156103ff57600080fd5b50610408610be9565b6040516103c89190613d18565b34801561042157600080fd5b50610435610430366004613d2b565b610c7b565b6040516001600160a01b0390911681526020016103c8565b34801561045957600080fd5b506103f1610468366004613d44565b610ca2565b34801561047957600080fd5b506103f1610488366004613e2b565b610d6b565b34801561049957600080fd5b506104ad6104a8366004613e87565b610db6565b6040519081526020016103c8565b3480156104c757600080fd5b506103f16104d6366004613f3f565b610de9565b3480156104e757600080fd5b5060d4546104ad565b3480156104fc57600080fd5b506103f161050b366004613d2b565b610e29565b34801561051c57600080fd5b506103f161052b366004613f85565b610e36565b34801561053c57600080fd5b506103f161054b366004613d44565b610e76565b34801561055c57600080fd5b506103bc61056b366004613d44565b60609190911b638b78c6d8176000908152602090205481161490565b34801561059357600080fd5b506103f16105a2366004613d2b565b610e9f565b3480156105b357600080fd5b506103f16105c2366004613d2b565b610ede565b3480156105d357600080fd5b506103f16105e2366004613fa7565b610f1d565b3480156105f357600080fd5b506103f1610f4f565b34801561060857600080fd5b506104ad600481565b34801561061d57600080fd5b5061063161062c366004613f85565b610f9f565b604080516001600160a01b0390931683526020830191909152016103c8565b34801561065c57600080fd5b506104ad61066b366004613fe3565b60601b638b78c6d8176000908152602090205490565b34801561068d57600080fd5b506104ad61069c366004613d44565b61104d565b3480156106ad57600080fd5b506103f16110e3565b3480156106c257600080fd5b506103f16106d1366004613fa7565b611254565b3480156106e257600080fd5b506103f16106f1366004613d2b565b61126f565b34801561070257600080fd5b506103f1610711366004613d44565b61129d565b34801561072257600080fd5b506104ad610731366004613d2b565b6112c2565b34801561074257600080fd5b506103bc610751366004613d44565b60609190911b638b78c6d8176000908152602090205416151590565b34801561077957600080fd5b506103f1611355565b34801561078e57600080fd5b506103f161139e565b3480156107a357600080fd5b50609b546001600160a01b0316610435565b3480156107c157600080fd5b506103f16107d0366004613ffe565b6113db565b3480156107e157600080fd5b50609c546001600160a01b0316610435565b3480156107ff57600080fd5b5061043561080e366004613d2b565b61141c565b34801561081f57600080fd5b5061083361082e366004613d2b565b61147c565b6040516103c8919061403a565b34801561084c57600080fd5b506104ad61085b366004613fe3565b6115d8565b34801561086c57600080fd5b506103f161165e565b34801561088157600080fd5b506103bc610890366004613d2b565b6000908152609e602052604090205460ff1690565b3480156108b157600080fd5b506108c56108c0366004613d2b565b61169a565b6040516103c891906140bd565b3480156108de57600080fd5b506104ad600181565b3480156108f357600080fd5b50638b78c6d81954610435565b34801561090c57600080fd5b506104086116e2565b34801561092157600080fd5b506103f1610930366004614114565b6116f1565b34801561094157600080fd5b506103f1610950366004613fe3565b611780565b34801561096157600080fd5b506103f1610970366004614137565b61182a565b34801561098157600080fd5b506103f1610990366004614114565b6118ea565b3480156109a157600080fd5b506103f16109b0366004614161565b611970565b3480156109c157600080fd5b506103bc6109d0366004613d2b565b6000908152609f602052604090205460ff1690565b6103f16109f3366004614220565b6119a2565b348015610a0457600080fd5b50609d546104ad565b348015610a1957600080fd5b506103f1610a283660046142d0565b611a54565b348015610a3957600080fd5b506104ad611b9f565b348015610a4e57600080fd5b50610408610a5d366004613d2b565b611baf565b348015610a6e57600080fd5b506103f1610a7d366004614374565b611bba565b348015610a8e57600080fd5b506040516202a30081526020016103c8565b348015610aac57600080fd5b506103bc610abb3660046143ca565b611bfb565b348015610acc57600080fd5b506104ad600281565b348015610ae157600080fd5b506103f1610af0366004613fe3565b611cf6565b348015610b0157600080fd5b506103f1610b10366004613fe3565b611d66565b348015610b2157600080fd5b506103f1610b30366004613fe3565b611dbf565b348015610b4157600080fd5b506104ad610b50366004613fe3565b60601b63389a75e1176000908152602090205490565b6000610b7182611e14565b80610b805750610b8082611e54565b80610b8f5750610b8f82611e79565b80610b9e5750610b9e82611e54565b92915050565b6001638b78c6d83360601b176000528060206000205416610bda57638b78c6d819543314610bda576382b429006000526004601cfd5b610be48383611e9e565b505050565b606060a08054610bf8906143f4565b80601f0160208091040260200160405190810160405280929190818152602001828054610c24906143f4565b8015610c715780601f10610c4657610100808354040283529160200191610c71565b820191906000526020600020905b815481529060010190602001808311610c5457829003601f168201915b5050505050905090565b6000610c8682611f58565b50600090815260a460205260409020546001600160a01b031690565b609b5482906001600160a01b031615610d6157609b54604051632aeb048b60e01b81526001600160a01b0383811660048301526000921690632aeb048b90602401602060405180830381865afa158015610d00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d24919061442e565b6000818152609f602052604090205490915060ff1615610d5f5760405162461bcd60e51b8152600401610d5690614447565b60405180910390fd5b505b610be48383611fb7565b6002638b78c6d83360601b176000528060206000205416610da157638b78c6d819543314610da1576382b429006000526004601cfd5b610dae86868686866120c7565b505050505050565b600060208201825160051b81015b808214610de257600160ff8351161b83179250602082019150610dc4565b5050919050565b6002638b78c6d83360601b176000528060206000205416610e1f57638b78c6d819543314610e1f576382b429006000526004601cfd5b610be483836121d9565b610e33338261226d565b50565b6002638b78c6d83360601b176000528060206000205416610e6c57638b78c6d819543314610e6c576382b429006000526004601cfd5b610be483836122be565b638b78c6d819543314610e91576382b429006000526004601cfd5b610e9b8282612304565b5050565b6002638b78c6d83360601b176000528060206000205416610ed557638b78c6d819543314610ed5576382b429006000526004601cfd5b610e9b82612350565b6002638b78c6d83360601b176000528060206000205416610f1457638b78c6d819543314610f14576382b429006000526004601cfd5b610e9b826123b3565b610f28335b826123ff565b610f445760405162461bcd60e51b8152600401610d5690614493565b610be483838361245e565b60006202a3006001600160401b03164201905063389a75e13360601b1760005280602060002055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b60008281526069602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916110145750604080518082019091526068546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611033906001600160601b0316876144f7565b61103d919061452c565b91519350909150505b9250929050565b6000611058836115d8565b82106110ba5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d56565b506001600160a01b0391909116600090815260d260209081526040808320938352929052205490565b6001638b78c6d83360601b17600052806020600020541661111957638b78c6d819543314611119576382b429006000526004601cfd5b600047116111555760405162461bcd60e51b8152602060048201526009602482015268302062616c616e636560b81b6044820152606401610d56565b609a54604051639af608c960e01b81523060048201526001600160a01b039091169047906000908390639af608c990602401602060405180830381865afa1580156111a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c8919061442e565b60405163b9bff4bb60e01b8152600481018290529091506001600160a01b0384169063b9bff4bb90602401600060405180830381600087803b15801561120d57600080fd5b505af1158015611221573d6000803e3d6000fd5b5050505061122f8382612605565b609c5461124e906001600160a01b0316611249848461271e565b612605565b50505050565b610be483838360405180602001604052806000815250611970565b61127833610f22565b6112945760405162461bcd60e51b8152600401610d5690614493565b610e338161272a565b638b78c6d8195433146112b8576382b429006000526004601cfd5b610e9b828261226d565b60006112cd60d45490565b82106113305760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d56565b60d4828154811061134357611343614540565b90600052602060002001549050919050565b6001638b78c6d83360601b17600052806020600020541661138b57638b78c6d81954331461138b576382b429006000526004601cfd5b50609b80546001600160a01b0319169055565b63389a75e13360601b176000526000602060002055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b6001638b78c6d83360601b17600052806020600020541661141157638b78c6d819543314611411576382b429006000526004601cfd5b61124e848484612733565b600081815260a260205260408120546001600160a01b031680610b9e5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d56565b6114d060405180610120016040528060608152602001600081526020016000815260200160008152602001600081526020016000815260200160008019168152602001600015158152602001600081525090565b60008281526034602052604090819020815161012081019092528054829082906114f9906143f4565b80601f0160208091040260200160405190810160405280929190818152602001828054611525906143f4565b80156115725780601f1061154757610100808354040283529160200191611572565b820191906000526020600020905b81548152906001019060200180831161155557829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460ff16151560e08201526008909101546101009091015292915050565b60006001600160a01b0382166116425760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d56565b506001600160a01b0316600090815260a3602052604090205490565b638b78c6d819543314611679576382b429006000526004601cfd5b600033600080516020614878833981519152600080a36000638b78c6d81955565b606060206040510160005b8082526001841660051b820191508360011c935083156116c7576001016116a5565b5060405191508060405260208201810360051c825250919050565b606060a18054610bf8906143f4565b6002638b78c6d83360601b17600052806020600020541661172757638b78c6d819543314611727576382b429006000526004601cfd5b6000838152609f6020908152604091829020805460ff1916851515908117909155915191825284917ffd502da418dbb99d2724cacf064b43af780fe7b6607b623466711e8a99dedc3991015b60405180910390a2505050565b6001638b78c6d83360601b1760005280602060002054166117b657638b78c6d8195433146117b6576382b429006000526004601cfd5b6117c782632aeb048b60e01b6127fe565b6118075760405162461bcd60e51b8152602060048201526011602482015270496e76616c696420496e7465726661636560781b6044820152606401610d56565b50609b80546001600160a01b0319166001600160a01b0392909216919091179055565b609b5482906001600160a01b0316156118e057609b54604051632aeb048b60e01b81526001600160a01b0383811660048301526000921690632aeb048b90602401602060405180830381865afa158015611888573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ac919061442e565b6000818152609f602052604090205490915060ff16156118de5760405162461bcd60e51b8152600401610d5690614447565b505b610be4838361281a565b6002638b78c6d83360601b17600052806020600020541661192057638b78c6d819543314611920576382b429006000526004601cfd5b6000838152609e6020908152604091829020805460ff1916851515908117909155915191825284917f50e00cc379ab7d213a199e50fb1aff65f74b67b5131bc6ebb6516f47b2542e659101611773565b61197a33836123ff565b6119965760405162461bcd60e51b8152600401610d5690614493565b61124e84848484612825565b60006119ad8761147c565b609d549091506119bd9034612858565b609d55609a5460405163107e9cf160e01b81523460048201526001600160a01b039091169063107e9cf190602401600060405180830381600087803b158015611a0557600080fd5b505af1158015611a19573d6000803e3d6000fd5b50505050611a30611a273390565b82518890612864565b611a4b87878787611a44638b78c6d8195490565b88886128a9565b50505050505050565b600054610100900460ff1615808015611a745750600054600160ff909116105b80611a8e5750303b158015611a8e575060005460ff166001145b611af15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610d56565b6000805460ff191660011790558015611b14576000805461ff0019166101001790555b611b1e8686612c8a565b611b26612cbb565b611b2e612cbb565b611b36612cbb565b611b4287858585612ce4565b611b5161016880546001019055565b8015611a4b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150505050505050565b6000611baa60335490565b905090565b6060610b9e82612d4f565b6002638b78c6d83360601b176000528060206000205416611bf057638b78c6d819543314611bf0576382b429006000526004601cfd5b61124e848484612864565b609b546000906001600160a01b031615611cc557609b54604051632aeb048b60e01b81526001600160a01b0384811660048301526000921690632aeb048b90602401602060405180830381865afa158015611c5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7e919061442e565b6000818152609e602052604090205490915060ff1615611ca2576001915050610b9e565b6000818152609f602052604090205460ff1615611cc3576000915050610b9e565b505b6001600160a01b03808416600090815260a5602090815260408083209386168352929052205460ff165b9392505050565b638b78c6d819543314611d11576382b429006000526004601cfd5b8060601b60601c905063389a75e18160601b1760005260206000208054421115611d4357636f5e88186000526004601cfd5b60008155508033600080516020614878833981519152600080a3638b78c6d81955565b6001638b78c6d83360601b176000528060206000205416611d9c57638b78c6d819543314611d9c576382b429006000526004601cfd5b50609c80546001600160a01b0319166001600160a01b0392909216919091179055565b638b78c6d819543314611dda576382b429006000526004601cfd5b6001600160a01b031680611df657637448fbae6000526004601cfd5b8033600080516020614878833981519152600080a3638b78c6d81955565b60006001600160e01b031982166380ac58cd60e01b1480611e4557506001600160e01b03198216635b5e139f60e01b145b80610b9e5750610b9e82611e79565b60006001600160e01b0319821663780e9d6360e01b1480610b9e5750610b9e82611e14565b60006001600160e01b03198216632fea6ab760e21b1480610b9e5750610b9e82612e58565b6127106001600160601b0382161115611ec95760405162461bcd60e51b8152600401610d5690614556565b6001600160a01b038216611f1f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610d56565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217606855565b600081815260a260205260409020546001600160a01b0316610e335760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d56565b6000611fc28261141c565b9050806001600160a01b0316836001600160a01b03160361202f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610d56565b336001600160a01b038216148061204b575061204b8133611bfb565b6120bd5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610d56565b610be48383612e8d565b60006120d260335490565b90506120e2603380546001019055565b604080516101208101825287815260208082018890528183018790526060820186905260808201859052600060a0830181905260c08301819052600160e084015261010083018190528481526034909152919091208151819061214590826145e6565b50602082015160018201556040808301516002830155606083015160038301556080830151600483015560a0830151600583015560c0830151600683015560e083015160078301805460ff1916911515919091179055610100909201516008909101555181907f722868ecddb510067469fb495ac2904c250692c67941ad0bd36e01c2059fc77890600090a2505050505050565b600082815260a260205260409020546001600160a01b03166122545760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610d56565b600082815261010460205260409020610be482826145e6565b638b78c6d88260601b176000526020600020805482811681189050808255808460601b60601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a350505050565b60008281526034602052604090206007015460ff166122ef5760405162461bcd60e51b8152600401610d56906146a5565b60009182526034602052604090912060060155565b638b78c6d88260601b17600052602060002081815417808255808460601b60601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a350505050565b60008181526034602052604090206007015460ff166123815760405162461bcd60e51b8152600401610d56906146a5565b60008181526034602052604090206008015461239e906001612858565b60009182526034602052604090912060080155565b60008181526034602052604090206007015460ff166123e45760405162461bcd60e51b8152600401610d56906146a5565b6000908152603460205260409020600701805460ff19169055565b60008061240b8361141c565b9050806001600160a01b0316846001600160a01b0316148061243257506124328185611bfb565b806124565750836001600160a01b031661244b84610c7b565b6001600160a01b0316145b949350505050565b826001600160a01b03166124718261141c565b6001600160a01b0316146124d55760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610d56565b6001600160a01b0382166125375760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d56565b612542838383612efb565b61254d600082612e8d565b6001600160a01b038316600090815260a3602052604081208054600192906125769084906146c9565b90915550506001600160a01b038216600090815260a3602052604081208054600192906125a49084906146e0565b9091555050600081815260a2602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b804710156126555760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d56565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146126a2576040519150601f19603f3d011682016040523d82523d6000602084013e6126a7565b606091505b5050905080610be45760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d56565b6000611cef82846146c9565b610e3381612f06565b6127106001600160601b038216111561275e5760405162461bcd60e51b8152600401610d5690614556565b6001600160a01b0382166127b45760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610d56565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752606990529190942093519051909116600160a01b029116179055565b600061280983612f48565b8015611cef5750611cef8383612f7b565b610e9b338383613004565b61283084848461245e565b61283c848484846130d2565b61124e5760405162461bcd60e51b8152600401610d56906146f8565b6000611cef82846146e0565b60005b8281101561124e57600061287b6101685490565b905061288c61016880546001019055565b61289685826131d3565b6128a081846121d9565b50600101612867565b60006128b48861147c565b90508060e001516128d75760405162461bcd60e51b8152600401610d56906146a5565b602081015134906128e890896131ed565b11156129285760405162461bcd60e51b815260206004820152600f60248201526e15985b1d59481a5b98dbdc9c9958dd608a1b6044820152606401610d56565b80608001518711156129745760405162461bcd60e51b8152602060048201526015602482015274115e18d959591959081b585e081c195c881b5a5b9d605a1b6044820152606401610d56565b604081015160a08201516129889089612858565b11156129cc5760405162461bcd60e51b8152602060048201526013602482015272115e18d959591959081b585e08185b5bdd5b9d606a1b6044820152606401610d56565b606081015160008981526035602090815260408083203384529091529020546129f59089612858565b1115612a435760405162461bcd60e51b815260206004820152601760248201527f4578636565646564206d6178207065722077616c6c65740000000000000000006044820152606401610d56565b836001600160a01b0316612b1387878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050610100850151612b0d9150612a9b908d90612858565b604051602001612aad91815260200190565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b906131f9565b6001600160a01b031614612b5d5760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610d56565b60c081015115612c1757612bdb83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050505060c08301516040516bffffffffffffffffffffffff193360601b1660208201526034016040516020818303038152906040528051906020012061321d565b612c175760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610d56565b60008881526034602090815260408083206005018054600190810190915560358352818420338086529084529382902080549091019055518981528a92917fac100af3f918c30d71d2bfb00d975e36374d10738748c899376504e76c70bc73910160405180910390a35050505050505050565b600054610100900460ff16612cb15760405162461bcd60e51b8152600401610d569061474a565b610e9b8282613233565b600054610100900460ff16612ce25760405162461bcd60e51b8152600401610d569061474a565b565b600054610100900460ff16612d0b5760405162461bcd60e51b8152600401610d569061474a565b612d1484613273565b612d1c612cbb565b609a8054336001600160a01b031991821617909155609c80549091166001600160a01b03851617905561124e8282611e9e565b6060612d5a82611f58565b6000828152610104602052604081208054612d74906143f4565b80601f0160208091040260200160405190810160405280929190818152602001828054612da0906143f4565b8015612ded5780601f10612dc257610100808354040283529160200191612ded565b820191906000526020600020905b815481529060010190602001808311612dd057829003601f168201915b505050505090506000612e0b60408051602081019091526000815290565b90508051600003612e1d575092915050565b815115612e4f578082604051602001612e37929190614795565b60405160208183030381529060405292505050919050565b6124568461329d565b60006001600160e01b0319821663152a902d60e11b1480610b9e57506301ffc9a760e01b6001600160e01b0319831614610b9e565b600081815260a46020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612ec28261141c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b610be4838383613310565b612f0f816133c8565b6000818152610104602052604090208054612f29906143f4565b159050610e3357600081815261010460205260408120610e3391613bd9565b6000612f5b826301ffc9a760e01b612f7b565b8015610b9e5750612f74826001600160e01b0319612f7b565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d91506000519050828015612fed575060208210155b8015612ff95750600081115b979650505050505050565b816001600160a01b0316836001600160a01b0316036130655760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d56565b6001600160a01b03838116600081815260a56020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006001600160a01b0384163b156131c857604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906131169033908990889088906004016147c4565b6020604051808303816000875af1925050508015613151575060408051601f3d908101601f1916820190925261314e91810190614801565b60015b6131ae573d80801561317f576040519150601f19603f3d011682016040523d82523d6000602084013e613184565b606091505b5080516000036131a65760405162461bcd60e51b8152600401610d56906146f8565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612456565b506001949350505050565b610e9b82826040518060200160405280600081525061346f565b6000611cef82846144f7565b600080600061320885856134a2565b91509150613215816134e4565b509392505050565b60008261322a858461369a565b14949350505050565b600054610100900460ff1661325a5760405162461bcd60e51b8152600401610d569061474a565b60a061326683826145e6565b5060a1610be482826145e6565b6001600160a01b0316638b78c6d8198190558060006000805160206148788339815191528180a350565b60606132a882611f58565b60006132bf60408051602081019091526000815290565b905060008151116132df5760405180602001604052806000815250611cef565b806132e9846136df565b6040516020016132fa929190614795565b6040516020818303038152906040529392505050565b6001600160a01b03831661336b576133668160d48054600083815260d560205260408120829055600182018355919091527f9780e26d96b1f2a9a18ef8fc72d589dbf03ef788137b64f43897e83a91e7feec0155565b61338e565b816001600160a01b0316836001600160a01b03161461338e5761338e83826137df565b6001600160a01b0382166133a557610be48161387c565b826001600160a01b0316826001600160a01b031614610be457610be4828261392b565b60006133d38261141c565b90506133e181600084612efb565b6133ec600083612e8d565b6001600160a01b038116600090815260a3602052604081208054600192906134159084906146c9565b9091555050600082815260a2602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b613479838361396f565b61348660008484846130d2565b610be45760405162461bcd60e51b8152600401610d56906146f8565b60008082516041036134d85760208301516040840151606085015160001a6134cc87828585613abd565b94509450505050611046565b50600090506002611046565b60008160048111156134f8576134f861481e565b036135005750565b60018160048111156135145761351461481e565b036135615760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610d56565b60028160048111156135755761357561481e565b036135c25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610d56565b60038160048111156135d6576135d661481e565b0361362e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610d56565b60048160048111156136425761364261481e565b03610e335760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610d56565b600081815b8451811015613215576136cb828683815181106136be576136be614540565b6020026020010151613baa565b9150806136d781614834565b91505061369f565b6060816000036137065750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613730578061371a81614834565b91506137299050600a8361452c565b915061370a565b6000816001600160401b0381111561374a5761374a613d6e565b6040519080825280601f01601f191660200182016040528015613774576020820181803683370190505b5090505b8415612456576137896001836146c9565b9150613796600a8661484d565b6137a19060306146e0565b60f81b8183815181106137b6576137b6614540565b60200101906001600160f81b031916908160001a9053506137d8600a8661452c565b9450613778565b600060016137ec846115d8565b6137f691906146c9565b600083815260d36020526040902054909150808214613849576001600160a01b038416600090815260d260209081526040808320858452825280832054848452818420819055835260d390915290208190555b50600091825260d3602090815260408084208490556001600160a01b03909416835260d281528383209183525290812055565b60d45460009061388e906001906146c9565b600083815260d5602052604081205460d480549394509092849081106138b6576138b6614540565b906000526020600020015490508060d483815481106138d7576138d7614540565b600091825260208083209091019290925582815260d5909152604080822084905585825281205560d480548061390f5761390f614861565b6001900381819060005260206000200160009055905550505050565b6000613936836115d8565b6001600160a01b03909316600090815260d260209081526040808320868452825280832085905593825260d39052919091209190915550565b6001600160a01b0382166139c55760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d56565b600081815260a260205260409020546001600160a01b031615613a2a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d56565b613a3660008383612efb565b6001600160a01b038216600090815260a360205260408120805460019290613a5f9084906146e0565b9091555050600081815260a2602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613af45750600090506003613ba1565b8460ff16601b14158015613b0c57508460ff16601c14155b15613b1d5750600090506004613ba1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613b71573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613b9a57600060019250925050613ba1565b9150600090505b94509492505050565b6000818310613bc6576000828152602084905260409020611cef565b6000838152602083905260409020611cef565b508054613be5906143f4565b6000825580601f10613bf5575050565b601f016020900490600052602060002090810190610e3391905b80821115613c235760008155600101613c0f565b5090565b6001600160e01b031981168114610e3357600080fd5b600060208284031215613c4f57600080fd5b8135611cef81613c27565b80356001600160a01b0381168114613c7157600080fd5b919050565b80356001600160601b0381168114613c7157600080fd5b60008060408385031215613ca057600080fd5b613ca983613c5a565b9150613cb760208401613c76565b90509250929050565b60005b83811015613cdb578181015183820152602001613cc3565b8381111561124e5750506000910152565b60008151808452613d04816020860160208601613cc0565b601f01601f19169290920160200192915050565b602081526000611cef6020830184613cec565b600060208284031215613d3d57600080fd5b5035919050565b60008060408385031215613d5757600080fd5b613d6083613c5a565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613dac57613dac613d6e565b604052919050565b60006001600160401b03831115613dcd57613dcd613d6e565b613de0601f8401601f1916602001613d84565b9050828152838383011115613df457600080fd5b828260208301376000602084830101529392505050565b600082601f830112613e1c57600080fd5b611cef83833560208501613db4565b600080600080600060a08688031215613e4357600080fd5b85356001600160401b03811115613e5957600080fd5b613e6588828901613e0b565b9860208801359850604088013597606081013597506080013595509350505050565b60006020808385031215613e9a57600080fd5b82356001600160401b0380821115613eb157600080fd5b818501915085601f830112613ec557600080fd5b813581811115613ed757613ed7613d6e565b8060051b9150613ee8848301613d84565b8181529183018401918481019088841115613f0257600080fd5b938501935b83851015613f33578435925060ff83168314613f235760008081fd5b8282529385019390850190613f07565b98975050505050505050565b60008060408385031215613f5257600080fd5b8235915060208301356001600160401b03811115613f6f57600080fd5b613f7b85828601613e0b565b9150509250929050565b60008060408385031215613f9857600080fd5b50508035926020909101359150565b600080600060608486031215613fbc57600080fd5b613fc584613c5a565b9250613fd360208501613c5a565b9150604084013590509250925092565b600060208284031215613ff557600080fd5b611cef82613c5a565b60008060006060848603121561401357600080fd5b8335925061402360208501613c5a565b915061403160408501613c76565b90509250925092565b6020815260008251610120806020850152614059610140850183613cec565b9150602085015160408501526040850151606085015260608501516080850152608085015160a085015260a085015160c085015260c085015160e085015260e08501516101006140ac8187018315159052565b959095015193019290925250919050565b6020808252825182820181905260009190848201906040850190845b818110156140f857835160ff16835292840192918401916001016140d9565b50909695505050505050565b80358015158114613c7157600080fd5b6000806040838503121561412757600080fd5b82359150613cb760208401614104565b6000806040838503121561414a57600080fd5b61415383613c5a565b9150613cb760208401614104565b6000806000806080858703121561417757600080fd5b61418085613c5a565b935061418e60208601613c5a565b92506040850135915060608501356001600160401b038111156141b057600080fd5b8501601f810187136141c157600080fd5b6141d087823560208401613db4565b91505092959194509250565b60008083601f8401126141ee57600080fd5b5081356001600160401b0381111561420557600080fd5b6020830191508360208260051b850101111561104657600080fd5b6000806000806000806080878903121561423957600080fd5b863595506020870135945060408701356001600160401b038082111561425e57600080fd5b818901915089601f83011261427257600080fd5b81358181111561428157600080fd5b8a602082850101111561429357600080fd5b6020830196508095505060608901359150808211156142b157600080fd5b506142be89828a016141dc565b979a9699509497509295939492505050565b60008060008060008060c087890312156142e957600080fd5b6142f287613c5a565b955060208701356001600160401b038082111561430e57600080fd5b61431a8a838b01613e0b565b9650604089013591508082111561433057600080fd5b5061433d89828a01613e0b565b94505061434c60608801613c5a565b925061435a60808801613c5a565b915061436860a08801613c76565b90509295509295509295565b60008060006060848603121561438957600080fd5b61439284613c5a565b92506020840135915060408401356001600160401b038111156143b457600080fd5b6143c086828701613e0b565b9150509250925092565b600080604083850312156143dd57600080fd5b6143e683613c5a565b9150613cb760208401613c5a565b600181811c9082168061440857607f821691505b60208210810361442857634e487b7160e01b600052602260045260246000fd5b50919050565b60006020828403121561444057600080fd5b5051919050565b6020808252602c908201527f4f70657261746f7220686173206265656e20626c6f636b656420627920636f6e60408201526b3a3930b1ba1037bbb732b91760a11b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615614511576145116144e1565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261453b5761453b614516565b500490565b634e487b7160e01b600052603260045260246000fd5b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b601f821115610be457600081815260208120601f850160051c810160208610156145c75750805b601f850160051c820191505b81811015610dae578281556001016145d3565b81516001600160401b038111156145ff576145ff613d6e565b6146138161460d84546143f4565b846145a0565b602080601f83116001811461464857600084156146305750858301515b600019600386901b1c1916600185901b178555610dae565b600085815260208120601f198616915b8281101561467757888601518255948401946001909101908401614658565b50858210156146955787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020808252600a90820152694e6f742061637469766560b01b604082015260600190565b6000828210156146db576146db6144e1565b500390565b600082198211156146f3576146f36144e1565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600083516147a7818460208801613cc0565b8351908301906147bb818360208801613cc0565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906147f790830184613cec565b9695505050505050565b60006020828403121561481357600080fd5b8151611cef81613c27565b634e487b7160e01b600052602160045260246000fd5b600060018201614846576148466144e1565b5060010190565b60008261485c5761485c614516565b500690565b634e487b7160e01b600052603160045260246000fdfe8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0a264697066735822122099dde4802314b9e1f4c38da49ac82adb44e44ce5590540fe919aad3692f96e6964736f6c634300080f0033",h=function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.length>1?e.apply(this,t)||this:e.call(this,l,d,t[0])||this}return u(t,e),t.prototype.deploy=function(t){return e.prototype.deploy.call(this,t||{})},t.prototype.getDeployTransaction=function(t){return e.prototype.getDeployTransaction.call(this,t||{})},t.prototype.attach=function(t){return e.prototype.attach.call(this,t)},t.prototype.connect=function(t){return e.prototype.connect.call(this,t)},t.createInterface=function(){return new i.vU(l)},t.connect=function(e,t){return new o.CH(e,l,t)},t.bytecode=d,t.abi=l,t}(o.lV),b=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[],name:"ApprovalCallerNotOwnerNorApproved",type:"error"},{inputs:[],name:"ApprovalQueryForNonexistentToken",type:"error"},{inputs:[],name:"ApproveToCaller",type:"error"},{inputs:[],name:"BalanceQueryForZeroAddress",type:"error"},{inputs:[],name:"InvalidQueryRange",type:"error"},{inputs:[],name:"MintERC2309QuantityExceedsLimit",type:"error"},{inputs:[],name:"MintToZeroAddress",type:"error"},{inputs:[],name:"MintZeroQuantity",type:"error"},{inputs:[],name:"OwnerQueryForNonexistentToken",type:"error"},{inputs:[],name:"OwnershipNotInitializedForExtraData",type:"error"},{inputs:[],name:"TransferCallerNotOwnerNorApproved",type:"error"},{inputs:[],name:"TransferFromIncorrectOwner",type:"error"},{inputs:[],name:"TransferToNonERC721ReceiverImplementer",type:"error"},{inputs:[],name:"TransferToZeroAddress",type:"error"},{inputs:[],name:"URIQueryForNonexistentToken",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"fromTokenId",type:"uint256"},{indexed:!1,internalType:"uint256",name:"toTokenId",type:"uint256"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"}],name:"ConsecutiveTransfer",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint8",name:"version",type:"uint8"}],name:"Initialized",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64[]",name:"quantities",type:"uint64[]"},{internalType:"address[]",name:"recipients",type:"address[]"}],name:"batchAirdrop",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"explicitOwnershipOf",outputs:[{components:[{internalType:"address",name:"addr",type:"address"},{internalType:"uint64",name:"startTimestamp",type:"uint64"},{internalType:"bool",name:"burned",type:"bool"},{internalType:"uint24",name:"extraData",type:"uint24"}],internalType:"struct IERC721AUpgradeable.TokenOwnership",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"}],name:"explicitOwnershipsOf",outputs:[{components:[{internalType:"address",name:"addr",type:"address"},{internalType:"uint64",name:"startTimestamp",type:"uint64"},{internalType:"bool",name:"burned",type:"bool"},{internalType:"uint24",name:"extraData",type:"uint24"}],internalType:"struct IERC721AUpgradeable.TokenOwnership[]",name:"",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"address",name:"treasury_",type:"address"},{internalType:"address",name:"royalty_",type:"address"},{internalType:"uint96",name:"royaltyFee_",type:"uint96"}],name:"initialize",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxAmount",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxPerMint",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"maxPerWallet",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64",name:"quantity",type:"uint64"}],name:"mint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"quantity",type:"uint64"}],name:"mintTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"owner",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"presaleActive",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint64",name:"quantity",type:"uint64"},{internalType:"uint256",name:"allowed",type:"uint256"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"presaleMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint64",name:"quantity",type:"uint64"},{internalType:"uint256",name:"allowed",type:"uint256"},{internalType:"bytes32[]",name:"proof",type:"bytes32[]"}],name:"presaleMintTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[],name:"price",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"renounceOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_tokenId",type:"uint256"},{internalType:"uint256",name:"_salePrice",type:"uint256"}],name:"royaltyInfo",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"saleActive",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"newBaseURI",type:"string"}],name:"setBaseURI",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setDefaultRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"newRoot",type:"bytes32"}],name:"setMerkleRoot",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"address",name:"receiver",type:"address"},{internalType:"uint96",name:"feeNumerator",type:"uint96"}],name:"setTokenRoyalty",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newTreasury",type:"address"}],name:"setTreasury",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"newMaxAmount",type:"uint256"},{internalType:"uint256",name:"newMaxPerMint",type:"uint256"},{internalType:"uint256",name:"newMaxPerWallet",type:"uint256"},{internalType:"uint256",name:"newPrice",type:"uint256"},{internalType:"bool",name:"presale",type:"bool"}],name:"startSale",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"stopSale",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"tokensOfOwner",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"uint256",name:"start",type:"uint256"},{internalType:"uint256",name:"stop",type:"uint256"}],name:"tokensOfOwnerIn",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalRevenue",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"newOwner",type:"address"}],name:"transferOwnership",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"treasury",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"withdraw",outputs:[],stateMutability:"nonpayable",type:"function"}],m="0x608060405260d2805461ffff191690553480156200001c57600080fd5b50620000276200002d565b620000ef565b600054610100900460ff16156200009a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000ed576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b6138cd80620000ff6000396000f3fe6080604052600436106102675760003560e01c8063715018a611610144578063b88d4fde116100b6578063e36b0b371161007a578063e36b0b3714610725578063e985e9c51461073a578063f0f442601461075a578063f2fde38b1461077a578063fb9d09c81461079a578063fd51fae8146107ad57600080fd5b8063b88d4fde14610683578063bf2d9e0b146106a3578063c23dc68f146106b8578063c87b56dd146106e5578063d53ab5011461070557600080fd5b806393d756aa1161010857806393d756aa146105e657806395d89b41146105f957806399a2557a1461060e578063a035b1fe1461062e578063a22cb46514610643578063afef7c041461066357600080fd5b8063715018a614610546578063789e3a551461055b5780637cb647591461057b5780638462151c1461059b5780638da5cb5b146105c857600080fd5b8063453c2310116101dd5780635bbb2177116101a15780635bbb2177146104895780635f48f393146104b657806361d027b3146104cb5780636352211e146104e957806368428a1b1461050957806370a082311461052657600080fd5b8063453c231014610407578063507e094f1461041c57806353135ca01461043157806355f804b3146104495780635944c7531461046957600080fd5b806318160ddd1161022f57806318160ddd1461033d57806323b872dd146103605780632a55205a14610380578063386bacdc146103bf5780633ccfd60b146103d257806342842e0e146103e757600080fd5b806301ffc9a71461026c57806304634d8d146102a157806306fdde03146102c3578063081812fc146102e5578063095ea7b31461031d575b600080fd5b34801561027857600080fd5b5061028c610287366004612ca8565b6107c0565b60405190151581526020015b60405180910390f35b3480156102ad57600080fd5b506102c16102bc366004612cf8565b6107eb565b005b3480156102cf57600080fd5b506102d8610801565b6040516102989190612d83565b3480156102f157600080fd5b50610305610300366004612d96565b61089c565b6040516001600160a01b039091168152602001610298565b34801561032957600080fd5b506102c1610338366004612daf565b6108e9565b34801561034957600080fd5b50610352610997565b604051908152602001610298565b34801561036c57600080fd5b506102c161037b366004612dd9565b6109b7565b34801561038c57600080fd5b506103a061039b366004612e15565b610bae565b604080516001600160a01b039093168352602083019190915201610298565b6102c16103cd366004612e92565b610c5c565b3480156103de57600080fd5b506102c1610ebe565b3480156103f357600080fd5b506102c1610402366004612dd9565b610ff8565b34801561041357600080fd5b5060d054610352565b34801561042857600080fd5b5060cf54610352565b34801561043d57600080fd5b5060d25460ff1661028c565b34801561045557600080fd5b506102c1610464366004612f96565b611013565b34801561047557600080fd5b506102c1610484366004612fca565b611027565b34801561049557600080fd5b506104a96104a4366004613006565b61103a565b6040516102989190613083565b3480156104c257600080fd5b5060ce54610352565b3480156104d757600080fd5b5060ca546001600160a01b0316610305565b3480156104f557600080fd5b50610305610504366004612d96565b611105565b34801561051557600080fd5b5060d254610100900460ff1661028c565b34801561053257600080fd5b506103526105413660046130c5565b611110565b34801561055257600080fd5b506102c1611178565b34801561056757600080fd5b506102c16105763660046130f0565b61118c565b34801561058757600080fd5b506102c1610596366004612d96565b6111c0565b3480156105a757600080fd5b506105bb6105b63660046130c5565b6111cd565b6040516102989190613139565b3480156105d457600080fd5b506033546001600160a01b0316610305565b6102c16105f4366004613171565b6112d5565b34801561060557600080fd5b506102d8611447565b34801561061a57600080fd5b506105bb61062936600461319b565b61145f565b34801561063a57600080fd5b5060d154610352565b34801561064f57600080fd5b506102c161065e3660046131ce565b6115e5565b34801561066f57600080fd5b506102c161067e3660046131f8565b61168b565b34801561068f57600080fd5b506102c161069e366004613281565b6118bc565b3480156106af57600080fd5b5060cb54610352565b3480156106c457600080fd5b506106d86106d3366004612d96565b611906565b60405161029891906132fc565b3480156106f157600080fd5b506102d8610700366004612d96565b611993565b34801561071157600080fd5b506102c161072036600461330a565b611a16565b34801561073157600080fd5b506102c1611ad4565b34801561074657600080fd5b5061028c610755366004613369565b611ae9565b34801561076657600080fd5b506102c16107753660046130c5565b611b26565b34801561078657600080fd5b506102c16107953660046130c5565b611b50565b6102c16107a8366004613393565b611b5c565b6102c16107bb3660046133ae565b611cce565b60006001600160e01b03198216635d129f8f60e01b14806107e557506107e582611f14565b92915050565b6107f3611f62565b6107fd8282611fbc565b5050565b606061080b612076565b60020180546108199061341c565b80601f01602080910402602001604051908101604052809291908181526020018280546108459061341c565b80156108925780601f1061086757610100808354040283529160200191610892565b820191906000526020600020905b81548152906001019060200180831161087557829003601f168201915b5050505050905090565b60006108a78261209a565b6108c4576040516333d1c03960e21b815260040160405180910390fd5b6108cc612076565b60009283526006016020525060409020546001600160a01b031690565b60006108f482611105565b9050336001600160a01b0382161461092d576109108133611ae9565b61092d576040516367d9dca160e11b815260040160405180910390fd5b82610936612076565b6000848152600691909101602052604080822080546001600160a01b0319166001600160a01b0394851617905551849286811692908516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a4505050565b600060016109a3612076565b600101546109af612076565b540303919050565b60006109c2826120e3565b9050836001600160a01b0316816001600160a01b0316146109f55760405162a1148160e81b815260040160405180910390fd5b600080610a0184612177565b91509150610a268187610a113390565b6001600160a01b039081169116811491141790565b610a5157610a348633611ae9565b610a5157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610a7857604051633a954ecd60e21b815260040160405180910390fd5b8015610a8357600082555b610a8b612076565b6001600160a01b0387166000908152600591909101602052604090208054600019019055610ab7612076565b6001600160a01b03861660008181526005929092016020526040909120805460010190554260a01b17600160e11b17610aee612076565b60008681526004919091016020526040812091909155600160e11b84169003610b645760018401610b1d612076565b600082815260049190910160205260408120549003610b6257610b3e612076565b548114610b625783610b4e612076565b600083815260049190910160205260409020555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b60008281526098602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610c235750604080518082019091526097546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610c42906001600160601b03168761346c565b610c4c919061348b565b91519350909150505b9250929050565b836000816001600160401b031611610c8f5760405162461bcd60e51b8152600401610c86906134ad565b60405180910390fd5b600060ce5411610ca0576001610cc1565b60ce54610cbe826001600160401b0316610cb8610997565b9061219f565b11155b610cdd5760405162461bcd60e51b8152600401610c86906134d4565b60cf54816001600160401b03161115610d085760405162461bcd60e51b8152600401610c8690613501565b600085610d14336121ab565b610d1e9190613530565b60d2546001600160401b0391909116915060ff16610d735760405162461bcd60e51b815260206004820152601260248201527150726573616c65206e6f742061637469766560701b6044820152606401610c86565b60cc54600003610db75760405162461bcd60e51b815260206004820152600f60248201526e141c995cd85b19481b9bdd081cd95d608a1b6044820152606401610c86565b60d054811115610dd95760405162461bcd60e51b8152600401610c869061355b565b84811115610df95760405162461bcd60e51b8152600401610c869061355b565b610e768484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060cc546040516bffffffffffffffffffffffff193360601b166020820152603481018b905290925060540190505b604051602081830303815290604052805190602001206121de565b610eb45760405162461bcd60e51b815260206004820152600f60248201526e141c995cd85b19481a5b9d985b1a59608a1b6044820152606401610c86565b610ba686336121f4565b60004711610efa5760405162461bcd60e51b8152602060048201526009602482015268302062616c616e636560b81b6044820152606401610c86565b60c954604051639af608c960e01b81523060048201526001600160a01b039091169047906000908390639af608c990602401602060405180830381865afa158015610f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6d9190613592565b60405163b9bff4bb60e01b8152600481018290529091506001600160a01b0384169063b9bff4bb90602401600060405180830381600087803b158015610fb257600080fd5b505af1158015610fc6573d6000803e3d6000fd5b50505050610fd483826122e9565b60ca54610ff3906001600160a01b0316610fee8484612402565b6122e9565b505050565b610ff3838383604051806020016040528060008152506118bc565b61101b611f62565b60cd6107fd82826135f1565b61102f611f62565b610ff383838361240e565b6060816000816001600160401b0381111561105757611057612eeb565b6040519080825280602002602001820160405280156110a957816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816110755790505b50905060005b8281146110fc576110d78686838181106110cb576110cb6136b0565b90506020020135611906565b8282815181106110e9576110e96136b0565b60209081029190910101526001016110af565b50949350505050565b60006107e5826120e3565b60006001600160a01b038216611139576040516323d3ad8160e21b815260040160405180910390fd5b6001600160401b03611149612076565b6005016000846001600160a01b03166001600160a01b0316815260200190815260200160002054169050919050565b611180611f62565b61118a60006124d9565b565b611194611f62565b60d2805491151561ffff199092169190911761010017905560ce9390935560cf9190915560d05560d155565b6111c8611f62565b60cc55565b606060008060006111dd85611110565b90506000816001600160401b038111156111f9576111f9612eeb565b604051908082528060200260200182016040528015611222578160200160208202803683370190505b50905061124f60408051608081018252600080825260208201819052918101829052606081019190915290565b60015b8386146112c9576112628161252b565b915081604001516112c15781516001600160a01b03161561128257815194505b876001600160a01b0316856001600160a01b0316036112c157808387806001019850815181106112b4576112b46136b0565b6020026020010181815250505b600101611252565b50909695505050505050565b806000816001600160401b0316116112ff5760405162461bcd60e51b8152600401610c86906134ad565b600060ce541161131057600161132b565b60ce54611328826001600160401b0316610cb8610997565b11155b6113475760405162461bcd60e51b8152600401610c86906134d4565b60cf54816001600160401b031611156113725760405162461bcd60e51b8152600401610c8690613501565b60d25460ff16156113b65760405162461bcd60e51b815260206004820152600e60248201526d50726573616c652061637469766560901b6044820152606401610c86565b60d254610100900460ff166113ff5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b6044820152606401610c86565b60d0548261140c856121ab565b6114169190613530565b6001600160401b0316111561143d5760405162461bcd60e51b8152600401610c869061355b565b610ff382846121f4565b6060611451612076565b60030180546108199061341c565b606081831061148157604051631960ccad60e11b815260040160405180910390fd5b60008061148c612572565b9050600185101561149c57600194505b808411156114a8578093505b60006114b387611110565b9050848610156114d257858503818110156114cc578091505b506114d6565b5060005b6000816001600160401b038111156114f0576114f0612eeb565b604051908082528060200260200182016040528015611519578160200160208202803683370190505b5090508160000361152f5793506115de92505050565b600061153a88611906565b90506000816040015161154b575080515b885b88811415801561155d5750848714155b156115d25761156b8161252b565b925082604001516115ca5782516001600160a01b03161561158b57825191505b8a6001600160a01b0316826001600160a01b0316036115ca57808488806001019950815181106115bd576115bd6136b0565b6020026020010181815250505b60010161154d565b50505092835250909150505b9392505050565b336001600160a01b0383160361160e5760405163b06307db60e01b815260040160405180910390fd5b80611617612076565b336000818152600792909201602090815260408084206001600160a01b03881680865290835293819020805460ff19169515159590951790945592518415158152919290917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60008051602061387883398151915254610100900460ff166116c0576000805160206138788339815191525460ff16156116c4565b303b155b6117365760405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608401610c86565b60008051602061387883398151915254610100900460ff1615801561177257600080516020613878833981519152805461ffff19166101011790555b600054610100900460ff16158080156117925750600054600160ff909116105b806117ac5750303b1580156117ac575060005460ff166001145b61180f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610c86565b6000805460ff191660011790558015611832576000805461ff0019166101001790555b61183c8787612582565b6118446125c0565b61184f8585856125fc565b8015611895576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b508015610ba6575050600080516020613878833981519152805461ff001916905550505050565b6118c78484846109b7565b6001600160a01b0383163b15611900576118e384848484612666565b611900576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60408051608081018252600080825260208201819052918101829052606081019190915260408051608081018252600080825260208201819052918101829052606081019190915260018310806119645750611960612572565b8310155b1561196f5792915050565b6119788361252b565b905080604001511561198a5792915050565b6115de83612752565b606061199e8261209a565b6119bb57604051630a14c4b560e41b815260040160405180910390fd5b60006119c5612787565b905080516000036119e557604051806020016040528060008152506115de565b806119ef84612796565b604051602001611a009291906136c6565b6040516020818303038152906040529392505050565b611a1e611f62565b80838114611a625760405162461bcd60e51b8152602060048201526011602482015270496e76616c696420417267756d656e747360781b6044820152606401610c86565b60005b81811015610ba657611acc848483818110611a8257611a826136b0565b9050602002016020810190611a9791906130c5565b878784818110611aa957611aa96136b0565b9050602002016020810190611abe9190613393565b6001600160401b03166127e5565b600101611a65565b611adc611f62565b60d2805461ffff19169055565b6000611af3612076565b6001600160a01b039384166000908152600791909101602090815260408083209490951682529290925250205460ff1690565b611b2e611f62565b60ca80546001600160a01b0319166001600160a01b0392909216919091179055565b611b59816127ff565b50565b806000816001600160401b031611611b865760405162461bcd60e51b8152600401610c86906134ad565b600060ce5411611b97576001611bb2565b60ce54611baf826001600160401b0316610cb8610997565b11155b611bce5760405162461bcd60e51b8152600401610c86906134d4565b60cf54816001600160401b03161115611bf95760405162461bcd60e51b8152600401610c8690613501565b60d25460ff1615611c3d5760405162461bcd60e51b815260206004820152600e60248201526d50726573616c652061637469766560901b6044820152606401610c86565b60d254610100900460ff16611c865760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b6044820152606401610c86565b60d05482611c93336121ab565b611c9d9190613530565b6001600160401b03161115611cc45760405162461bcd60e51b8152600401610c869061355b565b6107fd82336121f4565b836000816001600160401b031611611cf85760405162461bcd60e51b8152600401610c86906134ad565b600060ce5411611d09576001611d24565b60ce54611d21826001600160401b0316610cb8610997565b11155b611d405760405162461bcd60e51b8152600401610c86906134d4565b60cf54816001600160401b03161115611d6b5760405162461bcd60e51b8152600401610c8690613501565b600085611d77886121ab565b611d819190613530565b60d2546001600160401b0391909116915060ff16611dd65760405162461bcd60e51b815260206004820152601260248201527150726573616c65206e6f742061637469766560701b6044820152606401610c86565b60cc54600003611e1a5760405162461bcd60e51b815260206004820152600f60248201526e141c995cd85b19481b9bdd081cd95d608a1b6044820152606401610c86565b60d054811115611e3c5760405162461bcd60e51b8152600401610c869061355b565b84811115611e5c5760405162461bcd60e51b8152600401610c869061355b565b611ec38484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060cc546040516bffffffffffffffffffffffff1960608e901b166020820152603481018b90529092506054019050610e5b565b611f015760405162461bcd60e51b815260206004820152600f60248201526e141c995cd85b19481a5b9d985b1a59608a1b6044820152606401610c86565b611f0b86886121f4565b50505050505050565b60006301ffc9a760e01b6001600160e01b031983161480611f4557506380ac58cd60e01b6001600160e01b03198316145b806107e55750506001600160e01b031916635b5e139f60e01b1490565b6033546001600160a01b0316331461118a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c86565b6127106001600160601b0382161115611fe75760405162461bcd60e51b8152600401610c86906136ec565b6001600160a01b03821661203d5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610c86565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217609755565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4090565b6000816001111580156120b457506120b0612076565b5482105b80156107e55750600160e01b6120c8612076565b60008481526004919091016020526040902054161592915050565b6000818060011161215e576120f6612076565b5481101561215e576000612108612076565b600083815260049190910160205260408120549150600160e01b8216900361215c575b806000036115de5761213b612076565b6000199092016000818152600493909301602052604090922054905061212b565b505b604051636f96cda160e11b815260040160405180910390fd5b6000806000612184612076565b60009485526006016020525050604090912080549092909150565b60006115de8284613736565b600060c06121b7612076565b6001600160a01b03909316600090815260059390930160205260409092205490911c919050565b6000826121eb8584612875565b14949350505050565b60d154349061220c906001600160401b0385166128c2565b111561224c5760405162461bcd60e51b815260206004820152600f60248201526e15985b1d59481a5b98dbdc9c9958dd608a1b6044820152606401610c86565b60cb54612259903461219f565b60cb55612279818361226a826121ab565b6122749190613530565b6128ce565b60c95460405163107e9cf160e01b81523460048201526001600160a01b039091169063107e9cf190602401600060405180830381600087803b1580156122be57600080fd5b505af11580156122d2573d6000803e3d6000fd5b505050506107fd81836001600160401b0316612937565b804710156123395760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610c86565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612386576040519150601f19603f3d011682016040523d82523d6000602084013e61238b565b606091505b5050905080610ff35760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610c86565b60006115de828461374e565b6127106001600160601b03821611156124395760405162461bcd60e51b8152600401610c86906136ec565b6001600160a01b03821661248f5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610c86565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752609890529190942093519051909116600160a01b029116179055565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040805160808101825260008082526020820181905291810182905260608101919091526107e561255a612076565b60008481526004919091016020526040902054612a72565b600061257c612076565b54919050565b60008051602061387883398151915254610100900460ff166125b65760405162461bcd60e51b8152600401610c8690613765565b6107fd8282612ab9565b60008051602061387883398151915254610100900460ff166125f45760405162461bcd60e51b8152600401610c8690613765565b61118a612b2c565b600054610100900460ff166126235760405162461bcd60e51b8152600401610c86906137b9565b61262b612b60565b612633612b8f565b60c98054336001600160a01b03199182161790915560ca80549091166001600160a01b038516179055610ff38282611fbc565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061269b903390899088908890600401613804565b6020604051808303816000875af19250505080156126d6575060408051601f3d908101601f191682019092526126d391810190613841565b60015b612734573d808015612704576040519150601f19603f3d011682016040523d82523d6000602084013e612709565b606091505b50805160000361272c576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b6040805160808101825260008082526020820181905291810182905260608101919091526107e5612782836120e3565b612a72565b606060cd80546108199061341c565b604080516080810191829052607f0190826030600a8206018353600a90045b80156127d357600183039250600a81066030018353600a90046127b5565b50819003601f19909101908152919050565b6107fd828260405180602001604052806000815250612bb6565b612807611f62565b6001600160a01b03811661286c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c86565b611b59816124d9565b600081815b84518110156128ba576128a682868381518110612899576128996136b0565b6020026020010151612c33565b9150806128b28161385e565b91505061287a565b509392505050565b60006115de828461346c565b60006128d8612076565b6001600160a01b038416600090815260059190910160205260409020546001600160c01b031660c083901b1790508181612910612076565b6001600160a01b039095166000908152600595909501602052604090942093909355505050565b6000612941612076565b54905060008290036129665760405163b562e8dd60e01b815260040160405180910390fd5b68010000000000000001820261297a612076565b6001600160a01b038516600081815260059290920160205260409091208054929092019091554260a01b6001841460e11b17176129b5612076565b600083815260049190910160205260408120919091556001600160a01b0384169083830190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b818114612a3f57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101612a07565b5081600003612a6057604051622e076360e81b815260040160405180910390fd5b80612a69612076565b5550610ff39050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b60008051602061387883398151915254610100900460ff16612aed5760405162461bcd60e51b8152600401610c8690613765565b81612af6612076565b60020190612b0490826135f1565b5080612b0e612076565b60030190612b1c90826135f1565b506001612b27612076565b555050565b60008051602061387883398151915254610100900460ff1661118a5760405162461bcd60e51b8152600401610c8690613765565b600054610100900460ff16612b875760405162461bcd60e51b8152600401610c86906137b9565b61118a612c62565b600054610100900460ff1661118a5760405162461bcd60e51b8152600401610c86906137b9565b612bc08383612937565b6001600160a01b0383163b15610ff3576000612bda612076565b5490508281035b612bf46000868380600101945086612666565b612c11576040516368d2bf6b60e11b815260040160405180910390fd5b818110612be15781612c21612076565b5414612c2c57600080fd5b5050505050565b6000818310612c4f5760008281526020849052604090206115de565b60008381526020839052604090206115de565b600054610100900460ff16612c895760405162461bcd60e51b8152600401610c86906137b9565b61118a336124d9565b6001600160e01b031981168114611b5957600080fd5b600060208284031215612cba57600080fd5b81356115de81612c92565b80356001600160a01b0381168114612cdc57600080fd5b919050565b80356001600160601b0381168114612cdc57600080fd5b60008060408385031215612d0b57600080fd5b612d1483612cc5565b9150612d2260208401612ce1565b90509250929050565b60005b83811015612d46578181015183820152602001612d2e565b838111156119005750506000910152565b60008151808452612d6f816020860160208601612d2b565b601f01601f19169290920160200192915050565b6020815260006115de6020830184612d57565b600060208284031215612da857600080fd5b5035919050565b60008060408385031215612dc257600080fd5b612dcb83612cc5565b946020939093013593505050565b600080600060608486031215612dee57600080fd5b612df784612cc5565b9250612e0560208501612cc5565b9150604084013590509250925092565b60008060408385031215612e2857600080fd5b50508035926020909101359150565b80356001600160401b0381168114612cdc57600080fd5b60008083601f840112612e6057600080fd5b5081356001600160401b03811115612e7757600080fd5b6020830191508360208260051b8501011115610c5557600080fd5b60008060008060608587031215612ea857600080fd5b612eb185612e37565b93506020850135925060408501356001600160401b03811115612ed357600080fd5b612edf87828801612e4e565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115612f1b57612f1b612eeb565b604051601f8501601f19908116603f01168101908282118183101715612f4357612f43612eeb565b81604052809350858152868686011115612f5c57600080fd5b858560208301376000602087830101525050509392505050565b600082601f830112612f8757600080fd5b6115de83833560208501612f01565b600060208284031215612fa857600080fd5b81356001600160401b03811115612fbe57600080fd5b61274a84828501612f76565b600080600060608486031215612fdf57600080fd5b83359250612fef60208501612cc5565b9150612ffd60408501612ce1565b90509250925092565b6000806020838503121561301957600080fd5b82356001600160401b0381111561302f57600080fd5b61303b85828601612e4e565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b818110156112c9576130b2838551613047565b928401926080929092019160010161309f565b6000602082840312156130d757600080fd5b6115de82612cc5565b80358015158114612cdc57600080fd5b600080600080600060a0868803121561310857600080fd5b8535945060208601359350604086013592506060860135915061312d608087016130e0565b90509295509295909350565b6020808252825182820181905260009190848201906040850190845b818110156112c957835183529284019291840191600101613155565b6000806040838503121561318457600080fd5b61318d83612cc5565b9150612d2260208401612e37565b6000806000606084860312156131b057600080fd5b6131b984612cc5565b95602085013595506040909401359392505050565b600080604083850312156131e157600080fd5b6131ea83612cc5565b9150612d22602084016130e0565b600080600080600060a0868803121561321057600080fd5b85356001600160401b038082111561322757600080fd5b61323389838a01612f76565b9650602088013591508082111561324957600080fd5b5061325688828901612f76565b94505061326560408701612cc5565b925061327360608701612cc5565b915061312d60808701612ce1565b6000806000806080858703121561329757600080fd5b6132a085612cc5565b93506132ae60208601612cc5565b92506040850135915060608501356001600160401b038111156132d057600080fd5b8501601f810187136132e157600080fd5b6132f087823560208401612f01565b91505092959194509250565b608081016107e58284613047565b6000806000806040858703121561332057600080fd5b84356001600160401b038082111561333757600080fd5b61334388838901612e4e565b9096509450602087013591508082111561335c57600080fd5b50612edf87828801612e4e565b6000806040838503121561337c57600080fd5b61338583612cc5565b9150612d2260208401612cc5565b6000602082840312156133a557600080fd5b6115de82612e37565b6000806000806000608086880312156133c657600080fd5b6133cf86612cc5565b94506133dd60208701612e37565b93506040860135925060608601356001600160401b038111156133ff57600080fd5b61340b88828901612e4e565b969995985093965092949392505050565b600181811c9082168061343057607f821691505b60208210810361345057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561348657613486613456565b500290565b6000826134a857634e487b7160e01b600052601260045260246000fd5b500490565b6020808252600d908201526c05175616e74697479206973203609c1b604082015260600190565b6020808252601390820152724578636565646564206d617820737570706c7960681b604082015260600190565b602080825260159082015274115e18d959591959081b585e081c195c881b5a5b9d605a1b604082015260600190565b60006001600160401b0380831681851680830382111561355257613552613456565b01949350505050565b60208082526017908201527f4578636565646564206d6178207065722077616c6c6574000000000000000000604082015260600190565b6000602082840312156135a457600080fd5b5051919050565b601f821115610ff357600081815260208120601f850160051c810160208610156135d25750805b601f850160051c820191505b81811015610ba6578281556001016135de565b81516001600160401b0381111561360a5761360a612eeb565b61361e81613618845461341c565b846135ab565b602080601f831160018114613653576000841561363b5750858301515b600019600386901b1c1916600185901b178555610ba6565b600085815260208120601f198616915b8281101561368257888601518255948401946001909101908401613663565b50858210156136a05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600083516136d8818460208801612d2b565b835190830190613552818360208801612d2b565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b6000821982111561374957613749613456565b500190565b60008282101561376057613760613456565b500390565b60208082526034908201527f455243373231415f5f496e697469616c697a61626c653a20636f6e7472616374604082015273206973206e6f7420696e697469616c697a696e6760601b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061383790830184612d57565b9695505050505050565b60006020828403121561385357600080fd5b81516115de81612c92565b60006001820161387057613870613456565b506001019056feee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85fa2646970667358221220cf8381a350c2c94763f0a755372f4941dd6ed579a50e95d3176e1e0cab8f85aa64736f6c634300080f0033",y=function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.length>1?e.apply(this,t)||this:e.call(this,p,m,t[0])||this}return b(t,e),t.prototype.deploy=function(t){return e.prototype.deploy.call(this,t||{})},t.prototype.getDeployTransaction=function(t){return e.prototype.getDeployTransaction.call(this,t||{})},t.prototype.attach=function(t){return e.prototype.attach.call(this,t)},t.prototype.connect=function(t){return e.prototype.connect.call(this,t)},t.createInterface=function(){return new i.vU(p)},t.connect=function(e,t){return new o.CH(e,p,t)},t.bytecode=m,t.abi=p,t}(o.lV)},196:()=>{},14:(e,t,r)=>{"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}const{toString:i}=Object.prototype,{getPrototypeOf:o}=Object,s=(a=Object.create(null),e=>{const t=i.call(e);return a[t]||(a[t]=t.slice(8,-1).toLowerCase())});var a;const f=e=>(e=e.toLowerCase(),t=>s(t)===e),c=e=>t=>typeof t===e,{isArray:u}=Array,l=c("undefined"),d=f("ArrayBuffer"),h=c("string"),b=c("function"),p=c("number"),m=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==s(e))return!1;const t=o(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},g=f("Date"),v=f("File"),w=f("Blob"),A=f("FileList"),E=f("URLSearchParams");function k(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),u(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let s;for(n=0;n<o;n++)s=i[n],t.call(null,e[s],s,e)}}function T(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,i=r.length;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}const _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:r.g,S=e=>!l(e)&&e!==_,x=(N="undefined"!=typeof Uint8Array&&o(Uint8Array),e=>N&&e instanceof N);var N;const P=f("HTMLFormElement"),M=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),R=f("RegExp"),C=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};k(r,((r,i)=>{let o;!1!==(o=t(r,i,e))&&(n[i]=o||r)})),Object.defineProperties(e,n)},O="abcdefghijklmnopqrstuvwxyz",I="0123456789",B={DIGIT:I,ALPHA:O,ALPHA_DIGIT:O+O.toUpperCase()+I},D=f("AsyncFunction");var F={isArray:u,isArrayBuffer:d,isBuffer:function(e){return null!==e&&!l(e)&&null!==e.constructor&&!l(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=s(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&d(e.buffer),t},isString:h,isNumber:p,isBoolean:e=>!0===e||!1===e,isObject:m,isPlainObject:y,isUndefined:l,isDate:g,isFile:v,isBlob:w,isRegExp:R,isFunction:b,isStream:e=>m(e)&&b(e.pipe),isURLSearchParams:E,isTypedArray:x,isFileList:A,forEach:k,merge:function e(){const{caseless:t}=S(this)&&this||{},r={},n=(n,i)=>{const o=t&&T(r,i)||i;y(r[o])&&y(n)?r[o]=e(r[o],n):y(n)?r[o]=e({},n):u(n)?r[o]=n.slice():r[o]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&k(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:i}={})=>(k(t,((t,i)=>{r&&b(t)?e[i]=n(t,r):e[i]=t}),{allOwnKeys:i}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,s,a;const f={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],n&&!n(a,e,t)||f[a]||(t[a]=e[a],f[a]=!0);e=!1!==r&&o(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:f,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(u(e))return e;let t=e.length;if(!p(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:P,hasOwnProperty:M,hasOwnProp:M,reduceDescriptors:C,freezeMethods:e=>{C(e,((t,r)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];b(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return u(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:T,global:_,isContextDefined:S,ALPHABET:B,generateString:(e=16,t=B.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(m(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const i=u(e)?[]:{};return k(e,((e,t)=>{const o=r(e,n+1);!l(o)&&(i[t]=o)})),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:D,isThenable:e=>e&&(m(e)||b(e))&&b(e.then)&&b(e.catch)};function U(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}F.inherits(U,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const L=U.prototype,z={};function G(e){return F.isPlainObject(e)||F.isArray(e)}function j(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function Y(e,t,r){return e?e.concat(t).map((function(e,t){return e=j(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{z[e]={value:e}})),Object.defineProperties(U,z),Object.defineProperty(L,"isAxiosError",{value:!0}),U.from=(e,t,r,n,i,o)=>{const s=Object.create(L);return F.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),U.call(s,e.message,t,r,n,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};const q=F.toFlatObject(F,{},null,(function(e){return/^is[A-Z]/.test(e)}));function K(e,t,r){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=F.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!F.isUndefined(t[e])}))).metaTokens,i=r.visitor||c,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(i))throw new TypeError("visitor must be a function");function f(e){if(null===e)return"";if(F.isDate(e))return e.toISOString();if(!a&&F.isBlob(e))throw new U("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(e)||F.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){let a=e;if(e&&!i&&"object"==typeof e)if(F.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&function(e){return F.isArray(e)&&!e.some(G)}(e)||(F.isFileList(e)||F.endsWith(r,"[]"))&&(a=F.toArray(e)))return r=j(r),a.forEach((function(e,n){!F.isUndefined(e)&&null!==e&&t.append(!0===s?Y([r],n,o):null===s?r:r+"[]",f(e))})),!1;return!!G(e)||(t.append(Y(i,r,o),f(e)),!1)}const u=[],l=Object.assign(q,{defaultVisitor:c,convertValue:f,isVisitable:G});if(!F.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!F.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),F.forEach(r,(function(r,o){!0===(!(F.isUndefined(r)||null===r)&&i.call(t,r,F.isString(o)?o.trim():o,n,l))&&e(r,n?n.concat(o):[o])})),u.pop()}}(e),t}function H(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function V(e,t){this._pairs=[],e&&K(e,this,t)}const J=V.prototype;function W(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Q(e,t,r){if(!t)return e;const n=r&&r.encode||W,i=r&&r.serialize;let o;if(o=i?i(t,r):F.isURLSearchParams(t)?t.toString():new V(t,r).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}J.append=function(e,t){this._pairs.push([e,t])},J.toString=function(e){const t=e?function(t){return e.call(this,t,H)}:H;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var X=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},$={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Z={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:V,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ee="undefined"!=typeof window&&"undefined"!=typeof document,te=(re="undefined"!=typeof navigator&&navigator.product,ee&&["ReactNative","NativeScript","NS"].indexOf(re)<0);var re;const ne="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var ie={...Object.freeze({__proto__:null,hasBrowserEnv:ee,hasStandardBrowserWebWorkerEnv:ne,hasStandardBrowserEnv:te}),...Z};function oe(e){function t(e,r,n,i){let o=e[i++];const s=Number.isFinite(+o),a=i>=e.length;return o=!o&&F.isArray(n)?n.length:o,a?(F.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s):(n[o]&&F.isObject(n[o])||(n[o]=[]),t(e,r,n[o],i)&&F.isArray(n[o])&&(n[o]=function(e){const t={},r=Object.keys(e);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],t[o]=e[o];return t}(n[o])),!s)}if(F.isFormData(e)&&F.isFunction(e.entries)){const r={};return F.forEachEntry(e,((e,n)=>{t(function(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const se={transitional:$,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,i=F.isObject(e);if(i&&F.isHTMLForm(e)&&(e=new FormData(e)),F.isFormData(e))return n&&n?JSON.stringify(oe(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return K(e,new ie.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return ie.isNode&&F.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=F.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return K(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||n?(t.setContentType("application/json",!1),function(e,t,r){if(F.isString(e))try{return(0,JSON.parse)(e),F.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||se.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&F.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw U.from(e,U.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ie.classes.FormData,Blob:ie.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],(e=>{se.headers[e]={}}));var ae=se;const fe=F.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ce=Symbol("internals");function ue(e){return e&&String(e).trim().toLowerCase()}function le(e){return!1===e||null==e?e:F.isArray(e)?e.map(le):String(e)}function de(e,t,r,n,i){return F.isFunction(n)?n.call(this,t,r):(i&&(t=r),F.isString(t)?F.isString(n)?-1!==t.indexOf(n):F.isRegExp(n)?n.test(t):void 0:void 0)}class he{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function i(e,t,r){const i=ue(t);if(!i)throw new Error("header name must be a non-empty string");const o=F.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=le(e))}const o=(e,t)=>F.forEach(e,((e,r)=>i(e,r,t)));return F.isPlainObject(e)||e instanceof this.constructor?o(e,t):F.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?o((e=>{const t={};let r,n,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||t[r]&&fe[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&i(t,e,r),this}get(e,t){if(e=ue(e)){const r=F.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(F.isFunction(t))return t.call(this,e,r);if(F.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ue(e)){const r=F.findKey(this,e);return!(!r||void 0===this[r]||t&&!de(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function i(e){if(e=ue(e)){const i=F.findKey(r,e);!i||t&&!de(0,r[i],i,t)||(delete r[i],n=!0)}}return F.isArray(e)?e.forEach(i):i(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const i=t[r];e&&!de(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}normalize(e){const t=this,r={};return F.forEach(this,((n,i)=>{const o=F.findKey(r,i);if(o)return t[o]=le(n),void delete t[i];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(i):String(i).trim();s!==i&&delete t[i],t[s]=le(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return F.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&F.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[ce]=this[ce]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ue(e);t[n]||(function(e,t){const r=F.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})}))}(r,e),t[n]=!0)}return F.isArray(e)?e.forEach(n):n(e),this}}he.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(he.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),F.freezeMethods(he);var be=he;function pe(e,t){const r=this||ae,n=t||r,i=be.from(n.headers);let o=n.data;return F.forEach(e,(function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function me(e){return!(!e||!e.__CANCEL__)}function ye(e,t,r){U.call(this,null==e?"canceled":e,U.ERR_CANCELED,t,r),this.name="CanceledError"}F.inherits(ye,U,{__CANCEL__:!0});var ge=ie.hasStandardBrowserEnv?{write(e,t,r,n,i,o){const s=[e+"="+encodeURIComponent(t)];F.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),F.isString(n)&&s.push("path="+n),F.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ve(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var we=ie.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=F.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function Ae(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i,o=0,s=0;return t=void 0!==t?t:1e3,function(a){const f=Date.now(),c=n[s];i||(i=f),r[o]=a,n[o]=f;let u=s,l=0;for(;u!==o;)l+=r[u++],u%=e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),f-i<t)return;const d=c&&f-c;return d?Math.round(1e3*l/d):void 0}}(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-r,f=n(a);r=o;const c={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:f||void 0,estimated:f&&s&&o<=s?(s-o)/f:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}const Ee={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const i=be.from(e.headers).normalize();let o,s,{responseType:a,withXSRFToken:f}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(o),e.signal&&e.signal.removeEventListener("abort",o)}if(F.isFormData(n))if(ie.hasStandardBrowserEnv||ie.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(s=i.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];i.setContentType([e||"multipart/form-data",...t].join("; "))}let u=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(t+":"+r))}const l=ve(e.baseURL,e.url);function d(){if(!u)return;const n=be.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new U("Request failed with status code "+r.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:a&&"text"!==a&&"json"!==a?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),Q(l,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(d)},u.onabort=function(){u&&(r(new U("Request aborted",U.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new U("Network Error",U.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||$;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new U(t,n.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,u)),u=null},ie.hasStandardBrowserEnv&&(f&&F.isFunction(f)&&(f=f(e)),f||!1!==f&&we(l))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&ge.read(e.xsrfCookieName);t&&i.set(e.xsrfHeaderName,t)}void 0===n&&i.setContentType(null),"setRequestHeader"in u&&F.forEach(i.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),F.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&"json"!==a&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",Ae(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",Ae(e.onUploadProgress)),(e.cancelToken||e.signal)&&(o=t=>{u&&(r(!t||t.type?new ye(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(o),e.signal&&(e.signal.aborted?o():e.signal.addEventListener("abort",o)));const h=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);h&&-1===ie.protocols.indexOf(h)?r(new U("Unsupported protocol "+h+":",U.ERR_BAD_REQUEST,e)):u.send(n||null)}))}};F.forEach(Ee,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ke=e=>`- ${e}`,Te=e=>F.isFunction(e)||null===e||!1===e;var _e=e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let r,n;const i={};for(let o=0;o<t;o++){let t;if(r=e[o],n=r,!Te(r)&&(n=Ee[(t=String(r)).toLowerCase()],void 0===n))throw new U(`Unknown adapter '${t}'`);if(n)break;i[t||"#"+o]=n}if(!n){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new U("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(ke).join("\n"):" "+ke(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Se(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ye(null,e)}function xe(e){return Se(e),e.headers=be.from(e.headers),e.data=pe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),_e(e.adapter||ae.adapter)(e).then((function(t){return Se(e),t.data=pe.call(e,e.transformResponse,t),t.headers=be.from(t.headers),t}),(function(t){return me(t)||(Se(e),t&&t.response&&(t.response.data=pe.call(e,e.transformResponse,t.response),t.response.headers=be.from(t.response.headers))),Promise.reject(t)}))}const Ne=e=>e instanceof be?e.toJSON():e;function Pe(e,t){t=t||{};const r={};function n(e,t,r){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:r},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function i(e,t,r){return F.isUndefined(t)?F.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function o(e,t){if(!F.isUndefined(t))return n(void 0,t)}function s(e,t){return F.isUndefined(t)?F.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}const f={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>i(Ne(e),Ne(t),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=f[n]||i,s=o(e[n],t[n],n);F.isUndefined(s)&&o!==a||(r[n]=s)})),r}const Me={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Me[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const Re={};Me.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.2] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,o)=>{if(!1===e)throw new U(n(i," has been removed"+(t?" in "+t:"")),U.ERR_DEPRECATED);return t&&!Re[i]&&(Re[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}};var Ce={assertOptions:function(e,t,r){if("object"!=typeof e)throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const o=n[i],s=t[o];if(s){const t=e[o],r=void 0===t||s(t,o,e);if(!0!==r)throw new U("option "+o+" must be "+r,U.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new U("Unknown option "+o,U.ERR_BAD_OPTION)}},validators:Me};const Oe=Ce.validators;class Ie{constructor(e){this.defaults=e,this.interceptors={request:new X,response:new X}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Pe(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:i}=t;void 0!==r&&Ce.assertOptions(r,{silentJSONParsing:Oe.transitional(Oe.boolean),forcedJSONParsing:Oe.transitional(Oe.boolean),clarifyTimeoutError:Oe.transitional(Oe.boolean)},!1),null!=n&&(F.isFunction(n)?t.paramsSerializer={serialize:n}:Ce.assertOptions(n,{encode:Oe.function,serialize:Oe.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=i&&F.merge(i.common,i[t.method]);i&&F.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete i[e]})),t.headers=be.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const f=[];let c;this.interceptors.response.forEach((function(e){f.push(e.fulfilled,e.rejected)}));let u,l=0;if(!a){const e=[xe.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,f),u=e.length,c=Promise.resolve(t);l<u;)c=c.then(e[l++],e[l++]);return c}u=s.length;let d=t;for(l=0;l<u;){const e=s[l++],t=s[l++];try{d=e(d)}catch(e){t.call(this,e);break}}try{c=xe.call(this,d)}catch(e){return Promise.reject(e)}for(l=0,u=f.length;l<u;)c=c.then(f[l++],f[l++]);return c}getUri(e){return Q(ve((e=Pe(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}F.forEach(["delete","get","head","options"],(function(e){Ie.prototype[e]=function(t,r){return this.request(Pe(r||{},{method:e,url:t,data:(r||{}).data}))}})),F.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,i){return this.request(Pe(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Ie.prototype[e]=t(),Ie.prototype[e+"Form"]=t(!0)}));var Be=Ie;class De{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,i){r.reason||(r.reason=new ye(e,n,i),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new De((function(t){e=t})),cancel:e}}}var Fe=De;const Ue={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Ue).forEach((([e,t])=>{Ue[t]=e}));var Le=Ue;const ze=function e(t){const r=new Be(t),i=n(Be.prototype.request,r);return F.extend(i,Be.prototype,r,{allOwnKeys:!0}),F.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return e(Pe(t,r))},i}(ae);ze.Axios=Be,ze.CanceledError=ye,ze.CancelToken=Fe,ze.isCancel=me,ze.VERSION="1.6.2",ze.toFormData=K,ze.AxiosError=U,ze.Cancel=ze.CanceledError,ze.all=function(e){return Promise.all(e)},ze.spread=function(e){return function(t){return e.apply(null,t)}},ze.isAxiosError=function(e){return F.isObject(e)&&!0===e.isAxiosError},ze.mergeConfig=Pe,ze.AxiosHeaders=be,ze.formToJSON=e=>oe(F.isHTMLForm(e)?new FormData(e):e),ze.getAdapter=_e,ze.HttpStatusCode=Le,ze.default=ze,e.exports=ze}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.amdO={},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n=r(368);return n.default})()));
|