PageSourceSearch

https://fantastic-froyo-63d537.netlify.app/_next/static/chunks/pages/_app-010fb1e56a0e923a.js

js fantastic-froyo-63d537.netlify.app collected 2026-10-03 10:43:33 UTC 707,165 bytes, 20 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{95851:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});let n="abi/5.7.0"},84243:function(e,t,r){"use strict";r.d(t,{R:function(){return R},$:function(){return I}});var n=r(16441),i=r(6881),o=r(1581),s=r(95851),a=r(61184),u=r(19485);class c extends a.XI{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,u.getAddress)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return(0,u.getAddress)((0,n.hexZeroPad)(e.readValue().toHexString(),20))}}class l 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)}}let h=new o.Logger(s.i);function f(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map(t=>{let n=t.localName;return n||h.throwError("cannot encode object for signature with missing names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&h.throwError("cannot encode object for signature with duplicate names",o.Logger.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]})}else h.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&h.throwArgumentError("types/value length mismatch","tuple",r);let i=new a.QV(e.wordSize),s=new a.QV(e.wordSize),u=[];return t.forEach((e,t)=>{let r=n[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=i.writeUpdatableValue();u.push(e=>{n(e+t)})}else e.encode(i,r)}),u.forEach(e=>{e(i.length)}),e.appendWriter(i)+e.appendWriter(s)}function d(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.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}}else try{i=t.decode(e)}catch(e){if(e.code===o.Logger.errors.BUFFER_OVERRUN)throw e;(i=e).baseType=t.name,i.name=t.localName,i.type=t.type}void 0!=i&&r.push(i)});let i=t.reduce((e,t)=>{let 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]||("length"===n&&(n="_length"),null!=r[n]))return;let 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++){let t=r[e];t instanceof Error&&Object.defineProperty(r,e,{enumerable:!0,get:()=>{throw t}})}return Object.freeze(r)}class p extends a.XI{constructor(e,t,r){let n=e.type+"["+(t>=0?t:"")+"]",i=-1===t||e.dynamic;super("array",n,r,i),this.coder=e,this.length=t}defaultValue(){let 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)),h.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 f(e,n,t)}decode(e){let t=this.length;-1===t&&32*(t=e.readValue().toNumber())>e._data.length&&h.throwError("insufficient data length",o.Logger.errors.BUFFER_OVERRUN,{length:e._data.length,count:t});let r=[];for(let e=0;e<t;e++)r.push(new l(this.coder));return e.coerce(this.name,d(e,r))}}class m 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 g extends a.XI{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){return t=(0,n.arrayify)(t),e.writeValue(t.length)+e.writeBytes(t)}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}}class y extends g{constructor(e){super("bytes",e)}decode(e){return e.coerce(this.name,(0,n.hexlify)(super.decode(e)))}}class v 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.arrayify)(t);return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return e.coerce(this.name,(0,n.hexlify)(e.readBytes(this.size)))}}
1class b 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(2593),E=r(21046);class A extends a.XI{constructor(e,t,r){let 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=E.Bz.mask(8*e.wordSize);if(this.signed){let e=n.mask(8*this.size-1);(r.gt(e)||r.lt(e.add(E.fh).mul(E.tL)))&&this._throwError("value out-of-bounds",t)}else(r.lt(E._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 _=r(29251);class k extends g{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,_.Y0)(t))}decode(e){return(0,_.ZN)(super.decode(e))}}
1class S extends a.XI{constructor(e,t){let r=!1,n=[];e.forEach(e=>{e.dynamic&&(r=!0),n.push(e.type)});let i="tuple("+n.join(",")+")";super("tuple",i,t,r),this.coders=e}defaultValue(){let e=[];this.coders.forEach(t=>{e.push(t.defaultValue())});let t=this.coders.reduce((e,t)=>{let 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 f(e,this.coders,t)}decode(e){return e.coerce(this.name,d(e,this.coders))}}var O=r(11388);let x=new o.Logger(s.i),P=new RegExp(/^bytes([0-9]*)$/),C=new RegExp(/^(u?int)([0-9]*)$/);class R{constructor(e){(0,i.defineReadOnly)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new c(e.name);case"bool":return new m(e.name);case"string":return new k(e.name);case"bytes":return new y(e.name);case"array":return new p(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new S((e.components||[]).map(e=>this._getCoder(e)),e.name);case"":return new b(e.name)}
1let t=e.type.match(C);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 A(r/8,"int"===t[1],e.name)}if(t=e.type.match(P)){let r=parseInt(t[1]);return(0===r||r>32)&&x.throwArgumentError("invalid bytes length","param",e),new v(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){let t=e.map(e=>this._getCoder(O._R.from(e))),r=new S(t,"_");return r.defaultValue()}encode(e,t){e.length!==t.length&&x.throwError("types/values length mismatch",o.Logger.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});let r=e.map(e=>this._getCoder(O._R.from(e))),n=new S(r,"_"),i=this._getWriter();return n.encode(i,t),i.data}decode(e,t,r){let i=e.map(e=>this._getCoder(O._R.from(e))),o=new S(i,"_");return o.decode(this._getReader((0,n.arrayify)(t),r))}}let I=new R},61184:function(e,t,r){"use strict";r.d(t,{BR:function(){return c},Ej:function(){return f},QV:function(){return h},XI:function(){return l}});var n=r(16441),i=r(2593),o=r(6881),s=r(1581),a=r(95851);let u=new s.Logger(a.i);function c(e){let t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){let o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t}class l{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){u.throwArgumentError(e,this.localName,t)}}class h{constructor(e){(0,o.defineReadOnly)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,n.hexConcat)(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.concat)(e._data))}writeBytes(e){let t=(0,n.arrayify)(e),r=t.length%this.wordSize;return r&&(t=(0,n.concat)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,n.arrayify)(i.O$.from(e));return t.length>this.wordSize&&u.throwError("value out-of-bounds",s.Logger.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,n.concat)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}
1class f{constructor(e,t,r,i){(0,o.defineReadOnly)(this,"_data",(0,n.arrayify)(e)),(0,o.defineReadOnly)(this,"wordSize",t||32),(0,o.defineReadOnly)(this,"_coerceFunc",r),(0,o.defineReadOnly)(this,"allowLoose",i),this._offset=0}get data(){return(0,n.hexlify)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&48>=parseInt(r[1])&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):f.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:u.throwError("data out-of-bounds",s.Logger.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new f(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))}}},11388:function(e,t,r){"use strict";r.d(t,{HY:function(){return y},IC:function(){return S},QV:function(){return v},Xg:function(){return A},YW:function(){return _},_R:function(){return m},pc:function(){return d}});var n=r(2593),i=r(6881),o=r(1581),s=r(95851);let a=new o.Logger(s.i),u={},c={calldata:!0,memory:!0,storage:!0},l={calldata:!0,memory:!0};function h(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)&&l[t])return!0;return(c[t]||"payable"===t)&&a.throwArgumentError("invalid modifier","name",t),!1}function f(e,t){for(let r in t)(0,i.defineReadOnly)(e,r,t[r])}let d=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),p=new RegExp(/^(.*)\[([0-9]*)\]$/);class m{constructor(e,t){e!==u&&a.throwError("use fromString",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),f(this,t);let r=this.type.match(p);r?f(this,{arrayLength:parseInt(r[2]||"-1"),arrayChildren:m.fromObject({type:r[1],components:this.components}),baseType:"array"}):f(this,{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=d.sighash),d[e]||a.throwArgumentError("invalid format type","format",e),e===d.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)+"["+(this.arrayLength<0?"":String(this.arrayLength))+"]":"tuple"===this.baseType?(e!==d.sighash&&(t+=this.type),t+="("+this.components.map(t=>t.format(e)).join(e===d.full?", ":",")+")"):t+=this.type,e!==d.sighash&&(!0===this.indexed&&(t+=" indexed"),e===d.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?m.fromString(e,t):m.fromObject(e)}static fromObject(e){return m.isParamType(e)?e:new m(u,{name:e.name||null,type:O(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(m.fromObject):null})}static fromString(e,t){var r;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=O(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=""),h(s.type,s.name)&&(s.name=""),s.type=O(s.type);let a=s;(s=s.parent)||n(r),delete a.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=""),h(s.type,s.name)&&(s.name=""),s.type=O(s.type);let u=i(s.parent);s.parent.components.push(u),delete s.parent,s=u;break;case" ":s.state.allowType&&""!==s.type&&(s.type=O(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=""):h(s.t
1ype,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=""):h(s.type,s.name)&&(s.name=""),o.type=O(o.type),o}(e,!!t),m.fromObject({name:r.name,type:r.type,indexed:r.indexed,components:r.components})}static isParamType(e){return!!(null!=e&&e._isParamType)}}function g(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&&-1==--n&&a.throwArgumentError("unbalanced parenthesis","value",e))}return r&&t.push(r),t})(e).map(e=>m.fromString(e,t))}class y{constructor(e,t){e!==u&&a.throwError("use a static from method",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),f(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 _.fromObject(e);case"event":return v.fromObject(e);case"constructor":return A.fromObject(e);case"error":return S.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]?v.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?_.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?A.fromString(e.trim()):"error"===e.split(" ")[0]?S.fromString(e.substring(5).trim()):a.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!!(e&&e._isFragment)}}class v extends y{format(e){if(e||(e=d.sighash),d[e]||a.throwArgumentError("invalid format type","format",e),e===d.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!==d.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map(t=>t.format(e)).join(e===d.full?", ":",")+") ",e!==d.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?v.fromString(e):v.fromObject(e)}static fromObject(e){if(v.isEventFragment(e))return e;"event"!==e.type&&a.throwArgumentError("invalid event object","value",e);let t={name:P(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(m.fromObject):[],type:"event"};return new v(u,t)}static fromString(e){let t=e.match(C);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)}}),v.fromObject({name:t[1].trim(),anonymous:r,inputs:g(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function b(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 E(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 A extends y{format(e){if(e||(e=d.sighash),d[e]||a.throwArgumentError("invalid format type","format",e),e===d.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===d.sighash&&a.throwError("cannot format a constructor for sighash",o.Logger.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map(t=>t.format(e)).join(e===d.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?A.fromString(e):A.fromObject(e)}static fromObject(e){if(A.isConstructorFragment(e))return e;"constructor"!==e.type&&a.throwArgumentError("invalid constructor object","value",e);let t=E(e);t.constant&&a.throwArgumentError("constructor cannot be constant","value",e);let r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(m.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new A(u,r)}static fromString(e){let t={type:"constructor"},r=(e=b(e,t)).match(C);return r&&"constructor"===r[1].trim()||a.throwArgumentError("invalid constructor string","value",e),t.input
1s=g(r[2].trim(),!1),w(r[3].trim(),t),A.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class _ extends A{format(e){if(e||(e=d.sighash),d[e]||a.throwArgumentError("invalid format type","format",e),e===d.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!==d.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map(t=>t.format(e)).join(e===d.full?", ":",")+") ",e!==d.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?_.fromString(e):_.fromObject(e)}static fromObject(e){if(_.isFunctionFragment(e))return e;"function"!==e.type&&a.throwArgumentError("invalid function object","value",e);let t=E(e),r={type:e.type,name:P(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(m.fromObject):[],outputs:e.outputs?e.outputs.map(m.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.O$.from(e.gas):null};return new _(u,r)}static fromString(e){let t={type:"function"},r=(e=b(e,t)).split(" returns ");r.length>2&&a.throwArgumentError("invalid function string","value",e);let n=r[0].match(C);if(n||a.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&P(t.name),t.inputs=g(n[2],!1),w(n[3].trim(),t),r.length>1){let n=r[1].match(C);(""!=n[1].trim()||""!=n[3].trim())&&a.throwArgumentError("unexpected tokens","value",e),t.outputs=g(n[2],!1)}else t.outputs=[];return _.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function k(e){let t=e.format();return("Error(string)"===t||"Panic(uint256)"===t)&&a.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class S extends y{format(e){if(e||(e=d.sighash),d[e]||a.throwArgumentError("invalid format type","format",e),e===d.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(t=>JSON.parse(t.format(e)))});let t="";return e!==d.sighash&&(t+="error "),(t+=this.name+"("+this.inputs.map(t=>t.format(e)).join(e===d.full?", ":",")+") ").trim()}static from(e){return"string"==typeof e?S.fromString(e):S.fromObject(e)}static fromObject(e){if(S.isErrorFragment(e))return e;"error"!==e.type&&a.throwArgumentError("invalid error object","value",e);let t={type:e.type,name:P(e.name),inputs:e.inputs?e.inputs.map(m.fromObject):[]};return k(new S(u,t))}static fromString(e){let t={type:"error"},r=e.match(C);return r||a.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&P(t.name),t.inputs=g(r[2],!1),k(S.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function O(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}let x=RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function P(e){return e&&e.match(x)||a.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}let C=RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},83893:function(e,t,r){"use strict";r.r(t),r.d(t,{AbiCoder:function(){return i.R},ConstructorFragment:function(){return n.Xg},ErrorFragment:function(){return n.IC},EventFragment:function(){return n.QV},FormatTypes:function(){return n.pc},Fragment:function(){return n.HY},FunctionFragment:function(){return n.YW},Indexed:function(){return o.Hk},Interface:function(){return o.vU},LogDescription:function(){return o.CC},ParamType:function(){return n._R},TransactionDescription:function(){return o.vk},checkResultErrors:function(){return s.BR},defaultAbiCoder:function(){return i.$}});var n=r(11388),i=r(84243),o=r(8198),s=r(61184)},8198:function(e,t,r){"use strict";r.d(t,{CC:function(){return p},Hk:function(){return y},vU:function(){return w},vk:function(){return m}});
1var n=r(19485),i=r(2593),o=r(16441),s=r(32046),a=r(38197),u=r(6881),c=r(84243),l=r(11388),h=r(1581),f=r(95851);let d=new h.Logger(f.i);class p extends u.Description{}class m extends u.Description{}class g extends u.Description{}class y extends u.Description{static isIndexed(e){return!!(e&&e._isIndexed)}}let v={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function b(e,t){let r=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,u.defineReadOnly)(this,"fragments",t.map(e=>l.HY.from(e)).filter(e=>null!=e)),(0,u.defineReadOnly)(this,"_abiCoder",(0,u.getStatic)(new.target,"getAbiCoder")()),(0,u.defineReadOnly)(this,"functions",{}),(0,u.defineReadOnly)(this,"errors",{}),(0,u.defineReadOnly)(this,"events",{}),(0,u.defineReadOnly)(this,"structs",{}),this.fragments.forEach(e=>{let t=null;switch(e.type){case"constructor":if(this.deploy){d.warn("duplicate definition - constructor");return}(0,u.defineReadOnly)(this,"deploy",e);return;case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();if(t[r]){d.warn("duplicate definition - "+r);return}t[r]=e}),this.deploy||(0,u.defineReadOnly)(this,"deploy",l.Xg.from({payable:!1,type:"constructor"})),(0,u.defineReadOnly)(this,"_isInterface",!0)}format(e){e||(e=l.pc.full),e===l.pc.sighash&&d.throwArgumentError("interface does not support formatting sighash","format",e);let t=this.fragments.map(t=>t.format(e));return e===l.pc.json?JSON.stringify(t.map(e=>JSON.parse(e))):t}static getAbiCoder(){return c.$}static getAddress(e){return(0,n.getAddress)(e)}static getSighash(e){return(0,o.hexDataSlice)((0,s.id)(e.format()),0,4)}static getEventTopic(e){return(0,s.id)(e.format())}getFunction(e){if((0,o.isHexString)(e)){for(let t in this.functions)if(e===this.getSighash(t))return this.functions[t];d.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){let t=e.trim(),r=Object.keys(this.functions).filter(e=>e.split("(")[0]===t);return 0===r.length?d.throwArgumentError("no matching function","name",t):r.length>1&&d.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}let t=this.functions[l.YW.fromString(e).format()];return t||d.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,o.isHexString)(e)){let t=e.toLowerCase();for(let e in this.events)if(t===this.getEventTopic(e))return this.events[e];d.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){let t=e.trim(),r=Object.keys(this.events).filter(e=>e.split("(")[0]===t);return 0===r.length?d.throwArgumentError("no matching event","name",t):r.length>1&&d.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}let t=this.events[l.QV.fromString(e).format()];return t||d.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,o.isHexString)(e)){let t=(0,u.getStatic)(this.constructor,"getSighash");for(let r in this.errors){let n=this.errors[r];if(e===t(n))return this.errors[r]}d.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){let t=e.trim(),r=Object.keys(this.errors).filter(e=>e.split("(")[0]===t);return 0===r.length?d.throwArgumentError("no matching error","name",t):r.length>1&&d.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}let t=this.errors[l.YW.fromString(e).format()];return t||d.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,u.getStatic)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,u.getStatic)(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));let r=(0,o.arrayify)(t);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)&&d.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,o.hexlify)((0,o.concat)([this.get
1Sighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=(0,o.arrayify)(t);return(0,o.hexlify)(r.slice(0,4))!==this.getSighash(e)&&d.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,o.hexlify)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.hexlify)((0,o.concat)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=(0,o.arrayify)(t),n=null,i="",s=null,a=null,u=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{let e=(0,o.hexlify)(r.slice(0,4)),t=v[e];if(t)s=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,u=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{let t=this.getError(e);s=this._abiCoder.decode(t.inputs,r.slice(4)),a=t.name,u=t.format()}catch(e){}}}return d.throwError("call revert exception"+i,h.Logger.errors.CALL_EXCEPTION,{method:e.format(),data:(0,o.hexlify)(t),errorArgs:s,errorName:a,errorSignature:u,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,o.hexlify)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&d.throwError("too many arguments for "+e.format(),h.Logger.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));let n=(e,t)=>"string"===e.type?(0,s.id)(t):"bytes"===e.type?(0,a.keccak256)((0,o.hexlify)(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.hexZeroPad)((0,o.hexlify)(t),32));for(t.forEach((t,i)=>{let o=e.inputs[i];if(!o.indexed){null!=t&&d.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+o.name,t);return}null==t?r.push(null):"array"===o.baseType||"tuple"===o.baseType?d.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))});r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));let r=[],n=[],i=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&d.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach((e,o)=>{let u=t[o];if(e.indexed){if("string"===e.type)r.push((0,s.id)(u));else if("bytes"===e.type)r.push((0,a.keccak256)(u));else if("tuple"===e.baseType||"array"===e.baseType)throw Error("not implemented");else r.push(this._abiCoder.encode([e.type],[u]))}else n.push(e),i.push(u)}),{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.isHexString)(r[0],32)&&r[0].toLowerCase()===t||d.throwError("fragment/topic mismatch",h.Logger.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(l._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.concat)(r)):null,u=this._abiCoder.decode(i,t,!0),c=[],f=0,p=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[p++]});else try{c[t]=a[p++]}catch(e){c[t]=e}}else try{c[t]=u[f++]}catch(e){c[t]=e}if(e.name&&null==c[e.name]){let r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:()=>{throw b(`property ${JSON.stringify(e.name)}`,r)}}):c[e.name]=r}});for(let e=0;e<c.length;e++){let t=c[e];t instanceof Error&&Object.defineProperty(c,e,{enumerable:!0,get:()=>{throw b(`index ${e}`,t)}})}return Object.freeze(c)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new m({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 p({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){let t=(0,o.hexlify)(e),r=this.getError(t.substring(0,10).toLowerCase());return r?new g({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)}}},81556:function(e,t,r){"use strict";r.d(t,{Sg:function(){return a},zt:function(){return u}});var n=r(2593),i=r(6881),o=r(1581);let s=new o.Logger("abstract-provider/5.7.0");class a extends i.Description{static isForkEvent(e){return!!(e&&e._isForkEvent)}}class u{constructor(){s.checkAbstract(new.target,u),(0,i.defineReadOnly)(this,"_isProvider",!0)}getFeeData(){var e,t,r,o;return e=this,t=void 0,r=void 0,o=function*(){let{block:e,gasPrice:t}=yield(0,i.resolveProperties)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(e=>null)}),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||(r=Promise))(function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((o=o.apply(e,t||[])).next())})}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!!(e&&e._isProvider)}}},48088:function(e,t,r){"use strict";r.d(t,{E:function(){return c},b:function(){return l}});var n=r(6881),i=r(1581),o=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})};let s=new i.Logger("abstract-signer/5.7.0"),a=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","
1nonce","to","type","value"],u=[i.Logger.errors.INSUFFICIENT_FUNDS,i.Logger.errors.NONCE_EXPIRED,i.Logger.errors.REPLACEMENT_UNDERPRICED];class c{constructor(){s.checkAbstract(new.target,c),(0,n.defineReadOnly)(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");let t=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.estimateGas(t)})}call(e,t){return o(this,void 0,void 0,function*(){this._checkProvider("call");let r=yield(0,n.resolveProperties)(this.checkTransaction(e));return yield this.provider.call(r,t)})}sendTransaction(e){return o(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let 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*(){this._checkProvider("getChainId");let e=yield this.provider.getNetwork();return e.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(let t in e)-1===a.indexOf(t)&&s.throwArgumentError("invalid transaction key: "+t,"transaction",e);let t=(0,n.shallowCopy)(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*(){let t=yield(0,n.resolveProperties)(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;let t=yield this.resolveName(e);return null==t&&s.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})),t.to.catch(e=>{}));let r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null!=t.gasPrice&&(2===t.type||r)?s.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e):(0===t.type||1===t.type)&&r&&s.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e),(2===t.type||null==t.type)&&null!=t.maxFeePerGas&&null!=t.maxPriorityFeePerGas)t.type=2;else if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{let e=yield this.getFeeData();if(null==t.type){if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas){if(t.type=2,null!=t.gasPrice){let 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.Logger.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):s.throwError("failed to get consistent fee data",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"})}else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch(e=>{if(u.indexOf(e.code)>=0)throw e;return s.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",i.Logger.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.resolveProperties)(t)})}_checkProvider(e){this.provider||s.throwError("missing provider",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!!(e&&e._isSigner)}}class l extends c{constructor(e,t){super(),(0,n.defineReadOnly)(this,"address",e),(0,n.defineReadOnly)(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then(()=>{s.throwError(e,i.Logger.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 l(this.address,e)}}},19485:function(e,t,r){"use strict";r.r(t),r.d(t,{getAddress:function(){return d},getContractAddress:function(){return g},getCreate2Address:function(){return y},getIcapAddress:function(){return m},isAddress:function(){return p}});var n=r(16441),i=r(2593),o=r(38197),s=r(59052),a=r(1581);let u=new a.Logger("address/5.7.0");function c(e){(0,n.isHexString)(e,20)||u.throwArgumentError("invalid address","address",e),e=e.toLowerCase();let t=e.substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);let i=(0,n.arrayify)((0,o.keccak256)(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("")}let l={};for(let e=0;e<10;e++)l[String(e)]=String(e);for(let e=0;e<26;e++)l[String.fromCharCode(65+e)]=String(10+e);let h=Math.floor(Math.log10?Math.log10(9007199254740991):Math.log(9007199254740991)/Math.LN10);function f(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map(e=>l[e]).join("");for(;t.length>=h;){let e=t.substring(0,h);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 d(e){let t=null;if("string"!=typeof e&&u.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=c(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.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)!==f(e)&&u.throwArgumentError("bad icap checksum","address",e),t=(0,i.g$)(e.substring(4));t.length<40;)t="0"+t;t=c("0x"+t)}else u.throwArgumentError("invalid address","address",e);return t}function p(e){try{return d(e),!0}catch(e){}return!1}function m(e){let t=(0,i.t2)(d(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+f("XE00"+t)+t}function g(e){let t=null;try{t=d(e.from)}catch(t){u.throwArgumentError("missing from address","transaction",e)}let r=(0,n.stripZeros)((0,n.arrayify)(i.O$.from(e.nonce).toHexString()));return d((0,n.hexDataSlice)((0,o.keccak256)((0,s.encode)([t,r])),12))}function y(e,t,r){return 32!==(0,n.hexDataLength)(t)&&u.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.hexDataLength)(r)&&u.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),d((0,n.hexDataSlice)((0,o.keccak256)((0,n.concat)(["0xff",d(e),t,r])),12))}},59567:function(e,t,r){"use strict";r.d(t,{J:function(){return i},c:function(){return o}});var n=r(16441);function i(e){e=atob(e);let t=[];for(let r=0;r<e.length;r++)t.push(e.charCodeAt(r));return(0,n.arrayify)(t)}function o(e){e=(0,n.arrayify)(e);let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}},4089:function(e,t,r){"use strict";r.r(t),r.d(t,{decode:function(){return n.J},encode:function(){return n.c}});var n=r(59567)},57727:function(e,t,r){"use strict";r.r(t),r.d(t,{Base32:function(){return s},Base58:function(){return a},BaseX:function(){return o}});var n=r(16441),i=r(6881);class o{constructor(e){(0,i.defineReadOnly)(this,"alphabet",e),(0,i.defineReadOnly)(this,"base",e.length),(0,i.defineReadOnly)(this,"_alphabetMap",{}),(0,i.defineReadOnly)(this,"_leader",e.charAt(0));for(let t=0;t<e.length;t++)this._alphabetMap[e.charAt(t)]=t}encode(e){let t=(0,n.arrayify)(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 i="";for(let e=0;0===t[e]&&e<t.length-1;++e)i+=this._leader;for(let e=r.length-1;e>=0;--e)i+=this.alphabet[r[e]];return i}decode(e){if("string"!=typeof e)throw 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 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,n.arrayify)(new Uint8Array(t.reverse()))}}let s=new o("abcdefghijklmnopqrstuvwxyz234567"),a=new o("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},48794:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});let n="bignumber/5.7.0"},2593:function(e,t,r){"use strict";r.d(t,{O$:function(){return d},Zm:function(){return h},g$:function(){return v},t2:function(){return b}});var n=r(13550),i=r.n(n),o=r(16441),s=r(1581),a=r(48794),u=i().BN;let c=new s.Logger(a.i),l={};function h(e){return null!=e&&(d.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,o.isHexString)(e)||"bigint"==typeof e||(0,o.isBytes)(e))}let f=!1;class d{constructor(e,t){e!==l&&c.throwError("cannot call constructor directly; use BigNumber.from",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return m(g(this).fromTwos(e))}toTwos(e){return m(g(this).toTwos(e))}abs(){return"-"===this._hex[0]?d.from(this._hex.substring(1)):this}add(e){return m(g(this).add(g(e)))}sub(e){return m(g(this).sub(g(e)))}div(e){let t=d.from(e);return t.isZero()&&y("division-by-zero","div"),m(g(this).div(g(e)))}mul(e){return m(g(this).mul(g(e)))}mod(e){let t=g(e);return t.isNeg()&&y("division-by-zero","mod"),m(g(this).umod(t))}pow(e){let t=g(e);return t.isNeg()&&y("negative-power","pow"),m(g(this).pow(t))}and(e){let t=g(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","and"),m(g(this).and(t))}or(e){let t=g(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","or"),m(g(this).or(t))}xor(e){let t=g(e);return(this.isNegative()||t.isNeg())&&y("unbound-bitwise-result","xor"),m(g(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&y("negative-width","mask"),m(g(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&y("negative-width","shl"),m(g(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&y("negative-width","shr"),m(g(this).shrn(e))}eq(e){return g(this).eq(g(e))}lt(e){return g(this).lt(g(e))}lte(e){return g(this).lte(g(e))}gt(e){return g(this).gt(g(e))}gte(e){return g(this).gte(g(e))}isNegative(){return"-"===this._hex[0]}isZero(){return g(this).isZero()}toNumber(){try{return g(this).toNumber()}catch(e){y("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return c.throwError("this platform does not support BigInt",s.Logger.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>
10&&(10===arguments[0]?f||(f=!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.Logger.errors.UNEXPECTED_ARGUMENT,{}):c.throwError("BigNumber.toString does not accept parameters",s.Logger.errors.UNEXPECTED_ARGUMENT,{})),g(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof d)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new d(l,p(e)):e.match(/^-?[0-9]+$/)?new d(l,p(new u(e))):c.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&y("underflow","BigNumber.from",e),(e>=9007199254740991||e<=-9007199254740991)&&y("overflow","BigNumber.from",e),d.from(String(e));if("bigint"==typeof e)return d.from(e.toString());if((0,o.isBytes)(e))return d.from((0,o.hexlify)(e));if(e){if(e.toHexString){let t=e.toHexString();if("string"==typeof t)return d.from(t)}else{let t=e._hex;if(null==t&&"BigNumber"===e.type&&(t=e.hex),"string"==typeof t&&((0,o.isHexString)(t)||"-"===t[0]&&(0,o.isHexString)(t.substring(1))))return d.from(t)}}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 d.from(p(e))}function g(e){let t=d.from(e).toHexString();return"-"===t[0]?new u("-"+t.substring(3),16):new u(t.substring(2),16)}function y(e,t,r){let n={fault:e,operation:t};return null!=r&&(n.value=r),c.throwError(e,s.Logger.errors.NUMERIC_FAULT,n)}function v(e){return new u(e,36).toString(16)}function b(e){return new u(e,16).toString(36)}},20335:function(e,t,r){"use strict";r.d(t,{Ox:function(){return m},S5:function(){return p},xs:function(){return y}});var n=r(16441),i=r(1581),o=r(48794),s=r(2593);let a=new i.Logger(o.i),u={},c=s.O$.from(0),l=s.O$.from(-1);function h(e,t,r,n){let o={fault:t,operation:r};return void 0!==n&&(o.value=n),a.throwError(e,i.Logger.errors.NUMERIC_FAULT,o)}let f="0";for(;f.length<256;)f+=f;function d(e){if("number"!=typeof e)try{e=s.O$.from(e).toNumber()}catch(e){}return"number"==typeof e&&e>=0&&e<=256&&!(e%1)?"1"+f.substring(0,e):a.throwArgumentError("invalid decimal size","decimals",e)}function p(e,t){null==t&&(t=0);let r=d(t);e=s.O$.from(e);let n=e.lt(c);n&&(e=e.mul(l));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];let o=e.div(r).toString();return e=1===r.length?o:o+"."+i,n&&(e="-"+e),e}function m(e,t){null==t&&(t=0);let r=d(t);"string"==typeof e&&e.match(/^-?[0-9.]+$/)||a.throwArgumentError("invalid decimal value","value",e);let n="-"===e.substring(0,1);n&&(e=e.substring(1)),"."===e&&a.throwArgumentError("missing value","value",e);let i=e.split(".");i.length>2&&a.throwArgumentError("too many decimal points","value",e);let o=i[0],u=i[1];for(o||(o="0"),u||(u="0");"0"===u[u.length-1];)u=u.substring(0,u.length-1);for(u.length>r.length-1&&h("fractional component exceeds decimals","underflow","parseFixed"),""===u&&(u="0");u.length<r.length-1;)u+="0";let c=s.O$.from(o),f=s.O$.from(u),p=c.mul(r).add(f);return n&&(p=p.mul(l)),p}class g{constructor(e,t,r,n){e!==u&&a.throwError("cannot use FixedFormat constructor; use FixedFormat.from",i.Logger.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=d(n),Object.freeze(this)}static from(e){if(e instanceof g)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{let i=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);i||a.throwArgumentError("invalid fixed format","format",e),t="u"!==i[1],r=parseInt(i[2]),n=parseInt(i[3])}}else if(e){let i=(t,r,n)=>null==e[t]?n:(typeof e[t]!==r&&a.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&&a.throwArgumentError("invalid fixed format width (not byte aligned)","format.width",r),n>80&&a.throwArgumentError("invalid fixed format (decimals too large)","format.decimals",n),new g(u,t,r,n)}}class y{constructor(e,t,r,n){e!==u&&a.throwError("cannot use FixedNumber constructor; use FixedNumber.from",i.Logger.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&&a.throwArgumentError("incompatible format; use fixedNumber.toFormat","other",e)}addUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.add(r),this.format.decimals,this.format)}subUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.sub(r),this.format.decimals,this.format)}mulUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.mul(r).div(this.format._multiplier),this.format.decimals,this.format)}divUnsafe(e){this._checkFormat(e);let t=m(this._value,this.format.decimals),r=m(e._value,e.format.decimals);return y.fromValue(t.mul(this.format._multiplier).div(r),this.format.decimals,this.format)}floor(){let e=this.toString().split(".");1===e.length&&e.push("0");let t=y.from(e[0],this.format),r=!e[1].match(/^(0*)$/);return this.isNegative()&&r&&(t=t.subUnsafe(v.toFormat(t.format))),t}ceiling(){let e=this.toString().split(".");1===e.length&&e.push("0");let t=y.from(e[0],this.format),r=!e[1].match(/^(0*)$/);return!this.isNegative()&&r&&(t=t.addUnsafe(v.toFormat(t.format))),t}round(e){null==e&&(e=0);let t=this.toString().split(".");if(1===t.length&&t.push("0"),(e<0||e>80||e%1)&&a.throwArgumentError("invalid decimal count","decimals",e),t[1].length<=e)return this;let r=y.from("1"+f.substring(0,e),this.format),n=b.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&&a.throwArgumentError("invalid byte width","width",e);let t=s.O$.from(this._hex).fromTwos(this.format.width).toTwos(e).toHexString();return(0,n.hexZeroPad)(t,e/8)}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return y.fromString(this._value,e)}static fromValue(e,t,r){return null!=r||null==t||(0,s.Zm)(t)||(r=t,t=null),null==t&&(t=0),null==r&&(r="fixed"),y.fromString(p(e,t),g.from(r))}static fromString(e,t){null==t&&(t="fixed");let r=g.from(t),i=m(e,r.decimals);!r.signed&&i.lt(c)&&h("unsigned value cannot be negative","overflow","value",e);let o=null;r.signed?o=i.toTwos(r.width).toHexString():(o=i.toHexString(),o=(0,n.hexZeroPad)(o,r.width/8));let s=p(i,r.decimals);return new y(u,o,s,r)}static fromBytes(e,t){null==t&&(t="fixed");let r=g.from(t);if((0,n.arrayify)(e).length>r.width/8)throw Error("overflow");let i=s.O$.from(e);r.signed&&(i=i.fromTwos(r.width));let o=i.toTwos((r.signed?0:1)+r.width).toHexString(),a=p(i,r.decimals);return new y(u,o,a,r)}static from(e,t){if("string"==typeof e)return y.fromString(e,t);if((0,n.isBytes)(e))return y.fromBytes(e,t);try{return y.fromValue(e,0,t)}catch(e){if(e.code!==i.Logger.errors.INVALID_ARGUMENT)throw e}return a.throwArgumentError("invalid FixedNumber value","value",e)}static isFixedNumber(e){return!!(e&&e._isFixedNumber)}}let v=y.from(1),b=y.from("0.5")},16441:function(e,t,r){"use strict";r.r(t),r.d(t,{arrayify:function(){return l},concat:function(){return h},hexConcat:function(){return b},hexDataLength:function(){return y},hexDataSlice:function(){return v},hexStripZeros:function(){return E},hexValue:function(){return w},hexZeroPad:function(){return A},hexlify:function(){return g},isBytes:function(){return c},isBytesLike:function(){return a},isHexString:function(){return p},joinSignature:function(){return k},splitSignature:function(){return _},stripZeros:function(){return f},zeroPad:function(){return d}});var n=r(1581);let i=new n.Logger("bytes/5.7.0");function o(e){return!!e.toHexString}function s(e){return e.slice||(e.slice=function(){let t=Array.prototype.slice.call(arguments);return s(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return p(e)&&!(e.length%2)||c(e)}function u(e){return"number"==typeof e&&e==e&&e%1==0}function c(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;
1if("string"==typeof e||!u(e.length)||e.length<0)return!1;for(let t=0;t<e.length;t++){let r=e[t];if(!u(r)||r<0||r>=256)return!1}return!0}function l(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid arrayify value");let t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),s(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e)&&(e=e.toHexString()),p(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":i.throwArgumentError("hex data is odd-length","value",e));let n=[];for(let e=0;e<r.length;e+=2)n.push(parseInt(r.substring(e,e+2),16));return s(new Uint8Array(n))}return c(e)?s(new Uint8Array(e)):i.throwArgumentError("invalid arrayify value","value",e)}function h(e){let t=e.map(e=>l(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),s(n)}function f(e){let t=l(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=l(e)).length>t&&i.throwArgumentError("value out of range","value",arguments[0]);let r=new Uint8Array(t);return r.set(e,t-e.length),s(r)}function p(e,t){return"string"==typeof e&&!!e.match(/^0x[0-9A-Fa-f]*$/)&&(!t||e.length===2+2*t)}let m="0123456789abcdef";function g(e,t){if(t||(t={}),"number"==typeof e){i.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=m[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),o(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":i.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(c(e)){let t="0x";for(let r=0;r<e.length;r++){let n=e[r];t+=m[(240&n)>>4]+m[15&n]}return t}return i.throwArgumentError("invalid hexlify value","value",e)}function y(e){if("string"!=typeof e)e=g(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2}function v(e,t,r){return("string"!=typeof e?e=g(e):(!p(e)||e.length%2)&&i.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r)?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function b(e){let t="0x";return e.forEach(e=>{t+=g(e).substring(2)}),t}function w(e){let t=E(g(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function E(e){"string"!=typeof e&&(e=g(e)),p(e)||i.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=g(e):p(e)||i.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&i.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function _(e){let t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(e)){let r=l(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=g(r.slice(0,32)),t.s=g(r.slice(32,64))):65===r.length?(t.r=g(r.slice(0,32)),t.s=g(r.slice(32,64)),t.v=r[64]):i.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:i.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=g(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){let r=d(l(t._vs),32);t._vs=g(r);let n=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=n:t.recoveryParam!==n&&i.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;let o=g(r);null==t.s?t.s=o:t.s!==o&&i.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?i.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{let r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&i.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=A(t.r,32):i.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=A(t.s,32):i.throwArgumentError("signature missing or invalid s","signature",e);let r=l(t.s);r[0]>=128&&i.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);let n=g(r);t._vs&&(p(t._vs)||i.throwArgumentError("signature invalid _vs","signature",e),t._vs=A(t._vs,32)),null==t._vs?t._vs=n:t._vs!==n&&i.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 g(h([(e=_(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},9279:function(e,t,r){"use strict";r.d(t,{d:function(){return n}});let n="0x0000000000000000000000000000000000000000"},21046:function(e,t,r){"use strict";r.d(t,{$B:function(){return l},Bz:function(){return c},Ce:function(){return u},PS:function(){return h},Py:function(){return a},_Y:function(){return o},fh:function(){return s},tL:function(){return i}});var n=r(2593);let i=n.O$.from(-1),o=n.O$.from(0),s=n.O$.from(1),a=n.O$.from(2),u=n.O$.from("1000000000000000000"),c=n.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),l=n.O$.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),h=n.O$.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},57218:function(e,t,r){"use strict";r.d(t,{R:function(){return n}});let n="0x0000000000000000000000000000000000000000000000000000000000000000"},64146:function(e,t,r){"use strict";r.d(t,{VZ:function(){return x},CH:function(){return P},lV:function(){return C}});var n=r(61184),i=r(8198),o=r(81556),s=r(48088),a=r(19485),u=r(2593),c=r(16441),l=r(6881),h=r(83875),f=r(1581),d=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})};let p=new f.Logger("contracts/5.7.0"),m={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 g(e,t){return d(this,void 0,void 0,function*(){let r=yield t;"string"!=typeof r&&p.throwArgumentError("invalid address or ENS name","name",r);try{return(0,a.getAddress)(r)}catch(e){}e||p.throwError("a provider or signer is needed to resolve ENS names",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let n=yield e.resolveName(r);return null==n&&p.throwArgumentError("resolver or addr is not configured for ENS name","name",r),n})}function y(e,t,r){return d(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 g(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(p.makeError("invalid value for array",f.Logger.errors.INVALID_ARGUMENT,{argument:"value",value:t})):t})}function v(e,t,r){return d(this,void 0,void 0,function*(){let n={};r.length===t.inputs.length+1&&"object"==typeof r[r.length-1]&&(n=(0,l.shallowCopy)(r.pop())
1),p.checkArgumentCount(r.length,t.inputs.length,"passed to contract"),e.signer?n.from?n.from=(0,l.resolveProperties)({override:g(e.signer,n.from),signer:e.signer.getAddress()}).then(e=>d(this,void 0,void 0,function*(){return(0,a.getAddress)(e.signer)!==e.override&&p.throwError("Contract with a Signer cannot override from",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),e.override})):n.from=e.signer.getAddress():n.from&&(n.from=g(e.provider,n.from));let i=yield(0,l.resolveProperties)({args:y(e.signer||e.provider,r,t.inputs),address:e.resolvedAddress,overrides:(0,l.resolveProperties)(n)||{}}),o=e.interface.encodeFunctionData(t,i.args),s={data:o,to:i.address},m=i.overrides;if(null!=m.nonce&&(s.nonce=u.O$.from(m.nonce).toNumber()),null!=m.gasLimit&&(s.gasLimit=u.O$.from(m.gasLimit)),null!=m.gasPrice&&(s.gasPrice=u.O$.from(m.gasPrice)),null!=m.maxFeePerGas&&(s.maxFeePerGas=u.O$.from(m.maxFeePerGas)),null!=m.maxPriorityFeePerGas&&(s.maxPriorityFeePerGas=u.O$.from(m.maxPriorityFeePerGas)),null!=m.from&&(s.from=m.from),null!=m.type&&(s.type=m.type),null!=m.accessList&&(s.accessList=(0,h.accessListify)(m.accessList)),null==s.gasLimit&&null!=t.gas){let e=21e3,r=(0,c.arrayify)(o);for(let t=0;t<r.length;t++)e+=4,r[t]&&(e+=64);s.gasLimit=u.O$.from(t.gas).add(e)}if(m.value){let e=u.O$.from(m.value);e.isZero()||t.payable||p.throwError("non-payable method cannot override value",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:n.value}),s.value=e}m.customData&&(s.customData=(0,l.shallowCopy)(m.customData)),m.ccipReadEnabled&&(s.ccipReadEnabled=!!m.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;let v=Object.keys(n).filter(e=>null!=n[e]);return v.length&&p.throwError(`cannot override ${v.map(e=>JSON.stringify(e)).join(",")}`,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:v}),s})}function b(e,t){let r=t.wait.bind(t);t.wait=t=>r(t).then(t=>(t.events=t.logs.map(r=>{let n=(0,l.deepCopy)(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){let n=e.signer||e.provider;return function(...i){return d(this,void 0,void 0,function*(){let o;if(i.length===t.inputs.length+1&&"object"==typeof i[i.length-1]){let e=(0,l.shallowCopy)(i.pop());null!=e.blockTag&&(o=yield e.blockTag),delete e.blockTag,i.push(e)}null!=e.deployTransaction&&(yield e._deployed(o));let s=yield v(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===f.Logger.errors.CALL_EXCEPTION&&(t.address=e.address,t.args=i,t.transaction=s),t}})}}function E(e,t,r){return t.constant?w(e,t,r):function(...r){return d(this,void 0,void 0,function*(){e.signer||p.throwError("sending a transaction requires a signer",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=e.deployTransaction&&(yield e._deployed());let n=yield v(e,t,r),i=yield e.signer.sendTransaction(n);return b(e,i),i})}}function A(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 _{constructor(e,t){(0,l.defineReadOnly)(this,"tag",e),(0,l.defineReadOnly)(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){let t=this.listenerCount();return this._listeners=this._listeners.filter(t=>{let r=e.slice();return setTimeout(()=>{t.listener.apply(this,r)},0),!t.once}),t}prepareEvent(e){}getEmit(e){return[e]}}class k extends _{constructor(){super("error",null)}}class S extends _{constructor(e,t,r,n){let i={address:e},o=t.getEventTopic(r);n?(o!==n[0]&&p.throwArgumentError("topic mismatch","topics",n),i.topics=n.slice()):i.topics=[o],super(A(i),i),(0,l.defineReadOnly)(this,"address",e),(0,l.defineReadOnly)(this,"interface",t),(0,l.defineReadOnly)(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){let t=(0,n.BR)(e.args);if(t.length)throw t[0].error;let r=(e.args||[]).slice();return r.push(e),r}}class O extends _{constructor(e,t){super("*",{address:e}),(0,l.defineReadOnly)(this,"address",e),(0,l.defineReadOnly)(this,"interface",t)}prepareEvent(e){super.prepareEvent(e);try{let 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,l.defineReadOnly)(this,"interface",(0,l.getStatic)(new.target,"getInterface")(t)),null==r?((0,l.defineReadOnly)(this,"provider",null),(0,l.defineReadOnly)(this,"signer",null)):s.E.isSigner(r)?((0,l.defineReadOnly)(this,"provider",r.provider||null),(0,l.defineReadOnly)(this,"signer",r)):o.zt.isProvider(r)?((0,l.defineReadOnly)(this,"provider",r),(0,l.defineReadOnly)(this,"signer",null)):p.throwArgumentError("invalid signer or provider","signerOrProvider",r),(0,l.defineReadOnly)(this,"callStatic",{}),(0,l.defineReadOnly)(this,"estimateGas",{}),(0,l.defineReadOnly)(this,"functions",{}),(0,l.defineReadOnly)(this,"populateTransaction",{}),(0,l.defineReadOnly)(this,"filters",{});{let e={};
1Object.keys(this.interface.events).forEach(t=>{let r=this.interface.events[t];(0,l.defineReadOnly)(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=>{let r=e[t];1===r.length?(0,l.defineReadOnly)(this.filters,t,this.filters[r[0]]):p.warn(`Duplicate definition of ${t} (${r.join(", ")})`)})}if((0,l.defineReadOnly)(this,"_runningEvents",{}),(0,l.defineReadOnly)(this,"_wrappedEmits",{}),null==e&&p.throwArgumentError("invalid contract address or ENS name","addressOrName",e),(0,l.defineReadOnly)(this,"address",e),this.provider)(0,l.defineReadOnly)(this,"resolvedAddress",g(this.provider,e));else try{(0,l.defineReadOnly)(this,"resolvedAddress",Promise.resolve((0,a.getAddress)(e)))}catch(e){p.throwError("provider is required to use ENS name as contract address",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(e=>{});let n={},i={};Object.keys(this.interface.functions).forEach(e=>{let t=this.interface.functions[e];if(i[e]){p.warn(`Duplicate ABI entry for ${JSON.stringify(e)}`);return}i[e]=!0;{let r=t.name;n[`%${r}`]||(n[`%${r}`]=[]),n[`%${r}`].push(e)}if(null==this[e]&&(0,l.defineReadOnly)(this,e,E(this,t,!0)),null==this.functions[e]&&(0,l.defineReadOnly)(this.functions,e,E(this,t,!1)),null==this.callStatic[e]&&(0,l.defineReadOnly)(this.callStatic,e,w(this,t,!0)),null==this.populateTransaction[e]){var r;(0,l.defineReadOnly)(this.populateTransaction,e,(r=this,function(...e){return v(r,t,e)}))}null==this.estimateGas[e]&&(0,l.defineReadOnly)(this.estimateGas,e,function(e,t){let r=e.signer||e.provider;return function(...n){return d(this,void 0,void 0,function*(){r||p.throwError("estimate require a provider or signer",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let i=yield v(e,t,n);return yield r.estimateGas(i)})}}(this,t))}),Object.keys(n).forEach(e=>{let t=n[e];if(t.length>1)return;e=e.substring(1);let r=t[0];try{null==this[e]&&(0,l.defineReadOnly)(this,e,this[r])}catch(e){}null==this.functions[e]&&(0,l.defineReadOnly)(this.functions,e,this.functions[r]),null==this.callStatic[e]&&(0,l.defineReadOnly)(this.callStatic,e,this.callStatic[r]),null==this.populateTransaction[e]&&(0,l.defineReadOnly)(this.populateTransaction,e,this.populateTransaction[r]),null==this.estimateGas[e]&&(0,l.defineReadOnly)(this.estimateGas,e,this.estimateGas[r])})}static getContractAddress(e){return(0,a.getContractAddress)(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&&p.throwError("contract not deployed",f.Logger.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(e){this.signer||p.throwError("sending a transactions require a signer",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let t=(0,l.shallowCopy)(e||{});return["from","to"].forEach(function(e){null!=t[e]&&p.throwError("cannot override "+e,f.Logger.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));let t=new this.constructor(this.address,this.interface,e);return this.deployTransaction&&(0,l.defineReadOnly)(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 _("event",null));if("*"===e)return this._normalizeRunningEvent(new O(this.address,this.interface));let t=this.interface.getEvent(e);return this._normalizeRunningEvent(new S(this.address,this.interface,t))}if(e.topics&&e.topics.length>0){try{let t=e.topics[0];if("string"!=typeof t)throw Error("invalid topic");let r=this.interface.getEvent(t);return this._normalizeRunningEvent(new S(this.address,this.interface,r,e.topics))}catch(e){}let t={address:this.address,topics:e.topics};return this._normalizeRunningEvent(new _(A(t),t))}return this._normalizeRunningEvent(new O(this.address,this.interface))}_checkRunningEvents(e){if(0===e.listenerCount()){delete this._runningEvents[e.tag];let t=this._wrappedEmits[e.tag];t&&e.filter&&(this.provider.off(e.filter,t),delete this._wrappedEmits[e.tag])}}_wrapEvent(e,t,r){let n=(0,l.deepCopy)(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||p.throwError("events require a provider or a signer with a provider",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"once"}),e.addListener(t,r),this._runningEvents[e.tag]=e,!this._wrappedEmits[e.tag]){let r=r=>{let n=this._wrapEvent(e,r,t);if(null==n.decodeError)try{let t=e.getEmit(n);
1this.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){let n=this._getRunningEvent(e),i=(0,l.shallowCopy)(n.filter);return"string"==typeof t&&(0,c.isHexString)(t,32)?(null!=r&&p.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;let 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){let 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(let e in this._runningEvents){let t=this._runningEvents[e];t.removeAllListeners(),this._checkRunningEvents(t)}return this}let t=this._getRunningEvent(e);return t.removeAllListeners(),this._checkRunningEvents(t),this}off(e,t){if(!this.provider)return this;let 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 C{constructor(e,t,r){let n=null;"0x"!==(n="string"==typeof t?t:(0,c.isBytes)(t)?(0,c.hexlify)(t):t&&"string"==typeof t.object?t.object:"!").substring(0,2)&&(n="0x"+n),(!(0,c.isHexString)(n)||n.length%2)&&p.throwArgumentError("invalid bytecode","bytecode",t),r&&!s.E.isSigner(r)&&p.throwArgumentError("invalid signer","signer",r),(0,l.defineReadOnly)(this,"bytecode",n),(0,l.defineReadOnly)(this,"interface",(0,l.getStatic)(new.target,"getInterface")(e)),(0,l.defineReadOnly)(this,"signer",r||null)}getDeployTransaction(...e){let t={};if(e.length===this.interface.deploy.inputs.length+1&&"object"==typeof e[e.length-1]){for(let r in t=(0,l.shallowCopy)(e.pop()))if(!m[r])throw Error("unknown transaction override "+r)}if(["data","from","to"].forEach(e=>{null!=t[e]&&p.throwError("cannot override "+e,f.Logger.errors.UNSUPPORTED_OPERATION,{operation:e})}),t.value){let e=u.O$.from(t.value);e.isZero()||this.interface.deploy.payable||p.throwError("non-payable constructor cannot override value",f.Logger.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:t.value})}return p.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor"),t.data=(0,c.hexlify)((0,c.concat)([this.bytecode,this.interface.encodeDeploy(e)])),t}deploy(...e){return d(this,void 0,void 0,function*(){let t={};e.length===this.interface.deploy.inputs.length+1&&(t=e.pop()),p.checkArgumentCount(e.length,this.interface.deploy.inputs.length," in Contract constructor");let r=yield y(this.signer,e,this.interface.deploy.inputs);r.push(t);let n=this.getDeployTransaction(...r),i=yield this.signer.sendTransaction(n),o=(0,l.getStatic)(this.constructor,"getContractAddress")(i),s=(0,l.getStatic)(this.constructor,"getContract")(o,this.interface,this.signer);return b(s,i),(0,l.defineReadOnly)(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&&p.throwError("missing compiler output",f.Logger.errors.MISSING_ARGUMENT,{argument:"compilerOutput"}),"string"==typeof e&&(e=JSON.parse(e));let r=e.abi,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,a.getContractAddress)(e)}static getContract(e,t,r){return new P(e,t,r)}}},35644:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});let n="hash/5.7.0"},32046:function(e,t,r){"use strict";r.d(t,{id:function(){return o}});var n=r(38197),i=r(29251);function o(e){return(0,n.keccak256)((0,i.Y0)(e))}},75931:function(e,t,r){"use strict";r.r(t),r.d(t,{_TypedDataEncoder:function(){return s.E},dnsEncode:function(){return i.Kn},ensNormalize:function(){return i.w3},hashMessage:function(){return o.r},id:function(){return n.id},isValidName:function(){return i.r1},messagePrefix:function(){return o.B},namehash:function(){return i.VM}});
1var n=r(32046),i=r(27586),o=r(93684),s=r(67827)},93684:function(e,t,r){"use strict";r.d(t,{B:function(){return s},r:function(){return a}});var n=r(16441),i=r(38197),o=r(29251);let s="\x19Ethereum Signed Message:\n";function a(e){return"string"==typeof e&&(e=(0,o.Y0)(e)),(0,i.keccak256)((0,n.concat)([(0,o.Y0)(s),(0,o.Y0)(String(e.length)),e]))}},27586:function(e,t,r){"use strict";let n,i;r.d(t,{Kn:function(){return R},w3:function(){return x},r1:function(){return P},VM:function(){return C}});var o,s=r(16441),a=r(29251),u=r(38197),c=r(1581),l=r(35644),h=r(59567);function f(e,t){null==t&&(t=1);let 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 d(e,t){let r=Array(e);for(let n=0,i=-1;n<e;n++)r[n]=i+=1+t();return r}function p(e,t){let r=d(e(),e),n=e(),i=d(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 m(e,t,r){let n=Array(e).fill(void 0).map(()=>[]);for(let i=0;i<t;i++)(function(e,t){let r=Array(e);for(let i=0,o=0;i<e;i++){var n;r[i]=o+=1&(n=t())?~n>>1:n>>1}return r})(e,r).forEach((e,t)=>n[t].push(e));return n}let g=(o=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 u=0,c=0;function l(){return 0==u&&(c=c<<8|e[t++],u=8),c>>--u&1}let h=0;for(let e=0;e<31;e++)h=h<<1|l();let f=[],d=0,p=2147483648;for(;;){let e=Math.floor(((h-d+1)*i-1)/p),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<o[n]?r=n:t=n}if(0==t)break;f.push(t);let s=d+Math.floor(p*o[t]/i),a=d+Math.floor(p*o[t+1]/i)-1;for(;((s^a)&1073741824)==0;)h=h<<1&2147483647|l(),s=s<<1&2147483647,a=a<<1&2147483647|1;for(;s&~a&536870912;)h=1073741824&h|h<<1&1073741823|l(),s=s<<1^1073741824,a=(1073741824^a)<<1|1073741825;d=s,p=1+a-s}let m=n-4;return f.map(t=>
1{switch(t-m){case 3:return m+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return m+256+(e[a++]<<8|e[a++]);case 1:return m+e[a++];default:return t-1}})}((0,h.J)("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+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuX
1R4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+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
1+/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==")),i=0,()=>o[i++]),y=new Set(p(g)),v=new Set(p(g)),b=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(function(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 f(m(i.length,1+e,t).map((e,t)=>{let 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)]})}))}(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(m(1+e(),1+r,e).map(e=>[e[0],e.slice(1)]))}return function(e){let t={};for(let r=0;r<e.length;r++){let n=e[r];t[n[0]]=n[1]}return t}(f(t))}(g),w=(n=p(g).sort((e,t)=>e-t),function e(){let t=[];for(;;){let r=p(g,n);if(0==r.length)break;t.push({set:new Set(r),node:e()})}t.sort((e,t)=>
1t.set.size-e.set.size);let r=g();return{branches:t,valid:r%3,fe0f:!!(1&(r=r/3|0)),save:1==(r>>=1),check:2==r}}());function E(e){return e.filter(e=>65039!=e)}function A(e){for(let r of e.split(".")){var t;let e=(t=r,(0,a.XL)(t));try{for(let t=e.lastIndexOf(95)-1;t>=0;t--)if(95!==e[t])throw Error("underscore only allowed at start");if(e.length>=4&&e.every(e=>e<128)&&45===e[2]&&45===e[3])throw Error("invalid label extension")}catch(e){throw Error(`Invalid label "${r}": ${e.message}`)}}return e}let _=new c.Logger(l.i),k=new Uint8Array(32);function S(e){if(0===e.length)throw Error("invalid ENS name; empty component");return e}function O(e){let t=(0,a.Y0)(A(function(e,t){let r=(0,a.XL)(e).reverse(),n=[];for(;r.length;){let e=function(e,t){var r;let n,i;let o=w,s=[],a=e.length;for(t&&(t.length=0);a;){let u=e[--a];if(!(o=null===(r=o.branches.find(e=>e.set.has(u)))||void 0===r?void 0:r.node))break;if(o.save)i=u;else if(o.check&&u===i)break;s.push(u),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}(r);if(e){n.push(...t(e));continue}let i=r.pop();if(y.has(i)){n.push(i);continue}if(v.has(i))continue;let o=b[i];if(o){n.push(...o);continue}throw Error(`Disallowed codepoint: 0x${i.toString(16).toUpperCase()}`)}return A(String.fromCodePoint(...n).normalize("NFC"))}(e,E))),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++){let i=t[e];46===i&&(r.push(S(t.slice(n,e))),n=e+1)}if(n>=t.length)throw Error("invalid ENS name; empty component");return r.push(S(t.slice(n))),r}function x(e){return O(e).map(e=>(0,a.ZN)(e)).join(".")}function P(e){try{return 0!==O(e).length}catch(e){}return!1}function C(e){"string"!=typeof e&&_.throwArgumentError("invalid ENS name; not a string","name",e);let t=k,r=O(e);for(;r.length;)t=(0,u.keccak256)((0,s.concat)([t,(0,u.keccak256)(r.pop())]));return(0,s.hexlify)(t)}function R(e){return(0,s.hexlify)((0,s.concat)(O(e).map(e=>{if(e.length>63)throw Error("invalid DNS encoded entry; length exceeds 63 bytes");let t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t})))+"00"}k.fill(0)},67827:function(e,t,r){"use strict";r.d(t,{E:function(){return S}});var n=r(19485),i=r(2593),o=r(16441),s=r(38197),a=r(6881),u=r(1581),c=r(35644),l=r(32046);let h=new u.Logger(c.i),f=new Uint8Array(32);f.fill(0);let d=i.O$.from(-1),p=i.O$.from(0),m=i.O$.from(1),g=i.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),y=(0,o.hexZeroPad)(m.toHexString(),32),v=(0,o.hexZeroPad)(p.toHexString(),32),b={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},w=["name","version","chainId","verifyingContract","salt"];function E(e){return function(t){return"string"!=typeof t&&h.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}let A={name:E("name"),version:E("version"),chainId:function(e){try{return i.O$.from(e).toString()}catch(e){}return h.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(e){}return h.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{let t=(0,o.arrayify)(e);if(32!==t.length)throw Error("bad length");return(0,o.hexlify)(t)}catch(e){}return h.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function _(e){{let t=e.match(/^(u?)int(\d*)$/);if(t){let r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&h.throwArgumentError("invalid numeric width","type",e);let s=g.mask(r?n-1:n),a=r?s.add(m).mul(d):p;return function(t){let r=i.O$.from(t);return(r.lt(a)||r.gt(s))&&h.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),(0,o.hexZeroPad)(r.toTwos(256).toHexString(),32)}}}{let t=e.match(/^bytes(\d+)$/);if(t){let r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&h.throwArgumentError("invalid bytes width","type",e),function(t){let n=(0,o.arrayify)(t);return n.length!==r&&h.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){let t=(0,o.arrayify)(e),r=t.length%32;return r?(0,o.hexConcat)([t,f.slice(r)]):(0,o.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,o.hexZeroPad)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?y:v};case"bytes":return function(e){return(0,s.keccak256)(e)};case"string":return function(e){return(0,l.id)(e)}}return null}function k(e,t){return`${e}(${t.map(({name:e,type:t})=>t+" "+e).join(",")})`}class S{constructor(e){(0,a.defineReadOnly)(this,"types",Object.freeze((0,a.deepCopy)(e))),(0,a.defineReadOnly)(this,"_encoderCache",{}),(0,a.defineReadOnly)(this,"_types",{});let t={},r={},n={};
1for(let i in Object.keys(e).forEach(e=>{t[e]={},r[e]=[],n[e]={}}),e){let n={};e[i].forEach(o=>{n[o.name]&&h.throwArgumentError(`duplicate variable name ${JSON.stringify(o.name)} in ${JSON.stringify(i)}`,"types",e),n[o.name]=!0;let s=o.type.match(/^([^\x5b]*)(\x5b|$)/)[1];s===i&&h.throwArgumentError(`circular type reference to ${JSON.stringify(s)}`,"types",e);let a=_(s);a||(r[s]||h.throwArgumentError(`unknown type ${JSON.stringify(s)}`,"types",e),r[s].push(i),t[i][s]=!0)})}let i=Object.keys(r).filter(e=>0===r[e].length);for(let o in 0===i.length?h.throwArgumentError("missing primary type","types",e):i.length>1&&h.throwArgumentError(`ambiguous primary types or unused types: ${i.map(e=>JSON.stringify(e)).join(", ")}`,"types",e),(0,a.defineReadOnly)(this,"primaryType",i[0]),!function i(o,s){s[o]&&h.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,{}),n){let t=Object.keys(n[o]);t.sort(),this._types[o]=k(o,e[o])+t.map(t=>k(t,e[t])).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{let t=_(e);if(t)return t}let t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){let e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&h.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let i=t.map(r);return this._types[e]&&(i=i.map(s.keccak256)),(0,s.keccak256)((0,o.hexConcat)(i))}}let r=this.types[e];if(r){let t=(0,l.id)(this._types[e]);return e=>{let n=r.map(({name:t,type:r})=>{let n=this.getEncoder(r)(e[t]);return this._types[r]?(0,s.keccak256)(n):n});return n.unshift(t),(0,o.hexConcat)(n)}}return h.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){let t=this._types[e];return t||h.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,s.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){{let n=_(e);if(n)return r(e,t)}let n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){let e=n[1],i=parseInt(n[3]);return i>=0&&t.length!==i&&h.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map(t=>this._visit(e,t,r))}let i=this.types[e];return i?i.reduce((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e),{}):h.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new S(e)}static getPrimaryType(e){return S.from(e).primaryType}static hashStruct(e,t,r){return S.from(t).hashStruct(e,r)}static hashDomain(e){let t=[];for(let r in e){let n=b[r];n||h.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort((e,t)=>w.indexOf(e.name)-w.indexOf(t.name)),S.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,o.hexConcat)(["0x1901",S.hashDomain(e),S.from(t).hash(r)])}static hash(e,t,r){return(0,s.keccak256)(S.encode(e,t,r))}static resolveNames(e,t,r,n){var i,s,u,c;return i=this,s=void 0,u=void 0,c=function*(){e=(0,a.shallowCopy)(e);let i={};e.verifyingContract&&!(0,o.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");let s=S.from(t);for(let e in s.visit(r,(e,t)=>("address"!==e||(0,o.isHexString)(t,20)||(i[t]="0x"),t)),i)i[e]=yield n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),{domain:e,value:r=s.visit(r,(e,t)=>"address"===e&&i[t]?i[t]:t)}},new(u||(u=Promise))(function(e,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function n(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){var i;t.done?e(t.value):((i=t.value)instanceof u?i:new u(function(e){e(i)})).then(r,n)}o((c=c.apply(i,s||[])).next())})}static getPayload(e,t,r){S.hashDomain(e);let n={},s=[];w.forEach(t=>{let r=e[t];null!=r&&(n[t]=A[t](r),s.push({name:t,type:b[t]}))});let u=S.from(t),c=(0,a.shallowCopy)(t);return c.EIP712Domain?h.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):c.EIP712Domain=s,u.encode(r),{types:c,domain:n,primaryType:u.primaryType,message:u.visit(r,(e,t)=>{if(e.match(/^bytes(\d*)/))return(0,o.hexlify)((0,o.arrayify)(t));if(e.match(/^u?int/))return i.O$.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&h.throwArgumentError("invalid string","value",t),t}return h.throwArgumentError("unsupported type","type",e)})}}}},84178:function(e,t,r){"use strict";r.r(t),r.d(t,{HDNode:function(){return k},defaultPath:function(){return _},entropyToMnemonic:function(){return x},getAccountPath:function(){return C},isValidMnemonic:function(){return P},mnemonicToEntropy:function(){return O},mnemonicToSeed:function(){return S}});var n=r(57727),i=r(16441),o=r(2593),s=r(29251),a=r(85306),u=r(6881),c=r(6
17669),l=r(2006),h=r(21261),f=r(83875),d=r(10234),p=r(1581);let m=new p.Logger("hdnode/5.7.0"),g=o.O$.from("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),y=(0,s.Y0)("Bitcoin seed");function v(e){return(1<<e)-1<<8-e}function b(e){return(0,i.hexZeroPad)((0,i.hexlify)(e),32)}function w(e){return n.Base58.encode((0,i.concat)([e,(0,i.hexDataSlice)((0,l.JQ)((0,l.JQ)(e)),0,4)]))}function E(e){if(null==e)return d.E.en;if("string"==typeof e){let t=d.E[e];return null==t&&m.throwArgumentError("unknown locale","wordlist",e),t}return e}let A={},_="m/44'/60'/0'/0/0";class k{constructor(e,t,r,n,o,s,a,h){if(e!==A)throw Error("HDNode constructor cannot be called directly");if(t){let e=new c.SigningKey(t);(0,u.defineReadOnly)(this,"privateKey",e.privateKey),(0,u.defineReadOnly)(this,"publicKey",e.compressedPublicKey)}else(0,u.defineReadOnly)(this,"privateKey",null),(0,u.defineReadOnly)(this,"publicKey",(0,i.hexlify)(r));(0,u.defineReadOnly)(this,"parentFingerprint",n),(0,u.defineReadOnly)(this,"fingerprint",(0,i.hexDataSlice)((0,l.bP)((0,l.JQ)(this.publicKey)),0,4)),(0,u.defineReadOnly)(this,"address",(0,f.computeAddress)(this.publicKey)),(0,u.defineReadOnly)(this,"chainCode",o),(0,u.defineReadOnly)(this,"index",s),(0,u.defineReadOnly)(this,"depth",a),null==h?((0,u.defineReadOnly)(this,"mnemonic",null),(0,u.defineReadOnly)(this,"path",null)):"string"==typeof h?((0,u.defineReadOnly)(this,"mnemonic",null),(0,u.defineReadOnly)(this,"path",h)):((0,u.defineReadOnly)(this,"mnemonic",h),(0,u.defineReadOnly)(this,"path",h.path))}get extendedKey(){if(this.depth>=256)throw Error("Depth too large!");return w((0,i.concat)([null!=this.privateKey?"0x0488ADE4":"0x0488B21E",(0,i.hexlify)(this.depth),this.parentFingerprint,(0,i.hexZeroPad)((0,i.hexlify)(this.index),4),this.chainCode,null!=this.privateKey?(0,i.concat)(["0x00",this.privateKey]):this.publicKey]))}neuter(){return new k(A,null,this.publicKey,this.parentFingerprint,this.chainCode,this.index,this.depth,this.path)}_derive(e){if(e>4294967295)throw Error("invalid index - "+String(e));let t=this.path;t&&(t+="/"+(2147483647&e));let r=new Uint8Array(37);if(2147483648&e){if(!this.privateKey)throw Error("cannot derive child of neutered node");r.set((0,i.arrayify)(this.privateKey),1),t&&(t+="'")}else r.set((0,i.arrayify)(this.publicKey));for(let t=24;t>=0;t-=8)r[33+(t>>3)]=e>>24-t&255;let n=(0,i.arrayify)((0,l.Gy)(h.p.sha512,this.chainCode,r)),s=n.slice(0,32),a=n.slice(32),u=null,f=null;if(this.privateKey)u=b(o.O$.from(s).add(this.privateKey).mod(g));else{let e=new c.SigningKey((0,i.hexlify)(s));f=e._addPoint(this.publicKey)}let d=t,p=this.mnemonic;return p&&(d=Object.freeze({phrase:p.phrase,path:t,locale:p.locale||"en"})),new k(A,u,f,this.fingerprint,b(a),e,this.depth+1,d)}derivePath(e){let t=e.split("/");if(0===t.length||"m"===t[0]&&0!==this.depth)throw Error("invalid path - "+e);"m"===t[0]&&t.shift();let r=this;for(let e=0;e<t.length;e++){let n=t[e];if(n.match(/^[0-9]+'$/)){let e=parseInt(n.substring(0,n.length-1));if(e>=2147483648)throw Error("invalid path index - "+n);r=r._derive(2147483648+e)}else if(n.match(/^[0-9]+$/)){let e=parseInt(n);if(e>=2147483648)throw Error("invalid path index - "+n);r=r._derive(e)}else throw Error("invalid path component - "+n)}return r}static _fromSeed(e,t){let r=(0,i.arrayify)(e);if(r.length<16||r.length>64)throw Error("invalid seed");let n=(0,i.arrayify)((0,l.Gy)(h.p.sha512,y,r));return new k(A,b(n.slice(0,32)),null,"0x00000000",b(n.slice(32)),0,0,t)}static fromMnemonic(e,t,r){return e=x(O(e,r=E(r)),r),k._fromSeed(S(e,t),{phrase:e,path:"m",locale:r.locale})}static fromSeed(e){return k._fromSeed(e,null)}static fromExtendedKey(e){let t=n.Base58.decode(e);(82!==t.length||w(t.slice(0,78))!==e)&&m.throwArgumentError("invalid extended key","extendedKey","[REDACTED]");let r=t[4],o=(0,i.hexlify)(t.slice(5,9)),s=parseInt((0,i.hexlify)(t.slice(9,13)).substring(2),16),a=(0,i.hexlify)(t.slice(13,45)),u=t.slice(45,78);switch((0,i.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new k(A,null,(0,i.hexlify)(u),o,a,s,r,null);case"0x0488ade4":case"0x04358394 ":if(0!==u[0])break;return new k(A,(0,i.hexlify)(u.slice(1)),null,o,a,s,r,null)}return m.throwArgumentError("invalid extended key","extendedKey","[REDACTED]")}}function S(e,t){t||(t="");let r=(0,s.Y0)("mnemonic"+t,s.Uj.NFKD);return(0,a.n)((0,s.Y0)(e,s.Uj.NFKD),r,2048,64,"sha512")}function O(e,t){t=E(t),m.checkNormalize();let r=t.split(e);
1if(r.length%3!=0)throw Error("invalid mnemonic");let n=(0,i.arrayify)(new Uint8Array(Math.ceil(11*r.length/8))),o=0;for(let e=0;e<r.length;e++){let i=t.getWordIndex(r[e].normalize("NFKD"));if(-1===i)throw Error("invalid mnemonic");for(let e=0;e<11;e++)i&1<<10-e&&(n[o>>3]|=1<<7-o%8),o++}let s=32*r.length/3,a=r.length/3,u=v(a),c=(0,i.arrayify)((0,l.JQ)(n.slice(0,s/8)))[0]&u;if(c!==(n[n.length-1]&u))throw Error("invalid checksum");return(0,i.hexlify)(n.slice(0,s/8))}function x(e,t){if(t=E(t),(e=(0,i.arrayify)(e)).length%4!=0||e.length<16||e.length>32)throw Error("invalid entropy");let r=[0],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);let o=e.length/4,s=(0,i.arrayify)((0,l.JQ)(e))[0]&v(o);return r[r.length-1]<<=o,r[r.length-1]|=s>>8-o,t.join(r.map(e=>t.getWord(e)))}function P(e,t){try{return O(e,t),!0}catch(e){}return!1}function C(e){return("number"!=typeof e||e<0||e>=2147483648||e%1)&&m.throwArgumentError("invalid account index","index",e),`m/44'/60'/${e}'/0/0`}},29816:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});let n="json-wallets/5.7.0"},64341:function(e,t,r){"use strict";r.r(t),r.d(t,{decryptCrowdsale:function(){return g},decryptJsonWallet:function(){return b},decryptJsonWalletSync:function(){return w},decryptKeystore:function(){return v.pe},decryptKeystoreSync:function(){return v.hb},encryptKeystore:function(){return v.HI},getJsonWalletAddress:function(){return y.Rb},isCrowdsaleWallet:function(){return y.LW},isKeystoreWallet:function(){return y.aO}});var n=r(78826),i=r.n(n),o=r(19485),s=r(16441),a=r(38197),u=r(85306),c=r(29251),l=r(6881),h=r(1581),f=r(29816),d=r(97013);let p=new h.Logger(f.i);class m extends l.Description{isCrowdsaleAccount(e){return!!(e&&e._isCrowdsaleAccount)}}function g(e,t){let r=JSON.parse(e);t=(0,d.Ij)(t);let n=(0,o.getAddress)((0,d.gx)(r,"ethaddr")),l=(0,d.p3)((0,d.gx)(r,"encseed"));l&&l.length%16==0||p.throwArgumentError("invalid encseed","json",e);let h=(0,s.arrayify)((0,u.n)(t,t,2e3,32,"sha256")).slice(0,16),f=l.slice(0,16),g=l.slice(16),y=new(i()).ModeOfOperation.cbc(h,f),v=i().padding.pkcs7.strip((0,s.arrayify)(y.decrypt(g))),b="";for(let e=0;e<v.length;e++)b+=String.fromCharCode(v[e]);let w=(0,c.Y0)(b),E=(0,a.keccak256)(w);return new m({_isCrowdsaleAccount:!0,address:n,privateKey:E})}var y=r(67949),v=r(81964);function b(e,t,r){if((0,y.LW)(e)){r&&r(0);let n=g(e,t);return r&&r(1),Promise.resolve(n)}return(0,y.aO)(e)?(0,v.pe)(e,t,r):Promise.reject(Error("invalid JSON wallet"))}function w(e,t){if((0,y.LW)(e))return g(e,t);if((0,y.aO)(e))return(0,v.hb)(e,t);throw Error("invalid JSON wallet")}},67949:function(e,t,r){"use strict";r.d(t,{LW:function(){return i},Rb:function(){return s},aO:function(){return o}});var n=r(19485);function i(e){let t=null;try{t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}function o(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 s(e){if(i(e))try{return(0,n.getAddress)(JSON.parse(e).ethaddr)}catch(e){return null}if(o(e))try{return(0,n.getAddress)(JSON.parse(e).address)}catch(e){}return null}},81964:function(e,t,r){"use strict";r.d(t,{HI:function(){return x},hb:function(){return S},pe:function(){return O}});var n=r(78826),i=r.n(n),o=r(17635),s=r.n(o),a=r(19485),u=r(16441),c=r(84178),l=r(38197),h=r(85306),f=r(5634),d=r(6881),p=r(83875),m=r(97013),g=r(1581),y=r(29816);let v=new g.Logger(y.i);function b(e){return null!=e&&e.mnemonic&&e.mnemonic.phrase}class w extends d.Description{isKeystoreAccount(e){return!!(e&&e._isKeystoreAccount)}}function E(e,t){let r=(0,m.p3)((0,m.gx)(e,"crypto/ciphertext")),n=(0,u.hexlify)((0,l.keccak256)((0,u.concat)([t.slice(16,32),r]))).substring(2);if(n!==(0,m.gx)(e,"crypto/mac").toLowerCase())throw Error("invalid password");let o=function(e,t,r){let n=(0,m.gx)(e,"crypto/cipher");if("aes-128-ctr"===n){let n=(0,m.p3)((0,m.gx)(e,"crypto/cipherparams/iv")),o=new(i()).Counter(n),s=new(i()).ModeOfOperation.ctr(t,o);return(0,u.arrayify)(s.decrypt(r))}return null}(e,t.slice(0,16),r);o||v.throwError("unsupported cipher",g.Logger.errors.UNSUPPORTED_OPERATION,{operation:"decrypt"});let s=t.slice(32,64),h=(0,p.computeAddress)(o);if(e.address){let t=e.address.toLowerCase();if("0x"!==t.substring(0,2)&&(t="0x"+t),(0,a.getAddress)(t)!==h)throw Error("address mismatch")}let f={_isKeystoreAccount:!0,address:h,privateKey:(0,u.hexlify)(o)};if("0.1"===(0,m.gx)(e,"x-ethers/version")){let t=(0,m.p3)((0,m.gx)(e,"x-ethers/mnemonicCiphertext")),r=(0,m.p3)((0,m.gx)(e,"x-ethers/mnemonicCounter")),n=new(i()).Counter(r),o=new(i()).ModeOfOperation.ctr(s,n),a=(0,m.gx)(e,"x-ethers/path")||c.defaultPath,l=(0,m.gx)(e,"x-ethers/locale")||"en",h=(0,u.arrayify)(o.decrypt(t));try{let e=(0,c.entropyToMnemonic)(h,l),t=c.HDNode.fromMnemonic(e,null,l).derivePath(a);if(t.privateKey!=f.privateKey)throw Error("mnemonic mismatch");f.mnemonic=t.mnemonic}catch(e){if(e.code!==g.Logger.errors.INVALID_ARGUMENT||"wordlist"!==e.argument)throw e}}return new w(f)}
1function A(e,t,r,n,i){return(0,u.arrayify)((0,h.n)(e,t,r,n,i))}function _(e,t,r,n,i){return Promise.resolve(A(e,t,r,n,i))}function k(e,t,r,n,i){let o=(0,m.Ij)(t),s=(0,m.gx)(e,"crypto/kdf");if(s&&"string"==typeof s){let t=function(e,t){return v.throwArgumentError("invalid key-derivation function parameters",e,t)};if("scrypt"===s.toLowerCase()){let r=(0,m.p3)((0,m.gx)(e,"crypto/kdfparams/salt")),a=parseInt((0,m.gx)(e,"crypto/kdfparams/n")),u=parseInt((0,m.gx)(e,"crypto/kdfparams/r")),c=parseInt((0,m.gx)(e,"crypto/kdfparams/p"));a&&u&&c||t("kdf",s),(a&a-1)!=0&&t("N",a);let l=parseInt((0,m.gx)(e,"crypto/kdfparams/dklen"));return 32!==l&&t("dklen",l),n(o,r,a,u,c,64,i)}if("pbkdf2"===s.toLowerCase()){let n=(0,m.p3)((0,m.gx)(e,"crypto/kdfparams/salt")),i=null,s=(0,m.gx)(e,"crypto/kdfparams/prf");"hmac-sha256"===s?i="sha256":"hmac-sha512"===s?i="sha512":t("prf",s);let a=parseInt((0,m.gx)(e,"crypto/kdfparams/c")),u=parseInt((0,m.gx)(e,"crypto/kdfparams/dklen"));return 32!==u&&t("dklen",u),r(o,n,a,u,i)}}return v.throwArgumentError("unsupported key-derivation function","kdf",s)}function S(e,t){let r=JSON.parse(e),n=k(r,t,A,s().syncScrypt);return E(r,n)}function O(e,t,r){var n,i,o,a;return n=this,i=void 0,o=void 0,a=function*(){let n=JSON.parse(e),i=yield k(n,t,_,s().scrypt,r);return E(n,i)},new(o||(o=Promise))(function(e,t){function r(e){try{u(a.next(e))}catch(e){t(e)}}function s(e){try{u(a.throw(e))}catch(e){t(e)}}function u(t){var n;t.done?e(t.value):((n=t.value)instanceof o?n:new o(function(e){e(n)})).then(r,s)}u((a=a.apply(n,i||[])).next())})}function x(e,t,r,n){try{if((0,a.getAddress)(e.address)!==(0,p.computeAddress)(e.privateKey))throw Error("address/privateKey mismatch");if(b(e)){let t=e.mnemonic,r=c.HDNode.fromMnemonic(t.phrase,null,t.locale).derivePath(t.path||c.defaultPath);if(r.privateKey!=e.privateKey)throw Error("mnemonic mismatch")}}catch(e){return Promise.reject(e)}"function"!=typeof r||n||(n=r,r={}),r||(r={});let o=(0,u.arrayify)(e.privateKey),h=(0,m.Ij)(t),d=null,g=null,y=null;if(b(e)){let t=e.mnemonic;d=(0,u.arrayify)((0,c.mnemonicToEntropy)(t.phrase,t.locale||"en")),g=t.path||c.defaultPath,y=t.locale||"en"}let v=r.client;v||(v="ethers.js");let w=null;w=r.salt?(0,u.arrayify)(r.salt):(0,f.O)(32);let E=null;if(r.iv){if(16!==(E=(0,u.arrayify)(r.iv)).length)throw Error("invalid iv")}else E=(0,f.O)(16);let A=null;if(r.uuid){if(16!==(A=(0,u.arrayify)(r.uuid)).length)throw Error("invalid uuid")}else A=(0,f.O)(16);let _=131072,k=8,S=1;return r.scrypt&&(r.scrypt.N&&(_=r.scrypt.N),r.scrypt.r&&(k=r.scrypt.r),r.scrypt.p&&(S=r.scrypt.p)),s().scrypt(h,w,_,k,S,64,n).then(t=>{t=(0,u.arrayify)(t);let r=t.slice(0,16),n=t.slice(16,32),s=t.slice(32,64),a=new(i()).Counter(E),c=new(i()).ModeOfOperation.ctr(r,a),h=(0,u.arrayify)(c.encrypt(o)),p=(0,l.keccak256)((0,u.concat)([n,h])),b={address:e.address.substring(2).toLowerCase(),id:(0,m.EH)(A),version:3,crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,u.hexlify)(E).substring(2)},ciphertext:(0,u.hexlify)(h).substring(2),kdf:"scrypt",kdfparams:{salt:(0,u.hexlify)(w).substring(2),n:_,dklen:32,p:S,r:k},mac:p.substring(2)}};if(d){let e=(0,f.O)(16),t=new(i()).Counter(e),r=new(i()).ModeOfOperation.ctr(s,t),n=(0,u.arrayify)(r.encrypt(d)),o=new Date,a=o.getUTCFullYear()+"-"+(0,m.VP)(o.getUTCMonth()+1,2)+"-"+(0,m.VP)(o.getUTCDate(),2)+"T"+(0,m.VP)(o.getUTCHours(),2)+"-"+(0,m.VP)(o.getUTCMinutes(),2)+"-"+(0,m.VP)(o.getUTCSeconds(),2)+".0Z";b["x-ethers"]={client:v,gethFilename:"UTC--"+a+"--"+b.address,mnemonicCounter:(0,u.hexlify)(e).substring(2),mnemonicCiphertext:(0,u.hexlify)(n).substring(2),path:g,locale:y,version:"0.1"}}return JSON.stringify(b)})}},97013:function(e,t,r){"use strict";r.d(t,{EH:function(){return c},Ij:function(){return a},VP:function(){return s},gx:function(){return u},p3:function(){return o}});var n=r(16441),i=r(29251);function o(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),(0,n.arrayify)(e)}function s(e,t){for(e=String(e);e.length<t;)e="0"+e;return e}function a(e){return"string"==typeof e?(0,i.Y0)(e,i.Uj.NFKC):(0,n.arrayify)(e)}function u(e,t){let r=e,n=t.toLowerCase().split("/");for(let e=0;e<n.length;e++){let t=null;for(let i in r)if(i.toLowerCase()===n[e]){t=r[i];break}if(null===t)return null;r=t}return r}function c(e){let t=(0,n.arrayify)(e);t[6]=15&t[6]|64,t[8]=63&t[8]|128;let r=(0,n.hexlify)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}},38197:function(e,t,r){"use strict";r.r(t),r.d(t,{keccak256:function(){return s}});var n=r(91094),i=r.n(n),o=r(16441);function s(e){return"0x"+i().keccak_256((0,o.arrayify)(e))}},1581:function(e,t,r){"use strict";var n,i,o,s;r.r(t),r.d(t,{ErrorCode:function(){return i},LogLevel:function(){return n},Logger:function(){return p}});
1let a=!1,u=!1,c={debug:1,default:2,info:2,warning:3,error:4,off:5},l=c.default,h=null,f=function(){try{let e=[];if(["NFD","NFC","NFKD","NFKC"].forEach(t=>{try{if("test"!=="test".normalize(t))throw Error("bad normalize")}catch(r){e.push(t)}}),e.length)throw Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(e){return e.message}return null}();(o=n||(n={})).DEBUG="DEBUG",o.INFO="INFO",o.WARNING="WARNING",o.ERROR="ERROR",o.OFF="OFF",(s=i||(i={})).UNKNOWN_ERROR="UNKNOWN_ERROR",s.NOT_IMPLEMENTED="NOT_IMPLEMENTED",s.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",s.NETWORK_ERROR="NETWORK_ERROR",s.SERVER_ERROR="SERVER_ERROR",s.TIMEOUT="TIMEOUT",s.BUFFER_OVERRUN="BUFFER_OVERRUN",s.NUMERIC_FAULT="NUMERIC_FAULT",s.MISSING_NEW="MISSING_NEW",s.INVALID_ARGUMENT="INVALID_ARGUMENT",s.MISSING_ARGUMENT="MISSING_ARGUMENT",s.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",s.CALL_EXCEPTION="CALL_EXCEPTION",s.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",s.NONCE_EXPIRED="NONCE_EXPIRED",s.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",s.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",s.TRANSACTION_REPLACED="TRANSACTION_REPLACED",s.ACTION_REJECTED="ACTION_REJECTED";let d="0123456789abcdef";class p{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){let r=e.toLowerCase();null==c[r]&&this.throwArgumentError("invalid log level name","logLevel",e),l>c[r]||console.log.apply(console,t)}debug(...e){this._log(p.levels.DEBUG,e)}info(...e){this._log(p.levels.INFO,e)}warn(...e){this._log(p.levels.WARNING,e)}makeError(e,t,r){if(u)return this.makeError("censored error",t,{});t||(t=p.errors.UNKNOWN_ERROR),r||(r={});let n=[];Object.keys(r).forEach(e=>{let t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e<t.length;e++)r+=d[t[e]>>4]+d[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}`);let o=e,s="";switch(t){case i.NUMERIC_FAULT:{s="NUMERIC_FAULT";let 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 i.CALL_EXCEPTION:case i.INSUFFICIENT_FUNDS:case i.MISSING_NEW:case i.NONCE_EXPIRED:case i.REPLACEMENT_UNDERPRICED:case i.TRANSACTION_REPLACED:case i.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(e+=" ("+n.join(", ")+")");let a=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,p.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",p.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,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,p.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",e<t&&this.throwError("missing argument"+r,p.errors.MISSING_ARGUMENT,{count:e,expectedCount:t}),e>t&&this.throwError("too many arguments"+r,p.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){(e===Object||null==e)&&this.throwError("missing new",p.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",p.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||null==e)&&this.throwError("missing new",p.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return h||(h=new p("logger/5.7.0")),h}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),a){if(!e)return;this.globalLogger().throwError("error censorship permanent",p.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}u=!!e,a=!!t}static setLogLevel(e){let t=c[e.toLowerCase()];if(null==t){p.globalLogger().warn("invalid log level - "+e);return}l=t}static from(e){return new p(e)}}p.errors=i,p.levels=n},45710:function(e,t,r){"use strict";r.d(t,{H:function(){return h}});var n=r(1581);let i=new n.Logger("networks/5.7.1");function o(e){let t=function(t,r){null==r&&(r={});let 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){}
1if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket)try{let i=new t.PocketProvider(e,r.pocket);i.network&&-1===["goerli","ropsten","rinkeby","sepolia"].indexOf(i.network.name)&&n.push(i)}catch(e){}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{let i=new t.AnkrProvider(e,r.ankr);i.network&&-1===["ropsten"].indexOf(i.network.name)&&n.push(i)}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 o(e)},t}function s(e,t){let r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return s(e,t)},r}let a={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:o("homestead")},u={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:o("ropsten")},c={chainId:63,name:"classicMordor",_defaultProvider:s("https://www.ethercluster.com/mordor","classicMordor")},l={unspecified:{chainId:0,name:"unspecified"},homestead:a,mainnet:a,morden:{chainId:2,name:"morden"},ropsten:u,testnet:u,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:o("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:o("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:o("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:o("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:s("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:c,classicTestnet:c,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:s("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:o("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:o("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 h(e){if(null==e)return null;if("number"==typeof e){for(let t in l){let r=l[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){let t=l[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}let t=l[e.name];if(!t)return"number"!=typeof e.chainId&&i.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&i.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;if(null==r&&t._defaultProvider){var n;r=(n=t._defaultProvider)&&"function"==typeof n.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider}return{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}},85306:function(e,t,r){"use strict";r.d(t,{n:function(){return o}});var n=r(16441),i=r(2006);function o(e,t,r,o,s){let a,u,c;e=(0,n.arrayify)(e),t=(0,n.arrayify)(t);let l=1,h=new Uint8Array(o),f=new Uint8Array(t.length+4);f.set(t);for(let d=1;d<=l;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 p=(0,n.arrayify)((0,i.Gy)(s,e,f));a||(a=p.length,c=new Uint8Array(a),l=Math.ceil(o/a),u=o-(l-1)*a),c.set(p);for(let t=1;t<r;t++){p=(0,n.arrayify)((0,i.Gy)(s,e,p));for(let e=0;e<a;e++)c[e]^=p[e]}let m=(d-1)*a,g=d===l?u:a;h.set((0,n.arrayify)(c).slice(0,g),m)}return(0,n.hexlify)(h)}},6881:function(e,t,r){"use strict";r.r(t),r.d(t,{Description:function(){return f},checkProperties:function(){return u},deepCopy:function(){return h},defineReadOnly:function(){return o},getStatic:function(){return s},resolveProperties:function(){return a},shallowCopy:function(){return c}});var n=r(1581);let i=new n.Logger("properties/5.7.0");function o(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){var t,r,n,i;return t=this,r=void 0,n=void 0,i=function*(){let t=Object.keys(e).map(t=>{let r=e[t];return Promise.resolve(r).then(e=>({key:t,value:e}))}),r=yield Promise.all(t);return r.reduce((e,t)=>
1(e[t.key]=t.value,e),{})},new(n||(n=Promise))(function(e,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(t){var r;t.done?e(t.value):((r=t.value)instanceof n?r:new n(function(e){e(r)})).then(s,a)}u((i=i.apply(t,r||[])).next())})}function u(e,t){e&&"object"==typeof e||i.throwArgumentError("invalid object","object",e),Object.keys(e).forEach(r=>{t[r]||i.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)})}function c(e){let t={};for(let r in e)t[r]=e[r];return t}let l={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function h(e){return function(e){if(function e(t){if(null==t||l[typeof t])return!0;if(Array.isArray(t)||"object"==typeof t){if(!Object.isFrozen(t))return!1;let r=Object.keys(t);for(let n=0;n<r.length;n++){let i=null;try{i=t[r[n]]}catch(e){continue}if(!e(i))return!1}return!0}return i.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}(e))return e;if(Array.isArray(e))return Object.freeze(e.map(e=>h(e)));if("object"==typeof e){let t={};for(let r in e){let n=e[r];void 0!==n&&o(t,r,h(n))}return t}return i.throwArgumentError(`Cannot deepCopy ${typeof e}`,"object",e)}(e)}class f{constructor(e){for(let t in e)this[t]=h(e[t])}}},34216:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});let n="providers/5.7.2"},333:function(e,t,r){"use strict";r.d(t,{D:function(){return f},V:function(){return h}});var n=r(6881),i=r(30032),o=r(88089),s=r(1581),a=r(34216),u=r(93901);let c=new s.Logger(a.i),l="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class h extends o.q{constructor(e,t){let r=new f(e,t),i=r.connection.url.replace(/^http/i,"ws").replace(".alchemyapi.",".ws.alchemyapi.");super(i,r.network),(0,n.defineReadOnly)(this,"apiKey",r.apiKey)}isCommunityResource(){return this.apiKey===l}}class f extends u.l{static getWebSocketProvider(e,t){return new h(e,t)}static getApiKey(e){return null==e?l:(e&&"string"!=typeof e&&c.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:c.throwArgumentError("unsupported network","network",arguments[0])}return{allowGzip:!0,url:"https://"+r+t,throttleCallback:(e,r)=>(t===l&&(0,i.vh)(),Promise.resolve(!0))}}isCommunityResource(){return this.apiKey===l}}},75361:function(e,t,r){"use strict";r.d(t,{H2:function(){return j},Zk:function(){return G}});var n=r(81556),i=r(59567),o=r(57727),s=r(2593),a=r(16441),u=r(57218),c=r(27586),l=r(45710),h=r(6881),f=r(2006),d=r(29251),p=r(37707),m=r(92882),g=r.n(m),y=r(1581),v=r(34216),b=r(30032),w=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})};let E=new y.Logger(v.i);function A(e){return null==e?"null":(32!==(0,a.hexDataLength)(e)&&E.throwArgumentError("invalid topic","topic",e),e.toLowerCase())}function _(e){for(e=e.slice();e.length>0&&null==e[e.length-1];)e.pop();return e.map(e=>{if(!Array.isArray(e))return A(e);{let t={};e.forEach(e=>{t[A(e)]=!0});let r=Object.keys(t);return r.sort(),r.join("|")}}).join("&")}function k(e){if("string"==typeof e){if(e=e.toLowerCase(),32===(0,a.hexDataLength)(e))return"tx:"+e;if(-1===e.indexOf(":"))return e}else if(Array.isArray(e))return"filter:*:"+_(e);else if(n.Sg.isForkEvent(e))throw E.warn("not implemented"),Error("not implemented");else if(e&&"object"==typeof e)return"filter:"+(e.address||"*")+":"+_(e.topics||[]);throw Error("invalid event - "+e)}function S(){return new Date().getTime()}function O(e){return new Promise(t=>{setTimeout(t,e)})}let x=["block","network","pending","poll"];class P{constructor(e,t,r){(0,h.defineReadOnly)(this,"tag",e),(0,h.defineReadOnly)(this,"listener",t),(0,h.defineReadOnly)(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(){let e=this.tag.split(":");return"tx"!==e[0]?null:e[1]}get filter(){var e;let t=this.tag.split(":");if("filter"!==t[0])return null;let r=t[1],n=""===(e=t[2])?[]:e.split(/&/g).map(e=>{if(""===e)return[];let t=e.split("|").map(e=>"null"===e?null:e);return 1===t.length?t[0]:t}),i={};return n.length>0&&(i.topics=n),r&&"*"!==r&&(i.address=r),i}pollable(){return this.tag.indexOf(":")>=0||x.indexOf(this.tag)>=0}}
1let C={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,a.hexZeroPad)(s.O$.from(e).toHexString(),32)}function I(e){return o.Base58.encode((0,a.concat)([e,(0,a.hexDataSlice)((0,f.JQ)((0,f.JQ)(e)),0,4)]))}let T=RegExp("^(ipfs)://(.*)$","i"),N=[RegExp("^(https)://(.*)$","i"),RegExp("^(data):(.*)$","i"),T,RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function M(e,t){try{return(0,d.ZN)(D(e,t))}catch(e){}return null}function D(e,t){if("0x"===e)return null;let r=s.O$.from((0,a.hexDataSlice)(e,t,t+32)).toNumber(),n=s.O$.from((0,a.hexDataSlice)(e,r,r+32)).toNumber();return(0,a.hexDataSlice)(e,r+32,r+32+n)}function F(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):E.throwArgumentError("unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}function L(e){let t=(0,a.arrayify)(e);if(t.length>32)throw Error("internal; should not happen");let r=new Uint8Array(32);return r.set(t,32-t.length),r}function B(e){let t=[],r=0;for(let n=0;n<e.length;n++)t.push(null),r+=32;for(let n=0;n<e.length;n++){let i=(0,a.arrayify)(e[n]);t[n]=L(r),t.push(L(i.length)),t.push(function(e){if(e.length%32==0)return e;let t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}(i)),r+=32+32*Math.ceil(i.length/32)}return(0,a.hexConcat)(t)}class j{constructor(e,t,r,n){(0,h.defineReadOnly)(this,"provider",e),(0,h.defineReadOnly)(this,"name",r),(0,h.defineReadOnly)(this,"address",e.formatter.address(t)),(0,h.defineReadOnly)(this,"_resolvedAddress",n)}supportsWildcard(){return this._supportsEip2544||(this._supportsEip2544=this.provider.call({to:this.address,data:"0x01ffc9a79061b92300000000000000000000000000000000000000000000000000000000"}).then(e=>s.O$.from(e).eq(1)).catch(e=>{if(e.code===y.Logger.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,e})),this._supportsEip2544}_fetch(e,t){return w(this,void 0,void 0,function*(){let r={to:this.address,ccipReadEnabled:!0,data:(0,a.hexConcat)([e,(0,c.VM)(this.name),t||"0x"])},n=!1;(yield this.supportsWildcard())&&(n=!0,r.data=(0,a.hexConcat)(["0x9061b923",B([(0,c.Kn)(this.name),r.data])]));try{let e=yield this.provider.call(r);return(0,a.arrayify)(e).length%32==4&&E.throwError("resolver threw error",y.Logger.errors.CALL_EXCEPTION,{transaction:r,data:e}),n&&(e=D(e,0)),e}catch(e){if(e.code===y.Logger.errors.CALL_EXCEPTION)return null;throw e}})}_fetchBytes(e,t){return w(this,void 0,void 0,function*(){let r=yield this._fetch(e,t);return null!=r?D(r,0):null})}_getAddress(e,t){let r=C[String(e)];if(null==r&&E.throwError(`unsupported coin type: ${e}`,y.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`}),"eth"===r.ilk)return this.provider.formatter.address(t);let n=(0,a.arrayify)(t);if(null!=r.p2pkh){let e=t.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(e){let t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return I((0,a.concat)([[r.p2pkh],"0x"+e[2]]))}}if(null!=r.p2sh){let e=t.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(e){let t=parseInt(e[1],16);if(e[2].length===2*t&&t>=1&&t<=75)return I((0,a.concat)([[r.p2sh],"0x"+e[2]]))}}if(null!=r.prefix){let e=n[1],t=n[0];if(0===t?20!==e&&32!==e&&(t=-1):t=-1,t>=0&&n.length===2+e&&e>=1&&e<=75){let e=g().toWords(n.slice(2));return e.unshift(t),g().encode(r.prefix,e)}}return null}getAddress(e){return w(this,void 0,void 0,function*(){if(null==e&&(e=60),60===e)try{let e=yield this._fetch("0x3b3b57de");if("0x"===e||e===u.R)return null;return this.provider.formatter.callAddress(e)}catch(e){if(e.code===y.Logger.errors.CALL_EXCEPTION)return null;throw e}let t=yield this._fetchBytes("0xf1cb7e06",R(e));if(null==t||"0x"===t)return null;let r=this._getAddress(e,t);return null==r&&E.throwError("invalid or unsupported coin data",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${e})`,coinType:e,data:t}),r})}getAvatar(){return w(this,void 0,void 0,function*(){let e=[{type:"name",content:this.name}];try{let t=yield this.getText("avatar");if(null==t)return null;for(let r=0;r<N.length;r++){let n=t.match(N[r]);if(null==n)continue;let 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:F(t)};case"erc721":case"erc1155":{let r="erc721"===i?"0xc87b56dd":"0x0e89341c";e.push({type:i,content:t});let o=this._resolvedAddress||(yield this.getAddress()),u=(n[2]||"").split("/");if(2!==u.length)return null;
1let c=yield this.provider.formatter.address(u[0]),l=(0,a.hexZeroPad)(s.O$.from(u[1]).toHexString(),32);if("erc721"===i){let t=this.provider.formatter.callAddress((yield this.provider.call({to:c,data:(0,a.hexConcat)(["0x6352211e",l])})));if(o!==t)return null;e.push({type:"owner",content:t})}else if("erc1155"===i){let t=s.O$.from((yield this.provider.call({to:c,data:(0,a.hexConcat)(["0x00fdd58e",(0,a.hexZeroPad)(o,32),l])})));if(t.isZero())return null;e.push({type:"balance",content:t.toString()})}let h={to:this.provider.formatter.address(u[0]),data:(0,a.hexConcat)([r,l])},f=M((yield this.provider.call(h)),0);if(null==f)return null;e.push({type:"metadata-url-base",content:f}),"erc1155"===i&&(f=f.replace("{id}",l.substring(2)),e.push({type:"metadata-url-expanded",content:f})),f.match(/^ipfs:/i)&&(f=F(f)),e.push({type:"metadata-url",content:f});let d=yield(0,p.fetchJson)(f);if(!d)return null;e.push({type:"metadata",content:JSON.stringify(d)});let m=d.image;if("string"!=typeof m)return null;if(m.match(/^(https:\/\/|data:)/i));else{let t=m.match(T);if(null==t)return null;e.push({type:"url-ipfs",content:m}),m=F(m)}return e.push({type:"url",content:m}),{linkage:e,url:m}}}}}catch(e){}return null})}getContentHash(){return w(this,void 0,void 0,function*(){let e=yield this._fetchBytes("0xbc1c58d1");if(null==e||"0x"===e)return null;let t=e.match(/^0xe3010170(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){let e=parseInt(t[3],16);if(t[4].length===2*e)return"ipfs://"+o.Base58.encode("0x"+t[1])}let r=e.match(/^0xe5010172(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(r){let e=parseInt(r[3],16);if(r[4].length===2*e)return"ipns://"+o.Base58.encode("0x"+r[1])}let n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&64===n[1].length)return"bzz://"+n[1];let s=e.match(/^0x90b2c605([0-9a-f]*)$/);if(s&&68===s[1].length){let e={"=":"","+":"-","/":"_"},t=(0,i.c)("0x"+s[1]).replace(/[=+\/]/g,t=>e[t]);return"sia://"+t}return E.throwError("invalid or unsupported content hash data",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:e})})}getText(e){return w(this,void 0,void 0,function*(){let t=(0,d.Y0)(e);(t=(0,a.concat)([R(64),R(t.length),t])).length%32!=0&&(t=(0,a.concat)([t,(0,a.hexZeroPad)("0x",32-e.length%32)]));let r=yield this._fetchBytes("0x59d1d43c",(0,a.hexlify)(t));return null==r||"0x"===r?null:(0,d.ZN)(r)})}}let U=null,q=1;class G extends n.zt{constructor(e){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,h.defineReadOnly)(this,"anyNetwork","any"===e),this.anyNetwork&&(e=this.detectNetwork()),e instanceof Promise)this._networkPromise=e,e.catch(e=>{}),this._ready().catch(e=>{});else{let t=(0,h.getStatic)(new.target,"getNetwork")(e);t?((0,h.defineReadOnly)(this,"_network",t),this.emit("network",t,null)):E.throwArgumentError("invalid network","network",e)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return w(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||E.throwError("no network detected",y.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=e:(0,h.defineReadOnly)(this,"_network",e),this.emit("network",e,null))}return this._network})}get ready(){return(0,p.poll)(()=>this._ready().then(e=>e,e=>{if(e.code!==y.Logger.errors.NETWORK_ERROR||"noNetwork"!==e.event)throw e}))}static getFormatter(){return null==U&&(U=new b.Mb),U}static getNetwork(e){return(0,l.H)(null==e?"homestead":e)}ccipReadFetch(e,t,r){return w(this,void 0,void 0,function*(){if(this.disableCcipRead||0===r.length)return null;let n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let e=0;e<r.length;e++){let t=r[e],s=t.replace("{sender}",n).replace("{data}",i),a=t.indexOf("{data}")>=0?null:JSON.stringify({data:i,sender:n}),u=yield(0,p.fetchJson)({url:s,errorPassThrough:!0},a,(e,t)=>(e.status=t.statusCode,e));if(u.data)return u.data;let c=u.message||"unknown error";if(u.status>=400&&u.status<500)return E.throwError(`response not found during CCIP fetch: ${c}`,y.Logger.errors.SERVER_ERROR,{url:t,errorMessage:c});o.push(c)}return E.throwError(`error encountered during CCIP fetch: ${o.map(e=>JSON.stringify(e)).join(", ")}`,y.Logger.errors.SERVER_ERROR,{urls:r,errorMessages:o})})}_getInternalBlockNumber(e){return w(this,void 0,void 0,function*(){if(yield this._ready(),e>0)for(;this._internalBlockNumber;){let t=this._internalBlockNumber;try{let r=yield t;if(S()-r.respTime<=e)return r.blockNumber;break}catch(e){if(this._internalBlockNumber===t)break}}let t=S(),r=(0,h.resolveProperties)({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;let i=S();return(e=s.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 w(this,void 0,void 0,function*(){let e=q++,t=[],r=null;try{r=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}
1catch(e){this.emit("error",e);return}if(this._setFastBlockNumber(r),this.emit("poll",e,r),r===this._lastBlockNumber){this.emit("didPoll",e);return}if(-2===this._emitted.block&&(this._emitted.block=r-1),Math.abs(this._emitted.block-r)>1e3)E.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${r})`),this.emit("error",E.makeError("network block skew detected",y.Logger.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;let 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":{let r=e.hash,n=this.getTransactionReceipt(r).then(e=>(e&&null!=e.blockNumber&&(this._emitted["t:"+r]=e.blockNumber,this.emit(r,e)),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);let n=e.filter;n.fromBlock=e._lastBlockNumber+1,n.toBlock=r;let i=n.toBlock-this._maxFilterBlockRange;i>n.fromBlock&&(n.fromBlock=i),n.fromBlock<0&&(n.fromBlock=0);let 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)})})}resetEventsBlock(e){this._lastBlockNumber=e-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return w(this,void 0,void 0,function*(){return E.throwError("provider does not support network detection",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return w(this,void 0,void 0,function*(){let 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 O(0),this._network;let r=E.makeError("underlying network changed",y.Logger.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 Error("invalid polling interval");this._pollingInterval=e,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let e=S();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=S(),(null==this._fastBlockNumber||e>this._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))}waitForTransaction(e,t,r){return w(this,void 0,void 0,function*(){return this._waitForTransaction(e,null==t?1:t,r||0,null)})}_waitForTransaction(e,t,r,n){return w(this,void 0,void 0,function*(){let i=yield this.getTransactionReceipt(e);return(i?i.confirmations:0)>=t?i:new Promise((i,o)=>
1{let s=[],a=!1,u=function(){return!!a||(a=!0,s.forEach(e=>{e()}),!1)},c=e=>{e.confirmations<t||u()||i(e)};if(this.on(e,c),s.push(()=>{this.removeListener(e,c)}),n){let r=n.startBlock,i=null,c=s=>w(this,void 0,void 0,function*(){a||(yield O(1e3),this.getTransactionCount(n.from).then(l=>w(this,void 0,void 0,function*(){if(!a){if(l<=n.nonce)r=s;else{{let t=yield this.getTransaction(e);if(t&&null!=t.blockNumber)return}for(null==i&&(i=r-3)<n.startBlock&&(i=n.startBlock);i<=s;){if(a)return;let r=yield this.getBlockWithTransactions(i);for(let i=0;i<r.transactions.length;i++){let s=r.transactions[i];if(s.hash===e)return;if(s.from===n.from&&s.nonce===n.nonce){if(a)return;let r=yield this.waitForTransaction(s.hash,t);if(u())return;let i="replaced";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"),o(E.makeError("transaction was replaced",y.Logger.errors.TRANSACTION_REPLACED,{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:this._wrapTransaction(s),hash:e,receipt:r}));return}}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){let e=setTimeout(()=>{u()||o(E.makeError("timeout exceeded",y.Logger.errors.TIMEOUT,{timeout:r}))},r);e.unref&&e.unref(),s.push(()=>{clearTimeout(e)})}})})}getBlockNumber(){return w(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return w(this,void 0,void 0,function*(){yield this.getNetwork();let e=yield this.perform("getGasPrice",{});try{return s.O$.from(e)}catch(t){return E.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getGasPrice",result:e,error:t})}})}getBalance(e,t){return w(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,h.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getBalance",r);try{return s.O$.from(n)}catch(e){return E.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getBalance",params:r,result:n,error:e})}})}getTransactionCount(e,t){return w(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,h.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getTransactionCount",r);try{return s.O$.from(n).toNumber()}catch(e){return E.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getTransactionCount",params:r,result:n,error:e})}})}getCode(e,t){return w(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,h.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(t)}),n=yield this.perform("getCode",r);try{return(0,a.hexlify)(n)}catch(e){return E.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getCode",params:r,result:n,error:e})}})}getStorageAt(e,t,r){return w(this,void 0,void 0,function*(){yield this.getNetwork();let n=yield(0,h.resolveProperties)({address:this._getAddress(e),blockTag:this._getBlockTag(r),position:Promise.resolve(t).then(e=>(0,a.hexValue)(e))}),i=yield this.perform("getStorageAt",n);try{return(0,a.hexlify)(i)}catch(e){return E.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"getStorageAt",params:n,result:i,error:e})}})}_wrapTransaction(e,t,r){if(null!=t&&32!==(0,a.hexDataLength)(t))throw Error("invalid response - sendTransaction");let n=e;return null!=t&&e.hash!==t&&E.throwError("Transaction hash mismatch from Provider.sendTransaction.",y.Logger.errors.UNKNOWN_ERROR,{expectedHash:e.hash,returnedHash:t}),n.wait=(t,n)=>w(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});let 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&&E.throwError("transaction failed",y.Logger.errors.CALL_EXCEPTION,{transactionHash:e.hash,transaction:e,receipt:o}),o)}),n}sendTransaction(e){return w(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield Promise.resolve(e).then(e=>(0,a.hexlify)(e)),r=this.formatter.transaction(e);null==r.confirmations&&(r.confirmations=0);let n=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let 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 w(this,void 0,void 0,function*(){let t=yield e,r={};
1return["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?s.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,a.hexlify)(e):null))}),this.formatter.transactionRequest((yield(0,h.resolveProperties)(r)))})}_getFilter(e){return w(this,void 0,void 0,function*(){e=yield e;let 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,h.resolveProperties)(t)))})}_call(e,t,r){return w(this,void 0,void 0,function*(){r>=10&&E.throwError("CCIP read exceeded maximum redirections",y.Logger.errors.SERVER_ERROR,{redirects:r,transaction:e});let 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,a.hexDataLength)(i)%32==4)try{let o=(0,a.hexDataSlice)(i,4),u=(0,a.hexDataSlice)(o,0,32);s.O$.from(u).eq(n)||E.throwError("CCIP Read sender did not match",y.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});let c=[],l=s.O$.from((0,a.hexDataSlice)(o,32,64)).toNumber(),h=s.O$.from((0,a.hexDataSlice)(o,l,l+32)).toNumber(),f=(0,a.hexDataSlice)(o,l+32);for(let t=0;t<h;t++){let r=M(f,32*t);null==r&&E.throwError("CCIP Read contained corrupt URL string",y.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i}),c.push(r)}let d=D(o,64);s.O$.from((0,a.hexDataSlice)(o,100,128)).isZero()||E.throwError("CCIP Read callback selector included junk",y.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});let p=(0,a.hexDataSlice)(o,96,100),m=D(o,128),g=yield this.ccipReadFetch(e,d,c);null==g&&E.throwError("CCIP Read disabled or provided no URLs",y.Logger.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:e,data:i});let v={to:n,data:(0,a.hexConcat)([p,B([g,m])])};return this._call(v,t,r+1)}catch(e){if(e.code===y.Logger.errors.SERVER_ERROR)throw e}try{return(0,a.hexlify)(i)}catch(r){return E.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"call",params:{transaction:e,blockTag:t},result:i,error:r})}})}call(e,t){return w(this,void 0,void 0,function*(){yield this.getNetwork();let r=yield(0,h.resolveProperties)({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 w(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield(0,h.resolveProperties)({transaction:this._getTransactionRequest(e)}),r=yield this.perform("estimateGas",t);try{return s.O$.from(r)}catch(e){return E.throwError("bad result from backend",y.Logger.errors.SERVER_ERROR,{method:"estimateGas",params:t,result:r,error:e})}})}_getAddress(e){return w(this,void 0,void 0,function*(){"string"!=typeof(e=yield e)&&E.throwArgumentError("invalid address or ENS name","name",e);let t=yield this.resolveName(e);return null==t&&E.throwError("ENS name not configured",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:`resolveName(${JSON.stringify(e)})`}),t})}_getBlock(e,t){return w(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let r=-128,n={includeTransactions:!!t};if((0,a.isHexString)(e,32))n.blockHash=e;else try{n.blockTag=yield this._getBlockTag(e),(0,a.isHexString)(n.blockTag)&&(r=parseInt(n.blockTag.substring(2),16))}catch(t){E.throwArgumentError("invalid block hash or block tag","blockHashOrBlockTag",e)}return(0,p.poll)(()=>w(this,void 0,void 0,function*(){let 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++){let 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}}let 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 w(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return(0,p.poll)(()=>w(this,void 0,void 0,function*(){let r=yield this.perform("getTransaction",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;let 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),t=e-n.blockNumber+1;t<=0&&(t=1),n.confirmations=t}return this._wrapTransaction(n)}),{oncePoll:this})})}getTransactionReceipt(e){return w(this,void 0,void 0,function*(){yield this.getNetwork(),e=yield e;let t={transactionHash:this.formatter.hash(e,!0)};return(0,p.poll)(()=>w(this,void 0,void 0,function*(){let r=yield this.perform("getTransactionReceipt",t);if(null==r)return null==this._emitted["t:"+e]?null:void 0;if(null==r.blockHash)return;let 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),t=e-n.blockNumber+1;t<=0&&(t=1),n.confirmations=t}return n}),{oncePoll:this})})}getLogs(e){return w(this,void 0,void 0,function*(){yield this.getNetwork();let t=yield(0,h.resolveProperties)({filter:this._getFilter(e)}),r=yield this.perform("getLogs",t);
1return r.forEach(e=>{null==e.removed&&(e.removed=!1)}),b.Mb.arrayOf(this.formatter.filterLog.bind(this.formatter))(r)})}getEtherPrice(){return w(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(e){return w(this,void 0,void 0,function*(){if("number"==typeof(e=yield e)&&e<0){e%1&&E.throwArgumentError("invalid BlockTag","blockTag",e);let t=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return(t+=e)<0&&(t=0),this.formatter.blockTag(t)}return this.formatter.blockTag(e)})}getResolver(e){return w(this,void 0,void 0,function*(){let t=e;for(;;){if(""===t||"."===t||"eth"!==e&&"eth"===t)return null;let r=yield this._getResolver(t,"getResolver");if(null!=r){let n=new j(this,r,e);if(t!==e&&!(yield n.supportsWildcard()))return null;return n}t=t.split(".").slice(1).join(".")}})}_getResolver(e,t){return w(this,void 0,void 0,function*(){null==t&&(t="ENS");let r=yield this.getNetwork();r.ensAddress||E.throwError("network does not support ENS",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:t,network:r.name});try{let t=yield this.call({to:r.ensAddress,data:"0x0178b8bf"+(0,c.VM)(e).substring(2)});return this.formatter.callAddress(t)}catch(e){}return null})}resolveName(e){return w(this,void 0,void 0,function*(){e=yield e;try{return Promise.resolve(this.formatter.address(e))}catch(t){if((0,a.isHexString)(e))throw t}"string"!=typeof e&&E.throwArgumentError("invalid ENS name","name",e);let t=yield this.getResolver(e);return t?yield t.getAddress():null})}lookupAddress(e){return w(this,void 0,void 0,function*(){e=yield e,e=this.formatter.address(e);let t=e.substring(2).toLowerCase()+".addr.reverse",r=yield this._getResolver(t,"lookupAddress");if(null==r)return null;let n=M((yield this.call({to:r,data:"0x691f3431"+(0,c.VM)(t).substring(2)})),0),i=yield this.resolveName(n);return i!=e?null:n})}getAvatar(e){return w(this,void 0,void 0,function*(){let t=null;if((0,a.isHexString)(e)){let r=this.formatter.address(e),n=r.substring(2).toLowerCase()+".addr.reverse",i=yield this._getResolver(n,"getAvatar");if(!i)return null;t=new j(this,i,n);try{let e=yield t.getAvatar();if(e)return e.url}catch(e){if(e.code!==y.Logger.errors.CALL_EXCEPTION)throw e}try{let e=M((yield this.call({to:i,data:"0x691f3431"+(0,c.VM)(n).substring(2)})),0);t=yield this.getResolver(e)}catch(e){if(e.code!==y.Logger.errors.CALL_EXCEPTION)throw e;return null}}else if(!(t=yield this.getResolver(e)))return null;let r=yield t.getAvatar();return null==r?null:r.url})}perform(e,t){return E.throwError(e+" not implemented",y.Logger.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){let n=new P(k(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=k(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=k(e);return this._events.filter(e=>e.tag===t).length}listeners(e){if(null==e)return this._events.map(e=>e.listener);let t=k(e);return this._events.filter(e=>e.tag===t).map(e=>e.listener)}off(e,t){if(null==t)return this.removeAllListeners(e);let r=[],n=!1,i=k(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{let r=k(e);this._events=this._events.filter(e=>e.tag!==r||(t.push(e),!1))}return t.forEach(e=>{this._stopEvent(e)}),this}}},51619:function(e,t,r){"use strict";r.d(t,{H:function(){return S}});var n=r(81556),i=r(2593),o=r(16441),s=r(6881),a=r(52472),u=r(37707),c=r(75361),l=r(30032),h=r(1581),f=r(34216),d=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})};let p=new h.Logger(f.i);function m(){return new Date().getTime()}function g(e){let t=null;for(let r=0;r<e.length;r++){let 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)||p.throwArgumentError("provider mismatch","networks",e):t=n}return t}function y(e,t){e=e.slice().sort();let r=Math.floor(e.length/2);if(e.length%2)return e[r];let n=e[r-1],i=e[r];return null!=t&&Math.abs(n-i)>t?null:(n+i)/2}function v(e){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return JSON.stringify(e);if("string"==typeof e)return e;if(i.O$.isBigNumber(e))return e.toString();if(Array.isArray(e))return JSON.stringify(e.map(e=>v(e)));if("object"==typeof e){let t=Object.keys(e);return t.sort(),"{"+t.map(t=>{let r=e[t];return r="function"==typeof r?"[function]":v(r),JSON.stringify(t)+":"+r}).join(",")+"}"}throw Error("unknown value type: "+typeof e)}let b=1;function w(e){let t=null,r=null,n=new Promise(n=>{r=setTimeout(t=function(){r&&(clearTimeout(r),r=null),n()},e)}),i=e=>n=n.then(e);return{cancel:t,getPromise:function(){return n},wait:i}}let E=[h.Logger.errors.CALL_EXCEPTION,h.Logger.errors.INSUFFICIENT_FUNDS,h.Logger.errors.NONCE_EXPIRED,h.Logger.errors.REPLACEMENT_UNDERPRICED,h.Logger.errors.UNPREDICTABLE_GAS_LIMIT],A=["address","args","errorArgs","errorSignature","method","transaction"];function _(e,t){let 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 k(e,t){return d(this,void 0,void 0,function*(){let r=e.provider;return null!=r.blockNumber&&r.blockNumber>=t||-1===t?r:(0,u.poll)(()=>new Promise((n,i)=>{setTimeout(function(){return r.blockNumber>=t?n(r):e.cancelled?n(null):n(void 0)}
1,0)}),{oncePoll:r})})}class S extends c.Zk{constructor(e,t){0===e.length&&p.throwArgumentError("missing providers","providers",e);let r=e.map((e,t)=>{if(n.zt.isProvider(e)){let t=(0,l.Gp)(e)?2e3:750;return Object.freeze({provider:e,weight:1,stallTimeout:t,priority:1})}let r=(0,s.shallowCopy)(e);null==r.priority&&(r.priority=1),null==r.stallTimeout&&(r.stallTimeout=(0,l.Gp)(e)?2e3:750),null==r.weight&&(r.weight=1);let i=r.weight;return(i%1||i>512||i<1)&&p.throwArgumentError("invalid weight; must be integer in [1, 512]",`providers[${t}].weight`,i),Object.freeze(r)}),i=r.reduce((e,t)=>e+t.weight,0);null==t?t=i/2:t>i&&p.throwArgumentError("quorum will always fail; larger than total weight","quorum",t);let o=g(r.map(e=>e.provider.network));null==o&&(o=new Promise((e,t)=>{setTimeout(()=>{this.detectNetwork().then(e,t)},0)})),super(o),(0,s.defineReadOnly)(this,"providerConfigs",Object.freeze(r)),(0,s.defineReadOnly)(this,"quorum",t),this._highestBlockNumber=-1}detectNetwork(){return d(this,void 0,void 0,function*(){let e=yield Promise.all(this.providerConfigs.map(e=>e.provider.getNetwork()));return g(e)})}perform(e,t){return d(this,void 0,void 0,function*(){if("sendTransaction"===e){let 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++){let r=e[t];if("string"==typeof r)return r}throw e[0]}-1===this._highestBlockNumber&&"getBlockNumber"!==e&&(yield this.getBlockNumber());let r=function(e,t,r){var n,i;let o=v;switch(t){case"getBlockNumber":return function(t){let r=t.map(e=>e.result),n=y(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){let t=e.map(e=>e.result);return t.sort(),t[Math.floor(t.length/2)]};case"getEtherPrice":return function(e){return y(e.map(e=>e.result))};case"getBalance":case"getTransactionCount":case"getCode":case"getStorageAt":case"call":case"estimateGas":case"getLogs":break;case"getTransaction":case"getTransactionReceipt":o=function(e){return null==e?null:((e=(0,s.shallowCopy)(e)).confirmations=-1,v(e))};break;case"getBlock":o=r.includeTransactions?function(e){return null==e?null:((e=(0,s.shallowCopy)(e)).transactions=e.transactions.map(e=>((e=(0,s.shallowCopy)(e)).confirmations=-1,e)),v(e))}:function(e){return null==e?null:v(e)};break;default:throw Error("unknown method: "+t)}return n=o,i=e.quorum,function(e){let t={};e.forEach(e=>{let r=n(e.result);t[r]||(t[r]={count:0,result:e.result}),t[r].count++});let r=Object.keys(t);for(let e=0;e<r.length;e++){let n=t[r[e]];if(n.count>=i)return n.result}}}(this,e,t),n=(0,a.y)(this.providerConfigs.map(s.shallowCopy));n.sort((e,t)=>e.priority-t.priority);let i=this._highestBlockNumber,u=0,c=!0;for(;;){let a=m(),l=n.filter(e=>e.runner&&a-e.start<e.stallTimeout).reduce((e,t)=>e+t.weight,0);for(;l<this.quorum&&u<n.length;){let r=n[u++],a=b++;r.start=m(),r.staller=w(r.stallTimeout),r.staller.wait(()=>{r.staller=null}),r.runner=(function(e,t,r,n){return d(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,o.isHexString)(n.blockTag)&&(i=yield k(e,t)),i[r](n.address,n.blockTag||"latest");case"getStorageAt":return n.blockTag&&(0,o.isHexString)(n.blockTag)&&(i=yield k(e,t)),i.getStorageAt(n.address,n.position,n.blockTag||"latest");case"getBlock":return n.blockTag&&(0,o.isHexString)(n.blockTag)&&(i=yield k(e,t)),i[n.includeTransactions?"getBlockWithTransactions":"getBlock"](n.blockTag||n.blockHash);case"call":case"estimateGas":if(n.blockTag&&(0,o.isHexString)(n.blockTag)&&(i=yield k(e,t)),"call"===r&&n.blockTag)return i[r](n.transaction,n.blockTag);return i[r](n.transaction);case"getTransaction":case"getTransactionReceipt":return i[r](n.transactionHash);case"getLogs":{let r=n.filter;return(r.fromBlock&&(0,o.isHexString)(r.fromBlock)||r.toBlock&&(0,o.isHexString)(r.toBlock))&&(i=yield k(e,t)),i.getLogs(r)}}return p.throwError("unknown method error",h.Logger.errors.UNKNOWN_ERROR,{method:r,params:n})})})(r,i,e,t).then(n=>
1{r.done=!0,r.result=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:_(r,m()),request:{method:e,params:(0,s.deepCopy)(t)},provider:this})},n=>{r.done=!0,r.error=n,this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:_(r,m()),request:{method:e,params:(0,s.deepCopy)(t)},provider:this})}),this.listenerCount("debug")&&this.emit("debug",{action:"request",rid:a,backend:_(r,null),request:{method:e,params:(0,s.deepCopy)(t)},provider:this}),l+=r.weight}let f=[];n.forEach(e=>{!e.done&&e.runner&&(f.push(e.runner),e.staller&&f.push(e.staller.getPromise()))}),f.length&&(yield Promise.race(f));let g=n.filter(e=>e.done&&null==e.error);if(g.length>=this.quorum){let e=r(g);if(void 0!==e)return n.forEach(e=>{e.staller&&e.staller.cancel(),e.cancelled=!0}),e;c||(yield w(100).getPromise()),c=!1}let y=n.reduce((e,t)=>{if(!t.done||null==t.error)return e;let r=t.error.code;return E.indexOf(r)>=0&&(e[r]||(e[r]={error:t.error,weight:0}),e[r].weight+=t.weight),e},{});if(Object.keys(y).forEach(e=>{let t=y[e];if(t.weight<this.quorum)return;n.forEach(e=>{e.staller&&e.staller.cancel(),e.cancelled=!0});let r=t.error,i={};A.forEach(e=>{null!=r[e]&&(i[e]=r[e])}),p.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}),p.throwError("failed to meet quorum",h.Logger.errors.SERVER_ERROR,{method:e,params:t,results:n.map(e=>_(e)),provider:this})})}}},30032:function(e,t,r){"use strict";r.d(t,{Ed:function(){return d},Gp:function(){return p},Mb:function(){return f},vh:function(){return g}});var n=r(19485),i=r(2593),o=r(16441),s=r(9279),a=r(6881),u=r(83875),c=r(1581),l=r(34216);let h=new c.Logger(l.i);class f{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let 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),u=this.number.bind(this),c=this.type.bind(this),l=e=>this.data(e,!0);return e.transaction={hash:o,type:c,accessList:f.allowNull(this.accessList.bind(this),null),blockHash:f.allowNull(o,null),blockNumber:f.allowNull(u,null),transactionIndex:f.allowNull(u,null),confirmations:f.allowNull(u,null),from:t,gasPrice:f.allowNull(r),maxPriorityFeePerGas:f.allowNull(r),maxFeePerGas:f.allowNull(r),gasLimit:r,to:f.allowNull(t,null),value:r,nonce:u,data:i,r:f.allowNull(this.uint256),s:f.allowNull(this.uint256),v:f.allowNull(u),creates:f.allowNull(t,null),raw:f.allowNull(i)},e.transactionRequest={from:f.allowNull(t),nonce:f.allowNull(u),gasLimit:f.allowNull(r),gasPrice:f.allowNull(r),maxPriorityFeePerGas:f.allowNull(r),maxFeePerGas:f.allowNull(r),to:f.allowNull(t),value:f.allowNull(r),data:f.allowNull(l),type:f.allowNull(u),accessList:f.allowNull(this.accessList.bind(this),null)},e.receiptLog={transactionIndex:u,blockNumber:u,transactionHash:o,address:t,topics:f.arrayOf(o),data:i,logIndex:u,blockHash:o},e.receipt={to:f.allowNull(this.address,null),from:f.allowNull(this.address,null),contractAddress:f.allowNull(t,null),transactionIndex:u,root:f.allowNull(s),gasUsed:r,logsBloom:f.allowNull(i),blockHash:o,transactionHash:o,logs:f.arrayOf(this.receiptLog.bind(this)),blockNumber:u,confirmations:f.allowNull(u,null),cumulativeGasUsed:r,effectiveGasPrice:f.allowNull(r),status:f.allowNull(u),type:c},e.block={hash:f.allowNull(o),parentHash:o,number:u,timestamp:u,nonce:f.allowNull(s),difficulty:this.difficulty.bind(this),gasLimit:r,gasUsed:r,miner:f.allowNull(t),extraData:i,transactions:f.allowNull(f.arrayOf(o)),baseFeePerGas:f.allowNull(r)},e.blockWithTransactions=(0,a.shallowCopy)(e.block),e.blockWithTransactions.transactions=f.allowNull(f.arrayOf(this.transactionResponse.bind(this))),e.filter={fromBlock:f.allowNull(n,void 0),toBlock:f.allowNull(n,void 0),blockHash:f.allowNull(o,void 0),address:f.allowNull(t,void 0),topics:f.allowNull(this.topics.bind(this),void 0)},e.filterLog={blockNumber:f.allowNull(u),blockHash:f.allowNull(o),transactionIndex:u,removed:f.allowNull(this.boolean.bind(this)),address:t,data:f.allowFalsish(i,"0x"),topics:f.arrayOf(o),transactionHash:o,logIndex:u},e}accessList(e){return(0,u.accessListify)(e||[])}number(e){return"0x"===e?0:i.O$.from(e).toNumber()}type(e){return"0x"===e||null==e?0:i.O$.from(e).toNumber()}bigNumber(e){return i.O$.from(e)}boolean(e){if("boolean"==typeof e)return e;if("string"==typeof e){if("true"===(e=e.toLowerCase()))return!0;
1if("false"===e)return!1}throw Error("invalid boolean - "+e)}hex(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),(0,o.isHexString)(e))?e.toLowerCase():h.throwArgumentError("invalid hash","value",e)}data(e,t){let r=this.hex(e,t);if(r.length%2!=0)throw Error("invalid data; odd-length - "+e);return r}address(e){return(0,n.getAddress)(e)}callAddress(e){if(!(0,o.isHexString)(e,32))return null;let t=(0,n.getAddress)((0,o.hexDataSlice)(e,12));return t===s.d?null:t}contractAddress(e){return(0,n.getContractAddress)(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,o.isHexString)(e))return(0,o.hexValue)(e);throw Error("invalid blockTag")}hash(e,t){let r=this.hex(e,t);return 32!==(0,o.hexDataLength)(r)?h.throwArgumentError("invalid hash","value",e):r}difficulty(e){if(null==e)return null;let t=i.O$.from(e);try{return t.toNumber()}catch(e){}return null}uint256(e){if(!(0,o.isHexString)(e))throw Error("invalid uint256");return(0,o.hexZeroPad)(e,32)}_block(e,t){null!=e.author&&null==e.miner&&(e.miner=e.author);let r=null!=e._difficulty?e._difficulty:e.difficulty,n=f.check(t,e);return n._difficulty=null==r?null:i.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 f.check(this.formats.transactionRequest,e)}transactionResponse(e){null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&i.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=[]);let t=f.check(this.formats.transaction,e);if(null!=e.chainId){let r=e.chainId;(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),t.chainId=r}else{let r=e.networkId;null==r&&null==t.v&&(r=e.chainId),(0,o.isHexString)(r)&&(r=i.O$.from(r).toNumber()),"number"!=typeof r&&null!=t.v&&((r=(t.v-35)/2)<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,u.parse)(e)}receiptLog(e){return f.check(this.formats.receiptLog,e)}receipt(e){let t=f.check(this.formats.receipt,e);if(null!=t.root){if(t.root.length<=4){let e=i.O$.from(t.root).toNumber();0===e||1===e?(null!=t.status&&t.status!==e&&h.throwArgumentError("alt-root-status/status mismatch","value",{root:t.root,status:t.status}),t.status=e,delete t.root):h.throwArgumentError("invalid alt-root-status","value.root",t.root)}else 66!==t.root.length&&h.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 f.check(this.formats.filter,e)}filterLog(e){return f.check(this.formats.filterLog,e)}static check(e,t){let r={};for(let n in e)try{let 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 Error("not an array");let r=[];return t.forEach(function(t){r.push(e(t))}),r}}}function d(e){return e&&"function"==typeof e.isCommunityResource}function p(e){return d(e)&&e.isCommunityResource()}let m=!1;function g(){m||(m=!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("=========================="))}},82169:function(e,t,r){"use strict";r.d(t,{C:function(){return _},r:function(){return O}});var n=r(48088),i=r(2593),o=r(16441),s=r(67827),a=r(6881),u=r(29251),c=r(83875),l=r(37707),h=r(1581),f=r(34216),d=r(75361),p=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})};let m=new h.Logger(f.i),g=["call","estimateGas"];function y(e,t){if(null==e)return null;if("string"==typeof e.message&&e.message.match("reverted")){let r=(0,o.isHexString)(e.data)?e.data:null;if(!t||r)return{message:e.message,data:r}}if("object"==typeof e){for(let r in e){let n=y(e[r],t);if(n)return n}return null}if("string"==typeof e)try{return y(JSON.parse(e),t)}catch(e){}return null}function v(e,t,r){let n=r.transaction||r.signedTransaction;if("call"===e){let e=y(t,!0);if(e)return e.data;m.throwError("missing revert data in call exception; Transaction reverted without a reason string",h.Logger.errors.CALL_EXCEPTION,{data:"0x",transaction:n,error:t})}if("estimateGas"===e){let r=y(t.body,!1);null==r&&(r=y(t,!1)),r&&m.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{reason:r.message,method:e,transaction:n,error:t})}let i=t.message;throw t.code===h.Logger.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()).match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&m.throwError("insufficient funds for intrinsic transaction cost",h.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:n}),i.match(/nonce (is )?too low/i)&&m.throwError("nonce has already been used",h.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:n}),i.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&m.throwError("replacement fee too low",h.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:n}),i.match(/only replay-protected/i)&&m.throwError("legacy pre-eip-155 transactions not supported",h.Logger.errors.UNSUPPORTED_OPERATION,{error:t,method:e,transaction:n}),g.indexOf(e)>=0&&i.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&m.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",h.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:n}),t}function b(e){return new Promise(function(t){setTimeout(t,e)})}function w(e){if(e.error){let t=Error(e.error.message);throw t.code=e.error.code,t.data=e.error.data,t}return e.result}function E(e){return e?e.toLowerCase():e}let A={};class _ extends n.E{constructor(e,t,r){if(super(),e!==A)throw Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,a.defineReadOnly)(this,"provider",t),null==r&&(r=0),"string"==typeof r?((0,a.defineReadOnly)(this,"_address",this.provider.formatter.address(r)),(0,a.defineReadOnly)(this,"_index",null)):"number"==typeof r?((0,a.defineReadOnly)(this,"_index",r),(0,a.defineReadOnly)(this,"_address",null)):m.throwArgumentError("invalid address or index","addressOrIndex",r)}connect(e){return m.throwError("cannot alter JSON-RPC Signer connection",h.Logger.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new k(A,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&&m.throwError("unknown account #"+this._index,h.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(e[this._index])))}sendUncheckedTransaction(e){e=(0,a.shallowCopy)(e);let t=this.getAddress().then(e=>(e&&(e=e.toLowerCase()),e));
1if(null==e.gasLimit){let r=(0,a.shallowCopy)(e);r.from=t,e.gasLimit=this.provider.estimateGas(r)}return null!=e.to&&(e.to=Promise.resolve(e.to).then(e=>p(this,void 0,void 0,function*(){if(null==e)return null;let t=yield this.provider.resolveName(e);return null==t&&m.throwArgumentError("provided ENS name resolves to null","tx.to",e),t}))),(0,a.resolveProperties)({tx:(0,a.resolveProperties)(e),sender:t}).then(({tx:t,sender:r})=>{null!=t.from?t.from.toLowerCase()!==r&&m.throwArgumentError("from address mismatch","transaction",e):t.from=r;let 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)&&m.throwError("user rejected transaction",h.Logger.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:t}),v("sendTransaction",e,n)))})}signTransaction(e){return m.throwError("signing transactions is unsupported",h.Logger.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(e){return p(this,void 0,void 0,function*(){let t=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),r=yield this.sendUncheckedTransaction(e);try{return yield(0,l.poll)(()=>p(this,void 0,void 0,function*(){let 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 p(this,void 0,void 0,function*(){let t="string"==typeof e?(0,u.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,o.hexlify)(t),r.toLowerCase()])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&m.throwError("user rejected signing",h.Logger.errors.ACTION_REJECTED,{action:"signMessage",from:r,messageData:e}),t}})}_legacySignMessage(e){return p(this,void 0,void 0,function*(){let t="string"==typeof e?(0,u.Y0)(e):e,r=yield this.getAddress();try{return yield this.provider.send("eth_sign",[r.toLowerCase(),(0,o.hexlify)(t)])}catch(t){throw"string"==typeof t.message&&t.message.match(/user denied/i)&&m.throwError("user rejected signing",h.Logger.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:r,messageData:e}),t}})}_signTypedData(e,t,r){return p(this,void 0,void 0,function*(){let n=yield s.E.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(s.E.getPayload(n.domain,t,n.value))])}catch(e){throw"string"==typeof e.message&&e.message.match(/user denied/i)&&m.throwError("user rejected signing",h.Logger.errors.ACTION_REJECTED,{action:"_signTypedData",from:i,messageData:{domain:n.domain,types:t,value:n.value}}),e}})}unlock(e){return p(this,void 0,void 0,function*(){let t=this.provider,r=yield this.getAddress();return t.send("personal_unlockAccount",[r.toLowerCase(),e,null])})}}class k extends _{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)}))}}let S={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};class O extends d.Zk{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,a.getStatic)(this.constructor,"defaultUrl")()),"string"==typeof e?(0,a.defineReadOnly)(this,"connection",Object.freeze({url:e})):(0,a.defineReadOnly)(this,"connection",Object.freeze((0,a.shallowCopy)(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 p(this,void 0,void 0,function*(){yield b(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){let t=(0,a.getStatic)(this.constructor,"getNetwork");try{return t(i.O$.from(e).toNumber())}catch(t){return m.throwError("could not detect network",h.Logger.errors.NETWORK_E
1RROR,{chainId:e,event:"invalidNetwork",serverError:t})}}return m.throwError("could not detect network",h.Logger.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(e){return new _(A,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){let r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,a.deepCopy)(r),provider:this});let n=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(n&&this._cache[e])return this._cache[e];let i=(0,l.fetchJson)(this.connection,JSON.stringify(r),w).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",[E(t.address),t.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[E(t.address),t.blockTag]];case"getCode":return["eth_getCode",[E(t.address),t.blockTag]];case"getStorageAt":return["eth_getStorageAt",[E(t.address),(0,o.hexZeroPad)(t.position,32),t.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[t.signedTransaction]];case"getBlock":if(t.blockTag)return["eth_getBlockByNumber",[t.blockTag,!!t.includeTransactions]];if(t.blockHash)return["eth_getBlockByHash",[t.blockHash,!!t.includeTransactions]];break;case"getTransaction":return["eth_getTransactionByHash",[t.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[t.transactionHash]];case"call":{let e=(0,a.getStatic)(this.constructor,"hexlifyTransaction");return["eth_call",[e(t.transaction,{from:!0}),t.blockTag]]}case"estimateGas":{let e=(0,a.getStatic)(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[e(t.transaction,{from:!0})]]}case"getLogs":return t.filter&&null!=t.filter.address&&(t.filter.address=E(t.filter.address)),["eth_getLogs",[t.filter]]}return null}perform(e,t){return p(this,void 0,void 0,function*(){if("call"===e||"estimateGas"===e){let e=t.transaction;if(e&&null!=e.type&&i.O$.from(e.type).isZero()&&null==e.maxFeePerGas&&null==e.maxPriorityFeePerGas){let r=yield this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&((t=(0,a.shallowCopy)(t)).transaction=(0,a.shallowCopy)(e),delete t.transaction.type)}}let r=this.prepareRequest(e,t);null==r&&m.throwError(e+" not implemented",h.Logger.errors.NOT_IMPLEMENTED,{operation:e});try{return yield this.send(r[0],r[1])}catch(r){return v(e,r,t)}})}_startEvent(e){"pending"===e.tag&&this._startPending(),super._startEvent(e)}_startPending(){if(null!=this._pendingFilter)return;let 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 b(1e3)})}).then(function(){if(e._pendingFilter!=t){e.send("eth_uninstallFilter",[r]);return}return setTimeout(function(){n()},0),null}).catch(e=>{})}(),r}).catch(e=>{})}_stopEvent(e){"pending"===e.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(e)}static hexlifyTransaction(e,t){let r=(0,a.shallowCopy)(S);if(t)for(let e in t)t[e]&&(r[e]=!0);(0,a.checkProperties)(e,r);let n={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(t){if(null==e[t])return;let r=(0,o.hexValue)(i.O$.from(e[t]));"gasLimit"===t&&(t="gas"),n[t]=r}),["from","to","data"].forEach(function(t){null!=e[t]&&(n[t]=(0,o.hexlify)(e[t]))}),e.accessList&&(n.accessList=(0,c.accessListify)(e.accessList)),n}}},93901:function(e,t,r){"use strict";r.d(t,{c:function(){return u},l:function(){return c}});var n=r(6881),i=r(1581),o=r(34216),s=r(82169);let a=new i.Logger(o.i);class u extends s.r{detectNetwork(){var e,t,r,o;let s=Object.create(null,{detectNetwork:{get:()=>super.detectNetwork}});return e=this,t=void 0,r=void 0,o=function*(){let e=this.network;
1return null==e&&((e=yield s.detectNetwork.call(this))||a.throwError("no network detected",i.Logger.errors.UNKNOWN_ERROR,{}),null==this._network&&((0,n.defineReadOnly)(this,"_network",e),this.emit("network",e,null))),e},new(r||(r=Promise))(function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((o=o.apply(e,t||[])).next())})}}class c extends u{constructor(e,t){a.checkAbstract(new.target,c),e=(0,n.getStatic)(new.target,"getNetwork")(e),t=(0,n.getStatic)(new.target,"getApiKey")(t);let r=(0,n.getStatic)(new.target,"getUrl")(e,t);super(r,e),"string"==typeof t?(0,n.defineReadOnly)(this,"apiKey",t):null!=t&&Object.keys(t).forEach(e=>{(0,n.defineReadOnly)(this,e,t[e])})}_startPending(){a.warn("WARNING: API provider does not support pending filters")}isCommunityResource(){return!1}getSigner(e){return a.throwError("API provider does not support signing",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"getSigner"})}listAccounts(){return Promise.resolve([])}static getApiKey(e){return e}static getUrl(e,t){return a.throwError("not implemented; sub-classes must override getUrl",i.Logger.errors.NOT_IMPLEMENTED,{operation:"getUrl"})}}},241:function(e,t,r){"use strict";r.d(t,{Q:function(){return l}});var n=r(6881),i=r(1581),o=r(34216),s=r(82169);let a=new i.Logger(o.i),u=1;function c(e,t){let r="Web3LegacyFetcher";return function(e,i){let o={method:e,params:i,id:u++,jsonrpc:"2.0"};return new Promise((e,i)=>{this.emit("debug",{action:"request",fetcher:r,request:(0,n.deepCopy)(o),provider:this}),t(o,(t,n)=>{if(t)return this.emit("debug",{action:"response",fetcher:r,error:t,request:o,provider:this}),i(t);if(this.emit("debug",{action:"response",fetcher:r,request:o,response:n,provider:this}),n.error){let e=Error(n.error.message);return e.code=n.error.code,e.data=n.error.data,i(e)}e(n.result)})})}}class l extends s.r{constructor(e,t){null==e&&a.throwArgumentError("missing provider","provider",e);let r=null,i=null,o=null;"function"==typeof e?(r="unknown:",i=e):(((r=e.host||e.path||"")||!e.isMetaMask||(r="metamask"),o=e,e.request)?(""===r&&(r="eip-1193:"),i=function(t,r){null==r&&(r=[]);let i={method:t,params:r};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,n.deepCopy)(i),provider:this}),e.request(i).then(e=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,response:e,provider:this}),e),e=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:i,error:e,provider:this}),e})}):e.sendAsync?i=c(e,e.sendAsync.bind(e)):e.send?i=c(e,e.send.bind(e)):a.throwArgumentError("unsupported provider","provider",e),r||(r="unknown:")),super(r,t),(0,n.defineReadOnly)(this,"jsonRpcFetchFunc",i),(0,n.defineReadOnly)(this,"provider",o)}send(e,t){return this.jsonRpcFetchFunc(e,t)}}},88089:function(e,t,r){"use strict";r.d(t,{q:function(){return f}});var n=r(2593),i=r(6881),o=r(82169),s=r(1581),a=r(34216);let u=null;try{if(u=WebSocket,null==u)throw Error("inject please")}catch(t){let e=new s.Logger(a.i);u=function(){e.throwError("WebSockets not supported in this environment",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"new WebSocket()"})}}var c=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})};let l=new s.Logger(a.i),h=1;class f extends o.r{constructor(e,t){"any"===t&&l.throwError("WebSocketProvider does not support 'any' network yet",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"network:any"}),"string"==typeof e?super(e,t):super("_websocket",t),this._pollingInterval=-1,this._wsReady=!1,"string"==typeof e?(0,i.defineReadOnly)(this,"_websocket",new u(this.connection.url)):(0,i.defineReadOnly)(this,"_websocket",e),(0,i.defineReadOnly)(this,"_requests",{}),(0,i.defineReadOnly)(this,"_subs",{}),(0,i.defineReadOnly)(this,"_subIds",{}),(0,i.defineReadOnly)(this,"_detectNetwork",super.detectNetwork()),this.websocket.onopen=()=>
1{this._wsReady=!0,Object.keys(this._requests).forEach(e=>{this.websocket.send(this._requests[e].payload)})},this.websocket.onmessage=e=>{let t=e.data,r=JSON.parse(t);if(null!=r.id){let 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=Error(r.error.message||"unknown error"),(0,i.defineReadOnly)(e,"code",r.error.code||null),(0,i.defineReadOnly)(e,"response",t)):e=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){let e=this._subs[r.params.subscription];e&&e.processFunc(r.params.result)}else console.warn("this should not happen")};let 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){l.throwError("cannot reset events block on WebSocketProvider",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resetEventBlock"})}set pollingInterval(e){l.throwError("cannot set polling interval on WebSocketProvider",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPollingInterval"})}poll(){return c(this,void 0,void 0,function*(){return null})}set polling(e){e&&l.throwError("cannot set polling on WebSocketProvider",s.Logger.errors.UNSUPPORTED_OPERATION,{operation:"setPolling"})}send(e,t){let r=h++;return new Promise((n,i)=>{let 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 c(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);let i=yield n;this._subs[i]={tag:e,processFunc:r}})}_startEvent(e){switch(e.type){case"block":this._subscribe("block",["newHeads"],e=>{let t=n.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":{let t=e=>{let 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;let 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 c(this,void 0,void 0,function*(){this.websocket.readyState===u.CONNECTING&&(yield new Promise(e=>{this.websocket.onopen=function(){e(!0)},this.websocket.onerror=function(){e(!1)}})),this.websocket.close(1e3)})}}},22118:function(e,t,r){"use strict";r.r(t),r.d(t,{randomBytes:function(){return n.O},shuffled:function(){return i.y}});var n=r(5634),i=r(52472)},5634:function(e,t,r){"use strict";r.d(t,{O:function(){return u}});var n=r(16441),i=r(1581);let o=new i.Logger("random/5.7.0"),s=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw Error("unable to locate global object")}(),a=s.crypto||s.msCrypto;function u(e){(e<=0||e>1024||e%1||e!=e)&&o.throwArgumentError("invalid length","length",e);let t=new Uint8Array(e);return a.getRandomValues(t),(0,n.arrayify)(t)}a&&a.getRandomValues||(o.warn("WARNING: Missing strong random number source"),a={getRandomValues:function(e){return o.throwError("no secure random source avaialble",i.Logger.errors.UNSUPPORTED_OPERATION,{operation:"crypto.getRandomValues"})}})},52472:function(e,t,r){"use strict";function n(e){e=e.slice();for(let t=e.length-1;t>0;t--){let r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}r.d(t,{y:function(){return n}})},59052:function(e,t,r){"use strict";r.r(t),r.d(t,{decode:function(){return h},encode:function(){return u}});var n=r(16441),i=r(1581);let o=new i.Logger("rlp/5.7.0");function s(e){let 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 u(e){return(0,n.hexlify)(function e(t){if(Array.isArray(t)){let r=[];if(t.forEach(function(t){r=r.concat(e(t))}),r.length<=55)return r.unshift(192+r.length),r;let n=s(r.length);return n.unshift(247+n.length),n.concat(r)}(0,n.isBytesLike)(t)||o.throwArgumentError("RLP object must be BytesLike","object",t);let r=Array.prototype.slice.call((0,n.arrayify)(t));if(1===r.length&&r[0]<=127)return r;if(r.length<=55)return r.unshift(128+r.length),r;let i=s(r.length);return i.unshift(183+i.length),i.concat(r)}(e))}function c(e,t,r,n){let s=[];for(;r<t+1+n;){let a=l(e,r);s.push(a.result),(r+=a.consumed)>t+1+n&&o.throwError("child data too short",i.Logger.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:s}}function l(e,t){if(0===e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{}),e[t]>=248){let r=e[t]-247;t+1+r>e.length&&o.throwError("data short segment too short",i.Logger.errors.BUFFER_OVERRUN,{});let n=a(e,t+1,r);return t+1+r+n>e.length&&o.throwError("data long segment too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(e,t,t+1+r,r+n)}if(e[t]>=192){let r=e[t]-192;return t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{}),c(e,t,t+1,r)}if(e[t]>=184){let r=e[t]-183;t+1+r>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});let s=a(e,t+1,r);t+1+r+s>e.length&&o.throwError("data array too short",i.Logger.errors.BUFFER_OVERRUN,{});let u=(0,n.hexlify)(e.slice(t+1+r,t+1+r+s));return{consumed:1+r+s,result:u}}if(e[t]>=128){let r=e[t]-128;t+1+r>e.length&&o.throwError("data too short",i.Logger.errors.BUFFER_OVERRUN,{});let s=(0,n.hexlify)(e.slice(t+1,t+1+r));return{consumed:1+r,result:s}}return{consumed:1,result:(0,n.hexlify)(e[t])}}function h(e){let t=(0,n.arrayify)(e),r=l(t,0);return r.consumed!==t.length&&o.throwArgumentError("invalid rlp data","data",e),r.result}},91278:function(e,t,r){"use strict";r.r(t),r.d(t,{SupportedAlgorithm:function(){return i.p},computeHmac:function(){return n.Gy},ripemd160:function(){return n.bP},sha256:function(){return n.JQ},sha512:function(){return n.o}});var n=r(2006),i=r(21261)},2006:function(e,t,r){"use strict";r.d(t,{Gy:function(){return f},bP:function(){return c},JQ:function(){return l},o:function(){return h}});var n=r(33715),i=r.n(n),o=r(16441),s=r(21261),a=r(1581);let u=new a.Logger("sha2/5.7.0");function c(e){return"0x"+i().ripemd160().update((0,o.arrayify)(e)).digest("hex")}function l(e){return"0x"+i().sha256().update((0,o.arrayify)(e)).digest("hex")}function h(e){return"0x"+i().sha512().update((0,o.arrayify)(e)).digest("hex")}function f(e,t,r){return s.p[e]||u.throwError("unsupported algorithm "+e,a.Logger.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+i().hmac(i()[e],(0,o.arrayify)(t)).update((0,o.arrayify)(r)).digest("hex")}},21261:function(e,t,r){"use strict";var n,i;r.d(t,{p:function(){return n}}),(i=n||(n={})).sha256="sha256",i.sha512="sha512"},67669:function(e,t,r){"use strict";r.r(t),r.d(t,{SigningKey:function(){return V},computePublicKey:function(){return z},recoverPublicKey:function(){return Q}});var n=r(13550),i=r.n(n),o=r(33715),s=r.n(o);function a(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(e,null==t?r.path:t)}},r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var u=c;function c(e,t){if(!e)throw Error(t||"Assertion failed")}c.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)};var l=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){(e=e.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(e="0"+e);for(var n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var 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}}),h=a(function(e,t){var r=t;r.assert=u,r.toArray=l.toArray,r.zero2=l.zero2,r.toHex=l.toHex,r.encode=l.encode,r.getNAF=function(e,t,r){var n=Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),s=0;s<n.length;s++){var a,u=o.andln(i-1);o.isOdd()?(a=u>(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,i=0;e.cmpn(-n)>0||t.cmpn(-i)>0;){var o,s,a,u=e.andln(3)+n&3,c=t.andln(3)+i&3;3===u&&(u=-1),3===c&&(c=-1),s=(1&u)==0?0:(3==(o=e.andln(7)+n&7)||5===o)&&2===c?-u:u,r[0].push(s),a=(1&c)==0?0:(3==(o=t.andln(7)+i&7)||5===o)&&2===u?-c:c,r[1].push(a),2*n===s+1&&(n=1-n),2*i===a+1&&(i=1-i),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")}}),f=h.getNAF,d=h.getJSF,p=h.assert;function m(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=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],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))}
1function g(e,t){this.curve=e,this.type=t,this.precomputed=null}m.prototype.point=function(){throw Error("Not implemented")},m.prototype.validate=function(){throw Error("Not implemented")},m.prototype._fixedNafMul=function(e,t){p(e.precomputed);var r,n,i=e._getDoubles(),o=f(t,1,this._bitLength),s=(1<<i.step+1)-(i.step%2==0?2:1);s/=3;var a=[];for(r=0;r<o.length;r+=i.step){n=0;for(var u=r+i.step-1;u>=r;u--)n=(n<<1)+o[u];a.push(n)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=s;h>0;h--){for(r=0;r<a.length;r++)(n=a[r])===h?l=l.mixedAdd(i.points[r]):n===-h&&(l=l.mixedAdd(i.points[r].neg()));c=c.add(l)}return c.toP()},m.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=f(t,r,this._bitLength),s=this.jpoint(null,null,null),a=o.length-1;a>=0;a--){for(var u=0;a>=0&&0===o[a];a--)u++;if(a>=0&&u++,s=s.dblp(u),a<0)break;var c=o[a];p(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},m.prototype._wnafMulAdd=function(e,t,r,n,i){var o,s,a,u=this._wnafT1,c=this._wnafT2,l=this._wnafT3,h=0;for(o=0;o<n;o++){var p=(a=t[o])._getNAFPoints(e);u[o]=p.wnd,c[o]=p.points}for(o=n-1;o>=1;o-=2){var m=o-1,g=o;if(1!==u[m]||1!==u[g]){l[m]=f(r[m],u[m],this._bitLength),l[g]=f(r[g],u[g],this._bitLength),h=Math.max(l[m].length,h),h=Math.max(l[g].length,h);continue}var y=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(y[1]=t[m].add(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].add(t[g].neg())):(y[1]=t[m].toJ().mixedAdd(t[g]),y[2]=t[m].toJ().mixedAdd(t[g].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=d(r[m],r[g]);for(s=0,h=Math.max(b[0].length,h),l[m]=Array(h),l[g]=Array(h);s<h;s++){var w=0|b[0][s],E=0|b[1][s];l[m][s]=v[(w+1)*3+(E+1)],l[g][s]=0,c[m]=y}}var A=this.jpoint(null,null,null),_=this._wnafT4;for(o=h;o>=0;o--){for(var k=0;o>=0;){var S=!0;for(s=0;s<n;s++)_[s]=0|l[s][o],0!==_[s]&&(S=!1);if(!S)break;k++,o--}if(o>=0&&k++,A=A.dblp(k),o<0)break;for(s=0;s<n;s++){var O=_[s];0!==O&&(O>0?a=c[s][O-1>>1]:O<0&&(a=c[s][-O-1>>1].neg()),A="affine"===a.type?A.mixedAdd(a):A.add(a))}}for(o=0;o<n;o++)c[o]=null;return i?A:A.toP()},m.BasePoint=g,g.prototype.eq=function(){throw Error("Not implemented")},g.prototype.validate=function(){return this.curve.validate(this)},m.prototype.decodePoint=function(e,t){e=h.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]?p(e[e.length-1]%2==0):7===e[0]&&p(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 Error("Unknown point format")},g.prototype.encodeCompressed=function(e){return this.encode(e,!0)},g.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))},g.prototype.encode=function(e,t){return h.encode(this._encode(t),e)},g.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},g.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)},g.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}},g.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}},g.prototype._getBeta=function(){return null},g.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var y=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=h.assert;function b(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=[,,,,],this._endoWnafT2=[,,,,]}function w(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 E(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}y(b,m),b.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){
1if(e.beta)t=new(i())(e.beta,16).toRed(this.red);else{var t,r,n,o=this._getEndoRoots(this.p);t=(t=0>o[0].cmp(o[1])?o[0]:o[1]).toRed(this.red)}if(e.lambda)r=new(i())(e.lambda,16);else{var s=this._getEndoRoots(this.n);0===this.g.mul(s[0]).x.cmp(this.g.x.redMul(t))?r=s[0]:(r=s[1],v(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return n=e.basis?e.basis.map(function(e){return{a:new(i())(e.a,16),b:new(i())(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:n}}},b.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()]},b.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,u,c,l,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,d=this.n.clone(),p=new(i())(1),m=new(i())(0),g=new(i())(0),y=new(i())(1),v=0;0!==f.cmpn(0);){var b=d.div(f);c=d.sub(b.mul(f)),l=g.sub(b.mul(p));var w=y.sub(b.mul(m));if(!n&&0>c.cmp(h))t=u.neg(),r=p,n=c.neg(),o=l;else if(n&&2==++v)break;u=c,d=f,f=c,g=p,p=l,y=m,m=w}s=c.neg(),a=l;var E=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(E)>=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}]},b.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),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:u.add(c).neg()}},b.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 Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},b.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)},b.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],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),l=0;l<2*o;l++)n[l]=null,i[l]=null;return c},y(w,m.BasePoint),b.prototype.point=function(e,t,r){return new w(this,e,t,r)},b.prototype.pointFromJSON=function(e,t){return w.fromJSON(this,e,t)},w.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}},w.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]},w.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},w.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)+">"},w.prototype.isInfinity=function(){return this.inf},w.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)||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)},w.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)},w.prototype.getX=function(){return this.x.fromRed()},w.prototype.getY=function(){return this.y.fromRed()},w.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)},w.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)},w.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)},w.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))},w.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());
vendor: 4,387 bytes, line 1
1if(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},w.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},y(E,m.BasePoint),b.prototype.jpoint=function(e,t,r){return new E(this,e,t,r)},E.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)},E.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},E.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),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),l=c.redMul(a),h=n.redMul(c),f=u.redSqr().redIAdd(l).redISub(h).redISub(h),d=u.redMul(h.redISub(f)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(f,d,p)},E.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 u=s.redSqr(),c=u.redMul(s),l=r.redMul(u),h=a.redSqr().redIAdd(c).redISub(l).redISub(l),f=a.redMul(l.redISub(h)).redISub(i.redMul(c)),d=this.z.redMul(s);return this.curve.jpoint(h,f,d)},E.prototype.dblp=function(e){if(0===e||this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var t,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,u=a.redSqr().redSqr(),c=s.redAdd(s);for(t=0;t<e;t++){var l=o.redSqr(),h=c.redSqr(),f=h.redSqr(),d=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),p=o.redMul(h),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),y=d.redMul(g);y=y.redIAdd(y).redISub(f);var v=c.redMul(a);t+1<e&&(u=u.redMul(f)),o=m,a=v,c=y}return this.curve.jpoint(o,c.redMul(i),a)},E.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},E.prototype._zeroDbl=function(){if(this.zOne){var e,t,r,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),u=a.redSqr().redISub(s).redISub(s),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),h=this.y.redSqr(),f=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(l).redISub(f);d=d.redIAdd(d);var p=l.redAdd(l).redIAdd(l),m=p.redSqr(),g=f.redIAdd(f);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(g),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},E.prototype._threeDbl=function(){if(this.zOne){var e,t,r,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),u=a.redSqr().redISub(s).redISub(s);e=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),h=this.y.redSqr(),f=this.x.redMul(h),d=this.x.redSub(l).redMul(this.x.redAdd(l));d=d.redAdd(d).redIAdd(d);var p=f.redIAdd(f),m=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(l);var g=h.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=d.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},E.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)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(s),l=a.redSqr().redISub(c.redAdd(c)),h=c.redISub(l),f=s.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var d=a.redMul(h).redISub(f),p=r.redAdd(r).redMul(n);return this.curve.jpoint(l,d,p)},E.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);
vendor: 6,430 bytes, line 1
1var 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(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),l=t.redMul(c);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.x.redMul(a).redISub(l);h=(h=h.redIAdd(h)).redIAdd(h);var f=this.y.redMul(c.redMul(u.redISub(c)).redISub(s.redMul(a)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(h,f,d)},E.prototype.mul=function(e,t){return e=new(i())(e,t),this.curve._wnafMul(this,e)},E.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)},E.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}},E.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)+">"},E.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var A=a(function(e,t){var r=t;r.base=m,r.short=b,r.mont=null,r.edwards=null}),_=a(function(e,t){var r,n=t,i=h.assert;function o(e){"short"===e.type?this.curve=new A.short(e):"edwards"===e.type?this.curve=new A.edwards(e):this.curve=new A.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"}
1,{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})});function k(e){if(!(this instanceof k))return new k(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=l.toArray(e.entropy,e.entropyEnc||"hex"),r=l.toArray(e.nonce,e.nonceEnc||"hex"),n=l.toArray(e.pers,e.persEnc||"hex");u(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}k.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=Array(this.outLen/8),this.V=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},k.prototype._hmac=function(){return new(s()).hmac(this.hash,this.K)},k.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())},k.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=l.toArray(e,t),r=l.toArray(r,n),u(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},k.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=l.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++,l.encode(o,t)};var S=h.assert;function O(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)}O.fromPublic=function(e,t,r){return t instanceof O?t:new O(e,{pub:t,pubEnc:r})},O.fromPrivate=function(e,t,r){return t instanceof O?t:new O(e,{priv:t,privEnc:r})},O.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"}},O.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},O.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},O.prototype._importPrivate=function(e,t){this.priv=new(i())(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},O.prototype._importPublic=function(e,t){if(e.x||e.y){"mont"===this.ec.curve.type?S(e.x,"Need x coordinate"):("short"===this.ec.curve.type||"edwards"===this.ec.curve.type)&&S(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,t)},O.prototype.derive=function(e){return e.validate()||S(e.validate(),"public point not validated"),e.mul(this.priv).getX()},O.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},O.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},O.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var x=h.assert;function P(e,t){if(e instanceof P)return e;this._importDER(e,t)||(x(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)}function C(){this.place=0}function R(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,s=t.place;o<n;o++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function I(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 T(e,t){if(t<128){e.push(t);return}var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}P.prototype._importDER=function(e,t){e=h.toArray(e,t);var r=new C;if(48!==e[r.place++])return!1;var n=R(e,r);if(!1===n||n+r.place!==e.length||2!==e[r.place++])return!1;var o=R(e,r);if(!1===o)return!1;var s=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var a=R(e,r);if(!1===a||e.length!==a+r.place)return!1;var u=e.slice(r.place,a+r.place);if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}if(0===u[0]){if(!(128&u[1]))return!1;u=u.slice(1)}return this.r=new(i())(s),this.s=new(i())(u),this.recoveryParam=null,!0},P.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=I(t),r=I(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];T(n,t.length),(n=n.concat(t)).push(2),T(n,r.length);var i=n.concat(r),o=[48];return T(o,i.length),o=o.concat(i),h.encode(o,e)};var N=function(){throw Error("unsupported")},M=h.assert;function D(e){if(!(this instanceof D))return new D(e);"string"==typeof e&&(M(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}D.prototype.keyPair=function(e){return new O(this,e)},D.prototype.keyFromPrivate=function(e,t){return O.fromPrivate(this,e,t)},D.prototype.keyFromPublic=function(e,t){return O.fromPublic(this,e,t)},D.prototype.genKeyPair=function(e){e||(e={});for(var t=new k({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entro
1py:e.entropy||N(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)}},D.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},D.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(),s=t.getPrivate().toArray("be",o),a=e.toArray("be",o),u=new k({hash:this.hash,entropy:s,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new(i())(1)),l=0;;l++){var h=n.k?n.k(l):new(i())(u.generate(this.n.byteLength()));if(!(0>=(h=this._truncateToN(h,!0)).cmpn(1)||h.cmp(c)>=0)){var f=this.g.mul(h);if(!f.isInfinity()){var d=f.getX(),p=d.umod(this.n);if(0!==p.cmpn(0)){var m=h.invm(this.n).mul(p.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(f.getY().isOdd()?1:0)|(0!==d.cmp(p)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new P({r:p,s:m,recoveryParam:g})}}}}}},D.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(i())(e,16)),r=this.keyFromPublic(r,n);var o,s=(t=new P(t,"hex")).r,a=t.s;if(0>s.cmpn(1)||s.cmp(this.n)>=0||0>a.cmpn(1)||a.cmp(this.n)>=0)return!1;var u=a.invm(this.n),c=u.mul(e).umod(this.n),l=u.mul(s).umod(this.n);return this.curve._maxwellTrick?!(o=this.g.jmulAdd(c,r.getPublic(),l)).isInfinity()&&o.eqXToP(s):!(o=this.g.mulAdd(c,r.getPublic(),l)).isInfinity()&&0===o.getX().umod(this.n).cmp(s)},D.prototype.recoverPubKey=function(e,t,r,n){M((3&r)===r,"The recovery param is more than two bits"),t=new P(t,n);var o=this.n,s=new(i())(e),a=t.r,u=t.s,c=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var h=t.r.invm(o),f=o.sub(s).mul(h).umod(o),d=u.mul(h).umod(o);return this.g.mulAdd(f,a,d)},D.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new P(t,n)).recoveryParam)return t.recoveryParam;for(var i,o=0;o<4;o++){try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(r))return o}throw Error("Unable to find valid recovery factor")};var F=a(function(e,t){var r=t;r.version="6.5.4",r.utils=h,r.rand=function(){throw Error("unsupported")},r.curve=A,r.curves=_,r.ec=D,r.eddsa=null}).ec,L=r(16441),B=r(6881),j=r(1581);let U=new j.Logger("signing-key/5.7.0"),q=null;function G(){return q||(q=new F("secp256k1")),q}class V{constructor(e){(0,B.defineReadOnly)(this,"curve","secp256k1"),(0,B.defineReadOnly)(this,"privateKey",(0,L.hexlify)(e)),32!==(0,L.hexDataLength)(this.privateKey)&&U.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let t=G().keyFromPrivate((0,L.arrayify)(this.privateKey));(0,B.defineReadOnly)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,B.defineReadOnly)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,B.defineReadOnly)(this,"_isSigningKey",!0)}_addPoint(e){let t=G().keyFromPublic((0,L.arrayify)(this.publicKey)),r=G().keyFromPublic((0,L.arrayify)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){let t=G().keyFromPrivate((0,L.arrayify)(this.privateKey)),r=(0,L.arrayify)(e);32!==r.length&&U.throwArgumentError("bad digest length","digest",e);let n=t.sign(r,{canonical:!0});return(0,L.splitSignature)({recoveryParam:n.recoveryParam,r:(0,L.hexZeroPad)("0x"+n.r.toString(16),32),s:(0,L.hexZeroPad)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){let t=G().keyFromPrivate((0,L.arrayify)(this.privateKey)),r=G().keyFromPublic((0,L.arrayify)(z(e)));return(0,L.hexZeroPad)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!!(e&&e._isSigningKey)}}function Q(e,t){let r=(0,L.splitSignature)(t),n={r:(0,L.arrayify)(r.r),s:(0,L.arrayify)(r.s)};return"0x"+G().recoverPubKey((0,L.arrayify)(e),n,r.recoveryParam).encode("hex",!1)}function z(e,t){let r=(0,L.arrayify)(e);if(32===r.length){let e=new V(r);return t?"0x"+G().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,L.hexlify)(r):"0x"+G().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+G().keyFromPublic(r).getPublic(!0,"hex"):(0,L.hexlify)(r):U.throwArgumentError("invalid public or private key","key","[REDACTED]")}},31886:function(e,t,r){"use strict";r.r(t),r.d(t,{keccak256:function(){return p},pack:function(){return d},sha256:function(){return m}});var n=r(2593),i=r(16441),o=r(38197),s=r(2006),a=r(29251),u=r(1581);let c=RegExp("^bytes([0-9]+)$"),l=RegExp("^(u?int)([0-9]*)$"),h=RegExp("^(.*)\\[([0-9]*)\\]$"),f=new u.
1Logger("solidity/5.7.0");function d(e,t){e.length!=t.length&&f.throwArgumentError("wrong number of values; expected ${ types.length }","values",t);let r=[];return e.forEach(function(e,o){r.push(function e(t,r,o){switch(t){case"address":if(o)return(0,i.zeroPad)(r,32);return(0,i.arrayify)(r);case"string":return(0,a.Y0)(r);case"bytes":return(0,i.arrayify)(r);case"bool":if(r=r?"0x01":"0x00",o)return(0,i.zeroPad)(r,32);return(0,i.arrayify)(r)}let s=t.match(l);if(s){let e=parseInt(s[2]||"256");return(s[2]&&String(e)!==s[2]||e%8!=0||0===e||e>256)&&f.throwArgumentError("invalid number type","type",t),o&&(e=256),r=n.O$.from(r).toTwos(e),(0,i.zeroPad)(r,e/8)}if(s=t.match(c)){let e=parseInt(s[1]);return((String(e)!==s[1]||0===e||e>32)&&f.throwArgumentError("invalid bytes type","type",t),(0,i.arrayify)(r).byteLength!==e&&f.throwArgumentError(`invalid value for ${t}`,"value",r),o)?(0,i.arrayify)((r+"0000000000000000000000000000000000000000000000000000000000000000").substring(0,66)):r}if((s=t.match(h))&&Array.isArray(r)){let n=s[1],o=parseInt(s[2]||String(r.length));o!=r.length&&f.throwArgumentError(`invalid array length for ${t}`,"value",r);let a=[];return r.forEach(function(t){a.push(e(n,t,!0))}),(0,i.concat)(a)}return f.throwArgumentError("invalid type","type",t)}(e,t[o]))}),(0,i.hexlify)((0,i.concat)(r))}function p(e,t){return(0,o.keccak256)(d(e,t))}function m(e,t){return(0,s.JQ)(d(e,t))}},86237:function(e,t,r){"use strict";r.d(t,{F:function(){return a},s:function(){return s}});var n=r(57218),i=r(16441),o=r(29251);function s(e){let t=(0,o.Y0)(e);if(t.length>31)throw Error("bytes32 string must be less than 32 bytes");return(0,i.hexlify)((0,i.concat)([t,n.R]).slice(0,32))}function a(e){let t=(0,i.arrayify)(e);if(32!==t.length)throw Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,o.ZN)(t.slice(0,r))}},35637:function(e,t,r){"use strict";r.d(t,{Ll:function(){return p}});var n=r(29251);function i(e,t){t||(t=function(e){return[parseInt(e,16)]});let r=0,n={};return e.split(",").forEach(e=>{let i=e.split(":");n[r+=parseInt(i[0],16)]=t(i[1])}),n}function o(e){let t=0;return e.split(",").map(e=>{let r=e.split("-");return 1===r.length?r[1]="0":""===r[1]&&(r[1]="1"),{l:t+parseInt(r[0],16),h:t=parseInt(r[1],16)}})}function s(e,t){let r=0;for(let n=0;n<t.length;n++){let i=t[n];if(e>=(r+=i.l)&&e<=r+i.h&&(e-r)%(i.d||1)==0){if(i.e&&-1!==i.e.indexOf(e-r))continue;return i}}return null}let a=o("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"),u="ad,34f,1806,180b,180c,180d,200b,200c,200d,2060,feff".split(",").map(e=>parseInt(e,16)),c=[{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}],l=i("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"),h=i("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"),f=i("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 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}),d=o("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 p(e){if(e.match(/^[a-z0-9-]*$/i)&&e.length<=59)return e.toLowerCase();let t=(0,n.XL)(e);t=t.map(e=>u.indexOf(e)>=0||e>=65024&&e<=65039?[]:function(e){let t=s(e,c);if(t)return[e+t.s];let r=l[e];if(r)return r;let n=h[e];return n?[e+n[0]]:f[e]||null}(e)||[e]).reduce((e,t)=>
1(t.forEach(t=>{e.push(t)}),e),[]),(t=(0,n.XL)((0,n.uu)(t),n.Uj.NFKC)).forEach(e=>{if(s(e,d))throw Error("STRINGPREP_CONTAINS_PROHIBITED")}),t.forEach(e=>{if(s(e,a))throw Error("STRINGPREP_CONTAINS_UNASSIGNED")});let r=(0,n.uu)(t);if("-"===r.substring(0,1)||"--"===r.substring(2,4)||"-"===r.substring(r.length-1))throw Error("invalid hyphen");return r}},62741:function(e,t,r){"use strict";r.r(t),r.d(t,{UnicodeNormalizationForm:function(){return o.Uj},Utf8ErrorFuncs:function(){return o.te},Utf8ErrorReason:function(){return o.Uw},_toEscapedUtf8String:function(){return o.U$},formatBytes32String:function(){return n.s},nameprep:function(){return i.Ll},parseBytes32String:function(){return n.F},toUtf8Bytes:function(){return o.Y0},toUtf8CodePoints:function(){return o.XL},toUtf8String:function(){return o.ZN}});var n=r(86237),i=r(35637),o=r(29251)},29251:function(e,t,r){"use strict";r.d(t,{Uj:function(){return o},te:function(){return h},Uw:function(){return s},U$:function(){return m},uu:function(){return g},Y0:function(){return d},XL:function(){return v},ZN:function(){return y}});var n,i,o,s,a=r(16441),u=r(1581);let c=new u.Logger("strings/5.7.0");function l(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}(n=o||(o={})).current="",n.NFC="NFC",n.NFD="NFD",n.NFKC="NFKC",n.NFKD="NFKD",(i=s||(s={})).UNEXPECTED_CONTINUE="unexpected continuation byte",i.BAD_PREFIX="bad codepoint prefix",i.OVERRUN="string overrun",i.MISSING_CONTINUE="missing continuation byte",i.OUT_OF_RANGE="out of UTF-8 range",i.UTF16_SURROGATE="UTF-16 surrogate",i.OVERLONG="overlong representation";let h=Object.freeze({error:function(e,t,r,n,i){return c.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:l,replace:function(e,t,r,n,i){return e===s.OVERLONG?(n.push(i),0):(n.push(65533),l(e,t,r,n,i))}});function f(e,t){null==t&&(t=h.error),e=(0,a.arrayify)(e);let r=[],n=0;for(;n<e.length;){let i=e[n++];if(i>>7==0){r.push(i);continue}let o=null,a=null;if((224&i)==192)o=1,a=127;else if((240&i)==224)o=2,a=2047;else if((248&i)==240)o=3,a=65535;else{(192&i)==128?n+=t(s.UNEXPECTED_CONTINUE,n-1,e,r):n+=t(s.BAD_PREFIX,n-1,e,r);continue}if(n-1+o>=e.length){n+=t(s.OVERRUN,n-1,e,r);continue}let u=i&(1<<8-o-1)-1;for(let i=0;i<o;i++){let i=e[n];if((192&i)!=128){n+=t(s.MISSING_CONTINUE,n,e,r),u=null;break}u=u<<6|63&i,n++}if(null!==u){if(u>1114111){n+=t(s.OUT_OF_RANGE,n-1-o,e,r,u);continue}if(u>=55296&&u<=57343){n+=t(s.UTF16_SURROGATE,n-1-o,e,r,u);continue}if(u<=a){n+=t(s.OVERLONG,n-1-o,e,r,u);continue}r.push(u)}}return r}function d(e,t=o.current){t!=o.current&&(c.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){let 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((64512&n)==55296){t++;let i=e.charCodeAt(t);if(t>=e.length||(64512&i)!=56320)throw Error("invalid utf-8 string");let 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,a.arrayify)(r)}function p(e){let t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function m(e,t){return'"'+f(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?p(e):p(((e-=65536)>>10&1023)+55296)+p((1023&e)+56320)}).join("")+'"'}function g(e){return e.map(e=>e<=65535?String.fromCharCode(e):String.fromCharCode(((e-=65536)>>10&1023)+55296,(1023&e)+56320)).join("")}function y(e,t){return g(f(e,t))}function v(e,t=o.current){return f(d(e,t))}},83875:function(e,t,r){"use strict";r.r(t),r.d(t,{TransactionTypes:function(){return i},accessListify:function(){return _},computeAddress:function(){return b},parse:function(){return C},recoverAddress:function(){return w},serialize:function(){return x}});var n,i,o=r(19485),s=r(2593),a=r(16441),u=r(21046),c=r(38197),l=r(6881),h=r(59052),f=r(67669),d=r(1581);let p=new d.Logger("transactions/5.7.0");function m(e){return"0x"===e?null:(0,o.getAddress)(e)}function g(e){return"0x"===e?u._Y:s.O$.from(e)}(n=i||(i={}))[n.legacy=0]="legacy",n[n.eip2930=1]="eip2930",n[n.eip1559=2]="eip1559";let y=[{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"}],v={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function b(e){let t=(0,f.computePublicKey)(e);return(0,o.getAddress)((0,a.hexDataSlice)((0,c.keccak256)((0,a.hexDataSlice)(t,1)),12))}function w(e,t){return b((0,f.recoverPublicKey)((0,a.arrayify)(e),t))}function E(e,t){let r=(0,a.stripZeros)(s.O$.from(e).toHexString());return r.length>32&&p.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function A(e,t){return{address:(0,o.getAddress)(e),storageKeys:(t||[]).map((t,r)=>(32!==(0,a.hexDataLength)(t)&&p.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase()))}}function _(e){if(Array.isArray(e))return e.map((e,t)=>Array.isArray(e)?(e.length>2&&p.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),A(e[0],e[1])):A(e.address,e.storageKeys));let t=Object.keys(e).map(t=>{let r=e[t].reduce((e,t)=>
1(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).map(e=>[e.address,e.storageKeys])}function S(e,t){if(null!=e.gasPrice){let t=s.O$.from(e.gasPrice),r=s.O$.from(e.maxFeePerGas||0);t.eq(r)||p.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}let r=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),E(e.maxFeePerGas||0,"maxFeePerGas"),E(e.gasLimit||0,"gasLimit"),null!=e.to?(0,o.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",k(e.accessList||[])];if(t){let e=(0,a.splitSignature)(t);r.push(E(e.recoveryParam,"recoveryParam")),r.push((0,a.stripZeros)(e.r)),r.push((0,a.stripZeros)(e.s))}return(0,a.hexConcat)(["0x02",h.encode(r)])}function O(e,t){let r=[E(e.chainId||0,"chainId"),E(e.nonce||0,"nonce"),E(e.gasPrice||0,"gasPrice"),E(e.gasLimit||0,"gasLimit"),null!=e.to?(0,o.getAddress)(e.to):"0x",E(e.value||0,"value"),e.data||"0x",k(e.accessList||[])];if(t){let e=(0,a.splitSignature)(t);r.push(E(e.recoveryParam,"recoveryParam")),r.push((0,a.stripZeros)(e.r)),r.push((0,a.stripZeros)(e.s))}return(0,a.hexConcat)(["0x01",h.encode(r)])}function x(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&p.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,l.checkProperties)(e,v);let r=[];y.forEach(function(t){let n=e[t.name]||[],i={};t.numeric&&(i.hexPad="left"),n=(0,a.arrayify)((0,a.hexlify)(n,i)),t.length&&n.length!==t.length&&n.length>0&&p.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,a.stripZeros)(n)).length>t.maxLength&&p.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),r.push((0,a.hexlify)(n))});let n=0;if(null!=e.chainId?"number"!=typeof(n=e.chainId)&&p.throwArgumentError("invalid transaction.chainId","transaction",e):t&&!(0,a.isBytesLike)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,a.hexlify)(n)),r.push("0x"),r.push("0x")),!t)return h.encode(r);let i=(0,a.splitSignature)(t),o=27+i.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),o+=2*n+8,i.v>28&&i.v!==o&&p.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):i.v!==o&&p.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,a.hexlify)(o)),r.push((0,a.stripZeros)((0,a.arrayify)(i.r))),r.push((0,a.stripZeros)((0,a.arrayify)(i.s))),h.encode(r)}(e,t);switch(e.type){case 1:return O(e,t);case 2:return S(e,t)}return p.throwError(`unsupported transaction type: ${e.type}`,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function P(e,t,r){try{let r=g(t[0]).toNumber();if(0!==r&&1!==r)throw Error("bad recid");e.v=r}catch(e){p.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,a.hexZeroPad)(t[1],32),e.s=(0,a.hexZeroPad)(t[2],32);try{let t=(0,c.keccak256)(r(e));e.from=w(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function C(e){let t=(0,a.arrayify)(e);if(t[0]>127)return function(e){let t=h.decode(e);9!==t.length&&6!==t.length&&p.throwArgumentError("invalid raw transaction","rawTransaction",e);let r={nonce:g(t[0]).toNumber(),gasPrice:g(t[1]),gasLimit:g(t[2]),to:m(t[3]),value:g(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=s.O$.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,a.hexZeroPad)(t[7],32),r.s=(0,a.hexZeroPad)(t[8],32),s.O$.from(r.r).isZero()&&s.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,i=t.slice(0,6);0!==r.chainId&&(i.push((0,a.hexlify)(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8);let o=(0,c.keccak256)(h.encode(i));try{r.from=w(o,{r:(0,a.hexlify)(r.r),s:(0,a.hexlify)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,c.keccak256)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){let t=h.decode(e.slice(1));8!==t.length&&11!==t.length&&p.throwArgumentError("invalid component count for transaction type: 1","payload",(0,a.hexlify)(e));let r={type:1,chainId:g(t[0]).toNumber(),nonce:g(t[1]).toNumber(),gasPrice:g(t[2]),gasLimit:g(t[3]),to:m(t[4]),value:g(t[5]),data:t[6],accessList:_(t[7])};return 8===t.length||(r.hash=(0,c.keccak256)(e),P(r,t.slice(8),O)),r}(t);case 2:return function(e){let t=h.decode(e.slice(1));9!==t.length&&12!==t.length&&p.throwArgumentError("invalid component count for transaction type: 2","payload",(0,a.hexlify)(e));let r=g(t[2]),n=g(t[3]),i={type:2,chainId:g(t[0]).toNumber(),nonce:g(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:g(t[4]),to:m(t[5]),value:g(t[6]),data:t[7],accessList:_(t[8])};return 9===t.length||(i.hash=(0,c.keccak256)(e),P(i,t.slice(9),S)),i}(t)}return p.throwError(`unsupported transaction type: ${t[0]}`,d.Logger.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},61744:function(e,t,r){"use strict";r.r(t),r.d(t,{commify:function(){return a},formatEther:function(){return l},formatUnits:function(){return u},parseEther:function(){return h},parseUnits:function(){return c}});var n=r(20335),i=r(1581);let o=new i.Logger("units/5.7.0"),s=["wei","kwei","mwei","gwei","szabo","finney","ether"];function a(e){let t=String(e).split(".");(t.length>2||!t[0].match(/^-?[0-9]*$/)||t[1]&&!t[1].match(/^[0-9]*$/)||"."===e||"-."===e)&&o.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);let s=[];for(;r.length;){if(r.length<=3){s.unshift(r);break}{let e=r.length-3;s.unshift(r.substring(e)),r=r.substring(0,e)}}return n+s.join(",")+i}function u(e,t){if("string"==typeof t){let e=s.indexOf(t);-1!==e&&(t=3*e)}return(0,n.S5)(e,null!=t?t:18)}function c(e,t){if("string"!=typeof e&&o.throwArgumentError("value must be a string","value",e),"string"==typeof t){let e=s.indexOf(t);-1!==e&&(t=3*e)}return(0,n.Ox)(e,null!=t?t:18)}function l(e){return u(e,18)}function h(e){return c(e,18)}},79911:function(e,t,r){"use strict";r.r(t),r.d(t,{Wallet:function(){return w},verifyMessage:function(){return E},verifyTypedData:function(){return A}});var n=r(19485),i=r(81556),o=r(48088),s=r(16441),a=r(93684),u=r(67827),c=r(84178),l=r(38197),h=r(6881),f=r(5634),d=r(67669),p=r(81964),m=r(64341),g=r(83875),y=r(1581),v=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})};
1let b=new y.Logger("wallet/5.7.0");class w extends o.E{constructor(e,t){var r;if(super(),null!=(r=e)&&(0,s.isHexString)(r.privateKey,32)&&null!=r.address){let t=new d.SigningKey(e.privateKey);if((0,h.defineReadOnly)(this,"_signingKey",()=>t),(0,h.defineReadOnly)(this,"address",(0,g.computeAddress)(this.publicKey)),this.address!==(0,n.getAddress)(e.address)&&b.throwArgumentError("privateKey/address mismatch","privateKey","[REDACTED]"),function(e){let t=e.mnemonic;return t&&t.phrase}(e)){let t=e.mnemonic;(0,h.defineReadOnly)(this,"_mnemonic",()=>({phrase:t.phrase,path:t.path||c.defaultPath,locale:t.locale||"en"}));let r=this.mnemonic,n=c.HDNode.fromMnemonic(r.phrase,null,r.locale).derivePath(r.path);(0,g.computeAddress)(n.privateKey)!==this.address&&b.throwArgumentError("mnemonic/address mismatch","privateKey","[REDACTED]")}else(0,h.defineReadOnly)(this,"_mnemonic",()=>null)}else{if(d.SigningKey.isSigningKey(e))"secp256k1"!==e.curve&&b.throwArgumentError("unsupported curve; must be secp256k1","privateKey","[REDACTED]"),(0,h.defineReadOnly)(this,"_signingKey",()=>e);else{"string"==typeof e&&e.match(/^[0-9a-f]*$/i)&&64===e.length&&(e="0x"+e);let t=new d.SigningKey(e);(0,h.defineReadOnly)(this,"_signingKey",()=>t)}(0,h.defineReadOnly)(this,"_mnemonic",()=>null),(0,h.defineReadOnly)(this,"address",(0,g.computeAddress)(this.publicKey))}t&&!i.zt.isProvider(t)&&b.throwArgumentError("invalid provider","provider",t),(0,h.defineReadOnly)(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 w(this,e)}signTransaction(e){return(0,h.resolveProperties)(e).then(t=>{null!=t.from&&((0,n.getAddress)(t.from)!==this.address&&b.throwArgumentError("transaction from address mismatch","transaction.from",e.from),delete t.from);let r=this._signingKey().signDigest((0,l.keccak256)((0,g.serialize)(t)));return(0,g.serialize)(t,r)})}signMessage(e){return v(this,void 0,void 0,function*(){return(0,s.joinSignature)(this._signingKey().signDigest((0,a.r)(e)))})}_signTypedData(e,t,r){return v(this,void 0,void 0,function*(){let n=yield u.E.resolveNames(e,t,r,e=>(null==this.provider&&b.throwError("cannot resolve ENS names without a provider",y.Logger.errors.UNSUPPORTED_OPERATION,{operation:"resolveName",value:e}),this.provider.resolveName(e)));return(0,s.joinSignature)(this._signingKey().signDigest(u.E.hash(n.domain,t,n.value)))})}encrypt(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw Error("invalid callback");return t||(t={}),(0,p.HI)(this,e,t,r)}static createRandom(e){let t=(0,f.O)(16);e||(e={}),e.extraEntropy&&(t=(0,s.arrayify)((0,s.hexDataSlice)((0,l.keccak256)((0,s.concat)([t,e.extraEntropy])),0,16)));let r=(0,c.entropyToMnemonic)(t,e.locale);return w.fromMnemonic(r,e.path,e.locale)}static fromEncryptedJson(e,t,r){return(0,m.decryptJsonWallet)(e,t,r).then(e=>new w(e))}static fromEncryptedJsonSync(e,t){return new w((0,m.decryptJsonWalletSync)(e,t))}static fromMnemonic(e,t,r){return t||(t=c.defaultPath),new w(c.HDNode.fromMnemonic(e,null,r).derivePath(t))}}function E(e,t){return(0,g.recoverAddress)((0,a.r)(e),t)}function A(e,t,r,n){return(0,g.recoverAddress)(u.E.hash(e,t,r),n)}},37707:function(e,t,r){"use strict";r.r(t),r.d(t,{_fetchData:function(){return h},fetchJson:function(){return f},poll:function(){return d}});var n=r(59567),i=r(16441),o=r(6881),s=r(29251),a=r(1581);let u=new a.Logger("web/5.7.1");function c(e){return new Promise(t=>{setTimeout(t,e)})}function l(e,t){if(null==e)return null;if("string"==typeof e)return e;if((0,i.isBytesLike)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,s.ZN)(e)}catch(e){}return(0,i.hexlify)(e)}return e}function h(e,t,r){let h="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;u.assertArgument(h>0&&h%1==0,"invalid connection throttle limit","connection.throttleLimit",h);let f="object"==typeof e?e.throttleCallback:null,d="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;u.assertArgument(d>0&&d%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",d);let p="object"==typeof e&&!!e.errorPassThrough,m={},g=null,y={method:"GET"},v=!1,b=12e4;if("string"==typeof e)g=e;else if("object"==typeof e){if((null==e||null==e.url)&&u.throwArgumentError("missing URL","connection.url",e),g=e.url,"number"==typeof e.timeout&&e.timeout>0&&(b=e.timeout),e.headers)for(let t in e.headers)m[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(v=!0);if(y.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==g.substring(0,6)&&!0!==e.allowInsecureAuthentication&&u.throwError("basic authentication requires a secure https url",a.Logger.errors.INVALID_ARGUMENT,{argument:"url",url:g,user:e.user,password:"[REDACTED]"});let t=e.user+":"+e.password;m.authorization={key:"Authorization",value:"Basic "+(0,n.c)((0,s.Y0)(t))}}
1null!=e.skipFetchSetup&&(y.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(y.fetchOptions=(0,o.shallowCopy)(e.fetchOptions))}let w=RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),E=g?g.match(w):null;if(E)try{var A;let e={statusCode:200,statusMessage:"OK",headers:{"content-type":E[1]||"text/plain"},body:E[2]?(0,n.J)(E[3]):(A=E[3],(0,s.Y0)(A.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16)))))},t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){u.throwError("processing response error",a.Logger.errors.SERVER_ERROR,{body:l(E[1],E[2]),error:e,requestBody:null,requestMethod:"GET",url:g})}t&&(y.method="POST",y.body=t,null==m["content-type"]&&(m["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==m["content-length"]&&(m["content-length"]={key:"Content-Length",value:String(t.length)}));let _={};Object.keys(m).forEach(e=>{let t=m[e];_[t.key]=t.value}),y.headers=_;let k=function(){let e=null,t=new Promise(function(t,r){b&&(e=setTimeout(()=>{null!=e&&(e=null,r(u.makeError("timeout",a.Logger.errors.TIMEOUT,{requestBody:l(y.body,_["content-type"]),requestMethod:y.method,timeout:b,url:g})))},b))});return{promise:t,cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),S=function(){var e,t,n,o;return e=this,t=void 0,n=void 0,o=function*(){for(let e=0;e<h;e++){let t=null;try{if(t=yield function(e,t){var r,n,o,s;return r=this,n=void 0,o=void 0,s=function*(){null==t&&(t={});let r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};
1if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){let 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)}let n=yield fetch(e,r),o=yield n.arrayBuffer(),s={};return n.headers.forEach?n.headers.forEach((e,t)=>{s[t.toLowerCase()]=e}):n.headers.keys().forEach(e=>{s[e.toLowerCase()]=n.headers.get(e)}),{headers:s,statusCode:n.status,statusMessage:n.statusText,body:(0,i.arrayify)(new Uint8Array(o))}},new(o||(o=Promise))(function(e,t){function i(e){try{u(s.next(e))}catch(e){t(e)}}function a(e){try{u(s.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):((r=t.value)instanceof o?r:new o(function(e){e(r)})).then(i,a)}u((s=s.apply(r,n||[])).next())})}(g,y),e<h){if(301===t.statusCode||302===t.statusCode){let e=t.headers.location||"";if("GET"===y.method&&e.match(/^https:/)){g=t.headers.location;continue}}else if(429===t.statusCode){let r=!0;if(f&&(r=yield f(e,g)),r){let r=0,n=t.headers["retry-after"];r="string"==typeof n&&n.match(/^[1-9][0-9]*$/)?1e3*parseInt(n):d*parseInt(String(Math.random()*Math.pow(2,e))),yield c(r);continue}}}}catch(e){null==(t=e.response)&&(k.cancel(),u.throwError("missing response",a.Logger.errors.SERVER_ERROR,{requestBody:l(y.body,_["content-type"]),requestMethod:y.method,serverError:e,url:g}))}let n=t.body;if(v&&304===t.statusCode?n=null:!p&&(t.statusCode<200||t.statusCode>=300)&&(k.cancel(),u.throwError("bad response",a.Logger.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:l(n,t.headers?t.headers["content-type"]:null),requestBody:l(y.body,_["content-type"]),requestMethod:y.method,url:g})),r)try{let e=yield r(n,t);return k.cancel(),e}catch(r){if(r.throttleRetry&&e<h){let t=!0;if(f&&(t=yield f(e,g)),t){let t=d*parseInt(String(Math.random()*Math.pow(2,e)));yield c(t);continue}}k.cancel(),u.throwError("processing response error",a.Logger.errors.SERVER_ERROR,{body:l(n,t.headers?t.headers["content-type"]:null),error:r,requestBody:l(y.body,_["content-type"]),requestMethod:y.method,url:g})}return k.cancel(),n}return u.throwError("failed response",a.Logger.errors.SERVER_ERROR,{requestBody:l(y.body,_["content-type"]),requestMethod:y.method,url:g})},new(n||(n=Promise))(function(r,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?r(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(s,a)}u((o=o.apply(e,t||[])).next())})}();return Promise.race([k.promise,S])}function f(e,t,r){let n=(e,t)=>{let n=null;if(null!=e)try{n=JSON.parse((0,s.ZN)(e))}catch(t){u.throwError("invalid JSON",a.Logger.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n},i=null;if(null!=t){i=(0,s.Y0)(t);let r="string"==typeof e?{url:e}:(0,o.shallowCopy)(e);if(r.headers){let e=0!==Object.keys(r.headers).filter(e=>"content-type"===e.toLowerCase()).length;e||(r.headers=(0,o.shallowCopy)(r.headers),r.headers["content-type"]="application/json")}else r.headers={"content-type":"application/json"};e=r}return h(e,i,n)}function d(e,t){return t||(t={}),null==(t=(0,o.shallowCopy)(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,s=()=>!o&&(o=!0,i&&clearTimeout(i),!0);t.timeout&&(i=setTimeout(()=>{s()&&n(Error("timeout"))},t.timeout));let a=t.retryLimit,u=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(++u>a){s()&&n(Error("retry limit reached"));return}let e=t.interval*parseInt(String(Math.random()*Math.pow(2,u)));e<t.floor&&(e=t.floor),e>t.ceiling&&(e=t.ceiling),setTimeout(i,e)}return null},function(e){s()&&n(e)})}()})}},48812:function(e,t,r){"use strict";r.d(t,{D:function(){return a}});
1var n=r(32046),i=r(6881),o=r(1581);let s=new o.Logger("wordlists/5.7.0");class a{constructor(e){s.checkAbstract(new.target,a),(0,i.defineReadOnly)(this,"locale",e)}split(e){return e.toLowerCase().split(/ +/g)}join(e){return e.join(" ")}static check(e){let t=[];for(let r=0;r<2048;r++){let n=e.getWord(r);if(r!==e.getWordIndex(n))return"0x";t.push(n)}return(0,n.id)(t.join("\n")+"\n")}static register(e,t){t||(t=e.locale)}}},10234:function(e,t,r){"use strict";r.d(t,{E:function(){return u}});var n=r(48812);let i=null;function o(e){if(null==i&&(i="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductC
1onfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMu
1seumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThe
1nTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==n.D.check(e)))throw i=null,Error("BIP39 Wordlist for en (English) FAILED")}class s extends n.D{constructor(){super("en")}getWord(e){return o(this),i[e]}getWordIndex(e){return o(this),i.indexOf(e)}}let a=new s;n.D.register(a);let u={en:a}},38751:function(e,t,r){"use strict";r.d(t,{g7:function(){return c}});var n=null,i={},o=1;function s(e){try{return e()}catch(e){}}var a="@wry/context:Slot",u=s(function(){return globalThis})||s(function(){return r.g})||Object.create(null),c=u[a]||Array[a]||function(e){try{Object.defineProperty(u,a,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(function(){function e(){this.id=["slot",o++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=n;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===i)break;return e!==n&&(n.slots[this.id]=t),!0}return n&&(n.slots[this.id]=i),!1},e.prototype.getValue=function(){if(this.hasValue())return n.slots[this.id]},e.prototype.withValue=function(e,t,r,i){var o,s=((o={__proto__:null})[this.id]=e,o),a=n;n={parent:a,slots:s};try{return t.apply(i,r)}finally{n=a}},e.bind=function(e){var t=n;return function(){var r=n;try{return n=t,e.apply(this,arguments)}finally{n=r}}},e.noContext=function(e,t,r){if(!n)return e.apply(r,t);var i=n;try{return n=null,e.apply(r,t)}finally{n=i}},e}());c.bind,c.noContext},82152:function(e,t,r){"use strict";r.d(t,{D:function(){return u}});var n=Object.prototype,i=n.toString,o=n.hasOwnProperty,s=Function.prototype.toString,a=new Map;function u(e,t){try{return function e(t,r){if(t===r)return!0;var n=i.call(t);if(n!==i.call(r))return!1;switch(n){case"[object Array]":if(t.length!==r.length)break;case"[object Object]":if(f(t,r))return!0;var a=c(t),u=c(r),l=a.length;if(l!==u.length)break;for(var d=0;d<l;++d)if(!o.call(r,a[d]))return!1;for(var d=0;d<l;++d){var p=a[d];if(!e(t[p],r[p]))return!1}return!0;case"[object Error]":return t.name===r.name&&t.message===r.message;case"[object Number]":if(t!=t)return r!=r;case"[object Boolean]":case"[object Date]":return+t==+r;case"[object RegExp]":case"[object String]":return t=="".concat(r);case"[object Map]":case"[object Set]":if(t.size!==r.size)break;if(f(t,r))return!0;for(var m=t.entries(),g="[object Map]"===n;;){var y=m.next();if(y.done)break;var v=y.value,b=v[0],w=v[1];if(!r.has(b)||g&&!e(w,r.get(b)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":t=new Uint8Array(t),r=new Uint8Array(r);case"[object DataView]":var E=t.byteLength;if(E===r.byteLength)for(;E--&&t[E]===r[E];);return -1===E;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var A,_=s.call(t);if(_!==s.call(r))break;return!((A=_.length-h.length)>=0)||_.indexOf(h,A)!==A}return!1}(e,t)}finally{a.clear()}}function c(e){return Object.keys(e).filter(l,e)}function l(e){return void 0!==this[e]}var h="{ [native code] }";function f(e,t){var r=a.get(e);if(r){if(r.has(t))return!0}else a.set(e,r=new Set);return r.add(t),!1}},657:function(e,t,r){"use strict";r.d(t,{B:function(){return a}});var n=function(){return Object.create(null)},i=Array.prototype,o=i.forEach,s=i.slice,a=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=n),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return o.call(e,function(e){return t=t.getChildTrie(e)}),t.data||(t.data=this.makeData(s.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}()},78826: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 Error("Array contains invali
1d value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw 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,u=(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("")}}),c={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],h=[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],f=[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],d=[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,16733
113503,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,389
1623319,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],g=[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],y=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,
1632953703,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],b=[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,12974
103050,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],w=[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,60
17398968,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],A=[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,12
101765386,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],_=[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],k=[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,4002861
1748,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 O=function(e){if(!(this instanceof O))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:i(e,!0)}),this._prepare()};O.prototype._prepare=function(){var e=c[this.key.length];if(null==e)throw 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]);for(var r=(e+1)*4,n=this.key.length/4,i=S(this.key),t=0;t<n;t++)o=t>>2,this._Ke[o][t%4]=i[t],this._Kd[e-o][t%4]=i[t];for(var o,s,a=0,u=n;u<r;){if(s=i[n-1],i[0]^=h[s>>16&255]<<24^h[s>>8&255]<<16^h[255&s]<<8^h[s>>24&255]^l[a]<<24,a+=1,8!=n)for(var t=1;t<n;t++)i[t]^=i[t-1];else{for(var t=1;t<n/2;t++)i[t]^=i[t-1];s=i[n/2-1],i[n/2]^=h[255&s]^h[s>>8&255]<<8^h[s>>16&255]<<16^h[s>>24&255]<<24;for(var t=n/2+1;t<n;t++)i[t]^=i[t-1]}for(var f,d,t=0;t<n&&u<r;)f=u>>2,d=u%4,this._Ke[f][d]=i[t],this._Kd[e-f][d]=i[t++],u++}for(var f=1;f<e;f++)for(var d=0;d<4;d++)s=this._Kd[f][d],this._Kd[f][d]=E[s>>24&255]^A[s>>16&255]^_[s>>8&255]^k[255&s]},O.prototype.encrypt=function(e){if(16!=e.length)throw 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(var i=0;i<4;i++)r[i]=d[n[i]>>24&255]^p[n[(i+1)%4]>>16&255]^m[n[(i+2)%4]>>8&255]^g[255&n[(i+3)%4]]^this._Ke[s][i];n=r.slice()}for(var a,u=o(16),i=0;i<4;i++)a=this._Ke[t][i],u[4*i]=(h[n[i]>>24&255]^a>>24)&255,u[4*i+1]=(h[n[(i+1)%4]>>16&255]^a>>16)&255,u[4*i+2]=(h[n[(i+2)%4]>>8&255]^a>>8)&255,u[4*i+3]=(h[255&n[(i+3)%4]]^a)&255;return u},O.prototype.decrypt=function(e){if(16!=e.length)throw Error("invalid ciphertext size (must be 16 bytes)");
1for(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(var i=0;i<4;i++)r[i]=y[n[i]>>24&255]^v[n[(i+3)%4]>>16&255]^b[n[(i+2)%4]>>8&255]^w[255&n[(i+1)%4]]^this._Kd[s][i];n=r.slice()}for(var a,u=o(16),i=0;i<4;i++)a=this._Kd[t][i],u[4*i]=(f[n[i]>>24&255]^a>>24)&255,u[4*i+1]=(f[n[(i+3)%4]>>16&255]^a>>16)&255,u[4*i+2]=(f[n[(i+2)%4]>>8&255]^a>>8)&255,u[4*i+3]=(f[255&n[(i+1)%4]]^a)&255;return u};var x=function(e){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new O(e)};x.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw 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},x.prototype.decrypt=function(e){if((e=i(e)).length%16!=0)throw 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 Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastCipherblock=i(t,!0),this._aes=new O(e)};P.prototype.encrypt=function(e){if((e=i(e)).length%16!=0)throw 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 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 C=function(e,t,r){if(!(this instanceof C))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",t){if(16!=t.length)throw 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 O(e)};C.prototype.encrypt=function(e){if(e.length%this.segmentSize!=0)throw 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},C.prototype.decrypt=function(e){if(e.length%this.segmentSize!=0)throw 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 Error("invalid initialation vector size (must be 16 bytes)")}else t=o(16);this._lastPrecipher=i(t,!0),this._lastPrecipherIndex=16,this._aes=new O(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 I=function(e){if(!(this instanceof I))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)};I.prototype.setValue=function(e){if("number"!=typeof e||parseInt(e)!=e)throw Error("invalid counter value (must be an integer)");for(var t=15;t>=0;--t)this._counter[t]=e%256,e>>=8},I.prototype.setBytes=function(e){if(16!=(e=i(e,!0)).length)throw Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},I.prototype.increment=function(){for(var e=15;e>=0;e--)if(255===this._counter[e])this._counter[e]=0;else{this._counter[e]++;break}};var T=function(e,t){if(!(this instanceof T))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof I||(t=new I(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new O(e)};T.prototype.encrypt=function(e){for(var t=i(e,!0),r=0;r<t.length;r++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt
1(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),t[r]^=this._remainingCounter[this._remainingCounterIndex++];return t},T.prototype.decrypt=T.prototype.encrypt,e.exports={AES:O,Counter:I,ModeOfOperation:{ecb:x,cbc:P,cfb:C,ofb:R,ctr:T},utils:{hex:u,utf8:{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("")}}},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 Error("PKCS#7 invalid length");var t=e[e.length-1];if(t>16)throw 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 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}}}(0)},92882:function(e){"use strict";for(var t="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<t.length;n++){var i=t.charAt(n);if(void 0!==r[i])throw 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(r=0,t=o(t);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 u=e.slice(0,a),c=e.slice(a+1);if(c.length<6)return"Data too short";var l=s(u);if("string"==typeof l)return l;for(var h=[],f=0;f<c.length;++f){var d=c.charAt(f),p=r[d];if(void 0===p)return"Unknown character "+d;l=o(l)^p,f+6>=c.length||h.push(p)}return 1!==l?"Invalid checksum for "+e:{prefix:u,words:h}}function u(e,t,r,n){for(var i=0,o=0,s=(1<<r)-1,a=[],u=0;u<e.length;++u)for(i=i<<t|e[u],o+=t;o>=r;)a.push(i>>(o-=r)&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 Error(t)},encode:function(e,r,n){if(n=n||90,e.length+7+r.length>n)throw TypeError("Exceeds length limit");var i=s(e=e.toLowerCase());if("string"==typeof i)throw Error(i);for(var a=e+"1",u=0;u<r.length;++u){var c=r[u];if(c>>5!=0)throw Error("Non 5-bit word");i=o(i)^c,a+=t.charAt(c)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u){var l=i>>(5-u)*5&31;a+=t.charAt(l)}return a},toWordsUnsafe:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t},toWords:function(e){var t=u(e,8,5,!0);if(Array.isArray(t))return t;throw Error(t)},fromWordsUnsafe:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t},fromWords:function(e){var t=u(e,5,8,!1);if(Array.isArray(t))return t;throw Error(t)}}},13550:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw 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"))}"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{h="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(46601).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}
vendor: 8,859 bytes, line 1
1function u(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),u=t;u<a;u++){var c=e.charCodeAt(u)-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 c(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 0>e.cmp(t)?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=Array(this.length);for(var i,o,s=0;s<this.length;s++)this.words[s]=0;var a=0;if("be"===r)for(s=e.length-1,i=0;s>=0;s-=3)o=e[s]|e[s-1]<<8|e[s-2]<<16,this.words[i]|=o<<a&67108863,this.words[i+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);else if("le"===r)for(s=0,i=0;s<e.length;s+=3)o=e[s]|e[s+1]<<8|e[s+2]<<16,this.words[i]|=o<<a&67108863,this.words[i+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n,i=0;i<this.length;i++)this.words[i]=0;var o=0,s=0;if("be"===r)for(i=e.length-1;i>=t;i-=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)n=a(e,t,i)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>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,c=0,l=r;l<a;l+=n)c=u(e,l,l+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==s){var h=1;for(c=u(e,l,e.length,t),l=0;l<s;l++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},o.prototype.copy=function(e){e.words=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){c(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 h,f=["","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"],d=[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],p=[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 m(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,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,h=67108863&u,f=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=f;d++){var p=c-d|0;l+=(s=(i=0|e.words[p])*(o=0|t.words[d])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=((a<<i|o)&16777215).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?f[6-u.length]+u+r:u+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=d[e],l=p[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(l).toString(e);r=(h=h.idivn(l)).isZero()?m+r:f[c-m.length]+m+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)},h&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(h,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=e.allocUnsafe?e.allocUnsafe(o):new 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(8191&t)==0&&(r+=13,t>>>=13),(127&t)==0&&(r+=7,t>>>=7),(15&t)==0&&(r+=4,t>>>=4),(3&t)==0&&(r+=2,t>>>=2),(1&t)==0&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+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((this.negative|e.negative)==0),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((this.negative|e.negative)==0),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){this.length>e.length?(t=this,r=e):(t=e,r=this);for(var t,r,n=0;n<r.length;
vendor: 7,566 bytes, line 1
1n++)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((this.negative|e.negative)==0),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),t?this.words[r]=this.words[r]|1<<i:this.words[r]=this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){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 t,r,n,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,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(n=(0|t.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&n;for(;0!==o&&s<t.length;s++)o=(n=(0|t.words[s])+o)>>26,this.words[s]=67108863&n;if(0===o&&s<t.length&&t!==this)for(;s<t.length;s++)this.words[s]=t.words[s];return this.length=Math.max(this.length,s),t!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,l=0|s[0],h=8191&l,f=l>>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,v=g>>>13,b=0|s[3],w=8191&b,E=b>>>13,A=0|s[4],_=8191&A,k=A>>>13,S=0|s[5],O=8191&S,x=S>>>13,P=0|s[6],C=8191&P,R=P>>>13,I=0|s[7],T=8191&I,N=I>>>13,M=0|s[8],D=8191&M,F=M>>>13,L=0|s[9],B=8191&L,j=L>>>13,U=0|a[0],q=8191&U,G=U>>>13,V=0|a[1],Q=8191&V,z=V>>>13,K=0|a[2],H=8191&K,W=K>>>13,J=0|a[3],Y=8191&J,Z=J>>>13,$=0|a[4],X=8191&$,ee=$>>>13,et=0|a[5],er=8191&et,en=et>>>13,ei=0|a[6],eo=8191&ei,es=ei>>>13,ea=0|a[7],eu=8191&ea,ec=ea>>>13,el=0|a[8],eh=8191&el,ef=el>>>13,ed=0|a[9],ep=8191&ed,em=ed>>>13;r.negative=e.negative^t.negative,r.length=19;var eg=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,G))+Math.imul(f,q)|0))<<13)|0;c=((o=Math.imul(f,G))+(i>>>13)|0)+(eg>>>26)|0,eg&=67108863,n=Math.imul(p,q),i=(i=Math.imul(p,G))+Math.imul(m,q)|0,o=Math.imul(m,G);var ey=(c+(n=n+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,z)|0)+Math.imul(f,Q)|0))<<13)|0;c=((o=o+Math.imul(f,z)|0)+(i>>>13)|0)+(ey>>>26)|0,ey&=67108863,n=Math.imul(y,q),i=(i=Math.imul(y,G))+Math.imul(v,q)|0,o=Math.imul(v,G),n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,z)|0;var ev=(c+(n=n+Math.imul(h,H)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(f,H)|0))<<13)|0;c=((o=o+Math.imul(f,W)|0)+(i>>>13)|0)+(ev>>>26)|0,ev&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,G))+Math.imul(E,q)|0,o=Math.imul(E,G),n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,z)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,z)|0,n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var eb=(c+(n=n+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,Z)|0)+Math.imul(f,Y)|0))<<13)|0;c=((o=o+Math.imul(f,Z)|0)+(i>>>13)|0)+(eb>>>26)|0,eb&=67108863,n=Math.imul(_,q),i=(i=Math.imul(_,G))+Math.imul(k,q)|0,o=Math.imul(k,G),n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,z)|0,n=n+Math.imul(y,H)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(v,H)|0,o=o+Math.imul(v,W)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var ew=(c+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,ee)|0)+Math.imul(f,X)|0))<<13)|0;c=((o=o+Math.imul(f,ee)|0)+(i>>>13)|0)+(ew>>>26)|0,ew&=67108863,n=Math.imul(O,q),i=(i=Math.imul(O,G))+Math.imul(x,q)|0,o=Math.imul(x,G),n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,z)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,z)|0,n=n+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(E,H)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0;var eE=(c+(n=n+Math.imul(h,er)|0)|0)+((8191&(i=(i=i+Math.imul(h,en)|0)+Math.imul(f,er)|0))<<13)|0;c=((o=o+Math.imul(f,en)|0)+(i>>>13)|0)+(eE>>>26)|0,eE&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,G))+Math.imul(R,q)|0,o=Math.imul(R,G),n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,z)|0)+Math.imul(x,Q)|0,o=o+Math.imul(x,z)|0,n=n+Math.imul(_,H)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,er)|0,i=(i=i+Math.imul(p,en)|0)+Math.imul(m,er)|0,o=o+Math.imul(m,en)|0;var eA=(c+(n=n+Math.imul(h,eo)|0)|0)+((8191&(i=(i=i+Math.imul(h,es)|0)+Math.imul(f,eo)|0))<<13)|0;c=((o=o+Math.imul(f,es)|0)+(i>>>13)|0)+(eA>>>26)|0,eA&=67108863,n=Math.imul(T,q),i=(i=Math.imul(T,G))+Math.imul(N,q)|0,o=Math.imul(N,G),n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,z)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,z)|0,n=n+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(x,H)|0,o=o+Math.imul(x,W)|0,n=n+Math.imul(_,Y)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(v,er)|0,o=o+Math.imul(v,en)|0,n=n+Math.imul(p,eo)|0,i=(i=i+Math.imul(p,es)|0)+Math.imul(m,eo)|0,o=o+Math.imul(m,es)|0;var e_=(c+(n=n+Math.imul(h,eu)|0)|0)+((8191&(i=(i=i+Math.imul(h,ec)|0)+Math.imul(f,eu)|0))<<13)|0;c=((o=o+Math.imul(f,ec)|0)+(i>>>13)|0)+(e_>>>26)|0,e_&=67108863,n=Math.imul(D,q),i=(i=Math.imul(D,G))+Math.imul(F,q)|0,o=Math.imul(F,G),n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,z)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,z)|0,n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(x,Y)|0,o=o+Math.imul(x,Z)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,er)|0,i=(i=i+Math.imul(w,en)|0)+Math.imul(E,er)|0,o=o+Math.imul(E,en)|0,n=n+Math.imul(y,eo)|0,i=(i=i+Math.imul(y,es)|0)+Math.imul(v,eo)|0,o=o+Math.imul(v,es)|0,n=n+Math.imul(p,eu)|0,i=(i=i+Math.imul(p,ec)|0)+Math.imul(m,eu)|0,o=o+Math.imul(m,ec)|0;var ek=(c+(n=n+Math.imul(h,eh)|0)|0)+((8191&(i=(i=i+Math.imul(h,ef)|0)+Math.imul(f,eh)|0))<<13)|0;c=((o=o+Math.imul(f,ef)|0)+(i>>>13)|0)+(ek>>>
vendor: 2,671 bytes, line 1
126)|0,ek&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,G))+Math.imul(j,q)|0,o=Math.imul(j,G),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,z)|0)+Math.imul(F,Q)|0,o=o+Math.imul(F,z)|0,n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,Z)|0)+Math.imul(R,Y)|0,o=o+Math.imul(R,Z)|0,n=n+Math.imul(O,X)|0,i=(i=i+Math.imul(O,ee)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,ee)|0,n=n+Math.imul(_,er)|0,i=(i=i+Math.imul(_,en)|0)+Math.imul(k,er)|0,o=o+Math.imul(k,en)|0,n=n+Math.imul(w,eo)|0,i=(i=i+Math.imul(w,es)|0)+Math.imul(E,eo)|0,o=o+Math.imul(E,es)|0,n=n+Math.imul(y,eu)|0,i=(i=i+Math.imul(y,ec)|0)+Math.imul(v,eu)|0,o=o+Math.imul(v,ec)|0,n=n+Math.imul(p,eh)|0,i=(i=i+Math.imul(p,ef)|0)+Math.imul(m,eh)|0,o=o+Math.imul(m,ef)|0;var eS=(c+(n=n+Math.imul(h,ep)|0)|0)+((8191&(i=(i=i+Math.imul(h,em)|0)+Math.imul(f,ep)|0))<<13)|0;c=((o=o+Math.imul(f,em)|0)+(i>>>13)|0)+(eS>>>26)|0,eS&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,z))+Math.imul(j,Q)|0,o=Math.imul(j,z),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(F,H)|0,o=o+Math.imul(F,W)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(O,er)|0,i=(i=i+Math.imul(O,en)|0)+Math.imul(x,er)|0,o=o+Math.imul(x,en)|0,n=n+Math.imul(_,eo)|0,i=(i=i+Math.imul(_,es)|0)+Math.imul(k,eo)|0,o=o+Math.imul(k,es)|0,n=n+Math.imul(w,eu)|0,i=(i=i+Math.imul(w,ec)|0)+Math.imul(E,eu)|0,o=o+Math.imul(E,ec)|0,n=n+Math.imul(y,eh)|0,i=(i=i+Math.imul(y,ef)|0)+Math.imul(v,eh)|0,o=o+Math.imul(v,ef)|0;var eO=(c+(n=n+Math.imul(p,ep)|0)|0)+((8191&(i=(i=i+Math.imul(p,em)|0)+Math.imul(m,ep)|0))<<13)|0;c=((o=o+Math.imul(m,em)|0)+(i>>>13)|0)+(eO>>>26)|0,eO&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,W))+Math.imul(j,H)|0,o=Math.imul(j,W),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(F,Y)|0,o=o+Math.imul(F,Z)|0,n=n+Math.imul(T,X)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(C,er)|0,i=(i=i+Math.imul(C,en)|0)+Math.imul(R,er)|0,o=o+Math.imul(R,en)|0,n=n+Math.imul(O,eo)|0,i=(i=i+Math.imul(O,es)|0)+Math.imul(x,eo)|0,o=o+Math.imul(x,es)|0,n=n+Math.imul(_,eu)|0,i=(i=i+Math.imul(_,ec)|0)+Math.imul(k,eu)|0,o=o+Math.imul(k,ec)|0,n=n+Math.imul(w,eh)|0,i=(i=i+Math.imul(w,ef)|0)+Math.imul(E,eh)|0,o=o+Math.imul(E,ef)|0;var ex=(c+(n=n+Math.imul(y,ep)|0)|0)+((8191&(i=(i=i+Math.imul(y,em)|0)+Math.imul(v,ep)|0))<<13)|0;c=((o=o+Math.imul(v,em)|0)+(i>>>13)|0)+(ex>>>26)|0,ex&=67108863,n=Math.imul(B,Y),i=(i=Math.imul(B,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(F,X
vendor: 6,330 bytes, line 1
1)|0,o=o+Math.imul(F,ee)|0,n=n+Math.imul(T,er)|0,i=(i=i+Math.imul(T,en)|0)+Math.imul(N,er)|0,o=o+Math.imul(N,en)|0,n=n+Math.imul(C,eo)|0,i=(i=i+Math.imul(C,es)|0)+Math.imul(R,eo)|0,o=o+Math.imul(R,es)|0,n=n+Math.imul(O,eu)|0,i=(i=i+Math.imul(O,ec)|0)+Math.imul(x,eu)|0,o=o+Math.imul(x,ec)|0,n=n+Math.imul(_,eh)|0,i=(i=i+Math.imul(_,ef)|0)+Math.imul(k,eh)|0,o=o+Math.imul(k,ef)|0;var eP=(c+(n=n+Math.imul(w,ep)|0)|0)+((8191&(i=(i=i+Math.imul(w,em)|0)+Math.imul(E,ep)|0))<<13)|0;c=((o=o+Math.imul(E,em)|0)+(i>>>13)|0)+(eP>>>26)|0,eP&=67108863,n=Math.imul(B,X),i=(i=Math.imul(B,ee))+Math.imul(j,X)|0,o=Math.imul(j,ee),n=n+Math.imul(D,er)|0,i=(i=i+Math.imul(D,en)|0)+Math.imul(F,er)|0,o=o+Math.imul(F,en)|0,n=n+Math.imul(T,eo)|0,i=(i=i+Math.imul(T,es)|0)+Math.imul(N,eo)|0,o=o+Math.imul(N,es)|0,n=n+Math.imul(C,eu)|0,i=(i=i+Math.imul(C,ec)|0)+Math.imul(R,eu)|0,o=o+Math.imul(R,ec)|0,n=n+Math.imul(O,eh)|0,i=(i=i+Math.imul(O,ef)|0)+Math.imul(x,eh)|0,o=o+Math.imul(x,ef)|0;var eC=(c+(n=n+Math.imul(_,ep)|0)|0)+((8191&(i=(i=i+Math.imul(_,em)|0)+Math.imul(k,ep)|0))<<13)|0;c=((o=o+Math.imul(k,em)|0)+(i>>>13)|0)+(eC>>>26)|0,eC&=67108863,n=Math.imul(B,er),i=(i=Math.imul(B,en))+Math.imul(j,er)|0,o=Math.imul(j,en),n=n+Math.imul(D,eo)|0,i=(i=i+Math.imul(D,es)|0)+Math.imul(F,eo)|0,o=o+Math.imul(F,es)|0,n=n+Math.imul(T,eu)|0,i=(i=i+Math.imul(T,ec)|0)+Math.imul(N,eu)|0,o=o+Math.imul(N,ec)|0,n=n+Math.imul(C,eh)|0,i=(i=i+Math.imul(C,ef)|0)+Math.imul(R,eh)|0,o=o+Math.imul(R,ef)|0;var eR=(c+(n=n+Math.imul(O,ep)|0)|0)+((8191&(i=(i=i+Math.imul(O,em)|0)+Math.imul(x,ep)|0))<<13)|0;c=((o=o+Math.imul(x,em)|0)+(i>>>13)|0)+(eR>>>26)|0,eR&=67108863,n=Math.imul(B,eo),i=(i=Math.imul(B,es))+Math.imul(j,eo)|0,o=Math.imul(j,es),n=n+Math.imul(D,eu)|0,i=(i=i+Math.imul(D,ec)|0)+Math.imul(F,eu)|0,o=o+Math.imul(F,ec)|0,n=n+Math.imul(T,eh)|0,i=(i=i+Math.imul(T,ef)|0)+Math.imul(N,eh)|0,o=o+Math.imul(N,ef)|0;var eI=(c+(n=n+Math.imul(C,ep)|0)|0)+((8191&(i=(i=i+Math.imul(C,em)|0)+Math.imul(R,ep)|0))<<13)|0;c=((o=o+Math.imul(R,em)|0)+(i>>>13)|0)+(eI>>>26)|0,eI&=67108863,n=Math.imul(B,eu),i=(i=Math.imul(B,ec))+Math.imul(j,eu)|0,o=Math.imul(j,ec),n=n+Math.imul(D,eh)|0,i=(i=i+Math.imul(D,ef)|0)+Math.imul(F,eh)|0,o=o+Math.imul(F,ef)|0;var eT=(c+(n=n+Math.imul(T,ep)|0)|0)+((8191&(i=(i=i+Math.imul(T,em)|0)+Math.imul(N,ep)|0))<<13)|0;c=((o=o+Math.imul(N,em)|0)+(i>>>13)|0)+(eT>>>26)|0,eT&=67108863,n=Math.imul(B,eh),i=(i=Math.imul(B,ef))+Math.imul(j,eh)|0,o=Math.imul(j,ef);var eN=(c+(n=n+Math.imul(D,ep)|0)|0)+((8191&(i=(i=i+Math.imul(D,em)|0)+Math.imul(F,ep)|0))<<13)|0;c=((o=o+Math.imul(F,em)|0)+(i>>>13)|0)+(eN>>>26)|0,eN&=67108863;var eM=(c+(n=Math.imul(B,ep))|0)+((8191&(i=(i=Math.imul(B,em))+Math.imul(j,ep)|0))<<13)|0;return c=((o=Math.imul(j,em))+(i>>>13)|0)+(eM>>>26)|0,eM&=67108863,u[0]=eg,u[1]=ey,u[2]=ev,u[3]=eb,u[4]=ew,u[5]=eE,u[6]=eA,u[7]=e_,u[8]=ek,u[9]=eS,u[10]=eO,u[11]=ex,u[12]=eP,u[13]=eC,u[14]=eR,u[15]=eI,u[16]=eT,u[17]=eN,u[18]=eM,0!==c&&(u[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,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var l=o-c,h=(0|e.words[l])*(0|t.words[c]),f=67108863&h;s=s+(h/67108864|0)|0,a=67108863&(f=f+a|0),i+=(s=s+(f>>>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 v(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):y(this,e,t)},v.prototype.makeRBT=function(e){for(var t=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,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var h=u,f=c,d=0;d<s;d++){var p=r[l+d],m=n[l+d],g=r[l+d+s],y=n[l+d+s],v=h*g-f*y;y=h*y+f*g,g=v,r[l+d]=p+g,n[l+d]=m+y,r[l+d+s]=p-g,n[l+d+s]=m-y,d!==a&&(v=u*h-c*f,f=u*f+c*h,h=v)}},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((-8192&o)==0)},v.prototype.stub=function(e){for(var t=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=Array(n),a=Array(n),u=Array(n),c=Array(n),l=Array(n),h=Array(n),f=r.words;f.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,h,n,i);for(var d=0;d<n;d++){var p=a[d]*l[d]-u[d]*h[d];u[d]=a[d]*h[d]+u[d]*l[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,f,o,n,i),this.conjugate(f,o,n),this.normalize13b(f,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=Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=Array(this.length+e.length),y(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)+(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=Array(e.bitLength()),r
vendor: 18,852 bytes, line 1
1=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,u=(0|this.words[t])-a<<r;this.words[t]=u|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){n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var i,o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.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 l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var h=0|this.words[c];this.words[c]=l<<26-o|h>>>o,l=h&a}return u&&0!==l&&(u.words[u.length++]=l),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;return!(this.length<=r)&&!!(this.words[r]&1<<t)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),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 u=(0|e.words[i])*t;o-=67108863&u,a=(o>>26)-(u/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,n=this.length-e.length,i=this.clone(),s=e,a=0|s.words[s.length-1];0!=(n=26-this._countBits(a))&&(s=s.ushln(n),i.iushln(n),a=0|s.words[s.length-1]);var u=i.length-s.length;if("mod"!==t){(r=new o(null)).length=u+1,r.words=Array(r.length);for(var c=0;c<r.length;c++)r.words[c]=0}var l=i.clone()._ishlnsubmul(s,1,u);0===l.negative&&(i=l,r&&(r.words[u]=1));for(var h=u-1;h>=0;h--){var f=(0|i.words[s.length+h])*67108864+(0|i.words[s.length+h-1]);for(f=Math.min(f/a|0,67108863),i._ishlnsubmul(s,f,h);0!==i.negative;)f--,i.negative=0,i._ishlnsubmul(s,1,h),i.isZero()||(i.negative^=1);r&&(r.words[h]=f)}return r&&r._strip(),i._strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:r||null,mod:i}},o.prototype.divmod=function(e,t,r){var i,s,a;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}):(this.negative&e.negative)!=0?(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||0>this.cmp(e)?{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)},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=67108864%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),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),h=t.clone();!t.isZero();){for(var f=0,d=1;(t.words[0]&d)==0&&f<26;++f,d<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var p=0,m=1;(r.words[0]&m)==0&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a:a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var s=new o(1),a=new o(0),u=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,l=1;(r.words[0]&l)==0&&c<26;++c,l<<=1);if(c>0)for(r.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,f=1;(i.words[0]&f)==0&&h<26;++h,f<<=1);if(h>0)for(i.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);r.cmp(i)>=0?(r.isub(i),s.isub(a)):(i.isub(r),a.isub(s))}return 0>(t=0===r.cmpn(1)?s:a).cmpn(0)&&t.iadd(e),t},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(1&this.words[0])==0},o.prototype.isOdd=function(){return(1&this.words[0])==1},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];a+=o,o=a>>>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 0>=this.cmpn(e)},o.prototype.lte=function(e){return 0>=this.cmp(e)},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 b={k256:null,p224:null,p192:null,p25519:null};function w(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(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function A(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.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 O(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)}w.prototype._tmp=function(){var e=new o(null);return e.words=Array(Math.ceil(this.n/13)),e},w.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},w.prototype.split=function(e,t){e.iushrn(this.n,0,t)},w.prototype.imulK=function(e){return e.imul(this.k)},i(E,w),E.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9){e.words[0]=0,e.length=1;return}var i=e.words[9];for(n=10,t.words[t.length++]=4194303&i;n<e.length;n++){var o=0|e.words[n];e.words[n-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&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(A,w),i(_,w),i(k,w),k.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=(0|e.words[r])*19+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){var t;if(b[e])return b[e];if("k256"===e)t=new E;else if("p224"===e)t=new A;else if("p192"===e)t=new _;else if("p25519"===e)t=new k;else throw Error("Unknown prime "+e);return b[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((e.negative|t.negative)==0,"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):(c(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 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(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),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var h=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();n(g<p);var y=this.pow(h,new o(1).iushln(p-g-1));f=f.redMul(y),h=y.redSqr(),d=d.redMul(h),p=g}return f},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=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,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var h=c>>l&1;if(i!==r[0]&&(i=this.sqr(i)),0===h&&0===s){a=0;continue}s<<=1,s|=h,(4==++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)}u=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 O(e)},i(O,S),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.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):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},O.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):0>i.cmpn(0)&&(s=i.iadd(this.m)),s._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},183:function(e,t,r){"use strict";r.r(t),r.d(t,{BaseContract:function(){return a.VZ},BigNumber:function(){return u.O$},Contract:function(){return a.CH},ContractFactory:function(){return a.lV},FixedNumber:function(){return c.xs},Signer:function(){return l.E},VoidSigner:function(){return l.b},Wallet:function(){return h.Wallet},Wordlist:function(){return eo.D},constants:function(){return n},errors:function(){return A.ErrorCode},ethers:function(){return s},getDefaultProvider:function(){return en},logger:function(){return eT},providers:function(){return i},utils:function(){return o},version:function(){return eI},wordlists:function(){return ei.E}});var n={};r.r(n),r.d(n,{AddressZero:function(){return f.d},EtherSymbol:function(){return m},HashZero:function(){return p.R},MaxInt256:function(){return d.PS},MaxUint256:function(){return d.Bz},MinInt256:function(){return d.$B},NegativeOne:function(){return d.tL},One:function(){return d.fh},Two:function(){return d.Py},WeiPerEther:function(){return d.Ce},Zero:function(){return d._Y}});var i={};
1r.r(i),r.d(i,{AlchemyProvider:function(){return b.D},AlchemyWebSocketProvider:function(){return b.V},AnkrProvider:function(){return O},BaseProvider:function(){return v.Zk},CloudflareProvider:function(){return P},EtherscanProvider:function(){return U},FallbackProvider:function(){return q.H},Formatter:function(){return w.Mb},InfuraProvider:function(){return H},InfuraWebSocketProvider:function(){return K},IpcProvider:function(){return G},JsonRpcBatchProvider:function(){return J},JsonRpcProvider:function(){return W.r},JsonRpcSigner:function(){return W.C},NodesmithProvider:function(){return Z},PocketProvider:function(){return ee},Provider:function(){return g.zt},Resolver:function(){return v.H2},StaticJsonRpcProvider:function(){return E.c},UrlJsonRpcProvider:function(){return E.l},Web3Provider:function(){return et.Q},WebSocketProvider:function(){return V.q},getDefaultProvider:function(){return en},getNetwork:function(){return y.H},isCommunityResourcable:function(){return w.Ed},isCommunityResource:function(){return w.Gp},showThrottleMessage:function(){return w.vh}});var o={};r.r(o),r.d(o,{AbiCoder:function(){return es.R},ConstructorFragment:function(){return ea.Xg},ErrorFragment:function(){return ea.IC},EventFragment:function(){return ea.QV},FormatTypes:function(){return ea.pc},Fragment:function(){return ea.HY},FunctionFragment:function(){return ea.YW},HDNode:function(){return ey.HDNode},Indexed:function(){return ec.Hk},Interface:function(){return ec.vU},LogDescription:function(){return ec.CC},Logger:function(){return A.Logger},ParamType:function(){return ea._R},RLP:function(){return ek},SigningKey:function(){return eS.SigningKey},SupportedAlgorithm:function(){return eR.p},TransactionDescription:function(){return ec.vk},TransactionTypes:function(){return I.TransactionTypes},UnicodeNormalizationForm:function(){return ex.Uj},Utf8ErrorFuncs:function(){return ex.te},Utf8ErrorReason:function(){return ex.Uw},_TypedDataEncoder:function(){return eg.E},_fetchData:function(){return T._fetchData},_toEscapedUtf8String:function(){return ex.U$},accessListify:function(){return I.accessListify},arrayify:function(){return C.arrayify},base58:function(){return ef.Base58},base64:function(){return eh},checkProperties:function(){return R.checkProperties},checkResultErrors:function(){return eu.BR},commify:function(){return eC.commify},computeAddress:function(){return I.computeAddress},computeHmac:function(){return ew.Gy},computePublicKey:function(){return eS.computePublicKey},concat:function(){return C.concat},deepCopy:function(){return R.deepCopy},defaultAbiCoder:function(){return es.$},defaultPath:function(){return ey.defaultPath},defineReadOnly:function(){return R.defineReadOnly},dnsEncode:function(){return ed.Kn},entropyToMnemonic:function(){return ey.entropyToMnemonic},fetchJson:function(){return T.fetchJson},formatBytes32String:function(){return eP.s},formatEther:function(){return eC.formatEther},formatUnits:function(){return eC.formatUnits},getAccountPath:function(){return ey.getAccountPath},getAddress:function(){return el.getAddress},getContractAddress:function(){return el.getContractAddress},getCreate2Address:function(){return el.getCreate2Address},getIcapAddress:function(){return el.getIcapAddress},getJsonWalletAddress:function(){return ev.Rb},getStatic:function(){return R.getStatic},hashMessage:function(){return ep.r},hexConcat:function(){return C.hexConcat},hexDataLength:function(){return C.hexDataLength},hexDataSlice:function(){return C.hexDataSlice},hexStripZeros:function(){return C.hexStripZeros},hexValue:function(){return C.hexValue},hexZeroPad:function(){return C.hexZeroPad},hexlify:function(){return C.hexlify},id:function(){return em.id},isAddress:function(){return el.isAddress},isBytes:function(){return C.isBytes},isBytesLike:function(){return C.isBytesLike},isHexString:function(){return C.isHexString},isValidMnemonic:function(){return ey.isValidMnemonic},isValidName:function(){return ed.r1},joinSignature:function(){return C.joinSignature},keccak256:function(){return eb.keccak256},mnemonicToEntropy:function(){return ey.mnemonicToEntropy},mnemonicToSeed:function(){return ey.mnemonicToSeed},namehash:function(){return ed.VM},nameprep:function(){return eO.Ll},parseBytes32String:function(){return eP.F}
1,parseEther:function(){return eC.parseEther},parseTransaction:function(){return I.parse},parseUnits:function(){return eC.parseUnits},poll:function(){return T.poll},randomBytes:function(){return eA.O},recoverAddress:function(){return I.recoverAddress},recoverPublicKey:function(){return eS.recoverPublicKey},resolveProperties:function(){return R.resolveProperties},ripemd160:function(){return ew.bP},serializeTransaction:function(){return I.serialize},sha256:function(){return ew.JQ},sha512:function(){return ew.o},shallowCopy:function(){return R.shallowCopy},shuffled:function(){return e_.y},solidityKeccak256:function(){return eE.keccak256},solidityPack:function(){return eE.pack},soliditySha256:function(){return eE.sha256},splitSignature:function(){return C.splitSignature},stripZeros:function(){return C.stripZeros},toUtf8Bytes:function(){return ex.Y0},toUtf8CodePoints:function(){return ex.XL},toUtf8String:function(){return ex.ZN},verifyMessage:function(){return h.verifyMessage},verifyTypedData:function(){return h.verifyTypedData},zeroPad:function(){return C.zeroPad}});var s={};r.r(s),r.d(s,{BaseContract:function(){return a.VZ},BigNumber:function(){return u.O$},Contract:function(){return a.CH},ContractFactory:function(){return a.lV},FixedNumber:function(){return c.xs},Signer:function(){return l.E},VoidSigner:function(){return l.b},Wallet:function(){return h.Wallet},Wordlist:function(){return eo.D},constants:function(){return n},errors:function(){return A.ErrorCode},getDefaultProvider:function(){return en},logger:function(){return eT},providers:function(){return i},utils:function(){return o},version:function(){return eI},wordlists:function(){return ei.E}});var a=r(64146),u=r(2593),c=r(20335),l=r(48088),h=r(79911),f=r(9279),d=r(21046),p=r(57218);let m="Ξ";var g=r(81556),y=r(45710),v=r(75361),b=r(333),w=r(30032),E=r(93901),A=r(1581),_=r(34216);let k=new A.Logger(_.i),S="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";class O extends E.l{isCommunityResource(){return this.apiKey===S}static getApiKey(e){return null==e?S:e}static getUrl(e,t){null==t&&(t=S);let r={allowGzip:!0,url:"https://"+function(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 k.throwArgumentError("unsupported network","name",e)}(e.name)+t,throttleCallback:(e,r)=>(t.apiKey===S&&(0,w.vh)(),Promise.resolve(!0))};return null!=t.projectSecret&&(r.user="",r.password=t.projectSecret),r}}let x=new A.Logger(_.i);class P extends E.l{static getApiKey(e){return null!=e&&x.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/":x.throwArgumentError("unsupported network","network",arguments[0]),r}perform(e,t){var r,n,i,o;let s=Object.create(null,{perform:{get:()=>super.perform}});return r=this,n=void 0,i=void 0,o=function*(){if("getBlockNumber"===e){let e=yield s.perform.call(this,"getBlock",{blockTag:"latest"});return e.number}return s.perform.call(this,e,t)},new(i||(i=Promise))(function(e,t){function s(e){try{u(o.next(e))}catch(e){t(e)}}function a(e){try{u(o.throw(e))}catch(e){t(e)}}function u(t){var r;t.done?e(t.value):((r=t.value)instanceof i?r:new i(function(e){e(r)})).then(s,a)}u((o=o.apply(r,n||[])).next())})}}var C=r(16441),R=r(6881),I=r(83875),T=r(37707),N=function(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})};let M=new A.Logger(_.i);function D(e){let 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,C.hexValue)((0,C.hexlify)(n)):"accessList"===r?"["+(0,I.accessListify)(n).map(e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`).join(",")+"]":(0,C.hexlify)(n),t[r]=n)}return t}
1function F(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/)){let t=Error("invalid response");throw t.result=JSON.stringify(e),(e.result||"").toLowerCase().indexOf("rate limit")>=0&&(t.throttleRetry=!0),t}return e.result}function L(e){if(e&&0==e.status&&"NOTOK"==e.message&&(e.result||"").toLowerCase().indexOf("rate limit")>=0){let t=Error("throttled response");throw t.result=JSON.stringify(e),t.throttleRetry=!0,t}if("2.0"!=e.jsonrpc){let t=Error("invalid response");throw t.result=JSON.stringify(e),t}if(e.error){let t=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 B(e){if("pending"===e)throw Error("pending not supported");return"latest"===e?e:parseInt(e.substring(2),16)}function j(e,t,r){if("call"===e&&t.code===A.Logger.errors.SERVER_ERROR){let 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,C.isHexString)(r))return r;M.throwError("missing revert data in call exception",A.Logger.errors.CALL_EXCEPTION,{error:t,data:"0x"})}}let n=t.message;throw t.code===A.Logger.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()).match(/insufficient funds/)&&M.throwError("insufficient funds for intrinsic transaction cost",A.Logger.errors.INSUFFICIENT_FUNDS,{error:t,method:e,transaction:r}),n.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&M.throwError("nonce has already been used",A.Logger.errors.NONCE_EXPIRED,{error:t,method:e,transaction:r}),n.match(/another transaction with same nonce/)&&M.throwError("replacement fee too low",A.Logger.errors.REPLACEMENT_UNDERPRICED,{error:t,method:e,transaction:r}),n.match(/execution failed due to an exception|execution reverted/)&&M.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",A.Logger.errors.UNPREDICTABLE_GAS_LIMIT,{error:t,method:e,transaction:r}),t}class U extends v.Zk{constructor(e,t){super(e),(0,R.defineReadOnly)(this,"baseUrl",this.getBaseUrl()),(0,R.defineReadOnly)(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 M.throwArgumentError("unsupported network","network",this.network.name)}getUrl(e,t){let r=Object.keys(t).reduce((e,r)=>{let 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 N(this,void 0,void 0,function*(){let n=r?this.getPostUrl():this.getUrl(e,t),i=r?this.getPostData(e,t):null;this.emit("debug",{action:"request",request:n,provider:this});let o={url:n,throttleSlotInterval:1e3,throttleCallback:(e,t)=>(this.isCommunityResource()&&(0,w.vh)(),Promise.resolve(!0))},s=null;i&&(o.headers={"content-type":"application/x-www-form-urlencoded; charset=UTF-8"},s=Object.keys(i).map(e=>`${e}=${i[e]}`).join("&"));let a=yield(0,T.fetchJson)(o,s,("proxy"===e?L:F)||L);return this.emit("debug",{action:"response",request:n,response:(0,R.deepCopy)(a),provider:this}),a})}detectNetwork(){return N(this,void 0,void 0,function*(){return this.network})}perform(e,t){let r=Object.create(null,{perform:{get:()=>super.perform}});return N(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=>j("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 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 Error("EtherscanProvider does not support blockTag for call");let e=D(t.transaction);e.module="proxy",e.action="eth_call";try{return yield this.fetch("proxy",e,!0)}catch(e){return j("call",e,t.transaction)}}case"estimateGas":{let e=D(t.transaction);e.module="proxy",e.action="eth_estimateGas";try{return yield this.fetch("proxy",e,!0)}catch(e){return j("estimateGas",e,t.transaction)}}case"getLogs":{let e={action:"getLogs"};if(t.filter.fromBlock&&(e.fromBlock=B(t.filter.fromBlock)),t.filter.toBlock&&(e.toBlock=B(t.filter.toBlock)),t.filter.address&&(e.address=t.filter.address),t.filter.topics&&t.filter.topics.length>0&&(t.filter.topics.length>1&&M.throwError("unsupported topic count",A.Logger.errors.UNSUPPORTED_OPERATION,{topics:t.filter.topics}),1===t.filter.topics.length)){let r=t.filter.topics[0];("string"!=typeof r||66!==r.length)&&M.throwError("unsupported topic format",A.Logger.errors.UNSUPPORTED_OPERATION,{topic0:r}),e.topic0=r}let r=yield this.fetch("logs",e),n={};for(let e=0;e<r.length;e++){let t=r[e];if(null==t.blockHash){if(null==n[t.blockNumber]){let e=yield this.getBlock(t.blockNumber);e&&(n[t.blockNumber]=e.hash)}t.blockHash=n[t.blockNumber]}}return r}case"getEtherPrice":if("homestead"!==this.network.name)return 0;return parseFloat((yield this.fetch("stats",{action:"ethprice"})).ethusd)}return r.perform.call(this,e,t)})}getHistory(e,t,r){return N(this,void 0,void 0,function*(){let n={action:"txlist",address:yield this.resolveName(e),startblock:null==t?0:t,endblock:null==r?99999999:r,sort:"asc"},i=yield this.fetch("account",n);return i.map(e=>{["contractAddress","to"].forEach(function(t){""==e[t]&&delete e[t]}),null==e.creates&&null!=e.contractAddress&&(e.creates=e.contractAddress);let t=this.formatter.transactionResponse(e);return e.timeStamp&&(t.timestamp=parseInt(e.timeStamp)),t})})}isCommunityResource(){return null==this.apiKey}}var q=r(51619);let G=null;var V=r(88089);let Q=new A.Logger(_.i),z="84842078b09946638c03157f83405213";class K extends V.q{constructor(e,t){let r=new H(e,t),n=r.connection;n.password&&Q.throwError("INFURA WebSocket project secrets unsupported",A.Logger.errors.UNSUPPORTED_OPERATION,{operation:"InfuraProvider.getWebSocketProvider()"});let i=n.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/");super(i,e),(0,R.defineReadOnly)(this,"apiKey",r.projectId),(0,R.defineReadOnly)(this,"projectId",r.projectId),(0,R.defineReadOnly)(this,"projectSecret",r.projectSecret)}isCommunityResource(){return this.projectId===z}}
1class H extends E.l{static getWebSocketProvider(e,t){return new K(e,t)}static getApiKey(e){let t={apiKey:z,projectId:z,projectSecret:null};return null==e||("string"==typeof e?t.projectId=e:null!=e.projectSecret?(Q.assertArgument("string"==typeof e.projectId,"projectSecret requires a projectId","projectId",e.projectId),Q.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:Q.throwError("unsupported network",A.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let n={allowGzip:!0,url:"https://"+r+"/v3/"+t.projectId,throttleCallback:(e,r)=>(t.projectId===z&&(0,w.vh)(),Promise.resolve(!0))};return null!=t.projectSecret&&(n.user="",n.password=t.projectSecret),n}isCommunityResource(){return this.projectId===z}}var W=r(82169);class J extends W.r{send(e,t){let r={method:e,params:t,id:this._nextId++,jsonrpc:"2.0"};null==this._pendingBatch&&(this._pendingBatch=[]);let 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(()=>{let e=this._pendingBatch;this._pendingBatch=null,this._pendingBatchAggregator=null;let t=e.map(e=>e.request);return this.emit("debug",{action:"requestBatch",request:(0,R.deepCopy)(t),provider:this}),(0,T.fetchJson)(this.connection,JSON.stringify(t)).then(r=>{this.emit("debug",{action:"response",request:t,response:r,provider:this}),e.forEach((e,t)=>{let n=r[t];if(n.error){let t=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}}let Y=new A.Logger(_.i);
1class Z extends E.l{static getApiKey(e){return e&&"string"!=typeof e&&Y.throwArgumentError("invalid apiKey","apiKey",e),e||"ETHERS_JS_SHARED"}static getUrl(e,t){Y.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:Y.throwArgumentError("unsupported network","network",arguments[0])}return r+"?apiKey="+t}}let $=new A.Logger(_.i),X="62e1ad51b37b8e00394bda3b";class ee extends E.l{static getApiKey(e){let t={applicationId:null,loadBalancer:!0,applicationSecretKey:null};return null==e?t.applicationId=X:"string"==typeof e?t.applicationId=e:null!=e.applicationSecretKey?(t.applicationId=e.applicationId,t.applicationSecretKey=e.applicationSecretKey):e.applicationId?t.applicationId=e.applicationId:$.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:$.throwError("unsupported network",A.Logger.errors.INVALID_ARGUMENT,{argument:"network",value:e})}let n=`https://${r}/v1/lb/${t.applicationId}`,i={headers:{},url:n};return null!=t.applicationSecretKey&&(i.user="",i.password=t.applicationSecretKey),i}isCommunityResource(){return this.applicationId===X}}var et=r(241);let er=new A.Logger(_.i);function en(e,t){if(null==e&&(e="homestead"),"string"==typeof e){let t=e.match(/^(ws|http)s?:/i);if(t)switch(t[1].toLowerCase()){case"http":case"https":return new W.r(e);case"ws":case"wss":return new V.q(e);default:er.throwArgumentError("unsupported URL scheme","network",e)}}let r=(0,y.H)(e);return r&&r._defaultProvider||er.throwError("unsupported getDefaultProvider network",A.Logger.errors.NETWORK_ERROR,{operation:"getDefaultProvider",network:e}),r._defaultProvider({FallbackProvider:q.H,AlchemyProvider:b.D,AnkrProvider:O,CloudflareProvider:P,EtherscanProvider:U,InfuraProvider:H,JsonRpcProvider:W.r,NodesmithProvider:Z,PocketProvider:ee,Web3Provider:et.Q,IpcProvider:G},t)}var ei=r(10234),eo=r(48812),es=r(84243),ea=r(11388),eu=r(61184),ec=r(8198),el=r(19485),eh=r(4089),ef=r(57727),ed=r(27586),ep=r(93684),em=r(32046),eg=r(67827),ey=r(84178),ev=r(67949),eb=r(38197),ew=r(2006),eE=r(31886),eA=r(5634),e_=r(52472),ek=r(59052),eS=r(67669),eO=r(35637),ex=r(29251),eP=r(86237),eC=r(61744),eR=r(21261);let eI="ethers/5.7.2",eT=new A.Logger(eI);try{let e=window;null==e._ethers&&(e._ethers=s)}catch(e){}},56371:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.formatBytes32String=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t._toEscapedUtf8String=t.nameprep=t.hexDataSlice=t.hexDataLength=t.hexZeroPad=t.hexValue=t.hexStripZeros=t.hexConcat=t.isHexString=t.hexlify=t.base64=t.base58=t.TransactionDescription=t.LogDescription=t.Interface=t.SigningKey=t.HDNode=t.defaultPath=t.isBytesLike=t.isBytes=t.zeroPad=t.stripZeros=t.concat=t.arrayify=t.shallowCopy=t.resolveProperties=t.getStatic=t.defineReadOnly=t.deepCopy=t.checkProperties=t.poll=t.fetchJson=t._fetchData=t.RLP=t.Logger=t.checkResultErrors=t.FormatTypes=t.ParamType=t.FunctionFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.Fragment=t.defaultAbiCoder=t.AbiCoder=void 0,t.Indexed=t.Utf8ErrorReason=t.UnicodeNormalizationForm=t.SupportedAlgorithm=t.mnemonicToSeed=t.isValidMnemonic=t.entropyToMnemonic=t.mnemonicToEntropy=t.getAccountPath=t.verifyTypedData=t.verifyMessage=t.recoverPublicKey=t.computePublicKey=t.recoverAddress=t.computeAddress=t.getJsonWalletAddress=t.TransactionTypes=t.serializeTransaction=t.parseTransaction=t.accessListify=t.joinSignature=t.splitSignature=t.soliditySha256=t.solidityKeccak256=t.solidityPack=t.shuffled=t.randomBytes=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.computeHmac=t.commify=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.isAddress=t.getCreate2Address=t.getContractAddress=t.getIcapAddress=t.getAddress=t._TypedDataEncoder=t.id=t.isValidName=t.namehash=t.hashMessage=t.dnsEncode=t.parseBytes32String=void 0;var s=r(83893);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return s.AbiCoder}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return s.ConstructorFragment}}),Object.defineProperty(t,"defaultAbiCoder",{enumerable:!0,get:function(){return s.defaultAbiCoder}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return s.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return s.EventFragment}}),Object.defineProperty(t,"FormatTypes",{enumerable:!0,get:function(){return s.FormatTypes}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return s.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return s.FunctionFragment}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return s.ParamType}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}});var a=r(19485);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return a.getAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return a.getCreate2Address}}),Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return a.getContractAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return a.getIcapAddress}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return a.isAddress}});var u=o(r(4089));t.base64=u;var c=r(57727);Object.defineProperty(t,"base58",{enumerable:!0,get:function(){return c.Base58}});var l=r(16441);Object.defineProperty(t,"arrayify",{enumerable:!0,get:function(){return l.arrayify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return l.concat}}),Object.defineProperty(t,"hexConcat",{enumerable:!0,get:function(){return l.hexConcat}}),Object.defineProperty(t,"hexDataSlice",{enumerable:!0,get:function(){return l.hexDataSlice}}),Object.defineProperty(t,"hexDataLength",{enumerable:!0,get:function(){return l.hexDataLength}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return l.hexlify}}),Object.defineProperty(t,"hexStripZeros",{enumerable:!0,get:function(){return l.hexStripZeros}}),Object.defineProperty(t,"hexValue",{enumerable:!0,get:function(){return l.hexValue}}),Object.defineProperty(t,"hexZeroPad",{enumerable:!0,get:function(){return l.hexZeroPad}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return l.isBytes}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return l.isBytesLike}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return l.isHexString}}),Object.defineProperty(t,"joinSignature",{enumerable:!0,get:function(){return l.joinSignature}}),Object.defineProperty(t,"zeroPad",{enumerable:!0,get:function(){return l.zeroPad}}),Object.defineProperty(t,"splitSignature",{enumerable:!0,get:function(){return l.splitSignature}}),Object.defineProperty(t,"stripZeros",{enumerable:!0,get:function(){return l.stripZeros}});var h=r(75931);Object.defineProperty(t,"_TypedDataEncoder",{enumerable:!0,get:function(){return h._TypedDataEncoder}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return h.dnsEncode}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return h.hashMessage}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return h.id}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return h.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return h.namehash}});var f=r(84178);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return f.defaultPath}}),Object.defineProperty(t,"entropyToMnemonic",{enumerable:!0,get:function(){return f.entro
1pyToMnemonic}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return f.getAccountPath}}),Object.defineProperty(t,"HDNode",{enumerable:!0,get:function(){return f.HDNode}}),Object.defineProperty(t,"isValidMnemonic",{enumerable:!0,get:function(){return f.isValidMnemonic}}),Object.defineProperty(t,"mnemonicToEntropy",{enumerable:!0,get:function(){return f.mnemonicToEntropy}}),Object.defineProperty(t,"mnemonicToSeed",{enumerable:!0,get:function(){return f.mnemonicToSeed}});var d=r(64341);Object.defineProperty(t,"getJsonWalletAddress",{enumerable:!0,get:function(){return d.getJsonWalletAddress}});var p=r(38197);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return p.keccak256}});var m=r(1581);Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return m.Logger}});var g=r(91278);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return g.computeHmac}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return g.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return g.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return g.sha512}});var y=r(31886);Object.defineProperty(t,"solidityKeccak256",{enumerable:!0,get:function(){return y.keccak256}}),Object.defineProperty(t,"solidityPack",{enumerable:!0,get:function(){return y.pack}}),Object.defineProperty(t,"soliditySha256",{enumerable:!0,get:function(){return y.sha256}});var v=r(22118);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return v.randomBytes}}),Object.defineProperty(t,"shuffled",{enumerable:!0,get:function(){return v.shuffled}});var b=r(6881);Object.defineProperty(t,"checkProperties",{enumerable:!0,get:function(){return b.checkProperties}}),Object.defineProperty(t,"deepCopy",{enumerable:!0,get:function(){return b.deepCopy}}),Object.defineProperty(t,"defineReadOnly",{enumerable:!0,get:function(){return b.defineReadOnly}}),Object.defineProperty(t,"getStatic",{enumerable:!0,get:function(){return b.getStatic}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return b.resolveProperties}}),Object.defineProperty(t,"shallowCopy",{enumerable:!0,get:function(){return b.shallowCopy}});var w=o(r(59052));t.RLP=w;var E=r(67669);Object.defineProperty(t,"computePublicKey",{enumerable:!0,get:function(){return E.computePublicKey}}),Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return E.recoverPublicKey}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return E.SigningKey}});var A=r(62741);Object.defineProperty(t,"formatBytes32String",{enumerable:!0,get:function(){return A.formatBytes32String}}),Object.defineProperty(t,"nameprep",{enumerable:!0,get:function(){return A.nameprep}}),Object.defineProperty(t,"parseBytes32String",{enumerable:!0,get:function(){return A.parseBytes32String}}),Object.defineProperty(t,"_toEscapedUtf8String",{enumerable:!0,get:function(){return A._toEscapedUtf8String}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return A.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return A.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return A.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return A.Utf8ErrorFuncs}});var _=r(83875);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return _.accessListify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return _.computeAddress}}),Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return _.parse}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return _.recoverAddress}}),Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return _.serialize}}),Object.defineProperty(t,"TransactionTypes",{enumerable:!0,get:function(){return _.TransactionTypes}});var k=r(61744);Object.defineProperty(t,"commify",{enumerable:!0,get:function(){return k.commify}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return k.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return k.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return k.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return k.parseUnits}});var S=r(79911);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return S.verifyMessage}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return S.verifyTypedData}
vendor: 10,035 bytes, line 1
1});var O=r(37707);Object.defineProperty(t,"_fetchData",{enumerable:!0,get:function(){return O._fetchData}}),Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return O.fetchJson}}),Object.defineProperty(t,"poll",{enumerable:!0,get:function(){return O.poll}});var x=r(91278);Object.defineProperty(t,"SupportedAlgorithm",{enumerable:!0,get:function(){return x.SupportedAlgorithm}});var P=r(62741);Object.defineProperty(t,"UnicodeNormalizationForm",{enumerable:!0,get:function(){return P.UnicodeNormalizationForm}}),Object.defineProperty(t,"Utf8ErrorReason",{enumerable:!0,get:function(){return P.Utf8ErrorReason}})},26729:function(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function i(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,n,o,s){if("function"!=typeof n)throw TypeError("The listener must be a function");var a=new i(n,o||e,s),u=r?r+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1)),a.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,o=n.length,s=Array(o);i<o;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,i,o,s){var a=r?r+e:e;if(!this._events[a])return!1;var u,c,l=this._events[a],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,i),!0;case 5:return l.fn.call(l.context,t,n,i,o),!0;case 6:return l.fn.call(l.context,t,n,i,o,s),!0}for(c=1,u=Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u)}else{var f,d=l.length;for(c=0;c<d;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,n);break;case 4:l[c].fn.call(l[c].context,t,n,i);break;default:if(!u)for(f=1,u=Array(h-1);f<h;f++)u[f-1]=arguments[f];l[c].fn.apply(l[c].context,u)}}return!0},a.prototype.on=function(e,t,r){return o(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return o(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,i){var o=r?r+e:e;if(!this._events[o])return this;if(!t)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==t||i&&!a.once||n&&a.context!==n||s(this,o);else{for(var u=0,c=[],l=a.length;u<l;u++)(a[u].fn!==t||i&&!a[u].once||n&&a[u].context!==n)&&c.push(a[u]);c.length?this._events[o]=1===c.length?c[0]:c:s(this,o)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a},33715:function(e,t,r){var n=t;n.utils=r(26436),n.common=r(95772),n.sha=r(89041),n.ripemd=r(12949),n.hmac=r(52344),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},95772:function(e,t,r){"use strict";var n=r(26436),i=r(79746);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=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(o=8,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<this.padLength;o++)n[i++]=0;return n}},52344:function(e,t,r){"use strict";var n=r(26436),i=r(79746);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(t=0,this.inner=new this.Hash().update(e);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)}},12949:function(e,t,r){"use strict";var n=r(26436),i=r(95772),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(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)}n.inherits(l,c),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],g=r,y=n,v=i,b=c,w=l,E=0;E<80;E++){var A,_,k=s(o(u(r,h(E,n,i,c),e[f[E]+t],(A=E)<=15?0:A<=31?1518500249:A<=47?1859775393:A<=63?2400959708:2840853838),p[E]),l);r=l,l=c,c=o(i,10),i=n,n=k,k=s(o(u(g,h(79-E,y,v,b),e[d[E]+t],(_=E)<=15?1352829926:_<=31?1548603684:_<=47?1836072691:_<=63?2053994217:0),m[E]),w),g=w,w=b,b=o(v,10),v=y,y=k}k=a(this.h[1],i,b),this.h[1]=a(this.h[2],c,w),this.h[2]=a(this.h[3],l,g),this.h[3]=a(this.h[4],r,y),this.h[4]=a(this.h[0],n,v),this.h[0]=k},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var f=[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],d=[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],p=[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],m=[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]},89041:function(e,t,r){"use strict";t.sha1=r(84761),t.sha224=r(10799),t.sha256=r(89344),t.sha384=r(80772),t.sha512=r(45900)},84761:function(e,t,r){"use strict";var n=r(26436),i=r(95772),o=r(37038),s=n.rotl32,a=n.sum32,u=n.sum32_5,c=o.ft_1,l=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}n.inherits(f,l),e.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.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],l=this.h[2],f=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=u(s(i,5),c(p,o,l,f),d,r[n],h[p]);d=f,f=l,l=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],l),this.h[3]=a(this.h[3],f),this.h[4]=a(this.h[4],d)},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},10799:function(e,t,r){"use strict";var n=r(26436),i=r(89344);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")}},89344:function(e,t,r){"use strict";var n=r(26436),i=r(95772),o=r(37038),s=r(79746),a=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,h=o.maj32,f=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=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,2756
vendor: 3,373 bytes, line 1
1734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=Array(64)}n.inherits(v,g),e.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.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]=u(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],g=this.h[2],y=this.h[3],v=this.h[4],b=this.h[5],w=this.h[6],E=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var A=c(E,d(v),l(v,b,w),this.k[n],r[n]),_=a(f(i),h(i,o,g));E=w,w=b,b=v,v=a(y,A),y=g,g=o,o=i,i=a(A,_)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],g),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],v),this.h[5]=a(this.h[5],b),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],E)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},80772:function(e,t,r){"use strict";var n=r(26436),i=r(45900);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")}},45900:function(e,t,r){"use strict";var n=r(26436),i=r(95772),o=r(79746),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,h=n.sum64_hi,f=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,y=i.BlockHash,v=[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,
11126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=Array(160)}n.inherits(b,y),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.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=function(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}(r[n-4],r[n-3]),o=function(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}(r[n-4],r[n-3]),l=r[n-14],h=r[n-13],f=function(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}(r[n-30],r[n-29]),m=function(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}(r[n-30],r[n-29]),g=r[n-32],y=r[n-31];r[n]=d(i,o,l,h,f,m,g,y),r[n+1]=p(i,o,l,h,f,m,g,y)}},b.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],u=this.h[2],c=this.h[3],d=this.h[4],p=this.h[5],y=this.h[6],v=this.h[7],b=this.h[8],w=this.h[9],E=this.h[10],A=this.h[11],_=this.h[12],k=this.h[13],S=this.h[14],O=this.h[15];o(this.k.length===r.length);for(var x=0;x<r.length;x+=2){var P=S,C=O,R=function(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}(b,w),I=function(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}(b,w),T=function(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}(b,0,E,0,_,k),N=function(e,t,r,n,i,o){var s=t&n^~t&o;return s<0&&(s+=4294967296),s}(0,w,0,A,0,k),M=this.k[x],D=this.k[x+1],F=r[x],L=r[x+1],B=m(P,C,R,I,T,N,M,D,F,L),j=g(P,C,R,I,T,N,M,D,F,L);P=function(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}(n,i),C=function(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}(n,i),R=function(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}(n,0,u,0,d,p),I=function(e,t,r,n,i,o){var s=t&n^t&o^n&o;return s<0&&(s+=4294967296),s}(0,i,0,c,0,p);var U=h(P,C,R,I),q=f(P,C,R,I);S=_,O=k,_=E,k=A,E=b,A=w,b=h(y,v,B,j),w=f(v,v,B,j),y=d,v=p,d=u,p=c,u=n,c=i,n=h(B,j,U,q),i=f(B,j,U,q)}l(this.h,0,n,i),l(this.h,2,u,c),l(this.h,4,d,p),l(this.h,6,y,v),l(this.h,8,b,w),l(this.h,10,E,A),l(this.h,12,_,k),l(this.h,14,S,O)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},37038:function(e,t,r){"use strict";var n=r(26436).rotr32;function i(e,t,r){return e&t^e&r^t&r}t.ft_1=function(e,t,r,n){return 0===e?t&r^~t&n:1===e||3===e?t^r^n:2===e?i(t,r,n):void 0},t.ch32=function(e,t,r){return e&t^~e&r},t.maj32=i,t.p32=function(e,t,r){return e^t^r},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}},26436:function(e,t,r){"use strict";var n=r(79746),i=r(35717);function o(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){if(7===e.length)return"0"+e;if(6===e.length)return"00"+e;if(5===e.length)return"000"+e;if(4===e.length)return"0000"+e;if(3===e.length)return"00000"+e;if(2===e.length)return"000000"+e;if(1===e.length)return"0000000"+e;else return 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]+/ig,"")).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 o,s,a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):(o=e,s=i,(64512&o.charCodeAt(s))!=55296||s<0||s+1>=o.length?1:(64512&o.charCodeAt(s+1))!=56320)?(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128):(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|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=o,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=o(i)),r+=a(i.toString(16))}return r},t.zero2=s,t.zero8=a,t.join32=function(e,t,r,i){var o,s=r-t;n(s%4==0);for(var a=Array(s/4),u=0,c=t;u<a.length;u++,c+=4)o="big"===i?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],a[u]=o>>>0;return a},t.split32=function(e,t){for(var r=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;e[t]=(o<n?1:0)+r+i>>>
10,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 u,c=t;return e+r+i+s+(0+((c=c+n>>>0)<t?1:0)+((c=c+o>>>0)<o?1:0)+((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,u,c){var l,h=t;return e+r+i+s+u+(0+((h=h+n>>>0)<t?1:0)+((h=h+o>>>0)<o?1:0)+((h=h+a>>>0)<a?1:0)+((h=h+c>>>0)<c?1:0))>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,u,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}},35717: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}}},91094:function(e,t,r){var n,i=r(83454);!function(){"use strict";var o="input is invalid type",s="object"==typeof window,a=s?window:{};a.JS_SHA3_NO_WINDOW&&(s=!1);var u=!s&&"object"==typeof self;!a.JS_SHA3_NO_NODE_JS&&"object"==typeof i&&i.versions&&i.versions.node?a=r.g:u&&(a=self);var c=!a.JS_SHA3_NO_COMMON_JS&&e.exports,l=r.amdO,h=!a.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,f="0123456789abcdef".split(""),d=[4,1024,262144,67108864],p=[0,8,16,24],m=[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],g=[224,256,384,512],y=[128,256],v=["hex","buffer","arrayBuffer","array","digest"],b={128:168,256:136};(a.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),h&&(a.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 w=function(e,t,r){return function(n){return new D(e,t,e).update(n)[r]()}},E=function(e,t,r){return function(n,i){return new D(e,t,i).update(n)[r]()}},A=function(e,t,r){return function(t,n,i,o){return x["cshake"+e].update(t,n,i,o)[r]()}},_=function(e,t,r){return function(t,n,i,o){return x["kmac"+e].update(t,n,i,o)[r]()}},k=function(e,t,r,n){for(var i=0;i<v.length;++i){var o=v[i];e[o]=t(r,n,o)}return e},S=function(e,t){var r=w(e,t,"hex");return r.create=function(){return new D(e,t,e)},r.update=function(e){return r.create().update(e)},k(r,w,e,t)},O=[{name:"keccak",padding:[1,256,65536,16777216],bits:g,createMethod:S},{name:"sha3",padding:[6,1536,393216,100663296],bits:g,createMethod:S},{name:"shake",padding:[31,7936,2031616,520093696],bits:y,createMethod:function(e,t){var r=E(e,t,"hex");return r.create=function(r){return new D(e,t,r)},r.update=function(e,t){return r.create(t).update(e)},k(r,E,e,t)}},{name:"cshake",padding:d,bits:y,createMethod:function(e,t){var r=b[e],n=A(e,t,"hex");return n.create=function(n,i,o){return i||o?new D(e,t,n).bytepad([i,o],r):x["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:y,createMethod:function(e,t){var r=b[e],n=_(e,t,"hex");return n.create=function(n,i,o){return new F(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,t)}}],x={},P=[],C=0;C<O.length;++C)for(var R=O[C],I=R.bits,T=0;T<I.length;++T){var N=R.name+"_"+I[T];if(P.push(N),x[N]=R.createMethod(I[T],R.padding),"sha3"!==R.name){var M=R.name+I[T];P.push(M),x[M]=x[N]}}function D(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 F(e,t,r){D.call(this,e,t,r)}D.prototype.update=function(e){if(this.finalized)throw Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(o);
1if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!h||!ArrayBuffer.isView(e)))throw Error(o)}else throw Error(o);t=!0}for(var n,i,s=this.blocks,a=this.byteCount,u=e.length,c=this.blockCount,l=0,f=this.s;l<u;){if(this.reset)for(n=1,this.reset=!1,s[0]=this.block;n<c+1;++n)s[n]=0;if(t)for(n=this.start;l<u&&n<a;++l)s[n>>2]|=e[l]<<p[3&n++];else for(n=this.start;l<u&&n<a;++l)(i=e.charCodeAt(l))<128?s[n>>2]|=i<<p[3&n++]:i<2048?(s[n>>2]|=(192|i>>6)<<p[3&n++],s[n>>2]|=(128|63&i)<<p[3&n++]):i<55296||i>=57344?(s[n>>2]|=(224|i>>12)<<p[3&n++],s[n>>2]|=(128|i>>6&63)<<p[3&n++],s[n>>2]|=(128|63&i)<<p[3&n++]):(i=65536+((1023&i)<<10|1023&e.charCodeAt(++l)),s[n>>2]|=(240|i>>18)<<p[3&n++],s[n>>2]|=(128|i>>12&63)<<p[3&n++],s[n>>2]|=(128|i>>6&63)<<p[3&n++],s[n>>2]|=(128|63&i)<<p[3&n++]);if(this.lastByteIndex=n,n>=a){for(this.start=n-a,this.block=s[c],n=0;n<c;++n)f[n]^=s[n];L(f),this.reset=!0}else this.start=n}return this},D.prototype.encode=function(e,t){var r=255&e,n=1,i=[r];for(e>>=8,r=255&e;r>0;)i.unshift(r),e>>=8,r=255&e,++n;return t?i.push(n):i.unshift(n),this.update(i),i.length},D.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"===r){if(null===e)throw Error(o);if(h&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!Array.isArray(e)&&(!h||!ArrayBuffer.isView(e)))throw Error(o)}else throw Error(o);t=!0}var n=0,i=e.length;if(t)n=i;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},D.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},D.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(t=1,e[0]=e[r];t<r+1;++t)e[t]=0;for(e[r-1]|=2147483648,t=0;t<r;++t)n[t]^=e[t];L(n)}},D.prototype.toString=D.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)a+=f[(e=r[o])>>4&15]+f[15&e]+f[e>>12&15]+f[e>>8&15]+f[e>>20&15]+f[e>>16&15]+f[e>>28&15]+f[e>>24&15];s%t==0&&(L(r),o=0)}return i&&(a+=f[(e=r[o])>>4&15]+f[15&e],i>1&&(a+=f[e>>12&15]+f[e>>8&15]),i>2&&(a+=f[e>>20&15]+f[e>>16&15])),a},D.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=new ArrayBuffer(i?n+1<<2:a);for(var u=new Uint32Array(e);s<n;){for(o=0;o<t&&s<n;++o,++s)u[s]=r[o];s%t==0&&L(r)}return i&&(u[o]=r[o],e=e.slice(0,a)),e},D.prototype.buffer=D.prototype.arrayBuffer,D.prototype.digest=D.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,u=[];a<i;){for(s=0;s<r&&a<i;++s,++a)e=a<<2,t=n[s],u[e]=255&t,u[e+1]=t>>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;a%r==0&&L(n)}return o&&(e=a<<2,t=n[s],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},F.prototype=new D,F.prototype.finalize=function(){return this.encode(this.outputBits,!0),D.prototype.finalize.call(this)};var L=function(e){var t,r,n,i,o,s,a,u,c,l,h,f,d,p,g,y,v,b,w,E,A,_,k,S,O,x,P,C,R,I,T,N,M,D,F,L,B,j,U,q,G,V,Q,z,K,H,W,J,Y,Z,$,X,ee,et,er,en,ei,eo,es,ea,eu,ec,el;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],u=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],l=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],f=e[8]^e[18]^e[28]^e[38]^e[48],d=e[9]^e[19]^e[29]^e[39]^e[49],t=f^(s<<1|a>>>31),r=d^(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^(u<<1|c>>>31),r=o^(c<<1|u>>>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^(l<<1|h>>>31),r=a^(h<<1|l>>>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=u^(f<<1|d>
1>>31),r=c^(d<<1|f>>>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=l^(i<<1|o>>>31),r=h^(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],g=e[1],H=e[11]<<4|e[10]>>>28,W=e[10]<<4|e[11]>>>28,C=e[20]<<3|e[21]>>>29,R=e[21]<<3|e[20]>>>29,ea=e[31]<<9|e[30]>>>23,eu=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,Q=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,F=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,J=e[22]<<10|e[23]>>>22,Y=e[23]<<10|e[22]>>>22,I=e[33]<<13|e[32]>>>19,T=e[32]<<13|e[33]>>>19,ec=e[42]<<2|e[43]>>>30,el=e[43]<<2|e[42]>>>30,et=e[5]<<30|e[4]>>>2,er=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,B=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,Z=e[34]<<15|e[35]>>>17,$=e[35]<<15|e[34]>>>17,N=e[45]<<29|e[44]>>>3,M=e[44]<<29|e[45]>>>3,S=e[6]<<28|e[7]>>>4,O=e[7]<<28|e[6]>>>4,en=e[17]<<23|e[16]>>>9,ei=e[16]<<23|e[17]>>>9,j=e[26]<<25|e[27]>>>7,U=e[27]<<25|e[26]>>>7,E=e[36]<<21|e[37]>>>11,A=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,z=e[8]<<27|e[9]>>>5,K=e[9]<<27|e[8]>>>5,x=e[18]<<20|e[19]>>>12,P=e[19]<<20|e[18]>>>12,eo=e[29]<<7|e[28]>>>25,es=e[28]<<7|e[29]>>>25,q=e[38]<<8|e[39]>>>24,G=e[39]<<8|e[38]>>>24,_=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~y&b,e[1]=g^~v&w,e[10]=S^~x&C,e[11]=O^~P&R,e[20]=D^~L&j,e[21]=F^~B&U,e[30]=z^~H&J,e[31]=K^~W&Y,e[40]=et^~en&eo,e[41]=er^~ei&es,e[2]=y^~b&E,e[3]=v^~w&A,e[12]=x^~C&I,e[13]=P^~R&T,e[22]=L^~j&q,e[23]=B^~U&G,e[32]=H^~J&Z,e[33]=W^~Y&$,e[42]=en^~eo&ea,e[43]=ei^~es&eu,e[4]=b^~E&_,e[5]=w^~A&k,e[14]=C^~I&N,e[15]=R^~T&M,e[24]=j^~q&V,e[25]=U^~G&Q,e[34]=J^~Z&X,e[35]=Y^~$&ee,e[44]=eo^~ea&ec,e[45]=es^~eu&el,e[6]=E^~_&p,e[7]=A^~k&g,e[16]=I^~N&S,e[17]=T^~M&O,e[26]=q^~V&D,e[27]=G^~Q&F,e[36]=Z^~X&z,e[37]=$^~ee&K,e[46]=ea^~ec&et,e[47]=eu^~el&er,e[8]=_^~p&y,e[9]=k^~g&v,e[18]=N^~S&x,e[19]=M^~O&P,e[28]=V^~D&L,e[29]=Q^~F&B,e[38]=X^~z&H,e[39]=ee^~K&W,e[48]=ec^~et&en,e[49]=el^~er&ei,e[0]^=m[n],e[1]^=m[n+1]};if(c)e.exports=x;else{for(C=0;C<P.length;++C)a[P[C]]=x[P[C]];l&&void 0!==(n=(function(){return x}).call(t,r,t,e))&&(e.exports=n)}}()},79746:function(e){function t(e,t){if(!e)throw Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw Error(r||"Assertion failed: "+e+" != "+t)}},83454:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(77663)},91118:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(27077)}])},27077:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return E}});var n=r(85893);r(93814);var i=r(99937),o=r(69077),s=r(93901),a=r(31407),u=r(333),c=r(65075),l=r(55598),h=r(53768),f=r(79144),d=r(67294),p=r(25078);let m=e=>{let{children:t}=e,r=new p.i,{connect:i}=(0,o.$4)(),[s,a]=(0,d.useState)(null);return(0,d.useEffect)(()=>{function e(){a(window.innerWidth)}return a(window.innerWidth),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),(0,d.useEffect)(()=>{let e=localStorage.getItem("connected");console.log("CNCTD",e),e!=f.ADDRESS_ZERO&&i({connector:r})},[]),(0,n.jsx)("div",{children:null!==s&&s<=1300?(0,n.jsx)("div",{className:"smallScreen",children:(0,n.jsx)("p",{children:"Small screen devices are not supported."})}):t})},g=new c.f({uri:"https://api.thegraph.com/subgraphs/name/franfran20/angel-protocol-tx-subgraph",cache:new l.h}),{chains:y,provider:v,webSocketProvider:b}=(0,i.QB)([a.v8],[function({apiKey:e,priority:t,stallTimeout:r,weight:n}){return function(i){return i.rpcUrls.alchemy?.http[0]?{chain:{...i,rpcUrls:{...i.rpcUrls,default:{http:[`${i.rpcUrls.alchemy?.http[0]}/${e}`]}}},provider:()=>{let o=new u.D({chainId:i.id,name:i.network,ensAddress:i.contracts?.ensRegistry?.address},e);return Object.assign(o,{priority:t,stallTimeout:r,weight:n})},webSocketProvider:()=>new u.V({chainId:i.id,name:i.network,ensAddress:i.contracts?.ensRegistry?.address},e)}:null}}({apiKey:"NNtaW2u62YMvLkvvw-nw2bqSPlVPTNnF"}),function({priority:e,stallTimeout:t,weight:r}={}){return function(n){return n.rpcUrls.default.http[0]?{chain:n,provider:()=>{let i=new s.c(n.rpcUrls.default.http[0],{chainId:n.id,name:n.network,ensAddress:n.contracts?.ensRegistry?.address});return Object.assign(i,{priority:e,stallTimeout:t,weight:r})}}:null}}()]),w=(0,o.eI)({autoConnect:!0,provider:v,webSocketProvider:b});function E(e){let{Component:t,pageProps:r}=e;return(0,n.jsx)(o.eM,{client:w,children:(0,n.jsx)(h.e,{client:g,children:(0,n.jsx)(m,{children:(0,n.jsx)(t,{...r})})})})}},79144:function(e,t,r){"use strict";let{ethers:n}
1=r(183),i={"0xfd86305830e490b188c3c5e3b02bae346f930dda":"LINK","0xd3bfa2c17e98274aa86bbea183a5b12562f689c4":"USDT","0xe3088919a826125af0daf96cf74dca3583550bb6":"ANGEL","0x9f192326c0c17b9f4e5f9a428cc958b887397f08":"DAI","0xc9a6e60b894e41574f93023f3c6dd8caf4ae4fe2":"SAND","0x0000000000000000000000000000000000000000":"MATIC"},o={"0xfd86305830e490b188c3c5e3b02bae346f930dda":"/icons/link.png","0xd3bfa2c17e98274aa86bbea183a5b12562f689c4":"/icons/usdt.png","0xe3088919a826125af0daf96cf74dca3583550bb6":"/navbar/logo.png","0x9f192326c0c17b9f4e5f9a428cc958b887397f08":"/icons/dai.png","0xc9a6e60b894e41574f93023f3c6dd8caf4ae4fe2":"/icons/sand.png","0x0000000000000000000000000000000000000000":"/icons/matic.png"},s=e=>{navigator.clipboard.writeText(e)};e.exports={ANGEL_ADDRESS:"0x68876bcabd609dBDf92573616007AC3a95e46788",addAngelSuffix:function(e){return e+".angel"},ADDRESS_ZERO:"0x0000000000000000000000000000000000000000",getAssetName:function(e){return i[e]},truncateAddr:function(e){return e.slice(0,5)+"...."+e.slice(-5)},isValidEthereumAddress:function(e){return!!/^(0x)?[0-9a-fA-F]{40}$/.test(e)},getImage:function(e){return o[e]},ASSETS:i,ASSET_IMAGES:o,ASSETS_NAME:{LINK:"0xfd86305830e490b188c3c5e3b02bae346f930dda",USDT:"0xd3bfa2c17e98274aa86bbea183a5b12562f689c4",ANGEL:"0xe3088919a826125af0daf96cf74dca3583550bb6",DAI:"0x9f192326c0c17b9f4e5f9a428cc958b887397f08",SAND:"0xc9a6e60b894e41574f93023f3c6dd8caf4ae4fe2",MATIC:"0x0000000000000000000000000000000000000000"},convertTimeStampToReadableDate:function(e){let t=new Date(1e3*e),r=t.toLocaleString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:"numeric",minute:"numeric",timeZone:"UTC",hour12:!0});return r},keccack256:function(e){if(e)return n.utils.keccak256(n.utils.toUtf8Bytes(e))},formatDuration:function(e){return e<60?e+" seconds":e<3600?Math.floor(e/60)+" minutes, "+e%60+" seconds":e<86400?Math.floor(e/3600)+" hours, "+Math.floor(e%3600/60)+" minutes":Math.floor(e/86400)+" days, "+Math.floor(e%86400/3600)+" hours"},handleCopyClick:s,CLAIM_IMAGE:"https://bafybeib3faghcn66ax5o5enqk3vfzp23senitu5vlbjh4ceus5fhmyskpe.ipfs.w3s.link/adventure%20time%204.jpg",CHANNEL_ADDRESS:"0x5F7FbE4bf8987FA77Ec6C22FD3f3d558B3b68D4e",DEFAULT_PROFILE_IMAGE:"https://bafybeifnpeom22nwbtsv52ivwqd3fzaygmjjgql5wgeximwvl4s32mvdo4.ipfs.w3s.link/petergriffin.jpg"}},93814:function(){},77663:function(e){!function(){var t={229:function(e){var t,r,n,i=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u=[],c=!1,l=-1;function h(){c&&n&&(c=!1,n.length?u=n.concat(u):l=-1,u.length&&f())}function f(){if(!c){var e=a(h);c=!0;for(var t=u.length;t;){for(n=u,u=[];++l<t;)n&&n[l].run();l=-1,t=u.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),1!==u.length||c||a(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=p,i.addListener=p,i.once=p,i.off=p,i.removeListener=p,i.removeAllListeners=p,i.emit=p,i.prependListener=p,i.prependOnceListener=p,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}},s=!0;try{t[e](o,o.exports,n),s=!1}finally{s&&delete r[e]}return o.exports}n.ab="//";var i=n(229);e.exports=i}()},60507:function(e,t,r){"use strict";r.d(t,{dP:function(){return O},re:function(){return C}});var n,i=r(657),o=r(38751);function s(){}var a=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=s),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),u=new o.g7,c=Object.prototype.hasOwnProperty,l=void 0===(n=Array.from)?function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t}:n;function h(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var f=[];function d(e,t){if(!e)throw Error(t||"assertion failure")}function p(e){switch(e.length){case 0:throw Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var m=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!v(this))return g(this),this.value[0]},e.prototype.recompute=function(e){var t;return d(!this.recomputing,"already recomputing"),g(this),v(this)&&(_(this),u.withValue(this,y,[this,e]),function(e,t){if("function"==typeof e.subscribe)try{h(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(this,e)&&(this.dirty=!1,v(this)||(t=this,b(t,E)))),p(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,b(this,w),h(this))},e.prototype.dispose=function(){var e=this;
1this.setDirty(),_(this),b(this,function(t,r){t.setDirty(),k(t,e)})},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=f.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(l(this.deps).forEach(function(t){return t.delete(e)}),this.deps.clear(),f.push(this.deps),this.deps=null)},e.count=0,e}();function g(e){var t=u.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),v(e)?w(t,e):E(t,e),t}function y(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function v(e){return e.dirty||!!(e.dirtyChildren&&e.dirtyChildren.size)}function b(e,t){var r=e.parents.size;if(r)for(var n=l(e.parents),i=0;i<r;++i)t(n[i],e)}function w(e,t){d(e.childValues.has(t)),d(v(t));var r=!v(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=f.pop()||new Set;e.dirtyChildren.add(t),r&&b(e,w)}function E(e,t){d(e.childValues.has(t)),d(!v(t));var r,n,i=e.childValues.get(t);0===i.length?e.childValues.set(t,t.value.slice(0)):(r=t.value,(n=i.length)>0&&n===r.length&&i[n-1]===r[n-1]||e.setDirty()),A(e,t),v(e)||b(e,E)}function A(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(f.length<100&&f.push(r),e.dirtyChildren=null))}function _(e){e.childValues.size>0&&e.childValues.forEach(function(t,r){k(e,r)}),e.forgetDeps(),d(null===e.dirtyChildren)}function k(e,t){t.parents.delete(e),e.childValues.delete(t),A(e,t)}var S={setDirty:!0,dispose:!0,forget:!0};function O(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=u.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(h(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){var n=t.get(e);if(n){var i=r&&c.call(S,r)?r:"setDirty";l(n).forEach(function(e){return e[i]()}),t.delete(e),h(n)}},n}function x(){var e=new i.B("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}x();var P=new Set;function C(e,t){void 0===t&&(t=Object.create(null));var r=new a(t.max||65536,function(e){return e.dispose()}),n=t.keyArgs,i=t.makeCacheKey||x(),o=function(){var o=i.apply(null,n?n.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var s=r.get(o);s||(r.set(o,s=new m(e)),s.subscribe=t.subscribe,s.forget=function(){return r.delete(o)});var a=s.recompute(Array.prototype.slice.call(arguments));return r.set(o,s),P.add(r),u.hasValue()||(P.forEach(function(e){return e.clean()}),P.clear()),a};function s(e){var t=r.get(e);t&&t.setDirty()}function c(e){var t=r.get(e);if(t)return t.peek()}function l(e){return r.delete(e)}return Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=s,o.dirty=function(){s(i.apply(null,arguments))},o.peekKey=c,o.peek=function(){return c(i.apply(null,arguments))},o.forgetKey=l,o.forget=function(){return l(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}},17635:function(e){"use strict";!function(t){function r(e){let 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]),r=1779033703,n=3144134277,i=1013904242,o=2773480762,s=1359893119,a=2600822924,u=528734635,c=1541459225,l=new Uint32Array(64);function h(e){let h=0,f=e.length;for(;f>=64;){let d=r,p=n,m=i,g=o,y=s,v=a,b=u,w=c,E,A,_,k,S;for(A=0;A<16;A++)_=h+4*A,l[A]=(255&e[_])<<24|(255&e[_+1])<<16|(255&e[_+2])<<8|255&e[_+3];for(A=16;A<64;A++)k=((E=l[A-2])>>>17|E<<15)^(E>>>19|E<<13)^E>>>10,S=((E=l[A-15])>>>7|E<<25)^(E>>>18|E<<14)^E>>>3,l[A]=(k+l[A-7]|0)+(S+l[A-16]|0)|0;for(A=0;A<64;A++)k=(((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+(y&v^~y&b)|0)+(w+(t[A]+l[A]|0)|0)|0,S=((d>>>2|d<<30)^(d>>>13|d<<19)^(d>>>22|d<<10))+(d&p^d&m^p&m)|0,w=b,b=v,v=y,y=g+k|0,g=m,m=p,p=d,d=k+S|0;r=r+d|0,n=n+p|0,i=i+m|0,o=o+g|0,s=s+y|0,a=a+v|0,u=u+b|0,c=c+w|0,h+=64,f-=64}}h(e);let f,d=e.length%64,p=e.length/536870912|0,m=e.length<<3,g=d<56?56:120,y=e.slice(e.length-d,e.length);for(y.push(128),f=d+1;f<g;f++)y.push(0);return y.push(p>>>24&255),y.push(p>>>16&255),y.push(p>>>8&255),y.push(p>>>0&255),y.push(m>>>24&255),y.push(m>>>16&255),y.push(m>>>8&255),y.push(m>>>0&255),h(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,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,c>>>24&255,c>>>16&255,c>>>8&255,c>>>0&255]}function n(e,t,n){let i;e=e.length<=64?e:r(e);let o=64+t.length+4,s=Array(o),a=Array(64),u=[];for(i=0;i<64;i++)s[i]=54;
1for(i=0;i<e.length;i++)s[i]^=e[i];for(i=0;i<t.length;i++)s[64+i]=t[i];for(i=o-4;i<o;i++)s[i]=0;for(i=0;i<64;i++)a[i]=92;for(i=0;i<e.length;i++)a[i]^=e[i];function c(){for(let e=o-1;e>=o-4;e--){if(s[e]++,s[e]<=255)return;s[e]=0}}for(;n>=32;)c(),u=u.concat(r(a.concat(r(s)))),n-=32;return n>0&&(c(),u=u.concat(r(a.concat(r(s))).slice(0,n))),u}function i(e,t,r,n,i){let u;for(a(e,(2*r-1)*16,i,0,16),u=0;u<2*r;u++)s(e,16*u,i,16),function(e,t){a(e,0,t,0,16);for(let e=8;e>0;e-=2)t[4]^=o(t[0]+t[12],7),t[8]^=o(t[4]+t[0],9),t[12]^=o(t[8]+t[4],13),t[0]^=o(t[12]+t[8],18),t[9]^=o(t[5]+t[1],7),t[13]^=o(t[9]+t[5],9),t[1]^=o(t[13]+t[9],13),t[5]^=o(t[1]+t[13],18),t[14]^=o(t[10]+t[6],7),t[2]^=o(t[14]+t[10],9),t[6]^=o(t[2]+t[14],13),t[10]^=o(t[6]+t[2],18),t[3]^=o(t[15]+t[11],7),t[7]^=o(t[3]+t[15],9),t[11]^=o(t[7]+t[3],13),t[15]^=o(t[11]+t[7],18),t[1]^=o(t[0]+t[3],7),t[2]^=o(t[1]+t[0],9),t[3]^=o(t[2]+t[1],13),t[0]^=o(t[3]+t[2],18),t[6]^=o(t[5]+t[4],7),t[7]^=o(t[6]+t[5],9),t[4]^=o(t[7]+t[6],13),t[5]^=o(t[4]+t[7],18),t[11]^=o(t[10]+t[9],7),t[8]^=o(t[11]+t[10],9),t[9]^=o(t[8]+t[11],13),t[10]^=o(t[9]+t[8],18),t[12]^=o(t[15]+t[14],7),t[13]^=o(t[12]+t[15],9),t[14]^=o(t[13]+t[12],13),t[15]^=o(t[14]+t[13],18);for(let r=0;r<16;++r)e[r]+=t[r]}(i,n),a(i,0,e,t+16*u,16);for(u=0;u<r;u++)a(e,t+32*u,e,16*u,16);for(u=0;u<r;u++)a(e,t+(2*u+1)*16,e,(u+r)*16,16)}function o(e,t){return e<<t|e>>>32-t}function s(e,t,r,n){for(let i=0;i<n;i++)r[i]^=e[t+i]}function a(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++){let r=e[t];if("number"!=typeof r||r%1||r<0||r>=256)return!1}return!0}function c(e,t){if("number"!=typeof e||e%1)throw Error("invalid "+t);return e}function l(e,t,r,o,l,h,f){let d;if(r=c(r,"N"),o=c(o,"r"),l=c(l,"p"),h=c(h,"dkLen"),0===r||(r&r-1)!=0)throw Error("N must be power of 2");if(r>2147483647/128/o)throw Error("N too large");if(o>2147483647/128/l)throw Error("r too large");if(!u(e))throw Error("password must be an array or buffer");if(e=Array.prototype.slice.call(e),!u(t))throw Error("salt must be an array or buffer");let p=n(e,t=Array.prototype.slice.call(t),128*l*o),m=new Uint32Array(32*l*o);for(let e=0;e<m.length;e++){let t=4*e;m[e]=(255&p[t+3])<<24|(255&p[t+2])<<16|(255&p[t+1])<<8|(255&p[t+0])<<0}let g=new Uint32Array(64*o),y=new Uint32Array(32*o*r),v=32*o,b=new Uint32Array(16),w=new Uint32Array(16),E=l*r*2,A=0,_=null,k=!1,S=0,O=0,x,P=f?parseInt(1e3/o):4294967295,C="undefined"!=typeof setImmediate?setImmediate:setTimeout,R=function(){let t;if(k)return f(Error("cancelled"),A/E);switch(S){case 0:a(m,d=32*O*o,g,0,v),S=1,x=0;case 1:(t=r-x)>P&&(t=P);for(let e=0;e<t;e++)a(g,0,y,(x+e)*v,v),i(g,v,o,b,w);if(x+=t,A+=t,f){let e=parseInt(1e3*A/E);if(e!==_){if(k=f(null,A/E))break;_=e}}if(x<r)break;x=0,S=2;case 2:(t=r-x)>P&&(t=P);for(let e=0;e<t;e++){let e=(2*o-1)*16,t=g[e]&r-1;s(y,t*v,g,v),i(g,v,o,b,w)}if(x+=t,A+=t,f){let e=parseInt(1e3*A/E);if(e!==_){if(k=f(null,A/E))break;_=e}}if(x<r)break;if(a(g,0,m,d,v),++O<l){S=0;break}p=[];for(let e=0;e<m.length;e++)p.push(m[e]>>0&255),p.push(m[e]>>8&255),p.push(m[e]>>16&255),p.push(m[e]>>24&255);let u=n(e,p,h);return f&&f(null,1,u),u}f&&C(R)};if(!f)for(;;){let e=R();if(void 0!=e)return e}R()}e.exports={scrypt:function(e,t,r,n,i,o,s){return new Promise(function(a,u){let c=0;s&&s(0),l(e,t,r,n,i,o,function(e,t,r){if(e)u(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(l(e,t,r,n,i,o))}}}(0)},70655:function(e,t,r){"use strict";r.r(t),r.d(t,{__assign:function(){return o},__asyncDelegator:function(){return S},__asyncGenerator:function(){return k},__asyncValues:function(){return O},__await:function(){return _},__awaiter:function(){return p},__classPrivateFieldGet:function(){return I},__classPrivateFieldIn:function(){return N},__classPrivateFieldSet:function(){return T},__createBinding:function(){return g},__decorate:function(){return a},__esDecorate:function(){return c},__exportStar:function(){return y},__extends:function(){return i},__generator:function(){return m},__importDefault:function(){return R},__importStar:function(){return C}
vendor: 4,542 bytes, line 1
1,__makeTemplateObject:function(){return x},__metadata:function(){return d},__param:function(){return u},__propKey:function(){return h},__read:function(){return b},__rest:function(){return s},__runInitializers:function(){return l},__setFunctionName:function(){return f},__spread:function(){return w},__spreadArray:function(){return A},__spreadArrays:function(){return E},__values:function(){return v}});var 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])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw 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)}var o=function(){return(o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var a,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,h=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var p={};for(var m in n)p[m]="access"===m?{}:n[m];for(var m in n.access)p.access[m]=n.access[m];p.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var g=(0,r[d])("accessor"===u?{get:h.get,set:h.set}:h[c],p);if("accessor"===u){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw TypeError("Object expected");(a=s(g.get))&&(h.get=a),(a=s(g.set))&&(h.set=a),(a=s(g.init))&&i.push(a)}else(a=s(g))&&("field"===u?i.push(a):h[c]=a)}l&&Object.defineProperty(l,n.name,h),f=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function h(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))(function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}u((n=n.apply(e,t||[])).next())})}function m(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(u){return function(a){if(r)throw 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,u])}}}var g=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);
1(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function y(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||g(t,e,r)}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function E(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),i=0,t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function A(e,t,r){if(r||2==arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function k(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||a(e,t)})})}function a(e,t){try{var r;(r=i[e](t)).value instanceof _?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:_(e[n](t)),done:!1}:i?i(t):t}:i}}function O(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=v(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,i,(t=e[r](t)).done,t.value)})}}}function x(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var P=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&g(t,e,r);return P(t,e),t}function R(e){return e&&e.__esModule?e:{default:e}}function I(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function T(e,t,r,n,i){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!i)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},53250:function(e,t,r){"use strict";/**
2 * @license React
3 * use-sync-external-store-shim.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var n=r(67294),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,s=n.useEffect,a=n.useLayoutEffect,u=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return a(function(){i.value=r,i.getSnapshot=t,c(i)&&l({inst:i})},[e,r,t]),s(function(){return c(i)&&l({inst:i}),e(function(){c(i)&&l({inst:i})})},[e]),u(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},50139:function(e,t,r){"use strict";/**
10 * @license React
11 * use-sync-external-store-shim/with-selector.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var n=r(67294),i=r(61688),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,a=n.useRef,u=n.useEffect,c=n.useMemo,l=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var h=a(null);if(null===h.current){var f={hasValue:!1,value:null};h.current=f}else f=h.current;h=c(function(){function e(e){if(!u){if(u=!0,s=e,e=n(e),void 0!==i&&f.hasValue){var t=f.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var r=n(e);return void 0!==i&&i(t,r)?t:(s=e,a=r)}
17var s,a,u=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,n,i]);var d=s(e,h[0],h[1]);return u(function(){f.hasValue=!0,f.value=d},[d]),l(d),d}},61688:function(e,t,r){"use strict";e.exports=r(53250)},52798:function(e,t,r){"use strict";e.exports=r(50139)},46601:function(){},11294:function(e,t,r){"use strict";r.d(t,{R:function(){return s}});var n=r(70655),i=r(60507),o=r(23361),s=function(){function e(){this.getFragmentDoc=(0,i.re)(o.Yk)}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction(function(){return t=e.update(r)},n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n.__rest)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,s=(0,n.__rest)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(s,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return null==o?i:(r.writeQuery((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return null==o?i:(r.writeFragment((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e}()},75727:function(e,t,r){"use strict";r.d(t,{y:function(){return i}});var n=r(70655),i=function(e){function t(r,n,i,o){var s,a=e.call(this,r)||this;if(a.message=r,a.path=n,a.query=i,a.variables=o,Array.isArray(a.path)){a.missing=a.message;for(var u=a.path.length-1;u>=0;--u)a.missing=((s={})[a.path[u]]=a.missing,s)}else a.missing=a.path;return a.__proto__=t.prototype,a}return(0,n.__extends)(t,e),t}(Error)},49641:function(e,t,r){"use strict";r.d(t,{$O:function(){return v},E_:function(){return b},Is:function(){return A},RC:function(){return function e(t,r,n){return!!(0,o.s)(r)&&((0,s.k)(r)?r.every(function(r){return e(t,r,n)}):t.selections.every(function(t){if((0,i.My)(t)&&(0,a.LZ)(t,n)){var o=(0,i.u2)(t);return h.call(r,o)&&(!t.selectionSet||e(t.selectionSet,r[o],n))}return!0}))}},RI:function(){return h},ig:function(){return E},j:function(){return w},jS:function(){return m},jp:function(){return y},lg:function(){return g},uG:function(){return d}});var n=r(53712),i=r(51761),o=r(13154),s=r(21436),a=r(19065),u=r(182),c=r(23361),l=r(36765),h=Object.prototype.hasOwnProperty;function f(e){return null==e}function d(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=f(n)?f(i)?void 0:{_id:i}:{id:n}),f(n)&&!f(i)&&(n=i),!f(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var p={dataIdFromObject:d,addTypename:!0,resultCaching:!0,canonizeResults:!1};function m(e){return(0,n.o)(p,e)}function g(e){var t=e.canonizeResults;return void 0===t?p.canonizeResults:t}function y(e,t){return(0,i.Yk)(t)?e.get(t.__ref,"__typename"):t&&t.__typename}var v=/^[_a-z][_0-9a-z]*/i;function b(e){var t=e.match(v);return t?t[0]:e}function w(e){return(0,o.s)(e)&&!(0,i.Yk)(e)&&!(0,s.k)(e)}function E(){return new u.w0}function A(e,t){var r=(0,c.F)((0,l.kU)(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}},55598:function(e,t,r){"use strict";r.d(t,{h:function(){return el}});var n,i,o=r(70655),s=r(48964),a=r(60507),u=r(82152),c=r(11294),l=r(75727),h=r(51761),f=r(76487),d=r(97359),p=r(30320),m=r(53712),g=r(36765),y=r(182),v=r(19065),b=r(23361),w=r(10542),E=r(13154),A=r(657),_=r(49641),k=Object.create(null),S=function(){return k}
17,O=Object.create(null),x=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return(0,w.J)((0,h.Yk)(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return(0,h.Yk)(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return(0,h.kQ)(e);if((0,h.Yk)(e))return e;var n=r.policies.identify(e)[0];if(n){var i=(0,h.kQ)(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,o.__assign)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),_.RI.call(this.data,e)){var r=this.data[e];if(r&&_.RI.call(r,t))return r[t]}return"__typename"===t&&_.RI.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof R?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return(t&&this.group.depend(e,"__exists"),_.RI.call(this.data,e))?this.data[e]:this instanceof R?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;(0,h.Yk)(e)&&(e=e.__ref),(0,h.Yk)(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(r=e):e,o="string"==typeof t?this.lookup(r=t):t;if(o){__DEV__?(0,s.kG)("string"==typeof r,"store.merge expects a string ID"):(0,s.kG)("string"==typeof r,1);var a=new y.w0(T).merge(i,o);if(this.data[r]=a,a!==i&&(delete this.refs[r],this.group.caching)){var u=Object.create(null);i||(u.__exists=1),Object.keys(o).forEach(function(e){if(!i||i[e]!==a[e]){u[e]=1;var t=(0,_.E_)(e);t===e||n.policies.hasKeyArgs(a.__typename,t)||(u[t]=1),void 0!==a[e]||n instanceof R||delete a[e]}}),u.__typename&&!(i&&i.__typename)&&this.policies.rootTypenamesById[r]===a.__typename&&delete u.__typename,Object.keys(u).forEach(function(e){return n.group.dirty(r,e)})}}},e.prototype.modify=function(e,t){var r=this,n=this.lookup(e);if(n){var i=Object.create(null),s=!1,a=!0,u={DELETE:k,INVALIDATE:O,isReference:h.Yk,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||(0,h.kQ)(e)}:t,{store:r})}};if(Object.keys(n).forEach(function(c){var l=(0,_.E_)(c),h=n[c];if(void 0!==h){var f="function"==typeof t?t:t[c]||t[l];if(f){var d=f===S?k:f((0,w.J)(h),(0,o.__assign)((0,o.__assign)({},u),{fieldName:l,storeFieldName:c,storage:r.getStorage(e,c)}));d===O?r.group.dirty(e,c):(d===k&&(d=void 0),d!==h&&(i[c]=d,s=!0,h=d))}void 0!==h&&(a=!1)}}),s)return this.merge(e,i),a&&(this instanceof R?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),s=t&&r?this.policies.getStoreFieldName({typename:o,fieldName:t,args:r}):t;return this.modify(e,s?((n={})[s]=S,n):S)}return!1},e.prototype.evict=function(e,t){var r=!1;return e.id&&(_.RI.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof R&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach(function(t){_.RI.call(e.policies.rootTypenamesById,t)||r.push(t)}),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(r){e&&_.RI.call(e,r)||t.delete(r)}),e){var r=e.__META,n=(0,o.__rest)(e,["__META"]);Object.keys(n).forEach(function(e){t.merge(e,n[e])}),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof R?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEac
17h(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach(function(n){_.RI.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])});var n=Object.keys(r);if(n.length){for(var i=this;i instanceof R;)i=i.parent;n.forEach(function(e){return i.delete(e)})}return n},e.prototype.findChildRefIds=function(e){if(!_.RI.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach(function(e){(0,h.Yk)(e)&&(t[e.__ref]=!0),(0,E.s)(e)&&Object.keys(e).forEach(function(t){var r=e[t];(0,E.s)(r)&&n.add(r)})})}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),P=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?(0,a.dP)():null,this.keyMaker=new A.B(p.mr)},e.prototype.depend=function(e,t){if(this.d){this.d(t+"#"+e);var r=(0,_.E_)(t);r!==t&&this.d(r+"#"+e),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(t+"#"+e,"__exists"===t?"forget":"setDirty")},e}();function C(e,t){N(e)&&e.group.depend(t,"__exists")}i=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=t.seed,o=e.call(this,r,new P(void 0===n||n))||this;return o.stump=new I(o),o.storageTrie=new A.B(p.mr),i&&o.replace(i),o}return(0,o.__extends)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(n=x||(x={})),n.Root=i;var R=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,o.__extends)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach(function(r){(0,u.D)(n[r],i[r])||t.group.dirty(e,r)}
17):(t.group.dirty(e,"__exists"),Object.keys(i).forEach(function(r){t.group.dirty(e,r)})):t.delete(e)}),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,o.__assign)((0,o.__assign)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return _.RI.call(this.data,t)?(0,o.__assign)((0,o.__assign)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(x),I=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,function(){},new P(t.group.caching,t.group))||this}return(0,o.__extends)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(R);function T(e,t,r){var n=e[r],i=t[r];return(0,u.D)(n,i)?n:i}function N(e){return!!(e instanceof x&&e.group.caching)}var M=r(21436),D=r(80900);function F(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var L=function(){function e(e){var t=this;this.knownResults=new(p.mr?WeakMap:Map),this.config=(0,m.o)(e,{addTypename:!1!==e.addTypename,canonizeResults:(0,_.lg)(e)}),this.canon=e.canon||new D.h,this.executeSelectionSet=(0,a.re)(function(e){var r,n=e.context.canonizeResults,i=F(e);i[3]=!n;var s=(r=t.executeSelectionSet).peek.apply(r,i);return s?n?(0,o.__assign)((0,o.__assign)({},s),{result:t.canon.admit(s.result)}):s:(C(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))},{max:this.config.resultCacheMaxSize,keyArgs:F,makeCacheKey:function(e,t,r,n){if(N(r.store))return r.store.makeCacheKey(e,(0,h.Yk)(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=(0,a.re)(function(e){return C(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(N(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new D.h},e.prototype.diffQueryAgainstStore=function(e){var t,r=e.store,n=e.query,i=e.rootId,s=e.variables,a=e.returnPartialData,u=e.canonizeResults,c=void 0===u?this.config.canonizeResults:u,f=this.config.cache.policies;s=(0,o.__assign)((0,o.__assign)({},(0,g.O4)((0,g.iW)(n))),s);var d=(0,h.kQ)(void 0===i?"ROOT_QUERY":i),p=this.executeSelectionSet({selectionSet:(0,g.p$)(n).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,o.__assign)({store:r,query:n,policies:f,variables:s,varString:(0,D.B)(s),canonizeResults:c},(0,_.Is)(n,this.config.fragments))});if(p.missing&&(t=[new l.y(function(e){try{JSON.stringify(e,function(e,t){if("string"==typeof t)throw t;return t})}catch(e){return e}}(p.missing),p.missing,n,s)],!(void 0===a||a)))throw t[0];return{result:p.result,complete:!t,missing:t}},e.prototype.isFresh=function(e,t,r,n){if(N(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t,r=this,n=e.selectionSet,i=e.objectOrReference,o=e.enclosingRef,a=e.context;if((0,h.Yk)(i)&&!a.policies.rootTypenamesById[i.__ref]&&!a.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var u=a.variables,c=a.policies,l=a.store.getFieldValue(i,"__typename"),p=[],m=new y.w0;function g(e,r){var n;return e.missing&&(t=m.merge(t,((n={})[r]=e.missing,n))),e.result}this.config.addTypename&&"string"==typeof l&&!c.rootIdsByTypename[l]&&p.push({__typename:l});var E=new Set(n.selections);E.forEach(function(e){var n,y;if((0,v.LZ)(e,u)){if((0,h.My)(e)){var w=c.readField({fieldName:e.name.value,field:e,variables:a.variables,from:i},a),A=(0,h.u2)(e);void 0===w?f.Gw.added(e)||(t=m.merge(t,((n={})[A]="Can't find field '".concat(e.name.value,"' on ").concat((0,h.Yk)(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),n))):(0,M.k)(w)?w=g(r.executeSubSelectedArray({field:e,array:w,enclosingRef:o,context:a}),A):e.selectionSet?null!=w&&(w=g(r.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:w,enclosingRef:(0,h.Yk)(w)?w:o,context:a}),A)):a.canonizeResults&&(w=r.canon.pass(w)),void 0!==w&&p.push(((y={})[A]=w,y))}else{var _=(0,b.hi)(e,a.lookupFragment);if(!_&&e.kind===d.h.FRAGMENT_SPREAD)throw __DEV__?new s.ej("No fragment named ".concat(e.name.value)):new s.ej(5);_&&c.fragmentMatches(_,l)&&_.selectionSet.selections.forEach(E.add,E)}}});var A={result:(0,y.bw)(p),missing:t},_=a.canonizeResults?this.canon.admit(A):(0,w.J)(A);return _.result&&this.knownResults.set(_.result,n),_},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,a=e.context,u=new y.w0;function c(e,r){var n;return e.missing&&(t=u.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map(function(e,t){return null===e?null:(0,M.k)(e)?c(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:a}),t):n.selectionSet?c(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:(0,h.Yk)(e)?e:o,context:a}),t):(__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);
17n.forEach(function(r){(0,E.s)(r)&&(__DEV__?(0,s.kG)(!(0,h.Yk)(r),"Missing selection set for object of type ".concat((0,_.jp)(e,r)," returned for query field ").concat(t.name.value)):(0,s.kG)(!(0,h.Yk)(r),6),Object.values(r).forEach(n.add,n))})}}(a.store,n,e),e)}),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}(),B=r(79487),j=r(60897),U=r(66438),q=Object.create(null);function G(e){var t=JSON.stringify(e);return q[t]||(q[t]=Object.create(null))}function V(e){var t=G(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},i=r.keyObject=z(e,function(e){var i=H(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&_.RI.call(t,e[0])&&(i=H(t,e,K)),__DEV__?(0,s.kG)(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):(0,s.kG)(void 0!==i,2),i});return"".concat(r.typename,":").concat(JSON.stringify(i))})}function Q(e){var t=G(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,s=JSON.stringify(z(e,function(e){var r=e[0],o=r.charAt(0);if("@"===o){if(n&&(0,M.O)(n.directives)){var s=r.slice(1),a=n.directives.find(function(e){return e.name.value===s}),u=a&&(0,h.NC)(a,i);return u&&H(u,e.slice(1))}return}if("$"===o){var c=r.slice(1);if(i&&_.RI.call(i,c)){var l=e.slice(0);return l[0]=c,H(i,l)}return}if(t)return H(t,e)}));return(t||"{}"!==s)&&(o+=":"+s),o})}function z(e,t){var r=new y.w0;return(function e(t){var r=G(t);if(!r.paths){var n=r.paths=[],i=[];t.forEach(function(r,o){(0,M.k)(r)?(e(r).forEach(function(e){return n.push(i.concat(e))}),i.length=0):(i.push(r),(0,M.k)(t[o+1])||(n.push(i.slice(0)),i.length=0))})}return r.paths})(e).reduce(function(e,n){var i,o=t(n);if(void 0!==o){for(var s=n.length-1;s>=0;--s)(i={})[n[s]]=o,o=i;e=r.merge(e,o)}return e},Object.create(null))}function K(e,t){return e[t]}function H(e,t,r){return r=r||K,function e(t){return(0,E.s)(t)?(0,M.k)(t)?t.map(e):z(Object.keys(t).sort(),function(e){return H(t,e)}):t}(t.reduce(function e(t,n){return(0,M.k)(t)?t.map(function(t){return e(t,n)}):t&&r(t,n)},e))}function W(e){return void 0!==e.args?e.args:e.field?(0,h.NC)(e.field,e.variables):null}h.PT.setStringify(D.B);var J=function(){},Y=function(e,t){return t.fieldName},Z=function(e,t,r){return(0,r.mergeObjects)(e,t)},$=function(e,t){return t},X=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,o.__assign)({dataIdFromObject:_.uG},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,n,i=this,s=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(s===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a=t&&t.storeObject||e,u=(0,o.__assign)((0,o.__assign)({},t),{typename:s,storeObject:a,readField:t&&t.readField||function(){var e=et(arguments,a);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),c=s&&this.getTypePolicy(s),l=c&&c.keyFn||this.config.dataIdFromObject;l;){var h=l(e,u);if((0,M.k)(h))l=V(h);else{n=h;break}}return n=n?String(n):void 0,u.keyObject?[n,u.keyObject]:[n]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(r){var n=e[r],i=n.queryType,s=n.mutationType,a=n.subscriptionType,u=(0,o.__rest)(n,["queryType","mutationType","subscriptionType"]);i&&t.setRootTypename("Query",r),s&&t.setRootTypename("Mutation",r),a&&t.setRootTypename("Subscription",r),_.RI.call(t.toBeAdded,r)?t.toBeAdded[r].push(u):t.toBeAdded[r]=[u]})},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function s(e,t){e.merge="function"==typeof t?t:!0===t?Z:!1===t?$:e.merge}s(n,t.merge),n.keyFn=!1===i?J:(0,M.k)(i)?V(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEac
17h(function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var a=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===a?Y:(0,M.k)(a)?Q(a):"function"==typeof a?a:n.keyFn,"function"==typeof u&&(n.read=u),s(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||Y)})},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&(__DEV__?(0,s.kG)(!n||n===e,"Cannot change root ".concat(e," __typename more than once")):(0,s.kG)(!n||n===e,3),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(r){t.getSupertypeSet(r,!0),e[r].forEach(function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match(_.$O);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))})})},e.prototype.getTypePolicy=function(e){var t=this;if(!_.RI.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var n=this.supertypeMap.get(e);n&&n.size&&n.forEach(function(e){var n=t.getTypePolicy(e),i=n.fields;Object.assign(r,(0,o.__rest)(n,["fields"])),Object.assign(r.fields,i)})}var i=this.toBeAdded[e];return i&&i.length&&i.splice(0).forEach(function(r){t.updateTypePolicy(e,r)}),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),u=[a],c=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&0>u.indexOf(t)&&u.push(t)},l=!!(r&&this.fuzzySubtypes.size),h=!1,f=0;f<u.length;++f){var d=u[f];if(d.has(o))return a.has(o)||(h&&__DEV__&&s.kG.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),a.add(o)),!0;d.forEach(c),l&&f===u.length-1&&(0,_.RC)(e.selectionSet,r,n)&&(l=!1,h=!0,this.fuzzySubtypes.forEach(function(e,r){var n=t.match(e);n&&n[0]===t&&c(r)}))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!!(r&&r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),o=i&&i.keyFn;if(o&&r)for(var s={typename:r,fieldName:n,field:e.field||null,variables:e.variables},a=W(e);o;){var u=o(a,s);if((0,M.k)(u))o=Q(u);else{t=u||n;break}}return(void 0===t&&(t=e.field?(0,h.vf)(e.field,e.variables):(0,h.PT)(n,W(e))),!1===t)?n:n===(0,_.E_)(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),o=(0,_.E_)(i),s=t.store.getFieldValue(r,i),a=this.getFieldPolicy(e.typename,o,!1),u=a&&a.read;if(u){var c=ee(this,r,e,t,t.store.getStorage((0,h.Yk)(r)?r.__ref:r,i));return U.ab.withValue(this.cache,u,[s,c])}return s}},e.prototype.getReadFunction=function(e,t){var r=this.getFieldPolicy(e,t,!1);return r&&r.read},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var o=r.field,s=r.typename,a=r.merge;return a===Z?er(n.store)(e,t):a===$?t:(n.overwrite&&(e=void 0),a(e,t,ee(this,void 0,{typename:s,fieldName:o.name.value,field:o,variables:n.variables},n,i||Object.create(null))))},e}();function ee(e,t,r,n,i){var o=e.getStoreFieldName(r),s=(0,_.E_)(o),a=r.variables||n.variables,u=n.store,c=u.toReference,l=u.canRead;return{args:W(r),field:r.field||null,fieldName:s,storeFieldName:o,variables:a,isReference:h.Yk,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(et(arguments,t,a),n)},mergeObjects:er(n.store)}}function et(e,t,r){var n,i,a,u=e[0],c=e[1],l=e.length;return"string"==typeof u?a={fieldName:u,from:l>1?c:t}:(a=(0,o.__assign)({},u),_.RI.call(a,"from")||(a.from=t)),__DEV__&&void 0===a.from&&__DEV__&&s.kG.warn("Undefined 'from' passed to readField with arguments ".concat((n=Array.from(e),i=(0,j.X)("stringifyForDisplay"),JSON.stringify(n,function(e,t){return void 0===t?i:t}).split(JSON.stringify(i)).join("<undefined>")))),void 0===a.variables&&(a.variables=r),a}
17function er(e){return function(t,r){if((0,M.k)(t)||(0,M.k)(r))throw __DEV__?new s.ej("Cannot automatically merge arrays"):new s.ej(4);if((0,E.s)(t)&&(0,E.s)(r)){var n=e.getFieldValue(t,"__typename"),i=e.getFieldValue(r,"__typename");if(n&&i&&n!==i)return r;if((0,h.Yk)(t)&&(0,_.j)(r))return e.merge(t.__ref,r),t;if((0,_.j)(t)&&(0,h.Yk)(r))return e.merge(t,r.__ref),r;if((0,_.j)(t)&&(0,_.j)(r))return(0,o.__assign)((0,o.__assign)({},t),r)}return r}}function en(e,t,r){var n="".concat(t).concat(r),i=e.flavors.get(n);return i||e.flavors.set(n,i=e.clientOnly===t&&e.deferred===r?e:(0,o.__assign)((0,o.__assign)({},e),{clientOnly:t,deferred:r})),i}var ei=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,n=t.query,i=t.result,a=t.dataId,c=t.variables,l=t.overwrite,f=(0,g.$H)(n),d=(0,_.ig)();c=(0,o.__assign)((0,o.__assign)({},(0,g.O4)(f)),c);var p=(0,o.__assign)((0,o.__assign)({store:e,written:Object.create(null),merge:function(e,t){return d.merge(e,t)},variables:c,varString:(0,D.B)(c)},(0,_.Is)(n,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),m=this.processSelectionSet({result:i||Object.create(null),dataId:a,selectionSet:f.selectionSet,mergeTree:{map:new Map},context:p});if(!(0,h.Yk)(m))throw __DEV__?new s.ej("Could not identify object ".concat(JSON.stringify(i))):new s.ej(7);return p.incomingById.forEach(function(t,n){var i=t.storeObject,o=t.mergeTree,a=t.fieldNodeSet,c=(0,h.kQ)(n);if(o&&o.map.size){var l=r.applyMerges(o,c,i,p);if((0,h.Yk)(l))return;i=l}
17if(__DEV__&&!p.overwrite){var f=Object.create(null);a.forEach(function(e){e.selectionSet&&(f[e.name.value]=!0)});var d=function(e){var t=o&&o.map.get(e);return!!(t&&t.info&&t.info.merge)};Object.keys(i).forEach(function(e){!0!==f[(0,_.E_)(e)]||d(e)||function(e,t,r,n){var i=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(!(!a||(0,h.Yk)(o)||(0,u.D)(o,a)||Object.keys(o).every(function(e){return void 0!==n.getFieldValue(a,e)}))){var c=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),l=(0,_.E_)(r),f="".concat(c,".").concat(l);if(!ec.has(f)){ec.add(f);var d=[];(0,M.k)(o)||(0,M.k)(a)||[o,a].forEach(function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||d.includes(t)||d.push(t)}),__DEV__&&s.kG.warn("Cache data may be lost when replacing the ".concat(l," field of a ").concat(c," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(d.length?"either ensure all objects of type "+d.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(f," field, so InMemoryCache can safely merge these objects:\n\n  existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n  incoming: ").concat(JSON.stringify(a).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n  * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n  * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(c,i,e,p.store)})}e.merge(n,i)}),e.retain(m.__ref),m},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,n=e.result,i=e.selectionSet,a=e.context,u=e.mergeTree,c=this.cache.policies,l=Object.create(null),d=r&&c.rootTypenamesById[r]||(0,h.qw)(n,i,a.fragmentMap)||r&&a.store.get(r,"__typename");"string"==typeof d&&(l.__typename=d);var p=function(){var e=et(arguments,l,a.variables);if((0,h.Yk)(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var r=c.readField((0,o.__assign)((0,o.__assign)({},e),{from:t.storeObject}),a);if(void 0!==r)return r}}return c.readField(e,a)},m=new Set;this.flattenFields(i,n,a,d).forEach(function(e,r){var i,o=n[(0,h.u2)(r)];if(m.add(r),void 0!==o){var a=c.getStoreFieldName({typename:d,fieldName:r.name.value,field:r,variables:e.variables}),g=es(u,a),y=t.processFieldValue(o,r,r.selectionSet?en(e,!1,!1):e,g),v=void 0;r.selectionSet&&((0,h.Yk)(y)||(0,_.j)(y))&&(v=p("__typename",y));var b=c.getMergeFunction(d,r.name.value,v);b?g.info={field:r,typename:d,merge:b}:eu(u,a),l=e.merge(l,((i={})[a]=y,i))}else __DEV__&&!e.clientOnly&&!e.deferred&&!f.Gw.added(r)&&!c.getReadFunction(d,r.name.value)&&__DEV__&&s.kG.error("Missing field '".concat((0,h.u2)(r),"' while writing result ").concat(JSON.stringify(n,null,2)).substring(0,1e3))});try{var g=c.identify(n,{typename:d,selectionSet:i,fragmentMap:a.fragmentMap,storeObject:l,readField:p}),y=g[0],v=g[1];r=r||y,v&&(l=a.merge(l,v))}catch(e){if(!r)throw e}if("string"==typeof r){var b=(0,h.kQ)(r),w=a.written[r]||(a.written[r]=[]);if(w.indexOf(i)>=0||(w.push(i),this.reader&&this.reader.isFresh(n,b,i,a)))return b;var E=a.incomingById.get(r);return E?(E.storeObject=a.merge(E.storeObject,l),E.mergeTree=function e(t,r){if(t===r||!r||ea(r))return t;if(!t||ea(t))return r;var n=t.info&&r.info?(0,o.__assign)((0,o.__assign)({},t.info),r.info):t.info||r.info,i=t.map.size&&r.map.size,s={info:n,map:i?new Map:t.map.size?t.map:r.map};if(i){var a=new Set(r.map.keys());t.map.forEach(function(t,n){s.map.set(n,e(t,r.map.get(n))),a.delete(n)}),a.forEach(function(n){s.map.set(n,e(r.map.get(n),t.map.get(n)))})}return s}(E.mergeTree,u),m.forEach(function(e){return E.fieldNodeSet.add(e)})):a.incomingById.set(r,{storeObject:l,mergeTree:ea(u)?void 0:u,fieldNodeSet:m}),b}return l},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?(0,M.k)(e)?e.map(function(e,o){var s=i.processFieldValue(e,t,r,es(n,o));return eu(n,o),s}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):__DEV__?(0,B.X)(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=(0,h.qw)(t,e,r.fragmentMap));var i=new Map,o=this.cache.policies,a=new A.B(!1);return function e(u,c){var l=a.lookup(u,c.clientOnly,c.deferred);
17l.visited||(l.visited=!0,u.selections.forEach(function(a){if((0,v.LZ)(a,r.variables)){var u=c.clientOnly,l=c.deferred;if(!(u&&l)&&(0,M.O)(a.directives)&&a.directives.forEach(function(e){var t=e.name.value;if("client"===t&&(u=!0),"defer"===t){var n=(0,h.NC)(e,r.variables);n&&!1===n.if||(l=!0)}}),(0,h.My)(a)){var f=i.get(a);f&&(u=u&&f.clientOnly,l=l&&f.deferred),i.set(a,en(r,u,l))}else{var p=(0,b.hi)(a,r.lookupFragment);if(!p&&a.kind===d.h.FRAGMENT_SPREAD)throw __DEV__?new s.ej("No fragment named ".concat(a.name.value)):new s.ej(8);p&&o.fragmentMatches(p,n,t,r.variables)&&e(p.selectionSet,en(r,u,l))}}}))}(e,r),i},e.prototype.applyMerges=function(e,t,r,n,i){var a=this;if(e.map.size&&!(0,h.Yk)(r)){var u,c,l=!(0,M.k)(r)&&((0,h.Yk)(t)||(0,_.j)(t))?t:void 0,f=r;l&&!i&&(i=[(0,h.Yk)(l)?l.__ref:l]);var d=function(e,t){return(0,M.k)(e)?"number"==typeof t?e[t]:void 0:n.store.getFieldValue(e,String(t))};e.map.forEach(function(e,t){var r=d(l,t),o=d(f,t);if(void 0!==o){i&&i.push(t);var u=a.applyMerges(e,r,o,n,i);u!==o&&(c=c||new Map).set(t,u),i&&(0,s.kG)(i.pop()===t)}}),c&&(r=(0,M.k)(f)?f.slice(0):(0,o.__assign)({},f),c.forEach(function(e,t){r[t]=e}))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,n,i&&(u=n.store).getStorage.apply(u,i)):r},e}(),eo=[];function es(e,t){var r=e.map;return r.has(t)||r.set(t,eo.pop()||{map:new Map}),r.get(t)}function ea(e){return!e||!(e.info||e.map.size)}function eu(e,t){var r=e.map,n=r.get(t);n&&ea(n)&&(eo.push(n),r.delete(t))}var ec=new Set,el=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=U.QS,r.txCount=0,r.config=(0,_.jS)(t),r.addTypename=!!r.config.addTypename,r.policies=new X({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,o.__extends)(t,e),t.prototype.init=function(){var e=this.data=new x.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new ei(this,this.storeReader=new L({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:(0,_.lg)(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=(0,a.re)(function(e,r){return t.broadcastWatch(e,r)},{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(N(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,(0,D.B)({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(e){return e.resetCaching()})},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData;try{return this.storeReader.diffQueryAgainstStore((0,o.__assign)((0,o.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:void 0!==t&&t})).result||null}catch(e){if(e instanceof l.y)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(_.RI.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,o.__assign)((0,o.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t=this;return this.watches.size||(0,U._v)(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){t.watches.delete(e)&&!t.watches.size&&(0,U.li)(t),t.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){D.B.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if((0,h.Yk)(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&s.kG.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(_.RI.call(e,"id"))return!1;e=(0,o.__assign)((0,o.__assign)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),D.B.reset(),e&&e.discardWatches?(this.watches.forEac
17h(function(e){return t.maybeBroadcastWatch.forget(e)}),this.watches.clear(),(0,U.li)(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,n=e.update,i=e.optimistic,s=void 0===i||i,a=e.removeOptimistic,u=e.onWatchUpdated,c=function(e){var i=r.data,o=r.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=n(r)}finally{--r.txCount,r.data=i,r.optimisticData=o}},l=new Set;return u&&!this.txCount&&this.broadcastWatches((0,o.__assign)((0,o.__assign)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof s?this.optimisticData=this.optimisticData.addLayer(s,c):!1===s?c(this.data):c(),"string"==typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),u&&l.size?(this.broadcastWatches((0,o.__assign)((0,o.__assign)({},e),{onWatchUpdated:function(e,t){var r=u.call(this,e,t);return!1!==r&&l.delete(e),r}})),l.size&&l.forEach(function(e){return r.maybeBroadcastWatch.dirty(e)})):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=(0,f.Gw)(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach(function(r){return t.maybeBroadcastWatch(r,e)})},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);(!t||(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),!t.onWatchUpdated||!1!==t.onWatchUpdated.call(this,e,n,r)))&&(r&&(0,u.D)(r.result,n.result)||e.callback(e.lastDiff=n,r))},t}(c.R)},80900:function(e,t,r){"use strict";r.d(t,{B:function(){return h},h:function(){return l}});var n,i,o=r(70655);r(48964);var s=r(657),a=r(13154),u=r(30320),c=r(21436),l=function(){function e(){this.known=new(u.sy?WeakSet:Set),this.pool=new s.B(u.mr),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return(0,a.s)(e)&&this.known.has(e)},e.prototype.pass=function(e){if((0,a.s)(e)){var t=(0,a.s)(e)?(0,c.k)(e)?e.slice(0):(0,o.__assign)({__proto__:Object.getPrototypeOf(e)},e):e;return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if((0,a.s)(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))break;var n=e.map(this.admit,this),i=this.pool.lookupArray(n);return!i.array&&(this.known.add(i.array=n),__DEV__&&Object.freeze(n)),i.array;case null:case Object.prototype:if(this.known.has(e))break;var o=Object.getPrototypeOf(e),s=[o],u=this.sortedKeys(e);s.push(u.json);var c=s.length;u.sorted.forEach(function(r){s.push(t.admit(e[r]))});var i=this.pool.lookupArray(s);if(!i.object){var l=i.object=Object.create(o);this.known.add(l),u.sorted.forEach(function(e,t){l[e]=s[c+t]}),__DEV__&&Object.freeze(l)}return i.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}(),h=Object.assign(function(e){if((0,a.s)(e)){void 0===n&&f();var t=n.admit(e),r=i.get(t);return void 0===r&&i.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)},{reset:f});function f(){n=new l,i=new(u.mr?WeakMap:Map)}},66438:function(e,t,r){"use strict";r.d(t,{QS:function(){return c},_v:function(){return u},ab:function(){return i},li:function(){return a}});var n=r(60507),i=new(r(38751)).g7,o=new WeakMap;function s(e){var t=o.get(e);return t||o.set(e,t={vars:new Set,dep:(0,n.dP)()}),t}function a(e){s(e).vars.forEach(function(t){return t.forgetCache(e)})}function u(e){s(e).vars.forEach(function(t){return t.attachCache(e)})}
17function c(e){var t=new Set,r=new Set,n=function(a){if(arguments.length>0){if(e!==a){e=a,t.forEach(function(e){s(e).dep.dirty(n),e.broadcastWatches&&e.broadcastWatches()});var u=Array.from(r);r.clear(),u.forEach(function(t){return t(e)})}}else{var c=i.getValue();c&&(o(c),s(c).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var o=n.attachCache=function(e){return t.add(e),s(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}},65075:function(e,t,r){"use strict";r.d(t,{f:function(){return K}});var n=r(70655),i=r(48964),o=r(48702),s=r(47037),a=r(72198),u=r(82152),c=r(37280),l=r(80900),h=r(30320),f=r(48216);function d(e,t,r){return new f.y(function(n){var i=n.next,o=n.error,s=n.complete,a=0,u=!1,c={then:function(e){return new Promise(function(t){return t(e())})}};function l(e,t){return e?function(t){++a;var r=function(){return e(t)};c=c.then(r,r).then(function(e){--a,i&&i.call(n,e),u&&h.complete()},function(e){throw--a,e}).catch(function(e){o&&o.call(n,e)})}:function(e){return t&&t.call(n,e)}}var h={next:l(t,i),error:l(r,o),complete:function(){u=!0,!a&&s&&s.call(n)}},f=e.subscribe(h);return function(){return f.unsubscribe()}})}var p=r(21436);function m(e){var t=g(e);return(0,p.O)(t)}function g(e){var t=(0,p.O)(e.errors)?e.errors.slice(0):[];return(0,c.GG)(e)&&(0,p.O)(e.incremental)&&e.incremental.forEach(function(e){e.errors&&t.push.apply(t,e.errors)}),t}var y=r(36765),v=r(76487),b=r(19065),w=r(51761),E=r(13154),A=r(60897),_=r(18263),k=r(86403);function S(e){return e&&"function"==typeof e.then}var O=function(e){function t(t){var r=e.call(this,function(e){return r.addObserver(e),function(){return r.removeObserver(e)}})||this;return r.observers=new Set,r.promise=new Promise(function(e,t){r.resolve=e,r.reject=t}),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),(0,_.p)(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout(function(){return t.unsubscribe()}),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),(0,_.p)(r.observers,"error",e))},complete:function(){var e=r.sub,t=r.sources;if(null!==e){var n=(void 0===t?[]:t).shift();n?S(n)?n.then(function(e){return r.sub=e.subscribe(r.handlers)}):r.sub=n.subscribe(r.handlers):(e&&setTimeout(function(){return e.unsubscribe()}),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),(0,_.p)(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch(function(e){}),"function"==typeof t&&(t=[new f.y(t)]),S(t)?t.then(function(e){return r.start(e)},r.handlers.error):r.start(t),r}return(0,n.__extends)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach(function(r){return r(e,t)}))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add(function(r,n){t||(t=!0,e(r,n))})},t}(f.y);(0,k.D)(O);var x=r(30990),P=r(44780),C=r(1644),R=r(77304),I=r(97359);function T(e){return e.kind===I.h.FIELD||e.kind===I.h.FRAGMENT_SPREAD||e.kind===I.h.INLINE_FRAGMENT}var N=r(182),M=r(23361),D=r(66438),F=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(e){t.resolvers=(0,N.Ee)(t.resolvers,e)}):this.resolvers=(0,N.Ee)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,i=e.context,o=e.variables,s=e.onlyRunForcedResolvers,a=void 0!==s&&s;return(0,n.__awaiter)(this,void 0,void 0,function(){return(0,n.__generator)(this,function(e){return t?[2,this.resolveDocument(t,r.data,i,o,this.fragmentMatcher,a).then(function(e){return(0,n.__assign)((0,n.__assign)({},r),{data:e.result})})]:[2,r]})})},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return(0,b.FS)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return(0,v.ob)(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.__awaiter)(this,void 0,void 0,function(){return(0,n.__generator)(this,function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then(function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)})]:[2,(0,n.__assign)({},t)]})})},e.prototype.shouldForceResolvers=function(e){var t=!1;return(0,R.Vn)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some(function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value})))return R.$_}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:(0,v.aL)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,i,o,s){return void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===s&&(s=!1),(0,n.__awaiter)(this,void 0,void 0,function(){var a,u,c,l,h,f,d,p,m,g;return(0,n.__generator)(this,function(v){return a=(0,y.p$)(e),u=(0,y.kU)(e),c=(0,M.F)(u),l=this.collectSelectionsToResolve(a,c),f=(h=a.operation)?h.charAt(0).toUpperCase()+h.slice(1):"Query",d=this,p=d.cache,m=d.client,g={fragmentMap:c,context:(0,n.__assign)((0,n.__assign)({},r),{cache:p,client:m}),variables:i,fragmentMatcher:o,defaultOperationType:f,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(a.selectionSet,!1,t,g).then(function(e){return{result:e,exportedVariables:g.exportedVariables}})]})})},e.prototype.resolveSelectionSet=function(e,t,r,o){return(0,n.__awaiter)(this,void 0,void 0,function(){var s,a,u,c,l,h=this;return(0,n.__generator)(this,function(f){return s=o.fragmentMap,a=o.context,u=o.variables,c=[r],l=function(e){return(0,n.__awaiter)(h,void 0,void 0,function(){var l,h;return(0,n.__generator)(this,function(n){return(t||o.selectionsToResolve.has(e))&&(0,b.LZ)(e,u)?(0,w.My)(e)?[2,this.resolveField(e,t,r,o).then(function(t){var r;void 0!==t&&c.push(((r={}
17)[(0,w.u2)(e)]=t,r))})]:((0,w.Ao)(e)?l=e:(l=s[e.name.value],__DEV__?(0,i.kG)(l,"No fragment named ".concat(e.name.value)):(0,i.kG)(l,11)),l&&l.typeCondition&&(h=l.typeCondition.name.value,o.fragmentMatcher(r,h,a)))?[2,this.resolveSelectionSet(l.selectionSet,t,r,o).then(function(e){c.push(e)})]:[2]:[2]})})},[2,Promise.all(e.selections.map(l)).then(function(){return(0,N.bw)(c)})]})})},e.prototype.resolveField=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,function(){var o,s,a,u,c,l,h,f,d,p=this;return(0,n.__generator)(this,function(n){return r?(o=i.variables,u=(s=e.name.value)!==(a=(0,w.u2)(e)),l=Promise.resolve(c=r[a]||r[s]),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(h=r.__typename||i.defaultOperationType,(f=this.resolvers&&this.resolvers[h])&&(d=f[u?s:a])&&(l=Promise.resolve(D.ab.withValue(this.cache,d,[r,(0,w.NC)(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}])))),[2,l.then(function(r){if(void 0===r&&(r=c),e.directives&&e.directives.forEach(function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach(function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(i.exportedVariables[e.value.value]=r)})}),!e.selectionSet||null==r)return r;var n,o,s=null!==(o=null===(n=e.directives)||void 0===n?void 0:n.some(function(e){return"client"===e.name.value}))&&void 0!==o&&o;return Array.isArray(r)?p.resolveSubSelectedArray(e,t||s,r,i):e.selectionSet?p.resolveSelectionSet(e.selectionSet,t||s,r,i):void 0})]):[2,null]})})},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map(function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0}))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(o){if(!n.has(o)){var s=new Set;n.set(o,s),(0,R.Vn)(o,{Directive:function(e,t,n,i,o){"client"===e.name.value&&o.forEach(function(e){r(e)&&T(e)&&s.add(e)})},FragmentSpread:function(n,o,a,u,c){var l=t[n.name.value];__DEV__?(0,i.kG)(l,"No fragment named ".concat(n.name.value)):(0,i.kG)(l,12);var h=e(l);h.size>0&&(c.forEach(function(e){r(e)&&T(e)&&s.add(e)}),s.add(n),h.forEach(function(e){s.add(e)}))}})}return n.get(o)}(e)},e}(),L=new(h.mr?WeakMap:Map);function B(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return L.set(e,(L.get(e)+1)%1e15),r.apply(this,arguments)})}function j(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var U=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;L.has(r)||(L.set(r,0),B(r,"evict"),B(r,"modify"),B(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||C.I.loading;return this.variables&&this.networkStatus!==C.I.loading&&!(0,u.D)(this.variables,e.variables)&&(t=C.I.setVariables),(0,u.D)(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){j(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&(0,u.D)(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var r=this.observableQuery;if(r&&"no-cache"===r.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,r=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||(0,u.D)(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():(0,P.vj)(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;
17j(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if((0,C.O)(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach(function(e){return e.unsubscribe()});var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var i=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&(0,u.D)(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===L.get(this.cache)&&(0,u.D)(t,r.variables)&&(0,u.D)(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new N.w0,s=(0,p.O)(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&(0,p.O)(e.incremental)){var a=(0,c.mT)(this.getDiff().result,e);e.data=a}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=o.merge(u.result,e.data)}this.graphQLErrors=s,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(q(e,r.errorPolicy)?this.cache.performTransaction(function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:L.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete){e.data=i.lastDiff.diff.result;return}var s=i.getDiffOptions(r.variables),a=o.diff(s);i.stopped||i.updateWatch(r.variables),i.updateLastDiff(a,s),a.complete&&(e.data=a.result)}):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=C.I.ready},e.prototype.markError=function(e){return this.networkStatus=C.I.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function q(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!m(e);return!n&&r&&e.data&&(n=!0),n}var G=Object.prototype.hasOwnProperty,V=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.queryDeduplication,o=e.onBroadcast,s=e.ssrMode,a=e.clientAwareness,u=e.localState,c=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(h.mr?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=void 0!==i&&i,this.clientAwareness=void 0===a?{}:a,this.localState=u||new F({cache:t}),this.ssrMode=void 0!==s&&s,this.assumeImmutableResults=!!c,(this.onBroadcast=o)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach(function(t,r){e.stopQueryNoBroadcast(r)}),this.cancelPendingFetches(__DEV__?new i.ej("QueryManager stopped while query was in flight"):new i.ej(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,o=e.mutation,s=e.variables,a=e.optimisticResponse,u=e.updateQueries,c=e.refetchQueries,l=void 0===c?[]:c,h=e.awaitRefetchQueries,f=void 0!==h&&h,p=e.update,y=e.onQueryUpdated,v=e.fetchPolicy,b=void 0===v?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":v,w=e.errorPolicy,E=void 0===w?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":w,A=e.keepRootFields,_=e.context;return(0,n.__awaiter)(this,void 0,void 0,function(){var e,t,r,c,h,v;return(0,n.__generator)(this,function(w){switch(w.label){case 0:if(__DEV__?(0,i.kG)(o,"mutation option is required. You must specify your GraphQL document in the mutation option."):(0,i.kG)(o,15),__DEV__?(0,i.kG)("network-only"===b||"no-cache"===b,"Mutations supp
17ort only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):(0,i.kG)("network-only"===b||"no-cache"===b,16),e=this.generateMutationId(),r=(t=this.transform(o)).document,c=t.hasClientExports,o=this.cache.transformForLink(r),s=this.getVariables(o,s),!c)return[3,2];return[4,this.localState.addExportedVariables(o,s,_)];case 1:s=w.sent(),w.label=2;case 2:return h=this.mutationStore&&(this.mutationStore[e]={mutation:o,variables:s,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:e,document:o,variables:s,fetchPolicy:b,errorPolicy:E,context:_,updateQueries:u,update:p,keepRootFields:A}),this.broadcastQueries(),v=this,[2,new Promise(function(t,r){return d(v.getObservableFromLink(o,(0,n.__assign)((0,n.__assign)({},_),{optimisticResponse:a}),s,!1),function(t){if(m(t)&&"none"===E)throw new x.cA({graphQLErrors:g(t)});h&&(h.loading=!1,h.error=null);var r=(0,n.__assign)({},t);return"function"==typeof l&&(l=l(r)),"ignore"===E&&m(r)&&delete r.errors,v.markMutationResult({mutationId:e,result:r,document:o,variables:s,fetchPolicy:b,errorPolicy:E,context:_,update:p,updateQueries:u,awaitRefetchQueries:f,refetchQueries:l,removeOptimistic:a?e:void 0,onQueryUpdated:y,keepRootFields:A})}).subscribe({next:function(e){v.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){h&&(h.loading=!1,h.error=t),a&&v.cache.removeOptimistic(e),v.broadcastQueries(),r(t instanceof x.cA?t:new x.cA({networkError:t}))}})})]}})})},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var i=e.result,o=[],s="no-cache"===e.fetchPolicy;if(!s&&q(i,e.errorPolicy)){if((0,c.GG)(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),(0,c.GG)(i)&&(0,p.O)(i.incremental)){var a=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),u=void 0;a.result&&(u=(0,c.mT)(a.result,i)),void 0!==u&&(i.data=u,o.push({result:u,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var l=e.updateQueries;l&&this.queries.forEach(function(e,n){var s=e.observableQuery,a=s&&s.queryName;if(a&&G.call(l,a)){var u=l[a],c=r.queries.get(n),h=c.document,f=c.variables,d=t.diff({query:h,variables:f,returnPartialData:!0,optimistic:!1}),p=d.result;if(d.complete&&p){var m=u(p,{mutationResult:i,queryName:h&&(0,y.rY)(h)||void 0,queryVariables:f});m&&o.push({result:m,dataId:"ROOT_QUERY",query:h,variables:f})}}})}if(o.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var h=[];if(this.refetchQueries({updateCache:function(t){s||o.forEach(function(e){return t.write(e)});var a=e.update,u=!(0,c.M0)(i)||(0,c.GG)(i)&&!i.hasNext;if(a){if(!s){var l=t.diff({id:"ROOT_MUTATION",query:r.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});l.complete&&("incremental"in(i=(0,n.__assign)((0,n.__assign)({},i),{data:l.result}))&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}u&&a(t,i,{context:e.context,variables:e.variables})}s||e.keepRootFields||!u||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(e){return h.push(e)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(h).then(function(){return i})}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var r=this,o="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction(function(e){try{r.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:o}}),e)}catch(e){__DEV__&&i.kG.error(e)}},t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),i=(0,v.Fo)(r),o=this.localState.clientQuery(r),s=i&&this.localState.serverQuery(i),a={document:r,hasClientExports:(0,b.mj)(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:s,defaultVars:(0,y.O4)((0,y.$H)(r)),asQuery:(0,n.__assign)((0,n.__assign)({},r),{definitions:r.definitions.map(function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e})})},u=function(e){e&&!t.has(e)&&t.set(e,a)};
17u(e),u(r),u(o),u(s)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new U(this),r=new P.ue({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:r.query,observableQuery:r,variables:r.variables}),r},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?(0,i.kG)(e.query,"query option is required. You must specify your GraphQL document in the query option."):(0,i.kG)(e.query,17),__DEV__?(0,i.kG)("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):(0,i.kG)("Document"===e.query.kind,18),__DEV__?(0,i.kG)(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):(0,i.kG)(!e.returnPartialData,19),__DEV__?(0,i.kG)(!e.pollInterval,"pollInterval option only supported on watchQuery."):(0,i.kG)(!e.pollInterval,20),this.fetchQuery(t,e).finally(function(){return r.stopQuery(t)})},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new i.ej("Store reset while query was in flight (not completed in link chain)"):new i.ej(21)),this.queries.forEach(function(e){e.observableQuery?e.networkStatus=C.I.loading:e.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,o=new Map,s=new Set;return Array.isArray(e)&&e.forEach(function(e){"string"==typeof e?o.set(e,!1):(0,w.JW)(e)?o.set(t.transform(e).document,!1):(0,E.s)(e)&&e.query&&s.add(e)}),this.queries.forEach(function(t,n){var i=t.observableQuery,s=t.document;if(i){if("all"===e){r.set(n,i);return}var a=i.queryName;if("standby"===i.options.fetchPolicy||"active"===e&&!i.hasObservers())return;("active"===e||a&&o.has(a)||s&&o.has(s))&&(r.set(n,i),a&&o.set(a,!0),s&&o.set(s,!0))}}),s.size&&s.forEach(function(e){var o=(0,A.X)("legacyOneTimeQuery"),s=t.getQuery(o).init({document:e.query,variables:e.variables}),a=new P.ue({queryManager:t,queryInfo:s,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});(0,i.kG)(a.queryId===o),s.setObservableQuery(a),r.set(o,a)}),__DEV__&&o.size&&o.forEach(function(e,t){!e&&__DEV__&&i.kG.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))}),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach(function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)}),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=e.variables,s=e.context,a=void 0===s?{}:s;r=this.transform(r).document,o=this.getVariables(r,o);var u=function(e){return t.getObservableFromLink(r,a,e).map(function(o){"no-cache"!==n&&(q(o,i)&&t.cache.write({query:r,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries());var s=m(o),a=(0,x.ls)(o);if(s||a){var u={};throw s&&(u.graphQLErrors=o.errors),a&&(u.protocolErrors=o.extensions[x.YG]),new x.cA(u)}return o})};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,o,a).then(u);return new f.y(function(e){var t=null;return c.then(function(r){return t=r.subscribe(e)},e.error),function(){return t&&t.unsubscribe()}})}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEac
17h(function(e){return e.notify()})},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i){var o,a,u=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var c=this.transform(e).serverQuery;if(c){var h=this.inFlightLinkObservables,p=this.link,m={query:c,variables:r,operationName:(0,y.rY)(c)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!i}))};if(t=m.context,i){var g=h.get(c)||new Map;h.set(c,g);var v=(0,l.B)(r);if(!(a=g.get(v))){var b=new O([(0,s.h)(p,m)]);g.set(v,a=b),b.beforeNext(function(){g.delete(v)&&g.size<1&&h.delete(c)})}}else a=new O([(0,s.h)(p,m)])}else a=new O([f.y.of({data:{}})]),t=this.prepareContext(t);var w=this.transform(e).clientQuery;return w&&(a=d(a,function(e){return u.localState.runResolvers({document:w,remoteResult:e,context:t,variables:r})})),a},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return d(this.getObservableFromLink(i,r.context,r.variables),function(o){var s=g(o),a=s.length>0;if(n>=e.lastRequestId){if(a&&"none"===r.errorPolicy)throw e.markError(new x.cA({graphQLErrors:s}));e.markResult(o,i,r,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:C.I.ready};return a&&"ignore"!==r.errorPolicy&&(u.errors=s,u.networkStatus=C.I.error),u},function(t){var r=(0,x.MS)(t)?t:new x.cA({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r})},e.prototype.fetchQueryObservable=function(e,t,r){return this.fetchConcastWithInfo(e,t,r).concast},e.prototype.fetchConcastWithInfo=function(e,t,r){var n,i,o=this;void 0===r&&(r=C.I.loading);var s=this.transform(t.query).document,a=this.getVariables(s,t.variables),u=this.getQuery(e),c=this.defaultOptions.watchQuery,l=t.fetchPolicy,h=void 0===l?c&&c.fetchPolicy||"cache-first":l,f=t.errorPolicy,d=void 0===f?c&&c.errorPolicy||"none":f,p=t.returnPartialData,m=t.notifyOnNetworkStatusChange,g=t.context,y=Object.assign({},t,{query:s,variables:a,fetchPolicy:h,errorPolicy:d,returnPartialData:void 0!==p&&p,notifyOnNetworkStatusChange:void 0!==m&&m,context:void 0===g?{}:g}),v=function(e){y.variables=e;var n=o.fetchQueryByPolicy(u,y,r);return"standby"!==y.fetchPolicy&&n.sources.length>0&&u.observableQuery&&u.observableQuery.applyNextFetchPolicy("after-fetch",t),n},b=function(){return o.fetchCancelFns.delete(e)};if(this.fetchCancelFns.set(e,function(e){b(),setTimeout(function(){return n.cancel(e)})}),this.transform(y.query).hasClientExports)n=new O(this.localState.addExportedVariables(y.query,y.variables,y.context).then(v).then(function(e){return e.sources})),i=!0;else{var w=v(y.variables);i=w.fromLink,n=new O(w.sources)}return n.promise.then(b,b),{concast:n,fromLink:i}},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,s=e.removeOptimistic,a=void 0===s?o?(0,A.X)("refetchQueries"):void 0:s,u=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach(function(e,r){c.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})});var l=new Map;return r&&this.cache.batch({update:r,optimistic:o&&a||!1,removeOptimistic:a,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof U&&e.watcher.observableQuery;if(n){if(u){c.delete(n.queryId);var i=u(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&l.set(n,i),i}null!==u&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach(function(e,r){var n,i=e.oq,o=e.lastDiff,s=e.diff;if(u){if(!s){var a=i.queryInfo;a.reset(),s=a.getDiff()}n=u(i,s,o)}u&&!0!==n||(n=i.refetch()),!1!==n&&l.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)}),a&&this.cache.removeOptimistic(a),l},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,o=t.query,s=t.variables,a=t.fetchPolicy,c=t.refetchWritePolicy,l=t.errorPolicy,h=t.returnPartialData,d=t.context,p=t.notifyOnNetworkStatusChange,m=e.networkStatus;e.init({document:this.transform(o).document,variables:s,networkStatus:r});var g=function(){return e.getDiff(s)},y=function(t,r){void 0===r&&(r=e.networkStatus||C.I.loading);var a=t.result;!__DEV__||h||(0,u.D)(a,{})||(0,P.DC)(t.missing);var c=function(e){return f.y.of((0,n.__assign)({data:e,loading:(0,C.O)(r),networkStatus:r},t.complete?null:{partial:!0}))};return a&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:a},context:d,variables:s,onlyRunForcedResolvers:!0}).then(function(e){return c(e.data||void 0)}):"none"===l&&r===C.I.refetch&&Array.isArray(t.missing)?c(void 0):c(a)},v="no-cache"===a?0:r===C.I.refetch&&"merge"!==c?1:2,b=function(){return i.getResultsFromLink(e,v,{variables:s,context:d,fetchPolicy:a,errorPolicy:l})},w=p&&"number"==typeof m&&m!==r&&(0,C.O)(r);switch(a){default:case"cache-first":var E=g();if(E.complete)return{fromLink:!1,sources:[y(E,e.markReady())]};if(h||w)return{fromLink:!0,sources:[y(E),b()]};return{fromLink:!0,sources:[b()]};case"cache-and-network":var E=g();if(E.complete||h||w)return{fromLink:!0,sources:[y(E),b()]};return{fromLink:!0,sources:[b()]};case"cache-only":return{fromLink:!1,sources:[y(g(),e.markReady())]};case"network-only":if(w)return{fromLink:!0,sources:[y(g()),b()]};return{fromLink:!0,sources:[b()]};case"no-cache":if(w)return{fromLink:!0,sources:[y(e.getDiff()),b()]};return{fromLink:!0,sources:[b()]};case"standby":return{fromLink:!1,sources:[]}}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new U(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)({},t),{clientAwareness:this.clientAwareness})},e}(),Q=r(14012),z=!1,K=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,s=e.headers,u=e.cache,c=e.ssrMode,l=void 0!==c&&c,h=e.ssrForceFetchDelay,f=void 0===h?0:h,d=e.connectToDevTools,p=void 0===d?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:d,m=e.queryDeduplication,g=void 0===m||m,y=e.defaultOptions,v=e.assumeImmutableResults,b=e.resolvers,w=e.typeDefs,E=e.fragmentMatcher,A=e.name,_=e.version,k=e.link;if(k||(k=r?new a.u({uri:r,credentials:n,headers:s}):o.i.empty()),!u)throw __DEV__?new i.ej("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new i.ej(9);if(this.link=k,this.cache=u,this.disableNetworkFetches=l||f>0,this.queryDeduplication=g,this.defaultOptions=y||Object.create(null),this.typeDefs=w,f&&setTimeout(function(){return t.disableNetworkFetches=!1},f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),p&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!z&&p&&__DEV__&&(z=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var S=window.navigator,O=S&&S.userAgent,x=void 0;"string"==typeof O&&(O.indexOf("Chrome/")>-1?x="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":O.indexOf("Firefox/")>-1&&(x="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),x&&__DEV__&&i.kG.log("Download the Apollo DevTools for a better development experience: "+x)}
17this.version="3.7.13",this.localState=new F({cache:u,client:this,resolvers:b,fragmentMatcher:E}),this.queryManager=new V({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:g,ssrMode:l,clientAwareness:{name:A,version:_},localState:this.localState,assumeImmutableResults:void 0!==v&&v,onBroadcast:p?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=(0,Q.J)(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&("network-only"===e.fetchPolicy||"cache-and-network"===e.fetchPolicy)&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=(0,Q.J)(this.defaultOptions.query,e)),__DEV__?(0,i.kG)("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):(0,i.kG)("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=(0,Q.J)(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return!1!==e.broadcast&&this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return(0,s.h)(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(e){return e()}))}).then(function(){return e.reFetchObservableQueries()})},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(e){return e()}))})},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(t){return t!==e})}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach(function(e,t){r.push(t),n.push(e)});var o=Promise.all(n);return o.queries=r,o.results=n,o.catch(function(e){__DEV__&&i.kG.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))}),o},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}()},44780:function(e,t,r){"use strict";r.d(t,{DC:function(){return b},ue:function(){return g},vj:function(){return y}});
17var n=r(70655),i=r(48964),o=r(82152),s=r(1644),a=r(36765),u=r(79487),c=r(21436),l=r(53712),h=r(18263),f=r(48216),d=r(86403),p=Object.assign,m=Object.hasOwnProperty,g=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,o=t.options,s=e.call(this,function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=v)}catch(e){}var r=!s.observers.size;s.observers.add(e);var n=s.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(n.result),r&&s.reobserve().catch(function(){}),function(){s.observers.delete(e)&&!s.observers.size&&s.tearDownQuery()}})||this;s.observers=new Set,s.subscriptions=new Set,s.queryInfo=i,s.queryManager=r,s.isTornDown=!1;var u=r.defaultOptions.watchQuery,c=(void 0===u?{}:u).fetchPolicy,l=void 0===c?"cache-first":c,h=o.fetchPolicy,f=void 0===h?l:h,d=o.initialFetchPolicy;s.options=(0,n.__assign)((0,n.__assign)({},o),{initialFetchPolicy:void 0===d?"standby"===f?l:f:d,fetchPolicy:f}),s.queryId=i.queryId||r.generateQueryId();var p=(0,a.$H)(s.query);return s.queryName=p&&p.name&&p.name.value,s}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise(function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout(function(){i.unsubscribe()},0)},error:r},i=e.subscribe(n)})},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||s.I.ready,i=(0,n.__assign)((0,n.__assign)({},t),{loading:(0,s.O)(r),networkStatus:r}),a=this.options.fetchPolicy,u=void 0===a?"cache-first":a;if("network-only"===u||"no-cache"===u||"standby"===u||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var c=this.queryInfo.getDiff();(c.complete||this.options.returnPartialData)&&(i.data=c.result),(0,o.D)(i.data,{})&&(i.data=void 0),c.complete?(delete i.partial,c.complete&&i.networkStatus===s.I.loading&&("cache-first"===u||"cache-only"===u)&&(i.networkStatus=s.I.ready,i.loading=!1)):i.partial=!0,!__DEV__||c.complete||this.options.partialRefetch||i.loading||i.data||i.error||b(c.missing)}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!(0,o.D)(this.last.result,e)||t&&!(0,o.D)(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||(0,o.D)(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0},u=this.options.fetchPolicy;if("cache-and-network"===u?r.fetchPolicy=u:"no-cache"===u?r.fetchPolicy="no-cache":r.fetchPolicy="network-only",__DEV__&&e&&m.call(e,"variables")){var c=(0,a.iW)(this.query),l=c.variableDefinitions;(!l||!l.some(function(e){return"variables"===e.variable.name.value}))&&__DEV__&&i.kG.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=c.name)||void 0===t?void 0:t.value)||JSON.stringify(c),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!(0,o.D)(this.options.variables,e)&&(r.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,s.I.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),{query:this.query}),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId(),o=this.queryInfo,a=o.networkStatus;o.networkStatus=s.I.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var u=new Set;return this.queryManager.fetchQuery(i,r,s.I.fetchMore).then(function(n){return t.queryManager.removeQuery(i),o.networkStatus===s.I.fetchMore&&(o.networkStatus=a),t.queryManager.cache.batch({update:function(i){var o=e.updateQuery;o?i.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},function(e){return o(e,{fetchMoreResult:n.data,variables:r.variables})}):i.writeQuery({query:r.query,variables:r.variables,data:n.data})},onWatchUpdated:function(e){u.add(e.query)}}),n}).finally(function(){u.has(t.query)||y(t)})},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery(function(e,t){return n(e,{subscriptionData:r,variables:t.variables})})},error:function(t){if(e.onError){e.onError(t);return}__DEV__&&i.kG.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return(0,o.D)(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size)?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},s.I.setVariables):Promise.resolve()},t.prototype.updateQuery=function(e){var t=this.queryManager,r=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,i=t.initialFetchPolicy,o=void 0===i?n:i;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:o}):"variables-changed"===e?t.fetchPolicy=o:t.fetchPolicy=t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(!r){t&&(clearTimeout(t.timeout),delete this.pollingInfo);return}if(!t||t.interval!==r){__DEV__?(0,i.kG)(r,"Attempted to start a polling query without a polling interval."):(0,i.kG)(r,13),(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&((0,s.O)(e.queryInfo.networkStatus)?o():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},s.I.poll).then(o,o))},o=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};o()}}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,n.__assign)((0,n.__assign)({},this.last),{result:this.queryManager.assumeImmutableResults?e:(0,u.X)(e),variables:t}),(0,c.O)(e.errors)||delete this.last.error,this.last},t.prototype.reobserveAsConcast=function(e,t){var r=this;this.isTornDown=!1;var i=t===s.I.refetch||t===s.I.fetchMore||t===s.I.poll,a=this.options.variables,u=this.options.fetchPolicy,c=(0,l.o)(this.options,e||{}),h=i?c:p(this.options,c);!i&&(this.updatePolling(),e&&e.variables&&!(0,o.D)(e.variables,a)&&"standby"!==h.fetchPolicy&&h.fetchPolicy===u&&(this.applyNextFetchPolicy("variables-changed",h),void 0===t&&(t=s.I.setVariables)));var f=h.variables&&(0,n.__assign)({},h.variables),d=this.fetch(h,t),m=d.concast,g=d.fromLink,y={next:function(e){r.reportResult(e,f)},error:function(e){r.reportError(e,f)}};return!i&&g&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=m,this.observer=y),m.addObserver(y),m},t.prototype.reobserve=function(e,t){return this.reobserveAsConcast(e,t).promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError();(r||this.isDifferentFromLastResult(e,t))&&((r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),(0,h.p)(this.observers,"next",e))},t.prototype.reportError=function(e,t){var r=(0,n.__assign)((0,n.__assign)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:s.I.error,loading:!1});this.updateLastResult(r,t),(0,h.p)(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(e){return e.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(f.y);function y(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return(this.nextFetchPolicy=n,"function"==typeof n)?n.apply(this,arguments):r}}):e.reobserve()}function v(e){__DEV__&&i.kG.error("Unhandled error",e.message,e.stack)}function b(e){__DEV__&&e&&__DEV__&&i.kG.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}(0,d.D)(g)}
17,1644:function(e,t,r){"use strict";var n,i;function o(e){return!!e&&e<7}r.d(t,{I:function(){return n},O:function(){return o}}),(i=n||(n={}))[i.loading=1]="loading",i[i.setVariables=2]="setVariables",i[i.fetchMore=3]="fetchMore",i[i.refetch=4]="refetch",i[i.poll=6]="poll",i[i.ready=7]="ready",i[i.error=8]="error"},30990:function(e,t,r){"use strict";r.d(t,{MS:function(){return a},YG:function(){return o},cA:function(){return c},ls:function(){return s}});var n=r(70655);r(48964);var i=r(13154),o=Symbol();function s(e){return!!e.extensions&&Array.isArray(e.extensions[o])}function a(e){return e.hasOwnProperty("graphQLErrors")}var u=function(e){var t=(0,n.__spreadArray)((0,n.__spreadArray)((0,n.__spreadArray)([],e.graphQLErrors,!0),e.clientErrors,!0),e.protocolErrors,!0);return e.networkError&&t.push(e.networkError),t.map(function(e){return(0,i.s)(e)&&e.message||"Error message not found."}).join("\n")},c=function(e){function t(r){var n=r.graphQLErrors,i=r.protocolErrors,o=r.clientErrors,s=r.networkError,a=r.errorMessage,c=r.extraInfo,l=e.call(this,a)||this;return l.name="ApolloError",l.graphQLErrors=n||[],l.protocolErrors=i||[],l.clientErrors=o||[],l.networkError=s||null,l.message=a||u(l),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,n.__extends)(t,e),t}(Error)},48702:function(e,t,r){"use strict";r.d(t,{i:function(){return h}});var n=r(70655),i=r(48964),o=r(48216),s=r(36765);function a(e,t){return t?t(e):o.y.of()}function u(e){return"function"==typeof e?new h(e):e}function c(e){return e.request.length<=1}var l=function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}return(0,n.__extends)(t,e),t}(Error),h=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e(function(){return o.y.of()})},e.from=function(t){return 0===t.length?e.empty():t.map(u).reduce(function(e,t){return e.concat(t)})},e.split=function(t,r,n){var i=u(r),s=u(n||new e(a));return new e(c(i)&&c(s)?function(e){return t(e)?i.request(e)||o.y.of():s.request(e)||o.y.of()}:function(e,r){return t(e)?i.request(e,r)||o.y.of():s.request(e,r)||o.y.of()})},e.execute=function(e,t){var r,a,u,c;return e.request((u=t.context,(a={variables:(r=function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var o=n[r];if(0>t.indexOf(o))throw __DEV__?new i.ej("illegal argument: ".concat(o)):new i.ej(27)}return e}(t)).variables||{},extensions:r.extensions||{},operationName:r.operationName,query:r.query}).operationName||(a.operationName="string"!=typeof a.query?(0,s.rY)(a.query)||void 0:""),c=(0,n.__assign)({},u),Object.defineProperty(a,"setContext",{enumerable:!1,value:function(e){c="function"==typeof e?(0,n.__assign)((0,n.__assign)({},c),e(c)):(0,n.__assign)((0,n.__assign)({},c),e)}}),Object.defineProperty(a,"getContext",{enumerable:!1,value:function(){return(0,n.__assign)({},c)}}),a))||o.y.of()},e.concat=function(t,r){var n=u(t);if(c(n))return __DEV__&&i.kG.warn(new l("You are calling concat on a terminating link, which will have no effect",n)),n;var s=u(r);return new e(c(s)?function(e){return n.request(e,function(e){return s.request(e)||o.y.of()})||o.y.of()}:function(e,t){return n.request(e,function(e){return s.request(e,t)||o.y.of()})||o.y.of()})},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(a)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new i.ej("request is not implemented"):new i.ej(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}()},47037:function(e,t,r){"use strict";r.d(t,{h:function(){return n}});var n=r(48702).i.execute},72198:function(e,t,r){"use strict";r.d(t,{u:function(){return s}});var n=r(70655),i=r(48702),o=r(34747),s=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,(0,o.L)(t).request)||this;return r.options=t,r}return(0,n.__extends)(t,e),t}(i.i)},23178:function(e,t,r){"use strict";r.d(t,{U:function(){return i}});var n=r(48964),i=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new n.ej("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n  link: new HttpLink({ uri: '/graphql', fetch })\n});\n    "):new n.ej(23)}},34747:function(e,t,r){"use strict";r.d(t,{L:function(){return b}});
17var n=r(70655),i=r(48964),o=r(77304),s=r(48702),a=r(19065),u=r(48216),c=r(15049),l=r(11037),h=r(93227),f=r(23178),d=r(61175),p=r(77388),m=r(88663),g=r(16261),y=r(36765),v=(0,i.wY)(function(){return fetch}),b=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,b=e.fetch,w=e.print,E=void 0===w?d.sb:w,A=e.includeExtensions,_=e.preserveHeaderCase,k=e.useGETForQueries,S=e.includeUnusedVariables,O=void 0!==S&&S,x=(0,n.__rest)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&(0,f.U)(b||v);var P={http:{includeExtensions:A,preserveHeaderCase:_},options:x.fetchOptions,credentials:x.credentials,headers:x.headers};return new s.i(function(e){var t,s,f=(0,l.r)(e,r),w=e.getContext(),A={};if(w.clientAwareness){var _=w.clientAwareness,S=_.name,x=_.version;S&&(A["apollographql-client-name"]=S),x&&(A["apollographql-client-version"]=x)}var C=(0,n.__assign)((0,n.__assign)({},A),w.headers),R={http:w.http,options:w.fetchOptions,credentials:w.credentials,headers:C},I=(0,d.ve)(e,E,d.SC,P,R),T=I.options,N=I.body;if(N.variables&&!O){var M=new Set(Object.keys(N.variables));(0,o.Vn)(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&M.delete(e.name.value)}}),M.size&&(N.variables=(0,n.__assign)({},N.variables),M.forEach(function(e){delete N.variables[e]}))}if(!T.signal){var D=(0,p.$)(),F=D.controller,L=D.signal;(s=F)&&(T.signal=L)}var B="OperationDefinition"===(t=(0,y.p$)(e.query)).kind&&"subscription"===t.operation,j=(0,a.FS)(["defer"],e.query);if(k&&!e.query.definitions.some(function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation})&&(T.method="GET"),j||B){T.headers=T.headers||{};var U="multipart/mixed;";B&&j&&__DEV__&&i.kG.warn("Multipart-subscriptions do not support @defer"),B?U+="boundary=graphql;subscriptionSpec=1.0,application/json":j&&(U+="deferSpec=20220824,application/json"),T.headers.accept=U}if("GET"===T.method){var q=(0,m.H)(f,N),G=q.newURI,V=q.parseError;if(V)return(0,g.Q)(V);f=G}else try{T.body=(0,c.g)(N,"Payload")}catch(e){return(0,g.Q)(e)}return new u.y(function(t){return(b||(0,i.wY)(function(){return fetch})||v)(f,T).then(function(r){e.setContext({response:r});var n,i=null===(n=r.headers)||void 0===n?void 0:n.get("content-type");return null!==i&&/^multipart\/mixed/i.test(i)?(0,h.TF)(r,t):(0,h.Wm)(r,e,t)}).catch(function(e){return(0,h.S3)(e,t)}),function(){s&&s.abort()}})})}},77388:function(e,t,r){"use strict";r.d(t,{$:function(){return n}});var n=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController,t=e.signal;return{controller:e,signal:t}}},93227:function(e,t,r){"use strict";r.d(t,{S3:function(){return f},dO:function(){return p},Wm:function(){return d},TF:function(){return l}});var n=r(70655),i=r(30320);function o(e){var t={next:function(){return e.read()}};return i.DN&&(t[Symbol.asyncIterator]=function(){return this}),t}var s=r(12782),a=r(30990),u=r(37280),c=Object.prototype.hasOwnProperty;function l(e,t){var r,s,c,l,d;return(0,n.__awaiter)(this,void 0,void 0,function(){var p,m,g,y,v,b,w,E,A,_,k,S,O,x,P,C,R,I,T,N,M;return(0,n.__generator)(this,function(D){switch(D.label){case 0:if(void 0===TextDecoder)throw Error("TextDecoder must be defined in the environment: please import a polyfill.");p=new TextDecoder("utf-8"),m=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),g="boundary=",y=(null==m?void 0:m.includes(g))?null==m?void 0:m.substring((null==m?void 0:m.indexOf(g))+g.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",v="--".concat(y),b="",w=function(e){var t,r,n,s,a,u,c=e;if(e.body&&(c=e.body),t=c,i.DN&&t[Symbol.asyncIterator])return n=c[Symbol.asyncIterator](),(r={next:function(){return n.next()}})[Symbol.asyncIterator]=function(){return this},r;if(c.getReader)return o(c.getReader());if(c.stream)return o(c.stream().getReader());if(c.arrayBuffer)return s=c.arrayBuffer(),a=!1,u={next:function(){return a?Promise.resolve({value:void 0,done:!0}):(a=!0,new Promise(function(e,t){s.then(function(t){e({value:t,done:!1})}).catch(t)}))}},i.DN&&(u[Symbol.asyncIterator]=function(){return this}),u;if(c.pipe)return function(e){var t=null,r=null,n=!1,o=[],s=[];function a(e){if(!r){if(s.length){var t=s.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}o.push(e)}}
17function u(e){r=e,s.slice().forEach(function(t){t[1](e)}),t&&t()}function c(){n=!0,s.slice().forEach(function(e){e[0]({value:void 0,done:!0})}),t&&t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",u),e.removeListener("end",c),e.removeListener("finish",c),e.removeListener("close",c)},e.on("data",a),e.on("error",u),e.on("end",c),e.on("finish",c),e.on("close",c);var l={next:function(){return new Promise(function(e,t){return r?t(r):o.length?e({value:o.shift(),done:!1}):n?e({value:void 0,done:!0}):void s.push([e,t])})}};return i.DN&&(l[Symbol.asyncIterator]=function(){return this}),l}(c);throw Error("Unknown body type for responseIterator. Please pass a streamable response.")}(e),E=!0,D.label=1;case 1:if(!E)return[3,3];return[4,w.next()];case 2:for(_=(A=D.sent()).value,k=A.done,S="string"==typeof _?_:p.decode(_),E=!k,b+=S,O=b.indexOf(v);O>-1;){if(x=void 0,x=(N=[b.slice(0,O),b.slice(O+v.length)])[0],b=N[1],x.trim()){if(P=x.indexOf("\r\n\r\n"),(C=function(e){var t={};return e.split("\n").forEach(function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}}),t}(x.slice(0,P))["content-type"])&&-1===C.toLowerCase().indexOf("application/json"))throw Error("Unsupported patch content type: application/json is required.");R=x.slice(P);try{I=h(e,R.replace("\r\n","")),Object.keys(I).length>1||"data"in I||"incremental"in I||"errors"in I||"payload"in I?(0,u.yU)(I)?(T={},"payload"in I&&(T=(0,n.__assign)({},I.payload)),"errors"in I&&(T=(0,n.__assign)((0,n.__assign)({},T),{extensions:(0,n.__assign)((0,n.__assign)({},"extensions"in T?T.extensions:null),((M={})[a.YG]=I.errors,M))})),null===(s=t.next)||void 0===s||s.call(t,T)):null===(c=t.next)||void 0===c||c.call(t,I):1===Object.keys(I).length&&"hasNext"in I&&!I.hasNext&&(null===(l=t.complete)||void 0===l||l.call(t))}catch(e){f(e,t)}}O=b.indexOf(v)}return[3,1];case 3:return null===(d=t.complete)||void 0===d||d.call(t),[2]}})})}function h(e,t){e.status>=300&&(0,s.P)(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function f(e,t){var r,n;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(r=t.next)||void 0===r||r.call(t,e.result)),null===(n=t.error)||void 0===n||n.call(t,e))}function d(e,t,r){p(t)(e).then(function(e){var t,n;null===(t=r.next)||void 0===t||t.call(r,e),null===(n=r.complete)||void 0===n||n.call(r)}
17).catch(function(e){return f(e,r)})}function p(e){return function(t){return t.text().then(function(e){return h(t,e)}).then(function(r){return t.status>=300&&(0,s.P)(t,r,"Response not successful: Received status code ".concat(t.status)),Array.isArray(r)||c.call(r,"data")||c.call(r,"errors")||(0,s.P)(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map(function(e){return e.operationName}):e.operationName,"'.")),r})}}},88663:function(e,t,r){"use strict";r.d(t,{H:function(){return i}});var n=r(15049);function i(e,t){var r=[],i=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&i("query",t.query),t.operationName&&i("operationName",t.operationName),t.variables){var o=void 0;try{o=(0,n.g)(t.variables,"Variables map")}catch(e){return{parseError:e}}i("variables",o)}if(t.extensions){var s=void 0;try{s=(0,n.g)(t.extensions,"Extensions map")}catch(e){return{parseError:e}}i("extensions",s)}var a="",u=e,c=e.indexOf("#");-1!==c&&(a=e.substr(c),u=e.substr(0,c));var l=-1===u.indexOf("?")?"?":"&";return{newURI:u+l+r.join("&")+a}}},61175:function(e,t,r){"use strict";r.d(t,{sb:function(){return y},SC:function(){return g},E4:function(){return v},ve:function(){return b}});var n=r(70655),i=r(87392);let o=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function s(e){return a[e.charCodeAt(0)]}let a=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];var u=r(77304);function c(e){return(0,u.Vn)(e,l)}let l={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>h(e.definitions,"\n\n")},OperationDefinition:{leave(e){let t=d("(",h(e.variableDefinitions,", "),")"),r=h([e.operation,h([e.name,t]),h(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+d(" = ",r)+d(" ",h(n," "))},SelectionSet:{leave:({selections:e})=>f(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){let o=d("",e,": ")+t,s=o+d("(",h(r,", "),")");return s.length>80&&(s=o+d("(\n",p(h(r,"\n")),"\n)")),h([s,h(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+d(" ",h(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>h(["...",d("on ",e),h(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${d("(",h(r,", "),")")} on ${t} ${d("",h(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?(0,i.LZ)(e):`"${e.replace(o,s)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+h(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+h(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+d("(",h(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>d("",e,"\n")+h(["schema",h(t," "),f(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>d("",e,"\n")+h(["scalar",t,h(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>d("",e,"\n")+h(["type",t,d("implements ",h(r," & ")),h(n," "),f(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>
17d("",e,"\n")+t+(m(r)?d("(\n",p(h(r,"\n")),"\n)"):d("(",h(r,", "),")"))+": "+n+d(" ",h(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>d("",e,"\n")+h([t+": "+r,d("= ",n),h(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>d("",e,"\n")+h(["interface",t,d("implements ",h(r," & ")),h(n," "),f(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>d("",e,"\n")+h(["union",t,h(r," "),d("= ",h(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>d("",e,"\n")+h(["enum",t,h(r," "),f(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>d("",e,"\n")+h([t,h(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>d("",e,"\n")+h(["input",t,h(r," "),f(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>d("",e,"\n")+"directive @"+t+(m(r)?d("(\n",p(h(r,"\n")),"\n)"):d("(",h(r,", "),")"))+(n?" repeatable":"")+" on "+h(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>h(["extend schema",h(e," "),f(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>h(["extend scalar",e,h(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>h(["extend type",e,d("implements ",h(t," & ")),h(r," "),f(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>h(["extend interface",e,d("implements ",h(t," & ")),h(r," "),f(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>h(["extend union",e,h(t," "),d("= ",h(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>h(["extend enum",e,h(t," "),f(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>h(["extend input",e,h(t," "),f(r)]," ")}};function h(e,t=""){var r;return null!==(r=null==e?void 0:e.filter(e=>e).join(t))&&void 0!==r?r:""}function f(e){return d("{\n",p(h(e,"\n")),"\n}")}function d(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function p(e){return d("  ",e.replace(/\n/g,"\n  "))}function m(e){var t;return null!==(t=null==e?void 0:e.some(e=>e.includes("\n")))&&void 0!==t&&t}var g={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},y=function(e,t){return t(e)};function v(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return r.unshift(t),b.apply(void 0,(0,n.__spreadArray)([e,y],r,!1))}function b(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o={},s={};r.forEach(function(e){o=(0,n.__assign)((0,n.__assign)((0,n.__assign)({},o),e.options),{headers:(0,n.__assign)((0,n.__assign)({},o.headers),e.headers)}),e.credentials&&(o.credentials=e.credentials),s=(0,n.__assign)((0,n.__assign)({},s),e.http)}),o.headers&&(o.headers=function(e,t){if(!t){var r=Object.create(null);
17return Object.keys(Object(e)).forEach(function(t){r[t.toLowerCase()]=e[t]}),r}var n=Object.create(null);Object.keys(Object(e)).forEach(function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}});var i=Object.create(null);return Object.keys(n).forEach(function(e){i[n[e].originalName]=n[e].value}),i}(o.headers,s.preserveHeaderCase));var a=e.operationName,u=e.extensions,l=e.variables,h=e.query,f={operationName:a,variables:l};return s.includeExtensions&&(f.extensions=u),s.includeQuery&&(f.query=t(h,c)),{options:o,body:f}}},11037:function(e,t,r){"use strict";r.d(t,{r:function(){return n}});var n=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")}},15049:function(e,t,r){"use strict";r.d(t,{g:function(){return i}});var n=r(48964),i=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var i=__DEV__?new n.ej("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new n.ej(24);throw i.parseError=e,i}return r}},16261:function(e,t,r){"use strict";r.d(t,{Q:function(){return i}});var n=r(48216);function i(e){return new n.y(function(t){t.error(e)})}},12782:function(e,t,r){"use strict";r.d(t,{P:function(){return n}});var n=function(e,t,r){var n=Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n}},85317:function(e,t,r){"use strict";r.d(t,{K:function(){return o}});var n=r(67294),i=r(30320).aS?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function o(){var e=n.createContext[i];return e||(Object.defineProperty(n.createContext,i,{value:e=n.createContext({}),enumerable:!1,writable:!1,configurable:!0}),e.displayName="ApolloContext"),e}},53768:function(e,t,r){"use strict";r.d(t,{e:function(){return s}});var n=r(48964),i=r(67294),o=r(85317),s=function(e){var t=e.client,r=e.children,s=(0,o.K)();return i.createElement(s.Consumer,null,function(e){return void 0===e&&(e={}),t&&e.client!==t&&(e=Object.assign({},e,{client:t})),__DEV__?(0,n.kG)(e.client,'ApolloProvider was not passed a client instance. Make sure you pass in your client via the "client" prop.'):(0,n.kG)(e.client,29),i.createElement(s.Provider,{value:e},r)})}},21436:function(e,t,r){"use strict";r.d(t,{O:function(){return i},k:function(){return n}});var n=Array.isArray;function i(e){return Array.isArray(e)&&e.length>0}},30320:function(e,t,r){"use strict";r.d(t,{DN:function(){return a},JC:function(){return l},aS:function(){return s},mr:function(){return i},sy:function(){return o}});var n=r(48964),i="function"==typeof WeakMap&&"ReactNative"!==(0,n.wY)(function(){return navigator.product}),o="function"==typeof WeakSet,s="function"==typeof Symbol&&"function"==typeof Symbol.for,a=s&&Symbol.asyncIterator,u="function"==typeof(0,n.wY)(function(){return window.document.createElement}),c=(0,n.wY)(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,l=u&&!c},79487:function(e,t,r){"use strict";r.d(t,{X:function(){return i}});var n=Object.prototype.toString;function i(e){return function e(t,r){switch(n.call(t)){case"[object Array]":if((r=r||new Map).has(t))return r.get(t);var i=t.slice(0);return r.set(t,i),i.forEach(function(t,n){i[n]=e(t,r)}),i;case"[object Object]":if((r=r||new Map).has(t))return r.get(t);var o=Object.create(Object.getPrototypeOf(t));return r.set(t,o),Object.keys(t).forEach(function(n){o[n]=e(t[n],r)}),o;default:return t}}(e)}},53712:function(e,t,r){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach(function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];void 0!==n&&(r[t]=n)})}),r}r.d(t,{o:function(){return n}})},37280:function(e,t,r){"use strict";r.d(t,{GG:function(){return s},M0:function(){return a},mT:function(){return c},yU:function(){return u}});var n=r(13154),i=r(21436),o=r(182);function s(e){return"incremental"in e}function a(e){return s(e)||"hasNext"in e&&"data"in e}function u(e){return(0,n.s)(e)&&"payload"in e}function c(e,t){var r=e,n=new o.w0;return s(t)&&(0,i.O)(t.incremental)&&t.incremental.forEach(function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var s=i[o],a=isNaN(+s)?{}:[];a[s]=t,t=a}r=n.merge(r,t)}),r}},60897:function(e,t,r){"use strict";r.d(t,{X:function(){return i}});var n=new Map;function i(e){var t=n.get(e)||1;return n.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}},10542:function(e,t,r){"use strict";r.d(t,{J:function(){return i}}),r(48964);var n=r(13154);function i(e){if(__DEV__){var t;
17(t=new Set([e])).forEach(function(e){(0,n.s)(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach(function(r){(0,n.s)(e[r])&&t.add(e[r])})})}return e}},182:function(e,t,r){"use strict";r.d(t,{Ee:function(){return s},bw:function(){return a},w0:function(){return c}});var n=r(70655),i=r(13154),o=Object.prototype.hasOwnProperty;function s(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a(e)}function a(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new c,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var u=function(e,t,r){return this.merge(e[r],t[r])},c=function(){function e(e){void 0===e&&(e=u),this.reconciler=e,this.isObject=i.s,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,s=[],a=2;a<arguments.length;a++)s[a-2]=arguments[a];return(0,i.s)(t)&&(0,i.s)(e)?(Object.keys(t).forEach(function(i){if(o.call(e,i)){var a=e[i];if(t[i]!==a){var u=r.reconciler.apply(r,(0,n.__spreadArray)([e,t,i],s,!1));u!==a&&((e=r.shallowCopyForMerge(e))[i]=u)}}else(e=r.shallowCopyForMerge(e))[i]=t[i]}),e):t},e.prototype.shallowCopyForMerge=function(e){return(0,i.s)(e)&&!this.pastCopies.has(e)&&(e=Array.isArray(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e)),e},e}()},14012:function(e,t,r){"use strict";r.d(t,{J:function(){return o}});var n=r(70655),i=r(53712);function o(e,t){return(0,i.o)(e,t,t.variables&&{variables:(0,n.__assign)((0,n.__assign)({},e&&e.variables),t.variables)})}},13154:function(e,t,r){"use strict";function n(e){return null!==e&&"object"==typeof e}r.d(t,{s:function(){return n}})},48964:function(e,t,r){"use strict";r.d(t,{Rk:function(){return a},ej:function(){return n.ej},kG:function(){return n.kG},wY:function(){return i}});var n=r(66128);function i(e){try{return e()}catch(e){}}var o=i(function(){return globalThis})||i(function(){return window})||i(function(){return self})||i(function(){return global})||i(function(){return i.constructor("return this")()}),s="__DEV__",a=function(){try{return!!__DEV__}catch(e){return Object.defineProperty(o,s,{value:"production"!==i(function(){return"production"}),enumerable:!1,configurable:!0,writable:!0}),o[s]}}(),u=r(83454);function c(e){try{return e()}catch(e){}}var l=c(function(){return globalThis})||c(function(){return window})||c(function(){return self})||c(function(){return global})||c(function(){return c.constructor("return this")()}),h=!1;!l||c(function(){return"production"})||c(function(){return u})||(Object.defineProperty(l,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),h=!0),r(51270).H,h&&(delete l.process,h=!1),__DEV__?(0,n.kG)("boolean"==typeof a,a):(0,n.kG)("boolean"==typeof a,39)},19065:function(e,t,r){"use strict";r.d(t,{FS:function(){return s},LZ:function(){return o},mj:function(){return a}});var n=r(48964),i=r(77304);function o(e,t){var r,i=e.directives;return!i||!i.length||(r=[],i&&i.length&&i.forEach(function(e){var t;if(!("skip"!==(t=e.name.value)&&"include"!==t)){var i=e.arguments,o=e.name.value;__DEV__?(0,n.kG)(i&&1===i.length,"Incorrect number of arguments for the @".concat(o," directive.")):(0,n.kG)(i&&1===i.length,41);var s=i[0];__DEV__?(0,n.kG)(s.name&&"if"===s.name.value,"Invalid argument for the @".concat(o," directive.")):(0,n.kG)(s.name&&"if"===s.name.value,42);var a=s.value;__DEV__?(0,n.kG)(a&&("Variable"===a.kind||"BooleanValue"===a.kind),"Argument for the @".concat(o," directive must be a variable or a boolean value.")):(0,n.kG)(a&&("Variable"===a.kind||"BooleanValue"===a.kind),43),r.push({directive:e,ifArgument:s})}}),r).every(function(e){var r=e.directive,i=e.ifArgument,o=!1;return"Variable"===i.value.kind?(o=t&&t[i.value.name.value],__DEV__?(0,n.kG)(void 0!==o,"Invalid variable referenced in @".concat(r.name.value," directive.")):(0,n.kG)(void 0!==o,40)):o=i.value.value,"skip"===r.name.value?!o:o})}function s(e,t,r){var n=new Set(e),o=n.size;return(0,i.Vn)(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return i.$_}}),r?!n.size:n.size<o}function a(e){return e&&s(["client","export"],e,!0)}},23361:function(e,t,r){"use strict";r.d(t,{F:function(){return s},Yk:function(){return o},hi:function(){return a}});var n=r(70655),i=r(48964);function o(e,t){var r=t,o=[];return e.definitions.forEach(function(e){if("OperationDefinition"===e.kind)throw __DEV__?new i.ej("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new i.ej(44);"FragmentDefinition"===e.kind&&o.push(e)}),void 0===r&&(__DEV__?(0,i.kG)(1===o.length,"Found ".concat(o.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):(0,i.kG)(1===o.length,45),r=o[0].name.value),(0,n.__assign)((0,n.__assign)({},e),{definitions:(0,n.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function s(e){void 0===e&&(e=[]);var t={};return e.forEach(function(e){t[e.name.value]=e}),t}function a(e,t){switch(e.kind){case"InlineFragment":return e;
17case"FragmentSpread":var r=e.name.value;if("function"==typeof t)return t(r);var n=t&&t[r];return __DEV__?(0,i.kG)(n,"No fragment named ".concat(r)):(0,i.kG)(n,46),n||null;default:return null}}},36765:function(e,t,r){"use strict";r.d(t,{$H:function(){return s},A$:function(){return o},O4:function(){return f},iW:function(){return c},kU:function(){return u},p$:function(){return h},pD:function(){return l},rY:function(){return a}});var n=r(48964),i=r(51761);function o(e){__DEV__?(0,n.kG)(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):(0,n.kG)(e&&"Document"===e.kind,47);var t=e.definitions.filter(function(e){return"FragmentDefinition"!==e.kind}).map(function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new n.ej('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new n.ej(48);return e});return __DEV__?(0,n.kG)(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):(0,n.kG)(t.length<=1,49),e}function s(e){return o(e),e.definitions.filter(function(e){return"OperationDefinition"===e.kind})[0]}function a(e){return e.definitions.filter(function(e){return"OperationDefinition"===e.kind&&!!e.name}).map(function(e){return e.name.value})[0]||null}function u(e){return e.definitions.filter(function(e){return"FragmentDefinition"===e.kind})}function c(e){var t=s(e);return __DEV__?(0,n.kG)(t&&"query"===t.operation,"Must contain a query definition."):(0,n.kG)(t&&"query"===t.operation,50),t}function l(e){__DEV__?(0,n.kG)("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):(0,n.kG)("Document"===e.kind,51),__DEV__?(0,n.kG)(e.definitions.length<=1,"Fragment must have exactly one definition."):(0,n.kG)(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?(0,n.kG)("FragmentDefinition"===t.kind,"Must be a fragment definition."):(0,n.kG)("FragmentDefinition"===t.kind,53),t}function h(e){o(e);for(var t,r=0,i=e.definitions;r<i.length;r++){var s=i[r];if("OperationDefinition"===s.kind){var a=s.operation;if("query"===a||"mutation"===a||"subscription"===a)return s}"FragmentDefinition"!==s.kind||t||(t=s)}if(t)return t;throw __DEV__?new n.ej("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new n.ej(54)}function f(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach(function(e){e.defaultValue&&(0,i.vb)(t,e.variable.name,e.defaultValue)}),t}},51761:function(e,t,r){"use strict";r.d(t,{Ao:function(){return v},JW:function(){return u},My:function(){return y},NC:function(){return m},PT:function(){return f},Yk:function(){return a},kQ:function(){return s},qw:function(){return function e(t,r,n){if("string"==typeof t.__typename)return t.__typename;for(var i=0,s=r.selections;i<s.length;i++){var a=s[i];if(y(a)){if("__typename"===a.name.value)return t[g(a)]}else{var u=e(t,(0,o.hi)(a,n).selectionSet,n);if("string"==typeof u)return u}}}},u2:function(){return g},vb:function(){return c},vf:function(){return l}});var n=r(48964),i=r(13154),o=r(23361);function s(e){return{__ref:String(e)}}function a(e){return!!(e&&"object"==typeof e&&"string"==typeof e.__ref)}function u(e){return(0,i.s)(e)&&"Document"===e.kind&&Array.isArray(e.definitions)}function c(e,t,r,i){if("IntValue"===r.kind||"FloatValue"===r.kind)e[t.value]=Number(r.value);else if("BooleanValue"===r.kind||"StringValue"===r.kind)e[t.value]=r.value;else if("ObjectValue"===r.kind){var o={};r.fields.map(function(e){return c(o,e.name,e.value,i)}),e[t.value]=o}else if("Variable"===r.kind){var s=(i||{})[r.name.value];e[t.value]=s}else if("ListValue"===r.kind)e[t.value]=r.values.map(function(e){var r={};return c(r,t,e,i),r[t.value]});else if("EnumValue"===r.kind)e[t.value]=r.value;else if("NullValue"===r.kind)e[t.value]=null;else throw __DEV__?new n.ej('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new n.ej(55)}function l(e,t){var r=null;e.directives&&(r={}
17,e.directives.forEach(function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach(function(n){var i=n.name,o=n.value;return c(r[e.name.value],i,o,t)})}));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach(function(e){return c(n,e.name,e.value,t)})),f(e.name.value,n,r)}var h=["connection","include","skip","client","rest","export"],f=Object.assign(function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(!r.connection.filter||!(r.connection.filter.length>0))return r.connection.key;var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach(function(e){i[e]=t[e]}),"".concat(r.connection.key,"(").concat(d(i),")")}var o=e;if(t){var s=d(t);o+="(".concat(s,")")}return r&&Object.keys(r).forEach(function(e){-1===h.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(d(r[e]),")"):o+="@".concat(e))}),o},{setStringify:function(e){var t=d;return d=e,t}}),d=function(e){return JSON.stringify(e,p)};function p(e,t){return(0,i.s)(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce(function(e,r){return e[r]=t[r],e},{})),t}function m(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach(function(e){return c(r,e.name,e.value,t)}),r}return null}function g(e){return e.alias?e.alias.value:e.name.value}function y(e){return"Field"===e.kind}function v(e){return"InlineFragment"===e.kind}},76487:function(e,t,r){"use strict";r.d(t,{Fo:function(){return g},Gw:function(){return p},aL:function(){return y},ob:function(){return v}});var n=r(70655),i=r(48964),o=r(97359),s=r(77304),a=r(36765),u=r(51761),c=r(23361),l=r(21436),h={kind:o.h.FIELD,name:{kind:o.h.NAME,value:"__typename"}};function f(e){var t=new Map;return function(r){void 0===r&&(r=e);var n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function d(e,t){for(var r,u,h,d=f(""),p=f(""),m=function(e){for(var t=0,r=void 0;t<e.length&&(r=e[t]);++t)if(!(0,l.k)(r)){if(r.kind===o.h.OPERATION_DEFINITION)return d(r.name&&r.name.value);if(r.kind===o.h.FRAGMENT_DEFINITION)return p(r.name.value)}return __DEV__&&i.kG.error("Could not find operation or fragment"),null},g=0,y=t.definitions.length-1;y>=0;--y)t.definitions[y].kind===o.h.OPERATION_DEFINITION&&++g;var v=(r=new Set,u=[],e.forEach(function(e){e.name?r.add(e.name):e.test&&u.push(e.test)}),function(e){return r.has(e.name.value)||u.some(function(t){return t(e)})}),b=e.some(function(e){return e.remove}),w=function(e){return b&&e&&e.some(v)},E=new Map,A=!1,_={enter:function(e){if(w(e.directives))return A=!0,null}},k=(0,s.Vn)(t,{Field:_,InlineFragment:_,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var o=m(i);o&&o.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(w(e.directives))return A=!0,null;var o=m(i);o&&o.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){E.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===E.get(JSON.stringify(n))?e:g>0&&e.selectionSet.selections.every(function(e){return e.kind===o.h.FIELD&&"__typename"===e.name.value})?(p(e.name.value).removed=!0,A=!0,null):void 0}},Directive:{leave:function(e){if(v(e))return A=!0,null}}});if(!A)return t;var S=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach(function(t){S(p(t)).transitiveVars.forEach(function(t){e.transitiveVars.add(t)})})),e},O=new Set;k.definitions.forEach(function(e){e.kind===o.h.OPERATION_DEFINITION?S(d(e.name&&e.name.value)).fragmentSpreads.forEach(function(e){O.add(e)}):e.kind!==o.h.FRAGMENT_DEFINITION||0!==g||p(e.name.value).removed||O.add(e.name.value)}),O.forEach(function(e){S(p(e)).fragmentSpreads.forEach(function(e){O.add(e)})});var x={enter:function(e){var t;if(t=e.name.value,!O.has(t)||p(t).removed)return null}};return h=(0,s.Vn)(k,{FragmentSpread:x,FragmentDefinition:x,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=S(d(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,n.__assign)((0,n.__assign)({},e),{variableDefinitions:e.variableDefinitions.filter(function(e){return t.has(e.variable.name.value)})})}}}}),!function e(t,r){return!t||t.selectionSet.selections.every(function(t){return t.kind===o.h.FRAGMENT_SPREAD&&e(r[t.name.value],r)})}((0,a.$H)(h)||(0,a.pD)(h),(0,c.F)((0,a.kU)(h)))?h:null}var p=Object.assign(function(e){return(0,s.Vn)(e,{SelectionSet:{enter:function(e,t,r){if(!r||r.kind!==o.h.OPERATION_DEFINITION){var i=e.selections;if(!(!i||i.some(function(e){return(0,u.My)(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))&&!((0,u.My)(r)&&r.directives&&r.directives.some(function(e){return"export"===e.name.value})))return(0,n.__assign)((0,n.__assign)({},e),{selections:(0,n.__spreadArray)((0,n.__spreadArray)([],i,!0),[h],!1)})}}}})},{added:function(e){return e===h}}),m={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||!e.arguments.some(function(e){return"key"===e.name.value}))&&__DEV__&&i.kG.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key."),t}};function g(e){return d([m],(0,a.A$)(e))}function y(e){return"query"===(0,a.p$)(e).operation?e:(0,s.Vn)(e,{OperationDefinition:{enter:function(e){return(0,n.__assign)((0,n.__assign)({},e),{operation:"query"})}}})}function v(e){return(0,a.A$)(e),d([{test:function(e){return"client"===e.name.value},remove:!0}],e)}},18263:function(e,t,r){"use strict";function n(e,t,r){var n=[];e.forEach(function(e){return e[t]&&n.push(e)}
17),n.forEach(function(e){return e[t](r)})}r.d(t,{p:function(){return n}})},86403:function(e,t,r){"use strict";r.d(t,{D:function(){return o}});var n=r(48216),i=r(30320);function o(e){function t(t){Object.defineProperty(e,t,{value:n.y})}return i.aS&&Symbol.species&&t(Symbol.species),t("@@species"),e}},31407:function(e,t,r){"use strict";r.d(t,{RJ:function(){return i},v8:function(){return o},ws:function(){return n}});var n={id:5,network:"goerli",name:"Goerli",nativeCurrency:{name:"Goerli Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-goerli.g.alchemy.com/v2"],webSocket:["wss://eth-goerli.g.alchemy.com/v2"]},infura:{http:["https://goerli.infura.io/v3"],webSocket:["wss://goerli.infura.io/ws/v3"]},default:{http:["https://rpc.ankr.com/eth_goerli"]},public:{http:["https://rpc.ankr.com/eth_goerli"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://goerli.etherscan.io"},default:{name:"Etherscan",url:"https://goerli.etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xA292E2E58d4ddEb29C33c63173d0E8B7a2A4c62e",blockCreated:8610406},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:6507670}},testnet:!0},i={id:1,network:"homestead",name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{alchemy:{http:["https://eth-mainnet.g.alchemy.com/v2"],webSocket:["wss://eth-mainnet.g.alchemy.com/v2"]},infura:{http:["https://mainnet.infura.io/v3"],webSocket:["wss://mainnet.infura.io/ws/v3"]},default:{http:["https://cloudflare-eth.com"]},public:{http:["https://cloudflare-eth.com"]}},blockExplorers:{etherscan:{name:"Etherscan",url:"https://etherscan.io"},default:{name:"Etherscan",url:"https://etherscan.io"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xE4Acdd618deED4e6d2f03b9bf62dc6118FC9A4da",blockCreated:16773775},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}},o={id:80001,name:"Polygon Mumbai",network:"maticmum",nativeCurrency:{name:"MATIC",symbol:"MATIC",decimals:18},rpcUrls:{alchemy:{http:["https://polygon-mumbai.g.alchemy.com/v2"],webSocket:["wss://polygon-mumbai.g.alchemy.com/v2"]},infura:{http:["https://polygon-mumbai.infura.io/v3"],webSocket:["wss://polygon-mumbai.infura.io/ws/v3"]},default:{http:["https://matic-mumbai.chainstacklabs.com"]},public:{http:["https://matic-mumbai.chainstacklabs.com"]}},blockExplorers:{etherscan:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"},default:{name:"PolygonScan",url:"https://mumbai.polygonscan.com"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}},testnet:!0}},66029:function(e,t,r){"use strict";r.d(t,{_:function(){return u}});var n,i=r(80647),o=r(99937),s=r(241),a=r(56371),u=class extends i.wR{constructor({chains:e,options:t}={}){let r={shimDisconnect:!0,getProvider:()=>"undefined"!=typeof window?window.ethereum:void 0,...t};super({chains:e,options:r}),(0,i.ov)(this,"id","injected"),(0,i.ov)(this,"name"),(0,i.ov)(this,"ready"),(0,i.Ko)(this,n,void 0),(0,i.ov)(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),(0,i.ov)(this,"onAccountsChanged",e=>{0===e.length?this.emit("disconnect"):this.emit("change",{account:(0,a.getAddress)(e[0])})}),(0,i.ov)(this,"onChainChanged",e=>{let t=(0,o.Jk)(e),r=this.isChainUnsupported(t);this.emit("change",{chain:{id:t,unsupported:r}})}),(0,i.ov)(this,"onDisconnect",async e=>{if(1013===e.code){let e=await this.getProvider();if(e){let e=await this.getAccount();if(e)return}}this.emit("disconnect"),this.options.shimDisconnect&&o.s3().storage?.removeItem(this.shimDisconnectKey)});let s=r.getProvider();if("string"==typeof r.name)this.name=r.name;else if(s){let e=function(e){if(!e)return"Injected";let t=e=>e.isApexWallet?"Apex Wallet":e.isAvalanche?"Core Wallet":e.isBackpack?"Backpack":e.isBifrost?"Bifrost Wallet":e.isBitKeep?"BitKeep":e.isBitski?"Bitski":e.isBraveWallet?"Brave Wallet":e.isCoinbaseWallet?"Coinbase Wallet":e.isDawn?"Dawn Wallet":e.isExodus?"Exodus":e.isFrame?"Frame":e.isFrontier?"Frontier Wallet":e.isGamestop?"GameStop Wallet":e.isHyperPay?"HyperPay Wallet":e.isImToken?"ImToken":e.isKuCoinWallet?"KuCoin Wallet":e.isMathWallet?"MathWallet":e.isOkxWallet||e.isOKExWallet?"OKX Wallet":e.isOneInchIOSWallet||e.isOneInchAndroidWallet?"1inch Wallet":e.isOpera?"Opera":e.isPhantom?"Phantom":e.isPortal?"Ripio Portal":e.isRabby?"Rabby":e.isRainbow?"Rainbow":e.isStatus?"Status":e.isTally?"Taho":e.isTokenPocket?"TokenPocket":e.isTokenary?"Tokenary":e.isTrust||e.isTrustWallet?"Trust Wallet":e.isXDEFI?"XDEFI Wallet":e.isZerion?"Zerion":e.isMetaMask?"MetaMask":void 0;if(e.providers?.length){let r=new Set,n=1;for(let i of e.providers){let e=t(i);e||(e=`Unknown Wallet #${n}`,n+=1),r.add(e)}let i=[...r];return i.length?i:i[0]??"Injected"}return t(e)??"Injected"}(s);
17r.name?this.name=r.name(e):"string"==typeof e?this.name=e:this.name=e[0]}else this.name="Injected";this.ready=!!s}async connect({chainId:e}={}){try{let t=await this.getProvider();if(!t)throw new o.Nu;t.on&&(t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect)),this.emit("message",{type:"connecting"});let r=await t.request({method:"eth_requestAccounts"}),n=(0,a.getAddress)(r[0]),i=await this.getChainId(),s=this.isChainUnsupported(i);if(e&&i!==e){let t=await this.switchChain(e);i=t.id,s=this.isChainUnsupported(i)}return this.options.shimDisconnect&&o.s3().storage?.setItem(this.shimDisconnectKey,!0),{account:n,chain:{id:i,unsupported:s},provider:t}}catch(e){if(this.isUserRejectedRequestError(e))throw new o.ab(e);if(-32002===e.code)throw new o.TA(e);throw e}}async disconnect(){let e=await this.getProvider();e?.removeListener&&(e.removeListener("accountsChanged",this.onAccountsChanged),e.removeListener("chainChanged",this.onChainChanged),e.removeListener("disconnect",this.onDisconnect),this.options.shimDisconnect&&o.s3().storage?.removeItem(this.shimDisconnectKey))}async getAccount(){let e=await this.getProvider();if(!e)throw new o.Nu;let t=await e.request({method:"eth_accounts"});return(0,a.getAddress)(t[0])}async getChainId(){let e=await this.getProvider();if(!e)throw new o.Nu;return e.request({method:"eth_chainId"}).then(o.Jk)}async getProvider(){let e=this.options.getProvider();return e&&(0,i.qx)(this,n,e),(0,i.ac)(this,n)}async getSigner({chainId:e}={}){let[t,r]=await Promise.all([this.getProvider(),this.getAccount()]);return new s.Q(t,e).getSigner(r)}async isAuthorized(){try{if(this.options.shimDisconnect&&!o.s3().storage?.getItem(this.shimDisconnectKey))return!1;let e=await this.getProvider();if(!e)throw new o.Nu;let t=await this.getAccount();return!!t}catch{return!1}}async switchChain(e){let t=await this.getProvider();if(!t)throw new o.Nu;let r=(0,a.hexValue)(e);try{return await Promise.all([t.request({method:"wallet_switchEthereumChain",params:[{chainId:r}]}),new Promise(t=>this.on("change",({chain:r})=>{r?.id===e&&t()}))]),this.chains.find(t=>t.id===e)??{id:e,name:`Chain ${r}`,network:`${r}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}}}catch(i){let n=this.chains.find(t=>t.id===e);if(!n)throw new o.X4({chainId:e,connectorId:this.id});if(4902===i.code||i?.data?.originalError?.code===4902)try{await t.request({method:"wallet_addEthereumChain",params:[{chainId:r,chainName:n.name,nativeCurrency:n.nativeCurrency,rpcUrls:[n.rpcUrls.public?.http[0]??""],blockExplorerUrls:this.getBlockExplorerUrls(n)}]});let i=await this.getChainId();if(i!==e)throw new o.zZ("User rejected switch after adding network.",{code:4001});return n}catch(e){if(this.isUserRejectedRequestError(e))throw new o.ab(e);throw new o.iA}if(this.isUserRejectedRequestError(i))throw new o.ab(i);throw new o.x3(i)}}async watchAsset({address:e,decimals:t=18,image:r,symbol:n}){let i=await this.getProvider();if(!i)throw new o.Nu;return i.request({method:"wallet_watchAsset",params:{type:"ERC20",options:{address:e,decimals:t,image:r,symbol:n}}})}isUserRejectedRequestError(e){return 4001===e.code}};n=new WeakMap},80647:function(e,t,r){"use strict";r.d(t,{Ko:function(){return l},ac:function(){return c},ov:function(){return a},qx:function(){return h},wR:function(){return f}});var n=r(31407),i=r(26729),o=Object.defineProperty,s=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,a=(e,t,r)=>(s(e,"symbol"!=typeof t?t+"":t,r),r),u=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},c=(e,t,r)=>(u(e,t,"read from private field"),r?r.call(e):t.get(e)),l=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},h=(e,t,r,n)=>(u(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),f=class extends i{constructor({chains:e=[n.RJ,n.ws],options:t}){super(),a(this,"chains"),a(this,"options"),this.chains=e,this.options=t}getBlockExplorerUrls(e){let{default:t,...r}=e.blockExplorers??{};if(t)return[t.url,...Object.values(r).map(e=>e.url)]}isChainUnsupported(e){return!this.chains.some(t=>t.id===e)}}},25078:function(e,t,r){"use strict";r.d(t,{i:function(){return u}});var n,i=r(66029),o=r(80647),s=r(99937),a=r(56371),u=class extends i._{constructor({chains:e,options:t}={}){let r={name:"MetaMask",shimDisconnect:!0,getProvider(){function e(e){let t=!!e?.isMetaMask;if(t&&(!e.isBraveWallet||e._events||e._state)&&!e.isApexWallet&&!e.isAvalanche&&!e.isBitKeep&&!e.isKuCoinWallet&&!e.isMathWallet&&!e.isOkxWallet&&!e.isOKExWallet&&!e.isOneInchIOSWallet&&!e.isOneInchAndroidWallet&&!e.isOpera&&!e.isPortal&&!e.isRabby&&!e.isTokenPocket&&!e.isTokenary&&!e.isZerion)return e}if("undefined"==typeof window)return;let t=window.ethereum;return t?.providers?t.providers.find(e):e(t)},...t};super({chains:e,options:r}),(0,o.ov)(this,"id","metaMask"),(0,o.ov)(this,"shimDisconnectKey",`${this.id}.shimDisconnect`),(0,o.Ko)(this,n,void 0),(0,o.qx)(this,n,r.UNSTABLE_shimOnConnectSelectAccount)}async connect({chainId:e}={}){try{let t=await this.getProvider();if(!t)throw new s.Nu;t.on&&(t.on("accountsChanged",this.onAccountsChanged),t.on("chainChanged",this.onChainChanged),t.on("disconnect",this.onDisconnect)),this.emit
17("message",{type:"connecting"});let r=null;if((0,o.ac)(this,n)&&this.options?.shimDisconnect&&!s.s3().storage?.getItem(this.shimDisconnectKey)){r=await this.getAccount().catch(()=>null);let e=!!r;if(e)try{await t.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]}),r=await this.getAccount()}catch(e){if(this.isUserRejectedRequestError(e))throw new s.ab(e);if(e.code===new s.TA(e).code)throw e}}if(!r){let e=await t.request({method:"eth_requestAccounts"});r=(0,a.getAddress)(e[0])}let i=await this.getChainId(),u=this.isChainUnsupported(i);if(e&&i!==e){let t=await this.switchChain(e);i=t.id,u=this.isChainUnsupported(i)}return this.options?.shimDisconnect&&s.s3().storage?.setItem(this.shimDisconnectKey,!0),{account:r,chain:{id:i,unsupported:u},provider:t}}catch(e){if(this.isUserRejectedRequestError(e))throw new s.ab(e);if(-32002===e.code)throw new s.TA(e);throw e}}};n=new WeakMap},99937:function(e,t,r){"use strict";r.d(t,{iA:function(){return em},X4:function(){return ev},Nu:function(){return ew},zZ:function(){return ep},TA:function(){return eO},x3:function(){return ex},ab:function(){return eP},QB:function(){return O},$j:function(){return Q},eI:function(){return G},o6:function(){return j},Ds:function(){return P},vZ:function(){return function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){let n,i;if(t.constructor!==r.constructor)return!1;if(Array.isArray(t)&&Array.isArray(r)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();let o=Object.keys(t);if((n=o.length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){let n=o[i];if(n&&!e(t[n],r[n]))return!1}return!0}return t!=t&&r!=r}},em:function(){return z},YD:function(){return H},EG:function(){return ea},RQ:function(){return ei},DG:function(){return eu},D0:function(){return ec},s3:function(){return V},Hy:function(){return el},VH:function(){return Z},lG:function(){return $},wp:function(){return B},Jk:function(){return N},g_:function(){return M},$q:function(){return Y},a4:function(){return er},QC:function(){return eh},b0:function(){return X},rn:function(){return ef},Fx:function(){return ee},n9:function(){return es}});var n,i,o,s,a,u=r(66029),c=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},l=(e,t,r)=>(c(e,t,"read from private field"),r?r.call(e):t.get(e)),h=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},f=(e,t,r,n)=>(c(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),d=(e,t,r)=>(c(e,t,"access private method"),r),p=r(51619);let m=e=>(t,r,n)=>{let i=n.subscribe;n.subscribe=(e,t,r)=>{let o=e;if(t){let i=(null==r?void 0:r.equalityFn)||Object.is,s=e(n.getState());o=r=>{let n=e(r);if(!i(s,n)){let e=s;t(s=n,e)}},(null==r?void 0:r.fireImmediately)&&t(s,s)}return i(o)};let o=e(t,r,n);return o},g=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>g(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>g(t)(e)}}},y=(e,t)=>(r,n,i)=>{let o,s,a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},u=!1,c=new Set,l=new Set;try{o=a.getStorage()}catch(e){}if(!o)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),r(...e)},n,i);let h=g(a.serialize),f=()=>{let e;let t=a.partialize({...n()}),r=h({state:t,version:a.version}).then(e=>o.setItem(a.name,e)).catch(t=>{e=t});if(e)throw e;return r},d=i.setState;i.setState=(e,t)=>{d(e,t),f()};let p=e((...e)=>{r(...e),f()},n,i),m=()=>{var e;if(!o)return;u=!1,c.forEach(e=>e(n()));let t=(null==(e=a.onRehydrateStorage)?void 0:e.call(a,n()))||void 0;return g(o.getItem.bind(o))(a.name).then(e=>{if(e)return a.deserialize(e)}).then(e=>
17{if(e){if("number"!=typeof e.version||e.version===a.version)return e.state;if(a.migrate)return a.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(s=a.merge(e,null!=(t=n())?t:p),!0),f()}).then(()=>{null==t||t(s,void 0),u=!0,l.forEach(e=>e(s))}).catch(e=>{null==t||t(void 0,e)})};return i.persist={setOptions:e=>{a={...a,...e},e.getStorage&&(o=e.getStorage())},clearStorage:()=>{null==o||o.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>u,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},m(),s||p},v=(e,t)=>(r,n,i)=>{let o,s={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e),i=null!=(r=t.getItem(e))?r:null;return i instanceof Promise?i.then(n):n(i)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r)),removeItem:e=>t.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},a=!1,u=new Set,c=new Set,l=s.storage;if(!l)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},n,i);let h=()=>{let e=s.partialize({...n()});return l.setItem(s.name,{state:e,version:s.version})},f=i.setState;i.setState=(e,t)=>{f(e,t),h()};let d=e((...e)=>{r(...e),h()},n,i),p=()=>{var e,t;if(!l)return;a=!1,u.forEach(e=>{var t;return e(null!=(t=n())?t:d)});let i=(null==(t=s.onRehydrateStorage)?void 0:t.call(s,null!=(e=n())?e:d))||void 0;return g(l.getItem.bind(l))(s.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===s.version)return e.state;if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return r(o=s.merge(e,null!=(t=n())?t:d),!0),h()}).then(()=>{null==i||i(o,void 0),o=n(),a=!0,c.forEach(e=>e(o))}).catch(e=>{null==i||i(void 0,e)})};return i.persist={setOptions:e=>{s={...s,...e},e.storage&&(l=e.storage)},clearStorage:()=>{null==l||l.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>p(),hasHydrated:()=>a,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},s.skipHydration||p(),o||d},b=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),y(e,t)):v(e,t),w=e=>{let t;let r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=n?n:"object"!=typeof i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,o=e=>(r.add(e),()=>r.delete(e)),s=()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()},a={setState:n,getState:i,subscribe:o,destroy:s};return t=e(n,i,a),a},E=e=>e?w(e):w;var A=r(2593),_=r(56371),k=r(64146);function S(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,n]of e)if(!Object.is(n,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!Object.is(e[r[n]],t[r[n]]))return!1;return!0}function O(e,t,{minQuorum:r=1,pollingInterval:n=4e3,targetQuorum:i=1,stallTimeout:o}={}){if(!e.length)throw Error("must have at least one chain");if(i<r)throw Error("quorum cannot be lower than minQuorum");let s=[],a={},u={};for(let r of e){let e=!1;for(let n of t){let t=n(r);t&&(e=!0,s.some(({id:e})=>e===r.id)||(s=[...s,t.chain]),a[r.id]=[...a[r.id]||[],t.provider],t.webSocketProvider&&(u[r.id]=[...u[r.id]||[],t.webSocketProvider]))}if(!e)throw Error(`Could not find valid provider configuration for chain "${r.name}".
18
19You may need to add \`jsonRpcProvider\` to \`configureChains\` with the chain's RPC URLs.
20Read more: https://wagmi.sh/core/providers/jsonRpc`)}return{chains:s,provider:({chainId:t})=>{let u;let c=s.find(e=>e.id===t)??e[0],l=a[c.id];if(!l||!l[0])throw Error(`No providers configured for chain "${c.id}"`);return u=1===l.length?l[0]():function e(t,r,n,{stallTimeout:i}){try{return new p.H(n.map((e,t)=>{let r=e();return{provider:r,priority:r.priority??t,stallTimeout:r.stallTimeout??i,weight:r.weight}}),t)}catch(o){if(o?.message?.includes("quorum will always fail; larger than total weight")){if(t===r)throw o;return e(t-1,r,n,{stallTimeout:i})}throw o}}(i,r,l,{stallTimeout:o}),42220===c.id&&(u.formatter.formats.block={...u.formatter.formats.block,difficulty:()=>0,gasLimit:()=>0}),Object.assign(u,{chains:s,pollingInterval:n})},webSocketProvider:({chainId:t})=>{let r=s.find(e=>e.id===t)??e[0],n=u[r.id];if(!n)return;let i=n[0]?.();return i&&42220===r.id&&(i.formatter.formats.block={...i.formatter.formats.block,difficulty:()=>0,gasLimit:()=>0}),Object.assign(i||{},{chains:s})}}}function x({chainId:e,signer:t}){let{chain:r,chains:n}=el(),i=r?.id;if(i&&e!==i)throw new ey({activeChain:n.find(e=>e.id===i)?.name??`Chain ${i}`,targetChain:n.find(t=>
20t.id===e)?.name??`Chain ${e}`});if(t){let r=t.provider?.network?.chainId;if(r&&e!==r){let t=V().connector;throw new ev({chainId:e,connectorId:t?.id??"unknown"})}}}function P(e,t=0){let r;return function(...n){if(!t)return e(...n);r&&clearTimeout(r),r=setTimeout(function(){r=null,e(...n)},t)}}var C=(e,{find:t,replace:r})=>e&&t(e)?r(e):"object"!=typeof e?e:Array.isArray(e)?e.map(e=>C(e,{find:t,replace:r})):e instanceof Object?Object.entries(e).reduce((e,[n,i])=>({...e,[n]:C(i,{find:t,replace:r})}),{}):e;function R(e){let t=JSON.parse(e),r=C(t,{find:e=>"BigNumber"===e.type,replace:e=>A.O$.from(e.hex)});return r}function I({contract:e,functionName:t,args:r=[]}){if(t in e.functions)return t;let n=r?.length??0,i=Object.keys(e.functions).filter(e=>e.startsWith(`${t}(`)).map(e=>({name:e,fragment:_.FunctionFragment.fromString(e)})).filter(e=>n===e.fragment.inputs.length);for(let e of i){let t=r.every((t,r)=>{let n=e.fragment.inputs[r];return function e(t,r){let n=typeof t,i=r.type;switch(i){case"address":return(0,_.isAddress)(t);case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:if("tuple"===i&&"components"in r)return Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===n||"bigint"===n||A.O$.isBigNumber(t);if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===n||t instanceof Uint8Array;
20if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,n)});if(t)return e.name}return t}function T(e){V()?.config.logger?.warn?.(e)}function N(e){return"string"==typeof e?Number.parseInt(e,"0x"===e.trim().substring(0,2)?16:10):"bigint"==typeof e?Number(e):e}function M({abi:e,data:t,functionName:r}){var n;if(t&&Array.isArray(n=t)&&Object.keys(n).length===n.length){let n=k.CH.getInterface(e),i=n.getFunction(r),o=(i.outputs?.length||0)>1,s=n.encodeFunctionResult(r,o?t:[t]),a=n.decodeFunctionResult(r,s);return o?a:a[0]}return t}function D(e,t){return e.slice(0,t).join(".")||"."}function F(e,t){let{length:r}=e;for(let n=0;n<r;++n)if(e[n]===t)return n+1;return 0}function L(e,t,r,n){return JSON.stringify(e,function(e,t){let r="function"==typeof e,n="function"==typeof t,i=[],o=[];return function(s,a){if("object"==typeof a){if(i.length){let e=F(i,this);0===e?i[i.length]=this:(i.splice(e),o.splice(e)),o[o.length]=s;let r=F(i,a);if(0!==r)return n?t.call(this,s,a,D(o,r)):`[ref=${D(o,r)}]`}else i[0]=a,o[0]=s}return r?e.call(this,s,a):a}}(t,n),r??void 0)}var B={getItem:e=>"",setItem:(e,t)=>null,removeItem:e=>null};function j({deserialize:e=R,key:t="wagmi",serialize:r=L,storage:n}){return{...n,getItem:(r,i=null)=>{let o=n.getItem(`${t}.${r}`);try{return o?e(o):i}catch(e){return console.warn(e),i}},setItem:(e,i)=>{if(null===i)n.removeItem(`${t}.${e}`);else try{n.setItem(`${t}.${e}`,r(i))}catch(e){console.error(e)}},removeItem:e=>n.removeItem(`${t}.${e}`)}}var U="store",q=class{constructor({autoConnect:e=!1,connectors:t=[new u._],provider:r,storage:a=j({storage:"undefined"!=typeof window?window.localStorage:B}),logger:c={warn:console.warn},webSocketProvider:l}){let p;h(this,o),this.providers=new Map,this.webSocketProviders=new Map,h(this,n,void 0),h(this,i,void 0),this.config={autoConnect:e,connectors:t,logger:c,provider:r,storage:a,webSocketProvider:l};let g="disconnected";if(e)try{let e=a.getItem(U),t=e?.state?.data;g=t?.account?"reconnecting":"connecting",p=t?.chain?.id}catch(e){}this.store=E(m(b(()=>({connectors:"function"==typeof t?t():t,provider:this.getProvider({chainId:p}),status:g,webSocketProvider:this.getWebSocketProvider({chainId:p})}),{name:U,storage:a,partialize:t=>({...e&&{data:{account:t?.data?.account,chain:t?.data?.chain}},chains:t?.chains}),version:2}))),this.storage=a,f(this,i,a?.getItem("wallet")),d(this,o,s).call(this),e&&"undefined"!=typeof window&&setTimeout(async()=>await this.autoConnect(),0)}get chains(){return this.store.getState().chains}get connectors(){return this.store.getState().connectors}get connector(){return this.store.getState().connector}get data(){return this.store.getState().data}get error(){return this.store.getState().error}get lastUsedChainId(){return this.data?.chain?.id}get provider(){return this.store.getState().provider}get status(){return this.store.getState().status}get subscribe(){return this.store.subscribe}get webSocketProvider(){return this.store.getState().webSocketProvider}setState(e){let t="function"==typeof e?e(this.store.getState()):e;this.store.setState(t,!0)}clearState(){this.setState(e=>({...e,chains:void 0,connector:void 0,data:void 0,error:void 0,status:"disconnected"}))}async destroy(){this.connector&&await this.connector.disconnect?.(),f(this,n,!1),this.clearState(),this.store.destroy()}async autoConnect(){if(l(this,n))return;f(this,n,!0),this.setState(e=>({...e,status:e.data?.account?"reconnecting":"connecting"}));let e=l(this,i)?[...this.connectors].sort(e=>e.id===l(this,i)?-1:1):this.connectors,t=!1;for(let r of e){if(!r.ready||!r.isAuthorized)continue;let e=await r.isAuthorized();if(!e)continue;let n=await r.connect();this.setState(e=>({...e,connector:r,chains:r?.chains,data:n,status:"connected"})),t=!0;break}return t||this.setState(e=>({...e,data:void 0,status:"disconnected"})),f(this,n,!1),this.data}getProvider({bust:e,chainId:t}={}){let r=this.providers.get(t??-1);if(r&&!e)return r;let{provider:n}=this.config;return r="function"==typeof n?n({chainId:t}):n,this.providers.set(t??-1,r),r}getWebSocketProvider({bust:e,chainId:t}={}){let r=this.webSocketProviders.get(t??-1);if(r&&!e)return r;let{webSocketProvider:n}=this.config;return(r="function"==typeof n?n({chainId:t}):n)&&this.webSocketProviders.set(t??-1,r),r}setLastUsedConnector(e=null){this.storage?.setItem("wallet",e)}};function G(e){let t=new q(e);return a=t,t}function V(){if(!a)throw Error("No wagmi client found. Ensure you have set up a client: https://wagmi.sh/react/client");return a}
20async function Q({chainId:e,connector:t}){let r=V(),n=r.connector;if(n&&t.id===n.id)throw new eb;try{r.setState(e=>({...e,status:"connecting"}));let n=await t.connect({chainId:e});return r.setLastUsedConnector(t.id),r.setState(e=>({...e,connector:t,chains:t?.chains,data:n,status:"connected"})),r.storage.setItem("connected",!0),{...n,connector:t}}catch(e){throw r.setState(e=>({...e,status:e.connector?"connected":"disconnected"})),e}}n=new WeakMap,i=new WeakMap,o=new WeakSet,s=function(){let e=e=>{this.setState(t=>({...t,data:{...t.data,...e}}))},t=()=>{this.clearState()},r=e=>{this.setState(t=>({...t,error:e}))};this.store.subscribe(({connector:e})=>e,(n,i)=>{i?.off?.("change",e),i?.off?.("disconnect",t),i?.off?.("error",r),n&&(n.on?.("change",e),n.on?.("disconnect",t),n.on?.("error",r))});let{provider:n,webSocketProvider:i}=this.config;("function"==typeof n||"function"==typeof i)&&this.store.subscribe(({data:e})=>e?.chain?.id,e=>{this.setState(t=>({...t,provider:this.getProvider({bust:!0,chainId:e}),webSocketProvider:this.getWebSocketProvider({bust:!0,chainId:e})}))})};var z=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],K=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}
20],H=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{name:"",type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{name:"",type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokeId",type:"uint256"}],outputs:[]}],W=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"}];function J({address:e,abi:t,signerOrProvider:r}){return new k.CH(e,t,r)}async function Y({abi:e,address:t,chainId:r,functionName:n,overrides:i,signer:o,...s}){let a=o??await eu({chainId:r});if(!a)throw new ew;r&&x({chainId:r,signer:a});let u=J({address:t,abi:e,signerOrProvider:a}),c=s.args,l=I({contract:u,functionName:n,args:c}),h=u.populateTransaction[l];if(!h)throw new eE({address:t,functionName:l});let f=[...c??[],...i?[i]:[]],d=await h(...f),p=d.gasLimit||await a.estimateGas(d),m=function(e){try{let t=e.abi.filter(t=>"function"===t.type&&t.name===e.functionName);if(0===t.length)throw Error("Invalid ABI");return t}catch(n){let t=k.CH.getInterface(e.abi).format(_.FormatTypes.full),r=Array.isArray(t)?t:[t];return r.filter(t=>t.includes(e.functionName))}}({abi:e,functionName:n});return{abi:m,address:t,chainId:r,functionName:n,mode:"prepared",request:{...d,gasLimit:p}}}function Z({chainId:e}={}){let t=V();return e&&t.getProvider({chainId:e})||t.provider}function $({chainId:e}={}){let t=V();return e&&t.getWebSocketProvider({chainId:e})||t.webSocketProvider}function X(e,t){let r=V(),n=async()=>t(Z(e)),i=r.subscribe(({provider:e})=>e,n);return i}function ee(e,t){let r=V(),n=async()=>t($(e)),i=r.subscribe(({webSocketProvider:e})=>e,n);return i}async function et({allowFailure:e=!0,chainId:t,contracts:r,overrides:n}){let i=Z({chainId:t});if(!i.chains?.[0])throw new eS;let o=i.network.chainId;if(void 0!==t&&t!==o)throw new ev({chainId:t});let s=i.chains.find(e=>e.id===o);if(!s)throw new ev({chainId:o});if(!s?.contracts?.multicall3)throw new eg({chain:s});if("number"==typeof n?.blockTag&&n?.blockTag<(s.contracts.multicall3.blockCreated??0))throw new eg({blockNumber:n?.blockTag,chain:s});let a=J({address:s.contracts.multicall3.address,abi:W,signerOrProvider:i}),u=r.map(({address:t,abi:r,functionName:n,...i})=>{let{args:o}=i||{},s=J({address:t,abi:r}),a=I({contract:s,functionName:n,args:o});try{let r=s[a];r||T(`"${a}" is not in the interface for contract "${t}"`);let n=s.interface.encodeFunctionData(a,o??[]);return{target:t,allowFailure:e,callData:n}}catch(r){if(!e)throw r;return{target:t,allowFailure:e,callData:"0x"}}}),c=[u,...n?[n]:[]],l=await a.aggregate3(...c);return l.map(({returnData:t,success:n},i)=>{let{address:o,abi:a,functionName:u,...c}=r[i],l=J({address:o,abi:a}),h=c.args,f=I({contract:l,functionName:u,args:h});if(!n){let r;try{l.interface.decodeFunctionResult(f,t)}catch(t){if(r=new e_({address:o,args:h,chainId:s.id,functionName:f,errorMessage:t.message}),!e)throw r;T(r.message)}return null}if("0x"===t){let t=new eA({address:o,args:h,chainId:s.id,functionName:f});if(!e)throw t;return T(t.message),null}try{let e=l.interface.decodeFunctionResult(f,t);return Array.isArray(e)&&1===e.length?e[0]:e}catch(r){let t=new ek({address:o,args:h,chainId:s.id,functionName:f,errorMessage:r.message});if(!e)throw t;return T(t.message),null}})}async function er({address:e,chainId:t,abi:r,functionName:n,overrides:i,...o}){let s=Z({chainId:t}),a=J({address:e,abi:r,signerOrProvider:s}),u=o.args,c=I({contract:a,functionName:n,args:u}),l=a[c];if(!l)throw new eE({address:e,functionName:c});let h=[...u??[],...i?[i]:[]];return l?.(...h)}async function en({allowFailure:e=!0,contracts:t,overrides:r}){try{let n;let i=Z(),o=t.reduce((e,t,r)=>{let n=t.chainId??i.network.chainId;return{...e,[n]:[...e[n]||[],{contract:t,index:r}]}},{}),s=()=>Object.entries(o).map(([t,n])=>et({allowFailure:e,chainId:parseInt(t),contracts:n.map(({contract:e})=>e),overrides:r}));n=e?(await Promise.allSettled(s())).map(e=>{if("fulfilled"===e.status)return e.value;if(e.reason instanceof eg)throw T(e.reason.message),e.reason;return null}).flat():(await Promise.all(s())).flat();let a=Object.values(o).map(e=>e.map(({index:e})=>e)).flat();return n.reduce((e,t,r)=>(e&&(e[a[r]]=t),e),[])}catch(i){if(i instanceof ek||i instanceof eA||i instanceof e_)throw i;let n=()=>t.map(e=>er({...e,overrides:r}));if(e)return(await Promise.allSettled(n())).map((e,r)=>{if("fulfilled"===e.status)return e.value;let{address:n,args:i,chainId:o,functionName:s}=t[r],a=new e_({address:n,functionName:s,chainId:o??1,args:i,errorMessage:e.reason});return T(a.message),null});return await Promise.all(n())}}async function ei({chainId:e}={}){let t=Z({chainId:e}),r=await t.getBlockNumber();return r}async function eo({chainId:e,mode:t,request:r}){let n=await eu();if(!n)throw new ew;if("prepared"===t){if(!r.gasLimit)throw Error("`gasLimit` is required");if(!r.to)throw Error("`to` is required")}e&&x({chainId:e,signer:n});try{let e=n.connectUnchecked?.(),{hash:t,wait:i}=await (e??n).sendTransaction(r);return{hash:t,wait:i}}catch(e){if(4001===e.code||"ACTION_REJECTED"===e.code)throw new eP(e);throw e}}async function es(e){let t;let r=await eu();if(!r)throw new ew;e.chainId&&x({chainId:e.chainId,signer:r}),t="prepared"===e.mode?e.request:(await Y({address:e.address,args:e.args,chainId:e.chainId,abi:e.abi,functionName:e.functionName,overrides:e.overrides})).request;let n=await eo({request:t,mode:"prepared"});return n}async function ea({address:e,chainId:t,formatUnits:r,token:n}){let i=V(),o=Z({chainId:t});if(n){let i=async({abi:i})=>{let o={abi:i,address:n,chainId:t},[s,a,u]=await en({allowFailure:!1,contracts:[{...o,functionName:"balanceOf",args:[e]},{...o,functionName:"decimals"},{...o,functionName:"symbol"}]});return{decimals:a,formatted:(0,_.formatUnits)(s??"0",r??a),symbol:u,value:s}};try{return await i({abi:z})}catch(e){if(e instanceof ek){let{symbol:e,...t}=await i({abi:K});return{symbol:(0,_.parseBytes32String)(e),...t}}throw e}}let s=[...i.provider.chains||[],...i.chains??[]],a=await o.getBalance(e),u=s.find(e=>e.id===o.network.chainId);return{decimals:u?.nativeCurrency.decimals??18,formatted:(0,_.formatUnits)(a??"0",r??"ether"),symbol:u?.nativeCurrency.symbol??"ETH",value:a}}async function eu({chainId:e}={}){let t=V(),r=await t.connector?.getSigner?.({chainId:e})||null;return r}function ec(){let{data:e,connector:t,status:r}=V();switch(r){case"connected":return{address:e?.account,connector:t,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:r};
20case"reconnecting":return{address:e?.account,connector:t,isConnected:!!e?.account,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:r};case"connecting":return{address:e?.account,connector:t,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:r};case"disconnected":return{address:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:r}}}function el(){let e=V(),t=e.data?.chain?.id,r=e.chains??[],n=[...e.provider.chains||[],...r].find(e=>e.id===t)??{id:t,name:`Chain ${t}`,network:`${t}`,nativeCurrency:{name:"Ether",decimals:18,symbol:"ETH"},rpcUrls:{default:{http:[""]},public:{http:[""]}}};return{chain:t?{...n,...e.data?.chain,id:t}:void 0,chains:r}}function eh(e,{selector:t=e=>e}={}){let r=V(),n=()=>e(el()),i=r.subscribe(({data:e,chains:r})=>t({chainId:e?.chain?.id,chains:r}),n,{equalityFn:S});return i}function ef({chainId:e},t){let r=V(),n=async()=>{let r=await eu({chainId:e});return V().connector?t(r):t(null)},i=r.subscribe(({data:e,connector:t})=>({account:e?.account,chainId:e?.chain?.id,connector:t}),n,{equalityFn:S});return i}var ed=class extends Error{constructor(e,t){let{cause:r,code:n,data:i}=t;if(!Number.isInteger(n))throw Error('"code" must be an integer.');if(!e||"string"!=typeof e)throw Error('"message" must be a nonempty string.');
20super(e),this.cause=r,this.code=n,this.data=i}},ep=class extends ed{constructor(e,t){let{cause:r,code:n,data:i}=t;if(!(Number.isInteger(n)&&n>=1e3&&n<=4999))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,{cause:r,code:n,data:i})}},em=class extends Error{constructor(){super(...arguments),this.name="AddChainError",this.message="Error adding chain"}},eg=class extends Error{constructor({blockNumber:e,chain:t}){super(`Chain "${t.name}" does not support multicall${e?` on block ${e}`:""}.`),this.name="ChainDoesNotSupportMulticall"}},ey=class extends Error{constructor({activeChain:e,targetChain:t}){super(`Chain mismatch: Expected "${t}", received "${e}".`),this.name="ChainMismatchError"}},ev=class extends Error{constructor({chainId:e,connectorId:t}){super(`Chain "${e}" not configured${t?` for connector "${t}"`:""}.`),this.name="ChainNotConfigured"}},eb=class extends Error{constructor(){super(...arguments),this.name="ConnectorAlreadyConnectedError",this.message="Connector already connected"}},ew=class extends Error{constructor(){super(...arguments),this.name="ConnectorNotFoundError",this.message="Connector not found"}},eE=class extends Error{constructor({address:e,chainId:t,functionName:r}){let{chains:n,network:i}=Z(),o=n?.find(({id:e})=>e===(t||i.chainId)),s=o?.blockExplorers?.default;super([`Function "${r}" on contract "${e}" does not exist.`,...s?["",`${s?.name}: ${s?.url}/address/${e}#readContract`]:[]].join("\n")),this.name="ContractMethodDoesNotExistError"}},eA=class extends Error{constructor({address:e,args:t,chainId:r,functionName:n}){super(["Contract read returned an empty response. This could be due to any of the following:",`- The contract does not have the function "${n}",`,"- The parameters passed to the contract function may be invalid, or","- The address is not a contract.","","Config:",JSON.stringify({address:e,abi:"...",functionName:n,chainId:r,args:t},null,2)].join("\n")),this.name="ContractMethodNoResultError"}},e_=class extends Error{constructor({address:e,args:t,chainId:r,functionName:n,errorMessage:i}){super(["Contract method reverted with an error.","","Config:",JSON.stringify({address:e,abi:"...",functionName:n,chainId:r,args:t},null,2),"",`Details: ${i}`].join("\n")),this.name="ContractMethodRevertedError"}},ek=class extends Error{constructor({address:e,args:t,chainId:r,functionName:n,errorMessage:i}){super(["Failed to decode contract function result.","","Config:",JSON.stringify({address:e,abi:"...",functionName:n,chainId:r,args:t},null,2),"",`Details: ${i}`].join("\n")),this.name="ContractResultDecodeError"}},eS=class extends Error{constructor(){super(...arguments),this.name="ProviderChainsNotFound",this.message="No chains were found on the wagmi provider. Some functions that require a chain may not work.\n\nIt is recommended to add a list of chains to the provider in `createClient`.\n\nExample:\n\n```\nimport { getDefaultProvider } from 'ethers'\nimport { chain, createClient } from 'wagmi'\n\ncreateClient({\n  provider: Object.assign(getDefaultProvider(), { chains: [chain.mainnet] })\n})\n```"}},eO=class extends ed{constructor(e){super("Resource unavailable",{cause:e,code:-32002}),this.name="ResourceUnavailable"}},ex=class extends ep{constructor(e){super("Error switching chain",{cause:e,code:4902}),this.name="SwitchChainError"}},eP=class extends ep{constructor(e){super("User rejected request",{cause:e,code:4001}),this.name="UserRejectedRequestError"}}},37826:function(e,t,r){"use strict";function n(e,t){if(!e)throw Error(t)}r.d(t,{a:function(){return n}})},25821:function(e,t,r){"use strict";function n(e){return function e(t,r){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return function(t,r){if(null===t)return"null";if(r.includes(t))return"[Circular]";let n=[...r,t];if("function"==typeof t.toJSON){let r=t.toJSON();if(r!==t)return"string"==typeof r?r:e(r,n)}else if(Array.isArray(t))return function(t,r){if(0===t.length)return"[]";if(r.length>2)return"[Array]";let n=Math.min(10,t.length),i=t.length-n,o=[];for(let i=0;i<n;++i)o.push(e(t[i],r));return 1===i?o.push("... 1 more item"):i>1&&o.push(`... ${i} more items`),"["+o.join(", ")+"]"}(t,n);return function(t,r){let n=Object.entries(t);if(0===n.length)return"{}";if(r.length>2)return"["+function(e){let t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){let t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(t)+"]";let i=n.map(([t,n])=>t+": "+e(n,r));return"{ "+i.join(", ")+" }"}(t,n)}(t,r);default:return String(t)}}(e,[])}r.d(t,{X:function(){return n}})},72380:function(e,t,r){"use strict";var n,i;r.d(t,{UG:function(){return c},WU:function(){return s},Ye:function(){return o},h8:function(){return a},ku:function(){return n}});class o{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class s{constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}let a={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],Float
20Value:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},u=new Set(Object.keys(a));function c(e){let t=null==e?void 0:e.kind;return"string"==typeof t&&u.has(t)}(i=n||(n={})).QUERY="query",i.MUTATION="mutation",i.SUBSCRIPTION="subscription"},87392:function(e,t,r){"use strict";r.d(t,{LZ:function(){return o},wv:function(){return i}});var n=r(68297);function i(e){var t,r;let i=Number.MAX_SAFE_INTEGER,o=null,s=-1;for(let t=0;t<e.length;++t){let a=e[t],u=function(e){let t=0;for(;t<e.length&&(0,n.FD)(e.charCodeAt(t));)++t;return t}(a);u!==a.length&&(o=null!==(r=o)&&void 0!==r?r:t,s=t,0!==t&&u<i&&(i=u))}return e.map((e,t)=>0===t?e:e.slice(i)).slice(null!==(t=o)&&void 0!==t?t:0,s+1)}function o(e,t){let r=e.replace(/"""/g,'\\"""'),i=r.split(/\r\n|[\n\r]/g),o=1===i.length,s=i.length>1&&i.slice(1).every(e=>0===e.length||(0,n.FD)(e.charCodeAt(0))),a=r.endsWith('\\"""'),u=e.endsWith('"')&&!a,c=e.endsWith("\\"),l=u||c,h=!(null!=t&&t.minimize)&&(!o||e.length>70||l||s||a),f="",d=o&&(0,n.FD)(e.charCodeAt(0));return(h&&!d||s)&&(f+="\n"),f+=r,(h||l)&&(f+="\n"),'"""'+f+'"""'}},68297:function(e,t,r){"use strict";function n(e){return 9===e||32===e}function i(e){return e>=48&&e<=57}function o(e){return e>=97&&e<=122||e>=65&&e<=90}function s(e){return o(e)||95===e}function a(e){return o(e)||i(e)||95===e}r.d(t,{FD:function(){return n},HQ:function(){return a},LQ:function(){return s},X1:function(){return i}})},97359:function(e,t,r){"use strict";var n,i;r.d(t,{h:function(){return n}}),(i=n||(n={})).NAME="Name",i.DOCUMENT="Document",i.OPERATION_DEFINITION="OperationDefinition",i.VARIABLE_DEFINITION="VariableDefinition",i.SELECTION_SET="SelectionSet",i.FIELD="Field",i.ARGUMENT="Argument",i.FRAGMENT_SPREAD="FragmentSpread",i.INLINE_FRAGMENT="InlineFragment",i.FRAGMENT_DEFINITION="FragmentDefinition",i.VARIABLE="Variable",i.INT="IntValue",i.FLOAT="FloatValue",i.STRING="StringValue",i.BOOLEAN="BooleanValue",i.NULL="NullValue",i.ENUM="EnumValue",i.LIST="ListValue",i.OBJECT="ObjectValue",i.OBJECT_FIELD="ObjectField",i.DIRECTIVE="Directive",i.NAMED_TYPE="NamedType",i.LIST_TYPE="ListType",i.NON_NULL_TYPE="NonNullType",i.SCHEMA_DEFINITION="SchemaDefinition",i.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",i.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",i.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",i.FIELD_DEFINITION="FieldDefinition",i.INPUT_VALUE_DEFINITION="InputValueDefinition",i.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",i.UNION_TYPE_DEFINITION="UnionTypeDefinition",i.ENUM_TYPE_DEFINITION="EnumTypeDefinition",i.ENUM_VALUE_DEFINITION="EnumValueDefinition",i.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",i.DIRECTIVE_DEFINITION="DirectiveDefinition",i.SCHEMA_EXTENSION="SchemaExtension",i.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",i.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",i.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",i.UNION_TYPE_EXTENSION="UnionTypeExtension",i.ENUM_TYPE_EXTENSION="EnumTypeExtension",i.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"},51270:function(e,t,r){"use strict";r.d(t,{H:function(){return o},T:function(){return s}});var n=r(37826),i=r(25821);class o{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||(0,n.a)(!1,`Body must be a string. Received: ${(0,i.X)(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||(0,n.a)(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,n.a)(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function s(e){return e instanceof o}},77304:function(e,t,r){"use strict";r.d(t,{$_:function(){return a},Vn:function(){return u}});var n=r(37826),i=r(25821),o=r(72380),s=r(97359);let a=Object.freeze({});
20function u(e,t,r=o.h8){let u,c,l;let h=new Map;for(let e of Object.values(s.h))h.set(e,function(e,t){let r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}(t,e));let f=Array.isArray(e),d=[e],p=-1,m=[],g=e,y=[],v=[];do{var b,w,E;let e;p++;let s=p===d.length,A=s&&0!==m.length;if(s){if(c=0===v.length?void 0:y[y.length-1],g=l,l=v.pop(),A){if(f){g=g.slice();let e=0;for(let[t,r]of m){let n=t-e;null===r?(g.splice(n,1),e++):g[n]=r}}else for(let[e,t]of(g=Object.defineProperties({},Object.getOwnPropertyDescriptors(g)),m))g[e]=t}p=u.index,d=u.keys,m=u.edits,f=u.inArray,u=u.prev}else if(l){if(null==(g=l[c=f?p:d[p]]))continue;y.push(c)}if(!Array.isArray(g)){(0,o.UG)(g)||(0,n.a)(!1,`Invalid AST Node: ${(0,i.X)(g)}.`);let r=s?null===(b=h.get(g.kind))||void 0===b?void 0:b.leave:null===(w=h.get(g.kind))||void 0===w?void 0:w.enter;if((e=null==r?void 0:r.call(t,g,c,l,y,v))===a)break;if(!1===e){if(!s){y.pop();continue}}else if(void 0!==e&&(m.push([c,e]),!s)){if((0,o.UG)(e))g=e;else{y.pop();continue}}}void 0===e&&A&&m.push([c,g]),s?y.pop():(u={inArray:f,index:p,keys:d,edits:m,prev:u},d=(f=Array.isArray(g))?g:null!==(E=r[g.kind])&&void 0!==E?E:[],p=-1,m=[],l&&v.push(l),l=g)}while(void 0!==u);return 0!==m.length?m[m.length-1][1]:e}},66128:function(e,t,r){"use strict";r.d(t,{U6:function(){return d},ej:function(){return u},kG:function(){return c}});var n,i=r(70655),o="Invariant Violation",s=Object.setPrototypeOf,a=void 0===s?function(e,t){return e.__proto__=t,e}:s,u=function(e){function t(r){void 0===r&&(r=o);var n=e.call(this,"number"==typeof r?o+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=o,a(n,t.prototype),n}return(0,i.__extends)(t,e),t}(Error);function c(e,t){if(!e)throw new u(t)}var l=["debug","log","warn","error","silent"],h=l.indexOf("log");function f(e){return function(){if(l.indexOf(e)>=h)return(console[e]||console.log).apply(console,arguments)}}function d(e){var t=l[h];return h=Math.max(0,l.indexOf(e)),t}(n=c||(c={})).debug=f("debug"),n.log=f("log"),n.warn=f("warn"),n.error=f("error")},69077:function(e,t,r){"use strict";let n;function i(){}r.d(t,{eM:function(){return ew},eI:function(){return ey},mA:function(){return eN},KQ:function(){return eD},$4:function(){return eB},do:function(){return eG},GG:function(){return eQ},PJ:function(){return ez},mx:function(){return eq}});let o="undefined"==typeof window||"Deno"in window;function s(){}function a(e){return"number"==typeof e&&e>=0&&e!==1/0}function u(e,t){return Math.max(e+(t||0)-Date.now(),0)}function c(e,t,r){return A(e)?"function"==typeof t?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function l(e,t,r){return A(e)?"function"==typeof t?{...r,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}function h(e,t,r){return A(e)?[{...t,queryKey:e},r]:[e||{},t]}function f(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(A(s)){if(n){if(t.queryHash!==p(s,t.options))return!1}else{if(!g(t.queryKey,s))return!1}}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(void 0===i||i===t.state.fetchStatus)&&(!o||!!o(t))}function d(e,t){let{exact:r,fetching:n,predicate:i,mutationKey:o}=e;if(A(o)){if(!t.options.mutationKey)return!1;if(r){if(m(t.options.mutationKey)!==m(o))return!1}else{if(!g(t.options.mutationKey,o))return!1}}return("boolean"!=typeof n||"loading"===t.state.status===n)&&(!i||!!i(t))}function p(e,t){let r=(null==t?void 0:t.queryKeyHashFn)||m;return r(e)}function m(e){return JSON.stringify(e,(e,t)=>w(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function g(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!g(e[r],t[r]))}function y(e,t){if(e===t)return e;let r=b(e)&&b(t);if(r||w(e)&&w(t)){let n=r?e.length:Object.keys(e).length,i=r?t:Object.keys(t),o=i.length,s=r?[]:{},a=0;for(let n=0;n<o;n++){let o=r?n:i[n];s[o]=y(e[o],t[o]),s[o]===e[o]&&a++}return n===o&&a===n?e:s}return t}function v(e,t){if(e&&!t||t&&!e)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function w(e){if(!E(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(E(r)&&r.hasOwnProperty("isPrototypeOf"))}function E(e){return"[object Object]"===Object.prototype.toString.call(e)}function A(e){return Array.isArray(e)}function _(e){return new Promise(t=>{setTimeout(t,e)})}function k(e){_(0).then(e)}function S(e,t,r){return null!=r.isDataEqual&&r.isDataEqual(e,t)?e:"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?y(e,t):t}let O=console,x=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=e=>{let r;t++;try{r=e()}finally{--t||a()}return r},o=n=>{t?e.push(n):k(()=>{r(n)})},s=e=>(...t)=>{o(()=>{e(...t)})},a=()=>{let t=e;e=[],t.length&&k(()=>{n(()=>
20{t.forEach(e=>{r(e)})})})},u=e=>{r=e},c=e=>{n=e};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:u,setBatchNotifyFunction:c}}();class P{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.push(e),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(t=>t!==e),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}let C=new class extends P{constructor(){super(),this.setup=e=>{if(!o&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},R=new class extends P{constructor(){super(),this.setup=e=>{if(!o&&window.addEventListener){let t=()=>e();return window.addEventListener("online",t,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setOnline(e):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(e=>{e()})}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}};function I(e){return Math.min(1e3*2**e,3e4)}function T(e){return(null!=e?e:"online")!=="online"||R.isOnline()}class N{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function M(e){return e instanceof N}function D(e){let t,r,n,i=!1,o=0,s=!1,a=new Promise((e,t)=>{r=e,n=t}),u=t=>{s||(d(new N(t)),null==e.abort||e.abort())},c=()=>{i=!0},l=()=>{i=!1},h=()=>!C.isFocused()||"always"!==e.networkMode&&!R.isOnline(),f=n=>{s||(s=!0,null==e.onSuccess||e.onSuccess(n),null==t||t(),r(n))},d=r=>{s||(s=!0,null==e.onError||e.onError(r),null==t||t(),n(r))},p=()=>new Promise(r=>{t=e=>{let t=s||!h();return t&&r(e),t},null==e.onPause||e.onPause()}).then(()=>{t=void 0,s||null==e.onContinue||e.onContinue()}),m=()=>{let t;if(!s){try{t=e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(f).catch(t=>{var r,n;if(s)return;let a=null!=(r=e.retry)?r:3,u=null!=(n=e.retryDelay)?n:I,c="function"==typeof u?u(o,t):u,l=!0===a||"number"==typeof a&&o<a||"function"==typeof a&&a(o,t);if(i||!l){d(t);return}o++,null==e.onFail||e.onFail(o,t),_(c).then(()=>{if(h())return p()}).then(()=>{i?d(t):m()})})}};return T(e.networkMode)?m():p().then(m),{promise:a,cancel:u,continue:()=>{let e=null==t?void 0:t();return e?a:Promise.resolve()},cancelRetry:c,continueRetry:l}}class F{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),a(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:o?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class L extends F{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||O,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdate
20Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){let r=S(this.state.data,e,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;let r=this.promise;return null==(t=this.retryer)||t.cancel(e),r?r.then(s).catch(s):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!u(this.state.dataUpdatedAt,e)}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){-1!==this.observers.indexOf(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var r,n,i,o;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(i=this.retryer)||i.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}Array.isArray(this.options.queryKey);let s=function(){if("function"==typeof AbortController)return new AbortController}(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};u(a);let c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn"),l={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};u(l),null==(r=this.options.behavior)||r.onFetch(l),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(n=l.fetchOptions)?void 0:n.meta))&&this.dispatch({type:"fetch",meta:null==(o=l.fetchOptions)?void 0:o.meta});let h=e=>{if(M(e)&&e.silent||this.dispatch({type:"error",error:e}),!M(e)){var t,r,n,i;null==(t=(r=this.cache.config).onError)||t.call(r,e,this),null==(n=(i=this.cache.config).onSettled)||n.call(i,this.state.data,e,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=D({fn:l.fetchFn,abort:null==s?void 0:s.abort.bind(s),onSuccess:e=>{var t,r,n,i;if(void 0===e){h(Error(this.queryHash+" data is undefined"));return}this.setData(e),null==(t=(r=this.cache.config).onSuccess)||t.call(r,e,this),null==(n=(i=this.cache.config).onSettled)||n.call(i,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:h,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var r,n;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(r=e.meta)?r:null,fetchStatus:T(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(n=e.dataUpdatedAt)?n:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let i=e.error;if(M(i)&&i.revert&&this.revertState)return{...this.revertState};
20return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),x.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}class B extends P{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,r){var n;let i=t.queryKey,o=null!=(n=t.queryHash)?n:p(i,t),s=this.get(o);return s||(s=new L({cache:this,logger:e.getLogger(),queryKey:i,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(s)),s}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){let t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(t=>t!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){x.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){let[r]=h(e,t);return void 0===r.exact&&(r.exact=!0),this.queries.find(e=>f(r,e))}findAll(e,t){let[r]=h(e,t);return Object.keys(r).length>0?this.queries.filter(e=>f(r,e)):this.queries}notify(e){x.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){x.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){x.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class j extends F{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||O,this.observers=[],this.state=e.state||U(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){-1===this.observers.indexOf(e)&&(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){var e,t,r,n,i,o,s,a,u,c,l,h,f,d,p,m,g,y,v,b;let w="loading"===this.state.status;try{if(!w){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(u=(c=this.mutationCache.config).onMutate)?void 0:u.call(c,this.state.variables,this));let e=await (null==(l=(h=this.options).onMutate)?void 0:l.call(h,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}let f=await (()=>{var e;return this.retryer=D({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise})();return await (null==(e=(t=this.mutationCache.config).onSuccess)?void 0:e.call(t,f,this.state.variables,this.state.context,this)),await (null==(r=(n=this.options).onSuccess)?void 0:r.call(n,f,this.state.variables,this.state.context)),await (null==(i=(o=this.mutationCache.config).onSettled)?void 0:i.call(o,f,null,this.state.variables,this.state.context,this)),await (null==(s=(a=this.options).onSettled)?void 0:s.call(a,f,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:f}),f}catch(e){try{throw await (null==(f=(d=this.mutationCache.config).onError)?void 0:f.call(d,e,this.state.variables,this.state.context,this)),await (null==(p=(m=this.options).onError)?void 0:p.call(m,e,this.state.variables,this.state.context)),await (null==(g=(y=this.mutationCache.config).onSettled)?void 0:g.call(y,void 0,e,this.state.variables,this.state.context,this)),await (null==(v=(b=this.options).onSettled)?void 0:v.call(b,void 0,e,this.state.variables,this.state.context)),e}finally{this.dispatch({type:"error",error:e})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!T(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
20sed:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),x.batch(()=>{this.observers.forEach(t=>{t.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function U(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class q extends P{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,r){let n=new j({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:r,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(n),n}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){x.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(t=>d(e,t))}findAll(e){return this.mutations.filter(t=>d(e,t))}notify(e){x.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then(()=>{let e=this.mutations.filter(e=>
20e.state.isPaused);return x.batch(()=>e.reduce((e,t)=>e.then(()=>t.continue().catch(s)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function G(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}class V{constructor(e={}){this.queryCache=e.queryCache||new B,this.mutationCache=e.mutationCache||new q,this.logger=e.logger||O,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=C.subscribe(()=>{C.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=R.subscribe(()=>{R.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){let[r]=h(e,t);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state.data}ensureQueryData(e,t,r){let n=c(e,t,r),i=this.getQueryData(n.queryKey);return i?Promise.resolve(i):this.fetchQuery(n)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>{let r=t.data;return[e,r]})}setQueryData(e,t,r){let n=this.queryCache.find(e),i=null==n?void 0:n.state.data,o="function"==typeof t?t(i):t;if(void 0===o)return;let s=c(e),a=this.defaultQueryOptions(s);return this.queryCache.build(this,a).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return x.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state}removeQueries(e,t){let[r]=h(e,t),n=this.queryCache;x.batch(()=>{n.findAll(r).forEach(e=>{n.remove(e)})})}resetQueries(e,t,r){let[n,i]=h(e,t,r),o=this.queryCache,s={type:"active",...n};return x.batch(()=>(o.findAll(n).forEach(e=>{e.reset()}),this.refetchQueries(s,i)))}cancelQueries(e,t,r){let[n,i={}]=h(e,t,r);void 0===i.revert&&(i.revert=!0);let o=x.batch(()=>this.queryCache.findAll(n).map(e=>e.cancel(i)));return Promise.all(o).then(s).catch(s)}invalidateQueries(e,t,r){let[n,i]=h(e,t,r);return x.batch(()=>{var e,t;if(this.queryCache.findAll(n).forEach(e=>{e.invalidate()}),"none"===n.refetchType)return Promise.resolve();let r={...n,type:null!=(e=null!=(t=n.refetchType)?t:n.type)?e:"active"};return this.refetchQueries(r,i)})}refetchQueries(e,t,r){let[n,i]=h(e,t,r),o=x.batch(()=>this.queryCache.findAll(n).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...i,cancelRefetch:null==(t=null==i?void 0:i.cancelRefetch)||t,meta:{refetchPage:n.refetchPage}})})),a=Promise.all(o).then(s);return null!=i&&i.throwOnError||(a=a.catch(s)),a}fetchQuery(e,t,r){let n=c(e,t,r),i=this.defaultQueryOptions(n);void 0===i.retry&&(i.retry=!1);let o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(e,t,r){return this.fetchQuery(e,t,r).then(s).catch(s)}fetchInfiniteQuery(e,t,r){let n=c(e,t,r);return n.behavior={onFetch:e=>{e.fetchFn=()=>{var t,r,n,i,o,s,a;let u;let c=null==(t=e.fetchOptions)?void 0:null==(r=t.meta)?void 0:r.refetchPage,l=null==(n=e.fetchOptions)?void 0:null==(i=n.meta)?void 0:i.fetchMore,h=null==l?void 0:l.pageParam,f=(null==l?void 0:l.direction)==="forward",d=(null==l?void 0:l.direction)==="backward",p=(null==(o=e.state.data)?void 0:o.pages)||[],m=(null==(s=e.state.data)?void 0:s.pageParams)||[],g=m,y=!1,v=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{var t,r;return null!=(t=e.signal)&&t.aborted?y=!0:null==(r=e.signal)||r.addEventListener("abort",()=>{y=!0}),e.signal}})},b=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),w=(e,t,r,n)=>(g=n?[t,...g]:[...g,t],n?[r,...e]:[...e,r]),E=(t,r,n,i)=>{if(y)return Promise.reject("Cancelled");if(void 0===n&&!r&&t.length)return Promise.resolve(t);let o={queryKey:e.queryKey,pageParam:n,meta:e.options.meta};v(o);let s=b(o),a=Promise.resolve(s).then(e=>w(t,n,e,i));return a};if(p.length){if(f){let t=void 0!==h,r=t?h:G(e.options,p);u=E(p,t,r)}else if(d){let t=void 0!==h,r=t?h:null==(a=e.options).getPreviousPageParam?void 0:a.getPreviousPageParam(p[0],p);u=E(p,t,r,!0)}else{g=[];let t=void 0===e.options.getNextPageParam,r=!c||!p[0]||c(p[0],0,p);u=r?E([],t,m[0]):Promise.resolve(w([],m[0],p[0]));for(let r=1;r<p.length;r++)u=u.then(n=>{let i=!c||!p[r]||c(p[r],r,p);if(i){let i=t?m[r]:G(e.options,n);return E(n,t,i)}return Promise.resolve(w(n,m[r],p[r]))})}}else u=E([]);let A=u.then(e=>({pages:e,pageParams:g}));return A}}},this.fetchQuery(n)}prefetchInfiniteQuery(e,t,r){return this.fetchInfiniteQuery(e,t,r).then(s).catch(s)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){let r=this.queryDefaults.find(t=>m(e)===m(t.queryKey));r?r.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;let t=this.queryDefaults.find(t=>g(e,t.queryKey));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){let r=this.mutationDefaults.find(t=>m(e)===m(t.mutationKey));r?r.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;let t=this.mutationDefaults.find(t=>g(e,t.mutationKey));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;let t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=p(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}
20function Q(e){return e.state.isPaused}function z(e){return"success"===e.state.status}let K=["added","removed","updated"];function H(e){return K.includes(e)}async function W({queryClient:e,persister:t,maxAge:r=864e5,buster:n="",hydrateOptions:i}){try{let o=await t.restoreClient();if(o){if(o.timestamp){let s=Date.now()-o.timestamp>r,a=o.buster!==n;s||a?t.removeClient():function(e,t,r){if("object"!=typeof t||null===t)return;let n=e.getMutationCache(),i=e.getQueryCache(),o=t.mutations||[],s=t.queries||[];o.forEach(t=>{var i;n.build(e,{...null==r?void 0:null==(i=r.defaultOptions)?void 0:i.mutations,mutationKey:t.mutationKey},t.state)}),s.forEach(t=>{var n;let o=i.get(t.queryHash),s={...t.state,fetchStatus:"idle"};if(o){o.state.dataUpdatedAt<s.dataUpdatedAt&&o.setState(s);return}i.build(e,{...null==r?void 0:null==(n=r.defaultOptions)?void 0:n.queries,queryKey:t.queryKey,queryHash:t.queryHash},s)})}(e,o.clientState,i)}else t.removeClient()}}catch(e){t.removeClient()}}async function J({queryClient:e,persister:t,buster:r="",dehydrateOptions:n}){let i={buster:r,timestamp:Date.now(),clientState:function(e,t={}){let r=[],n=[];if(!1!==t.dehydrateMutations){let n=t.shouldDehydrateMutation||Q;e.getMutationCache().getAll().forEach(e=>{n(e)&&r.push({mutationKey:e.options.mutationKey,state:e.state})})}if(!1!==t.dehydrateQueries){let r=t.shouldDehydrateQuery||z;e.getQueryCache().getAll().forEach(e=>{r(e)&&n.push({state:e.state,queryKey:e.queryKey,queryHash:e.queryHash})})}return{mutations:r,queries:n}}(e,n)};await t.persistClient(i)}var Y=r(99937),Z=r(67294);let $=Z.createContext(void 0),X=Z.createContext(!1);function ee(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=$),window.ReactQueryClientContext):$)}let et=({context:e}={})=>{let t=Z.useContext(ee(e,Z.useContext(X)));if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},er=({client:e,children:t,context:r,contextSharing:n=!1})=>{Z.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let i=ee(r,n);return Z.createElement(X.Provider,{value:!r&&n},Z.createElement(i.Provider,{value:e},t))},en=Z.createContext(!1),ei=()=>Z.useContext(en);en.Provider;let eo=Z.createContext((n=!1,{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n})),es=()=>Z.useContext(eo);var ea=r(61688);let eu=ea.useSyncExternalStore;class ec extends P{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let r=this.options;this.options=this.client.defaultMutationOptions(e),v(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){if(!this.listeners.length){var e;null==(e=this.currentMutation)||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();let t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let e=this.currentMutation?this.currentMutation.state:U(),t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){x.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var t,r,n,i,o,s,a,u;e.onSuccess?(null==(t=(r=this.mutateOptions).onSuccess)||t.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(n=(i=this.mutateOptions).onSettled)||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):e.onError&&(null==(o=(s=this.mutateOptions).onError)||o.call(s,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(a=(u=this.mutateOptions).onSettled)||a.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}
20e.listeners&&this.listeners.forEach(e=>{e(this.currentResult)})})}}function el(){}class eh extends P{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.length&&(this.currentQuery.addObserver(this),ef(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return ed(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ed(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){let r=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),v(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();let i=this.hasListeners();i&&ep(this.currentQuery,n,this.options,r)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();let o=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==r.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(e){let t=this.client.getQueryCache().build(this.client,e);return this.createResult(t,e)}getCurrentResult(){return this.currentResult}trackResult(e){let t={};return Object.keys(e).forEach(r=>{Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),e[r])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){let t=this.client.defaultQueryOptions(e),r=this.client.getQueryCache().build(this.client,t);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(s)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),o||this.currentResult.isStale||!a(this.options.staleTime))return;let e=u(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e+1)}computeRefetchInterval(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!o&&!1!==this.options.enabled&&a(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||C.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){let r;let n=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,u=e!==n,c=u?e.state:this.currentQueryInitialState,l=u?this.currentResult:this.previousQueryResult,{state:h}=e,{dataUpdatedAt:f,error:d,errorUpdatedAt:p,fetchStatus:m,status:g}=h,y=!1,v=!1;if(t._optimisticResults){let r=this.hasListeners(),o=!r&&ef(e,t),s=r&&ep(e,n,t,i);(o||s)&&(m=T(e.options.networkMode)?"fetching":"paused",f||(g="loading")),"isRestoring"===t._optimisticResults&&(m="idle")}if(t.keepPreviousData&&!h.dataUpdatedAt&&null!=l&&l.isSuccess&&"error"!==g)r=l.data,f=l.dataUpdatedAt,g=l.status,y=!0;else if(t.select&&void 0!==h.data){if(o&&h.data===(null==s?void 0:s.data)&&t.select===this.selectFn)r=this.selectResult;else try{this.selectFn=t.select,r=t.select(h.data),r=S(null==o?void 0:o.data,r,t),this.selectResult=r,this.selectError=null}catch(e){this.selectError=e}}else r=h.data;if(void 0!==t.placeholderData&&void 0===r&&"loading"===g){let e;if(null!=o&&o.isPlaceholderData&&t.placeholderData===(null==a?void 0:a.placeholderData))e=o.data;else if(e="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.selectError=null}catch(e){this.selectError=e}void 0!==e&&(g="success",r=S(null==o?void 0:o.data,e,t),v=!0)}this.selectError&&(d=this.selectError,r=this.selectResult,p=Date.now(),g="error");let b="fetching"===m,w="loading"===g,E="error"===g,A={status:g,fetchStatus:m,isLoading:w,isSuccess:"success"===g,isError:E,isInitialLoading:w&&b,data:r,dataUpdatedAt:f,error:d,errorUpdatedAt:p,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdate
20Count:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:E&&0===h.dataUpdatedAt,isPaused:"paused"===m,isPlaceholderData:v,isPreviousData:y,isRefetchError:E&&0!==h.dataUpdatedAt,isStale:em(e,t),refetch:this.refetch,remove:this.remove};return A}updateResult(e){let t=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,v(r,t))return;this.currentResult=r;let n={cache:!0};(null==e?void 0:e.listeners)!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options;if("all"===e||!e&&!this.trackedProps.size)return!0;let r=new Set(null!=e?e:this.trackedProps);return this.options.useErrorBoundary&&r.add("error"),Object.keys(this.currentResult).some(e=>{let n=this.currentResult[e]!==t[e];return n&&r.has(e)})})()&&(n.listeners=!0),this.notify({...n,...e})}updateQuery(){let e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;let t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){let t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||M(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){x.batch(()=>{var t,r,n,i,o,s,a,u;e.onSuccess?(null==(t=(r=this.options).onSuccess)||t.call(r,this.currentResult.data),null==(n=(i=this.options).onSettled)||n.call(i,this.currentResult.data,null)):e.onError&&(null==(o=(s=this.options).onError)||o.call(s,this.currentResult.error),null==(a=(u=this.options).onSettled)||a.call(u,void 0,this.currentResult.error)),e.listeners&&this.listeners.forEach(e=>{e(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function ef(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOnMount)||e.state.dataUpdatedAt>0&&ed(e,t,t.refetchOnMount)}function ed(e,t,r){if(!1!==t.enabled){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&em(e,t)}return!1}function ep(e,t,r,n){return!1!==r.enabled&&(e!==t||!1===n.enabled)&&(!r.suspense||"error"!==e.state.status)&&em(e,r)}function em(e,t){return e.isStaleByTime(t.staleTime)}var eg=r(52798);function ey({queryClient:e=new V({defaultOptions:{queries:{cacheTime:864e5,networkMode:"offlineFirst",refetchOnWindowFocus:!1,retry:0},mutations:{networkMode:"offlineFirst"}}}),storage:t=(0,Y.o6)({storage:"undefined"!=typeof window&&window.localStorage?window.localStorage:Y.wp}),persister:r="undefined"!=typeof window?function({storage:e,key:t="REACT_QUERY_OFFLINE_CACHE",throttleTime:r=1e3,serialize:n=JSON.stringify,deserialize:o=JSON.parse,retry:s}){if(e){let i=r=>{try{e.setItem(t,n(r));return}catch(e){return e}};return{persistClient:function(e,t=100){let r=null;return function(...n){null===r&&(r=setTimeout(()=>{e(...n),r=null},t))}}(e=>{let t=e,r=i(t),n=0;for(;r&&t;)n++,(t=null==s?void 0:s({persistedClient:t,error:r,errorCount:n}))&&(r=i(t))},r),restoreClient:()=>{let r=e.getItem(t);if(r)return o(r)},removeClient:()=>{e.removeItem(t)}}}return{persistClient:i,restoreClient:()=>void 0,removeClient:i}}({key:"cache",storage:t,serialize:e=>e,deserialize:e=>e}):void 0,...n}){let o=(0,Y.eI)({...n,storage:t});return r&&function(e){let t;W(e).then(()=>{(function(e){let t=e.queryClient.getQueryCache().subscribe(t=>{H(t.type)&&J(e)}),r=e.queryClient.getMutationCache().subscribe(t=>{H(t.type)&&J(e)});()=>{t(),r()}})(e)})}({queryClient:e,persister:r,dehydrateOptions:{shouldDehydrateQuery:e=>0!==e.cacheTime&&!1!==e.queryKey[0].persist}}),Object.assign(o,{queryClient:e})}var ev=Z.createContext(void 0),eb=Z.createContext(void 0);function ew({children:e,client:t}){return Z.createElement(ev.Provider,{children:Z.createElement(er,{children:e,client:t.queryClient,context:eb}),value:t})}var eE=ea.useSyncExternalStore;function eA(e,t,r){let n=l(e,t,r);return function(e,t,r){var n,i;let o=l(e,void 0,void 0),s=et({context:o.context}),[a]=Z.useState(()=>new ec(s,o));Z.useEffect(()=>{a.setOptions(o)},[a,o]);let u=eu(Z.useCallback(e=>a.subscribe(x.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),c=Z.useCallback((e,t)=>{a.mutate(e,t).catch(el)},[a]);if(u.error&&(n=a.options.useErrorBoundary,i=[u.error],"function"==typeof n?n(...i):!!n))throw u.error;return{...u,mutate:c,mutateAsync:u.mutate}}({context:eb,...n})}function e_(e,t,r){let n=Array.isArray(e)?"function"==typeof t?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e,i=function(e,t){var r,n;let i=et({context:e.context}),o=ei(),s=es(),a=i.defaultQueryOptions(e);a._optimisticResults=o?"isRestoring":"optimistic",a.onError&&(a.onError=x.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=x.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=x.batchCalls(a.onSettled)),a.suspense&&"number"!=typeof a.staleTime&&(a.staleTime=1e3),(a.suspense||a.useErrorBoundary)&&!s.isReset()&&(a.retryOnMount=!1);let[u]=Z.useState(()=>new t(i,a)),c=u.getOptimisticResult(a);if(eE(Z.useCallback(e=>o?()=>void 0:u.subscribe(x.batchCalls(e)),[u,o]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),Z.useEffect(()=>{s.clearReset()},[s]),Z.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),a.suspense&&c.isLoading&&c.isFetching&&!o)throw u.fetchOptimistic(a).then(({data:e})=>{a.onSuccess?.(e),a.onSettled?.(e,null)}
20).catch(e=>{s.clearReset(),a.onError?.(e),a.onSettled?.(void 0,e)});if(c.isError&&!s.isReset()&&!c.isFetching&&(r=a.useErrorBoundary,n=[c.error,u.getCurrentQuery()],"function"==typeof r?r(...n):!!r))throw c.error;let l="loading"===c.status&&"idle"===c.fetchStatus?"idle":c.status,h="loading"===l&&"fetching"===c.fetchStatus;return{...c,defaultedOptions:a,isIdle:"idle"===l,isLoading:h,observer:u,status:l}}({context:eb,...n},eh),o={data:i.data,error:i.error,fetchStatus:i.fetchStatus,isError:i.isError,isFetched:i.isFetched,isFetchedAfterMount:i.isFetchedAfterMount,isFetching:i.isFetching,isIdle:i.isIdle,isLoading:i.isLoading,isRefetching:i.isRefetching,isSuccess:i.isSuccess,refetch:i.refetch,status:i.status,internal:{dataUpdatedAt:i.dataUpdatedAt,errorUpdatedAt:i.errorUpdatedAt,failureCount:i.failureCount,isFetchedAfterMount:i.isFetchedAfterMount,isLoadingError:i.isLoadingError,isPaused:i.isPaused,isPlaceholderData:i.isPlaceholderData,isPreviousData:i.isPreviousData,isRefetchError:i.isRefetchError,isStale:i.isStale,remove:i.remove}};return i.defaultedOptions.notifyOnChangeProps?o:function(e,t){let r={};return Object.keys(e).forEach(n=>{Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:()=>(t.trackedProps.add(n),e[n])})}),r}(o,i.observer)}var ek=()=>et({context:eb});function eS({chainId:e}={}){return(0,eg.useSyncExternalStoreWithSelector)(t=>(0,Y.b0)({chainId:e},t),()=>(0,Y.VH)({chainId:e}),()=>(0,Y.VH)({chainId:e}),e=>e,(e,t)=>e.network.chainId===t.network.chainId)}function eO({chainId:e}={}){let t=eS({chainId:e});return t.network.chainId}function ex({chainId:e,scopeKey:t}){return[{entity:"blockNumber",chainId:e,scopeKey:t}]}function eP({queryKey:[{chainId:e}]}){return(0,Y.RQ)({chainId:e})}function eC({cacheTime:e=0,chainId:t,enabled:r=!0,scopeKey:n,staleTime:i,suspense:o,watch:s=!1,onBlock:a,onError:u,onSettled:c,onSuccess:l}={}){let h=eO({chainId:t}),f=eS({chainId:h}),d=function({chainId:e}={}){return(0,eg.useSyncExternalStoreWithSelector)(t=>(0,Y.Fx)({chainId:e},t),()=>(0,Y.lG)({chainId:e}),()=>(0,Y.lG)({chainId:e}),e=>e,(e,t)=>e?.network.chainId===t?.network.chainId)}({chainId:h}),p=ek();return Z.useEffect(()=>{if(!r||!s&&!a)return;let e=(0,Y.Ds)(e=>{s&&p.setQueryData(ex({chainId:h,scopeKey:n}),e),a&&a(e)},1),t=d??f;return t.on("block",e),()=>{t.off("block",e)}},[h,n,a,f,p,s,d,r]),e_(ex({scopeKey:n,chainId:h}),eP,{cacheTime:e,enabled:r,staleTime:i,suspense:o,onError:u,onSettled:c,onSuccess:l})}function eR({chainId:e,enabled:t,queryKey:r}){let n=ek();eC({chainId:e,enabled:t,onBlock:t?()=>n.invalidateQueries(r):void 0,scopeKey:t?void 0:"idle"})}var eI=e=>"object"==typeof e&&!Array.isArray(e);function eT(e,t,r=t,n=Y.vZ){let i=Z.useRef([]),o=(0,eg.useSyncExternalStoreWithSelector)(e,t,r,e=>e,(e,t)=>{if(eI(e)&&eI(t)&&i.current.length){for(let r of i.current){let i=n(e[r],t[r]);if(!i)return!1}return!0}return n(e,t)});if(eI(o)){let e={...o};return Object.defineProperties(e,Object.entries(e).reduce((e,[t,r])=>({...e,[t]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(t)||i.current.push(t),r)}}),{})),e}return o}function eN({onConnect:e,onDisconnect:t}={}){let r=Z.useCallback(r=>{let n=(0,Y.s3)(),i=n.subscribe(e=>({address:e.data?.account,connector:e.connector,status:e.status}),(n,i)=>(e&&"connected"!==i.status&&"connected"===n.status&&e({address:n.address,connector:n.connector,isReconnected:"reconnecting"===i.status}),t&&"connected"===i.status&&"disconnected"===n.status&&t(),r((0,Y.D0)())));return i},[e,t]),n=eT(r,Y.D0),i=Z.useRef(),{address:o,connector:s,status:a}=n;return Z.useEffect(()=>{e&&void 0===i.current&&"connected"===a&&e({address:o,connector:s,isReconnected:!0}),i.current=a},[]),n}function eM({queryKey:[{address:e,chainId:t,formatUnits:r,token:n}]}){if(!e)throw Error("address is required");return(0,Y.EG)({address:e,chainId:t,formatUnits:r,token:n})}function eD({address:e,cacheTime:t,chainId:r,enabled:n=!0,formatUnits:i,scopeKey:o,staleTime:s,suspense:a,token:u,watch:c,onError:l,onSettled:h,onSuccess:f}={}){let d=eO({chainId:r}),p=Z.useMemo(()=>(function({address:e,chainId:t,formatUnits:r,scopeKey:n,token:i}){return[{entity:"balance",address:e,chainId:t,formatUnits:r,scopeKey:n,token:i}]})({address:e,chainId:d,formatUnits:i,scopeKey:o,token:u}),[e,d,i,o,u]),m=e_(p,eM,{cacheTime:t,enabled:!!(n&&e),staleTime:s,suspense:a,onError:l,onSettled:h,onSuccess:f});return eR({chainId:d,enabled:!!(n&&c&&e),queryKey:p}),m}var eF=e=>[{entity:"connect",...e}],eL=e=>{let{connector:t,chainId:r}=e;if(!t)throw Error("connector is required");return(0,Y.$j)({connector:t,chainId:r})};function eB({chainId:e,connector:t,onError:r,onMutate:n,onSettled:i,onSuccess:o}={}){let s=function(){let e=Z.useContext(ev);if(!e)throw Error("`useClient` must be used within `WagmiConfig`.\n\nRead more: https://wagmi.sh/react/WagmiConfig");return e}(),{data:a,error:u,isError:c,isIdle:l,isLoading:h,isSuccess:f,mutate:d,mutateAsync:p,reset:m,status:g,variables:y}=eA(eF({connector:t,chainId:e}),eL,{onError:r,onMutate:n,onSettled:i,onSuccess:o}),v=Z.useCallback(r=>d({chainId:r?.chainId??e,connector:r?.connector??t}),[e,t,d]),b=Z.useCallback(r=>p({chainId:r?.chainId??e,connector:r?.connector??t}),[e,t,p]);return{connect:v,connectAsync:b,connectors:s.connectors,data:a,error:u,isError:c,isIdle:l,isLoading:h,isSuccess:f,pen
20dingConnector:y?.connector,reset:m,status:g,variables:y}}function ej({chainId:e}){return[{entity:"signer",chainId:e,persist:!1}]}function eU({queryKey:[{chainId:e}]}){return(0,Y.DG)({chainId:e})}function eq({chainId:e,suspense:t,onError:r,onSettled:n,onSuccess:i}={}){let{connector:o}=eN(),s=eO({chainId:e}),a=e_(ej({chainId:s}),eU,{cacheTime:0,enabled:!!o,staleTime:1/0,suspense:t,onError:r,onSettled:n,onSuccess:i}),u=ek();return Z.useEffect(()=>{let e=(0,Y.rn)({chainId:s},e=>{e?u.invalidateQueries(ej({chainId:s})):u.removeQueries(ej({chainId:s}))});return e},[u,s]),a}function eG({abi:e,address:t,args:r,cacheOnBlock:n=!1,cacheTime:i,chainId:o,enabled:s=!0,functionName:a,isDataEqual:u,onError:c,onSettled:l,onSuccess:h,overrides:f,scopeKey:d,select:p,staleTime:m,structuralSharing:g=(e,t)=>(0,Y.vZ)(e,t)?e:y(e,t),suspense:v,watch:b}={}){let w=eO({chainId:o}),{data:E}=eC({chainId:w,enabled:b||n,scopeKey:b||n?void 0:"idle",watch:b}),A=Z.useMemo(()=>(function({address:e,args:t,blockNumber:r,chainId:n,functionName:i,overrides:o,scopeKey:s}){return[{entity:"readContract",address:e,args:t,blockNumber:r,chainId:n,functionName:i,overrides:o,scopeKey:s}]})({address:t,args:r,blockNumber:n?E:void 0,chainId:w,functionName:a,overrides:f,scopeKey:d}),[t,r,E,n,w,a,f,d]),_=Z.useMemo(()=>{let r=!!(s&&e&&t&&a);return n&&(r=!!(r&&E)),r},[e,t,E,n,s,a]);return eR({chainId:w,enabled:!!(_&&b&&!n),queryKey:A}),e_(A,function({abi:e}){return async({queryKey:[{address:t,args:r,chainId:n,functionName:i,overrides:o}]})=>{if(!e)throw Error("abi is required");if(!t)throw Error("address is required");return await (0,Y.a4)({address:t,args:r,chainId:n,abi:e,functionName:i,overrides:o})??null}}({abi:e}),{cacheTime:i,enabled:_,isDataEqual:u,select(t){let r=e&&a?(0,Y.g_)({abi:e,data:t,functionName:a}):t;return p?p(r):r},staleTime:m,structuralSharing:g,suspense:v,onError:c,onSettled:l,onSuccess:h})}function eV(e){if(!e.address)throw Error("address is required");if(!e.abi)throw Error("abi is required");if(!e.functionName)throw Error("functionName is required");switch(e.mode){case"prepared":if(!e.request)throw Error("request is required");return(0,Y.n9)({mode:"prepared",address:e.address,chainId:e.chainId,abi:e.abi,functionName:e.functionName,request:e.request});case"recklesslyUnprepared":return(0,Y.n9)({address:e.address,args:e.args,chainId:e.chainId,abi:e.abi,functionName:e.functionName,mode:"recklesslyUnprepared",overrides:e.overrides})}}function eQ(e={}){let{address:t,abi:r,functionName:n,chainId:i,mode:o}=e,{request:s}=e,{args:a,overrides:u}=e,{data:c,error:l,isError:h,isIdle:f,isLoading:d,isSuccess:p,mutate:m,mutateAsync:g,reset:y,status:v,variables:b}=eA(function({address:e,chainId:t,abi:r,functionName:n,...i}){let{request:o}=i,{args:s,overrides:a}=i;return[{entity:"writeContract",address:e,args:s,chainId:t,abi:r,functionName:n,overrides:a,request:o}]}({address:t,abi:r,functionName:n,chainId:i,mode:o,args:a,overrides:u,request:s}),eV,{onError:e.onError,onMutate:e.onMutate,onSettled:e.onSettled,onSuccess:e.onSuccess}),w=Z.useMemo(()=>{if("prepared"===o){if(!s)return;return()=>m({address:t,chainId:i,abi:r,functionName:n,mode:"prepared",request:s})}return e=>m({address:t,args:e?.recklesslySetUnpreparedArgs??a,chainId:i,abi:r,functionName:n,mode:"recklesslyUnprepared",overrides:e?.recklesslySetUnpreparedOverrides??u})},[t,i,r,n,o,m,a,u,s]),E=Z.useMemo(()=>{if("prepared"===o){if(!s)return;return()=>g({address:t,chainId:i,abi:r,functionName:n,mode:"prepared",request:s})}return e=>g({address:t,args:e?.recklesslySetUnpreparedArgs??a,chainId:i,abi:r,functionName:n,mode:"recklesslyUnprepared",overrides:e?.recklesslySetUnpreparedOverrides??u})},[t,i,r,n,o,g,a,u,s]);return{data:c,error:l,isError:h,isIdle:f,isLoading:d,isSuccess:p,reset:y,status:v,variables:b,write:w,writeAsync:E}}function ez({address:e,abi:t,functionName:r,chainId:n,args:i,overrides:o,cacheTime:s,enabled:a=!0,scopeKey:u,staleTime:c,suspense:l,onError:h,onSettled:f,onSuccess:d}={}){let{chain:p}=eT(Y.QC,Y.Hy),{data:m}=eq({chainId:n}),g=e_(function({activeChainId:e,args:t,address:r,chainId:n,functionName:i,overrides:o,signerAddress:s}){return[{entity:"prepareContractTransaction",activeChainId:e,address:r,args:t,chainId:n,functionName:i,overrides:o,signerAddress:s}]}({activeChainId:p?.id,address:e,args:i,chainId:n,functionName:r,scopeKey:u,signerAddress:m?._address,overrides:o}),function({abi:e,signer:t}){return({queryKey:[{args:r,address:n,chainId:i,functionName:o,overrides:s}]})=>{if(!e)throw Error("abi is required");return(0,Y.$q)({abi:e,args:r,address:n,chainId:i,functionName:o,overrides:s,signer:t})}}({abi:t,signer:m}),{cacheTime:s,enabled:!!(a&&t&&e&&r&&m),staleTime:c,suspense:l,onError:h,onSettled:f,onSuccess:d});return Object.assign(g,{config:{abi:t,address:e,args:i,chainId:n,functionName:r,mode:"prepared",overrides:o,request:void 0,...g.data}})}},48216:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}r.d(t,{y:function(){return A}});var s=function(){return"function"==typeof Symbol},a=function(e){return s()&&!!Symbol[e]},u=function(e){return a(e)?Symbol[e]:"@@"+e};s()&&!a("observable")&&(Symbol.observable=Symbol("observable"));var c=u("iterator"),l=u("observable"),h=u("species");function f(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw TypeError(r+" is not a function");return r}}function d(e){var t=e.constructor;return void 0!==t&&null===(t=t[h])&&(t=void 0),void 0!==t?t:A}function p(e){p.log?p.log(e):setTimeout(function(){throw e})}function m(e){Promise.resolve().then(function(){try{e()}catch(e){p(e)}})}function g(e){var t=e._cleanup;if(void 0!==t){if(e._cleanup=void 0,!t)return;try{if("function"==typeof t)t();else{var r=f(t,"unsubscribe");r&&r.call(t)}}catch(e){p(e)}}}function y(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function v(e,t,r){e._state="running";var n=e._observer;try{var i=f(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(y(e),i)i.call(n,r);else throw r;break;case"complete":y(e),i&&i.call(n)}}catch(e){p(e)}"closed"===e._state?g(e):"running"===e._state&&(e._state="ready")}function b(e,t,r){if("closed"!==e._state){if("buffering"===e._state){e._queue.push({type:t,value:r});return}if("ready"!==e._state){e._state="buffering",e._queue=[{type:t,value:r}],m(function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(v(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)});return}v(e,t,r)}}var w=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new E(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(y(this),g(this))},o(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),E=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){b(this._subscription,"next",e)},t.error=function(e){b(this._subscription,"error",e)},t.complete=function(){b(this._subscription,"complete")},o(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),A=function(){function e(t){if(!(this instanceof e))throw TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return("object"!=typeof e||null===e)&&(e={next:e,error:arguments[1],complete:arguments[2]}),new w(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise(function(r,n){if("function"!=typeof e){n(TypeError(e+" is not a function"));return}function i(){o.unsubscribe(),r()}var o=t.subscribe({next:function(t){try{e(t,i)}catch(e){n(e),o.unsubscribe()}},error:n,complete:r})})},t.map=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(d(this))(function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})},t.filter=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");return new(d(this))(function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})})},t.reduce=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var r=d(this),n=arguments.length>1,i=!1,o=arguments[1],s=o;return new r(function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{s=e(s,t)}catch(e){return r.error(e)}else s=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(TypeError("Cannot reduce an empty sequence"));r.next(s),r.complete()}})})},t.concat=function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=d(this);return new i(function(t){var n,o=0;return function e(s){n=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]
20))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}})},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw TypeError(e+" is not a function");var r=d(this);return new r(function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),s()}});i.push(o)},error:function(e){n.error(e)},complete:function(){s()}});function s(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach(function(e){return e.unsubscribe()}),o.unsubscribe()}})},t[l]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw TypeError(t+" is not an object");var i=f(t,l);if(i){var o=i.call(t);if(Object(o)!==o)throw TypeError(o+" is not an object");return o instanceof A&&o.constructor===r?o:new r(function(e){return o.subscribe(e)})}if(a("iterator")&&(i=f(t,c)))return new r(function(e){m(function(){if(!e.closed){for(var r,o=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}}(e))){r&&(e=r);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(i.call(t));!(r=o()).done;){var s=r.value;if(e.next(s),e.closed)return}e.complete()}})});if(Array.isArray(t))return new r(function(e){m(function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}})});throw TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)(function(e){m(function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}})})},o(e,null,[{key:h,get:function(){return this}}]),e}();s()&&Object.defineProperty(A,Symbol("extensions"),{value:{symbol:l,hostReportError:p},configurable:!0})}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return t(91118),t(96885)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.