/*! For license information please see TronWeb.js.LICENSE.txt */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("TronWeb",[],t):"object"==typeof exports?exports.TronWeb=t():e.TronWeb=t()}(self,(()=>(()=>{var e={82:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^(0x)[0-9a-f]{40}$/i;e.exports=t.default,e.exports.default=t.default},228:e=>{"use strict";var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function s(e,t,n,s,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,s||e,i),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 i(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,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},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 o=0,s=n.length,i=new Array(s);o{var n=r(4172),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("TronWebProto.ProposalApproveContract",null,s),o.exportSymbol("TronWebProto.ProposalCreateContract",null,s),o.exportSymbol("TronWebProto.ProposalDeleteContract",null,s),TronWebProto.ProposalApproveContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalApproveContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalApproveContract.displayName="TronWebProto.ProposalApproveContract"),TronWebProto.ProposalCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalCreateContract.displayName="TronWebProto.ProposalCreateContract"),TronWebProto.ProposalDeleteContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ProposalDeleteContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ProposalDeleteContract.displayName="TronWebProto.ProposalDeleteContract"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalApproveContract.prototype.toObject=function(e){return TronWebProto.ProposalApproveContract.toObject(e,this)},TronWebProto.ProposalApproveContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),proposalId:n.Message.getFieldWithDefault(t,2,0),isAddApproval:n.Message.getBooleanFieldWithDefault(t,3,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ProposalApproveContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalApproveContract;return TronWebProto.ProposalApproveContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalApproveContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setProposalId(r);break;case 3:r=t.readBool(),e.setIsAddApproval(r);break;default:t.skipField()}return e},TronWebProto.ProposalApproveContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalApproveContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalApproveContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getProposalId())&&t.writeInt64(2,r),(r=e.getIsAddApproval())&&t.writeBool(3,r)},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalApproveContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalApproveContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalApproveContract.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ProposalApproveContract.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ProposalApproveContract.prototype.getIsAddApproval=function(){return n.Message.getBooleanFieldWithDefault(this,3,!1)},TronWebProto.ProposalApproveContract.prototype.setIsAddApproval=function(e){return n.Message.setProto3BooleanField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalCreateContract.prototype.toObject=function(e){return TronWebProto.ProposalCreateContract.toObject(e,this)},TronWebProto.ProposalCreateContract.toObject=function(e,t){var r,n={ownerAddress:t.getOwnerAddress_asB64(),parametersMap:(r=t.getParametersMap())?r.toObject(e,void 0):[]};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.ProposalCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalCreateContract;return TronWebProto.ProposalCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=e.getParametersMap(),t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readInt64,n.BinaryReader.prototype.readInt64,null,0,0)}));break;default:t.skipField()}return e},TronWebProto.ProposalCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getParametersMap(!0))&&r.getLength()>0&&r.serializeBinary(2,t,n.BinaryWriter.prototype.writeInt64,n.BinaryWriter.prototype.writeInt64)},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalCreateContract.prototype.getParametersMap=function(e){return n.Message.getMapField(this,2,e,null)},TronWebProto.ProposalCreateContract.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ProposalDeleteContract.prototype.toObject=function(e){return TronWebProto.ProposalDeleteContract.toObject(e,this)},TronWebProto.ProposalDeleteContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),proposalId:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ProposalDeleteContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ProposalDeleteContract;return TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader(r,t)},TronWebProto.ProposalDeleteContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setProposalId(r);break;default:t.skipField()}return e},TronWebProto.ProposalDeleteContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ProposalDeleteContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ProposalDeleteContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getProposalId())&&t.writeInt64(2,r)},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ProposalDeleteContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ProposalDeleteContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ProposalDeleteContract.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ProposalDeleteContract.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,2,e)},o.object.extend(t,TronWebProto)},317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)((0,o.default)(e,t),t)};var n=s(r(2483)),o=s(r(2309));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},410:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e.replace(new RegExp("[".concat(t,"]+"),"g"),"")};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},561:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e);var r=t?"\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F":"\\x00-\\x1F\\x7F";return(0,o.default)(e,r)};var n=s(r(3399)),o=s(r(410));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(e);var r=s;if(r=t.require_hyphen?r.replace("?",""):r,!(r=t.case_sensitive?new RegExp(r):new RegExp(r,"i")).test(e))return!1;for(var n=e.replace("-","").toUpperCase(),i=0,a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);for(var r=e.length-1;r>=0;r--)if(-1===t.indexOf(e[r]))return!1;return!0};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},676:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t in s)return s[t](e);if("any"===t){for(var r in s)if((0,s[r])(e))return!0;return!1}throw new Error("Invalid locale '".concat(t,"'"))};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s={"cs-CZ":function(e){return/^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(e)},"de-DE":function(e){return/^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(e)},"de-LI":function(e){return/^FL[- ]?\d{1,5}[UZ]?$/.test(e)},"en-IN":function(e){return/^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(e)},"es-AR":function(e){return/^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(e)},"fi-FI":function(e){return/^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(e)},"hu-HU":function(e){return/^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(e)},"pt-BR":function(e){return/^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(e)},"pt-PT":function(e){return/^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(e)},"sq-AL":function(e){return/^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(e)},"sv-SE":function(e){return/^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(e.trim())}};e.exports=t.default,e.exports.default=t.default},700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e===t};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},855:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),parseInt(e,t||10)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},995:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e),t=t||{};var r=new RegExp("^(?:[-+])?(?:[0-9]+)?(?:\\".concat(t.locale?s.decimal[t.locale]:".","[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$"));if(""===e||"."===e||","===e||"-"===e||"+"===e)return!1;var n=parseFloat(e.replace(",","."));return r.test(e)&&(!t.hasOwnProperty("min")||n>=t.min)&&(!t.hasOwnProperty("max")||n<=t.max)&&(!t.hasOwnProperty("lt")||nt.gt)},t.locales=void 0;var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=r(3237),i=Object.keys(s.decimal);t.locales=i},1062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,n.default)(e);var r=t.provider,s=e.replace(/[- ]+/g,"");if(r&&r.toLowerCase()in i){if(!i[r.toLowerCase()].test(s))return!1}else{if(r&&!(r.toLowerCase()in i))throw new Error("".concat(r," is not a valid credit card provider."));if(!a.test(s))return!1}return(0,o.default)(e)};var n=s(r(3399)),o=s(r(3609));function s(e){return e&&e.__esModule?e:{default:e}}var i={amex:/^3[47][0-9]{13}$/,dinersclub:/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,discover:/^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,jcb:/^(?:2131|1800|35\d{3})\d{11}$/,mastercard:/^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/,unionpay:/^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,visa:/^(?:4[0-9]{12})(?:[0-9]{3,6})?$/},a=/^(?:4[0-9]{12}(?:[0-9]{3,6})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12,15}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|6[27][0-9]{14}|^(81[0-9]{14,17}))$/;e.exports=t.default,e.exports.default=t.default},1128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t=(0,o.default)(t,s);var r=e.split("@"),n=r.pop(),d=[r.join("@"),n];if(d[1]=d[1].toLowerCase(),"gmail.com"===d[1]||"googlemail.com"===d[1]){if(t.gmail_remove_subaddress&&(d[0]=d[0].split("+")[0]),t.gmail_remove_dots&&(d[0]=d[0].replace(/\.+/g,l)),!d[0].length)return!1;(t.all_lowercase||t.gmail_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]=t.gmail_convert_googlemaildotcom?"gmail.com":d[1]}else if(i.indexOf(d[1])>=0){if(t.icloud_remove_subaddress&&(d[0]=d[0].split("+")[0]),!d[0].length)return!1;(t.all_lowercase||t.icloud_lowercase)&&(d[0]=d[0].toLowerCase())}else if(a.indexOf(d[1])>=0){if(t.outlookdotcom_remove_subaddress&&(d[0]=d[0].split("+")[0]),!d[0].length)return!1;(t.all_lowercase||t.outlookdotcom_lowercase)&&(d[0]=d[0].toLowerCase())}else if(u.indexOf(d[1])>=0){if(t.yahoo_remove_subaddress){var h=d[0].split("-");d[0]=h.length>1?h.slice(0,-1).join("-"):h[0]}if(!d[0].length)return!1;(t.all_lowercase||t.yahoo_lowercase)&&(d[0]=d[0].toLowerCase())}else c.indexOf(d[1])>=0?((t.all_lowercase||t.yandex_lowercase)&&(d[0]=d[0].toLowerCase()),d[1]="yandex.ru"):t.all_lowercase&&(d[0]=d[0].toLowerCase());return d.join("@")};var n,o=(n=r(3610))&&n.__esModule?n:{default:n},s={all_lowercase:!0,gmail_lowercase:!0,gmail_remove_dots:!0,gmail_remove_subaddress:!0,gmail_convert_googlemaildotcom:!0,outlookdotcom_lowercase:!0,outlookdotcom_remove_subaddress:!0,yahoo_lowercase:!0,yahoo_remove_subaddress:!0,yandex_lowercase:!0,icloud_lowercase:!0,icloud_remove_subaddress:!0},i=["icloud.com","me.com"],a=["hotmail.at","hotmail.be","hotmail.ca","hotmail.cl","hotmail.co.il","hotmail.co.nz","hotmail.co.th","hotmail.co.uk","hotmail.com","hotmail.com.ar","hotmail.com.au","hotmail.com.br","hotmail.com.gr","hotmail.com.mx","hotmail.com.pe","hotmail.com.tr","hotmail.com.vn","hotmail.cz","hotmail.de","hotmail.dk","hotmail.es","hotmail.fr","hotmail.hu","hotmail.id","hotmail.ie","hotmail.in","hotmail.it","hotmail.jp","hotmail.kr","hotmail.lv","hotmail.my","hotmail.ph","hotmail.pt","hotmail.sa","hotmail.sg","hotmail.sk","live.be","live.co.uk","live.com","live.com.ar","live.com.mx","live.de","live.es","live.eu","live.fr","live.it","live.nl","msn.com","outlook.at","outlook.be","outlook.cl","outlook.co.il","outlook.co.nz","outlook.co.th","outlook.com","outlook.com.ar","outlook.com.au","outlook.com.br","outlook.com.gr","outlook.com.pe","outlook.com.tr","outlook.com.vn","outlook.cz","outlook.de","outlook.dk","outlook.es","outlook.fr","outlook.hu","outlook.id","outlook.ie","outlook.in","outlook.it","outlook.jp","outlook.kr","outlook.lv","outlook.my","outlook.ph","outlook.pt","outlook.sa","outlook.sg","outlook.sk","passport.com"],u=["rocketmail.com","yahoo.ca","yahoo.co.uk","yahoo.com","yahoo.de","yahoo.fr","yahoo.in","yahoo.it","ymail.com"],c=["yandex.ru","yandex.ua","yandex.kz","yandex.com","yandex.by","ya.ru"];function l(e){return e.length>1?e:""}e.exports=t.default,e.exports.default=t.default},1130:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(5510);if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function s(e){if("string"!=typeof e)throw new TypeError("utf8ToBytes expected string, got "+typeof e);return(new TextEncoder).encode(e)}function i(e){if("string"==typeof e&&(e=s(e)),!(e instanceof Uint8Array))throw new TypeError(`Expected input type is Uint8Array (got ${typeof e})`);return e}t.bytesToHex=function(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected");let t="";for(let r=0;r{},t.asyncLoop=async function(e,r,n){let o=Date.now();for(let s=0;s=0&&ee instanceof Uint8Array)))throw new Error("Uint8Array list expected");if(1===e.length)return e[0];const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);for(let t=0,n=0;te().update(i(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(i(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},1176:(e,t,r)=>{var n;!function(){"use strict";var o="input is invalid type",s="object"==typeof window,i=s?window:{};i.JS_SHA3_NO_WINDOW&&(s=!1);var a=!s&&"object"==typeof self;!i.JS_SHA3_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node?i=r.g:a&&(i=self);var u=!i.JS_SHA3_NO_COMMON_JS&&e.exports,c=r.amdO,l=!i.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,d="0123456789abcdef".split(""),h=[4,1024,262144,67108864],p=[0,8,16,24],f=[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],b=["hex","buffer","arrayBuffer","array","digest"],m={128:168,256:136};!i.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!l||!i.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 T=function(e,t,r){return function(n){return new R(e,t,e).update(n)[r]()}},v=function(e,t,r){return function(n,o){return new R(e,t,o).update(n)[r]()}},w=function(e,t,r){return function(t,n,o,s){return C["cshake"+e].update(t,n,o,s)[r]()}},A=function(e,t,r){return function(t,n,o,s){return C["kmac"+e].update(t,n,o,s)[r]()}},P=function(e,t,r,n){for(var o=0;o>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 x(e,t,r){R.call(this,e,t,r)}R.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called");var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}for(var n,s,i=this.blocks,a=this.byteCount,u=e.length,c=this.blockCount,d=0,h=this.s;d>2]|=e[d]<>2]|=s<>2]|=(192|s>>6)<>2]|=(128|63&s)<=57344?(i[n>>2]|=(224|s>>12)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<>2]|=(240|s>>18)<>2]|=(128|s>>12&63)<>2]|=(128|s>>6&63)<>2]|=(128|63&s)<=a){for(this.start=n-a,this.block=i[c],n=0;n>=8);r>0;)o.unshift(r),r=255&(e>>=8),++n;return t?o.push(n):o.unshift(n),this.update(o),o.length},R.prototype.encodeString=function(e){var t,r=typeof e;if("string"!==r){if("object"!==r)throw new Error(o);if(null===e)throw new Error(o);if(l&&e.constructor===ArrayBuffer)e=new Uint8Array(e);else if(!(Array.isArray(e)||l&&ArrayBuffer.isView(e)))throw new Error(o);t=!0}var n=0,s=e.length;if(t)n=s;else for(var i=0;i=57344?n+=3:(a=65536+((1023&a)<<10|1023&e.charCodeAt(++i)),n+=4)}return n+=this.encode(8*n),this.update(e),n},R.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+d[15&e]+d[e>>12&15]+d[e>>8&15]+d[e>>20&15]+d[e>>16&15]+d[e>>28&15]+d[e>>24&15];i%t==0&&(N(r),s=0)}return o&&(e=r[s],a+=d[e>>4&15]+d[15&e],o>1&&(a+=d[e>>12&15]+d[e>>8&15]),o>2&&(a+=d[e>>20&15]+d[e>>16&15])),a},R.prototype.arrayBuffer=function(){this.finalize();var e,t=this.blockCount,r=this.s,n=this.outputBlocks,o=this.extraBytes,s=0,i=0,a=this.outputBits>>3;e=o?new ArrayBuffer(n+1<<2):new ArrayBuffer(a);for(var u=new Uint32Array(e);i>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255;a%r==0&&N(n)}return s&&(e=a<<2,t=n[i],u[e]=255&t,s>1&&(u[e+1]=t>>8&255),s>2&&(u[e+2]=t>>16&255)),u},x.prototype=new R,x.prototype.finalize=function(){return this.encode(this.outputBits,!0),R.prototype.finalize.call(this)};var N=function(e){var t,r,n,o,s,i,a,u,c,l,d,h,p,g,y,b,m,T,v,w,A,P,W,B,C,E,M,I,F,O,S,_,R,x,N,k,U,D,L,z,j,$,V,G,H,K,Z,q,J,Y,X,Q,ee,te,re,ne,oe,se,ie,ae,ue,ce,le;for(n=0;n<48;n+=2)o=e[0]^e[10]^e[20]^e[30]^e[40],s=e[1]^e[11]^e[21]^e[31]^e[41],i=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],d=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(i<<1|a>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(a<<1|i>>>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=o^(u<<1|c>>>31),r=s^(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=i^(l<<1|d>>>31),r=a^(d<<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^(h<<1|p>>>31),r=c^(p<<1|h>>>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^(o<<1|s>>>31),r=d^(s<<1|o>>>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,g=e[0],y=e[1],K=e[11]<<4|e[10]>>>28,Z=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,F=e[21]<<3|e[20]>>>29,ae=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,$=e[40]<<18|e[41]>>>14,V=e[41]<<18|e[40]>>>14,x=e[2]<<1|e[3]>>>31,N=e[3]<<1|e[2]>>>31,b=e[13]<<12|e[12]>>>20,m=e[12]<<12|e[13]>>>20,q=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,O=e[33]<<13|e[32]>>>19,S=e[32]<<13|e[33]>>>19,ce=e[42]<<2|e[43]>>>30,le=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,k=e[14]<<6|e[15]>>>26,U=e[15]<<6|e[14]>>>26,T=e[25]<<11|e[24]>>>21,v=e[24]<<11|e[25]>>>21,Y=e[34]<<15|e[35]>>>17,X=e[35]<<15|e[34]>>>17,_=e[45]<<29|e[44]>>>3,R=e[44]<<29|e[45]>>>3,B=e[6]<<28|e[7]>>>4,C=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,oe=e[16]<<23|e[17]>>>9,D=e[26]<<25|e[27]>>>7,L=e[27]<<25|e[26]>>>7,w=e[36]<<21|e[37]>>>11,A=e[37]<<21|e[36]>>>11,Q=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,G=e[8]<<27|e[9]>>>5,H=e[9]<<27|e[8]>>>5,E=e[18]<<20|e[19]>>>12,M=e[19]<<20|e[18]>>>12,se=e[29]<<7|e[28]>>>25,ie=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,j=e[39]<<8|e[38]>>>24,P=e[48]<<14|e[49]>>>18,W=e[49]<<14|e[48]>>>18,e[0]=g^~b&T,e[1]=y^~m&v,e[10]=B^~E&I,e[11]=C^~M&F,e[20]=x^~k&D,e[21]=N^~U&L,e[30]=G^~K&q,e[31]=H^~Z&J,e[40]=te^~ne&se,e[41]=re^~oe&ie,e[2]=b^~T&w,e[3]=m^~v&A,e[12]=E^~I&O,e[13]=M^~F&S,e[22]=k^~D&z,e[23]=U^~L&j,e[32]=K^~q&Y,e[33]=Z^~J&X,e[42]=ne^~se&ae,e[43]=oe^~ie&ue,e[4]=T^~w&P,e[5]=v^~A&W,e[14]=I^~O&_,e[15]=F^~S&R,e[24]=D^~z&$,e[25]=L^~j&V,e[34]=q^~Y&Q,e[35]=J^~X&ee,e[44]=se^~ae&ce,e[45]=ie^~ue&le,e[6]=w^~P&g,e[7]=A^~W&y,e[16]=O^~_&B,e[17]=S^~R&C,e[26]=z^~$&x,e[27]=j^~V&N,e[36]=Y^~Q&G,e[37]=X^~ee&H,e[46]=ae^~ce&te,e[47]=ue^~le&re,e[8]=P^~g&b,e[9]=W^~y&m,e[18]=_^~B&E,e[19]=R^~C&M,e[28]=$^~x&k,e[29]=V^~N&U,e[38]=Q^~G&K,e[39]=ee^~H&Z,e[48]=ce^~te&ne,e[49]=le^~re&oe,e[0]^=f[n],e[1]^=f[n+1]};if(u)e.exports=C;else{for(M=0;M{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=(null==t?void 0:t.comparisonDate)||t||Date().toString(),n=(0,o.default)(r),s=(0,o.default)(e);return!!(s&&n&&s>n)};var n,o=(n=r(3752))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},1252:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),(0,o.default)(e)&&24===e.length};var n=s(r(3399)),o=s(r(2002));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},1371:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e)?parseFloat(e):NaN};var n,o=(n=r(995))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},1449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.fullWidth.test(e)&&i.halfWidth.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=r(9666),i=r(9534);e.exports=t.default,e.exports.default=t.default},1467:(e,t,r)=>{var n=r(4172),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("TronWebProto.VoteWitnessContract",null,s),o.exportSymbol("TronWebProto.VoteWitnessContract.Vote",null,s),o.exportSymbol("TronWebProto.WitnessCreateContract",null,s),o.exportSymbol("TronWebProto.WitnessUpdateContract",null,s),TronWebProto.WitnessCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WitnessCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WitnessCreateContract.displayName="TronWebProto.WitnessCreateContract"),TronWebProto.WitnessUpdateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WitnessUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WitnessUpdateContract.displayName="TronWebProto.WitnessUpdateContract"),TronWebProto.VoteWitnessContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.VoteWitnessContract.repeatedFields_,null)},o.inherits(TronWebProto.VoteWitnessContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.VoteWitnessContract.displayName="TronWebProto.VoteWitnessContract"),TronWebProto.VoteWitnessContract.Vote=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.VoteWitnessContract.Vote,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.VoteWitnessContract.Vote.displayName="TronWebProto.VoteWitnessContract.Vote"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WitnessCreateContract.prototype.toObject=function(e){return TronWebProto.WitnessCreateContract.toObject(e,this)},TronWebProto.WitnessCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),url:t.getUrl_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WitnessCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WitnessCreateContract;return TronWebProto.WitnessCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.WitnessCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setUrl(r);break;default:t.skipField()}return e},TronWebProto.WitnessCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WitnessCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WitnessCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WitnessCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WitnessCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.WitnessCreateContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.WitnessCreateContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.WitnessCreateContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.WitnessCreateContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WitnessUpdateContract.prototype.toObject=function(e){return TronWebProto.WitnessUpdateContract.toObject(e,this)},TronWebProto.WitnessUpdateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),updateUrl:t.getUpdateUrl_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WitnessUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WitnessUpdateContract;return TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.WitnessUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 12:r=t.readBytes(),e.setUpdateUrl(r);break;default:t.skipField()}return e},TronWebProto.WitnessUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WitnessUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WitnessUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getUpdateUrl_asU8()).length>0&&t.writeBytes(12,r)},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WitnessUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WitnessUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl=function(){return n.Message.getFieldWithDefault(this,12,"")},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asB64=function(){return n.Message.bytesAsB64(this.getUpdateUrl())},TronWebProto.WitnessUpdateContract.prototype.getUpdateUrl_asU8=function(){return n.Message.bytesAsU8(this.getUpdateUrl())},TronWebProto.WitnessUpdateContract.prototype.setUpdateUrl=function(e){return n.Message.setProto3BytesField(this,12,e)},TronWebProto.VoteWitnessContract.repeatedFields_=[2],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.VoteWitnessContract.prototype.toObject=function(e){return TronWebProto.VoteWitnessContract.toObject(e,this)},TronWebProto.VoteWitnessContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),votesList:n.Message.toObjectList(t.getVotesList(),TronWebProto.VoteWitnessContract.Vote.toObject,e),support:n.Message.getBooleanFieldWithDefault(t,3,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.VoteWitnessContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.VoteWitnessContract;return TronWebProto.VoteWitnessContract.deserializeBinaryFromReader(r,t)},TronWebProto.VoteWitnessContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new TronWebProto.VoteWitnessContract.Vote,t.readMessage(r,TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader),e.addVotes(r);break;case 3:r=t.readBool(),e.setSupport(r);break;default:t.skipField()}return e},TronWebProto.VoteWitnessContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.VoteWitnessContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.VoteWitnessContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getVotesList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter),(r=e.getSupport())&&t.writeBool(3,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.VoteWitnessContract.Vote.prototype.toObject=function(e){return TronWebProto.VoteWitnessContract.Vote.toObject(e,this)},TronWebProto.VoteWitnessContract.Vote.toObject=function(e,t){var r={voteAddress:t.getVoteAddress_asB64(),voteCount:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.VoteWitnessContract.Vote.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.VoteWitnessContract.Vote;return TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader(r,t)},TronWebProto.VoteWitnessContract.Vote.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setVoteAddress(r);break;case 2:r=t.readInt64(),e.setVoteCount(r);break;default:t.skipField()}return e},TronWebProto.VoteWitnessContract.Vote.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.VoteWitnessContract.Vote.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getVoteAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVoteCount())&&t.writeInt64(2,r)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asB64=function(){return n.Message.bytesAsB64(this.getVoteAddress())},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteAddress_asU8=function(){return n.Message.bytesAsU8(this.getVoteAddress())},TronWebProto.VoteWitnessContract.Vote.prototype.setVoteAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.VoteWitnessContract.Vote.prototype.getVoteCount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.VoteWitnessContract.Vote.prototype.setVoteCount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.VoteWitnessContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.VoteWitnessContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.VoteWitnessContract.prototype.getVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.VoteWitnessContract.Vote,2)},TronWebProto.VoteWitnessContract.prototype.setVotesList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.VoteWitnessContract.prototype.addVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.VoteWitnessContract.Vote,t)},TronWebProto.VoteWitnessContract.prototype.clearVotesList=function(){return this.setVotesList([])},TronWebProto.VoteWitnessContract.prototype.getSupport=function(){return n.Message.getBooleanFieldWithDefault(this,3,!1)},TronWebProto.VoteWitnessContract.prototype.setSupport=function(e){return n.Message.setProto3BooleanField(this,3,e)},o.object.extend(t,TronWebProto)},1484:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),o=BigInt(2),s=e=>e instanceof Uint8Array,i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!s(e))throw new Error("Uint8Array expected");let t="";for(let r=0;re+t.length),0));let r=0;return e.forEach((e=>{if(!s(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}t.bytesToHex=a,t.numberToHexUnpadded=u,t.hexToNumber=c,t.hexToBytes=l,t.bytesToNumberBE=function(e){return c(a(e))},t.bytesToNumberLE=function(e){if(!s(e))throw new Error("Uint8Array expected");return c(a(Uint8Array.from(e).reverse()))},t.numberToBytesBE=(e,t)=>l(e.toString(16).padStart(2*t,"0")),t.numberToBytesLE=(e,r)=>(0,t.numberToBytesBE)(e,r).reverse(),t.numberToVarBytesBE=e=>l(u(e)),t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!s(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const o=n.length;if("number"==typeof r&&o!==r)throw new Error(`${e} expected ${r} bytes, got ${o}`);return n},t.concatBytes=d,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;rr;e>>=n,t+=1);return t},t.bitGet=(e,t)=>e>>BigInt(t)&n,t.bitSet=(e,t,o)=>e|(o?n:r)<(o<new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=h(e),o=h(e),s=0;const i=()=>{n.fill(1),o.fill(0),s=0},a=(...e)=>r(o,n,...e),u=(e=h())=>{o=a(p([0]),e),n=a(),0!==e.length&&(o=a(p([1]),e),n=a())},c=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e{let r;for(i(),u(e);!(r=t(c()));)u();return i(),r}};const f={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const o=f[r];if("function"!=typeof o)throw new Error(`Invalid validator "${r}", expected function`);const s=e[t];if(!(n&&void 0===s||o(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},1578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),h.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/([01][0-9]|2[0-3])/,i=/[0-5][0-9]/,a=new RegExp("[-+]".concat(s.source,":").concat(i.source)),u=new RegExp("([zZ]|".concat(a.source,")")),c=new RegExp("".concat(s.source,":").concat(i.source,":").concat(/([0-5][0-9]|60)/.source).concat(/(\.[0-9]+)?/.source)),l=new RegExp("".concat(/[0-9]{4}/.source,"-").concat(/(0[1-9]|1[0-2])/.source,"-").concat(/([12]\d|0[1-9]|3[01])/.source)),d=new RegExp("".concat(c.source).concat(u.source)),h=new RegExp("^".concat(l.source,"[ tT]").concat(d.source,"$"));e.exports=t.default,e.exports.default=t.default},1590:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,s,i,a){return s=s||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e?n(o(e),(function(o){var a=encodeURIComponent(t(o))+i;return r(e[o])?n(e[o],(function(e){return a+encodeURIComponent(t(e))})).join(s):a+encodeURIComponent(t(e[o]))})).join(s):a?encodeURIComponent(t(a))+i+encodeURIComponent(t(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),t&&t.no_symbols?i.test(e):new RegExp("^[+-]?([0-9]*[".concat((t||{}).locale?s.decimal[t.locale]:".","])?[0-9]+$")).test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=r(3237),i=/^[0-9]+$/;e.exports=t.default,e.exports.default=t.default},1696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(3346),o=r(1130),s=(e,t,r)=>e&t^e&r^t&r,i=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:i,H:a}=this;return[e,t,r,n,o,s,i,a]}set(e,t,r,n,o,s,i,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|i,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=u[e-15],r=u[e-2],n=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,s=(0,o.rotr)(r,17)^(0,o.rotr)(r,19)^r>>>10;u[e]=s+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:a,D:c,E:l,F:d,G:h,H:p}=this;for(let e=0;e<64;e++){const t=p+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+((f=l)&d^~f&h)+i[e]+u[e]|0,g=((0,o.rotr)(r,2)^(0,o.rotr)(r,13)^(0,o.rotr)(r,22))+s(r,n,a)|0;p=h,h=d,d=l,l=c+t|0,c=a,a=n,n=r,r=t+g|0}var f;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,c=c+this.D|0,l=l+this.E|0,d=d+this.F|0,h=h+this.G|0,p=p+this.H|0,this.set(r,n,a,c,l,d,h,p)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,o.wrapConstructor)((()=>new c)),t.sha224=(0,o.wrapConstructor)((()=>new l))},1697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return(0,o.default)(e),t.loose?a.includes(e.toLowerCase()):i.includes(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s={loose:!1},i=["true","false","1","0"],a=[].concat(i,["yes","no"]);e.exports=t.default,e.exports.default=t.default},1705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(4967),o=r(1484),s=r(1484),i=r(2422),{bytesToNumberBE:a,hexToBytes:u}=o;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],o=e.subarray(2,n+2);if(!n||o.length!==n)throw new r("Invalid signature integer: wrong length");if(128&o[0])throw new r("Invalid signature integer: negative");if(0===o[0]&&!(128&o[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(o),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?u(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let o=n.length;if(o<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==o-2)throw new r("Invalid signature: incorrect length");const{d:s,l:i}=t.DER._parseInt(n.subarray(2)),{d:a,l:c}=t.DER._parseInt(i);if(c.length)throw new r("Invalid signature: left bytes after parsing");return{r:s,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),s=n.length/2,i=o.length/2,a=r(s),u=r(i);return`30${r(i+s+4)}02${u}${o}02${a}${n}`}};const c=BigInt(0),l=BigInt(1),d=BigInt(2),h=BigInt(3),p=BigInt(4);function f(e){const t=function(e){const t=(0,i.validateBasic)(e);o.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:s}=t;if(r){if(!n.eql(s,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const s=t.toAffine();return o.concatBytes(Uint8Array.from([4]),r.toBytes(s.x),r.toBytes(s.y))}),u=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function d(e){const{a:n,b:o}=t,s=r.sqr(e),i=r.mul(s,e);return r.add(r.add(i,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),d(t.Gx)))throw new Error("bad generator point: equation left != right");function p(e){return"bigint"==typeof e&&cr.eql(e,r.ZERO);return o(t)&&o(n)?m.ZERO:new m(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}static fromHex(e){const t=m.fromAffine(u((0,s.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return m.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,y.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint)return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const o=r.sqr(n),s=d(e);if(!r.eql(o,s))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){b(e);const{px:t,py:n,pz:o}=this,{px:s,py:i,pz:a}=e,u=r.eql(r.mul(t,a),r.mul(s,o)),c=r.eql(r.mul(n,a),r.mul(i,o));return u&&c}negate(){return new m(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,h),{px:s,py:i,pz:a}=this;let u=r.ZERO,c=r.ZERO,l=r.ZERO,d=r.mul(s,s),p=r.mul(i,i),f=r.mul(a,a),g=r.mul(s,i);return g=r.add(g,g),l=r.mul(s,a),l=r.add(l,l),u=r.mul(e,l),c=r.mul(o,f),c=r.add(u,c),u=r.sub(p,c),c=r.add(p,c),c=r.mul(u,c),u=r.mul(g,u),l=r.mul(o,l),f=r.mul(e,f),g=r.sub(d,f),g=r.mul(e,g),g=r.add(g,l),l=r.add(d,d),d=r.add(l,d),d=r.add(d,f),d=r.mul(d,g),c=r.add(c,d),f=r.mul(i,a),f=r.add(f,f),d=r.mul(f,g),u=r.sub(u,d),l=r.mul(f,p),l=r.add(l,l),l=r.add(l,l),new m(u,c,l)}add(e){b(e);const{px:n,py:o,pz:s}=this,{px:i,py:a,pz:u}=e;let c=r.ZERO,l=r.ZERO,d=r.ZERO;const p=t.a,f=r.mul(t.b,h);let g=r.mul(n,i),y=r.mul(o,a),T=r.mul(s,u),v=r.add(n,o),w=r.add(i,a);v=r.mul(v,w),w=r.add(g,y),v=r.sub(v,w),w=r.add(n,s);let A=r.add(i,u);return w=r.mul(w,A),A=r.add(g,T),w=r.sub(w,A),A=r.add(o,s),c=r.add(a,u),A=r.mul(A,c),c=r.add(y,T),A=r.sub(A,c),d=r.mul(p,w),c=r.mul(f,T),d=r.add(c,d),c=r.sub(y,d),d=r.add(y,d),l=r.mul(c,d),y=r.add(g,g),y=r.add(y,g),T=r.mul(p,T),w=r.mul(f,w),y=r.add(y,T),T=r.sub(g,T),T=r.mul(p,T),w=r.add(w,T),g=r.mul(y,w),l=r.add(l,g),g=r.mul(A,w),c=r.mul(v,c),c=r.sub(c,g),g=r.mul(v,y),d=r.mul(A,d),d=r.add(d,g),new m(c,l,d)}subtract(e){return this.add(e.negate())}is0(){return this.equals(m.ZERO)}wNAF(e){return v.wNAFCached(this,y,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}))}multiplyUnsafe(e){const n=m.ZERO;if(e===c)return n;if(f(e),e===l)return this;const{endo:o}=t;if(!o)return v.unsafeLadder(this,e);let{k1neg:s,k1:i,k2neg:a,k2:u}=o.splitScalar(e),d=n,h=n,p=this;for(;i>c||u>c;)i&l&&(d=d.add(p)),u&l&&(h=h.add(p)),p=p.double(),i>>=l,u>>=l;return s&&(d=d.negate()),a&&(h=h.negate()),h=new m(r.mul(h.px,o.beta),h.py,h.pz),d.add(h)}multiply(e){f(e);let n,o,s=e;const{endo:i}=t;if(i){const{k1neg:e,k1:t,k2neg:a,k2:u}=i.splitScalar(s);let{p:c,f:l}=this.wNAF(t),{p:d,f:h}=this.wNAF(u);c=v.constTimeNegate(e,c),d=v.constTimeNegate(a,d),d=new m(r.mul(d.px,i.beta),d.py,d.pz),n=c.add(d),o=l.add(h)}else{const{p:e,f:t}=this.wNAF(s);n=e,o=t}return m.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=m.BASE,o=(e,t)=>t!==c&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=o(this,t).add(o(e,r));return s.is0()?void 0:s}toAffine(e){const{px:t,py:n,pz:o}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(o));const i=r.mul(t,e),a=r.mul(n,e),u=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:i,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(m,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(m,this,e)}toHex(e=!0){return o.bytesToHex(this.toRawBytes(e))}}m.BASE=new m(t.Gx,t.Gy,r.ONE),m.ZERO=new m(r.ZERO,r.ONE,r.ZERO);const T=t.nBitLength,v=(0,i.wNAF)(m,t.endo?Math.ceil(T/2):T);return{CURVE:t,ProjectivePoint:m,normPrivateKeyToScalar:g,weierstrassEquation:d,isWithinCurveOrder:p}}function g(e,t){const r=e.ORDER;let n=c;for(let e=r-l;e%d===c;e/=d)n+=l;const o=n,s=(r-l)/d**o,i=(s-l)/d,a=d**o-l,u=d**(o-l),f=e.pow(t,s),g=e.pow(t,(s+l)/d);let y=(t,r)=>{let n=f,s=e.pow(r,a),c=e.sqr(s);c=e.mul(c,r);let h=e.mul(t,c);h=e.pow(h,i),h=e.mul(h,s),s=e.mul(h,r),c=e.mul(h,t);let p=e.mul(c,s);h=e.pow(p,u);let y=e.eql(h,e.ONE);s=e.mul(c,g),h=e.mul(p,n),c=e.cmov(s,c,y),p=e.cmov(h,p,y);for(let t=o;t>l;t--){let r=d**(t-d),o=e.pow(p,r);const i=e.eql(o,e.ONE);s=e.mul(c,n),n=e.mul(n,n),o=e.mul(p,n),c=e.cmov(s,c,i),p=e.cmov(o,p,i)}return{isValid:y,value:c}};if(e.ORDER%p===h){const r=(e.ORDER-h)/p,n=e.sqrt(e.neg(t));y=(t,o)=>{let s=e.sqr(o);const i=e.mul(t,o);s=e.mul(s,i);let a=e.pow(s,r);a=e.mul(a,i);const u=e.mul(a,n),c=e.mul(e.sqr(a),o),l=e.eql(c,t);return{isValid:l,value:e.cmov(u,a,l)}}}return y}t.weierstrassPoints=f,t.weierstrass=function(e){const r=function(e){const t=(0,i.validateBasic)(e);return o.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:u}=r,d=a.BYTES+1,h=2*a.BYTES+1;function p(e){return n.mod(e,u)}function g(e){return n.invert(e,u)}const{ProjectivePoint:y,normPrivateKeyToScalar:b,weierstrassEquation:m,isWithinCurveOrder:T}=f({...r,toBytes(e,t,r){const n=t.toAffine(),s=a.toBytes(n.x),i=o.concatBytes;return r?i(Uint8Array.from([t.hasEvenY()?2:3]),s):i(Uint8Array.from([4]),s,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==d||2!==r&&3!==r){if(t===h&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${d} compressed bytes or ${h} uncompressed bytes`)}{const e=o.bytesToNumberBE(n);if(!(c<(s=e)&&so.bytesToHex(o.numberToBytesBE(e,r.nByteLength));function w(e){return e>u>>l}const A=(e,t,r)=>o.bytesToNumberBE(e.slice(t,r));class P{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,s.ensureBytes)("compactSignature",e,2*t),new P(A(e,0,t),A(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,s.ensureBytes)("DER",e));return new P(r,n)}assertValidity(){if(!T(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!T(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new P(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:o}=this,i=E((0,s.ensureBytes)("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw new Error("recovery id invalid");const u=2===o||3===o?t+r.n:t;if(u>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const c=1&o?"03":"02",l=y.fromHex(c+v(u)),d=g(u),h=p(-i*d),f=p(n*d),b=y.BASE.multiplyAndAddUnsafe(l,h,f);if(!b)throw new Error("point at infinify");return b.assertValidity(),b}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new P(this.r,p(-this.s),this.recovery):this}toDERRawBytes(){return o.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.hexToBytes(this.toCompactHex())}toCompactHex(){return v(this.r)+v(this.s)}}const W={isValidPrivateKey(e){try{return b(e),!0}catch(e){return!1}},normPrivateKeyToScalar:b,randomPrivateKey:()=>{const e=r.randomBytes(a.BYTES+8),t=n.hashToPrivateScalar(e,u);return o.numberToBytesBE(t,r.nByteLength)},precompute:(e=8,t=y.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function B(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===d||n===h:r?n===2*d||n===2*h:e instanceof y}const C=r.bits2int||function(e){const t=o.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},E=r.bits2int_modN||function(e){return p(C(e))},M=o.bitMask(r.nBitLength);function I(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(c<=e&&ee in n)))throw new Error("sign() legacy options not supported");const{hash:i,randomBytes:u}=r;let{lowS:d,prehash:h,extraEntropy:f}=n;null==d&&(d=!0),e=(0,s.ensureBytes)("msgHash",e),h&&(e=(0,s.ensureBytes)("prehashed msgHash",i(e)));const m=E(e),v=b(t),A=[I(v),I(m)];if(null!=f){const e=!0===f?u(a.BYTES):f;A.push((0,s.ensureBytes)("extraEntropy",e,a.BYTES))}const W=o.concatBytes(...A),B=m;return{seed:W,k2sig:function(e){const t=C(e);if(!T(t))return;const r=g(t),n=y.BASE.multiply(t).toAffine(),o=p(n.x);if(o===c)return;const s=p(r*p(B+o*v));if(s===c)return;let i=(n.x===o?0:2)|Number(n.y&l),a=s;return d&&w(s)&&(a=function(e){return w(e)?p(-e):e}(s),i^=1),new P(o,a,i)}}}(e,t,n);return o.createHmacDrbg(r.hash.outputLen,r.nByteLength,r.hmac)(i,u)},verify:function(e,n,o,i=O){const a=e;if(n=(0,s.ensureBytes)("msgHash",n),o=(0,s.ensureBytes)("publicKey",o),"strict"in i)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:c}=i;let l,d;try{if("string"==typeof a||a instanceof Uint8Array)try{l=P.fromDER(a)}catch(e){if(!(e instanceof t.DER.Err))throw e;l=P.fromCompact(a)}else{if("object"!=typeof a||"bigint"!=typeof a.r||"bigint"!=typeof a.s)throw new Error("PARSE");{const{r:e,s:t}=a;l=new P(e,t)}}d=y.fromHex(o)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;c&&(n=r.hash(n));const{r:h,s:f}=l,b=E(n),m=g(f),T=p(b*m),v=p(h*m),w=y.BASE.multiplyAndAddUnsafe(d,T,v)?.toAffine();return!!w&&p(w.x)===h},ProjectivePoint:y,Signature:P,utils:W}},t.SWUFpSqrtRatio=g,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=g(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let o,s,i,a,u,c,l,d;o=e.sqr(n),o=e.mul(o,t.Z),s=e.sqr(o),s=e.add(s,o),i=e.add(s,e.ONE),i=e.mul(i,t.B),a=e.cmov(t.Z,e.neg(s),!e.eql(s,e.ZERO)),a=e.mul(a,t.A),s=e.sqr(i),c=e.sqr(a),u=e.mul(c,t.A),s=e.add(s,u),s=e.mul(s,i),c=e.mul(c,a),u=e.mul(c,t.B),s=e.add(s,u),l=e.mul(o,i);const{isValid:h,value:p}=r(s,c);d=e.mul(o,n),d=e.mul(d,p),l=e.cmov(l,i,h),d=e.cmov(d,p,h);const f=e.isOdd(n)===e.isOdd(d);return d=e.cmov(e.neg(d),d,f),l=e.div(l,a),{x:l,y:d}}}},1761:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(4967),o=r(1484),s=o.bytesToNumberBE;function i(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n255&&(t=n((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:s,blockLen:l}=n,d=Math.ceil(r/s);if(d>255)throw new Error("Invalid xmd length");const h=(0,o.concatBytes)(t,i(t.length,1)),p=i(0,l),f=i(r,2),g=new Array(d),y=n((0,o.concatBytes)(p,e,f,i(0,1),h));g[0]=n((0,o.concatBytes)(y,i(1,1),h));for(let e=1;e<=d;e++){const t=[a(y,g[e-1]),i(e+1,1),h];g[e]=n((0,o.concatBytes)(...t))}return(0,o.concatBytes)(...g).slice(0,r)}function d(e,t,r,n,s){if(u(e),u(t),c(r),t.length>255){const e=Math.ceil(2*n/8);t=s.create({dkLen:e}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return s.create({dkLen:r}).update(e).update(i(r,2)).update(t).update(i(t.length,1)).digest()}function h(e,t,r){(0,o.validateObject)(r,{DST:"string",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:i,k:a,m:h,hash:p,expand:f,DST:g}=r;u(e),c(t);const y=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,o.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(g),b=i.toString(2).length,m=Math.ceil((b+a)/8),T=t*h*m;let v;if("xmd"===f)v=l(e,y,T,p);else if("xof"===f)v=d(e,y,T,a,p);else{if("_internal_pass"!==f)throw new Error('expand must be "xmd" or "xof"');v=e}const w=new Array(t);for(let e=0;eArray.from(e).reverse()));return(t,n)=>{const[o,s,i,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(o,s),n=e.mul(n,e.div(i,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,o){const s=h(n,2,{...r,DST:r.DST,...o}),i=e.fromAffine(t(s[0])),a=e.fromAffine(t(s[1])),u=i.add(a).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,o){const s=h(n,1,{...r,DST:r.encodeDST,...o}),i=e.fromAffine(t(s[0])).clearCofactor();return i.assertValidity(),i}}}},1954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;e.exports=t.default,e.exports.default=t.default},1996:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),e.replace(new RegExp("[^".concat(t,"]+"),"g"),"")};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^(0x|0h)?[0-9A-F]+$/i;e.exports=t.default,e.exports.default=t.default},2056:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e),0===((t=(0,o.default)(t,i)).ignore_whitespace?e.trim().length:e.length)};var n=s(r(3399)),o=s(r(3610));function s(e){return e&&e.__esModule?e:{default:e}}var i={ignore_whitespace:!1};e.exports=t.default,e.exports.default=t.default},2232:(e,t,r)=>{var n=r(4172),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("proto.google.protobuf.Any",null,s),proto.google.protobuf.Any=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(proto.google.protobuf.Any,n.Message),o.DEBUG&&!COMPILED&&(proto.google.protobuf.Any.displayName="proto.google.protobuf.Any"),n.Message.GENERATE_TO_OBJECT&&(proto.google.protobuf.Any.prototype.toObject=function(e){return proto.google.protobuf.Any.toObject(e,this)},proto.google.protobuf.Any.toObject=function(e,t){var r={typeUrl:n.Message.getFieldWithDefault(t,1,""),value:t.getValue_asB64()};return e&&(r.$jspbMessageInstance=t),r}),proto.google.protobuf.Any.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new proto.google.protobuf.Any;return proto.google.protobuf.Any.deserializeBinaryFromReader(r,t)},proto.google.protobuf.Any.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readString();e.setTypeUrl(r);break;case 2:r=t.readBytes(),e.setValue(r);break;default:t.skipField()}return e},proto.google.protobuf.Any.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return proto.google.protobuf.Any.serializeBinaryToWriter(this,e),e.getResultBuffer()},proto.google.protobuf.Any.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getTypeUrl()).length>0&&t.writeString(1,r),(r=e.getValue_asU8()).length>0&&t.writeBytes(2,r)},proto.google.protobuf.Any.prototype.getTypeUrl=function(){return n.Message.getFieldWithDefault(this,1,"")},proto.google.protobuf.Any.prototype.setTypeUrl=function(e){return n.Message.setProto3StringField(this,1,e)},proto.google.protobuf.Any.prototype.getValue=function(){return n.Message.getFieldWithDefault(this,2,"")},proto.google.protobuf.Any.prototype.getValue_asB64=function(){return n.Message.bytesAsB64(this.getValue())},proto.google.protobuf.Any.prototype.getValue_asU8=function(){return n.Message.bytesAsU8(this.getValue())},proto.google.protobuf.Any.prototype.setValue=function(e){return n.Message.setProto3BytesField(this,2,e)},o.object.extend(t,proto.google.protobuf),proto.google.protobuf.Any.prototype.getTypeName=function(){return this.getTypeUrl().split("/").pop()},proto.google.protobuf.Any.prototype.pack=function(e,t,r){r||(r="type.googleapis.com/"),"/"!=r.substr(-1)?this.setTypeUrl(r+"/"+t):this.setTypeUrl(r+t),this.setValue(e)},proto.google.protobuf.Any.prototype.unpack=function(e,t){return this.getTypeName()==t?e(this.getValue_asU8()):null}},2248:(e,t,r)=>{var n=r(4172),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")(),i=r(3594);o.object.extend(proto,i),o.exportSymbol("TronWebProto.AccountBalanceRequest",null,s),o.exportSymbol("TronWebProto.AccountBalanceResponse",null,s),o.exportSymbol("TronWebProto.AccountIdentifier",null,s),o.exportSymbol("TronWebProto.AccountTrace",null,s),o.exportSymbol("TronWebProto.BlockBalanceTrace",null,s),o.exportSymbol("TronWebProto.BlockBalanceTrace.BlockIdentifier",null,s),o.exportSymbol("TronWebProto.CancelAllUnfreezeV2Contract",null,s),o.exportSymbol("TronWebProto.DelegateResourceContract",null,s),o.exportSymbol("TronWebProto.FreezeBalanceContract",null,s),o.exportSymbol("TronWebProto.FreezeBalanceV2Contract",null,s),o.exportSymbol("TronWebProto.TransactionBalanceTrace",null,s),o.exportSymbol("TronWebProto.TransactionBalanceTrace.Operation",null,s),o.exportSymbol("TronWebProto.TransferContract",null,s),o.exportSymbol("TronWebProto.UnDelegateResourceContract",null,s),o.exportSymbol("TronWebProto.UnfreezeBalanceContract",null,s),o.exportSymbol("TronWebProto.UnfreezeBalanceV2Contract",null,s),o.exportSymbol("TronWebProto.WithdrawBalanceContract",null,s),o.exportSymbol("TronWebProto.WithdrawExpireUnfreezeContract",null,s),TronWebProto.FreezeBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.FreezeBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.FreezeBalanceContract.displayName="TronWebProto.FreezeBalanceContract"),TronWebProto.UnfreezeBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeBalanceContract.displayName="TronWebProto.UnfreezeBalanceContract"),TronWebProto.WithdrawBalanceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WithdrawBalanceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WithdrawBalanceContract.displayName="TronWebProto.WithdrawBalanceContract"),TronWebProto.TransferContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransferContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransferContract.displayName="TronWebProto.TransferContract"),TronWebProto.TransactionBalanceTrace=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.TransactionBalanceTrace.repeatedFields_,null)},o.inherits(TronWebProto.TransactionBalanceTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransactionBalanceTrace.displayName="TronWebProto.TransactionBalanceTrace"),TronWebProto.TransactionBalanceTrace.Operation=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransactionBalanceTrace.Operation,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransactionBalanceTrace.Operation.displayName="TronWebProto.TransactionBalanceTrace.Operation"),TronWebProto.BlockBalanceTrace=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.BlockBalanceTrace.repeatedFields_,null)},o.inherits(TronWebProto.BlockBalanceTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BlockBalanceTrace.displayName="TronWebProto.BlockBalanceTrace"),TronWebProto.BlockBalanceTrace.BlockIdentifier=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BlockBalanceTrace.BlockIdentifier,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BlockBalanceTrace.BlockIdentifier.displayName="TronWebProto.BlockBalanceTrace.BlockIdentifier"),TronWebProto.AccountTrace=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountTrace,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountTrace.displayName="TronWebProto.AccountTrace"),TronWebProto.AccountIdentifier=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountIdentifier,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountIdentifier.displayName="TronWebProto.AccountIdentifier"),TronWebProto.AccountBalanceRequest=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountBalanceRequest,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountBalanceRequest.displayName="TronWebProto.AccountBalanceRequest"),TronWebProto.AccountBalanceResponse=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountBalanceResponse,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountBalanceResponse.displayName="TronWebProto.AccountBalanceResponse"),TronWebProto.FreezeBalanceV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.FreezeBalanceV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.FreezeBalanceV2Contract.displayName="TronWebProto.FreezeBalanceV2Contract"),TronWebProto.UnfreezeBalanceV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeBalanceV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeBalanceV2Contract.displayName="TronWebProto.UnfreezeBalanceV2Contract"),TronWebProto.WithdrawExpireUnfreezeContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.WithdrawExpireUnfreezeContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.WithdrawExpireUnfreezeContract.displayName="TronWebProto.WithdrawExpireUnfreezeContract"),TronWebProto.DelegateResourceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.DelegateResourceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.DelegateResourceContract.displayName="TronWebProto.DelegateResourceContract"),TronWebProto.UnDelegateResourceContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnDelegateResourceContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnDelegateResourceContract.displayName="TronWebProto.UnDelegateResourceContract"),TronWebProto.CancelAllUnfreezeV2Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.CancelAllUnfreezeV2Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.CancelAllUnfreezeV2Contract.displayName="TronWebProto.CancelAllUnfreezeV2Contract"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.FreezeBalanceContract.prototype.toObject=function(e){return TronWebProto.FreezeBalanceContract.toObject(e,this)},TronWebProto.FreezeBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),frozenBalance:n.Message.getFieldWithDefault(t,2,0),frozenDuration:n.Message.getFieldWithDefault(t,3,0),resource:n.Message.getFieldWithDefault(t,10,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.FreezeBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.FreezeBalanceContract;return TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.FreezeBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setFrozenBalance(r);break;case 3:r=t.readInt64(),e.setFrozenDuration(r);break;case 10:r=t.readEnum(),e.setResource(r);break;case 15:r=t.readBytes(),e.setReceiverAddress(r);break;default:t.skipField()}return e},TronWebProto.FreezeBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.FreezeBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.FreezeBalanceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getFrozenBalance())&&t.writeInt64(2,r),0!==(r=e.getFrozenDuration())&&t.writeInt64(3,r),0!==(r=e.getResource())&&t.writeEnum(10,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(15,r)},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.FreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.FreezeBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.FreezeBalanceContract.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.FreezeBalanceContract.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.FreezeBalanceContract.prototype.getFrozenDuration=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.FreezeBalanceContract.prototype.setFrozenDuration=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.FreezeBalanceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.FreezeBalanceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,10,e)},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,15,"")},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.FreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.FreezeBalanceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,15,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeBalanceContract.prototype.toObject=function(e){return TronWebProto.UnfreezeBalanceContract.toObject(e,this)},TronWebProto.UnfreezeBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,10,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeBalanceContract;return TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 10:r=t.readEnum(),e.setResource(r);break;case 15:r=t.readBytes(),e.setReceiverAddress(r);break;default:t.skipField()}return e},TronWebProto.UnfreezeBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeBalanceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(10,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(15,r)},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnfreezeBalanceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.UnfreezeBalanceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,10,e)},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,15,"")},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.UnfreezeBalanceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.UnfreezeBalanceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,15,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WithdrawBalanceContract.prototype.toObject=function(e){return TronWebProto.WithdrawBalanceContract.toObject(e,this)},TronWebProto.WithdrawBalanceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WithdrawBalanceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WithdrawBalanceContract;return TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader(r,t)},TronWebProto.WithdrawBalanceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField();return e},TronWebProto.WithdrawBalanceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WithdrawBalanceContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WithdrawBalanceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WithdrawBalanceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransferContract.prototype.toObject=function(e){return TronWebProto.TransferContract.toObject(e,this)},TronWebProto.TransferContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),amount:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransferContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransferContract;return TronWebProto.TransferContract.deserializeBinaryFromReader(r,t)},TronWebProto.TransferContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setToAddress(r);break;case 3:r=t.readInt64(),e.setAmount(r);break;default:t.skipField()}return e},TronWebProto.TransferContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransferContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransferContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getAmount())&&t.writeInt64(3,r)},TronWebProto.TransferContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.TransferContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TransferContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TransferContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransferContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.TransferContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.TransferContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.TransferContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransferContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TransferContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TransactionBalanceTrace.repeatedFields_=[2],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransactionBalanceTrace.prototype.toObject=function(e){return TronWebProto.TransactionBalanceTrace.toObject(e,this)},TronWebProto.TransactionBalanceTrace.toObject=function(e,t){var r={transactionIdentifier:t.getTransactionIdentifier_asB64(),operationList:n.Message.toObjectList(t.getOperationList(),TronWebProto.TransactionBalanceTrace.Operation.toObject,e),type:n.Message.getFieldWithDefault(t,3,""),status:n.Message.getFieldWithDefault(t,4,"")};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransactionBalanceTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransactionBalanceTrace;return TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader(r,t)},TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setTransactionIdentifier(r);break;case 2:r=new TronWebProto.TransactionBalanceTrace.Operation,t.readMessage(r,TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader),e.addOperation(r);break;case 3:r=t.readString(),e.setType(r);break;case 4:r=t.readString(),e.setStatus(r);break;default:t.skipField()}return e},TronWebProto.TransactionBalanceTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getTransactionIdentifier_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOperationList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter),(r=e.getType()).length>0&&t.writeString(3,r),(r=e.getStatus()).length>0&&t.writeString(4,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransactionBalanceTrace.Operation.prototype.toObject=function(e){return TronWebProto.TransactionBalanceTrace.Operation.toObject(e,this)},TronWebProto.TransactionBalanceTrace.Operation.toObject=function(e,t){var r={operationIdentifier:n.Message.getFieldWithDefault(t,1,0),address:t.getAddress_asB64(),amount:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransactionBalanceTrace.Operation.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransactionBalanceTrace.Operation;return TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader(r,t)},TronWebProto.TransactionBalanceTrace.Operation.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setOperationIdentifier(r);break;case 2:r=t.readBytes(),e.setAddress(r);break;case 3:r=t.readInt64(),e.setAmount(r);break;default:t.skipField()}return e},TronWebProto.TransactionBalanceTrace.Operation.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransactionBalanceTrace.Operation.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getOperationIdentifier())&&t.writeInt64(1,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getAmount())&&t.writeInt64(3,r)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getOperationIdentifier=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.TransactionBalanceTrace.Operation.prototype.setOperationIdentifier=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.TransactionBalanceTrace.Operation.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransactionBalanceTrace.Operation.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TransactionBalanceTrace.Operation.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asB64=function(){return n.Message.bytesAsB64(this.getTransactionIdentifier())},TronWebProto.TransactionBalanceTrace.prototype.getTransactionIdentifier_asU8=function(){return n.Message.bytesAsU8(this.getTransactionIdentifier())},TronWebProto.TransactionBalanceTrace.prototype.setTransactionIdentifier=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransactionBalanceTrace.prototype.getOperationList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.TransactionBalanceTrace.Operation,2)},TronWebProto.TransactionBalanceTrace.prototype.setOperationList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.TransactionBalanceTrace.prototype.addOperation=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.TransactionBalanceTrace.Operation,t)},TronWebProto.TransactionBalanceTrace.prototype.clearOperationList=function(){return this.setOperationList([])},TronWebProto.TransactionBalanceTrace.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.TransactionBalanceTrace.prototype.setType=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.TransactionBalanceTrace.prototype.getStatus=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.TransactionBalanceTrace.prototype.setStatus=function(e){return n.Message.setProto3StringField(this,4,e)},TronWebProto.BlockBalanceTrace.repeatedFields_=[3],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BlockBalanceTrace.prototype.toObject=function(e){return TronWebProto.BlockBalanceTrace.toObject(e,this)},TronWebProto.BlockBalanceTrace.toObject=function(e,t){var r,o={blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r),timestamp:n.Message.getFieldWithDefault(t,2,0),transactionBalanceTraceList:n.Message.toObjectList(t.getTransactionBalanceTraceList(),TronWebProto.TransactionBalanceTrace.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.BlockBalanceTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BlockBalanceTrace;return TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader(r,t)},TronWebProto.BlockBalanceTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;case 2:r=t.readInt64(),e.setTimestamp(r);break;case 3:r=new TronWebProto.TransactionBalanceTrace,t.readMessage(r,TronWebProto.TransactionBalanceTrace.deserializeBinaryFromReader),e.addTransactionBalanceTrace(r);break;default:t.skipField()}return e},TronWebProto.BlockBalanceTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BlockBalanceTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BlockBalanceTrace.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getBlockIdentifier())&&t.writeMessage(1,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter),0!==(r=e.getTimestamp())&&t.writeInt64(2,r),(r=e.getTransactionBalanceTraceList()).length>0&&t.writeRepeatedMessage(3,r,TronWebProto.TransactionBalanceTrace.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.toObject=function(e){return TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,this)},TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject=function(e,t){var r={hash:t.getHash_asB64(),number:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BlockBalanceTrace.BlockIdentifier;return TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader(r,t)},TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setHash(r);break;case 2:r=t.readInt64(),e.setNumber(r);break;default:t.skipField()}return e},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getHash_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getNumber())&&t.writeInt64(2,r)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asB64=function(){return n.Message.bytesAsB64(this.getHash())},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getHash_asU8=function(){return n.Message.bytesAsU8(this.getHash())},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setHash=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.getNumber=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BlockBalanceTrace.BlockIdentifier.prototype.setNumber=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.BlockBalanceTrace.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,1)},TronWebProto.BlockBalanceTrace.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.BlockBalanceTrace.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.BlockBalanceTrace.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,1)},TronWebProto.BlockBalanceTrace.prototype.getTimestamp=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BlockBalanceTrace.prototype.setTimestamp=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.BlockBalanceTrace.prototype.getTransactionBalanceTraceList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.TransactionBalanceTrace,3)},TronWebProto.BlockBalanceTrace.prototype.setTransactionBalanceTraceList=function(e){return n.Message.setRepeatedWrapperField(this,3,e)},TronWebProto.BlockBalanceTrace.prototype.addTransactionBalanceTrace=function(e,t){return n.Message.addToRepeatedWrapperField(this,3,e,TronWebProto.TransactionBalanceTrace,t)},TronWebProto.BlockBalanceTrace.prototype.clearTransactionBalanceTraceList=function(){return this.setTransactionBalanceTraceList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountTrace.prototype.toObject=function(e){return TronWebProto.AccountTrace.toObject(e,this)},TronWebProto.AccountTrace.toObject=function(e,t){var r={balance:n.Message.getFieldWithDefault(t,1,0),placeholder:n.Message.getFieldWithDefault(t,99,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountTrace.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountTrace;return TronWebProto.AccountTrace.deserializeBinaryFromReader(r,t)},TronWebProto.AccountTrace.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setBalance(r);break;case 99:r=t.readInt64(),e.setPlaceholder(r);break;default:t.skipField()}return e},TronWebProto.AccountTrace.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountTrace.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountTrace.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getBalance())&&t.writeInt64(1,r),0!==(r=e.getPlaceholder())&&t.writeInt64(99,r)},TronWebProto.AccountTrace.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AccountTrace.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AccountTrace.prototype.getPlaceholder=function(){return n.Message.getFieldWithDefault(this,99,0)},TronWebProto.AccountTrace.prototype.setPlaceholder=function(e){return n.Message.setProto3IntField(this,99,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountIdentifier.prototype.toObject=function(e){return TronWebProto.AccountIdentifier.toObject(e,this)},TronWebProto.AccountIdentifier.toObject=function(e,t){var r={address:t.getAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountIdentifier.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountIdentifier;return TronWebProto.AccountIdentifier.deserializeBinaryFromReader(r,t)},TronWebProto.AccountIdentifier.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)if(1===t.getFieldNumber()){var r=t.readBytes();e.setAddress(r)}else t.skipField();return e},TronWebProto.AccountIdentifier.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountIdentifier.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountIdentifier.serializeBinaryToWriter=function(e,t){var r;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.AccountIdentifier.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AccountIdentifier.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.AccountIdentifier.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.AccountIdentifier.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountBalanceRequest.prototype.toObject=function(e){return TronWebProto.AccountBalanceRequest.toObject(e,this)},TronWebProto.AccountBalanceRequest.toObject=function(e,t){var r,n={accountIdentifier:(r=t.getAccountIdentifier())&&TronWebProto.AccountIdentifier.toObject(e,r),blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.AccountBalanceRequest.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountBalanceRequest;return TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader(r,t)},TronWebProto.AccountBalanceRequest.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new TronWebProto.AccountIdentifier;t.readMessage(r,TronWebProto.AccountIdentifier.deserializeBinaryFromReader),e.setAccountIdentifier(r);break;case 2:r=new TronWebProto.BlockBalanceTrace.BlockIdentifier,t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;default:t.skipField()}return e},TronWebProto.AccountBalanceRequest.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountBalanceRequest.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountBalanceRequest.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getAccountIdentifier())&&t.writeMessage(1,r,TronWebProto.AccountIdentifier.serializeBinaryToWriter),null!=(r=e.getBlockIdentifier())&&t.writeMessage(2,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},TronWebProto.AccountBalanceRequest.prototype.getAccountIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.AccountIdentifier,1)},TronWebProto.AccountBalanceRequest.prototype.setAccountIdentifier=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.AccountBalanceRequest.prototype.clearAccountIdentifier=function(){return this.setAccountIdentifier(void 0)},TronWebProto.AccountBalanceRequest.prototype.hasAccountIdentifier=function(){return null!=n.Message.getField(this,1)},TronWebProto.AccountBalanceRequest.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,2)},TronWebProto.AccountBalanceRequest.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountBalanceRequest.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.AccountBalanceRequest.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,2)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountBalanceResponse.prototype.toObject=function(e){return TronWebProto.AccountBalanceResponse.toObject(e,this)},TronWebProto.AccountBalanceResponse.toObject=function(e,t){var r,o={balance:n.Message.getFieldWithDefault(t,1,0),blockIdentifier:(r=t.getBlockIdentifier())&&TronWebProto.BlockBalanceTrace.BlockIdentifier.toObject(e,r)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.AccountBalanceResponse.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountBalanceResponse;return TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader(r,t)},TronWebProto.AccountBalanceResponse.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setBalance(r);break;case 2:r=new TronWebProto.BlockBalanceTrace.BlockIdentifier,t.readMessage(r,TronWebProto.BlockBalanceTrace.BlockIdentifier.deserializeBinaryFromReader),e.setBlockIdentifier(r);break;default:t.skipField()}return e},TronWebProto.AccountBalanceResponse.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountBalanceResponse.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountBalanceResponse.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getBalance())&&t.writeInt64(1,r),null!=(r=e.getBlockIdentifier())&&t.writeMessage(2,r,TronWebProto.BlockBalanceTrace.BlockIdentifier.serializeBinaryToWriter)},TronWebProto.AccountBalanceResponse.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AccountBalanceResponse.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AccountBalanceResponse.prototype.getBlockIdentifier=function(){return n.Message.getWrapperField(this,TronWebProto.BlockBalanceTrace.BlockIdentifier,2)},TronWebProto.AccountBalanceResponse.prototype.setBlockIdentifier=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountBalanceResponse.prototype.clearBlockIdentifier=function(){return this.setBlockIdentifier(void 0)},TronWebProto.AccountBalanceResponse.prototype.hasBlockIdentifier=function(){return null!=n.Message.getField(this,2)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.FreezeBalanceV2Contract.prototype.toObject=function(e){return TronWebProto.FreezeBalanceV2Contract.toObject(e,this)},TronWebProto.FreezeBalanceV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),frozenBalance:n.Message.getFieldWithDefault(t,2,0),resource:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.FreezeBalanceV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.FreezeBalanceV2Contract;return TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.FreezeBalanceV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setFrozenBalance(r);break;case 3:r=t.readEnum(),e.setResource(r);break;default:t.skipField()}return e},TronWebProto.FreezeBalanceV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.FreezeBalanceV2Contract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getFrozenBalance())&&t.writeInt64(2,r),0!==(r=e.getResource())&&t.writeEnum(3,r)},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.FreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.FreezeBalanceV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.FreezeBalanceV2Contract.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.FreezeBalanceV2Contract.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.FreezeBalanceV2Contract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.FreezeBalanceV2Contract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeBalanceV2Contract.prototype.toObject=function(e){return TronWebProto.UnfreezeBalanceV2Contract.toObject(e,this)},TronWebProto.UnfreezeBalanceV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),unfreezeBalance:n.Message.getFieldWithDefault(t,2,0),resource:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeBalanceV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeBalanceV2Contract;return TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeBalanceV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setUnfreezeBalance(r);break;case 3:r=t.readEnum(),e.setResource(r);break;default:t.skipField()}return e},TronWebProto.UnfreezeBalanceV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeBalanceV2Contract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getUnfreezeBalance())&&t.writeInt64(2,r),0!==(r=e.getResource())&&t.writeEnum(3,r)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeBalanceV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getUnfreezeBalance=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UnfreezeBalanceV2Contract.prototype.setUnfreezeBalance=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.UnfreezeBalanceV2Contract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UnfreezeBalanceV2Contract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.WithdrawExpireUnfreezeContract.prototype.toObject=function(e){return TronWebProto.WithdrawExpireUnfreezeContract.toObject(e,this)},TronWebProto.WithdrawExpireUnfreezeContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.WithdrawExpireUnfreezeContract;return TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader(r,t)},TronWebProto.WithdrawExpireUnfreezeContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField();return e},TronWebProto.WithdrawExpireUnfreezeContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.WithdrawExpireUnfreezeContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.WithdrawExpireUnfreezeContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.WithdrawExpireUnfreezeContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.DelegateResourceContract.prototype.toObject=function(e){return TronWebProto.DelegateResourceContract.toObject(e,this)},TronWebProto.DelegateResourceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,2,0),balance:n.Message.getFieldWithDefault(t,3,0),receiverAddress:t.getReceiverAddress_asB64(),lock:n.Message.getBooleanFieldWithDefault(t,5,!1),lockPeriod:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.DelegateResourceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.DelegateResourceContract;return TronWebProto.DelegateResourceContract.deserializeBinaryFromReader(r,t)},TronWebProto.DelegateResourceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readEnum(),e.setResource(r);break;case 3:r=t.readInt64(),e.setBalance(r);break;case 4:r=t.readBytes(),e.setReceiverAddress(r);break;case 5:r=t.readBool(),e.setLock(r);break;case 6:r=t.readInt64(),e.setLockPeriod(r);break;default:t.skipField()}return e},TronWebProto.DelegateResourceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.DelegateResourceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.DelegateResourceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(2,r),0!==(r=e.getBalance())&&t.writeInt64(3,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(4,r),(r=e.getLock())&&t.writeBool(5,r),0!==(r=e.getLockPeriod())&&t.writeInt64(6,r)},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.DelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.DelegateResourceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.DelegateResourceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.DelegateResourceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.DelegateResourceContract.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.DelegateResourceContract.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.DelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.DelegateResourceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.DelegateResourceContract.prototype.getLock=function(){return n.Message.getBooleanFieldWithDefault(this,5,!1)},TronWebProto.DelegateResourceContract.prototype.setLock=function(e){return n.Message.setProto3BooleanField(this,5,e)},TronWebProto.DelegateResourceContract.prototype.getLockPeriod=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.DelegateResourceContract.prototype.setLockPeriod=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnDelegateResourceContract.prototype.toObject=function(e){return TronWebProto.UnDelegateResourceContract.toObject(e,this)},TronWebProto.UnDelegateResourceContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),resource:n.Message.getFieldWithDefault(t,2,0),balance:n.Message.getFieldWithDefault(t,3,0),receiverAddress:t.getReceiverAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnDelegateResourceContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnDelegateResourceContract;return TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnDelegateResourceContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readEnum(),e.setResource(r);break;case 3:r=t.readInt64(),e.setBalance(r);break;case 4:r=t.readBytes(),e.setReceiverAddress(r);break;default:t.skipField()}return e},TronWebProto.UnDelegateResourceContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnDelegateResourceContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getResource())&&t.writeEnum(2,r),0!==(r=e.getBalance())&&t.writeInt64(3,r),(r=e.getReceiverAddress_asU8()).length>0&&t.writeBytes(4,r)},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnDelegateResourceContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnDelegateResourceContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UnDelegateResourceContract.prototype.getResource=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UnDelegateResourceContract.prototype.setResource=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.UnDelegateResourceContract.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UnDelegateResourceContract.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asB64=function(){return n.Message.bytesAsB64(this.getReceiverAddress())},TronWebProto.UnDelegateResourceContract.prototype.getReceiverAddress_asU8=function(){return n.Message.bytesAsU8(this.getReceiverAddress())},TronWebProto.UnDelegateResourceContract.prototype.setReceiverAddress=function(e){return n.Message.setProto3BytesField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.CancelAllUnfreezeV2Contract.prototype.toObject=function(e){return TronWebProto.CancelAllUnfreezeV2Contract.toObject(e,this)},TronWebProto.CancelAllUnfreezeV2Contract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.CancelAllUnfreezeV2Contract;return TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader(r,t)},TronWebProto.CancelAllUnfreezeV2Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField();return e},TronWebProto.CancelAllUnfreezeV2Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.CancelAllUnfreezeV2Contract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.CancelAllUnfreezeV2Contract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.CancelAllUnfreezeV2Contract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},o.object.extend(t,TronWebProto)},2309:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=t?new RegExp("^[".concat(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+"),"g"):/^\s+/g;return e.replace(r,"")};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(4967),o=r(1484),s=BigInt(0),i=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>s;)r&i&&(n=n.add(o)),o=o.double(),r>>=i;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),s=[];let i=e,a=i;for(let e=0;e>=p,n>u&&(n-=h,s+=i);const a=t,f=t+Math.abs(n)-1,g=e%2!=0,y=n<0;0===n?l=l.add(r(g,o[a])):c=c.add(r(y,o[f]))}return{p:c,f:l}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,o),1!==o&&t.set(e,n(s))),this.wNAF(o,s,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,o.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},2483:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t){var r=new RegExp("[".concat(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"]+$"),"g");return e.replace(r,"")}for(var n=e.length-1;/\s/.test(e.charAt(n));)n-=1;return e.slice(0,n+1)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2576:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return(0,o.default)(e),"[object RegExp]"!==Object.prototype.toString.call(t)&&(t=new RegExp(t,r)),!!e.match(t)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},2645:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t in i)return i[t](e);if("any"===t){for(var r in i)if(i.hasOwnProperty(r)&&(0,i[r])(e))return!0;return!1}throw new Error("Invalid locale '".concat(t,"'"))};var n=s(r(3399)),o=s(r(6084));function s(e){return e&&e.__esModule?e:{default:e}}var i={PL:function(e){(0,n.default)(e);var t={1:1,2:3,3:7,4:9,5:1,6:3,7:7,8:9,9:1,10:3,11:0};if(null!=e&&11===e.length&&(0,o.default)(e,{allow_leading_zeroes:!0})){var r=e.split("").slice(0,-1).reduce((function(e,r,n){return e+Number(r)*t[n+1]}),0)%10,s=Number(e.charAt(e.length-1));if(0===r&&0===s||s===10-r)return!0}return!1},ES:function(e){(0,n.default)(e);var t={X:0,Y:1,Z:2},r=e.trim().toUpperCase();if(!/^[0-9X-Z][0-9]{7}[TRWAGMYFPDXBNJZSQVHLCKE]$/.test(r))return!1;var o=r.slice(0,-1).replace(/[X,Y,Z]/g,(function(e){return t[e]}));return r.endsWith(["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"][o%23])},FI:function(e){return(0,n.default)(e),11===e.length&&(!!e.match(/^\d{6}[\-A\+]\d{3}[0-9ABCDEFHJKLMNPRSTUVWXY]{1}$/)&&"0123456789ABCDEFHJKLMNPRSTUVWXY"[(1e3*parseInt(e.slice(0,6),10)+parseInt(e.slice(7,10),10))%31]===e.slice(10,11))},IN:function(e){var t=[[0,1,2,3,4,5,6,7,8,9],[1,2,3,4,0,6,7,8,9,5],[2,3,4,0,1,7,8,9,5,6],[3,4,0,1,2,8,9,5,6,7],[4,0,1,2,3,9,5,6,7,8],[5,9,8,7,6,0,4,3,2,1],[6,5,9,8,7,1,0,4,3,2],[7,6,5,9,8,2,1,0,4,3],[8,7,6,5,9,3,2,1,0,4],[9,8,7,6,5,4,3,2,1,0]],r=[[0,1,2,3,4,5,6,7,8,9],[1,5,7,6,2,8,3,0,9,4],[5,8,0,3,7,9,6,1,4,2],[8,9,1,6,0,4,3,5,2,7],[9,4,5,3,1,2,6,8,7,0],[4,2,8,6,5,7,3,9,0,1],[2,7,9,3,8,0,6,4,1,5],[7,0,4,6,9,1,3,2,5,8]],n=e.trim();if(!/^[1-9]\d{3}\s?\d{4}\s?\d{4}$/.test(n))return!1;var o=0;return n.replace(/\s/g,"").split("").map(Number).reverse().forEach((function(e,n){o=t[o][r[n%8][e]]})),0===o},IR:function(e){if(!e.match(/^\d{10}$/))return!1;if(e="0000".concat(e).slice(e.length-6),0===parseInt(e.slice(3,9),10))return!1;for(var t=parseInt(e.slice(9,10),10),r=0,n=0;n<9;n++)r+=parseInt(e.slice(n,n+1),10)*(10-n);return(r%=11)<2&&t===r||r>=2&&t===11-r},IT:function(e){return 9===e.length&&"CA00000AA"!==e&&e.search(/C[A-Z][0-9]{5}[A-Z]{2}/i)>-1},NO:function(e){var t=e.trim();if(isNaN(Number(t)))return!1;if(11!==t.length)return!1;if("00000000000"===t)return!1;var r=t.split("").map(Number),n=(11-(3*r[0]+7*r[1]+6*r[2]+1*r[3]+8*r[4]+9*r[5]+4*r[6]+5*r[7]+2*r[8])%11)%11,o=(11-(5*r[0]+4*r[1]+3*r[2]+2*r[3]+7*r[4]+6*r[5]+5*r[6]+4*r[7]+3*r[8]+2*n)%11)%11;return n===r[9]&&o===r[10]},TH:function(e){if(!e.match(/^[1-8]\d{12}$/))return!1;for(var t=0,r=0;r<12;r++)t+=parseInt(e[r],10)*(13-r);return e[12]===((11-t%11)%10).toString()},LK:function(e){return!(10!==e.length||!/^[1-9]\d{8}[vx]$/i.test(e))||!(12!==e.length||!/^[1-9]\d{11}$/i.test(e))},"he-IL":function(e){var t=e.trim();if(!/^\d{9}$/.test(t))return!1;for(var r,n=t,o=0,s=0;s9?r-9:r;return o%10==0},"ar-LY":function(e){var t=e.trim();return!!/^(1|2)\d{11}$/.test(t)},"ar-TN":function(e){var t=e.trim();return!!/^\d{8}$/.test(t)},"zh-CN":function(e){var t,r=["11","12","13","14","15","21","22","23","31","32","33","34","35","36","37","41","42","43","44","45","46","50","51","52","53","54","61","62","63","64","65","71","81","82","91"],n=["7","9","10","5","8","4","2","1","6","3","7","9","10","5","8","4","2"],o=["1","0","X","9","8","7","6","5","4","3","2"],s=function(e){return r.includes(e)},i=function(e){var t=parseInt(e.substring(0,4),10),r=parseInt(e.substring(4,6),10),n=parseInt(e.substring(6),10),o=new Date(t,r-1,n);return!(o>new Date)&&o.getFullYear()===t&&o.getMonth()===r-1&&o.getDate()===n};return!!/^\d{15}|(\d{17}(\d|x|X))$/.test(t=e)&&(15===t.length?function(e){var t=/^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(e);if(!t)return!1;var r=e.substring(0,2);if(!(t=s(r)))return!1;var n="19".concat(e.substring(6,12));return!!(t=i(n))}(t):function(e){var t=/^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(e);if(!t)return!1;var r=e.substring(0,2);if(!(t=s(r)))return!1;var a=e.substring(6,14);return!!(t=i(a))&&function(e){return function(e){for(var t=e.substring(0,17),r=0,s=0;s<17;s++)r+=parseInt(t.charAt(s),10)*parseInt(n[s],10);return o[r%11]}(e)===e.charAt(17).toUpperCase()}(e)}(t))},"zh-HK":function(e){var t=/^[0-9]$/;if(e=(e=e.trim()).toUpperCase(),!/^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/.test(e))return!1;8===(e=e.replace(/\[|\]|\(|\)/g,"")).length&&(e="3".concat(e));for(var r=0,n=0;n<=7;n++)r+=(t.test(e[n])?e[n]:(e[n].charCodeAt(0)-55)%11)*(9-n);return(0==(r%=11)?"0":1===r?"A":String(11-r))===e[e.length-1]},"zh-TW":function(e){var t={A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,I:34,J:18,K:19,L:20,M:21,N:22,O:35,P:23,Q:24,R:25,S:26,T:27,U:28,V:29,W:32,X:30,Y:31,Z:33},r=e.trim().toUpperCase();return!!/^[A-Z][0-9]{9}$/.test(r)&&Array.from(r).reduce((function(e,r,n){if(0===n){var o=t[r];return o%10*9+Math.floor(o/10)}return 9===n?(10-e%10-Number(r))%10==0:e+Number(r)*(9-n)}),0)}};e.exports=t.default,e.exports.default=t.default},2678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,o.default)(e),!s.test(e))return!1;for(var t=!0,r=0,n=e.length-2;n>=0;n--)if(e[n]>="A"&&e[n]<="Z")for(var i=e[n].charCodeAt(0)-55,a=0,u=[i%10,Math.trunc(i/10)];a=5?1+2*(c-5):2*c:c,t=!t}else{var l=e[n].charCodeAt(0)-"0".charCodeAt(0);r+=t?l>=5?1+2*(l-5):2*l:l,t=!t}var d=10*Math.trunc((r+9)/10)-r;return+e[e.length-1]===d};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;e.exports=t.default,e.exports.default=t.default},2830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/[^\x00-\x7F]/;e.exports=t.default,e.exports.default=t.default},2894:(e,t,r)=>{"use strict";t.decode=t.parse=r(4930),t.encode=t.stringify=r(1590)},3196:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){return(0,o.default)(t),null!=r&&r.eui&&(r.eui=String(r.eui)),null!=r&&r.no_colons||null!=r&&r.no_separators?"48"===r.eui?i.test(t):"64"===r.eui?c.test(t):i.test(t)||c.test(t):"48"===(null==r?void 0:r.eui)?s.test(t)||a.test(t):"64"===(null==r?void 0:r.eui)?u.test(t)||l.test(t):e(t,{eui:"48"})||e(t,{eui:"64"})};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/,i=/^([0-9a-fA-F]){12}$/,a=/^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/,u=/^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/,c=/^([0-9a-fA-F]){16}$/,l=/^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/;e.exports=t.default,e.exports.default=t.default},3214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),t?"1"===e||/^true$/i.test(e):"0"!==e&&!/^false$/i.test(e)&&""!==e};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3237:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.commaDecimal=t.dotDecimal=t.bengaliLocales=t.farsiLocales=t.arabicLocales=t.englishLocales=t.decimal=t.alphanumeric=t.alpha=void 0;var r={"en-US":/^[A-Z]+$/i,"az-AZ":/^[A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[А-Я]+$/i,"cs-CZ":/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[A-ZÆØÅ]+$/i,"de-DE":/^[A-ZÄÖÜß]+$/i,"el-GR":/^[Α-ώ]+$/i,"es-ES":/^[A-ZÁÉÍÑÓÚÜ]+$/i,"fa-IR":/^[ابپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی]+$/i,"fi-FI":/^[A-ZÅÄÖ]+$/i,"fr-FR":/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"nb-NO":/^[A-ZÆØÅ]+$/i,"nl-NL":/^[A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[A-ZÆØÅ]+$/i,"hu-HU":/^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"pl-PL":/^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[А-ЯЁ]+$/i,"sl-SI":/^[A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๐\s]+$/i,"tr-TR":/^[A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[А-ЩЬЮЯЄIЇҐі]+$/i,"vi-VN":/^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,"ko-KR":/^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[א-ת]+$/,fa:/^['آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,"hi-IN":/^[\u0900-\u0961]+[\u0972-\u097F]*$/i,"si-LK":/^[\u0D80-\u0DFF]+$/};t.alpha=r;var n={"en-US":/^[0-9A-Z]+$/i,"az-AZ":/^[0-9A-VXYZÇƏĞİıÖŞÜ]+$/i,"bg-BG":/^[0-9А-Я]+$/i,"cs-CZ":/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,"da-DK":/^[0-9A-ZÆØÅ]+$/i,"de-DE":/^[0-9A-ZÄÖÜß]+$/i,"el-GR":/^[0-9Α-ω]+$/i,"es-ES":/^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,"fi-FI":/^[0-9A-ZÅÄÖ]+$/i,"fr-FR":/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,"it-IT":/^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,"ja-JP":/^[0-90-9ぁ-んァ-ヶヲ-゚一-龠ー・。、]+$/i,"hu-HU":/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,"nb-NO":/^[0-9A-ZÆØÅ]+$/i,"nl-NL":/^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,"nn-NO":/^[0-9A-ZÆØÅ]+$/i,"pl-PL":/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,"pt-PT":/^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,"ru-RU":/^[0-9А-ЯЁ]+$/i,"sl-SI":/^[0-9A-ZČĆĐŠŽ]+$/i,"sk-SK":/^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,"sr-RS@latin":/^[0-9A-ZČĆŽŠĐ]+$/i,"sr-RS":/^[0-9А-ЯЂЈЉЊЋЏ]+$/i,"sv-SE":/^[0-9A-ZÅÄÖ]+$/i,"th-TH":/^[ก-๙\s]+$/i,"tr-TR":/^[0-9A-ZÇĞİıÖŞÜ]+$/i,"uk-UA":/^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,"ko-KR":/^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,"ku-IQ":/^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,"vi-VN":/^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,he:/^[0-9א-ת]+$/,fa:/^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,bn:/^['ঀঁংঃঅআইঈউঊঋঌএঐওঔকখগঘঙচছজঝঞটঠডঢণতথদধনপফবভমযরলশষসহ়ঽািীুূৃৄেৈোৌ্ৎৗড়ঢ়য়ৠৡৢৣ০১২৩৪৫৬৭৮৯ৰৱ৲৳৴৵৶৷৸৹৺৻']+$/,"hi-IN":/^[\u0900-\u0963]+[\u0966-\u097F]*$/i,"si-LK":/^[0-9\u0D80-\u0DFF]+$/};t.alphanumeric=n;var o={"en-US":".",ar:"٫"};t.decimal=o;var s=["AU","GB","HK","IN","NZ","ZA","ZM"];t.englishLocales=s;for(var i,a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(3764),o=r(1130);class s extends o.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,o.createView)(this.buffer)}update(e){n.default.exists(this);const{view:t,buffer:r,blockLen:s}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;ns-a&&(this.process(r,0),a=0);for(let e=a;e>o&s),a=Number(r&s),u=n?4:0,c=n?0:4;e.setUint32(t+u,i,n),e.setUint32(t+c,a,n)}(r,s-8,BigInt(8*this.length),i),this.process(r,0);const u=(0,o.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,d=this.get();if(l>d.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String)){var t=r(e);throw null===e?t="null":"object"===t&&(t=e.constructor.name),new TypeError("Expected a string but received a ".concat(t))}},e.exports=t.default,e.exports.default=t.default},3442:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=e.replace(/\s/g,"").toUpperCase();return t.toUpperCase()in s&&s[t].test(r)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s={AM:/^[A-Z]{2}\d{7}$/,AR:/^[A-Z]{3}\d{6}$/,AT:/^[A-Z]\d{7}$/,AU:/^[A-Z]\d{7}$/,AZ:/^[A-Z]{2,3}\d{7,8}$/,BE:/^[A-Z]{2}\d{6}$/,BG:/^\d{9}$/,BR:/^[A-Z]{2}\d{6}$/,BY:/^[A-Z]{2}\d{7}$/,CA:/^[A-Z]{2}\d{6}$/,CH:/^[A-Z]\d{7}$/,CN:/^G\d{8}$|^E(?![IO])[A-Z0-9]\d{7}$/,CY:/^[A-Z](\d{6}|\d{8})$/,CZ:/^\d{8}$/,DE:/^[CFGHJKLMNPRTVWXYZ0-9]{9}$/,DK:/^\d{9}$/,DZ:/^\d{9}$/,EE:/^([A-Z]\d{7}|[A-Z]{2}\d{7})$/,ES:/^[A-Z0-9]{2}([A-Z0-9]?)\d{6}$/,FI:/^[A-Z]{2}\d{7}$/,FR:/^\d{2}[A-Z]{2}\d{5}$/,GB:/^\d{9}$/,GR:/^[A-Z]{2}\d{7}$/,HR:/^\d{9}$/,HU:/^[A-Z]{2}(\d{6}|\d{7})$/,IE:/^[A-Z0-9]{2}\d{7}$/,IN:/^[A-Z]{1}-?\d{7}$/,ID:/^[A-C]\d{7}$/,IR:/^[A-Z]\d{8}$/,IS:/^(A)\d{7}$/,IT:/^[A-Z0-9]{2}\d{7}$/,JM:/^[Aa]\d{7}$/,JP:/^[A-Z]{2}\d{7}$/,KR:/^[MS]\d{8}$/,KZ:/^[a-zA-Z]\d{7}$/,LI:/^[a-zA-Z]\d{5}$/,LT:/^[A-Z0-9]{8}$/,LU:/^[A-Z0-9]{8}$/,LV:/^[A-Z0-9]{2}\d{7}$/,LY:/^[A-Z0-9]{8}$/,MT:/^\d{7}$/,MZ:/^([A-Z]{2}\d{7})|(\d{2}[A-Z]{2}\d{5})$/,MY:/^[AHK]\d{8}$/,MX:/^\d{10,11}$/,NL:/^[A-Z]{2}[A-Z0-9]{6}\d$/,NZ:/^([Ll]([Aa]|[Dd]|[Ff]|[Hh])|[Ee]([Aa]|[Pp])|[Nn])\d{6}$/,PH:/^([A-Z](\d{6}|\d{7}[A-Z]))|([A-Z]{2}(\d{6}|\d{7}))$/,PK:/^[A-Z]{2}\d{7}$/,PL:/^[A-Z]{2}\d{7}$/,PT:/^[A-Z]\d{6}$/,RO:/^\d{8,9}$/,RU:/^\d{9}$/,SE:/^\d{8}$/,SL:/^(P)[A-Z]\d{7}$/,SK:/^[0-9A-Z]\d{7}$/,TH:/^[A-Z]{1,2}\d{6,7}$/,TR:/^[A-Z]\d{8}$/,UA:/^[A-Z]{2}\d{6}$/,US:/^\d{9}$/};e.exports=t.default,e.exports.default=t.default},3459:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/;e.exports=t.default,e.exports.default=t.default},3562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(3788),o=r(1130),s=r(1705);function i(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,o.concatBytes)(...r)),randomBytes:o.randomBytes}}t.getHash=i,t.createCurve=function(e,t){const r=t=>(0,s.weierstrass)({...e,...i(t)});return Object.freeze({...r(t),create:r})}},3583:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.split(",");if(t.length<2)return!1;var r=t.shift().trim().split(";"),n=r.shift();if("data:"!==n.slice(0,5))return!1;var u=n.slice(5);if(""!==u&&!s.test(u))return!1;for(var c=0;c{var n=r(4172),o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==o&&o||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();n.exportSymbol("TronWebProto.ResourceCode",null,o),TronWebProto.ResourceCode={BANDWIDTH:0,ENERGY:1,TRON_POWER:2},n.object.extend(t,TronWebProto)},3609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);for(var t,r,n,s=e.replace(/[- ]+/g,""),i=0,a=s.length-1;a>=0;a--)t=s.substring(a,a+1),r=parseInt(t,10),i+=n&&(r*=2)>=10?r%10+1:r,n=!n;return!(i%10!=0||!s)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var r in t)void 0===e[r]&&(e[r]=t[r]);return e},e.exports=t.default,e.exports.default=t.default},3629:(e,t,r)=>{var n=r(4172),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")(),i=r(9037);o.object.extend(proto,i),o.exportSymbol("TronWebProto.ClearABIContract",null,s),o.exportSymbol("TronWebProto.ContractState",null,s),o.exportSymbol("TronWebProto.CreateSmartContract",null,s),o.exportSymbol("TronWebProto.SmartContract",null,s),o.exportSymbol("TronWebProto.SmartContract.ABI",null,s),o.exportSymbol("TronWebProto.SmartContract.ABI.Entry",null,s),o.exportSymbol("TronWebProto.SmartContract.ABI.Entry.EntryType",null,s),o.exportSymbol("TronWebProto.SmartContract.ABI.Entry.Param",null,s),o.exportSymbol("TronWebProto.SmartContract.ABI.Entry.StateMutabilityType",null,s),o.exportSymbol("TronWebProto.SmartContractDataWrapper",null,s),o.exportSymbol("TronWebProto.TriggerSmartContract",null,s),o.exportSymbol("TronWebProto.UpdateEnergyLimitContract",null,s),o.exportSymbol("TronWebProto.UpdateSettingContract",null,s),TronWebProto.SmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.displayName="TronWebProto.SmartContract"),TronWebProto.SmartContract.ABI=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.SmartContract.ABI.repeatedFields_,null)},o.inherits(TronWebProto.SmartContract.ABI,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.displayName="TronWebProto.SmartContract.ABI"),TronWebProto.SmartContract.ABI.Entry=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.SmartContract.ABI.Entry.repeatedFields_,null)},o.inherits(TronWebProto.SmartContract.ABI.Entry,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.Entry.displayName="TronWebProto.SmartContract.ABI.Entry"),TronWebProto.SmartContract.ABI.Entry.Param=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContract.ABI.Entry.Param,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContract.ABI.Entry.Param.displayName="TronWebProto.SmartContract.ABI.Entry.Param"),TronWebProto.ContractState=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ContractState,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ContractState.displayName="TronWebProto.ContractState"),TronWebProto.CreateSmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.CreateSmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.CreateSmartContract.displayName="TronWebProto.CreateSmartContract"),TronWebProto.TriggerSmartContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TriggerSmartContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TriggerSmartContract.displayName="TronWebProto.TriggerSmartContract"),TronWebProto.ClearABIContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ClearABIContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ClearABIContract.displayName="TronWebProto.ClearABIContract"),TronWebProto.UpdateSettingContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateSettingContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateSettingContract.displayName="TronWebProto.UpdateSettingContract"),TronWebProto.UpdateEnergyLimitContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateEnergyLimitContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateEnergyLimitContract.displayName="TronWebProto.UpdateEnergyLimitContract"),TronWebProto.SmartContractDataWrapper=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SmartContractDataWrapper,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SmartContractDataWrapper.displayName="TronWebProto.SmartContractDataWrapper"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.prototype.toObject=function(e){return TronWebProto.SmartContract.toObject(e,this)},TronWebProto.SmartContract.toObject=function(e,t){var r,o={originAddress:t.getOriginAddress_asB64(),contractAddress:t.getContractAddress_asB64(),abi:(r=t.getAbi())&&TronWebProto.SmartContract.ABI.toObject(e,r),bytecode:t.getBytecode_asB64(),callValue:n.Message.getFieldWithDefault(t,5,0),consumeUserResourcePercent:n.Message.getFieldWithDefault(t,6,0),name:n.Message.getFieldWithDefault(t,7,""),originEnergyLimit:n.Message.getFieldWithDefault(t,8,0),codeHash:t.getCodeHash_asB64(),trxHash:t.getTrxHash_asB64(),version:n.Message.getFieldWithDefault(t,11,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.SmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract;return TronWebProto.SmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOriginAddress(r);break;case 2:r=t.readBytes(),e.setContractAddress(r);break;case 3:r=new TronWebProto.SmartContract.ABI,t.readMessage(r,TronWebProto.SmartContract.ABI.deserializeBinaryFromReader),e.setAbi(r);break;case 4:r=t.readBytes(),e.setBytecode(r);break;case 5:r=t.readInt64(),e.setCallValue(r);break;case 6:r=t.readInt64(),e.setConsumeUserResourcePercent(r);break;case 7:r=t.readString(),e.setName(r);break;case 8:r=t.readInt64(),e.setOriginEnergyLimit(r);break;case 9:r=t.readBytes(),e.setCodeHash(r);break;case 10:r=t.readBytes(),e.setTrxHash(r);break;case 11:r=t.readInt32(),e.setVersion(r);break;default:t.skipField()}return e},TronWebProto.SmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOriginAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),null!=(r=e.getAbi())&&t.writeMessage(3,r,TronWebProto.SmartContract.ABI.serializeBinaryToWriter),(r=e.getBytecode_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getCallValue())&&t.writeInt64(5,r),0!==(r=e.getConsumeUserResourcePercent())&&t.writeInt64(6,r),(r=e.getName()).length>0&&t.writeString(7,r),0!==(r=e.getOriginEnergyLimit())&&t.writeInt64(8,r),(r=e.getCodeHash_asU8()).length>0&&t.writeBytes(9,r),(r=e.getTrxHash_asU8()).length>0&&t.writeBytes(10,r),0!==(r=e.getVersion())&&t.writeInt32(11,r)},TronWebProto.SmartContract.ABI.repeatedFields_=[1],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.toObject(e,this)},TronWebProto.SmartContract.ABI.toObject=function(e,t){var r={entrysList:n.Message.toObjectList(t.getEntrysList(),TronWebProto.SmartContract.ABI.Entry.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI;return TronWebProto.SmartContract.ABI.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)if(1===t.getFieldNumber()){var r=new TronWebProto.SmartContract.ABI.Entry;t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader),e.addEntrys(r)}else t.skipField();return e},TronWebProto.SmartContract.ABI.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.serializeBinaryToWriter=function(e,t){var r;(r=e.getEntrysList()).length>0&&t.writeRepeatedMessage(1,r,TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter)},TronWebProto.SmartContract.ABI.Entry.repeatedFields_=[4,5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.Entry.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.Entry.toObject(e,this)},TronWebProto.SmartContract.ABI.Entry.toObject=function(e,t){var r={anonymous:n.Message.getBooleanFieldWithDefault(t,1,!1),constant:n.Message.getBooleanFieldWithDefault(t,2,!1),name:n.Message.getFieldWithDefault(t,3,""),inputsList:n.Message.toObjectList(t.getInputsList(),TronWebProto.SmartContract.ABI.Entry.Param.toObject,e),outputsList:n.Message.toObjectList(t.getOutputsList(),TronWebProto.SmartContract.ABI.Entry.Param.toObject,e),type:n.Message.getFieldWithDefault(t,6,0),payable:n.Message.getBooleanFieldWithDefault(t,7,!1),statemutability:n.Message.getFieldWithDefault(t,8,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.Entry.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI.Entry;return TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.Entry.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setAnonymous(r);break;case 2:r=t.readBool(),e.setConstant(r);break;case 3:r=t.readString(),e.setName(r);break;case 4:r=new TronWebProto.SmartContract.ABI.Entry.Param,t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),e.addInputs(r);break;case 5:r=new TronWebProto.SmartContract.ABI.Entry.Param,t.readMessage(r,TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader),e.addOutputs(r);break;case 6:r=t.readEnum(),e.setType(r);break;case 7:r=t.readBool(),e.setPayable(r);break;case 8:r=t.readEnum(),e.setStatemutability(r);break;default:t.skipField()}return e},TronWebProto.SmartContract.ABI.Entry.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.Entry.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAnonymous())&&t.writeBool(1,r),(r=e.getConstant())&&t.writeBool(2,r),(r=e.getName()).length>0&&t.writeString(3,r),(r=e.getInputsList()).length>0&&t.writeRepeatedMessage(4,r,TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),(r=e.getOutputsList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter),0!==(r=e.getType())&&t.writeEnum(6,r),(r=e.getPayable())&&t.writeBool(7,r),0!==(r=e.getStatemutability())&&t.writeEnum(8,r)},TronWebProto.SmartContract.ABI.Entry.EntryType={UNKNOWNENTRYTYPE:0,CONSTRUCTOR:1,FUNCTION:2,EVENT:3,FALLBACK:4,RECEIVE:5,ERROR:6},TronWebProto.SmartContract.ABI.Entry.StateMutabilityType={UNKNOWNMUTABILITYTYPE:0,PURE:1,VIEW:2,NONPAYABLE:3,PAYABLE:4},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContract.ABI.Entry.Param.prototype.toObject=function(e){return TronWebProto.SmartContract.ABI.Entry.Param.toObject(e,this)},TronWebProto.SmartContract.ABI.Entry.Param.toObject=function(e,t){var r={indexed:n.Message.getBooleanFieldWithDefault(t,1,!1),name:n.Message.getFieldWithDefault(t,2,""),type:n.Message.getFieldWithDefault(t,3,"")};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContract.ABI.Entry.Param;return TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContract.ABI.Entry.Param.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBool();e.setIndexed(r);break;case 2:r=t.readString(),e.setName(r);break;case 3:r=t.readString(),e.setType(r);break;default:t.skipField()}return e},TronWebProto.SmartContract.ABI.Entry.Param.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContract.ABI.Entry.Param.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getIndexed())&&t.writeBool(1,r),(r=e.getName()).length>0&&t.writeString(2,r),(r=e.getType()).length>0&&t.writeString(3,r)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getIndexed=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setIndexed=function(e){return n.Message.setProto3BooleanField(this,1,e)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getName=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setName=function(e){return n.Message.setProto3StringField(this,2,e)},TronWebProto.SmartContract.ABI.Entry.Param.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.SmartContract.ABI.Entry.Param.prototype.setType=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getAnonymous=function(){return n.Message.getBooleanFieldWithDefault(this,1,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setAnonymous=function(e){return n.Message.setProto3BooleanField(this,1,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getConstant=function(){return n.Message.getBooleanFieldWithDefault(this,2,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setConstant=function(e){return n.Message.setProto3BooleanField(this,2,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getName=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.SmartContract.ABI.Entry.prototype.setName=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getInputsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry.Param,4)},TronWebProto.SmartContract.ABI.Entry.prototype.setInputsList=function(e){return n.Message.setRepeatedWrapperField(this,4,e)},TronWebProto.SmartContract.ABI.Entry.prototype.addInputs=function(e,t){return n.Message.addToRepeatedWrapperField(this,4,e,TronWebProto.SmartContract.ABI.Entry.Param,t)},TronWebProto.SmartContract.ABI.Entry.prototype.clearInputsList=function(){return this.setInputsList([])},TronWebProto.SmartContract.ABI.Entry.prototype.getOutputsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry.Param,5)},TronWebProto.SmartContract.ABI.Entry.prototype.setOutputsList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.SmartContract.ABI.Entry.prototype.addOutputs=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.SmartContract.ABI.Entry.Param,t)},TronWebProto.SmartContract.ABI.Entry.prototype.clearOutputsList=function(){return this.setOutputsList([])},TronWebProto.SmartContract.ABI.Entry.prototype.getType=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.SmartContract.ABI.Entry.prototype.setType=function(e){return n.Message.setProto3EnumField(this,6,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getPayable=function(){return n.Message.getBooleanFieldWithDefault(this,7,!1)},TronWebProto.SmartContract.ABI.Entry.prototype.setPayable=function(e){return n.Message.setProto3BooleanField(this,7,e)},TronWebProto.SmartContract.ABI.Entry.prototype.getStatemutability=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.SmartContract.ABI.Entry.prototype.setStatemutability=function(e){return n.Message.setProto3EnumField(this,8,e)},TronWebProto.SmartContract.ABI.prototype.getEntrysList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.SmartContract.ABI.Entry,1)},TronWebProto.SmartContract.ABI.prototype.setEntrysList=function(e){return n.Message.setRepeatedWrapperField(this,1,e)},TronWebProto.SmartContract.ABI.prototype.addEntrys=function(e,t){return n.Message.addToRepeatedWrapperField(this,1,e,TronWebProto.SmartContract.ABI.Entry,t)},TronWebProto.SmartContract.ABI.prototype.clearEntrysList=function(){return this.setEntrysList([])},TronWebProto.SmartContract.prototype.getOriginAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.SmartContract.prototype.getOriginAddress_asB64=function(){return n.Message.bytesAsB64(this.getOriginAddress())},TronWebProto.SmartContract.prototype.getOriginAddress_asU8=function(){return n.Message.bytesAsU8(this.getOriginAddress())},TronWebProto.SmartContract.prototype.setOriginAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SmartContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.SmartContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.SmartContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.SmartContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.SmartContract.prototype.getAbi=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract.ABI,3)},TronWebProto.SmartContract.prototype.setAbi=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.SmartContract.prototype.clearAbi=function(){return this.setAbi(void 0)},TronWebProto.SmartContract.prototype.hasAbi=function(){return null!=n.Message.getField(this,3)},TronWebProto.SmartContract.prototype.getBytecode=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.SmartContract.prototype.getBytecode_asB64=function(){return n.Message.bytesAsB64(this.getBytecode())},TronWebProto.SmartContract.prototype.getBytecode_asU8=function(){return n.Message.bytesAsU8(this.getBytecode())},TronWebProto.SmartContract.prototype.setBytecode=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.SmartContract.prototype.getCallValue=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.SmartContract.prototype.setCallValue=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.SmartContract.prototype.getConsumeUserResourcePercent=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.SmartContract.prototype.setConsumeUserResourcePercent=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.SmartContract.prototype.getName=function(){return n.Message.getFieldWithDefault(this,7,"")},TronWebProto.SmartContract.prototype.setName=function(e){return n.Message.setProto3StringField(this,7,e)},TronWebProto.SmartContract.prototype.getOriginEnergyLimit=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.SmartContract.prototype.setOriginEnergyLimit=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.SmartContract.prototype.getCodeHash=function(){return n.Message.getFieldWithDefault(this,9,"")},TronWebProto.SmartContract.prototype.getCodeHash_asB64=function(){return n.Message.bytesAsB64(this.getCodeHash())},TronWebProto.SmartContract.prototype.getCodeHash_asU8=function(){return n.Message.bytesAsU8(this.getCodeHash())},TronWebProto.SmartContract.prototype.setCodeHash=function(e){return n.Message.setProto3BytesField(this,9,e)},TronWebProto.SmartContract.prototype.getTrxHash=function(){return n.Message.getFieldWithDefault(this,10,"")},TronWebProto.SmartContract.prototype.getTrxHash_asB64=function(){return n.Message.bytesAsB64(this.getTrxHash())},TronWebProto.SmartContract.prototype.getTrxHash_asU8=function(){return n.Message.bytesAsU8(this.getTrxHash())},TronWebProto.SmartContract.prototype.setTrxHash=function(e){return n.Message.setProto3BytesField(this,10,e)},TronWebProto.SmartContract.prototype.getVersion=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.SmartContract.prototype.setVersion=function(e){return n.Message.setProto3IntField(this,11,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ContractState.prototype.toObject=function(e){return TronWebProto.ContractState.toObject(e,this)},TronWebProto.ContractState.toObject=function(e,t){var r={energyUsage:n.Message.getFieldWithDefault(t,1,0),energyFactor:n.Message.getFieldWithDefault(t,2,0),updateCycle:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ContractState.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ContractState;return TronWebProto.ContractState.deserializeBinaryFromReader(r,t)},TronWebProto.ContractState.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setEnergyUsage(r);break;case 2:r=t.readInt64(),e.setEnergyFactor(r);break;case 3:r=t.readInt64(),e.setUpdateCycle(r);break;default:t.skipField()}return e},TronWebProto.ContractState.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ContractState.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ContractState.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getEnergyUsage())&&t.writeInt64(1,r),0!==(r=e.getEnergyFactor())&&t.writeInt64(2,r),0!==(r=e.getUpdateCycle())&&t.writeInt64(3,r)},TronWebProto.ContractState.prototype.getEnergyUsage=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.ContractState.prototype.setEnergyUsage=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.ContractState.prototype.getEnergyFactor=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ContractState.prototype.setEnergyFactor=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ContractState.prototype.getUpdateCycle=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.ContractState.prototype.setUpdateCycle=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.CreateSmartContract.prototype.toObject=function(e){return TronWebProto.CreateSmartContract.toObject(e,this)},TronWebProto.CreateSmartContract.toObject=function(e,t){var r,o={ownerAddress:t.getOwnerAddress_asB64(),newContract:(r=t.getNewContract())&&TronWebProto.SmartContract.toObject(e,r),callTokenValue:n.Message.getFieldWithDefault(t,3,0),tokenId:n.Message.getFieldWithDefault(t,4,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.CreateSmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.CreateSmartContract;return TronWebProto.CreateSmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.CreateSmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new TronWebProto.SmartContract,t.readMessage(r,TronWebProto.SmartContract.deserializeBinaryFromReader),e.setNewContract(r);break;case 3:r=t.readInt64(),e.setCallTokenValue(r);break;case 4:r=t.readInt64(),e.setTokenId(r);break;default:t.skipField()}return e},TronWebProto.CreateSmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.CreateSmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.CreateSmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),null!=(r=e.getNewContract())&&t.writeMessage(2,r,TronWebProto.SmartContract.serializeBinaryToWriter),0!==(r=e.getCallTokenValue())&&t.writeInt64(3,r),0!==(r=e.getTokenId())&&t.writeInt64(4,r)},TronWebProto.CreateSmartContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.CreateSmartContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.CreateSmartContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.CreateSmartContract.prototype.getNewContract=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract,2)},TronWebProto.CreateSmartContract.prototype.setNewContract=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.CreateSmartContract.prototype.clearNewContract=function(){return this.setNewContract(void 0)},TronWebProto.CreateSmartContract.prototype.hasNewContract=function(){return null!=n.Message.getField(this,2)},TronWebProto.CreateSmartContract.prototype.getCallTokenValue=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.CreateSmartContract.prototype.setCallTokenValue=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.CreateSmartContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.CreateSmartContract.prototype.setTokenId=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TriggerSmartContract.prototype.toObject=function(e){return TronWebProto.TriggerSmartContract.toObject(e,this)},TronWebProto.TriggerSmartContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),callValue:n.Message.getFieldWithDefault(t,3,0),data:t.getData_asB64(),callTokenValue:n.Message.getFieldWithDefault(t,5,0),tokenId:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TriggerSmartContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TriggerSmartContract;return TronWebProto.TriggerSmartContract.deserializeBinaryFromReader(r,t)},TronWebProto.TriggerSmartContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setContractAddress(r);break;case 3:r=t.readInt64(),e.setCallValue(r);break;case 4:r=t.readBytes(),e.setData(r);break;case 5:r=t.readInt64(),e.setCallTokenValue(r);break;case 6:r=t.readInt64(),e.setTokenId(r);break;default:t.skipField()}return e},TronWebProto.TriggerSmartContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TriggerSmartContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TriggerSmartContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getCallValue())&&t.writeInt64(3,r),(r=e.getData_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getCallTokenValue())&&t.writeInt64(5,r),0!==(r=e.getTokenId())&&t.writeInt64(6,r)},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TriggerSmartContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TriggerSmartContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TriggerSmartContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.TriggerSmartContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.TriggerSmartContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.TriggerSmartContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TriggerSmartContract.prototype.getCallValue=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.TriggerSmartContract.prototype.setCallValue=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.TriggerSmartContract.prototype.getData=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.TriggerSmartContract.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},TronWebProto.TriggerSmartContract.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},TronWebProto.TriggerSmartContract.prototype.setData=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.TriggerSmartContract.prototype.getCallTokenValue=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.TriggerSmartContract.prototype.setCallTokenValue=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.TriggerSmartContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.TriggerSmartContract.prototype.setTokenId=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ClearABIContract.prototype.toObject=function(e){return TronWebProto.ClearABIContract.toObject(e,this)},TronWebProto.ClearABIContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ClearABIContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ClearABIContract;return TronWebProto.ClearABIContract.deserializeBinaryFromReader(r,t)},TronWebProto.ClearABIContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setContractAddress(r);break;default:t.skipField()}return e},TronWebProto.ClearABIContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ClearABIContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ClearABIContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.ClearABIContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ClearABIContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ClearABIContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ClearABIContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ClearABIContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.ClearABIContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.ClearABIContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.ClearABIContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateSettingContract.prototype.toObject=function(e){return TronWebProto.UpdateSettingContract.toObject(e,this)},TronWebProto.UpdateSettingContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),consumeUserResourcePercent:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateSettingContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateSettingContract;return TronWebProto.UpdateSettingContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateSettingContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setContractAddress(r);break;case 3:r=t.readInt64(),e.setConsumeUserResourcePercent(r);break;default:t.skipField()}return e},TronWebProto.UpdateSettingContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateSettingContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateSettingContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getConsumeUserResourcePercent())&&t.writeInt64(3,r)},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateSettingContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateSettingContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateSettingContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.UpdateSettingContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.UpdateSettingContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.UpdateSettingContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateSettingContract.prototype.getConsumeUserResourcePercent=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UpdateSettingContract.prototype.setConsumeUserResourcePercent=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateEnergyLimitContract.prototype.toObject=function(e){return TronWebProto.UpdateEnergyLimitContract.toObject(e,this)},TronWebProto.UpdateEnergyLimitContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),contractAddress:t.getContractAddress_asB64(),originEnergyLimit:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateEnergyLimitContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateEnergyLimitContract;return TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateEnergyLimitContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setContractAddress(r);break;case 3:r=t.readInt64(),e.setOriginEnergyLimit(r);break;default:t.skipField()}return e},TronWebProto.UpdateEnergyLimitContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateEnergyLimitContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getContractAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getOriginEnergyLimit())&&t.writeInt64(3,r)},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asB64=function(){return n.Message.bytesAsB64(this.getContractAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.getContractAddress_asU8=function(){return n.Message.bytesAsU8(this.getContractAddress())},TronWebProto.UpdateEnergyLimitContract.prototype.setContractAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateEnergyLimitContract.prototype.getOriginEnergyLimit=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.UpdateEnergyLimitContract.prototype.setOriginEnergyLimit=function(e){return n.Message.setProto3IntField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SmartContractDataWrapper.prototype.toObject=function(e){return TronWebProto.SmartContractDataWrapper.toObject(e,this)},TronWebProto.SmartContractDataWrapper.toObject=function(e,t){var r,n={smartContract:(r=t.getSmartContract())&&TronWebProto.SmartContract.toObject(e,r),runtimecode:t.getRuntimecode_asB64(),contractState:(r=t.getContractState())&&TronWebProto.ContractState.toObject(e,r)};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.SmartContractDataWrapper.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SmartContractDataWrapper;return TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader(r,t)},TronWebProto.SmartContractDataWrapper.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new TronWebProto.SmartContract;t.readMessage(r,TronWebProto.SmartContract.deserializeBinaryFromReader),e.setSmartContract(r);break;case 2:r=t.readBytes(),e.setRuntimecode(r);break;case 3:r=new TronWebProto.ContractState,t.readMessage(r,TronWebProto.ContractState.deserializeBinaryFromReader),e.setContractState(r);break;default:t.skipField()}return e},TronWebProto.SmartContractDataWrapper.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SmartContractDataWrapper.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getSmartContract())&&t.writeMessage(1,r,TronWebProto.SmartContract.serializeBinaryToWriter),(r=e.getRuntimecode_asU8()).length>0&&t.writeBytes(2,r),null!=(r=e.getContractState())&&t.writeMessage(3,r,TronWebProto.ContractState.serializeBinaryToWriter)},TronWebProto.SmartContractDataWrapper.prototype.getSmartContract=function(){return n.Message.getWrapperField(this,TronWebProto.SmartContract,1)},TronWebProto.SmartContractDataWrapper.prototype.setSmartContract=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.SmartContractDataWrapper.prototype.clearSmartContract=function(){return this.setSmartContract(void 0)},TronWebProto.SmartContractDataWrapper.prototype.hasSmartContract=function(){return null!=n.Message.getField(this,1)},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asB64=function(){return n.Message.bytesAsB64(this.getRuntimecode())},TronWebProto.SmartContractDataWrapper.prototype.getRuntimecode_asU8=function(){return n.Message.bytesAsU8(this.getRuntimecode())},TronWebProto.SmartContractDataWrapper.prototype.setRuntimecode=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.SmartContractDataWrapper.prototype.getContractState=function(){return n.Message.getWrapperField(this,TronWebProto.ContractState,3)},TronWebProto.SmartContractDataWrapper.prototype.setContractState=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.SmartContractDataWrapper.prototype.clearContractState=function(){return this.setContractState(void 0)},TronWebProto.SmartContractDataWrapper.prototype.hasContractState=function(){return null!=n.Message.getField(this,3)},o.object.extend(t,TronWebProto)},3641:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),function(e){var t=e.replace(/[\s\-]+/gi,"").toUpperCase(),r=t.slice(0,2).toUpperCase();return r in s&&s[r].test(t)}(e)&&function(e){var t=e.replace(/[^A-Z0-9]+/gi,"").toUpperCase();return 1===(t.slice(4)+t.slice(0,4)).replace(/[A-Z]/g,(function(e){return e.charCodeAt(0)-55})).match(/\d{1,7}/g).reduce((function(e,t){return Number(e+t)%97}),"")}(e)},t.locales=void 0;var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s={AD:/^(AD[0-9]{2})\d{8}[A-Z0-9]{12}$/,AE:/^(AE[0-9]{2})\d{3}\d{16}$/,AL:/^(AL[0-9]{2})\d{8}[A-Z0-9]{16}$/,AT:/^(AT[0-9]{2})\d{16}$/,AZ:/^(AZ[0-9]{2})[A-Z0-9]{4}\d{20}$/,BA:/^(BA[0-9]{2})\d{16}$/,BE:/^(BE[0-9]{2})\d{12}$/,BG:/^(BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$/,BH:/^(BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$/,BR:/^(BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$/,BY:/^(BY[0-9]{2})[A-Z0-9]{4}\d{20}$/,CH:/^(CH[0-9]{2})\d{5}[A-Z0-9]{12}$/,CR:/^(CR[0-9]{2})\d{18}$/,CY:/^(CY[0-9]{2})\d{8}[A-Z0-9]{16}$/,CZ:/^(CZ[0-9]{2})\d{20}$/,DE:/^(DE[0-9]{2})\d{18}$/,DK:/^(DK[0-9]{2})\d{14}$/,DO:/^(DO[0-9]{2})[A-Z]{4}\d{20}$/,EE:/^(EE[0-9]{2})\d{16}$/,EG:/^(EG[0-9]{2})\d{25}$/,ES:/^(ES[0-9]{2})\d{20}$/,FI:/^(FI[0-9]{2})\d{14}$/,FO:/^(FO[0-9]{2})\d{14}$/,FR:/^(FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,GB:/^(GB[0-9]{2})[A-Z]{4}\d{14}$/,GE:/^(GE[0-9]{2})[A-Z0-9]{2}\d{16}$/,GI:/^(GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$/,GL:/^(GL[0-9]{2})\d{14}$/,GR:/^(GR[0-9]{2})\d{7}[A-Z0-9]{16}$/,GT:/^(GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$/,HR:/^(HR[0-9]{2})\d{17}$/,HU:/^(HU[0-9]{2})\d{24}$/,IE:/^(IE[0-9]{2})[A-Z0-9]{4}\d{14}$/,IL:/^(IL[0-9]{2})\d{19}$/,IQ:/^(IQ[0-9]{2})[A-Z]{4}\d{15}$/,IR:/^(IR[0-9]{2})0\d{2}0\d{18}$/,IS:/^(IS[0-9]{2})\d{22}$/,IT:/^(IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,JO:/^(JO[0-9]{2})[A-Z]{4}\d{22}$/,KW:/^(KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$/,KZ:/^(KZ[0-9]{2})\d{3}[A-Z0-9]{13}$/,LB:/^(LB[0-9]{2})\d{4}[A-Z0-9]{20}$/,LC:/^(LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$/,LI:/^(LI[0-9]{2})\d{5}[A-Z0-9]{12}$/,LT:/^(LT[0-9]{2})\d{16}$/,LU:/^(LU[0-9]{2})\d{3}[A-Z0-9]{13}$/,LV:/^(LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$/,MC:/^(MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$/,MD:/^(MD[0-9]{2})[A-Z0-9]{20}$/,ME:/^(ME[0-9]{2})\d{18}$/,MK:/^(MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$/,MR:/^(MR[0-9]{2})\d{23}$/,MT:/^(MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$/,MU:/^(MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$/,MZ:/^(MZ[0-9]{2})\d{21}$/,NL:/^(NL[0-9]{2})[A-Z]{4}\d{10}$/,NO:/^(NO[0-9]{2})\d{11}$/,PK:/^(PK[0-9]{2})[A-Z0-9]{4}\d{16}$/,PL:/^(PL[0-9]{2})\d{24}$/,PS:/^(PS[0-9]{2})[A-Z0-9]{4}\d{21}$/,PT:/^(PT[0-9]{2})\d{21}$/,QA:/^(QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$/,RO:/^(RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$/,RS:/^(RS[0-9]{2})\d{18}$/,SA:/^(SA[0-9]{2})\d{2}[A-Z0-9]{18}$/,SC:/^(SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$/,SE:/^(SE[0-9]{2})\d{20}$/,SI:/^(SI[0-9]{2})\d{15}$/,SK:/^(SK[0-9]{2})\d{20}$/,SM:/^(SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$/,SV:/^(SV[0-9]{2})[A-Z0-9]{4}\d{20}$/,TL:/^(TL[0-9]{2})\d{19}$/,TN:/^(TN[0-9]{2})\d{20}$/,TR:/^(TR[0-9]{2})\d{5}[A-Z0-9]{17}$/,UA:/^(UA[0-9]{2})\d{6}[A-Z0-9]{19}$/,VA:/^(VA[0-9]{2})\d{18}$/,VG:/^(VG[0-9]{2})[A-Z0-9]{4}\d{16}$/,XK:/^(XK[0-9]{2})\d{16}$/},i=Object.keys(s);t.locales=i},3735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e),(0,o.default)(e)%parseInt(t,10)==0};var n=s(r(3399)),o=s(r(1371));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},3752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),e=Date.parse(e),isNaN(e)?null:new Date(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3764:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new TypeError(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function i(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){o(e);const r=t.outputLen;if(e.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=void 0;const n=r(3764),o=r(1130);class s extends o.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,n.default.hash(e);const r=(0,o.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,i=new Uint8Array(s);i.set(r.length>s?e.create().update(r).digest():r);for(let e=0;enew s(e,t).update(r).digest(),t.hmac.create=(e,t)=>new s(e,t)},3832:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=new Set(["AFG","ALA","ALB","DZA","ASM","AND","AGO","AIA","ATA","ATG","ARG","ARM","ABW","AUS","AUT","AZE","BHS","BHR","BGD","BRB","BLR","BEL","BLZ","BEN","BMU","BTN","BOL","BES","BIH","BWA","BVT","BRA","IOT","BRN","BGR","BFA","BDI","KHM","CMR","CAN","CPV","CYM","CAF","TCD","CHL","CHN","CXR","CCK","COL","COM","COG","COD","COK","CRI","CIV","HRV","CUB","CUW","CYP","CZE","DNK","DJI","DMA","DOM","ECU","EGY","SLV","GNQ","ERI","EST","ETH","FLK","FRO","FJI","FIN","FRA","GUF","PYF","ATF","GAB","GMB","GEO","DEU","GHA","GIB","GRC","GRL","GRD","GLP","GUM","GTM","GGY","GIN","GNB","GUY","HTI","HMD","VAT","HND","HKG","HUN","ISL","IND","IDN","IRN","IRQ","IRL","IMN","ISR","ITA","JAM","JPN","JEY","JOR","KAZ","KEN","KIR","PRK","KOR","KWT","KGZ","LAO","LVA","LBN","LSO","LBR","LBY","LIE","LTU","LUX","MAC","MKD","MDG","MWI","MYS","MDV","MLI","MLT","MHL","MTQ","MRT","MUS","MYT","MEX","FSM","MDA","MCO","MNG","MNE","MSR","MAR","MOZ","MMR","NAM","NRU","NPL","NLD","NCL","NZL","NIC","NER","NGA","NIU","NFK","MNP","NOR","OMN","PAK","PLW","PSE","PAN","PNG","PRY","PER","PHL","PCN","POL","PRT","PRI","QAT","REU","ROU","RUS","RWA","BLM","SHN","KNA","LCA","MAF","SPM","VCT","WSM","SMR","STP","SAU","SEN","SRB","SYC","SLE","SGP","SXM","SVK","SVN","SLB","SOM","ZAF","SGS","SSD","ESP","LKA","SDN","SUR","SJM","SWZ","SWE","CHE","SYR","TWN","TJK","TZA","THA","TLS","TGO","TKL","TON","TTO","TUN","TUR","TKM","TCA","TUV","UGA","UKR","ARE","GBR","USA","UMI","URY","UZB","VUT","VEN","VNM","VGB","VIR","WLF","ESH","YEM","ZMB","ZWE"]);e.exports=t.default,e.exports.default=t.default},3906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e,{min:0,max:65535})};var n,o=(n=r(6084))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},3939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),t in c)return c[t].test(e);if("any"===t){for(var r in c)if(c.hasOwnProperty(r)&&c[r].test(e))return!0;return!1}throw new Error("Invalid locale '".concat(t,"'"))},t.locales=void 0;var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^\d{3}$/,i=/^\d{4}$/,a=/^\d{5}$/,u=/^\d{6}$/,c={AD:/^AD\d{3}$/,AT:i,AU:i,AZ:/^AZ\d{4}$/,BA:/^([7-8]\d{4}$)/,BE:i,BG:i,BR:/^\d{5}-\d{3}$/,BY:/^2[1-4]\d{4}$/,CA:/^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,CH:i,CN:/^(0[1-7]|1[012356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[1-5]|8[1345]|9[09])\d{4}$/,CZ:/^\d{3}\s?\d{2}$/,DE:a,DK:i,DO:a,DZ:a,EE:a,ES:/^(5[0-2]{1}|[0-4]{1}\d{1})\d{3}$/,FI:a,FR:/^\d{2}\s?\d{3}$/,GB:/^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,GR:/^\d{3}\s?\d{2}$/,HR:/^([1-5]\d{4}$)/,HT:/^HT\d{4}$/,HU:i,ID:a,IE:/^(?!.*(?:o))[A-Za-z]\d[\dw]\s\w{4}$/i,IL:/^(\d{5}|\d{7})$/,IN:/^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,IR:/^(?!(\d)\1{3})[13-9]{4}[1346-9][013-9]{5}$/,IS:s,IT:a,JP:/^\d{3}\-\d{4}$/,KE:a,KR:/^(\d{5}|\d{6})$/,LI:/^(948[5-9]|949[0-7])$/,LT:/^LT\-\d{5}$/,LU:i,LV:/^LV\-\d{4}$/,LK:a,MG:s,MX:a,MT:/^[A-Za-z]{3}\s{0,1}\d{4}$/,MY:a,NL:/^\d{4}\s?[a-z]{2}$/i,NO:i,NP:/^(10|21|22|32|33|34|44|45|56|57)\d{3}$|^(977)$/i,NZ:i,PL:/^\d{2}\-\d{3}$/,PR:/^00[679]\d{2}([ -]\d{4})?$/,PT:/^\d{4}\-\d{3}?$/,RO:u,RU:u,SA:a,SE:/^[1-9]\d{2}\s?\d{2}$/,SG:u,SI:i,SK:/^\d{3}\s?\d{2}$/,TH:a,TN:i,TW:/^\d{3}(\d{2})?$/,UA:a,US:/^\d{5}(-\d{4})?$/,ZA:i,ZM:a},l=Object.keys(c);t.locales=l},3973:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),new RegExp("^[a-fA-F0-9]{".concat(s[t],"}$")).test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s={md5:32,md4:32,sha1:40,sha256:64,sha384:96,sha512:128,ripemd128:32,ripemd160:40,tiger128:32,tiger160:40,tiger192:48,crc32:8,crc32b:8};e.exports=t.default,e.exports.default=t.default},4172:function(e,t,r){var n="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,r){e!=Array.prototype&&e!=Object.prototype&&(e[t]=r.value)},o="undefined"!=typeof window&&window===this?this:void 0!==r.g&&null!=r.g?r.g:this;function s(){s=function(){},o.Symbol||(o.Symbol=u)}function i(e,t){this.a=e,n(this,"description",{configurable:!0,writable:!0,value:t})}i.prototype.toString=function(){return this.a};var a,u=(a=0,function e(t){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new i("jscomp_symbol_"+(t||"")+"_"+a++,t)});function c(){s();var e=o.Symbol.iterator;e||(e=o.Symbol.iterator=o.Symbol("Symbol.iterator")),"function"!=typeof Array.prototype[e]&&n(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return function(e){return c(),(e={next:e})[o.Symbol.iterator]=function(){return this},e}(function(e){var t=0;return function(){return t=arguments.length?Array.prototype.slice.call(e,t):Array.prototype.slice.call(e,t,r)}function m(e,t,r,n){var o="Assertion failed";if(r){o+=": "+r;var s=n}else e&&(o+=": "+e,s=t);throw Error(o,s||[])}function T(e,t,r){for(var n=[],o=2;o=e.length)return String.fromCharCode.apply(null,e);for(var t="",r=0;r>2;o=(3&o)<<4|i>>4,i=(15&i)<<2|u>>6,u&=63,a||(u=64,s||(i=64)),r.push(t[c],t[o],t[i]||"",t[u]||"")}return r.join("")}function R(e){var t=e.length,r=3*t/4;r%3?r=Math.floor(r):-1!="=.".indexOf(e[t-1])&&(r=-1!="=.".indexOf(e[t-2])?r-2:r-1);var n=new Uint8Array(r),o=0;return function(e,t){function r(t){for(;n>4),64!=i&&(t(s<<4&240|i>>2),64!=a&&t(i<<6&192|a))}}(e,(function(e){n[o++]=e})),n.subarray(0,o)}function x(){if(!S){S={};for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),t=["+/=","+/","-_=","-_.","-_"],r=0;5>r;r++){var n=e.concat(t[r].split(""));O[r]=n;for(var o=0;o>>0;e=Math.floor((e-t)/4294967296)>>>0,N=t,k=e}function D(e){var t=0>e,r=(e=Math.abs(e))>>>0;e=Math.floor((e-r)/4294967296),e>>>=0,t&&(e=~e>>>0,4294967295<(r=1+(~r>>>0))&&(r=0,4294967295<++e&&(e=0))),N=r,k=e}function L(e){var t=0>e;U(e=2*Math.abs(e)),e=N;var r=k;t&&(0==e?0==r?r=e=4294967295:(r--,e=4294967295):e--),N=e,k=r}function z(e){var t=0>e?1:0;if(0===(e=t?-e:e))0<1/e?N=k=0:(k=0,N=2147483648);else if(isNaN(e))k=0,N=2147483647;else if(34028234663852886e22>>0;else if(11754943508222875e-54>e)e=Math.round(e/Math.pow(2,-149)),k=0,N=(t<<31|e)>>>0;else{var r=Math.floor(Math.log(e)/Math.LN2);e*=Math.pow(2,-r),16777216<=(e=Math.round(8388608*e))&&++r,k=0,N=(t<<31|r+127<<23|8388607&e)>>>0}}function j(e){var t=0>e?1:0;if(0===(e=t?-e:e))k=0<1/e?0:2147483648,N=0;else if(isNaN(e))k=2147483647,N=4294967295;else if(17976931348623157e292>>0,N=0;else if(22250738585072014e-324>e)e/=Math.pow(2,-1074),k=(t<<31|e/4294967296)>>>0,N=e>>>0;else{var r=e,n=0;if(2<=r)for(;2<=r&&1023>n;)n++,r/=2;else for(;1>r&&-1022>>0,N=4503599627370496*e>>>0}}function $(e){var t=e.charCodeAt(4),r=e.charCodeAt(5),n=e.charCodeAt(6),o=e.charCodeAt(7);N=e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)>>>0,k=t+(r<<8)+(n<<16)+(o<<24)>>>0}function V(e,t){return 4294967296*t+(e>>>0)}function G(e,t){var r=2147483648&t;return r&&(t=~t>>>0,0==(e=1+~e>>>0)&&(t=t+1>>>0)),e=V(e,t),r?-e:e}function H(e,t,r){var n=t>>31;return r(e<<1^n,(t<<1|e>>>31)^n)}function K(e,t){return Z(e,t,G)}function Z(e,t,r){var n=-(1&e);return r((e>>>1|t<<31)^n,t>>>1^n)}function q(e){var t=2*(e>>31)+1,r=e>>>23&255;return e&=8388607,255==r?e?NaN:1/0*t:0==r?t*Math.pow(2,-149)*e:t*Math.pow(2,r-150)*(e+Math.pow(2,23))}function J(e,t){var r=2*(t>>31)+1,n=t>>>20&2047;return e=4294967296*(1048575&t)+e,2047==n?e?NaN:1/0*r:0==n?r*Math.pow(2,-1074)*e:r*Math.pow(2,n-1075)*(e+4503599627370496)}function Y(e,t){return String.fromCharCode(e>>>0&255,e>>>8&255,e>>>16&255,e>>>24&255,t>>>0&255,t>>>8&255,t>>>16&255,t>>>24&255)}function X(e,t){function r(e,t){return e=e?String(e):"",t?"0000000".slice(e.length)+e:e}if(2097151>=t)return""+V(e,t);var n=(e>>>24|t<<8)>>>0&16777215;return e=(16777215&e)+6777216*n+6710656*(t=t>>16&65535),n+=8147497*t,t*=2,1e7<=e&&(n+=Math.floor(e/1e7),e%=1e7),1e7<=n&&(t+=Math.floor(n/1e7),n%=1e7),r(t,0)+r(n,t)+r(e,1)}function Q(e,t){var r=2147483648&t;return r&&(t=~t+(0==(e=1+~e>>>0)?1:0)>>>0),e=X(e,t),r?"-"+e:e}function ee(e,t){$(e),e=N;var r=k;return t?Q(e,r):X(e,r)}function te(e){function t(e,t){for(var r=0;8>r&&(1!==e||0>>=8}T(0e;e++)n[e]=255&~n[e]}(),t(1,1)),M(n)}function re(e){return String.fromCharCode(10>e?48+e:87+e)}function ne(e){return 97<=e?e-97+10:e-48}function oe(e,t,r,n,o){var s=0;if(128>n)for(;t>=7}if(e[t++]!=i)break;s++,t+=o}return s}function se(e){return e.constructor===Uint8Array?e:e.constructor===ArrayBuffer||e.constructor===Array?new Uint8Array(e):e.constructor===String?R(e):e instanceof Uint8Array?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):(v("Type not convertible to Uint8Array."),new Uint8Array(0))}function ie(e,t,r){this.b=null,this.a=this.c=this.h=0,this.v=!1,e&&this.H(e,t,r)}d("jspb.utils.getSplit64Low",(function(){return N}),void 0),d("jspb.utils.getSplit64High",(function(){return k}),void 0),d("jspb.utils.splitUint64",U,void 0),d("jspb.utils.splitInt64",D,void 0),d("jspb.utils.splitZigzag64",L,void 0),d("jspb.utils.splitFloat32",z,void 0),d("jspb.utils.splitFloat64",j,void 0),d("jspb.utils.splitHash64",$,void 0),d("jspb.utils.joinUint64",V,void 0),d("jspb.utils.joinInt64",G,void 0),d("jspb.utils.toZigzag64",H,void 0),d("jspb.utils.joinZigzag64",K,void 0),d("jspb.utils.fromZigzag64",Z,void 0),d("jspb.utils.joinFloat32",q,void 0),d("jspb.utils.joinFloat64",J,void 0),d("jspb.utils.joinHash64",Y,void 0),d("jspb.utils.DIGITS","0123456789abcdef".split(""),void 0),d("jspb.utils.joinUnsignedDecimalString",X,void 0),d("jspb.utils.joinSignedDecimalString",Q,void 0),d("jspb.utils.hash64ToDecimalString",ee,void 0),d("jspb.utils.hash64ArrayToDecimalStrings",(function(e,t){for(var r=Array(e.length),n=0;nr;r++){var n=e.charCodeAt(7-r);t[2*r+2]=re(n>>4),t[2*r+3]=re(15&n)}return t.join("")}),void 0),d("jspb.utils.hexStringToHash64",(function(e){T(18==(e=e.toLowerCase()).length),T("0"==e[0]),T("x"==e[1]);for(var t="",r=0;8>r;r++)t=String.fromCharCode(16*ne(e.charCodeAt(2*r+2))+ne(e.charCodeAt(2*r+3)))+t;return t}),void 0),d("jspb.utils.hash64ToNumber",(function(e,t){$(e),e=N;var r=k;return t?G(e,r):V(e,r)}),void 0),d("jspb.utils.numberToHash64",(function(e){return D(e),Y(N,k)}),void 0),d("jspb.utils.countVarints",(function(e,t,r){for(var n=0,o=t;o>7;return r-t-n}),void 0),d("jspb.utils.countVarintFields",(function(e,t,r,n){var o=0;if(128>(n*=8))for(;t>=7}if(e[t++]!=s)break;for(o++;128&(s=e[t++]););}return o}),void 0),d("jspb.utils.countFixed32Fields",(function(e,t,r,n){return oe(e,t,r,8*n+5,4)}),void 0),d("jspb.utils.countFixed64Fields",(function(e,t,r,n){return oe(e,t,r,8*n+1,8)}),void 0),d("jspb.utils.countDelimitedFields",(function(e,t,r,n){var o=0;for(n=8*n+2;t>=7}if(e[t++]!=s)break;o++;for(var i=0,a=1;i+=(127&(s=e[t++]))*a,a*=128,128&s;);t+=i}return o}),void 0),d("jspb.utils.debugBytesToTextFormat",(function(e){var t='"';if(e){e=se(e);for(var r=0;re[r]&&(t+="0"),t+=e[r].toString(16)}return t+'"'}),void 0),d("jspb.utils.debugScalarToTextFormat",(function(e){if("string"==typeof e){e=String(e);for(var t=['"'],r=0;rs||((s=o)in F?o=F[s]:s in I?o=F[s]=I[s]:(31<(n=s.charCodeAt(0))&&127>n?o=s:(256>n?(o="\\x",(16>n||256n&&(o+="0")),o+=n.toString(16).toUpperCase()),o=F[s]=o)),n=o),t[i]=n}t.push('"'),e=t.join("")}else e=e.toString();return e}),void 0),d("jspb.utils.stringToByteArray",(function(e){for(var t=new Uint8Array(e.length),r=0;rae.length&&ae.push(this)},ie.prototype.free=ie.prototype.Ca,ie.prototype.clone=function(){return ue(this.b,this.h,this.c-this.h)},ie.prototype.clone=ie.prototype.clone,ie.prototype.clear=function(){this.b=null,this.a=this.c=this.h=0,this.v=!1},ie.prototype.clear=ie.prototype.clear,ie.prototype.Y=function(){return this.b},ie.prototype.getBuffer=ie.prototype.Y,ie.prototype.H=function(e,t,r){this.b=se(e),this.h=void 0!==t?t:0,this.c=void 0!==r?this.h+r:this.b.length,this.a=this.h},ie.prototype.setBlock=ie.prototype.H,ie.prototype.Db=function(){return this.c},ie.prototype.getEnd=ie.prototype.Db,ie.prototype.setEnd=function(e){this.c=e},ie.prototype.setEnd=ie.prototype.setEnd,ie.prototype.reset=function(){this.a=this.h},ie.prototype.reset=ie.prototype.reset,ie.prototype.B=function(){return this.a},ie.prototype.getCursor=ie.prototype.B,ie.prototype.Ma=function(e){this.a=e},ie.prototype.setCursor=ie.prototype.Ma,ie.prototype.advance=function(e){this.a+=e,T(this.a<=this.c)},ie.prototype.advance=ie.prototype.advance,ie.prototype.ya=function(){return this.a==this.c},ie.prototype.atEnd=ie.prototype.ya,ie.prototype.Qb=function(){return this.a>this.c},ie.prototype.pastEnd=ie.prototype.Qb,ie.prototype.getError=function(){return this.v||0>this.a||this.a>this.c},ie.prototype.getError=ie.prototype.getError,ie.prototype.w=function(e){for(var t=128,r=0,n=0,o=0;4>o&&128<=t;o++)r|=(127&(t=this.b[this.a++]))<<7*o;if(128<=t&&(r|=(127&(t=this.b[this.a++]))<<28,n|=(127&t)>>4),128<=t)for(o=0;5>o&&128<=t;o++)n|=(127&(t=this.b[this.a++]))<<7*o+3;if(128>t)return e(r>>>0,n>>>0);v("Failed to read varint, encoding is invalid."),this.v=!0},ie.prototype.readSplitVarint64=ie.prototype.w,ie.prototype.ea=function(e){return this.w((function(t,r){return Z(t,r,e)}))},ie.prototype.readSplitZigzagVarint64=ie.prototype.ea,ie.prototype.ta=function(e){var t=this.b,r=this.a;this.a+=8;for(var n=0,o=0,s=r+7;s>=r;s--)n=n<<8|t[s],o=o<<8|t[s+4];return e(n,o)},ie.prototype.readSplitFixed64=ie.prototype.ta,ie.prototype.kb=function(){for(;128&this.b[this.a];)this.a++;this.a++},ie.prototype.skipVarint=ie.prototype.kb,ie.prototype.mb=function(e){for(;128>>=7;this.a--},ie.prototype.unskipVarint=ie.prototype.mb,ie.prototype.o=function(){var e=this.b,t=e[this.a],r=127&t;return 128>t?(this.a+=1,T(this.a<=this.c),r):(r|=(127&(t=e[this.a+1]))<<7,128>t?(this.a+=2,T(this.a<=this.c),r):(r|=(127&(t=e[this.a+2]))<<14,128>t?(this.a+=3,T(this.a<=this.c),r):(r|=(127&(t=e[this.a+3]))<<21,128>t?(this.a+=4,T(this.a<=this.c),r):(r|=(15&(t=e[this.a+4]))<<28,128>t?(this.a+=5,T(this.a<=this.c),r>>>0):(this.a+=5,128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&128<=e[this.a++]&&T(!1),T(this.a<=this.c),r)))))},ie.prototype.readUnsignedVarint32=ie.prototype.o,ie.prototype.da=function(){return~~this.o()},ie.prototype.readSignedVarint32=ie.prototype.da,ie.prototype.O=function(){return this.o().toString()},ie.prototype.Ea=function(){return this.da().toString()},ie.prototype.readSignedVarint32String=ie.prototype.Ea,ie.prototype.Ia=function(){var e=this.o();return e>>>1^-(1&e)},ie.prototype.readZigzagVarint32=ie.prototype.Ia,ie.prototype.Ga=function(){return this.w(V)},ie.prototype.readUnsignedVarint64=ie.prototype.Ga,ie.prototype.Ha=function(){return this.w(X)},ie.prototype.readUnsignedVarint64String=ie.prototype.Ha,ie.prototype.sa=function(){return this.w(G)},ie.prototype.readSignedVarint64=ie.prototype.sa,ie.prototype.Fa=function(){return this.w(Q)},ie.prototype.readSignedVarint64String=ie.prototype.Fa,ie.prototype.Ja=function(){return this.w(K)},ie.prototype.readZigzagVarint64=ie.prototype.Ja,ie.prototype.fb=function(){return this.ea(Y)},ie.prototype.readZigzagVarintHash64=ie.prototype.fb,ie.prototype.Ka=function(){return this.ea(Q)},ie.prototype.readZigzagVarint64String=ie.prototype.Ka,ie.prototype.Gc=function(){var e=this.b[this.a];return this.a+=1,T(this.a<=this.c),e},ie.prototype.readUint8=ie.prototype.Gc,ie.prototype.Ec=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,T(this.a<=this.c),e|t<<8},ie.prototype.readUint16=ie.prototype.Ec,ie.prototype.m=function(){var e=this.b[this.a],t=this.b[this.a+1],r=this.b[this.a+2],n=this.b[this.a+3];return this.a+=4,T(this.a<=this.c),(e|t<<8|r<<16|n<<24)>>>0},ie.prototype.readUint32=ie.prototype.m,ie.prototype.ga=function(){return V(this.m(),this.m())},ie.prototype.readUint64=ie.prototype.ga,ie.prototype.ha=function(){return X(this.m(),this.m())},ie.prototype.readUint64String=ie.prototype.ha,ie.prototype.Xb=function(){var e=this.b[this.a];return this.a+=1,T(this.a<=this.c),e<<24>>24},ie.prototype.readInt8=ie.prototype.Xb,ie.prototype.Vb=function(){var e=this.b[this.a],t=this.b[this.a+1];return this.a+=2,T(this.a<=this.c),(e|t<<8)<<16>>16},ie.prototype.readInt16=ie.prototype.Vb,ie.prototype.P=function(){var e=this.b[this.a],t=this.b[this.a+1],r=this.b[this.a+2],n=this.b[this.a+3];return this.a+=4,T(this.a<=this.c),e|t<<8|r<<16|n<<24},ie.prototype.readInt32=ie.prototype.P,ie.prototype.ba=function(){return G(this.m(),this.m())},ie.prototype.readInt64=ie.prototype.ba,ie.prototype.ca=function(){return Q(this.m(),this.m())},ie.prototype.readInt64String=ie.prototype.ca,ie.prototype.aa=function(){return q(this.m())},ie.prototype.readFloat=ie.prototype.aa,ie.prototype.Z=function(){return J(this.m(),this.m())},ie.prototype.readDouble=ie.prototype.Z,ie.prototype.pa=function(){return!!this.b[this.a++]},ie.prototype.readBool=ie.prototype.pa,ie.prototype.ra=function(){return this.da()},ie.prototype.readEnum=ie.prototype.ra,ie.prototype.fa=function(e){var t=this.b,r=this.a;e=r+e;for(var n=[],o="";rs)n.push(s);else{if(192>s)continue;if(224>s){var i=t[r++];n.push((31&s)<<6|63&i)}else if(240>s){i=t[r++];var a=t[r++];n.push((15&s)<<12|(63&i)<<6|63&a)}else 248>s&&(s=(7&s)<<18|(63&(i=t[r++]))<<12|(63&(a=t[r++]))<<6|63&t[r++],s-=65536,n.push(55296+(s>>10&1023),56320+(1023&s)))}8192<=n.length&&(o+=String.fromCharCode.apply(null,n),n.length=0)}return o+=M(n),this.a=r,o},ie.prototype.readString=ie.prototype.fa,ie.prototype.Dc=function(){var e=this.o();return this.fa(e)},ie.prototype.readStringWithLength=ie.prototype.Dc,ie.prototype.qa=function(e){if(0>e||this.a+e>this.b.length)return this.v=!0,v("Invalid byte length!"),new Uint8Array(0);var t=this.b.subarray(this.a,this.a+e);return this.a+=e,T(this.a<=this.c),t},ie.prototype.readBytes=ie.prototype.qa,ie.prototype.ia=function(){return this.w(Y)},ie.prototype.readVarintHash64=ie.prototype.ia,ie.prototype.$=function(){var e=this.b,t=this.a,r=e[t],n=e[t+1],o=e[t+2],s=e[t+3],i=e[t+4],a=e[t+5],u=e[t+6];return e=e[t+7],this.a+=8,String.fromCharCode(r,n,o,s,i,a,u,e)},ie.prototype.readFixedHash64=ie.prototype.$,d("jspb.BinaryReader",ce,void 0);var le=[];function de(e,t,r){if(le.length){var n=le.pop();return e&&n.a.H(e,t,r),n}return new ce(e,t,r)}function he(e,t){T(2==e.b);var r=e.a.o();r=e.a.B()+r;for(var n=[];e.a.B()le.length&&le.push(this)},ce.prototype.free=ce.prototype.Ca,ce.prototype.Fb=function(){return this.O},ce.prototype.getFieldCursor=ce.prototype.Fb,ce.prototype.B=function(){return this.a.B()},ce.prototype.getCursor=ce.prototype.B,ce.prototype.Y=function(){return this.a.Y()},ce.prototype.getBuffer=ce.prototype.Y,ce.prototype.Hb=function(){return this.c},ce.prototype.getFieldNumber=ce.prototype.Hb,ce.prototype.Lb=function(){return this.b},ce.prototype.getWireType=ce.prototype.Lb,ce.prototype.Mb=function(){return 2==this.b},ce.prototype.isDelimited=ce.prototype.Mb,ce.prototype.bb=function(){return 4==this.b},ce.prototype.isEndGroup=ce.prototype.bb,ce.prototype.getError=function(){return this.h||this.a.getError()},ce.prototype.getError=ce.prototype.getError,ce.prototype.H=function(e,t,r){this.a.H(e,t,r),this.b=this.c=-1},ce.prototype.setBlock=ce.prototype.H,ce.prototype.reset=function(){this.a.reset(),this.b=this.c=-1},ce.prototype.reset=ce.prototype.reset,ce.prototype.advance=function(e){this.a.advance(e)},ce.prototype.advance=ce.prototype.advance,ce.prototype.oa=function(){if(this.a.ya())return!1;if(this.getError())return v("Decoder hit an error"),!1;this.O=this.a.B();var e=this.a.o(),t=e>>>3;return 0!=(e&=7)&&5!=e&&1!=e&&2!=e&&3!=e&&4!=e?(v("Invalid wire type: %s (at position %s)",e,this.O),this.h=!0,!1):(this.c=t,this.b=e,!0)},ce.prototype.nextField=ce.prototype.oa,ce.prototype.Oa=function(){this.a.mb(this.c<<3|this.b)},ce.prototype.unskipHeader=ce.prototype.Oa,ce.prototype.Lc=function(){var e=this.c;for(this.Oa();this.oa()&&this.c==e;)this.C();this.a.ya()||this.Oa()},ce.prototype.skipMatchingFields=ce.prototype.Lc,ce.prototype.lb=function(){0!=this.b?(v("Invalid wire type for skipVarintField"),this.C()):this.a.kb()},ce.prototype.skipVarintField=ce.prototype.lb,ce.prototype.gb=function(){if(2!=this.b)v("Invalid wire type for skipDelimitedField"),this.C();else{var e=this.a.o();this.a.advance(e)}},ce.prototype.skipDelimitedField=ce.prototype.gb,ce.prototype.hb=function(){5!=this.b?(v("Invalid wire type for skipFixed32Field"),this.C()):this.a.advance(4)},ce.prototype.skipFixed32Field=ce.prototype.hb,ce.prototype.ib=function(){1!=this.b?(v("Invalid wire type for skipFixed64Field"),this.C()):this.a.advance(8)},ce.prototype.skipFixed64Field=ce.prototype.ib,ce.prototype.jb=function(){for(var e=this.c;;){if(!this.oa()){v("Unmatched start-group tag: stream EOF"),this.h=!0;break}if(4==this.b){this.c!=e&&(v("Unmatched end-group tag"),this.h=!0);break}this.C()}},ce.prototype.skipGroup=ce.prototype.jb,ce.prototype.C=function(){switch(this.b){case 0:this.lb();break;case 1:this.ib();break;case 2:this.gb();break;case 5:this.hb();break;case 3:this.jb();break;default:v("Invalid wire encoding for field.")}},ce.prototype.skipField=ce.prototype.C,ce.prototype.Hc=function(e,t){null===this.v&&(this.v={}),T(!this.v[e]),this.v[e]=t},ce.prototype.registerReadCallback=ce.prototype.Hc,ce.prototype.Ic=function(e){return T(null!==this.v),T(e=this.v[e]),e(this)},ce.prototype.runReadCallback=ce.prototype.Ic,ce.prototype.Yb=function(e,t){T(2==this.b);var r=this.a.c,n=this.a.o();n=this.a.B()+n,this.a.setEnd(n),t(e,this),this.a.Ma(n),this.a.setEnd(r)},ce.prototype.readMessage=ce.prototype.Yb,ce.prototype.Ub=function(e,t,r){T(3==this.b),T(this.c==e),r(t,this),this.h||4==this.b||(v("Group submessage did not end with an END_GROUP tag"),this.h=!0)},ce.prototype.readGroup=ce.prototype.Ub,ce.prototype.Gb=function(){T(2==this.b);var e=this.a.o(),t=this.a.B(),r=t+e;return e=ue(this.a.Y(),t,e),this.a.Ma(r),e},ce.prototype.getFieldDecoder=ce.prototype.Gb,ce.prototype.P=function(){return T(0==this.b),this.a.da()},ce.prototype.readInt32=ce.prototype.P,ce.prototype.Wb=function(){return T(0==this.b),this.a.Ea()},ce.prototype.readInt32String=ce.prototype.Wb,ce.prototype.ba=function(){return T(0==this.b),this.a.sa()},ce.prototype.readInt64=ce.prototype.ba,ce.prototype.ca=function(){return T(0==this.b),this.a.Fa()},ce.prototype.readInt64String=ce.prototype.ca,ce.prototype.m=function(){return T(0==this.b),this.a.o()},ce.prototype.readUint32=ce.prototype.m,ce.prototype.Fc=function(){return T(0==this.b),this.a.O()},ce.prototype.readUint32String=ce.prototype.Fc,ce.prototype.ga=function(){return T(0==this.b),this.a.Ga()},ce.prototype.readUint64=ce.prototype.ga,ce.prototype.ha=function(){return T(0==this.b),this.a.Ha()},ce.prototype.readUint64String=ce.prototype.ha,ce.prototype.zc=function(){return T(0==this.b),this.a.Ia()},ce.prototype.readSint32=ce.prototype.zc,ce.prototype.Ac=function(){return T(0==this.b),this.a.Ja()},ce.prototype.readSint64=ce.prototype.Ac,ce.prototype.Bc=function(){return T(0==this.b),this.a.Ka()},ce.prototype.readSint64String=ce.prototype.Bc,ce.prototype.Rb=function(){return T(5==this.b),this.a.m()},ce.prototype.readFixed32=ce.prototype.Rb,ce.prototype.Sb=function(){return T(1==this.b),this.a.ga()},ce.prototype.readFixed64=ce.prototype.Sb,ce.prototype.Tb=function(){return T(1==this.b),this.a.ha()},ce.prototype.readFixed64String=ce.prototype.Tb,ce.prototype.vc=function(){return T(5==this.b),this.a.P()},ce.prototype.readSfixed32=ce.prototype.vc,ce.prototype.wc=function(){return T(5==this.b),this.a.P().toString()},ce.prototype.readSfixed32String=ce.prototype.wc,ce.prototype.xc=function(){return T(1==this.b),this.a.ba()},ce.prototype.readSfixed64=ce.prototype.xc,ce.prototype.yc=function(){return T(1==this.b),this.a.ca()},ce.prototype.readSfixed64String=ce.prototype.yc,ce.prototype.aa=function(){return T(5==this.b),this.a.aa()},ce.prototype.readFloat=ce.prototype.aa,ce.prototype.Z=function(){return T(1==this.b),this.a.Z()},ce.prototype.readDouble=ce.prototype.Z,ce.prototype.pa=function(){return T(0==this.b),!!this.a.o()},ce.prototype.readBool=ce.prototype.pa,ce.prototype.ra=function(){return T(0==this.b),this.a.sa()},ce.prototype.readEnum=ce.prototype.ra,ce.prototype.fa=function(){T(2==this.b);var e=this.a.o();return this.a.fa(e)},ce.prototype.readString=ce.prototype.fa,ce.prototype.qa=function(){T(2==this.b);var e=this.a.o();return this.a.qa(e)},ce.prototype.readBytes=ce.prototype.qa,ce.prototype.ia=function(){return T(0==this.b),this.a.ia()},ce.prototype.readVarintHash64=ce.prototype.ia,ce.prototype.Cc=function(){return T(0==this.b),this.a.fb()},ce.prototype.readSintHash64=ce.prototype.Cc,ce.prototype.w=function(e){return T(0==this.b),this.a.w(e)},ce.prototype.readSplitVarint64=ce.prototype.w,ce.prototype.ea=function(e){return T(0==this.b),this.a.w((function(t,r){return Z(t,r,e)}))},ce.prototype.readSplitZigzagVarint64=ce.prototype.ea,ce.prototype.$=function(){return T(1==this.b),this.a.$()},ce.prototype.readFixedHash64=ce.prototype.$,ce.prototype.ta=function(e){return T(1==this.b),this.a.ta(e)},ce.prototype.readSplitFixed64=ce.prototype.ta,ce.prototype.gc=function(){return he(this,this.a.da)},ce.prototype.readPackedInt32=ce.prototype.gc,ce.prototype.hc=function(){return he(this,this.a.Ea)},ce.prototype.readPackedInt32String=ce.prototype.hc,ce.prototype.ic=function(){return he(this,this.a.sa)},ce.prototype.readPackedInt64=ce.prototype.ic,ce.prototype.jc=function(){return he(this,this.a.Fa)},ce.prototype.readPackedInt64String=ce.prototype.jc,ce.prototype.qc=function(){return he(this,this.a.o)},ce.prototype.readPackedUint32=ce.prototype.qc,ce.prototype.rc=function(){return he(this,this.a.O)},ce.prototype.readPackedUint32String=ce.prototype.rc,ce.prototype.sc=function(){return he(this,this.a.Ga)},ce.prototype.readPackedUint64=ce.prototype.sc,ce.prototype.tc=function(){return he(this,this.a.Ha)},ce.prototype.readPackedUint64String=ce.prototype.tc,ce.prototype.nc=function(){return he(this,this.a.Ia)},ce.prototype.readPackedSint32=ce.prototype.nc,ce.prototype.oc=function(){return he(this,this.a.Ja)},ce.prototype.readPackedSint64=ce.prototype.oc,ce.prototype.pc=function(){return he(this,this.a.Ka)},ce.prototype.readPackedSint64String=ce.prototype.pc,ce.prototype.bc=function(){return he(this,this.a.m)},ce.prototype.readPackedFixed32=ce.prototype.bc,ce.prototype.cc=function(){return he(this,this.a.ga)},ce.prototype.readPackedFixed64=ce.prototype.cc,ce.prototype.dc=function(){return he(this,this.a.ha)},ce.prototype.readPackedFixed64String=ce.prototype.dc,ce.prototype.kc=function(){return he(this,this.a.P)},ce.prototype.readPackedSfixed32=ce.prototype.kc,ce.prototype.lc=function(){return he(this,this.a.ba)},ce.prototype.readPackedSfixed64=ce.prototype.lc,ce.prototype.mc=function(){return he(this,this.a.ca)},ce.prototype.readPackedSfixed64String=ce.prototype.mc,ce.prototype.fc=function(){return he(this,this.a.aa)},ce.prototype.readPackedFloat=ce.prototype.fc,ce.prototype.$b=function(){return he(this,this.a.Z)},ce.prototype.readPackedDouble=ce.prototype.$b,ce.prototype.Zb=function(){return he(this,this.a.pa)},ce.prototype.readPackedBool=ce.prototype.Zb,ce.prototype.ac=function(){return he(this,this.a.ra)},ce.prototype.readPackedEnum=ce.prototype.ac,ce.prototype.uc=function(){return he(this,this.a.ia)},ce.prototype.readPackedVarintHash64=ce.prototype.uc,ce.prototype.ec=function(){return he(this,this.a.$)},ce.prototype.readPackedFixedHash64=ce.prototype.ec,d("jspb.ExtensionFieldInfo",pe,void 0),d("jspb.ExtensionFieldBinaryInfo",fe,void 0),pe.prototype.F=function(){return!!this.la},pe.prototype.isMessageType=pe.prototype.F,d("jspb.Message",ge,void 0),ge.GENERATE_TO_OBJECT=!0,ge.GENERATE_FROM_OBJECT=!0;var ye="function"==typeof Uint8Array;ge.prototype.Ib=function(){return this.b},ge.prototype.getJsPbMessageId=ge.prototype.Ib,ge.initialize=function(e,t,r,n,o,s){if(e.f=null,t||(t=r?[r]:[]),e.b=r?String(r):void 0,e.D=0===r?-1:0,e.u=t,t=-1,!(r=e.u.length)||(t=r-1,null===(r=e.u[t])||"object"!=typeof r||Array.isArray(r)||ye&&r instanceof Uint8Array)?-1t.length?r.length:t.length;for(e.b&&(n[0]=e.b,o=1);o>>16;for(t=r*n+65536*(r*o&65535)+65536*((e>>>=16)*n&65535),r=e*o+(r*o>>>16)+(e*n>>>16);4294967296<=t;)t-=4294967296,r+=1;return new De(t>>>0,r>>>0)}function ze(e){for(var t=new De(0,0),r=new De(0,0),n=0;ne[n]||"9">>=7,e.b++;t.push(r),e.b++}function Ze(e,t,r){T(1<=t&&t==Math.floor(t)),e.a.j(8*t+r)}function qe(e,t,r){null!=r&&(Ze(e,t,0),e.a.j(r))}function Je(e,t,r){null!=r&&(Ze(e,t,0),e.a.M(r))}d("jspb.debug.dump",ke.dump,void 0),ke.X=function(e){var t=h(e);if("number"==t||"string"==t||"boolean"==t||"null"==t||"undefined"==t||"undefined"!=typeof Uint8Array&&e instanceof Uint8Array)return e;if("array"==t)return function(e,t,r){for(var n=[],o=2;oe),T(0<=t&&4294967296>t);0>>7|t<<25)>>>0,t>>>=7;this.a.push(e)},Ue.prototype.writeSplitVarint64=Ue.prototype.l,Ue.prototype.A=function(e,t){T(e==Math.floor(e)),T(t==Math.floor(t)),T(0<=e&&4294967296>e),T(0<=t&&4294967296>t),this.s(e),this.s(t)},Ue.prototype.writeSplitFixed64=Ue.prototype.A,Ue.prototype.j=function(e){for(T(e==Math.floor(e)),T(0<=e&&4294967296>e);127>>=7;this.a.push(e)},Ue.prototype.writeUnsignedVarint32=Ue.prototype.j,Ue.prototype.M=function(e){if(T(e==Math.floor(e)),T(-2147483648<=e&&2147483648>e),0<=e)this.j(e);else{for(var t=0;9>t;t++)this.a.push(127&e|128),e>>=7;this.a.push(1)}},Ue.prototype.writeSignedVarint32=Ue.prototype.M,Ue.prototype.va=function(e){T(e==Math.floor(e)),T(0<=e&&0x10000000000000000>e),D(e),this.l(N,k)},Ue.prototype.writeUnsignedVarint64=Ue.prototype.va,Ue.prototype.ua=function(e){T(e==Math.floor(e)),T(-0x8000000000000000<=e&&0x8000000000000000>e),D(e),this.l(N,k)},Ue.prototype.writeSignedVarint64=Ue.prototype.ua,Ue.prototype.wa=function(e){T(e==Math.floor(e)),T(-2147483648<=e&&2147483648>e),this.j((e<<1^e>>31)>>>0)},Ue.prototype.writeZigzagVarint32=Ue.prototype.wa,Ue.prototype.xa=function(e){T(e==Math.floor(e)),T(-0x8000000000000000<=e&&0x8000000000000000>e),L(e),this.l(N,k)},Ue.prototype.writeZigzagVarint64=Ue.prototype.xa,Ue.prototype.Ta=function(e){this.W(te(e))},Ue.prototype.writeZigzagVarint64String=Ue.prototype.Ta,Ue.prototype.W=function(e){var t=this;$(e),H(N,k,(function(e,r){t.l(e>>>0,r>>>0)}))},Ue.prototype.writeZigzagVarintHash64=Ue.prototype.W,Ue.prototype.be=function(e){T(e==Math.floor(e)),T(0<=e&&256>e),this.a.push(e>>>0&255)},Ue.prototype.writeUint8=Ue.prototype.be,Ue.prototype.ae=function(e){T(e==Math.floor(e)),T(0<=e&&65536>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)},Ue.prototype.writeUint16=Ue.prototype.ae,Ue.prototype.s=function(e){T(e==Math.floor(e)),T(0<=e&&4294967296>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255),this.a.push(e>>>16&255),this.a.push(e>>>24&255)},Ue.prototype.writeUint32=Ue.prototype.s,Ue.prototype.V=function(e){T(e==Math.floor(e)),T(0<=e&&0x10000000000000000>e),U(e),this.s(N),this.s(k)},Ue.prototype.writeUint64=Ue.prototype.V,Ue.prototype.Qc=function(e){T(e==Math.floor(e)),T(-128<=e&&128>e),this.a.push(e>>>0&255)},Ue.prototype.writeInt8=Ue.prototype.Qc,Ue.prototype.Pc=function(e){T(e==Math.floor(e)),T(-32768<=e&&32768>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255)},Ue.prototype.writeInt16=Ue.prototype.Pc,Ue.prototype.S=function(e){T(e==Math.floor(e)),T(-2147483648<=e&&2147483648>e),this.a.push(e>>>0&255),this.a.push(e>>>8&255),this.a.push(e>>>16&255),this.a.push(e>>>24&255)},Ue.prototype.writeInt32=Ue.prototype.S,Ue.prototype.T=function(e){T(e==Math.floor(e)),T(-0x8000000000000000<=e&&0x8000000000000000>e),D(e),this.A(N,k)},Ue.prototype.writeInt64=Ue.prototype.T,Ue.prototype.ka=function(e){T(e==Math.floor(e)),T(-0x8000000000000000<=+e&&0x8000000000000000>+e),$(te(e)),this.A(N,k)},Ue.prototype.writeInt64String=Ue.prototype.ka,Ue.prototype.L=function(e){T(1/0===e||-1/0===e||isNaN(e)||-34028234663852886e22<=e&&34028234663852886e22>=e),z(e),this.s(N)},Ue.prototype.writeFloat=Ue.prototype.L,Ue.prototype.J=function(e){T(1/0===e||-1/0===e||isNaN(e)||-17976931348623157e292<=e&&17976931348623157e292>=e),j(e),this.s(N),this.s(k)},Ue.prototype.writeDouble=Ue.prototype.J,Ue.prototype.I=function(e){T("boolean"==typeof e||"number"==typeof e),this.a.push(e?1:0)},Ue.prototype.writeBool=Ue.prototype.I,Ue.prototype.R=function(e){T(e==Math.floor(e)),T(-2147483648<=e&&2147483648>e),this.M(e)},Ue.prototype.writeEnum=Ue.prototype.R,Ue.prototype.ja=function(e){this.a.push.apply(this.a,e)},Ue.prototype.writeBytes=Ue.prototype.ja,Ue.prototype.N=function(e){$(e),this.l(N,k)},Ue.prototype.writeVarintHash64=Ue.prototype.N,Ue.prototype.K=function(e){$(e),this.s(N),this.s(k)},Ue.prototype.writeFixedHash64=Ue.prototype.K,Ue.prototype.U=function(e){var t=this.a.length;!function(e,t,r){for(var n=[],o=2;on)this.a.push(n);else if(2048>n)this.a.push(n>>6|192),this.a.push(63&n|128);else if(65536>n)if(55296<=n&&56319>=n&&r+1=o&&(n=1024*(n-55296)+o-56320+65536,this.a.push(n>>18|240),this.a.push(n>>12&63|128),this.a.push(n>>6&63|128),this.a.push(63&n|128),r++)}else this.a.push(n>>12|224),this.a.push(n>>6&63|128),this.a.push(63&n|128)}return this.a.length-t},Ue.prototype.writeString=Ue.prototype.U,d("jspb.arith.UInt64",De,void 0),De.prototype.cmp=function(e){return this.hi>>1|(1&this.hi)<<31)>>>0,this.hi>>>1>>>0)},De.prototype.rightShift=De.prototype.La,De.prototype.Da=function(){return new De(this.lo<<1>>>0,(this.hi<<1|this.lo>>>31)>>>0)},De.prototype.leftShift=De.prototype.Da,De.prototype.cb=function(){return!!(2147483648&this.hi)},De.prototype.msb=De.prototype.cb,De.prototype.Ob=function(){return!!(1&this.lo)},De.prototype.lsb=De.prototype.Ob,De.prototype.Ua=function(){return 0==this.lo&&0==this.hi},De.prototype.zero=De.prototype.Ua,De.prototype.add=function(e){return new De((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},De.prototype.add=De.prototype.add,De.prototype.sub=function(e){return new De((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},De.prototype.sub=De.prototype.sub,De.mul32x32=Le,De.prototype.eb=function(e){var t=Le(this.lo,e);return(e=Le(this.hi,e)).hi=e.lo,e.lo=0,t.add(e)},De.prototype.mul=De.prototype.eb,De.prototype.Xa=function(e){if(0==e)return[];var t=new De(0,0),r=new De(this.lo,this.hi);e=new De(e,0);for(var n=new De(1,0);!e.cb();)e=e.Da(),n=n.Da();for(;!n.Ua();)0>=e.cmp(r)&&(t=t.add(n),r=r.sub(e)),e=e.La(),n=n.La();return[t,r]},De.prototype.div=De.prototype.Xa,De.prototype.toString=function(){for(var e="",t=this;!t.Ua();){var r=(t=t.Xa(10))[0];e=t[1].lo+e,t=r}return""==e&&(e="0"),e},De.prototype.toString=De.prototype.toString,De.fromString=ze,De.prototype.clone=function(){return new De(this.lo,this.hi)},De.prototype.clone=De.prototype.clone,d("jspb.arith.Int64",je,void 0),je.prototype.add=function(e){return new je((this.lo+e.lo&4294967295)>>>0>>>0,((this.hi+e.hi&4294967295)>>>0)+(4294967296<=this.lo+e.lo?1:0)>>>0)},je.prototype.add=je.prototype.add,je.prototype.sub=function(e){return new je((this.lo-e.lo&4294967295)>>>0>>>0,((this.hi-e.hi&4294967295)>>>0)-(0>this.lo-e.lo?1:0)>>>0)},je.prototype.sub=je.prototype.sub,je.prototype.clone=function(){return new je(this.lo,this.hi)},je.prototype.clone=je.prototype.clone,je.prototype.toString=function(){var e=!!(2147483648&this.hi),t=new De(this.lo,this.hi);return e&&(t=new De(0,0).sub(t)),(e?"-":"")+t.toString()},je.prototype.toString=je.prototype.toString,je.fromString=$e,d("jspb.BinaryWriter",Ve,void 0),Ve.prototype.pb=function(e,t,r){Ge(this,e.subarray(t,r))},Ve.prototype.writeSerializedMessage=Ve.prototype.pb,Ve.prototype.Pb=function(e,t,r){null!=e&&null!=t&&null!=r&&this.pb(e,t,r)},Ve.prototype.maybeWriteSerializedMessage=Ve.prototype.Pb,Ve.prototype.reset=function(){this.c=[],this.a.end(),this.b=0,this.h=[]},Ve.prototype.reset=Ve.prototype.reset,Ve.prototype.ab=function(){T(0==this.h.length);for(var e=new Uint8Array(this.b+this.a.length()),t=this.c,r=t.length,n=0,o=0;ot),Je(this,e,t))},Ve.prototype.writeInt32=Ve.prototype.S,Ve.prototype.ob=function(e,t){null!=t&&(T(-2147483648<=(t=parseInt(t,10))&&2147483648>t),Je(this,e,t))},Ve.prototype.writeInt32String=Ve.prototype.ob,Ve.prototype.T=function(e,t){null!=t&&(T(-0x8000000000000000<=t&&0x8000000000000000>t),null!=t&&(Ze(this,e,0),this.a.ua(t)))},Ve.prototype.writeInt64=Ve.prototype.T,Ve.prototype.ka=function(e,t){null!=t&&(t=$e(t),Ze(this,e,0),this.a.l(t.lo,t.hi))},Ve.prototype.writeInt64String=Ve.prototype.ka,Ve.prototype.s=function(e,t){null!=t&&(T(0<=t&&4294967296>t),qe(this,e,t))},Ve.prototype.writeUint32=Ve.prototype.s,Ve.prototype.ub=function(e,t){null!=t&&(T(0<=(t=parseInt(t,10))&&4294967296>t),qe(this,e,t))},Ve.prototype.writeUint32String=Ve.prototype.ub,Ve.prototype.V=function(e,t){null!=t&&(T(0<=t&&0x10000000000000000>t),null!=t&&(Ze(this,e,0),this.a.va(t)))},Ve.prototype.writeUint64=Ve.prototype.V,Ve.prototype.vb=function(e,t){null!=t&&(t=ze(t),Ze(this,e,0),this.a.l(t.lo,t.hi))},Ve.prototype.writeUint64String=Ve.prototype.vb,Ve.prototype.rb=function(e,t){null!=t&&(T(-2147483648<=t&&2147483648>t),null!=t&&(Ze(this,e,0),this.a.wa(t)))},Ve.prototype.writeSint32=Ve.prototype.rb,Ve.prototype.sb=function(e,t){null!=t&&(T(-0x8000000000000000<=t&&0x8000000000000000>t),null!=t&&(Ze(this,e,0),this.a.xa(t)))},Ve.prototype.writeSint64=Ve.prototype.sb,Ve.prototype.$d=function(e,t){null!=t&&null!=t&&(Ze(this,e,0),this.a.W(t))},Ve.prototype.writeSintHash64=Ve.prototype.$d,Ve.prototype.Zd=function(e,t){null!=t&&null!=t&&(Ze(this,e,0),this.a.Ta(t))},Ve.prototype.writeSint64String=Ve.prototype.Zd,Ve.prototype.Pa=function(e,t){null!=t&&(T(0<=t&&4294967296>t),Ze(this,e,5),this.a.s(t))},Ve.prototype.writeFixed32=Ve.prototype.Pa,Ve.prototype.Qa=function(e,t){null!=t&&(T(0<=t&&0x10000000000000000>t),Ze(this,e,1),this.a.V(t))},Ve.prototype.writeFixed64=Ve.prototype.Qa,Ve.prototype.nb=function(e,t){null!=t&&(t=ze(t),Ze(this,e,1),this.a.A(t.lo,t.hi))},Ve.prototype.writeFixed64String=Ve.prototype.nb,Ve.prototype.Ra=function(e,t){null!=t&&(T(-2147483648<=t&&2147483648>t),Ze(this,e,5),this.a.S(t))},Ve.prototype.writeSfixed32=Ve.prototype.Ra,Ve.prototype.Sa=function(e,t){null!=t&&(T(-0x8000000000000000<=t&&0x8000000000000000>t),Ze(this,e,1),this.a.T(t))},Ve.prototype.writeSfixed64=Ve.prototype.Sa,Ve.prototype.qb=function(e,t){null!=t&&(t=$e(t),Ze(this,e,1),this.a.A(t.lo,t.hi))},Ve.prototype.writeSfixed64String=Ve.prototype.qb,Ve.prototype.L=function(e,t){null!=t&&(Ze(this,e,5),this.a.L(t))},Ve.prototype.writeFloat=Ve.prototype.L,Ve.prototype.J=function(e,t){null!=t&&(Ze(this,e,1),this.a.J(t))},Ve.prototype.writeDouble=Ve.prototype.J,Ve.prototype.I=function(e,t){null!=t&&(T("boolean"==typeof t||"number"==typeof t),Ze(this,e,0),this.a.I(t))},Ve.prototype.writeBool=Ve.prototype.I,Ve.prototype.R=function(e,t){null!=t&&(T(-2147483648<=t&&2147483648>t),Ze(this,e,0),this.a.M(t))},Ve.prototype.writeEnum=Ve.prototype.R,Ve.prototype.U=function(e,t){null!=t&&(e=He(this,e),this.a.U(t),Ke(this,e))},Ve.prototype.writeString=Ve.prototype.U,Ve.prototype.ja=function(e,t){null!=t&&(t=se(t),Ze(this,e,2),this.a.j(t.length),Ge(this,t))},Ve.prototype.writeBytes=Ve.prototype.ja,Ve.prototype.Rc=function(e,t,r){null!=t&&(e=He(this,e),r(t,this),Ke(this,e))},Ve.prototype.writeMessage=Ve.prototype.Rc,Ve.prototype.Sc=function(e,t,r){null!=t&&(Ze(this,1,3),Ze(this,2,0),this.a.M(e),e=He(this,3),r(t,this),Ke(this,e),Ze(this,1,4))},Ve.prototype.writeMessageSet=Ve.prototype.Sc,Ve.prototype.Oc=function(e,t,r){null!=t&&(Ze(this,e,3),r(t,this),Ze(this,e,4))},Ve.prototype.writeGroup=Ve.prototype.Oc,Ve.prototype.K=function(e,t){null!=t&&(T(8==t.length),Ze(this,e,1),this.a.K(t))},Ve.prototype.writeFixedHash64=Ve.prototype.K,Ve.prototype.N=function(e,t){null!=t&&(T(8==t.length),Ze(this,e,0),this.a.N(t))},Ve.prototype.writeVarintHash64=Ve.prototype.N,Ve.prototype.A=function(e,t,r){Ze(this,e,1),this.a.A(t,r)},Ve.prototype.writeSplitFixed64=Ve.prototype.A,Ve.prototype.l=function(e,t,r){Ze(this,e,0),this.a.l(t,r)},Ve.prototype.writeSplitVarint64=Ve.prototype.l,Ve.prototype.tb=function(e,t,r){Ze(this,e,0);var n=this.a;H(t,r,(function(e,t){n.l(e>>>0,t>>>0)}))},Ve.prototype.writeSplitZigzagVarint64=Ve.prototype.tb,Ve.prototype.Ed=function(e,t){if(null!=t)for(var r=0;r>>0,t>>>0)}));Ke(this,e)}},Ve.prototype.writePackedSplitZigzagVarint64=Ve.prototype.od,Ve.prototype.dd=function(e,t){if(null!=t&&t.length){e=He(this,e);for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^[\x00-\x7F]+$/;e.exports=t.default,e.exports.default=t.default},4443:(e,t,r)=>{var n=r(4172),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")(),i=r(9037);o.object.extend(proto,i),o.exportSymbol("TronWebProto.AccountCreateContract",null,s),o.exportSymbol("TronWebProto.AccountPermissionUpdateContract",null,s),o.exportSymbol("TronWebProto.AccountUpdateContract",null,s),o.exportSymbol("TronWebProto.SetAccountIdContract",null,s),TronWebProto.AccountCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountCreateContract.displayName="TronWebProto.AccountCreateContract"),TronWebProto.AccountUpdateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountUpdateContract.displayName="TronWebProto.AccountUpdateContract"),TronWebProto.SetAccountIdContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SetAccountIdContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SetAccountIdContract.displayName="TronWebProto.SetAccountIdContract"),TronWebProto.AccountPermissionUpdateContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.AccountPermissionUpdateContract.repeatedFields_,null)},o.inherits(TronWebProto.AccountPermissionUpdateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountPermissionUpdateContract.displayName="TronWebProto.AccountPermissionUpdateContract"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountCreateContract.prototype.toObject=function(e){return TronWebProto.AccountCreateContract.toObject(e,this)},TronWebProto.AccountCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),accountAddress:t.getAccountAddress_asB64(),type:n.Message.getFieldWithDefault(t,3,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountCreateContract;return TronWebProto.AccountCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setAccountAddress(r);break;case 3:r=t.readEnum(),e.setType(r);break;default:t.skipField()}return e},TronWebProto.AccountCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getAccountAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getType())&&t.writeEnum(3,r)},TronWebProto.AccountCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountCreateContract.prototype.getAccountAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.AccountCreateContract.prototype.getAccountAddress_asB64=function(){return n.Message.bytesAsB64(this.getAccountAddress())},TronWebProto.AccountCreateContract.prototype.getAccountAddress_asU8=function(){return n.Message.bytesAsU8(this.getAccountAddress())},TronWebProto.AccountCreateContract.prototype.setAccountAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AccountCreateContract.prototype.getType=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.AccountCreateContract.prototype.setType=function(e){return n.Message.setProto3EnumField(this,3,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountUpdateContract.prototype.toObject=function(e){return TronWebProto.AccountUpdateContract.toObject(e,this)},TronWebProto.AccountUpdateContract.toObject=function(e,t){var r={accountName:t.getAccountName_asB64(),ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountUpdateContract;return TronWebProto.AccountUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountName(r);break;case 2:r=t.readBytes(),e.setOwnerAddress(r);break;default:t.skipField()}return e},TronWebProto.AccountUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.AccountUpdateContract.prototype.getAccountName=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AccountUpdateContract.prototype.getAccountName_asB64=function(){return n.Message.bytesAsB64(this.getAccountName())},TronWebProto.AccountUpdateContract.prototype.getAccountName_asU8=function(){return n.Message.bytesAsU8(this.getAccountName())},TronWebProto.AccountUpdateContract.prototype.setAccountName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SetAccountIdContract.prototype.toObject=function(e){return TronWebProto.SetAccountIdContract.toObject(e,this)},TronWebProto.SetAccountIdContract.toObject=function(e,t){var r={accountId:t.getAccountId_asB64(),ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SetAccountIdContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SetAccountIdContract;return TronWebProto.SetAccountIdContract.deserializeBinaryFromReader(r,t)},TronWebProto.SetAccountIdContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountId(r);break;case 2:r=t.readBytes(),e.setOwnerAddress(r);break;default:t.skipField()}return e},TronWebProto.SetAccountIdContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SetAccountIdContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SetAccountIdContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountId_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.SetAccountIdContract.prototype.getAccountId=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.SetAccountIdContract.prototype.getAccountId_asB64=function(){return n.Message.bytesAsB64(this.getAccountId())},TronWebProto.SetAccountIdContract.prototype.getAccountId_asU8=function(){return n.Message.bytesAsU8(this.getAccountId())},TronWebProto.SetAccountIdContract.prototype.setAccountId=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.SetAccountIdContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.SetAccountIdContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AccountPermissionUpdateContract.repeatedFields_=[4],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountPermissionUpdateContract.prototype.toObject=function(e){return TronWebProto.AccountPermissionUpdateContract.toObject(e,this)},TronWebProto.AccountPermissionUpdateContract.toObject=function(e,t){var r,o={ownerAddress:t.getOwnerAddress_asB64(),owner:(r=t.getOwner())&&i.Permission.toObject(e,r),witness:(r=t.getWitness())&&i.Permission.toObject(e,r),activesList:n.Message.toObjectList(t.getActivesList(),i.Permission.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.AccountPermissionUpdateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountPermissionUpdateContract;return TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader(r,t)},TronWebProto.AccountPermissionUpdateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=new i.Permission,t.readMessage(r,i.Permission.deserializeBinaryFromReader),e.setOwner(r);break;case 3:r=new i.Permission,t.readMessage(r,i.Permission.deserializeBinaryFromReader),e.setWitness(r);break;case 4:r=new i.Permission,t.readMessage(r,i.Permission.deserializeBinaryFromReader),e.addActives(r);break;default:t.skipField()}return e},TronWebProto.AccountPermissionUpdateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountPermissionUpdateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),null!=(r=e.getOwner())&&t.writeMessage(2,r,i.Permission.serializeBinaryToWriter),null!=(r=e.getWitness())&&t.writeMessage(3,r,i.Permission.serializeBinaryToWriter),(r=e.getActivesList()).length>0&&t.writeRepeatedMessage(4,r,i.Permission.serializeBinaryToWriter)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AccountPermissionUpdateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AccountPermissionUpdateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountPermissionUpdateContract.prototype.getOwner=function(){return n.Message.getWrapperField(this,i.Permission,2)},TronWebProto.AccountPermissionUpdateContract.prototype.setOwner=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.AccountPermissionUpdateContract.prototype.clearOwner=function(){return this.setOwner(void 0)},TronWebProto.AccountPermissionUpdateContract.prototype.hasOwner=function(){return null!=n.Message.getField(this,2)},TronWebProto.AccountPermissionUpdateContract.prototype.getWitness=function(){return n.Message.getWrapperField(this,i.Permission,3)},TronWebProto.AccountPermissionUpdateContract.prototype.setWitness=function(e){return n.Message.setWrapperField(this,3,e)},TronWebProto.AccountPermissionUpdateContract.prototype.clearWitness=function(){return this.setWitness(void 0)},TronWebProto.AccountPermissionUpdateContract.prototype.hasWitness=function(){return null!=n.Message.getField(this,3)},TronWebProto.AccountPermissionUpdateContract.prototype.getActivesList=function(){return n.Message.getRepeatedWrapperField(this,i.Permission,4)},TronWebProto.AccountPermissionUpdateContract.prototype.setActivesList=function(e){return n.Message.setRepeatedWrapperField(this,4,e)},TronWebProto.AccountPermissionUpdateContract.prototype.addActives=function(e,t){return n.Message.addToRepeatedWrapperField(this,4,e,TronWebProto.Permission,t)},TronWebProto.AccountPermissionUpdateContract.prototype.clearActivesList=function(){return this.setActivesList([])},o.object.extend(t,TronWebProto)},4633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)||i.test(e)||a.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i,i=/^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i,a=/^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i;e.exports=t.default,e.exports.default=t.default},4641:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;e.exports=t.default,e.exports.default=t.default},4834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iso7064Check=function(e){for(var t=10,r=0;r=0;n--){if(r){var o=2*parseInt(e[n],10);t+=o>9?o.toString().split("").map((function(e){return parseInt(e,10)})).reduce((function(e,t){return e+t}),0):o}else t+=parseInt(e[n],10);r=!r}return t%10==0},t.reverseMultiplyAndSum=function(e,t){for(var r=0,n=0;n{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,o,s){n=n||"&",o=o||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(n);var u=1e3;s&&"number"==typeof s.maxKeys&&(u=s.maxKeys);var c=e.length;u>0&&c>u&&(c=u);for(var l=0;l=0?(d=g.substr(0,y),h=g.substr(y+1)):(d=g,h=""),p=decodeURIComponent(d),f=decodeURIComponent(h),t(i,p)?r(i[p])?i[p].push(f):i[p]=[i[p],f]:i[p]=f}return i};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},4967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(1484),o=BigInt(0),s=BigInt(1),i=BigInt(2),a=BigInt(3),u=BigInt(4),c=BigInt(5),l=BigInt(8);function d(e,t){const r=e%t;return r>=o?r:t+r}function h(e,t,r){if(r<=o||t 0");if(r===s)return o;let n=s;for(;t>o;)t&s&&(n=n*e%r),e=e*e%r,t>>=s;return n}function p(e,t){if(e===o||t<=o)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=d(e,t),n=t,i=o,a=s,u=s,c=o;for(;r!==o;){const e=n/r,t=n%r,o=i-u*e,s=a-c*e;n=r,r=t,i=u,a=c,u=o,c=s}if(n!==s)throw new Error("invert: does not exist");return d(i,t)}function f(e){const t=(e-s)/i;let r,n,a;for(r=e-s,n=0;r%i===o;r/=i,n++);for(a=i;ao;)n*=n,n%=r;return n},t.invert=p,t.tonelliShanks=f,t.FpSqrt=g,t.isNegativeLE=(e,t)=>(d(e,t)&s)===s;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function b(e,t,r){if(r 0");if(r===o)return e.ONE;if(r===s)return t;let n=e.ONE,i=t;for(;r>o;)r&s&&(n=e.mul(n,i)),i=e.sqr(i),r>>=s;return n}function m(e,t){const r=new Array(t.length),n=t.reduce(((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n))),e.ONE),o=e.inv(n);return t.reduceRight(((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n))),o),r}function T(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}t.validateField=function(e){const t=y.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=b,t.FpInvertBatch=m,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?p(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-s)/i;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=T,t.Field=function(e,t,r=!1,i={}){if(e<=o)throw new Error(`Expected Fp ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:u}=T(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=g(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:u,MASK:(0,n.bitMask)(a),ZERO:o,ONE:s,create:t=>d(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return o<=t&&te===o,isOdd:e=>(e&s)===s,neg:t=>d(-t,e),eql:(e,t)=>e===t,sqr:t=>d(t*t,e),add:(t,r)=>d(t+r,e),sub:(t,r)=>d(t-r,e),mul:(t,r)=>d(t*r,e),pow:(e,t)=>b(l,e,t),div:(t,r)=>d(t*p(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:i.sqrt||(e=>c(l,e)),invertBatch:e=>m(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,u):(0,n.numberToBytesBE)(e,u),fromBytes:e=>{if(e.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const o=(e=(0,n.ensureBytes)("privateHash",e)).length,i=T(t).nByteLength+8;if(i<24||o1024)throw new Error(`hashToPrivateScalar: expected ${i}-1024 bytes of input, got ${o}`);return d(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-s)+s}},5186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=s[[void 0,null].includes(t)?"all":t];return!!r&&r.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s={1:/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,2:/^[0-9A-F]{8}-[0-9A-F]{4}-2[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,3:/^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,4:/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,5:/^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i,all:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i};e.exports=t.default,e.exports.default=t.default},5251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){if((0,o.default)(e),r&&r.strictMode&&!e.startsWith("+"))return!1;if(Array.isArray(t))return t.some((function(t){return!(!s.hasOwnProperty(t)||!s[t].test(e))}));if(t in s)return s[t].test(e);if(!t||"any"===t){for(var n in s)if(s.hasOwnProperty(n)&&s[n].test(e))return!0;return!1}throw new Error("Invalid locale '".concat(t,"'"))},t.locales=void 0;var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s={"am-AM":/^(\+?374|0)((10|[9|7][0-9])\d{6}$|[2-4]\d{7}$)/,"ar-AE":/^((\+?971)|0)?5[024568]\d{7}$/,"ar-BH":/^(\+?973)?(3|6)\d{7}$/,"ar-DZ":/^(\+?213|0)(5|6|7)\d{8}$/,"ar-LB":/^(\+?961)?((3|81)\d{6}|7\d{7})$/,"ar-EG":/^((\+?20)|0)?1[0125]\d{8}$/,"ar-IQ":/^(\+?964|0)?7[0-9]\d{8}$/,"ar-JO":/^(\+?962|0)?7[789]\d{7}$/,"ar-KW":/^(\+?965)([569]\d{7}|41\d{6})$/,"ar-LY":/^((\+?218)|0)?(9[1-6]\d{7}|[1-8]\d{7,9})$/,"ar-MA":/^(?:(?:\+|00)212|0)[5-7]\d{8}$/,"ar-OM":/^((\+|00)968)?(9[1-9])\d{6}$/,"ar-PS":/^(\+?970|0)5[6|9](\d{7})$/,"ar-SA":/^(!?(\+?966)|0)?5\d{8}$/,"ar-SY":/^(!?(\+?963)|0)?9\d{8}$/,"ar-TN":/^(\+?216)?[2459]\d{7}$/,"az-AZ":/^(\+994|0)(10|5[015]|7[07]|99)\d{7}$/,"bs-BA":/^((((\+|00)3876)|06))((([0-3]|[5-6])\d{6})|(4\d{7}))$/,"be-BY":/^(\+?375)?(24|25|29|33|44)\d{7}$/,"bg-BG":/^(\+?359|0)?8[789]\d{7}$/,"bn-BD":/^(\+?880|0)1[13456789][0-9]{8}$/,"ca-AD":/^(\+376)?[346]\d{5}$/,"cs-CZ":/^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"da-DK":/^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,"de-DE":/^((\+49|0)1)(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7,9}$/,"de-AT":/^(\+43|0)\d{1,4}\d{3,12}$/,"de-CH":/^(\+41|0)([1-9])\d{1,9}$/,"de-LU":/^(\+352)?((6\d1)\d{6})$/,"dv-MV":/^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,"el-GR":/^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,"el-CY":/^(\+?357?)?(9(9|6)\d{6})$/,"en-AI":/^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,"en-AU":/^(\+?61|0)4\d{8}$/,"en-AG":/^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,"en-BM":/^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,"en-BS":/^(\+?1[-\s]?|0)?\(?242\)?[-\s]?\d{3}[-\s]?\d{4}$/,"en-GB":/^(\+?44|0)7\d{9}$/,"en-GG":/^(\+?44|0)1481\d{6}$/,"en-GH":/^(\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\d{7}$/,"en-GY":/^(\+592|0)6\d{6}$/,"en-HK":/^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,"en-MO":/^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,"en-IE":/^(\+?353|0)8[356789]\d{7}$/,"en-IN":/^(\+?91|0)?[6789]\d{9}$/,"en-JM":/^(\+?876)?\d{7}$/,"en-KE":/^(\+?254|0)(7|1)\d{8}$/,"en-SS":/^(\+?211|0)(9[1257])\d{7}$/,"en-KI":/^((\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,"en-KN":/^(?:\+1|1)869(?:46\d|48[89]|55[6-8]|66\d|76[02-7])\d{4}$/,"en-LS":/^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,"en-MT":/^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,"en-MU":/^(\+?230|0)?\d{8}$/,"en-NA":/^(\+?264|0)(6|8)\d{7}$/,"en-NG":/^(\+?234|0)?[789]\d{9}$/,"en-NZ":/^(\+?64|0)[28]\d{7,9}$/,"en-PG":/^(\+?675|0)?(7\d|8[18])\d{6}$/,"en-PK":/^((00|\+)?92|0)3[0-6]\d{8}$/,"en-PH":/^(09|\+639)\d{9}$/,"en-RW":/^(\+?250|0)?[7]\d{8}$/,"en-SG":/^(\+65)?[3689]\d{7}$/,"en-SL":/^(\+?232|0)\d{8}$/,"en-TZ":/^(\+?255|0)?[67]\d{8}$/,"en-UG":/^(\+?256|0)?[7]\d{8}$/,"en-US":/^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,"en-ZA":/^(\+?27|0)\d{9}$/,"en-ZM":/^(\+?26)?09[567]\d{7}$/,"en-ZW":/^(\+263)[0-9]{9}$/,"en-BW":/^(\+?267)?(7[1-8]{1})\d{6}$/,"es-AR":/^\+?549(11|[2368]\d)\d{8}$/,"es-BO":/^(\+?591)?(6|7)\d{7}$/,"es-CO":/^(\+?57)?3(0(0|1|2|4|5)|1\d|2[0-4]|5(0|1))\d{7}$/,"es-CL":/^(\+?56|0)[2-9]\d{1}\d{7}$/,"es-CR":/^(\+506)?[2-8]\d{7}$/,"es-CU":/^(\+53|0053)?5\d{7}/,"es-DO":/^(\+?1)?8[024]9\d{7}$/,"es-HN":/^(\+?504)?[9|8|3|2]\d{7}$/,"es-EC":/^(\+?593|0)([2-7]|9[2-9])\d{7}$/,"es-ES":/^(\+?34)?[6|7]\d{8}$/,"es-PE":/^(\+?51)?9\d{8}$/,"es-MX":/^(\+?52)?(1|01)?\d{10,11}$/,"es-NI":/^(\+?505)\d{7,8}$/,"es-PA":/^(\+?507)\d{7,8}$/,"es-PY":/^(\+?595|0)9[9876]\d{7}$/,"es-SV":/^(\+?503)?[67]\d{7}$/,"es-UY":/^(\+598|0)9[1-9][\d]{6}$/,"es-VE":/^(\+?58)?(2|4)\d{9}$/,"et-EE":/^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,"fa-IR":/^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,"fi-FI":/^(\+?358|0)\s?(4[0-6]|50)\s?(\d\s?){4,8}$/,"fj-FJ":/^(\+?679)?\s?\d{3}\s?\d{4}$/,"fo-FO":/^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"fr-BF":/^(\+226|0)[67]\d{7}$/,"fr-BJ":/^(\+229)\d{8}$/,"fr-CD":/^(\+?243|0)?(8|9)\d{8}$/,"fr-CM":/^(\+?237)6[0-9]{8}$/,"fr-FR":/^(\+?33|0)[67]\d{8}$/,"fr-GF":/^(\+?594|0|00594)[67]\d{8}$/,"fr-GP":/^(\+?590|0|00590)[67]\d{8}$/,"fr-MQ":/^(\+?596|0|00596)[67]\d{8}$/,"fr-PF":/^(\+?689)?8[789]\d{6}$/,"fr-RE":/^(\+?262|0|00262)[67]\d{8}$/,"he-IL":/^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,"hu-HU":/^(\+?36|06)(20|30|31|50|70)\d{7}$/,"id-ID":/^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,"ir-IR":/^(\+98|0)?9\d{9}$/,"it-IT":/^(\+?39)?\s?3\d{2} ?\d{6,7}$/,"it-SM":/^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,"ja-JP":/^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,"ka-GE":/^(\+?995)?(79\d{7}|5\d{8})$/,"kk-KZ":/^(\+?7|8)?7\d{9}$/,"kl-GL":/^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,"ko-KR":/^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,"ky-KG":/^(\+?7\s?\+?7|0)\s?\d{2}\s?\d{3}\s?\d{4}$/,"lt-LT":/^(\+370|8)\d{8}$/,"lv-LV":/^(\+?371)2\d{7}$/,"mg-MG":/^((\+?261|0)(2|3)\d)?\d{7}$/,"mn-MN":/^(\+|00|011)?976(77|81|88|91|94|95|96|99)\d{6}$/,"my-MM":/^(\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,"ms-MY":/^(\+?60|0)1(([0145](-|\s)?\d{7,8})|([236-9](-|\s)?\d{7}))$/,"mz-MZ":/^(\+?258)?8[234567]\d{7}$/,"nb-NO":/^(\+?47)?[49]\d{7}$/,"ne-NP":/^(\+?977)?9[78]\d{8}$/,"nl-BE":/^(\+?32|0)4\d{8}$/,"nl-NL":/^(((\+|00)?31\(0\))|((\+|00)?31)|0)6{1}\d{8}$/,"nl-AW":/^(\+)?297(56|59|64|73|74|99)\d{5}$/,"nn-NO":/^(\+?47)?[49]\d{7}$/,"pl-PL":/^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,"pt-BR":/^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,"pt-PT":/^(\+?351)?9[1236]\d{7}$/,"pt-AO":/^(\+244)\d{9}$/,"ro-MD":/^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,"ro-RO":/^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,"ru-RU":/^(\+?7|8)?9\d{9}$/,"si-LK":/^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,"sl-SI":/^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,"sk-SK":/^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,"sq-AL":/^(\+355|0)6[789]\d{6}$/,"sr-RS":/^(\+3816|06)[- \d]{5,9}$/,"sv-SE":/^(\+?46|0)[\s\-]?7[\s\-]?[02369]([\s\-]?\d){7}$/,"tg-TJ":/^(\+?992)?[5][5]\d{7}$/,"th-TH":/^(\+66|66|0)\d{9}$/,"tr-TR":/^(\+?90|0)?5\d{9}$/,"tk-TM":/^(\+993|993|8)\d{8}$/,"uk-UA":/^(\+?38|8)?0\d{9}$/,"uz-UZ":/^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,"vi-VN":/^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,"zh-CN":/^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,"zh-TW":/^(\+?886\-?|0)?9\d{8}$/,"dz-BT":/^(\+?975|0)?(17|16|77|02)\d{6}$/,"ar-YE":/^(((\+|00)9677|0?7)[0137]\d{7}|((\+|00)967|0)[1-7]\d{6})$/,"ar-EH":/^(\+?212|0)[\s\-]?(5288|5289)[\s\-]?\d{5}$/,"fa-AF":/^(\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\d{7})$/};s["en-CA"]=s["en-US"],s["fr-CA"]=s["en-CA"],s["fr-BE"]=s["nl-BE"],s["zh-HK"]=s["en-HK"],s["zh-MO"]=s["en-MO"],s["ga-IE"]=s["en-IE"],s["fr-CH"]=s["de-CH"],s["it-CH"]=s["fr-CH"];var i=Object.keys(s);t.locales=i},5259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.slice(4,6).toUpperCase();return!(!s.CountryCodes.has(t)&&"XK"!==t)&&i.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=r(8447),i=/^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;e.exports=t.default,e.exports.default=t.default},5345:(e,t)=>{var r;t=e.exports=X,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var n=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,s=n-6,i=t.re=[],a=t.safeRe=[],u=t.src=[],c=0,l="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",n],[l,s]];function h(e){for(var t=0;t)?=?)";var I=c++;u[I]=u[f]+"|x|X|\\*";var F=c++;u[F]=u[p]+"|x|X|\\*";var O=c++;u[O]="[v=\\s]*("+u[F]+")(?:\\.("+u[F]+")(?:\\.("+u[F]+")(?:"+u[v]+")?"+u[P]+"?)?)?";var S=c++;u[S]="[v=\\s]*("+u[I]+")(?:\\.("+u[I]+")(?:\\.("+u[I]+")(?:"+u[w]+")?"+u[P]+"?)?)?";var _=c++;u[_]="^"+u[M]+"\\s*"+u[O]+"$";var R=c++;u[R]="^"+u[M]+"\\s*"+u[S]+"$";var x=c++;u[x]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var N=c++;u[N]="(?:~>?)";var k=c++;u[k]="(\\s*)"+u[N]+"\\s+",i[k]=new RegExp(u[k],"g"),a[k]=new RegExp(h(u[k]),"g");var U=c++;u[U]="^"+u[N]+u[O]+"$";var D=c++;u[D]="^"+u[N]+u[S]+"$";var L=c++;u[L]="(?:\\^)";var z=c++;u[z]="(\\s*)"+u[L]+"\\s+",i[z]=new RegExp(u[z],"g"),a[z]=new RegExp(h(u[z]),"g");var j=c++;u[j]="^"+u[L]+u[O]+"$";var $=c++;u[$]="^"+u[L]+u[S]+"$";var V=c++;u[V]="^"+u[M]+"\\s*("+C+")$|^$";var G=c++;u[G]="^"+u[M]+"\\s*("+B+")$|^$";var H=c++;u[H]="(\\s*)"+u[M]+"\\s*("+C+"|"+u[O]+")",i[H]=new RegExp(u[H],"g"),a[H]=new RegExp(h(u[H]),"g");var K=c++;u[K]="^\\s*("+u[O]+")\\s+-\\s+("+u[O]+")\\s*$";var Z=c++;u[Z]="^\\s*("+u[S]+")\\s+-\\s+("+u[S]+")\\s*$";var q=c++;u[q]="(<|>)?=?\\s*\\*";for(var J=0;J<35;J++)r(J,u[J]),i[J]||(i[J]=new RegExp(u[J]),a[J]=new RegExp(h(u[J])));function Y(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof X)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?a[E]:a[W]).test(e))return null;try{return new X(e,t)}catch(e){return null}}function X(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof X){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof X))return new X(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?a[E]:a[W]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new X(e,r).inc(t,n).version}catch(e){return null}},t.diff=function(e,t){if(oe(e,t))return null;var r=Y(e),n=Y(t),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var s="prerelease"}for(var i in r)if(("major"===i||"minor"===i||"patch"===i)&&r[i]!==n[i])return o+i;return s},t.compareIdentifiers=ee;var Q=/^[0-9]+$/;function ee(e,t){var r=Q.test(e),n=Q.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e0}function ne(e,t,r){return te(e,t,r)<0}function oe(e,t,r){return 0===te(e,t,r)}function se(e,t,r){return 0!==te(e,t,r)}function ie(e,t,r){return te(e,t,r)>=0}function ae(e,t,r){return te(e,t,r)<=0}function ue(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return oe(e,r,n);case"!=":return se(e,r,n);case">":return re(e,r,n);case">=":return ie(e,r,n);case"<":return ne(e,r,n);case"<=":return ae(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function ce(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ce){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ce))return new ce(e,t);e=e.trim().split(/\s+/).join(" "),r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===le?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}t.rcompareIdentifiers=function(e,t){return ee(t,e)},t.major=function(e,t){return new X(e,t).major},t.minor=function(e,t){return new X(e,t).minor},t.patch=function(e,t){return new X(e,t).patch},t.compare=te,t.compareLoose=function(e,t){return te(e,t,!0)},t.rcompare=function(e,t,r){return te(t,e,r)},t.sort=function(e,r){return e.sort((function(e,n){return t.compare(e,n,r)}))},t.rsort=function(e,r){return e.sort((function(e,n){return t.rcompare(e,n,r)}))},t.gt=re,t.lt=ne,t.eq=oe,t.neq=se,t.gte=ie,t.lte=ae,t.cmp=ue,t.Comparator=ce;var le={};function de(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof de)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new de(e.raw,t);if(e instanceof ce)return new de(e.value,t);if(!(this instanceof de))return new de(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}function he(e){return!e||"x"===e.toLowerCase()||"*"===e}function pe(e,t,r,n,o,s,i,a,u,c,l,d,h){return((t=he(r)?"":he(n)?">="+r+".0.0":he(o)?">="+r+"."+n+".0":">="+t)+" "+(a=he(u)?"":he(c)?"<"+(+u+1)+".0.0":he(l)?"<"+u+"."+(+c+1)+".0":d?"<="+u+"."+c+"."+l+"-"+d:"<="+a)).trim()}function fe(e,t,n){for(var o=0;o0){var s=e[o].semver;if(s.major===t.major&&s.minor===t.minor&&s.patch===t.patch)return!0}return!1}return!0}function ge(e,t,r){try{t=new de(t,r)}catch(e){return!1}return t.test(e)}function ye(e,t,r,n){var o,s,i,a,u;switch(e=new X(e,n),t=new de(t,n),r){case">":o=re,s=ae,i=ne,a=">",u=">=";break;case"<":o=ne,s=ie,i=re,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ge(e,t,n))return!1;for(var c=0;c=0.0.0")),d=d||e,h=h||e,o(e.semver,d.semver,n)?d=e:i(e.semver,h.semver,n)&&(h=e)})),d.operator===a||d.operator===u)return!1;if((!h.operator||h.operator===a)&&s(e,h.semver))return!1;if(h.operator===u&&i(e,h.semver))return!1}return!0}ce.prototype.parse=function(e){var t=this.options.loose?a[V]:a[G],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new X(r[2],this.options.loose):this.semver=le},ce.prototype.toString=function(){return this.value},ce.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===le||("string"==typeof e&&(e=new X(e,this.options)),ue(e,this.operator,this.semver,this.options))},ce.prototype.intersects=function(e,t){if(!(e instanceof ce))throw new TypeError("a Comparator is required");var r;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new de(e.value,t),ge(this.value,r,t);if(""===e.operator)return r=new de(this.value,t),ge(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),s=this.semver.version===e.semver.version,i=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ue(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),u=ue(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||o||s&&i||a||u},t.Range=de,de.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},de.prototype.toString=function(){return this.range},de.prototype.parseRange=function(e){var t=this.options.loose,n=t?a[Z]:a[K];e=e.replace(n,pe),r("hyphen replace",e),e=e.replace(a[H],"$1$2$3"),r("comparator trim",e,a[H]),e=(e=e.replace(a[k],"$1~")).replace(a[z],"$1^");var o=t?a[V]:a[G],s=e.split(" ").map((function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){r("caret",e,t);var n=t.loose?a[$]:a[j];return e.replace(n,(function(t,n,o,s,i){var a;return r("caret",e,t,n,o,s,i),he(n)?a="":he(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":he(s)?a="0"===n?">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":">="+n+"."+o+".0 <"+(+n+1)+".0.0":i?(r("replaceCaret pr",i),a="0"===n?"0"===o?">="+n+"."+o+"."+s+"-"+i+" <"+n+"."+o+"."+(+s+1):">="+n+"."+o+"."+s+"-"+i+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+s+"-"+i+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===o?">="+n+"."+o+"."+s+" <"+n+"."+o+"."+(+s+1):">="+n+"."+o+"."+s+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+s+" <"+(+n+1)+".0.0"),r("caret return",a),a}))}(e,t)})).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var n=t.loose?a[D]:a[U];return e.replace(n,(function(t,n,o,s,i){var a;return r("tilde",e,t,n,o,s,i),he(n)?a="":he(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":he(s)?a=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":i?(r("replaceTilde pr",i),a=">="+n+"."+o+"."+s+"-"+i+" <"+n+"."+(+o+1)+".0"):a=">="+n+"."+o+"."+s+" <"+n+"."+(+o+1)+".0",r("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var n=t.loose?a[R]:a[_];return e.replace(n,(function(t,n,o,s,i,a){r("xRange",e,t,n,o,s,i,a);var u=he(o),c=u||he(s),l=c||he(i);return"="===n&&l&&(n=""),u?t=">"===n||"<"===n?"<0.0.0":"*":n&&l?(c&&(s=0),i=0,">"===n?(n=">=",c?(o=+o+1,s=0,i=0):(s=+s+1,i=0)):"<="===n&&(n="<",c?o=+o+1:s=+s+1),t=n+o+"."+s+"."+i):c?t=">="+o+".0.0 <"+(+o+1)+".0.0":l&&(t=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"),r("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(a[q],"")}(e,t),r("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(o)}))),s.map((function(e){return new ce(e,this.options)}),this)},de.prototype.intersects=function(e,t){if(!(e instanceof de))throw new TypeError("a Range is required");return this.set.some((function(r){return r.every((function(r){return e.set.some((function(e){return e.every((function(e){return r.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new de(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},de.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new X(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":r&&!re(r,t)||(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return r&&e.test(r)?r:null},t.validRange=function(e,t){try{return new de(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,r){return ye(e,t,"<",r)},t.gtr=function(e,t,r){return ye(e,t,">",r)},t.outside=ye,t.prerelease=function(e,t){var r=Y(e,t);return r&&r.prerelease.length?r.prerelease:null},t.intersects=function(e,t,r){return e=new de(e,r),t=new de(t,r),e.intersects(t)},t.coerce=function(e){if(e instanceof X)return e;if("string"!=typeof e)return null;var t=e.match(a[x]);return null==t?null:Y(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},5366:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,s.default)(e),(0,s.default)(t),t in u)return u[t](e);throw new Error("Invalid country code: '".concat(t,"'"))},t.vatMatchers=void 0;var o,s=(o=r(3399))&&o.__esModule?o:{default:o},i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,t&&t.set(e,r),r}(r(4834));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}var u={AT:function(e){return/^(AT)?U\d{8}$/.test(e)},BE:function(e){return/^(BE)?\d{10}$/.test(e)},BG:function(e){return/^(BG)?\d{9,10}$/.test(e)},HR:function(e){return/^(HR)?\d{11}$/.test(e)},CY:function(e){return/^(CY)?\w{9}$/.test(e)},CZ:function(e){return/^(CZ)?\d{8,10}$/.test(e)},DK:function(e){return/^(DK)?\d{8}$/.test(e)},EE:function(e){return/^(EE)?\d{9}$/.test(e)},FI:function(e){return/^(FI)?\d{8}$/.test(e)},FR:function(e){return/^(FR)?\w{2}\d{9}$/.test(e)},DE:function(e){return/^(DE)?\d{9}$/.test(e)},EL:function(e){return/^(EL)?\d{9}$/.test(e)},HU:function(e){return/^(HU)?\d{8}$/.test(e)},IE:function(e){return/^(IE)?\d{7}\w{1}(W)?$/.test(e)},IT:function(e){return/^(IT)?\d{11}$/.test(e)},LV:function(e){return/^(LV)?\d{11}$/.test(e)},LT:function(e){return/^(LT)?\d{9,12}$/.test(e)},LU:function(e){return/^(LU)?\d{8}$/.test(e)},MT:function(e){return/^(MT)?\d{8}$/.test(e)},NL:function(e){return/^(NL)?\d{9}B\d{2}$/.test(e)},PL:function(e){return/^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(e)},PT:function(e){var t=e.match(/^(PT)?(\d{9})$/);if(!t)return!1;var r=t[2],n=11-i.reverseMultiplyAndSum(r.split("").slice(0,8).map((function(e){return parseInt(e,10)})),9)%11;return n>9?0===parseInt(r[8],10):n===parseInt(r[8],10)},RO:function(e){return/^(RO)?\d{2,10}$/.test(e)},SK:function(e){return/^(SK)?\d{10}$/.test(e)},SI:function(e){return/^(SI)?\d{8}$/.test(e)},ES:function(e){return/^(ES)?\w\d{7}[A-Z]$/.test(e)},SE:function(e){return/^(SE)?\d{12}$/.test(e)},AL:function(e){return/^(AL)?\w{9}[A-Z]$/.test(e)},MK:function(e){return/^(MK)?\d{13}$/.test(e)},AU:function(e){return/^(AU)?\d{11}$/.test(e)},BY:function(e){return/^(УНП )?\d{9}$/.test(e)},CA:function(e){return/^(CA)?\d{9}$/.test(e)},IS:function(e){return/^(IS)?\d{5,6}$/.test(e)},IN:function(e){return/^(IN)?\d{15}$/.test(e)},ID:function(e){return/^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(e)},IL:function(e){return/^(IL)?\d{9}$/.test(e)},KZ:function(e){return/^(KZ)?\d{9}$/.test(e)},NZ:function(e){return/^(NZ)?\d{9}$/.test(e)},NG:function(e){return/^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(e)},NO:function(e){return/^(NO)?\d{9}MVA$/.test(e)},PH:function(e){return/^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(e)},RU:function(e){return/^(RU)?(\d{10}|\d{12})$/.test(e)},SM:function(e){return/^(SM)?\d{5}$/.test(e)},SA:function(e){return/^(SA)?\d{15}$/.test(e)},RS:function(e){return/^(RS)?\d{9}$/.test(e)},CH:function(e){return/^(CH)?(\d{6}|\d{9}|(\d{3}.\d{3})|(\d{3}.\d{3}.\d{3}))(TVA|MWST|IVA)$/.test(e)},TR:function(e){return/^(TR)?\d{10}$/.test(e)},UA:function(e){return/^(UA)?\d{12}$/.test(e)},GB:function(e){return/^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(e)},UZ:function(e){return/^(UZ)?\d{9}$/.test(e)},AR:function(e){return/^(AR)?\d{11}$/.test(e)},BO:function(e){return/^(BO)?\d{7}$/.test(e)},BR:function(e){return/^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(e)},CL:function(e){return/^(CL)?\d{8}-\d{1}$/.test(e)},CO:function(e){return/^(CO)?\d{10}$/.test(e)},CR:function(e){return/^(CR)?\d{9,12}$/.test(e)},EC:function(e){return/^(EC)?\d{13}$/.test(e)},SV:function(e){return/^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(e)},GT:function(e){return/^(GT)?\d{7}-\d{1}$/.test(e)},HN:function(e){return/^(HN)?$/.test(e)},MX:function(e){return/^(MX)?\w{3,4}\d{6}\w{3}$/.test(e)},NI:function(e){return/^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(e)},PA:function(e){return/^(PA)?$/.test(e)},PY:function(e){return/^(PY)?\d{6,8}-\d{1}$/.test(e)},PE:function(e){return/^(PE)?\d{11}$/.test(e)},DO:function(e){return/^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(e)},UY:function(e){return/^(UY)?\d{12}$/.test(e)},VE:function(e){return/^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(e)}};t.vatMatchers=u},5372:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return(0,o.default)(t),(r=String(r))?"4"===r?a.test(t):"6"===r&&c.test(t):e(t,4)||e(t,6)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",i="(".concat(s,"[.]){3}").concat(s),a=new RegExp("^".concat(i,"$")),u="(?:[0-9a-fA-F]{1,4})",c=new RegExp("^("+"(?:".concat(u,":){7}(?:").concat(u,"|:)|")+"(?:".concat(u,":){6}(?:").concat(i,"|:").concat(u,"|:)|")+"(?:".concat(u,":){5}(?::").concat(i,"|(:").concat(u,"){1,2}|:)|")+"(?:".concat(u,":){4}(?:(:").concat(u,"){0,1}:").concat(i,"|(:").concat(u,"){1,3}|:)|")+"(?:".concat(u,":){3}(?:(:").concat(u,"){0,2}:").concat(i,"|(:").concat(u,"){1,4}|:)|")+"(?:".concat(u,":){2}(?:(:").concat(u,"){0,3}:").concat(i,"|(:").concat(u,"){1,5}|:)|")+"(?:".concat(u,":){1}(?:(:").concat(u,"){0,4}:").concat(i,"|(:").concat(u,"){1,6}|:)|")+"(?::((?::".concat(u,"){0,5}:").concat(i,"|(?::").concat(u,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default},5467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return(0,o.default)(e),t?s.test(e)||i.test(e)||a.test(e)||u.test(e):s.test(e)||i.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/,i=/^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/,a=/^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/,u=/^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/;e.exports=t.default,e.exports.default=t.default},5510:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},5577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),e===e.toUpperCase()};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},5730:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=e.join("");return new RegExp(r,t)},e.exports=t.default,e.exports.default=t.default},5748:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)||i.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^(bc1)[a-z0-9]{25,39}$/,i=/^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/;e.exports=t.default,e.exports.default=t.default},5751:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e);try{t=(0,o.default)(t,a);var r=[];t.allow_primitives&&(r=[null,!1,!0]);var s=JSON.parse(e);return r.includes(s)||!!s&&"object"===i(s)}catch(e){}return!1};var n=s(r(3399)),o=s(r(3610));function s(e){return e&&e.__esModule?e:{default:e}}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a={allow_primitives:!1};e.exports=t.default,e.exports.default=t.default},5772:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"===r(e)&&null!==e?e="function"==typeof e.toString?e.toString():"[object Object]":(null==e||isNaN(e)&&!e.length)&&(e=""),String(e)},e.exports=t.default,e.exports.default=t.default},5830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),t=(0,o.default)(t,l),!e.includes(","))return!1;var r=e.split(",");return!(r[0].startsWith("(")&&!r[1].endsWith(")")||r[1].endsWith(")")&&!r[0].startsWith("("))&&(t.checkDMS?u.test(r[0])&&c.test(r[1]):i.test(r[0])&&a.test(r[1]))};var n=s(r(3399)),o=s(r(3610));function s(e){return e&&e.__esModule?e:{default:e}}var i=/^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/,a=/^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/,u=/^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i,c=/^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i,l={checkDMS:!1};e.exports=t.default,e.exports.default=t.default},5926:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,o.default)(e),(t=(0,n.default)(t,u)).locale in i.decimal)return!(0,s.default)(c,e.replace(/ /g,""))&&function(e){return new RegExp("^[-+]?([0-9]+)?(\\".concat(i.decimal[e.locale],"[0-9]{").concat(e.decimal_digits,"})").concat(e.force_decimal?"":"?","$"))}(t).test(e);throw new Error("Invalid locale '".concat(t.locale,"'"))};var n=a(r(3610)),o=a(r(3399)),s=a(r(9265)),i=r(3237);function a(e){return e&&e.__esModule?e:{default:e}}var u={force_decimal:!1,decimal_digits:"1,",locale:"en-US"},c=["","-","+"];e.exports=t.default,e.exports.default=t.default},6084:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=(t=t||{}).hasOwnProperty("allow_leading_zeroes")&&!t.allow_leading_zeroes?s:i,n=!t.hasOwnProperty("min")||e>=t.min,a=!t.hasOwnProperty("max")||e<=t.max,u=!t.hasOwnProperty("lt")||et.gt;return r.test(e)&&n&&a&&u&&c};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^(?:[-+]?(?:0|[1-9][0-9]*))$/,i=/^[-+]?[0-9]+$/;e.exports=t.default,e.exports.default=t.default},6169:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,o.default)(e);var r=t.strictSeparator?i.test(e):s.test(e);return r&&t.strict?a(e):r};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,i=/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/,a=function(e){var t=e.match(/^(\d{4})-?(\d{3})([ T]{1}\.*|$)/);if(t){var r=Number(t[1]),n=Number(t[2]);return r%4==0&&r%100!=0||r%400==0?n<=366:n<=365}var o=e.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number),s=o[1],i=o[2],a=o[3],u=i?"0".concat(i).slice(-2):i,c=a?"0".concat(a).slice(-2):a,l=new Date("".concat(s,"-").concat(u||"01","-").concat(c||"01"));return!i||!a||l.getUTCFullYear()===s&&l.getUTCMonth()+1===i&&l.getUTCDate()===a};e.exports=t.default,e.exports.default=t.default},6255:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,n;(0,o.default)(e),"object"===s(t)?(r=t.min||0,n=t.max):(r=arguments[1],n=arguments[2]);var i=encodeURI(e).split(/%..|./).length-1;return i>=r&&(void 0===n||i<=n)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},6513:(e,t,r)=>{"use strict";t.b=void 0;var n=r(8510);Object.defineProperty(t,"b",{enumerable:!0,get:function(){return n.secp256k1}})},6529:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(e);var n=e,i=r.ignore;if(i)if(i instanceof RegExp)n=n.replace(i,"");else{if("string"!=typeof i)throw new Error("ignore should be instance of a String or RegExp");n=n.replace(new RegExp("[".concat(i.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(t in s.alpha)return s.alpha[t].test(n);throw new Error("Invalid locale '".concat(t,"'"))},t.locales=void 0;var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=r(3237),i=Object.keys(s.alpha);t.locales=i},6617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),!!s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^[A-HJ-NP-Za-km-z1-9]*$/;e.exports=t.default,e.exports.default=t.default},6658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:String(new Date);(0,n.default)(e);var r=(0,o.default)(t),s=(0,o.default)(e);return!!(s&&r&&s{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,o.default)(e),function(e){var t="\\d{".concat(e.digits_after_decimal[0],"}");e.digits_after_decimal.forEach((function(e,r){0!==r&&(t="".concat(t,"|\\d{").concat(e,"}"))}));var r="(".concat(e.symbol.replace(/\W/,(function(e){return"\\".concat(e)})),")").concat(e.require_symbol?"":"?"),n="-?",o="[1-9]\\d{0,2}(\\".concat(e.thousands_separator,"\\d{3})*"),s="(".concat(["0","[1-9]\\d*",o].join("|"),")?"),i="(\\".concat(e.decimal_separator,"(").concat(t,"))").concat(e.require_decimal?"":"?"),a=s+(e.allow_decimal||e.require_decimal?i:"");return e.allow_negatives&&!e.parens_for_negatives&&(e.negative_sign_after_digits?a+=n:e.negative_sign_before_digits&&(a=n+a)),e.allow_negative_sign_placeholder?a="( (?!\\-))?".concat(a):e.allow_space_after_symbol?a=" ?".concat(a):e.allow_space_after_digits&&(a+="( (?!$))?"),e.symbol_after_digits?a+=r:a=r+a,e.allow_negatives&&(e.parens_for_negatives?a="(\\(".concat(a,"\\)|").concat(a,")"):e.negative_sign_before_digits||e.negative_sign_after_digits||(a=n+a)),new RegExp("^(?!-? )(?=.*\\d)".concat(a,"$"))}(t=(0,n.default)(t,i)).test(e)};var n=s(r(3610)),o=s(r(3399));function s(e){return e&&e.__esModule?e:{default:e}}var i={symbol:"$",require_symbol:!1,allow_space_after_symbol:!1,symbol_after_digits:!1,allow_negatives:!0,parens_for_negatives:!1,negative_sign_before_digits:!1,negative_sign_after_digits:!1,allow_negative_sign_placeholder:!1,thousands_separator:",",decimal_separator:".",allow_decimal:!0,require_decimal:!1,digits_after_decimal:[2],allow_space_after_digits:!1};e.exports=t.default,e.exports.default=t.default},7071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),"en_US_POSIX"===e||"ca_ES_VALENCIA"===e||s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^[A-Za-z]{2,4}([_-]([A-Za-z]{4}|[\d]{3}))?([_-]([A-Za-z]{2}|[\d]{3}))?$/;e.exports=t.default,e.exports.default=t.default},7086:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);var t=e.replace(/\s+/g," ").replace(/\s?(hsla?\(|\)|,)\s?/gi,"$1");return-1!==t.indexOf(",")?s.test(t):i.test(t)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i,i=/^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;e.exports=t.default,e.exports.default=t.default},7115:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,n.default)(e);var r=e.split("/");if(2!==r.length)return!1;if(!i.test(r[1]))return!1;if(r[1].length>1&&r[1].startsWith("0"))return!1;if(!(0,o.default)(r[0],t))return!1;var s=null;switch(String(t)){case"4":s=a;break;case"6":s=u;break;default:s=(0,o.default)(r[0],"6")?u:a}return r[1]<=s&&r[1]>=0};var n=s(r(3399)),o=s(r(5372));function s(e){return e&&e.__esModule?e:{default:e}}var i=/^\d{1,3}$/,a=32,u=128;e.exports=t.default,e.exports.default=t.default},7179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,o.default)(e);var r=function(e){var t=function(e){var t={};return Array.from(e).forEach((function(e){t[e]?t[e]+=1:t[e]=1})),t}(e),r={length:e.length,uniqueChars:Object.keys(t).length,uppercaseCount:0,lowercaseCount:0,numberCount:0,symbolCount:0};return Object.keys(t).forEach((function(e){i.test(e)?r.uppercaseCount+=t[e]:a.test(e)?r.lowercaseCount+=t[e]:u.test(e)?r.numberCount+=t[e]:c.test(e)&&(r.symbolCount+=t[e])})),r}(e);return(t=(0,n.default)(t||{},l)).returnScore?function(e,t){var r=0;return r+=e.uniqueChars*t.pointsPerUnique,r+=(e.length-e.uniqueChars)*t.pointsPerRepeat,e.lowercaseCount>0&&(r+=t.pointsForContainingLower),e.uppercaseCount>0&&(r+=t.pointsForContainingUpper),e.numberCount>0&&(r+=t.pointsForContainingNumber),e.symbolCount>0&&(r+=t.pointsForContainingSymbol),r}(r,t):r.length>=t.minLength&&r.lowercaseCount>=t.minLowercase&&r.uppercaseCount>=t.minUppercase&&r.numberCount>=t.minNumbers&&r.symbolCount>=t.minSymbols};var n=s(r(3610)),o=s(r(3399));function s(e){return e&&e.__esModule?e:{default:e}}var i=/^[A-Z]$/,a=/^[a-z]$/,u=/^[0-9]$/,c=/^[-#!$@£%^&*()_+|~=`{}\[\]:";'<>?,.\/ ]$/,l={minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1,returnScore:!1,pointsPerUnique:1,pointsPerRepeat:.5,pointsForContainingLower:10,pointsForContainingUpper:10,pointsForContainingNumber:10,pointsForContainingSymbol:10};e.exports=t.default,e.exports.default=t.default},7349:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),0===e.indexOf("magnet:?")&&s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;e.exports=t.default,e.exports.default=t.default},7351:(e,t,r)=>{var n=r(4172),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("TronWebProto.ExchangeCreateContract",null,s),o.exportSymbol("TronWebProto.ExchangeInjectContract",null,s),o.exportSymbol("TronWebProto.ExchangeTransactionContract",null,s),o.exportSymbol("TronWebProto.ExchangeWithdrawContract",null,s),TronWebProto.ExchangeCreateContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeCreateContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeCreateContract.displayName="TronWebProto.ExchangeCreateContract"),TronWebProto.ExchangeInjectContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeInjectContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeInjectContract.displayName="TronWebProto.ExchangeInjectContract"),TronWebProto.ExchangeWithdrawContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeWithdrawContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeWithdrawContract.displayName="TronWebProto.ExchangeWithdrawContract"),TronWebProto.ExchangeTransactionContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ExchangeTransactionContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ExchangeTransactionContract.displayName="TronWebProto.ExchangeTransactionContract"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeCreateContract.prototype.toObject=function(e){return TronWebProto.ExchangeCreateContract.toObject(e,this)},TronWebProto.ExchangeCreateContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),firstTokenId:t.getFirstTokenId_asB64(),firstTokenBalance:n.Message.getFieldWithDefault(t,3,0),secondTokenId:t.getSecondTokenId_asB64(),secondTokenBalance:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeCreateContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeCreateContract;return TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeCreateContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setFirstTokenId(r);break;case 3:r=t.readInt64(),e.setFirstTokenBalance(r);break;case 4:r=t.readBytes(),e.setSecondTokenId(r);break;case 5:r=t.readInt64(),e.setSecondTokenBalance(r);break;default:t.skipField()}return e},TronWebProto.ExchangeCreateContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeCreateContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeCreateContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getFirstTokenId_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFirstTokenBalance())&&t.writeInt64(3,r),(r=e.getSecondTokenId_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getSecondTokenBalance())&&t.writeInt64(5,r)},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeCreateContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeCreateContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asB64=function(){return n.Message.bytesAsB64(this.getFirstTokenId())},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenId_asU8=function(){return n.Message.bytesAsU8(this.getFirstTokenId())},TronWebProto.ExchangeCreateContract.prototype.setFirstTokenId=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.ExchangeCreateContract.prototype.getFirstTokenBalance=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.ExchangeCreateContract.prototype.setFirstTokenBalance=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asB64=function(){return n.Message.bytesAsB64(this.getSecondTokenId())},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenId_asU8=function(){return n.Message.bytesAsU8(this.getSecondTokenId())},TronWebProto.ExchangeCreateContract.prototype.setSecondTokenId=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.ExchangeCreateContract.prototype.getSecondTokenBalance=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.ExchangeCreateContract.prototype.setSecondTokenBalance=function(e){return n.Message.setProto3IntField(this,5,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeInjectContract.prototype.toObject=function(e){return TronWebProto.ExchangeInjectContract.toObject(e,this)},TronWebProto.ExchangeInjectContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeInjectContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeInjectContract;return TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeInjectContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setExchangeId(r);break;case 3:r=t.readBytes(),e.setTokenId(r);break;case 4:r=t.readInt64(),e.setQuant(r);break;default:t.skipField()}return e},TronWebProto.ExchangeInjectContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeInjectContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeInjectContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r)},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeInjectContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeInjectContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeInjectContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeInjectContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeInjectContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.ExchangeInjectContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeInjectContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeInjectContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeInjectContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeInjectContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeWithdrawContract.prototype.toObject=function(e){return TronWebProto.ExchangeWithdrawContract.toObject(e,this)},TronWebProto.ExchangeWithdrawContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeWithdrawContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeWithdrawContract;return TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeWithdrawContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setExchangeId(r);break;case 3:r=t.readBytes(),e.setTokenId(r);break;case 4:r=t.readInt64(),e.setQuant(r);break;default:t.skipField()}return e},TronWebProto.ExchangeWithdrawContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeWithdrawContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r)},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeWithdrawContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeWithdrawContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeWithdrawContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeWithdrawContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeWithdrawContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeWithdrawContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeWithdrawContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeWithdrawContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ExchangeTransactionContract.prototype.toObject=function(e){return TronWebProto.ExchangeTransactionContract.toObject(e,this)},TronWebProto.ExchangeTransactionContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),exchangeId:n.Message.getFieldWithDefault(t,2,0),tokenId:t.getTokenId_asB64(),quant:n.Message.getFieldWithDefault(t,4,0),expected:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ExchangeTransactionContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ExchangeTransactionContract;return TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader(r,t)},TronWebProto.ExchangeTransactionContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setExchangeId(r);break;case 3:r=t.readBytes(),e.setTokenId(r);break;case 4:r=t.readInt64(),e.setQuant(r);break;case 5:r=t.readInt64(),e.setExpected(r);break;default:t.skipField()}return e},TronWebProto.ExchangeTransactionContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ExchangeTransactionContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getExchangeId())&&t.writeInt64(2,r),(r=e.getTokenId_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getQuant())&&t.writeInt64(4,r),0!==(r=e.getExpected())&&t.writeInt64(5,r)},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ExchangeTransactionContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ExchangeTransactionContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ExchangeTransactionContract.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.ExchangeTransactionContract.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.ExchangeTransactionContract.prototype.getTokenId=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asB64=function(){return n.Message.bytesAsB64(this.getTokenId())},TronWebProto.ExchangeTransactionContract.prototype.getTokenId_asU8=function(){return n.Message.bytesAsU8(this.getTokenId())},TronWebProto.ExchangeTransactionContract.prototype.setTokenId=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ExchangeTransactionContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ExchangeTransactionContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.ExchangeTransactionContract.prototype.getExpected=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.ExchangeTransactionContract.prototype.setExpected=function(e){return n.Message.setProto3IntField(this,5,e)},o.object.extend(t,TronWebProto)},7612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),e===e.toLowerCase()};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},7658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),(t=(0,o.default)(t,i)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1)),!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var r=e.split("."),s=r[r.length-1];if(t.require_tld){if(r.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(s))return!1;if(/\s/.test(s))return!1}return!(!t.allow_numeric_tld&&/^\d+$/.test(s))&&r.every((function(e){return!(e.length>63&&!t.ignore_max_length||!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)||/[\uff01-\uff5e]/.test(e)||/^-|-$/.test(e)||!t.allow_underscores&&/_/.test(e))}))};var n=s(r(3399)),o=s(r(3610));function s(e){return e&&e.__esModule?e:{default:e}}var i={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default},7673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,n.default)(e),(t=(0,o.default)(t,u)).crockford?a.test(e):!(e.length%8!=0||!i.test(e))};var n=s(r(3399)),o=s(r(3610));function s(e){return e&&e.__esModule?e:{default:e}}var i=/^[A-Z2-7]+=*$/,a=/^[A-HJKMNP-TV-Z0-9]+$/,u={crockford:!1};e.exports=t.default,e.exports.default=t.default},7677:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),e.replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(///g,"/").replace(/\/g,"\\").replace(/`/g,"`").replace(/&/g,"&")};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},7717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,o.default)(e);var t,r,n=Number(e.slice(-1));return a.test(e)&&n===((r=10-(t=e).slice(0,-1).split("").map((function(e,r){return Number(e)*function(e,t){return e===s||e===i?t%2==0?3:1:t%2==0?1:3}(t.length,r)})).reduce((function(e,t){return e+t}),0)%10)<10?r:0)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=8,i=14,a=/^(\d{8}|\d{13}|\d{14})$/;e.exports=t.default,e.exports.default=t.default},7741:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";(0,o.default)(e);var r=e.slice(0);if(t in h)return t in g&&(r=r.replace(g[t],"")),!!h[t].test(r)&&(!(t in p)||p[t](r));throw new Error("Invalid locale '".concat(t,"'"))};var o=u(r(3399)),s=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,t&&t.set(e,r),r}(r(4834)),i=u(r(9013));function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){if(t&&!r&&!/[AEIOU]/.test(e[n]))return!1;if(r&&!/X/.test(e[n]))return!1}return!0}var h={"bg-BG":/^\d{10}$/,"cs-CZ":/^\d{6}\/{0,1}\d{3,4}$/,"de-AT":/^\d{9}$/,"de-DE":/^[1-9]\d{10}$/,"dk-DK":/^\d{6}-{0,1}\d{4}$/,"el-CY":/^[09]\d{7}[A-Z]$/,"el-GR":/^([0-4]|[7-9])\d{8}$/,"en-CA":/^\d{9}$/,"en-GB":/^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,"en-IE":/^\d{7}[A-W][A-IW]{0,1}$/i,"en-US":/^\d{2}[- ]{0,1}\d{7}$/,"es-ES":/^(\d{0,8}|[XYZKLM]\d{7})[A-HJ-NP-TV-Z]$/i,"et-EE":/^[1-6]\d{6}(00[1-9]|0[1-9][0-9]|[1-6][0-9]{2}|70[0-9]|710)\d$/,"fi-FI":/^\d{6}[-+A]\d{3}[0-9A-FHJ-NPR-Y]$/i,"fr-BE":/^\d{11}$/,"fr-FR":/^[0-3]\d{12}$|^[0-3]\d\s\d{2}(\s\d{3}){3}$/,"fr-LU":/^\d{13}$/,"hr-HR":/^\d{11}$/,"hu-HU":/^8\d{9}$/,"it-IT":/^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,"lv-LV":/^\d{6}-{0,1}\d{5}$/,"mt-MT":/^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,"nl-NL":/^\d{9}$/,"pl-PL":/^\d{10,11}$/,"pt-BR":/(?:^\d{11}$)|(?:^\d{14}$)/,"pt-PT":/^\d{9}$/,"ro-RO":/^\d{13}$/,"sk-SK":/^\d{6}\/{0,1}\d{3,4}$/,"sl-SI":/^[1-9]\d{7}$/,"sv-SE":/^(\d{6}[-+]{0,1}\d{4}|(18|19|20)\d{6}[-+]{0,1}\d{4})$/};h["lb-LU"]=h["fr-LU"],h["lt-LT"]=h["et-EE"],h["nl-BE"]=h["fr-BE"],h["fr-CA"]=h["en-CA"];var p={"bg-BG":function(e){var t=e.slice(0,2),r=parseInt(e.slice(2,4),10);r>40?(r-=40,t="20".concat(t)):r>20?(r-=20,t="18".concat(t)):t="19".concat(t),r<10&&(r="0".concat(r));var n="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,i.default)(n,"YYYY/MM/DD"))return!1;for(var o=e.split("").map((function(e){return parseInt(e,10)})),s=[2,4,8,5,10,9,7,3,6],a=0,u=0;u50&&(r-=50),r>20){if(parseInt(t,10)<2004)return!1;r-=20}r<10&&(r="0".concat(r));var n="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,i.default)(n,"YYYY/MM/DD"))return!1;if(10===e.length&&parseInt(e,10)%11!=0){var o=parseInt(e.slice(0,9),10)%11;if(!(parseInt(t,10)<1986&&10===o))return!1;if(0!==parseInt(e.slice(9),10))return!1}return!0},"de-AT":function(e){return s.luhnCheck(e)},"de-DE":function(e){for(var t=e.split("").map((function(e){return parseInt(e,10)})),r=[],n=0;n1}))).length&&3!==r.length)return!1;if(3===r[0].length){for(var i=r[0].split("").map((function(e){return parseInt(e,10)})),a=0,u=0;u58))return!1;t="18".concat(t)}}3===t.length&&(t=[t.slice(0,2),"0",t.slice(2)].join(""));var r="".concat(t,"/").concat(e.slice(2,4),"/").concat(e.slice(0,2));if(!(0,i.default)(r,"YYYY/MM/DD"))return!1;for(var n=e.split("").map((function(e){return parseInt(e,10)})),o=0,s=4,a=0;a<9;a++)o+=n[a]*s,1==(s-=1)&&(s=7);return 1!=(o%=11)&&(0===o?0===n[9]:n[9]===11-o)},"el-CY":function(e){for(var t=e.slice(0,8).split("").map((function(e){return parseInt(e,10)})),r=0,n=1;n4&&(r+=2));return String.fromCharCode(r%26+65)===e.charAt(8)},"el-GR":function(e){for(var t=e.split("").map((function(e){return parseInt(e,10)})),r=0,n=0;n<8;n++)r+=t[n]*Math.pow(2,8-n);return r%11%10===t[8]},"en-CA":function(e){var t=e.split(""),r=t.filter((function(e,t){return t%2})).map((function(e){return 2*Number(e)})).join("").split("");return t.filter((function(e,t){return!(t%2)})).concat(r).map((function(e){return Number(e)})).reduce((function(e,t){return e+t}))%10==0},"en-IE":function(e){var t=s.reverseMultiplyAndSum(e.split("").slice(0,7).map((function(e){return parseInt(e,10)})),8);return 9===e.length&&"W"!==e[8]&&(t+=9*(e[8].charCodeAt(0)-64)),0==(t%=23)?"W"===e[7].toUpperCase():e[7].toUpperCase()===String.fromCharCode(64+t)},"en-US":function(e){return-1!==function(){var e,t=[];for(var r in l)l.hasOwnProperty(r)&&t.push.apply(t,function(e){if(Array.isArray(e))return c(e)}(e=l[r])||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return t}().indexOf(e.slice(0,2))},"es-ES":function(e){var t=e.toUpperCase().split("");if(isNaN(parseInt(t[0],10))&&t.length>1){var r=0;switch(t[0]){case"Y":r=1;break;case"Z":r=2}t.splice(0,1,r)}else for(;t.length<9;)t.unshift(0);t=t.join("");var n=parseInt(t.slice(0,8),10)%23;return t[8]===["T","R","W","A","G","M","Y","F","P","D","X","B","N","J","Z","S","Q","V","H","L","C","K","E"][n]},"et-EE":function(e){var t=e.slice(1,3);switch(e.slice(0,1)){case"1":case"2":t="18".concat(t);break;case"3":case"4":t="19".concat(t);break;default:t="20".concat(t)}var r="".concat(t,"/").concat(e.slice(3,5),"/").concat(e.slice(5,7));if(!(0,i.default)(r,"YYYY/MM/DD"))return!1;for(var n=e.split("").map((function(e){return parseInt(e,10)})),o=0,s=1,a=0;a<10;a++)o+=n[a]*s,10===(s+=1)&&(s=1);if(o%11==10){o=0,s=3;for(var u=0;u<10;u++)o+=n[u]*s,10===(s+=1)&&(s=1);if(o%11==10)return 0===n[10]}return o%11===n[10]},"fi-FI":function(e){var t=e.slice(4,6);switch(e.slice(6,7)){case"+":t="18".concat(t);break;case"-":t="19".concat(t);break;default:t="20".concat(t)}var r="".concat(t,"/").concat(e.slice(2,4),"/").concat(e.slice(0,2));if(!(0,i.default)(r,"YYYY/MM/DD"))return!1;var n=parseInt(e.slice(0,6)+e.slice(7,10),10)%31;return n<10?n===parseInt(e.slice(10),10):["A","B","C","D","E","F","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y"][n-=10]===e.slice(10)},"fr-BE":function(e){if("00"!==e.slice(2,4)||"00"!==e.slice(4,6)){var t="".concat(e.slice(0,2),"/").concat(e.slice(2,4),"/").concat(e.slice(4,6));if(!(0,i.default)(t,"YY/MM/DD"))return!1}var r=97-parseInt(e.slice(0,9),10)%97,n=parseInt(e.slice(9,11),10);return r===n||(r=97-parseInt("2".concat(e.slice(0,9)),10)%97)===n},"fr-FR":function(e){return e=e.replace(/\s/g,""),parseInt(e.slice(0,10),10)%511===parseInt(e.slice(10,13),10)},"fr-LU":function(e){var t="".concat(e.slice(0,4),"/").concat(e.slice(4,6),"/").concat(e.slice(6,8));return!!(0,i.default)(t,"YYYY/MM/DD")&&!!s.luhnCheck(e.slice(0,12))&&s.verhoeffCheck("".concat(e.slice(0,11)).concat(e[12]))},"hr-HR":function(e){return s.iso7064Check(e)},"hu-HU":function(e){for(var t=e.split("").map((function(e){return parseInt(e,10)})),r=8,n=1;n<9;n++)r+=t[n]*(n+1);return r%11===t[9]},"it-IT":function(e){var t=e.toUpperCase().split("");if(!d(t.slice(0,3)))return!1;if(!d(t.slice(3,6)))return!1;for(var r={L:"0",M:"1",N:"2",P:"3",Q:"4",R:"5",S:"6",T:"7",U:"8",V:"9"},n=0,o=[6,7,9,10,12,13,14];n40&&(u-=40),u<10&&(u="0".concat(u));var c="".concat(t[6]).concat(t[7],"/").concat(a,"/").concat(u);if(!(0,i.default)(c,"YY/MM/DD"))return!1;for(var l=0,h=1;h4&&(y+=2)}l+=y}return String.fromCharCode(65+l%26)===t[15]},"lv-LV":function(e){var t=(e=e.replace(/\W/,"")).slice(0,2);if("32"!==t){if("00"!==e.slice(2,4)){var r=e.slice(4,6);switch(e[6]){case"0":r="18".concat(r);break;case"1":r="19".concat(r);break;default:r="20".concat(r)}var n="".concat(r,"/").concat(e.slice(2,4),"/").concat(t);if(!(0,i.default)(n,"YYYY/MM/DD"))return!1}for(var o=1101,s=[1,6,3,7,9,10,5,8,4,2],a=0;a32e3)return!1;if(r===parseInt(t.join("").slice(5,7),10))return!1}}return!0},"nl-NL":function(e){return s.reverseMultiplyAndSum(e.split("").slice(0,8).map((function(e){return parseInt(e,10)})),9)%11===parseInt(e[8],10)},"pl-PL":function(e){if(10===e.length){for(var t=[6,5,7,2,3,4,5,6,7],r=0,n=0;n80?(o="18".concat(o),s-=80):s>60?(o="22".concat(o),s-=60):s>40?(o="21".concat(o),s-=40):s>20?(o="20".concat(o),s-=20):o="19".concat(o),s<10&&(s="0".concat(s));var a="".concat(o,"/").concat(s,"/").concat(e.slice(4,6));if(!(0,i.default)(a,"YYYY/MM/DD"))return!1;for(var u=0,c=1,l=0;l10?c=1:5===c&&(c+=2);return(u=10-u%10)===parseInt(e[10],10)},"pt-BR":function(e){if(11===e.length){var t,r;if(t=0,"11111111111"===e||"22222222222"===e||"33333333333"===e||"44444444444"===e||"55555555555"===e||"66666666666"===e||"77777777777"===e||"88888888888"===e||"99999999999"===e||"00000000000"===e)return!1;for(var n=1;n<=9;n++)t+=parseInt(e.substring(n-1,n),10)*(11-n);if(10==(r=10*t%11)&&(r=0),r!==parseInt(e.substring(9,10),10))return!1;t=0;for(var o=1;o<=10;o++)t+=parseInt(e.substring(o-1,o),10)*(12-o);return 10==(r=10*t%11)&&(r=0),r===parseInt(e.substring(10,11),10)}if("00000000000000"===e||"11111111111111"===e||"22222222222222"===e||"33333333333333"===e||"44444444444444"===e||"55555555555555"===e||"66666666666666"===e||"77777777777777"===e||"88888888888888"===e||"99999999999999"===e)return!1;for(var s=e.length-2,i=e.substring(0,s),a=e.substring(s),u=0,c=s-7,l=s;l>=1;l--)u+=i.charAt(s-l)*c,(c-=1)<2&&(c=9);var d=u%11<2?0:11-u%11;if(d!==parseInt(a.charAt(0),10))return!1;s+=1,i=e.substring(0,s),u=0,c=s-7;for(var h=s;h>=1;h--)u+=i.charAt(s-h)*c,(c-=1)<2&&(c=9);return(d=u%11<2?0:11-u%11)===parseInt(a.charAt(1),10)},"pt-PT":function(e){var t=11-s.reverseMultiplyAndSum(e.split("").slice(0,8).map((function(e){return parseInt(e,10)})),9)%11;return t>9?0===parseInt(e[8],10):t===parseInt(e[8],10)},"ro-RO":function(e){if("9000"!==e.slice(0,4)){var t=e.slice(1,3);switch(e[0]){case"1":case"2":t="19".concat(t);break;case"3":case"4":t="18".concat(t);break;case"5":case"6":t="20".concat(t)}var r="".concat(t,"/").concat(e.slice(3,5),"/").concat(e.slice(5,7));if(8===r.length){if(!(0,i.default)(r,"YY/MM/DD"))return!1}else if(!(0,i.default)(r,"YYYY/MM/DD"))return!1;for(var n=e.split("").map((function(e){return parseInt(e,10)})),o=[2,7,9,1,4,6,3,5,8,2,7,9],s=0,a=0;a53)return!1;t=t<10?"190".concat(t):"19".concat(t);var r=parseInt(e.slice(2,4),10);r>50&&(r-=50),r<10&&(r="0".concat(r));var n="".concat(t,"/").concat(r,"/").concat(e.slice(4,6));if(!(0,i.default)(n,"YYYY/MM/DD"))return!1}return!0},"sl-SI":function(e){var t=11-s.reverseMultiplyAndSum(e.split("").slice(0,7).map((function(e){return parseInt(e,10)})),8)%11;return 10===t?0===parseInt(e[7],10):t===parseInt(e[7],10)},"sv-SE":function(e){var t=e.slice(0);e.length>11&&(t=t.slice(2));var r="",n=t.slice(2,4),o=parseInt(t.slice(4,6),10);if(e.length>11)r=e.slice(0,4);else if(r=e.slice(0,2),11===e.length&&o<60){var a=(new Date).getFullYear().toString(),u=parseInt(a.slice(0,2),10);if(a=parseInt(a,10),"-"===e[6])r=parseInt("".concat(u).concat(r),10)>a?"".concat(u-1).concat(r):"".concat(u).concat(r);else if(r="".concat(u-1).concat(r),a-parseInt(r,10)<100)return!1}o>60&&(o-=60),o<10&&(o="0".concat(o));var c="".concat(r,"/").concat(n,"/").concat(o);if(8===c.length){if(!(0,i.default)(c,"YY/MM/DD"))return!1}else if(!(0,i.default)(c,"YYYY/MM/DD"))return!1;return s.luhnCheck(e.replace(/\W/,""))}};p["lb-LU"]=p["fr-LU"],p["lt-LT"]=p["et-EE"],p["nl-BE"]=p["fr-BE"],p["fr-CA"]=p["en-CA"];var f=/[-\\\/!@#$%\^&\*\(\)\+\=\[\]]+/g,g={"de-AT":f,"de-DE":/[\/\\]/g,"fr-BE":f};g["nl-BE"]=g["fr-BE"],e.exports=t.default,e.exports.default=t.default},7761:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=Ze(r(3752)),s=Ze(r(1371)),i=Ze(r(855)),a=Ze(r(3214)),u=Ze(r(700)),c=Ze(r(9220)),l=Ze(r(2576)),d=Ze(r(9517)),h=Ze(r(7844)),p=Ze(r(3196)),f=Ze(r(5372)),g=Ze(r(7115)),y=Ze(r(7658)),b=Ze(r(9013)),m=Ze(r(8796)),T=Ze(r(1697)),v=Ze(r(7071)),w=Ke(r(6529)),A=Ke(r(8986)),P=Ze(r(1666)),W=Ze(r(3442)),B=Ze(r(3906)),C=Ze(r(7612)),E=Ze(r(5577)),M=Ze(r(8461)),I=Ze(r(4294)),F=Ze(r(9666)),O=Ze(r(9534)),S=Ze(r(1449)),_=Ze(r(2830)),R=Ze(r(9841)),x=Ze(r(3459)),N=Ze(r(6084)),k=Ke(r(995)),U=Ze(r(5926)),D=Ze(r(2002)),L=Ze(r(9546)),z=Ze(r(3735)),j=Ze(r(4641)),$=Ze(r(5467)),V=Ze(r(7086)),G=Ze(r(1954)),H=Ke(r(3641)),K=Ze(r(5259)),Z=Ze(r(9745)),q=Ze(r(3973)),J=Ze(r(9172)),Y=Ze(r(5751)),X=Ze(r(2056)),Q=Ze(r(9285)),ee=Ze(r(6255)),te=Ze(r(5186)),re=Ze(r(1252)),ne=Ze(r(1195)),oe=Ze(r(6658)),se=Ze(r(9266)),ie=Ze(r(3609)),ae=Ze(r(1062)),ue=Ze(r(2645)),ce=Ze(r(7717)),le=Ze(r(2678)),de=Ze(r(9717)),he=Ze(r(604)),pe=Ze(r(7741)),fe=Ke(r(5251)),ge=Ze(r(82)),ye=Ze(r(6782)),be=Ze(r(5748)),me=Ze(r(8033)),Te=Ze(r(6169)),ve=Ze(r(1578)),we=Ze(r(8447)),Ae=Ze(r(3832)),Pe=Ze(r(8342)),We=Ze(r(7673)),Be=Ze(r(6617)),Ce=Ze(r(8274)),Ee=Ze(r(3583)),Me=Ze(r(7349)),Ie=Ze(r(4633)),Fe=Ze(r(5830)),Oe=Ke(r(3939)),Se=Ze(r(2309)),_e=Ze(r(2483)),Re=Ze(r(317)),xe=Ze(r(9790)),Ne=Ze(r(7677)),ke=Ze(r(561)),Ue=Ze(r(1996)),De=Ze(r(410)),Le=Ze(r(629)),ze=Ze(r(1128)),je=Ze(r(9234)),$e=Ze(r(676)),Ve=Ze(r(7179)),Ge=Ze(r(5366));function He(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return He=function(){return e},e}function Ke(e){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var t=He();if(t&&t.has(e))return t.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){var i=o?Object.getOwnPropertyDescriptor(e,s):null;i&&(i.get||i.set)?Object.defineProperty(r,s,i):r[s]=e[s]}return r.default=e,t&&t.set(e,r),r}function Ze(e){return e&&e.__esModule?e:{default:e}}var qe={version:"13.9.0",toDate:o.default,toFloat:s.default,toInt:i.default,toBoolean:a.default,equals:u.default,contains:c.default,matches:l.default,isEmail:d.default,isURL:h.default,isMACAddress:p.default,isIP:f.default,isIPRange:g.default,isFQDN:y.default,isBoolean:T.default,isIBAN:H.default,isBIC:K.default,isAlpha:w.default,isAlphaLocales:w.locales,isAlphanumeric:A.default,isAlphanumericLocales:A.locales,isNumeric:P.default,isPassportNumber:W.default,isPort:B.default,isLowercase:C.default,isUppercase:E.default,isAscii:I.default,isFullWidth:F.default,isHalfWidth:O.default,isVariableWidth:S.default,isMultibyte:_.default,isSemVer:R.default,isSurrogatePair:x.default,isInt:N.default,isIMEI:M.default,isFloat:k.default,isFloatLocales:k.locales,isDecimal:U.default,isHexadecimal:D.default,isOctal:L.default,isDivisibleBy:z.default,isHexColor:j.default,isRgbColor:$.default,isHSL:V.default,isISRC:G.default,isMD5:Z.default,isHash:q.default,isJWT:J.default,isJSON:Y.default,isEmpty:X.default,isLength:Q.default,isLocale:v.default,isByteLength:ee.default,isUUID:te.default,isMongoId:re.default,isAfter:ne.default,isBefore:oe.default,isIn:se.default,isLuhnNumber:ie.default,isCreditCard:ae.default,isIdentityCard:ue.default,isEAN:ce.default,isISIN:le.default,isISBN:de.default,isISSN:he.default,isMobilePhone:fe.default,isMobilePhoneLocales:fe.locales,isPostalCode:Oe.default,isPostalCodeLocales:Oe.locales,isEthereumAddress:ge.default,isCurrency:ye.default,isBtcAddress:be.default,isISO6391:me.default,isISO8601:Te.default,isRFC3339:ve.default,isISO31661Alpha2:we.default,isISO31661Alpha3:Ae.default,isISO4217:Pe.default,isBase32:We.default,isBase58:Be.default,isBase64:Ce.default,isDataURI:Ee.default,isMagnetURI:Me.default,isMimeType:Ie.default,isLatLong:Fe.default,ltrim:Se.default,rtrim:_e.default,trim:Re.default,escape:xe.default,unescape:Ne.default,stripLow:ke.default,whitelist:Ue.default,blacklist:De.default,isWhitelisted:Le.default,normalizeEmail:ze.default,toString,isSlug:je.default,isStrongPassword:Ve.default,isTaxID:pe.default,isDate:b.default,isTime:m.default,isLicensePlate:$e.default,isVAT:Ge.default,ibanLocales:H.locales};t.default=qe,e.exports=t.default,e.exports.default=t.default},7790:()=>{},7844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((t=(0,i.default)(t,c)).validate_length&&e.length>=2083)return!1;if(!t.allow_fragments&&e.includes("#"))return!1;if(!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var r,a,h,p,f,g,y,b,m;if(y=e.split("#"),e=y.shift(),y=e.split("?"),e=y.shift(),(y=e.split("://")).length>1){if(r=y.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(r))return!1}else{if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!t.allow_protocol_relative_urls)return!1;y[0]=e.slice(2)}}if(""===(e=y.join("://")))return!1;if(y=e.split("/"),""===(e=y.shift())&&!t.require_host)return!0;if((y=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===y[0])return!1;if((a=y.shift()).indexOf(":")>=0&&a.split(":").length>2)return!1;var T=function(e){if(Array.isArray(e))return e}(m=a.split(":"))||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],r=!0,n=!1,o=void 0;try{for(var s,i=e[Symbol.iterator]();!(r=(s=i.next()).done)&&(t.push(s.value),2!==t.length);r=!0);}catch(e){n=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw o}}return t}}(m)||function(e){if(e){if("string"==typeof e)return u(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?u(e,2):void 0}}(m)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),v=T[0],w=T[1];if(""===v&&""===w)return!1}g=null,b=null;var A=(p=y.join("@")).match(l);if(A?(h="",b=A[1],g=A[2]||null):(h=(y=p.split(":")).shift(),y.length&&(g=y.join(":"))),null!==g&&g.length>0){if(f=parseInt(g,10),!/^[0-9]+$/.test(g)||f<=0||f>65535)return!1}else if(t.require_port)return!1;return t.host_whitelist?d(h,t.host_whitelist):""===h&&!t.require_host||!!((0,s.default)(h)||(0,o.default)(h,t)||b&&(0,s.default)(b,6))&&(h=h||b,!t.host_blacklist||!d(h,t.host_blacklist))};var n=a(r(3399)),o=a(r(7658)),s=a(r(5372)),i=a(r(3610));function a(e){return e&&e.__esModule?e:{default:e}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=new Set(["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"]);e.exports=t.default,e.exports.default=t.default},8274:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),t=(0,o.default)(t,u);var r=e.length;if(t.urlSafe)return a.test(e);if(r%4!=0||i.test(e))return!1;var s=e.indexOf("=");return-1===s||s===r-1||s===r-2&&"="===e[r-1]};var n=s(r(3399)),o=s(r(3610));function s(e){return e&&e.__esModule?e:{default:e}}var i=/[^A-Z0-9+\/=]/i,a=/^[A-Z0-9_\-]*$/i,u={urlSafe:!1};e.exports=t.default,e.exports.default=t.default},8342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())},t.CurrencyCodes=void 0;var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=new Set(["AED","AFN","ALL","AMD","ANG","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BIF","BMD","BND","BOB","BOV","BRL","BSD","BTN","BWP","BYN","BZD","CAD","CDF","CHE","CHF","CHW","CLF","CLP","CNY","COP","COU","CRC","CUC","CUP","CVE","CZK","DJF","DKK","DOP","DZD","EGP","ERN","ETB","EUR","FJD","FKP","GBP","GEL","GHS","GIP","GMD","GNF","GTQ","GYD","HKD","HNL","HRK","HTG","HUF","IDR","ILS","INR","IQD","IRR","ISK","JMD","JOD","JPY","KES","KGS","KHR","KMF","KPW","KRW","KWD","KYD","KZT","LAK","LBP","LKR","LRD","LSL","LYD","MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MXV","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN","PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STN","SVC","SYP","SZL","THB","TJS","TMT","TND","TOP","TRY","TTD","TWD","TZS","UAH","UGX","USD","USN","UYI","UYU","UYW","UZS","VES","VND","VUV","WST","XAF","XAG","XAU","XBA","XBB","XBC","XBD","XCD","XDR","XOF","XPD","XPF","XPT","XSU","XTS","XUA","XXX","YER","ZAR","ZMW","ZWL"]),i=s;t.CurrencyCodes=i},8447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.has(e.toUpperCase())},t.CountryCodes=void 0;var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=new Set(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]),i=s;t.CountryCodes=i},8461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,o.default)(e);var r=s;if((t=t||{}).allow_hyphens&&(r=i),!r.test(e))return!1;e=e.replace(/-/g,"");for(var n=0,a=2,u=0;u<14;u++){var c=e.substring(14-u-1,14-u),l=parseInt(c,10)*a;n+=l>=10?l%10+1:l,1===a?a+=1:a-=1}return(10-n%10)%10===parseInt(e.substring(14,15),10)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^[0-9]{15}$/,i=/^\d{2}-\d{6}-\d{6}-\d{1}$/;e.exports=t.default,e.exports.default=t.default},8510:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const o=r(1696),s=r(1130),i=r(4967),a=r(1705),u=r(1484),c=r(1761),l=r(3562),d=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),h=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),p=BigInt(1),f=BigInt(2),g=(e,t)=>(e+t/f)/t;function y(e){const t=d,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),a=BigInt(23),u=BigInt(44),c=BigInt(88),l=e*e*e%t,h=l*l*e%t,p=(0,i.pow2)(h,r,t)*h%t,g=(0,i.pow2)(p,r,t)*h%t,y=(0,i.pow2)(g,f,t)*l%t,m=(0,i.pow2)(y,o,t)*y%t,T=(0,i.pow2)(m,s,t)*m%t,v=(0,i.pow2)(T,u,t)*T%t,w=(0,i.pow2)(v,c,t)*v%t,A=(0,i.pow2)(w,u,t)*T%t,P=(0,i.pow2)(A,r,t)*h%t,W=(0,i.pow2)(P,a,t)*m%t,B=(0,i.pow2)(W,n,t)*l%t,C=(0,i.pow2)(B,f,t);if(!b.eql(b.sqr(C),e))throw new Error("Cannot find square root");return C}const b=(0,i.Field)(d,void 0,void 0,{sqrt:y});t.secp256k1=(0,l.createCurve)({a:BigInt(0),b:BigInt(7),Fp:b,n:h,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=h,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-p*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),u=g(s*e,t),c=g(-n*e,t);let l=(0,i.mod)(e-u*r-c*o,t),d=(0,i.mod)(-u*n-c*s,t);const f=l>a,y=d>a;if(f&&(l=t-l),y&&(d=t-d),l>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:f,k1:l,k2neg:y,k2:d}}}},o.sha256);const m=BigInt(0),T=e=>"bigint"==typeof e&&me.charCodeAt(0))));r=(0,u.concatBytes)(t,t),v[e]=r}return(0,o.sha256)((0,u.concatBytes)(r,...t))}const A=e=>e.toRawBytes(!0).slice(1),P=e=>(0,u.numberToBytesBE)(e,32),W=e=>(0,i.mod)(e,d),B=e=>(0,i.mod)(e,h),C=t.secp256k1.ProjectivePoint;function E(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=C.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:B(-r),bytes:A(n)}}function M(e){if(!T(e))throw new Error("bad x: need 0 < x < p");const t=W(e*e);let r=y(W(t*e+BigInt(7)));r%f!==m&&(r=W(-r));const n=new C(e,r,p);return n.assertValidity(),n}function I(...e){return B((0,u.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function F(e,t,r){const n=(0,u.ensureBytes)("signature",e,64),o=(0,u.ensureBytes)("message",t),s=(0,u.ensureBytes)("publicKey",r,32);try{const e=M((0,u.bytesToNumberBE)(s)),t=(0,u.bytesToNumberBE)(n.subarray(0,32));if(!T(t))return!1;const r=(0,u.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&me.map((e=>BigInt(e)))))),S=(0,a.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))});n=c.createHasher(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=S(b.create(e[0]));return O(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:o.sha256}),t.hashToCurve=n.hashToCurve,t.encodeToCurve=n.encodeToCurve},8521:(e,t,r)=>{var n=r(4172),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("TronWebProto.BuyStorageBytesContract",null,s),o.exportSymbol("TronWebProto.BuyStorageContract",null,s),o.exportSymbol("TronWebProto.SellStorageContract",null,s),o.exportSymbol("TronWebProto.UpdateBrokerageContract",null,s),TronWebProto.BuyStorageBytesContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BuyStorageBytesContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BuyStorageBytesContract.displayName="TronWebProto.BuyStorageBytesContract"),TronWebProto.BuyStorageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.BuyStorageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.BuyStorageContract.displayName="TronWebProto.BuyStorageContract"),TronWebProto.SellStorageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.SellStorageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.SellStorageContract.displayName="TronWebProto.SellStorageContract"),TronWebProto.UpdateBrokerageContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateBrokerageContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateBrokerageContract.displayName="TronWebProto.UpdateBrokerageContract"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BuyStorageBytesContract.prototype.toObject=function(e){return TronWebProto.BuyStorageBytesContract.toObject(e,this)},TronWebProto.BuyStorageBytesContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),bytes:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BuyStorageBytesContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BuyStorageBytesContract;return TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader(r,t)},TronWebProto.BuyStorageBytesContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setBytes(r);break;default:t.skipField()}return e},TronWebProto.BuyStorageBytesContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BuyStorageBytesContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getBytes())&&t.writeInt64(2,r)},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.BuyStorageBytesContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.BuyStorageBytesContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BuyStorageBytesContract.prototype.getBytes=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BuyStorageBytesContract.prototype.setBytes=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.BuyStorageContract.prototype.toObject=function(e){return TronWebProto.BuyStorageContract.toObject(e,this)},TronWebProto.BuyStorageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),quant:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.BuyStorageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.BuyStorageContract;return TronWebProto.BuyStorageContract.deserializeBinaryFromReader(r,t)},TronWebProto.BuyStorageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setQuant(r);break;default:t.skipField()}return e},TronWebProto.BuyStorageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.BuyStorageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.BuyStorageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getQuant())&&t.writeInt64(2,r)},TronWebProto.BuyStorageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.BuyStorageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.BuyStorageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.BuyStorageContract.prototype.getQuant=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.BuyStorageContract.prototype.setQuant=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.SellStorageContract.prototype.toObject=function(e){return TronWebProto.SellStorageContract.toObject(e,this)},TronWebProto.SellStorageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),storageBytes:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.SellStorageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.SellStorageContract;return TronWebProto.SellStorageContract.deserializeBinaryFromReader(r,t)},TronWebProto.SellStorageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt64(),e.setStorageBytes(r);break;default:t.skipField()}return e},TronWebProto.SellStorageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.SellStorageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.SellStorageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getStorageBytes())&&t.writeInt64(2,r)},TronWebProto.SellStorageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.SellStorageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.SellStorageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.SellStorageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.SellStorageContract.prototype.getStorageBytes=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.SellStorageContract.prototype.setStorageBytes=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateBrokerageContract.prototype.toObject=function(e){return TronWebProto.UpdateBrokerageContract.toObject(e,this)},TronWebProto.UpdateBrokerageContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),brokerage:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateBrokerageContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateBrokerageContract;return TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateBrokerageContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readInt32(),e.setBrokerage(r);break;default:t.skipField()}return e},TronWebProto.UpdateBrokerageContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateBrokerageContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getBrokerage())&&t.writeInt32(2,r)},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateBrokerageContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateBrokerageContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateBrokerageContract.prototype.getBrokerage=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.UpdateBrokerageContract.prototype.setBrokerage=function(e){return n.Message.setProto3IntField(this,2,e)},o.object.extend(t,TronWebProto)},8796:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return t=(0,o.default)(t,s),"string"==typeof e&&i[t.hourFormat][t.mode].test(e)};var n,o=(n=r(3610))&&n.__esModule?n:{default:n},s={hourFormat:"hour24",mode:"default"},i={hour24:{default:/^([01]?[0-9]|2[0-3]):([0-5][0-9])$/,withSeconds:/^([01]?[0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$/},hour12:{default:/^(0?[1-9]|1[0-2]):([0-5][0-9]) (A|P)M$/,withSeconds:/^(0?[1-9]|1[0-2]):([0-5][0-9]):([0-5][0-9]) (A|P)M$/}};e.exports=t.default,e.exports.default=t.default},8986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,o.default)(e);var n=e,i=r.ignore;if(i)if(i instanceof RegExp)n=n.replace(i,"");else{if("string"!=typeof i)throw new Error("ignore should be instance of a String or RegExp");n=n.replace(new RegExp("[".concat(i.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g,"\\$&"),"]"),"g"),"")}if(t in s.alphanumeric)return s.alphanumeric[t].test(n);throw new Error("Invalid locale '".concat(t,"'"))},t.locales=void 0;var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=r(3237),i=Object.keys(s.alphanumeric);t.locales=i},9013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(t="string"==typeof t?(0,o.default)({format:t},a):(0,o.default)(t,a),"string"==typeof e&&(g=t.format,/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(g))){var r,n=t.delimiters.find((function(e){return-1!==t.format.indexOf(e)})),i=t.strictMode?n:t.delimiters.find((function(t){return-1!==e.indexOf(t)})),u=function(e,t){for(var r=[],n=Math.min(e.length,t.length),o=0;o=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){t=e[Symbol.iterator]()},n:function(){var e=t.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==t.return||t.return()}finally{if(a)throw o}}}}(u);try{for(l.s();!(r=l.n()).done;){var d=(f=r.value,function(e){if(Array.isArray(e))return e}(f)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],r=!0,n=!1,o=void 0;try{for(var s,i=e[Symbol.iterator]();!(r=(s=i.next()).done)&&(t.push(s.value),2!==t.length);r=!0);}catch(e){n=!0,o=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw o}}return t}}(f)||s(f,2)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),h=d[0],p=d[1];if(h.length!==p.length)return!1;c[p.charAt(0)]=h}}catch(e){l.e(e)}finally{l.f()}return new Date("".concat(c.m,"/").concat(c.d,"/").concat(c.y)).getDate()===+c.d}var f,g;return!t.strictMode&&("[object Date]"===Object.prototype.toString.call(e)&&isFinite(e))};var n,o=(n=r(3610))&&n.__esModule?n:{default:n};function s(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{e.exports=function(e){return(t,...r)=>function(e,...t){return new Promise(((r,n)=>{e(...t,((e,t)=>{e?n(e):r(t)}))}))}(t.bind(e),...r)}},9037:(e,t,r)=>{var n=r(4172),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")(),i=r(2232);o.object.extend(proto,i),o.exportSymbol("TronWebProto.Account",null,s),o.exportSymbol("TronWebProto.Account.AccountResource",null,s),o.exportSymbol("TronWebProto.Account.Frozen",null,s),o.exportSymbol("TronWebProto.AccountId",null,s),o.exportSymbol("TronWebProto.AccountType",null,s),o.exportSymbol("TronWebProto.DelegatedResource",null,s),o.exportSymbol("TronWebProto.Exchange",null,s),o.exportSymbol("TronWebProto.Key",null,s),o.exportSymbol("TronWebProto.MarketOrderDetail",null,s),o.exportSymbol("TronWebProto.Permission",null,s),o.exportSymbol("TronWebProto.Permission.PermissionType",null,s),o.exportSymbol("TronWebProto.Proposal",null,s),o.exportSymbol("TronWebProto.Proposal.State",null,s),o.exportSymbol("TronWebProto.Transaction",null,s),o.exportSymbol("TronWebProto.Transaction.Contract",null,s),o.exportSymbol("TronWebProto.Transaction.Contract.ContractType",null,s),o.exportSymbol("TronWebProto.Transaction.Result",null,s),o.exportSymbol("TronWebProto.Transaction.Result.code",null,s),o.exportSymbol("TronWebProto.Transaction.Result.contractResult",null,s),o.exportSymbol("TronWebProto.Transaction.raw",null,s),o.exportSymbol("TronWebProto.Vote",null,s),o.exportSymbol("TronWebProto.Votes",null,s),o.exportSymbol("TronWebProto.Witness",null,s),o.exportSymbol("TronWebProto.authority",null,s),TronWebProto.AccountId=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AccountId,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AccountId.displayName="TronWebProto.AccountId"),TronWebProto.Vote=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Vote,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Vote.displayName="TronWebProto.Vote"),TronWebProto.Proposal=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Proposal.repeatedFields_,null)},o.inherits(TronWebProto.Proposal,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Proposal.displayName="TronWebProto.Proposal"),TronWebProto.Exchange=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Exchange,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Exchange.displayName="TronWebProto.Exchange"),TronWebProto.Account=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Account.repeatedFields_,null)},o.inherits(TronWebProto.Account,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.displayName="TronWebProto.Account"),TronWebProto.Account.Frozen=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Account.Frozen,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.Frozen.displayName="TronWebProto.Account.Frozen"),TronWebProto.Account.AccountResource=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Account.AccountResource,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Account.AccountResource.displayName="TronWebProto.Account.AccountResource"),TronWebProto.Key=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Key,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Key.displayName="TronWebProto.Key"),TronWebProto.DelegatedResource=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.DelegatedResource,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.DelegatedResource.displayName="TronWebProto.DelegatedResource"),TronWebProto.authority=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.authority,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.authority.displayName="TronWebProto.authority"),TronWebProto.Permission=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Permission.repeatedFields_,null)},o.inherits(TronWebProto.Permission,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Permission.displayName="TronWebProto.Permission"),TronWebProto.Witness=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Witness,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Witness.displayName="TronWebProto.Witness"),TronWebProto.Votes=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Votes.repeatedFields_,null)},o.inherits(TronWebProto.Votes,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Votes.displayName="TronWebProto.Votes"),TronWebProto.MarketOrderDetail=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.MarketOrderDetail,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.MarketOrderDetail.displayName="TronWebProto.MarketOrderDetail"),TronWebProto.Transaction=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.repeatedFields_,null)},o.inherits(TronWebProto.Transaction,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.displayName="TronWebProto.Transaction"),TronWebProto.Transaction.Contract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.Transaction.Contract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.Contract.displayName="TronWebProto.Transaction.Contract"),TronWebProto.Transaction.Result=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.Result.repeatedFields_,null)},o.inherits(TronWebProto.Transaction.Result,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.Result.displayName="TronWebProto.Transaction.Result"),TronWebProto.Transaction.raw=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.Transaction.raw.repeatedFields_,null)},o.inherits(TronWebProto.Transaction.raw,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.Transaction.raw.displayName="TronWebProto.Transaction.raw"),n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AccountId.prototype.toObject=function(e){return TronWebProto.AccountId.toObject(e,this)},TronWebProto.AccountId.toObject=function(e,t){var r={name:t.getName_asB64(),address:t.getAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AccountId.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AccountId;return TronWebProto.AccountId.deserializeBinaryFromReader(r,t)},TronWebProto.AccountId.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setName(r);break;case 2:r=t.readBytes(),e.setAddress(r);break;default:t.skipField()}return e},TronWebProto.AccountId.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AccountId.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AccountId.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.AccountId.prototype.getName=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AccountId.prototype.getName_asB64=function(){return n.Message.bytesAsB64(this.getName())},TronWebProto.AccountId.prototype.getName_asU8=function(){return n.Message.bytesAsU8(this.getName())},TronWebProto.AccountId.prototype.setName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AccountId.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.AccountId.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.AccountId.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.AccountId.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Vote.prototype.toObject=function(e){return TronWebProto.Vote.toObject(e,this)},TronWebProto.Vote.toObject=function(e,t){var r={voteAddress:t.getVoteAddress_asB64(),voteCount:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Vote.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Vote;return TronWebProto.Vote.deserializeBinaryFromReader(r,t)},TronWebProto.Vote.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setVoteAddress(r);break;case 2:r=t.readInt64(),e.setVoteCount(r);break;default:t.skipField()}return e},TronWebProto.Vote.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Vote.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Vote.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getVoteAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVoteCount())&&t.writeInt64(2,r)},TronWebProto.Vote.prototype.getVoteAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Vote.prototype.getVoteAddress_asB64=function(){return n.Message.bytesAsB64(this.getVoteAddress())},TronWebProto.Vote.prototype.getVoteAddress_asU8=function(){return n.Message.bytesAsU8(this.getVoteAddress())},TronWebProto.Vote.prototype.setVoteAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Vote.prototype.getVoteCount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Vote.prototype.setVoteCount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Proposal.repeatedFields_=[6],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Proposal.prototype.toObject=function(e){return TronWebProto.Proposal.toObject(e,this)},TronWebProto.Proposal.toObject=function(e,t){var r,o={proposalId:n.Message.getFieldWithDefault(t,1,0),proposerAddress:t.getProposerAddress_asB64(),parametersMap:(r=t.getParametersMap())?r.toObject(e,void 0):[],expirationTime:n.Message.getFieldWithDefault(t,4,0),createTime:n.Message.getFieldWithDefault(t,5,0),approvalsList:t.getApprovalsList_asB64(),state:n.Message.getFieldWithDefault(t,7,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Proposal.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Proposal;return TronWebProto.Proposal.deserializeBinaryFromReader(r,t)},TronWebProto.Proposal.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setProposalId(r);break;case 2:r=t.readBytes(),e.setProposerAddress(r);break;case 3:r=e.getParametersMap(),t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readInt64,n.BinaryReader.prototype.readInt64,null,0,0)}));break;case 4:r=t.readInt64(),e.setExpirationTime(r);break;case 5:r=t.readInt64(),e.setCreateTime(r);break;case 6:r=t.readBytes(),e.addApprovals(r);break;case 7:r=t.readEnum(),e.setState(r);break;default:t.skipField()}return e},TronWebProto.Proposal.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Proposal.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Proposal.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getProposalId())&&t.writeInt64(1,r),(r=e.getProposerAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getParametersMap(!0))&&r.getLength()>0&&r.serializeBinary(3,t,n.BinaryWriter.prototype.writeInt64,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getExpirationTime())&&t.writeInt64(4,r),0!==(r=e.getCreateTime())&&t.writeInt64(5,r),(r=e.getApprovalsList_asU8()).length>0&&t.writeRepeatedBytes(6,r),0!==(r=e.getState())&&t.writeEnum(7,r)},TronWebProto.Proposal.State={PENDING:0,DISAPPROVED:1,APPROVED:2,CANCELED:3},TronWebProto.Proposal.prototype.getProposalId=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Proposal.prototype.setProposalId=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Proposal.prototype.getProposerAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.Proposal.prototype.getProposerAddress_asB64=function(){return n.Message.bytesAsB64(this.getProposerAddress())},TronWebProto.Proposal.prototype.getProposerAddress_asU8=function(){return n.Message.bytesAsU8(this.getProposerAddress())},TronWebProto.Proposal.prototype.setProposerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Proposal.prototype.getParametersMap=function(e){return n.Message.getMapField(this,3,e,null)},TronWebProto.Proposal.prototype.clearParametersMap=function(){return this.getParametersMap().clear(),this},TronWebProto.Proposal.prototype.getExpirationTime=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Proposal.prototype.setExpirationTime=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Proposal.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Proposal.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Proposal.prototype.getApprovalsList=function(){return n.Message.getRepeatedField(this,6)},TronWebProto.Proposal.prototype.getApprovalsList_asB64=function(){return n.Message.bytesListAsB64(this.getApprovalsList())},TronWebProto.Proposal.prototype.getApprovalsList_asU8=function(){return n.Message.bytesListAsU8(this.getApprovalsList())},TronWebProto.Proposal.prototype.setApprovalsList=function(e){return n.Message.setField(this,6,e||[])},TronWebProto.Proposal.prototype.addApprovals=function(e,t){return n.Message.addToRepeatedField(this,6,e,t)},TronWebProto.Proposal.prototype.clearApprovalsList=function(){return this.setApprovalsList([])},TronWebProto.Proposal.prototype.getState=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Proposal.prototype.setState=function(e){return n.Message.setProto3EnumField(this,7,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Exchange.prototype.toObject=function(e){return TronWebProto.Exchange.toObject(e,this)},TronWebProto.Exchange.toObject=function(e,t){var r={exchangeId:n.Message.getFieldWithDefault(t,1,0),creatorAddress:t.getCreatorAddress_asB64(),createTime:n.Message.getFieldWithDefault(t,3,0),firstTokenId:t.getFirstTokenId_asB64(),firstTokenBalance:n.Message.getFieldWithDefault(t,7,0),secondTokenId:t.getSecondTokenId_asB64(),secondTokenBalance:n.Message.getFieldWithDefault(t,9,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Exchange.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Exchange;return TronWebProto.Exchange.deserializeBinaryFromReader(r,t)},TronWebProto.Exchange.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setExchangeId(r);break;case 2:r=t.readBytes(),e.setCreatorAddress(r);break;case 3:r=t.readInt64(),e.setCreateTime(r);break;case 6:r=t.readBytes(),e.setFirstTokenId(r);break;case 7:r=t.readInt64(),e.setFirstTokenBalance(r);break;case 8:r=t.readBytes(),e.setSecondTokenId(r);break;case 9:r=t.readInt64(),e.setSecondTokenBalance(r);break;default:t.skipField()}return e},TronWebProto.Exchange.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Exchange.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Exchange.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getExchangeId())&&t.writeInt64(1,r),(r=e.getCreatorAddress_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getCreateTime())&&t.writeInt64(3,r),(r=e.getFirstTokenId_asU8()).length>0&&t.writeBytes(6,r),0!==(r=e.getFirstTokenBalance())&&t.writeInt64(7,r),(r=e.getSecondTokenId_asU8()).length>0&&t.writeBytes(8,r),0!==(r=e.getSecondTokenBalance())&&t.writeInt64(9,r)},TronWebProto.Exchange.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Exchange.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Exchange.prototype.getCreatorAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.Exchange.prototype.getCreatorAddress_asB64=function(){return n.Message.bytesAsB64(this.getCreatorAddress())},TronWebProto.Exchange.prototype.getCreatorAddress_asU8=function(){return n.Message.bytesAsU8(this.getCreatorAddress())},TronWebProto.Exchange.prototype.setCreatorAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Exchange.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Exchange.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Exchange.prototype.getFirstTokenId=function(){return n.Message.getFieldWithDefault(this,6,"")},TronWebProto.Exchange.prototype.getFirstTokenId_asB64=function(){return n.Message.bytesAsB64(this.getFirstTokenId())},TronWebProto.Exchange.prototype.getFirstTokenId_asU8=function(){return n.Message.bytesAsU8(this.getFirstTokenId())},TronWebProto.Exchange.prototype.setFirstTokenId=function(e){return n.Message.setProto3BytesField(this,6,e)},TronWebProto.Exchange.prototype.getFirstTokenBalance=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Exchange.prototype.setFirstTokenBalance=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Exchange.prototype.getSecondTokenId=function(){return n.Message.getFieldWithDefault(this,8,"")},TronWebProto.Exchange.prototype.getSecondTokenId_asB64=function(){return n.Message.bytesAsB64(this.getSecondTokenId())},TronWebProto.Exchange.prototype.getSecondTokenId_asU8=function(){return n.Message.bytesAsU8(this.getSecondTokenId())},TronWebProto.Exchange.prototype.setSecondTokenId=function(e){return n.Message.setProto3BytesField(this,8,e)},TronWebProto.Exchange.prototype.getSecondTokenBalance=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.Exchange.prototype.setSecondTokenBalance=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.Account.repeatedFields_=[5,7,16,33],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.prototype.toObject=function(e){return TronWebProto.Account.toObject(e,this)},TronWebProto.Account.toObject=function(e,t){var r,o={accountName:t.getAccountName_asB64(),type:n.Message.getFieldWithDefault(t,2,0),address:t.getAddress_asB64(),balance:n.Message.getFieldWithDefault(t,4,0),votesList:n.Message.toObjectList(t.getVotesList(),TronWebProto.Vote.toObject,e),assetMap:(r=t.getAssetMap())?r.toObject(e,void 0):[],assetv2Map:(r=t.getAssetv2Map())?r.toObject(e,void 0):[],frozenList:n.Message.toObjectList(t.getFrozenList(),TronWebProto.Account.Frozen.toObject,e),netUsage:n.Message.getFieldWithDefault(t,8,0),acquiredDelegatedFrozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,41,0),delegatedFrozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,42,0),oldTronPower:n.Message.getFieldWithDefault(t,46,0),tronPower:(r=t.getTronPower())&&TronWebProto.Account.Frozen.toObject(e,r),assetOptimized:n.Message.getBooleanFieldWithDefault(t,60,!1),createTime:n.Message.getFieldWithDefault(t,9,0),latestOprationTime:n.Message.getFieldWithDefault(t,10,0),allowance:n.Message.getFieldWithDefault(t,11,0),latestWithdrawTime:n.Message.getFieldWithDefault(t,12,0),code:t.getCode_asB64(),isWitness:n.Message.getBooleanFieldWithDefault(t,14,!1),isCommittee:n.Message.getBooleanFieldWithDefault(t,15,!1),frozenSupplyList:n.Message.toObjectList(t.getFrozenSupplyList(),TronWebProto.Account.Frozen.toObject,e),assetIssuedName:t.getAssetIssuedName_asB64(),assetIssuedId:t.getAssetIssuedId_asB64(),latestAssetOperationTimeMap:(r=t.getLatestAssetOperationTimeMap())?r.toObject(e,void 0):[],latestAssetOperationTimev2Map:(r=t.getLatestAssetOperationTimev2Map())?r.toObject(e,void 0):[],freeNetUsage:n.Message.getFieldWithDefault(t,19,0),freeAssetNetUsageMap:(r=t.getFreeAssetNetUsageMap())?r.toObject(e,void 0):[],freeAssetNetUsagev2Map:(r=t.getFreeAssetNetUsagev2Map())?r.toObject(e,void 0):[],latestConsumeTime:n.Message.getFieldWithDefault(t,21,0),latestConsumeFreeTime:n.Message.getFieldWithDefault(t,22,0),accountId:t.getAccountId_asB64(),accountResource:(r=t.getAccountResource())&&TronWebProto.Account.AccountResource.toObject(e,r),codehash:t.getCodehash_asB64(),ownerPermission:(r=t.getOwnerPermission())&&TronWebProto.Permission.toObject(e,r),witnessPermission:(r=t.getWitnessPermission())&&TronWebProto.Permission.toObject(e,r),activePermissionList:n.Message.toObjectList(t.getActivePermissionList(),TronWebProto.Permission.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Account.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account;return TronWebProto.Account.deserializeBinaryFromReader(r,t)},TronWebProto.Account.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAccountName(r);break;case 2:r=t.readEnum(),e.setType(r);break;case 3:r=t.readBytes(),e.setAddress(r);break;case 4:r=t.readInt64(),e.setBalance(r);break;case 5:r=new TronWebProto.Vote,t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addVotes(r);break;case 6:r=e.getAssetMap(),t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 56:r=e.getAssetv2Map(),t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 7:r=new TronWebProto.Account.Frozen,t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.addFrozen(r);break;case 8:r=t.readInt64(),e.setNetUsage(r);break;case 41:r=t.readInt64(),e.setAcquiredDelegatedFrozenBalanceForBandwidth(r);break;case 42:r=t.readInt64(),e.setDelegatedFrozenBalanceForBandwidth(r);break;case 46:r=t.readInt64(),e.setOldTronPower(r);break;case 47:r=new TronWebProto.Account.Frozen,t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.setTronPower(r);break;case 60:r=t.readBool(),e.setAssetOptimized(r);break;case 9:r=t.readInt64(),e.setCreateTime(r);break;case 10:r=t.readInt64(),e.setLatestOprationTime(r);break;case 11:r=t.readInt64(),e.setAllowance(r);break;case 12:r=t.readInt64(),e.setLatestWithdrawTime(r);break;case 13:r=t.readBytes(),e.setCode(r);break;case 14:r=t.readBool(),e.setIsWitness(r);break;case 15:r=t.readBool(),e.setIsCommittee(r);break;case 16:r=new TronWebProto.Account.Frozen,t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.addFrozenSupply(r);break;case 17:r=t.readBytes(),e.setAssetIssuedName(r);break;case 57:r=t.readBytes(),e.setAssetIssuedId(r);break;case 18:r=e.getLatestAssetOperationTimeMap(),t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 58:r=e.getLatestAssetOperationTimev2Map(),t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 19:r=t.readInt64(),e.setFreeNetUsage(r);break;case 20:r=e.getFreeAssetNetUsageMap(),t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 59:r=e.getFreeAssetNetUsagev2Map(),t.readMessage(r,(function(e,t){n.Map.deserializeBinary(e,t,n.BinaryReader.prototype.readString,n.BinaryReader.prototype.readInt64,null,"",0)}));break;case 21:r=t.readInt64(),e.setLatestConsumeTime(r);break;case 22:r=t.readInt64(),e.setLatestConsumeFreeTime(r);break;case 23:r=t.readBytes(),e.setAccountId(r);break;case 26:r=new TronWebProto.Account.AccountResource,t.readMessage(r,TronWebProto.Account.AccountResource.deserializeBinaryFromReader),e.setAccountResource(r);break;case 30:r=t.readBytes(),e.setCodehash(r);break;case 31:r=new TronWebProto.Permission,t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.setOwnerPermission(r);break;case 32:r=new TronWebProto.Permission,t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.setWitnessPermission(r);break;case 33:r=new TronWebProto.Permission,t.readMessage(r,TronWebProto.Permission.deserializeBinaryFromReader),e.addActivePermission(r);break;default:t.skipField()}return e},TronWebProto.Account.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAccountName_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getType())&&t.writeEnum(2,r),(r=e.getAddress_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getBalance())&&t.writeInt64(4,r),(r=e.getVotesList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.Vote.serializeBinaryToWriter),(r=e.getAssetMap(!0))&&r.getLength()>0&&r.serializeBinary(6,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getAssetv2Map(!0))&&r.getLength()>0&&r.serializeBinary(56,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getFrozenList()).length>0&&t.writeRepeatedMessage(7,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),0!==(r=e.getNetUsage())&&t.writeInt64(8,r),0!==(r=e.getAcquiredDelegatedFrozenBalanceForBandwidth())&&t.writeInt64(41,r),0!==(r=e.getDelegatedFrozenBalanceForBandwidth())&&t.writeInt64(42,r),0!==(r=e.getOldTronPower())&&t.writeInt64(46,r),null!=(r=e.getTronPower())&&t.writeMessage(47,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),(r=e.getAssetOptimized())&&t.writeBool(60,r),0!==(r=e.getCreateTime())&&t.writeInt64(9,r),0!==(r=e.getLatestOprationTime())&&t.writeInt64(10,r),0!==(r=e.getAllowance())&&t.writeInt64(11,r),0!==(r=e.getLatestWithdrawTime())&&t.writeInt64(12,r),(r=e.getCode_asU8()).length>0&&t.writeBytes(13,r),(r=e.getIsWitness())&&t.writeBool(14,r),(r=e.getIsCommittee())&&t.writeBool(15,r),(r=e.getFrozenSupplyList()).length>0&&t.writeRepeatedMessage(16,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),(r=e.getAssetIssuedName_asU8()).length>0&&t.writeBytes(17,r),(r=e.getAssetIssuedId_asU8()).length>0&&t.writeBytes(57,r),(r=e.getLatestAssetOperationTimeMap(!0))&&r.getLength()>0&&r.serializeBinary(18,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getLatestAssetOperationTimev2Map(!0))&&r.getLength()>0&&r.serializeBinary(58,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getFreeNetUsage())&&t.writeInt64(19,r),(r=e.getFreeAssetNetUsageMap(!0))&&r.getLength()>0&&r.serializeBinary(20,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),(r=e.getFreeAssetNetUsagev2Map(!0))&&r.getLength()>0&&r.serializeBinary(59,t,n.BinaryWriter.prototype.writeString,n.BinaryWriter.prototype.writeInt64),0!==(r=e.getLatestConsumeTime())&&t.writeInt64(21,r),0!==(r=e.getLatestConsumeFreeTime())&&t.writeInt64(22,r),(r=e.getAccountId_asU8()).length>0&&t.writeBytes(23,r),null!=(r=e.getAccountResource())&&t.writeMessage(26,r,TronWebProto.Account.AccountResource.serializeBinaryToWriter),(r=e.getCodehash_asU8()).length>0&&t.writeBytes(30,r),null!=(r=e.getOwnerPermission())&&t.writeMessage(31,r,TronWebProto.Permission.serializeBinaryToWriter),null!=(r=e.getWitnessPermission())&&t.writeMessage(32,r,TronWebProto.Permission.serializeBinaryToWriter),(r=e.getActivePermissionList()).length>0&&t.writeRepeatedMessage(33,r,TronWebProto.Permission.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.Frozen.prototype.toObject=function(e){return TronWebProto.Account.Frozen.toObject(e,this)},TronWebProto.Account.Frozen.toObject=function(e,t){var r={frozenBalance:n.Message.getFieldWithDefault(t,1,0),expireTime:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Account.Frozen.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account.Frozen;return TronWebProto.Account.Frozen.deserializeBinaryFromReader(r,t)},TronWebProto.Account.Frozen.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFrozenBalance(r);break;case 2:r=t.readInt64(),e.setExpireTime(r);break;default:t.skipField()}return e},TronWebProto.Account.Frozen.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.Frozen.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.Frozen.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFrozenBalance())&&t.writeInt64(1,r),0!==(r=e.getExpireTime())&&t.writeInt64(2,r)},TronWebProto.Account.Frozen.prototype.getFrozenBalance=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Account.Frozen.prototype.setFrozenBalance=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Account.Frozen.prototype.getExpireTime=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Account.Frozen.prototype.setExpireTime=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Account.AccountResource.prototype.toObject=function(e){return TronWebProto.Account.AccountResource.toObject(e,this)},TronWebProto.Account.AccountResource.toObject=function(e,t){var r,o={energyUsage:n.Message.getFieldWithDefault(t,1,0),frozenBalanceForEnergy:(r=t.getFrozenBalanceForEnergy())&&TronWebProto.Account.Frozen.toObject(e,r),latestConsumeTimeForEnergy:n.Message.getFieldWithDefault(t,3,0),acquiredDelegatedFrozenBalanceForEnergy:n.Message.getFieldWithDefault(t,4,0),delegatedFrozenBalanceForEnergy:n.Message.getFieldWithDefault(t,5,0),storageLimit:n.Message.getFieldWithDefault(t,6,0),storageUsage:n.Message.getFieldWithDefault(t,7,0),latestExchangeStorageTime:n.Message.getFieldWithDefault(t,8,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Account.AccountResource.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Account.AccountResource;return TronWebProto.Account.AccountResource.deserializeBinaryFromReader(r,t)},TronWebProto.Account.AccountResource.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setEnergyUsage(r);break;case 2:r=new TronWebProto.Account.Frozen,t.readMessage(r,TronWebProto.Account.Frozen.deserializeBinaryFromReader),e.setFrozenBalanceForEnergy(r);break;case 3:r=t.readInt64(),e.setLatestConsumeTimeForEnergy(r);break;case 4:r=t.readInt64(),e.setAcquiredDelegatedFrozenBalanceForEnergy(r);break;case 5:r=t.readInt64(),e.setDelegatedFrozenBalanceForEnergy(r);break;case 6:r=t.readInt64(),e.setStorageLimit(r);break;case 7:r=t.readInt64(),e.setStorageUsage(r);break;case 8:r=t.readInt64(),e.setLatestExchangeStorageTime(r);break;default:t.skipField()}return e},TronWebProto.Account.AccountResource.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Account.AccountResource.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Account.AccountResource.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getEnergyUsage())&&t.writeInt64(1,r),null!=(r=e.getFrozenBalanceForEnergy())&&t.writeMessage(2,r,TronWebProto.Account.Frozen.serializeBinaryToWriter),0!==(r=e.getLatestConsumeTimeForEnergy())&&t.writeInt64(3,r),0!==(r=e.getAcquiredDelegatedFrozenBalanceForEnergy())&&t.writeInt64(4,r),0!==(r=e.getDelegatedFrozenBalanceForEnergy())&&t.writeInt64(5,r),0!==(r=e.getStorageLimit())&&t.writeInt64(6,r),0!==(r=e.getStorageUsage())&&t.writeInt64(7,r),0!==(r=e.getLatestExchangeStorageTime())&&t.writeInt64(8,r)},TronWebProto.Account.AccountResource.prototype.getEnergyUsage=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Account.AccountResource.prototype.setEnergyUsage=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Account.AccountResource.prototype.getFrozenBalanceForEnergy=function(){return n.Message.getWrapperField(this,TronWebProto.Account.Frozen,2)},TronWebProto.Account.AccountResource.prototype.setFrozenBalanceForEnergy=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.Account.AccountResource.prototype.clearFrozenBalanceForEnergy=function(){return this.setFrozenBalanceForEnergy(void 0)},TronWebProto.Account.AccountResource.prototype.hasFrozenBalanceForEnergy=function(){return null!=n.Message.getField(this,2)},TronWebProto.Account.AccountResource.prototype.getLatestConsumeTimeForEnergy=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Account.AccountResource.prototype.setLatestConsumeTimeForEnergy=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Account.AccountResource.prototype.getAcquiredDelegatedFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Account.AccountResource.prototype.setAcquiredDelegatedFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Account.AccountResource.prototype.getDelegatedFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Account.AccountResource.prototype.setDelegatedFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Account.AccountResource.prototype.getStorageLimit=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.Account.AccountResource.prototype.setStorageLimit=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.Account.AccountResource.prototype.getStorageUsage=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Account.AccountResource.prototype.setStorageUsage=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Account.AccountResource.prototype.getLatestExchangeStorageTime=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Account.AccountResource.prototype.setLatestExchangeStorageTime=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Account.prototype.getAccountName=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Account.prototype.getAccountName_asB64=function(){return n.Message.bytesAsB64(this.getAccountName())},TronWebProto.Account.prototype.getAccountName_asU8=function(){return n.Message.bytesAsU8(this.getAccountName())},TronWebProto.Account.prototype.setAccountName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Account.prototype.getType=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Account.prototype.setType=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.Account.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.Account.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Account.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Account.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Account.prototype.getBalance=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Account.prototype.setBalance=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Account.prototype.getVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,5)},TronWebProto.Account.prototype.setVotesList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.Account.prototype.addVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.Vote,t)},TronWebProto.Account.prototype.clearVotesList=function(){return this.setVotesList([])},TronWebProto.Account.prototype.getAssetMap=function(e){return n.Message.getMapField(this,6,e,null)},TronWebProto.Account.prototype.clearAssetMap=function(){return this.getAssetMap().clear(),this},TronWebProto.Account.prototype.getAssetv2Map=function(e){return n.Message.getMapField(this,56,e,null)},TronWebProto.Account.prototype.clearAssetv2Map=function(){return this.getAssetv2Map().clear(),this},TronWebProto.Account.prototype.getFrozenList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Account.Frozen,7)},TronWebProto.Account.prototype.setFrozenList=function(e){return n.Message.setRepeatedWrapperField(this,7,e)},TronWebProto.Account.prototype.addFrozen=function(e,t){return n.Message.addToRepeatedWrapperField(this,7,e,TronWebProto.Account.Frozen,t)},TronWebProto.Account.prototype.clearFrozenList=function(){return this.setFrozenList([])},TronWebProto.Account.prototype.getNetUsage=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Account.prototype.setNetUsage=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Account.prototype.getAcquiredDelegatedFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,41,0)},TronWebProto.Account.prototype.setAcquiredDelegatedFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,41,e)},TronWebProto.Account.prototype.getDelegatedFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,42,0)},TronWebProto.Account.prototype.setDelegatedFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,42,e)},TronWebProto.Account.prototype.getOldTronPower=function(){return n.Message.getFieldWithDefault(this,46,0)},TronWebProto.Account.prototype.setOldTronPower=function(e){return n.Message.setProto3IntField(this,46,e)},TronWebProto.Account.prototype.getTronPower=function(){return n.Message.getWrapperField(this,TronWebProto.Account.Frozen,47)},TronWebProto.Account.prototype.setTronPower=function(e){return n.Message.setWrapperField(this,47,e)},TronWebProto.Account.prototype.clearTronPower=function(){return this.setTronPower(void 0)},TronWebProto.Account.prototype.hasTronPower=function(){return null!=n.Message.getField(this,47)},TronWebProto.Account.prototype.getAssetOptimized=function(){return n.Message.getBooleanFieldWithDefault(this,60,!1)},TronWebProto.Account.prototype.setAssetOptimized=function(e){return n.Message.setProto3BooleanField(this,60,e)},TronWebProto.Account.prototype.getCreateTime=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.Account.prototype.setCreateTime=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.Account.prototype.getLatestOprationTime=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.Account.prototype.setLatestOprationTime=function(e){return n.Message.setProto3IntField(this,10,e)},TronWebProto.Account.prototype.getAllowance=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.Account.prototype.setAllowance=function(e){return n.Message.setProto3IntField(this,11,e)},TronWebProto.Account.prototype.getLatestWithdrawTime=function(){return n.Message.getFieldWithDefault(this,12,0)},TronWebProto.Account.prototype.setLatestWithdrawTime=function(e){return n.Message.setProto3IntField(this,12,e)},TronWebProto.Account.prototype.getCode=function(){return n.Message.getFieldWithDefault(this,13,"")},TronWebProto.Account.prototype.getCode_asB64=function(){return n.Message.bytesAsB64(this.getCode())},TronWebProto.Account.prototype.getCode_asU8=function(){return n.Message.bytesAsU8(this.getCode())},TronWebProto.Account.prototype.setCode=function(e){return n.Message.setProto3BytesField(this,13,e)},TronWebProto.Account.prototype.getIsWitness=function(){return n.Message.getBooleanFieldWithDefault(this,14,!1)},TronWebProto.Account.prototype.setIsWitness=function(e){return n.Message.setProto3BooleanField(this,14,e)},TronWebProto.Account.prototype.getIsCommittee=function(){return n.Message.getBooleanFieldWithDefault(this,15,!1)},TronWebProto.Account.prototype.setIsCommittee=function(e){return n.Message.setProto3BooleanField(this,15,e)},TronWebProto.Account.prototype.getFrozenSupplyList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Account.Frozen,16)},TronWebProto.Account.prototype.setFrozenSupplyList=function(e){return n.Message.setRepeatedWrapperField(this,16,e)},TronWebProto.Account.prototype.addFrozenSupply=function(e,t){return n.Message.addToRepeatedWrapperField(this,16,e,TronWebProto.Account.Frozen,t)},TronWebProto.Account.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},TronWebProto.Account.prototype.getAssetIssuedName=function(){return n.Message.getFieldWithDefault(this,17,"")},TronWebProto.Account.prototype.getAssetIssuedName_asB64=function(){return n.Message.bytesAsB64(this.getAssetIssuedName())},TronWebProto.Account.prototype.getAssetIssuedName_asU8=function(){return n.Message.bytesAsU8(this.getAssetIssuedName())},TronWebProto.Account.prototype.setAssetIssuedName=function(e){return n.Message.setProto3BytesField(this,17,e)},TronWebProto.Account.prototype.getAssetIssuedId=function(){return n.Message.getFieldWithDefault(this,57,"")},TronWebProto.Account.prototype.getAssetIssuedId_asB64=function(){return n.Message.bytesAsB64(this.getAssetIssuedId())},TronWebProto.Account.prototype.getAssetIssuedId_asU8=function(){return n.Message.bytesAsU8(this.getAssetIssuedId())},TronWebProto.Account.prototype.setAssetIssuedId=function(e){return n.Message.setProto3BytesField(this,57,e)},TronWebProto.Account.prototype.getLatestAssetOperationTimeMap=function(e){return n.Message.getMapField(this,18,e,null)},TronWebProto.Account.prototype.clearLatestAssetOperationTimeMap=function(){return this.getLatestAssetOperationTimeMap().clear(),this},TronWebProto.Account.prototype.getLatestAssetOperationTimev2Map=function(e){return n.Message.getMapField(this,58,e,null)},TronWebProto.Account.prototype.clearLatestAssetOperationTimev2Map=function(){return this.getLatestAssetOperationTimev2Map().clear(),this},TronWebProto.Account.prototype.getFreeNetUsage=function(){return n.Message.getFieldWithDefault(this,19,0)},TronWebProto.Account.prototype.setFreeNetUsage=function(e){return n.Message.setProto3IntField(this,19,e)},TronWebProto.Account.prototype.getFreeAssetNetUsageMap=function(e){return n.Message.getMapField(this,20,e,null)},TronWebProto.Account.prototype.clearFreeAssetNetUsageMap=function(){return this.getFreeAssetNetUsageMap().clear(),this},TronWebProto.Account.prototype.getFreeAssetNetUsagev2Map=function(e){return n.Message.getMapField(this,59,e,null)},TronWebProto.Account.prototype.clearFreeAssetNetUsagev2Map=function(){return this.getFreeAssetNetUsagev2Map().clear(),this},TronWebProto.Account.prototype.getLatestConsumeTime=function(){return n.Message.getFieldWithDefault(this,21,0)},TronWebProto.Account.prototype.setLatestConsumeTime=function(e){return n.Message.setProto3IntField(this,21,e)},TronWebProto.Account.prototype.getLatestConsumeFreeTime=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.Account.prototype.setLatestConsumeFreeTime=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.Account.prototype.getAccountId=function(){return n.Message.getFieldWithDefault(this,23,"")},TronWebProto.Account.prototype.getAccountId_asB64=function(){return n.Message.bytesAsB64(this.getAccountId())},TronWebProto.Account.prototype.getAccountId_asU8=function(){return n.Message.bytesAsU8(this.getAccountId())},TronWebProto.Account.prototype.setAccountId=function(e){return n.Message.setProto3BytesField(this,23,e)},TronWebProto.Account.prototype.getAccountResource=function(){return n.Message.getWrapperField(this,TronWebProto.Account.AccountResource,26)},TronWebProto.Account.prototype.setAccountResource=function(e){return n.Message.setWrapperField(this,26,e)},TronWebProto.Account.prototype.clearAccountResource=function(){return this.setAccountResource(void 0)},TronWebProto.Account.prototype.hasAccountResource=function(){return null!=n.Message.getField(this,26)},TronWebProto.Account.prototype.getCodehash=function(){return n.Message.getFieldWithDefault(this,30,"")},TronWebProto.Account.prototype.getCodehash_asB64=function(){return n.Message.bytesAsB64(this.getCodehash())},TronWebProto.Account.prototype.getCodehash_asU8=function(){return n.Message.bytesAsU8(this.getCodehash())},TronWebProto.Account.prototype.setCodehash=function(e){return n.Message.setProto3BytesField(this,30,e)},TronWebProto.Account.prototype.getOwnerPermission=function(){return n.Message.getWrapperField(this,TronWebProto.Permission,31)},TronWebProto.Account.prototype.setOwnerPermission=function(e){return n.Message.setWrapperField(this,31,e)},TronWebProto.Account.prototype.clearOwnerPermission=function(){return this.setOwnerPermission(void 0)},TronWebProto.Account.prototype.hasOwnerPermission=function(){return null!=n.Message.getField(this,31)},TronWebProto.Account.prototype.getWitnessPermission=function(){return n.Message.getWrapperField(this,TronWebProto.Permission,32)},TronWebProto.Account.prototype.setWitnessPermission=function(e){return n.Message.setWrapperField(this,32,e)},TronWebProto.Account.prototype.clearWitnessPermission=function(){return this.setWitnessPermission(void 0)},TronWebProto.Account.prototype.hasWitnessPermission=function(){return null!=n.Message.getField(this,32)},TronWebProto.Account.prototype.getActivePermissionList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Permission,33)},TronWebProto.Account.prototype.setActivePermissionList=function(e){return n.Message.setRepeatedWrapperField(this,33,e)},TronWebProto.Account.prototype.addActivePermission=function(e,t){return n.Message.addToRepeatedWrapperField(this,33,e,TronWebProto.Permission,t)},TronWebProto.Account.prototype.clearActivePermissionList=function(){return this.setActivePermissionList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Key.prototype.toObject=function(e){return TronWebProto.Key.toObject(e,this)},TronWebProto.Key.toObject=function(e,t){var r={address:t.getAddress_asB64(),weight:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Key.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Key;return TronWebProto.Key.deserializeBinaryFromReader(r,t)},TronWebProto.Key.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=t.readInt64(),e.setWeight(r);break;default:t.skipField()}return e},TronWebProto.Key.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Key.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Key.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getWeight())&&t.writeInt64(2,r)},TronWebProto.Key.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Key.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Key.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Key.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Key.prototype.getWeight=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Key.prototype.setWeight=function(e){return n.Message.setProto3IntField(this,2,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.DelegatedResource.prototype.toObject=function(e){return TronWebProto.DelegatedResource.toObject(e,this)},TronWebProto.DelegatedResource.toObject=function(e,t){var r={from:t.getFrom_asB64(),to:t.getTo_asB64(),frozenBalanceForBandwidth:n.Message.getFieldWithDefault(t,3,0),frozenBalanceForEnergy:n.Message.getFieldWithDefault(t,4,0),expireTimeForBandwidth:n.Message.getFieldWithDefault(t,5,0),expireTimeForEnergy:n.Message.getFieldWithDefault(t,6,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.DelegatedResource.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.DelegatedResource;return TronWebProto.DelegatedResource.deserializeBinaryFromReader(r,t)},TronWebProto.DelegatedResource.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setFrom(r);break;case 2:r=t.readBytes(),e.setTo(r);break;case 3:r=t.readInt64(),e.setFrozenBalanceForBandwidth(r);break;case 4:r=t.readInt64(),e.setFrozenBalanceForEnergy(r);break;case 5:r=t.readInt64(),e.setExpireTimeForBandwidth(r);break;case 6:r=t.readInt64(),e.setExpireTimeForEnergy(r);break;default:t.skipField()}return e},TronWebProto.DelegatedResource.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.DelegatedResource.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.DelegatedResource.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getFrom_asU8()).length>0&&t.writeBytes(1,r),(r=e.getTo_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFrozenBalanceForBandwidth())&&t.writeInt64(3,r),0!==(r=e.getFrozenBalanceForEnergy())&&t.writeInt64(4,r),0!==(r=e.getExpireTimeForBandwidth())&&t.writeInt64(5,r),0!==(r=e.getExpireTimeForEnergy())&&t.writeInt64(6,r)},TronWebProto.DelegatedResource.prototype.getFrom=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.DelegatedResource.prototype.getFrom_asB64=function(){return n.Message.bytesAsB64(this.getFrom())},TronWebProto.DelegatedResource.prototype.getFrom_asU8=function(){return n.Message.bytesAsU8(this.getFrom())},TronWebProto.DelegatedResource.prototype.setFrom=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.DelegatedResource.prototype.getTo=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.DelegatedResource.prototype.getTo_asB64=function(){return n.Message.bytesAsB64(this.getTo())},TronWebProto.DelegatedResource.prototype.getTo_asU8=function(){return n.Message.bytesAsU8(this.getTo())},TronWebProto.DelegatedResource.prototype.setTo=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.DelegatedResource.prototype.getFrozenBalanceForBandwidth=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.DelegatedResource.prototype.setFrozenBalanceForBandwidth=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.DelegatedResource.prototype.getFrozenBalanceForEnergy=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.DelegatedResource.prototype.setFrozenBalanceForEnergy=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.DelegatedResource.prototype.getExpireTimeForBandwidth=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.DelegatedResource.prototype.setExpireTimeForBandwidth=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.DelegatedResource.prototype.getExpireTimeForEnergy=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.DelegatedResource.prototype.setExpireTimeForEnergy=function(e){return n.Message.setProto3IntField(this,6,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.authority.prototype.toObject=function(e){return TronWebProto.authority.toObject(e,this)},TronWebProto.authority.toObject=function(e,t){var r,n={account:(r=t.getAccount())&&TronWebProto.AccountId.toObject(e,r),permissionName:t.getPermissionName_asB64()};return e&&(n.$jspbMessageInstance=t),n}),TronWebProto.authority.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.authority;return TronWebProto.authority.deserializeBinaryFromReader(r,t)},TronWebProto.authority.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new TronWebProto.AccountId;t.readMessage(r,TronWebProto.AccountId.deserializeBinaryFromReader),e.setAccount(r);break;case 2:r=t.readBytes(),e.setPermissionName(r);break;default:t.skipField()}return e},TronWebProto.authority.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.authority.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.authority.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getAccount())&&t.writeMessage(1,r,TronWebProto.AccountId.serializeBinaryToWriter),(r=e.getPermissionName_asU8()).length>0&&t.writeBytes(2,r)},TronWebProto.authority.prototype.getAccount=function(){return n.Message.getWrapperField(this,TronWebProto.AccountId,1)},TronWebProto.authority.prototype.setAccount=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.authority.prototype.clearAccount=function(){return this.setAccount(void 0)},TronWebProto.authority.prototype.hasAccount=function(){return null!=n.Message.getField(this,1)},TronWebProto.authority.prototype.getPermissionName=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.authority.prototype.getPermissionName_asB64=function(){return n.Message.bytesAsB64(this.getPermissionName())},TronWebProto.authority.prototype.getPermissionName_asU8=function(){return n.Message.bytesAsU8(this.getPermissionName())},TronWebProto.authority.prototype.setPermissionName=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.Permission.repeatedFields_=[7],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Permission.prototype.toObject=function(e){return TronWebProto.Permission.toObject(e,this)},TronWebProto.Permission.toObject=function(e,t){var r={type:n.Message.getFieldWithDefault(t,1,0),id:n.Message.getFieldWithDefault(t,2,0),permissionName:n.Message.getFieldWithDefault(t,3,""),threshold:n.Message.getFieldWithDefault(t,4,0),parentId:n.Message.getFieldWithDefault(t,5,0),operations:t.getOperations_asB64(),keysList:n.Message.toObjectList(t.getKeysList(),TronWebProto.Key.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Permission.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Permission;return TronWebProto.Permission.deserializeBinaryFromReader(r,t)},TronWebProto.Permission.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readEnum();e.setType(r);break;case 2:r=t.readInt32(),e.setId(r);break;case 3:r=t.readString(),e.setPermissionName(r);break;case 4:r=t.readInt64(),e.setThreshold(r);break;case 5:r=t.readInt32(),e.setParentId(r);break;case 6:r=t.readBytes(),e.setOperations(r);break;case 7:r=new TronWebProto.Key,t.readMessage(r,TronWebProto.Key.deserializeBinaryFromReader),e.addKeys(r);break;default:t.skipField()}return e},TronWebProto.Permission.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Permission.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Permission.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getType())&&t.writeEnum(1,r),0!==(r=e.getId())&&t.writeInt32(2,r),(r=e.getPermissionName()).length>0&&t.writeString(3,r),0!==(r=e.getThreshold())&&t.writeInt64(4,r),0!==(r=e.getParentId())&&t.writeInt32(5,r),(r=e.getOperations_asU8()).length>0&&t.writeBytes(6,r),(r=e.getKeysList()).length>0&&t.writeRepeatedMessage(7,r,TronWebProto.Key.serializeBinaryToWriter)},TronWebProto.Permission.PermissionType={OWNER:0,WITNESS:1,ACTIVE:2},TronWebProto.Permission.prototype.getType=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Permission.prototype.setType=function(e){return n.Message.setProto3EnumField(this,1,e)},TronWebProto.Permission.prototype.getId=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Permission.prototype.setId=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Permission.prototype.getPermissionName=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.Permission.prototype.setPermissionName=function(e){return n.Message.setProto3StringField(this,3,e)},TronWebProto.Permission.prototype.getThreshold=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.Permission.prototype.setThreshold=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Permission.prototype.getParentId=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Permission.prototype.setParentId=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Permission.prototype.getOperations=function(){return n.Message.getFieldWithDefault(this,6,"")},TronWebProto.Permission.prototype.getOperations_asB64=function(){return n.Message.bytesAsB64(this.getOperations())},TronWebProto.Permission.prototype.getOperations_asU8=function(){return n.Message.bytesAsU8(this.getOperations())},TronWebProto.Permission.prototype.setOperations=function(e){return n.Message.setProto3BytesField(this,6,e)},TronWebProto.Permission.prototype.getKeysList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Key,7)},TronWebProto.Permission.prototype.setKeysList=function(e){return n.Message.setRepeatedWrapperField(this,7,e)},TronWebProto.Permission.prototype.addKeys=function(e,t){return n.Message.addToRepeatedWrapperField(this,7,e,TronWebProto.Key,t)},TronWebProto.Permission.prototype.clearKeysList=function(){return this.setKeysList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Witness.prototype.toObject=function(e){return TronWebProto.Witness.toObject(e,this)},TronWebProto.Witness.toObject=function(e,t){var r={address:t.getAddress_asB64(),votecount:n.Message.getFieldWithDefault(t,2,0),pubkey:t.getPubkey_asB64(),url:n.Message.getFieldWithDefault(t,4,""),totalproduced:n.Message.getFieldWithDefault(t,5,0),totalmissed:n.Message.getFieldWithDefault(t,6,0),latestblocknum:n.Message.getFieldWithDefault(t,7,0),latestslotnum:n.Message.getFieldWithDefault(t,8,0),isjobs:n.Message.getBooleanFieldWithDefault(t,9,!1)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Witness.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Witness;return TronWebProto.Witness.deserializeBinaryFromReader(r,t)},TronWebProto.Witness.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=t.readInt64(),e.setVotecount(r);break;case 3:r=t.readBytes(),e.setPubkey(r);break;case 4:r=t.readString(),e.setUrl(r);break;case 5:r=t.readInt64(),e.setTotalproduced(r);break;case 6:r=t.readInt64(),e.setTotalmissed(r);break;case 7:r=t.readInt64(),e.setLatestblocknum(r);break;case 8:r=t.readInt64(),e.setLatestslotnum(r);break;case 9:r=t.readBool(),e.setIsjobs(r);break;default:t.skipField()}return e},TronWebProto.Witness.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Witness.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Witness.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getVotecount())&&t.writeInt64(2,r),(r=e.getPubkey_asU8()).length>0&&t.writeBytes(3,r),(r=e.getUrl()).length>0&&t.writeString(4,r),0!==(r=e.getTotalproduced())&&t.writeInt64(5,r),0!==(r=e.getTotalmissed())&&t.writeInt64(6,r),0!==(r=e.getLatestblocknum())&&t.writeInt64(7,r),0!==(r=e.getLatestslotnum())&&t.writeInt64(8,r),(r=e.getIsjobs())&&t.writeBool(9,r)},TronWebProto.Witness.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Witness.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Witness.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Witness.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Witness.prototype.getVotecount=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Witness.prototype.setVotecount=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.Witness.prototype.getPubkey=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.Witness.prototype.getPubkey_asB64=function(){return n.Message.bytesAsB64(this.getPubkey())},TronWebProto.Witness.prototype.getPubkey_asU8=function(){return n.Message.bytesAsU8(this.getPubkey())},TronWebProto.Witness.prototype.setPubkey=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Witness.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.Witness.prototype.setUrl=function(e){return n.Message.setProto3StringField(this,4,e)},TronWebProto.Witness.prototype.getTotalproduced=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Witness.prototype.setTotalproduced=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Witness.prototype.getTotalmissed=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.Witness.prototype.setTotalmissed=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.Witness.prototype.getLatestblocknum=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.Witness.prototype.setLatestblocknum=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.Witness.prototype.getLatestslotnum=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Witness.prototype.setLatestslotnum=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Witness.prototype.getIsjobs=function(){return n.Message.getBooleanFieldWithDefault(this,9,!1)},TronWebProto.Witness.prototype.setIsjobs=function(e){return n.Message.setProto3BooleanField(this,9,e)},TronWebProto.Votes.repeatedFields_=[2,3],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Votes.prototype.toObject=function(e){return TronWebProto.Votes.toObject(e,this)},TronWebProto.Votes.toObject=function(e,t){var r={address:t.getAddress_asB64(),oldVotesList:n.Message.toObjectList(t.getOldVotesList(),TronWebProto.Vote.toObject,e),newVotesList:n.Message.toObjectList(t.getNewVotesList(),TronWebProto.Vote.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Votes.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Votes;return TronWebProto.Votes.deserializeBinaryFromReader(r,t)},TronWebProto.Votes.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAddress(r);break;case 2:r=new TronWebProto.Vote,t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addOldVotes(r);break;case 3:r=new TronWebProto.Vote,t.readMessage(r,TronWebProto.Vote.deserializeBinaryFromReader),e.addNewVotes(r);break;default:t.skipField()}return e},TronWebProto.Votes.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Votes.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Votes.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOldVotesList()).length>0&&t.writeRepeatedMessage(2,r,TronWebProto.Vote.serializeBinaryToWriter),(r=e.getNewVotesList()).length>0&&t.writeRepeatedMessage(3,r,TronWebProto.Vote.serializeBinaryToWriter)},TronWebProto.Votes.prototype.getAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Votes.prototype.getAddress_asB64=function(){return n.Message.bytesAsB64(this.getAddress())},TronWebProto.Votes.prototype.getAddress_asU8=function(){return n.Message.bytesAsU8(this.getAddress())},TronWebProto.Votes.prototype.setAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Votes.prototype.getOldVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,2)},TronWebProto.Votes.prototype.setOldVotesList=function(e){return n.Message.setRepeatedWrapperField(this,2,e)},TronWebProto.Votes.prototype.addOldVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,2,e,TronWebProto.Vote,t)},TronWebProto.Votes.prototype.clearOldVotesList=function(){return this.setOldVotesList([])},TronWebProto.Votes.prototype.getNewVotesList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Vote,3)},TronWebProto.Votes.prototype.setNewVotesList=function(e){return n.Message.setRepeatedWrapperField(this,3,e)},TronWebProto.Votes.prototype.addNewVotes=function(e,t){return n.Message.addToRepeatedWrapperField(this,3,e,TronWebProto.Vote,t)},TronWebProto.Votes.prototype.clearNewVotesList=function(){return this.setNewVotesList([])},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.MarketOrderDetail.prototype.toObject=function(e){return TronWebProto.MarketOrderDetail.toObject(e,this)},TronWebProto.MarketOrderDetail.toObject=function(e,t){var r={makerorderid:t.getMakerorderid_asB64(),takerorderid:t.getTakerorderid_asB64(),fillsellquantity:n.Message.getFieldWithDefault(t,3,0),fillbuyquantity:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.MarketOrderDetail.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.MarketOrderDetail;return TronWebProto.MarketOrderDetail.deserializeBinaryFromReader(r,t)},TronWebProto.MarketOrderDetail.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setMakerorderid(r);break;case 2:r=t.readBytes(),e.setTakerorderid(r);break;case 3:r=t.readInt64(),e.setFillsellquantity(r);break;case 4:r=t.readInt64(),e.setFillbuyquantity(r);break;default:t.skipField()}return e},TronWebProto.MarketOrderDetail.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.MarketOrderDetail.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.MarketOrderDetail.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getMakerorderid_asU8()).length>0&&t.writeBytes(1,r),(r=e.getTakerorderid_asU8()).length>0&&t.writeBytes(2,r),0!==(r=e.getFillsellquantity())&&t.writeInt64(3,r),0!==(r=e.getFillbuyquantity())&&t.writeInt64(4,r)},TronWebProto.MarketOrderDetail.prototype.getMakerorderid=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asB64=function(){return n.Message.bytesAsB64(this.getMakerorderid())},TronWebProto.MarketOrderDetail.prototype.getMakerorderid_asU8=function(){return n.Message.bytesAsU8(this.getMakerorderid())},TronWebProto.MarketOrderDetail.prototype.setMakerorderid=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.MarketOrderDetail.prototype.getTakerorderid=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asB64=function(){return n.Message.bytesAsB64(this.getTakerorderid())},TronWebProto.MarketOrderDetail.prototype.getTakerorderid_asU8=function(){return n.Message.bytesAsU8(this.getTakerorderid())},TronWebProto.MarketOrderDetail.prototype.setTakerorderid=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.MarketOrderDetail.prototype.getFillsellquantity=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.MarketOrderDetail.prototype.setFillsellquantity=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.MarketOrderDetail.prototype.getFillbuyquantity=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.MarketOrderDetail.prototype.setFillbuyquantity=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.Transaction.repeatedFields_=[2,5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.prototype.toObject=function(e){return TronWebProto.Transaction.toObject(e,this)},TronWebProto.Transaction.toObject=function(e,t){var r,o={rawData:(r=t.getRawData())&&TronWebProto.Transaction.raw.toObject(e,r),signatureList:t.getSignatureList_asB64(),retList:n.Message.toObjectList(t.getRetList(),TronWebProto.Transaction.Result.toObject,e)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Transaction.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction;return TronWebProto.Transaction.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=new TronWebProto.Transaction.raw;t.readMessage(r,TronWebProto.Transaction.raw.deserializeBinaryFromReader),e.setRawData(r);break;case 2:r=t.readBytes(),e.addSignature(r);break;case 5:r=new TronWebProto.Transaction.Result,t.readMessage(r,TronWebProto.Transaction.Result.deserializeBinaryFromReader),e.addRet(r);break;default:t.skipField()}return e},TronWebProto.Transaction.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.serializeBinaryToWriter=function(e,t){var r=void 0;null!=(r=e.getRawData())&&t.writeMessage(1,r,TronWebProto.Transaction.raw.serializeBinaryToWriter),(r=e.getSignatureList_asU8()).length>0&&t.writeRepeatedBytes(2,r),(r=e.getRetList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.Transaction.Result.serializeBinaryToWriter)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.Contract.prototype.toObject=function(e){return TronWebProto.Transaction.Contract.toObject(e,this)},TronWebProto.Transaction.Contract.toObject=function(e,t){var r,o={type:n.Message.getFieldWithDefault(t,1,0),parameter:(r=t.getParameter())&&i.Any.toObject(e,r),provider:t.getProvider_asB64(),contractname:t.getContractname_asB64(),permissionId:n.Message.getFieldWithDefault(t,5,0)};return e&&(o.$jspbMessageInstance=t),o}),TronWebProto.Transaction.Contract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.Contract;return TronWebProto.Transaction.Contract.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.Contract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readEnum();e.setType(r);break;case 2:r=new i.Any,t.readMessage(r,i.Any.deserializeBinaryFromReader),e.setParameter(r);break;case 3:r=t.readBytes(),e.setProvider(r);break;case 4:r=t.readBytes(),e.setContractname(r);break;case 5:r=t.readInt32(),e.setPermissionId(r);break;default:t.skipField()}return e},TronWebProto.Transaction.Contract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.Contract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.Contract.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getType())&&t.writeEnum(1,r),null!=(r=e.getParameter())&&t.writeMessage(2,r,i.Any.serializeBinaryToWriter),(r=e.getProvider_asU8()).length>0&&t.writeBytes(3,r),(r=e.getContractname_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getPermissionId())&&t.writeInt32(5,r)},TronWebProto.Transaction.Contract.ContractType={ACCOUNTCREATECONTRACT:0,TRANSFERCONTRACT:1,TRANSFERASSETCONTRACT:2,VOTEASSETCONTRACT:3,VOTEWITNESSCONTRACT:4,WITNESSCREATECONTRACT:5,ASSETISSUECONTRACT:6,WITNESSUPDATECONTRACT:8,PARTICIPATEASSETISSUECONTRACT:9,ACCOUNTUPDATECONTRACT:10,FREEZEBALANCECONTRACT:11,UNFREEZEBALANCECONTRACT:12,WITHDRAWBALANCECONTRACT:13,UNFREEZEASSETCONTRACT:14,UPDATEASSETCONTRACT:15,PROPOSALCREATECONTRACT:16,PROPOSALAPPROVECONTRACT:17,PROPOSALDELETECONTRACT:18,SETACCOUNTIDCONTRACT:19,CUSTOMCONTRACT:20,CREATESMARTCONTRACT:30,TRIGGERSMARTCONTRACT:31,GETCONTRACT:32,UPDATESETTINGCONTRACT:33,EXCHANGECREATECONTRACT:41,EXCHANGEINJECTCONTRACT:42,EXCHANGEWITHDRAWCONTRACT:43,EXCHANGETRANSACTIONCONTRACT:44,UPDATEENERGYLIMITCONTRACT:45,ACCOUNTPERMISSIONUPDATECONTRACT:46,CLEARABICONTRACT:48,UPDATEBROKERAGECONTRACT:49,SHIELDEDTRANSFERCONTRACT:51,MARKETSELLASSETCONTRACT:52,MARKETCANCELORDERCONTRACT:53,FREEZEBALANCEV2CONTRACT:54,UNFREEZEBALANCEV2CONTRACT:55,WITHDRAWEXPIREUNFREEZECONTRACT:56,DELEGATERESOURCECONTRACT:57,UNDELEGATERESOURCECONTRACT:58,CANCELALLUNFREEZEV2CONTRACT:59},TronWebProto.Transaction.Contract.prototype.getType=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Transaction.Contract.prototype.setType=function(e){return n.Message.setProto3EnumField(this,1,e)},TronWebProto.Transaction.Contract.prototype.getParameter=function(){return n.Message.getWrapperField(this,i.Any,2)},TronWebProto.Transaction.Contract.prototype.setParameter=function(e){return n.Message.setWrapperField(this,2,e)},TronWebProto.Transaction.Contract.prototype.clearParameter=function(){return this.setParameter(void 0)},TronWebProto.Transaction.Contract.prototype.hasParameter=function(){return null!=n.Message.getField(this,2)},TronWebProto.Transaction.Contract.prototype.getProvider=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.Transaction.Contract.prototype.getProvider_asB64=function(){return n.Message.bytesAsB64(this.getProvider())},TronWebProto.Transaction.Contract.prototype.getProvider_asU8=function(){return n.Message.bytesAsU8(this.getProvider())},TronWebProto.Transaction.Contract.prototype.setProvider=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.Transaction.Contract.prototype.getContractname=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.Transaction.Contract.prototype.getContractname_asB64=function(){return n.Message.bytesAsB64(this.getContractname())},TronWebProto.Transaction.Contract.prototype.getContractname_asU8=function(){return n.Message.bytesAsU8(this.getContractname())},TronWebProto.Transaction.Contract.prototype.setContractname=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.Transaction.Contract.prototype.getPermissionId=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.Transaction.Contract.prototype.setPermissionId=function(e){return n.Message.setProto3IntField(this,5,e)},TronWebProto.Transaction.Result.repeatedFields_=[26],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.Result.prototype.toObject=function(e){return TronWebProto.Transaction.Result.toObject(e,this)},TronWebProto.Transaction.Result.toObject=function(e,t){var r={fee:n.Message.getFieldWithDefault(t,1,0),ret:n.Message.getFieldWithDefault(t,2,0),contractret:n.Message.getFieldWithDefault(t,3,0),assetissueid:n.Message.getFieldWithDefault(t,14,""),withdrawAmount:n.Message.getFieldWithDefault(t,15,0),unfreezeAmount:n.Message.getFieldWithDefault(t,16,0),exchangeReceivedAmount:n.Message.getFieldWithDefault(t,18,0),exchangeInjectAnotherAmount:n.Message.getFieldWithDefault(t,19,0),exchangeWithdrawAnotherAmount:n.Message.getFieldWithDefault(t,20,0),exchangeId:n.Message.getFieldWithDefault(t,21,0),shieldedTransactionFee:n.Message.getFieldWithDefault(t,22,0),orderid:t.getOrderid_asB64(),orderdetailsList:n.Message.toObjectList(t.getOrderdetailsList(),TronWebProto.MarketOrderDetail.toObject,e)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Transaction.Result.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.Result;return TronWebProto.Transaction.Result.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.Result.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFee(r);break;case 2:r=t.readEnum(),e.setRet(r);break;case 3:r=t.readEnum(),e.setContractret(r);break;case 14:r=t.readString(),e.setAssetissueid(r);break;case 15:r=t.readInt64(),e.setWithdrawAmount(r);break;case 16:r=t.readInt64(),e.setUnfreezeAmount(r);break;case 18:r=t.readInt64(),e.setExchangeReceivedAmount(r);break;case 19:r=t.readInt64(),e.setExchangeInjectAnotherAmount(r);break;case 20:r=t.readInt64(),e.setExchangeWithdrawAnotherAmount(r);break;case 21:r=t.readInt64(),e.setExchangeId(r);break;case 22:r=t.readInt64(),e.setShieldedTransactionFee(r);break;case 25:r=t.readBytes(),e.setOrderid(r);break;case 26:r=new TronWebProto.MarketOrderDetail,t.readMessage(r,TronWebProto.MarketOrderDetail.deserializeBinaryFromReader),e.addOrderdetails(r);break;default:t.skipField()}return e},TronWebProto.Transaction.Result.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.Result.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.Result.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFee())&&t.writeInt64(1,r),0!==(r=e.getRet())&&t.writeEnum(2,r),0!==(r=e.getContractret())&&t.writeEnum(3,r),(r=e.getAssetissueid()).length>0&&t.writeString(14,r),0!==(r=e.getWithdrawAmount())&&t.writeInt64(15,r),0!==(r=e.getUnfreezeAmount())&&t.writeInt64(16,r),0!==(r=e.getExchangeReceivedAmount())&&t.writeInt64(18,r),0!==(r=e.getExchangeInjectAnotherAmount())&&t.writeInt64(19,r),0!==(r=e.getExchangeWithdrawAnotherAmount())&&t.writeInt64(20,r),0!==(r=e.getExchangeId())&&t.writeInt64(21,r),0!==(r=e.getShieldedTransactionFee())&&t.writeInt64(22,r),(r=e.getOrderid_asU8()).length>0&&t.writeBytes(25,r),(r=e.getOrderdetailsList()).length>0&&t.writeRepeatedMessage(26,r,TronWebProto.MarketOrderDetail.serializeBinaryToWriter)},TronWebProto.Transaction.Result.code={SUCESS:0,FAILED:1},TronWebProto.Transaction.Result.contractResult={DEFAULT:0,SUCCESS:1,REVERT:2,BAD_JUMP_DESTINATION:3,OUT_OF_MEMORY:4,PRECOMPILED_CONTRACT:5,STACK_TOO_SMALL:6,STACK_TOO_LARGE:7,ILLEGAL_OPERATION:8,STACK_OVERFLOW:9,OUT_OF_ENERGY:10,OUT_OF_TIME:11,JVM_STACK_OVER_FLOW:12,UNKNOWN:13,TRANSFER_FAILED:14,INVALID_CODE:15},TronWebProto.Transaction.Result.prototype.getFee=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.Transaction.Result.prototype.setFee=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.Transaction.Result.prototype.getRet=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.Transaction.Result.prototype.setRet=function(e){return n.Message.setProto3EnumField(this,2,e)},TronWebProto.Transaction.Result.prototype.getContractret=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Transaction.Result.prototype.setContractret=function(e){return n.Message.setProto3EnumField(this,3,e)},TronWebProto.Transaction.Result.prototype.getAssetissueid=function(){return n.Message.getFieldWithDefault(this,14,"")},TronWebProto.Transaction.Result.prototype.setAssetissueid=function(e){return n.Message.setProto3StringField(this,14,e)},TronWebProto.Transaction.Result.prototype.getWithdrawAmount=function(){return n.Message.getFieldWithDefault(this,15,0)},TronWebProto.Transaction.Result.prototype.setWithdrawAmount=function(e){return n.Message.setProto3IntField(this,15,e)},TronWebProto.Transaction.Result.prototype.getUnfreezeAmount=function(){return n.Message.getFieldWithDefault(this,16,0)},TronWebProto.Transaction.Result.prototype.setUnfreezeAmount=function(e){return n.Message.setProto3IntField(this,16,e)},TronWebProto.Transaction.Result.prototype.getExchangeReceivedAmount=function(){return n.Message.getFieldWithDefault(this,18,0)},TronWebProto.Transaction.Result.prototype.setExchangeReceivedAmount=function(e){return n.Message.setProto3IntField(this,18,e)},TronWebProto.Transaction.Result.prototype.getExchangeInjectAnotherAmount=function(){return n.Message.getFieldWithDefault(this,19,0)},TronWebProto.Transaction.Result.prototype.setExchangeInjectAnotherAmount=function(e){return n.Message.setProto3IntField(this,19,e)},TronWebProto.Transaction.Result.prototype.getExchangeWithdrawAnotherAmount=function(){return n.Message.getFieldWithDefault(this,20,0)},TronWebProto.Transaction.Result.prototype.setExchangeWithdrawAnotherAmount=function(e){return n.Message.setProto3IntField(this,20,e)},TronWebProto.Transaction.Result.prototype.getExchangeId=function(){return n.Message.getFieldWithDefault(this,21,0)},TronWebProto.Transaction.Result.prototype.setExchangeId=function(e){return n.Message.setProto3IntField(this,21,e)},TronWebProto.Transaction.Result.prototype.getShieldedTransactionFee=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.Transaction.Result.prototype.setShieldedTransactionFee=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.Transaction.Result.prototype.getOrderid=function(){return n.Message.getFieldWithDefault(this,25,"")},TronWebProto.Transaction.Result.prototype.getOrderid_asB64=function(){return n.Message.bytesAsB64(this.getOrderid())},TronWebProto.Transaction.Result.prototype.getOrderid_asU8=function(){return n.Message.bytesAsU8(this.getOrderid())},TronWebProto.Transaction.Result.prototype.setOrderid=function(e){return n.Message.setProto3BytesField(this,25,e)},TronWebProto.Transaction.Result.prototype.getOrderdetailsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.MarketOrderDetail,26)},TronWebProto.Transaction.Result.prototype.setOrderdetailsList=function(e){return n.Message.setRepeatedWrapperField(this,26,e)},TronWebProto.Transaction.Result.prototype.addOrderdetails=function(e,t){return n.Message.addToRepeatedWrapperField(this,26,e,TronWebProto.MarketOrderDetail,t)},TronWebProto.Transaction.Result.prototype.clearOrderdetailsList=function(){return this.setOrderdetailsList([])},TronWebProto.Transaction.raw.repeatedFields_=[9,11],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.Transaction.raw.prototype.toObject=function(e){return TronWebProto.Transaction.raw.toObject(e,this)},TronWebProto.Transaction.raw.toObject=function(e,t){var r={refBlockBytes:t.getRefBlockBytes_asB64(),refBlockNum:n.Message.getFieldWithDefault(t,3,0),refBlockHash:t.getRefBlockHash_asB64(),expiration:n.Message.getFieldWithDefault(t,8,0),authsList:n.Message.toObjectList(t.getAuthsList(),TronWebProto.authority.toObject,e),data:t.getData_asB64(),contractList:n.Message.toObjectList(t.getContractList(),TronWebProto.Transaction.Contract.toObject,e),scripts:t.getScripts_asB64(),timestamp:n.Message.getFieldWithDefault(t,14,0),feeLimit:n.Message.getFieldWithDefault(t,18,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.Transaction.raw.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.Transaction.raw;return TronWebProto.Transaction.raw.deserializeBinaryFromReader(r,t)},TronWebProto.Transaction.raw.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setRefBlockBytes(r);break;case 3:r=t.readInt64(),e.setRefBlockNum(r);break;case 4:r=t.readBytes(),e.setRefBlockHash(r);break;case 8:r=t.readInt64(),e.setExpiration(r);break;case 9:r=new TronWebProto.authority,t.readMessage(r,TronWebProto.authority.deserializeBinaryFromReader),e.addAuths(r);break;case 10:r=t.readBytes(),e.setData(r);break;case 11:r=new TronWebProto.Transaction.Contract,t.readMessage(r,TronWebProto.Transaction.Contract.deserializeBinaryFromReader),e.addContract(r);break;case 12:r=t.readBytes(),e.setScripts(r);break;case 14:r=t.readInt64(),e.setTimestamp(r);break;case 18:r=t.readInt64(),e.setFeeLimit(r);break;default:t.skipField()}return e},TronWebProto.Transaction.raw.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.Transaction.raw.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.Transaction.raw.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getRefBlockBytes_asU8()).length>0&&t.writeBytes(1,r),0!==(r=e.getRefBlockNum())&&t.writeInt64(3,r),(r=e.getRefBlockHash_asU8()).length>0&&t.writeBytes(4,r),0!==(r=e.getExpiration())&&t.writeInt64(8,r),(r=e.getAuthsList()).length>0&&t.writeRepeatedMessage(9,r,TronWebProto.authority.serializeBinaryToWriter),(r=e.getData_asU8()).length>0&&t.writeBytes(10,r),(r=e.getContractList()).length>0&&t.writeRepeatedMessage(11,r,TronWebProto.Transaction.Contract.serializeBinaryToWriter),(r=e.getScripts_asU8()).length>0&&t.writeBytes(12,r),0!==(r=e.getTimestamp())&&t.writeInt64(14,r),0!==(r=e.getFeeLimit())&&t.writeInt64(18,r)},TronWebProto.Transaction.raw.prototype.getRefBlockBytes=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asB64=function(){return n.Message.bytesAsB64(this.getRefBlockBytes())},TronWebProto.Transaction.raw.prototype.getRefBlockBytes_asU8=function(){return n.Message.bytesAsU8(this.getRefBlockBytes())},TronWebProto.Transaction.raw.prototype.setRefBlockBytes=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.Transaction.raw.prototype.getRefBlockNum=function(){return n.Message.getFieldWithDefault(this,3,0)},TronWebProto.Transaction.raw.prototype.setRefBlockNum=function(e){return n.Message.setProto3IntField(this,3,e)},TronWebProto.Transaction.raw.prototype.getRefBlockHash=function(){return n.Message.getFieldWithDefault(this,4,"")},TronWebProto.Transaction.raw.prototype.getRefBlockHash_asB64=function(){return n.Message.bytesAsB64(this.getRefBlockHash())},TronWebProto.Transaction.raw.prototype.getRefBlockHash_asU8=function(){return n.Message.bytesAsU8(this.getRefBlockHash())},TronWebProto.Transaction.raw.prototype.setRefBlockHash=function(e){return n.Message.setProto3BytesField(this,4,e)},TronWebProto.Transaction.raw.prototype.getExpiration=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.Transaction.raw.prototype.setExpiration=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.Transaction.raw.prototype.getAuthsList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.authority,9)},TronWebProto.Transaction.raw.prototype.setAuthsList=function(e){return n.Message.setRepeatedWrapperField(this,9,e)},TronWebProto.Transaction.raw.prototype.addAuths=function(e,t){return n.Message.addToRepeatedWrapperField(this,9,e,TronWebProto.authority,t)},TronWebProto.Transaction.raw.prototype.clearAuthsList=function(){return this.setAuthsList([])},TronWebProto.Transaction.raw.prototype.getData=function(){return n.Message.getFieldWithDefault(this,10,"")},TronWebProto.Transaction.raw.prototype.getData_asB64=function(){return n.Message.bytesAsB64(this.getData())},TronWebProto.Transaction.raw.prototype.getData_asU8=function(){return n.Message.bytesAsU8(this.getData())},TronWebProto.Transaction.raw.prototype.setData=function(e){return n.Message.setProto3BytesField(this,10,e)},TronWebProto.Transaction.raw.prototype.getContractList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Transaction.Contract,11)},TronWebProto.Transaction.raw.prototype.setContractList=function(e){return n.Message.setRepeatedWrapperField(this,11,e)},TronWebProto.Transaction.raw.prototype.addContract=function(e,t){return n.Message.addToRepeatedWrapperField(this,11,e,TronWebProto.Transaction.Contract,t)},TronWebProto.Transaction.raw.prototype.clearContractList=function(){return this.setContractList([])},TronWebProto.Transaction.raw.prototype.getScripts=function(){return n.Message.getFieldWithDefault(this,12,"")},TronWebProto.Transaction.raw.prototype.getScripts_asB64=function(){return n.Message.bytesAsB64(this.getScripts())},TronWebProto.Transaction.raw.prototype.getScripts_asU8=function(){return n.Message.bytesAsU8(this.getScripts())},TronWebProto.Transaction.raw.prototype.setScripts=function(e){return n.Message.setProto3BytesField(this,12,e)},TronWebProto.Transaction.raw.prototype.getTimestamp=function(){return n.Message.getFieldWithDefault(this,14,0)},TronWebProto.Transaction.raw.prototype.setTimestamp=function(e){return n.Message.setProto3IntField(this,14,e)},TronWebProto.Transaction.raw.prototype.getFeeLimit=function(){return n.Message.getFieldWithDefault(this,18,0)},TronWebProto.Transaction.raw.prototype.setFeeLimit=function(e){return n.Message.setProto3IntField(this,18,e)},TronWebProto.Transaction.prototype.getRawData=function(){return n.Message.getWrapperField(this,TronWebProto.Transaction.raw,1)},TronWebProto.Transaction.prototype.setRawData=function(e){return n.Message.setWrapperField(this,1,e)},TronWebProto.Transaction.prototype.clearRawData=function(){return this.setRawData(void 0)},TronWebProto.Transaction.prototype.hasRawData=function(){return null!=n.Message.getField(this,1)},TronWebProto.Transaction.prototype.getSignatureList=function(){return n.Message.getRepeatedField(this,2)},TronWebProto.Transaction.prototype.getSignatureList_asB64=function(){return n.Message.bytesListAsB64(this.getSignatureList())},TronWebProto.Transaction.prototype.getSignatureList_asU8=function(){return n.Message.bytesListAsU8(this.getSignatureList())},TronWebProto.Transaction.prototype.setSignatureList=function(e){return n.Message.setField(this,2,e||[])},TronWebProto.Transaction.prototype.addSignature=function(e,t){return n.Message.addToRepeatedField(this,2,e,t)},TronWebProto.Transaction.prototype.clearSignatureList=function(){return this.setSignatureList([])},TronWebProto.Transaction.prototype.getRetList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.Transaction.Result,5)},TronWebProto.Transaction.prototype.setRetList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.Transaction.prototype.addRet=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.Transaction.Result,t)},TronWebProto.Transaction.prototype.clearRetList=function(){return this.setRetList([])},TronWebProto.AccountType={NORMAL:0,ASSETISSUE:1,CONTRACT:2},o.object.extend(t,TronWebProto)},9172:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){(0,n.default)(e);var t=e.split("."),r=t.length;return!(r>3||r<2)&&t.reduce((function(e,t){return e&&(0,o.default)(t,{urlSafe:!0})}),!0)};var n=s(r(3399)),o=s(r(8274));function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default,e.exports.default=t.default},9220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){return(0,n.default)(e),(r=(0,s.default)(r,a)).ignoreCase?e.toLowerCase().split((0,o.default)(t).toLowerCase()).length>r.minOccurrences:e.split((0,o.default)(t)).length>r.minOccurrences};var n=i(r(3399)),o=i(r(5772)),s=i(r(3610));function i(e){return e&&e.__esModule?e:{default:e}}var a={ignoreCase:!1,minOccurrences:1};e.exports=t.default,e.exports.default=t.default},9234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;e.exports=t.default,e.exports.default=t.default},9265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e,t){return e.some((function(e){return t===e}))},e.exports=t.default,e.exports.default=t.default},9266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r;if((0,n.default)(e),"[object Array]"===Object.prototype.toString.call(t)){var s=[];for(r in t)({}).hasOwnProperty.call(t,r)&&(s[r]=(0,o.default)(t[r]));return s.indexOf(e)>=0}return"object"===i(t)?t.hasOwnProperty(e):!(!t||"function"!=typeof t.indexOf)&&t.indexOf(e)>=0};var n=s(r(3399)),o=s(r(5772));function s(e){return e&&e.__esModule?e:{default:e}}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}e.exports=t.default,e.exports.default=t.default},9285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r,n;(0,o.default)(e),"object"===s(t)?(r=t.min||0,n=t.max):(r=arguments[1]||0,n=arguments[2]);var i=e.match(/(\uFE0F|\uFE0E)/g)||[],a=e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g)||[],u=e.length-i.length-a.length;return u>=r&&(void 0===n||u<=n)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}e.exports=t.default,e.exports.default=t.default},9404:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function s(e,t,r){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var i;"object"==typeof e?e.exports=s:t.BN=s,s.BN=s,s.wordSize=26;try{i="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,o){for(var s=0,i=0,a=Math.min(e.length,r),u=t;u=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&i0?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.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 o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)i=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[s]|=i<>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===r)for(o=0,s=0;o>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this._strip()},s.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)o=u(e,t,n)<=18?(s-=18,i+=1,this.words[i]|=o>>>26):s+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(s-=18,i+=1,this.words[i]|=o>>>26):s+=8;this._strip()},s.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,o=1;o<=67108863;o*=t)n++;n--,o=o/t|0;for(var s=e.length-r,i=s%n,a=Math.min(s,s-i)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){s.prototype.inspect=d}else s.prototype.inspect=d;function d(){return(this.red?""}var h=["","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"],p=[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],f=[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 g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var o=0|e.words[0],s=0|t.words[0],i=o*s,a=67108863&i,u=i/67108864|0;r.words[0]=a;for(var c=1;c>>26,d=67108863&u,h=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=h;p++){var f=c-p|0;l+=(i=(o=0|e.words[f])*(s=0|t.words[p])+d)/67108864|0,d=67108863&i}r.words[c]=0|d,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}s.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var o=0,s=0,i=0;i>>24-o&16777215,(o+=2)>=26&&(o-=26,i--),r=0!==s||i!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==s&&(r=s.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=p[e],l=f[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modrn(l).toString(e);r=(d=d.idivn(l)).isZero()?g+r:h[c-g.length]+g+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")},s.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},s.prototype.toJSON=function(){return this.toString(16,2)},i&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,r){this._strip();var o=this.byteLength(),s=r||Math.max(1,o);n(o<=s,"byte array longer than desired length"),n(s>0,"Requested array length <= 0");var i=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,s);return this["_toArrayLike"+("le"===t?"LE":"BE")](i,o),i},s.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,o=0,s=0;o>8&255),r>16&255),6===s?(r>24&255),n=0,s=0):(n=i>>>24,s+=2)}if(r=0&&(e[r--]=i>>8&255),r>=0&&(e[r--]=i>>16&255),6===s?(r>=0&&(e[r--]=i>>24&255),n=0,s=0):(n=i>>>24,s+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.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},s.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},s.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.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 o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-r),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s>>26;for(;0!==o&&s>>26;if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;se.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(r=this,n=e):(r=e,n=this);for(var s=0,i=0;i>26,this.words[i]=67108863&t;for(;0!==s&&i>26,this.words[i]=67108863&t;if(0===s&&i>>13,p=0|i[1],f=8191&p,g=p>>>13,y=0|i[2],b=8191&y,m=y>>>13,T=0|i[3],v=8191&T,w=T>>>13,A=0|i[4],P=8191&A,W=A>>>13,B=0|i[5],C=8191&B,E=B>>>13,M=0|i[6],I=8191&M,F=M>>>13,O=0|i[7],S=8191&O,_=O>>>13,R=0|i[8],x=8191&R,N=R>>>13,k=0|i[9],U=8191&k,D=k>>>13,L=0|a[0],z=8191&L,j=L>>>13,$=0|a[1],V=8191&$,G=$>>>13,H=0|a[2],K=8191&H,Z=H>>>13,q=0|a[3],J=8191&q,Y=q>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,te=0|a[5],re=8191&te,ne=te>>>13,oe=0|a[6],se=8191&oe,ie=oe>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,le=0|a[8],de=8191&le,he=le>>>13,pe=0|a[9],fe=8191&pe,ge=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(c+(n=Math.imul(d,z))|0)+((8191&(o=(o=Math.imul(d,j))+Math.imul(h,z)|0))<<13)|0;c=((s=Math.imul(h,j))+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(f,z),o=(o=Math.imul(f,j))+Math.imul(g,z)|0,s=Math.imul(g,j);var be=(c+(n=n+Math.imul(d,V)|0)|0)+((8191&(o=(o=o+Math.imul(d,G)|0)+Math.imul(h,V)|0))<<13)|0;c=((s=s+Math.imul(h,G)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(b,z),o=(o=Math.imul(b,j))+Math.imul(m,z)|0,s=Math.imul(m,j),n=n+Math.imul(f,V)|0,o=(o=o+Math.imul(f,G)|0)+Math.imul(g,V)|0,s=s+Math.imul(g,G)|0;var me=(c+(n=n+Math.imul(d,K)|0)|0)+((8191&(o=(o=o+Math.imul(d,Z)|0)+Math.imul(h,K)|0))<<13)|0;c=((s=s+Math.imul(h,Z)|0)+(o>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(v,z),o=(o=Math.imul(v,j))+Math.imul(w,z)|0,s=Math.imul(w,j),n=n+Math.imul(b,V)|0,o=(o=o+Math.imul(b,G)|0)+Math.imul(m,V)|0,s=s+Math.imul(m,G)|0,n=n+Math.imul(f,K)|0,o=(o=o+Math.imul(f,Z)|0)+Math.imul(g,K)|0,s=s+Math.imul(g,Z)|0;var Te=(c+(n=n+Math.imul(d,J)|0)|0)+((8191&(o=(o=o+Math.imul(d,Y)|0)+Math.imul(h,J)|0))<<13)|0;c=((s=s+Math.imul(h,Y)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(P,z),o=(o=Math.imul(P,j))+Math.imul(W,z)|0,s=Math.imul(W,j),n=n+Math.imul(v,V)|0,o=(o=o+Math.imul(v,G)|0)+Math.imul(w,V)|0,s=s+Math.imul(w,G)|0,n=n+Math.imul(b,K)|0,o=(o=o+Math.imul(b,Z)|0)+Math.imul(m,K)|0,s=s+Math.imul(m,Z)|0,n=n+Math.imul(f,J)|0,o=(o=o+Math.imul(f,Y)|0)+Math.imul(g,J)|0,s=s+Math.imul(g,Y)|0;var ve=(c+(n=n+Math.imul(d,Q)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(h,Q)|0))<<13)|0;c=((s=s+Math.imul(h,ee)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(C,z),o=(o=Math.imul(C,j))+Math.imul(E,z)|0,s=Math.imul(E,j),n=n+Math.imul(P,V)|0,o=(o=o+Math.imul(P,G)|0)+Math.imul(W,V)|0,s=s+Math.imul(W,G)|0,n=n+Math.imul(v,K)|0,o=(o=o+Math.imul(v,Z)|0)+Math.imul(w,K)|0,s=s+Math.imul(w,Z)|0,n=n+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(m,J)|0,s=s+Math.imul(m,Y)|0,n=n+Math.imul(f,Q)|0,o=(o=o+Math.imul(f,ee)|0)+Math.imul(g,Q)|0,s=s+Math.imul(g,ee)|0;var we=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(o=(o=o+Math.imul(d,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((s=s+Math.imul(h,ne)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(I,z),o=(o=Math.imul(I,j))+Math.imul(F,z)|0,s=Math.imul(F,j),n=n+Math.imul(C,V)|0,o=(o=o+Math.imul(C,G)|0)+Math.imul(E,V)|0,s=s+Math.imul(E,G)|0,n=n+Math.imul(P,K)|0,o=(o=o+Math.imul(P,Z)|0)+Math.imul(W,K)|0,s=s+Math.imul(W,Z)|0,n=n+Math.imul(v,J)|0,o=(o=o+Math.imul(v,Y)|0)+Math.imul(w,J)|0,s=s+Math.imul(w,Y)|0,n=n+Math.imul(b,Q)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,ee)|0,n=n+Math.imul(f,re)|0,o=(o=o+Math.imul(f,ne)|0)+Math.imul(g,re)|0,s=s+Math.imul(g,ne)|0;var Ae=(c+(n=n+Math.imul(d,se)|0)|0)+((8191&(o=(o=o+Math.imul(d,ie)|0)+Math.imul(h,se)|0))<<13)|0;c=((s=s+Math.imul(h,ie)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(S,z),o=(o=Math.imul(S,j))+Math.imul(_,z)|0,s=Math.imul(_,j),n=n+Math.imul(I,V)|0,o=(o=o+Math.imul(I,G)|0)+Math.imul(F,V)|0,s=s+Math.imul(F,G)|0,n=n+Math.imul(C,K)|0,o=(o=o+Math.imul(C,Z)|0)+Math.imul(E,K)|0,s=s+Math.imul(E,Z)|0,n=n+Math.imul(P,J)|0,o=(o=o+Math.imul(P,Y)|0)+Math.imul(W,J)|0,s=s+Math.imul(W,Y)|0,n=n+Math.imul(v,Q)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(w,Q)|0,s=s+Math.imul(w,ee)|0,n=n+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ne)|0)+Math.imul(m,re)|0,s=s+Math.imul(m,ne)|0,n=n+Math.imul(f,se)|0,o=(o=o+Math.imul(f,ie)|0)+Math.imul(g,se)|0,s=s+Math.imul(g,ie)|0;var Pe=(c+(n=n+Math.imul(d,ue)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((s=s+Math.imul(h,ce)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(x,z),o=(o=Math.imul(x,j))+Math.imul(N,z)|0,s=Math.imul(N,j),n=n+Math.imul(S,V)|0,o=(o=o+Math.imul(S,G)|0)+Math.imul(_,V)|0,s=s+Math.imul(_,G)|0,n=n+Math.imul(I,K)|0,o=(o=o+Math.imul(I,Z)|0)+Math.imul(F,K)|0,s=s+Math.imul(F,Z)|0,n=n+Math.imul(C,J)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(E,J)|0,s=s+Math.imul(E,Y)|0,n=n+Math.imul(P,Q)|0,o=(o=o+Math.imul(P,ee)|0)+Math.imul(W,Q)|0,s=s+Math.imul(W,ee)|0,n=n+Math.imul(v,re)|0,o=(o=o+Math.imul(v,ne)|0)+Math.imul(w,re)|0,s=s+Math.imul(w,ne)|0,n=n+Math.imul(b,se)|0,o=(o=o+Math.imul(b,ie)|0)+Math.imul(m,se)|0,s=s+Math.imul(m,ie)|0,n=n+Math.imul(f,ue)|0,o=(o=o+Math.imul(f,ce)|0)+Math.imul(g,ue)|0,s=s+Math.imul(g,ce)|0;var We=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,he)|0)+Math.imul(h,de)|0))<<13)|0;c=((s=s+Math.imul(h,he)|0)+(o>>>13)|0)+(We>>>26)|0,We&=67108863,n=Math.imul(U,z),o=(o=Math.imul(U,j))+Math.imul(D,z)|0,s=Math.imul(D,j),n=n+Math.imul(x,V)|0,o=(o=o+Math.imul(x,G)|0)+Math.imul(N,V)|0,s=s+Math.imul(N,G)|0,n=n+Math.imul(S,K)|0,o=(o=o+Math.imul(S,Z)|0)+Math.imul(_,K)|0,s=s+Math.imul(_,Z)|0,n=n+Math.imul(I,J)|0,o=(o=o+Math.imul(I,Y)|0)+Math.imul(F,J)|0,s=s+Math.imul(F,Y)|0,n=n+Math.imul(C,Q)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(E,Q)|0,s=s+Math.imul(E,ee)|0,n=n+Math.imul(P,re)|0,o=(o=o+Math.imul(P,ne)|0)+Math.imul(W,re)|0,s=s+Math.imul(W,ne)|0,n=n+Math.imul(v,se)|0,o=(o=o+Math.imul(v,ie)|0)+Math.imul(w,se)|0,s=s+Math.imul(w,ie)|0,n=n+Math.imul(b,ue)|0,o=(o=o+Math.imul(b,ce)|0)+Math.imul(m,ue)|0,s=s+Math.imul(m,ce)|0,n=n+Math.imul(f,de)|0,o=(o=o+Math.imul(f,he)|0)+Math.imul(g,de)|0,s=s+Math.imul(g,he)|0;var Be=(c+(n=n+Math.imul(d,fe)|0)|0)+((8191&(o=(o=o+Math.imul(d,ge)|0)+Math.imul(h,fe)|0))<<13)|0;c=((s=s+Math.imul(h,ge)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(U,V),o=(o=Math.imul(U,G))+Math.imul(D,V)|0,s=Math.imul(D,G),n=n+Math.imul(x,K)|0,o=(o=o+Math.imul(x,Z)|0)+Math.imul(N,K)|0,s=s+Math.imul(N,Z)|0,n=n+Math.imul(S,J)|0,o=(o=o+Math.imul(S,Y)|0)+Math.imul(_,J)|0,s=s+Math.imul(_,Y)|0,n=n+Math.imul(I,Q)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(F,Q)|0,s=s+Math.imul(F,ee)|0,n=n+Math.imul(C,re)|0,o=(o=o+Math.imul(C,ne)|0)+Math.imul(E,re)|0,s=s+Math.imul(E,ne)|0,n=n+Math.imul(P,se)|0,o=(o=o+Math.imul(P,ie)|0)+Math.imul(W,se)|0,s=s+Math.imul(W,ie)|0,n=n+Math.imul(v,ue)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(w,ue)|0,s=s+Math.imul(w,ce)|0,n=n+Math.imul(b,de)|0,o=(o=o+Math.imul(b,he)|0)+Math.imul(m,de)|0,s=s+Math.imul(m,he)|0;var Ce=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(o=(o=o+Math.imul(f,ge)|0)+Math.imul(g,fe)|0))<<13)|0;c=((s=s+Math.imul(g,ge)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(U,K),o=(o=Math.imul(U,Z))+Math.imul(D,K)|0,s=Math.imul(D,Z),n=n+Math.imul(x,J)|0,o=(o=o+Math.imul(x,Y)|0)+Math.imul(N,J)|0,s=s+Math.imul(N,Y)|0,n=n+Math.imul(S,Q)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,ee)|0,n=n+Math.imul(I,re)|0,o=(o=o+Math.imul(I,ne)|0)+Math.imul(F,re)|0,s=s+Math.imul(F,ne)|0,n=n+Math.imul(C,se)|0,o=(o=o+Math.imul(C,ie)|0)+Math.imul(E,se)|0,s=s+Math.imul(E,ie)|0,n=n+Math.imul(P,ue)|0,o=(o=o+Math.imul(P,ce)|0)+Math.imul(W,ue)|0,s=s+Math.imul(W,ce)|0,n=n+Math.imul(v,de)|0,o=(o=o+Math.imul(v,he)|0)+Math.imul(w,de)|0,s=s+Math.imul(w,he)|0;var Ee=(c+(n=n+Math.imul(b,fe)|0)|0)+((8191&(o=(o=o+Math.imul(b,ge)|0)+Math.imul(m,fe)|0))<<13)|0;c=((s=s+Math.imul(m,ge)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,J),o=(o=Math.imul(U,Y))+Math.imul(D,J)|0,s=Math.imul(D,Y),n=n+Math.imul(x,Q)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(N,Q)|0,s=s+Math.imul(N,ee)|0,n=n+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ne)|0)+Math.imul(_,re)|0,s=s+Math.imul(_,ne)|0,n=n+Math.imul(I,se)|0,o=(o=o+Math.imul(I,ie)|0)+Math.imul(F,se)|0,s=s+Math.imul(F,ie)|0,n=n+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,ce)|0)+Math.imul(E,ue)|0,s=s+Math.imul(E,ce)|0,n=n+Math.imul(P,de)|0,o=(o=o+Math.imul(P,he)|0)+Math.imul(W,de)|0,s=s+Math.imul(W,he)|0;var Me=(c+(n=n+Math.imul(v,fe)|0)|0)+((8191&(o=(o=o+Math.imul(v,ge)|0)+Math.imul(w,fe)|0))<<13)|0;c=((s=s+Math.imul(w,ge)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(U,Q),o=(o=Math.imul(U,ee))+Math.imul(D,Q)|0,s=Math.imul(D,ee),n=n+Math.imul(x,re)|0,o=(o=o+Math.imul(x,ne)|0)+Math.imul(N,re)|0,s=s+Math.imul(N,ne)|0,n=n+Math.imul(S,se)|0,o=(o=o+Math.imul(S,ie)|0)+Math.imul(_,se)|0,s=s+Math.imul(_,ie)|0,n=n+Math.imul(I,ue)|0,o=(o=o+Math.imul(I,ce)|0)+Math.imul(F,ue)|0,s=s+Math.imul(F,ce)|0,n=n+Math.imul(C,de)|0,o=(o=o+Math.imul(C,he)|0)+Math.imul(E,de)|0,s=s+Math.imul(E,he)|0;var Ie=(c+(n=n+Math.imul(P,fe)|0)|0)+((8191&(o=(o=o+Math.imul(P,ge)|0)+Math.imul(W,fe)|0))<<13)|0;c=((s=s+Math.imul(W,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,re),o=(o=Math.imul(U,ne))+Math.imul(D,re)|0,s=Math.imul(D,ne),n=n+Math.imul(x,se)|0,o=(o=o+Math.imul(x,ie)|0)+Math.imul(N,se)|0,s=s+Math.imul(N,ie)|0,n=n+Math.imul(S,ue)|0,o=(o=o+Math.imul(S,ce)|0)+Math.imul(_,ue)|0,s=s+Math.imul(_,ce)|0,n=n+Math.imul(I,de)|0,o=(o=o+Math.imul(I,he)|0)+Math.imul(F,de)|0,s=s+Math.imul(F,he)|0;var Fe=(c+(n=n+Math.imul(C,fe)|0)|0)+((8191&(o=(o=o+Math.imul(C,ge)|0)+Math.imul(E,fe)|0))<<13)|0;c=((s=s+Math.imul(E,ge)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,n=Math.imul(U,se),o=(o=Math.imul(U,ie))+Math.imul(D,se)|0,s=Math.imul(D,ie),n=n+Math.imul(x,ue)|0,o=(o=o+Math.imul(x,ce)|0)+Math.imul(N,ue)|0,s=s+Math.imul(N,ce)|0,n=n+Math.imul(S,de)|0,o=(o=o+Math.imul(S,he)|0)+Math.imul(_,de)|0,s=s+Math.imul(_,he)|0;var Oe=(c+(n=n+Math.imul(I,fe)|0)|0)+((8191&(o=(o=o+Math.imul(I,ge)|0)+Math.imul(F,fe)|0))<<13)|0;c=((s=s+Math.imul(F,ge)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,ue),o=(o=Math.imul(U,ce))+Math.imul(D,ue)|0,s=Math.imul(D,ce),n=n+Math.imul(x,de)|0,o=(o=o+Math.imul(x,he)|0)+Math.imul(N,de)|0,s=s+Math.imul(N,he)|0;var Se=(c+(n=n+Math.imul(S,fe)|0)|0)+((8191&(o=(o=o+Math.imul(S,ge)|0)+Math.imul(_,fe)|0))<<13)|0;c=((s=s+Math.imul(_,ge)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(U,de),o=(o=Math.imul(U,he))+Math.imul(D,de)|0,s=Math.imul(D,he);var _e=(c+(n=n+Math.imul(x,fe)|0)|0)+((8191&(o=(o=o+Math.imul(x,ge)|0)+Math.imul(N,fe)|0))<<13)|0;c=((s=s+Math.imul(N,ge)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863;var Re=(c+(n=Math.imul(U,fe))|0)+((8191&(o=(o=Math.imul(U,ge))+Math.imul(D,fe)|0))<<13)|0;return c=((s=Math.imul(D,ge))+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,u[0]=ye,u[1]=be,u[2]=me,u[3]=Te,u[4]=ve,u[5]=we,u[6]=Ae,u[7]=Pe,u[8]=We,u[9]=Be,u[10]=Ce,u[11]=Ee,u[12]=Me,u[13]=Ie,u[14]=Fe,u[15]=Oe,u[16]=Se,u[17]=_e,u[18]=Re,0!==c&&(u[19]=c,r.length++),r};function b(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,s=0;s>>26)|0)>>>26,i&=67108863}r.words[s]=a,n=i,i=o}return 0!==n?r.words[s]=n:r.length--,r._strip()}function m(e,t,r){return b(e,t,r)}function T(e,t){this.x=e,this.y=t}Math.imul||(y=g),s.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?y(this,e,t):r<63?g(this,e,t):r<1024?b(this,e,t):m(this,e,t)},T.prototype.makeRBT=function(e){for(var t=new Array(e),r=s.prototype._countBits(e)-1,n=0;n>=1;return n},T.prototype.permute=function(e,t,r,n,o,s){for(var i=0;i>>=1)o++;return 1<>>=13,r[2*i+1]=8191&s,s>>>=13;for(i=2*t;i>=26,r+=s/67108864|0,r+=i>>>26,this.words[o]=67108863&i}return 0!==r&&(this.words[o]=r,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>o&1}return t}(e);if(0===t.length)return new s(1);for(var r=this,n=0;n=0);var t,r=e%26,o=(e-r)/26,s=67108863>>>26-r<<26-r;if(0!==r){var i=0;for(t=0;t>>26-r}i&&(this.words[t]=i,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var s=e%26,i=Math.min((e-s)/26,this.length),a=67108863^67108863>>>s<i)for(this.length-=i,c=0;c=0&&(0!==l||c>=o);c--){var d=0|this.words[c];this.words[c]=l<<26-s|d>>>s,l=d&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,o=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var o=67108863^67108863>>>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},s.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>26)-(u/67108864|0),this.words[o+r]=67108863&s}for(;o>26,this.words[o+r]=67108863&s;if(0===a)return this._strip();for(n(-1===a),a=0,o=0;o>26,this.words[o]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,i=0|o.words[o.length-1];0!=(r=26-this._countBits(i))&&(o=o.ushln(r),n.iushln(r),i=0|o.words[o.length-1]);var a,u=n.length-o.length;if("mod"!==t){(a=new s(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c=0;d--){var h=67108864*(0|n.words[o.length+d])+(0|n.words[o.length+d-1]);for(h=Math.min(h/i|0,67108863),n._ishlnsubmul(o,h,d);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(o,1,d),n.isZero()||(n.negative^=1);a&&(a.words[d]=h)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},s.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(o=a.div.neg()),"div"!==t&&(i=a.mod.neg(),r&&0!==i.negative&&i.iadd(e)),{div:o,mod:i}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(o=a.div.neg()),{div:o,mod:a.mod}):this.negative&e.negative?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(i=a.mod.neg(),r&&0!==i.negative&&i.isub(e)),{div:a.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var o,i,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.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),o=e.andln(1),s=r.cmp(n);return s<0||1===o&&0===s?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,o=0,s=this.length-1;s>=0;s--)o=(r*o+(0|this.words[s]))%e;return t?-o:o},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,o=this.length-1;o>=0;o--){var s=(0|this.words[o])+67108864*r;this.words[o]=s/e|0,r=s%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.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 o=new s(1),i=new s(0),a=new s(0),u=new s(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),d=t.clone();!t.isZero();){for(var h=0,p=1;!(t.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(o.isOdd()||i.isOdd())&&(o.iadd(l),i.isub(d)),o.iushrn(1),i.iushrn(1);for(var f=0,g=1;!(r.words[0]&g)&&f<26;++f,g<<=1);if(f>0)for(r.iushrn(f);f-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(d)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(a),i.isub(u)):(r.isub(t),a.isub(o),u.isub(i))}return{a,b:u,gcd:r.iushln(c)}},s.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,i=new s(1),a=new s(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;!(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)i.isOdd()&&i.iadd(u),i.iushrn(1);for(var d=0,h=1;!(r.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(r.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a)):(r.isub(t),a.isub(i))}return(o=0===t.cmpn(1)?i:a).cmpn(0)<0&&o.iadd(e),o},s.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 o=t.cmp(r);if(o<0){var s=t;t=r,r=s}else if(0===o||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return!(1&this.words[0])},s.prototype.isOdd=function(){return!(1&~this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,o=1<>>26,a&=67108863,this.words[i]=a}return 0!==s&&(this.words[i]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.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 o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;r--){var n=0|this.words[r],o=0|e.words[r];if(n!==o){no&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return this.cmpn(e)>=0},s.prototype.gte=function(e){return this.cmp(e)>=0},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new C(e)},s.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)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function w(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function W(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){if("string"==typeof e){var t=s._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 E(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(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 s(null);return e.words=new 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=t0?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)},o(A,w),A.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),o=0;o>>22,s=i}s>>>=22,e.words[o-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},A.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>>=26,e.words[r]=o,t=n}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new A;else if("p224"===e)t=new P;else if("p192"===e)t=new W;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new B}return v[e]=t,t},C.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.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)},C.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},C.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},C.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.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 s(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),i=0;!o.isZero()&&0===o.andln(1);)i++,o.iushrn(1);n(!o.isZero());var a=new s(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new s(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var d=this.pow(l,o),h=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),f=i;0!==p.cmp(a);){for(var g=p,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var d=c>>l&1;o!==r[0]&&(o=this.sqr(o)),0!==d||0!==i?(i<<=1,i|=d,(4==++a||0===n&&0===l)&&(o=this.mul(o,r[i]),a=0,i=0)):a=0}u=26}return o},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},s.mont=function(e){return new E(e)},o(E,C),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.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),o=r.isub(n).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new s(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},9517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,o.default)(t,c)).require_display_name||t.allow_display_name){var r=e.match(l);if(r){var u=r[1];if(e=e.replace(u,"").replace(/(^<|>$)/g,""),u.endsWith(" ")&&(u=u.slice(0,-1)),!function(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;if(/[\.";<>]/.test(t)){if(t===e)return!1;if(t.split('"').length!==t.split('\\"').length)return!1}return!0}(u))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>y)return!1;var b=e.split("@"),m=b.pop(),T=m.toLowerCase();if(t.host_blacklist.includes(T))return!1;if(t.host_whitelist.length>0&&!t.host_whitelist.includes(T))return!1;var v=b.join("@");if(t.domain_specific_validation&&("gmail.com"===T||"googlemail.com"===T)){var w=(v=v.toLowerCase()).split("+")[0];if(!(0,s.default)(w.replace(/\./g,""),{min:6,max:30}))return!1;for(var A=w.split("."),P=0;P{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)},t.halfWidth=void 0;var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;t.halfWidth=s},9540:(e,t,r)=>{var n=r(4172),o=n,s="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof window&&window||void 0!==s&&s||"undefined"!=typeof self&&self||function(){return this}.call(null)||Function("return this")();o.exportSymbol("TronWebProto.AssetIssueContract",null,s),o.exportSymbol("TronWebProto.AssetIssueContract.FrozenSupply",null,s),o.exportSymbol("TronWebProto.ParticipateAssetIssueContract",null,s),o.exportSymbol("TronWebProto.TransferAssetContract",null,s),o.exportSymbol("TronWebProto.UnfreezeAssetContract",null,s),o.exportSymbol("TronWebProto.UpdateAssetContract",null,s),TronWebProto.AssetIssueContract=function(e){n.Message.initialize(this,e,0,-1,TronWebProto.AssetIssueContract.repeatedFields_,null)},o.inherits(TronWebProto.AssetIssueContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AssetIssueContract.displayName="TronWebProto.AssetIssueContract"),TronWebProto.AssetIssueContract.FrozenSupply=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.AssetIssueContract.FrozenSupply,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.AssetIssueContract.FrozenSupply.displayName="TronWebProto.AssetIssueContract.FrozenSupply"),TronWebProto.TransferAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.TransferAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.TransferAssetContract.displayName="TronWebProto.TransferAssetContract"),TronWebProto.UnfreezeAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UnfreezeAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UnfreezeAssetContract.displayName="TronWebProto.UnfreezeAssetContract"),TronWebProto.UpdateAssetContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.UpdateAssetContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.UpdateAssetContract.displayName="TronWebProto.UpdateAssetContract"),TronWebProto.ParticipateAssetIssueContract=function(e){n.Message.initialize(this,e,0,-1,null,null)},o.inherits(TronWebProto.ParticipateAssetIssueContract,n.Message),o.DEBUG&&!COMPILED&&(TronWebProto.ParticipateAssetIssueContract.displayName="TronWebProto.ParticipateAssetIssueContract"),TronWebProto.AssetIssueContract.repeatedFields_=[5],n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AssetIssueContract.prototype.toObject=function(e){return TronWebProto.AssetIssueContract.toObject(e,this)},TronWebProto.AssetIssueContract.toObject=function(e,t){var r={id:n.Message.getFieldWithDefault(t,41,""),ownerAddress:t.getOwnerAddress_asB64(),name:t.getName_asB64(),abbr:t.getAbbr_asB64(),totalSupply:n.Message.getFieldWithDefault(t,4,0),frozenSupplyList:n.Message.toObjectList(t.getFrozenSupplyList(),TronWebProto.AssetIssueContract.FrozenSupply.toObject,e),trxNum:n.Message.getFieldWithDefault(t,6,0),precision:n.Message.getFieldWithDefault(t,7,0),num:n.Message.getFieldWithDefault(t,8,0),startTime:n.Message.getFieldWithDefault(t,9,0),endTime:n.Message.getFieldWithDefault(t,10,0),order:n.Message.getFieldWithDefault(t,11,0),voteScore:n.Message.getFieldWithDefault(t,16,0),description:t.getDescription_asB64(),url:t.getUrl_asB64(),freeAssetNetLimit:n.Message.getFieldWithDefault(t,22,0),publicFreeAssetNetLimit:n.Message.getFieldWithDefault(t,23,0),publicFreeAssetNetUsage:n.Message.getFieldWithDefault(t,24,0),publicLatestFreeNetTime:n.Message.getFieldWithDefault(t,25,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AssetIssueContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AssetIssueContract;return TronWebProto.AssetIssueContract.deserializeBinaryFromReader(r,t)},TronWebProto.AssetIssueContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 41:var r=t.readString();e.setId(r);break;case 1:r=t.readBytes(),e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setName(r);break;case 3:r=t.readBytes(),e.setAbbr(r);break;case 4:r=t.readInt64(),e.setTotalSupply(r);break;case 5:r=new TronWebProto.AssetIssueContract.FrozenSupply,t.readMessage(r,TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader),e.addFrozenSupply(r);break;case 6:r=t.readInt32(),e.setTrxNum(r);break;case 7:r=t.readInt32(),e.setPrecision(r);break;case 8:r=t.readInt32(),e.setNum(r);break;case 9:r=t.readInt64(),e.setStartTime(r);break;case 10:r=t.readInt64(),e.setEndTime(r);break;case 11:r=t.readInt64(),e.setOrder(r);break;case 16:r=t.readInt32(),e.setVoteScore(r);break;case 20:r=t.readBytes(),e.setDescription(r);break;case 21:r=t.readBytes(),e.setUrl(r);break;case 22:r=t.readInt64(),e.setFreeAssetNetLimit(r);break;case 23:r=t.readInt64(),e.setPublicFreeAssetNetLimit(r);break;case 24:r=t.readInt64(),e.setPublicFreeAssetNetUsage(r);break;case 25:r=t.readInt64(),e.setPublicLatestFreeNetTime(r);break;default:t.skipField()}return e},TronWebProto.AssetIssueContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AssetIssueContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AssetIssueContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getId()).length>0&&t.writeString(41,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getName_asU8()).length>0&&t.writeBytes(2,r),(r=e.getAbbr_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getTotalSupply())&&t.writeInt64(4,r),(r=e.getFrozenSupplyList()).length>0&&t.writeRepeatedMessage(5,r,TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter),0!==(r=e.getTrxNum())&&t.writeInt32(6,r),0!==(r=e.getPrecision())&&t.writeInt32(7,r),0!==(r=e.getNum())&&t.writeInt32(8,r),0!==(r=e.getStartTime())&&t.writeInt64(9,r),0!==(r=e.getEndTime())&&t.writeInt64(10,r),0!==(r=e.getOrder())&&t.writeInt64(11,r),0!==(r=e.getVoteScore())&&t.writeInt32(16,r),(r=e.getDescription_asU8()).length>0&&t.writeBytes(20,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(21,r),0!==(r=e.getFreeAssetNetLimit())&&t.writeInt64(22,r),0!==(r=e.getPublicFreeAssetNetLimit())&&t.writeInt64(23,r),0!==(r=e.getPublicFreeAssetNetUsage())&&t.writeInt64(24,r),0!==(r=e.getPublicLatestFreeNetTime())&&t.writeInt64(25,r)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.AssetIssueContract.FrozenSupply.prototype.toObject=function(e){return TronWebProto.AssetIssueContract.FrozenSupply.toObject(e,this)},TronWebProto.AssetIssueContract.FrozenSupply.toObject=function(e,t){var r={frozenAmount:n.Message.getFieldWithDefault(t,1,0),frozenDays:n.Message.getFieldWithDefault(t,2,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.AssetIssueContract.FrozenSupply;return TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader(r,t)},TronWebProto.AssetIssueContract.FrozenSupply.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readInt64();e.setFrozenAmount(r);break;case 2:r=t.readInt64(),e.setFrozenDays(r);break;default:t.skipField()}return e},TronWebProto.AssetIssueContract.FrozenSupply.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.AssetIssueContract.FrozenSupply.serializeBinaryToWriter=function(e,t){var r=void 0;0!==(r=e.getFrozenAmount())&&t.writeInt64(1,r),0!==(r=e.getFrozenDays())&&t.writeInt64(2,r)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenAmount=function(){return n.Message.getFieldWithDefault(this,1,0)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenAmount=function(e){return n.Message.setProto3IntField(this,1,e)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.getFrozenDays=function(){return n.Message.getFieldWithDefault(this,2,0)},TronWebProto.AssetIssueContract.FrozenSupply.prototype.setFrozenDays=function(e){return n.Message.setProto3IntField(this,2,e)},TronWebProto.AssetIssueContract.prototype.getId=function(){return n.Message.getFieldWithDefault(this,41,"")},TronWebProto.AssetIssueContract.prototype.setId=function(e){return n.Message.setProto3StringField(this,41,e)},TronWebProto.AssetIssueContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.AssetIssueContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.AssetIssueContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.AssetIssueContract.prototype.getName=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.AssetIssueContract.prototype.getName_asB64=function(){return n.Message.bytesAsB64(this.getName())},TronWebProto.AssetIssueContract.prototype.getName_asU8=function(){return n.Message.bytesAsU8(this.getName())},TronWebProto.AssetIssueContract.prototype.setName=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.AssetIssueContract.prototype.getAbbr=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.AssetIssueContract.prototype.getAbbr_asB64=function(){return n.Message.bytesAsB64(this.getAbbr())},TronWebProto.AssetIssueContract.prototype.getAbbr_asU8=function(){return n.Message.bytesAsU8(this.getAbbr())},TronWebProto.AssetIssueContract.prototype.setAbbr=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.AssetIssueContract.prototype.getTotalSupply=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.AssetIssueContract.prototype.setTotalSupply=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.AssetIssueContract.prototype.getFrozenSupplyList=function(){return n.Message.getRepeatedWrapperField(this,TronWebProto.AssetIssueContract.FrozenSupply,5)},TronWebProto.AssetIssueContract.prototype.setFrozenSupplyList=function(e){return n.Message.setRepeatedWrapperField(this,5,e)},TronWebProto.AssetIssueContract.prototype.addFrozenSupply=function(e,t){return n.Message.addToRepeatedWrapperField(this,5,e,TronWebProto.AssetIssueContract.FrozenSupply,t)},TronWebProto.AssetIssueContract.prototype.clearFrozenSupplyList=function(){return this.setFrozenSupplyList([])},TronWebProto.AssetIssueContract.prototype.getTrxNum=function(){return n.Message.getFieldWithDefault(this,6,0)},TronWebProto.AssetIssueContract.prototype.setTrxNum=function(e){return n.Message.setProto3IntField(this,6,e)},TronWebProto.AssetIssueContract.prototype.getPrecision=function(){return n.Message.getFieldWithDefault(this,7,0)},TronWebProto.AssetIssueContract.prototype.setPrecision=function(e){return n.Message.setProto3IntField(this,7,e)},TronWebProto.AssetIssueContract.prototype.getNum=function(){return n.Message.getFieldWithDefault(this,8,0)},TronWebProto.AssetIssueContract.prototype.setNum=function(e){return n.Message.setProto3IntField(this,8,e)},TronWebProto.AssetIssueContract.prototype.getStartTime=function(){return n.Message.getFieldWithDefault(this,9,0)},TronWebProto.AssetIssueContract.prototype.setStartTime=function(e){return n.Message.setProto3IntField(this,9,e)},TronWebProto.AssetIssueContract.prototype.getEndTime=function(){return n.Message.getFieldWithDefault(this,10,0)},TronWebProto.AssetIssueContract.prototype.setEndTime=function(e){return n.Message.setProto3IntField(this,10,e)},TronWebProto.AssetIssueContract.prototype.getOrder=function(){return n.Message.getFieldWithDefault(this,11,0)},TronWebProto.AssetIssueContract.prototype.setOrder=function(e){return n.Message.setProto3IntField(this,11,e)},TronWebProto.AssetIssueContract.prototype.getVoteScore=function(){return n.Message.getFieldWithDefault(this,16,0)},TronWebProto.AssetIssueContract.prototype.setVoteScore=function(e){return n.Message.setProto3IntField(this,16,e)},TronWebProto.AssetIssueContract.prototype.getDescription=function(){return n.Message.getFieldWithDefault(this,20,"")},TronWebProto.AssetIssueContract.prototype.getDescription_asB64=function(){return n.Message.bytesAsB64(this.getDescription())},TronWebProto.AssetIssueContract.prototype.getDescription_asU8=function(){return n.Message.bytesAsU8(this.getDescription())},TronWebProto.AssetIssueContract.prototype.setDescription=function(e){return n.Message.setProto3BytesField(this,20,e)},TronWebProto.AssetIssueContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,21,"")},TronWebProto.AssetIssueContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.AssetIssueContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.AssetIssueContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,21,e)},TronWebProto.AssetIssueContract.prototype.getFreeAssetNetLimit=function(){return n.Message.getFieldWithDefault(this,22,0)},TronWebProto.AssetIssueContract.prototype.setFreeAssetNetLimit=function(e){return n.Message.setProto3IntField(this,22,e)},TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetLimit=function(){return n.Message.getFieldWithDefault(this,23,0)},TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetLimit=function(e){return n.Message.setProto3IntField(this,23,e)},TronWebProto.AssetIssueContract.prototype.getPublicFreeAssetNetUsage=function(){return n.Message.getFieldWithDefault(this,24,0)},TronWebProto.AssetIssueContract.prototype.setPublicFreeAssetNetUsage=function(e){return n.Message.setProto3IntField(this,24,e)},TronWebProto.AssetIssueContract.prototype.getPublicLatestFreeNetTime=function(){return n.Message.getFieldWithDefault(this,25,0)},TronWebProto.AssetIssueContract.prototype.setPublicLatestFreeNetTime=function(e){return n.Message.setProto3IntField(this,25,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.TransferAssetContract.prototype.toObject=function(e){return TronWebProto.TransferAssetContract.toObject(e,this)},TronWebProto.TransferAssetContract.toObject=function(e,t){var r={assetName:t.getAssetName_asB64(),ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),amount:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.TransferAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.TransferAssetContract;return TronWebProto.TransferAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.TransferAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setAssetName(r);break;case 2:r=t.readBytes(),e.setOwnerAddress(r);break;case 3:r=t.readBytes(),e.setToAddress(r);break;case 4:r=t.readInt64(),e.setAmount(r);break;default:t.skipField()}return e},TronWebProto.TransferAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.TransferAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.TransferAssetContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getAssetName_asU8()).length>0&&t.writeBytes(1,r),(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getAmount())&&t.writeInt64(4,r)},TronWebProto.TransferAssetContract.prototype.getAssetName=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.TransferAssetContract.prototype.getAssetName_asB64=function(){return n.Message.bytesAsB64(this.getAssetName())},TronWebProto.TransferAssetContract.prototype.getAssetName_asU8=function(){return n.Message.bytesAsU8(this.getAssetName())},TronWebProto.TransferAssetContract.prototype.setAssetName=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.TransferAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.TransferAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.TransferAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.TransferAssetContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.TransferAssetContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.TransferAssetContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.TransferAssetContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.TransferAssetContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.TransferAssetContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,4,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UnfreezeAssetContract.prototype.toObject=function(e){return TronWebProto.UnfreezeAssetContract.toObject(e,this)},TronWebProto.UnfreezeAssetContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64()};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UnfreezeAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UnfreezeAssetContract;return TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.UnfreezeAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)if(1===t.getFieldNumber()){var r=t.readBytes();e.setOwnerAddress(r)}else t.skipField();return e},TronWebProto.UnfreezeAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UnfreezeAssetContract.serializeBinaryToWriter=function(e,t){var r;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r)},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UnfreezeAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UnfreezeAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.UpdateAssetContract.prototype.toObject=function(e){return TronWebProto.UpdateAssetContract.toObject(e,this)},TronWebProto.UpdateAssetContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),description:t.getDescription_asB64(),url:t.getUrl_asB64(),newLimit:n.Message.getFieldWithDefault(t,4,0),newPublicLimit:n.Message.getFieldWithDefault(t,5,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.UpdateAssetContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.UpdateAssetContract;return TronWebProto.UpdateAssetContract.deserializeBinaryFromReader(r,t)},TronWebProto.UpdateAssetContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setDescription(r);break;case 3:r=t.readBytes(),e.setUrl(r);break;case 4:r=t.readInt64(),e.setNewLimit(r);break;case 5:r=t.readInt64(),e.setNewPublicLimit(r);break;default:t.skipField()}return e},TronWebProto.UpdateAssetContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.UpdateAssetContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.UpdateAssetContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getDescription_asU8()).length>0&&t.writeBytes(2,r),(r=e.getUrl_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getNewLimit())&&t.writeInt64(4,r),0!==(r=e.getNewPublicLimit())&&t.writeInt64(5,r)},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.UpdateAssetContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.UpdateAssetContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.UpdateAssetContract.prototype.getDescription=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.UpdateAssetContract.prototype.getDescription_asB64=function(){return n.Message.bytesAsB64(this.getDescription())},TronWebProto.UpdateAssetContract.prototype.getDescription_asU8=function(){return n.Message.bytesAsU8(this.getDescription())},TronWebProto.UpdateAssetContract.prototype.setDescription=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.UpdateAssetContract.prototype.getUrl=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.UpdateAssetContract.prototype.getUrl_asB64=function(){return n.Message.bytesAsB64(this.getUrl())},TronWebProto.UpdateAssetContract.prototype.getUrl_asU8=function(){return n.Message.bytesAsU8(this.getUrl())},TronWebProto.UpdateAssetContract.prototype.setUrl=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.UpdateAssetContract.prototype.getNewLimit=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.UpdateAssetContract.prototype.setNewLimit=function(e){return n.Message.setProto3IntField(this,4,e)},TronWebProto.UpdateAssetContract.prototype.getNewPublicLimit=function(){return n.Message.getFieldWithDefault(this,5,0)},TronWebProto.UpdateAssetContract.prototype.setNewPublicLimit=function(e){return n.Message.setProto3IntField(this,5,e)},n.Message.GENERATE_TO_OBJECT&&(TronWebProto.ParticipateAssetIssueContract.prototype.toObject=function(e){return TronWebProto.ParticipateAssetIssueContract.toObject(e,this)},TronWebProto.ParticipateAssetIssueContract.toObject=function(e,t){var r={ownerAddress:t.getOwnerAddress_asB64(),toAddress:t.getToAddress_asB64(),assetName:t.getAssetName_asB64(),amount:n.Message.getFieldWithDefault(t,4,0)};return e&&(r.$jspbMessageInstance=t),r}),TronWebProto.ParticipateAssetIssueContract.deserializeBinary=function(e){var t=new n.BinaryReader(e),r=new TronWebProto.ParticipateAssetIssueContract;return TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader(r,t)},TronWebProto.ParticipateAssetIssueContract.deserializeBinaryFromReader=function(e,t){for(;t.nextField()&&!t.isEndGroup();)switch(t.getFieldNumber()){case 1:var r=t.readBytes();e.setOwnerAddress(r);break;case 2:r=t.readBytes(),e.setToAddress(r);break;case 3:r=t.readBytes(),e.setAssetName(r);break;case 4:r=t.readInt64(),e.setAmount(r);break;default:t.skipField()}return e},TronWebProto.ParticipateAssetIssueContract.prototype.serializeBinary=function(){var e=new n.BinaryWriter;return TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter(this,e),e.getResultBuffer()},TronWebProto.ParticipateAssetIssueContract.serializeBinaryToWriter=function(e,t){var r=void 0;(r=e.getOwnerAddress_asU8()).length>0&&t.writeBytes(1,r),(r=e.getToAddress_asU8()).length>0&&t.writeBytes(2,r),(r=e.getAssetName_asU8()).length>0&&t.writeBytes(3,r),0!==(r=e.getAmount())&&t.writeInt64(4,r)},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress=function(){return n.Message.getFieldWithDefault(this,1,"")},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asB64=function(){return n.Message.bytesAsB64(this.getOwnerAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.getOwnerAddress_asU8=function(){return n.Message.bytesAsU8(this.getOwnerAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.setOwnerAddress=function(e){return n.Message.setProto3BytesField(this,1,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress=function(){return n.Message.getFieldWithDefault(this,2,"")},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asB64=function(){return n.Message.bytesAsB64(this.getToAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.getToAddress_asU8=function(){return n.Message.bytesAsU8(this.getToAddress())},TronWebProto.ParticipateAssetIssueContract.prototype.setToAddress=function(e){return n.Message.setProto3BytesField(this,2,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName=function(){return n.Message.getFieldWithDefault(this,3,"")},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asB64=function(){return n.Message.bytesAsB64(this.getAssetName())},TronWebProto.ParticipateAssetIssueContract.prototype.getAssetName_asU8=function(){return n.Message.bytesAsU8(this.getAssetName())},TronWebProto.ParticipateAssetIssueContract.prototype.setAssetName=function(e){return n.Message.setProto3BytesField(this,3,e)},TronWebProto.ParticipateAssetIssueContract.prototype.getAmount=function(){return n.Message.getFieldWithDefault(this,4,0)},TronWebProto.ParticipateAssetIssueContract.prototype.setAmount=function(e){return n.Message.setProto3IntField(this,4,e)},o.object.extend(t,TronWebProto)},9546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^(0o)?[0-7]+$/i;e.exports=t.default,e.exports.default=t.default},9666:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)},t.fullWidth=void 0;var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;t.fullWidth=s},9717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,r){(0,o.default)(t);var n=String((null==r?void 0:r.version)||r);if(!(null!=r&&r.version||r))return e(t,{version:10})||e(t,{version:13});var u=t.replace(/[\s-]+/g,""),c=0;if("10"===n){if(!s.test(u))return!1;for(var l=0;l{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),s.test(e)};var n,o=(n=r(3399))&&n.__esModule?n:{default:n},s=/^[a-f0-9]{32}$/;e.exports=t.default,e.exports.default=t.default},9790:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,o.default)(e),e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">").replace(/\//g,"/").replace(/\\/g,"\").replace(/`/g,"`")};var n,o=(n=r(3399))&&n.__esModule?n:{default:n};e.exports=t.default,e.exports.default=t.default},9841:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,n.default)(e),s.test(e)};var n=o(r(3399));function o(e){return e&&e.__esModule?e:{default:e}}var s=(0,o(r(5730)).default)(["^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)","(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))","?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$"],"i");e.exports=t.default,e.exports.default=t.default}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}r.amdO={},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};return(()=>{"use strict";r.d(n,{default:()=>bg});var e={};r.r(e),r.d(e,{hasBrowserEnv:()=>Te,hasStandardBrowserEnv:()=>we,hasStandardBrowserWebWorkerEnv:()=>Ae,navigator:()=>ve,origin:()=>Pe});var t={};r.r(t),r.d(t,{base64DecodeFromString:()=>Ot,base64EncodeToString:()=>St,byte2hexStr:()=>Et,byteArray2hexStr:()=>Ft,bytesToString:()=>Mt,hextoString:()=>It});var o={};r.r(o),r.d(o,{arrayEquals:()=>Dt,base64DecodeFromString:()=>Ot,base64EncodeToString:()=>St,bin2String:()=>Ut,byte2hexStr:()=>Et,byteArray2hexStr:()=>Ft,bytesToString:()=>Mt,getStringType:()=>Ht,hexChar2byte:()=>zt,hexStr2byteArray:()=>$t,hextoString:()=>It,isHexChar:()=>jt,isNumber:()=>Gt,strToDate:()=>Vt,stringToBytes:()=>Lt});var s={};r.r(s),r.d(s,{decode58:()=>Yt,encode58:()=>Jt});var i={};r.r(i),r.d(i,{OG:()=>rs,My:()=>Ko,Ph:()=>Jo,lX:()=>Yo,Id:()=>ts,fg:()=>ss,qj:()=>es,aT:()=>qo,lq:()=>Xo,z:()=>Qo,Q5:()=>as});var a={};r.r(a),r.d(a,{AbiCoder:()=>Yi,FormatTypes:()=>Kl,Interface:()=>$l,Mnemonic:()=>Oo,Signature:()=>$r,SigningKey:()=>zs,Wordlist:()=>Po,arrayify:()=>Hl,concat:()=>Tr,ethersHDNodeWallet:()=>Lc,ethersWallet:()=>Gc,id:()=>vo,isValidMnemonic:()=>Zl,joinSignature:()=>Gl,keccak256:()=>To,recoverAddress:()=>$s,sha256:()=>Vn,splitSignature:()=>Vl,toUtf8Bytes:()=>Xn,toUtf8String:()=>Qn,wordlists:()=>Hc});var u={};r.r(u),r.d(u,{ECKeySign:()=>Ed,SHA256:()=>Md,_signTypedData:()=>yd,arrayToBase64String:()=>fd,computeAddress:()=>Td,decode58Check:()=>wd,decodeBase58Address:()=>dd,ecRecover:()=>pd,genPriKey:()=>md,getAddressFromPriKey:()=>vd,getAddressFromPriKeyBase64String:()=>Bd,getBase58CheckAddress:()=>ld,getBase58CheckAddressFromPriKeyBase64String:()=>Pd,getHexStrAddressFromPriKeyBase64String:()=>Wd,getPubKeyFromPriKey:()=>Cd,getRowBytesFromTransactionBase64:()=>bd,isAddressValid:()=>Ad,passwordToAddress:()=>Id,pkToAddress:()=>Fd,signBytes:()=>gd,signTransaction:()=>hd});var c={};r.r(c),r.d(c,{generateAccount:()=>Sd,generateAccountWithMnemonic:()=>Rd,generateRandom:()=>_d});var l={};r.r(l),r.d(l,{decodeParams:()=>pp,decodeParamsV2ByABI:()=>mp,encodeParams:()=>fp,encodeParamsV2ByABI:()=>bp});var d={};r.r(d),r.d(d,{TRON_MESSAGE_PREFIX:()=>Tp,hashMessage:()=>vp,signMessage:()=>wp,verifyMessage:()=>Ap});var h={};function p(e,t){return function(){return e.apply(t,arguments)}}r.r(h),r.d(h,{txCheck:()=>gf,txCheckWithArgs:()=>yf,txJsonToPb:()=>df,txJsonToPbWithArgs:()=>hf,txPbToRawDataHex:()=>ff,txPbToTxID:()=>bf});const{toString:f}=Object.prototype,{getPrototypeOf:g}=Object,y=(b=Object.create(null),e=>{const t=f.call(e);return b[t]||(b[t]=t.slice(8,-1).toLowerCase())});var b;const m=e=>(e=e.toLowerCase(),t=>y(t)===e),T=e=>t=>typeof t===e,{isArray:v}=Array,w=T("undefined"),A=m("ArrayBuffer"),P=T("string"),W=T("function"),B=T("number"),C=e=>null!==e&&"object"==typeof e,E=e=>{if("object"!==y(e))return!1;const t=g(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},M=m("Date"),I=m("File"),F=m("Blob"),O=m("FileList"),S=m("URLSearchParams"),[_,R,x,N]=["ReadableStream","Request","Response","Headers"].map(m);function k(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),v(e))for(n=0,o=e.length;n0;)if(n=r[o],t===n.toLowerCase())return n;return null}const D="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=e=>!w(e)&&e!==D,z=(j="undefined"!=typeof Uint8Array&&g(Uint8Array),e=>j&&e instanceof j);var j;const $=m("HTMLFormElement"),V=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),G=m("RegExp"),H=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};k(r,((r,o)=>{let s;!1!==(s=t(r,o,e))&&(n[o]=s||r)})),Object.defineProperties(e,n)},K=m("AsyncFunction"),Z=(q="function"==typeof setImmediate,J=W(D.postMessage),q?setImmediate:J?(Y=`axios@${Math.random()}`,X=[],D.addEventListener("message",(({source:e,data:t})=>{e===D&&t===Y&&X.length&&X.shift()()}),!1),e=>{X.push(e),D.postMessage(Y,"*")}):e=>setTimeout(e));var q,J,Y,X;const Q="undefined"!=typeof queueMicrotask?queueMicrotask.bind(D):"undefined"!=typeof process&&process.nextTick||Z,ee={isArray:v,isArrayBuffer:A,isBuffer:function(e){return null!==e&&!w(e)&&null!==e.constructor&&!w(e.constructor)&&W(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||W(e.append)&&("formdata"===(t=y(e))||"object"===t&&W(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&A(e.buffer),t},isString:P,isNumber:B,isBoolean:e=>!0===e||!1===e,isObject:C,isPlainObject:E,isReadableStream:_,isRequest:R,isResponse:x,isHeaders:N,isUndefined:w,isDate:M,isFile:I,isBlob:F,isRegExp:G,isFunction:W,isStream:e=>C(e)&&W(e.pipe),isURLSearchParams:S,isTypedArray:z,isFileList:O,forEach:k,merge:function e(){const{caseless:t}=L(this)&&this||{},r={},n=(n,o)=>{const s=t&&U(r,o)||o;E(r[s])&&E(n)?r[s]=e(r[s],n):E(n)?r[s]=e({},n):v(n)?r[s]=n.slice():r[s]=n};for(let e=0,t=arguments.length;e(k(t,((t,n)=>{r&&W(t)?e[n]=p(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,s,i;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],n&&!n(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==r&&g(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:y,kindOfTest:m,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(v(e))return e;let t=e.length;if(!B(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:$,hasOwnProperty:V,hasOwnProp:V,reduceDescriptors:H,freezeMethods:e=>{H(e,((t,r)=>{if(W(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];W(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return v(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:U,global:D,isContextDefined:L,isSpecCompliantForm:function(e){return!!(e&&W(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(C(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=v(e)?[]:{};return k(e,((e,t)=>{const s=r(e,n+1);!w(s)&&(o[t]=s)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:K,isThenable:e=>e&&(C(e)||W(e))&&W(e.then)&&W(e.catch),setImmediate:Z,asap:Q};function te(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}ee.inherits(te,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ee.toJSONObject(this.config),code:this.code,status:this.status}}});const re=te.prototype,ne={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ne[e]={value:e}})),Object.defineProperties(te,ne),Object.defineProperty(re,"isAxiosError",{value:!0}),te.from=(e,t,r,n,o,s)=>{const i=Object.create(re);return ee.toFlatObject(e,i,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),te.call(i,e.message,t,r,n,o),i.cause=e,i.name=e.name,s&&Object.assign(i,s),i};const oe=te;function se(e){return ee.isPlainObject(e)||ee.isArray(e)}function ie(e){return ee.endsWith(e,"[]")?e.slice(0,-2):e}function ae(e,t,r){return e?e.concat(t).map((function(e,t){return e=ie(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const ue=ee.toFlatObject(ee,{},null,(function(e){return/^is[A-Z]/.test(e)})),ce=function(e,t,r){if(!ee.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=ee.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!ee.isUndefined(t[e])}))).metaTokens,o=r.visitor||c,s=r.dots,i=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ee.isSpecCompliantForm(t);if(!ee.isFunction(o))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(ee.isDate(e))return e.toISOString();if(!a&&ee.isBlob(e))throw new oe("Blob is not supported. Use a Buffer instead.");return ee.isArrayBuffer(e)||ee.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(ee.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ee.isArray(e)&&function(e){return ee.isArray(e)&&!e.some(se)}(e)||(ee.isFileList(e)||ee.endsWith(r,"[]"))&&(a=ee.toArray(e)))return r=ie(r),a.forEach((function(e,n){!ee.isUndefined(e)&&null!==e&&t.append(!0===i?ae([r],n,s):null===i?r:r+"[]",u(e))})),!1;return!!se(e)||(t.append(ae(o,r,s),u(e)),!1)}const l=[],d=Object.assign(ue,{defaultVisitor:c,convertValue:u,isVisitable:se});if(!ee.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ee.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ee.forEach(r,(function(r,s){!0===(!(ee.isUndefined(r)||null===r)&&o.call(t,r,ee.isString(s)?s.trim():s,n,d))&&e(r,n?n.concat(s):[s])})),l.pop()}}(e),t};function le(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function de(e,t){this._pairs=[],e&&ce(e,this,t)}const he=de.prototype;he.append=function(e,t){this._pairs.push([e,t])},he.toString=function(e){const t=e?function(t){return e.call(this,t,le)}:le;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const pe=de;function fe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ge(e,t,r){if(!t)return e;const n=r&&r.encode||fe;ee.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let s;if(s=o?o(t,r):ee.isURLSearchParams(t)?t.toString():new pe(t,r).toString(n),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const ye=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ee.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},be={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},me={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:pe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Te="undefined"!=typeof window&&"undefined"!=typeof document,ve="object"==typeof navigator&&navigator||void 0,we=Te&&(!ve||["ReactNative","NativeScript","NS"].indexOf(ve.product)<0),Ae="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Pe=Te&&window.location.href||"http://localhost",We={...e,...me},Be=function(e){function t(e,r,n,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;return s=!s&&ee.isArray(n)?n.length:s,a?(ee.hasOwnProp(n,s)?n[s]=[n[s],r]:n[s]=r,!i):(n[s]&&ee.isObject(n[s])||(n[s]=[]),t(e,r,n[s],o)&&ee.isArray(n[s])&&(n[s]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let s;for(n=0;n{t(function(e){return ee.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null},Ce={transitional:be,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=ee.isObject(e);if(o&&ee.isHTMLForm(e)&&(e=new FormData(e)),ee.isFormData(e))return n?JSON.stringify(Be(e)):e;if(ee.isArrayBuffer(e)||ee.isBuffer(e)||ee.isStream(e)||ee.isFile(e)||ee.isBlob(e)||ee.isReadableStream(e))return e;if(ee.isArrayBufferView(e))return e.buffer;if(ee.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return ce(e,new We.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return We.isNode&&ee.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=ee.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ce(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e){if(ee.isString(e))try{return(0,JSON.parse)(e),ee.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ce.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ee.isResponse(e)||ee.isReadableStream(e))return e;if(e&&ee.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw oe.from(e,oe.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:We.classes.FormData,Blob:We.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch"],(e=>{Ce.headers[e]={}}));const Ee=Ce,Me=ee.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ie=Symbol("internals");function Fe(e){return e&&String(e).trim().toLowerCase()}function Oe(e){return!1===e||null==e?e:ee.isArray(e)?e.map(Oe):String(e)}function Se(e,t,r,n,o){return ee.isFunction(n)?n.call(this,t,r):(o&&(t=r),ee.isString(t)?ee.isString(n)?-1!==t.indexOf(n):ee.isRegExp(n)?n.test(t):void 0:void 0)}class _e{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=Fe(t);if(!o)throw new Error("header name must be a non-empty string");const s=ee.findKey(n,o);(!s||void 0===n[s]||!0===r||void 0===r&&!1!==n[s])&&(n[s||t]=Oe(e))}const s=(e,t)=>ee.forEach(e,((e,r)=>o(e,r,t)));if(ee.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(ee.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&Me[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(ee.isHeaders(e))for(const[t,n]of e.entries())o(n,t,r);else null!=e&&o(t,e,r);return this}get(e,t){if(e=Fe(e)){const r=ee.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(ee.isFunction(t))return t.call(this,e,r);if(ee.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Fe(e)){const r=ee.findKey(this,e);return!(!r||void 0===this[r]||t&&!Se(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=Fe(e)){const o=ee.findKey(r,e);!o||t&&!Se(0,r[o],o,t)||(delete r[o],n=!0)}}return ee.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!Se(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return ee.forEach(this,((n,o)=>{const s=ee.findKey(r,o);if(s)return t[s]=Oe(n),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();i!==o&&delete t[o],t[i]=Oe(n),r[i]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ee.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&ee.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Ie]=this[Ie]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=Fe(e);t[n]||(function(e,t){const r=ee.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return ee.isArray(e)?e.forEach(n):n(e),this}}_e.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ee.reduceDescriptors(_e.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),ee.freezeMethods(_e);const Re=_e;function xe(e,t){const r=this||Ee,n=t||r,o=Re.from(n.headers);let s=n.data;return ee.forEach(e,(function(e){s=e.call(r,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function Ne(e){return!(!e||!e.__CANCEL__)}function ke(e,t,r){oe.call(this,null==e?"canceled":e,oe.ERR_CANCELED,t,r),this.name="CanceledError"}ee.inherits(ke,oe,{__CANCEL__:!0});const Ue=ke;function De(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new oe("Request failed with status code "+r.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}const Le=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const u=Date.now(),c=n[i];o||(o=u),r[s]=a,n[s]=u;let l=i,d=0;for(;l!==s;)d+=r[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o{o=s,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(r=e,n||(n=setTimeout((()=>{n=null,i(r)}),s-a)))},()=>r&&i(r)]}((r=>{const s=r.loaded,i=r.lengthComputable?r.total:void 0,a=s-n,u=o(a);n=s,e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:u||void 0,estimated:u&&i&&s<=i?(i-s)/u:void 0,event:r,lengthComputable:null!=i,[t?"download":"upload"]:!0})}),r)},ze=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},je=e=>(...t)=>ee.asap((()=>e(...t))),$e=We.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,We.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(We.origin),We.navigator&&/(msie|trident)/i.test(We.navigator.userAgent)):()=>!0,Ve=We.hasStandardBrowserEnv?{write(e,t,r,n,o,s){const i=[e+"="+encodeURIComponent(t)];ee.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),ee.isString(n)&&i.push("path="+n),ee.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ge(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const He=e=>e instanceof Re?{...e}:e;function Ke(e,t){t=t||{};const r={};function n(e,t,r,n){return ee.isPlainObject(e)&&ee.isPlainObject(t)?ee.merge.call({caseless:n},e,t):ee.isPlainObject(t)?ee.merge({},t):ee.isArray(t)?t.slice():t}function o(e,t,r,o){return ee.isUndefined(t)?ee.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function s(e,t){if(!ee.isUndefined(t))return n(void 0,t)}function i(e,t){return ee.isUndefined(t)?ee.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,s){return s in t?n(r,o):s in e?n(void 0,r):void 0}const u={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(e,t,r)=>o(He(e),He(t),0,!0)};return ee.forEach(Object.keys(Object.assign({},e,t)),(function(n){const s=u[n]||o,i=s(e[n],t[n],n);ee.isUndefined(i)&&s!==a||(r[n]=i)})),r}const Ze=e=>{const t=Ke({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:u}=t;if(t.headers=a=Re.from(a),t.url=ge(Ge(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),u&&a.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),ee.isFormData(n))if(We.hasStandardBrowserEnv||We.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map((e=>e.trim())).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(We.hasStandardBrowserEnv&&(o&&ee.isFunction(o)&&(o=o(t)),o||!1!==o&&$e(t.url))){const e=s&&i&&Ve.read(i);e&&a.set(s,e)}return t},qe="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){const n=Ze(e);let o=n.data;const s=Re.from(n.headers).normalize();let i,a,u,c,l,{responseType:d,onUploadProgress:h,onDownloadProgress:p}=n;function f(){c&&c(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(i),n.signal&&n.signal.removeEventListener("abort",i)}let g=new XMLHttpRequest;function y(){if(!g)return;const n=Re.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());De((function(e){t(e),f()}),(function(e){r(e),f()}),{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(y)},g.onabort=function(){g&&(r(new oe("Request aborted",oe.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new oe("Network Error",oe.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||be;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new oe(t,o.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,g)),g=null},void 0===o&&s.setContentType(null),"setRequestHeader"in g&&ee.forEach(s.toJSON(),(function(e,t){g.setRequestHeader(t,e)})),ee.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),d&&"json"!==d&&(g.responseType=n.responseType),p&&([u,l]=Le(p,!0),g.addEventListener("progress",u)),h&&g.upload&&([a,c]=Le(h),g.upload.addEventListener("progress",a),g.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(i=t=>{g&&(r(!t||t.type?new Ue(null,e,g):t),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(i),n.signal&&(n.signal.aborted?i():n.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);b&&-1===We.protocols.indexOf(b)?r(new oe("Unsupported protocol "+b+":",oe.ERR_BAD_REQUEST,e)):g.send(o||null)}))},Je=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof oe?t:new Ue(t instanceof Error?t.message:t))}};let s=t&&setTimeout((()=>{s=null,o(new oe(`timeout ${t} of ms exceeded`,oe.ETIMEDOUT))}),t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:a}=n;return a.unsubscribe=()=>ee.asap(i),a}},Ye=function*(e,t){let r=e.byteLength;if(!t||r{const o=async function*(e,t){for await(const r of async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}}(e))yield*Ye(r,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return a(),void e.close();let s=n.byteLength;if(r){let e=i+=s;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Qe="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,et=Qe&&"function"==typeof ReadableStream,tt=Qe&&("function"==typeof TextEncoder?(rt=new TextEncoder,e=>rt.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var rt;const nt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ot=et&&nt((()=>{let e=!1;const t=new Request(We.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),st=et&&nt((()=>ee.isReadableStream(new Response("").body))),it={stream:st&&(e=>e.body)};var at;Qe&&(at=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!it[e]&&(it[e]=ee.isFunction(at[e])?t=>t[e]():(t,r)=>{throw new oe(`Response type '${e}' is not supported`,oe.ERR_NOT_SUPPORT,r)})})));const ut={http:null,xhr:qe,fetch:Qe&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:s,timeout:i,onDownloadProgress:a,onUploadProgress:u,responseType:c,headers:l,withCredentials:d="same-origin",fetchOptions:h}=Ze(e);c=c?(c+"").toLowerCase():"text";let p,f=Je([o,s&&s.toAbortSignal()],i);const g=f&&f.unsubscribe&&(()=>{f.unsubscribe()});let y;try{if(u&&ot&&"get"!==r&&"head"!==r&&0!==(y=await(async(e,t)=>{const r=ee.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(ee.isBlob(e))return e.size;if(ee.isSpecCompliantForm(e)){const t=new Request(We.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ee.isArrayBufferView(e)||ee.isArrayBuffer(e)?e.byteLength:(ee.isURLSearchParams(e)&&(e+=""),ee.isString(e)?(await tt(e)).byteLength:void 0)})(t):r})(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(ee.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=ze(y,Le(je(u)));n=Xe(r.body,65536,e,t)}}ee.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...h,signal:f,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?d:void 0});let s=await fetch(p);const i=st&&("stream"===c||"response"===c);if(st&&(a||i&&g)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=s[t]}));const t=ee.toFiniteNumber(s.headers.get("content-length")),[r,n]=a&&ze(t,Le(je(a),!0))||[];s=new Response(Xe(s.body,65536,r,(()=>{n&&n(),g&&g()})),e)}c=c||"text";let b=await it[ee.findKey(it,c)||"text"](s,e);return!i&&g&&g(),await new Promise(((t,r)=>{De(t,r,{data:b,headers:Re.from(s.headers),status:s.status,statusText:s.statusText,config:e,request:p})}))}catch(t){if(g&&g(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new oe("Network Error",oe.ERR_NETWORK,e,p),{cause:t.cause||t});throw oe.from(t,t&&t.code,e,p)}})};ee.forEach(ut,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ct=e=>`- ${e}`,lt=e=>ee.isFunction(e)||null===e||!1===e,dt=e=>{e=ee.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let s=0;s`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let r=t?e.length>1?"since :\n"+e.map(ct).join("\n"):" "+ct(e[0]):"as no adapter specified";throw new oe("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function ht(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ue(null,e)}function pt(e){return ht(e),e.headers=Re.from(e.headers),e.data=xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dt(e.adapter||Ee.adapter)(e).then((function(t){return ht(e),t.data=xe.call(e,e.transformResponse,t),t.headers=Re.from(t.headers),t}),(function(t){return Ne(t)||(ht(e),t&&t.response&&(t.response.data=xe.call(e,e.transformResponse,t.response),t.response.headers=Re.from(t.response.headers))),Promise.reject(t)}))}const ft={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ft[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const gt={};ft.transitional=function(e,t,r){function n(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,s)=>{if(!1===e)throw new oe(n(o," has been removed"+(t?" in "+t:"")),oe.ERR_DEPRECATED);return t&&!gt[o]&&(gt[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,s)}},ft.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};const yt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const s=n[o],i=t[s];if(i){const t=e[s],r=void 0===t||i(t,s,e);if(!0!==r)throw new oe("option "+s+" must be "+r,oe.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new oe("Unknown option "+s,oe.ERR_BAD_OPTION)}},validators:ft},bt=yt.validators;class mt{constructor(e){this.defaults=e,this.interceptors={request:new ye,response:new ye}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ke(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&yt.assertOptions(r,{silentJSONParsing:bt.transitional(bt.boolean),forcedJSONParsing:bt.transitional(bt.boolean),clarifyTimeoutError:bt.transitional(bt.boolean)},!1),null!=n&&(ee.isFunction(n)?t.paramsSerializer={serialize:n}:yt.assertOptions(n,{encode:bt.function,serialize:bt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),yt.assertOptions(t,{baseUrl:bt.spelling("baseURL"),withXsrfToken:bt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&ee.merge(o.common,o[t.method]);o&&ee.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Re.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))}));const u=[];let c;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let l,d=0;if(!a){const e=[pt.bind(this),void 0];for(e.unshift.apply(e,i),e.push.apply(e,u),l=e.length,c=Promise.resolve(t);d{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new Ue(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new vt((function(t){e=t})),cancel:e}}}const wt=vt,At={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(At).forEach((([e,t])=>{At[t]=e}));const Pt=At,Wt=function e(t){const r=new Tt(t),n=p(Tt.prototype.request,r);return ee.extend(n,Tt.prototype,r,{allOwnKeys:!0}),ee.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Ke(t,r))},n}(Ee);Wt.Axios=Tt,Wt.CanceledError=Ue,Wt.CancelToken=wt,Wt.isCancel=Ne,Wt.VERSION="1.8.4",Wt.toFormData=ce,Wt.AxiosError=oe,Wt.Cancel=Wt.CanceledError,Wt.all=function(e){return Promise.all(e)},Wt.spread=function(e){return function(t){return e.apply(null,t)}},Wt.isAxiosError=function(e){return ee.isObject(e)&&!0===e.isAxiosError},Wt.mergeConfig=Ke,Wt.AxiosHeaders=Re,Wt.formToJSON=e=>Be(ee.isHTMLForm(e)?new FormData(e):e),Wt.getAdapter=dt,Wt.HttpStatusCode=Pt,Wt.default=Wt;const Bt=Wt;function Ct(){this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",this.encode=e=>{let t,r,n,o,s,i,a,u="",c=0;for(;c>2,s=(3&t)<<4|r>>4,i=(15&r)<<2|n>>6,a=63&n,isNaN(r)?i=a=64:isNaN(n)&&(a=64),u=u+this._keyStr.charAt(o)+this._keyStr.charAt(s)+this._keyStr.charAt(i)+this._keyStr.charAt(a);return u},this.encodeIgnoreUtf8=e=>{let t,r,n,o,s,i,a,u="",c=0;for(;c>2,s=(3&t)<<4|r>>4,i=(15&r)<<2|n>>6,a=63&n,isNaN(r)?i=a=64:isNaN(n)&&(a=64),u=u+this._keyStr.charAt(o)+this._keyStr.charAt(s)+this._keyStr.charAt(i)+this._keyStr.charAt(a);return u},this.decode=e=>{let t,r,n,o,s,i,a,u="",c=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");c>4,r=(15&s)<<4|i>>2,n=(3&i)<<6|a,u+=String.fromCharCode(t),64!=i&&(u+=String.fromCharCode(r)),64!=a&&(u+=String.fromCharCode(n));return this._utf8_decode(u)},this.decodeToByteArray=e=>{let t,r,n,o,s,i,a,u="",c=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");c>4,r=(15&s)<<4|i>>2,n=(3&i)<<6|a,u+=String.fromCharCode(t),64!=i&&(u+=String.fromCharCode(r)),64!=a&&(u+=String.fromCharCode(n));return this._out2ByteArray(u)},this._out2ByteArray=e=>{const t=new Array(e.length);let r=0,n=0;for(;r{e=e.replace(/\r\n/g,"\n");let t="";for(let r=0;r127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t},this._utf8_decode=e=>{let t="",r=0,n=0,o=0,s=0;for(;r191&&n<224?(o=e.charCodeAt(r+1),t+=String.fromCharCode((31&n)<<6|63&o),r+=2):(o=e.charCodeAt(r+1),s=e.charCodeAt(r+2),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&s),r+=3);return t}}function Et(e){if("number"!=typeof e)throw new Error("Input must be a number");if(e<0||e>255)throw new Error("Input must be a byte");const t="0123456789ABCDEF";let r="";return r+=t.charAt(e>>4),r+=t.charAt(15&e),r}function Mt(e){if("string"==typeof e)return e;let t="";for(let r=0;r=65536&&n<=1114111?(t.push(n>>18&7|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(63&n|128)):n>=2048&&n<=65535?(t.push(n>>12&15|224),t.push(n>>6&63|128),t.push(63&n|128)):n>=128&&n<=2047?(t.push(n>>6&31|192),t.push(63&n|128)):t.push(255&n);return t}function zt(e){let t;if(e>="A"&&e<="F"?t=e.charCodeAt(0)-"A".charCodeAt(0)+10:e>="a"&&e<="f"?t=e.charCodeAt(0)-"a".charCodeAt(0)+10:e>="0"&&e<="9"&&(t=e.charCodeAt(0)-"0".charCodeAt(0)),"number"==typeof t)return t;throw new Error("The passed hex char is not a valid hex char")}function jt(e){return e>="A"&&e<="F"||e>="a"&&e<="f"||e>="0"&&e<="9"?1:0}function $t(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("string"!=typeof e)throw new Error("The passed string is not a string");let r=e.length;t&&r%2&&(e=`0${e}`,r++);const n=Array();let o=0,s=0,i=0;for(let t=0;t1){const e=t[1].split("-"),r=parseInt(e[0],10),i=parseInt(e[1],10),a=parseInt(e[2],10);return new Date(n,o,s,r,i,a)}return new Date(n,o,s)}function Gt(e){return e>="0"&&e<="9"?1:0}function Ht(e){if(null==e)return-1;if("string"!=typeof e)return-1;if(0==e.length||""==e)return-1;let t=0;if(40==e.length)for(;t<40&&jt(e.charAt(t));t++);if(40==t)return 1;for(t=0;t" ")return 3;return-1}const Kt="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Zt={};for(let e=0;eKt[e])).join("")}function Yt(e){if(0===e.length)return[];let t,r;const n=[0];for(t=0;t>8,n[r]&=255;for(;s;)n.push(255&s),s>>=8}for(t=0;"1"===e[t]&&te.trim()));for(let r=0;rPromise.resolve(e[t]))))).reduce(((e,r,n)=>(e[t[n]]=r,e)),{})}function rr(e,t,r){for(let n in t){let o=t[n];const s=r?r[n]:null;s&&er(o,s,n),Object.defineProperty(e,n,{enumerable:!0,value:o,writable:!1})}}function nr(e){if(null==e)return"null";if(Array.isArray(e))return"[ "+e.map(nr).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let r="0x";for(let n=0;n>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return nr(e.toJSON());switch(typeof e){case"boolean":case"symbol":case"number":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{ "+t.map((t=>`${nr(t)}: ${nr(e[t])}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function or(e,t){return e&&e.code===t}function sr(e,t,r){let n,o=e;{const n=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${nr(r)}`);for(const e in r){if("shortMessage"===e)continue;const t=r[e];n.push(e+"="+nr(t))}}n.push(`code=${t}`),n.push(`version=${Qt}`),n.length&&(e+=" ("+n.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":n=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":n=new RangeError(e);break;default:n=new Error(e)}return rr(n,{code:t}),r&&Object.assign(n,r),null==n.shortMessage&&rr(n,{shortMessage:o}),n}function ir(e,t,r,n){if(!e)throw sr(t,r,n)}function ar(e,t,r,n){ir(e,t,"INVALID_ARGUMENT",{argument:r,value:n})}function ur(e,t,r){null==r&&(r=""),r&&(r=": "+r),ir(e>=t,"missing argument"+r,"MISSING_ARGUMENT",{count:e,expectedCount:t}),ir(e<=t,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})}const cr=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e}),[]);function lr(e){ir(cr.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})}function dr(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),ir(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}function hr(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n>4]+br[15&n]}return r}function Tr(e){return"0x"+e.map((e=>mr(e).substring(2))).join("")}function vr(e){return gr(e,!0)?(e.length-2)/2:pr(e).length}function wr(e,t,r){const n=pr(e);return null!=r&&r>n.length&&ir(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r}),mr(n.slice(null==t?0:t,null==r?n.length:r))}function Ar(e,t){return function(e,t,r){const n=pr(e);ir(t>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:t,offset:t+1});const o=new Uint8Array(t);return o.fill(0),r?o.set(n,t-n.length):o.set(n,0),mr(o)}(e,t,!0)}const Pr=BigInt(0),Wr=BigInt(1),Br=9007199254740991;function Cr(e,t){let r=Mr(e,"value");const n=BigInt(Sr(t,"width")),o=Wr<=-Br&&e<=Br,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){ar(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}ar(!1,"invalid BigNumberish value",t||"value",e)}function Ir(e,t){const r=Mr(e,t);return ir(r>=Pr,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}const Fr="0123456789abcdef";function Or(e){if(e instanceof Uint8Array){let t="0x0";for(const r of e)t+=Fr[r>>4],t+=Fr[15&r];return BigInt(t)}return Mr(e)}function Sr(e,t){switch(typeof e){case"bigint":return ar(e>=-Br&&e<=Br,"overflow",t||"value",e),Number(e);case"number":return ar(Number.isInteger(e),"underflow",t||"value",e),ar(e>=-Br&&e<=Br,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return Sr(BigInt(e),t)}catch(r){ar(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}ar(!1,"invalid numeric value",t||"value",e)}function _r(e,t){let r=Ir(e,"value").toString(16);if(null==t)r.length%2&&(r="0"+r);else{const n=Sr(t,"width");for(ir(2*n>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length<2*n;)r="0"+r}return"0x"+r}function Rr(e){const t=Ir(e,"value");if(t===Pr)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let e=0;e=Lr,"invalid EIP-155 v","v",e),(t-Lr)/kr)}static getChainIdV(e,t){return Mr(e)*kr+BigInt(35+t-27)}static getNormalizedV(e){const t=Mr(e);return t===xr||t===Ur?27:t===Nr||t===Dr?28:(ar(t>=Lr,"invalid v","v",e),t&Nr?27:28)}static from(e){function t(t,r){ar(t,r,"signature",e)}if(null==e)return new $r(zr,Xt,Xt,27);if("string"==typeof e){const r=pr(e,"signature");if(64===r.length){const e=mr(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new $r(zr,e,mr(t),n)}if(65===r.length){const e=mr(r.slice(0,32)),n=r.slice(32,64);t(!(128&n[0]),"non-canonical s");const o=$r.getNormalizedV(r[64]);return new $r(zr,e,mr(n),o)}t(!1,"invalid raw signature length")}if(e instanceof $r)return e.clone();const r=e.r;t(null!=r,"missing r");const n=jr(r),o=function(e,r){if(null!=e)return jr(e);if(null!=r){t(gr(r,32),"invalid yParityAndS");const e=pr(r);return e[0]&=127,mr(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(!(128&pr(o)[0]),"non-canonical s");const{networkV:s,v:i}=function(e,r,n){if(null!=e){const t=Mr(e);return{networkV:t>=Lr?t:void 0,v:$r.getNormalizedV(t)}}if(null!=r)return t(gr(r,32),"invalid yParityAndS"),{v:128&pr(r)[0]?28:27};if(null!=n){switch(Sr(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),a=new $r(zr,n,o,i);return s&&(a.#n=s),t(null==e.yParity||Sr(e.yParity,"sig.yParity")===a.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===a.yParityAndS,"yParityAndS mismatch"),a}}function Vr(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Gr(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Hr(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");Vr(e.outputLen),Vr(e.blockLen)}function Kr(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Zr(e,t){Gr(e);const r=t.outputLen;if(e.lengthe instanceof Uint8Array,Yr=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),Xr=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Qr=(e,t)=>e<<32-t|e>>>t;if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw new Error("Non little-endian hardware is not supported");const en=async()=>{};async function tn(e,t,r){let n=Date.now();for(let o=0;o=0&&ee().update(rn(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function un(e=32){if(qr&&"function"==typeof qr.getRandomValues)return qr.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}class cn extends nn{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Hr(e);const r=rn(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?e.create().update(r).digest():r);for(let e=0;enew cn(e,t).update(r).digest();function dn(e,t,r,n){const{c:o,dkLen:s,DK:i,PRF:a,PRFSalt:u}=function(e,t,r,n){Hr(e);const o=sn({dkLen:32,asyncTick:10},n),{c:s,dkLen:i,asyncTick:a}=o;if(Vr(s),Vr(i),Vr(a),s<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const u=rn(t),c=rn(r),l=new Uint8Array(i),d=ln.create(e,u),h=d._cloneInto().update(c);return{c:s,dkLen:i,asyncTick:a,DK:l,PRF:d,PRFSalt:h}}(e,t,r,n);let c;const l=new Uint8Array(4),d=Xr(l),h=new Uint8Array(a.outputLen);for(let e=1,t=0;tnew cn(e,t);class hn extends nn{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Xr(this.buffer)}update(e){Kr(this);const{view:t,buffer:r,blockLen:n}=this,o=(e=rn(e)).length;for(let s=0;sn-s&&(this.process(r,0),s=0);for(let e=s;e>o&s),a=Number(r&s),u=n?4:0,c=n?0:4;e.setUint32(t+u,i,n),e.setUint32(t+c,a,n)}(r,n-8,BigInt(8*this.length),o),this.process(r,0);const i=Xr(e),a=this.outputLen;if(a%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const u=a/4,c=this.get();if(u>c.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;ee&t^~e&r,fn=(e,t,r)=>e&t^e&r^t&r,gn=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]),yn=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),bn=new Uint32Array(64);class mn extends hn{constructor(){super(64,32,8,!1),this.A=0|yn[0],this.B=0|yn[1],this.C=0|yn[2],this.D=0|yn[3],this.E=0|yn[4],this.F=0|yn[5],this.G=0|yn[6],this.H=0|yn[7]}get(){const{A:e,B:t,C:r,D:n,E:o,F:s,G:i,H:a}=this;return[e,t,r,n,o,s,i,a]}set(e,t,r,n,o,s,i,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|s,this.G=0|i,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)bn[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=bn[e-15],r=bn[e-2],n=Qr(t,7)^Qr(t,18)^t>>>3,o=Qr(r,17)^Qr(r,19)^r>>>10;bn[e]=o+bn[e-7]+n+bn[e-16]|0}let{A:r,B:n,C:o,D:s,E:i,F:a,G:u,H:c}=this;for(let e=0;e<64;e++){const t=c+(Qr(i,6)^Qr(i,11)^Qr(i,25))+pn(i,a,u)+gn[e]+bn[e]|0,l=(Qr(r,2)^Qr(r,13)^Qr(r,22))+fn(r,n,o)|0;c=u,u=a,a=i,i=s+t|0,s=o,o=n,n=r,r=t+l|0}r=r+this.A|0,n=n+this.B|0,o=o+this.C|0,s=s+this.D|0,i=i+this.E|0,a=a+this.F|0,u=u+this.G|0,c=c+this.H|0,this.set(r,n,o,s,i,a,u,c)}roundClean(){bn.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Tn=an((()=>new mn)),vn=BigInt(2**32-1),wn=BigInt(32);function An(e,t=!1){return t?{h:Number(e&vn),l:Number(e>>wn&vn)}:{h:0|Number(e>>wn&vn),l:0|Number(e&vn)}}function Pn(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oe<>>32-r,Bn=(e,t,r)=>t<>>32-r,Cn=(e,t,r)=>t<>>64-r,En=(e,t,r)=>e<>>64-r,Mn={fromBig:An,split:Pn,toBig:(e,t)=>BigInt(e>>>0)<>>0),shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,rotr32H:(e,t)=>t,rotr32L:(e,t)=>e,rotlSH:Wn,rotlSL:Bn,rotlBH:Cn,rotlBL:En,add:function(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}},add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,n)=>t+r+n+(e/2**32|0)|0,add4L:(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),add4H:(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,add5H:(e,t,r,n,o,s)=>t+r+n+o+s+(e/2**32|0)|0,add5L:(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0)},[In,Fn]=(()=>Mn.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),On=new Uint32Array(80),Sn=new Uint32Array(80);class _n extends hn{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:o,Cl:s,Dh:i,Dl:a,Eh:u,El:c,Fh:l,Fl:d,Gh:h,Gl:p,Hh:f,Hl:g}=this;return[e,t,r,n,o,s,i,a,u,c,l,d,h,p,f,g]}set(e,t,r,n,o,s,i,a,u,c,l,d,h,p,f,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|o,this.Cl=0|s,this.Dh=0|i,this.Dl=0|a,this.Eh=0|u,this.El=0|c,this.Fh=0|l,this.Fl=0|d,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)On[r]=e.getUint32(t),Sn[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|On[e-15],r=0|Sn[e-15],n=Mn.rotrSH(t,r,1)^Mn.rotrSH(t,r,8)^Mn.shrSH(t,r,7),o=Mn.rotrSL(t,r,1)^Mn.rotrSL(t,r,8)^Mn.shrSL(t,r,7),s=0|On[e-2],i=0|Sn[e-2],a=Mn.rotrSH(s,i,19)^Mn.rotrBH(s,i,61)^Mn.shrSH(s,i,6),u=Mn.rotrSL(s,i,19)^Mn.rotrBL(s,i,61)^Mn.shrSL(s,i,6),c=Mn.add4L(o,u,Sn[e-7],Sn[e-16]),l=Mn.add4H(c,n,a,On[e-7],On[e-16]);On[e]=0|l,Sn[e]=0|c}let{Ah:r,Al:n,Bh:o,Bl:s,Ch:i,Cl:a,Dh:u,Dl:c,Eh:l,El:d,Fh:h,Fl:p,Gh:f,Gl:g,Hh:y,Hl:b}=this;for(let e=0;e<80;e++){const t=Mn.rotrSH(l,d,14)^Mn.rotrSH(l,d,18)^Mn.rotrBH(l,d,41),m=Mn.rotrSL(l,d,14)^Mn.rotrSL(l,d,18)^Mn.rotrBL(l,d,41),T=l&h^~l&f,v=d&p^~d&g,w=Mn.add5L(b,m,v,Fn[e],Sn[e]),A=Mn.add5H(w,y,t,T,In[e],On[e]),P=0|w,W=Mn.rotrSH(r,n,28)^Mn.rotrBH(r,n,34)^Mn.rotrBH(r,n,39),B=Mn.rotrSL(r,n,28)^Mn.rotrBL(r,n,34)^Mn.rotrBL(r,n,39),C=r&o^r&i^o&i,E=n&s^n&a^s&a;y=0|f,b=0|g,f=0|h,g=0|p,h=0|l,p=0|d,({h:l,l:d}=Mn.add(0|u,0|c,0|A,0|P)),u=0|i,c=0|a,i=0|o,a=0|s,o=0|r,s=0|n;const M=Mn.add3L(P,B,E);r=Mn.add3H(M,A,W,C),n=0|M}({h:r,l:n}=Mn.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:s}=Mn.add(0|this.Bh,0|this.Bl,0|o,0|s)),({h:i,l:a}=Mn.add(0|this.Ch,0|this.Cl,0|i,0|a)),({h:u,l:c}=Mn.add(0|this.Dh,0|this.Dl,0|u,0|c)),({h:l,l:d}=Mn.add(0|this.Eh,0|this.El,0|l,0|d)),({h,l:p}=Mn.add(0|this.Fh,0|this.Fl,0|h,0|p)),({h:f,l:g}=Mn.add(0|this.Gh,0|this.Gl,0|f,0|g)),({h:y,l:b}=Mn.add(0|this.Hh,0|this.Hl,0|y,0|b)),this.set(r,n,o,s,i,a,u,c,l,d,h,p,f,g,y,b)}roundClean(){On.fill(0),Sn.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Rn=an((()=>new _n)),xn=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}(),Nn=xn.crypto||xn.msCrypto;function kn(e){switch(e){case"sha256":return Tn.create();case"sha512":return Rn.create()}ar(!1,"invalid hashing algorithm name","algorithm",e)}const Un=function(e){return kn("sha256").update(e).digest()},Dn=function(e){return kn("sha512").update(e).digest()};let Ln=Un,zn=Dn,jn=!1,$n=!1;function Vn(e){const t=pr(e,"data");return mr(Ln(t))}function Gn(e){const t=pr(e,"data");return mr(zn(t))}Vn._=Un,Vn.lock=function(){jn=!0},Vn.register=function(e){if(jn)throw new Error("sha256 is locked");Ln=e},Object.freeze(Vn),Gn._=Dn,Gn.lock=function(){$n=!0},Gn.register=function(e){if($n)throw new Error("sha512 is locked");zn=e},Object.freeze(Vn);let Hn=!1;const Kn=function(e,t,r,n,o){return function(e,t,r,n,o){const s={sha256:Tn,sha512:Rn}[o];return ar(null!=s,"invalid pbkdf2 algorithm","algorithm",o),dn(s,e,t,{c:r,dkLen:n})}(e,t,r,n,o)};let Zn=Kn;function qn(e,t,r,n,o){const s=pr(e,"password"),i=pr(t,"salt");return mr(Zn(s,i,r,n,o))}function Jn(e,t,r,n,o){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return"OVERRUN"===e?r.length-t-1:0}qn._=Kn,qn.lock=function(){Hn=!0},qn.register=function(e){if(Hn)throw new Error("pbkdf2 is locked");Zn=e},Object.freeze(qn);const Yn=Object.freeze({error:function(e,t,r,n,o){ar(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:Jn,replace:function(e,t,r,n,o){return"OVERLONG"===e?(ar("number"==typeof o,"invalid bad code point for replacement","badCodepoint",o),n.push(o),0):(n.push(65533),Jn(e,t,r))}});function Xn(e,t){ar("string"==typeof e,"invalid string value","str",e),null!=t&&(lr(t),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);ar(t>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}function Qn(e,t){return function(e,t){null==t&&(t=Yn.error);const r=pr(e,"bytes"),n=[];let o=0;for(;o>7)){n.push(e);continue}let s=null,i=null;if(192==(224&e))s=1,i=127;else if(224==(240&e))s=2,i=2047;else{if(240!=(248&e)){o+=t(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",o-1,r,n);continue}s=3,i=65535}if(o-1+s>=r.length){o+=t("OVERRUN",o-1,r,n);continue}let a=e&(1<<8-s-1)-1;for(let e=0;e1114111?o+=t("OUT_OF_RANGE",o-1-s,r,n,a):a>=55296&&a<=57343?o+=t("UTF16_SURROGATE",o-1-s,r,n,a):a<=i?o+=t("OVERLONG",o-1-s,r,n,a):n.push(a))}return n}(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}const[eo,to,ro]=[[],[],[]],no=BigInt(0),oo=BigInt(1),so=BigInt(2),io=BigInt(7),ao=BigInt(256),uo=BigInt(113);for(let e=0,t=oo,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],eo.push(2*(5*n+r)),to.push((e+1)*(e+2)/2%64);let o=no;for(let e=0;e<7;e++)t=(t<>io)*uo)%ao,t&so&&(o^=oo<<(oo<r>32?Cn(e,t,r):Wn(e,t,r),po=(e,t,r)=>r>32?En(e,t,r):Bn(e,t,r);class fo extends nn{constructor(e,t,r,n=!1,o=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Vr(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Yr(this.state)}keccak(){!function(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,s=r[o],i=r[o+1],a=ho(s,i,1)^r[n],u=po(s,i,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=u}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=to[r],s=ho(t,o,n),i=po(t,o,n),a=eo[r];t=e[a],o=e[a+1],e[a]=s,e[a+1]=i}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=co[n],e[1]^=lo[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){Kr(this);const{blockLen:t,state:r}=this,n=(e=rn(e)).length;for(let o=0;o=r&&this.keccak();const s=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+s),n),this.posOut+=s,n+=s}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Vr(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Zr(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:s}=this;return e||(e=new fo(t,r,n,s,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=s,e.destroyed=this.destroyed,e}}const go=((e,t,r)=>an((()=>new fo(t,e,r))))(1,136,32);let yo=!1;const bo=function(e){return go(e)};let mo=bo;function To(e){const t=pr(e,"data");return mr(mo(t))}function vo(e){return To(Xn(e))}To._=bo,To.lock=function(){yo=!0},To.register=function(e){if(yo)throw new TypeError("keccak256 is locked");mo=e},Object.freeze(To);const wo=/^[a-z]*$/i;function Ao(e,t){let r=97;return e.reduce(((e,n)=>(n===t?r++:n.match(wo)?e.push(String.fromCharCode(r)+n):(r=97,e.push(n)),e)),[])}class Po{locale;constructor(e){rr(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}class Wo extends Po{#o;#s;constructor(e,t,r){super(e),this.#o=t,this.#s=r,this.#i=null}get _data(){return this.#o}_decodeWords(){return ar("0"===(e=this.#o)[0],"unsupported auwl data","data",e),function(e,t){for(let r=28;r>=0;r--)e=e.split(" !#$%&'()*+,-./<=>?@[]^_`{|}~"[r]).join(t.substring(2*r,2*r+2));const r=[],n=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,((e,t,n,o)=>{if(n)for(let e=parseInt(n);e>=0;e--)r.push(";");else r.push(t.toLowerCase());return""}));if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return Ao(Ao(r,";"),":")}(e.substring(59),e.substring(1,59));var e}#i;#a(){if(null==this.#i){const e=this._decodeWords();if(vo(e.join("\n")+"\n")!==this.#s)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#i=e}return this.#i}getWord(e){const t=this.#a();return ar(e>=0&&eurAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-EgSe0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-PM&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryFN Noc|PutQuirySSue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurEAyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOgAyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NNGradeHoldOnP Set1BOng::Rd3Ar~ow9UUngU`:3BraRo9NeO","0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60")}static wordlist(){return null==Bo&&(Bo=new Co),Bo}}function Eo(e){return(1<=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const n=new Uint8Array(Math.ceil(11*r.length/8));let o=0;for(let e=0;e=0,`invalid mnemonic word at index ${e}`,"mnemonic","[ REDACTED ]");for(let e=0;e<11;e++)s&1<<10-e&&(n[o>>3]|=1<<7-o%8),o++}const s=32*r.length/3,i=Eo(r.length/3);return ar((pr(Vn(n.slice(0,s/8)))[0]&i)==(n[n.length-1]&i),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),mr(n.slice(0,s/8))}function Io(e,t){ar(e.length%4==0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),null==t&&(t=Co.wordlist());const r=[0];let n=11;for(let t=0;t8?(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&255),n+=3);const o=e.length/4,s=parseInt(Vn(e).substring(2,4),16)&Eo(o);return r[r.length-1]<<=o,r[r.length-1]|=s>>8-o,t.join(r.map((e=>t.getWord(e))))}const Fo={};class Oo{phrase;password;wordlist;entropy;constructor(e,t,r,n,o){null==n&&(n=""),null==o&&(o=Co.wordlist()),dr(e,Fo,"Mnemonic"),rr(this,{phrase:r,password:n,wordlist:o,entropy:t})}computeSeed(){const e=Xn("mnemonic"+this.password,"NFKD");return qn(Xn(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,t,r){const n=Mo(e,r);return e=Io(pr(n),r),new Oo(Fo,n,e,t,r)}static fromEntropy(e,t,r){const n=pr(e,"entropy"),o=Io(n,r);return new Oo(Fo,mr(n),o,t,r)}static entropyToPhrase(e,t){return Io(pr(e,"entropy"),t)}static phraseToEntropy(e,t){return Mo(e,t)}static isValidMnemonic(e,t){try{return Mo(e,t),!0}catch(e){}return!1}}let So=!1;const _o=function(e,t,r){return function(e,t){const r={sha256:Tn,sha512:Rn}[e];return ar(null!=r,"invalid hmac algorithm","algorithm",e),ln.create(r,t)}(e,t).update(r).digest()};let Ro=_o;function xo(e,t,r){const n=pr(t,"key"),o=pr(r,"data");return mr(Ro(e,n,o))}xo._=_o,xo.lock=function(){So=!0},xo.register=function(e){if(So)throw new Error("computeHmac is locked");Ro=e},Object.freeze(xo);const No=BigInt(0),ko=BigInt(36);function Uo(e){const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=pr(To(r));for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const Do={};for(let e=0;e<10;e++)Do[String(e)]=String(e);for(let e=0;e<26;e++)Do[String.fromCharCode(65+e)]=String(10+e);const Lo=15;const zo=function(){const e={};for(let t=0;t<36;t++)e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t);return e}();function jo(e){if(ar("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=Uo(e);return ar(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){ar(e.substring(2,4)===function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>Do[e])).join("");for(;t.length>=Lo;){let e=t.substring(0,Lo);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}(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=No;for(let r=0;re instanceof Uint8Array,Ho=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function Ko(e){if(!Go(e))throw new Error("Uint8Array expected");let t="";for(let r=0;re+t.length),0));let r=0;return e.forEach((e=>{if(!Go(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}const rs=e=>(Vo<new Uint8Array(e),os=e=>Uint8Array.from(e);function ss(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=ns(e),o=ns(e),s=0;const i=()=>{n.fill(1),o.fill(0),s=0},a=(...e)=>r(o,n,...e),u=(e=ns())=>{o=a(os([0]),e),n=a(),0!==e.length&&(o=a(os([1]),e),n=a())},c=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e{let r;for(i(),u(e);!(r=t(c()));)u();return i(),r}}const is={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function as(e,t,r={}){const n=(t,r,n)=>{const o=is[r];if("function"!=typeof o)throw new Error(`Invalid validator "${r}", expected function`);const s=e[t];if(!(n&&void 0===s||o(s,e)))throw new Error(`Invalid param ${String(t)}=${s} (${typeof s}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}const us=BigInt(0),cs=BigInt(1),ls=BigInt(2),ds=BigInt(3),hs=BigInt(4),ps=BigInt(5),fs=BigInt(8);function gs(e,t){const r=e%t;return r>=us?r:t+r}function ys(e,t,r){if(r<=us||t 0");if(r===cs)return us;let n=cs;for(;t>us;)t&cs&&(n=n*e%r),e=e*e%r,t>>=cs;return n}function bs(e,t,r){let n=e;for(;t-- >us;)n*=n,n%=r;return n}function ms(e,t){if(e===us||t<=us)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=gs(e,t),n=t,o=us,s=cs,i=cs,a=us;for(;r!==us;){const e=n/r,t=n%r,u=o-i*e,c=s-a*e;n=r,r=t,o=i,s=a,i=u,a=c}if(n!==cs)throw new Error("invert: does not exist");return gs(o,t)}BigInt(9),BigInt(16);const Ts=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function vs(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function ws(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function As(e){const t=ws(e);return t+Math.ceil(t/2)}const Ps=BigInt(0),Ws=BigInt(1);function Bs(e){return as(e.Fp,Ts.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),as(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...vs(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}const{Ph:Cs,aT:Es}=i,Ms={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:t}=Ms;if(e.length<2||2!==e[0])throw new t("Invalid signature integer tag");const r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(128&n[0])throw new t("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Cs(n),l:e.subarray(r+2)}},toSig(e){const{Err:t}=Ms,r="string"==typeof e?Es(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||48!=r[0])throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");const{d:o,l:s}=Ms._parseInt(r.subarray(2)),{d:i,l:a}=Ms._parseInt(s);if(a.length)throw new t("Invalid signature: left bytes after parsing");return{r:o,s:i}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),o=t(r(e.r)),s=n.length/2,i=o.length/2,a=r(s),u=r(i);return`30${r(i+s+4)}02${u}${o}02${a}${n}`}},Is=BigInt(0),Fs=BigInt(1),Os=(BigInt(2),BigInt(3));function Ss(e){const t=function(e){const t=Bs(e);return as(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n}=t,o=r.BYTES+1,s=2*r.BYTES+1;function i(e){return gs(e,n)}function a(e){return ms(e,n)}const{ProjectivePoint:u,normPrivateKeyToScalar:c,weierstrassEquation:l,isWithinCurveOrder:d}=function(e){const t=function(e){const t=Bs(e);as(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,n=t.toBytes||((e,t,n)=>{const o=t.toAffine();return ts(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),o=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function s(e){const{a:n,b:o}=t,s=r.sqr(e),i=r.mul(s,e);return r.add(r.add(i,r.mul(e,n)),o)}if(!r.eql(r.sqr(t.Gy),s(t.Gx)))throw new Error("bad generator point: equation left != right");function i(e){return"bigint"==typeof e&&Isr.eql(e,r.ZERO);return o(t)&&o(n)?d.ZERO:new d(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine)}static fromHex(e){const t=d.fromAffine(o(es("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return d.BASE.multiply(u(e))}_setWindowSize(e){this._WINDOW_SIZE=e,c.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const o=r.sqr(n),i=s(e);if(!r.eql(o,i))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){l(e);const{px:t,py:n,pz:o}=this,{px:s,py:i,pz:a}=e,u=r.eql(r.mul(t,a),r.mul(s,o)),c=r.eql(r.mul(n,a),r.mul(i,o));return u&&c}negate(){return new d(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,o=r.mul(n,Os),{px:s,py:i,pz:a}=this;let u=r.ZERO,c=r.ZERO,l=r.ZERO,h=r.mul(s,s),p=r.mul(i,i),f=r.mul(a,a),g=r.mul(s,i);return g=r.add(g,g),l=r.mul(s,a),l=r.add(l,l),u=r.mul(e,l),c=r.mul(o,f),c=r.add(u,c),u=r.sub(p,c),c=r.add(p,c),c=r.mul(u,c),u=r.mul(g,u),l=r.mul(o,l),f=r.mul(e,f),g=r.sub(h,f),g=r.mul(e,g),g=r.add(g,l),l=r.add(h,h),h=r.add(l,h),h=r.add(h,f),h=r.mul(h,g),c=r.add(c,h),f=r.mul(i,a),f=r.add(f,f),h=r.mul(f,g),u=r.sub(u,h),l=r.mul(f,p),l=r.add(l,l),l=r.add(l,l),new d(u,c,l)}add(e){l(e);const{px:n,py:o,pz:s}=this,{px:i,py:a,pz:u}=e;let c=r.ZERO,h=r.ZERO,p=r.ZERO;const f=t.a,g=r.mul(t.b,Os);let y=r.mul(n,i),b=r.mul(o,a),m=r.mul(s,u),T=r.add(n,o),v=r.add(i,a);T=r.mul(T,v),v=r.add(y,b),T=r.sub(T,v),v=r.add(n,s);let w=r.add(i,u);return v=r.mul(v,w),w=r.add(y,m),v=r.sub(v,w),w=r.add(o,s),c=r.add(a,u),w=r.mul(w,c),c=r.add(b,m),w=r.sub(w,c),p=r.mul(f,v),c=r.mul(g,m),p=r.add(c,p),c=r.sub(b,p),p=r.add(b,p),h=r.mul(c,p),b=r.add(y,y),b=r.add(b,y),m=r.mul(f,m),v=r.mul(g,v),b=r.add(b,m),m=r.sub(y,m),m=r.mul(f,m),v=r.add(v,m),y=r.mul(b,v),h=r.add(h,y),y=r.mul(w,v),c=r.mul(T,c),c=r.sub(c,y),y=r.mul(T,b),p=r.mul(w,p),p=r.add(p,y),new d(c,h,p)}subtract(e){return this.add(e.negate())}is0(){return this.equals(d.ZERO)}wNAF(e){return p.wNAFCached(this,c,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(d.fromAffine)}))}multiplyUnsafe(e){const n=d.ZERO;if(e===Is)return n;if(a(e),e===Fs)return this;const{endo:o}=t;if(!o)return p.unsafeLadder(this,e);let{k1neg:s,k1:i,k2neg:u,k2:c}=o.splitScalar(e),l=n,h=n,f=this;for(;i>Is||c>Is;)i&Fs&&(l=l.add(f)),c&Fs&&(h=h.add(f)),f=f.double(),i>>=Fs,c>>=Fs;return s&&(l=l.negate()),u&&(h=h.negate()),h=new d(r.mul(h.px,o.beta),h.py,h.pz),l.add(h)}multiply(e){a(e);let n,o,s=e;const{endo:i}=t;if(i){const{k1neg:e,k1:t,k2neg:a,k2:u}=i.splitScalar(s);let{p:c,f:l}=this.wNAF(t),{p:h,f}=this.wNAF(u);c=p.constTimeNegate(e,c),h=p.constTimeNegate(a,h),h=new d(r.mul(h.px,i.beta),h.py,h.pz),n=c.add(h),o=l.add(f)}else{const{p:e,f:t}=this.wNAF(s);n=e,o=t}return d.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){const n=d.BASE,o=(e,t)=>t!==Is&&t!==Fs&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),s=o(this,t).add(o(e,r));return s.is0()?void 0:s}toAffine(e){const{px:t,py:n,pz:o}=this,s=this.is0();null==e&&(e=s?r.ONE:r.inv(o));const i=r.mul(t,e),a=r.mul(n,e),u=r.mul(o,e);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:i,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===Fs)return!0;if(r)return r(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===Fs?this:r?r(d,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),n(d,this,e)}toHex(e=!0){return Ko(this.toRawBytes(e))}}d.BASE=new d(t.Gx,t.Gy,r.ONE),d.ZERO=new d(r.ZERO,r.ONE,r.ZERO);const h=t.nBitLength,p=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,o=t;for(;r>Ps;)r&Ws&&(n=n.add(o)),o=o.double(),r>>=Ws;return n},precomputeWindow(e,t){const{windows:r,windowSize:o}=n(t),s=[];let i=e,a=i;for(let e=0;e>=h,n>a&&(n-=d,s+=Ws);const i=t,p=t+Math.abs(n)-1,f=e%2!=0,g=n<0;0===n?c=c.add(r(f,o[i])):u=u.add(r(g,o[p]))}return{p:u,f:c}},wNAFCached(e,t,r,n){const o=e._WINDOW_SIZE||1;let s=t.get(e);return s||(s=this.precomputeWindow(e,o),1!==o&&t.set(e,n(s))),this.wNAF(o,s,r)}}}(d,t.endo?Math.ceil(h/2):h);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:u,weierstrassEquation:s,isWithinCurveOrder:i}}({...t,toBytes(e,t,n){const o=t.toAffine(),s=r.toBytes(o.x),i=ts;return n?i(Uint8Array.from([t.hasEvenY()?2:3]),s):i(Uint8Array.from([4]),s,r.toBytes(o.y))},fromBytes(e){const t=e.length,n=e[0],i=e.subarray(1);if(t!==o||2!==n&&3!==n){if(t===s&&4===n)return{x:r.fromBytes(i.subarray(0,r.BYTES)),y:r.fromBytes(i.subarray(r.BYTES,2*r.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${o} compressed bytes or ${s} uncompressed bytes`)}{const e=Jo(i);if(!(Is<(a=e)&&aKo(Xo(e,t.nByteLength));function p(e){return e>n>>Fs}const f=(e,t,r)=>Jo(e.slice(t,r));class g{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const r=t.nByteLength;return e=es("compactSignature",e,2*r),new g(f(e,0,r),f(e,r,2*r))}static fromDER(e){const{r:t,s:r}=Ms.toSig(es("DER",e));return new g(t,r)}assertValidity(){if(!d(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!d(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new g(this.r,this.s,e)}recoverPublicKey(e){const{r:n,s:o,recovery:s}=this,c=T(es("msgHash",e));if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");const l=2===s||3===s?n+t.n:n;if(l>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");const d=1&s?"03":"02",p=u.fromHex(d+h(l)),f=a(l),g=i(-c*f),y=i(o*f),b=u.BASE.multiplyAndAddUnsafe(p,g,y);if(!b)throw new Error("point at infinify");return b.assertValidity(),b}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new g(this.r,i(-this.s),this.recovery):this}toDERRawBytes(){return qo(this.toDERHex())}toDERHex(){return Ms.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return qo(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}const y={isValidPrivateKey(e){try{return c(e),!0}catch(e){return!1}},normPrivateKeyToScalar:c,randomPrivateKey:()=>{const e=As(t.n);return function(e,t,r=!1){const n=e.length,o=ws(t),s=As(t);if(n<16||n1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);const i=gs(r?Jo(e):Yo(e),t-cs)+cs;return r?Qo(i,o):Xo(i,o)}(t.randomBytes(e),t.n)},precompute:(e=8,t=u.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function b(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===o||n===s:r?n===2*o||n===2*s:e instanceof u}const m=t.bits2int||function(e){const r=Jo(e),n=8*e.length-t.nBitLength;return n>0?r>>BigInt(n):r},T=t.bits2int_modN||function(e){return i(m(e))},v=rs(t.nBitLength);function w(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(Is<=e&&ee in o)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:l}=t;let{lowS:h,prehash:f,extraEntropy:y}=o;null==h&&(h=!0),e=es("msgHash",e),f&&(e=es("prehashed msgHash",s(e)));const b=T(e),v=c(n),P=[w(v),w(b)];if(null!=y){const e=!0===y?l(r.BYTES):y;P.push(es("extraEntropy",e))}const W=ts(...P),B=b;return{seed:W,k2sig:function(e){const t=m(e);if(!d(t))return;const r=a(t),n=u.BASE.multiply(t).toAffine(),o=i(n.x);if(o===Is)return;const s=i(r*i(B+o*v));if(s===Is)return;let c=(n.x===o?0:2)|Number(n.y&Fs),l=s;return h&&p(s)&&(l=function(e){return p(e)?i(-e):e}(s),c^=1),new g(o,l,c)}}}(e,n,o),h=t;return ss(h.hash.outputLen,h.nByteLength,h.hmac)(s,l)},verify:function(e,r,n,o=P){const s=e;if(r=es("msgHash",r),n=es("publicKey",n),"strict"in o)throw new Error("options.strict was renamed to lowS");const{lowS:c,prehash:l}=o;let d,h;try{if("string"==typeof s||s instanceof Uint8Array)try{d=g.fromDER(s)}catch(e){if(!(e instanceof Ms.Err))throw e;d=g.fromCompact(s)}else{if("object"!=typeof s||"bigint"!=typeof s.r||"bigint"!=typeof s.s)throw new Error("PARSE");{const{r:e,s:t}=s;d=new g(e,t)}}h=u.fromHex(n)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&d.hasHighS())return!1;l&&(r=t.hash(r));const{r:p,s:f}=d,y=T(r),b=a(f),m=i(y*b),v=i(p*b),w=u.BASE.multiplyAndAddUnsafe(h,m,v)?.toAffine();return!!w&&i(w.x)===p},ProjectivePoint:u,Signature:g,utils:y}}function _s(e){return{hash:e,hmac:(t,...r)=>ln(e,t,function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!Jr(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}(...r)),randomBytes:un}}BigInt(4);const Rs=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),xs=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Ns=BigInt(1),ks=BigInt(2),Us=(e,t)=>(e+t/ks)/t;const Ds=function(e,t,r=!1,n={}){if(e<=us)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:o,nByteLength:s}=vs(e,t);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");const i=function(e){if(e%hs===ds){const t=(e+cs)/hs;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%fs===ps){const t=(e-ps)/fs;return function(e,r){const n=e.mul(r,ls),o=e.pow(n,t),s=e.mul(r,o),i=e.mul(e.mul(s,ls),o),a=e.mul(s,e.sub(i,e.ONE));if(!e.eql(e.sqr(a),r))throw new Error("Cannot find square root");return a}}return function(e){const t=(e-cs)/ls;let r,n,o;for(r=e-cs,n=0;r%ls===us;r/=ls,n++);for(o=ls;ogs(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return us<=t&&te===us,isOdd:e=>(e&cs)===cs,neg:t=>gs(-t,e),eql:(e,t)=>e===t,sqr:t=>gs(t*t,e),add:(t,r)=>gs(t+r,e),sub:(t,r)=>gs(t-r,e),mul:(t,r)=>gs(t*r,e),pow:(e,t)=>function(e,t,r){if(r 0");if(r===us)return e.ONE;if(r===cs)return t;let n=e.ONE,o=t;for(;r>us;)r&cs&&(n=e.mul(n,o)),o=e.sqr(o),r>>=cs;return n}(a,e,t),div:(t,r)=>gs(t*ms(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>ms(t,e),sqrt:n.sqrt||(e=>i(a,e)),invertBatch:e=>function(e,t){const r=new Array(t.length),n=t.reduce(((t,n,o)=>e.is0(n)?t:(r[o]=t,e.mul(t,n))),e.ONE),o=e.inv(n);return t.reduceRight(((t,n,o)=>e.is0(n)?t:(r[o]=e.mul(t,r[o]),e.mul(t,n))),o),r}(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?Qo(e,s):Xo(e,s),fromBytes:e=>{if(e.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${e.length}`);return r?Yo(e):Jo(e)}});return Object.freeze(a)}(Rs,void 0,void 0,{sqrt:function(e){const t=Rs,r=BigInt(3),n=BigInt(6),o=BigInt(11),s=BigInt(22),i=BigInt(23),a=BigInt(44),u=BigInt(88),c=e*e*e%t,l=c*c*e%t,d=bs(l,r,t)*l%t,h=bs(d,r,t)*l%t,p=bs(h,ks,t)*c%t,f=bs(p,o,t)*p%t,g=bs(f,s,t)*f%t,y=bs(g,a,t)*g%t,b=bs(y,u,t)*y%t,m=bs(b,a,t)*g%t,T=bs(m,r,t)*l%t,v=bs(T,i,t)*f%t,w=bs(v,n,t)*c%t,A=bs(w,ks,t);if(!Ds.eql(Ds.sqr(A),e))throw new Error("Cannot find square root");return A}}),Ls=function(e,t){const r=t=>Ss({...e,..._s(t)});return Object.freeze({...r(t),create:r})}({a:BigInt(0),b:BigInt(7),Fp:Ds,n:xs,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=xs,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Ns*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,i=BigInt("0x100000000000000000000000000000000"),a=Us(s*e,t),u=Us(-n*e,t);let c=gs(e-a*r-u*o,t),l=gs(-a*n-u*s,t);const d=c>i,h=l>i;if(d&&(c=t-c),h&&(l=t-l),c>i||l>i)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:d,k1:c,k2neg:h,k2:l}}}},Tn);BigInt(0),Ls.ProjectivePoint;class zs{#u;constructor(e){ar(32===vr(e),"invalid private key","privateKey","[REDACTED]"),this.#u=mr(e)}get privateKey(){return this.#u}get publicKey(){return zs.computePublicKey(this.#u)}get compressedPublicKey(){return zs.computePublicKey(this.#u,!0)}sign(e){ar(32===vr(e),"invalid digest length","digest",e);const t=Ls.sign(fr(e),fr(this.#u),{lowS:!0});return $r.from({r:_r(t.r,32),s:_r(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=zs.computePublicKey(e);return mr(Ls.getSharedSecret(fr(this.#u),pr(t),!1))}static computePublicKey(e,t){let r=pr(e,"key");if(32===r.length)return mr(Ls.getPublicKey(r,!!t));if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}return mr(Ls.ProjectivePoint.fromHex(r).toRawBytes(t))}static recoverPublicKey(e,t){ar(32===vr(e),"invalid digest length","digest",e);const r=$r.from(t);let n=Ls.Signature.fromCompact(fr(Tr([r.r,r.s])));n=n.addRecoveryBit(r.yParity);const o=n.recoverPublicKey(fr(e));return ar(null!=o,"invalid signautre for digest","signature",t),"0x"+o.toHex(!1)}static addPoints(e,t,r){const n=Ls.ProjectivePoint.fromHex(zs.computePublicKey(e).substring(2)),o=Ls.ProjectivePoint.fromHex(zs.computePublicKey(t).substring(2));return"0x"+n.add(o).toHex(!!r)}}function js(e){let t;return t="string"==typeof e?zs.computePublicKey(e,!1):e.publicKey,jo(To("0x"+t.substring(4)).substring(26))}function $s(e,t){return js(zs.recoverPublicKey(e,t))}const Vs=32,Gs=new Uint8Array(Vs),Hs=["then"],Ks={},Zs=new WeakMap;function qs(e){return Zs.get(e)}function Js(e,t){Zs.set(e,t)}function Ys(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}function Xs(e,t,r){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof Qs?Xs(qs(e),e,r):e)):e.reduce(((e,n,o)=>{let s=t.getValue(n);return n in e||(r&&s instanceof Qs&&(s=Xs(qs(s),s,r)),e[n]=s),e}),{})}class Qs extends Array{#c;constructor(){for(var e=arguments.length,t=new Array(e),r=0;r{this[t]=e}));const a=s.reduce(((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(Js(this,Object.freeze(o.map(((e,t)=>{const r=s[t];return null!=r&&1===a.get(r)?r:null})))),this.#c=[],null==this.#c&&this.#c,!i)return;Object.freeze(this);const u=new Proxy(this,{get:(e,t,r)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){const r=Sr(t,"%index");if(r<0||r>=this.length)throw new RangeError("out of result range");const n=e[r];return n instanceof Error&&Ys(`index ${r}`,n),n}if(Hs.indexOf(t)>=0)return Reflect.get(e,t,r);const n=e[t];if(n instanceof Function)return function(){for(var t=arguments.length,o=new Array(t),s=0;s{r instanceof Error&&Ys(`index ${n}`,r),e&&r instanceof Qs&&(r=r.toArray(e)),t.push(r)})),t}toObject(e){const t=qs(this);return t.reduce(((r,n,o)=>(ir(null!=n,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),Xs(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const r=qs(this),n=[],o=[];for(let s=e;s{this.#o[e]=ei(t)}}}class ni{allowLoose;#o;#h;#p;#f;#g;constructor(e,t,r){rr(this,{allowLoose:!!t}),this.#o=fr(e),this.#p=0,this.#f=null,this.#g=null!=r?r:1024,this.#h=0}get data(){return mr(this.#o)}get dataLength(){return this.#o.length}get consumed(){return this.#h}get bytes(){return new Uint8Array(this.#o)}#y(e){if(this.#f)return this.#f.#y(e);this.#p+=e,ir(this.#g<1||this.#p<=this.#g*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#g} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:fr(this.#o),offset:this.#h,length:e,info:{bytesRead:this.#p,dataLength:this.dataLength}})}#b(e,t,r){let n=Math.ceil(t/Vs)*Vs;return this.#h+n>this.#o.length&&(this.allowLoose&&r&&this.#h+t<=this.#o.length?n=t:ir(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:fr(this.#o),length:this.#o.length,offset:this.#h+n})),this.#o.slice(this.#h,this.#h+n)}subReader(e){const t=new ni(this.#o.slice(this.#h+e),this.allowLoose,this.#g);return t.#f=this,t}readBytes(e,t){let r=this.#b(0,e,!!t);return this.#y(e),this.#h+=r.length,r.slice(0,e)}readValue(){return Or(this.readBytes(Vs))}readIndex(){return Sr(Or(this.readBytes(Vs)))}}const oi={};function si(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new ui(oi,`${r?"":"u"}int${t}`,e,{signed:r,width:t})}function ii(e,t){return new ui(oi,`bytes${t||""}`,e,{size:t})}const ai=Symbol.for("_ethers_typed");class ui{type;value;#m;_typedSymbol;constructor(e,t,r,n){null==n&&(n=null),dr(oi,e,"Typed"),rr(this,{_typedSymbol:ai,type:t,value:r}),this.#m=n,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#m}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#m?-1:!1===this.#m?this.value.length:null}static from(e,t){return new ui(oi,e,t)}static uint8(e){return si(e,8)}static uint16(e){return si(e,16)}static uint24(e){return si(e,24)}static uint32(e){return si(e,32)}static uint40(e){return si(e,40)}static uint48(e){return si(e,48)}static uint56(e){return si(e,56)}static uint64(e){return si(e,64)}static uint72(e){return si(e,72)}static uint80(e){return si(e,80)}static uint88(e){return si(e,88)}static uint96(e){return si(e,96)}static uint104(e){return si(e,104)}static uint112(e){return si(e,112)}static uint120(e){return si(e,120)}static uint128(e){return si(e,128)}static uint136(e){return si(e,136)}static uint144(e){return si(e,144)}static uint152(e){return si(e,152)}static uint160(e){return si(e,160)}static uint168(e){return si(e,168)}static uint176(e){return si(e,176)}static uint184(e){return si(e,184)}static uint192(e){return si(e,192)}static uint200(e){return si(e,200)}static uint208(e){return si(e,208)}static uint216(e){return si(e,216)}static uint224(e){return si(e,224)}static uint232(e){return si(e,232)}static uint240(e){return si(e,240)}static uint248(e){return si(e,248)}static uint256(e){return si(e,256)}static uint(e){return si(e,256)}static int8(e){return si(e,-8)}static int16(e){return si(e,-16)}static int24(e){return si(e,-24)}static int32(e){return si(e,-32)}static int40(e){return si(e,-40)}static int48(e){return si(e,-48)}static int56(e){return si(e,-56)}static int64(e){return si(e,-64)}static int72(e){return si(e,-72)}static int80(e){return si(e,-80)}static int88(e){return si(e,-88)}static int96(e){return si(e,-96)}static int104(e){return si(e,-104)}static int112(e){return si(e,-112)}static int120(e){return si(e,-120)}static int128(e){return si(e,-128)}static int136(e){return si(e,-136)}static int144(e){return si(e,-144)}static int152(e){return si(e,-152)}static int160(e){return si(e,-160)}static int168(e){return si(e,-168)}static int176(e){return si(e,-176)}static int184(e){return si(e,-184)}static int192(e){return si(e,-192)}static int200(e){return si(e,-200)}static int208(e){return si(e,-208)}static int216(e){return si(e,-216)}static int224(e){return si(e,-224)}static int232(e){return si(e,-232)}static int240(e){return si(e,-240)}static int248(e){return si(e,-248)}static int256(e){return si(e,-256)}static int(e){return si(e,-256)}static bytes1(e){return ii(e,1)}static bytes2(e){return ii(e,2)}static bytes3(e){return ii(e,3)}static bytes4(e){return ii(e,4)}static bytes5(e){return ii(e,5)}static bytes6(e){return ii(e,6)}static bytes7(e){return ii(e,7)}static bytes8(e){return ii(e,8)}static bytes9(e){return ii(e,9)}static bytes10(e){return ii(e,10)}static bytes11(e){return ii(e,11)}static bytes12(e){return ii(e,12)}static bytes13(e){return ii(e,13)}static bytes14(e){return ii(e,14)}static bytes15(e){return ii(e,15)}static bytes16(e){return ii(e,16)}static bytes17(e){return ii(e,17)}static bytes18(e){return ii(e,18)}static bytes19(e){return ii(e,19)}static bytes20(e){return ii(e,20)}static bytes21(e){return ii(e,21)}static bytes22(e){return ii(e,22)}static bytes23(e){return ii(e,23)}static bytes24(e){return ii(e,24)}static bytes25(e){return ii(e,25)}static bytes26(e){return ii(e,26)}static bytes27(e){return ii(e,27)}static bytes28(e){return ii(e,28)}static bytes29(e){return ii(e,29)}static bytes30(e){return ii(e,30)}static bytes31(e){return ii(e,31)}static bytes32(e){return ii(e,32)}static address(e){return new ui(oi,"address",e)}static bool(e){return new ui(oi,"bool",!!e)}static bytes(e){return new ui(oi,"bytes",e)}static string(e){return new ui(oi,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new ui(oi,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===ai}static dereference(e,t){if(ui.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}class ci extends ti{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let r=ui.dereference(t,"string");try{r=jo(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return jo(_r(e.readValue(),20))}}class li extends ti{coder;constructor(e){super(e.name,e.type,"_",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)}}function di(e,t,r){let n=[];if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return ir(n,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),ir(!e[n],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),e[n]=!0,r[n]}))}else ar(!1,"invalid tuple value","tuple",r);ar(t.length===n.length,"types/value length mismatch","tuple",r);let o=new ri,s=new ri,i=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=o.writeUpdatableValue();i.push((e=>{n(e+t)}))}else e.encode(o,r)})),i.forEach((e=>{e(o.length)}));let a=e.appendWriter(o);return a+=e.appendWriter(s),a}function hi(e,t){let r=[],n=[],o=e.subReader(0);return t.forEach((t=>{let s=null;if(t.dynamic){let r=e.readIndex(),n=o.subReader(r);try{s=t.decode(n)}catch(e){if(or(e,"BUFFER_OVERRUN"))throw e;s=e,s.baseType=t.name,s.name=t.localName,s.type=t.type}}else try{s=t.decode(e)}catch(e){if(or(e,"BUFFER_OVERRUN"))throw e;s=e,s.baseType=t.name,s.name=t.localName,s.type=t.type}if(null==s)throw new Error("investigate");r.push(s),n.push(t.localName||null)})),Qs.fromItems(r,n)}class pi extends ti{coder;length;constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),rr(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;re||r<-(e+wi))&&this._throwError("value out-of-bounds",t),r=Cr(r,256)}else(rEr(n,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(r)}decode(e){let t=Er(e.readValue(),8*this.size);return this.signed&&(t=function(e,t){const r=Ir(e,"value"),n=BigInt(Sr(t,"width"));return ir(r>>n===Pr,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),r>>n-Wr?-((~r&(Wr<{e.dynamic&&(r=!0),n.push(e.type)})),super("tuple","tuple("+n.join(",")+")",t,r),rr(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]))})),Object.freeze(e)}encode(e,t){const r=ui.dereference(t,"tuple");return di(e,this.coders,r)}decode(e){return hi(e,this.coders)}}function Ci(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}Ci("external public payable override".split(" "));const Ei="constant external internal payable private public pure view override",Mi=(Ci(Ei.split(" ")),"constructor error event fallback function receive struct"),Ii=(Ci(Mi.split(" ")),"calldata memory storage payable indexed"),Fi=Ci(Ii.split(" ")),Oi=Ci([Mi,Ii,"tuple returns",Ei].join(" ").split(" ")),Si={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},_i=new RegExp("^(\\s*)"),Ri=new RegExp("^([0-9]+)"),xi=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),Ni=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),ki=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class Ui{#h;#T;get offset(){return this.#h}get length(){return this.#T.length-this.#h}constructor(e){this.#h=0,this.#T=e.slice()}clone(){return new Ui(this.#T)}reset(){this.#h=0}#v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Ui(this.#T.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#v(this.#h+1,e.match+1);return this.#h=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#h=this.#T.length)throw new Error("out-of-bounds");return this.#T[this.#h]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#h++,e}toString(){const e=[];for(let t=this.#h;t`}}function Di(e,t){const r=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}const Li=new RegExp(/^(.*)\[([0-9]*)\]$/);function zi(e){const t=e.match(ki);if(ar(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const r=parseInt(t[2]);ar(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){const r=parseInt(t[3]);ar(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}const ji={},$i=Symbol.for("_ethers_internal"),Vi="_ParamTypeInternal";class Gi{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,n,o,s,i,a){if(dr(e,ji,"ParamType"),Object.defineProperty(this,$i,{value:Vi}),s&&(s=Object.freeze(s.slice())),"array"===n){if(null==i||null==a)throw new Error("")}else if(null!=i||null!=a)throw new Error("");if("tuple"===n){if(null==s)throw new Error("")}else if(null!=s)throw new Error("");rr(this,{name:t,type:r,baseType:n,indexed:o,components:s,arrayLength:i,arrayChildren:a})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const r={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(r)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map((e=>r.arrayChildren.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map(((e,n)=>r.components[n].walk(e,t)))}return t(this.type,e)}#w(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,s=t.slice();return s.forEach(((t,n)=>{o.#w(e,t,r,(e=>{s[n]=e}))})),void n(s)}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(t))s=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");s=o.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(s.length!==this.components.length)throw new Error("array is wrong length");return s.forEach(((t,n)=>{o[n].#w(e,t,r,(e=>{s[n]=e}))})),void n(s)}const o=r(this.type,t);o.then?e.push(async function(){n(await o)}()):n(o)}async walkAsync(e,t){const r=[],n=[e];return this.#w(r,e,t,(e=>{n[0]=e})),r.length&&await Promise.all(r),n[0]}static from(e,t){if(Gi.isParamType(e))return e;if("string"==typeof e)try{return Gi.from(function(e){const t=[],r=t=>{const r=s0&&"NUMBER"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=Sr(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(a=i.match(xi),a){if(u.text=a[1],s+=u.text.length,Oi.has(u.text)){u.type="KEYWORD";continue}if(u.text.match(ki)){u.type="TYPE";continue}u.type="ID"}else{if(a=i.match(Ri),!a)throw new Error(`unexpected token ${JSON.stringify(i[0])} at position ${s}`);u.text=a[1],u.type="NUMBER",s+=u.text.length}}return new Ui(t.map((e=>Object.freeze(e))))}(e),t)}catch(t){ar(!1,"invalid param type","obj",e)}else if(e instanceof Ui){let r="",n="",o=null;Di(e,Ci(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",o=e.popParams().map((e=>Gi.from(e))),r=`tuple(${o.map((e=>e.format())).join(",")})`):(r=zi(e.popType("TYPE")),n=r);let s=null,i=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();s=new Gi(ji,"",r,n,null,o,i,s),i=t.value,r+=t.text,n="array",o=null}let a=null;if(Di(e,Fi).has("indexed")){if(!t)throw new Error("");a=!0}const u=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new Gi(ji,u,r,n,a,o,i,s)}const r=e.name;ar(!r||"string"==typeof r&&r.match(Ni),"invalid name","obj.name",r);let n=e.indexed;null!=n&&(ar(t,"parameter cannot be indexed","obj.indexed",e.indexed),n=!!n);let o=e.type,s=o.match(Li);if(s){const t=parseInt(s[2]||"-1"),i=Gi.from({type:s[1],components:e.components});return new Gi(ji,r||"",o,"array",n,null,t,i)}if("tuple"===o||o.startsWith("tuple(")||o.startsWith("(")){const t=null!=e.components?e.components.map((e=>Gi.from(e))):null;return new Gi(ji,r||"",o,"tuple",n,t,null,null)}return o=zi(e.type),new Gi(ji,r||"",o,o,n,null,null,null)}static isParamType(e){return e&&e[$i]===Vi}}const Hi=new Map;Hi.set(0,"GENERIC_PANIC"),Hi.set(1,"ASSERT_FALSE"),Hi.set(17,"OVERFLOW"),Hi.set(18,"DIVIDE_BY_ZERO"),Hi.set(33,"ENUM_RANGE_ERROR"),Hi.set(34,"BAD_STORAGE_DATA"),Hi.set(49,"STACK_UNDERFLOW"),Hi.set(50,"ARRAY_RANGE_ERROR"),Hi.set(65,"OUT_OF_MEMORY"),Hi.set(81,"UNINITIALIZED_FUNCTION_CALL");const Ki=new RegExp(/^bytes([0-9]*)$/),Zi=new RegExp(/^(u?int)([0-9]*)$/);let qi=null,Ji=1024;class Yi{#A(e){if(e.isArray())return new pi(this.#A(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new Bi(e.components.map((e=>this.#A(e))),e.name);switch(e.baseType){case"address":return new ci(e.name);case"bool":return new fi(e.name);case"string":return new Wi(e.name);case"bytes":return new yi(e.name);case"":return new Ti(e.name)}let t=e.type.match(Zi);if(t){let r=parseInt(t[2]||"256");return ar(0!==r&&r<=256&&r%8==0,"invalid "+t[1]+" bit length","param",e),new Pi(r/8,"int"===t[1],e.name)}if(t=e.type.match(Ki),t){let r=parseInt(t[1]);return ar(0!==r&&r<=32,"invalid bytes length","param",e),new bi(r,e.name)}ar(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#A(Gi.from(e))));return new Bi(t,"_").defaultValue()}encode(e,t){ur(t.length,e.length,"types/values length mismatch");const r=e.map((e=>this.#A(Gi.from(e)))),n=new Bi(r,"_"),o=new ri;return n.encode(o,t),o.data}decode(e,t,r){const n=e.map((e=>this.#A(Gi.from(e))));return new Bi(n,"_").decode(new ni(t,r,Ji))}static _setDefaultMaxInflation(e){ar("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),Ji=e}static defaultAbiCoder(){return null==qi&&(qi=new Yi),qi}static getBuiltinCallException(e,t,r){return function(e,t,r,n){let o="missing revert data",s=null,i=null;if(r){o="execution reverted";const e=pr(r);if(r=mr(r),0===e.length)o+=" (no data present; likely require(false) occurred",s="require(false)";else if(e.length%32!=4)o+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===mr(e.slice(0,4)))try{s=n.decode(["string"],e.slice(4))[0],i={signature:"Error(string)",name:"Error",args:[s]},o+=`: ${JSON.stringify(s)}`}catch(e){o+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===mr(e.slice(0,4)))try{const t=Number(n.decode(["uint256"],e.slice(4))[0]);i={signature:"Panic(uint256)",name:"Panic",args:[t]},s=`Panic due to ${Hi.get(t)||"UNKNOWN"}(${t})`,o+=`: ${s}`}catch(e){o+=" (could not decode panic code)"}else o+=" (unknown custom error)"}const a={to:t.to?jo(t.to):null,data:t.data||"0x"};return t.from&&(a.from=jo(t.from)),sr(o,"CALL_EXCEPTION",{action:e,data:r,reason:s,transaction:a,invocation:null,revert:i})}(e,t,r,Yi.defaultAbiCoder())}}async function Xi(e,t){const r=await t;return null!=r&&"0x0000000000000000000000000000000000000000"!==r||(ir("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),ar(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),jo(r)}function Qi(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?jo(e):(ir(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),Xi(e,t.resolveName(e))):(r=e)&&"function"==typeof r.getAddress?Xi(e,e.getAddress()):e&&"function"==typeof e.then?Xi(e,e):void ar(!1,"unsupported addressable value","target",e);var r}const ea=new Uint8Array(32);ea.fill(0);const ta=BigInt(-1),ra=BigInt(0),na=BigInt(1),oa=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),sa=_r(na,32),ia=_r(ra,32),aa={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},ua=["name","version","chainId","verifyingContract","salt"];function ca(e){return function(t){return ar("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const la={name:ca("name"),version:ca("version"),chainId:function(e){const t=Mr(e,"domain.chainId");return ar(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):function(e){let t=mr(yr(e)?e:Rr(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}(t)},verifyingContract:function(e){try{return jo(e).toLowerCase()}catch(e){}ar(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=pr(e,"domain.salt");return ar(32===t.length,'invalid domain value "salt"',"domain.salt",e),mr(t)}};function da(e){{const t=e.match(/^(u?)int(\d+)$/);if(t){const r=""===t[1],n=parseInt(t[2]);ar(n%8==0&&0!==n&&n<=256&&t[2]===String(n),"invalid numeric width","type",e);const o=Er(oa,r?n-1:n),s=r?(o+na)*ta:ra;return function(t){const n=Mr(t,"value");return ar(n>=s&&n<=o,`value out-of-bounds for ${e}`,"value",n),_r(r?Cr(n,256):n,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return ar(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){return ar(pr(t).length===r,`invalid length for ${e}`,"value",t),function(e){const t=pr(e),r=t.length%32;return r?Tr([t,ea.slice(r)]):mr(t)}(t)}}}switch(e){case"address":return function(e){return Ar(jo(e),32)};case"bool":return function(e){return e?sa:ia};case"bytes":return function(e){return To(e)};case"string":return function(e){return vo(e)}}return null}function ha(e,t){return`${e}(${t.map((e=>{let{name:t,type:r}=e;return r+" "+t})).join(",")})`}function pa(e){const t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class fa{primaryType;#P;get types(){return JSON.parse(this.#P)}#W;#B;constructor(e){this.#W=new Map,this.#B=new Map;const t=new Map,r=new Map,n=new Map,o={};Object.keys(e).forEach((s=>{o[s]=e[s].map((t=>{let{name:r,type:n}=t,{base:o,index:s}=pa(n);return"int"!==o||e.int||(o="int256"),"uint"!==o||e.uint||(o="uint256"),{name:r,type:o+(s||"")}})),t.set(s,new Set),r.set(s,[]),n.set(s,new Set)})),this.#P=JSON.stringify(o);for(const n in o){const s=new Set;for(const i of o[n]){ar(!s.has(i.name),`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(n)}`,"types",e),s.add(i.name);const o=pa(i.type).base;ar(o!==n,`circular type reference to ${JSON.stringify(o)}`,"types",e),da(o)||(ar(r.has(o),`unknown type ${JSON.stringify(o)}`,"types",e),r.get(o).push(n),t.get(n).add(o))}}const s=Array.from(r.keys()).filter((e=>0===r.get(e).length));ar(0!==s.length,"missing primary type","types",e),ar(1===s.length,`ambiguous primary types or unused types: ${s.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),rr(this,{primaryType:s[0]}),function o(s,i){ar(!i.has(s),`circular type reference to ${JSON.stringify(s)}`,"types",e),i.add(s);for(const e of t.get(s))if(r.has(e)){o(e,i);for(const t of i)n.get(t).add(e)}i.delete(s)}(this.primaryType,new Set);for(const[e,t]of n){const r=Array.from(t);r.sort(),this.#W.set(e,ha(e,o[e])+r.map((e=>ha(e,o[e]))).join(""))}}getEncoder(e){let t=this.#B.get(e);return t||(t=this.#C(e),this.#B.set(e,t)),t}#C(e){{const t=da(e);if(t)return t}const t=pa(e).array;if(t){const e=t.prefix,r=this.getEncoder(e);return n=>{ar(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,"value",n);let o=n.map(r);return this.#W.has(e)&&(o=o.map(To)),To(Tr(o))}}const r=this.types[e];if(r){const t=vo(this.#W.get(e));return e=>{const n=r.map((t=>{let{name:r,type:n}=t;const o=this.getEncoder(n)(e[r]);return this.#W.has(n)?To(o):o}));return n.unshift(t),Tr(n)}}ar(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#W.get(e);return ar(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return To(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(da(e))return r(e,t);const n=pa(e).array;if(n)return ar(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,"value",t),t.map((e=>this._visit(n.prefix,e,r)));const o=this.types[e];if(o)return o.reduce(((e,n)=>{let{name:o,type:s}=n;return e[o]=this._visit(s,t[o],r),e}),{});ar(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new fa(e)}static getPrimaryType(e){return fa.from(e).primaryType}static hashStruct(e,t,r){return fa.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=aa[r];ar(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>ua.indexOf(e.name)-ua.indexOf(t.name))),fa.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return Tr(["0x1901",fa.hashDomain(e),fa.from(t).hash(r)])}static hash(e,t,r){return To(fa.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const o={};e.verifyingContract&&!gr(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const s=fa.from(t);s.visit(r,((e,t)=>("address"!==e||gr(t,20)||(o[t]="0x"),t)));for(const e in o)o[e]=await n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),{domain:e,value:r=s.visit(r,((e,t)=>"address"===e&&o[t]?o[t]:t))}}static getPayload(e,t,r){fa.hashDomain(e);const n={},o=[];ua.forEach((t=>{const r=e[t];null!=r&&(n[t]=la[t](r),o.push({name:t,type:aa[t]}))}));const s=fa.from(t);t=s.types;const i=Object.assign({},t);return ar(null==i.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),i.EIP712Domain=o,s.encode(r),{types:i,domain:n,primaryType:s.primaryType,message:s.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return mr(pr(t));if(e.match(/^u?int/))return Mr(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return ar("string"==typeof t,"invalid string","value",t),t}ar(!1,"unsupported type","type",e)}))}}}const ga="0x0000000000000000000000000000000000000000";function ya(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function ba(e,t,r){let n=0;for(let o=0;o{ir(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const n=e[t]-247;r(t+1+n);const o=ba(e,t+1,n);return r(t+1+n+o),ma(e,t,t+1+n,n+o)}if(e[t]>=192){const n=e[t]-192;return r(t+1+n),ma(e,t,t+1,n)}if(e[t]>=184){const n=e[t]-183;r(t+1+n);const o=ba(e,t+1,n);return r(t+1+n+o),{consumed:1+n+o,result:mr(e.slice(t+1+n,t+1+n+o))}}if(e[t]>=128){const n=e[t]-128;return r(t+1+n),{consumed:1+n,result:mr(e.slice(t+1,t+1+n))}}return{consumed:1,result:ya(e[t])}}function va(e){const t=pr(e,"data"),r=Ta(t,0);return ar(r.consumed===t.length,"unexpected junk after rlp payload","data",e),r.result}function wa(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function Aa(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(Aa(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=wa(t.length);return r.unshift(247+r.length),r.concat(t)}const t=Array.prototype.slice.call(pr(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=wa(t.length);return r.unshift(183+r.length),r.concat(t)}const Pa="0123456789abcdef";function Wa(e){let t="0x";for(const r of Aa(e))t+=Pa[r>>4],t+=Pa[15&r];return t}function Ba(e,t){return{address:jo(e),storageKeys:t.map(((e,t)=>(ar(gr(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}function Ca(e){if(Array.isArray(e))return e.map(((t,r)=>Array.isArray(t)?(ar(2===t.length,"invalid slot set",`value[${r}]`,t),Ba(t[0],t[1])):(ar(null!=t&&"object"==typeof t,"invalid address-slot set","value",e),Ba(t.address,t.storageKeys))));ar(null!=e&&"object"==typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return Ba(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}const Ea=BigInt(0),Ma=BigInt(2),Ia=BigInt(27),Fa=BigInt(28),Oa=BigInt(35),Sa=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),_a=131072;function Ra(e,t){let r=e.toString(16);for(;r.length<2;)r="0"+r;return r+=Vn(t).substring(4),"0x"+r}function xa(e){return"0x"===e?null:jo(e)}function Na(e,t){try{return Ca(e)}catch(r){ar(!1,r.message,t,e)}}function ka(e,t){return"0x"===e?0:Sr(e,t)}function Ua(e,t){if("0x"===e)return Ea;const r=Mr(e,t);return ar(r<=Sa,"value exceeds uint size",t,r),r}function Da(e,t){const r=Mr(e,"value"),n=Rr(r);return ar(n.length<=32,"value too large",`tx.${t}`,r),n}function La(e){return Ca(e).map((e=>[e.address,e.storageKeys]))}function za(e,t){ar(Array.isArray(e),`invalid ${t}`,"value",e);for(let t=0;tObject.assign({},e)))}set blobs(e){if(null==e)return void(this.#z=null);const t=[],r=[];for(let n=0;ne.data)),r.map((e=>e.commitment)),r.map((e=>e.proof))])]):Tr(["0x03",Wa(n)])}(this,r,t?this.blobs:null)}ir(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#j(!0,!0)}get unsignedSerialized(){return this.#j(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#U||this.#D;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&ir(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),ir(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),ir(0!==this.type||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const o=[];return null!=this.type?o.push(this.type):t?o.push(2):e?(o.push(1),r||o.push(0)):r?(o.push(1),o.push(2)):(n&&this.to||(o.push(0),o.push(1),o.push(2)),o.push(3)),o.sort(),o}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return $a.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new $a;if("string"==typeof e){const t=pr(e);if(t[0]>=127)return $a.from(function(e){const t=va(e);ar(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);const r={type:0,nonce:ka(t[0],"nonce"),gasPrice:Ua(t[1],"gasPrice"),gasLimit:Ua(t[2],"gasLimit"),to:xa(t[3]),value:Ua(t[4],"value"),data:mr(t[5]),chainId:Ea};if(6===t.length)return r;const n=Ua(t[6],"v"),o=Ua(t[7],"r"),s=Ua(t[8],"s");if(o===Ea&&s===Ea)r.chainId=n;else{let e=(n-Oa)/Ma;eyr(e)?mr(e):Object.assign({},e)))),t}function Ga(e,t){if(e.provider)return e.provider;ir(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function Ha(e,t){let r=Va(t);if(null!=r.to&&(r.to=Qi(r.to,e)),null!=r.from){const t=r.from;r.from=Promise.all([e.getAddress(),Qi(t,e)]).then((e=>{let[t,r]=e;return ar(t.toLowerCase()===r.toLowerCase(),"transaction from mismatch","tx.from",r),t}))}else r.from=e.getAddress();return await tr(r)}BigInt(0),Symbol.iterator,Symbol.iterator;class Ka{provider;constructor(e){rr(this,{provider:e||null})}async getNonce(e){return Ga(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await Ha(this,e)}async populateTransaction(e){const t=Ga(this,"populateTransaction"),r=await Ha(this,e);null==r.nonce&&(r.nonce=await this.getNonce("pending")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));const n=await this.provider.getNetwork();null!=r.chainId?ar(Mr(r.chainId)===n.chainId,"transaction chainId mismatch","tx.chainId",e.chainId):r.chainId=n.chainId;const o=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null==r.gasPrice||2!==r.type&&!o?0!==r.type&&1!==r.type||!o||ar(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):ar(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas)if(0===r.type||1===r.type){const e=await t.getFeeData();ir(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==r.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(r.type=2,null!=r.gasPrice){const e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(ir(!o,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):ir(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==r.type&&3!==r.type||(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else r.type=2;return await tr(r)}async estimateGas(e){return Ga(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return Ga(this,"call").call(await this.populateCall(e))}async resolveName(e){const t=Ga(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){const t=Ga(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const n=$a.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}}class Za extends Ka{address;constructor(e,t){super(t),rr(this,{address:e})}async getAddress(){return this.address}connect(e){return new Za(this.address,e)}#$(e,t){ir(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:t})}async signTransaction(e){this.#$("transactions","signTransaction")}async signMessage(e){this.#$("messages","signMessage")}async signTypedData(e,t,r){this.#$("typed-data","signTypedData")}}class qa extends Ka{address;#V;constructor(e,t){super(t),ar(e&&"function"==typeof e.sign,"invalid private key","privateKey","[ REDACTED ]"),this.#V=e,rr(this,{address:js(this.signingKey.publicKey)})}get signingKey(){return this.#V}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new qa(this.#V,e)}async signTransaction(e){e=Va(e);const{to:t,from:r}=await tr({to:e.to?Qi(e.to,this.provider):void 0,from:e.from?Qi(e.from,this.provider):void 0});null!=t&&(e.to=t),null!=r&&(e.from=r),null!=e.from&&(ar(jo(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const n=$a.from(e);return n.signature=this.signingKey.sign(n.unsignedHash),n.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign(function(e){return"string"==typeof e&&(e=Xn(e)),To(Tr([Xn("Ethereum Signed Message:\n"),Xn(String(e.length)),e]))}(e)).serialized}async signTypedData(e,t,r){const n=await fa.resolveNames(e,t,r,(async e=>{ir(null!=this.provider,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:e}});const t=await this.provider.resolveName(e);return ir(null!=t,"unconfigured ENS name","UNCONFIGURED_NAME",{value:e}),t}));return this.signingKey.sign(fa.hash(n.domain,t,n.value)).serialized}}const Ja=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),Ya=Uint8Array.from({length:16},((e,t)=>t));let Xa=[Ya],Qa=[Ya.map((e=>(9*e+5)%16))];for(let e=0;e<4;e++)for(let t of[Xa,Qa])t.push(t[e].map((e=>Ja[e])));const eu=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),tu=Xa.map(((e,t)=>e.map((e=>eu[t][e])))),ru=Qa.map(((e,t)=>e.map((e=>eu[t][e])))),nu=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),ou=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),su=(e,t)=>e<>>32-t;function iu(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const au=new Uint32Array(16);class uu extends hn{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:o}=this;return[e,t,r,n,o]}set(e,t,r,n,o){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)au[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,o=0|this.h1,s=o,i=0|this.h2,a=i,u=0|this.h3,c=u,l=0|this.h4,d=l;for(let e=0;e<5;e++){const t=4-e,h=nu[e],p=ou[e],f=Xa[e],g=Qa[e],y=tu[e],b=ru[e];for(let t=0;t<16;t++){const n=su(r+iu(e,o,i,u)+au[f[t]]+h,y[t])+l|0;r=l,l=u,u=0|su(i,10),i=o,o=n}for(let e=0;e<16;e++){const r=su(n+iu(t,s,a,c)+au[g[e]]+p,b[e])+d|0;n=d,d=c,c=0|su(a,10),a=s,s=r}}this.set(this.h1+i+c|0,this.h2+u+d|0,this.h3+l+n|0,this.h4+r+s|0,this.h0+o+a|0)}roundClean(){au.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}const cu=an((()=>new uu));let lu=!1;const du=function(e){return cu(e)};let hu=du;function pu(e){const t=pr(e,"data");return mr(hu(t))}pu._=du,pu.lock=function(){lu=!0},pu.register=function(e){if(lu)throw new TypeError("ripemd160 is locked");hu=e},Object.freeze(pu);let fu=!1;const gu=function(e){return new Uint8Array(function(e){ir(null!=Nn,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),ar(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);const t=new Uint8Array(e);return Nn.getRandomValues(t),t}(e))};let yu=gu;function bu(e){return yu(e)}bu._=gu,bu.lock=function(){fu=!0},bu.register=function(e){if(fu)throw new Error("randomBytes is locked");yu=e},Object.freeze(bu);const mu="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let Tu=null;function vu(e){if(null==Tu){Tu={};for(let e=0;e<58;e++)Tu[mu[e]]=BigInt(e)}const t=Tu[e];return ar(null!=t,"invalid base58 value","letter",e),t}const wu=BigInt(0),Au=BigInt(58);var Pu,Wu,Bu,Cu=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new 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)},Eu=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r};const Mu={16:10,24:12,32:14},Iu=[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],Fu=[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],Ou=[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],Su=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],_u=[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],Ru=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],xu=[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],Nu=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],ku=[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],Uu=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],Du=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],Lu=[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],zu=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],ju=[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],$u=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function Vu(e){const t=[];for(let r=0;r>2,Cu(this,Bu,"f")[s][e%4]=o[e],Cu(this,Wu,"f")[t-s][e%4]=o[e];let i,a=0,u=n;for(;u>16&255]<<24^Fu[i>>8&255]<<16^Fu[255&i]<<8^Fu[i>>24&255]^Iu[a]<<24,a+=1,8!=n)for(let e=1;e>8&255]<<8^Fu[i>>16&255]<<16^Fu[i>>24&255]<<24;for(let e=n/2+1;e>2,s=u%4,Cu(this,Bu,"f")[e][s]=o[c],Cu(this,Wu,"f")[t-e][s]=o[c++],u++}for(let e=1;e>24&255]^zu[i>>16&255]^ju[i>>8&255]^$u[255&i]}encrypt(e){if(16!=e.length)throw new TypeError("invalid plaintext size (must be 16 bytes)");const t=Cu(this,Bu,"f").length-1,r=[0,0,0,0];let n=Vu(e);for(let e=0;e<4;e++)n[e]^=Cu(this,Bu,"f")[0][e];for(let e=1;e>24&255]^_u[n[(t+1)%4]>>16&255]^Ru[n[(t+2)%4]>>8&255]^xu[255&n[(t+3)%4]]^Cu(this,Bu,"f")[e][t];n=r.slice()}const o=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=Cu(this,Bu,"f")[t][e],o[4*e]=255&(Fu[n[e]>>24&255]^s>>24),o[4*e+1]=255&(Fu[n[(e+1)%4]>>16&255]^s>>16),o[4*e+2]=255&(Fu[n[(e+2)%4]>>8&255]^s>>8),o[4*e+3]=255&(Fu[255&n[(e+3)%4]]^s);return o}decrypt(e){if(16!=e.length)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const t=Cu(this,Wu,"f").length-1,r=[0,0,0,0];let n=Vu(e);for(let e=0;e<4;e++)n[e]^=Cu(this,Wu,"f")[0][e];for(let e=1;e>24&255]^ku[n[(t+3)%4]>>16&255]^Uu[n[(t+2)%4]>>8&255]^Du[255&n[(t+1)%4]]^Cu(this,Wu,"f")[e][t];n=r.slice()}const o=new Uint8Array(16);let s=0;for(let e=0;e<4;e++)s=Cu(this,Wu,"f")[t][e],o[4*e]=255&(Ou[n[e]>>24&255]^s>>24),o[4*e+1]=255&(Ou[n[(e+3)%4]>>16&255]^s>>16),o[4*e+2]=255&(Ou[n[(e+2)%4]>>8&255]^s>>8),o[4*e+3]=255&(Ou[255&n[(e+1)%4]]^s);return o}}Pu=new WeakMap,Wu=new WeakMap,Bu=new WeakMap;class Hu{constructor(e,t,r){if(r&&!(this instanceof r))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new Gu(t)},name:{enumerable:!0,value:e}})}}var Ku,Zu,qu=function(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},Ju=function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new 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)};class Yu extends Hu{constructor(e,t){if(super("ECC",e,Yu),Ku.set(this,void 0),Zu.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");qu(this,Ku,new Uint8Array(t),"f")}else qu(this,Ku,new Uint8Array(16),"f");qu(this,Zu,this.iv,"f")}get iv(){return new Uint8Array(Ju(this,Ku,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;rNumber.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let t=15;t>=0;--t)rc(this,ec,"f")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError("invalid counter initial Uint8Array value length");rc(this,ec,"f").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==rc(this,ec,"f")[e]){rc(this,ec,"f")[e]++;break}rc(this,ec,"f")[e]=0}}encrypt(e){var t,r;const n=new Uint8Array(e);for(let e=0;ee<>>32-t;function sc(e,t,r,n,o,s){let i=e[t++]^r[n++],a=e[t++]^r[n++],u=e[t++]^r[n++],c=e[t++]^r[n++],l=e[t++]^r[n++],d=e[t++]^r[n++],h=e[t++]^r[n++],p=e[t++]^r[n++],f=e[t++]^r[n++],g=e[t++]^r[n++],y=e[t++]^r[n++],b=e[t++]^r[n++],m=e[t++]^r[n++],T=e[t++]^r[n++],v=e[t++]^r[n++],w=e[t++]^r[n++],A=i,P=a,W=u,B=c,C=l,E=d,M=h,I=p,F=f,O=g,S=y,_=b,R=m,x=T,N=v,k=w;for(let e=0;e<8;e+=2)C^=oc(A+R|0,7),F^=oc(C+A|0,9),R^=oc(F+C|0,13),A^=oc(R+F|0,18),O^=oc(E+P|0,7),x^=oc(O+E|0,9),P^=oc(x+O|0,13),E^=oc(P+x|0,18),N^=oc(S+M|0,7),W^=oc(N+S|0,9),M^=oc(W+N|0,13),S^=oc(M+W|0,18),B^=oc(k+_|0,7),I^=oc(B+k|0,9),_^=oc(I+B|0,13),k^=oc(_+I|0,18),P^=oc(A+B|0,7),W^=oc(P+A|0,9),B^=oc(W+P|0,13),A^=oc(B+W|0,18),M^=oc(E+C|0,7),I^=oc(M+E|0,9),C^=oc(I+M|0,13),E^=oc(C+I|0,18),_^=oc(S+O|0,7),F^=oc(_+S|0,9),O^=oc(F+_|0,13),S^=oc(O+F|0,18),R^=oc(k+N|0,7),x^=oc(R+k|0,9),N^=oc(x+R|0,13),k^=oc(N+x|0,18);o[s++]=i+A|0,o[s++]=a+P|0,o[s++]=u+W|0,o[s++]=c+B|0,o[s++]=l+C|0,o[s++]=d+E|0,o[s++]=h+M|0,o[s++]=p+I|0,o[s++]=f+F|0,o[s++]=g+O|0,o[s++]=y+S|0,o[s++]=b+_|0,o[s++]=m+R|0,o[s++]=T+x|0,o[s++]=v+N|0,o[s++]=w+k|0}function ic(e,t,r,n,o){let s=n+0,i=n+16*o;for(let n=0;n<16;n++)r[i+n]=e[t+16*(2*o-1)+n];for(let n=0;n0&&(i+=16),sc(r,s,e,t+=16,r,i)}function ac(e,t,r){const n=sn({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:o,r:s,p:i,dkLen:a,asyncTick:u,maxmem:c,onProgress:l}=n;if(Vr(o),Vr(s),Vr(i),Vr(a),Vr(u),Vr(c),void 0!==l&&"function"!=typeof l)throw new Error("progressCb should be function");const d=128*s,h=d/4;if(o<=1||o&o-1||o>=2**(d/8)||o>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(i<0||i>137438953440/d)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(a<0||a>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const p=d*(o+i);if(p>c)throw new Error(`Scrypt: parameters too large, ${p} (128 * r * (N + p)) > ${c} (maxmem)`);const f=dn(Tn,e,t,{c:1,dkLen:d*i}),g=Yr(f),y=Yr(new Uint8Array(d*o)),b=Yr(new Uint8Array(d));let m=()=>{};if(l){const e=2*o*i,t=Math.max(Math.floor(e/1e4),1);let r=0;m=()=>{r++,!l||r%t&&r!==e||l(r/e)}}return{N:o,r:s,p:i,dkLen:a,blockSize32:h,V:y,B32:g,B:f,tmp:b,blockMixCb:m,asyncTick:u}}function uc(e,t,r,n,o){const s=dn(Tn,e,r,{c:1,dkLen:t});return r.fill(0),n.fill(0),o.fill(0),s}let cc=!1,lc=!1;const dc=async function(e,t,r,n,o,s,i){return await async function(e,t,r){const{N:n,r:o,p:s,dkLen:i,blockSize32:a,V:u,B32:c,B:l,tmp:d,blockMixCb:h,asyncTick:p}=ac(e,t,r);for(let e=0;e{ic(u,r,u,r+=a,o),h()})),ic(u,(n-1)*a,c,t,o),h(),await tn(n,p,(()=>{const e=c[t+a-16]%n;for(let r=0;r0&&!(n&n-1),"invalid kdf.N","kdf.N",n),ar(o>0&&s>0,"invalid kdf","kdf",t);const i=wc(e,"crypto.kdfparams.dklen:int!");return ar(32===i,"invalid kdf.dklen","kdf.dflen",i),{name:"scrypt",salt:r,N:n,r:o,p:s,dkLen:64}}if("pbkdf2"===t.toLowerCase()){const t=wc(e,"crypto.kdfparams.salt:data!"),r=wc(e,"crypto.kdfparams.prf:string!"),n=r.split("-").pop();ar("sha256"===n||"sha512"===n,"invalid kdf.pdf","kdf.pdf",r);const o=wc(e,"crypto.kdfparams.c:int!"),s=wc(e,"crypto.kdfparams.dklen:int!");return ar(32===s,"invalid kdf.dklen","kdf.dklen",s),{name:"pbkdf2",salt:t,count:o,dkLen:s,algorithm:n}}}ar(!1,"unsupported key-derivation function","kdf",t)}function Cc(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}function Ec(e){const t=null!=e.salt?pr(e.salt,"options.salt"):bu(32);let r=1<<17,n=8,o=1;return e.scrypt&&(e.scrypt.N&&(r=e.scrypt.N),e.scrypt.r&&(n=e.scrypt.r),e.scrypt.p&&(o=e.scrypt.p)),ar("number"==typeof r&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),ar("number"==typeof n&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),ar("number"==typeof o&&o>0&&Number.isSafeInteger(o),"invalid scrypt p parameter","options.p",o),{name:"scrypt",dkLen:32,salt:t,N:r,r:n,p:o}}function Mc(e,t,r,n){const o=pr(r.privateKey,"privateKey"),s=null!=n.iv?pr(n.iv,"options.iv"):bu(16);ar(16===s.length,"invalid options.iv length","options.iv",n.iv);const i=null!=n.uuid?pr(n.uuid,"options.uuid"):bu(16);ar(16===i.length,"invalid options.uuid length","options.uuid",n.iv);const a=e.slice(0,16),u=e.slice(16,32),c=pr(new nc(a,s).encrypt(o)),l=To(Tr([u,c])),d={address:r.address.substring(2).toLowerCase(),id:bc(i),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:mr(s).substring(2)},ciphertext:mr(c).substring(2),kdf:"scrypt",kdfparams:{salt:mr(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:l.substring(2)}};if(r.mnemonic){const t=null!=n.client?n.client:`ethers/${Qt}`,o=r.mnemonic.path||Ac,s=r.mnemonic.locale||"en",i=e.slice(32,64),a=pr(r.mnemonic.entropy,"account.mnemonic.entropy"),u=bu(16),c=pr(new nc(i,u).encrypt(a)),l=new Date,h="UTC--"+l.getUTCFullYear()+"-"+Tc(l.getUTCMonth()+1,2)+"-"+Tc(l.getUTCDate(),2)+"T"+Tc(l.getUTCHours(),2)+"-"+Tc(l.getUTCMinutes(),2)+"-"+Tc(l.getUTCSeconds(),2)+".0Z--"+d.address;d["x-ethers"]={client:t,gethFilename:h,path:o,locale:s,mnemonicCounter:mr(u).substring(2),mnemonicCiphertext:mr(c).substring(2),version:"0.1"}}return JSON.stringify(d)}function Ic(e,t,r){null==r&&(r={});const n=vc(t),o=Ec(r);return Mc(pr(yc(n,o.salt,o.N,o.r,o.p,64)),o,e,r)}async function Fc(e,t,r){null==r&&(r={});const n=vc(t),o=Ec(r);return Mc(pr(await gc(n,o.salt,o.N,o.r,o.p,64,r.progressCallback)),o,e,r)}const Oc="m/44'/60'/0'/0/0",Sc=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),_c=2147483648,Rc=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");function xc(e,t){let r="";for(;e;)r="0123456789abcdef"[e%16]+r,e=Math.trunc(e/16);for(;r.length<2*t;)r="0"+r;return"0x"+r}function Nc(e){const t=pr(e);return function(e){const t=pr(e);let r=Or(t),n="";for(;r;)n=mu[Number(r%Au)]+n,r/=Au;for(let e=0;e=0;t-=8)o[33+(t>>3)]=e>>24-t&255;const s=pr(xo("sha512",t,o));return{IL:s.slice(0,32),IR:s.slice(32)}}function Dc(e,t){const r=t.split("/");ar(r.length>0,"invalid path","path",t),"m"===r[0]&&(ar(0===e.depth,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,"path",t),r.shift());let n=e;for(let e=0;e=16&&r.length<=64,"invalid seed","seed","[REDACTED]");const n=pr(xo("sha512",Sc,r)),o=new zs(mr(n.slice(0,32)));return new Lc(kc,o,"0x00000000",mr(n.slice(32)),"m",0,0,t,null)}static fromExtendedKey(e){const t=Rr(function(e){let t=wu;for(let r=0;r16)throw new TypeError("PKCS#7 padding byte out of range");const r=e.length-t;for(let n=0;n{setTimeout((()=>{t()}),e)}))}class Gc extends qa{constructor(e,t){"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),super("string"==typeof e?new zs(e):e,t)}connect(e){return new Gc(this.signingKey,e)}async encrypt(e,t){const r={address:this.address,privateKey:this.privateKey};return await Fc(r,e,{progressCallback:t})}encryptSync(e){return Ic({address:this.address,privateKey:this.privateKey},e)}static#K(e){if(ar(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&"en"===e.mnemonic.locale){const t=Oo.fromEntropy(e.mnemonic.entropy),r=Lc.fromMnemonic(t,e.mnemonic.path);if(r.address===e.address&&r.privateKey===e.privateKey)return r;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const t=new Gc(e.privateKey);return ar(t.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),t}static async fromEncryptedJson(e,t,r){let n=null;return Pc(e)?n=await async function(e,t,r){const n=JSON.parse(e),o=vc(t),s=Bc(n);if("pbkdf2"===s.name){r&&(r(0),await Cc(0));const{salt:e,count:t,dkLen:i,algorithm:a}=s,u=qn(o,e,t,i,a);return r&&(r(1),await Cc(0)),Wc(n,u)}ir("scrypt"===s.name,"cannot be reached","UNKNOWN_ERROR",{params:s});const{salt:i,N:a,r:u,p:c,dkLen:l}=s;return Wc(n,await gc(o,i,a,u,c,l,r))}(e,t,r):jc(e)&&(r&&(r(0),await Vc(0)),n=$c(e,t),r&&(r(1),await Vc(0))),Gc.#K(n)}static fromEncryptedJsonSync(e,t){let r=null;return Pc(e)?r=function(e,t){const r=JSON.parse(e),n=vc(t),o=Bc(r);if("pbkdf2"===o.name){const{salt:e,count:t,dkLen:s,algorithm:i}=o;return Wc(r,qn(n,e,t,s,i))}ir("scrypt"===o.name,"cannot be reached","UNKNOWN_ERROR",{params:o});const{salt:s,N:i,r:a,p:u,dkLen:c}=o;return Wc(r,yc(n,s,i,a,u,c))}(e,t):jc(e)?r=$c(e,t):ar(!1,"invalid JSON wallet","json","[ REDACTED ]"),Gc.#K(r)}static createRandom(e){const t=Lc.createRandom();return e?t.connect(e):t}static fromPhrase(e,t){const r=Lc.fromPhrase(e);return t?r.connect(t):r}}const Hc={en:Co.wordlist()};function Kc(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const Zc="constant external internal payable private public pure view",qc=Kc(Zc.split(" ")),Jc="constructor error event fallback function receive struct",Yc=Kc(Jc.split(" ")),Xc="calldata memory storage payable indexed",Qc=Kc(Xc.split(" ")),el=Kc([Jc,Xc,"tuple returns",Zc].join(" ").split(" ")),tl={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},rl=new RegExp("^(\\s*)"),nl=new RegExp("^([0-9]+)"),ol=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),sl=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),il=new RegExp("^(trcToken|address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class al{#h;#T;get offset(){return this.#h}get length(){return this.#T.length-this.#h}constructor(e){this.#h=0,this.#T=e.slice()}clone(){return new al(this.#T)}reset(){this.#h=0}#v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new al(this.#T.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e)throw new Error(`expected ${e}; got ${JSON.stringify(this.peek())}`);return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#v(this.#h+1,e.match+1);return this.#h=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#h=this.#T.length)throw new Error("out-of-bounds");return this.#T[this.#h]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#h++,e}toString(){const e=[];for(let t=this.#h;t`}}function ul(e){const t=[],r=t=>{const r=s0&&"NUMBER"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=Sr(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(a=i.match(ol),a){if(u.text=a[1],s+=u.text.length,el.has(u.text)){u.type="KEYWORD";continue}if(u.text.match(il)){u.type="TYPE";continue}u.type="ID"}else{if(a=i.match(nl),!a)throw new Error(`unexpected token ${JSON.stringify(i[0])} at position ${s}`);u.text=a[1],u.type="NUMBER",s+=u.text.length}}return new al(t.map((e=>Object.freeze(e))))}function cl(e,t){let r=[];for(const n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function ll(e,t){if(t.peekKeyword(Yc)){const r=t.pop().text;if(r!==e)throw new Error(`expected ${e}, got ${r}`)}return t.popType("ID")}function dl(e,t){const r=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function hl(e){let t=dl(e,qc);return cl(t,Kc("constant payable nonpayable".split(" "))),cl(t,Kc("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function pl(e,t){return e.popParams().map((e=>El.from(e,t)))}function fl(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return Mr(e.pop().text);throw new Error("invalid gas")}return null}function gl(e){if(e.length)throw new Error(`unexpected tokens: ${e.toString()}`)}const yl=new RegExp(/^(.*)\[([0-9]*)\]$/);function bl(e){const t=e.match(il);if(ar(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const r=parseInt(t[2]);ar(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){const r=parseInt(t[3]);ar(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}const ml={},Tl=Symbol.for("_ethers_internal"),vl="_ParamTypeInternal",wl="_ErrorInternal",Al="_EventInternal",Pl="_ConstructorInternal",Wl="_FallbackInternal",Bl="_FunctionInternal",Cl="_StructInternal";class El{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,n,o,s,i,a){if(dr(e,ml,"ParamType"),Object.defineProperty(this,Tl,{value:vl}),s&&(s=Object.freeze(s.slice())),"array"===n){if(null==i||null==a)throw new Error("")}else if(null!=i||null!=a)throw new Error("");if("tuple"===n)null==s&&(s=Object.freeze([]));else if(null!=s)throw new Error("");rr(this,{name:t,type:r,baseType:n,indexed:o,components:s,arrayLength:i,arrayChildren:a})}format(e){if(null==e&&(e="sighash"),"json"===e){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.isTuple()&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?("sighash"!==e&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")"):t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map((e=>r.arrayChildren.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map(((e,n)=>r.components[n].walk(e,t)))}return t(this.type,e)}#w(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const o=this.arrayChildren,s=t.slice();return s.forEach(((t,n)=>{o.#w(e,t,r,(e=>{s[n]=e}))})),void n(s)}if(this.isTuple()){const o=this.components;let s;if(Array.isArray(t))s=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");s=o.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(s.length!==this.components.length)throw new Error("array is wrong length");return s.forEach(((t,n)=>{o[n].#w(e,t,r,(e=>{s[n]=e}))})),void n(s)}const o=r(this.type,t);o.then?e.push(async function(){n(await o)}()):n(o)}async walkAsync(e,t){const r=[],n=[e];return this.#w(r,e,t,(e=>{n[0]=e})),r.length&&await Promise.all(r),n[0]}static from(e,t){if(El.isParamType(e))return e;if("string"==typeof e)return El.from(ul(e),t);if(e instanceof al){let r="",n="",o=null;dl(e,Kc(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",o=e.popParams().map((e=>El.from(e))),r=`tuple(${o.map((e=>e.format())).join(",")})`):(r=bl(e.popType("TYPE")),n=r);let s=null,i=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();s=new El(ml,"",r,n,null,o,i,s),i=t.value,r+=t.text,n="array",o=null}let a=null;if(dl(e,Qc).has("indexed")){if(!t)throw new Error("");a=!0}const u=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new El(ml,u,r,n,a,o,i,s)}const r=e.name;ar(!r||"string"==typeof r&&r.match(sl),"invalid name","obj.name",r);let n=e.indexed;null!=n&&(ar(t,"parameter cannot be indexed","obj.indexed",e.indexed),n=!!n);let o=e.type,s=o.match(yl);if(s){const t=parseInt(s[2]||"-1"),i=El.from({type:s[1],components:e.components});return new El(ml,r||"",o,"array",n,null,t,i)}if("tuple"===o||o.startsWith("tuple(")||o.startsWith("(")){const t=null!=e.components?e.components.map((e=>El.from(e))):null;return new El(ml,r||"",o,"tuple",n,t,null,null)}return o=bl(e.type),new El(ml,r||"",o,o,n,null,null,null)}static isParamType(e){return e&&e[Tl]===vl}}class Ml{type;inputs;constructor(e,t,r){dr(e,ml,"Fragment"),rr(this,{type:t,inputs:r=Object.freeze(r.slice())})}static from(e){if("string"==typeof e){try{Ml.from(JSON.parse(e))}catch(e){}return Ml.from(ul(e))}if(e instanceof al)switch(e.peekKeyword(Yc)){case"constructor":return _l.from(e);case"error":return Ol.from(e);case"event":return Sl.from(e);case"fallback":case"receive":return Rl.from(e);case"function":return xl.from(e);case"struct":return Nl.from(e)}else if("object"==typeof e){switch(e.type){case"constructor":return _l.from(e);case"error":return Ol.from(e);case"event":return Sl.from(e);case"fallback":case"receive":return Rl.from(e);case"function":return xl.from(e);case"struct":return Nl.from(e)}ir(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}ar(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return _l.isFragment(e)}static isError(e){return Ol.isFragment(e)}static isEvent(e){return Sl.isFragment(e)}static isFunction(e){return xl.isFragment(e)}static isStruct(e){return Nl.isFragment(e)}}class Il extends Ml{name;constructor(e,t,r,n){super(e,t,n),ar("string"==typeof r&&r.match(sl),"invalid identifier","name",r),n=Object.freeze(n.slice()),rr(this,{name:r})}}function Fl(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}class Ol extends Il{constructor(e,t,r){super(e,"error",t,r),Object.defineProperty(this,Tl,{value:wl})}get selector(){return vo(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+Fl(e,this.inputs)),t.join(" ")}static from(e){if(Ol.isFragment(e))return e;if("string"==typeof e)return Ol.from(ul(e));if(e instanceof al){const t=ll("error",e),r=pl(e);return gl(e),new Ol(ml,t,r)}return new Ol(ml,e.name,e.inputs?e.inputs.map(El.from):[])}static isFragment(e){return e&&e[Tl]===wl}}class Sl extends Il{anonymous;constructor(e,t,r,n){super(e,"event",t,r),Object.defineProperty(this,Tl,{value:Al}),rr(this,{anonymous:n})}get topicHash(){return vo(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+Fl(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){return t=(t||[]).map((e=>El.from(e))),new Sl(ml,e,t,!1).topicHash}static from(e){if(Sl.isFragment(e))return e;if("string"==typeof e)return Sl.from(ul(e));if(e instanceof al){const t=ll("event",e),r=pl(e,!0),n=!!dl(e,Kc(["anonymous"])).has("anonymous");return gl(e),new Sl(ml,t,r,n)}return new Sl(ml,e.name,e.inputs?e.inputs.map((e=>El.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[Tl]===Al}}class _l extends Ml{payable;gas;constructor(e,t,r,n,o){super(e,t,r),Object.defineProperty(this,Tl,{value:Pl}),rr(this,{payable:n,gas:o})}format(e){if(ir(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${Fl(e,this.inputs)}`];return t.push(this.payable?"payable":"nonpayable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(_l.isFragment(e))return e;if("string"==typeof e)return _l.from(ul(e));if(e instanceof al){dl(e,Kc(["constructor"]));const t=pl(e),r=!!dl(e,Kc(["payable"])).has("payable"),n=fl(e);return gl(e),new _l(ml,"constructor",t,r,n)}return new _l(ml,"constructor",e.inputs?e.inputs.map(El.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[Tl]===Pl}}class Rl extends Ml{payable;constructor(e,t,r){super(e,"fallback",t),Object.defineProperty(this,Tl,{value:Wl}),rr(this,{payable:r})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if(Rl.isFragment(e))return e;if("string"==typeof e)return Rl.from(ul(e));if(e instanceof al){const t=e.toString();if(ar(e.peekKeyword(Kc(["fallback","receive"])),"type must be fallback or receive","obj",t),"receive"===e.popKeyword(Kc(["fallback","receive"]))){const t=pl(e);return ar(0===t.length,"receive cannot have arguments","obj.inputs",t),dl(e,Kc(["payable"])),gl(e),new Rl(ml,[],!0)}let r=pl(e);r.length?ar(1===r.length&&"bytes"===r[0].type,"invalid fallback inputs","obj.inputs",r.map((e=>e.format("minimal"))).join(", ")):r=[El.from("bytes")];const n=hl(e);if(ar("nonpayable"===n||"payable"===n,"fallback cannot be constants","obj.stateMutability",n),dl(e,Kc(["returns"])).has("returns")){const t=pl(e);ar(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return gl(e),new Rl(ml,r,"payable"===n)}if("receive"===e.type)return new Rl(ml,[],!0);if("fallback"===e.type){const t=[El.from("bytes")],r="payable"===e.stateMutability;return new Rl(ml,t,r)}ar(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[Tl]===Wl}}class xl extends Il{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,n,o,s){super(e,"function",t,n),Object.defineProperty(this,Tl,{value:Bl}),rr(this,{constant:"view"===r||"pure"===r,gas:s,outputs:o=Object.freeze(o.slice()),payable:"payable"===r,stateMutability:r})}get selector(){return vo(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+Fl(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(Fl(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){return t=(t||[]).map((e=>El.from(e))),new xl(ml,e,"view",t,[],null).selector}static from(e){if(xl.isFragment(e))return e;if("string"==typeof e)return xl.from(ul(e));if(e instanceof al){const t=ll("function",e),r=pl(e),n=hl(e);let o=[];dl(e,Kc(["returns"])).has("returns")&&(o=pl(e));const s=fl(e);return gl(e),new xl(ml,t,n,r,o,s)}return new xl(ml,e.name,e.stateMutability,e.inputs?e.inputs.map(El.from):[],e.outputs?e.outputs.map(El.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[Tl]===Bl}}class Nl extends Il{constructor(e,t,r){super(e,"struct",t,r),Object.defineProperty(this,Tl,{value:Cl})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)return Nl.from(ul(e));if(e instanceof al){const t=ll("struct",e),r=pl(e);return gl(e),new Nl(ml,t,r)}return new Nl(ml,e.name,e.inputs?e.inputs.map(El.from):[])}static isFragment(e){return e&&e[Tl]===Cl}}class kl{fragment;name;signature;topic;args;constructor(e,t,r){const n=e.name,o=e.format();rr(this,{fragment:e,name:n,signature:o,topic:t,args:r})}}class Ul{fragment;name;args;signature;selector;value;constructor(e,t,r,n){const o=e.name,s=e.format();rr(this,{fragment:e,name:o,args:r,signature:s,selector:t,value:n})}}class Dl{fragment;name;args;signature;selector;constructor(e,t,r){const n=e.name,o=e.format();rr(this,{fragment:e,name:n,args:r,signature:o,selector:t})}}class Ll{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){rr(this,{hash:e,_isIndexed:!0})}}const zl={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},jl={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&zl[e.toString()]&&(t=zl[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class $l{fragments;deploy;fallback;receive;#Z;#q;#J;#Y;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#J=new Map,this.#Z=new Map,this.#q=new Map;const r=[];for(const e of t)try{r.push(Ml.from(e))}catch(e){console.log("EE",e)}rr(this,{fragments:Object.freeze(r)});let n=null,o=!1;this.#Y=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let r;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void rr(this,{deploy:e});case"fallback":return void(0===e.inputs.length?o=!0:(ar(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),n=e,o=n.payable));case"function":r=this.#J;break;case"event":r=this.#q;break;case"error":r=this.#Z;break;default:return}const s=e.format();r.has(s)||r.set(s,e)})),this.deploy||rr(this,{deploy:_l.from("constructor()")}),rr(this,{fallback:n,receive:o})}format(e){const t=e?"minimal":"full",r=this.fragments.map((e=>e.format(t)));return r}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return Yi.defaultAbiCoder()}#X(e,t,r){if(gr(e)){const t=e.toLowerCase();for(const e of this.#J.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#J)t.split("(")[0]===e&&n.push(r);if(t){const e=t.length>0?t[t.length-1]:null;let r=t.length,o=!0;ui.isTyped(e)&&"overrides"===e.type&&(o=!1,r--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===r||o&&t===r-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let o=0;o=r.length){if("overrides"===t[o].type)continue;n.splice(e,1);break}if(t[o].type!==r[o].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&n.splice(0,1)}return 0===n.length?null:(n.length>1&&r&&ar(!1,`ambiguous function description (i.e. matches ${n.map((e=>JSON.stringify(e.format()))).join(", ")})`,"key",e),n[0])}return this.#J.get(xl.from(e).format())||null}getFunctionName(e){const t=this.#X(e,null,!1);return ar(t,"no matching function","key",e),t.name}getFunction(e,t){return this.#X(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#J.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r=0;e--)n[e].inputs.length=0;e--){const r=n[e].inputs;for(let o=0;o1&&r&&ar(!1,`ambiguous event description (i.e. matches ${n.map((e=>JSON.stringify(e.format()))).join(", ")})`,"key",e),n[0])}return this.#q.get(Sl.from(e).format())||null}getEventName(e){const t=this.#Q(e,null,!1);return ar(t,"no matching event","key",e),t.name}getEvent(e,t){return this.#Q(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#q.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r1&&ar(!1,`ambiguous error description (i.e. ${t.map((e=>JSON.stringify(e.format()))).join(", ")})`,"name",e),t[0])}if("Error(string)"===(e=Ol.from(e).format()))return Ol.from("error Error(string)");if("Panic(uint256)"===e)return Ol.from("error Panic(uint256)");return this.#Z.get(e)||null}forEachError(e){const t=Array.from(this.#Z.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r"string"===e.type?vo(t):"bytes"===e.type?To(mr(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=_r(t)),"address"===e.type&&this.#Y.encode(["address"],[t]),Ar(mr(t),32));for(t.forEach(((t,o)=>{const s=e.inputs[o];s.indexed?null==t?r.push(null):"array"===s.baseType||"tuple"===s.baseType?ar(!1,"filtering with tuples or arrays not supported","contract."+s.name,t):Array.isArray(t)?r.push(t.map((e=>n(s,e)))):r.push(n(s,t)):ar(null==t,"cannot filter non-indexed parameters; must be null","contract."+s.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if("string"==typeof e){const t=this.getEvent(e);ar(t,"unknown event","eventFragment",e),e=t}const r=[],n=[],o=[];return e.anonymous||r.push(e.topicHash),ar(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,s)=>{const i=t[s];if(e.indexed)if("string"===e.type)r.push(vo(i));else if("bytes"===e.type)r.push(To(i));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this.#Y.encode([e.type],[i]))}else n.push(e),o.push(i)})),{data:this.#Y.encode(n,o),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e){const t=this.getEvent(e);ar(t,"unknown event","eventFragment",e),e=t}if(null!=r&&!e.anonymous){const t=e.topicHash;ar(gr(r[0],32)&&r[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const n=[],o=[],s=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(El.from({type:"bytes32",name:e.name})),s.push(!0)):(n.push(e),s.push(!1)):(o.push(e),s.push(!1))}));const i=null!=r?this.#Y.decode(n,Tr(r)):null,a=this.#Y.decode(o,t,!0),u=[],c=[];let l=0,d=0;return e.inputs.forEach(((e,t)=>{let r=null;if(e.indexed)if(null==i)r=new Ll(null);else if(s[t])r=new Ll(i[d++]);else try{r=i[d++]}catch(e){r=e}else try{r=a[l++]}catch(e){r=e}u.push(r),c.push(e.name||null)})),Qs.fromItems(u,c)}parseTransaction(e){const t=pr(e.data,"tx.data"),r=Mr(null!=e.value?e.value:0,"tx.value"),n=this.getFunction(mr(t.slice(0,4)));if(!n)return null;const o=this.#Y.decode(n.inputs,t.slice(4));return new Ul(n,n.selector,o,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new kl(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=mr(e),r=this.getError(wr(t,0,4));if(!r)return null;const n=this.#Y.decode(r.inputs,wr(t,4));return new Dl(r,r.selector,n)}static from(e){return e instanceof $l?e:"string"==typeof e?new $l(JSON.parse(e)):"function"==typeof e.format?new $l(e.format("json")):new $l(e)}}const Vl=e=>$r.from(e),Gl=e=>$r.from(e).serialized,Hl=e=>pr(e),Kl={sighash:"sighash",minimal:"minimal",full:"full",json:"json"},Zl=Oo.isValidMnemonic;xo.register(((e,t,r)=>xo._(e,Buffer.from(t),Buffer.from(r))));const ql=new Uint8Array(32);ql.fill(0);const Jl=BigInt(-1),Yl=BigInt(0),Xl=BigInt(1),Ql=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),ed=_r(Xl,32),td=_r(Yl,32),rd={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},nd=["name","version","chainId","verifyingContract","salt"];function od(e){return function(t){return ar("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const sd={name:od("name"),version:od("version"),chainId:function(e){return Mr(e,"domain.chainId")},verifyingContract:function(e){try{return(t=e,bg.address.toHex(t)).toLowerCase()}catch(e){}var t;ar(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=pr(e,"domain.salt");return ar(32===t.length,'invalid domain value "salt"',"domain.salt",e),mr(t)}};function id(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");ar(n%8==0&&0!==n&&n<=256&&(null==t[2]||t[2]===String(n)),"invalid numeric width","type",e);const o=Er(Ql,r?n-1:n),s=r?(o+Xl)*Jl:Yl;return function(t){const n=Mr(t,"value");return ar(n>=s&&n<=o,`value out-of-bounds for ${e}`,"value",n),_r(r?Cr(n,256):n,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return ar(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){return ar(pr(t).length===r,`invalid length for ${e}`,"value",t),function(e){const t=pr(e),r=t.length%32;return r?Tr([t,ql.slice(r)]):mr(t)}(t)}}}switch(e){case"trcToken":return id("uint256");case"address":return function(e){return Ar((t=e,bg.address.toHex(t).replace(Nt,"0x")),32);var t};case"bool":return function(e){return e?ed:td};case"bytes":return function(e){return To(e)};case"string":return function(e){return vo(e)}}return null}function ad(e,t){return`${e}(${t.map((e=>{let{name:t,type:r}=e;return r+" "+t})).join(",")})`}class ud{primaryType;#P;get types(){return JSON.parse(this.#P)}#W;#B;constructor(e){this.#P=JSON.stringify(e),this.#W=new Map,this.#B=new Map;const t=new Map,r=new Map,n=new Map;Object.keys(e).forEach((e=>{t.set(e,new Set),r.set(e,[]),n.set(e,new Set)}));for(const n in e){const o=new Set;for(const s of e[n]){ar(!o.has(s.name),`duplicate variable name ${JSON.stringify(s.name)} in ${JSON.stringify(n)}`,"types",e),o.add(s.name);const i=s.type.match(/^([^\x5b]*)(\x5b|$)/)[1]||null;ar(i!==n,`circular type reference to ${JSON.stringify(i)}`,"types",e),id(i)||(ar(r.has(i),`unknown type ${JSON.stringify(i)}`,"types",e),r.get(i).push(n),t.get(n).add(i))}}const o=Array.from(r.keys()).filter((e=>0===r.get(e).length));ar(0!==o.length,"missing primary type","types",e),ar(1===o.length,`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),rr(this,{primaryType:o[0]}),function o(s,i){ar(!i.has(s),`circular type reference to ${JSON.stringify(s)}`,"types",e),i.add(s);for(const e of t.get(s))if(r.has(e)){o(e,i);for(const t of i)n.get(t).add(e)}i.delete(s)}(this.primaryType,new Set);for(const[t,r]of n){const n=Array.from(r);n.sort(),this.#W.set(t,ad(t,e[t])+n.map((t=>ad(t,e[t]))).join(""))}}getEncoder(e){let t=this.#B.get(e);return t||(t=this.#C(e),this.#B.set(e,t)),t}#C(e){{const t=id(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e);return n=>{ar(!t[3]||parseInt(t[3])===n.length,`array length mismatch; expected length ${parseInt(t[3])}`,"value",n);let o=n.map(r);return this.#W.has(e)&&(o=o.map(To)),To(Tr(o))}}const r=this.types[e];if(r){const t=vo(this.#W.get(e));return e=>{const n=r.map((t=>{let{name:r,type:n}=t;const o=this.getEncoder(n)(e[r]);return this.#W.has(n)?To(o):o}));return n.unshift(t),Tr(n)}}ar(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#W.get(e);return ar(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return To(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(id(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n)return ar(!n[3]||parseInt(n[3])===t.length,`array length mismatch; expected length ${parseInt(n[3])}`,"value",t),t.map((e=>this._visit(n[1],e,r)));const o=this.types[e];if(o)return o.reduce(((e,n)=>{let{name:o,type:s}=n;return e[o]=this._visit(s,t[o],r),e}),{});ar(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new ud(e)}static getPrimaryType(e){return ud.from(e).primaryType}static hashStruct(e,t,r){return ud.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=rd[r];ar(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>nd.indexOf(e.name)-nd.indexOf(t.name))),ud.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return Tr(["0x1901",ud.hashDomain(e),ud.from(t).hash(r)])}static hash(e,t,r){return To(ud.encode(e,t,r))}static getPayload(e,t,r){ud.hashDomain(e);const n={},o=[];nd.forEach((t=>{const r=e[t];null!=r&&(n[t]=sd[t](r),o.push({name:t,type:rd[t]}))}));const s=ud.from(t),i=Object.assign({},t);return ar(null==i.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),i.EIP712Domain=o,s.encode(r),{types:i,domain:n,primaryType:s.primaryType,message:s.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return mr(pr(t));if(e.match(/^u?int/))return Mr(t).toString();switch(e){case"trcToken":return Mr(t).toString();case"address":return t.toLowerCase();case"bool":return!!t;case"string":return ar("string"==typeof t,"invalid string","value",t),t}ar(!1,"unsupported type","type",e)}))}}}var cd=r(6513);function ld(e){const t=Md(e);let r=Md(t).slice(0,4);return r=e.concat(r),Jt(r)}function dd(e){if("string"!=typeof e)return!1;if(e.length<=4)return!1;let t=Yt(e);if(e.length<=4)return!1;const r=t.length-4,n=t.slice(r);t=t.slice(0,r);const o=Md(t),s=Md(o).slice(0,4);if(n[0]==s[0]&&n[1]==s[1]&&n[2]==s[2]&&n[3]==s[3])return t;throw new Error("Invalid address provided")}function hd(e,t){"string"==typeof e&&(e=$t(e));const r=Ed($t(t.txID),e);return Array.isArray(t.signature)?t.signature.includes(r)||t.signature.push(r):t.signature=[r],t}function pd(e,t){e="0x"+e.replace(/^0x/,""),t="0x"+t.replace(/^0x/,"");const r=$s(Hl(e),$r.from(t));return Rt+r.substring(2)}function fd(e){return btoa(String.fromCharCode(...e))}function gd(e,t){return"string"==typeof e&&(e=$t(e)),Ed(Md(t),e)}function yd(e,t,r,n){const o=`0x${n.replace(/^0x/,"")}`,s=new zs(o),i=ud.hash(e,t,r),a=s.sign(i);return["0x",a.r.substring(2),a.s.substring(2),Number(a.v).toString(16)].join("")}function bd(e){const t=Ot(e);return proto.protocol.Transaction.deserializeBinary(t).getRawData().serializeBinary()}function md(){let e=Ft(cd.b.utils.randomPrivateKey());return e=e.padStart(64,"0"),$t(e)}function Td(e){65===e.length&&(e=e.slice(1));const t=To(new Uint8Array(e)).toString().substring(2);return $t(Rt+t.substring(24))}function vd(e){return Td(Cd(e))}function wd(e){const t=Yt(e);if(t.length<=4)return!1;const r=t.slice(0,t.length-4),n=Md(r),o=Md(n);return o[0]===t[r.length]&&o[1]===t[r.length+1]&&o[2]===t[r.length+2]&&o[3]===t[r.length+3]&&r}function Ad(e){if("string"!=typeof e)return!1;if(e.length!==_t)return!1;let t=Yt(e);if(25!==t.length)return!1;if(t[0]!==xt)return!1;const r=t.slice(21);t=t.slice(0,21);const n=Md(t),o=Md(n).slice(0,4);return r[0]==o[0]&&r[1]==o[1]&&r[2]==o[2]&&r[3]==o[3]}function Pd(e){return ld(Td(Cd(Ot(e))))}function Wd(e){return Ft(Td(Cd(Ot(e))))}function Bd(e){return St(Td(Cd(Ot(e))))}function Cd(e){const t=cd.b.ProjectivePoint.fromPrivateKey(new Uint8Array(function(e){return $t(Ft(e).padStart(64,"0"))}(e))),r=t.x,n=t.y;return $t(`04${r.toString(16).padStart(64,"0")}${n.toString(16).padStart(64,"0")}`)}function Ed(e,t){const r=cd.b.sign(Ft(e),Ft(t)),n=r.r.toString(16),o=r.s.toString(16),s=r.recovery+27;return n.padStart(64,"0")+o.padStart(64,"0")+Et(s)}function Md(e){return $t(Vn("0x"+Ft(e)).replace(/^0x/,""))}function Id(e){return ld(vd(Ot(e)))}function Fd(e){return ld(vd($t(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1])))}const Od="Invalid tron path provided";function Sd(){const e=md(),t=Cd(e),r=vd(e);return{privateKey:Ft(e),publicKey:Ft(t),address:{base58:ld(r),hex:Ft(r)}}}function _d(e){if(zf.isObject(e)||(e={}),e.path||(e.path=kt),!String(e.path).match(/^m\/44\'\/195\'/))throw new Error(Od);const t=Lc.createRandom(e.password,e.path,e.wordlist);return{mnemonic:t.mnemonic,privateKey:t.privateKey,publicKey:t.signingKey.publicKey,address:Fd(t.privateKey.replace(/^0x/,""))}}function Rd(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t||(t=kt),!String(t).match(/^m\/44\'\/195\'/))throw new Error(Od);const n=Lc.fromMnemonic(Oo.fromPhrase(e,null,r),t);return{mnemonic:n.mnemonic,privateKey:n.privateKey,publicKey:n.signingKey.publicKey,address:Fd(n.privateKey.replace(/^0x/,""))}}let xd=!1,Nd=!1;const kd={debug:1,default:2,info:2,warning:3,error:4,off:5};let Ud=kd.default,Dd=null;const Ld=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var zd,jd;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(zd||(zd={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(jd||(jd={}));const $d="0123456789abcdef";class Vd{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==kd[r]&&this.throwArgumentError("invalid log level name","logLevel",e),Ud>kd[r]||console.log.apply(console,t)}debug(...e){this._log(Vd.levels.DEBUG,e)}info(...e){this._log(Vd.levels.INFO,e)}warn(...e){this._log(Vd.levels.WARNING,e)}makeError(e,t,r){if(Nd)return this.makeError("censored error",t,{});t||(t=Vd.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=$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}`);const o=e;let s="";switch(t){case jd.NUMERIC_FAULT:{s="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":s+="-"+t;break;case"negative-power":case"negative-width":s+="-unsupported";break;case"unbound-bitwise-result":s+="-unbound-result"}break}case jd.CALL_EXCEPTION:case jd.INSUFFICIENT_FUNDS:case jd.MISSING_NEW:case jd.NONCE_EXPIRED:case jd.REPLACEMENT_UNDERPRICED:case jd.TRANSACTION_REPLACED:case jd.UNPREDICTABLE_GAS_LIMIT:s=t}s&&(e+=" [ See: https://links.ethers.org/v5-errors-"+s+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const i=new Error(e);return i.reason=o,i.code=t,Object.keys(r).forEach((function(e){i[e]=r[e]})),i}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,Vd.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"),Ld&&this.throwError("platform missing String.prototype.normalize",Vd.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Ld})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,Vd.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,Vd.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,Vd.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",Vd.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",Vd.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",Vd.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return Dd||(Dd=new Vd("logger/5.8.0")),Dd}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",Vd.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),xd){if(!e)return;this.globalLogger().throwError("error censorship permanent",Vd.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}Nd=!!e,xd=!!t}static setLogLevel(e){const t=kd[e.toLowerCase()];null!=t?Ud=t:Vd.globalLogger().warn("invalid log level - "+e)}static from(e){return new Vd(e)}}Vd.errors=jd,Vd.levels=zd;const Gd=new Vd("bytes/5.8.0");function Hd(e){return!!e.toHexString}function Kd(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return Kd(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function Zd(e){return"number"==typeof e&&e==e&&e%1==0}function qd(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!Zd(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function Jd(e,t){if(t||(t={}),"number"==typeof e){Gd.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),Kd(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),Hd(e)&&(e=e.toHexString()),Xd(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":Gd.throwArgumentError("hex data is odd-length","value",e));const n=[];for(let e=0;eJd(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),Kd(n)}function Xd(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}const Qd="0123456789abcdef";function eh(e,t){if(t||(t={}),"number"==typeof e){Gd.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=Qd[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),Hd(e))return e.toHexString();if(Xd(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":Gd.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(qd(e)){let t="0x";for(let r=0;r>4]+Qd[15&n]}return t}return Gd.throwArgumentError("invalid hexlify value","value",e)}function th(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}new Vd("properties/5.8.0");const rh="abi/5.7.0";var nh=r(9404),oh=r.n(nh)().BN;const sh=new Vd("bignumber/5.7.0"),ih={},ah=9007199254740991;let uh=!1;class ch{constructor(e,t){e!==ih&&sh.throwError("cannot call constructor directly; use BigNumber.from",Vd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return dh(hh(this).fromTwos(e))}toTwos(e){return dh(hh(this).toTwos(e))}abs(){return"-"===this._hex[0]?ch.from(this._hex.substring(1)):this}add(e){return dh(hh(this).add(hh(e)))}sub(e){return dh(hh(this).sub(hh(e)))}div(e){return ch.from(e).isZero()&&ph("division-by-zero","div"),dh(hh(this).div(hh(e)))}mul(e){return dh(hh(this).mul(hh(e)))}mod(e){const t=hh(e);return t.isNeg()&&ph("division-by-zero","mod"),dh(hh(this).umod(t))}pow(e){const t=hh(e);return t.isNeg()&&ph("negative-power","pow"),dh(hh(this).pow(t))}and(e){const t=hh(e);return(this.isNegative()||t.isNeg())&&ph("unbound-bitwise-result","and"),dh(hh(this).and(t))}or(e){const t=hh(e);return(this.isNegative()||t.isNeg())&&ph("unbound-bitwise-result","or"),dh(hh(this).or(t))}xor(e){const t=hh(e);return(this.isNegative()||t.isNeg())&&ph("unbound-bitwise-result","xor"),dh(hh(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&ph("negative-width","mask"),dh(hh(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&ph("negative-width","shl"),dh(hh(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&ph("negative-width","shr"),dh(hh(this).shrn(e))}eq(e){return hh(this).eq(hh(e))}lt(e){return hh(this).lt(hh(e))}lte(e){return hh(this).lte(hh(e))}gt(e){return hh(this).gt(hh(e))}gte(e){return hh(this).gte(hh(e))}isNegative(){return"-"===this._hex[0]}isZero(){return hh(this).isZero()}toNumber(){try{return hh(this).toNumber()}catch(e){ph("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return sh.throwError("this platform does not support BigInt",Vd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?uh||(uh=!0,sh.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?sh.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",Vd.errors.UNEXPECTED_ARGUMENT,{}):sh.throwError("BigNumber.toString does not accept parameters",Vd.errors.UNEXPECTED_ARGUMENT,{})),hh(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof ch)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new ch(ih,lh(e)):e.match(/^-?[0-9]+$/)?new ch(ih,lh(new oh(e))):sh.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&ph("underflow","BigNumber.from",e),(e>=ah||e<=-ah)&&ph("overflow","BigNumber.from",e),ch.from(String(e));const t=e;if("bigint"==typeof t)return ch.from(t.toString());if(qd(t))return ch.from(eh(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return ch.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&(Xd(e)||"-"===e[0]&&Xd(e.substring(1))))return ch.from(e)}return sh.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function lh(e){if("string"!=typeof e)return lh(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&sh.throwArgumentError("invalid hex","value",e),"0x00"===(e=lh(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 dh(e){return ch.from(lh(e))}function hh(e){const t=ch.from(e).toHexString();return"-"===t[0]?new oh("-"+t.substring(3),16):new oh(t.substring(2),16)}function ph(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),sh.throwError(e,Vd.errors.NUMERIC_FAULT,n)}const fh=new Vd(rh);class gh{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){fh.throwArgumentError(e,this.localName,t)}}class yh{constructor(e){th(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return function(e){let t="0x";return e.forEach((e=>{t+=eh(e).substring(2)})),t}(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(Yd(e._data))}writeBytes(e){let t=Jd(e);const r=t.length%this.wordSize;return r&&(t=Yd([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=Jd(ch.from(e));return t.length>this.wordSize&&fh.throwError("value out-of-bounds",Vd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=Yd([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class bh{constructor(e,t,r,n){th(this,"_data",Jd(e)),th(this,"wordSize",t||32),th(this,"_coerceFunc",r),th(this,"allowLoose",n),this._offset=0}get data(){return eh(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):bh.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:fh.throwError("data out-of-bounds",Vd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new bh(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 ch.from(this.readBytes(this.wordSize))}}var mh=r(1176),Th=r.n(mh);const vh=new Vd("address/5.7.0");function wh(e){Xd(e,20)||vh.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const n=Jd((o=r,"0x"+Th().keccak_256(Jd(o))));var o;for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&n[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const Ah={};for(let e=0;e<10;e++)Ah[String(e)]=String(e);for(let e=0;e<26;e++)Ah[String.fromCharCode(65+e)]=String(10+e);const Ph=Math.floor((Wh=9007199254740991,Math.log10?Math.log10(Wh):Math.log(Wh)/Math.LN10));var Wh;function Bh(e){let t=null;if("string"!=typeof e&&vh.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=wh(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&vh.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)!==function(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>Ah[e])).join("");for(;t.length>=Ph;){let e=t.substring(0,Ph);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}(e)&&vh.throwArgumentError("bad icap checksum","address",e),r=e.substring(4),t=new oh(r,36).toString(16);t.length<40;)t="0"+t;t=wh("0x"+t)}else vh.throwArgumentError("invalid address","address",e);var r;return t}class Ch extends gh{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=Bh(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return Bh(function(e,t){for("string"!=typeof e?e=eh(e):Xd(e)||Gd.throwArgumentError("invalid hex string","value",e),e.length>2*t+2&&Gd.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}(e.readValue().toHexString(),20))}}class Eh extends gh{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const Mh=new Vd(rh);function Ih(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||Mh.throwError("cannot encode object for signature with missing names",Vd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&Mh.throwError("cannot encode object for signature with duplicate names",Vd.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else Mh.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&Mh.throwArgumentError("types/value length mismatch","tuple",r);let o=new yh(e.wordSize),s=new yh(e.wordSize),i=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=s.length;e.encode(s,r);let n=o.writeUpdatableValue();i.push((e=>{n(e+t)}))}else e.encode(o,r)})),i.forEach((e=>{e(o.length)}));let a=e.appendWriter(o);return a+=e.appendWriter(s),a}function Fh(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readValue(),s=n.subReader(r.toNumber());try{o=t.decode(s)}catch(e){if(e.code===Vd.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if(e.code===Vd.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}null!=o&&r.push(o)}));const o=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==o[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const s=r[t];s instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw s}}):r[n]=s}));for(let e=0;e{throw t}})}return Object.freeze(r)}class Oh extends gh{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;re._data.length&&Mh.throwError("insufficient data length",Vd.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e>6==2;n++)e++;return e}return e===Vh.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}($h||($h={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(Vh||(Vh={}));const Hh=Object.freeze({error:function(e,t,r,n,o){return jh.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:Gh,replace:function(e,t,r,n,o){return e===Vh.OVERLONG?(n.push(o),0):(n.push(65533),Gh(e,t,r))}});function Kh(e,t){return function(e,t){null==t&&(t=Hh.error),e=Jd(e);const r=[];let n=0;for(;n>7)){r.push(o);continue}let s=null,i=null;if(192==(224&o))s=1,i=127;else if(224==(240&o))s=2,i=2047;else{if(240!=(248&o)){n+=t(128==(192&o)?Vh.UNEXPECTED_CONTINUE:Vh.BAD_PREFIX,n-1,e,r);continue}s=3,i=65535}if(n-1+s>=e.length){n+=t(Vh.OVERRUN,n-1,e,r);continue}let a=o&(1<<8-s-1)-1;for(let o=0;o1114111?n+=t(Vh.OUT_OF_RANGE,n-1-s,e,r,a):a>=55296&&a<=57343?n+=t(Vh.UTF16_SURROGATE,n-1-s,e,r,a):a<=i?n+=t(Vh.OVERLONG,n-1-s,e,r,a):r.push(a))}return r}(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}class Zh extends _h{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,function(e,t=$h.current){t!=$h.current&&(jh.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);if(t>=e.length||56320!=(64512&o))throw new Error("invalid utf-8 string");const s=65536+((1023&n)<<10)+(1023&o);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return Jd(r)}(t))}decode(e){return Kh(super.decode(e))}}class qh extends gh{constructor(e,t){let r=!1;const n=[];e.forEach((e=>{e.dynamic&&(r=!0),n.push(e.type)})),super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]))})),Object.freeze(e)}encode(e,t){return Ih(e,this.coders,t)}decode(e){return e.coerce(this.name,Fh(e,this.coders))}}const Jh=new Vd(rh),Yh={};let Xh={calldata:!0,memory:!0,storage:!0},Qh={calldata:!0,memory:!0};function ep(e,t){if("bytes"===e||"string"===e){if(Xh[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&Qh[t])return!0;return(Xh[t]||"payable"===t)&&Jh.throwArgumentError("invalid modifier","name",t),!1}function tp(e,t){for(let r in t)th(e,r,t[r])}const rp=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),np=new RegExp(/^(.*)\[([0-9]*)\]$/);class op{constructor(e,t){e!==Yh&&Jh.throwError("use fromString",Vd.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),tp(this,t);let r=this.type.match(np);tp(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:op.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=rp.sighash),rp[e]||Jh.throwArgumentError("invalid format type","format",e),e===rp.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==rp.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===rp.full?", ":",")+")"):t+=this.type,e!==rp.sighash&&(!0===this.indexed&&(t+=" indexed"),e===rp.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?op.fromString(e,t):op.fromObject(e)}static fromObject(e){return op.isParamType(e)?e:new op(Yh,{name:e.name||null,type:sp(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(op.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){Jh.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function o(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let s={type:"",name:"",state:{allowType:!0}},i=s;for(let r=0;rthis._getCoder(e))),e.name);case"":return new Nh(e.name)}let t=e.type.match(up);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&ip.throwArgumentError("invalid "+t[1]+" bit length","param",e),new zh(r/8,"int"===t[1],e.name)}if(t=e.type.match(ap),t){let r=parseInt(t[1]);return(0===r||r>32)&&ip.throwArgumentError("invalid bytes length","param",e),new xh(r,e.name)}return ip.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new bh(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new yh(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(op.from(e))));return new qh(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&ip.throwError("types/values length mismatch",Vd.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(op.from(e)))),n=new qh(r,"_"),o=this._getWriter();return n.encode(o,t),o.data}decode(e,t,r){const n=e.map((e=>this._getCoder(op.from(e))));return new qh(n,"_").decode(this._getReader(Jd(t),r))}}new cp;const lp=new cp;function dp(e){return bg.address.toHex(e).replace(Nt,"0x")}function hp(e){if("[object Object]"!==Object.prototype.toString.call(e)&&"[object Array]"!==Object.prototype.toString.call(e))return e;const t=(r=e,Array.isArray(r)?[]:{});var r;return Object.keys(e).forEach((r=>t[r]=e[r]instanceof Object&&!e[r]._isBigNumber?hp(e[r]):e[r])),t}function pp(e,t,r,n){if(r&&"boolean"!=typeof r||(n=r,r=t,t=e,e=[]),n&&r.replace(/^0x/,"").length%64==8&&(r="0x"+r.replace(/^0x/,"").substring(8)),r.replace(/^0x/,"").length%64)throw new Error("The encoded string is not valid. Its length must be a multiple of 64.");return t=t.map((e=>(/trcToken/.test(e)&&(e=e.replace(/trcToken/,"uint256")),e))),lp.decode(t,r).reduce(((r,n,o)=>("address"==t[o]&&(n=Rt+n.substr(2).toLowerCase()),e.length?r[e[o]]=n:r.push(n),r)),e.length?{}:[])}function fp(e,t){for(let r=0;re&&0===e.type.indexOf("tuple")&&e.components?`tuple(${e.components.map((e=>n(e))).join(",")})${gp(e.type)}`:/trcToken/.test(e.type)?e.type.replace(/trcToken/,"uint256"):e.type,o=e=>Array.isArray(e)?(e.forEach(((t,r)=>{e[r]=o(t)})),e):dp(e),s=(e,t,r)=>{r>1?t.length&&t.forEach((t=>{s(e,t,r-1)})):t.length&&r&&t.forEach((t=>{i(e,t)}))},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;e.length&&e.forEach(((e,r)=>{const n=e.type;if(t[r])if("address"===n)t[r]=dp(t[r]);else if("address["===n.match(/^([^\x5b]*)(\x5b|$)/)[0])o(t[r]);else if(0===n.indexOf("tuple"))if(gp(n)){const o=yp(n);s(e.components,t[r],o)}else i(e.components,t[r])}))};if(e.inputs&&e.inputs.length)for(let o=0;o{for(let t=0;tArray.isArray(e)?(e.forEach(((t,n)=>{e[n]=r(t)})),e):bg.address.toHex(e),n=(e,t,r)=>{r>1?t.length&&t.forEach((t=>{n(e,t,r-1)})):t.length&&r&&t.forEach((t=>{s(e,t)}))},o=e=>{const t=e.name?` ${e.name}`:"";return e&&0===e.type.indexOf("tuple")&&e.components?`tuple(${e.components.map((e=>o(e))).join(",")})${gp(e.type)}${t}`:/trcToken/.test(e.type)?e.type.replace(/trcToken/,"uint256")+t:e.type+t},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;e.length&&e.forEach(((e,o)=>{const{type:i,name:a}=e;if(t[o])if("address"===i)t[o]=bg.address.toHex(t[o]),a&&(t[a]=bg.address.toHex(t[a]));else if("address["===i.match(/^([^\x5b]*)(\x5b|$)/)[0])r(t[o]),a&&r(t[a]);else if(0===i.indexOf("tuple")){if(gp(i)){const r=yp(i);n(e.components,t[o],r)}else s(e.components,t[o]);a&&(t[a]=t[o])}}))};if(e.outputs&&e.outputs.length>0){let r=[];for(let t=0;t{for(let t=0;te&&0!==e.length?new Uint8Array(bg.address.toHex(e).match(/.{1,2}/g).map((e=>parseInt(e,16)))):new Uint8Array([]),cf=(e,t,r,n)=>{let o=new Pp.Any;o.pack(e.serializeBinary(),"protocol."+r);let s=new Wp.Contract;s.setType(t),s.setParameter(o),n&&s.setPermissionId(n);let i=new Wp.raw;i.addContract(s);let a=new Wp;return a.setRawData(i),a},lf=(e,t,r)=>{switch(e.type){case"TransferContract":return((e,t)=>{const{to_address:r,owner_address:n,amount:o}=e;let s=new Ep;return s.setToAddress(uf(r)),s.setOwnerAddress(uf(n)),s.setAmount(o),cf(s,Wp.Contract.ContractType.TRANSFERCONTRACT,"TransferContract",t.Permission_id)})(t,r);case"TransferAssetContract":return((e,t)=>{const{to_address:r,owner_address:n,amount:o,asset_name:s}=e;let i=new Np;return i.setToAddress(uf(r)),i.setOwnerAddress(uf(n)),i.setAssetName(uf(s.replace(/^0x/,""))),i.setAmount(o),cf(i,Wp.Contract.ContractType.TRANSFERASSETCONTRACT,"TransferAssetContract",t.Permission_id)})(t,r);case"ParticipateAssetIssueContract":return((e,t)=>{let r=new kp;return r.setToAddress(uf(e.to_address)),r.setOwnerAddress(uf(e.owner_address)),r.setAssetName(uf(e.asset_name.replace(/^0x/,""))),r.setAmount(e.amount),cf(r,Wp.Contract.ContractType.PARTICIPATEASSETISSUECONTRACT,"ParticipateAssetIssueContract",t.Permission_id)})(t,r);case"TriggerSmartContract":return((e,t)=>{let r=new Lp;const{owner_address:n,contract_address:o,parameter:s="",function_selector:i,call_value:a,call_token_value:u,token_id:c,data:l}=e;if(r.setOwnerAddress(uf(n)),r.setContractAddress(uf(o)),r.setCallValue(a),l)r.setData(uf(l));else if(i){const e=function(e){return(arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?"":"0x")+To(Buffer.from(e,"utf-8")).toString().substring(2)}(i).substring(2,10)+s;r.setData(uf(e))}return c&&r.setTokenId(c),u&&r.setCallTokenValue(u),cf(r,Wp.Contract.ContractType.TRIGGERSMARTCONTRACT,"TriggerSmartContract",t.Permission_id)})(t,r);case"FreezeBalanceContract":return((e,t)=>{let r=new Mp;const{owner_address:n,frozen_balance:o,frozen_duration:s,resource:i,receiver_address:a}=e;return r.setOwnerAddress(uf(n)),r.setFrozenBalance(o),r.setFrozenDuration(s),i&&r.setResource(Hp[i]),a&&r.setReceiverAddress(uf(a)),cf(r,Wp.Contract.ContractType.FREEZEBALANCECONTRACT,"FreezeBalanceContract",t.Permission_id)})(t,r);case"UnfreezeBalanceContract":return((e,t)=>{let r=new Ip;const{owner_address:n,resource:o,receiver_address:s}=e;return r.setOwnerAddress(uf(n)),o&&r.setResource(Hp[o]),s&&r.setReceiverAddress(uf(s)),cf(r,Wp.Contract.ContractType.UNFREEZEBALANCECONTRACT,"UnfreezeBalanceContract",t.Permission_id)})(t,r);case"WithdrawBalanceContract":return((e,t)=>{let r=new Fp;const{owner_address:n}=e;return r.setOwnerAddress(uf(n)),cf(r,Wp.Contract.ContractType.WITHDRAWBALANCECONTRACT,"WithdrawBalanceContract",t.Permission_id)})(t,r);case"FreezeBalanceV2Contract":return((e,t)=>{const r=new Op,{owner_address:n,frozen_balance:o,resource:s}=e;return r.setOwnerAddress(uf(n)),r.setFrozenBalance(o),r.setResource(Hp[s]),cf(r,Wp.Contract.ContractType.FREEZEBALANCEV2CONTRACT,"FreezeBalanceV2Contract",t.Permission_id)})(t,r);case"CancelAllUnfreezeV2Contract":return((e,t)=>{const r=new _p,{owner_address:n}=e;return r.setOwnerAddress(uf(n)),cf(r,Wp.Contract.ContractType.CANCELALLUNFREEZEV2CONTRACT,"CancelAllUnfreezeV2Contract",t.Permission_id)})(t,r);case"UnfreezeBalanceV2Contract":return((e,t)=>{const r=new Sp,{owner_address:n,unfreeze_balance:o,resource:s}=e;return r.setOwnerAddress(uf(n)),r.setUnfreezeBalance(o),r.setResource(Hp[s]),cf(r,Wp.Contract.ContractType.UNFREEZEBALANCEV2CONTRACT,"UnfreezeBalanceV2Contract",t.Permission_id)})(t,r);case"DelegateResourceContract":return((e,t)=>{const r=new Rp,{owner_address:n,receiver_address:o,balance:s,resource:i,lock:a=!1,lock_period:u}=e;return r.setOwnerAddress(uf(n)),r.setBalance(s),r.setResource(Hp[i]),r.setLock(a),r.setLockPeriod(u),r.setReceiverAddress(uf(o)),cf(r,Wp.Contract.ContractType.DELEGATERESOURCECONTRACT,"DelegateResourceContract",t.Permission_id)})(t,r);case"UnDelegateResourceContract":return((e,t)=>{const r=new xp,{owner_address:n,receiver_address:o,balance:s,resource:i}=e;return r.setOwnerAddress(uf(n)),r.setBalance(s),r.setResource(Hp[i]),r.setReceiverAddress(uf(o)),cf(r,Wp.Contract.ContractType.UNDELEGATERESOURCECONTRACT,"UnDelegateResourceContract",t.Permission_id)})(t,r);case"WithdrawExpireUnfreezeContract":return((e,t)=>{const r=new _p,{owner_address:n}=e;return r.setOwnerAddress(uf(n)),cf(r,Wp.Contract.ContractType.WITHDRAWEXPIREUNFREEZECONTRACT,"WithdrawExpireUnfreezeContract",t.Permission_id)})(t,r);case"WitnessCreateContract":return((e,t)=>{const r=new Kp,{owner_address:n,url:o}=e;return r.setOwnerAddress(uf(n)),r.setUrl(uf(o.replace(/^0x/,""))),cf(r,Wp.Contract.ContractType.WITNESSCREATECONTRACT,"WitnessCreateContract",t.Permission_id)})(t,r);case"VoteWitnessContract":return((e,t)=>{let r=new Zp;const{owner_address:n,votes:o}=e;return r.setOwnerAddress(uf(n)),o.forEach((e=>{let t=new Zp.Vote;const{vote_address:n,vote_count:o}=e;t.setVoteAddress(uf(n));let s=parseInt(o);t.setVoteCount(s),r.addVotes(t)})),cf(r,Wp.Contract.ContractType.VOTEWITNESSCONTRACT,"VoteWitnessContract",t.Permission_id)})(t,r);case"CreateSmartContract":return((e,t)=>{let r=e?.new_contract?{owner_address:e.owner_address,call_token_value:e.call_token_value,token_id:e.token_id,...e.new_contract}:e,{owner_address:n,consume_user_resource_percent:o,origin_energy_limit:s,abi:i,bytecode:a="",name:u,parameter:c="",call_value:l,call_token_value:d,token_id:h,origin_address:p}=r,f=new Vp;f.setOwnerAddress(uf(n)),h&&f.setTokenId(h),d&&f.setCallTokenValue(d);const g=new Gp;if(i){let e;e="string"==typeof i?JSON.parse(i):i?.entrys||[];const t=new Gp.ABI,r=e=>{const t=new Gp.ABI.Entry.Param,{indexed:r,name:n,type:o}=e;return!0===r&&t.setIndexed(!0),t.setName(n),t.setType(o),t},n=e.map((e=>{const{anonymous:t,constant:n,name:o,inputs:s,outputs:i,type:a,payable:u,stateMutability:c}=e,l=new Gp.ABI.Entry;return l.setAnonymous(t),l.setConstant(n),l.setName(o),s&&l.setInputsList(s.map((e=>r(e)))),i&&l.setOutputsList(i.map((e=>r(e)))),a&&l.setType(Gp.ABI.Entry.EntryType[a.toUpperCase()]),l.setPayable(u),c&&l.setStatemutability(Gp.ABI.Entry.StateMutabilityType[c.toUpperCase()]),l}));t.setEntrysList(n),g.setAbi(t)}if(l&&g.setCallValue(l),g.setConsumeUserResourcePercent(o),g.setOriginEnergyLimit(s),p||(p=n),g.setOriginAddress(uf(p)),a){const e=a.replace(/^0x/,"")+c.replace(/^0x/,"");g.setBytecode(uf(e))}return g.setName(u),f.setNewContract(g),cf(f,Wp.Contract.ContractType.CREATESMARTCONTRACT,"CreateSmartContract",t.Permission_id)})(t,r);case"ClearABIContract":return((e,t)=>{const{contract_address:r,owner_address:n}=e,o=new zp;return o.setOwnerAddress(uf(n)),o.setContractAddress(uf(r)),cf(o,Wp.Contract.ContractType.CLEARABICONTRACT,"ClearABIContract",t.Permission_id)})(t,r);case"UpdateBrokerageContract":return((e,t)=>{const{brokerage:r,owner_address:n}=e,o=new qp;return o.setOwnerAddress(uf(n)),o.setBrokerage(r),cf(o,Wp.Contract.ContractType.UPDATEBROKERAGECONTRACT,"UpdateBrokerageContract",t.Permission_id)})(t,r);case"AssetIssueContract":return((e,t)=>{const{owner_address:r,name:n,abbr:o,description:s,url:i,total_supply:a,trx_num:u,num:c,start_time:l,end_time:d,precision:h,free_asset_net_limit:p,public_free_asset_net_limit:f,public_free_asset_net_usage:g=0,public_latest_free_net_time:y=0,vote_score:b=0,frozen_supply:m}=e;let T=new Up;if(T.setOwnerAddress(uf(r)),n&&T.setName(uf(n.replace(/^0x/,""))),o&&T.setAbbr(uf(o.replace(/^0x/,""))),T.setTotalSupply(a),T.setNum(c),T.setEndTime(d),T.setStartTime(l),T.setTrxNum(u),T.setVoteScore(b),h&&T.setPrecision(h),y&&T.setPublicLatestFreeNetTime(y),s&&T.setDescription(uf(s.replace(/^0x/,""))),i&&T.setUrl(uf(i.replace(/^0x/,""))),T.setPublicFreeAssetNetUsage(g),T.setFreeAssetNetLimit(p),T.setPublicFreeAssetNetLimit(f),m){let e=new Up.FrozenSupply;e.setFrozenAmount(m.length?m[0].frozen_amount:m.frozen_amount),e.setFrozenDays(m.length?m[0].frozen_days:m.frozen_days),T.addFrozenSupply(e)}return cf(T,Wp.Contract.ContractType.ASSETISSUECONTRACT,"AssetIssueContract",t.Permission_id)})(t,r);case"AccountCreateContract":return((e,t)=>{let r=new Jp;const{account_address:n,owner_address:o}=e;return r.setOwnerAddress(uf(o)),r.setAccountAddress(uf(n.replace(/^0x/,""))),cf(r,Wp.Contract.ContractType.ACCOUNTCREATECONTRACT,"AccountCreateContract",t.Permission_id)})(t,r);case"AccountUpdateContract":return((e,t)=>{let r=new Yp;const{account_name:n,owner_address:o}=e;return r.setOwnerAddress(uf(o)),r.setAccountName(uf(n.replace(/^0x/,""))),cf(r,Wp.Contract.ContractType.ACCOUNTUPDATECONTRACT,"AccountUpdateContract",t.Permission_id)})(t,r);case"SetAccountIdContract":return((e,t)=>{let r=new Xp;const{account_id:n,owner_address:o}=e;return r.setOwnerAddress(uf(o)),r.setAccountId(uf(n.replace(/^0x/,""))),cf(r,Wp.Contract.ContractType.SETACCOUNTIDCONTRACT,"SetAccountIdContract",t.Permission_id)})(t,r);case"ProposalCreateContract":return((e,t)=>{let r=new ef;const{owner_address:n,parameters:o}=e;return r.setOwnerAddress(uf(n)),o.forEach((e=>{r.getParametersMap().set(e.key,e.value)})),cf(r,Wp.Contract.ContractType.PROPOSALCREATECONTRACT,"ProposalCreateContract",t.Permission_id)})(t,r);case"ProposalDeleteContract":return((e,t)=>{let r=new tf;const{owner_address:n,proposal_id:o}=e;return r.setOwnerAddress(uf(n)),r.setProposalId(o),cf(r,Wp.Contract.ContractType.PROPOSALDELETECONTRACT,"ProposalDeleteContract",t.Permission_id)})(t,r);case"ProposalApproveContract":return((e,t)=>{let r=new rf;const{owner_address:n,proposal_id:o,is_add_approval:s}=e;return r.setOwnerAddress(uf(n)),r.setProposalId(o),r.setIsAddApproval(s),cf(r,Wp.Contract.ContractType.PROPOSALAPPROVECONTRACT,"ProposalApproveContract",t.Permission_id)})(t,r);case"ExchangeCreateContract":return((e,t)=>{const r=new nf,{owner_address:n,first_token_id:o,first_token_balance:s,second_token_id:i,second_token_balance:a}=e;return r.setOwnerAddress(uf(n)),r.setFirstTokenId(uf(o.replace(/^0x/,""))),r.setFirstTokenBalance(s),r.setSecondTokenId(uf(i.replace(/^0x/,""))),r.setSecondTokenBalance(a),cf(r,Wp.Contract.ContractType.EXCHANGECREATECONTRACT,"ExchangeCreateContract",t.Permission_id)})(t,r);case"ExchangeInjectContract":return((e,t)=>{const r=new of,{owner_address:n,exchange_id:o,token_id:s,quant:i}=e;return r.setOwnerAddress(uf(n)),r.setExchangeId(o),r.setTokenId(uf(s.replace(/^0x/,""))),r.setQuant(i),cf(r,Wp.Contract.ContractType.EXCHANGEINJECTCONTRACT,"ExchangeInjectContract",t.Permission_id)})(t,r);case"ExchangeWithdrawContract":return((e,t)=>{const r=new sf,{owner_address:n,exchange_id:o,token_id:s,quant:i}=e;return r.setOwnerAddress(uf(n)),r.setExchangeId(o),r.setTokenId(uf(s.replace(/^0x/,""))),r.setQuant(i),cf(r,Wp.Contract.ContractType.EXCHANGEWITHDRAWCONTRACT,"ExchangeWithdrawContract",t.Permission_id)})(t,r);case"ExchangeTransactionContract":return((e,t)=>{const r=new af,{owner_address:n,exchange_id:o,token_id:s,quant:i,expected:a}=e;return r.setOwnerAddress(uf(n)),r.setExchangeId(o),r.setTokenId(uf(s.replace(/^0x/,""))),r.setQuant(i),r.setExpected(a),cf(r,Wp.Contract.ContractType.EXCHANGETRANSACTIONCONTRACT,"ExchangeTransactionContract",t.Permission_id)})(t,r);case"UpdateSettingContract":return((e,t)=>{const r=new $p,{owner_address:n,contract_address:o,consume_user_resource_percent:s}=e;return r.setOwnerAddress(uf(n)),r.setContractAddress(uf(o)),r.setConsumeUserResourcePercent(s),cf(r,Wp.Contract.ContractType.UPDATESETTINGCONTRACT,"UpdateSettingContract",t.Permission_id)})(t,r);case"UpdateEnergyLimitContract":return((e,t)=>{const r=new jp,{owner_address:n,contract_address:o,origin_energy_limit:s}=e;return r.setOwnerAddress(uf(n)),r.setContractAddress(uf(o)),r.setOriginEnergyLimit(s),cf(r,Wp.Contract.ContractType.UPDATEENERGYLIMITCONTRACT,"UpdateEnergyLimitContract",t.Permission_id)})(t,r);case"AccountPermissionUpdateContract":return((e,t)=>{const r=new Qp,{owner_address:n,owner:o,witness:s,actives:i}=e;r.setOwnerAddress(uf(n));const a=e=>{const t=new Bp,{type:r,id:n,permission_name:o,threshold:s,parentId:i,operations:a,keys:u}=e;return t.setType((e=>isNaN(e)?"Active"===e?2:"Witness"===e?1:0:e)(r)),t.setId(n),t.setPermissionName(o),t.setThreshold(s),i&&t.setParentId(i),a&&t.setOperations(uf(a)),u&&t.setKeysList(u.map((e=>{const t=new Cp;return t.setAddress(uf(e.address)),t.setWeight(e.weight),t}))),t};return o&&r.setOwner(a(o)),s&&r.setWitness(a(s)),i&&(Array.isArray(i)?r.setActivesList(i.map((e=>a(e)))):r.setActivesList([a(i)])),cf(r,Wp.Contract.ContractType.ACCOUNTPERMISSIONUPDATECONTRACT,"AccountPermissionUpdateContract",t.Permission_id)})(t,r);case"UpdateAssetContract":return((e,t)=>{const r=new Dp,{owner_address:n,description:o,url:s,new_limit:i,new_public_limit:a}=e;return r.setOwnerAddress(uf(n)),o&&r.setDescription(uf(o.replace(/^0x/,""))),s&&r.setUrl(uf(s.replace(/^0x/,""))),i&&r.setNewLimit(i),a&&r.setNewPublicLimit(a),cf(r,Wp.Contract.ContractType.UPDATEASSETCONTRACT,"UpdateAssetContract",t.Permission_id)})(t,r)}},df=e=>{const t=e.raw_data,r=t.contract[0],n=r.parameter.value,o={Permission_id:r.Permission_id},s=lf(r,n,o),i=s.getRawData();return i.setRefBlockBytes(uf(t.ref_block_bytes)),i.setRefBlockHash(uf(t.ref_block_hash)),t.data&&i.setData(uf(t.data)),t.fee_limit&&i.setFeeLimit(t.fee_limit),t.expiration&&i.setExpiration(t.expiration),t.timestamp&&i.setTimestamp(t.timestamp),s.setRawData(i),s},hf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=e.raw_data,o=n.contract[0],s=lf(o,t,{Permission_id:t?.Permission_id}),i=s.getRawData();return i.setRefBlockBytes(uf(n.ref_block_bytes)),i.setRefBlockHash(uf(n.ref_block_hash)),r.data&&i.setData(uf(r.data.replace(/^0x/,""))),(r.fee_limit||t.fee_limit)&&i.setFeeLimit(r.fee_limit||t.fee_limit),n.expiration&&i.setExpiration(n.expiration),n.timestamp&&i.setTimestamp(n.timestamp),s.setRawData(i),s},pf=(e,t)=>{const r=t.getRawData().serializeBinary(),n=Ft(r),o=Vn(r);return n.toLowerCase()===e.raw_data_hex.toLowerCase()&&o.replace(/^0x/,"").toLowerCase()===e.txID.replace(/^0x/,"").toLowerCase()},ff=e=>Ft(e.getRawData().serializeBinary()),gf=e=>{const t=df(e);return pf(e,t)},yf=(e,t,r)=>{const n=hf(e,t,r);return pf(e,n)},bf=e=>Vn(e.getRawData().serializeBinary());var mf=r(7761),Tf=r.n(mf),vf=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,wf=Math.ceil,Af=Math.floor,Pf="[BigNumber Error] ",Wf=Pf+"Number primitive has more than 15 significant digits: ",Bf=1e14,Cf=14,Ef=9007199254740991,Mf=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],If=1e7,Ff=1e9;function Of(e){var t=0|e;return e>0||e===t?t:t-1}function Sf(e){for(var t,r,n=1,o=e.length,s=e[0]+"";nc^r?1:-1;for(a=(u=o.length)<(c=s.length)?u:c,i=0;is[i]^r?1:-1;return u==c?0:u>c^r?1:-1}function Rf(e,t,r,n){if(er||e!==Af(e))throw Error(Pf+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function xf(e){var t=e.c.length-1;return Of(e.e/Cf)==t&&e.c[t]%2!=0}function Nf(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function kf(e,t,r){var n,o;if(t<0){for(o=r+".";++t;o+=r);e=o+e}else if(++t>(n=e.length)){for(o=r,t-=n;--t;o+=r);e+=o}else tT?h.c=h.e=null:e.e=10;u/=10,a++);return void(a>T?h.c=h.e=null:(h.e=a,h.c=[e]))}d=String(e)}else{if(!vf.test(d=String(e)))return o(h,d,c);h.s=45==d.charCodeAt(0)?(d=d.slice(1),-1):1}(a=d.indexOf("."))>-1&&(d=d.replace(".","")),(u=d.search(/e/i))>0?(a<0&&(a=u),a+=+d.slice(u+1),d=d.substring(0,u)):a<0&&(a=d.length)}else{if(Rf(t,2,W.length,"Base"),10==t&&B)return F(h=new C(e),f+h.e+1,g);if(d=String(e),c="number"==typeof e){if(0*e!=0)return o(h,d,c,t);if(h.s=1/e<0?(d=d.slice(1),-1):1,C.DEBUG&&d.replace(/^0\.0*|\./,"").length>15)throw Error(Wf+e)}else h.s=45===d.charCodeAt(0)?(d=d.slice(1),-1):1;for(r=W.slice(0,t),a=u=0,l=d.length;ua){a=l;continue}}else if(!i&&(d==d.toUpperCase()&&(d=d.toLowerCase())||d==d.toLowerCase()&&(d=d.toUpperCase()))){i=!0,u=-1,a=0;continue}return o(h,String(e),c,t)}c=!1,(a=(d=n(d,t,10,h.s)).indexOf("."))>-1?d=d.replace(".",""):a=d.length}for(u=0;48===d.charCodeAt(u);u++);for(l=d.length;48===d.charCodeAt(--l););if(d=d.slice(u,++l)){if(l-=u,c&&C.DEBUG&&l>15&&(e>Ef||e!==Af(e)))throw Error(Wf+h.s*e);if((a=a-u-1)>T)h.c=h.e=null;else if(a=b)?Nf(u,i):kf(u,i,"0");else if(s=(e=F(new C(e),t,r)).e,a=(u=Sf(e.c)).length,1==n||2==n&&(t<=s||s<=y)){for(;aa){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=s-a)>0)for(s+1==a&&(u+=".");t--;u+="0");return e.s<0&&o?"-"+u:u}function M(e,t){for(var r,n=1,o=new C(e[0]);n=10;o/=10,n++);return(r=n+r*Cf-1)>T?e.c=e.e=null:r=10;a/=10,o++);if((s=t-o)<0)s+=Cf,i=t,l=(u=d[c=0])/h[o-i-1]%10|0;else if((c=wf((s+1)/Cf))>=d.length){if(!n)break e;for(;d.length<=c;d.push(0));u=l=0,o=1,i=(s%=Cf)-Cf+1}else{for(u=a=d[c],o=1;a>=10;a/=10,o++);l=(i=(s%=Cf)-Cf+o)<0?0:u/h[o-i-1]%10|0}if(n=n||t<0||null!=d[c+1]||(i<0?u:u%h[o-i-1]),n=r<4?(l||n)&&(0==r||r==(e.s<0?3:2)):l>5||5==l&&(4==r||n||6==r&&(s>0?i>0?u/h[o-i]:0:d[c-1])%10&1||r==(e.s<0?8:7)),t<1||!d[0])return d.length=0,n?(t-=e.e+1,d[0]=h[(Cf-t%Cf)%Cf],e.e=-t||0):d[0]=e.e=0,e;if(0==s?(d.length=c,a=1,c--):(d.length=c+1,a=h[Cf-s],d[c]=i>0?Af(u/h[o-i]%h[i])*a:0),n)for(;;){if(0==c){for(s=1,i=d[0];i>=10;i/=10,s++);for(i=d[0]+=a,a=1;i>=10;i/=10,a++);s!=a&&(e.e++,d[0]==Bf&&(d[0]=1));break}if(d[c]+=a,d[c]!=Bf)break;d[c--]=0,a=1}for(s=d.length;0===d[--s];d.pop());}e.e>T?e.c=e.e=null:e.e=b?Nf(t,r):kf(t,r,"0"),e.s<0?"-"+t:t)}return C.clone=e,C.ROUND_UP=0,C.ROUND_DOWN=1,C.ROUND_CEIL=2,C.ROUND_FLOOR=3,C.ROUND_HALF_UP=4,C.ROUND_HALF_DOWN=5,C.ROUND_HALF_EVEN=6,C.ROUND_HALF_CEIL=7,C.ROUND_HALF_FLOOR=8,C.EUCLID=9,C.config=C.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(Pf+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(Rf(r=e[t],0,Ff,t),f=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(Rf(r=e[t],0,8,t),g=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(Rf(r[0],-Ff,0,t),Rf(r[1],0,Ff,t),y=r[0],b=r[1]):(Rf(r,-Ff,Ff,t),y=-(b=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)Rf(r[0],-Ff,-1,t),Rf(r[1],1,Ff,t),m=r[0],T=r[1];else{if(Rf(r,-Ff,Ff,t),!r)throw Error(Pf+t+" cannot be zero: "+r);m=-(T=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(Pf+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error(Pf+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(Rf(r=e[t],0,9,t),w=r),e.hasOwnProperty(t="POW_PRECISION")&&(Rf(r=e[t],0,Ff,t),A=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(Pf+t+" not an object: "+r);P=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(Pf+t+" invalid: "+r);B="0123456789"==r.slice(0,10),W=r}}return{DECIMAL_PLACES:f,ROUNDING_MODE:g,EXPONENTIAL_AT:[y,b],RANGE:[m,T],CRYPTO:v,MODULO_MODE:w,POW_PRECISION:A,FORMAT:P,ALPHABET:W}},C.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!C.DEBUG)return!0;var t,r,n=e.c,o=e.e,s=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===s||-1===s)&&o>=-Ff&&o<=Ff&&o===Af(o)){if(0===n[0]){if(0===o&&1===n.length)return!0;break e}if((t=(o+1)%Cf)<1&&(t+=Cf),String(n[0]).length==t){for(t=0;t=Bf||r!==Af(r))break e;if(0!==r)return!0}}}else if(null===n&&null===o&&(null===s||1===s||-1===s))return!0;throw Error(Pf+"Invalid BigNumber: "+e)},C.maximum=C.max=function(){return M(arguments,h.lt)},C.minimum=C.min=function(){return M(arguments,h.gt)},C.random=(s=9007199254740992,i=Math.random()*s&2097151?function(){return Af(Math.random()*s)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,o,s,a=0,u=[],c=new C(p);if(null==e?e=f:Rf(e,0,Ff),o=wf(e/Cf),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(o*=2));a>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[a]=r[0],t[a+1]=r[1]):(u.push(s%1e14),a+=2);a=o/2}else{if(!crypto.randomBytes)throw v=!1,Error(Pf+"crypto unavailable");for(t=crypto.randomBytes(o*=7);a=9e15?crypto.randomBytes(7).copy(t,a):(u.push(s%1e14),a+=7);a=o/7}if(!v)for(;a=10;s/=10,a++);ar-1&&(null==i[o+1]&&(i[o+1]=0),i[o+1]+=i[o]/r|0,i[o]%=r)}return i.reverse()}return function(n,o,s,i,a){var u,c,l,d,h,p,y,b,m=n.indexOf("."),T=f,v=g;for(m>=0&&(d=A,A=0,n=n.replace(".",""),p=(b=new C(o)).pow(n.length-m),A=d,b.c=t(kf(Sf(p.c),p.e,"0"),10,s,e),b.e=b.c.length),l=d=(y=t(n,o,s,a?(u=W,e):(u=e,W))).length;0==y[--d];y.pop());if(!y[0])return u.charAt(0);if(m<0?--l:(p.c=y,p.e=l,p.s=i,y=(p=r(p,b,T,v,s)).c,h=p.r,l=p.e),m=y[c=l+T+1],d=s/2,h=h||c<0||null!=y[c+1],h=v<4?(null!=m||h)&&(0==v||v==(p.s<0?3:2)):m>d||m==d&&(4==v||h||6==v&&1&y[c-1]||v==(p.s<0?8:7)),c<1||!y[0])n=h?kf(u.charAt(1),-T,u.charAt(0)):u.charAt(0);else{if(y.length=c,h)for(--s;++y[--c]>s;)y[c]=0,c||(++l,y=[1].concat(y));for(d=y.length;!y[--d];);for(m=0,n="";m<=d;n+=u.charAt(y[m++]));n=kf(n,l,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,o,s,i,a=0,u=e.length,c=t%If,l=t/If|0;for(e=e.slice();u--;)a=((o=c*(s=e[u]%If)+(n=l*s+(i=e[u]/If|0)*c)%If*If+a)/r|0)+(n/If|0)+l*i,e[u]=o%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,n){var o,s;if(r!=n)s=r>n?1:-1;else for(o=s=0;ot[o]?1:-1;break}return s}function r(e,t,r,n){for(var o=0;r--;)e[r]-=o,o=e[r]1;e.splice(0,1));}return function(n,o,s,i,a){var u,c,l,d,h,p,f,g,y,b,m,T,v,w,A,P,W,B=n.s==o.s?1:-1,E=n.c,M=o.c;if(!(E&&E[0]&&M&&M[0]))return new C(n.s&&o.s&&(E?!M||E[0]!=M[0]:M)?E&&0==E[0]||!M?0*B:B/0:NaN);for(y=(g=new C(B)).c=[],B=s+(c=n.e-o.e)+1,a||(a=Bf,c=Of(n.e/Cf)-Of(o.e/Cf),B=B/Cf|0),l=0;M[l]==(E[l]||0);l++);if(M[l]>(E[l]||0)&&c--,B<0)y.push(1),d=!0;else{for(w=E.length,P=M.length,l=0,B+=2,(h=Af(a/(M[0]+1)))>1&&(M=e(M,h,a),E=e(E,h,a),P=M.length,w=E.length),v=P,m=(b=E.slice(0,P)).length;m=a/2&&A++;do{if(h=0,(u=t(M,b,P,m))<0){if(T=b[0],P!=m&&(T=T*a+(b[1]||0)),(h=Af(T/A))>1)for(h>=a&&(h=a-1),f=(p=e(M,h,a)).length,m=b.length;1==t(p,b,f,m);)h--,r(p,P=10;B/=10,l++);F(g,s+(g.e=l+c*Cf-1)+1,i,d)}else g.e=c,g.r=+d;return g}}(),a=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,c=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,d=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var o,s=r?t:t.replace(d,"");if(l.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!r&&(s=s.replace(a,(function(e,t,r){return o="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=o?e:t})),n&&(o=n,s=s.replace(u,"$1").replace(c,"0.$1")),t!=s))return new C(s,o);if(C.DEBUG)throw Error(Pf+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},h.absoluteValue=h.abs=function(){var e=new C(this);return e.s<0&&(e.s=1),e},h.comparedTo=function(e,t){return _f(this,new C(e,t))},h.decimalPlaces=h.dp=function(e,t){var r,n,o,s=this;if(null!=e)return Rf(e,0,Ff),null==t?t=g:Rf(t,0,8),F(new C(s),e+s.e+1,t);if(!(r=s.c))return null;if(n=((o=r.length-1)-Of(this.e/Cf))*Cf,o=r[o])for(;o%10==0;o/=10,n--);return n<0&&(n=0),n},h.dividedBy=h.div=function(e,t){return r(this,new C(e,t),f,g)},h.dividedToIntegerBy=h.idiv=function(e,t){return r(this,new C(e,t),0,1)},h.exponentiatedBy=h.pow=function(e,t){var r,n,o,s,i,a,u,c,l=this;if((e=new C(e)).c&&!e.isInteger())throw Error(Pf+"Exponent not an integer: "+O(e));if(null!=t&&(t=new C(t)),i=e.e>14,!l.c||!l.c[0]||1==l.c[0]&&!l.e&&1==l.c.length||!e.c||!e.c[0])return c=new C(Math.pow(+O(l),i?e.s*(2-xf(e)):+O(e))),t?c.mod(t):c;if(a=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new C(NaN);(n=!a&&l.isInteger()&&t.isInteger())&&(l=l.mod(t))}else{if(e.e>9&&(l.e>0||l.e<-1||(0==l.e?l.c[0]>1||i&&l.c[1]>=24e7:l.c[0]<8e13||i&&l.c[0]<=9999975e7)))return s=l.s<0&&xf(e)?-0:0,l.e>-1&&(s=1/s),new C(a?1/s:s);A&&(s=wf(A/Cf+2))}for(i?(r=new C(.5),a&&(e.s=1),u=xf(e)):u=(o=Math.abs(+O(e)))%2,c=new C(p);;){if(u){if(!(c=c.times(l)).c)break;s?c.c.length>s&&(c.c.length=s):n&&(c=c.mod(t))}if(o){if(0===(o=Af(o/2)))break;u=o%2}else if(F(e=e.times(r),e.e+1,1),e.e>14)u=xf(e);else{if(0==(o=+O(e)))break;u=o%2}l=l.times(l),s?l.c&&l.c.length>s&&(l.c.length=s):n&&(l=l.mod(t))}return n?c:(a&&(c=p.div(c)),t?c.mod(t):s?F(c,A,g,void 0):c)},h.integerValue=function(e){var t=new C(this);return null==e?e=g:Rf(e,0,8),F(t,t.e+1,e)},h.isEqualTo=h.eq=function(e,t){return 0===_f(this,new C(e,t))},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(e,t){return _f(this,new C(e,t))>0},h.isGreaterThanOrEqualTo=h.gte=function(e,t){return 1===(t=_f(this,new C(e,t)))||0===t},h.isInteger=function(){return!!this.c&&Of(this.e/Cf)>this.c.length-2},h.isLessThan=h.lt=function(e,t){return _f(this,new C(e,t))<0},h.isLessThanOrEqualTo=h.lte=function(e,t){return-1===(t=_f(this,new C(e,t)))||0===t},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&0==this.c[0]},h.minus=function(e,t){var r,n,o,s,i=this,a=i.s;if(t=(e=new C(e,t)).s,!a||!t)return new C(NaN);if(a!=t)return e.s=-t,i.plus(e);var u=i.e/Cf,c=e.e/Cf,l=i.c,d=e.c;if(!u||!c){if(!l||!d)return l?(e.s=-t,e):new C(d?i:NaN);if(!l[0]||!d[0])return d[0]?(e.s=-t,e):new C(l[0]?i:3==g?-0:0)}if(u=Of(u),c=Of(c),l=l.slice(),a=u-c){for((s=a<0)?(a=-a,o=l):(c=u,o=d),o.reverse(),t=a;t--;o.push(0));o.reverse()}else for(n=(s=(a=l.length)<(t=d.length))?a:t,a=t=0;t0)for(;t--;l[r++]=0);for(t=99999999999999;n>a;){if(l[--n]=0;){for(r=0,h=T[o]%y,p=T[o]/y|0,s=o+(i=u);s>o;)r=((c=h*(c=m[--i]%y)+(a=p*c+(l=m[i]/y|0)*h)%y*y+f[s]+r)/g|0)+(a/y|0)+p*l,f[s--]=c%g;f[s]=r}return r?++n:f.splice(0,1),I(e,f,n)},h.negated=function(){var e=new C(this);return e.s=-e.s||null,e},h.plus=function(e,t){var r,n=this,o=n.s;if(t=(e=new C(e,t)).s,!o||!t)return new C(NaN);if(o!=t)return e.s=-t,n.minus(e);var s=n.e/Cf,i=e.e/Cf,a=n.c,u=e.c;if(!s||!i){if(!a||!u)return new C(o/0);if(!a[0]||!u[0])return u[0]?e:new C(a[0]?n:0*o)}if(s=Of(s),i=Of(i),a=a.slice(),o=s-i){for(o>0?(i=s,r=u):(o=-o,r=a),r.reverse();o--;r.push(0));r.reverse()}for((o=a.length)-(t=u.length)<0&&(r=u,u=a,a=r,t=o),o=0;t;)o=(a[--t]=a[t]+u[t]+o)/Bf|0,a[t]=Bf===a[t]?0:a[t]%Bf;return o&&(a=[o].concat(a),++i),I(e,a,i)},h.precision=h.sd=function(e,t){var r,n,o,s=this;if(null!=e&&e!==!!e)return Rf(e,1,Ff),null==t?t=g:Rf(t,0,8),F(new C(s),e,t);if(!(r=s.c))return null;if(n=(o=r.length-1)*Cf+1,o=r[o]){for(;o%10==0;o/=10,n--);for(o=r[0];o>=10;o/=10,n++);}return e&&s.e+1>n&&(n=s.e+1),n},h.shiftedBy=function(e){return Rf(e,-9007199254740991,Ef),this.times("1e"+e)},h.squareRoot=h.sqrt=function(){var e,t,n,o,s,i=this,a=i.c,u=i.s,c=i.e,l=f+4,d=new C("0.5");if(1!==u||!a||!a[0])return new C(!u||u<0&&(!a||a[0])?NaN:a?i:1/0);if(0==(u=Math.sqrt(+O(i)))||u==1/0?(((t=Sf(a)).length+c)%2==0&&(t+="0"),u=Math.sqrt(+t),c=Of((c+1)/2)-(c<0||c%2),n=new C(t=u==1/0?"5e"+c:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+c)):n=new C(u+""),n.c[0])for((u=(c=n.e)+l)<3&&(u=0);;)if(s=n,n=d.times(s.plus(r(i,s,l,1))),Sf(s.c).slice(0,u)===(t=Sf(n.c)).slice(0,u)){if(n.e0&&f>0){for(s=f%a||a,l=p.substr(0,s);s0&&(l+=c+p.slice(s)),h&&(l="-"+l)}n=d?l+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):l}return(r.prefix||"")+n+(r.suffix||"")},h.toFraction=function(e){var t,n,o,s,i,a,u,c,l,d,h,f,y=this,b=y.c;if(null!=e&&(!(u=new C(e)).isInteger()&&(u.c||1!==u.s)||u.lt(p)))throw Error(Pf+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+O(u));if(!b)return new C(y);for(t=new C(p),l=n=new C(p),o=c=new C(p),f=Sf(b),i=t.e=f.length-y.e-1,t.c[0]=Mf[(a=i%Cf)<0?Cf+a:a],e=!e||u.comparedTo(t)>0?i>0?t:l:u,a=T,T=1/0,u=new C(f),c.c[0]=0;d=r(u,t,0,1),1!=(s=n.plus(d.times(o))).comparedTo(e);)n=o,o=s,l=c.plus(d.times(s=l)),c=s,t=u.minus(d.times(s=t)),u=s;return s=r(e.minus(n),o,0,1),c=c.plus(s.times(l)),n=n.plus(s.times(o)),c.s=l.s=y.s,h=r(l,o,i*=2,g).minus(y).abs().comparedTo(r(c,n,i,g).minus(y).abs())<1?[l,o]:[c,n],T=a,h},h.toNumber=function(){return+O(this)},h.toPrecision=function(e,t){return null!=e&&Rf(e,1,Ff),E(this,e,t,2)},h.toString=function(e){var t,r=this,o=r.s,s=r.e;return null===s?o?(t="Infinity",o<0&&(t="-"+t)):t="NaN":(null==e?t=s<=y||s>=b?Nf(Sf(r.c),s):kf(Sf(r.c),s,"0"):10===e&&B?t=kf(Sf((r=F(new C(r),f+s+1,g)).c),r.e,"0"):(Rf(e,2,W.length,"Base"),t=n(kf(Sf(r.c),s,"0"),10,e,o,!0)),o<0&&r.c[0]&&(t="-"+t)),t},h.valueOf=h.toJSON=function(){return O(this)},h._isBigNumber=!0,h[Symbol.toStringTag]="BigNumber",h[Symbol.for("nodejs.util.inspect.custom")]=h.valueOf,null!=t&&C.set(t),C}();const Df=Uf,Lf={isValidURL:e=>"string"==typeof e&&Tf().isURL(e.toString(),{protocols:["http","https"],require_tld:!1}),isObject:e=>e===Object(e)&&"[object Array]"!==Object.prototype.toString.call(e),isArray:e=>Array.isArray(e),isJson(e){try{return!!JSON.parse(e)}catch(e){return!1}},isBoolean:e=>"boolean"==typeof e,isBigNumber:e=>e&&(e instanceof Df||e.constructor&&"BigNumber"===e.constructor.name),isString:e=>"string"==typeof e||e&&e.constructor&&"String"===e.constructor.name,isFunction:e=>"function"==typeof e,isHex:e=>"string"==typeof e&&!isNaN(parseInt(e,16))&&/^(0x|)[a-fA-F0-9]+$/.test(e),isInteger:e=>null!==e&&Number.isInteger(Number(e)),hasProperty:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),hasProperties(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;nthis.hasProperty(e,t))).includes(!1)},mapEvent(e){let t={block:e.block_number,timestamp:e.block_timestamp,contract:e.contract_address,name:e.event_name,transaction:e.transaction_id,result:e.result,resourceNode:e.resource_Node||(e._unconfirmed?"fullNode":"solidityNode")};return e._unconfirmed&&(t.unconfirmed=e._unconfirmed),e._fingerprint&&(t.fingerprint=e._fingerprint),t},parseEvent(e,t){let{inputs:r}=t;if(!e.result)return e;if(this.isObject(e.result))for(var n=0;n{const{name:o,type:s}=r[n];return"address"==s&&(t=Rt+t.substr(2).toLowerCase()),e[o]=t,e}),{}));return e},padLeft(e,t,r){let n=e.toString();for(;n.lengthnull!=e,async sleep(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;return new Promise((t=>setTimeout(t,e)))}},zf={...Lf,code:o,accounts:c,base58:s,bytes:t,crypto:u,abi:l,message:d,_TypedDataEncoder:ud,transaction:h,ethersUtils:a},jf={HttpProvider:class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3e4,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"/";if(!zf.isValidURL(e))throw new Error("Invalid URL provided to HttpProvider");if(isNaN(t)||t<0)throw new Error("Invalid timeout duration provided");if(!zf.isObject(o))throw new Error("Invalid headers object provided");e=e.replace(/\/+$/,""),this.host=e,this.timeout=t,this.user=r,this.password=n,this.headers=o,this.statusPage=s,this.instance=Bt.create({baseURL:e,timeout:t,headers:o,auth:r&&{user:r,password:n}})}setStatusPage(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";this.statusPage=e}async isConnected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.statusPage;return this.request(e).then((e=>zf.hasProperties(e,"blockID","block_header"))).catch((()=>!1))}request(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"get";return r=r.toLowerCase(),this.instance.request({data:"post"==r&&Object.keys(t).length?t:null,params:"get"==r&&t,url:e,method:r}).then((e=>{let{data:t}=e;return t}))}}};var $f=r(228),Vf=r.n($f),Gf=r(5345),Hf=r.n(Gf),Kf=r(9021),Zf=r.n(Kf);class qf{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e||!e instanceof bg)throw new Error("Expected instance of TronWeb");this.tronWeb=e}invalid(e){return e.msg||`Invalid ${e.name}${"address"===e.type?" address":""} provided`}notPositive(e){return`${e.name} must be a positive integer`}notEqual(e){return e.msg||`${e.names[0]} can not be equal to ${e.names[1]}`}notValid(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r={},n=!1;for(const o of e){let{name:e,names:s,value:i,type:a,gt:u,lt:c,gte:l,lte:d,se:h,optional:p}=o;if(!p||zf.isNotNullOrUndefined(i)&&("boolean"===a||!1!==i)){switch(r[o.name]=o.value,a){case"address":this.tronWeb.isAddress(i)?r[e]=this.tronWeb.address.toHex(i):n=!0;break;case"integer":(!zf.isInteger(i)||"number"==typeof u&&i<=o.gt||"number"==typeof c&&i>=o.lt||"number"==typeof l&&io.lte)&&(n=!0);break;case"positive-integer":if(!zf.isInteger(i)||i<=0)return void t(this.notPositive(o));break;case"tokenId":case"not-empty-string":zf.isString(i)&&i.length||(n=!0);break;case"notEmptyObject":zf.isObject(i)&&Object.keys(i).length||(n=!0);break;case"notEqual":if(r[s[0]]===r[s[1]])return t(this.notEqual(o)),!0;break;case"resource":["BANDWIDTH","ENERGY"].includes(i)||(n=!0);break;case"url":zf.isValidURL(i)||(n=!0);break;case"hex":zf.isHex(i)||(n=!0);break;case"array":Array.isArray(i)||(n=!0);break;case"boolean":zf.isBoolean(i)||(n=!0);break;case"string":(!zf.isString(i)||"number"==typeof u&&i.length<=o.gt||"number"==typeof c&&i.length>=o.lt||"number"==typeof l&&i.lengtho.lte)&&(n=!0)}if(n)return t(this.invalid(o)),!0}}return!1}}let Jf;function Yf(e){return bg.address.toHex(e)}function Xf(e){return Jf.tronWeb.fromUtf8(e).replace(/^0x/,"")}function Qf(e){return JSON.parse(JSON.stringify(e))}function eg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.ref_block_bytes&&void 0===e.ref_block_hash&&void 0===e.expiration&&void 0===e.timestamp)return!1;if("string"!=typeof e.ref_block_bytes)throw new Error("Invalid ref_block_bytes provided.");if("string"!=typeof e.ref_block_hash)throw new Error("Invalid ref_block_hash provided.");if("number"!=typeof e.expiration)throw new Error("Invalid expiration provided.");if("number"!=typeof e.timestamp)throw new Error("Invalid timestamp provided.");return!0}async function tg(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};const s={visible:!1,txID:"",raw_data_hex:"",raw_data:{contract:[{parameter:{value:r,type_url:`type.googleapis.com/protocol.${t}`},type:t}],...eg(o)?{}:await(i=e.fullNode,i.request("wallet/getblock",{detail:!1},"post").then((e=>({ref_block_bytes:e.block_header.raw_data.number.toString(16).slice(-4).padStart(4,"0"),ref_block_hash:e.blockID.slice(16,32),expiration:e.block_header.raw_data.timestamp+6e4,timestamp:e.block_header.raw_data.timestamp})))),...o}};var i;n&&(s.raw_data.contract[0].Permission_id=n);const a=df(s);return s.txID=bf(a).replace(/^0x/,""),s.raw_data_hex=ff(a).toLowerCase(),s}function rg(e){const t={};return eg(e?.blockHeader)&&["ref_block_bytes","ref_block_hash","expiration","timestamp"].forEach((r=>{t[r]=e.blockHeader[r]})),t}class ng{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e||!e instanceof bg)throw new Error("Expected instance of TronWeb");Jf=this,this.tronWeb=e,this.injectPromise=Zf()(this),this.validator=new qf(e)}sendTrx(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.tronWeb.defaultAddress.hex,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n={}),zf.isFunction(r)?(o=r,r=this.tronWeb.defaultAddress.hex):zf.isObject(r)&&(n=r,r=this.tronWeb.defaultAddress.hex),!o)return this.injectPromise(this.sendTrx,e,t,r,n);if(t=parseInt(t),this.validator.notValid([{name:"recipient",type:"address",value:e},{name:"origin",type:"address",value:r},{names:["recipient","origin"],type:"notEqual",msg:"Cannot transfer TRX to the same account"},{name:"amount",type:"integer",gt:0,value:t}],o))return;const s={to_address:Yf(e),owner_address:Yf(r),amount:t},i=rg(n);tg(this.tronWeb,"TransferContract",s,n?.permissionId,i).then((e=>o(null,e))).catch((e=>o(e)))}sendToken(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.tronWeb.defaultAddress.hex,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(zf.isFunction(o)&&(s=o,o={}),zf.isFunction(n)?(s=n,n=this.tronWeb.defaultAddress.hex):zf.isObject(n)&&(o=n,n=this.tronWeb.defaultAddress.hex),!s)return this.injectPromise(this.sendToken,e,t,r,n,o);if(t=parseInt(t),this.validator.notValid([{name:"recipient",type:"address",value:e},{name:"origin",type:"address",value:n},{names:["recipient","origin"],type:"notEqual",msg:"Cannot transfer tokens to the same account"},{name:"amount",type:"integer",gt:0,value:t},{name:"token ID",type:"tokenId",value:r}],s))return;const i={to_address:Yf(e),owner_address:Yf(n),asset_name:Xf(r),amount:parseInt(t)},a=rg(o);tg(this.tronWeb,"TransferAssetContract",i,o?.permissionId,a).then((e=>s(null,e))).catch((e=>s(e)))}purchaseToken(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.tronWeb.defaultAddress.hex,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(zf.isFunction(o)&&(s=o,o={}),zf.isFunction(n)?(s=n,n=this.tronWeb.defaultAddress.hex):zf.isObject(n)&&(o=n,n=this.tronWeb.defaultAddress.hex),!s)return this.injectPromise(this.purchaseToken,e,t,r,n,o);if(this.validator.notValid([{name:"buyer",type:"address",value:n},{name:"issuer",type:"address",value:e},{names:["buyer","issuer"],type:"notEqual",msg:"Cannot purchase tokens from same account"},{name:"amount",type:"integer",gt:0,value:r},{name:"token ID",type:"tokenId",value:t}],s))return;const i={to_address:Yf(e),owner_address:Yf(n),asset_name:Xf(t),amount:parseInt(r)},a=rg(o);tg(this.tronWeb,"ParticipateAssetIssueContract",i,o?.permissionId,a).then((e=>s(null,e))).catch((e=>s(e)))}freezeBalance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"BANDWIDTH",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.tronWeb.defaultAddress.hex,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,s=arguments.length>5?arguments[5]:void 0,i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(zf.isFunction(s)&&(i=s,s={}),zf.isFunction(o)?(i=o,o=void 0):zf.isObject(o)&&(s=o,o=void 0),zf.isFunction(n)?(i=n,n=this.tronWeb.defaultAddress.hex):zf.isObject(n)&&(s=n,n=this.tronWeb.defaultAddress.hex),zf.isFunction(t)&&(i=t,t=3),zf.isFunction(r)&&(i=r,r="BANDWIDTH"),!i)return this.injectPromise(this.freezeBalance,e,t,r,n,o,s);if(this.validator.notValid([{name:"origin",type:"address",value:n},{name:"receiver",type:"address",value:o,optional:!0},{name:"amount",type:"integer",gt:0,value:e},{name:"duration",type:"integer",gte:3,value:t},{name:"resource",type:"resource",value:r,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],i))return;const a={owner_address:Yf(n),frozen_balance:parseInt(e),frozen_duration:parseInt(t)};"BANDWIDTH"!==r&&(a.resource=r),zf.isNotNullOrUndefined(o)&&Yf(o)!==Yf(n)&&(a.receiver_address=Yf(o));const u=rg(s);tg(this.tronWeb,"FreezeBalanceContract",a,s?.permissionId,u).then((e=>i(null,e))).catch((e=>i(e)))}unfreezeBalance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"BANDWIDTH",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n={}),zf.isFunction(r)?(o=r,r=void 0):zf.isObject(r)&&(n=r,r=void 0),zf.isFunction(t)?(o=t,t=this.tronWeb.defaultAddress.hex):zf.isObject(t)&&(n=t,t=this.tronWeb.defaultAddress.hex),zf.isFunction(e)&&(o=e,e="BANDWIDTH"),!o)return this.injectPromise(this.unfreezeBalance,e,t,r,n);if(this.validator.notValid([{name:"origin",type:"address",value:t},{name:"receiver",type:"address",value:r,optional:!0},{name:"resource",type:"resource",value:e,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],o))return;const s={owner_address:Yf(t)};"BANDWIDTH"!==e&&(s.resource=e),zf.isNotNullOrUndefined(r)&&Yf(r)!==Yf(t)&&(s.receiver_address=Yf(r));const i=rg(n);tg(this.tronWeb,"UnfreezeBalanceContract",s,n?.permissionId,i).then((e=>o(null,e))).catch((e=>o(e)))}freezeBalanceV2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BANDWIDTH",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.tronWeb.defaultAddress.hex,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n={}),zf.isFunction(r)?(o=r,r=this.tronWeb.defaultAddress.hex):zf.isObject(r)&&(n=r,r=this.tronWeb.defaultAddress.hex),zf.isFunction(t)?(o=t,t="BANDWIDTH"):zf.isObject(t)&&(n=t,t="BANDWIDTH"),!o)return this.injectPromise(this.freezeBalanceV2,e,t,r,n);if(this.validator.notValid([{name:"origin",type:"address",value:r},{name:"amount",type:"integer",gt:0,value:e},{name:"resource",type:"resource",value:t,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],o))return;const s={owner_address:Yf(r),frozen_balance:parseInt(e)};"BANDWIDTH"!==t&&(s.resource=t);const i=rg(n);tg(this.tronWeb,"FreezeBalanceV2Contract",s,n?.permissionId,i).then((e=>o(null,e))).catch((e=>o(e)))}unfreezeBalanceV2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BANDWIDTH",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.tronWeb.defaultAddress.hex,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n={}),zf.isFunction(r)?(o=r,r=this.tronWeb.defaultAddress.hex):zf.isObject(r)&&(n=r,r=this.tronWeb.defaultAddress.hex),zf.isFunction(t)?(o=t,t="BANDWIDTH"):zf.isObject(t)&&(n=t,t="BANDWIDTH"),!o)return this.injectPromise(this.unfreezeBalanceV2,e,t,r,n);if(this.validator.notValid([{name:"origin",type:"address",value:r},{name:"amount",type:"integer",gt:0,value:e},{name:"resource",type:"resource",value:t,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],o))return;const s={owner_address:Yf(r),unfreeze_balance:parseInt(e)};"BANDWIDTH"!==t&&(s.resource=t);const i=rg(n);tg(this.tronWeb,"UnfreezeBalanceV2Contract",s,n?.permissionId,i).then((e=>o(null,e))).catch((e=>o(e)))}cancelUnfreezeBalanceV2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t={}),zf.isFunction(e)?(r=e,t={},e=this.tronWeb.defaultAddress.hex):zf.isObject(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),!r)return this.injectPromise(this.cancelUnfreezeBalanceV2,e,t);if(this.validator.notValid([{name:"origin",type:"address",value:e}],r))return;const n={owner_address:Yf(e)},o=rg(t);tg(this.tronWeb,"CancelAllUnfreezeV2Contract",n,t?.permissionId,o).then((e=>r(null,e))).catch((e=>r(e)))}delegateResource(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"BANDWIDTH",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.tronWeb.defaultAddress.hex,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(zf.isFunction(i)&&(a=i,i={}),zf.isFunction(s)?(a=s,s=void 0):zf.isObject(s)&&(i=s,s=void 0),zf.isFunction(o)?(a=o,o=!1):zf.isObject(o)&&(i=o,o=!1),zf.isFunction(n)?(a=n,n=this.tronWeb.defaultAddress.hex):zf.isObject(n)&&(i=n,n=this.tronWeb.defaultAddress.hex),zf.isFunction(r)?(a=r,r="BANDWIDTH"):zf.isObject(r)&&(i=r,r="BANDWIDTH"),!a)return this.injectPromise(this.delegateResource,e,t,r,n,o,s,i);if(this.validator.notValid([{name:"amount",type:"integer",gt:0,value:e},{name:"resource",type:"resource",value:r,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'},{name:"receiver",type:"address",value:t},{name:"origin",type:"address",value:n},{name:"lock",type:"boolean",value:o},{name:"lock period",type:"integer",gte:0,value:s,optional:!0}],a))return;if(Yf(t)===Yf(n))return a("Receiver address must not be the same as owner address");const u={owner_address:Yf(n),receiver_address:Yf(t),balance:parseInt(e)};"BANDWIDTH"!==r&&(u.resource=r),o&&(u.lock=o,zf.isNotNullOrUndefined(s)&&(u.lock_period=s));const c=rg(i);tg(this.tronWeb,"DelegateResourceContract",u,i?.permissionId,c).then((e=>a(null,e))).catch((e=>a(e)))}undelegateResource(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"BANDWIDTH",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.tronWeb.defaultAddress.hex,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(zf.isFunction(o)&&(s=o,o={}),zf.isFunction(n)?(s=n,n=this.tronWeb.defaultAddress.hex):zf.isObject(n)&&(o=n,n=this.tronWeb.defaultAddress.hex),zf.isFunction(r)?(s=r,r="BANDWIDTH"):zf.isObject(r)&&(o=r,r="BANDWIDTH"),!s)return this.injectPromise(this.undelegateResource,e,t,r,n,o);if(this.validator.notValid([{name:"origin",type:"address",value:n},{name:"receiver",type:"address",value:t},{name:"amount",type:"integer",gt:0,value:e},{name:"resource",type:"resource",value:r,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],s))return;if(Yf(t)===Yf(n))return s("Receiver address must not be the same as owner address");const i={owner_address:Yf(n),receiver_address:Yf(t),balance:parseInt(e)};"BANDWIDTH"!==r&&(i.resource=r);const a=rg(o);tg(this.tronWeb,"UnDelegateResourceContract",i,o?.permissionId,a).then((e=>s(null,e))).catch((e=>s(e)))}withdrawExpireUnfreeze(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t={}),zf.isFunction(e)?(r=e,e=this.tronWeb.defaultAddress.hex):zf.isObject(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),!r)return this.injectPromise(this.withdrawExpireUnfreeze,e,t);if(this.validator.notValid([{name:"origin",type:"address",value:e}],r))return;const n={owner_address:Yf(e)},o=rg(t);tg(this.tronWeb,"WithdrawExpireUnfreezeContract",n,t?.permissionId,o).then((e=>r(null,e))).catch((e=>r(e)))}withdrawBlockRewards(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t={}),zf.isFunction(e)?(r=e,e=this.tronWeb.defaultAddress.hex):zf.isObject(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),!r)return this.injectPromise(this.withdrawBlockRewards,e,t);if(this.validator.notValid([{name:"origin",type:"address",value:e}],r))return;const n={owner_address:Yf(e)},o=rg(t);tg(this.tronWeb,"WithdrawBalanceContract",n,t?.permissionId,o).then((e=>r(null,e))).catch((e=>r(e)))}applyForSR(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),zf.isObject(t)&&zf.isValidURL(e)&&(r=t,t=e,e=this.tronWeb.defaultAddress.hex),!n)return this.injectPromise(this.applyForSR,e,t,r);if(this.validator.notValid([{name:"origin",type:"address",value:e},{name:"url",type:"url",value:t,msg:"Invalid url provided"},{name:"url",type:"string",value:t,lte:256,msg:"Invalid url provided"}],n))return;const o={owner_address:Yf(e),url:Xf(t)},s=rg(r);tg(this.tronWeb,"WitnessCreateContract",o,r?.permissionId,s).then((e=>n(null,e))).catch((e=>n(e)))}vote(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),zf.isFunction(t)?(n=t,t=this.tronWeb.defaultAddress.hex):zf.isObject(t)&&(r=t,t=this.tronWeb.defaultAddress.hex),!n)return this.injectPromise(this.vote,e,t,r);if(this.validator.notValid([{name:"voter",type:"address",value:t},{name:"votes",type:"notEmptyObject",value:e}],n))return;let o=!1;if(e=Object.entries(e).map((e=>{let[t,r]=e;if(!o)return this.validator.notValid([{name:"SR",type:"address",value:t},{name:"vote count",type:"integer",gt:0,value:r,msg:"Invalid vote count provided for SR: "+t}],n)?o=!0:{vote_address:Yf(t),vote_count:parseInt(r)}})),o)return;const s={owner_address:Yf(t),votes:e},i=rg(r);tg(this.tronWeb,"VoteWitnessContract",s,r?.permissionId,i).then((e=>n(null,e))).catch((e=>n(e)))}createSmartContract(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t=this.tronWeb.defaultAddress.hex),!r)return this.injectPromise(this.createSmartContract,e,t);const n=e.feeLimit||this.tronWeb.feeLimit;let o=e.userFeePercentage;"number"==typeof o||o||(o=100);const s=e.originEnergyLimit||1e7,i=e.callValue||0,a=e.tokenValue,u=e.tokenId||e.token_id;let{abi:c=!1,bytecode:l=!1,parameters:d=[],name:h=""}=e;if(c&&zf.isString(c))try{c=JSON.parse(c)}catch{return r("Invalid options.abi provided")}if(c.entrys&&(c=c.entrys),!zf.isArray(c))return r("Invalid options.abi provided");const p=c.some((e=>"constructor"===e.type&&"payable"===e.stateMutability.toLowerCase()));if(this.validator.notValid([{name:"bytecode",type:"hex",value:l},{name:"feeLimit",type:"integer",value:n,gt:0},{name:"callValue",type:"integer",value:i,gte:0},{name:"userFeePercentage",type:"integer",value:o,gte:0,lte:100},{name:"originEnergyLimit",type:"integer",value:s,gte:0,lte:1e7},{name:"parameters",type:"array",value:d},{name:"issuer",type:"address",value:t},{name:"tokenValue",type:"integer",value:a,gte:0,optional:!0},{name:"tokenId",type:"integer",value:u,gte:0,optional:!0}],r))return;if(!p&&(i>0||a>0))return r("When contract is not payable, options.callValue and options.tokenValue must be 0");if(e.rawParameter&&zf.isString(e.rawParameter))d=e.rawParameter.replace(/^(0x)/,"");else if(e.funcABIV2)d=bp(e.funcABIV2,e.parametersV2).replace(/^(0x)/,"");else{var f=c.find((e=>"constructor"===e.type));if(void 0!==f&&f){const e=new cp,t=[],n=[];if(f=f.inputs,d.length!=f.length)return r(`constructor needs ${f.length} but ${d.length} provided`);for(let e=0;ezf.isArray(e)?e.map((e=>i(e))):Yf(e).replace(Nt,"0x");o.startsWith("address")?s=i(s):/trcToken/.test(o)&&(o=o.replace(/trcToken/,"uint256")),t.push(o),n.push(s)}try{d=e.encode(t,n).replace(/^(0x)/,"")}catch(e){return r(e)}}else d=""}const g={owner_address:Yf(t),fee_limit:parseInt(n),call_value:parseInt(i),consume_user_resource_percent:o,origin_energy_limit:s,abi:JSON.stringify(c),bytecode:l,parameter:d,name:h};zf.isNotNullOrUndefined(a)&&(g.call_token_value=parseInt(a)),zf.isNotNullOrUndefined(u)&&(g.token_id=parseInt(u)),new Promise((e=>{const t={};t.owner_address=g.owner_address,zf.isNotNullOrUndefined(g.call_token_value)&&(t.call_token_value=g.call_token_value),zf.isNotNullOrUndefined(g.token_id)&&(t.token_id=g.token_id);const r=t.new_contract={};g.abi?r.abi={entrys:JSON.parse(g.abi)}:r.abi={},g.call_value&&(r.call_value=g.call_value),r.consume_user_resource_percent=g.consume_user_resource_percent,r.origin_energy_limit=g.origin_energy_limit,r.origin_address=g.origin_address??g.owner_address,g.bytecode+g.parameter&&(r.bytecode=(g.bytecode+g.parameter).replace(/^0x/,"")),zf.isNotNullOrUndefined(g.name)&&(r.name=g.name),e(t)})).then((async t=>{const r=rg(e),n=await tg(this.tronWeb,"CreateSmartContract",t,e?.permissionId,{...r,fee_limit:g.fee_limit});var o,s;return n.contract_address=(o=g.owner_address,s=n.txID,"41"+To(Buffer.from(s+o,"hex")).toString().substring(2).slice(24)),n})).then((e=>r(null,e))).catch((e=>r(e)))}triggerSmartContract(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{};const{input:t,ownerAddress:r,tokenId:n,tokenValue:o,callValue:s=0}=e;this.validator.notValid([{name:"input",type:"not-empty-string",value:t},{name:"callValue",type:"integer",value:s,gte:0},{name:"owner",type:"address",value:r},{name:"tokenValue",type:"integer",value:o,gte:0,optional:!0},{name:"tokenId",type:"integer",value:n,gte:0,optional:!0}],(e=>{throw new Error(e)}));const i={data:t,owner_address:Yf(r),call_value:s};n&&(i.token_id=n),o&&(i.call_token_value=o);const a=`wallet${e.confirmed?"solidity":""}/${e.estimateEnergy?"estimateenergy":"triggerconstantcontract"}`;return this.tronWeb[e.confirmed?"solidityNode":"fullNode"].request(a,i,"post").then((e=>{if(e.Error)throw new Error(e.Error);if(e.result&&e.result.message)throw new Error(this.tronWeb.toUtf8(e.result.message));return e})).then((e=>e.energy_used?{result:e.result,energy_required:e.energy_used}:e))}_getTriggerSmartContractArgs(e,t,r,n,o,s,i,a,u){const c={contract_address:Yf(e),owner_address:Yf(o)};if(t&&zf.isString(t)){if(t=t.replace("/s*/g",""),n.length){const e=new cp;let t=[];const r=[];for(let e=0;ezf.isArray(e)?e.map((e=>i(e))):Yf(e).replace(Nt,"0x");o.startsWith("address")&&(s=i(s)),t.push(o),r.push(s)}t=t.map((e=>(/trcToken/.test(e)&&(e=e.replace(/trcToken/,"uint256")),e))),n=e.encode(t,r).replace(/^(0x)/,"")}else n="";r.funcABIV2&&(n=bp(r.funcABIV2,r.parametersV2).replace(/^(0x)/,"")),r.shieldedParameter&&zf.isString(r.shieldedParameter)&&(n=r.shieldedParameter.replace(/^(0x)/,"")),r.rawParameter&&zf.isString(r.rawParameter)&&(n=r.rawParameter.replace(/^(0x)/,"")),c.function_selector=t,c.parameter=n}else r.input&&(c.data=r.input);return c.call_value=parseInt(a),zf.isNotNullOrUndefined(s)&&(c.call_token_value=parseInt(s)),zf.isNotNullOrUndefined(i)&&(c.token_id=parseInt(i)),r._isConstant||r.estimateEnergy||(c.fee_limit=parseInt(u)),r.permissionId&&(c.Permission_id=r.permissionId),c}_triggerSmartContractLocal(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.tronWeb.defaultAddress.hex,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(zf.isFunction(o)&&(s=o,o=this.tronWeb.defaultAddress.hex),zf.isFunction(n)&&(s=n,n=[]),!s)return this.injectPromise(this._triggerSmartContractLocal,e,t,r,n,o);let i,{tokenValue:a,tokenId:u,callValue:c,feeLimit:l}=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},r);if(this.validator.notValid([{name:"feeLimit",type:"integer",value:l,gt:0},{name:"callValue",type:"integer",value:c,gte:0},{name:"parameters",type:"array",value:n},{name:"contract",type:"address",value:e},{name:"issuer",type:"address",value:o,optional:!0},{name:"tokenValue",type:"integer",value:a,gte:0,optional:!0},{name:"tokenId",type:"integer",value:u,gte:0,optional:!0}],s))return;try{i=this._getTriggerSmartContractArgs(e,t,r,n,o,a,u,c,l)}catch(e){return s(e)}i.function_selector&&(i.data=To(Buffer.from(i.function_selector,"utf-8")).toString().substring(2,10)+i.parameter);const d={data:i.data,owner_address:i.owner_address,contract_address:i.contract_address};i.call_value&&(d.call_value=i.call_value),i.call_token_value&&(d.call_token_value=i.call_token_value),i.token_id&&(d.token_id=i.token_id);const h=rg(r);tg(this.tronWeb,"TriggerSmartContract",d,r.permissionId,{...h,fee_limit:i.fee_limit}).then((e=>{s(null,{result:{result:!0},transaction:e})})).catch((e=>s(e)))}_triggerSmartContract(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.tronWeb.defaultAddress.hex,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(zf.isFunction(o)&&(s=o,o=this.tronWeb.defaultAddress.hex),zf.isFunction(n)&&(s=n,n=[]),!s)return this.injectPromise(this._triggerSmartContract,e,t,r,n,o);let i,{tokenValue:a,tokenId:u,callValue:c,feeLimit:l}=Object.assign({callValue:0,feeLimit:this.tronWeb.feeLimit},r);if(this.validator.notValid([{name:"feeLimit",type:"integer",value:l,gt:0},{name:"callValue",type:"integer",value:c,gte:0},{name:"parameters",type:"array",value:n},{name:"contract",type:"address",value:e},{name:"issuer",type:"address",value:o,optional:!0},{name:"tokenValue",type:"integer",value:a,gte:0,optional:!0},{name:"tokenId",type:"integer",value:u,gte:0,optional:!0}],s))return;try{i=this._getTriggerSmartContractArgs(e,t,r,n,o,a,u,c,l)}catch(e){return s(e)}let d="triggersmartcontract";r._isConstant?d="triggerconstantcontract":r.estimateEnergy&&(d="estimateenergy"),d=`wallet${r.confirmed?"solidity":""}/${d}`,this.tronWeb[r.confirmed?"solidityNode":"fullNode"].request(d,i,"post").then((e=>function(e,t,r,n){return e.Error?n(e.Error):e.result&&e.result.message?n(Jf.tronWeb.toUtf8(e.result.message)):r._isConstant||r.estimateEnergy||yf(e.transaction,t,r)?n(null,e):n("Invalid transaction")}(e,i,r,s))).catch((e=>s(e)))}clearABI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),zf.isFunction(t)?(n=t,t=this.tronWeb.defaultAddress.hex):zf.isObject(t)&&(r=t,t=this.tronWeb.defaultAddress.hex),!n)return this.injectPromise(this.clearABI,e,t,r);if(!this.tronWeb.isAddress(e))return n("Invalid contract address provided");if(!this.tronWeb.isAddress(t))return n("Invalid owner address provided");const o={contract_address:Yf(e),owner_address:Yf(t)};this.tronWeb.trx.cache.contracts[e]&&delete this.tronWeb.trx.cache.contracts[e];const s=rg(r);tg(this.tronWeb,"ClearABIContract",o,r?.permissionId,s).then((e=>n(null,e))).catch((e=>n(e)))}updateBrokerage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),zf.isFunction(t)?(n=t,t=this.tronWeb.defaultAddress.hex):zf.isObject(t)&&(r=t,t=this.tronWeb.defaultAddress.hex),!n)return this.injectPromise(this.updateBrokerage,e,t,r);if(!zf.isNotNullOrUndefined(e))return n("Invalid brokerage provided");if(!zf.isInteger(e)||e<0||e>100)return n("Brokerage must be an integer between 0 and 100");if(!this.tronWeb.isAddress(t))return n("Invalid owner address provided");const o={brokerage:parseInt(e),owner_address:Yf(t)},s=rg(r);tg(this.tronWeb,"UpdateBrokerageContract",o,r?.permissionId,s).then((e=>n(null,e))).catch((e=>n(e)))}createToken(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t=this.tronWeb.defaultAddress.hex),!r)return this.injectPromise(this.createToken,e,t);const{name:n=!1,abbreviation:o=!1,description:s="",url:i=!1,totalSupply:a=0,trxRatio:u=1,tokenRatio:c=1,saleStart:l=Date.now(),saleEnd:d=!1,freeBandwidth:h=0,freeBandwidthLimit:p=0,frozenAmount:f=0,frozenDuration:g=0,voteScore:y,precision:b}=e;if(this.validator.notValid([{name:"Supply amount",type:"positive-integer",value:a},{name:"TRX ratio",type:"positive-integer",value:u},{name:"Token ratio",type:"positive-integer",value:c},{name:"token abbreviation",type:"string",value:o,lte:32,gt:0},{name:"token name",type:"not-empty-string",value:n},{name:"token description",type:"string",value:s,lte:200},{name:"token url",type:"url",value:i},{name:"token url",type:"string",value:i,lte:256},{name:"issuer",type:"address",value:t},{name:"sale start timestamp",type:"integer",value:l,gte:Date.now()},{name:"sale end timestamp",type:"integer",value:d,gt:l},{name:"Frozen supply",type:"integer",value:f,gte:0},{name:"Frozen duration",type:"integer",value:g,gte:0}],r))return;if(zf.isNotNullOrUndefined(y)&&(!zf.isInteger(y)||y<=0))return r("voteScore must be a positive integer greater than 0");if(zf.isNotNullOrUndefined(b)&&(!zf.isInteger(b)||b<0||b>6))return r("precision must be a positive integer >= 0 and <= 6");const m={owner_address:Yf(t),name:Xf(n),abbr:Xf(o),description:Xf(s),url:Xf(i),total_supply:parseInt(a),trx_num:parseInt(u),num:parseInt(c),start_time:parseInt(l),end_time:parseInt(d),frozen_supply:[{frozen_amount:parseInt(f),frozen_days:parseInt(g)}]};["name","abbr","description","url"].forEach((e=>{m[e]||delete m[e]})),parseInt(f)>0||delete m.frozen_supply,h&&!isNaN(parseInt(h))&&parseInt(h)>=0&&(m.free_asset_net_limit=parseInt(h)),p&&!isNaN(parseInt(p))&&parseInt(p)>=0&&(m.public_free_asset_net_limit=parseInt(p)),b&&!isNaN(parseInt(b))&&(m.precision=parseInt(b)),y&&!isNaN(parseInt(y))&&(m.vote_score=parseInt(y));const T=rg(e);tg(this.tronWeb,"AssetIssueContract",m,e?.permissionId,T).then((e=>r(null,e))).catch((e=>r(e)))}createAccount(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),zf.isFunction(t)?(n=t,t=this.tronWeb.defaultAddress.hex):zf.isObject(t)&&(r=t,t=this.tronWeb.defaultAddress.hex),!n)return this.injectPromise(this.createAccount,e,t,r);if(this.validator.notValid([{name:"account",type:"address",value:e},{name:"origin",type:"address",value:t}],n))return;const o={owner_address:Yf(t),account_address:Yf(e)},s=rg(r);tg(this.tronWeb,"AccountCreateContract",o,r?.permissionId,s).then((e=>n(null,e))).catch((e=>n(e)))}updateAccount(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),zf.isFunction(t)?(n=t,t=this.tronWeb.defaultAddress.hex):zf.isObject(t)&&(r=t,t=this.tronWeb.defaultAddress.hex),!n)return this.injectPromise(this.updateAccount,e,t,r);if(this.validator.notValid([{name:"Name",type:"string",lte:200,gt:0,value:e,msg:"Invalid accountName"},{name:"origin",type:"address",value:t}],n))return;const o={account_name:Xf(e),owner_address:Yf(t)},s=rg(r);tg(this.tronWeb,"AccountUpdateContract",o,r?.permissionId,s).then((e=>n(null,e))).catch((e=>n(e)))}setAccountId(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),zf.isFunction(t)?(n=t,t=this.tronWeb.defaultAddress.hex):zf.isObject(t)&&(r=t,t=this.tronWeb.defaultAddress.hex),!n)return this.injectPromise(this.setAccountId,e,t,r);if(e&&zf.isString(e)&&e.startsWith("0x")&&(e=e.slice(2)),this.validator.notValid([{name:"accountId",type:"hex",value:e},{name:"accountId",type:"string",lte:32,gte:8,value:e},{name:"origin",type:"address",value:t}],n))return;const o={account_id:e,owner_address:Yf(t)},s=rg(r);tg(this.tronWeb,"SetAccountIdContract",o,r?.permissionId,s).then((e=>n(null,e))).catch((e=>n(e)))}updateToken(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)?(r=t,t=this.tronWeb.defaultAddress.hex):zf.isObject(t)&&(e=t,t=this.tronWeb.defaultAddress.hex),!r)return this.injectPromise(this.updateToken,e,t);const{description:n="",url:o=!1,freeBandwidth:s=0,freeBandwidthLimit:i=0}=e;if(this.validator.notValid([{name:"token description",type:"string",value:n,lte:200},{name:"token url",type:"url",value:o},{name:"token url",type:"string",value:o,lte:256},{name:"issuer",type:"address",value:t}],r))return;const a={owner_address:Yf(t),description:Xf(n),url:Xf(o)};s&&!isNaN(parseInt(s))&&parseInt(s)>=0&&(a.new_limit=parseInt(s)),i&&!isNaN(parseInt(i))&&parseInt(i)>=0&&(a.new_public_limit=parseInt(i));const u=rg(e);tg(this.tronWeb,"UpdateAssetContract",a,e?.permissionId,u).then((e=>r(null,e))).catch((e=>r(e)))}sendAsset(){return this.sendToken(...arguments)}purchaseAsset(){return this.purchaseToken(...arguments)}createAsset(){return this.createToken(...arguments)}updateAsset(){return this.updateToken(...arguments)}createProposal(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),zf.isFunction(t)?(n=t,t=this.tronWeb.defaultAddress.hex):zf.isObject(t)&&(r=t,t=this.tronWeb.defaultAddress.hex),!n)return this.injectPromise(this.createProposal,e,t,r);if(this.validator.notValid([{name:"issuer",type:"address",value:t}],n))return;const o="Invalid proposal parameters provided";if(!e)return n(o);zf.isArray(e)||(e=[e]);for(let t of e)if(!zf.isObject(t))return n(o);const s={owner_address:Yf(t),parameters:e},i=rg(r);tg(this.tronWeb,"ProposalCreateContract",s,r?.permissionId,i).then((e=>n(null,e))).catch((e=>n(e)))}deleteProposal(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),zf.isFunction(t)?(n=t,t=this.tronWeb.defaultAddress.hex):zf.isObject(t)&&(r=t,t=this.tronWeb.defaultAddress.hex),!n)return this.injectPromise(this.deleteProposal,e,t,r);if(this.validator.notValid([{name:"issuer",type:"address",value:t},{name:"proposalID",type:"integer",value:e,gte:0}],n))return;const o={owner_address:Yf(t),proposal_id:parseInt(e)},s=rg(r);tg(this.tronWeb,"ProposalDeleteContract",o,r?.permissionId,s).then((e=>n(null,e))).catch((e=>n(e)))}voteProposal(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.tronWeb.defaultAddress.hex,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n={}),zf.isFunction(r)?(o=r,r=this.tronWeb.defaultAddress.hex):zf.isObject(r)&&(n=r,r=this.tronWeb.defaultAddress.hex),!o)return this.injectPromise(this.voteProposal,e,t,r,n);if(this.validator.notValid([{name:"voter",type:"address",value:r},{name:"proposalID",type:"integer",value:e,gte:0},{name:"has approval",type:"boolean",value:t}],o))return;const s={owner_address:Yf(r),proposal_id:parseInt(e),is_add_approval:t},i=rg(n);tg(this.tronWeb,"ProposalApproveContract",s,n?.permissionId,i).then((e=>o(null,e))).catch((e=>o(e)))}createTRXExchange(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.tronWeb.defaultAddress.hex,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(zf.isFunction(o)&&(s=o,o={}),zf.isFunction(n)?(s=n,n=this.tronWeb.defaultAddress.hex):zf.isObject(n)&&(o=n,n=this.tronWeb.defaultAddress.hex),!s)return this.injectPromise(this.createTRXExchange,e,t,r,n,o);if(this.validator.notValid([{name:"owner",type:"address",value:n},{name:"token name",type:"not-empty-string",value:e},{name:"token balance",type:"positive-integer",value:t},{name:"trx balance",type:"positive-integer",value:r}],s))return;const i={owner_address:Yf(n),first_token_id:Xf(e),first_token_balance:t,second_token_id:"5f",second_token_balance:r},a=rg(o);tg(this.tronWeb,"ExchangeCreateContract",i,o?.permissionId,a).then((e=>s(null,e))).catch((e=>s(e)))}createTokenExchange(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.tronWeb.defaultAddress.hex,s=arguments.length>5?arguments[5]:void 0,i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(zf.isFunction(s)&&(i=s,s={}),zf.isFunction(o)?(i=o,o=this.tronWeb.defaultAddress.hex):zf.isObject(o)&&(s=o,o=this.tronWeb.defaultAddress.hex),!i)return this.injectPromise(this.createTokenExchange,e,t,r,n,o,s);if(this.validator.notValid([{name:"owner",type:"address",value:o},{name:"first token name",type:"not-empty-string",value:e},{name:"second token name",type:"not-empty-string",value:r},{name:"first token balance",type:"positive-integer",value:t},{name:"second token balance",type:"positive-integer",value:n}],i))return;const a={owner_address:Yf(o),first_token_id:Xf(e),first_token_balance:t,second_token_id:Xf(r),second_token_balance:n},u=rg(s);tg(this.tronWeb,"ExchangeCreateContract",a,s?.permissionId,u).then((e=>i(null,e))).catch((e=>i(e)))}injectExchangeTokens(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.tronWeb.defaultAddress.hex,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(zf.isFunction(o)&&(s=o,o={}),zf.isFunction(n)?(s=n,n=this.tronWeb.defaultAddress.hex):zf.isObject(n)&&(o=n,n=this.tronWeb.defaultAddress.hex),!s)return this.injectPromise(this.injectExchangeTokens,e,t,r,n,o);if(this.validator.notValid([{name:"owner",type:"address",value:n},{name:"token name",type:"not-empty-string",value:t},{name:"token amount",type:"integer",value:r,gte:1},{name:"exchangeID",type:"integer",value:e,gte:0}],s))return;const i={owner_address:Yf(n),exchange_id:parseInt(e),token_id:Xf(t),quant:parseInt(r)},a=rg(o);tg(this.tronWeb,"ExchangeInjectContract",i,o?.permissionId,a).then((e=>s(null,e))).catch((e=>s(e)))}withdrawExchangeTokens(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.tronWeb.defaultAddress.hex,o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(zf.isFunction(o)&&(s=o,o={}),zf.isFunction(n)?(s=n,n=this.tronWeb.defaultAddress.hex):zf.isObject(n)&&(o=n,n=this.tronWeb.defaultAddress.hex),!s)return this.injectPromise(this.withdrawExchangeTokens,e,t,r,n,o);if(this.validator.notValid([{name:"owner",type:"address",value:n},{name:"token name",type:"not-empty-string",value:t},{name:"token amount",type:"integer",value:r,gte:1},{name:"exchangeID",type:"integer",value:e,gte:0}],s))return;const i={owner_address:Yf(n),exchange_id:parseInt(e),token_id:Xf(t),quant:parseInt(r)},a=rg(o);tg(this.tronWeb,"ExchangeWithdrawContract",i,o?.permissionId,a).then((e=>s(null,e))).catch((e=>s(e)))}tradeExchangeTokens(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.tronWeb.defaultAddress.hex,s=arguments.length>5?arguments[5]:void 0,i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(zf.isFunction(s)&&(i=s,s={}),zf.isFunction(o)?(i=o,o=this.tronWeb.defaultAddress.hex):zf.isObject(o)&&(s=o,o=this.tronWeb.defaultAddress.hex),!i)return this.injectPromise(this.tradeExchangeTokens,e,t,r,n,o,s);if(this.validator.notValid([{name:"owner",type:"address",value:o},{name:"token name",type:"not-empty-string",value:t},{name:"tokenAmountSold",type:"integer",value:r,gte:1},{name:"tokenAmountExpected",type:"integer",value:n,gte:1},{name:"exchangeID",type:"integer",value:e,gte:0}],i))return;const a={owner_address:Yf(o),exchange_id:parseInt(e),token_id:this.tronWeb.fromAscii(t).replace(/^0x/,""),quant:parseInt(r),expected:parseInt(n)},u=rg(s);tg(this.tronWeb,"ExchangeTransactionContract",a,s?.permissionId,u).then((e=>i(null,e))).catch((e=>i(e)))}updateSetting(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.tronWeb.defaultAddress.hex,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n={}),zf.isFunction(r)?(o=r,r=this.tronWeb.defaultAddress.hex):zf.isObject(r)&&(n=r,r=this.tronWeb.defaultAddress.hex),!o)return this.injectPromise(this.updateSetting,e,t,r,n);if(this.validator.notValid([{name:"owner",type:"address",value:r},{name:"contract",type:"address",value:e},{name:"userFeePercentage",type:"integer",value:t,gte:0,lte:100}],o))return;const s={owner_address:Yf(r),contract_address:Yf(e),consume_user_resource_percent:t},i=rg(n);tg(this.tronWeb,"UpdateSettingContract",s,n?.permissionId,i).then((e=>o(null,e))).catch((e=>o(e)))}updateEnergyLimit(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.tronWeb.defaultAddress.hex,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n={}),zf.isFunction(r)?(o=r,r=this.tronWeb.defaultAddress.hex):zf.isObject(r)&&(n=r,r=this.tronWeb.defaultAddress.hex),!o)return this.injectPromise(this.updateEnergyLimit,e,t,r,n);if(this.validator.notValid([{name:"owner",type:"address",value:r},{name:"contract",type:"address",value:e},{name:"originEnergyLimit",type:"integer",value:t,gte:0,lte:1e7}],o))return;const s={owner_address:Yf(r),contract_address:Yf(e),origin_energy_limit:t},i=rg(n);tg(this.tronWeb,"UpdateEnergyLimitContract",s,n?.permissionId,i).then((e=>o(null,e))).catch((e=>o(e)))}checkPermissions(e,t){if(e){if(e.type!==t||!e.permission_name||!zf.isString(e.permission_name)||!zf.isInteger(e.threshold)||e.threshold<1||!e.keys)return!1;for(let r of e.keys)if(!this.tronWeb.isAddress(r.address)||!zf.isInteger(r.weight)||r.weight>e.threshold||r.weight<1||2===t&&!e.operations)return!1}return!0}updateAccountPermissions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(zf.isFunction(o)&&(s=o,o={}),zf.isFunction(n)&&(s=n,n=!1),zf.isFunction(r)&&(s=r,r=n=!1),zf.isFunction(t)&&(s=t,t=r=n=!1),!s)return this.injectPromise(this.updateAccountPermissions,e,t,r,n,o);if(!this.tronWeb.isAddress(e))return s("Invalid ownerAddress provided");if(!this.checkPermissions(t,0))return s("Invalid ownerPermissions provided");if(!this.checkPermissions(r,1))return s("Invalid witnessPermissions provided");Array.isArray(n)||(n=[n]);for(let e of n)if(!this.checkPermissions(e,2))return s("Invalid activesPermissions provided");const i={owner_address:Yf(e)};if(t){const e=Qf(t);"type"in e&&delete e.type,i.owner=e}if(r){const e=Qf(r);e.type="Witness",i.witness=e}if(n){const e=Qf(n);e.forEach((e=>{e.type="Active"})),i.actives=e}const a=rg(o);tg(this.tronWeb,"AccountPermissionUpdateContract",i,o?.permissionId,a).then((e=>s(null,e))).catch((e=>s(e)))}async newTxID(e,t,r){if(zf.isFunction(t)&&(r=t,t={}),!r)return this.injectPromise(this.newTxID,e,t);if(t?.txLocal){const t=e.raw_data.contract[0];tg(this.tronWeb,t.type,t.parameter.value,t.Permission_id,{fee_limit:e.raw_data.fee_limit,data:e.raw_data.data,ref_block_bytes:e.raw_data.ref_block_bytes,ref_block_hash:e.raw_data.ref_block_hash,expiration:e.raw_data.expiration,timestamp:e.raw_data.timestamp}).then((t=>{t.signature=e.signature,t.visible=e.visible,r(null,t)})).catch((e=>r("Error generating a new transaction id.")))}else this.tronWeb.fullNode.request("wallet/getsignweight",e,"post").then((t=>("boolean"==typeof e.visible&&(t.transaction.transaction.visible=e.visible),function(e,t,r,n){return"function"==typeof t&&(n=t,t=null),e.Error?n(e.Error):e.result&&e.result.message?n(Jf.tronWeb.toUtf8(e.result.message)):yf(e,t,r)?n(null,e):n("Invalid transaction")}(t.transaction.transaction,{...e.raw_data.contract[0].parameter.value,Permission_id:e.raw_data.contract[0].Permission_id},{data:e.raw_data.data,fee_limit:e.raw_data.fee_limit},r)))).catch((e=>r("Error generating a new transaction id.")))}async alterTransaction(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!r)return this.injectPromise(this.alterTransaction,e,t);if(e.signature)return r("You can not extend the expiration of a signed transaction.");if(t.data){if("hex"!==t.dataFormat&&(t.data=this.tronWeb.toHex(t.data)),t.data=t.data.replace(/^0x/,""),0===t.data.length)return r("Invalid data provided");e.raw_data.data=t.data}if(t.extension){if(t.extension=parseInt(1e3*t.extension),isNaN(t.extension)||e.raw_data.expiration+t.extension<=Date.now()+3e3)return r("Invalid extension provided");e.raw_data.expiration+=t.extension}this.newTxID(e,{txLocal:t.txLocal},r)}async extendExpiration(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),!n)return this.injectPromise(this.extendExpiration,e,t,r);this.alterTransaction(e,{extension:t,txLocal:r?.txLocal},n)}async addUpdateData(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"utf8",n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n={}),zf.isFunction(r)?(o=r,r="utf8"):zf.isObject(r)&&(n=r,r="utf8"),!o)return this.injectPromise(this.addUpdateData,e,t,r,n);this.alterTransaction(e,{data:t,dataFormat:r,txLocal:n?.txLocal},o)}}const og="TRON Signed Message:\n32",sg="Ethereum Signed Message:\n32";function ig(e){return bg.address.toHex(e)}class ag{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e||!e instanceof bg)throw new Error("Expected instance of TronWeb");this.tronWeb=e,this.injectPromise=Zf()(this),this.cache={contracts:{}},this.validator=new qf(e)}_parseToken(e){return{...e,name:this.tronWeb.toUtf8(e.name),abbr:e.abbr&&this.tronWeb.toUtf8(e.abbr),description:e.description&&this.tronWeb.toUtf8(e.description),url:e.url&&this.tronWeb.toUtf8(e.url)}}getCurrentBlock(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return this.injectPromise(this.getCurrentBlock);this.tronWeb.fullNode.request("wallet/getnowblock").then((t=>{e(null,t)})).catch((t=>e(t)))}getConfirmedCurrentBlock(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return this.injectPromise(this.getConfirmedCurrentBlock);this.tronWeb.solidityNode.request("walletsolidity/getnowblock").then((t=>{e(null,t)})).catch((t=>e(t)))}getBlock(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultBlock,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return zf.isFunction(e)&&(t=e,e=this.tronWeb.defaultBlock),t?!1===e?t("No block identifier provided"):("earliest"==e&&(e=0),"latest"==e?this.getCurrentBlock(t):isNaN(e)&&zf.isHex(e)?this.getBlockByHash(e,t):void this.getBlockByNumber(e,t)):this.injectPromise(this.getBlock,e)}getBlockByHash(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return this.injectPromise(this.getBlockByHash,e);this.tronWeb.fullNode.request("wallet/getblockbyid",{value:e},"post").then((e=>{if(!Object.keys(e).length)return t("Block not found");t(null,e)})).catch((e=>t(e)))}getBlockByNumber(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?!zf.isInteger(e)||e<0?t("Invalid block number provided"):void this.tronWeb.fullNode.request("wallet/getblockbynum",{num:parseInt(e)},"post").then((e=>{if(!Object.keys(e).length)return t("Block not found");t(null,e)})).catch((e=>t(e))):this.injectPromise(this.getBlockByNumber,e)}getBlockTransactionCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultBlock,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(zf.isFunction(e)&&(t=e,e=this.tronWeb.defaultBlock),!t)return this.injectPromise(this.getBlockTransactionCount,e);this.getBlock(e).then((e=>{let{transactions:r=[]}=e;t(null,r.length)})).catch((e=>t(e)))}getTransactionFromBlock(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultBlock,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t=0),zf.isFunction(e)&&(r=e,e=this.tronWeb.defaultBlock),!r)return this.injectPromise(this.getTransactionFromBlock,e,t);this.getBlock(e).then((e=>{let{transactions:n=!1}=e;n?"number"==typeof t?t>=0&&tr(e)))}getTransaction(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return this.injectPromise(this.getTransaction,e);this.tronWeb.fullNode.request("wallet/gettransactionbyid",{value:e},"post").then((e=>{if(!Object.keys(e).length)return t("Transaction not found");t(null,e)})).catch((e=>t(e)))}getConfirmedTransaction(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return this.injectPromise(this.getConfirmedTransaction,e);this.tronWeb.solidityNode.request("walletsolidity/gettransactionbyid",{value:e},"post").then((e=>{if(!Object.keys(e).length)return t("Transaction not found");t(null,e)})).catch((e=>t(e)))}getUnconfirmedTransactionInfo(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._getTransactionInfoById(e,{confirmed:!1},t)}getTransactionInfo(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._getTransactionInfoById(e,{confirmed:!0},t)}_getTransactionInfoById(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!r)return this.injectPromise(this._getTransactionInfoById,e,t);this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/gettransactioninfobyid`,{value:e},"post").then((e=>{r(null,e)})).catch((e=>r(e)))}getTransactionsToAddress(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return zf.isFunction(r)&&(n=r,r=0),zf.isFunction(t)&&(n=t,t=30),n?(e=this.tronWeb.address.toHex(e),this.getTransactionsRelated(e,"to",t,r,n)):this.injectPromise(this.getTransactionsToAddress,e,t,r)}getTransactionsFromAddress(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return zf.isFunction(r)&&(n=r,r=0),zf.isFunction(t)&&(n=t,t=30),n?(e=this.tronWeb.address.toHex(e),this.getTransactionsRelated(e,"from",t,r,n)):this.injectPromise(this.getTransactionsFromAddress,e,t,r)}async getTransactionsRelated(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n=0),zf.isFunction(r)&&(o=r,r=30),zf.isFunction(t)&&(o=t,t="all"),zf.isFunction(e)&&(o=e,e=this.tronWeb.defaultAddress.hex),!o)return this.injectPromise(this.getTransactionsRelated,e,t,r,n);if(!["to","from","all"].includes(t))return o('Invalid direction provided: Expected "to", "from" or "all"');if("all"==t)try{const[t,s]=await Promise.all([this.getTransactionsRelated(e,"from",r,n),this.getTransactionsRelated(e,"to",r,n)]);return o(null,[...t.map((e=>(e.direction="from",e))),...s.map((e=>(e.direction="to",e)))].sort(((e,t)=>t.raw_data.timestamp-e.raw_data.timestamp)))}catch(e){return o(e)}return this.tronWeb.isAddress(e)?!zf.isInteger(r)||r<0||n&&r<1?o("Invalid limit provided"):!zf.isInteger(n)||n<0?o("Invalid offset provided"):(e=this.tronWeb.address.toHex(e),void this.tronWeb.solidityNode.request(`walletextension/gettransactions${t}this`,{account:{address:e},offset:n,limit:r},"post").then((e=>{let{transaction:t}=e;o(null,t)})).catch((e=>o(e)))):o("Invalid address provided")}getAccount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return zf.isFunction(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),t?this.tronWeb.isAddress(e)?(e=this.tronWeb.address.toHex(e),void this.tronWeb.solidityNode.request("walletsolidity/getaccount",{address:e},"post").then((e=>{t(null,e)})).catch((e=>t(e)))):t("Invalid address provided"):this.injectPromise(this.getAccount,e)}getAccountById(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return this.injectPromise(this.getAccountById,e);this.getAccountInfoById(e,{confirmed:!0},t)}getAccountInfoById(e,t,r){this.validator.notValid([{name:"accountId",type:"hex",value:e},{name:"accountId",type:"string",lte:32,gte:8,value:e}],r)||(e.startsWith("0x")&&(e=e.slice(2)),this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/getaccountbyid`,{account_id:e},"post").then((e=>{r(null,e)})).catch((e=>r(e))))}getBalance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(zf.isFunction(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),!t)return this.injectPromise(this.getBalance,e);this.getAccount(e).then((e=>{let{balance:r=0}=e;t(null,r)})).catch((e=>t(e)))}getUnconfirmedAccount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return zf.isFunction(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),t?this.tronWeb.isAddress(e)?(e=this.tronWeb.address.toHex(e),void this.tronWeb.fullNode.request("wallet/getaccount",{address:e},"post").then((e=>{t(null,e)})).catch((e=>t(e)))):t("Invalid address provided"):this.injectPromise(this.getUnconfirmedAccount,e)}getUnconfirmedAccountById(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return this.injectPromise(this.getUnconfirmedAccountById,e);this.getAccountInfoById(e,{confirmed:!1},t)}getUnconfirmedBalance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(zf.isFunction(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),!t)return this.injectPromise(this.getUnconfirmedBalance,e);this.getUnconfirmedAccount(e).then((e=>{let{balance:r=0}=e;t(null,r)})).catch((e=>t(e)))}getBandwidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return zf.isFunction(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),t?this.tronWeb.isAddress(e)?(e=this.tronWeb.address.toHex(e),void this.tronWeb.fullNode.request("wallet/getaccountnet",{address:e},"post").then((e=>{let{freeNetUsed:r=0,freeNetLimit:n=0,NetUsed:o=0,NetLimit:s=0}=e;t(null,n-r+(s-o))})).catch((e=>t(e)))):t("Invalid address provided"):this.injectPromise(this.getBandwidth,e)}getTokensIssuedByAddress(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return zf.isFunction(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),t?this.tronWeb.isAddress(e)?(e=this.tronWeb.address.toHex(e),void this.tronWeb.fullNode.request("wallet/getassetissuebyaccount",{address:e},"post").then((e=>{let{assetIssue:r=!1}=e;if(!r)return t(null,{});const n=r.map((e=>this._parseToken(e))).reduce(((e,t)=>(e[t.name]=t,e)),{});t(null,n)})).catch((e=>t(e)))):t("Invalid address provided"):this.injectPromise(this.getTokensIssuedByAddress,e)}getTokenFromID(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?(zf.isInteger(e)&&(e=e.toString()),zf.isString(e)&&e.length?void this.tronWeb.fullNode.request("wallet/getassetissuebyname",{value:this.tronWeb.fromUtf8(e)},"post").then((e=>{if(!e.name)return t("Token does not exist");t(null,this._parseToken(e))})).catch((e=>t(e))):t("Invalid token ID provided")):this.injectPromise(this.getTokenFromID,e)}listNodes(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return this.injectPromise(this.listNodes);this.tronWeb.fullNode.request("wallet/listnodes").then((t=>{let{nodes:r=[]}=t;e(null,r.map((e=>{let{address:{host:t,port:r}}=e;return`${this.tronWeb.toUtf8(t)}:${r}`})))})).catch((t=>e(t)))}getBlockRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return zf.isFunction(t)&&(r=t,t=30),zf.isFunction(e)&&(r=e,e=0),r?!zf.isInteger(e)||e<0?r("Invalid start of range provided"):!zf.isInteger(t)||t100?r("Invalid range size, which should be no more than 100."):void this.tronWeb.fullNode.request("wallet/getblockbylimitnext",{startNum:parseInt(e),endNum:parseInt(t)+1},"post").then((e=>{let{block:t=[]}=e;r(null,t)})).catch((e=>r(e))):this.injectPromise(this.getBlockRange,e,t)}listSuperRepresentatives(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return this.injectPromise(this.listSuperRepresentatives);this.tronWeb.fullNode.request("wallet/listwitnesses").then((t=>{let{witnesses:r=[]}=t;e(null,r)})).catch((t=>e(t)))}listTokens(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return zf.isFunction(t)&&(r=t,t=0),zf.isFunction(e)&&(r=e,e=0),r?!zf.isInteger(e)||e<0||t&&e<1?r("Invalid limit provided"):!zf.isInteger(t)||t<0?r("Invalid offset provided"):e?void this.tronWeb.fullNode.request("wallet/getpaginatedassetissuelist",{offset:parseInt(t),limit:parseInt(e)},"post").then((e=>{let{assetIssue:t=[]}=e;r(null,t.map((e=>this._parseToken(e))))})).catch((e=>r(e))):this.tronWeb.fullNode.request("wallet/getassetissuelist").then((e=>{let{assetIssue:t=[]}=e;r(null,t.map((e=>this._parseToken(e))))})).catch((e=>r(e))):this.injectPromise(this.listTokens,e,t)}timeUntilNextVoteCycle(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return this.injectPromise(this.timeUntilNextVoteCycle);this.tronWeb.fullNode.request("wallet/getnextmaintenancetime").then((t=>{let{num:r=-1}=t;if(-1==r)return e("Failed to get time until next vote cycle");e(null,Math.floor(r/1e3))})).catch((t=>e(t)))}getContract(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?this.tronWeb.isAddress(e)?void(this.cache.contracts[e]?t(null,this.cache.contracts[e]):(e=this.tronWeb.address.toHex(e),this.tronWeb.fullNode.request("wallet/getcontract",{value:e}).then((r=>{if(r.Error)return t("Contract does not exist");this.cache.contracts[e]=r,t(null,r)})).catch((e=>t(e))))):t("Invalid contract address provided"):this.injectPromise(this.getContract,e)}ecRecover(e){return ag.ecRecover(e)}static ecRecover(e){if(!gf(e))throw new Error("Invalid transaction");if(!e.signature?.length)throw new Error("Transaction is not signed");if(1===e.signature.length){const t=pd(e.txID,e.signature[0]);return bg.address.fromHex(t)}return e.signature.map((t=>{const r=pd(e.txID,t);return bg.address.fromHex(r)}))}async verifyMessage(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.tronWeb.defaultAddress.base58,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return zf.isFunction(r)&&(o=r,r=this.tronWeb.defaultAddress.base58,n=!0),zf.isFunction(n)&&(o=n,n=!0),o?zf.isHex(e)?ag.verifySignature(e,r,t,n)?o(null,!0):void o("Signature does not match"):o("Expected hex message input"):this.injectPromise(this.verifyMessage,e,t,r,n)}static verifySignature(e,t,r){let n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];e=e.replace(/^0x/,"");const o=[...Xn(n?og:sg),...zf.code.hexStr2byteArray(e)],s=$s(To(new Uint8Array(o)),$r.from(`0x${r.replace(/^0x/,"")}`)),i=Rt+s.substr(2);return bg.address.fromHex(i)==bg.address.fromHex(t)}verifyMessageV2(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),!n)return this.injectPromise(this.verifyMessageV2,e,t,r);try{n(null,ag.verifyMessageV2(e,t))}catch(e){n(e)}}static verifyMessageV2(e,t){return zf.message.verifyMessage(e,t)}verifyTypedData(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.tronWeb.defaultAddress.base58,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return zf.isFunction(o)&&(s=o,o=this.tronWeb.defaultAddress.base58),s?ag.verifyTypedData(e,t,r,n,o)?s(null,!0):void s("Signature does not match"):this.injectPromise(this.verifyTypedData,e,t,r,n,o)}static verifyTypedData(e,t,r,n,o){const s=$s(zf._TypedDataEncoder.hash(e,t,r),$r.from(`0x${n.replace(/^0x/,"")}`)),i=Rt+s.substr(2);return bg.address.fromHex(i)==bg.address.fromHex(o)}async sign(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultPrivateKey,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n=!1),zf.isFunction(r)&&(o=r,r=!0,n=!1),zf.isFunction(t)&&(o=t,t=this.tronWeb.defaultPrivateKey,r=!0,n=!1),!o)return this.injectPromise(this.sign,e,t,r,n);if(zf.isString(e)){if(!zf.isHex(e))return o("Expected hex message input");try{return o(null,ag.signString(e,t,r))}catch(e){o(e)}}if(!zf.isObject(e))return o("Invalid transaction provided");if(!n&&e.signature)return o("Transaction is already signed");try{if(!n){if(this.tronWeb.address.toHex(this.tronWeb.address.fromPrivateKey(t)).toLowerCase()!==this.tronWeb.address.toHex(e.raw_data.contract[0].parameter.value.owner_address))return o("Private key does not match address in transaction");if(!gf(e))return o("Invalid transaction")}return o(null,zf.crypto.signTransaction(t,e))}catch(e){o(e)}}static signString(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];e=e.replace(/^0x/,"");const n=`0x${t.replace(/^0x/,"")}`,o=new zs(n),s=[...Xn(r?og:sg),...zf.code.hexStr2byteArray(e)],i=To(new Uint8Array(s)),a=o.sign(i);return["0x",a.r.substring(2),a.s.substring(2),Number(a.v).toString(16)].join("")}signMessageV2(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultPrivateKey,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),zf.isFunction(t)&&(n=t,t=this.tronWeb.defaultPrivateKey),!n)return this.injectPromise(this.signMessageV2,e,t);try{return n(null,ag.signMessageV2(e,t))}catch(e){n(e)}}static signMessageV2(e,t){return zf.message.signMessage(e,t)}_signTypedData(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.tronWeb.defaultPrivateKey,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n=this.tronWeb.defaultPrivateKey),!o)return this.injectPromise(this._signTypedData,e,t,r,n);try{return o(null,ag._signTypedData(e,t,r,n))}catch(e){o(e)}}static _signTypedData(e,t,r,n){return zf.crypto._signTypedData(e,t,r,n)}async multiSign(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultPrivateKey,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r=0),zf.isFunction(t)&&(n=t,t=this.tronWeb.defaultPrivateKey,r=0),!n)return this.injectPromise(this.multiSign,e,t,r);if(!zf.isObject(e)||!e.raw_data||!e.raw_data.contract)return n("Invalid transaction provided");if(!e.raw_data.contract[0].Permission_id&&r>0){e.raw_data.contract[0].Permission_id=r;const o=this.tronWeb.address.toHex(this.tronWeb.address.fromPrivateKey(t)).toLowerCase(),s=await this.getSignWeight(e,r);if("PERMISSION_ERROR"===s.result.code)return n(s.result.message);let i=!1;if(s.permission.keys.map((e=>{e.address===o&&(i=!0)})),!i)return n(t+" has no permission to sign");if(s.approved_list&&-1!=s.approved_list.indexOf(o))return n(t+" already sign transaction");if(!s.transaction||!s.transaction.transaction)return n("Invalid transaction provided");e=s.transaction.transaction,r>0&&(e.raw_data.contract[0].Permission_id=r)}try{return gf(e)?n(null,zf.crypto.signTransaction(t,e)):n("Invalid transaction")}catch(e){n(e)}}async getApprovedList(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?zf.isObject(e)?void this.tronWeb.fullNode.request("wallet/getapprovedlist",e,"post").then((e=>{t(null,e)})).catch((e=>t(e))):t("Invalid transaction provided"):this.injectPromise(this.getApprovedList,e)}async getSignWeight(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return zf.isFunction(t)&&(r=t,t=void 0),r?zf.isObject(e)&&e.raw_data&&e.raw_data.contract?(zf.isInteger(t)?e.raw_data.contract[0].Permission_id=parseInt(t):"number"!=typeof e.raw_data.contract[0].Permission_id&&(e.raw_data.contract[0].Permission_id=0),zf.isObject(e)?void this.tronWeb.fullNode.request("wallet/getsignweight",e,"post").then((e=>{r(null,e)})).catch((e=>r(e))):r("Invalid transaction provided")):r("Invalid transaction provided"):this.injectPromise(this.getSignWeight,e,t)}sendRawTransaction(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return zf.isFunction(t)&&(r=t,t={}),r?zf.isObject(e)?zf.isObject(t)?e.signature&&zf.isArray(e.signature)?void this.tronWeb.fullNode.request("wallet/broadcasttransaction",e,"post").then((t=>{t.result&&(t.transaction=e),r(null,t)})).catch((e=>r(e))):r("Transaction is not signed"):r("Invalid options provided"):r("Invalid transaction provided"):this.injectPromise(this.sendRawTransaction,e,t)}sendHexTransaction(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t={}),!r)return this.injectPromise(this.sendHexTransaction,e,t);if(!zf.isHex(e))return r("Invalid hex transaction provided");if(!zf.isObject(t))return r("Invalid options provided");const n={transaction:e};this.tronWeb.fullNode.request("wallet/broadcasthex",n,"post").then((t=>{t.result&&(t.transaction=JSON.parse(t.transaction),t.hexTransaction=e),r(null,t)})).catch((e=>r(e)))}async sendTransaction(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),"string"==typeof r&&(r={privateKey:r}),!n)return this.injectPromise(this.sendTransaction,e,t,r);if(!this.tronWeb.isAddress(e))return n("Invalid recipient provided");if(!zf.isInteger(t)||t<=0)return n("Invalid amount provided");if(r={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...r},!r.privateKey&&!r.address)return n("Function requires either a private key or address to be set");try{const o=r.privateKey?this.tronWeb.address.fromPrivateKey(r.privateKey):r.address,s=await this.tronWeb.transactionBuilder.sendTrx(e,t,o),i=await this.sign(s,r.privateKey||void 0);return n(null,await this.sendRawTransaction(i))}catch(e){return n(e)}}async sendToken(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(n)&&(o=n,n={}),"string"==typeof n&&(n={privateKey:n}),!o)return this.injectPromise(this.sendToken,e,t,r,n);if(!this.tronWeb.isAddress(e))return o("Invalid recipient provided");if(!zf.isInteger(t)||t<=0)return o("Invalid amount provided");if(zf.isInteger(r)&&(r=r.toString()),!zf.isString(r))return o("Invalid token ID provided");if(n={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...n},!n.privateKey&&!n.address)return o("Function requires either a private key or address to be set");try{const s=n.privateKey?this.tronWeb.address.fromPrivateKey(n.privateKey):n.address,i=await this.tronWeb.transactionBuilder.sendToken(e,t,r,s),a=await this.sign(i,n.privateKey||void 0);return o(null,await this.sendRawTransaction(a))}catch(e){return o(e)}}async freezeBalance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"BANDWIDTH",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(zf.isFunction(o)&&(s=o,o=void 0),zf.isFunction(t)&&(s=t,t=3),zf.isFunction(r)&&(s=r,r="BANDWIDTH"),zf.isFunction(n)&&(s=n,n={}),"string"==typeof n&&(n={privateKey:n}),!s)return this.injectPromise(this.freezeBalance,e,t,r,n,o);if(!["BANDWIDTH","ENERGY"].includes(r))return s('Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"');if(!zf.isInteger(e)||e<=0)return s("Invalid amount provided");if(!zf.isInteger(t)||t<3)return s("Invalid duration provided, minimum of 3 days");if(n={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...n},!n.privateKey&&!n.address)return s("Function requires either a private key or address to be set");try{const i=n.privateKey?this.tronWeb.address.fromPrivateKey(n.privateKey):n.address,a=await this.tronWeb.transactionBuilder.freezeBalance(e,t,r,i,o),u=await this.sign(a,n.privateKey||void 0);return s(null,await this.sendRawTransaction(u))}catch(e){return s(e)}}async unfreezeBalance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"BANDWIDTH",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r=void 0),zf.isFunction(e)&&(n=e,e="BANDWIDTH"),zf.isFunction(t)&&(n=t,t={}),"string"==typeof t&&(t={privateKey:t}),!n)return this.injectPromise(this.unfreezeBalance,e,t,r);if(!["BANDWIDTH","ENERGY"].includes(e))return n('Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"');if(t={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...t},!t.privateKey&&!t.address)return n("Function requires either a private key or address to be set");try{const o=t.privateKey?this.tronWeb.address.fromPrivateKey(t.privateKey):t.address,s=await this.tronWeb.transactionBuilder.unfreezeBalance(e,o,r),i=await this.sign(s,t.privateKey||void 0);return n(null,await this.sendRawTransaction(i))}catch(e){return n(e)}}async updateAccount(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t={}),"string"==typeof t&&(t={privateKey:t}),!r)return this.injectPromise(this.updateAccount,e,t);if(!zf.isString(e)||!e.length)return r("Name must be a string");if(t={privateKey:this.tronWeb.defaultPrivateKey,address:this.tronWeb.defaultAddress.hex,...t},!t.privateKey&&!t.address)return r("Function requires either a private key or address to be set");try{const n=t.privateKey?this.tronWeb.address.fromPrivateKey(t.privateKey):t.address,o=await this.tronWeb.transactionBuilder.updateAccount(e,n),s=await this.sign(o,t.privateKey||void 0);return r(null,await this.sendRawTransaction(s))}catch(e){return r(e)}}signMessage(){return this.sign(...arguments)}sendAsset(){return this.sendToken(...arguments)}send(){return this.sendTransaction(...arguments)}sendTrx(){return this.sendTransaction(...arguments)}broadcast(){return this.sendRawTransaction(...arguments)}broadcastHex(){return this.sendHexTransaction(...arguments)}signTransaction(){return this.sign(...arguments)}getProposal(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?!zf.isInteger(e)||e<0?t("Invalid proposalID provided"):void this.tronWeb.fullNode.request("wallet/getproposalbyid",{id:parseInt(e)},"post").then((e=>{t(null,e)})).catch((e=>t(e))):this.injectPromise(this.getProposal,e)}listProposals(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return this.injectPromise(this.listProposals);this.tronWeb.fullNode.request("wallet/listproposals",{},"post").then((t=>{let{proposals:r=[]}=t;e(null,r)})).catch((t=>e(t)))}getChainParameters(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return this.injectPromise(this.getChainParameters);this.tronWeb.fullNode.request("wallet/getchainparameters",{},"post").then((t=>{let{chainParameter:r=[]}=t;e(null,r)})).catch((t=>e(t)))}getAccountResources(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?this.tronWeb.isAddress(e)?void this.tronWeb.fullNode.request("wallet/getaccountresource",{address:this.tronWeb.address.toHex(e)},"post").then((e=>{t(null,e)})).catch((e=>t(e))):t("Invalid address provided"):this.injectPromise(this.getAccountResources,e)}getDelegatedResourceV2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultAddress.hex,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{confirmed:!0},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return zf.isFunction(r)&&(n=r,r={confirmed:!0}),zf.isFunction(t)&&(n=t,t=this.tronWeb.defaultAddress.hex),zf.isFunction(e)&&(n=e,e=this.tronWeb.defaultAddress.hex,t=this.tronWeb.defaultAddress.hex),n?this.tronWeb.isAddress(e)&&this.tronWeb.isAddress(t)?void this.tronWeb[r.confirmed?"solidityNode":"fullNode"].request(`wallet${r.confirmed?"solidity":""}/getdelegatedresourcev2`,{fromAddress:ig(e),toAddress:ig(t)},"post").then((e=>{n(null,e)})).catch((e=>n(e))):n("Invalid address provided"):this.injectPromise(this.getDelegatedResourceV2,e,t,r)}getDelegatedResourceAccountIndexV2(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{confirmed:!0},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return zf.isFunction(t)&&(r=t,t={confirmed:!0}),zf.isFunction(e)&&(r=e,e=this.tronWeb.defaultAddress.hex),r?this.tronWeb.isAddress(e)?void this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/getdelegatedresourceaccountindexv2`,{value:ig(e)},"post").then((e=>{r(null,e)})).catch((e=>r(e))):r("Invalid address provided"):this.injectPromise(this.getDelegatedResourceAccountIndexV2,e,t)}getCanDelegatedMaxSize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BANDWIDTH",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{confirmed:!0},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return zf.isFunction(r)&&(n=r,r={confirmed:!0}),zf.isFunction(t)&&(n=t,t="BANDWIDTH"),zf.isFunction(e)&&(n=e,e=this.tronWeb.defaultAddress.hex),n?this.tronWeb.isAddress(e)?void(this.validator.notValid([{name:"resource",type:"resource",value:t,msg:'Invalid resource provided: Expected "BANDWIDTH" or "ENERGY"'}],n)||this.tronWeb[r.confirmed?"solidityNode":"fullNode"].request(`wallet${r.confirmed?"solidity":""}/getcandelegatedmaxsize`,{owner_address:ig(e),type:"ENERGY"===t?1:0},"post").then((e=>{n(null,e)})).catch((e=>n(e)))):n("Invalid address provided"):this.injectPromise(this.getCanDelegatedMaxSize,e,t,r)}getAvailableUnfreezeCount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{confirmed:!0},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return zf.isFunction(t)&&(r=t,t={confirmed:!0}),zf.isFunction(e)&&(r=e,e=this.tronWeb.defaultAddress.hex),r?this.tronWeb.isAddress(e)?void this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/getavailableunfreezecount`,{owner_address:ig(e)},"post").then((e=>{r(null,e)})).catch((e=>r(e))):r("Invalid address provided"):this.injectPromise(this.getAvailableUnfreezeCount,e,t)}getCanWithdrawUnfreezeAmount(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{confirmed:!0},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return zf.isFunction(r)&&(n=r,r={confirmed:!0}),zf.isFunction(t)&&(n=t,t=Date.now()),zf.isFunction(e)&&(n=e,e=this.tronWeb.defaultAddress.hex),n?this.tronWeb.isAddress(e)?!zf.isInteger(t)||t<0?n("Invalid timestamp provided"):void this.tronWeb[r.confirmed?"solidityNode":"fullNode"].request(`wallet${r.confirmed?"solidity":""}/getcanwithdrawunfreezeamount`,{owner_address:ig(e),timestamp:t},"post").then((e=>{n(null,e)})).catch((e=>n(e))):n("Invalid address provided"):this.injectPromise(this.getCanWithdrawUnfreezeAmount,e,t,r)}getExchangeByID(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?!zf.isInteger(e)||e<0?t("Invalid exchangeID provided"):void this.tronWeb.fullNode.request("wallet/getexchangebyid",{id:e},"post").then((e=>{t(null,e)})).catch((e=>t(e))):this.injectPromise(this.getExchangeByID,e)}listExchanges(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return this.injectPromise(this.listExchanges);this.tronWeb.fullNode.request("wallet/listexchanges",{},"post").then((t=>{let{exchanges:r=[]}=t;e(null,r)}),"post").catch((t=>e(t)))}listExchangesPaginated(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t=0),zf.isFunction(e)&&(r=e,e=10),!r)return this.injectPromise(this.listExchangesPaginated,e,t);this.tronWeb.fullNode.request("wallet/getpaginatedexchangelist",{limit:e,offset:t},"post").then((e=>{let{exchanges:t=[]}=e;r(null,t)})).catch((e=>r(e)))}getNodeInfo(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e)return this.injectPromise(this.getNodeInfo);this.tronWeb.fullNode.request("wallet/getnodeinfo",{},"post").then((t=>{e(null,t)}),"post").catch((t=>e(t)))}getTokenListByName(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?(zf.isInteger(e)&&(e=e.toString()),zf.isString(e)&&e.length?void this.tronWeb.fullNode.request("wallet/getassetissuelistbyname",{value:this.tronWeb.fromUtf8(e)},"post").then((e=>{if(Array.isArray(e.assetIssue))t(null,e.assetIssue.map((e=>this._parseToken(e))));else if(!e.name)return t("Token does not exist");t(null,this._parseToken(e))})).catch((e=>t(e))):t("Invalid token ID provided")):this.injectPromise(this.getTokenListByName,e)}getTokenByID(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?(zf.isInteger(e)&&(e=e.toString()),zf.isString(e)&&e.length?void this.tronWeb.fullNode.request("wallet/getassetissuebyid",{value:e},"post").then((e=>{if(!e.name)return t("Token does not exist");t(null,this._parseToken(e))})).catch((e=>t(e))):t("Invalid token ID provided")):this.injectPromise(this.getTokenByID,e)}async getReward(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.confirmed=!0,this._getReward(e,t,r)}async getUnconfirmedReward(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.confirmed=!1,this._getReward(e,t,r)}async getBrokerage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.confirmed=!0,this._getBrokerage(e,t,r)}async getUnconfirmedBrokerage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.confirmed=!1,this._getBrokerage(e,t,r)}async _getReward(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t={}),zf.isFunction(e)?(r=e,e=this.tronWeb.defaultAddress.hex):zf.isObject(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),!r)return this.injectPromise(this._getReward,e,t);if(this.validator.notValid([{name:"origin",type:"address",value:e}],r))return;const n={address:ig(e)};this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/getReward`,n,"post").then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.reward)return r("Not found.");r(null,e.reward)})).catch((e=>r(e)))}async _getBrokerage(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.tronWeb.defaultAddress.hex,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t={}),zf.isFunction(e)?(r=e,e=this.tronWeb.defaultAddress.hex):zf.isObject(e)&&(t=e,e=this.tronWeb.defaultAddress.hex),!r)return this.injectPromise(this._getBrokerage,e,t);if(this.validator.notValid([{name:"origin",type:"address",value:e}],r))return;const n={address:ig(e)};this.tronWeb[t.confirmed?"solidityNode":"fullNode"].request(`wallet${t.confirmed?"solidity":""}/getBrokerage`,n,"post").then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.brokerage)return r("Not found.");r(null,e.brokerage)})).catch((e=>r(e)))}async getBandwidthPrices(){return this.tronWeb.fullNode.request("wallet/getbandwidthprices",{},"post").then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.prices)throw new Error("Not found.");return e.prices}))}async getEnergyPrices(){return this.tronWeb.fullNode.request("wallet/getenergyprices",{},"post").then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(void 0===e.prices)throw new Error("Not found.");return e.prices}))}}const ug=(e,t)=>mp(e,t);class cg{constructor(e,t){this.tronWeb=e.tronWeb,this.contract=e,this.abi=t,this.name=t.name||(t.name=t.type),this.inputs=t.inputs||[],this.outputs=t.outputs||[],this.functionSelector=(e=>{if(e.stateMutability=e.stateMutability?e.stateMutability.toLowerCase():"nonpayable",e.type=e.type?e.type.toLowerCase():"","fallback"===e.type||"receive"===e.type)return"0x";let t=new zf.ethersUtils.Interface([e]);return"event"===e.type?t.getEvent(e.name).format(zf.ethersUtils.FormatTypes.sighash):t.getFunction(e.name).format(zf.ethersUtils.FormatTypes.sighash)})(t),this.signature=this.tronWeb.sha3(this.functionSelector,!1).slice(0,8),this.injectPromise=Zf()(this),this.defaultOptions={feeLimit:this.tronWeb.feeLimit,callValue:0,userFeePercentage:100,shouldPollResponse:!1}}decodeInput(e){return ug(this.inputs,"0x"+e)}onMethod(){var e=this;let t="";if(this.abi&&!/event/i.test(this.abi.type)){for(var r=arguments.length,n=new Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return zf.isFunction(r)&&(n=r,r={}),r={...r,rawParameter:t},e._call([],[],r,n)},send:function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.tronWeb.defaultPrivateKey,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return zf.isFunction(n)&&(o=n,n=e.tronWeb.defaultPrivateKey),zf.isFunction(r)&&(o=r,r={}),r={...r,rawParameter:t},e._send([],[],r,n,o)},watch:function(){return e._watch(...arguments)}}}async _call(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(zf.isFunction(r)&&(n=r,r={}),!n)return this.injectPromise(this._call,e,t,r);if(e.length!==t.length)return n("Invalid argument count provided");if(!this.contract.address)return n("Smart contract is missing address");if(!this.contract.deployed)return n("Calling smart contracts requires you to load the contract first");const{stateMutability:o}=this.abi;if(!["pure","view"].includes(o.toLowerCase()))return n(`Methods with state mutability "${o}" must use send()`);r={...this.defaultOptions,from:this.tronWeb.defaultAddress.hex,...r,_isConstant:!0};const s=t.map(((t,r)=>({type:e[r],value:t})));this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,r,s,!!r.from&&this.tronWeb.address.toHex(r.from),((e,t)=>{if(e)return n(e);if(!zf.hasProperty(t,"constant_result"))return n("Failed to execute");try{const e=t.constant_result[0].length;if(0===e||e%64==8){let r="The call has been reverted or has thrown an error.";if(0!==e){r+=" Error message: ";let n="",o=t.constant_result[0].substring(8);for(let t=0;t2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.tronWeb.defaultPrivateKey,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(zf.isFunction(o)&&(s=o,o=this.tronWeb.defaultPrivateKey),zf.isFunction(n)&&(s=n,n={}),!s)return this.injectPromise(this._send,e,t,n,o);if(e.length!==t.length)throw new Error("Invalid argument count provided");if(!this.contract.address)return s("Smart contract is missing address");if(!this.contract.deployed)return s("Calling smart contracts requires you to load the contract first");const{stateMutability:i}=this.abi;if(["pure","view"].includes(i.toLowerCase()))return s(`Methods with state mutability "${i}" must use call()`);["payable"].includes(i.toLowerCase())||(n.callValue=0),n={...this.defaultOptions,from:this.tronWeb.defaultAddress.hex,...n};const a=t.map(((t,r)=>({type:e[r],value:t})));try{const e=o?this.tronWeb.address.fromPrivateKey(o):this.tronWeb.defaultAddress.base58,t=await this.tronWeb.transactionBuilder.triggerSmartContract(this.contract.address,this.functionSelector,n,a,this.tronWeb.address.toHex(e));if(!t.result||!t.result.result)return s("Unknown error: "+JSON.stringify(t,null,2));const i=await this.tronWeb.trx.sign(t.transaction,o);if(!i.signature)return s(o?"Invalid private key provided":"Transaction was not signed properly");const u=await this.tronWeb.trx.sendRawTransaction(i);if(u.code){const e={error:u.code,message:u.code};return u.message&&(e.message=this.tronWeb.toUtf8(u.message)),s(e)}if(!n.shouldPollResponse)return s(null,i.txID);const c=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(e===(n.pollTimes||20))return s({error:"Cannot find result in solidity node",transaction:i});const t=await r.tronWeb.trx.getTransactionInfo(i.txID);if(!Object.keys(t).length)return setTimeout((()=>{c(e+1)}),3e3);if(t.result&&"FAILED"===t.result)return s({error:r.tronWeb.toUtf8(t.resMessage),transaction:i,output:t});if(!zf.hasProperty(t,"contractResult"))return s({error:"Failed to execute: "+JSON.stringify(t,null,2),transaction:i,output:t});if(n.rawResponse)return s(null,t);let o=ug(r.abi,"0x"+t.contractResult[0]);return 1===o.length&&1===Object.keys(o).length&&(o=o[0]),n.keepTxID?s(null,[i.txID,o]):s(null,o)};c()}catch(e){return s(e)}}async _watch(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(zf.isFunction(e)&&(t=e,e={}),!zf.isFunction(t))throw new Error("Expected callback to be provided");if(!this.contract.address)return t("Smart contract is missing address");if(!this.abi.type||!/event/i.test(this.abi.type))return t("Invalid method type for event watching");if(!this.tronWeb.eventServer)return t("No event server configured");let r=!1,n=!1,o=Date.now()-1e3;const s=async()=>{try{const t={since:o,eventName:this.name,sort:"block_timestamp",blockNumber:"latest",filters:e.filters};e.size&&(t.size=e.size),e.resourceNode&&(/full/i.test(e.resourceNode)?t.onlyUnconfirmed=!0:t.onlyConfirmed=!0);const r=await this.tronWeb.event.getEventsByContractAddress(this.contract.address,t),[s]=r.sort(((e,t)=>t.block-e.block)),i=r.filter(((t,o)=>(!e.resourceNode||!t.resourceNode||e.resourceNode.toLowerCase()===t.resourceNode.toLowerCase())&&(!r.slice(0,o).some((e=>JSON.stringify(e)==JSON.stringify(t)))&&(!n||t.block>n))));return s&&(n=s.block),i}catch(e){return Promise.reject(e)}},i=()=>{r&&clearInterval(r),r=setInterval((()=>{s().then((e=>e.forEach((e=>{t(null,zf.parseEvent(e,this.abi))})))).catch((e=>t(e)))}),3e3)};return await s(),i(),{start:i,stop:()=>{r&&(clearInterval(r),r=!1)}}}}class lg{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||!e instanceof bg)throw new Error("Expected instance of TronWeb");this.tronWeb=e,this.injectPromise=Zf()(this),this.address=r,this.abi=t,this.eventListener=!1,this.bytecode=!1,this.deployed=!1,this.lastBlock=!1,this.methods={},this.methodInstances={},this.props=[],this.tronWeb.isAddress(r)?this.deployed=!0:this.address=!1,this.loadAbi(t)}async _getEvents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=await this.tronWeb.event.getEventsByContractAddress(this.address,e),[r]=t.sort(((e,t)=>t.block-e.block)),n=t.filter(((r,n)=>(!e.resourceNode||!r.resourceNode||e.resourceNode.toLowerCase()===r.resourceNode.toLowerCase())&&(!t.slice(0,n).some((e=>JSON.stringify(e)==JSON.stringify(r)))&&(!this.lastBlock||r.block>this.lastBlock))));return r&&(this.lastBlock=r.block),n}async _startEventListener(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(zf.isFunction(e)&&(t=e,e={}),this.eventListener&&clearInterval(this.eventListener),!this.tronWeb.eventServer)throw new Error("Event server is not configured");if(!this.address)throw new Error("Contract is not configured with an address");this.eventCallback=t,await this._getEvents(e),this.eventListener=setInterval((()=>{this._getEvents(e).then((e=>e.forEach((e=>{this.eventCallback&&this.eventCallback(e)})))).catch((e=>{console.error("Failed to get event list",e)}))}),3e3)}_stopEventListener(){this.eventListener&&(clearInterval(this.eventListener),this.eventListener=!1,this.eventCallback=!1)}hasProperty(e){return this.hasOwnProperty(e)||this.__proto__.hasOwnProperty(e)}loadAbi(e){this.abi=e,this.methods={},this.props.forEach((e=>delete this[e])),e.forEach((e=>{if(!e.type||/constructor|error/i.test(e.type))return;const t=new cg(this,e),r=t.onMethod.bind(t),{name:n,functionSelector:o,signature:s}=t;this.methods[n]=r,this.methods[o]=r,this.methods[s]=r,this.methodInstances[n]=t,this.methodInstances[o]=t,this.methodInstances[s]=t,this.hasProperty(n)||(this[n]=r,this.props.push(n)),this.hasProperty(o)||(this[o]=r,this.props.push(o)),this.hasProperty(s)||(this[s]=r,this.props.push(s))}))}decodeInput(e){const t=e.substring(0,8),r=e.substring(8);if(!this.methodInstances[t])throw new Error("Contract method "+t+" not found");return{name:this.methodInstances[t].name,params:this.methodInstances[t].decodeInput(r)}}async new(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.tronWeb.defaultPrivateKey,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(zf.isFunction(t)&&(r=t,t=this.tronWeb.defaultPrivateKey),!r)return this.injectPromise(this.new,e,t);try{const n=this.tronWeb.address.fromPrivateKey(t),o=await this.tronWeb.transactionBuilder.createSmartContract(e,n),s=await this.tronWeb.trx.sign(o,t),i=await this.tronWeb.trx.sendRawTransaction(s);return i.code?r({error:i.code,message:this.tronWeb.toUtf8(i.message)}):(await zf.sleep(3e3),this.at(s.contract_address,r))}catch(e){return r(e)}}async at(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return this.injectPromise(this.at,e);try{const r=await this.tronWeb.trx.getContract(e);return r.contract_address?(this.address=r.contract_address,this.bytecode=r.bytecode,this.deployed=!0,this.loadAbi(r.abi&&r.abi.entrys?r.abi.entrys:[]),t(null,this)):t("Unknown error: "+JSON.stringify(r,null,2))}catch(e){return e.toString().includes("does not exist")?t("Contract has not been deployed on the network"):t(e)}}events(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(zf.isFunction(e)&&(t=e,e={}),!zf.isFunction(t))throw new Error("Callback function expected");const r=this;return{start(){let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return n?(r._startEventListener(e,t).then((()=>{n()})).catch((e=>{n(e)})),this):(r._startEventListener(e,t),this)},stop(){r._stopEventListener()}}}}class dg{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||!e instanceof bg)throw new Error("Expected instance of TronWeb");this.tronWeb=e,this.pluginNoOverride=["register"],this.disablePlugins=t.disablePlugins}register(e,t){let r={requires:"0.0.0",components:{}},n={libs:[],plugged:[],skipped:[]};if(this.disablePlugins)return n.error="This instance of TronWeb has plugins disabled.",n;const o=new e(this.tronWeb);if(zf.isFunction(o.pluginInterface)&&(r=o.pluginInterface(t)),!Hf().satisfies(bg.version,r.requires))throw new Error("The plugin is not compatible with this version of TronWeb");if(r.fullClass){let t=o.constructor.name,r=t.substring(0,1).toLowerCase()+t.substring(1);t!==r&&(bg[t]=e,this.tronWeb[r]=o,n.libs.push(t))}else for(let e in r.components){if(!this.tronWeb.hasOwnProperty(e))continue;let t=r.components[e],o=this.tronWeb[e].pluginNoOverride||[];for(let r in t)"constructor"===r||this.tronWeb[e][r]&&(o.includes(r)||/^_/.test(r))?n.skipped.push(r):(this.tronWeb[e][r]=t[r].bind(this.tronWeb[e]),n.plugged.push(r))}return n}}var hg=r(2894);class pg{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!(e&&e instanceof bg))throw new Error("Expected instance of TronWeb");this.tronWeb=e,this.injectPromise=Zf()(this)}setServer(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"healthcheck";if(!e)return this.tronWeb.eventServer=!1;if(zf.isString(e)&&(e=new jf.HttpProvider(e)),!this.tronWeb.isValidProvider(e))throw new Error("Invalid event server provided");this.tronWeb.eventServer=e,this.tronWeb.eventServer.isConnected=()=>this.tronWeb.eventServer.request(t).then((()=>!0)).catch((()=>!1))}getEventsByContractAddress(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{sinceTimestamp:n,since:o,fromTimestamp:s,eventName:i,blockNumber:a,size:u,page:c,onlyConfirmed:l,onlyUnconfirmed:d,previousLastEventFingerprint:h,previousFingerprint:p,fingerprint:f,rawResponse:g,sort:y,filters:b}=Object.assign({sinceTimestamp:0,eventName:!1,blockNumber:!1,size:20,page:1},t);if(!r)return this.injectPromise(this.getEventsByContractAddress,e,t);if(s=s||n||o,!this.tronWeb.eventServer)return r("No event server configured");const m=[];if(!this.tronWeb.isAddress(e))return r("Invalid contract address provided");if(i&&!e)return r("Usage of event name filtering requires a contract address");if(void 0!==s&&!zf.isInteger(s))return r("Invalid fromTimestamp provided");if(!zf.isInteger(u))return r("Invalid size provided");if(u>200&&(console.warn("Defaulting to maximum accepted size: 200"),u=200),!zf.isInteger(c))return r("Invalid page provided");if(a&&!i)return r("Usage of block number filtering requires an event name");e&&m.push(this.tronWeb.address.fromHex(e)),i&&m.push(i),a&&m.push(a);const T={size:u,page:c};return"object"==typeof b&&Object.keys(b).length>0&&(T.filters=JSON.stringify(b)),s&&(T.fromTimestamp=T.since=s),l&&(T.only_confirmed=l),d&&!l&&(T.only_unconfirmed=d),y&&(T.sort=y),f=f||p||h,f&&(T.fingerprint=f),this.tronWeb.eventServer.request(`event/contract/${m.join("/")}?${hg.stringify(T)}`).then((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?zf.isArray(e)?r(null,!0===g?e:e.map((e=>zf.mapEvent(e)))):r(e):r("Unknown error occurred")})).catch((e=>r(e.response&&e.response.data||e)))}getEventsByTransactionID(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return zf.isFunction(t)&&(r=t,t={}),r?this.tronWeb.eventServer?this.tronWeb.eventServer.request(`event/transaction/${e}`).then((function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?zf.isArray(e)?r(null,!0===t.rawResponse?e:e.map((e=>zf.mapEvent(e)))):r(e):r("Unknown error occurred")})).catch((e=>r(e.response&&e.response.data||e))):r("No event server configured"):this.injectPromise(this.getEventsByTransactionID,e,t)}}class fg{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.mainchain=r;const{fullHost:o,fullNode:s,solidityNode:i,eventServer:a,mainGatewayAddress:u,sideGatewayAddress:c,sideChainId:l}=e;this.sidechain=new t(o||s,o||i,o||a,n),this.isAddress=this.mainchain.isAddress,this.utils=this.mainchain.utils,this.setMainGatewayAddress(u),this.setSideGatewayAddress(c),this.setChainId(l),this.injectPromise=Zf()(this),this.validator=new qf(this.sidechain);const d=this;this.sidechain.trx.sign=function(){return d.sign(...arguments)},this.sidechain.trx.multiSign=function(){return d.multiSign(...arguments)},console.warn("TronWeb: 'tronWeb.sidechain' is deprecated and may be removed in the future. Please use the 'sunweb' sdk instead. For more information, see: https://github.com/tronprotocol/sun-network/tree/develop/js-sdk")}setMainGatewayAddress(e){if(!this.isAddress(e))throw new Error("Invalid main gateway address provided");this.mainGatewayAddress=e}setSideGatewayAddress(e){if(!this.isAddress(e))throw new Error("Invalid side gateway address provided");this.sideGatewayAddress=e}setChainId(e){if(!this.utils.isString(e)||!e)throw new Error("Invalid side chainId provided");this.chainId=e}signTransaction(e,t){"string"==typeof e&&(e=this.utils.code.hexStr2byteArray(e));let r=this.utils.code.hexStr2byteArray(this.chainId),n=this.utils.code.hexStr2byteArray(t.txID).concat(r),o=this.sidechain.utils.ethersUtils.sha256(n);const s=this.utils.crypto.ECKeySign(this.utils.code.hexStr2byteArray(o.replace(/^0x/,"")),e);return Array.isArray(t.signature)?t.signature.includes(s)||t.signature.push(s):t.signature=[s],t}async multiSign(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.sidechain.defaultPrivateKey,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.utils.isFunction(r)&&(n=r,r=0),this.utils.isFunction(t)&&(n=t,t=this.mainchain.defaultPrivateKey,r=0),!n)return this.injectPromise(this.multiSign,e,t,r);if(!this.utils.isObject(e)||!e.raw_data||!e.raw_data.contract)return n("Invalid transaction provided");if(!e.raw_data.contract[0].Permission_id&&r>0){e.raw_data.contract[0].Permission_id=r;const o=this.sidechain.address.toHex(this.sidechain.address.fromPrivateKey(t)).toLowerCase(),s=await this.sidechain.trx.getSignWeight(e,r);if("PERMISSION_ERROR"===s.result.code)return n(s.result.message);let i=!1;if(s.permission.keys.map((e=>{e.address===o&&(i=!0)})),!i)return n(t+" has no permission to sign");if(s.approved_list&&-1!=s.approved_list.indexOf(o))return n(t+" already sign transaction");if(!s.transaction||!s.transaction.transaction)return n("Invalid transaction provided");e=s.transaction.transaction,e.raw_data.contract[0].Permission_id=r}try{return n(null,this.signTransaction(t,e))}catch(e){n(e)}}async sign(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.sidechain.defaultPrivateKey,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(this.utils.isFunction(n)&&(o=n,n=!1),this.utils.isFunction(r)&&(o=r,r=!0,n=!1),this.utils.isFunction(t)&&(o=t,t=this.sidechain.defaultPrivateKey,r=!0,n=!1),!o)return this.injectPromise(this.sign,e,t,r,n);if(this.utils.isString(e)){if(!this.utils.isHex(e))return o("Expected hex message input");try{return o(null,this.sidechain.trx.signString(e,t,r))}catch(e){o(e)}}if(!this.utils.isObject(e))return o("Invalid transaction provided");if(!n&&e.signature)return o("Transaction is already signed");try{return n||this.sidechain.address.toHex(this.sidechain.address.fromPrivateKey(t)).toLowerCase()===this.sidechain.address.toHex(e.raw_data.contract[0].parameter.value.owner_address)?o(null,this.signTransaction(t,e)):o("Private key does not match address in transaction")}catch(e){o(e)}}async depositTrx(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.mainchain.defaultPrivateKey,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(this.utils.isFunction(o)&&(s=o,o=this.mainchain.defaultPrivateKey),this.utils.isFunction(n)&&(s=n,n={}),!s)return this.injectPromise(this.depositTrx,e,t,r,n,o);if(!this.validator.notValid([{name:"callValue",type:"integer",value:e,gte:0},{name:"depositFee",type:"integer",value:t,gte:0},{name:"feeLimit",type:"integer",value:r,gte:0}],s)){n={callValue:Number(e)+Number(t),feeLimit:r,...n};try{const e=await this.mainchain.contract().at(this.mainGatewayAddress);return s(null,await e.depositTRX().send(n,o))}catch(e){return s(e)}}}async depositTrc10(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.mainchain.defaultPrivateKey,i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(this.utils.isFunction(s)&&(i=s,s=this.mainchain.defaultPrivateKey),this.utils.isFunction(o)&&(i=o,o={}),!i)return this.injectPromise(this.depositTrc10,e,t,r,n,o,s);if(!this.validator.notValid([{name:"tokenValue",type:"integer",value:t,gte:0},{name:"depositFee",type:"integer",value:r,gte:0},{name:"feeLimit",type:"integer",value:n,gte:0},{name:"tokenId",type:"integer",value:e,gte:0}],i)){o={tokenId:e,tokenValue:t,feeLimit:n,...o,callValue:r};try{const r=await this.mainchain.contract().at(this.mainGatewayAddress);i(null,await r.depositTRC10(e,t).send(o,s))}catch(e){return i(e)}}}async depositTrc(e,t,r,n,o){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this.mainchain.defaultPrivateKey,a=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(this.utils.isFunction(i)&&(a=i,i=this.mainchain.defaultPrivateKey),this.utils.isFunction(s)&&(a=s,s={}),!a)return this.injectPromise(this.depositTrc,e,t,r,n,o,s,i);if(!this.validator.notValid([{name:"functionSelector",type:"not-empty-string",value:e},{name:"num",type:"integer",value:t,gte:0},{name:"fee",type:"integer",value:r,gte:0},{name:"feeLimit",type:"integer",value:n,gte:0},{name:"contractAddress",type:"address",value:o}],a)){s={feeLimit:n,...s,callValue:r,tokenId:"",tokenValue:0};try{let r=null;if("approve"===e){const e=await this.mainchain.contract().at(o);r=await e.approve(this.mainGatewayAddress,t).send(s,i)}else{const n=await this.mainchain.contract().at(this.mainGatewayAddress);switch(e){case"depositTRC20":r=await n.depositTRC20(o,t).send(s,i);break;case"depositTRC721":r=await n.depositTRC721(o,t).send(s,i);break;case"retryDeposit":r=await n.retryDeposit(t).send(s,i);break;case"retryMapping":r=await n.retryMapping(t).send(s,i)}}a(null,r)}catch(e){return a(e)}}}async approveTrc20(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.mainchain.defaultPrivateKey,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this.depositTrc("approve",e,0,t,r,n,o,s)}async approveTrc721(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.mainchain.defaultPrivateKey,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this.depositTrc("approve",e,0,t,r,n,o,s)}async depositTrc20(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.mainchain.defaultPrivateKey,i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return this.depositTrc("depositTRC20",e,t,r,n,o,s,i)}async depositTrc721(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.mainchain.defaultPrivateKey,i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return this.depositTrc("depositTRC721",e,t,r,n,o,s,i)}async mappingTrc(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.mainchain.defaultPrivateKey,i=arguments.length>6?arguments[6]:void 0;if(this.utils.isFunction(s)&&(i=s,s=this.mainchain.defaultPrivateKey),this.utils.isFunction(o)&&(i=o,o={}),!i)return this.injectPromise(this.mappingTrc,e,t,r,n,o,s);if(!this.validator.notValid([{name:"trxHash",type:"not-empty-string",value:e},{name:"mappingFee",type:"integer",value:t,gte:0},{name:"feeLimit",type:"integer",value:r,gte:0}],i)){e=e.startsWith("0x")?e:"0x"+e,o={feeLimit:r,...o,callValue:t};try{const t=await this.mainchain.contract().at(this.mainGatewayAddress);let r=null;"mappingTRC20"===n?r=await t.mappingTRC20(e).send(o,s):"mappingTRC721"===n?r=await t.mappingTRC721(e).send(o,s):i(new Error("type must be trc20 or trc721")),i(null,r)}catch(e){return i(e)}}}async mappingTrc20(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.mainchain.defaultPrivateKey,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this.mappingTrc(e,t,r,"mappingTRC20",n,o,s)}async mappingTrc721(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.mainchain.defaultPrivateKey,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this.mappingTrc(e,t,r,"mappingTRC721",n,o,s)}async withdrawTrx(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.mainchain.defaultPrivateKey,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(this.utils.isFunction(o)&&(s=o,o=this.mainchain.defaultPrivateKey),this.utils.isFunction(n)&&(s=n,n={}),!s)return this.injectPromise(this.withdrawTrx,e,t,r,n,o);if(!this.validator.notValid([{name:"callValue",type:"integer",value:e,gte:0},{name:"withdrawFee",type:"integer",value:t,gte:0},{name:"feeLimit",type:"integer",value:r,gte:0}],s)){n={callValue:Number(e)+Number(t),feeLimit:r,...n};try{const e=await this.sidechain.contract().at(this.sideGatewayAddress);return s(null,await e.withdrawTRX().send(n,o))}catch(e){return s(e)}}}async withdrawTrc10(e,t,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.mainchain.defaultPrivateKey,i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];if(this.utils.isFunction(s)&&(i=s,s=this.mainchain.defaultPrivateKey),this.utils.isFunction(o)&&(i=o,o={}),!i)return this.injectPromise(this.withdrawTrc10,e,t,r,n,o,s);if(!this.validator.notValid([{name:"tokenId",type:"integer",value:e,gte:0},{name:"tokenValue",type:"integer",value:t,gte:0},{name:"withdrawFee",type:"integer",value:r,gte:0},{name:"feeLimit",type:"integer",value:n,gte:0}],i)){o={tokenValue:t,tokenId:e,callValue:r,feeLimit:n,...o};try{const r=await this.sidechain.contract().at(this.sideGatewayAddress);return i(null,await r.withdrawTRC10(e,t).send(o,s))}catch(e){return i(e)}}}async withdrawTrc(e,t,r,n,o){var s=this;let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:this.mainchain.defaultPrivateKey,u=arguments.length>7&&void 0!==arguments[7]&&arguments[7];if(this.utils.isFunction(a)&&(u=a,a=this.mainchain.defaultPrivateKey),this.utils.isFunction(i)&&(u=i,i={}),!u)return this.injectPromise(this.withdrawTrc,e,t,r,n,o,i,a);if(this.validator.notValid([{name:"functionSelector",type:"not-empty-string",value:e},{name:"numOrId",type:"integer",value:t,gte:0},{name:"withdrawFee",type:"integer",value:r,gte:0},{name:"feeLimit",type:"integer",value:n,gte:0},{name:"contractAddress",type:"address",value:o}],u))return;i={feeLimit:n,...i,callValue:r};const c=[{type:"uint256",value:t}];try{const t=a?this.sidechain.address.fromPrivateKey(a):this.sidechain.defaultAddress.base58,r=await this.sidechain.transactionBuilder.triggerSmartContract(o,e,i,c,this.sidechain.address.toHex(t));if(!r.result||!r.result.result)return u("Unknown error: "+JSON.stringify(r.transaction,null,2));const n=await this.sidechain.trx.sign(r.transaction,a);if(!n.signature)return u(a?"Invalid private key provided":"Transaction was not signed properly");const l=await this.sidechain.trx.sendRawTransaction(n);if(l.code){const e={error:l.code,message:l.code};return l.message&&(e.message=this.sidechain.toUtf8(l.message)),u(e)}if(!i.shouldPollResponse)return u(null,n.txID);const d=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(20==e)return u({error:"Cannot find result in solidity node",transaction:n});const t=await s.sidechain.trx.getTransactionInfo(n.txID);if(!Object.keys(t).length)return setTimeout((()=>{d(e+1)}),3e3);if(t.result&&"FAILED"==t.result)return u({error:s.sidechain.toUtf8(t.resMessage),transaction:n,output:t});if(!s.utils.hasProperty(t,"contractResult"))return u({error:"Failed to execute: "+JSON.stringify(t,null,2),transaction:n,output:t});if(i.rawResponse)return u(null,t);let r=decodeOutput(s.outputs,"0x"+t.contractResult[0]);return 1===r.length&&(r=r[0]),u(null,r)};d()}catch(e){return u(e)}}async withdrawTrc20(e,t,r,n,o){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.mainchain.defaultPrivateKey,i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return this.withdrawTrc("withdrawal(uint256)",e,t,r,n,o,s,i)}async withdrawTrc721(e,t,r,n,o){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:this.mainchain.defaultPrivateKey,i=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return this.withdrawTrc("withdrawal(uint256)",e,t,r,n,o,s,i)}async injectFund(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.mainchain.defaultPrivateKey,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(this.utils.isFunction(n)&&(o=n,n=this.mainchain.defaultPrivateKey),this.utils.isFunction(r)&&(o=r,r={}),!o)return this.injectPromise(this.injectFund,e,t,r,n);if(!this.validator.notValid([{name:"num",type:"integer",value:e,gte:0},{name:"feeLimit",type:"integer",value:t,gte:0}],o))try{const t=this.sidechain.address.fromPrivateKey(n),r=this.sidechain.address.toHex(t),s=await this.sidechain.fullNode.request("/wallet/fundinject",{owner_address:r,amount:e},"post"),i=await this.sidechain.trx.sign(s,n);if(!i.signature)return o(n?"Invalid private key provided":"Transaction was not signed properly");const a=await this.sidechain.trx.sendRawTransaction(i);if(a.code){const e={error:a.code,message:a.code};return a.message&&(e.message=this.mainchain.toUtf8(a.message)),o(e)}return o(null,i.txID)}catch(e){return o(e)}}async retryWithdraw(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.sidechain.defaultPrivateKey,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this.withdrawTrc("retryWithdraw(uint256)",e,t,r,this.sideGatewayAddress,n,o,s)}async retryDeposit(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.mainchain.defaultPrivateKey,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this.depositTrc("retryDeposit",e,t,r,this.mainGatewayAddress,n,o,s)}async retryMapping(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.mainchain.defaultPrivateKey,s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return this.depositTrc("retryMapping",e,t,r,this.mainGatewayAddress,n,o,s)}}const{rE:gg}={rE:"5.3.4"},yg="4.7.1";class bg extends(Vf()){static providers=jf;static BigNumber=Df;static TransactionBuilder=ng;static Trx=ag;static Contract=lg;static Plugin=dg;static Event=pg;static version=gg;static utils=zf;constructor(){let e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];super();let i=!1,a=!1;"object"==typeof t&&(t.fullNode||t.fullHost)?(e=t.fullNode||t.fullHost,o=r,r=t.solidityNode||t.fullHost,n=t.eventServer||t.fullHost,i=t.headers||!1,a=t.eventHeaders||i,s=t.privateKey):e=t,zf.isString(e)&&(e=new jf.HttpProvider(e)),zf.isString(r)&&(r=new jf.HttpProvider(r)),zf.isString(n)&&(n=new jf.HttpProvider(n)),this.event=new pg(this),this.transactionBuilder=new ng(this),this.trx=new ag(this),this.plugin=new dg(this,t),this.utils=zf,this.setFullNode(e),this.setSolidityNode(r),this.setEventServer(n),this.providers=jf,this.BigNumber=Df,this.defaultBlock=!1,this.defaultPrivateKey=!1,this.defaultAddress={hex:!1,base58:!1},["sha3","toHex","toUtf8","fromUtf8","toAscii","fromAscii","toDecimal","fromDecimal","toSun","fromSun","toBigNumber","isAddress","createAccount","address","version","createRandom","fromMnemonic"].forEach((e=>{this[e]=bg[e]})),"object"==typeof o&&(o.fullNode||o.fullHost)?this.sidechain=new fg(o,bg,this,s):s=s||o,s&&this.setPrivateKey(s),this.fullnodeVersion=yg,this.feeLimit=15e7,this.injectPromise=Zf()(this),i&&this.setFullNodeHeader(i),a&&this.setEventHeader(a)}async getFullnodeVersion(){try{const e=await this.trx.getNodeInfo();this.fullnodeVersion=e.configNodeInfo.codeVersion,2===this.fullnodeVersion.split(".").length&&(this.fullnodeVersion+=".0")}catch(e){this.fullnodeVersion=yg}}setDefaultBlock(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if([!1,"latest","earliest",0].includes(e))return this.defaultBlock=e;if(!zf.isInteger(e)||!e)throw new Error("Invalid block ID provided");this.defaultBlock=Math.abs(e)}setPrivateKey(e){try{this.setAddress(this.address.fromPrivateKey(e))}catch{throw new Error("Invalid private key provided")}this.defaultPrivateKey=e,this.emit("privateKeyChanged",e)}setAddress(e){if(!this.isAddress(e))throw new Error("Invalid address provided");const t=this.address.toHex(e),r=this.address.fromHex(e);this.defaultPrivateKey&&this.address.fromPrivateKey(this.defaultPrivateKey)!==r&&(this.defaultPrivateKey=!1),this.defaultAddress={hex:t,base58:r},this.emit("addressChanged",{hex:t,base58:r})}fullnodeSatisfies(e){return Hf().satisfies(this.fullnodeVersion,e)}isValidProvider(e){return Object.values(jf).some((t=>e instanceof t))}setFullNode(e){if(zf.isString(e)&&(e=new jf.HttpProvider(e)),!this.isValidProvider(e))throw new Error("Invalid full node provided");this.fullNode=e,this.fullNode.setStatusPage("wallet/getnowblock")}setSolidityNode(e){if(zf.isString(e)&&(e=new jf.HttpProvider(e)),!this.isValidProvider(e))throw new Error("Invalid solidity node provided");this.solidityNode=e,this.solidityNode.setStatusPage("walletsolidity/getnowblock")}setEventServer(){this.event.setServer(...arguments)}setHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new jf.HttpProvider(this.fullNode.host,3e4,!1,!1,e),r=new jf.HttpProvider(this.solidityNode.host,3e4,!1,!1,e),n=new jf.HttpProvider(this.eventServer.host,3e4,!1,!1,e);this.setFullNode(t),this.setSolidityNode(r),this.setEventServer(n)}setFullNodeHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new jf.HttpProvider(this.fullNode.host,3e4,!1,!1,e),r=new jf.HttpProvider(this.solidityNode.host,3e4,!1,!1,e);this.setFullNode(t),this.setSolidityNode(r)}setEventHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new jf.HttpProvider(this.eventServer.host,3e4,!1,!1,e);this.setEventServer(t)}currentProviders(){return{fullNode:this.fullNode,solidityNode:this.solidityNode,eventServer:this.eventServer}}currentProvider(){return this.currentProviders()}getEventResult(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:[],arguments.length>1&&void 0!==arguments[1]&&arguments[1])}static get address(){return{fromHex:e=>zf.isHex(e)?zf.crypto.getBase58CheckAddress(zf.code.hexStr2byteArray(e.replace(/^0x/,Rt))):e,toHex:e=>zf.isHex(e)?e.toLowerCase().replace(/^0x/,Rt):zf.code.byteArray2hexStr(zf.crypto.decodeBase58Address(e)).toLowerCase(),fromPrivateKey(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{return zf.crypto.pkToAddress(e,t)}catch{return!1}}}}static sha3(e){return(arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?"":"0x")+To(Buffer.from(e,"utf-8")).toString().substring(2)}static toHex(e){if(zf.isBoolean(e))return bg.fromDecimal(+e);if(zf.isBigNumber(e))return bg.fromDecimal(e);if("object"==typeof e)return bg.fromUtf8(JSON.stringify(e));if(zf.isString(e)){if(/^(-|)0x/.test(e))return e;if(!isFinite(e)||/^\s*$/.test(e))return bg.fromUtf8(e)}let t=bg.fromDecimal(e);if("0xNaN"===t)throw new Error("The passed value is not convertible to a hex string");return t}static toUtf8(e){if(zf.isHex(e))return e=e.replace(/^0x/,""),Buffer.from(e,"hex").toString("utf8");throw new Error("The passed value is not a valid hex string")}static fromUtf8(e){if(!zf.isString(e))throw new Error("The passed value is not a valid utf-8 string");return"0x"+Buffer.from(e,"utf8").toString("hex")}static toAscii(e){if(zf.isHex(e)){let t="",r=0,n=e.length;for("0x"===e.substring(0,2)&&(r=2);r0&&void 0!==arguments[0]?arguments[0]:0;return zf.isBigNumber(e)?e:zf.isString(e)&&/^(-|)0x/.test(e)?new Df(e.replace("0x",""),16):new Df(e.toString(10),10)}static isAddress(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!zf.isString(e))return!1;if(42===e.length)try{return bg.isAddress(zf.crypto.getBase58CheckAddress(zf.code.hexStr2byteArray(e)))}catch(e){return!1}try{return zf.crypto.isAddressValid(e)}catch(e){return!1}}static async createAccount(){return zf.accounts.generateAccount()}static createRandom(e){return zf.accounts.generateRandom(e)}static fromMnemonic(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kt,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return zf.accounts.generateAccountWithMnemonic(e,t,r)}async isConnected(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?e(null,{fullNode:await this.fullNode.isConnected(),solidityNode:await this.solidityNode.isConnected(),eventServer:this.eventServer&&await this.eventServer.isConnected()}):this.injectPromise(this.isConnected)}}})(),n.default})())); //# sourceMappingURL=TronWeb.js.map