diff --git a/aliyun-oss-sdk-6.17.1.min.js.download b/aliyun-oss-sdk-6.17.1.min.js.download new file mode 100644 index 0000000..3778235 --- /dev/null +++ b/aliyun-oss-sdk-6.17.1.min.js.download @@ -0,0 +1,4 @@ +// Aliyun OSS SDK for JavaScript v6.17.1 +// Copyright Aliyun.com, Inc. or its affiliates. All Rights Reserved. +// License at https://github.com/ali-sdk/ali-oss/blob/master/LICENSE +!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).OSS=e()}(function(){return function n(s,i,o){function a(t,e){if(!i[t]){if(!s[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(c)return c(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=i[t]={exports:{}},s[t][0].call(r.exports,function(e){return a(s[t][1][e]||e)},r,r.exports,n,s,i,o)}return i[t].exports}for(var c="function"==typeof require&&require,e=0;e\n\n\n').concat(t,"\n"),r&&(s+="".concat(r,"\n")),s+="\n",i.content=s,i.mime="xml",i.successStatuses=[200],e.next=9,this.request(i);case 9:return i=e.sent,e.abrupt("return",{res:i.res});case 11:case"end":return e.stop()}},e,this)}));return function(e,t,r){return n.apply(this,arguments)}}(),r.getBucketLogging=function(){var r=(0,i.default)(h.default.mark(function e(t,r){var n,s;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(s=this._bucketRequestParams("GET",t,"logging",r)).successStatuses=[200],s.xmlResponse=!0,e.next=5,this.request(s);case 5:return n=e.sent,s=n.data.LoggingEnabled,e.abrupt("return",{enable:!!s,prefix:s&&s.TargetPrefix||null,res:n.res});case 8:case"end":return e.stop()}},e,this)}));return function(e,t){return r.apply(this,arguments)}}(),r.deleteBucketLogging=function(){var r=(0,i.default)(h.default.mark(function e(t,r){var n;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=this._bucketRequestParams("DELETE",t,"logging",r)).successStatuses=[204,200],e.next=4,this.request(n);case 4:return n=e.sent,e.abrupt("return",{res:n.res});case 6:case"end":return e.stop()}},e,this)}));return function(e,t){return r.apply(this,arguments)}}(),r.putBucketCORS=function(){var n=(0,i.default)(h.default.mark(function e(t,r,n){var s,i,o,a,c,u,l,p,f;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(d((r=r||[]).length,"rules is required"),r.forEach(function(e){d(e.allowedOrigin,"allowedOrigin is required"),d(e.allowedMethod,"allowedMethod is required")}),f=this._bucketRequestParams("PUT",t,"cors",n),s='\n',i=function(e){s+="".concat(e,"")},o=function(e){s+="".concat(e,"")},a=function(e){s+="".concat(e,"")},c=function(e){s+="".concat(e,"")},u=0,l=r.length;u",m(p.allowedOrigin).forEach(i),m(p.allowedMethod).forEach(o),m(p.allowedHeader).forEach(a),m(p.exposeHeader).forEach(c),p.maxAgeSeconds&&(s+="".concat(p.maxAgeSeconds,"")),s+="";return s+="",f.content=s,f.mime="xml",f.successStatuses=[200],e.next=16,this.request(f);case 16:return f=e.sent,e.abrupt("return",{res:f.res});case 18:case"end":return e.stop()}},e,this)}));return function(e,t,r){return n.apply(this,arguments)}}(),r.getBucketCORS=function(){var r=(0,i.default)(h.default.mark(function e(t,r){var n,s,i;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(i=this._bucketRequestParams("GET",t,"cors",r)).successStatuses=[200],i.xmlResponse=!0,e.next=5,this.request(i);case 5:return n=e.sent,s=[],n.data&&n.data.CORSRule&&(i=!o(i=n.data.CORSRule)?[i]:i).forEach(function(t){var r={};Object.keys(t).forEach(function(e){r[e.slice(0,1).toLowerCase()+e.slice(1,e.length)]=t[e]}),s.push(r)}),e.abrupt("return",{rules:s,res:n.res});case 9:case"end":return e.stop()}},e,this)}));return function(e,t){return r.apply(this,arguments)}}(),r.deleteBucketCORS=function(){var r=(0,i.default)(h.default.mark(function e(t,r){var n;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(n=this._bucketRequestParams("DELETE",t,"cors",r)).successStatuses=[204],e.next=4,this.request(n);case 4:return n=e.sent,e.abrupt("return",{res:n.res});case 6:case"end":return e.stop()}},e,this)}));return function(e,t){return r.apply(this,arguments)}}(),r.putBucketReferer=function(){var s=(0,i.default)(h.default.mark(function e(t,r,n,s){var i,o,a;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this._bucketRequestParams("PUT",t,"referer",s),i='\n\n',i+=" ".concat(r?"true":"false","\n"),n&&0\n",o=0;o".concat(n[o],"\n");i+=" \n"}else i+=" \n";return i+="",a.content=i,a.mime="xml",a.successStatuses=[200],e.next=10,this.request(a);case 10:return a=e.sent,e.abrupt("return",{res:a.res});case 12:case"end":return e.stop()}},e,this)}));return function(e,t,r,n){return s.apply(this,arguments)}}(),r.getBucketReferer=function(){var r=(0,i.default)(h.default.mark(function e(t,r){var n,s;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(s=this._bucketRequestParams("GET",t,"referer",r)).successStatuses=[200],s.xmlResponse=!0,e.next=5,this.request(s);case 5:return n=e.sent,(s=n.data.RefererList.Referer||null)&&(o(s)||(s=[s])),e.abrupt("return",{allowEmpty:"true"===n.data.AllowEmptyReferer,referers:s,res:n.res});case 9:case"end":return e.stop()}},e,this)}));return function(e,t){return r.apply(this,arguments)}}(),r.deleteBucketReferer=function(){var r=(0,i.default)(h.default.mark(function e(t,r){return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.putBucketReferer(t,!0,null,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}));return function(e,t){return r.apply(this,arguments)}}(),r._bucketRequestParams=function(e,t,r,n){return{method:e,bucket:t,subres:r,timeout:n&&n.timeout,ctx:n&&n.ctx}}},{"../common/utils/checkBucketName":50,"@babel/runtime/helpers/asyncToGenerator":73,"@babel/runtime/helpers/interopRequireDefault":74,"@babel/runtime/regenerator":76,assert:78,"core-js/modules/es.array.slice.js":250,"core-js/modules/es.object.keys.js":257,"core-js/modules/es.object.to-string.js":258,"core-js/modules/web.dom-collections.for-each.js":296}],3:[function(E,_,e){!function(T,k){!function(){"use strict";var e=E("@babel/runtime/helpers/interopRequireDefault"),c=e(E("@babel/runtime/regenerator")),r=e(E("@babel/runtime/helpers/asyncToGenerator"));E("core-js/modules/es.function.name.js"),E("core-js/modules/es.regexp.exec.js"),E("core-js/modules/es.string.split.js"),E("core-js/modules/es.object.assign.js"),E("core-js/modules/es.array.includes.js"),E("core-js/modules/es.string.replace.js"),E("core-js/modules/es.array.concat.js"),E("core-js/modules/es.symbol.js"),E("core-js/modules/es.symbol.description.js"),E("core-js/modules/es.array.slice.js"),E("core-js/modules/es.object.to-string.js"),E("core-js/modules/es.promise.js"),E("core-js/modules/es.regexp.to-string.js");var t=E("debug")("ali-oss"),s=E("xml2js"),n=E("agentkeepalive"),i=E("merge-descriptors"),o=E("platform"),a=E("utility"),u=E("urllib"),l=E("./version"),p=E("bowser"),f=E("../common/signUtils"),h=E("../common/client/initOptions"),d=E("../common/utils/createRequest").createRequest,m=E("../common/utils/encoder").encoder,e=E("../common/client/getReqUrl").getReqUrl,y=E("../common/utils/setSTSToken").setSTSToken,b=E("../common/utils/retry").retry,g=E("../common/utils/isFunction").isFunction,v=new n;function w(e,t){var r,n;if(r=o.name,n=o.version,r&&r.toLowerCase&&"ie"===r.toLowerCase()&&n.split(".")[0]<10&&console.warn("ali-oss does not support the current browser"),!(this instanceof w))return new w(e,t);e&&e.inited?this.options=e:this.options=w.initOptions(e),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=u,this.agent=this.options.agent||v),this.ctx=t,this.userAgent=this._getUserAgent(),this.stsTokenFreshTime=new Date,this.options.amendTimeSkewed=0}(_.exports=w).initOptions=function(e){e.stsToken||console.warn("Please use STS Token for safety, see more details at https://help.aliyun.com/document_detail/32077.html");e=Object.assign({secure:location&&"https:"===location.protocol,useFetch:!1},e);return h(e)};n=w.prototype;function j(e){return x.apply(this,arguments)}function x(){return(x=(0,r.default)(c.default.mark(function e(t){var r,n,s,i,o,a;return c.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.options.stsToken&&g(this.options.refreshSTSToken))return e.next=3,y.call(this);e.next=3;break;case 3:return r=d.call(this,t),this.options.useFetch||(r.params.mode="disable-fetch"),i=!!t.stream,e.prev=6,e.next=9,this.urllib.request(r.url,r.params);case 9:n=e.sent,this.debug("response %s %s, got %s, headers: %j",t.method,r.url,n.status,n.headers,"info"),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(6),s=e.t0;case 16:if(n&&t.successStatuses&&-1===t.successStatuses.indexOf(n.status))return e.next=19,this.requestError(n);e.next=28;break;case 19:if("RequestTimeTooSkewed"!==(o=e.sent).code||i){e.next=25;break}return this.options.amendTimeSkewed=+new Date(o.serverTime)-new Date,e.next=24,this.request(t);case 24:return e.abrupt("return",e.sent);case 25:o.params=t,e.next=32;break;case 28:if(s)return e.next=31,this.requestError(s);e.next=32;break;case 31:o=e.sent;case 32:if(o)throw o;e.next=34;break;case 34:if(t.xmlResponse)return e.next=37,this.parseXML(n.data);e.next=39;break;case 37:a=e.sent,n.data=a;case 39:return e.abrupt("return",n);case 40:case"end":return e.stop()}},e,this,[[6,13]])}))).apply(this,arguments)}n.debug=t,i(n,E("./object")),i(n,E("./bucket")),i(n,E("../common/bucket/getBucketWebsite")),i(n,E("../common/bucket/putBucketWebsite")),i(n,E("../common/bucket/deleteBucketWebsite")),i(n,E("../common/bucket/getBucketLifecycle")),i(n,E("../common/bucket/putBucketLifecycle")),i(n,E("../common/bucket/deleteBucketLifecycle")),i(n,E("../common/bucket/putBucketVersioning")),i(n,E("../common/bucket/getBucketVersioning")),i(n,E("../common/bucket/getBucketInventory")),i(n,E("../common/bucket/deleteBucketInventory")),i(n,E("../common/bucket/listBucketInventory")),i(n,E("../common/bucket/putBucketInventory")),i(n,E("../common/bucket/abortBucketWorm")),i(n,E("../common/bucket/completeBucketWorm")),i(n,E("../common/bucket/extendBucketWorm")),i(n,E("../common/bucket/getBucketWorm")),i(n,E("../common/bucket/initiateBucketWorm")),i(n,E("./managed-upload")),i(n,E("../common/multipart-copy")),i(n,E("../common/multipart")),i(n,E("../common/parallel")),n.signature=function(e){return this.debug("authorization stringToSign: %s",e,"info"),f.computeSignature(this.options.accessKeySecret,e,this.options.headerEncoding)},n._getReqUrl=e,n.authorization=function(e,t,r,n){r=f.buildCanonicalString(e.toUpperCase(),t,{headers:n,parameters:r});return f.authorization(this.options.accessKeyId,this.options.accessKeySecret,r,this.options.headerEncoding)},n.request=function(){var t=(0,r.default)(c.default.mark(function e(n){var s=this;return c.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.options.retryMax)return e.next=3,b(j.bind(this),this.options.retryMax,{errorHandler:function(e){return!!function(e){if(n.stream)return!1;var t=[-1,-2].includes(e.status),r=s.options.requestErrorRetryHandle||function(){return!0};return t&&r(e)}(e)}})(n);e.next=6;break;case 3:return e.abrupt("return",e.sent);case 6:return e.abrupt("return",j.call(this,n));case 7:case"end":return e.stop()}},e,this)}));return function(e){return t.apply(this,arguments)}}(),n._getResource=function(e){var t="/";return e.bucket&&(t+="".concat(e.bucket,"/")),e.object&&(t+=m(e.object,this.options.headerEncoding)),t},n._escape=function(e){return a.encodeURIComponent(e).replace(/%2F/g,"/")},n._getUserAgent=function(){var e=k&&k.browser?"js":"nodejs",t="aliyun-sdk-".concat(e,"/").concat(l.version),e=o.description;return!e&&k&&(e="Node.js ".concat(k.version.slice(1)," on ").concat(k.platform," ").concat(k.arch)),this._checkUserAgent("".concat(t," ").concat(e))},n._checkUserAgent=function(e){return e.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},n.checkBrowserAndVersion=function(e,t){return p.name===e&&p.version.split(".")[0]===t},n.parseXML=function(e){return new Promise(function(r,n){T.isBuffer(e)&&(e=e.toString()),s.parseString(e,{explicitRoot:!1,explicitArray:!1},function(e,t){e?n(e):r(t)})})},n.requestError=function(){var t=(0,r.default)(c.default.mark(function e(t){var r,n,s,i;return c.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=null,t.data&&t.data.length){e.next=5;break}-1===t.status||-2===t.status?((r=new Error(t.message)).name=t.name,r.status=t.status,r.code=t.name):(404===t.status?((r=new Error("Object not exists")).name="NoSuchKeyError",r.status=404,r.code="NoSuchKey"):412===t.status?((r=new Error("Pre condition failed")).name="PreconditionFailedError",r.status=412,r.code="PreconditionFailed"):((r=new Error("Unknow error, status: ".concat(t.status))).name="UnknowError",r.status=t.status),r.requestId=t.headers["x-oss-request-id"],r.host=""),e.next=32;break;case 5:return n=String(t.data),this.debug("request response error data: %s",n,"error"),e.prev=7,e.next=10,this.parseXML(n);case 10:if(e.t0=e.sent,e.t0){e.next=13;break}e.t0={};case 13:s=e.t0,e.next=23;break;case 16:return e.prev=16,e.t1=e.catch(7),this.debug(n,"error"),e.t1.message+="\nraw xml: ".concat(n),e.t1.status=t.status,e.t1.requestId=t.headers["x-oss-request-id"],e.abrupt("return",e.t1);case 23:i=s.Message||"unknow request error, status: ".concat(t.status),s.Condition&&(i+=" (condition: ".concat(s.Condition,")")),(r=new Error(i)).name=s.Code?"".concat(s.Code,"Error"):"UnknowError",r.status=t.status,r.code=s.Code,r.requestId=s.RequestId,r.hostId=s.HostId,r.serverTime=s.ServerTime;case 32:return this.debug("generate error %j",r,"error"),e.abrupt("return",r);case 34:case"end":return e.stop()}},e,this,[[7,16]])}));return function(e){return t.apply(this,arguments)}}()}.call(this)}.call(this,{isBuffer:E("../../node_modules/is-buffer/index.js")},E("_process"))},{"../../node_modules/is-buffer/index.js":312,"../common/bucket/abortBucketWorm":7,"../common/bucket/completeBucketWorm":8,"../common/bucket/deleteBucketInventory":9,"../common/bucket/deleteBucketLifecycle":10,"../common/bucket/deleteBucketWebsite":11,"../common/bucket/extendBucketWorm":12,"../common/bucket/getBucketInventory":13,"../common/bucket/getBucketLifecycle":14,"../common/bucket/getBucketVersioning":15,"../common/bucket/getBucketWebsite":16,"../common/bucket/getBucketWorm":17,"../common/bucket/initiateBucketWorm":18,"../common/bucket/listBucketInventory":19,"../common/bucket/putBucketInventory":20,"../common/bucket/putBucketLifecycle":21,"../common/bucket/putBucketVersioning":22,"../common/bucket/putBucketWebsite":23,"../common/client/getReqUrl":25,"../common/client/initOptions":26,"../common/multipart":30,"../common/multipart-copy":29,"../common/parallel":48,"../common/signUtils":49,"../common/utils/createRequest":54,"../common/utils/encoder":57,"../common/utils/isFunction":65,"../common/utils/retry":70,"../common/utils/setSTSToken":72,"./bucket":2,"./managed-upload":4,"./object":5,"./version":6,"@babel/runtime/helpers/asyncToGenerator":73,"@babel/runtime/helpers/interopRequireDefault":74,"@babel/runtime/regenerator":76,_process:399,agentkeepalive:77,bowser:83,"core-js/modules/es.array.concat.js":241,"core-js/modules/es.array.includes.js":246,"core-js/modules/es.array.slice.js":250,"core-js/modules/es.function.name.js":253,"core-js/modules/es.object.assign.js":255,"core-js/modules/es.object.to-string.js":258,"core-js/modules/es.promise.js":259,"core-js/modules/es.regexp.exec.js":261,"core-js/modules/es.regexp.to-string.js":262,"core-js/modules/es.string.replace.js":266,"core-js/modules/es.string.split.js":268,"core-js/modules/es.symbol.description.js":270,"core-js/modules/es.symbol.js":271,debug:397,"merge-descriptors":315,platform:322,urllib:407,utility:406,xml2js:358}],4:[function(s,e,o){!function(i){!function(){"use strict";var e=s("@babel/runtime/helpers/interopRequireDefault"),b=e(s("@babel/runtime/regenerator"));s("core-js/modules/es.function.name.js"),s("core-js/modules/es.object.to-string.js"),s("core-js/modules/es.promise.js"),s("core-js/modules/es.array.from.js"),s("core-js/modules/es.string.iterator.js"),s("core-js/modules/es.array.map.js"),s("core-js/modules/es.array.filter.js"),s("core-js/modules/es.array.find.js"),s("core-js/modules/es.array.concat.js"),s("core-js/modules/es.regexp.to-string.js"),s("core-js/modules/es.array.slice.js"),s("core-js/modules/es.array.iterator.js"),s("core-js/modules/es.array-buffer.slice.js"),s("core-js/modules/es.typed-array.uint8-array.js"),s("core-js/modules/es.typed-array.copy-within.js"),s("core-js/modules/es.typed-array.every.js"),s("core-js/modules/es.typed-array.fill.js"),s("core-js/modules/es.typed-array.filter.js"),s("core-js/modules/es.typed-array.find.js"),s("core-js/modules/es.typed-array.find-index.js"),s("core-js/modules/es.typed-array.for-each.js"),s("core-js/modules/es.typed-array.includes.js"),s("core-js/modules/es.typed-array.index-of.js"),s("core-js/modules/es.typed-array.iterator.js"),s("core-js/modules/es.typed-array.join.js"),s("core-js/modules/es.typed-array.last-index-of.js"),s("core-js/modules/es.typed-array.map.js"),s("core-js/modules/es.typed-array.reduce.js"),s("core-js/modules/es.typed-array.reduce-right.js"),s("core-js/modules/es.typed-array.reverse.js"),s("core-js/modules/es.typed-array.set.js"),s("core-js/modules/es.typed-array.slice.js"),s("core-js/modules/es.typed-array.some.js"),s("core-js/modules/es.typed-array.sort.js"),s("core-js/modules/es.typed-array.subarray.js"),s("core-js/modules/es.typed-array.to-locale-string.js"),s("core-js/modules/es.typed-array.to-string.js");var g=e(s("@babel/runtime/helpers/asyncToGenerator")),t=s("util"),p=s("path"),f=s("mime"),v=s("copy-to"),h=s("../common/utils/isBlob").isBlob,d=s("../common/utils/isFile").isFile,m=(s("../common/utils/isArray").isArray,s("../common/utils/isBuffer").isBuffer),e=(s("../common/utils/retry").retry,o);e.multipartUpload=function(){var r=(0,g.default)(b.default.mark(function e(t,r){var n,s,i,o,a,c,u,l=arguments;return b.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=2this.fileBuffer.length?this.fileBuffer.length:n;this.start=n,t=this.push(this.fileBuffer.slice(r,n))}},n.prototype._read=function(t){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||0===this.start&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);t=t||16384;var r=this;this.reader.onload=function(e){r.fileBuffer=i.from(new Uint8Array(e.target.result)),r.file=null,r.readFileAndPush(t)},0===this.start?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(t)},e._createBuffer=function(){var n=(0,g.default)(b.default.mark(function e(t,r,n){var s;return b.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(h(t)||d(t))return s=t.slice(r,n),e.next=4,function(n){return n.arrayBuffer?n.arrayBuffer():new Promise(function(t,r){var e=new FileReader;e.onload=function(e){t(e.target.result)},e.onerror=function(e){r(e)},e.readAsArrayBuffer(n)})}(s);e.next=8;break;case 4:return s=e.sent,e.abrupt("return",i.from(s));case 8:if(m(t))return e.abrupt("return",t.subarray(r,n));e.next=12;break;case 12:throw new Error("_createBuffer requires File/Blob/Buffer.");case 13:case"end":return e.stop()}},e)}));return function(e,t,r){return n.apply(this,arguments)}}(),e._getPartSize=function(e,t){t=t||1048576;e=Math.ceil(e/1e4);return t\n\n',a=0;a\n",o+="".concat(c.number,"\n"),o+="".concat(c.etag,"\n"),o+="\n";return o+="",p={},(p=d(s=s||{},function(e){if(m(e))return null})).headers&&delete p.headers["x-oss-server-side-encryption"],p.subres={uploadId:r},u=this._objectRequestParams("POST",t,p),h.encodeCallback(u,p),u.mime="xml",u.content=o,u.headers&&u.headers["x-oss-callback"]||(u.xmlResponse=!0),u.successStatuses=[200],e.next=17,this.request(u);case 17:return l=e.sent,p={res:l.res,bucket:u.bucket,name:t,etag:l.res.headers.etag},u.headers&&u.headers["x-oss-callback"]&&(p.data=JSON.parse(l.data.toString())),e.abrupt("return",p);case 21:case"end":return e.stop()}},e,this)}));return function(e,t,r,n){return s.apply(this,arguments)}}(),e._uploadPart=function(){var i=(0,t.default)(f.default.mark(function e(t,r,n,s,i){var o,a,c;return f.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o={},u(i=i||{}).to(o),o.headers={"Content-Length":s.size},o.subres={partNumber:n,uploadId:r},(a=this._objectRequestParams("PUT",t,o)).mime=o.mime,l&&l.browser?a.content=s.content:a.stream=s.stream,a.successStatuses=[200],a.disabledMD5=i.disabledMD5,e.next=13,this.request(a);case 13:if((c=e.sent).res.headers.etag){e.next=16;break}throw new Error("Please set the etag of expose-headers in OSS \n https://help.aliyun.com/document_detail/32069.html");case 16:return s.stream&&(s.stream=null,a.stream=null),e.abrupt("return",{name:t,etag:c.res.headers.etag,res:c.res});case 18:case"end":return e.stop()}},e,this)}));return function(e,t,r,n,s){return i.apply(this,arguments)}}()}.call(this)}.call(this,r("_process"))},{"./callback":24,"./utils/deepCopy":56,"./utils/isBuffer":63,"@babel/runtime/helpers/asyncToGenerator":73,"@babel/runtime/helpers/interopRequireDefault":74,"@babel/runtime/regenerator":76,_process:399,"copy-to":88,"core-js/modules/es.array.concat.js":241,"core-js/modules/es.array.filter.js":243,"core-js/modules/es.array.map.js":249,"core-js/modules/es.array.sort.js":251,"core-js/modules/es.object.to-string.js":258,"core-js/modules/es.regexp.to-string.js":262}],31:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireDefault"),a=n(e("@babel/runtime/regenerator"));e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.find.js"),e("core-js/modules/es.array.includes.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.replace.js");var c=n(e("@babel/runtime/helpers/typeof")),i=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("../utils/checkBucketName").checkBucketName,r=r,u=["content-type","content-encoding","content-language","content-disposition","cache-control","expires"];r.copy=function(){var s=(0,i.default)(a.default.mark(function e(t,r,n,s){var i,o;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(s=(s="object"===(0,c.default)(n)?n:s)||{}).headers=s.headers||{},Object.keys(s.headers).forEach(function(e){s.headers["x-oss-copy-source-".concat(e.toLowerCase())]=s.headers[e]}),(s.meta||Object.keys(s.headers).find(function(e){return u.includes(e.toLowerCase())}))&&(s.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(s.meta,s.headers),r=this._getSourceName(r,n),s.versionId&&(r="".concat(r,"?versionId=").concat(s.versionId)),s.headers["x-oss-copy-source"]=r,(o=this._objectRequestParams("PUT",t,s)).xmlResponse=!0,o.successStatuses=[200,304],e.next=14,this.request(o);case 14:return i=e.sent,o=(o=i.data)&&{etag:o.ETag,lastModified:o.LastModified},e.abrupt("return",{data:o,res:i.res});case 18:case"end":return e.stop()}},e,this)}));return function(e,t,r,n){return s.apply(this,arguments)}}(),r._getSourceName=function(e,t){return"string"==typeof t?e=this._objectName(e):"/"!==e[0]?t=this.options.bucket:(t=e.replace(/\/(.+?)(\/.*)/,"$1"),e=e.replace(/(\/.+?\/)(.*)/,"$2")),s(t),e=encodeURIComponent(e),e="/".concat(t,"/").concat(e)}},{"../utils/checkBucketName":50,"@babel/runtime/helpers/asyncToGenerator":73,"@babel/runtime/helpers/interopRequireDefault":74,"@babel/runtime/helpers/typeof":75,"@babel/runtime/regenerator":76,"core-js/modules/es.array.concat.js":241,"core-js/modules/es.array.find.js":244,"core-js/modules/es.array.includes.js":246,"core-js/modules/es.object.keys.js":257,"core-js/modules/es.regexp.exec.js":261,"core-js/modules/es.string.replace.js":266,"core-js/modules/web.dom-collections.for-each.js":296}],32:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireDefault"),s=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.object.assign.js");var i=n(e("@babel/runtime/helpers/asyncToGenerator"));r.delete=function(){var t=(0,i.default)(s.default.mark(function e(t){var r,n=arguments;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(r=1=this.options.refreshSTSTokenInterval?(this.stsTokenFreshTime=e,this.options.refreshSTSToken().then(function(e){e=h(e,"firstLowerCase");e.securityToken&&(e.stsToken=e.securityToken),f(e),Object.assign(r.options,e)})):this.stsTokenFreshTime=e),this.options.stsToken&&(t["security-token"]=this.options.stsToken);i=u._signatureForURL(this.options.accessKeySecret,t,i,n),s=o.parse(this._getReqUrl(s));return s.query={OSSAccessKeyId:this.options.accessKeyId,Expires:n,Signature:i.Signature},c(i.subResource).to(s.query),s.format()}},{"../../common/signUtils":49,"../../common/utils/isFunction":65,"../utils/formatObjKey":59,"../utils/isIP":66,"../utils/setSTSToken":72,"copy-to":88,"core-js/modules/es.object.assign.js":255,url:404,utility:406}],48:[function(e,t,r){"use strict";var n=e("@babel/runtime/helpers/interopRequireDefault"),p=n(e("@babel/runtime/regenerator"));e("core-js/modules/es.array.iterator.js"),e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),e("core-js/modules/es.string.iterator.js"),e("core-js/modules/web.dom-collections.iterator.js"),e("core-js/modules/web.dom-collections.for-each.js"),e("core-js/modules/es.function.name.js");var i=n(e("@babel/runtime/helpers/asyncToGenerator")),s=e("./utils/isArray").isArray,r=r;r._parallelNode=function(){var s=(0,i.default)(p.default.mark(function e(t,r,n,s){var i,o,a,c,u,l;return p.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=this,o=[],a=[],u=t.length/r,l=t.length%r,c=0==l?u:(t.length-l)/r+1,u=1,l=0;case 8:if(!(lt[0]?1:e[0]").concat(e[t],""):"object"===i(e[t])?n+="<".concat(t,">").concat(r(e[t]),""):"array"===i(e[t])?n+=e[t].map(function(e){return"<".concat(t,">").concat(r(e),"")}).join(""):n+="<".concat(t,">").concat(e[t].toString(),""))}):n+=e.toString(),n}},{"./formatObjKey":59,"core-js/modules/es.array.concat.js":241,"core-js/modules/es.array.join.js":248,"core-js/modules/es.array.map.js":249,"core-js/modules/es.object.keys.js":257,"core-js/modules/es.object.to-string.js":258,"core-js/modules/es.regexp.exec.js":261,"core-js/modules/es.regexp.to-string.js":262,"core-js/modules/es.string.replace.js":266,"core-js/modules/web.dom-collections.for-each.js":296}],70:[function(e,t,r){"use strict";e("core-js/modules/es.object.to-string.js"),e("core-js/modules/es.promise.js"),Object.defineProperty(r,"__esModule",{value:!0}),r.retry=void 0,r.retry=function(i,o){var e=2=this.options.refreshSTSTokenInterval)return this.stsTokenFreshTime=t,e.next=7,this.options.refreshSTSToken();e.next=12;break;case 7:r=e.sent,(r=o.formatObjKey(r,"firstLowerCase")).securityToken&&(r.stsToken=r.securityToken),c(r),Object.assign(this.options,r);case 12:e.next=15;break;case 14:this.stsTokenFreshTime=t;case 15:return e.abrupt("return",null);case 16:case"end":return e.stop()}},e,this)}))).apply(this,arguments)}function c(e){var r=Object.keys(e);["accessKeySecret","accessKeyId","stsToken"].forEach(function(t){if(!r.find(function(e){return e===t}))throw Error("refreshSTSToken must return contains ".concat(t))})}r.setSTSToken=function(){return a.apply(this,arguments)},r.checkCredentials=c},{"./formatObjKey":59,"@babel/runtime/helpers/asyncToGenerator":73,"@babel/runtime/helpers/interopRequireDefault":74,"@babel/runtime/regenerator":76,"core-js/modules/es.array.find.js":244,"core-js/modules/es.object.assign.js":255,"core-js/modules/es.object.keys.js":257}],73:[function(e,t,r){function c(e,t,r,n,s,i,o){try{var a=e[i](o),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,s)}t.exports=function(a){return function(){var e=this,o=arguments;return new Promise(function(t,r){var n=a.apply(e,o);function s(e){c(n,t,r,s,i,"next",e)}function i(e){c(n,t,r,s,i,"throw",e)}s(void 0)})}},t.exports.default=t.exports,t.exports.__esModule=!0},{}],74:[function(e,t,r){t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.default=t.exports,t.exports.__esModule=!0},{}],75:[function(e,t,r){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(e){return typeof e}:t.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.default=t.exports,t.exports.__esModule=!0,n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},{}],76:[function(e,t,r){t.exports=e("regenerator-runtime")},{"regenerator-runtime":342}],77:[function(e,t,r){function n(){}t.exports=n,t.exports.HttpsAgent=n},{}],78:[function(x,T,e){!function(j){!function(){"use strict";var e=x("object-assign");function i(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,s=0,i=Math.min(r,n);s>16&255,i[o++]=t>>8&255,i[o++]=255&t;2===n&&(t=c[e.charCodeAt(r)]<<2|c[e.charCodeAt(r+1)]>>4,i[o++]=255&t);1===n&&(t=c[e.charCodeAt(r)]<<10|c[e.charCodeAt(r+1)]<<4|c[e.charCodeAt(r+2)]>>2,i[o++]=t>>8&255,i[o++]=255&t);return i},r.fromByteArray=function(e){for(var t,r=e.length,n=r%3,s=[],i=0,o=r-n;i>18&63]+a[e>>12&63]+a[e>>6&63]+a[63&e]}(n));return s.join("")}(e,i,o>2]+a[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],s.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"="));return s.join("")};for(var a=[],c=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,i=n.length;st[1][r])return 1;if(t[0][r]!==t[1][r])return-1;if(0===r)return 0}}function i(e,t,r){var n=a;"string"==typeof t&&(r=t,t=void 0),void 0===t&&(t=!1);var s,i=""+(n=r?o(r):n).version;for(s in e)if(e.hasOwnProperty(s)&&n[s]){if("string"!=typeof e[s])throw new Error("Browser version in the minVersion map should be a string: "+s+": "+String(e));return x([i,e[s]])<0}return t}return a.test=function(e){for(var t=0;t=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function h(e,t){if(p.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var r=(e="string"!=typeof e?""+e:e).length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return A(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(n)return A(e).length;t=(""+t).toLowerCase(),n=!0}}function t(e,t,r){var n,s,i,o=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0);(!r||r<0||n=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=p.from(t,n)),p.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,s);if("number"==typeof t)return t&=255,p.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(s?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):y(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,s){var i=1,o=e.length,a=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o/=i=2,a/=2,r/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(s)for(var u=-1,l=r;l>8,n=n%256,s.push(n),s.push(r);return s}(t,e.length-r),e,r,n)}function v(e,t,r){r=Math.min(e.length,r);for(var n=[],s=t;s>>10&1023|55296),l=56320|1023&l),n.push(l),s+=p}return function(e){var t=e.length;if(t<=w)return String.fromCharCode.apply(String,e);var r="",n=0;for(;nt&&(e+=" ... ")),""},p.prototype.compare=function(e,t,r,n,s){if(!p.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(s<=n&&r<=t)return 0;if(s<=n)return-1;if(r<=t)return 1;if(this===e)return 0;for(var i=(s>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),a=Math.min(i,o),c=this.slice(n,s),u=e.slice(t,r),l=0;lthis.length)throw new RangeError("Attempt to write outside buffer bounds");n=n||"utf8";for(var i,o,a,c=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var s=e.length-r;if((!n||s<(n=Number(n)))&&(n=s),(s=t.length)%2!=0)throw new TypeError("Invalid hex string");s/2e.length)throw new RangeError("Index out of range")}function T(e,t,r,n){t<0&&(t=65535+t+1);for(var s=0,i=Math.min(e.length-r,2);s>>8*(n?s:1-s)}function k(e,t,r,n){t<0&&(t=4294967295+t+1);for(var s=0,i=Math.min(e.length-r,4);s>>8*(n?s:3-s)&255}function E(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function _(e,t,r,n,s){return s||E(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function S(e,t,r,n,s){return s||E(e,0,r,8),i.write(e,t,r,n,52,8),r+8}p.prototype.slice=function(e,t){var r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):r>>8):T(this,e,t,!0),t+2},p.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,2,65535,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},p.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):k(this,e,t,!0),t+4},p.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,4,4294967295,0),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},p.prototype.writeIntLE=function(e,t,r,n){e=+e,t|=0,n||x(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var s=0,i=1,o=0;for(this[t]=255&e;++s>0)-o&255;return t+r},p.prototype.writeIntBE=function(e,t,r,n){e=+e,t|=0,n||x(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);var s=r-1,i=1,o=0;for(this[t+s]=255&e;0<=--s&&(i*=256);)e<0&&0===o&&0!==this[t+s+1]&&(o=1),this[t+s]=(e/i>>0)-o&255;return t+r},p.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,1,127,-128),p.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},p.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},p.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,2,32767,-32768),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},p.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,4,2147483647,-2147483648),p.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):k(this,e,t,!0),t+4},p.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),p.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):k(this,e,t,!1),t+4},p.prototype.writeFloatLE=function(e,t,r){return _(this,e,t,!0,r)},p.prototype.writeFloatBE=function(e,t,r){return _(this,e,t,!1,r)},p.prototype.writeDoubleLE=function(e,t,r){return S(this,e,t,!0,r)},p.prototype.writeDoubleBE=function(e,t,r){return S(this,e,t,!1,r)},p.prototype.copy=function(e,t,r,n){if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),(n=0=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var s,i=(n=e.length-t>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(a=t;a>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function D(e){return a.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(O,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function I(e,t,r,n){for(var s=0;s=t.length||s>=e.length);++s)t[s+r]=e[s];return s}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},C("buffer").Buffer)},{"base64-js":82,buffer:85,ieee754:304,isarray:313}],86:[function(e,t,r){var n=e("buffer").Buffer,s=n.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};r=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),function(e){if(e&&!s(e))throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=o;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=a;break;default:return void(this.write=i)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0};function i(e){return e.toString(this.encoding)}function o(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function a(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}r.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},r.prototype.end=function(e){var t,r,n="";return e&&e.length&&(n=this.write(e)),this.charReceived&&(t=this.charReceived,r=this.charBuffer,e=this.encoding,n+=r.slice(0,t).toString(e)),n}},{buffer:85}],87:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],88:[function(e,t,r){"use strict";var n=Array.prototype.slice;function s(e,t){if(!(this instanceof s))return new s(e,t);this.src=e,this._withAccess=t}(t.exports=s).prototype.withAccess=function(e){return this._withAccess=!1!==e,this},s.prototype.pick=function(e){return(e=!Array.isArray(e)?n.call(arguments):e).length&&(this.keys=e),this},s.prototype.to=function(e){if(e=e||{},!this.src)return e;var t=this.keys||Object.keys(this.src);if(!this._withAccess){for(var r=0;r>8&255]}function i(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function o(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function a(e){return F(e,23,4)}function c(e){return F(e,52,8)}function u(e,t){_(e[R],t,{get:function(){return D(this)[t]}})}function l(e,t,r,n){var s=j(r),r=D(e);if(s+t>r.byteLength)throw q(M);return e=D(r.buffer).bytes,r=s+r.byteOffset,t=e.slice(r,r+t),n?t:t.reverse()}function p(e,t,r,n,s,i){if(r=j(r),e=D(e),r+t>e.byteLength)throw q(M);for(var o=D(e.buffer).bytes,a=r+e.byteOffset,c=n(+s),u=0;uV;)(G=X[V++])in L||m(L,G,P[G]);b.constructor=L}k&&T(e)!==A&&k(e,A);var A=new B(new L(2)),W=e.setInt8;A.setInt8(0,2147483648),A.setInt8(1,2147483649),!A.getInt8(0)&&A.getInt8(1)||y(e,{setInt8:function(e,t){W.call(this,e,t<<24>>24)},setUint8:function(e,t){W.call(this,e,t<<24>>24)}},{unsafe:!0})}else L=function(e){g(this,L,C);e=j(e);I(this,{bytes:S.call(new Array(e),0),byteLength:e}),h||(this.byteLength=e)},B=function(e,t,r){g(this,B,N),g(e,L,N);var n=D(e).byteLength,t=v(t);if(t<0||n>24},getUint8:function(e){return l(this,1,e)[0]},getInt16:function(e){e=l(this,2,e,1>16},getUint16:function(e){e=l(this,2,e,1>>0},getFloat32:function(e){return U(l(this,4,e,10)e[i]=e[--i];if(i!==n++)e[i]=s}return e}(e,t):function(e,t,r){var n=e.length,s=t.length,i=0,o=0,a=[];while(i]*>)/g,d=/\$([$&'`]|\d{1,2})/g;t.exports=function(i,o,a,c,u,e){var l=a+i.length,p=c.length,t=d;return void 0!==u&&(u=n(u),t=h),s.call(e,t,function(e,t){var r;switch(t.charAt(0)){case"$":return"$";case"&":return i;case"`":return o.slice(0,a);case"'":return o.slice(l);case"<":r=u[t.slice(1,-1)];break;default:var n=+t;if(0==n)return e;if(p>1,u=23===t?h(2,-24)-h(2,-77):0,l=e<0||0===e&&1/e<0?1:0,p=0;for((e=f(e))!=e||e===1/0?(s=e!=e?1:0,n=a):(n=d(m(e)/y),e*(r=h(2,-n))<1&&(n--,r*=2),2<=(e+=1<=n+c?u/r:u*h(2,1-c))*r&&(n++,r/=2),a<=n+c?(s=0,n=a):1<=n+c?(s=(e*r-1)*h(2,t),n+=c):(s=e*h(2,c-1)*h(2,t),n=0));8<=t;i[p++]=255&s,s/=256,t-=8);for(n=n<>1,a=s-7,c=n-1,n=e[c--],u=127&n;for(n>>=7;0>=-a,a+=t;0"+e+""},y=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}var e,t;y="undefined"==typeof document||document.domain&&i?s(i):(e=p("iframe"),t="java"+h+":",e.style.display="none",l.appendChild(e),e.src=String(t),(e=e.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F);for(var r=c.length;r--;)delete y[f][c[r]];return y()};u[d]=!0,t.exports=Object.create||function(e,t){var r;return null!==e?(n[f]=o(e),r=new n,n[f]=null,r[d]=e):r=y(),void 0===t?r:a(r,t)}},{"../internals/an-object":94,"../internals/document-create-element":126,"../internals/enum-bug-keys":138,"../internals/hidden-keys":149,"../internals/html":151,"../internals/object-define-properties":178,"../internals/shared-key":209}],178:[function(e,t,r){var n=e("../internals/descriptors"),o=e("../internals/object-define-property"),a=e("../internals/an-object"),c=e("../internals/object-keys");t.exports=n?Object.defineProperties:function(e,t){a(e);for(var r,n=c(t),s=n.length,i=0;is;)o(n,r=t[s++])&&(~c(i,r)||i.push(r));return i}},{"../internals/array-includes":103,"../internals/has":148,"../internals/hidden-keys":149,"../internals/to-indexed-object":219}],186:[function(e,t,r){var n=e("../internals/object-keys-internal"),s=e("../internals/enum-bug-keys");t.exports=Object.keys||function(e){return n(e,s)}},{"../internals/enum-bug-keys":138,"../internals/object-keys-internal":185}],187:[function(e,t,r){"use strict";var n={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,i=s&&!n.call({1:2},1);r.f=i?function(e){e=s(this,e);return!!e&&e.enumerable}:n},{}],188:[function(e,t,r){var s=e("../internals/an-object"),i=e("../internals/a-possible-prototype");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),n=e instanceof Array}catch(e){}return function(e,t){return s(e),i(t),n?r.call(e,t):e.__proto__=t,e}}():void 0)},{"../internals/a-possible-prototype":90,"../internals/an-object":94}],189:[function(e,t,r){function n(a){return function(e){for(var t,r=l(e),n=u(r),s=n.length,i=0,o=[];ib)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})},{"../internals/global":147,"./fails":140}],204:[function(e,t,r){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],205:[function(e,t,r){t.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},{}],206:[function(e,t,r){var n=e("../internals/global");t.exports=function(t,r){try{Object.defineProperty(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},{"../internals/global":147}],207:[function(e,t,r){"use strict";var n=e("../internals/get-built-in"),s=e("../internals/object-define-property"),i=e("../internals/well-known-symbol"),o=e("../internals/descriptors"),a=i("species");t.exports=function(e){var t=n(e),e=s.f;o&&t&&!t[a]&&e(t,a,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":125,"../internals/get-built-in":143,"../internals/object-define-property":179,"../internals/well-known-symbol":237}],208:[function(e,t,r){var n=e("../internals/object-define-property").f,s=e("../internals/has"),i=e("../internals/well-known-symbol")("toStringTag");t.exports=function(e,t,r){e&&!s(e=r?e:e.prototype,i)&&n(e,i,{configurable:!0,value:t})}},{"../internals/has":148,"../internals/object-define-property":179,"../internals/well-known-symbol":237}],209:[function(e,t,r){var n=e("../internals/shared"),s=e("../internals/uid"),i=n("keys");t.exports=function(e){return i[e]||(i[e]=s(e))}},{"../internals/shared":211,"../internals/uid":234}],210:[function(e,t,r){var n=e("../internals/global"),s=e("../internals/set-global"),e="__core-js_shared__",e=n[e]||s(e,{});t.exports=e},{"../internals/global":147,"../internals/set-global":206}],211:[function(e,t,r){var n=e("../internals/is-pure"),s=e("../internals/shared-store");(t.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.17.2",mode:n?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":163,"../internals/shared-store":210}],212:[function(e,t,r){var n=e("../internals/an-object"),s=e("../internals/a-function"),i=e("../internals/well-known-symbol")("species");t.exports=function(e,t){var r,e=n(e).constructor;return void 0===e||null==(r=n(e)[i])?t:s(r)}},{"../internals/a-function":89,"../internals/an-object":94,"../internals/well-known-symbol":237}],213:[function(e,t,r){function n(i){return function(e,t){var r,n=a(c(e)),s=o(t),e=n.length;return s<0||e<=s?i?"":void 0:(t=n.charCodeAt(s))<55296||56319=t.length?{value:e.target=void 0,done:!0}:"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}},"values"),i.Arguments=i.Array,s("keys"),s("values"),s("entries")},{"../internals/add-to-unscopables":91,"../internals/define-iterator":123,"../internals/internal-state":157,"../internals/iterators":169,"../internals/to-indexed-object":219}],248:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/indexed-object"),i=e("../internals/to-indexed-object"),e=e("../internals/array-method-is-strict"),o=[].join,s=s!=Object,e=e("join",",");n({target:"Array",proto:!0,forced:s||!e},{join:function(e){return o.call(i(this),void 0===e?",":e)}})},{"../internals/array-method-is-strict":107,"../internals/export":139,"../internals/indexed-object":154,"../internals/to-indexed-object":219}],249:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/array-iteration").map;n({target:"Array",proto:!0,forced:!e("../internals/array-method-has-species-support")("map")},{map:function(e){return s(this,e,1l(t)?1:-1}))).length,o=0;o_;_++)c(w,T=E[_])&&!c(k,T)&&b(k,T,y(w,T));(k.prototype=j).constructor=k,a(i,v,k)}},{"../internals/classof-raw":114,"../internals/descriptors":125,"../internals/fails":140,"../internals/global":147,"../internals/has":148,"../internals/inherit-if-required":155,"../internals/is-forced":160,"../internals/is-symbol":165,"../internals/object-create":177,"../internals/object-define-property":179,"../internals/object-get-own-property-descriptor":180,"../internals/object-get-own-property-names":182,"../internals/redefine":197,"../internals/string-trim":215,"../internals/to-primitive":225}],255:[function(e,t,r){var n=e("../internals/export"),e=e("../internals/object-assign");n({target:"Object",stat:!0,forced:Object.assign!==e},{assign:e})},{"../internals/export":139,"../internals/object-assign":176}],256:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/object-to-array").entries;n({target:"Object",stat:!0},{entries:function(e){return s(e)}})},{"../internals/export":139,"../internals/object-to-array":189}],257:[function(e,t,r){var n=e("../internals/export"),s=e("../internals/to-object"),i=e("../internals/object-keys");n({target:"Object",stat:!0,forced:e("../internals/fails")(function(){i(1)})},{keys:function(e){return i(s(e))}})},{"../internals/export":139,"../internals/fails":140,"../internals/object-keys":186,"../internals/to-object":222}],258:[function(e,t,r){var n=e("../internals/to-string-tag-support"),s=e("../internals/redefine"),e=e("../internals/object-to-string");n||s(Object.prototype,"toString",e,{unsafe:!0})},{"../internals/object-to-string":190,"../internals/redefine":197,"../internals/to-string-tag-support":227}],259:[function(e,t,r){"use strict";var n,s,i,o,a=e("../internals/export"),c=e("../internals/is-pure"),m=e("../internals/global"),u=e("../internals/get-built-in"),l=e("../internals/native-promise-constructor"),p=e("../internals/redefine"),f=e("../internals/redefine-all"),h=e("../internals/object-set-prototype-of"),d=e("../internals/set-to-string-tag"),y=e("../internals/set-species"),b=e("../internals/is-object"),g=e("../internals/a-function"),v=e("../internals/an-instance"),w=e("../internals/inspect-source"),j=e("../internals/iterate"),x=e("../internals/check-correctness-of-iteration"),T=e("../internals/species-constructor"),k=e("../internals/task").set,E=e("../internals/microtask"),_=e("../internals/promise-resolve"),S=e("../internals/host-report-errors"),O=e("../internals/new-promise-capability"),A=e("../internals/perform"),D=e("../internals/internal-state"),I=e("../internals/is-forced"),C=e("../internals/well-known-symbol"),N=e("../internals/engine-is-browser"),R=e("../internals/engine-is-node"),M=e("../internals/engine-v8-version"),P=C("species"),L="Promise",B=D.get,q=D.set,F=D.getterFor(L),D=l&&l.prototype,U=l,G=D,X=m.TypeError,V=m.document,W=m.process,z=O.f,H=z,K=!!(V&&V.createEvent&&m.dispatchEvent),Y="function"==typeof PromiseRejectionEvent,$="unhandledrejection",J="rejectionhandled",Z=1,Q=2,ee=1,te=2,re=!1,I=I(L,function(){var e=w(U),t=e!==String(U);if(!t&&66===M)return!0;if(c&&!G.finally)return!0;if(51<=M&&/native code/.test(e))return!1;function r(e){e(function(){},function(){})}e=new U(function(e){e(1)});return(e.constructor={})[P]=r,!(re=e.then(function(){})instanceof r)||!t&&N&&!Y}),x=I||!x(function(e){U.all(e).catch(function(){})}),ne=function(e){var t;return!(!b(e)||"function"!=typeof(t=e.then))&&t},se=function(f,h){var d;f.notified||(f.notified=!0,d=f.reactions,E(function(){for(var s,e=f.value,t=f.state==Z,r=0;d.length>r;){var n,i,o,a=d[r++],c=t?a.ok:a.fail,u=a.resolve,l=a.reject,p=a.domain;try{c?(t||(f.rejection===te&&function(t){k.call(m,function(){var e=t.facade;if(R)W.emit("rejectionHandled",e);else ie(J,e,t.value)})}(f),f.rejection=ee),!0===c?n=e:(p&&p.enter(),n=c(e),p&&(p.exit(),o=!0)),n===a.promise?l(X("Promise-chain cycle")):(i=ne(n))?i.call(n,u,l):u(n)):l(e)}catch(e){p&&!o&&p.exit(),l(e)}}f.reactions=[],f.notified=!1,h&&!f.rejection&&(s=f,k.call(m,function(){var e,t=s.facade,r=s.value,n=oe(s);if(n&&(e=A(function(){R?W.emit("unhandledRejection",r,t):ie($,t,r)}),s.rejection=R||oe(s)?te:ee,e.error))throw e.value}))}))},ie=function(e,t,r){var n,s;K?((n=V.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),m.dispatchEvent(n)):n={promise:t,reason:r},!Y&&(s=m["on"+e])?s(n):e===$&&S("Unhandled promise rejection",r)},oe=function(e){return e.rejection!==ee&&!e.parent},ae=function(t,r,n){return function(e){t(r,e,n)}},ce=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=Q,se(e,!0))},ue=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw X("Promise can't be resolved itself");var n=ne(e);n?E(function(){var t={done:!1};try{n.call(e,ae(ue,t,r),ae(ce,t,r))}catch(e){ce(t,e,r)}}):(r.value=e,r.state=Z,se(r,!1))}catch(e){ce({done:!1},e,r)}}};if(I&&(G=(U=function(e){v(this,U,L),g(e),n.call(this);var t=B(this);try{e(ae(ue,t),ae(ce,t))}catch(e){ce(t,e)}}).prototype,(n=function(e){q(this,{type:L,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=f(G,{then:function(e,t){var r=F(this),n=z(T(this,U));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=R?W.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&se(r,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),s=function(){var e=new n,t=B(e);this.promise=e,this.resolve=ae(ue,t),this.reject=ae(ce,t)},O.f=z=function(e){return e===U||e===i?new s:H(e)},!c&&"function"==typeof l&&D!==Object.prototype)){o=D.then,re||(p(D,"then",function(e,t){var r=this;return new U(function(e,t){o.call(r,e,t)}).then(e,t)},{unsafe:!0}),p(D,"catch",G.catch,{unsafe:!0}));try{delete D.constructor}catch(e){}h&&h(D,G)}a({global:!0,wrap:!0,forced:I},{Promise:U}),d(U,L,!1,!0),y(L),i=u(L),a({target:L,stat:!0,forced:I},{reject:function(e){var t=z(this);return t.reject.call(void 0,e),t.promise}}),a({target:L,stat:!0,forced:c||I},{resolve:function(e){return _(c&&this===i?U:this,e)}}),a({target:L,stat:!0,forced:x},{all:function(e){var a=this,t=z(a),c=t.resolve,u=t.reject,r=A(function(){var n=g(a.resolve),s=[],i=0,o=1;j(e,function(e){var t=i++,r=!1;s.push(void 0),o++,n.call(a,e).then(function(e){r||(r=!0,s[t]=e,--o||c(s))},u)}),--o||c(s)});return r.error&&u(r.value),t.promise},race:function(e){var r=this,n=z(r),s=n.reject,t=A(function(){var t=g(r.resolve);j(e,function(e){t.call(r,e).then(n.resolve,s)})});return t.error&&s(t.value),n.promise}})},{"../internals/a-function":89,"../internals/an-instance":93,"../internals/check-correctness-of-iteration":113,"../internals/engine-is-browser":129,"../internals/engine-is-node":133,"../internals/engine-v8-version":136,"../internals/export":139,"../internals/get-built-in":143,"../internals/global":147,"../internals/host-report-errors":150,"../internals/inspect-source":156,"../internals/internal-state":157,"../internals/is-forced":160,"../internals/is-object":162,"../internals/is-pure":163,"../internals/iterate":166,"../internals/microtask":170,"../internals/native-promise-constructor":171,"../internals/new-promise-capability":174,"../internals/object-set-prototype-of":188,"../internals/perform":194,"../internals/promise-resolve":195,"../internals/redefine":197,"../internals/redefine-all":196,"../internals/set-species":207,"../internals/set-to-string-tag":208,"../internals/species-constructor":212,"../internals/task":216,"../internals/well-known-symbol":237}],260:[function(e,t,r){var n=e("../internals/descriptors"),s=e("../internals/global"),i=e("../internals/is-forced"),u=e("../internals/inherit-if-required"),l=e("../internals/create-non-enumerable-property"),o=e("../internals/object-define-property").f,a=e("../internals/object-get-own-property-names").f,p=e("../internals/is-regexp"),f=e("../internals/to-string"),h=e("../internals/regexp-flags"),c=e("../internals/regexp-sticky-helpers"),d=e("../internals/redefine"),m=e("../internals/fails"),y=e("../internals/has"),b=e("../internals/internal-state").enforce,g=e("../internals/set-species"),v=e("../internals/well-known-symbol"),w=e("../internals/regexp-unsupported-dot-all"),j=e("../internals/regexp-unsupported-ncg"),x=v("match"),T=s.RegExp,k=T.prototype,E=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,_=/a/g,S=/a/g,v=new T(_)!==_,O=c.UNSUPPORTED_Y,m=n&&(!v||O||w||j||m(function(){return S[x]=!1,T(_)!=_||T(S)==S||"/a/i"!=T(_,"i")})),A=function(e){for(var t,r=e.length,n=0,s="",i=!1;n<=r;n++)"\\"!==(t=e.charAt(n))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),s+=t):s+="[\\s\\S]":s+=t+e.charAt(++n);return s},D=function(e){for(var t,r=e.length,n=0,s="",i=[],o={},a=!1,c=!1,u=0,l="";n<=r;n++){if("\\"===(t=e.charAt(n)))t+=e.charAt(++n);else if("]"===t)a=!1;else if(!a)switch(!0){case"["===t:a=!0;break;case"("===t:E.test(e.slice(n+1))&&(n+=2,c=!0),s+=t,u++;continue;case">"===t&&c:if(""===l||y(o,l))throw new SyntaxError("Invalid capture group name");o[l]=!0,i.push([l,u]),c=!1,l="";continue}c?l+=t:s+=t}return[s,i]};if(i("RegExp",m)){for(var I=function(e,t){var r,n,s=this instanceof I,i=p(e),o=void 0===t,a=[],c=e;if(!s&&i&&o&&e.constructor===I)return e;if((i||e instanceof I)&&(e=e.source,o&&(t="flags"in c?c.flags:h.call(c))),e=void 0===e?"":f(e),t=void 0===t?"":f(t),c=e,i=t=w&&"dotAll"in _&&(r=!!t&&-1N;)!function(t){t in I||o(I,t,{configurable:!0,get:function(){return T[t]},set:function(e){T[t]=e}})}(C[N++]);(k.constructor=I).prototype=k,d(s,"RegExp",I)}g("RegExp")},{"../internals/create-non-enumerable-property":120,"../internals/descriptors":125,"../internals/fails":140,"../internals/global":147,"../internals/has":148,"../internals/inherit-if-required":155,"../internals/internal-state":157,"../internals/is-forced":160,"../internals/is-regexp":164,"../internals/object-define-property":179,"../internals/object-get-own-property-names":182,"../internals/redefine":197,"../internals/regexp-flags":200,"../internals/regexp-sticky-helpers":201,"../internals/regexp-unsupported-dot-all":202,"../internals/regexp-unsupported-ncg":203,"../internals/set-species":207,"../internals/to-string":228,"../internals/well-known-symbol":237}],261:[function(e,t,r){"use strict";var n=e("../internals/export"),e=e("../internals/regexp-exec");n({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e})},{"../internals/export":139,"../internals/regexp-exec":199}],262:[function(e,t,r){"use strict";var n=e("../internals/redefine"),s=e("../internals/an-object"),i=e("../internals/to-string"),o=e("../internals/fails"),a=e("../internals/regexp-flags"),c="toString",u=RegExp.prototype,l=u[c],e=o(function(){return"/a/b"!=l.call({source:"a",flags:"b"})}),o=l.name!=c;(e||o)&&n(RegExp.prototype,c,function(){var e=s(this),t=i(e.source),r=e.flags;return"/"+t+"/"+i(void 0===r&&e instanceof RegExp&&!("flags"in u)?a.call(e):r)},{unsafe:!0})},{"../internals/an-object":94,"../internals/fails":140,"../internals/redefine":197,"../internals/regexp-flags":200,"../internals/to-string":228}],263:[function(e,t,r){"use strict";var n=e("../internals/export"),s=e("../internals/not-a-regexp"),i=e("../internals/require-object-coercible"),o=e("../internals/to-string");n({target:"String",proto:!0,forced:!e("../internals/correct-is-regexp-logic")("includes")},{includes:function(e){return!!~o(i(this)).indexOf(o(s(e)),1=t.length?{value:void 0,done:!0}:(r=n(t,r),e.index+=r.length,{value:r,done:!1})})},{"../internals/define-iterator":123,"../internals/internal-state":157,"../internals/string-multibyte":213,"../internals/to-string":228}],265:[function(e,t,r){"use strict";var n=e("../internals/fix-regexp-well-known-symbol-logic"),u=e("../internals/an-object"),l=e("../internals/to-length"),p=e("../internals/to-string"),s=e("../internals/require-object-coercible"),f=e("../internals/advance-string-index"),h=e("../internals/regexp-exec-abstract");n("match",function(n,a,c){return[function(e){var t=s(this),r=null==e?void 0:e[n];return void 0!==r?r.call(e,t):new RegExp(e)[n](p(t))},function(e){var t=u(this),r=p(e),e=c(a,t,r);if(e.done)return e.value;if(!t.global)return h(t,r);for(var n=t.unicode,s=[],i=t.lastIndex=0;null!==(o=h(t,r));){var o=p(o[0]);""===(s[i]=o)&&(t.lastIndex=f(r,l(t.lastIndex),n)),i++}return 0===i?null:s}]})},{"../internals/advance-string-index":92,"../internals/an-object":94,"../internals/fix-regexp-well-known-symbol-logic":141,"../internals/regexp-exec-abstract":198,"../internals/require-object-coercible":204,"../internals/to-length":221,"../internals/to-string":228}],266:[function(e,t,r){"use strict";var n=e("../internals/fix-regexp-well-known-symbol-logic"),s=e("../internals/fails"),x=e("../internals/an-object"),T=e("../internals/to-integer"),k=e("../internals/to-length"),E=e("../internals/to-string"),i=e("../internals/require-object-coercible"),_=e("../internals/advance-string-index"),S=e("../internals/get-substitution"),O=e("../internals/regexp-exec-abstract"),o=e("../internals/well-known-symbol")("replace"),A=Math.max,D=Math.min,e="$0"==="a".replace(/./,"$0"),a=!!/./[o]&&""===/./[o]("a","$0");n("replace",function(e,v,w){var j=a?"$":"$0";return[function(e,t){var r=i(this),n=null==e?void 0:e[o];return void 0!==n?n.call(e,r,t):v.call(E(r),e,t)},function(e,t){var r=x(this),n=E(e);if("string"==typeof t&&-1===t.indexOf(j)&&-1===t.indexOf("$<")){e=w(v,r,n,t);if(e.done)return e.value}var s="function"==typeof t;s||(t=E(t));var i,o=r.global;o&&(i=r.unicode,r.lastIndex=0);for(var a=[];;){if(null===(f=O(r,n)))break;if(a.push(f),!o)break;""===E(f[0])&&(r.lastIndex=_(n,k(r.lastIndex),i))}for(var c,u="",l=0,p=0;p")})||!e||a)},{"../internals/advance-string-index":92,"../internals/an-object":94,"../internals/fails":140,"../internals/fix-regexp-well-known-symbol-logic":141,"../internals/get-substitution":146,"../internals/regexp-exec-abstract":198,"../internals/require-object-coercible":204,"../internals/to-integer":220,"../internals/to-length":221,"../internals/to-string":228,"../internals/well-known-symbol":237}],267:[function(e,t,r){"use strict";var n=e("../internals/fix-regexp-well-known-symbol-logic"),o=e("../internals/an-object"),a=e("../internals/require-object-coercible"),c=e("../internals/same-value"),u=e("../internals/to-string"),l=e("../internals/regexp-exec-abstract");n("search",function(n,s,i){return[function(e){var t=a(this),r=null==e?void 0:e[n];return void 0!==r?r.call(e,t):new RegExp(e)[n](u(t))},function(e){var t=o(this),r=u(e),e=i(s,t,r);if(e.done)return e.value;e=t.lastIndex;c(e,0)||(t.lastIndex=0);r=l(t,r);return c(t.lastIndex,e)||(t.lastIndex=e),null===r?-1:r.index}]})},{"../internals/an-object":94,"../internals/fix-regexp-well-known-symbol-logic":141,"../internals/regexp-exec-abstract":198,"../internals/require-object-coercible":204,"../internals/same-value":205,"../internals/to-string":228}],268:[function(e,t,r){"use strict";var n=e("../internals/fix-regexp-well-known-symbol-logic"),l=e("../internals/is-regexp"),b=e("../internals/an-object"),p=e("../internals/require-object-coercible"),g=e("../internals/species-constructor"),v=e("../internals/advance-string-index"),w=e("../internals/to-length"),j=e("../internals/to-string"),x=e("../internals/regexp-exec-abstract"),f=e("../internals/regexp-exec"),s=e("../internals/regexp-sticky-helpers"),e=e("../internals/fails"),T=s.UNSUPPORTED_Y,h=[].push,k=Math.min;n("split",function(s,d,m){var y="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(e,t){var r=j(p(this)),n=void 0===t?4294967295:t>>>0;if(0==n)return[];if(void 0===e)return[r];if(!l(e))return d.call(r,e,n);for(var s,i,o,a=[],t=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,u=new RegExp(e.source,t+"g");(s=f.call(u,r))&&!(c<(i=u.lastIndex)&&(a.push(r.slice(c,s.index)),1=n));)u.lastIndex===s.index&&u.lastIndex++;return c===r.length?!o&&u.test("")||a.push(""):a.push(r.slice(c)),a.length>n?a.slice(0,n):a}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:d.call(this,e,t)}:d;return[function(e,t){var r=p(this),n=null==e?void 0:e[s];return void 0!==n?n.call(e,r,t):y.call(j(r),e,t)},function(e,t){var r=b(this),n=j(e),s=m(y,r,n,t,y!==d);if(s.done)return s.value;var e=g(r,RegExp),i=r.unicode,s=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(T?"g":"y"),o=new e(T?"^(?:"+r.source+")":r,s),a=void 0===t?4294967295:t>>>0;if(0==a)return[];if(0===n.length)return null===x(o,n)?[n]:[];for(var c=0,u=0,l=[];u]/;t.exports=function(e){var t,r=""+e,e=o.exec(r);if(!e)return r;var n="",s=0,i=0;for(s=e.index;sr&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.once=function(e,t){if(!c(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var r,n,s,i;if(!c(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(r=this._events[e]).length,n=-1,r===t||c(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(u(r)){for(i=s;0>1,l=-7,p=r?s-1:0,f=r?-1:1,r=e[t+p];for(p+=f,i=r&(1<<-l)-1,r>>=-l,l+=a;0>=-l,l+=n;0>1,p=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,h=n?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-o))<1&&(o--,n*=2),2<=(t+=1<=o+l?p/n:p*Math.pow(2,1-l))*n&&(o++,n/=2),u<=o+l?(a=0,o=u):1<=o+l?(a=(t*n-1)*Math.pow(2,s),o+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,s),o=0));8<=s;e[r+f]=255&a,f+=h,a/=256,s-=8);for(o=o<>>6)+l(128|63&t):l(224|t>>>12&15)+l(128|t>>>6&63)+l(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return l(240|t>>>18&7)+l(128|t>>>12&63)+l(128|t>>>6&63)+l(128|63&t)}function n(e){var t=[0,2,1][e.length%3],e=e.charCodeAt(0)<<16|(1>>18),u.charAt(e>>>12&63),2<=t?"=":u.charAt(e>>>6&63),1<=t?"=":u.charAt(63&e)].join("")}function s(e){return h(f(String(e)))}function c(e){return e.replace(/[+\/]/g,function(e){return"+"==e?"-":"_"}).replace(/=/g,"")}function i(e,t){return t?c(s(e)):s(e)}var e,o=(t=t||{}).Base64,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=function(e){for(var t={},r=0,n=e.length;r>>18)+u.charAt(i>>>12&63)+(void 0!==o?u.charAt(i>>>6&63):"=")+(void 0!==a?u.charAt(63&i):"=")}return t?c(r):r});function d(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return l(55296+(t>>>10))+l(56320+(1023&t));case 3:return l((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return l((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}}function m(e){var t=e.length,r=t%4,e=(0>>16),l(e>>>8&255),l(255&e)]).length-=[0,0,2,1][r],e.join("")}function y(e){return x(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))}function b(e){return String(e).replace(/[-_]/g,function(e){return"-"==e?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")}function g(e){return e=b(e),j(x(e))}var v,w=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,j=function(e){return e.replace(w,d)},x=t.atob&&"function"==typeof t.atob?function(e){return t.atob(e)}:function(e){return e.replace(/\S{1,4}/g,m)};t.Uint8Array&&(v=function(e){return Uint8Array.from(y(b(e)),function(e){return e.charCodeAt(0)})});var T;return t.Base64={VERSION:"2.6.4",atob:y,btoa:h,fromBase64:g,toBase64:i,utob:f,encode:i,encodeURI:function(e){return i(e,!0)},btou:j,decode:g,noConflict:function(){var e=t.Base64;return t.Base64=o,e},fromUint8Array:e,toUint8Array:v},"function"==typeof Object.defineProperty&&(T=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},t.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",T(function(){return g(this)})),Object.defineProperty(String.prototype,"toBase64",T(function(e){return i(this,e)})),Object.defineProperty(String.prototype,"toBase64URI",T(function(){return i(this,!0)}))}),t.Meteor&&(Base64=t.Base64),void 0!==k&&k.exports&&(k.exports.Base64=t.Base64),{Base64:t.Base64}},"object"==typeof n&&void 0!==k?k.exports=t(e):t(e)}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],315:[function(e,t,r){"use strict";t.exports=function(r,n,s){if(!r)throw new TypeError("argument dest is required");if(!n)throw new TypeError("argument src is required");void 0===s&&(s=!0);return Object.getOwnPropertyNames(n).forEach(function(e){var t;!s&&i.call(r,e)||(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(r,e,t))}),r};var i=Object.prototype.hasOwnProperty},{}],316:[function(e,t,r){"use strict";function n(){this._types=Object.create(null),this._extensions=Object.create(null);for(var e=0;e= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=b-1,v=Math.floor,w=String.fromCharCode;function j(e){throw new RangeError(p[e])}function h(e,t){for(var r=e.length,n=[];r--;)n[r]=t(e[r]);return n}function d(e,t){var r=e.split("@"),n="";return 1>>10&1023|55296),e=56320|1023&e),t+=w(e)}).join("")}function T(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,r){var n=0;for(e=r?v(e/a):e>>1,e+=v(e/t);f*g>>1v((y-l)/i))&&j("overflow"),l+=a*i,!(a<(a=o<=f?1:f+g<=o?g:o-f));o+=b)i>v(y/(a=b-a))&&j("overflow"),i*=a;f=k(l-s,t=c.length+1,0==s),v(l/t)>y-p&&j("overflow"),p+=v(l/t),l%=t,c.splice(l++,0,p)}return m(c)}function _(e){for(var t,r,n,s,i,o,a,c,u,l,p=[],f=(e=x(e)).length,h=128,d=72,m=t=0;mv((y-t)/(c=r+1))&&j("overflow"),t+=(s-h)*c,h=s,m=0;my&&j("overflow"),a==h){for(i=t,o=b;!(i<(u=o<=d?1:d+g<=o?g:o-d));o+=b)p.push(w(T(u+(l=i-u)%(u=b-u),0))),i=v(l/u);p.push(w(T(i,0))),d=k(t,c,r==n),t=0,++r}++t,++h}return p.join("")}if(s={version:"1.4.1",ucs2:{decode:x,encode:m},decode:E,encode:_,toASCII:function(e){return d(e,function(e){return u.test(e)?"xn--"+_(e):e})},toUnicode:function(e){return d(e,function(e){return c.test(e)?E(e.slice(4).toLowerCase()):e})}},0,t&&r)if(O.exports==t)r.exports=s;else for(i in s)s.hasOwnProperty(i)&&(t[i]=s[i]);else e.punycode=s}(this)}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],326:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){r=r||"=";var s={};if("string"!=typeof e||0===e.length)return s;var i=/\+/g;e=e.split(t=t||"&");t=1e3;n&&"number"==typeof n.maxKeys&&(t=n.maxKeys);var o=e.length;0t.highWaterMark&&(t.highWaterMark=(h<=(r=e)?r=h:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function v(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(g("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?m.nextTick(w,e):w(e))}function w(e){g("emit readable"),e.emit("readable"),E(e)}function j(e,t){t.readingMore||(t.readingMore=!0,m.nextTick(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;ei.length?i.length:e;if(o===i.length?s+=i:s+=i.slice(0,e),0===(e-=o)){o===i.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r).data=i.slice(o);break}++n}return t.length-=n,s}:function(e,t){var r=l.allocUnsafe(e),n=t.head,s=1;n.data.copy(r),e-=n.data.length;for(;n=n.next;){var i=n.data,o=e>i.length?i.length:e;if(i.copy(r,r.length-e,0,o),0===(e-=o)){o===i.length?(++s,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=i.slice(o);break}++s}return t.length-=s,r})(e,t);return n}(e,t.buffer,t.decoder),r);var r}function S(e){var t=e._readableState;if(0=t.highWaterMark||t.ended))return g("read: emitReadable",t.length,t.ended),(0===t.length&&t.ended?S:v)(this),null;if(0===(e=d(e,t))&&t.ended)return 0===t.length&&S(this),null;var n=t.needReadable;return g("need readable",n),(0===t.length||t.length-e>>0),s=this.head,i=0;s;)t=s.data,r=i,t.copy(n,r),i+=s.data.length,s=s.next;return n},s),n&&n.inspect&&n.inspect.custom&&(t.exports.prototype[n.inspect.custom]=function(){var e=n.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":343,util:84}],336:[function(e,t,r){"use strict";var i=e("process-nextick-args");function o(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return n||s?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||i.nextTick(o,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(i.nextTick(o,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":323}],337:[function(e,t,r){t.exports=e("events").EventEmitter},{events:301}],338:[function(e,t,r){t.exports=e("./readable").PassThrough},{"./readable":339}],339:[function(e,t,r){(((r=t.exports=e("./lib/_stream_readable.js")).Stream=r).Readable=r).Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":330,"./lib/_stream_passthrough.js":331,"./lib/_stream_readable.js":332,"./lib/_stream_transform.js":333,"./lib/_stream_writable.js":334}],340:[function(e,t,r){t.exports=e("./readable").Transform},{"./readable":339}],341:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":334}],342:[function(e,t,r){t=function(o){"use strict";var c,e=Object.prototype,u=e.hasOwnProperty,t="function"==typeof Symbol?Symbol:{},n=t.iterator||"@@iterator",r=t.asyncIterator||"@@asyncIterator",s=t.toStringTag||"@@toStringTag";function i(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(e){i=function(e,t,r){return e[t]=r}}function a(e,t,r,n){var s,i,o,a,t=t&&t.prototype instanceof y?t:y,t=Object.create(t.prototype),n=new E(n||[]);return t._invoke=(s=e,i=r,o=n,a=p,function(e,t){if(a===h)throw new Error("Generator is already running");if(a===d){if("throw"===e)throw t;return S()}for(o.method=e,o.arg=t;;){var r=o.delegate;if(r){var n=function e(t,r){var n=t.iterator[r.method];if(n===c){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=c,e(t,r),"throw"===r.method))return m;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return m}var n=l(n,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,m;n=n.arg;if(!n)return r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m;{if(!n.done)return n;r[t.resultName]=n.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=c)}r.delegate=null;return m}(r,o);if(n){if(n===m)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(a===p)throw a=d,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);a=h;n=l(s,i,o);if("normal"===n.type){if(a=o.done?d:f,n.arg!==m)return{value:n.arg,done:o.done}}else"throw"===n.type&&(a=d,o.method="throw",o.arg=n.arg)}}),t}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}o.wrap=a;var p="suspendedStart",f="suspendedYield",h="executing",d="completed",m={};function y(){}function b(){}function g(){}var v={};i(v,n,function(){return this});t=Object.getPrototypeOf,t=t&&t(t(_([])));t&&t!==e&&u.call(t,n)&&(v=t);var w=g.prototype=y.prototype=Object.create(v);function j(e){["next","throw","return"].forEach(function(t){i(e,t,function(e){return this._invoke(t,e)})})}function x(o,a){var t;this._invoke=function(r,n){function e(){return new a(function(e,t){!function t(e,r,n,s){e=l(o[e],o,r);if("throw"!==e.type){var i=e.arg;return(r=i.value)&&"object"==typeof r&&u.call(r,"__await")?a.resolve(r.__await).then(function(e){t("next",e,n,s)},function(e){t("throw",e,n,s)}):a.resolve(r).then(function(e){i.value=e,n(i)},function(e){return t("throw",e,n,s)})}s(e.arg)}(r,n,e,t)})}return t=t?t.then(e,e):e()}}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function _(t){if(t){var e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,e=function e(){for(;++r"===i?(E(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=T.TEXT):(v(i)&&(t.state=T.SGML_DECL_QUOTED),t.sgmlDecl+=i);continue;case T.SGML_DECL_QUOTED:i===t.q&&(t.state=T.SGML_DECL,t.q=""),t.sgmlDecl+=i;continue;case T.DOCTYPE:">"===i?(t.state=T.TEXT,E(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=i,"["===i?t.state=T.DOCTYPE_DTD:v(i)&&(t.state=T.DOCTYPE_QUOTED,t.q=i));continue;case T.DOCTYPE_QUOTED:t.doctype+=i,i===t.q&&(t.q="",t.state=T.DOCTYPE);continue;case T.DOCTYPE_DTD:t.doctype+=i,"]"===i?t.state=T.DOCTYPE:v(i)&&(t.state=T.DOCTYPE_DTD_QUOTED,t.q=i);continue;case T.DOCTYPE_DTD_QUOTED:t.doctype+=i,i===t.q&&(t.state=T.DOCTYPE_DTD,t.q="");continue;case T.COMMENT:"-"===i?t.state=T.COMMENT_ENDING:t.comment+=i;continue;case T.COMMENT_ENDING:"-"===i?(t.state=T.COMMENT_ENDED,t.comment=S(t.opt,t.comment),t.comment&&E(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+i,t.state=T.COMMENT);continue;case T.COMMENT_ENDED:">"!==i?(D(t,"Malformed comment"),t.comment+="--"+i,t.state=T.COMMENT):t.state=T.TEXT;continue;case T.CDATA:"]"===i?t.state=T.CDATA_ENDING:t.cdata+=i;continue;case T.CDATA_ENDING:"]"===i?t.state=T.CDATA_ENDING_2:(t.cdata+="]"+i,t.state=T.CDATA);continue;case T.CDATA_ENDING_2:">"===i?(t.cdata&&E(t,"oncdata",t.cdata),E(t,"onclosecdata"),t.cdata="",t.state=T.TEXT):"]"===i?t.cdata+="]":(t.cdata+="]]"+i,t.state=T.CDATA);continue;case T.PROC_INST:"?"===i?t.state=T.PROC_INST_ENDING:g(i)?t.state=T.PROC_INST_BODY:t.procInstName+=i;continue;case T.PROC_INST_BODY:if(!t.procInstBody&&g(i))continue;"?"===i?t.state=T.PROC_INST_ENDING:t.procInstBody+=i;continue;case T.PROC_INST_ENDING:">"===i?(E(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=T.TEXT):(t.procInstBody+="?"+i,t.state=T.PROC_INST_BODY);continue;case T.OPEN_TAG:w(m,i)?t.tagName+=i:(function(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,r=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(r.ns=t.ns);e.attribList.length=0,E(e,"onopentagstart",r)}(t),">"===i?N(t):"/"===i?t.state=T.OPEN_TAG_SLASH:(g(i)||D(t,"Invalid character in tag name"),t.state=T.ATTRIB));continue;case T.OPEN_TAG_SLASH:">"===i?(N(t,!0),R(t)):(D(t,"Forward-slash in opening tag not followed by >"),t.state=T.ATTRIB);continue;case T.ATTRIB:if(g(i))continue;">"===i?N(t):"/"===i?t.state=T.OPEN_TAG_SLASH:w(d,i)?(t.attribName=i,t.attribValue="",t.state=T.ATTRIB_NAME):D(t,"Invalid attribute name");continue;case T.ATTRIB_NAME:"="===i?t.state=T.ATTRIB_VALUE:">"===i?(D(t,"Attribute without value"),t.attribValue=t.attribName,C(t),N(t)):g(i)?t.state=T.ATTRIB_NAME_SAW_WHITE:w(m,i)?t.attribName+=i:D(t,"Invalid attribute name");continue;case T.ATTRIB_NAME_SAW_WHITE:if("="===i)t.state=T.ATTRIB_VALUE;else{if(g(i))continue;D(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",E(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===i?N(t):w(d,i)?(t.attribName=i,t.state=T.ATTRIB_NAME):(D(t,"Invalid attribute name"),t.state=T.ATTRIB)}continue;case T.ATTRIB_VALUE:if(g(i))continue;v(i)?(t.q=i,t.state=T.ATTRIB_VALUE_QUOTED):(D(t,"Unquoted attribute value"),t.state=T.ATTRIB_VALUE_UNQUOTED,t.attribValue=i);continue;case T.ATTRIB_VALUE_QUOTED:if(i!==t.q){"&"===i?t.state=T.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=i;continue}C(t),t.q="",t.state=T.ATTRIB_VALUE_CLOSED;continue;case T.ATTRIB_VALUE_CLOSED:g(i)?t.state=T.ATTRIB:">"===i?N(t):"/"===i?t.state=T.OPEN_TAG_SLASH:w(d,i)?(D(t,"No whitespace between attributes"),t.attribName=i,t.attribValue="",t.state=T.ATTRIB_NAME):D(t,"Invalid attribute name");continue;case T.ATTRIB_VALUE_UNQUOTED:if(!function(e){return">"===e||g(e)}(i)){"&"===i?t.state=T.ATTRIB_VALUE_ENTITY_U:t.attribValue+=i;continue}C(t),">"===i?N(t):t.state=T.ATTRIB;continue;case T.CLOSE_TAG:if(t.tagName)">"===i?R(t):w(m,i)?t.tagName+=i:t.script?(t.script+=""===i?R(t):D(t,"Invalid characters in closing tag");continue;case T.TEXT_ENTITY:case T.ATTRIB_VALUE_ENTITY_Q:case T.ATTRIB_VALUE_ENTITY_U:switch(t.state){case T.TEXT_ENTITY:r=T.TEXT,n="textNode";break;case T.ATTRIB_VALUE_ENTITY_Q:r=T.ATTRIB_VALUE_QUOTED,n="attribValue";break;case T.ATTRIB_VALUE_ENTITY_U:r=T.ATTRIB_VALUE_UNQUOTED,n="attribValue"}";"===i?(t[n]+=function(e){var t,r=e.entity,n=r.toLowerCase(),s="";if(e.ENTITIES[r])return e.ENTITIES[r];if(e.ENTITIES[n])return e.ENTITIES[n];"#"===(r=n).charAt(0)&&(s="x"===r.charAt(1)?(r=r.slice(2),(t=parseInt(r,16)).toString(16)):(r=r.slice(1),(t=parseInt(r,10)).toString(10)));if(r=r.replace(/^0+/,""),isNaN(t)||s.toLowerCase()!==r)return D(e,"Invalid character entity"),"&"+e.entity+";";return String.fromCodePoint(t)}(t),t.entity="",t.state=r):w(t.entity.length?b:y,i)?t.entity+=i:(D(t,"Invalid character in entity name"),t[n]+="&"+t.entity+i,t.entity="",t.state=r);continue;default:throw new Error(t,"Unknown state: "+t.state)}}t.position>=t.bufferCheckPosition&&function(e){for(var t=Math.max(a.MAX_BUFFER_LENGTH,10),r=0,n=0,s=c.length;n",lt:"<",quot:'"',apos:"'"},a.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(a.ENTITIES).forEach(function(e){var t=a.ENTITIES[e],t="number"==typeof t?String.fromCharCode(t):t;a.ENTITIES[e]=t}),a.STATE)a.STATE[a.STATE[e]]=e;function k(e,t,r){e[t]&&e[t](r)}function E(e,t,r){e.textNode&&_(e),k(e,t,r)}function _(e){e.textNode=S(e.opt,e.textNode),e.textNode&&k(e,"ontext",e.textNode),e.textNode=""}function S(e,t){return e.trim&&(t=t.trim()),t=e.normalize?t.replace(/\s+/g," "):t}function O(e,t){return _(e),e.trackPosition&&(t+="\nLine: "+e.line+"\nColumn: "+e.column+"\nChar: "+e.c),t=new Error(t),e.error=t,k(e,"onerror",t),e}function A(e){return e.sawRoot&&!e.closedRoot&&D(e,"Unclosed root tag"),e.state!==T.BEGIN&&e.state!==T.BEGIN_WHITESPACE&&e.state!==T.TEXT&&O(e,"Unexpected end"),_(e),e.c="",e.closed=!0,k(e,"onend"),s.call(e,e.strict,e.opt),e}function D(e,t){if("object"!=typeof e||!(e instanceof s))throw new Error("bad call to strictFail");e.strict&&O(e,t)}function I(e,t){var r=e.indexOf(":")<0?["",e]:e.split(":"),n=r[0],r=r[1];return t&&"xmlns"===e&&(n="xmlns",r=""),{prefix:n,local:r}}function C(e){var t,r,n;e.strict||(e.attribName=e.attribName[e.looseCase]()),-1!==e.attribList.indexOf(e.attribName)||e.tag.attributes.hasOwnProperty(e.attribName)||(e.opt.xmlns?(n=(r=I(e.attribName,!0)).prefix,t=r.local,"xmlns"===n&&("xml"===t&&e.attribValue!==p?D(e,"xml: prefix must be bound to "+p+"\nActual: "+e.attribValue):"xmlns"===t&&e.attribValue!==f?D(e,"xmlns: prefix must be bound to "+f+"\nActual: "+e.attribValue):(r=e.tag,n=e.tags[e.tags.length-1]||e,r.ns===n.ns&&(r.ns=Object.create(n.ns)),r.ns[t]=e.attribValue)),e.attribList.push([e.attribName,e.attribValue])):(e.tag.attributes[e.attribName]=e.attribValue,E(e,"onattribute",{name:e.attribName,value:e.attribValue}))),e.attribName=e.attribValue=""}function N(t,e){if(t.opt.xmlns){var r=t.tag,n=I(t.tagName);r.prefix=n.prefix,r.local=n.local,r.uri=r.ns[n.prefix]||"",r.prefix&&!r.uri&&(D(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),r.uri=n.prefix);n=t.tags[t.tags.length-1]||t;r.ns&&n.ns!==r.ns&&Object.keys(r.ns).forEach(function(e){E(t,"onopennamespace",{prefix:e,uri:r.ns[e]})});for(var s=0,i=t.attribList.length;s",r.tagName="",void(r.state=T.SCRIPT);E(r,"onscript",r.script),r.script=""}for(var e=r.tags.length,t=r.tagName,n=t=!r.strict?t[r.looseCase]():t;e--;){if(r.tags[e].name===n)break;D(r,"Unexpected close tag")}if(e<0)return D(r,"Unmatched closing tag: "+r.tagName),r.textNode+="",void(r.state=T.TEXT);r.tagName=t;for(var s=r.tags.length;s-- >e;){var i=r.tag=r.tags.pop();r.tagName=r.tag.name,E(r,"onclosetag",r.tagName);var o,a={};for(o in i.ns)a[o]=i.ns[o];var c=r.tags[r.tags.length-1]||r;r.opt.xmlns&&i.ns!==c.ns&&Object.keys(i.ns).forEach(function(e){var t=i.ns[e];E(r,"onclosenamespace",{prefix:e,uri:t})})}0===e&&(r.closedRoot=!0),r.tagName=r.attribValue=r.attribName="",r.attribList.length=0,r.state=T.TEXT}function M(e,t){"<"===t?(e.state=T.OPEN_WAKA,e.startTagPosition=e.position):g(t)||(D(e,"Non-whitespace before first tag."),e.textNode=t,e.state=T.TEXT)}function P(e,t){var r="";return r=t>10),s%1024+56320)),(t+1===r||16384>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e){var t,r=this.lastTotal-this.lastNeed,n=(n=this,128!=(192&(t=e)[0])?(n.lastNeed=0,"\ufffd"):1")||0<=e.indexOf("<"))},h=function(e){return""},t=function(e){return e.replace("]]>","]]]]>")},i.Builder=(e.prototype.buildObject=function(e){var c,t,u,l=this.options.attrkey,p=this.options.charkey;return 1===Object.keys(e).length&&this.options.rootName===s[.2].rootName?e=e[t=Object.keys(e)[0]]:t=this.options.rootName,u=this,c=function(e,t){var r,n,s,i,o,a;if("object"!=typeof t)u.options.cdata&&f(t)?e.raw(h(t)):e.txt(t);else if(Array.isArray(t)){for(i in t)if(d.call(t,i))for(o in n=t[i])s=n[o],e=c(e.ele(o),s).up()}else for(o in t)if(d.call(t,o))if(n=t[o],o===l){if("object"==typeof n)for(r in n)a=n[r],e=e.att(r,a)}else if(o===p)e=u.options.cdata&&f(n)?e.raw(h(n)):e.txt(n);else if(Array.isArray(n))for(i in n)d.call(n,i)&&(e=("string"==typeof(s=n[i])?u.options.cdata&&f(s)?e.ele(o).raw(h(s)):e.ele(o,s):c(e.ele(o),s)).up());else e="object"==typeof n?c(e.ele(o),n).up():"string"==typeof n&&u.options.cdata&&f(n)?e.ele(o).raw(h(n)).up():(null==n&&(n=""),e.ele(o,n.toString()).up());return e},t=r.create(t,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),c(t,e).end(this.options.renderOpts)},e)}.call(this)},{"./defaults":355,xmlbuilder:391}],355:[function(e,t,r){!function(){r.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}.call(this)},{}],356:[function(a,e,u){!function(){"use strict";function s(e,t){return function(){return e.apply(t,arguments)}}var e,i,t,f,h,o,c,n,d={}.hasOwnProperty;function r(e){var t,r,n;if(this.parseStringPromise=s(this.parseStringPromise,this),this.parseString=s(this.parseString,this),this.reset=s(this.reset,this),this.assignOrPush=s(this.assignOrPush,this),this.processAsync=s(this.processAsync,this),!(this instanceof u.Parser))return new u.Parser(e);for(t in this.options={},r=i[.2])d.call(r,t)&&(n=r[t],this.options[t]=n);for(t in e)d.call(e,t)&&(n=e[t],this.options[t]=n);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(o.normalize)),this.reset()}c=a("sax"),t=a("events"),e=a("./bom"),o=a("./processors"),n=a("timers").setImmediate,i=a("./defaults").defaults,f=function(e){return"object"==typeof e&&null!=e&&0===Object.keys(e).length},h=function(e,t,r){for(var n=0,s=e.length;n":"attribute: {"+e+"}, parent: <"+this.parent.name+">"},e.prototype.isEqualNode=function(e){return e.namespaceURI===this.namespaceURI&&(e.prefix===this.prefix&&(e.localName===this.localName&&e.value===this.value))},e)}.call(this)},{"./NodeType":360,"./XMLNode":382}],364:[function(t,i,e){!function(){var r,e,s={}.hasOwnProperty;function n(e,t){if(n.__super__.constructor.call(this,e),null==t)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=r.CData,this.value=this.stringify.cdata(t)}r=t("./NodeType"),e=t("./XMLCharacterData"),i.exports=(function(e,t){for(var r in t)s.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))},n)}.call(this)},{"./NodeType":360,"./XMLCharacterData":365}],365:[function(r,n,e){!function(){var e,s={}.hasOwnProperty;function t(e){t.__super__.constructor.call(this,e),this.value=""}e=r("./XMLNode"),n.exports=(function(e,t){for(var r in t)s.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),t.prototype.clone=function(){return Object.create(this)},t.prototype.substringData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.insertData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(e){return!!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.data===this.data},t)}.call(this)},{"./XMLNode":382}],366:[function(t,i,e){!function(){var r,e,s={}.hasOwnProperty;function n(e,t){if(n.__super__.constructor.call(this,e),null==t)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=r.Comment,this.value=this.stringify.comment(t)}r=t("./NodeType"),e=t("./XMLCharacterData"),i.exports=(function(e,t){for(var r in t)s.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))},n)}.call(this)},{"./NodeType":360,"./XMLCharacterData":365}],367:[function(n,s,e){!function(){var e,t;function r(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}e=n("./XMLDOMErrorHandler"),t=n("./XMLDOMStringList"),s.exports=(Object.defineProperty(r.prototype,"parameterNames",{get:function(){return new t(Object.keys(this.defaultParams))}}),r.prototype.getParameter=function(e){return this.params.hasOwnProperty(e)?this.params[e]:null},r.prototype.canSetParameter=function(e,t){return!0},r.prototype.setParameter=function(e,t){return null!=t?this.params[e]=t:delete this.params[e]},r)}.call(this)},{"./XMLDOMErrorHandler":368,"./XMLDOMStringList":370}],368:[function(e,t,r){!function(){function e(){}t.exports=(e.prototype.handleError=function(e){throw new Error(e)},e)}.call(this)},{}],369:[function(e,t,r){!function(){function e(){}t.exports=(e.prototype.hasFeature=function(e,t){return!0},e.prototype.createDocumentType=function(e,t,r){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(e,t,r){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented.")},e)}.call(this)},{}],370:[function(e,t,r){!function(){function e(e){this.arr=e||[]}t.exports=(Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(e){return this.arr[e]||null},e.prototype.contains=function(e){return-1!==this.arr.indexOf(e)},e)}.call(this)},{}],371:[function(t,r,e){!function(){var o,e,s={}.hasOwnProperty;function a(e,t,r,n,s,i){if(a.__super__.constructor.call(this,e),null==t)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==r)throw new Error("Missing DTD attribute name. "+this.debugInfo(t));if(!n)throw new Error("Missing DTD attribute type. "+this.debugInfo(t));if(!s)throw new Error("Missing DTD attribute default. "+this.debugInfo(t));if(!(s=0!==s.indexOf("#")?"#"+s:s).match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(t));if(i&&!s.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(t));this.elementName=this.stringify.name(t),this.type=o.AttributeDeclaration,this.attributeName=this.stringify.name(r),this.attributeType=this.stringify.dtdAttType(n),i&&(this.defaultValue=this.stringify.dtdAttDefault(i)),this.defaultValueType=s}e=t("./XMLNode"),o=t("./NodeType"),r.exports=(function(e,t){for(var r in t)s.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(a,e),a.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))},a)}.call(this)},{"./NodeType":360,"./XMLNode":382}],372:[function(t,r,e){!function(){var n,e,s={}.hasOwnProperty;function i(e,t,r){if(i.__super__.constructor.call(this,e),null==t)throw new Error("Missing DTD element name. "+this.debugInfo());r=r||"(#PCDATA)",Array.isArray(r)&&(r="("+r.join(",")+")"),this.name=this.stringify.name(t),this.type=n.ElementDeclaration,this.value=this.stringify.dtdElementValue(r)}e=t("./XMLNode"),n=t("./NodeType"),r.exports=(function(e,t){for(var r in t)s.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),i.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))},i)}.call(this)},{"./NodeType":360,"./XMLNode":382}],373:[function(t,r,e){!function(){var s,e,i,o={}.hasOwnProperty;function a(e,t,r,n){if(a.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD entity name. "+this.debugInfo(r));if(null==n)throw new Error("Missing DTD entity value. "+this.debugInfo(r));if(this.pe=!!t,this.name=this.stringify.name(r),this.type=s.EntityDeclaration,i(n)){if(!n.pubID&&!n.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(r));if(n.pubID&&!n.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(r));if(this.internal=!1,null!=n.pubID&&(this.pubID=this.stringify.dtdPubID(n.pubID)),null!=n.sysID&&(this.sysID=this.stringify.dtdSysID(n.sysID)),null!=n.nData&&(this.nData=this.stringify.dtdNData(n.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(r))}else this.value=this.stringify.dtdEntityValue(n),this.internal=!0}i=t("./Utility").isObject,e=t("./XMLNode"),s=t("./NodeType"),r.exports=(function(e,t){for(var r in t)o.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(a,e),Object.defineProperty(a.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(a.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(a.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(a.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(a.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(a.prototype,"xmlVersion",{get:function(){return null}}),a.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},a)}.call(this)},{"./NodeType":360,"./Utility":361,"./XMLNode":382}],374:[function(t,r,e){!function(){var n,e,s={}.hasOwnProperty;function i(e,t,r){if(i.__super__.constructor.call(this,e),null==t)throw new Error("Missing DTD notation name. "+this.debugInfo(t));if(!r.pubID&&!r.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(t));this.name=this.stringify.name(t),this.type=n.NotationDeclaration,null!=r.pubID&&(this.pubID=this.stringify.dtdPubID(r.pubID)),null!=r.sysID&&(this.sysID=this.stringify.dtdSysID(r.sysID))}e=t("./XMLNode"),n=t("./NodeType"),r.exports=(function(e,t){for(var r in t)s.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(i,e),Object.defineProperty(i.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(i.prototype,"systemId",{get:function(){return this.sysID}}),i.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))},i)}.call(this)},{"./NodeType":360,"./XMLNode":382}],375:[function(t,r,e){!function(){var s,e,i,o={}.hasOwnProperty;function a(e,t,r,n){a.__super__.constructor.call(this,e),i(t)&&(t=(e=t).version,r=e.encoding,n=e.standalone),t=t||"1.0",this.type=s.Declaration,this.version=this.stringify.xmlVersion(t),null!=r&&(this.encoding=this.stringify.xmlEncoding(r)),null!=n&&(this.standalone=this.stringify.xmlStandalone(n))}i=t("./Utility").isObject,e=t("./XMLNode"),s=t("./NodeType"),r.exports=(function(e,t){for(var r in t)o.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(a,e),a.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},a)}.call(this)},{"./NodeType":360,"./Utility":361,"./XMLNode":382}],376:[function(t,p,e){!function(){var c,i,r,n,s,o,e,u,a={}.hasOwnProperty;function l(e,t,r){var n,s,i,o,a;if(l.__super__.constructor.call(this,e),this.type=c.DocType,e.children)for(s=0,i=(o=e.children).length;s":"/>")+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=i.InsideTag}else this.writerOptions.state=i.OpenTag,r=this.writer.indent(e,this.writerOptions,this.currentLevel)+""),r+=this.writer.endline(e,this.writerOptions,this.currentLevel);return this.onData(r,this.currentLevel),e.isOpen=!0}},k.prototype.closeNode=function(e){var t;if(!e.isClosed)return t="",this.writerOptions.state=i.CloseTag,t=e.type===u.Element?this.writer.indent(e,this.writerOptions,this.currentLevel)+""+this.writer.endline(e,this.writerOptions,this.currentLevel):this.writer.indent(e,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(e,this.writerOptions,this.currentLevel),this.writerOptions.state=i.None,this.onData(t,this.currentLevel),e.isClosed=!0},k.prototype.onData=function(e,t){return this.documentStarted=!0,this.onDataCallback(e,t+1)},k.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},k.prototype.debugInfo=function(e){return null==e?"":"node: <"+e+">"},k.prototype.ele=function(){return this.element.apply(this,arguments)},k.prototype.nod=function(e,t,r){return this.node(e,t,r)},k.prototype.txt=function(e){return this.text(e)},k.prototype.dat=function(e){return this.cdata(e)},k.prototype.com=function(e){return this.comment(e)},k.prototype.ins=function(e,t){return this.instruction(e,t)},k.prototype.dec=function(e,t,r){return this.declaration(e,t,r)},k.prototype.dtd=function(e,t,r){return this.doctype(e,t,r)},k.prototype.e=function(e,t,r){return this.element(e,t,r)},k.prototype.n=function(e,t,r){return this.node(e,t,r)},k.prototype.t=function(e){return this.text(e)},k.prototype.d=function(e){return this.cdata(e)},k.prototype.c=function(e){return this.comment(e)},k.prototype.r=function(e){return this.raw(e)},k.prototype.i=function(e,t){return this.instruction(e,t)},k.prototype.att=function(){return(this.currentNode&&this.currentNode.type===u.DocType?this.attList:this.attribute).apply(this,arguments)},k.prototype.a=function(){return(this.currentNode&&this.currentNode.type===u.DocType?this.attList:this.attribute).apply(this,arguments)},k.prototype.ent=function(e,t){return this.entity(e,t)},k.prototype.pent=function(e,t){return this.pEntity(e,t)},k.prototype.not=function(e,t){return this.notation(e,t)},k)}.call(this)},{"./NodeType":360,"./Utility":361,"./WriterState":362,"./XMLAttribute":363,"./XMLCData":364,"./XMLComment":366,"./XMLDTDAttList":371,"./XMLDTDElement":372,"./XMLDTDEntity":373,"./XMLDTDNotation":374,"./XMLDeclaration":375,"./XMLDocType":376,"./XMLDocument":377,"./XMLElement":380,"./XMLProcessingInstruction":384,"./XMLRaw":385,"./XMLStringWriter":387,"./XMLStringifier":388,"./XMLText":389}],379:[function(n,i,e){!function(){var t,e,s={}.hasOwnProperty;function r(e){r.__super__.constructor.call(this,e),this.type=t.Dummy}e=n("./XMLNode"),t=n("./NodeType"),i.exports=(function(e,t){for(var r in t)s.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(r,e),r.prototype.clone=function(){return Object.create(this)},r.prototype.toString=function(e){return""},r)}.call(this)},{"./NodeType":360,"./XMLNode":382}],380:[function(r,n,e){!function(){var a,s,e,i,o,c,t,u={}.hasOwnProperty;function l(e,t,r){var n,s,i,o;if(l.__super__.constructor.call(this,e),null==t)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(t),this.type=a.Element,this.attribs={},(this.schemaTypeInfo=null)!=r&&this.attribute(r),e.type===a.Document&&(this.isRoot=!0,(this.documentObject=e).rootObject=this,e.children))for(s=0,i=(o=e.children).length;s":null!=(t=this.parent)&&t.name?"node: <"+e+">, parent: <"+this.parent.name+">":"node: <"+e+">":""},g.prototype.ele=function(e,t,r){return this.element(e,t,r)},g.prototype.nod=function(e,t,r){return this.node(e,t,r)},g.prototype.txt=function(e){return this.text(e)},g.prototype.dat=function(e){return this.cdata(e)},g.prototype.com=function(e){return this.comment(e)},g.prototype.ins=function(e,t){return this.instruction(e,t)},g.prototype.doc=function(){return this.document()},g.prototype.dec=function(e,t,r){return this.declaration(e,t,r)},g.prototype.e=function(e,t,r){return this.element(e,t,r)},g.prototype.n=function(e,t,r){return this.node(e,t,r)},g.prototype.t=function(e){return this.text(e)},g.prototype.d=function(e){return this.cdata(e)},g.prototype.c=function(e){return this.comment(e)},g.prototype.r=function(e){return this.raw(e)},g.prototype.i=function(e,t){return this.instruction(e,t)},g.prototype.u=function(){return this.up()},g.prototype.importXMLBuilder=function(e){return this.importDocument(e)},g.prototype.replaceChild=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.removeChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.appendChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.hasChildNodes=function(){return 0!==this.children.length},g.prototype.cloneNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isSupported=function(e,t){return!0},g.prototype.hasAttributes=function(){return 0!==this.attribs.length},g.prototype.compareDocumentPosition=function(e){var t;return this===e?0:this.document()!==e.document()?(t=r.Disconnected|r.ImplementationSpecific,Math.random()<.5?t|=r.Preceding:t|=r.Following,t):this.isAncestor(e)?r.Contains|r.Preceding:this.isDescendant(e)?r.Contains|r.Following:this.isPreceding(e)?r.Preceding:r.Following},g.prototype.isSameNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.lookupPrefix=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isDefaultNamespace=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.lookupNamespaceURI=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.isEqualNode=function(e){var t,r,n;if(e.nodeType!==this.nodeType)return!1;if(e.children.length!==this.children.length)return!1;for(t=r=0,n=this.children.length-1;0<=n?r<=n:n<=r;t=0<=n?++r:--r)if(!this.children[t].isEqualNode(e.children[t]))return!1;return!0},g.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.setUserData=function(e,t,r){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.getUserData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},g.prototype.contains=function(e){return!!e&&(e===this||this.isDescendant(e))},g.prototype.isDescendant=function(e){for(var t,r=this.children,n=0,s=r.length;n"),this.stream.write(this.endline(e,t,r)),t.state=h.None,this.closeNode(e,t,r)},n.prototype.element=function(e,t,r){var n,s,i,o,a,c,u,l,p;for(u in this.openNode(e,t,r=r||0),t.state=h.OpenTag,this.stream.write(this.indent(e,t,r)+"<"+e.name),l=e.attribs)d.call(l,u)&&(n=l[u],this.attribute(n,t,r));if(o=0===(i=e.children.length)?null:e.children[0],0===i||e.children.every(function(e){return(e.type===f.Text||e.type===f.Raw)&&""===e.value}))t.allowEmpty?(this.stream.write(">"),t.state=h.CloseTag,this.stream.write("")):(t.state=h.CloseTag,this.stream.write(t.spaceBeforeSlash+"/>"));else if(!t.pretty||1!==i||o.type!==f.Text&&o.type!==f.Raw||null==o.value){for(this.stream.write(">"+this.endline(e,t,r)),t.state=h.InsideTag,a=0,c=(p=e.children).length;a")}else this.stream.write(">"),t.state=h.InsideTag,t.suppressPrettyCount++,this.writeChildNode(o,t,r+1),t.suppressPrettyCount--,t.state=h.CloseTag,this.stream.write("");return this.stream.write(this.endline(e,t,r)),t.state=h.None,this.closeNode(e,t,r)},n.prototype.processingInstruction=function(e,t,r){return this.stream.write(n.__super__.processingInstruction.call(this,e,t,r))},n.prototype.raw=function(e,t,r){return this.stream.write(n.__super__.raw.call(this,e,t,r))},n.prototype.text=function(e,t,r){return this.stream.write(n.__super__.text.call(this,e,t,r))},n.prototype.dtdAttList=function(e,t,r){return this.stream.write(n.__super__.dtdAttList.call(this,e,t,r))},n.prototype.dtdElement=function(e,t,r){return this.stream.write(n.__super__.dtdElement.call(this,e,t,r))},n.prototype.dtdEntity=function(e,t,r){return this.stream.write(n.__super__.dtdEntity.call(this,e,t,r))},n.prototype.dtdNotation=function(e,t,r){return this.stream.write(n.__super__.dtdNotation.call(this,e,t,r))},n)}.call(this)},{"./NodeType":360,"./WriterState":362,"./XMLWriterBase":390}],387:[function(r,n,e){!function(){var e,s={}.hasOwnProperty;function t(e){t.__super__.constructor.call(this,e)}e=r("./XMLWriterBase"),n.exports=(function(e,t){for(var r in t)s.call(t,r)&&(e[r]=t[r]);function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype}(t,e),t.prototype.document=function(e,t){var r,n,s,i,o;for(t=this.filterOptions(t),i="",n=0,s=(o=e.children).length;n","]]]]>"),this.assertLegalChar(e))},e.prototype.comment=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},e.prototype.raw=function(e){return this.options.noValidation?e:""+e||""},e.prototype.attValue=function(e){return this.options.noValidation?e:this.assertLegalChar(this.attEscape(e=""+e||""))},e.prototype.insTarget=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.insValue=function(e){if(this.options.noValidation)return e;if((e=""+e||"").match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return this.assertLegalChar(e)},e.prototype.xmlVersion=function(e){if(this.options.noValidation)return e;if(!(e=""+e||"").match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},e.prototype.xmlEncoding=function(e){if(this.options.noValidation)return e;if(!(e=""+e||"").match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+e);return this.assertLegalChar(e)},e.prototype.xmlStandalone=function(e){return this.options.noValidation?e:e?"yes":"no"},e.prototype.dtdPubID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdSysID=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdElementValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdAttType=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdAttDefault=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdEntityValue=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.dtdNData=function(e){return this.options.noValidation?e:this.assertLegalChar(""+e||"")},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(e){var t;if(this.options.noValidation)return e;if("1.0"===this.options.version){if(t=e.match(/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+e+" at index "+t.index)}else if("1.1"===this.options.version&&(t=e.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/)))throw new Error("Invalid character in string: "+e+" at index "+t.index);return e},e.prototype.assertLegalName=function(e){if(this.options.noValidation)return e;if(this.assertLegalChar(e),!e.match(/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/))throw new Error("Invalid character in name");return e},e.prototype.textEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&").replace(//g,">").replace(/\r/g," "))},e.prototype.attEscape=function(e){var t;return this.options.noValidation?e:(t=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&").replace(/"+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.comment=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+"\x3c!-- ",t.state=g.InsideTag,n+=e.value,t.state=g.CloseTag,n+=" --\x3e"+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.declaration=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+"",n+=this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.docType=function(e,t,r){var n,s,i,o,a;if(this.openNode(e,t,r=r||0),t.state=g.OpenTag,o=this.indent(e,t,r),o+="",o+=this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),o},e.prototype.element=function(e,t,r){var n,s,i,o,a,c,u,l,p,f,h,d,m=!1,y="";for(p in this.openNode(e,t,r=r||0),t.state=g.OpenTag,y+=this.indent(e,t,r)+"<"+e.name,f=e.attribs)v.call(f,p)&&(n=f[p],y+=this.attribute(n,t,r));if(o=0===(i=e.children.length)?null:e.children[0],0===i||e.children.every(function(e){return(e.type===b.Text||e.type===b.Raw)&&""===e.value}))t.allowEmpty?(y+=">",t.state=g.CloseTag,y+=""+this.endline(e,t,r)):(t.state=g.CloseTag,y+=t.spaceBeforeSlash+"/>"+this.endline(e,t,r));else if(!t.pretty||1!==i||o.type!==b.Text&&o.type!==b.Raw||null==o.value){if(t.dontPrettyTextNodes)for(a=0,u=(h=e.children).length;a"+this.endline(e,t,r),t.state=g.InsideTag,c=0,l=(d=e.children).length;c",m&&t.suppressPrettyCount--,y+=this.endline(e,t,r),t.state=g.None}else y+=">",t.state=g.InsideTag,t.suppressPrettyCount++,m=!0,y+=this.writeChildNode(o,t,r+1),t.suppressPrettyCount--,m=!1,t.state=g.CloseTag,y+=""+this.endline(e,t,r);return this.closeNode(e,t,r),y},e.prototype.writeChildNode=function(e,t,r){switch(e.type){case b.CData:return this.cdata(e,t,r);case b.Comment:return this.comment(e,t,r);case b.Element:return this.element(e,t,r);case b.Raw:return this.raw(e,t,r);case b.Text:return this.text(e,t,r);case b.ProcessingInstruction:return this.processingInstruction(e,t,r);case b.Dummy:return"";case b.Declaration:return this.declaration(e,t,r);case b.DocType:return this.docType(e,t,r);case b.AttributeDeclaration:return this.dtdAttList(e,t,r);case b.ElementDeclaration:return this.dtdElement(e,t,r);case b.EntityDeclaration:return this.dtdEntity(e,t,r);case b.NotationDeclaration:return this.dtdNotation(e,t,r);default:throw new Error("Unknown XML node type: "+e.constructor.name)}},e.prototype.processingInstruction=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+"",n+=this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.raw=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r),t.state=g.InsideTag,n+=e.value,t.state=g.CloseTag,n+=this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.text=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r),t.state=g.InsideTag,n+=e.value,t.state=g.CloseTag,n+=this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.dtdAttList=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+""+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.dtdElement=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+""+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.dtdEntity=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+""+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.dtdNotation=function(e,t,r){var n;return this.openNode(e,t,r),t.state=g.OpenTag,n=this.indent(e,t,r)+""+this.endline(e,t,r),t.state=g.None,this.closeNode(e,t,r),n},e.prototype.openNode=function(e,t,r){},e.prototype.closeNode=function(e,t,r){},e.prototype.openAttribute=function(e,t,r){},e.prototype.closeAttribute=function(e,t,r){},e)}.call(this)},{"./NodeType":360,"./Utility":361,"./WriterState":362,"./XMLCData":364,"./XMLComment":366,"./XMLDTDAttList":371,"./XMLDTDElement":372,"./XMLDTDEntity":373,"./XMLDTDNotation":374,"./XMLDeclaration":375,"./XMLDocType":376,"./XMLDummy":379,"./XMLElement":380,"./XMLProcessingInstruction":384,"./XMLRaw":385,"./XMLText":389}],391:[function(u,l,e){!function(){var e=u("./Utility"),s=e.assign,i=e.isFunction,t=u("./XMLDOMImplementation"),o=u("./XMLDocument"),a=u("./XMLDocumentCB"),r=u("./XMLStringWriter"),n=u("./XMLStreamWriter"),c=u("./NodeType"),e=u("./WriterState");l.exports.create=function(e,t,r,n){if(null==e)throw new Error("Root element needs a name.");return n=s({},t,r,n),e=(r=new o(n)).element(e),n.headless||(r.declaration(n),null==n.pubID&&null==n.sysID||r.dtd(n)),e},l.exports.begin=function(e,t,r){var n;return i(e)&&(t=(n=[e,t])[0],r=n[1],e={}),t?new a(e,t,r):new o(e)},l.exports.stringWriter=function(e){return new r(e)},l.exports.streamWriter=function(e,t){return new n(e,t)},l.exports.implementation=new t,l.exports.nodeType=c,l.exports.writerState=e}.call(this)},{"./NodeType":360,"./Utility":361,"./WriterState":362,"./XMLDOMImplementation":369,"./XMLDocument":377,"./XMLDocumentCB":378,"./XMLStreamWriter":386,"./XMLStringWriter":387}],392:[function(e,t,r){t.exports=function(){for(var e={},t=0;ta?t=e(t):t.length>5]|=128<>>9<<4)]=t;for(var r=1732584193,n=-271733879,s=-1732584194,i=271733878,o=0;o>>32-s,r)}function p(e,t,r,n,s,i,o){return a(t&r|~t&n,e,t,s,i,o)}function f(e,t,r,n,s,i,o){return a(t&n|r&~n,e,t,s,i,o)}function h(e,t,r,n,s,i,o){return a(t^r^n,e,t,s,i,o)}function d(e,t,r,n,s,i,o){return a(r^(t|~n),e,t,s,i,o)}function m(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}t.exports=function(e){return n.hash(e,s,16)}},{"./helpers":394}],396:[function(e,t,r){"use strict";var n=e("./helpers");function s(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r,n,s,i=Array(80),o=1732584193,a=-271733879,c=-1732584194,u=271733878,l=-1009589776,p=0;p>16)+(t>>16)+(r>>16)<<16|65535&r}function w(e,t){return e<>>32-t}t.exports=function(e){return n.hash(e,s,20,!0)}},{"./helpers":394}],397:[function(e,t,r){"use strict";t.exports=function(){return function(){}}},{}],398:[function(s,i,e){!function(n){!function(){"use strict";var t=s("@babel/runtime/helpers/interopRequireDefault")(s("@babel/runtime/helpers/typeof")),r=s("stream").Stream,e=s("../lib/common/utils/isArray").isArray;i.exports.string=function(e){return"string"==typeof e},i.exports.array=e,i.exports.buffer=n.isBuffer,i.exports.writableStream=function(e){return e instanceof r&&"function"==typeof e._write&&"object"===(0,t.default)(e._writableState)}}.call(this)}.call(this,{isBuffer:s("../node_modules/is-buffer/index.js")})},{"../lib/common/utils/isArray":61,"../node_modules/is-buffer/index.js":312,"@babel/runtime/helpers/interopRequireDefault":74,"@babel/runtime/helpers/typeof":75,stream:345}],399:[function(e,t,r){"use strict";e=e("immediate"),t=t.exports={};function n(){}t.nextTick=e,t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=n,t.addListener=n,t.once=n,t.off=n,t.removeListener=n,t.removeAllListeners=n,t.emit=n,t.prependListener=n,t.prependOnceListener=n,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{immediate:305}],400:[function(n,e,s){!function(u){!function(){"use strict";n("core-js/modules/es.regexp.exec.js"),n("core-js/modules/es.string.search.js");var o=n("./lib/request"),e=n("./lib/response"),a=n("xtend"),t=n("builtin-status-codes"),c=n("url"),r=s;r.request=function(e,t){e="string"==typeof e?c.parse(e):a(e);var r=-1===u.location.protocol.search(/^https?:$/)?"http:":"",n=e.protocol||r,s=e.hostname||e.host,i=e.port,r=e.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?n+"//"+s:"")+(i?":"+i:"")+r,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};e=new o(e);return t&&e.on("response",t),e},r.get=function(e,t){t=r.request(e,t);return t.end(),t},r.ClientRequest=o,r.IncomingMessage=e.IncomingMessage,r.Agent=function(){},r.Agent.defaultMaxSockets=4,r.globalAgent=new r.Agent,r.STATUS_CODES=t,r.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/request":402,"./lib/response":403,"builtin-status-codes":87,"core-js/modules/es.regexp.exec.js":261,"core-js/modules/es.string.search.js":267,url:404,xtend:392}],401:[function(a,e,c){!function(o){!function(){"use strict";a("core-js/modules/es.object.to-string.js"),a("core-js/modules/es.promise.js"),a("core-js/modules/es.array-buffer.constructor.js"),a("core-js/modules/es.array-buffer.slice.js"),a("core-js/modules/es.array.slice.js"),c.fetch=i(o.fetch)&&i(o.ReadableStream),c.writableStream=i(o.WritableStream),c.abortController=i(o.AbortController),c.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),c.blobConstructor=!0}catch(e){}var t;function r(){if(void 0!==t)return t;if(o.XMLHttpRequest){t=new o.XMLHttpRequest;try{t.open("GET",o.XDomainRequest?"/":"https://example.com")}catch(e){t=null}}else t=null;return t}function e(e){var t=r();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}var n=void 0!==o.ArrayBuffer,s=n&&i(o.ArrayBuffer.prototype.slice);function i(e){return"function"==typeof e}c.arraybuffer=c.fetch||n&&e("arraybuffer"),c.msstream=!c.fetch&&s&&e("ms-stream"),c.mozchunkedarraybuffer=!c.fetch&&n&&e("moz-chunked-arraybuffer"),c.overrideMimeType=c.fetch||!!r()&&i(r().overrideMimeType),c.vbArray=i(o.VBArray),t=null}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"core-js/modules/es.array-buffer.constructor.js":239,"core-js/modules/es.array-buffer.slice.js":240,"core-js/modules/es.array.slice.js":250,"core-js/modules/es.object.to-string.js":258,"core-js/modules/es.promise.js":259}],402:[function(i,o,e){!function(p,f,h){!function(){"use strict";i("core-js/modules/es.object.to-string.js"),i("core-js/modules/es.regexp.to-string.js"),i("core-js/modules/web.dom-collections.for-each.js"),i("core-js/modules/es.object.keys.js"),i("core-js/modules/es.array.concat.js"),i("core-js/modules/es.array.map.js"),i("core-js/modules/es.function.name.js"),i("core-js/modules/es.promise.js"),i("core-js/modules/es.regexp.exec.js"),i("core-js/modules/es.string.split.js");var c=i("./capability"),e=i("inherits"),t=i("./response"),s=i("readable-stream"),u=i("to-arraybuffer"),r=t.IncomingMessage,l=t.readyStates;t=o.exports=function(t){var r=this;s.Writable.call(r),r._opts=t,r._body=[],r._headers={},t.auth&&r.setHeader("Authorization","Basic "+new h(t.auth).toString("base64")),Object.keys(t.headers).forEach(function(e){r.setHeader(e,t.headers[e])});var e,n=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!c.abortController)e=!(n=!1);else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!c.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}r._mode=(e=e,n=n,c.fetch&&n?"fetch":c.mozchunkedarraybuffer?"moz-chunked-arraybuffer":c.msstream?"ms-stream":c.arraybuffer&&e?"arraybuffer":c.vbArray&&e?"text:vbarray":"text"),r._fetchTimer=null,r.on("finish",function(){r._onFinish()})};e(t,s.Writable),t.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===n.indexOf(r)&&(this._headers[r]={name:e,value:t})},t.prototype.getHeader=function(e){e=this._headers[e.toLowerCase()];return e?e.value:null},t.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},t.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts,r=t._headers,n=null;"GET"!==e.method&&"HEAD"!==e.method&&(n=c.arraybuffer?u(h.concat(t._body)):c.blobConstructor?new f.Blob(t._body.map(function(e){return u(e)}),{type:(r["content-type"]||{}).value||""}):h.concat(t._body).toString());var s=[];if(Object.keys(r).forEach(function(e){var t=r[e].name,e=r[e].value;Array.isArray(e)?e.forEach(function(e){s.push([t,e])}):s.push([t,e])}),"fetch"===t._mode){var i,o=null;c.abortController&&(o=(i=new AbortController).signal,t._fetchAbortController=i,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=f.setTimeout(function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()},e.requestTimeout))),f.fetch(t._opts.url,{method:t._opts.method,headers:s,body:n||void 0,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:o}).then(function(e){t._fetchResponse=e,t._connect()},function(e){f.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)})}else{var a=t._xhr=new f.XMLHttpRequest;try{a.open(t._opts.method,t._opts.url,!0)}catch(e){return void p.nextTick(function(){t.emit("error",e)})}"responseType"in a&&(a.responseType=t._mode.split(":")[0]),"withCredentials"in a&&(a.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(a.timeout=e.requestTimeout,a.ontimeout=function(){t.emit("requestTimeout")}),s.forEach(function(e){a.setRequestHeader(e[0],e[1])}),t._response=null,a.onreadystatechange=function(){switch(a.readyState){case l.LOADING:case l.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(a.onprogress=function(){t._onXHRProgress()}),a.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{a.send(n)}catch(e){return void p.nextTick(function(){t.emit("error",e)})}}}},t.prototype._onXHRProgress=function(){!function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return}}(this._xhr)||this._destroyed||(this._response||this._connect(),this._response._onXHRProgress())},t.prototype._connect=function(){var t=this;t._destroyed||(t._response=new r(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",function(e){t.emit("error",e)}),t.emit("response",t._response))},t.prototype._write=function(e,t,r){this._body.push(e),r()},t.prototype.abort=t.prototype.destroy=function(){this._destroyed=!0,f.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},t.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),s.Writable.prototype.end.call(this,e,t,r)},t.prototype.flushHeaders=function(){},t.prototype.setTimeout=function(){},t.prototype.setNoDelay=function(){},t.prototype.setSocketKeepAlive=function(){};var n=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}.call(this)}.call(this,i("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},i("buffer").Buffer)},{"./capability":401,"./response":403,_process:399,buffer:85,"core-js/modules/es.array.concat.js":241,"core-js/modules/es.array.map.js":249,"core-js/modules/es.function.name.js":253,"core-js/modules/es.object.keys.js":257,"core-js/modules/es.object.to-string.js":258,"core-js/modules/es.promise.js":259,"core-js/modules/es.regexp.exec.js":261,"core-js/modules/es.regexp.to-string.js":262,"core-js/modules/es.string.split.js":268,"core-js/modules/web.dom-collections.for-each.js":296,inherits:311,"readable-stream":339,"to-arraybuffer":348}],403:[function(r,e,n){!function(l,p,f){!function(){"use strict";r("core-js/modules/web.dom-collections.for-each.js"),r("core-js/modules/es.object.to-string.js"),r("core-js/modules/es.promise.js"),r("core-js/modules/es.regexp.exec.js"),r("core-js/modules/es.string.split.js"),r("core-js/modules/es.string.match.js"),r("core-js/modules/es.array.iterator.js"),r("core-js/modules/es.array-buffer.slice.js"),r("core-js/modules/es.typed-array.uint8-array.js"),r("core-js/modules/es.typed-array.copy-within.js"),r("core-js/modules/es.typed-array.every.js"),r("core-js/modules/es.typed-array.fill.js"),r("core-js/modules/es.typed-array.filter.js"),r("core-js/modules/es.typed-array.find.js"),r("core-js/modules/es.typed-array.find-index.js"),r("core-js/modules/es.typed-array.for-each.js"),r("core-js/modules/es.typed-array.includes.js"),r("core-js/modules/es.typed-array.index-of.js"),r("core-js/modules/es.typed-array.iterator.js"),r("core-js/modules/es.typed-array.join.js"),r("core-js/modules/es.typed-array.last-index-of.js"),r("core-js/modules/es.typed-array.map.js"),r("core-js/modules/es.typed-array.reduce.js"),r("core-js/modules/es.typed-array.reduce-right.js"),r("core-js/modules/es.typed-array.reverse.js"),r("core-js/modules/es.typed-array.set.js"),r("core-js/modules/es.typed-array.slice.js"),r("core-js/modules/es.typed-array.some.js"),r("core-js/modules/es.typed-array.sort.js"),r("core-js/modules/es.typed-array.subarray.js"),r("core-js/modules/es.typed-array.to-locale-string.js"),r("core-js/modules/es.typed-array.to-string.js"),r("core-js/modules/es.array.slice.js");var a=r("./capability"),e=r("inherits"),c=r("readable-stream"),u=n.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},t=n.IncomingMessage=function(e,t,r,n){var s=this;if(c.Readable.call(s),s._mode=r,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",function(){l.nextTick(function(){s.emit("close")})}),"fetch"===r){var i=function t(){o.read().then(function(e){if(!s._destroyed){if(e.done)return p.clearTimeout(n),void s.push(null);s.push(new f(e.value)),t()}}).catch(function(e){p.clearTimeout(n),s._destroyed||s.emit("error",e)})};if(s._fetchResponse=t,s.url=t.url,s.statusCode=t.status,s.statusMessage=t.statusText,t.headers.forEach(function(e,t){s.headers[t.toLowerCase()]=e,s.rawHeaders.push(t,e)}),a.writableStream){r=new WritableStream({write:function(r){return new Promise(function(e,t){s._destroyed?t():s.push(new f(r))?e():s._resumeFetch=e})},close:function(){p.clearTimeout(n),s._destroyed||s.push(null)},abort:function(e){s._destroyed||s.emit("error",e)}});try{return void t.body.pipeTo(r).catch(function(e){p.clearTimeout(n),s._destroyed||s.emit("error",e)})}catch(e){}}var o=t.body.getReader();i()}else s._xhr=e,s._pos=0,s.url=e.responseURL,s.statusCode=e.status,s.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);t&&("set-cookie"===(e=t[1].toLowerCase())?(void 0===s.headers[e]&&(s.headers[e]=[]),s.headers[e].push(t[2])):void 0!==s.headers[e]?s.headers[e]+=", "+t[2]:s.headers[e]=t[2],s.rawHeaders.push(t[1],t[2]))}),s._charset="x-user-defined",a.overrideMimeType||(!(e=s.rawHeaders["mime-type"])||(e=e.match(/;\s*charset=([^;])(;|$)/))&&(s._charset=e[1].toLowerCase()),s._charset||(s._charset="utf-8"))};e(t,c.Readable),t.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},t.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text:vbarray":if(e.readyState!==u.DONE)break;try{r=new p.VBArray(e.responseBody).toArray()}catch(e){}if(null!==r){t.push(new f(r));break}case"text":try{r=e.responseText}catch(e){t._mode="text:vbarray";break}if(r.length>t._pos){var n=r.substr(t._pos);if("x-user-defined"===t._charset){for(var s=new f(n.length),i=0;it._pos&&(t.push(new f(new Uint8Array(o.result.slice(t._pos)))),t._pos=o.result.byteLength)},o.onload=function(){t.push(null)},o.readAsArrayBuffer(r)}t._xhr.readyState===u.DONE&&"ms-stream"!==t._mode&&t.push(null)}}.call(this)}.call(this,r("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r("buffer").Buffer)},{"./capability":401,_process:399,buffer:85,"core-js/modules/es.array-buffer.slice.js":240,"core-js/modules/es.array.iterator.js":247,"core-js/modules/es.array.slice.js":250,"core-js/modules/es.object.to-string.js":258,"core-js/modules/es.promise.js":259,"core-js/modules/es.regexp.exec.js":261,"core-js/modules/es.string.match.js":265,"core-js/modules/es.string.split.js":268,"core-js/modules/es.typed-array.copy-within.js":272,"core-js/modules/es.typed-array.every.js":273,"core-js/modules/es.typed-array.fill.js":274,"core-js/modules/es.typed-array.filter.js":275,"core-js/modules/es.typed-array.find-index.js":276,"core-js/modules/es.typed-array.find.js":277,"core-js/modules/es.typed-array.for-each.js":278,"core-js/modules/es.typed-array.includes.js":279,"core-js/modules/es.typed-array.index-of.js":280,"core-js/modules/es.typed-array.iterator.js":281,"core-js/modules/es.typed-array.join.js":282,"core-js/modules/es.typed-array.last-index-of.js":283,"core-js/modules/es.typed-array.map.js":284,"core-js/modules/es.typed-array.reduce-right.js":285,"core-js/modules/es.typed-array.reduce.js":286,"core-js/modules/es.typed-array.reverse.js":287,"core-js/modules/es.typed-array.set.js":288,"core-js/modules/es.typed-array.slice.js":289,"core-js/modules/es.typed-array.some.js":290,"core-js/modules/es.typed-array.sort.js":291,"core-js/modules/es.typed-array.subarray.js":292,"core-js/modules/es.typed-array.to-locale-string.js":293,"core-js/modules/es.typed-array.to-string.js":294,"core-js/modules/es.typed-array.uint8-array.js":295,"core-js/modules/web.dom-collections.for-each.js":296,inherits:311,"readable-stream":339}],404:[function(e,t,r){"use strict";var _=e("@babel/runtime/helpers/interopRequireDefault")(e("@babel/runtime/helpers/typeof"));e("core-js/modules/es.regexp.exec.js"),e("core-js/modules/es.string.search.js"),e("core-js/modules/es.array.concat.js"),e("core-js/modules/es.string.split.js"),e("core-js/modules/es.string.replace.js"),e("core-js/modules/es.array.join.js"),e("core-js/modules/es.string.trim.js"),e("core-js/modules/es.string.match.js"),e("core-js/modules/es.array.slice.js"),e("core-js/modules/es.object.keys.js"),e("core-js/modules/es.array.splice.js");var S=e("punycode"),O=e("./util");function j(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=s,r.resolve=function(e,t){return s(e,!1,!0).resolve(t)},r.resolveObject=function(e,t){return e?s(e,!1,!0).resolveObject(t):t},r.format=function(e){O.isString(e)&&(e=s(e));return e instanceof j?e.format():j.prototype.format.call(e)},r.Url=j;var A=/^([a-z0-9.+-]+:)/i,n=/:[0-9]*$/,D=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,r=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),I=["'"].concat(r),C=["%","/","?",";","#"].concat(I),N=["/","?","#"],R=/^[+a-z0-9A-Z_-]{0,63}$/,M=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,P={javascript:!0,"javascript:":!0},L={javascript:!0,"javascript:":!0},B={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},q=e("querystring");function s(e,t,r){if(e&&O.isObject(e)&&e instanceof j)return e;var n=new j;return n.parse(e,t,r),n}j.prototype.parse=function(e,t,r){if(!O.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+(0,_.default)(e));var n=e.indexOf("?"),s=-1!==n&&nc.maxRedirects)){var n=c.formatRedirectUrl?c.formatRedirectUrl(a,r):F.resolve(a,r);X("Request#%d %s: `redirected` from %s to %s",l,d.path,a,n),O(),c.headers&&c.headers.Host&&H.test(r)&&(c.headers.Host=null);r=u;return u=null,Z.requestWithCallback(n,c,r),{redirect:!0,error:null}}(t=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+a)).name="MaxRedirectError"}else(t=new Error("Got statusCode "+e.statusCode+" but cannot resolve next location from headers")).name="FollowRedirectError"}return{redirect:!1,error:t}}c.timing&&(_={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),c.gzip&&(d.headers["Accept-Encoding"]||d.headers["accept-encoding"]||(d.headers["Accept-Encoding"]="gzip"));var I,C,N,R=c.writeStream;function M(s){if(_&&(_.waiting=Date.now()-f),X("Request#%d %s `req response` event emit: status %d, headers: %j",l,a,s.statusCode,s.headers),c.streaming){var e=D(s);return e.redirect?void s.resume():e.error?(s.resume(),A(e.error,null,s)):A(null,null,s)}if(s.on("close",function(){X("Request#%d %s: `res close` event emit, total size %d",l,a,j)}),s.on("error",function(){X("Request#%d %s: `res error` event emit, total size %d",l,a,j)}),s.on("aborted",function(){T=!0,X("Request#%d %s: `res aborted` event emit, total size %d",l,a,j)}),R){e=D(s);return e.redirect?void s.resume():e.error?(s.resume(),R.end(),A(e.error,null,s)):(!1===c.consumeWriteStream?s.on("end",A.bind(null,null,null,s)):R.on("close",function(){X("Request#%d %s: writeStream close event emitted",l,a),A(g||null,null,s)}),s.pipe(R))}var t=[];s.on("data",function(e){X("Request#%d %s: `res data` event emit, size %d",l,a,e.length),j+=e.length,t.push(e)}),s.on("end",function(){var n=J.concat(t,j);if(X("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",l,a,j,s._dumped),g)return A(g,n,s);var e=D(s);if(e.error)return A(e.error,n,s);e.redirect||function(e,t,r){if(e)return A(e,n,s);if(!r&&0<=Y.indexOf(c.dataType)){try{t=decodeBodyByCharset(t,s)}catch(e){return X("decodeBodyByCharset error: %s",e),A(null,t,s)}"json"===c.dataType&&(0===j?t=null:(r=parseJSON(t,i)).error?e=r.error:t=r.data)}T&&X("Request#%d %s: Remote socket was terminated before `response.end()` was called",l,a),A(e,t,s)}(null,n,s.headers["content-encoding"])})}function P(){X("Response timer ticking, timeout: %d",C),b=setTimeout(function(){b=null;var e="Response timeout for "+C+"ms";(g=new Error(e)).name="ResponseTimeoutError",g.requestId=l,X("ResponseTimeout: Request#%d %s %s: %s, connected: %s",l,a,g.name,e,v),L()},C)}X("Request#%d %s %s with headers %j, options.path: %s",l,r,a,d.headers,d.path),c.requestUrls.push(a),Array.isArray(c.timeout)?(I=V(c.timeout[0]),C=V(c.timeout[1])):I=C=V(c.timeout),X("ConnectTimeout: %d, ResponseTimeout: %d",I,C),d.mode=c.mode||"";try{N=s.request(d,M)}catch(e){return A(e)}function L(){X("Request#%d %s abort, connected: %s",l,a,v),N.socket||(g.noSocket=!0,A(g)),N.abort()}return"undefined"==typeof window?(X("Connect timer ticking, timeout: %d",I),y=setTimeout(function(){y=null,-1===x&&(x=-2);var e="Connect timeout for "+I+"ms",t="ConnectionTimeoutError";N.socket||(t="SocketAssignTimeoutError",e+=", working sockets is full"),(g=new Error(e)).name=t,g.requestId=l,X("ConnectTimeout: Request#%d %s %s: %s, connected: %s",l,a,g.name,e,v),L()},I)):N.on("requestTimeout",function(){-1===x&&(x=-2);(g=new Error("Connect timeout for "+I+"ms")).name="ConnectionTimeoutError",g.requestId=l,L()}),_&&N.on("finish",function(){_.requestSent=Date.now()-f}),N.once("socket",function(e){_&&(_.queuing=Date.now()-f);var t=e.readyState;if("opening"===t)return e.once("lookup",function(e,t,r){X("Request#%d %s lookup: %s, %s, %s",l,a,e,t,r),_&&(_.dnslookup=Date.now()-f),t&&(k=t)}),void e.once("connect",function(){_&&(_.connected=Date.now()-f),S(),P(),X("Request#%d %s new socket connected",l,a),v=!0,k=k||e.remoteAddress,E=e.remotePort});X("Request#%d %s reuse socket connected, readyState: %s",l,a,t),w=v=!0,k=k||e.remoteAddress,E=e.remotePort,S(),P()}),N.on("error",function(e){"Error"!==e.name&&"TypeError"!==e.name||(e.name=v?"ResponseError":"RequestError"),e.message+=' (req "error")',X("Request#%d %s `req error` event emit, %s: %s",l,a,e.name,e.message),A(g||e)}),R&&R.once("error",function(e){e.message+=' (writeStream "error")',X("Request#%d %s `writeStream error` event emit, %s: %s",l,a,(g=e).name,e.message),L()}),c.stream?(c.stream.pipe(N),c.stream.once("error",function(e){e.message+=' (stream "error")',X("Request#%d %s `readStream error` event emit, %s: %s",l,a,(g=e).name,e.message),L()})):N.end(e),N.requestId=l,N}}.call(this)}.call(this,e("_process"),e("buffer").Buffer)},{"@babel/runtime/helpers/interopRequireDefault":74,"@babel/runtime/helpers/typeof":75,_process:399,buffer:85,"core-js/modules/es.array.concat.js":241,"core-js/modules/es.function.name.js":253,"core-js/modules/es.object.to-string.js":258,"core-js/modules/es.promise.js":259,"core-js/modules/es.regexp.exec.js":261,"core-js/modules/es.string.split.js":268,"core-js/modules/es.string.trim.js":269,debug:397,http:400,https:302,"humanize-ms":303,url:404,util:352}]},{},[1])(1)}); diff --git a/index.07381728.js.download b/index.07381728.js.download new file mode 100644 index 0000000..ab94dad --- /dev/null +++ b/index.07381728.js.download @@ -0,0 +1,2 @@ +(self.webpackChunkdefi_mode=self.webpackChunkdefi_mode||[]).push([[9042],{67159:function(e,t,r){var n,a,i;i=function(){return function(){return function(e){var t=[];if(0===e.length)return"";if("string"!==typeof e[0])throw new TypeError("Url must be a string. Received "+e[0]);if(e[0].match(/^[^/:]+:\/*$/)&&e.length>1){var r=e.shift();e[0]=r+e[0]}e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,"$1:///"):e[0]=e[0].replace(/^([^/:]+):\/*/,"$1://");for(var n=0;n0&&(a=a.replace(/^[\/]+/,"")),a=n0?"?":"")+s.join("&")}("object"===typeof arguments[0]?arguments[0]:[].slice.call(arguments))}},e.exports?e.exports=i():void 0===(a="function"===typeof(n=i)?n.call(t,r,t,e):n)||(e.exports=a)},37132:(e,t,r)=>{"use strict";r.d(t,{fr:()=>O});for(var n=r(29439),a=r(30812),i=r(13459),s=r(73334),o=[],c=[],u=[],l=BigInt(0),d=BigInt(1),f=BigInt(2),h=BigInt(7),p=BigInt(256),v=BigInt(113),_=0,g=d,m=1,b=0;_<24;_++){var w=[b,(2*m+3*b)%5];m=w[0],b=w[1],o.push(2*(5*b+m)),c.push((_+1)*(_+2)/2%64);for(var y=l,k=0;k<7;k++)(g=(g<>h)*v)%p)&f&&(y^=d<<(d<r>32?(0,i.SD)(e,t,r):(0,i.EP)(e,t,r),C=(e,t,r)=>r>32?(0,i.mk)(e,t,r):(0,i.gm)(e,t,r);class T extends s.kb{constructor(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:24;if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,a.Rx)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,s.Jq)(this.state)}keccak(){!function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:24,r=new Uint32Array(10),n=24-t;n<24;n++){for(var a=0;a<10;a++)r[a]=e[a]^e[a+10]^e[a+20]^e[a+30]^e[a+40];for(var i=0;i<10;i+=2)for(var s=(i+8)%10,u=(i+2)%10,l=r[u],d=r[u+1],f=S(l,d,1)^r[s],h=C(l,d,1)^r[s+1],p=0;p<50;p+=10)e[i+p]^=f,e[i+p+1]^=h;for(var v=e[2],_=e[3],g=0;g<24;g++){var m=c[g],b=S(v,_,m),w=C(v,_,m),y=o[g];v=e[y],_=e[y+1],e[y]=b,e[y+1]=w}for(var k=0;k<50;k+=10){for(var E=0;E<10;E++)r[E]=e[k+E];for(var x=0;x<10;x++)e[k+x]^=~r[(x+2)%10]&r[(x+4)%10]}e[0]^=Z[n],e[1]^=A[n]}r.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,a.Gg)(this);for(var t=this.blockLen,r=this.state,n=(e=(0,s.O0)(e)).length,i=0;i=r&&this.keccak();var s=Math.min(r-this.posOut,i-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(0,a.Rx)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,a.J8)(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){var t=this.blockLen,r=this.suffix,n=this.outputLen,a=this.rounds,i=this.enableXOF;return e||(e=new T(t,r,n,i,a)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=a,e.suffix=r,e.outputLen=n,e.enableXOF=i,e.destroyed=this.destroyed,e}}var I=(e,t,r)=>(0,s.hE)((()=>new T(t,e,r))),O=I(1,136,32)},79042:(e,t,r)=>{"use strict";r.d(t,{OK:()=>Oi,qn:()=>eu});var n={};r.r(n),r.d(n,{poseidon:()=>b,splitConstants:()=>m,validateOpts:()=>g});var a={};r.r(a),r.d(a,{CURVE:()=>P,Fp251:()=>ae,MAX_VALUE:()=>E,ProjectivePoint:()=>F,Signature:()=>L,_poseidonMDS:()=>se,_starkCurve:()=>S,computeHashOnElements:()=>ee,ethSigToPrivate:()=>M,getAccountPath:()=>Y,getPublicKey:()=>I,getSharedSecret:()=>O,getStarkKey:()=>V,grindKey:()=>j,keccak:()=>re,pedersen:()=>Q,poseidonBasic:()=>ce,poseidonCreate:()=>ue,poseidonHash:()=>de,poseidonHashFunc:()=>fe,poseidonHashMany:()=>pe,poseidonHashSingle:()=>he,poseidonSmall:()=>le,sign:()=>D,utils:()=>U,verify:()=>B});var i=r(9115),s=r(74165),o=r(15861),c=r(37762),u=r(29439),l=r(1413),d=r(55117),f=r(91030),h=r(37132),p=r(18299),v=r(73334),_=r(94258);function g(e){var t=e.Fp,r=e.mds,n=e.reversePartialPowIdx,a=e.roundConstants,i=e.roundsFull,s=e.roundsPartial,o=e.sboxPower,c=e.t;(0,_.OP)(t);for(var u=0,d=["t","roundsFull","roundsPartial"];u{if(!Array.isArray(e)||e.length!==c)throw new Error("Poseidon MDS matrix row: ".concat(e));return e.map((e=>{if("bigint"!==typeof e)throw new Error("Poseidon MDS matrix value=".concat(e));return t.create(e)}))}));if(void 0!==n&&"boolean"!==typeof n)throw new Error("Poseidon: invalid param reversePartialPowIdx=".concat(n));if(i%2!==0)throw new Error("Poseidon roundsFull is not even: ".concat(i));var p=i+s;if(!Array.isArray(a)||a.length!==p)throw new Error("Poseidon: wrong round constants");var v=a.map((e=>{if(!Array.isArray(e)||e.length!==c)throw new Error("Poseidon wrong round constants: ".concat(e));return e.map((e=>{if("bigint"!==typeof e||!t.isValid(e))throw new Error("Poseidon wrong round constant=".concat(e));return t.create(e)}))}));if(!o||![3,5,7].includes(o))throw new Error("Poseidon wrong sboxPower=".concat(o));var g=BigInt(o),m=e=>(0,_.Q)(t,e,g);return 3===o?m=e=>t.mul(t.sqrN(e),e):5===o&&(m=e=>t.mul(t.sqrN(t.sqrN(e)),e)),Object.freeze((0,l.Z)((0,l.Z)({},e),{},{rounds:p,sboxFn:m,roundConstants:v,mds:h}))}function m(e,t){if("number"!==typeof t)throw new Error("poseidonSplitConstants: wrong t");if(!Array.isArray(e)||e.length%t)throw new Error("poseidonSplitConstants: wrong rc");for(var r=[],n=[],a=0;a(e=e.map(((e,t)=>r.add(e,a[i][t]))),t?e=e.map((e=>o(e))):e[l]=o(e[l]),e=n.map((t=>t.reduce(((t,n,a)=>r.add(t,r.mulN(n,e[a]))),r.ZERO)))),f=function(e){if(!Array.isArray(e)||e.length!==c)throw new Error("Poseidon: wrong values (expected array of bigints with length ".concat(c,")"));e=e.map((e=>{if("bigint"!==typeof e)throw new Error("Poseidon: wrong value=".concat(e," (").concat(typeof e,")"));return r.create(e)}));for(var t=0,n=0;n0?r>>BigInt(t):r}function Z(e){return"string"===typeof e&&1&(e=H(e)).length&&(e="0"+e),f.nr(e)}var A=(0,w.weierstrass)((0,l.Z)((0,l.Z)({a:BigInt(1),b:BigInt("3141592653589793238462643383279502884197169399375105820974944592307816406665"),Fp:(0,_.gN)(BigInt("0x800000000000011000000000000000000000000000000000000000000000001")),n:k,nBitLength:252,Gx:BigInt("874739451078007766457464989774322083649278607533249481151382481072868806602"),Gy:BigInt("152666792071518830868575557812948353041420400780739481342941381225525861407"),h:BigInt(1),lowS:!1},(0,y.X)(p.J)),{},{bits2int:x,bits2int_modN:e=>{var t=f.Hv(e).toString(16);return 63===t.length&&(e=Z(t+"0")),(0,_.wQ)(x(e),k)}})),S=A;function C(e){return f.ql("","string"===typeof e?Z(e):e)}function T(e){return f.ci(C(e)).padStart(64,"0")}function I(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return A.getPublicKey(T(e),t)}function O(e,t){return A.getSharedSecret(T(e),t)}function N(e){var t=e.r,r=e.s;if(t<0n||t>=E)throw new Error("Signature.r should be [1, ".concat(E,")"));var n=(0,_.U_)(r,k);if(n<0n||n>=E)throw new Error("inv(Signature.s) should be [1, ".concat(E,")"))}function R(e){var t=C(e);if(f.Hv(t)>=E)throw new Error("msgHash should be [0, ".concat(E,")"));return t}function D(e,t,r){var n=A.sign(R(e),T(t),r);return N(n),n}function B(e,t,r){if(!(e instanceof L)){var n=C(e);try{e=L.fromDER(n)}catch(a){if(!(a instanceof w.DER.Err))throw a;e=L.fromCompact(n)}}return N(e),A.verify(e,R(t),C(r))}var P=A.CURVE,F=A.ProjectivePoint,L=A.Signature,U=A.utils;function z(e){var t=f.ci(e.subarray(1)).replace(/^0+/gm,"");return"0x".concat(t)}function H(e){return e.replace(/^0x/i,"")}function j(e){for(var t=C(e),r=2n**256n,n=r-(0,_.wQ)(r,k),a=0;;a++){var i=ne(f.eV(t,f.Yt(BigInt(a))));if(iNumber(e&K);function Y(e,t,r,n){var a=G(ne(e)),i=G(ne(t)),s=f.ly(H(r));return"m/2645'/".concat(a,"'/").concat(i,"'/").concat(G(s),"'/").concat(G(s>>31n),"'/").concat(n)}var q=[new F(2089986280348253421170679821480865132823066470938446095505822317253594081284n,1713931329540660377023406109199410414810705867260802078187082345529207694986n,1n),new F(996781205833008774514500082376783249102396023663454813447423147977397232763n,1668503676786377725805489344771023921079126552019160156920634619255970485781n,1n),new F(2251563274489750535117886426533222435294046428347329203627021249169616184184n,1798716007562728905295480679789526322175868328062420237419143593021674992973n,1n),new F(2138414695194151160943305727036575959195309218611738193261179310511854807447n,113410276730064486255102093846540133784865286929052426931474106396135072156n,1n),new F(2379962749567351885752724891227938183011949129833673362440656643086021394946n,776496453633298175483985398648758586525933812536653089401905292063708816422n,1n)];function J(e,t){for(var r=[],n=e,a=0;a<248;a++)r.push(n),n=n.double();n=t;for(var i=0;i<4;i++)r.push(n),n=n.double();return r}var W=J(q[1],q[2]),X=J(q[3],q[4]);function $(e,t,r){for(var n=function(e){var t;if("bigint"===typeof e)t=e;else if("number"===typeof e){if(!Number.isSafeInteger(e))throw new Error("Invalid pedersenArg: ".concat(e));t=BigInt(e)}else t=f.Hv(C(e));if(!(0n<=t&&t>=1n}return e}function Q(e,t){var r=q[0];return r=$(r,e,W),z((r=$(r,t,X)).toRawBytes(!0))}var ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Q;return[0,...e,e.length].reduce(((e,r)=>t(e,r)))},te=f.dQ(250),re=e=>f.Hv((0,h.fr)(e))&te,ne=e=>f.Hv((0,p.J)(e)),ae=(0,_.gN)(BigInt("3618502788666131213697322783095070105623107215331596699973092056135872020481"));function ie(e,t,r){var n=e.fromBytes((0,p.J)((0,v.iY)("".concat(t).concat(r))));return e.create(n)}function se(e,t,r){for(var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=[],i=[],s=0;si.map((r=>e.inv(e.sub(t,r))))))}var oe=[[3,1,1],[1,-1,1],[1,1,-2]].map((e=>e.map(BigInt)));function ce(e,t){if((0,_.OP)(e.Fp),!Number.isSafeInteger(e.rate)||!Number.isSafeInteger(e.capacity))throw new Error("Wrong poseidon opts: ".concat(e));for(var r=e.rate+e.capacity,n=e.roundsFull+e.roundsPartial,a=[],i=0;i1&&void 0!==arguments[1]?arguments[1]:0,r=e.rate+e.capacity;if(!Number.isSafeInteger(t))throw new Error("Wrong mdsAttempt=".concat(t));return ce(e,se(e.Fp,"HadesMDS",r,t))}var le=ce({Fp:ae,rate:2,capacity:1,roundsFull:8,roundsPartial:83},oe);function de(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:le)([e,t,2n])[0]}function fe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:le;return f.Yt(de(f.Hv(e),f.Hv(t),r))}function he(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:le)([e,0n,1n])[0]}function pe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:le,r=t.m,n=t.rate;if(!Array.isArray(e))throw new Error("bigint array expected in values");var a=Array.from(e);for(a.push(1n);a.length%n!==0;)a.push(0n);for(var i=new Array(r).fill(0n),s=0;s=14&&a.startsWith(i.substring(0,14)))return!0;return!1}(e,{approx:!1})){if(ve(e))return be.truncate_integer;var t=parseFloat(e);return isFinite(t)?0===t?be.underflow:be.truncate_float:be.overflow}}function ye(e){return e.replace(ke,"").replace(xe,"").replace(Ze,"").replace(Ee,"")}var ke=/[eE][+-]?\d+$/,Ee=/^-?(0*)?/,xe=/\./,Ze=/0+$/;function Ae(e){return Ae="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},Ae(e)}function Se(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:Ie,n=0,a=o();return function(e){if(void 0===e)throw new SyntaxError("JSON value expected ".concat(k()))}(a),function(){if(n=rt&&a<=nt)for(n++;Ue(e.charCodeAt(n));)n++;var a;if(e.charCodeAt(n)===it)for(n++,p(t);Ue(e.charCodeAt(n));)n++;if(e.charCodeAt(n)===lt||e.charCodeAt(n)===ut)for(n++,e.charCodeAt(n)!==et&&e.charCodeAt(n)!==Qe||n++,p(t);Ue(e.charCodeAt(n));)n++;if(n>t)return r(e.slice(t,n))}())&&void 0!==f?f:i())&&void 0!==d?d:s())&&void 0!==o?o:c("true",!0))&&void 0!==a?a:c("false",!1))&&void 0!==t?t:c("null",null);return u(),v}function c(t,r){if(e.slice(n,n+t.length)===t)return n+=t.length,r}function u(){for(;(t=e.charCodeAt(n))===qe||t===Je||t===We||t===Xe;)n++;var t}function l(){if(e.charCodeAt(n)===$e){n++;for(var t="";n=32&&i<=1114111?t+=e[n]:g(e[n]);n++}return function(){if(e.charCodeAt(n)!==$e)throw new SyntaxError("End of string '\"' expected ".concat(k()))}(),n++,t}var i}function d(){if(e.charCodeAt(n)!==at)throw new SyntaxError("Comma ',' expected after value ".concat(k()));n++}function f(){if(e.charCodeAt(n)!==st)throw new SyntaxError("Colon ':' expected after property name ".concat(k()));n++}function h(e){if(void 0===e)throw new SyntaxError("Array item expected ".concat(k()))}function p(t){if(!Ue(e.charCodeAt(n))){var r=e.slice(t,n);throw new SyntaxError("Invalid number '".concat(r,"', expecting a digit ").concat(k()))}}function v(){throw new SyntaxError("Quoted object key expected ".concat(k()))}function _(e,t){throw new SyntaxError("Duplicate key '".concat(e,"' encountered at position ").concat(t))}function g(e){throw new SyntaxError("Invalid character '".concat(e,"' ").concat(y()))}function m(t){var r=e.slice(t,t+2);throw new SyntaxError("Invalid escape character '".concat(r,"' ").concat(y()))}function b(){throw new SyntaxError("Object value expected after ':' ".concat(y()))}function w(t){for(var r=t+2;/\w/.test(e[r]);)r++;var n=e.slice(t,r);throw new SyntaxError("Invalid unicode character '".concat(n,"' ").concat(y()))}function y(){return"at position ".concat(n)}function k(){return(n=tt&&e<=nt||e>=ot&&e<=dt||e>=ct&&e<=ft}function Ue(e){return e>=tt&&e<=nt}function ze(e,t){return e===t||(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return ze(e,t[r])})):!(!He(e)||!He(t))&&Be(new Set([].concat(Be(Object.keys(e)),Be(Object.keys(t))))).every((function(r){return ze(e[r],t[r])})))}function He(e){return"object"===De(e)&&null!==e}var je={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},Ve=92,Me=123,Ke=125,Ge=91,Ye=93,qe=32,Je=10,We=9,Xe=13,$e=34,Qe=43,et=45,tt=48,rt=49,nt=57,at=44,it=46,st=58,ot=65,ct=97,ut=69,lt=101,dt=70,ft=102;function ht(e){return ht="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},ht(e)}function pt(e,t,r,n){var a=function(e){if("number"===typeof e)return" ".repeat(e);if("string"===typeof e&&""!==e)return e;return}(r);return i("function"===typeof t?t.call({"":e},"",e):e,"");function i(e,s){if(Array.isArray(n)){var o=n.find((function(t){return t.test(e)}));if(o){var c=o.stringify(e);if("string"!==typeof c||!ge(c))throw new Error("Invalid JSON number: output of a number stringifier must be a string containing a JSON number "+"(output: ".concat(c,")"));return c}}return"boolean"===typeof e||"number"===typeof e||"string"===typeof e||null===e||e instanceof Date||e instanceof Boolean||e instanceof Number||e instanceof String?JSON.stringify(e):e&&e.isLosslessNumber||"bigint"===typeof e?e.toString():Array.isArray(e)?function(e,r){if(0===e.length)return"[]";for(var n=a?r+a:void 0,s=a?"[\n":"[",o=0;o=0;)e[t]=0}var _t=256,gt=286,mt=30,bt=15,wt=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),yt=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),kt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Et=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xt=new Array(576);vt(xt);var Zt=new Array(60);vt(Zt);var At=new Array(512);vt(At);var St=new Array(256);vt(St);var Ct=new Array(29);vt(Ct);var Tt,It,Ot,Nt=new Array(mt);function Rt(e,t,r,n,a){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=a,this.has_stree=e&&e.length}function Dt(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}vt(Nt);var Bt=e=>e<256?At[e]:At[256+(e>>>7)],Pt=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},Ft=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{Ft(e,r[2*t],r[2*t+1])},Ut=(e,t)=>{var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},zt=(e,t,r)=>{var n,a,i=new Array(16),s=0;for(n=1;n<=bt;n++)s=s+r[n-1]<<1,i[n]=s;for(a=0;a<=t;a++){var o=e[2*a+1];0!==o&&(e[2*a]=Ut(i[o]++,o))}},Ht=e=>{var t;for(t=0;t{e.bi_valid>8?Pt(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Vt=(e,t,r,n)=>{var a=2*t,i=2*r;return e[a]{for(var n=e.heap[r],a=r<<1;a<=e.heap_len&&(a{var n,a,i,s,o=0;if(0!==e.sym_next)do{n=255&e.pending_buf[e.sym_buf+o++],n+=(255&e.pending_buf[e.sym_buf+o++])<<8,a=e.pending_buf[e.sym_buf+o++],0===n?Lt(e,a,t):(i=St[a],Lt(e,i+_t+1,t),0!==(s=wt[i])&&(a-=Ct[i],Ft(e,a,s)),n--,i=Bt(n),Lt(e,i,r),0!==(s=yt[i])&&(n-=Nt[i],Ft(e,n,s)))}while(o{var r,n,a,i=t.dyn_tree,s=t.stat_desc.static_tree,o=t.stat_desc.has_stree,c=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=573,r=0;r>1;r>=1;r--)Mt(e,i,r);a=c;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Mt(e,i,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,i[2*a]=i[2*r]+i[2*n],e.depth[a]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,i[2*r+1]=i[2*n+1]=a,e.heap[1]=a++,Mt(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{var r,n,a,i,s,o,c=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,p=t.stat_desc.max_length,v=0;for(i=0;i<=bt;i++)e.bl_count[i]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(i=c[2*c[2*(n=e.heap[r])+1]+1]+1)>p&&(i=p,v++),c[2*n+1]=i,n>u||(e.bl_count[i]++,s=0,n>=h&&(s=f[n-h]),o=c[2*n],e.opt_len+=o*(i+s),d&&(e.static_len+=o*(l[2*n+1]+s)));if(0!==v){do{for(i=p-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[p]--,v-=2}while(v>0);for(i=p;0!==i;i--)for(n=e.bl_count[i];0!==n;)(a=e.heap[--r])>u||(c[2*a+1]!==i&&(e.opt_len+=(i-c[2*a+1])*c[2*a],c[2*a+1]=i),n--)}})(e,t),zt(i,u,e.bl_count)},Yt=(e,t,r)=>{var n,a,i=-1,s=t[1],o=0,c=7,u=4;for(0===s&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)a=s,s=t[2*(n+1)+1],++o{var n,a,i=-1,s=t[1],o=0,c=7,u=4;for(0===s&&(c=138,u=3),n=0;n<=r;n++)if(a=s,s=t[2*(n+1)+1],!(++o{Ft(e,0+(n?1:0),3),jt(e),Pt(e,r),Pt(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r},Xt=(e,t,r,n)=>{var a,i,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<_t;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Gt(e,e.l_desc),Gt(e,e.d_desc),s=(e=>{var t;for(Yt(e,e.dyn_ltree,e.l_desc.max_code),Yt(e,e.dyn_dtree,e.d_desc.max_code),Gt(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*Et[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=a&&(a=i)):a=i=r+5,r+4<=a&&-1!==t?Wt(e,t,r,n):4===e.strategy||i===a?(Ft(e,2+(n?1:0),3),Kt(e,xt,Zt)):(Ft(e,4+(n?1:0),3),((e,t,r,n)=>{var a;for(Ft(e,t-257,5),Ft(e,r-1,5),Ft(e,n-4,4),a=0;a{Jt||((()=>{var e,t,r,n,a,i=new Array(16);for(r=0,n=0;n<28;n++)for(Ct[n]=r,e=0;e<1<>=7;n(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(St[r]+_t+1)]++,e.dyn_dtree[2*Bt(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{Ft(e,2,3),Lt(e,256,xt),(e=>{16===e.bi_valid?(Pt(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},Qt=(e,t,r,n)=>{for(var a=65535&e|0,i=e>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{i=i+(a=a+t[n++]|0)|0}while(--s);a%=65521,i%=65521}return a|i<<16|0},er=new Uint32Array((()=>{for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})()),tr=(e,t,r,n)=>{var a=er,i=n+r;e^=-1;for(var s=n;s>>8^a[255&(e^t[s])];return-1^e},rr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},nr={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},ar=$t._tr_init,ir=$t._tr_stored_block,sr=$t._tr_flush_block,or=$t._tr_tally,cr=$t._tr_align,ur=nr.Z_NO_FLUSH,lr=nr.Z_PARTIAL_FLUSH,dr=nr.Z_FULL_FLUSH,fr=nr.Z_FINISH,hr=nr.Z_BLOCK,pr=nr.Z_OK,vr=nr.Z_STREAM_END,_r=nr.Z_STREAM_ERROR,gr=nr.Z_DATA_ERROR,mr=nr.Z_BUF_ERROR,br=nr.Z_DEFAULT_COMPRESSION,wr=nr.Z_FILTERED,yr=nr.Z_HUFFMAN_ONLY,kr=nr.Z_RLE,Er=nr.Z_FIXED,xr=nr.Z_DEFAULT_STRATEGY,Zr=nr.Z_UNKNOWN,Ar=nr.Z_DEFLATED,Sr=258,Cr=262,Tr=42,Ir=113,Or=666,Nr=(e,t)=>(e.msg=rr[t],t),Rr=e=>2*e-(e>4?9:0),Dr=e=>{for(var t=e.length;--t>=0;)e[t]=0},Br=e=>{var t,r,n,a=e.w_size;n=t=e.hash_size;do{r=e.head[--n],e.head[n]=r>=a?r-a:0}while(--t);n=t=a;do{r=e.prev[--n],e.prev[n]=r>=a?r-a:0}while(--t)},Pr=(e,t,r)=>(t<{var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},Lr=(e,t)=>{sr(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Fr(e.strm)},Ur=(e,t)=>{e.pending_buf[e.pending++]=t},zr=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Hr=(e,t,r,n)=>{var a=e.avail_in;return a>n&&(a=n),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),r),1===e.state.wrap?e.adler=Qt(e.adler,t,a,r):2===e.state.wrap&&(e.adler=tr(e.adler,t,a,r)),e.next_in+=a,e.total_in+=a,a)},jr=(e,t)=>{var r,n,a=e.max_chain_length,i=e.strstart,s=e.prev_length,o=e.nice_match,c=e.strstart>e.w_size-Cr?e.strstart-(e.w_size-Cr):0,u=e.window,l=e.w_mask,d=e.prev,f=e.strstart+Sr,h=u[i+s-1],p=u[i+s];e.prev_length>=e.good_match&&(a>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+s]===p&&u[r+s-1]===h&&u[r]===u[i]&&u[++r]===u[i+1]){i+=2,r++;do{}while(u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&u[++i]===u[++r]&&is){if(e.match_start=t,s=n,n>=o)break;h=u[i+s-1],p=u[i+s]}}}while((t=d[t&l])>c&&0!==--a);return s<=e.lookahead?s:e.lookahead},Vr=e=>{var t,r,n,a=e.w_size;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=a+(a-Cr)&&(e.window.set(e.window.subarray(a,a+a-r),0),e.match_start-=a,e.strstart-=a,e.block_start-=a,e.insert>e.strstart&&(e.insert=e.strstart),Br(e),r+=a),0===e.strm.avail_in)break;if(t=Hr(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=t,e.lookahead+e.insert>=3)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=Pr(e,e.ins_h,e.window[n+1]);e.insert&&(e.ins_h=Pr(e,e.ins_h,e.window[n+3-1]),e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{var r,n,a,i=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,s=0,o=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out(n=e.strstart-e.block_start)+e.strm.avail_in&&(r=n+e.strm.avail_in),r>a&&(r=a),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Fr(e.strm),n&&(n>r&&(n=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,r-=n),r&&(Hr(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===s);return(o-=e.strm.avail_in)&&(o>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=o&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-o,e.strm.next_in),e.strstart),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.block_start=e.strstart),e.high_watera&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(Hr(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water>3,i=(a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a)>e.w_size?e.w_size:a,((n=e.strstart-e.block_start)>=i||(n||t===fr)&&t!==ur&&0===e.strm.avail_in&&n<=a)&&(r=n>a?a:n,s=t===fr&&0===e.strm.avail_in&&r===n?1:0,ir(e,e.block_start,r,s),e.block_start+=r,Fr(e.strm)),s?3:1)},Kr=(e,t)=>{for(var r,n;;){if(e.lookahead=3&&(e.ins_h=Pr(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-Cr&&(e.match_length=jr(e,r)),e.match_length>=3)if(n=or(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Pr(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Pr(e,e.ins_h,e.window[e.strstart+1]);else n=or(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Lr(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===fr?(Lr(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Lr(e,!1),0===e.strm.avail_out)?1:2},Gr=(e,t)=>{for(var r,n,a;;){if(e.lookahead=3&&(e.ins_h=Pr(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,n=or(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=Pr(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(Lr(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=or(e,0,e.window[e.strstart-1]))&&Lr(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=or(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===fr?(Lr(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Lr(e,!1),0===e.strm.avail_out)?1:2};function Yr(e,t,r,n,a){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=a}var qr=[new Yr(0,0,0,0,Mr),new Yr(4,4,8,4,Kr),new Yr(4,5,16,8,Kr),new Yr(4,6,32,32,Kr),new Yr(4,4,16,16,Gr),new Yr(8,16,32,32,Gr),new Yr(8,16,128,128,Gr),new Yr(8,32,128,256,Gr),new Yr(32,128,258,1024,Gr),new Yr(32,258,258,4096,Gr)];function Jr(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Ar,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Dr(this.dyn_ltree),Dr(this.dyn_dtree),Dr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Dr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Dr(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Wr=e=>{if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.status!==Tr&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Ir&&t.status!==Or?1:0},Xr=e=>{if(Wr(e))return Nr(e,_r);e.total_in=e.total_out=0,e.data_type=Zr;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?Tr:Ir,e.adler=2===t.wrap?0:1,t.last_flush=-2,ar(t),pr},$r=e=>{var t,r=Xr(e);return r===pr&&((t=e.state).window_size=2*t.w_size,Dr(t.head),t.max_lazy_match=qr[t.level].max_lazy,t.good_match=qr[t.level].good_length,t.nice_match=qr[t.level].nice_length,t.max_chain_length=qr[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r},Qr=(e,t,r,n,a,i)=>{if(!e)return _r;var s=1;if(t===br&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),a<1||a>9||r!==Ar||n<8||n>15||t<0||t>9||i<0||i>Er||8===n&&1!==s)return Nr(e,_r);8===n&&(n=9);var o=new Jr;return e.state=o,o.strm=e,o.status=Tr,o.wrap=s,o.gzhead=null,o.w_bits=n,o.w_size=1<Qr(e,t,Ar,15,8,xr),deflateInit2:Qr,deflateReset:$r,deflateResetKeep:Xr,deflateSetHeader:(e,t)=>Wr(e)||2!==e.state.wrap?_r:(e.state.gzhead=t,pr),deflate:(e,t)=>{if(Wr(e)||t>hr||t<0)return e?Nr(e,_r):_r;var r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===Or&&t!==fr)return Nr(e,0===e.avail_out?mr:_r);var n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(Fr(e),0===e.avail_out)return r.last_flush=-1,pr}else if(0===e.avail_in&&Rr(t)<=Rr(n)&&t!==fr)return Nr(e,mr);if(r.status===Or&&0!==e.avail_in)return Nr(e,mr);if(r.status===Tr&&0===r.wrap&&(r.status=Ir),r.status===Tr){var a=Ar+(r.w_bits-8<<4)<<8;if(a|=(r.strategy>=yr||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(a|=32),zr(r,a+=31-a%31),0!==r.strstart&&(zr(r,e.adler>>>16),zr(r,65535&e.adler)),e.adler=1,r.status=Ir,Fr(e),0!==r.pending)return r.last_flush=-1,pr}if(57===r.status)if(e.adler=0,Ur(r,31),Ur(r,139),Ur(r,8),r.gzhead)Ur(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Ur(r,255&r.gzhead.time),Ur(r,r.gzhead.time>>8&255),Ur(r,r.gzhead.time>>16&255),Ur(r,r.gzhead.time>>24&255),Ur(r,9===r.level?2:r.strategy>=yr||r.level<2?4:0),Ur(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Ur(r,255&r.gzhead.extra.length),Ur(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=tr(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(Ur(r,0),Ur(r,0),Ur(r,0),Ur(r,0),Ur(r,0),Ur(r,9===r.level?2:r.strategy>=yr||r.level<2?4:0),Ur(r,3),r.status=Ir,Fr(e),0!==r.pending)return r.last_flush=-1,pr;if(69===r.status){if(r.gzhead.extra){for(var i=r.pending,s=(65535&r.gzhead.extra.length)-r.gzindex;r.pending+s>r.pending_buf_size;){var o=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+o),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>i&&(e.adler=tr(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex+=o,Fr(e),0!==r.pending)return r.last_flush=-1,pr;i=0,s-=o}var c=new Uint8Array(r.gzhead.extra);r.pending_buf.set(c.subarray(r.gzindex,r.gzindex+s),r.pending),r.pending+=s,r.gzhead.hcrc&&r.pending>i&&(e.adler=tr(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){var u,l=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>l&&(e.adler=tr(e.adler,r.pending_buf,r.pending-l,l)),Fr(e),0!==r.pending)return r.last_flush=-1,pr;l=0}u=r.gzindexl&&(e.adler=tr(e.adler,r.pending_buf,r.pending-l,l)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){var d,f=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>f&&(e.adler=tr(e.adler,r.pending_buf,r.pending-f,f)),Fr(e),0!==r.pending)return r.last_flush=-1,pr;f=0}d=r.gzindexf&&(e.adler=tr(e.adler,r.pending_buf,r.pending-f,f))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Fr(e),0!==r.pending))return r.last_flush=-1,pr;Ur(r,255&e.adler),Ur(r,e.adler>>8&255),e.adler=0}if(r.status=Ir,Fr(e),0!==r.pending)return r.last_flush=-1,pr}if(0!==e.avail_in||0!==r.lookahead||t!==ur&&r.status!==Or){var h=0===r.level?Mr(r,t):r.strategy===yr?((e,t)=>{for(var r;;){if(0===e.lookahead&&(Vr(e),0===e.lookahead)){if(t===ur)return 1;break}if(e.match_length=0,r=or(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Lr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===fr?(Lr(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Lr(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===kr?((e,t)=>{for(var r,n,a,i,s=e.window;;){if(e.lookahead<=Sr){if(Vr(e),e.lookahead<=Sr&&t===ur)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[a=e.strstart-1])===s[++a]&&n===s[++a]&&n===s[++a]){i=e.strstart+Sr;do{}while(n===s[++a]&&n===s[++a]&&n===s[++a]&&n===s[++a]&&n===s[++a]&&n===s[++a]&&n===s[++a]&&n===s[++a]&&ae.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=or(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=or(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Lr(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===fr?(Lr(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Lr(e,!1),0===e.strm.avail_out)?1:2})(r,t):qr[r.level].func(r,t);if(3!==h&&4!==h||(r.status=Or),1===h||3===h)return 0===e.avail_out&&(r.last_flush=-1),pr;if(2===h&&(t===lr?cr(r):t!==hr&&(ir(r,0,0,!1),t===dr&&(Dr(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Fr(e),0===e.avail_out))return r.last_flush=-1,pr}return t!==fr?pr:r.wrap<=0?vr:(2===r.wrap?(Ur(r,255&e.adler),Ur(r,e.adler>>8&255),Ur(r,e.adler>>16&255),Ur(r,e.adler>>24&255),Ur(r,255&e.total_in),Ur(r,e.total_in>>8&255),Ur(r,e.total_in>>16&255),Ur(r,e.total_in>>24&255)):(zr(r,e.adler>>>16),zr(r,65535&e.adler)),Fr(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?pr:vr)},deflateEnd:e=>{if(Wr(e))return _r;var t=e.state.status;return e.state=null,t===Ir?Nr(e,gr):pr},deflateSetDictionary:(e,t)=>{var r=t.length;if(Wr(e))return _r;var n=e.state,a=n.wrap;if(2===a||1===a&&n.status!==Tr||n.lookahead)return _r;if(1===a&&(e.adler=Qt(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===a&&(Dr(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(t.subarray(r-n.w_size,r),0),t=i,r=n.w_size}var s=e.avail_in,o=e.next_in,c=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Vr(n);n.lookahead>=3;){var u=n.strstart,l=n.lookahead-2;do{n.ins_h=Pr(n,n.ins_h,n.window[u+3-1]),n.prev[u&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=u,u++}while(--l);n.strstart=u,n.lookahead=2,Vr(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=o,e.input=c,e.avail_in=s,n.wrap=a,pr},deflateInfo:"pako deflate (from Nodeca project)"},tn=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),rn={assign:function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!==typeof r)throw new TypeError(r+"must be non-object");for(var n in r)tn(r,n)&&(e[n]=r[n])}}return e},flattenChunks:e=>{for(var t=0,r=0,n=e.length;r=252?6:sn>=248?5:sn>=240?4:sn>=224?3:sn>=192?2:1;an[254]=an[254]=1;var on={string2buf:e=>{if("function"===typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,r,n,a,i,s=e.length,o=0;for(a=0;a>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},buf2string:(e,t)=>{var r,n,a=t||e.length;if("function"===typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var i=new Array(2*a);for(n=0,r=0;r4)i[n++]=65533,r+=o-1;else{for(s&=2===o?31:3===o?15:7;o>1&&r1?i[n++]=65533:s<65536?i[n++]=s:(s-=65536,i[n++]=55296|s>>10&1023,i[n++]=56320|1023&s)}}}return((e,t)=>{if(t<65534&&e.subarray&&nn)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var r="",n=0;n{(t=t||e.length)>e.length&&(t=e.length);for(var r=t-1;r>=0&&128===(192&e[r]);)r--;return r<0||0===r?t:r+an[e[r]]>t?r:t}};var cn=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},un=Object.prototype.toString,ln=nr.Z_NO_FLUSH,dn=nr.Z_SYNC_FLUSH,fn=nr.Z_FULL_FLUSH,hn=nr.Z_FINISH,pn=nr.Z_OK,vn=nr.Z_STREAM_END,_n=nr.Z_DEFAULT_COMPRESSION,gn=nr.Z_DEFAULT_STRATEGY,mn=nr.Z_DEFLATED;function bn(e){this.options=rn.assign({level:_n,method:mn,chunkSize:16384,windowBits:15,memLevel:8,strategy:gn},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new cn,this.strm.avail_out=0;var r=en.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==pn)throw new Error(rr[r]);if(t.header&&en.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n="string"===typeof t.dictionary?on.string2buf(t.dictionary):"[object ArrayBuffer]"===un.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=en.deflateSetDictionary(this.strm,n))!==pn)throw new Error(rr[r]);this._dict_set=!0}}function wn(e,t){var r=new bn(t);if(r.push(e,!0),r.err)throw r.msg||rr[r.err];return r.result}bn.prototype.push=function(e,t){var r,n,a=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=t===~~t?t:!0===t?hn:ln,"string"===typeof e?a.input=on.string2buf(e):"[object ArrayBuffer]"===un.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(n===dn||n===fn)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if((r=en.deflate(a,n))===vn)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),r=en.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===pn;if(0!==a.avail_out){if(n>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},bn.prototype.onData=function(e){this.chunks.push(e)},bn.prototype.onEnd=function(e){e===pn&&(this.result=rn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var yn={Deflate:bn,deflate:wn,deflateRaw:function(e,t){return(t=t||{}).raw=!0,wn(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,wn(e,t)},constants:nr},kn=16209,En=function(e,t){var r,n,a,i,s,o,c,u,l,d,f,h,p,v,_,g,m,b,w,y,k,E,x,Z,A=e.state;r=e.next_in,x=e.input,n=r+(e.avail_in-5),a=e.next_out,Z=e.output,i=a-(t-e.avail_out),s=a+(e.avail_out-257),o=A.dmax,c=A.wsize,u=A.whave,l=A.wnext,d=A.window,f=A.hold,h=A.bits,p=A.lencode,v=A.distcode,_=(1<>>=b=m>>>24,h-=b,0===(b=m>>>16&255))Z[a++]=65535&m;else{if(!(16&b)){if(0===(64&b)){m=p[(65535&m)+(f&(1<>>=b,h-=b),h<15&&(f+=x[r++]<>>=b=m>>>24,h-=b,!(16&(b=m>>>16&255))){if(0===(64&b)){m=v[(65535&m)+(f&(1<o){e.msg="invalid distance too far back",A.mode=kn;break e}if(f>>>=b,h-=b,y>(b=a-i)){if((b=y-b)>u&&A.sane){e.msg="invalid distance too far back",A.mode=kn;break e}if(k=0,E=d,0===l){if(k+=c-b,b2;)Z[a++]=E[k++],Z[a++]=E[k++],Z[a++]=E[k++],w-=3;w&&(Z[a++]=E[k++],w>1&&(Z[a++]=E[k++]))}else{k=a-y;do{Z[a++]=Z[k++],Z[a++]=Z[k++],Z[a++]=Z[k++],w-=3}while(w>2);w&&(Z[a++]=Z[k++],w>1&&(Z[a++]=Z[k++]))}break}}break}}while(r>3,f&=(1<<(h-=w<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r{var c,u,l,d,f,h,p,v,_,g=o.bits,m=0,b=0,w=0,y=0,k=0,E=0,x=0,Z=0,A=0,S=0,C=null,T=new Uint16Array(16),I=new Uint16Array(16),O=null;for(m=0;m<=xn;m++)T[m]=0;for(b=0;b=1&&0===T[y];y--);if(k>y&&(k=y),0===y)return a[i++]=20971520,a[i++]=20971520,o.bits=1,0;for(w=1;w0&&(0===e||1!==y))return-1;for(I[1]=0,m=1;m852||2===e&&A>592)return 1;for(;;){p=m-x,s[b]+1=h?(v=O[s[b]-h],_=C[s[b]-h]):(v=96,_=0),c=1<>x)+(u-=c)]=p<<24|v<<16|_|0}while(0!==u);for(c=1<>=1;if(0!==c?(S&=c-1,S+=c):S=0,b++,0===--T[m]){if(m===y)break;m=t[r+s[b]]}if(m>k&&(S&d)!==l){for(0===x&&(x=k),f+=w,Z=1<<(E=m-x);E+x852||2===e&&A>592)return 1;a[l=S&d]=k<<24|E<<16|f-i|0}}return 0!==S&&(a[f+S]=m-x<<24|64<<16|0),o.bits=k,0},In=nr.Z_FINISH,On=nr.Z_BLOCK,Nn=nr.Z_TREES,Rn=nr.Z_OK,Dn=nr.Z_STREAM_END,Bn=nr.Z_NEED_DICT,Pn=nr.Z_STREAM_ERROR,Fn=nr.Z_DATA_ERROR,Ln=nr.Z_MEM_ERROR,Un=nr.Z_BUF_ERROR,zn=nr.Z_DEFLATED,Hn=16180,jn=16190,Vn=16191,Mn=16192,Kn=16194,Gn=16199,Yn=16200,qn=16206,Jn=16209,Wn=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Xn(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var $n,Qn,ea=e=>{if(!e)return 1;var t=e.state;return!t||t.strm!==e||t.mode16211?1:0},ta=e=>{if(ea(e))return Pn;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Hn,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Rn},ra=e=>{if(ea(e))return Pn;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ta(e)},na=(e,t)=>{var r;if(ea(e))return Pn;var n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Pn:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,ra(e))},aa=(e,t)=>{if(!e)return Pn;var r=new Xn;e.state=r,r.strm=e,r.window=null,r.mode=Hn;var n=na(e,t);return n!==Rn&&(e.state=null),n},ia=!0,sa=e=>{if(ia){$n=new Int32Array(512),Qn=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Tn(1,e.lens,0,288,$n,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Tn(2,e.lens,0,32,Qn,0,e.work,{bits:5}),ia=!1}e.lencode=$n,e.lenbits=9,e.distcode=Qn,e.distbits=5},oa=(e,t,r,n)=>{var a,i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):((a=i.wsize-i.wnext)>n&&(a=n),i.window.set(t.subarray(r-n,r-n+a),i.wnext),(n-=a)?(i.window.set(t.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=a,i.wnext===i.wsize&&(i.wnext=0),i.whaveaa(e,15),inflateInit2:aa,inflate:(e,t)=>{var r,n,a,i,s,o,c,u,l,d,f,h,p,v,_,g,m,b,w,y,k,E,x,Z,A=0,S=new Uint8Array(4),C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ea(e)||!e.output||!e.input&&0!==e.avail_in)return Pn;(r=e.state).mode===Vn&&(r.mode=Mn),s=e.next_out,a=e.output,c=e.avail_out,i=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,d=o,f=c,E=Rn;e:for(;;)switch(r.mode){case Hn:if(0===r.wrap){r.mode=Mn;break}for(;l<16;){if(0===o)break e;o--,u+=n[i++]<>>8&255,r.check=tr(r.check,S,2,0),u=0,l=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=Jn;break}if((15&u)!==zn){e.msg="unknown compression method",r.mode=Jn;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits&&(r.wbits=k),k>15||k>r.wbits){e.msg="invalid window size",r.mode=Jn;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(S[0]=255&u,S[1]=u>>>8&255,r.check=tr(r.check,S,2,0)),u=0,l=0,r.mode=16182;case 16182:for(;l<32;){if(0===o)break e;o--,u+=n[i++]<>>8&255,S[2]=u>>>16&255,S[3]=u>>>24&255,r.check=tr(r.check,S,4,0)),u=0,l=0,r.mode=16183;case 16183:for(;l<16;){if(0===o)break e;o--,u+=n[i++]<>8),512&r.flags&&4&r.wrap&&(S[0]=255&u,S[1]=u>>>8&255,r.check=tr(r.check,S,2,0)),u=0,l=0,r.mode=16184;case 16184:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[i++]<>>8&255,r.check=tr(r.check,S,2,0)),u=0,l=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&((h=r.length)>o&&(h=o),h&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+h),k)),512&r.flags&&4&r.wrap&&(r.check=tr(r.check,n,h,i)),o-=h,i+=h,r.length-=h),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===o)break e;h=0;do{k=n[i+h++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&h>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Vn;break;case 16189:for(;l<32;){if(0===o)break e;o--,u+=n[i++]<>>=7&l,l-=7&l,r.mode=qn;break}for(;l<3;){if(0===o)break e;o--,u+=n[i++]<>>=1)){case 0:r.mode=16193;break;case 1:if(sa(r),r.mode=Gn,t===Nn){u>>>=2,l-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=Jn}u>>>=2,l-=2;break;case 16193:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[i++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=Jn;break}if(r.length=65535&u,u=0,l=0,r.mode=Kn,t===Nn)break e;case Kn:r.mode=16195;case 16195:if(h=r.length){if(h>o&&(h=o),h>c&&(h=c),0===h)break e;a.set(n.subarray(i,i+h),s),o-=h,i+=h,c-=h,s+=h,r.length-=h;break}r.mode=Vn;break;case 16196:for(;l<14;){if(0===o)break e;o--,u+=n[i++]<>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Jn;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,l-=3}for(;r.have<19;)r.lens[C[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,x={bits:r.lenbits},E=Tn(0,r.lens,0,19,r.lencode,0,r.work,x),r.lenbits=x.bits,E){e.msg="invalid code lengths set",r.mode=Jn;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>16&255,m=65535&A,!((_=A>>>24)<=l);){if(0===o)break e;o--,u+=n[i++]<>>=_,l-=_,r.lens[r.have++]=m;else{if(16===m){for(Z=_+2;l>>=_,l-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=Jn;break}k=r.lens[r.have-1],h=3+(3&u),u>>>=2,l-=2}else if(17===m){for(Z=_+3;l>>=_)),u>>>=3,l-=3}else{for(Z=_+7;l>>=_)),u>>>=7,l-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Jn;break}for(;h--;)r.lens[r.have++]=k}}if(r.mode===Jn)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=Jn;break}if(r.lenbits=9,x={bits:r.lenbits},E=Tn(1,r.lens,0,r.nlen,r.lencode,0,r.work,x),r.lenbits=x.bits,E){e.msg="invalid literal/lengths set",r.mode=Jn;break}if(r.distbits=6,r.distcode=r.distdyn,x={bits:r.distbits},E=Tn(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,x),r.distbits=x.bits,E){e.msg="invalid distances set",r.mode=Jn;break}if(r.mode=Gn,t===Nn)break e;case Gn:r.mode=Yn;case Yn:if(o>=6&&c>=258){e.next_out=s,e.avail_out=c,e.next_in=i,e.avail_in=o,r.hold=u,r.bits=l,En(e,f),s=e.next_out,a=e.output,c=e.avail_out,i=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,r.mode===Vn&&(r.back=-1);break}for(r.back=0;g=(A=r.lencode[u&(1<>>16&255,m=65535&A,!((_=A>>>24)<=l);){if(0===o)break e;o--,u+=n[i++]<>b)])>>>16&255,m=65535&A,!(b+(_=A>>>24)<=l);){if(0===o)break e;o--,u+=n[i++]<>>=b,l-=b,r.back+=b}if(u>>>=_,l-=_,r.back+=_,r.length=m,0===g){r.mode=16205;break}if(32&g){r.back=-1,r.mode=Vn;break}if(64&g){e.msg="invalid literal/length code",r.mode=Jn;break}r.extra=15&g,r.mode=16201;case 16201:if(r.extra){for(Z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;g=(A=r.distcode[u&(1<>>16&255,m=65535&A,!((_=A>>>24)<=l);){if(0===o)break e;o--,u+=n[i++]<>b)])>>>16&255,m=65535&A,!(b+(_=A>>>24)<=l);){if(0===o)break e;o--,u+=n[i++]<>>=b,l-=b,r.back+=b}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg="invalid distance code",r.mode=Jn;break}r.offset=m,r.extra=15&g,r.mode=16203;case 16203:if(r.extra){for(Z=r.extra;l>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Jn;break}r.mode=16204;case 16204:if(0===c)break e;if(h=f-c,r.offset>h){if((h=r.offset-h)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Jn;break}h>r.wnext?(h-=r.wnext,p=r.wsize-h):p=r.wnext-h,h>r.length&&(h=r.length),v=r.window}else v=a,p=s-r.offset,h=r.length;h>c&&(h=c),c-=h,r.length-=h;do{a[s++]=v[p++]}while(--h);0===r.length&&(r.mode=Yn);break;case 16205:if(0===c)break e;a[s++]=r.length,c--,r.mode=Yn;break;case qn:if(r.wrap){for(;l<32;){if(0===o)break e;o--,u|=n[i++]<{if(ea(e))return Pn;var t=e.state;return t.window&&(t.window=null),e.state=null,Rn},inflateGetHeader:(e,t)=>{if(ea(e))return Pn;var r=e.state;return 0===(2&r.wrap)?Pn:(r.head=t,t.done=!1,Rn)},inflateSetDictionary:(e,t)=>{var r,n=t.length;return ea(e)||0!==(r=e.state).wrap&&r.mode!==jn?Pn:r.mode===jn&&Qt(1,t,n,0)!==r.check?Fn:oa(e,t,n,n)?(r.mode=16210,Ln):(r.havedict=1,Rn)},inflateInfo:"pako inflate (from Nodeca project)"};var ua=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},la=Object.prototype.toString,da=nr.Z_NO_FLUSH,fa=nr.Z_FINISH,ha=nr.Z_OK,pa=nr.Z_STREAM_END,va=nr.Z_NEED_DICT,_a=nr.Z_STREAM_ERROR,ga=nr.Z_DATA_ERROR,ma=nr.Z_MEM_ERROR;function ba(e){this.options=rn.assign({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new cn,this.strm.avail_out=0;var r=ca.inflateInit2(this.strm,t.windowBits);if(r!==ha)throw new Error(rr[r]);if(this.header=new ua,ca.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"===typeof t.dictionary?t.dictionary=on.string2buf(t.dictionary):"[object ArrayBuffer]"===la.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=ca.inflateSetDictionary(this.strm,t.dictionary))!==ha))throw new Error(rr[r])}function wa(e,t){var r=new ba(t);if(r.push(e),r.err)throw r.msg||rr[r.err];return r.result}ba.prototype.push=function(e,t){var r,n,a,i=this.strm,s=this.options.chunkSize,o=this.options.dictionary;if(this.ended)return!1;for(n=t===~~t?t:!0===t?fa:da,"[object ArrayBuffer]"===la.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(s),i.next_out=0,i.avail_out=s),(r=ca.inflate(i,n))===va&&o&&((r=ca.inflateSetDictionary(i,o))===ha?r=ca.inflate(i,n):r===ga&&(r=va));i.avail_in>0&&r===pa&&i.state.wrap>0&&0!==e[i.next_in];)ca.inflateReset(i),r=ca.inflate(i,n);switch(r){case _a:case ga:case va:case ma:return this.onEnd(r),this.ended=!0,!1}if(a=i.avail_out,i.next_out&&(0===i.avail_out||r===pa))if("string"===this.options.to){var c=on.utf8border(i.output,i.next_out),u=i.next_out-c,l=on.buf2string(i.output,c);i.next_out=u,i.avail_out=s-u,u&&i.output.set(i.output.subarray(c,c+u),0),this.onData(l)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(r!==ha||0!==a){if(r===pa)return r=ca.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===i.avail_in)break}}return!0},ba.prototype.onData=function(e){this.chunks.push(e)},ba.prototype.onEnd=function(e){e===ha&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=rn.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var ya={Inflate:ba,inflate:wa,inflateRaw:function(e,t){return(t=t||{}).raw=!0,wa(e,t)},ungzip:wa,constants:nr},ka=yn.gzip,Ea=ya.ungzip,xa=r(63091),Za=r(67159),Aa=Object.defineProperty,Sa=(e,t)=>{for(var r in t)Aa(e,r,{get:t[r],enumerable:!0})};Sa({},{API_VERSION:()=>Qa,BN_FEE_TRANSACTION_VERSION_1:()=>qa,BN_FEE_TRANSACTION_VERSION_2:()=>Ja,BN_TRANSACTION_VERSION_1:()=>Ga,BN_TRANSACTION_VERSION_2:()=>Ya,BaseUrl:()=>ei,HEX_STR_TRANSACTION_VERSION_1:()=>Ma,HEX_STR_TRANSACTION_VERSION_2:()=>Ka,IS_BROWSER:()=>Ca,MASK_250:()=>Xa,MASK_251:()=>$a,NetworkName:()=>ti,RPC_GOERLI_NODES:()=>ii,RPC_MAINNET_NODES:()=>si,StarknetChainId:()=>ri,TEXT_TO_FELT_MAX_LEN:()=>Va,TransactionHashPrefix:()=>ni,UDC:()=>ai,ZERO:()=>Wa});Sa({},{IS_BROWSER:()=>Ca,addHexPrefix:()=>Fa,arrayBufferToString:()=>Ia,atobUniversal:()=>Ra,btoaUniversal:()=>Da,buf2hex:()=>Ba,calcByteLength:()=>Ua,padLeft:()=>La,pascalToSnake:()=>ja,removeHexPrefix:()=>Pa,sanitizeBytes:()=>za,sanitizeHex:()=>Ha,stringToArrayBuffer:()=>Na,utf8ToArray:()=>Oa});var Ca="undefined"!==typeof window,Ta="0";function Ia(e){return new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),"")}function Oa(e){return(new TextEncoder).encode(e)}function Na(e){return Oa(e)}function Ra(e){return d.base64.decode(e)}function Da(e){return d.base64.encode(new Uint8Array(e))}function Ba(e){return e.reduce(((e,t)=>e+t.toString(16).padStart(2,"0")),"")}function Pa(e){return e.replace(/^0x/i,"")}function Fa(e){return"0x".concat(Pa(e))}function La(e,t){return function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Ta,a=t-e.length,i=e;if(a>0){var s=n.repeat(a);i=r?s+e:e+s}return i}(e,t,!0,arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ta)}function Ua(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8,r=e.length,n=r%t;return n?(r-n)/t*t+t:r}function za(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ta;return La(e,Ua(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:8),t)}function Ha(e){return(e=za(e=Pa(e),2))&&(e=Fa(e)),e}var ja=e=>/[a-z]/.test(e)?e.split(/(?=[A-Z])/).join("_").toUpperCase():e,Va=31,Ma="0x1",Ka="0x2",Ga=1n,Ya=2n,qa=2n**128n+Ga,Ja=2n**128n+Ya,Wa=0n,Xa=2n**250n-1n,$a=2n**251n,Qa=Wa,ei=(e=>(e.SN_MAIN="https://alpha-mainnet.starknet.io",e.SN_GOERLI="https://alpha4.starknet.io",e))(ei||{}),ti=(e=>(e.SN_MAIN="SN_MAIN",e.SN_GOERLI="SN_GOERLI",e))(ti||{}),ri=(e=>(e.SN_MAIN="0x534e5f4d41494e",e.SN_GOERLI="0x534e5f474f45524c49",e))(ri||{}),ni=(e=>(e.DECLARE="0x6465636c617265",e.DEPLOY="0x6465706c6f79",e.DEPLOY_ACCOUNT="0x6465706c6f795f6163636f756e74",e.INVOKE="0x696e766f6b65",e.L1_HANDLER="0x6c315f68616e646c6572",e))(ni||{}),ai={ADDRESS:"0x041a78e741e5af2fec34b695679bc6891742439f7afb8484ecd7766661ad02bf",ENTRYPOINT:"deployContract"},ii=["https://starknet-testnet.public.blastapi.io/rpc/v0.5","https://limited-rpc.nethermind.io/goerli-juno/v0_5"],si=["https://starknet-mainnet.public.blastapi.io/rpc/v0.5","https://limited-rpc.nethermind.io/mainnet-juno/v0_5"];Sa({},{BlockStatus:()=>_i,BlockTag:()=>gi,EntryPointType:()=>di,Litteral:()=>li,RPC:()=>mi,SIMULATION_FLAG:()=>oi,Sequencer:()=>Ti,TransactionExecutionStatus:()=>vi,TransactionFinalityStatus:()=>pi,TransactionStatus:()=>hi,TransactionType:()=>fi,Uint:()=>ui,ValidateType:()=>ci});var oi=(e=>(e.SKIP_VALIDATE="SKIP_VALIDATE",e.SKIP_EXECUTE="SKIP_EXECUTE",e))(oi||{}),ci=(e=>(e.DEPLOY="DEPLOY",e.CALL="CALL",e.INVOKE="INVOKE",e))(ci||{}),ui=(e=>(e.u8="core::integer::u8",e.u16="core::integer::u16",e.u32="core::integer::u32",e.u64="core::integer::u64",e.u128="core::integer::u128",e.u256="core::integer::u256",e))(ui||{}),li=(e=>(e.ClassHash="core::starknet::class_hash::ClassHash",e.ContractAddress="core::starknet::contract_address::ContractAddress",e))(li||{}),di=(e=>(e.EXTERNAL="EXTERNAL",e.L1_HANDLER="L1_HANDLER",e.CONSTRUCTOR="CONSTRUCTOR",e))(di||{}),fi=(e=>(e.DECLARE="DECLARE",e.DEPLOY="DEPLOY",e.DEPLOY_ACCOUNT="DEPLOY_ACCOUNT",e.INVOKE="INVOKE_FUNCTION",e))(fi||{}),hi=(e=>(e.NOT_RECEIVED="NOT_RECEIVED",e.RECEIVED="RECEIVED",e.ACCEPTED_ON_L2="ACCEPTED_ON_L2",e.ACCEPTED_ON_L1="ACCEPTED_ON_L1",e.REJECTED="REJECTED",e.REVERTED="REVERTED",e))(hi||{}),pi=(e=>(e.NOT_RECEIVED="NOT_RECEIVED",e.RECEIVED="RECEIVED",e.ACCEPTED_ON_L2="ACCEPTED_ON_L2",e.ACCEPTED_ON_L1="ACCEPTED_ON_L1",e))(pi||{}),vi=(e=>(e.REJECTED="REJECTED",e.REVERTED="REVERTED",e.SUCCEEDED="SUCCEEDED",e))(vi||{}),_i=(e=>(e.PENDING="PENDING",e.ACCEPTED_ON_L1="ACCEPTED_ON_L1",e.ACCEPTED_ON_L2="ACCEPTED_ON_L2",e.REJECTED="REJECTED",e))(_i||{}),gi=(e=>(e.pending="pending",e.latest="latest",e))(gi||{}),mi={};Sa(mi,{EBlockTag:()=>Si,EDataAvailabilityMode:()=>Ci,ESimulationFlag:()=>Ei,ETransactionExecutionStatus:()=>Ai,ETransactionFinalityStatus:()=>Zi,ETransactionStatus:()=>xi,ETransactionType:()=>ki,Errors:()=>wi,JRPC:()=>bi,SPEC:()=>yi});var bi={},wi={},yi={},ki=(e=>(e.DECLARE="DECLARE",e.DEPLOY="DEPLOY",e.DEPLOY_ACCOUNT="DEPLOY_ACCOUNT",e.INVOKE="INVOKE",e.L1_HANDLER="L1_HANDLER",e))(ki||{}),Ei=(e=>(e.SKIP_VALIDATE="SKIP_VALIDATE",e.SKIP_FEE_CHARGE="SKIP_FEE_CHARGE",e))(Ei||{}),xi=(e=>(e.RECEIVED="RECEIVED",e.REJECTED="REJECTED",e.ACCEPTED_ON_L2="ACCEPTED_ON_L2",e.ACCEPTED_ON_L1="ACCEPTED_ON_L1",e))(xi||{}),Zi=(e=>(e.ACCEPTED_ON_L2="ACCEPTED_ON_L2",e.ACCEPTED_ON_L1="ACCEPTED_ON_L1",e))(Zi||{}),Ai=(e=>(e.SUCCEEDED="SUCCEEDED",e.REVERTED="REVERTED",e))(Ai||{}),Si=(e=>(e.LATEST="latest",e.PENDING="pending",e))(Si||{}),Ci=(e=>(e.L1="L1",e.L2="L2",e))(Ci||{}),Ti={};function Ii(e,t){if(!e)throw new Error(t||"Assertion failure")}var Oi={};function Ni(e){return/^0x[0-9a-f]*$/i.test(e)}function Ri(e){return BigInt(e)}function Di(e){return"bigint"===typeof e}function Bi(e){return Fa(Ri(e).toString(16))}Sa(Oi,{assertInRange:()=>zi,bigNumberishArrayToDecimalStringArray:()=>Hi,bigNumberishArrayToHexadecimalStringArray:()=>ji,cleanHex:()=>Ui,getDecimalString:()=>Mi,getHexString:()=>Ki,getHexStringArray:()=>Gi,hexToBytes:()=>qi,hexToDecimalString:()=>Li,isBigInt:()=>Di,isHex:()=>Ni,isStringWholeNumber:()=>Vi,toBigInt:()=>Ri,toCairoBool:()=>Yi,toHex:()=>Bi,toHexString:()=>Pi,toStorageKey:()=>Fi});var Pi=Bi;function Fi(e){return Fa(Ri(e).toString(16).padStart(64,"0"))}function Li(e){return BigInt(Fa(e)).toString(10)}var Ui=e=>e.toLowerCase().replace(/^(0x)0+/,"$1");function zi(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=""===n?"invalid length":"invalid ".concat(n," length"),i=BigInt(e),s=BigInt(t),o=BigInt(r);Ii(i>=s&&i<=o,"Message not signable, ".concat(a,"."))}function Hi(e){return e.map((e=>Ri(e).toString(10)))}function ji(e){return e.map((e=>Bi(e)))}var Vi=e=>/^\d+$/.test(e);function Mi(e){if(Ni(e))return Li(e);if(Vi(e))return e;throw new Error("".concat(e," need to be hex-string or whole-number-string"))}function Ki(e){if(Ni(e))return e;if(Vi(e))return Pi(e);throw new Error("".concat(e," need to be hex-string or whole-number-string"))}function Gi(e){return e.map((e=>Ki(e)))}var Yi=e=>(+e).toString();function qi(e){if(!Ni(e))throw new Error("".concat(e," need to be a hex-string"));var t=Pa(e);return t.length%2!==0&&(t="0".concat(t)),(0,f.nr)(t)}function Ji(e){var t=Pa(Bi(BigInt(e))),r=t.length%2===0?t:"0".concat(t);return Fa(re(qi(Fa(r))).toString(16))}function Wi(e){var t=BigInt(function(e){return Fa(re(Oa(e)).toString(16))}(e));return t&Xa}function Xi(e){return Bi(Wi(e))}function $i(e){return Ni(e)?e:Vi(e)?Pi(e):Xi(e)}Sa({},{getSelector:()=>$i,getSelectorFromName:()=>Xi,keccakBn:()=>Ji,starknetKeccak:()=>Wi});function Qi(e){return/^[\x00-\x7F]*$/.test(e)}function es(e){return e.length<=Va}function ts(e){return/^[0-9]*$/i.test(e)}function rs(e){return"string"===typeof e&&!Ni(e)&&!Vi(e)}Sa({},{decodeShortString:()=>os,encodeShortString:()=>ss,isASCII:()=>Qi,isDecimalString:()=>ts,isLongText:()=>as,isShortString:()=>es,isShortText:()=>ns,isText:()=>rs,splitLongString:()=>is});var ns=e=>rs(e)&&es(e),as=e=>rs(e)&&!es(e);function is(e){var t=RegExp("[^]{1,".concat(Va,"}"),"g");return e.match(t)||[]}function ss(e){if(!Qi(e))throw new Error("".concat(e," is not an ASCII string"));if(!es(e))throw new Error("".concat(e," is too long"));return Fa(e.replace(/./g,(e=>e.charCodeAt(0).toString(16))))}function os(e){if(!Qi(e))throw new Error("".concat(e," is not an ASCII string"));if(Ni(e))return Pa(e).replace(/.{2}/g,(e=>String.fromCharCode(parseInt(e,16))));if(ts(e))return os("0X".concat(BigInt(e).toString(16)));throw new Error("".concat(e," is not Hex or decimal"))}var cs={};Sa(cs,{felt:()=>Bs,getAbiContractVersion:()=>Ns,getArrayType:()=>Is,isCairo1Abi:()=>Os,isCairo1Type:()=>Ts,isLen:()=>ps,isTypeArray:()=>_s,isTypeBool:()=>As,isTypeContractAddress:()=>Ss,isTypeEnum:()=>ws,isTypeEthAddress:()=>Cs,isTypeFelt:()=>vs,isTypeLitteral:()=>xs,isTypeNamedTuple:()=>ms,isTypeOption:()=>ys,isTypeResult:()=>ks,isTypeStruct:()=>bs,isTypeTuple:()=>gs,isTypeUint:()=>Es,isTypeUint256:()=>Zs,tuple:()=>Ds,uint256:()=>Rs});Sa({},{UINT_128_MAX:()=>us,UINT_256_MAX:()=>ls,bnToUint256:()=>hs,isUint256:()=>fs,uint256ToBN:()=>ds});var us=(1n<<128n)-1n,ls=(1n<<256n)-1n;function ds(e){return(Ri(e.high)<<128n)+Ri(e.low)}function fs(e){return Ri(e)<=ls}function hs(e){var t=Ri(e);if(!fs(t))throw new Error("Number is too large");return{low:Fa((t&us).toString(16)),high:Fa((t>>128n).toString(16))}}var ps=e=>/_len$/.test(e),vs=e=>"felt"===e||"core::felt252"===e,_s=e=>/\*/.test(e)||e.startsWith("core::array::Array::")||e.startsWith("core::array::Span::"),gs=e=>/^\(.*\)$/i.test(e),ms=e=>/\(.*\)/i.test(e)&&e.includes(":"),bs=(e,t)=>e in t,ws=(e,t)=>e in t,ys=e=>e.startsWith("core::option::Option::"),ks=e=>e.startsWith("core::result::Result::"),Es=e=>Object.values(ui).includes(e),xs=e=>Object.values(li).includes(e),Zs=e=>"core::integer::u256"===e,As=e=>"core::bool"===e,Ss=e=>"core::starknet::contract_address::ContractAddress"===e,Cs=e=>"core::starknet::eth_address::EthAddress"===e,Ts=e=>e.includes("::"),Is=e=>Ts(e)?e.substring(e.indexOf("<")+1,e.lastIndexOf(">")):e.replace("*","");function Os(e){var t=Ns(e).cairo;if(void 0===t)throw Error("Unable to determine Cairo version");return"1"===t}function Ns(e){if(e.find((e=>"interface"===e.type)))return{cairo:"1",compiler:"2"};var t=e.find((e=>"function"===e.type&&(e.inputs.length||e.outputs.length)));if(!t)return{cairo:void 0,compiler:void 0};var r=t.inputs.length?t.inputs:t.outputs;return Ts(r[0].type)?{cairo:"1",compiler:"1"}:{cairo:"0",compiler:"0"}}var Rs=e=>{var t=BigInt(e);if(!fs(t))throw new Error("Number is too large");return{low:(t&us).toString(10),high:(t>>128n).toString(10)}},Ds=function(){for(var e=arguments.length,t=new Array(e),r=0;r 31 chars, felt can store short strings, split it to array of short strings"));var t=ss(e);return BigInt(t).toString()}if("string"===typeof e&&Ni(e))return BigInt(e).toString();if("string"===typeof e&&Vi(e))return e;if("boolean"===typeof e)return"".concat(+e);throw new Error("".concat(e," can't be computed by felt()"))}var Ps=class{constructor(e){var t=Object.values(e);if(0===t.length)throw new Error("This Enum must have a least 1 variant");if(1!==t.filter((e=>"undefined"!==typeof e)).length)throw new Error("This Enum must have exactly one active variant");this.variant=e}unwrap(){var e=Object.entries(this.variant).find((e=>"undefined"!==typeof e[1]));if("undefined"!==typeof e)return e[1]}activeVariant(){var e=Object.entries(this.variant).find((e=>"undefined"!==typeof e[1]));return"undefined"===typeof e?"":e[0]}},Fs=(e=>(e[e.Some=0]="Some",e[e.None=1]="None",e))(Fs||{}),Ls=class{constructor(e,t){if(!(e in Fs))throw new Error("Wrong variant : should be CairoOptionVariant.Some or .None.");if(0===e){if("undefined"===typeof t)throw new Error('The creation of a Cairo Option with "Some" variant needs a content as input.');this.Some=t,this.None=void 0}else this.Some=void 0,this.None=!0}unwrap(){if(!this.None)return this.Some}isSome(){return!("undefined"===typeof this.Some)}isNone(){return!0===this.None}},Us=(e=>(e[e.Ok=0]="Ok",e[e.Err=1]="Err",e))(Us||{}),zs=class{constructor(e,t){if(!(e in Us))throw new Error("Wrong variant : should be CairoResultVariant.Ok or .Err.");0===e?(this.Ok=t,this.Err=void 0):(this.Ok=void 0,this.Err=t)}unwrap(){if("undefined"!==typeof this.Ok)return this.Ok;if("undefined"!==typeof this.Err)return this.Err;throw new Error("Both Result.Ok and .Err are undefined. Not authorized.")}isOk(){return!("undefined"===typeof this.Ok)}isErr(){return!("undefined"===typeof this.Err)}},Hs=(e,t,r)=>{if(!Di(e[r]))throw new Error("Data and formatter mismatch on ".concat(r,":").concat(t[r],", expected response data ").concat(r,":").concat(e[r]," to be BN instead it is ").concat(typeof e[r]))},js=(e,t,r)=>{throw new Error("Unhandled formatter type on ".concat(r,":").concat(t[r]," for data ").concat(r,":").concat(e[r]))};function Vs(e,t,r){return Object.entries(e).reduce(((n,a)=>{var i=(0,u.Z)(a,2),s=i[0],o=i[1],c=null!==r&&void 0!==r?r:t[s];if(!(s in t)&&!r)return n[s]=o,n;if("string"===c){if(Array.isArray(e[s])){var l=Vs(e[s],e[s].map((e=>c)));return n[s]=Object.values(l).join(""),n}return Hs(e,t,s),n[s]=os(o),n}if("number"===c)return Hs(e,t,s),n[s]=Number(o),n;if("function"===typeof c)return n[s]=c(o),n;if(Array.isArray(c)){var d=Vs(e[s],c,c[0]);return n[s]=Object.values(d),n}return"object"===typeof c?(n[s]=Vs(e[s],c),n):(js(e,t,s),n)}),{})}var Ms=class{constructor(e){this.abi=e}methodInputsLength(e){return e.inputs.reduce(((e,t)=>ps(t.name)?e:e+1),0)}getMethod(e){return this.abi.find((t=>t.name===e))}getLegacyFormat(){return this.abi}},Ks=class{constructor(e){this.abi=e}methodInputsLength(e){return e.inputs.length}getMethod(e){return this.abi.find((e=>"interface"===e.type)).items.find((t=>t.name===e))}getLegacyFormat(){return this.abi.flatMap((e=>"interface"===e.type?e.items:e))}};function Gs(e){var t=function(e){return e.find((e=>"interface"===e.type))?2:Os(e)?1:0}(e);if(0===t||1===t)return new Ms(e);if(2===t)return new Ks(e);throw Error("Unsupported ABI version ".concat(t))}function Ys(e,t,r){return"constructor"===e&&!r&&!t.length}function qs(e){if(!e.includes("("))return{subTuple:[],result:e};for(var t=[],r="",n=0;nr.length?e.replace(" ",r.shift()):e))}(e):function(e){var t=qs(e.replace(/\s/g,"").slice(1,-1)),r=t.subTuple,n=t.result.split(",").map((e=>r.length?e.replace(" ",r.shift()):e));return ms(e)&&(n=n.reduce(((e,t)=>e.concat(function(e){var t=e.substring(0,e.indexOf(":"));return{name:t,type:e.substring(t.length+1)}}(t))),[])),n}(e)}function Ws(e,t,r,n){var a=(e,t)=>{if(_s(t))return function(e,t){var r=Is(t);if("string"===typeof e)return e;return e.map((e=>a(e,r)))}(e,t);if(ws(t,n)){var o=n[t];return s(e,o)}if(gs(t))return function(e,t){var r=Js(t).reduce(((t,r,n)=>{var i=Object.keys(e),s=r=>Object.defineProperty(t,n.toString(),{enumerable:!0,value:null!==r&&void 0!==r?r:e[i[n]]}),o=null!==r&&void 0!==r&&r.type?r.type:r;return s(a(e[i[n]],o)),t}),{});return r}(e,t);if(Cs(t))return e;if(Zs(t)){var c=e;if("object"!==typeof c)return c;if(!("low"in c)||!("high"in c))throw Error("Your object includes the property : ".concat(t,", containing an Uint256 object without the 'low' and 'high' keys."));return{low:c.low,high:c.high}}if(bs(t,r)){var u=r[t].members;return i(e,u)}return e},i=(e,t)=>t.reduce(((t,r)=>{var n;if("undefined"===e[r.name]&&(Ts(r.type)||!ps(r.name)))throw Error("Your object needs a property with key : ".concat(r.name," ."));return n=a(e[r.name],r.type),Object.defineProperty(t,r.name,{enumerable:!0,value:null!==n&&void 0!==n?n:e[r.name]}),t}),{});var s=(e,t)=>{if(ks(t.name)){var r=e,n=t.name.substring(t.name.indexOf("<")+1,t.name.lastIndexOf(",")),i=t.name.substring(t.name.indexOf(",")+1,t.name.lastIndexOf(">"));return r.isOk()?new zs(0,a(e.unwrap(),n)):new zs(1,a(e.unwrap(),i))}if(ys(t.name)){var s=e,o=t.name.substring(t.name.indexOf("<")+1,t.name.lastIndexOf(">"));return s.isSome()?new Ls(0,a(s.unwrap(),o)):new Ls(1,{})}var c=e,u=Object.entries(c.variant).map((e=>{if("undefined"===typeof e[1])return e;var r=t.type.substring(t.type.lastIndexOf("<")+1,t.type.lastIndexOf(">"));return"()"===r?e:[e[0],a(c.unwrap(),r)]}));return new Ps(Object.fromEntries(u))};return t.reduce(((t,r)=>{var n;return ps(r.name)&&!Ts(r.type)||(n=a(e[r.name],r.type),Object.defineProperty(t,r.name,{enumerable:!0,value:n})),t}),{})}function Xs(e,t){if(!0===Zs(e)){var r=Rs(t);return[Bs(r.low),Bs(r.high)]}return Bs(t)}function $s(e){if("object"===typeof e){var t=e.low,r=e.high;return[Bs(t),Bs(r)]}var n=Rs(e);return[Bs(n.low),Bs(n.high)]}function Qs(e,t,r,n){if(void 0===e)throw Error("Missing parameter for type ".concat(t));if(Array.isArray(e)){var a=[];a.push(Bs(e.length));var i=Is(t);return e.reduce(((e,t)=>e.concat(Qs(t,i,r,n))),a)}if(r[t]&&r[t].members.length){if(Zs(t))return $s(e);if("core::starknet::eth_address::EthAddress"===t)return Xs(t,e);var s=r[t].members,o=e;return s.reduce(((e,t)=>e.concat(Qs(o[t.name],t.type,r,n))),[])}if(gs(t)){var c=function(e,t){var r=Js(t),n=Object.values(e);if(n.length!==r.length)throw Error("ParseTuple: provided and expected abi tuple size do not match.\n provided: ".concat(n," \n expected: ").concat(r));return r.map(((e,t)=>{var r;return{element:n[t],type:null!==(r=e.type)&&void 0!==r?r:e}}))}(e,t);return c.reduce(((e,t)=>{var a=Qs(t.element,t.type,r,n);return e.concat(a)}),[])}if(Zs(t))return $s(e);if(ws(t,n)){var u=n[t].variants;if(ys(t)){var l=e;if(l.isSome()){var d=u.find((e=>"Some"===e.name));if("undefined"===typeof d)throw Error("Error in abi : Option has no 'Some' variant.");var f=d.type;if("()"===f)return(0).toString();var h=Qs(l.unwrap(),f,r,n);return Array.isArray(h)?[(0).toString(),...h]:[(0).toString(),h]}return 1..toString()}if(ks(t)){var p=e;if(p.isOk()){var v=u.find((e=>"Ok"===e.name));if("undefined"===typeof v)throw Error("Error in abi : Result has no 'Ok' variant.");var _=v.type;if("()"===_)return(0).toString();var g=Qs(p.unwrap(),_,r,n);return Array.isArray(g)?[(0).toString(),...g]:[(0).toString(),g]}var m=u.find((e=>"Err"===e.name));if("undefined"===typeof m)throw Error("Error in abi : Result has no 'Err' variant.");var b=m.type;if("()"===b)return 1..toString();var w=Qs(p.unwrap(),b,r,n);return Array.isArray(w)?[1..toString(),...w]:[1..toString(),w]}var y=e,k=y.activeVariant(),E=u.find((e=>e.name===k));if("undefined"===typeof E)throw Error("Not find in abi : Enum has no '".concat(k,"' variant."));var x=E.type,Z=u.findIndex((e=>e.name===k));if("()"===x)return Z.toString();var A=Qs(y.unwrap(),x,r,n);return Array.isArray(A)?[Z.toString(),...A]:[Z.toString(),A]}if("object"===typeof e)throw Error("Parameter ".concat(e," do not align with abi parameter ").concat(t));return Xs(t,e)}function eo(e,t){var r;switch(!0){case As(e):return r=t.next().value,Boolean(BigInt(r));case Zs(e):return ds({low:t.next().value,high:t.next().value});default:return r=t.next().value,BigInt(r)}}function to(e,t,r,n){if("()"===t.type)return{};if(Zs(t.type))return ds({low:e.next().value,high:e.next().value});if(_s(t.type)){for(var a=[],i={name:"",type:Is(t.type)},s=BigInt(e.next().value);a.length(t[a.name]=to(e,a,r,n),t)),{});if(n&&t.type in n&&n[t.type]){var o,c=Number(e.next().value),u=n[t.type].variants.reduce(((t,a,i)=>i===c?(t[a.name]=to(e,{name:"",type:a.type},r,n),t):(t[a.name]=void 0,t)),{});if(t.type.startsWith("core::option::Option")){var l=0===c?u.Some:void 0;return new Ls(c,l)}return t.type.startsWith("core::result::Result")?(o=0===c?u.Ok:u.Err,new zs(c,o)):new Ps(u)}if(gs(t.type))return Js(t.type).reduce(((t,a,i)=>{var s=null!==a&&void 0!==a&&a.name?a.name:i,o={name:s,type:null!==a&&void 0!==a&&a.type?a.type:a};return t[s]=to(e,o,r,n),t}),{});if(_s(t.type)){for(var d=[],f={name:"",type:Is(t.type)},h=BigInt(e.next().value);d.length{if(Ii("string"===typeof e||"number"===typeof e||"bigint"===typeof e,"Validate: arg ".concat(t.name," should be a felt typed as (String, Number or BigInt)")),"string"!==typeof e||Ni(e)){var r=BigInt(e.toString(10));Ii(r>=0n&&r<=2n**252n-1n,"Validate: arg ".concat(t.name," cairo typed ").concat(t.type," should be in range [0, 2^252-1]"))}},ao=(e,t)=>{"number"===typeof e&&Ii(e<=Number.MAX_SAFE_INTEGER,"Validation: Parameter is to large to be typed as Number use (BigInt or String)"),Ii("string"===typeof e||"number"===typeof e||"bigint"===typeof e||"object"===typeof e&&"low"in e&&"high"in e,"Validate: arg ".concat(t.name," of cairo type ").concat(t.type," should be type (String, Number or BigInt), but is ").concat(typeof e," ").concat(e,"."));var r="object"===typeof e?ds(e):Ri(e);switch(t.type){case"core::integer::u8":Ii(r>=0n&&r<=255n,"Validate: arg ".concat(t.name," cairo typed ").concat(t.type," should be in range [0 - 255]"));break;case"core::integer::u16":Ii(r>=0n&&r<=65535n,"Validate: arg ".concat(t.name," cairo typed ").concat(t.type," should be in range [0, 65535]"));break;case"core::integer::u32":Ii(r>=0n&&r<=4294967295n,"Validate: arg ".concat(t.name," cairo typed ").concat(t.type," should be in range [0, 4294967295]"));break;case"core::integer::u64":Ii(r>=0n&&r<=2n**64n-1n,"Validate: arg ".concat(t.name," cairo typed ").concat(t.type," should be in range [0, 2^64-1]"));break;case"core::integer::u128":Ii(r>=0n&&r<=2n**128n-1n,"Validate: arg ".concat(t.name," cairo typed ").concat(t.type," should be in range [0, 2^128-1]"));break;case"core::integer::u256":Ii(r>=0n&&r<=2n**256n-1n,"Validate: arg ".concat(t.name," is ").concat(t.type," 0 - 2^256-1"));break;case"core::starknet::class_hash::ClassHash":case"core::starknet::contract_address::ContractAddress":Ii(r>=0n&&r<=2n**252n-1n,"Validate: arg ".concat(t.name," cairo typed ").concat(t.type," should be in range [0, 2^252-1]"))}},io=(e,t)=>{Ii("boolean"===typeof e,"Validate: arg ".concat(t.name," of cairo type ").concat(t.type," should be type (Boolean)"))},so=(e,t,r)=>{if("core::integer::u256"!==t.type)if("core::starknet::eth_address::EthAddress"!==t.type)Ii("object"===typeof e&&!Array.isArray(e),"Validate: arg ".concat(t.name," is cairo type struct (").concat(t.type,"), and should be defined as js object (not array)")),r[t.type].members.forEach((r=>{var n=r.name;Ii(Object.keys(e).includes(n),"Validate: arg ".concat(t.name," should have a property ").concat(n))}));else{Ii("object"!==typeof e,"EthAdress type is waiting a BigNumberish. Got ".concat(e));var n=BigInt(e.toString(10));Ii(n>=0n&&n<=2n**160n-1n,"Validate: arg ".concat(t.name," cairo typed ").concat(t.type," should be in range [0, 2^160-1]"))}else ao(e,t)},oo=(e,t)=>{Ii("object"===typeof e&&!Array.isArray(e),"Validate: arg ".concat(t.name," is cairo type Enum (").concat(t.type,"), and should be defined as js object (not array)"));var r=Object.getOwnPropertyNames(Object.getPrototypeOf(e)),n=[...Object.getOwnPropertyNames(e),...r];if(!(ys(t.type)&&n.includes("isSome")&&n.includes("isNone"))&&!(ks(t.type)&&n.includes("isOk")&&n.includes("isErr"))&&(!n.includes("variant")||!n.includes("activeVariant")))throw new Error("Validate Enum: argument ".concat(t.name,", type ").concat(t.type,", value received ").concat(e,", is not an Enum."))},co=(e,t)=>{Ii("object"===typeof e&&!Array.isArray(e),"Validate: arg ".concat(t.name," should be a tuple (defined as object)"))},uo=(e,t,r,n)=>{var a=Is(t.type);if(!vs(a)||!as(e))switch(Ii(Array.isArray(e),"Validate: arg ".concat(t.name," should be an Array")),!0){case vs(a):e.forEach((e=>no(e,t)));break;case gs(a):e.forEach((e=>co(e,{name:t.name,type:a})));break;case _s(a):e.forEach((e=>uo(e,{name:"",type:a},r,n)));break;case bs(a,r):e.forEach((e=>so(e,{name:t.name,type:a},r)));break;case ws(a,n):e.forEach((e=>oo(e,{name:t.name,type:a})));break;case Es(a)||xs(a):e.forEach((e=>ao(e,t)));break;case As(a):e.forEach((e=>io(e,t)));break;default:throw new Error("Validate Unhandled: argument ".concat(t.name,", type ").concat(t.type,", value ").concat(e))}};function lo(e,t,r,n){e.inputs.reduce(((e,a)=>{var i=t[e];switch(!0){case ps(a.name):return e;case vs(a.type):no(i,a);break;case Es(a.type)||xs(a.type):ao(i,a);break;case As(a.type):io(i,a);break;case _s(a.type):uo(i,a,r,n);break;case bs(a.type,r):so(i,a,r);break;case ws(a.type,n):oo(i,a);break;case gs(a.type):co(i,a);break;default:throw new Error("Validate Unhandled: argument ".concat(a.name,", type ").concat(a.type,", value ").concat(i))}return e+1}),0)}var fo=class{constructor(e){this.structs=fo.getAbiStruct(e),this.enums=fo.getAbiEnum(e),this.parser=Gs(e),this.abi=this.parser.getLegacyFormat()}validate(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];"DEPLOY"!==e&&Ii(this.abi.filter((t=>{if("function"!==t.type)return!1;var r="view"===t.stateMutability||"view"===t.state_mutability;return"INVOKE"===e?!r:r})).map((e=>e.name)).includes(t),"".concat("INVOKE"===e?"invocable":"viewable"," method not found in abi"));var n=this.abi.find((r=>"DEPLOY"===e?r.name===t&&"constructor"===r.type:r.name===t&&"function"===r.type));if(!Ys(t,r,n)){var a=this.parser.methodInputsLength(n);if(r.length!==a)throw Error("Invalid number of arguments, expected ".concat(a," arguments, but got ").concat(r.length));lo(n,r,this.structs,this.enums)}}compile(e,t){var r,n=this.abi.find((t=>t.name===e));if(Ys(e,t,n))return[];if(Array.isArray(t))r=t;else{var a=Ws(t,n.inputs,this.structs,this.enums);lo(n,r=Object.values(a),this.structs,this.enums)}var i=r[Symbol.iterator](),s=n.inputs.reduce(((e,t)=>ps(t.name)&&!Ts(t.type)?e:e.concat(function(e,t,r,n){var a=t.name,i=t.type,s=e.next().value;switch(!0){case _s(i):if(!Array.isArray(s)&&!rs(s))throw Error("ABI expected parameter ".concat(a," to be array or long string, got ").concat(s));return"string"===typeof s&&(s=is(s)),Qs(s,t.type,r,n);case"core::starknet::eth_address::EthAddress"===i:return Xs(i,s);case bs(i,r)||gs(i)||Zs(i):case ws(i,n):return Qs(s,i,r,n);default:return Xs(i,s)}}(i,t,this.structs,this.enums))),[]);return Object.defineProperty(s,"__compiled__",{enumerable:!1,writable:!1,value:!0}),s}static compile(e){var t,r=e=>{var t=Object.fromEntries(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",n=Array.isArray(t)?[t.length.toString(),...t]:t;return Object.entries(n).flatMap((t=>{var a=(0,u.Z)(t,2),i=a[0],s=a[1];as(s)&&(s=is(s)),"entrypoint"===i&&(s=Xi(s));var o=Array.isArray(n)&&"0"===i?"$$len":i;if(Di(s))return[["".concat(r).concat(o),Bs(s)]];if(Object(s)===s){var c=Object.getOwnPropertyNames(Object.getPrototypeOf(s)),l=[...Object.getOwnPropertyNames(s),...c];if(l.includes("isSome")&&l.includes("isNone")){var d=s,f=d.isSome()?0:1;return d.isSome()?e({0:f,1:d.unwrap()},"".concat(r).concat(o,".")):[["".concat(r).concat(o),Bs(f)]]}if(l.includes("isOk")&&l.includes("isErr")){var h=s,p=h.isOk()?0:1;return e({0:p,1:h.unwrap()},"".concat(r).concat(o,"."))}if(l.includes("variant")&&l.includes("activeVariant")){var v=s,_=v.activeVariant(),g=Object.keys(v.variant).findIndex((e=>e===_));return"object"===typeof v.unwrap()&&0===Object.keys(v.unwrap()).length?[["".concat(r).concat(o),Bs(g)]]:e({0:g,1:v.unwrap()},"".concat(r).concat(o,"."))}return e(s,"".concat(r).concat(o,"."))}return[["".concat(r).concat(o),Bs(s)]]}))}(e));return t};if(Array.isArray(e)){var n=r((0,l.Z)({},e));t=Object.values(n)}else{var a=r(e);t=Object.values(a)}return Object.defineProperty(t,"__compiled__",{enumerable:!1,writable:!1,value:!0}),t}parse(e,t){var r=this.abi.find((t=>t.name===e)).outputs,n=t.flat()[Symbol.iterator](),a=r.flat().reduce(((e,t,r)=>{var a,i=null!==(a=t.name)&&void 0!==a?a:r;return e[i]=ro(n,t,this.structs,this.enums,e),e[i]&&e["".concat(i,"_len")]&&delete e["".concat(i,"_len")],e}),{});return 1===Object.keys(a).length&&0 in a?a[0]:a}format(e,t,r){return Vs(this.parse(e,t),r)}static getAbiStruct(e){return e.filter((e=>"struct"===e.type)).reduce(((e,t)=>(0,l.Z)((0,l.Z)({},e),{},{[t.name]:t})),{})}static getAbiEnum(e){var t=e.filter((e=>"enum"===e.type)).reduce(((e,t)=>(0,l.Z)((0,l.Z)({},e),{},{[t.name]:t})),{});return delete t["core::bool"],t}static toCalldata(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return fo.compile(e)}static toHex(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return fo.compile(e).map((e=>Bi(e)))}};Sa({},{calculateContractAddressFromHash:()=>To,calculateDeclareTransactionHash:()=>Ao,calculateDeployAccountTransactionHash:()=>So,calculateDeployTransactionHash:()=>Zo,calculateTransactionHash:()=>Co,calculateTransactionHashCommon:()=>xo,computeCompiledClassHash:()=>Bo,computeContractClassHash:()=>Lo,computeHashOnElements:()=>Eo,computeLegacyContractClassHash:()=>Ro,computeSierraContractClassHash:()=>Fo,default:()=>No,feeTransactionVersion:()=>wo,feeTransactionVersion_2:()=>yo,formatSpaces:()=>Oo,getSelector:()=>$i,getSelectorFromName:()=>Xi,getVersionsByType:()=>ko,keccakBn:()=>Ji,poseidon:()=>n,starknetKeccak:()=>Wi,transactionVersion:()=>mo,transactionVersion_2:()=>bo});Sa({},{starkCurve:()=>a,weierstrass:()=>w});Sa({},{parse:()=>po,parseAlwaysAsBig:()=>vo,stringify:()=>_o,stringifyAlwaysAsBig:()=>go});var ho=e=>{if(!ve(e))return parseFloat(e);var t=parseInt(e,10);return Number.isSafeInteger(t)?t:BigInt(e)},po=e=>Fe(String(e),void 0,ho),vo=e=>Fe(String(e),void 0,Oe),_o=(e,t,r,n)=>pt(e,t,r,n),go=_o,mo=Ga,bo=Ya,wo=qa,yo=Ja;function ko(e){return"fee"===e?{v1:wo,v2:yo}:{v1:mo,v2:bo}}function Eo(e){return[...e,e.length].reduce(((e,t)=>Q(Ri(e),Ri(t))),0).toString()}function xo(e,t,r,n,a,i,s){var o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=Eo(a);return Eo([e,t,r,n,c,i,s,...o])}function Zo(e,t,r,n){return xo("0x6465706c6f79",r,e,Xi(arguments.length>4&&void 0!==arguments[4]?arguments[4]:"constructor"),t,0,n)}function Ao(e,t,r,n,a,i,s){return xo("0x6465636c617265",r,t,0,[e],n,a,[i,...s?[s]:[]])}function So(e,t,r,n,a,i,s,o){return xo("0x6465706c6f795f6163636f756e74",a,e,0,[t,n,...r],i,s,[o])}function Co(e,t,r,n,a,i){return xo("0x696e766f6b65",t,e,0,r,n,a,[i])}function To(e,t,r,n){var a=Eo(fo.compile(r));return Eo([Bs("0x535441524b4e45545f434f4e54524143545f41444452455353"),n,e,t,a])}function Io(e,t){return"attributes"===e||"accessible_scopes"===e?Array.isArray(t)&&0===t.length?void 0:t:"debug_info"===e?null:null===t?void 0:t}function Oo(e){var t,r=!1,n=[],a=(0,c.Z)(e);try{for(a.s();!(t=a.n()).done;){var i=t.value;'"'===i&&!1===(n.length>0&&"\\"===n.slice(-1)[0])&&(r=!r),r?n.push(i):n.push(":"===i?": ":","===i?", ":i)}}catch(Nr){a.e(Nr)}finally{a.f()}return n.join("")}function No(e){var t=e.abi,r=e.program,n=Oo(_o({abi:t,program:r},Io));return Fa(re(Oa(n)).toString(16))}function Ro(e){var t="string"===typeof e?po(e):e,r=Bi(Qa),n=Eo(t.entry_points_by_type.EXTERNAL.flatMap((e=>[e.selector,e.offset]))),a=Eo(t.entry_points_by_type.L1_HANDLER.flatMap((e=>[e.selector,e.offset]))),i=Eo(t.entry_points_by_type.CONSTRUCTOR.flatMap((e=>[e.selector,e.offset]))),s=Eo(t.program.builtins.map((e=>ss(e)))),o=No(t),c=Eo(t.program.data);return Eo([r,n,a,i,s,o,c])}function Do(e){var t=e.flatMap((e=>{return[BigInt(e.selector),BigInt(e.offset),(t=e.builtins,pe(t.flatMap((e=>BigInt(ss(e))))))];var t}));return pe(t)}function Bo(e){var t=BigInt(ss("COMPILED_CLASS_V1")),r=Do(e.entry_points_by_type.EXTERNAL),n=Do(e.entry_points_by_type.L1_HANDLER),a=Do(e.entry_points_by_type.CONSTRUCTOR),i=pe(e.bytecode.map((e=>BigInt(e))));return Bi(pe([t,r,n,a,i]))}function Po(e){return pe(e.flatMap((e=>[BigInt(e.selector),BigInt(e.function_idx)])))}function Fo(e){var t=BigInt(ss("CONTRACT_CLASS_V0.1.0")),r=Po(e.entry_points_by_type.EXTERNAL),n=Po(e.entry_points_by_type.L1_HANDLER),a=Po(e.entry_points_by_type.CONSTRUCTOR),i=function(e){var t=Oo(_o(e.abi,null));return BigInt(Fa(re(Oa(t)).toString(16)))}(e),s=pe(e.sierra_program.map((e=>BigInt(e))));return Bi(pe([t,r,n,a,i,s]))}function Lo(e){var t="string"===typeof e?po(e):e;return"sierra_program"in t?Fo(t):Ro(t)}function Uo(e){var t="string"===typeof e?e:_o(e);return Da(ka(t))}function zo(e){if(Array.isArray(e))return e;var t=Ia(Ea(Ra(e)));return po(t)}function Ho(){return V(U.randomPrivateKey())}function jo(e){return Fa(e).toLowerCase()}function Vo(e){if(!e)throw Error("formatSignature: provided signature is undefined");if(Array.isArray(e))return e.map((e=>Bi(e)));try{var t=e.r,r=e.s;return[Bi(t),Bi(r)]}catch(n){throw new Error("Signature need to be weierstrass.SignatureType or an array for custom")}}function Mo(e){return Hi(Vo(e))}function Ko(e){return ji(Vo(e))}function Go(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,r=Math.round(100*(1+t));return Ri(e)*Ri(r)/100n}function Yo(e){return"sierra_program"in("string"===typeof e?po(e):e)}Sa({},{compressProgram:()=>Uo,decompressProgram:()=>zo,estimatedFeeToMaxFee:()=>Go,formatSignature:()=>Vo,makeAddress:()=>jo,randomAddress:()=>Ho,signatureToDecimalArray:()=>Mo,signatureToHexArray:()=>Ko});var qo="undefined"!==typeof window&&window.fetch||"undefined"!==typeof global&&global.fetch||xa;function Jo(e){return new Promise((t=>{setTimeout(t,e)}))}function Wo(e){var t=(0,l.Z)({},e);return delete t.sierra_program_debug_info,t.abi=Oo(_o(e.abi)),t.sierra_program=Oo(_o(e.sierra_program)),t.sierra_program=Uo(t.sierra_program),t}function Xo(e){var t="string"===typeof e?po(e):e;return Yo(e)?Wo(t):(0,l.Z)((0,l.Z)({},t),"program"in t&&{program:Uo(t.program)})}Sa({},{createSierraContractClass:()=>Wo,parseContract:()=>Xo,wait:()=>Jo});var $o=class{parseGetBlockResponse(e){return{timestamp:e.timestamp,block_hash:"block_hash"in e?e.block_hash:"",block_number:"block_number"in e?e.block_number:-1,new_root:"new_root"in e?e.new_root:"",parent_hash:e.parent_hash,status:"status"in e?e.status:"PENDING",transactions:e.transactions}}parseGetTransactionResponse(e){return{calldata:"calldata"in e?e.calldata:[],contract_address:"contract_address"in e?e.contract_address:"",sender_address:"sender_address"in e?e.sender_address:"",max_fee:"max_fee"in e?e.max_fee:"",nonce:"nonce"in e?e.nonce:"",signature:"signature"in e?e.signature:[],transaction_hash:e.transaction_hash,version:e.version}}parseFeeEstimateResponse(e){return{overall_fee:Ri(e[0].overall_fee),gas_consumed:Ri(e[0].gas_consumed),gas_price:Ri(e[0].gas_price)}}parseFeeEstimateBulkResponse(e){return e.map((e=>({overall_fee:Ri(e.overall_fee),gas_consumed:Ri(e.gas_consumed),gas_price:Ri(e.gas_price)})))}parseCallContractResponse(e){return{result:e}}parseSimulateTransactionResponse(e){return e.map((e=>(0,l.Z)((0,l.Z)({},e),{},{suggestedMaxFee:Go(BigInt(e.fee_estimation.overall_fee))})))}parseContractClassResponse(e){return(0,l.Z)((0,l.Z)({},e),{},{abi:"string"===typeof e.abi?JSON.parse(e.abi):e.abi})}};var Qo=class extends Error{constructor(e){super(e),Object.defineProperty(this,"name",{value:new.target.name,enumerable:!1,configurable:!0}),function(e,t){var r=Object.setPrototypeOf;r?r(e,t):e.__proto__=t}(this,new.target.prototype),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.constructor,r=Error.captureStackTrace;r&&r(e,t)}(this)}},ec=class extends Qo{},tc=class extends ec{constructor(e,t){super(e),this.errorCode=t}},rc=class extends ec{constructor(e,t){super(e),this.errorCode=t}};Sa({},{StarknetIdContract:()=>fc,getStarknetIdContract:()=>hc,useDecoded:()=>lc,useEncoded:()=>dc});var nc="abcdefghijklmnopqrstuvwxyz0123456789-",ac=BigInt(nc.length+1),ic="\u8fd9\u6765",sc=BigInt(nc.length),oc=BigInt(ic.length),cc=BigInt(ic.length+1);function uc(e){for(var t=0;e.endsWith(ic[ic.length-1]);)e=e.substring(0,e.length-1),t+=1;return[e,t]}function lc(e){var t="";return e.forEach((e=>{for(;e!==Wa;){var r=e%ac;if(e/=ac,r===BigInt(nc.length)){var n=e/cc;if(n===Wa){var a=e%cc;e=n,t+=a===Wa?nc[0]:ic[Number(a)-1]}else{t+=ic[Number(e%oc)],e/=oc}}else t+=nc[Number(r)]}var i=uc(t),s=(0,u.Z)(i,2),o=s[0],c=s[1];c&&(t=o+(c%2===0?ic[ic.length-1].repeat(c/2-1)+ic[0]+nc[1]:ic[ic.length-1].repeat((c-1)/2+1))),t+="."})),t?t.concat("stark"):t}function dc(e){var t=BigInt(0),r=BigInt(1);if(e.endsWith(ic[0]+nc[1])){var n=uc(e.substring(0,e.length-2)),a=(0,u.Z)(n,2),i=a[0],s=a[1];e=i+ic[ic.length-1].repeat(2*(s+1))}else{var o=uc(e),c=(0,u.Z)(o,2),l=c[0],d=c[1];d&&(e=l+ic[ic.length-1].repeat(1+2*(d-1)))}for(var f=0;f(e.MAINNET="0x6ac597f8116f886fa1c97a23fa4e08299975ecaf6b598873ca6792b9bbfb678",e.TESTNET="0x3bab268e932d2cecd1946f100ae67ce3dff9fd234119ea2f6da57d16d29fce",e))(fc||{});function hc(e){switch(e){case"0x534e5f4d41494e":return"0x6ac597f8116f886fa1c97a23fa4e08299975ecaf6b598873ca6792b9bbfb678";case"0x534e5f474f45524c49":return"0x3bab268e932d2cecd1946f100ae67ce3dff9fd234119ea2f6da57d16d29fce";default:throw new Error("Starknet.id is not yet deployed on this network")}}function pc(e,t,r){return vc.apply(this,arguments)}function vc(){return(vc=(0,o.Z)((0,s.Z)().mark((function e(t,r,n){var a,i,o,c,u;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getChainId();case 2:return a=e.sent,i=null!==n&&void 0!==n?n:hc(a),e.prev=4,e.next=7,t.callContract({contractAddress:i,entrypoint:"address_to_domain",calldata:fo.compile({address:r})});case 7:if(o=e.sent,c=o.result.map((e=>BigInt(e))).slice(1),u=lc(c)){e.next=12;break}throw Error("Starkname not found");case 12:return e.abrupt("return",u);case 15:if(e.prev=15,e.t0=e.catch(4),!(e.t0 instanceof Error&&"Starkname not found"===e.t0.message)){e.next=19;break}throw e.t0;case 19:throw Error("Could not get stark name");case 20:case"end":return e.stop()}}),e,null,[[4,15]])})))).apply(this,arguments)}function _c(e,t,r){return gc.apply(this,arguments)}function gc(){return(gc=(0,o.Z)((0,s.Z)().mark((function e(t,r,n){var a,i,o;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getChainId();case 2:return a=e.sent,i=null!==n&&void 0!==n?n:hc(a),e.prev=4,e.next=7,t.callContract({contractAddress:i,entrypoint:"domain_to_address",calldata:fo.compile({domain:[dc(r.replace(".stark","")).toString(10)]})});case 7:return o=e.sent,e.abrupt("return",o.result[0]);case 11:throw e.prev=11,e.t0=e.catch(4),Error("Could not get address from stark name");case 14:case"end":return e.stop()}}),e,null,[[4,11]])})))).apply(this,arguments)}var mc=Object.values(gi),bc=class{constructor(e){this.hash=null,this.number=null,this.tag=null,this.valueOf=()=>this.number,this.toString=()=>this.hash,this.setIdentifier(e)}setIdentifier(e){"string"===typeof e&&Ni(e)?this.hash=e:"bigint"===typeof e?this.hash=Bi(e):"number"===typeof e?this.number=e:"string"===typeof e&&mc.includes(e)?this.tag=e:this.tag="pending"}get queryIdentifier(){return null!==this.number?"blockNumber=".concat(this.number):null!==this.hash?"blockHash=".concat(this.hash):"blockNumber=".concat(this.tag)}get identifier(){return null!==this.number?{block_number:this.number}:null!==this.hash?{block_hash:this.hash}:this.tag}set identifier(e){this.setIdentifier(e)}get sequencerIdentifier(){var e;return null!==this.hash?{blockHash:this.hash}:{blockNumber:null!==(e=this.number)&&void 0!==e?e:this.tag}}},wc=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||console.warn("Using default public node url, please provide nodeUrl in provider options!");var t="SN_MAIN"===e?si:ii;return t[Math.floor(Math.random()*t.length)]},yc={"Content-Type":"application/json"},kc="pending",Ec=200,xc=class{constructor(e){this.responseParser=new $o,this.getBlockHashAndNumber=this.getBlockLatestAccepted,this.getStateUpdate=this.getBlockStateUpdate,this.traceBlockTransactions=this.getBlockTransactionsTraces,this.getTransactionCount=this.getBlockTransactionCount,this.traceTransaction=this.getTransactionTrace,this.getSimulateTransaction=this.simulateTransaction;var t=e||{},r=t.nodeUrl,n=t.retries,a=t.headers,i=t.blockIdentifier,s=t.chainId;Object.values(ti).includes(r)?this.nodeUrl=wc(r,null===e||void 0===e?void 0:e.default):this.nodeUrl=r||wc(void 0,null===e||void 0===e?void 0:e.default),this.retries=n||Ec,this.headers=(0,l.Z)((0,l.Z)({},yc),a),this.blockIdentifier=i||kc,this.chainId=s}fetch(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=(0,l.Z)({id:r,jsonrpc:"2.0",method:e},t&&{params:t});return qo(this.nodeUrl,{method:"POST",body:_o(n),headers:this.headers})}errorHandler(e,t,r,n){if(r){var a=r.code,i=r.message,s=r.data;throw new ec("RPC: ".concat(e," with params ").concat(_o(t),"\n ").concat(a,": ").concat(i,": ").concat(_o(s)))}if(n instanceof ec)throw n;if(n)throw Error(n.message)}fetchEndpoint(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c,u;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,r.fetch(e,t);case 3:return a=n.sent,n.next=6,a.json();case 6:return i=n.sent,o=i.error,c=i.result,r.errorHandler(e,t,o),n.abrupt("return",c);case 13:throw n.prev=13,n.t0=n.catch(0),r.errorHandler(e,t,null===n.t0||void 0===n.t0||null===(u=n.t0.response)||void 0===u?void 0:u.data,n.t0),n.t0;case 17:case"end":return n.stop()}}),n,null,[[0,13]])})))()}getChainId(){var e=this;return(0,o.Z)((0,s.Z)().mark((function t(){var r;return(0,s.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null===(r=e.chainId)||void 0===r){t.next=4;break}t.next=7;break;case 4:return t.next=6,e.fetchEndpoint("starknet_chainId");case 6:e.chainId=t.sent;case 7:return t.abrupt("return",e.chainId);case 8:case"end":return t.stop()}}),t)})))()}getSpecVersion(){var e=this;return(0,o.Z)((0,s.Z)().mark((function t(){return(0,s.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.fetchEndpoint("starknet_specVersion"));case 1:case"end":return t.stop()}}),t)})))()}getNonceForAddress(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,i=Bi(e),o=new bc(a).identifier,n.abrupt("return",r.fetchEndpoint("starknet_getNonce",{contract_address:i,block_id:o}));case 4:case"end":return n.stop()}}),n)})))()}getBlock(){var e=arguments,t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:t.blockIdentifier,r.abrupt("return",t.getBlockWithTxHashes(n).then(t.responseParser.parseGetBlockResponse));case 2:case"end":return r.stop()}}),r)})))()}getBlockLatestAccepted(){var e=this;return(0,o.Z)((0,s.Z)().mark((function t(){return(0,s.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.fetchEndpoint("starknet_blockHashAndNumber"));case 1:case"end":return t.stop()}}),t)})))()}getBlockNumber(){var e=this;return(0,o.Z)((0,s.Z)().mark((function t(){return(0,s.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.fetchEndpoint("starknet_blockNumber"));case 1:case"end":return t.stop()}}),t)})))()}getBlockWithTxHashes(){var e=arguments,t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n,a;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:t.blockIdentifier,a=new bc(n).identifier,r.abrupt("return",t.fetchEndpoint("starknet_getBlockWithTxHashes",{block_id:a}));case 3:case"end":return r.stop()}}),r)})))()}getBlockWithTxs(){var e=arguments,t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n,a;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:t.blockIdentifier,a=new bc(n).identifier,r.abrupt("return",t.fetchEndpoint("starknet_getBlockWithTxs",{block_id:a}));case 3:case"end":return r.stop()}}),r)})))()}getBlockStateUpdate(){var e=arguments,t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n,a;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:t.blockIdentifier,a=new bc(n).identifier,r.abrupt("return",t.fetchEndpoint("starknet_getStateUpdate",{block_id:a}));case 3:case"end":return r.stop()}}),r)})))()}getBlockTransactionsTraces(){var e=arguments,t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n,a;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:t.blockIdentifier,a=new bc(n).identifier,r.abrupt("return",t.fetchEndpoint("starknet_traceBlockTransactions",{block_id:a}));case 3:case"end":return r.stop()}}),r)})))()}getBlockTransactionCount(){var e=arguments,t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n,a;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:t.blockIdentifier,a=new bc(n).identifier,r.abrupt("return",t.fetchEndpoint("starknet_getBlockTransactionCount",{block_id:a}));case 3:case"end":return r.stop()}}),r)})))()}getPendingTransactions(){var e=this;return(0,o.Z)((0,s.Z)().mark((function t(){var r,n;return(0,s.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getBlock("pending");case 2:return r=t.sent,n=r.transactions,t.abrupt("return",Promise.all(n.map((t=>e.getTransactionByHash(t)))));case 5:case"end":return t.stop()}}),t)})))()}getTransaction(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",t.getTransactionByHash(e).then(t.responseParser.parseGetTransactionResponse));case 1:case"end":return r.stop()}}),r)})))()}getTransactionByHash(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Bi(e),r.abrupt("return",t.fetchEndpoint("starknet_getTransactionByHash",{transaction_hash:n}));case 2:case"end":return r.stop()}}),r)})))()}getTransactionByBlockIdAndIndex(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=new bc(e).identifier,n.abrupt("return",r.fetchEndpoint("starknet_getTransactionByBlockIdAndIndex",{block_id:a,index:t}));case 2:case"end":return n.stop()}}),n)})))()}getTransactionReceipt(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Bi(e),r.abrupt("return",t.fetchEndpoint("starknet_getTransactionReceipt",{transaction_hash:n}));case 2:case"end":return r.stop()}}),r)})))()}getTransactionTrace(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Bi(e),r.abrupt("return",t.fetchEndpoint("starknet_traceTransaction",{transaction_hash:n}));case 2:case"end":return r.stop()}}),r)})))()}getTransactionStatus(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Bi(e),r.abrupt("return",t.fetchEndpoint("starknet_getTransactionStatus",{transaction_hash:n}));case 2:case"end":return r.stop()}}),r)})))()}simulateTransaction(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c,u,l,d,f;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.blockIdentifier,i=void 0===a?r.blockIdentifier:a,o=t.skipValidate,c=void 0!==o&&o,u=t.skipFeeCharge,l=void 0===u||u,d=new bc(i).identifier,f=[],c&&f.push(mi.ESimulationFlag.SKIP_VALIDATE),l&&f.push(mi.ESimulationFlag.SKIP_FEE_CHARGE),n.abrupt("return",r.fetchEndpoint("starknet_simulateTransactions",{block_id:d,transactions:e.map((e=>r.buildTransaction(e))),simulation_flags:f}).then(r.responseParser.parseSimulateTransactionResponse));case 6:case"end":return n.stop()}}),n)})))()}waitForTransaction(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c,u,l,d,f,h,p,v,_,g,m,b,w;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:c=Bi(e),u=r.retries,l=!1,d=!1,f=null!==(a=null===t||void 0===t?void 0:t.retryInterval)&&void 0!==a?a:5e3,h=null!==(i=null===t||void 0===t?void 0:t.errorStates)&&void 0!==i?i:[mi.ETransactionStatus.REJECTED,mi.ETransactionExecutionStatus.REVERTED],p=null!==(o=null===t||void 0===t?void 0:t.successStates)&&void 0!==o?o:[mi.ETransactionExecutionStatus.SUCCEEDED,mi.ETransactionStatus.ACCEPTED_ON_L2,mi.ETransactionStatus.ACCEPTED_ON_L1];case 7:if(l){n.next=40;break}return n.next=10,Jo(f);case 10:return n.prev=10,n.next=13,r.getTransactionStatus(c);case 13:if(v=n.sent,_=v.execution_status,g=v.finality_status){n.next=19;break}throw new Error("waiting for transaction status");case 19:if(!p.includes(_)&&!p.includes(g)){n.next=23;break}l=!0,n.next=29;break;case 23:if(!h.includes(_)&&!h.includes(g)){n.next=29;break}throw m="".concat(_,": ").concat(g),(b=new Error(m)).response=v,d=!0,b;case 29:n.next=37;break;case 31:if(n.prev=31,n.t0=n.catch(10),!(n.t0 instanceof Error&&d)){n.next=35;break}throw n.t0;case 35:if(!(u<=0)){n.next=37;break}throw new Error("waitForTransaction timed-out with retries ".concat(r.retries));case 37:u-=1,n.next=7;break;case 40:w=null;case 41:if(null!==w){n.next=57;break}return n.prev=42,n.next=45,r.getTransactionReceipt(c);case 45:w=n.sent,n.next=52;break;case 48:if(n.prev=48,n.t1=n.catch(42),!(u<=0)){n.next=52;break}throw new Error("waitForTransaction timed-out with retries ".concat(r.retries));case 52:return u-=1,n.next=55,Jo(f);case 55:n.next=41;break;case 57:return n.abrupt("return",w);case 58:case"end":return n.stop()}}),n,null,[[10,31],[42,48]])})))()}getStorageAt(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o,c,u;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:n.blockIdentifier,o=Bi(e),c=Fi(t),u=new bc(i).identifier,a.abrupt("return",n.fetchEndpoint("starknet_getStorageAt",{contract_address:o,key:c,block_id:u}));case 5:case"end":return a.stop()}}),a)})))()}getClassHashAt(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,i=Bi(e),o=new bc(a).identifier,n.abrupt("return",r.fetchEndpoint("starknet_getClassHashAt",{block_id:o,contract_address:i}));case 4:case"end":return n.stop()}}),n)})))()}getClassByHash(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",t.getClass(e));case 1:case"end":return r.stop()}}),r)})))()}getClass(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,i=Bi(e),o=new bc(a).identifier,n.abrupt("return",r.fetchEndpoint("starknet_getClass",{class_hash:i,block_id:o}).then(r.responseParser.parseContractClassResponse));case 4:case"end":return n.stop()}}),n)})))()}getClassAt(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,i=Bi(e),o=new bc(a).identifier,n.abrupt("return",r.fetchEndpoint("starknet_getClassAt",{block_id:o,contract_address:i}).then(r.responseParser.parseContractClassResponse));case 4:case"end":return n.stop()}}),n)})))()}getCode(e,t){return(0,o.Z)((0,s.Z)().mark((function e(){return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:throw new Error("RPC does not implement getCode function");case 1:case"end":return e.stop()}}),e)})))()}getContractVersion(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o,c,u,l,d,f;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(o=(i=r.length>2&&void 0!==r[2]?r[2]:{}).blockIdentifier,c=void 0===o?n.blockIdentifier:o,u=i.compiler,l=void 0===u||u,!e){a.next=7;break}return a.next=4,n.getClassAt(e,c);case 4:case 10:d=a.sent,a.next=14;break;case 7:if(!t){a.next=13;break}return a.next=10,n.getClass(t,c);case 13:throw Error("getContractVersion require contractAddress or classHash");case 14:if(!Yo(d)){a.next=19;break}if(!l){a.next=18;break}return f=Ns(d.abi),a.abrupt("return",{cairo:"1",compiler:f.compiler});case 18:return a.abrupt("return",{cairo:"1",compiler:void 0});case 19:return a.abrupt("return",{cairo:"0",compiler:"0"});case 20:case"end":return a.stop()}}),a)})))()}getEstimateFee(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:n.blockIdentifier,a.abrupt("return",n.getInvokeEstimateFee(e,t,i));case 2:case"end":return a.stop()}}),a)})))()}getInvokeEstimateFee(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o,c;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:n.blockIdentifier,o=new bc(i).identifier,c=n.buildTransaction((0,l.Z)((0,l.Z)({type:"INVOKE_FUNCTION"},e),t),"fee"),a.abrupt("return",n.fetchEndpoint("starknet_estimateFee",{request:[c],block_id:o}).then(n.responseParser.parseFeeEstimateResponse));case 4:case"end":return a.stop()}}),a)})))()}getDeclareEstimateFee(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o,c;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:n.blockIdentifier,o=new bc(i).identifier,c=n.buildTransaction((0,l.Z)((0,l.Z)({type:"DECLARE"},e),t),"fee"),a.abrupt("return",n.fetchEndpoint("starknet_estimateFee",{request:[c],block_id:o}).then(n.responseParser.parseFeeEstimateResponse));case 4:case"end":return a.stop()}}),a)})))()}getDeployAccountEstimateFee(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o,c;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:n.blockIdentifier,o=new bc(i).identifier,c=n.buildTransaction((0,l.Z)((0,l.Z)({type:"DEPLOY_ACCOUNT"},e),t),"fee"),a.abrupt("return",n.fetchEndpoint("starknet_estimateFee",{request:[c],block_id:o}).then(n.responseParser.parseFeeEstimateResponse));case 4:case"end":return a.stop()}}),a)})))()}getEstimateFeeBulk(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.blockIdentifier,i=void 0===a?r.blockIdentifier:a,o=t.skipValidate,void 0!==o&&o&&console.warn("getEstimateFeeBulk RPC does not support skipValidate"),c=new bc(i).identifier,n.abrupt("return",r.fetchEndpoint("starknet_estimateFee",{request:e.map((e=>r.buildTransaction(e,"fee"))),block_id:c}).then(r.responseParser.parseFeeEstimateBulkResponse));case 4:case"end":return n.stop()}}),n)})))()}invokeFunction(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.fetchEndpoint("starknet_addInvokeTransaction",{invoke_transaction:{sender_address:e.contractAddress,calldata:fo.toHex(e.calldata),type:mi.ETransactionType.INVOKE,max_fee:Bi(t.maxFee||0),version:"0x1",signature:Ko(e.signature),nonce:Bi(t.nonce)}}));case 1:case"end":return n.stop()}}),n)})))()}declareContract(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=e.contract,i=e.signature,o=e.senderAddress,c=e.compiledClassHash,Yo(a)){n.next=3;break}return n.abrupt("return",r.fetchEndpoint("starknet_addDeclareTransaction",{declare_transaction:{type:mi.ETransactionType.DECLARE,contract_class:{program:a.program,entry_points_by_type:a.entry_points_by_type,abi:a.abi},version:Ma,max_fee:Bi(t.maxFee||0),signature:Ko(i),sender_address:o,nonce:Bi(t.nonce)}}));case 3:return n.abrupt("return",r.fetchEndpoint("starknet_addDeclareTransaction",{declare_transaction:{type:mi.ETransactionType.DECLARE,contract_class:{sierra_program:zo(a.sierra_program),contract_class_version:a.contract_class_version,entry_points_by_type:a.entry_points_by_type,abi:a.abi},compiled_class_hash:c||"",version:Ka,max_fee:Bi(t.maxFee||0),signature:Ko(i),sender_address:o,nonce:Bi(t.nonce)}}));case 4:case"end":return n.stop()}}),n)})))()}deployAccountContract(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=e.classHash,i=e.constructorCalldata,o=e.addressSalt,c=e.signature,n.abrupt("return",r.fetchEndpoint("starknet_addDeployAccountTransaction",{deploy_account_transaction:{constructor_calldata:fo.toHex(i||[]),class_hash:Bi(a),contract_address_salt:Bi(o||0),type:mi.ETransactionType.DEPLOY_ACCOUNT,max_fee:Bi(t.maxFee||0),version:Bi(t.version||0),signature:Ko(c),nonce:Bi(t.nonce)}}));case 2:case"end":return n.stop()}}),n)})))()}callContract(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,i=new bc(a).identifier,n.next=4,r.fetchEndpoint("starknet_call",{request:{contract_address:e.contractAddress,entry_point_selector:Xi(e.entrypoint),calldata:fo.toHex(e.calldata)},block_id:i});case 4:return o=n.sent,n.abrupt("return",r.responseParser.parseCallContractResponse(o));case 6:case"end":return n.stop()}}),n)})))()}estimateMessageFee(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c,u,l,d;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,i=e.from_address,o=e.to_address,c=e.entry_point_selector,u=e.payload,l={from_address:Bi(i),to_address:Bi(o),entry_point_selector:$i(c),payload:Gi(u)},d=new bc(a).identifier,n.abrupt("return",r.fetchEndpoint("starknet_estimateMessageFee",{message:l,block_id:d}));case 5:case"end":return n.stop()}}),n)})))()}getSyncingStats(){var e=this;return(0,o.Z)((0,s.Z)().mark((function t(){return(0,s.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.fetchEndpoint("starknet_syncing"));case 1:case"end":return t.stop()}}),t)})))()}getEvents(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",t.fetchEndpoint("starknet_getEvents",{filter:e}));case 1:case"end":return r.stop()}}),r)})))()}getStarkName(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",pc(r,e,t));case 1:case"end":return n.stop()}}),n)})))()}getAddressFromStarkName(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",_c(r,e,t));case 1:case"end":return n.stop()}}),n)})))()}buildTransaction(e,t){var r=ko(t),n={signature:Ko(e.signature),nonce:Bi(e.nonce),max_fee:Bi(e.maxFee||0)};if("INVOKE_FUNCTION"===e.type)return(0,l.Z)({type:mi.ETransactionType.INVOKE,sender_address:e.contractAddress,calldata:fo.toHex(e.calldata),version:Bi(e.version||r.v1)},n);if("DECLARE"===e.type)return Yo(e.contract)?(0,l.Z)({type:e.type,contract_class:(0,l.Z)((0,l.Z)({},e.contract),{},{sierra_program:zo(e.contract.sierra_program)}),compiled_class_hash:e.compiledClassHash||"",sender_address:e.senderAddress,version:Bi(e.version||r.v2)},n):(0,l.Z)({type:e.type,contract_class:e.contract,sender_address:e.senderAddress,version:Bi(e.version||r.v1)},n);if("DEPLOY_ACCOUNT"===e.type)return(0,l.Z)({type:e.type,constructor_calldata:fo.toHex(e.constructorCalldata||[]),class_hash:Bi(e.classHash),contract_address_salt:Bi(e.addressSalt||0),version:Bi(e.version||r.v1)},n);throw Error("RPC buildTransaction received unknown TransactionType")}},Zc=class{},Ac=class extends Zc{parseGetBlockResponse(e){return(0,l.Z)((0,l.Z)({},e),{},{new_root:e.state_root,parent_hash:e.parent_block_hash,transactions:Object.values(e.transactions).map((e=>"transaction_hash"in e&&e.transaction_hash)).filter(Boolean)})}parseGetTransactionResponse(e){if("NOT_RECEIVED"===e.status&&"NOT_RECEIVED"===e.finality_status)throw new ec;return(0,l.Z)((0,l.Z)({},e),{},{calldata:"calldata"in e.transaction?e.transaction.calldata:[],contract_class:"contract_class"in e.transaction?e.transaction.contract_class:void 0,entry_point_selector:"entry_point_selector"in e.transaction?e.transaction.entry_point_selector:void 0,max_fee:"max_fee"in e.transaction?e.transaction.max_fee:void 0,nonce:e.transaction.nonce,sender_address:"sender_address"in e.transaction?e.transaction.sender_address:void 0,signature:"signature"in e.transaction?e.transaction.signature:void 0,transaction_hash:"transaction_hash"in e.transaction?e.transaction.transaction_hash:void 0,version:"version"in e.transaction?e.transaction.version:void 0})}parseGetTransactionReceiptResponse(e){return(0,l.Z)((0,l.Z)({},e),{},{messages_sent:e.l2_to_l1_messages},"revert_error"in e&&{revert_reason:e.revert_error})}parseFeeEstimateResponse(e){if("overall_fee"in e){var t={};try{t={gas_consumed:Ri(e.gas_usage),gas_price:Ri(e.gas_price)}}catch(r){}return(0,l.Z)({overall_fee:Ri(e.overall_fee)},t)}return{overall_fee:Ri(e.amount)}}parseFeeEstimateBulkResponse(e){return[].concat(e).map((e=>{if("overall_fee"in e){var t={};try{t={gas_consumed:Ri(e.gas_usage),gas_price:Ri(e.gas_price)}}catch(r){}return(0,l.Z)({overall_fee:Ri(e.overall_fee)},t)}return{overall_fee:Ri(e.amount)}}))}parseSimulateTransactionResponse(e){var t="overall_fee"in e.fee_estimation?e.fee_estimation.overall_fee:e.fee_estimation.amount;return[{transaction_trace:e.trace,fee_estimation:e.fee_estimation,suggestedMaxFee:Go(BigInt(t))}]}parseCallContractResponse(e){return{result:e.result}}parseInvokeFunctionResponse(e){return{transaction_hash:e.transaction_hash}}parseDeployContractResponse(e){return{transaction_hash:e.transaction_hash,contract_address:e.address}}parseDeclareContractResponse(e){return{transaction_hash:e.transaction_hash,class_hash:e.class_hash}}parseGetStateUpdateResponse(e){var t=Object.entries(e.state_diff.nonces).map((e=>{var t=(0,u.Z)(e,2);return{contract_address:t[0],nonce:t[1]}})),r=Object.entries(e.state_diff.storage_diffs).map((e=>{var t=(0,u.Z)(e,2);return{address:t[0],storage_entries:t[1]}}));return(0,l.Z)((0,l.Z)({},e),{},{state_diff:(0,l.Z)((0,l.Z)({},e.state_diff),{},{storage_diffs:r,nonces:t})})}parseContractClassResponse(e){var t=Yo(e)?e:Xo(e);return(0,l.Z)((0,l.Z)({},t),{},{abi:"string"===typeof t.abi?JSON.parse(t.abi):t.abi})}},Sc=/^(?:\w+:)?\/\/(\S+)$/,Cc=/^localhost[:?\d]*(?:[^:?\d]\S*)?$/,Tc=/^[^\s.]+\.\S{2,}$/;function Ic(e,t,r){return function(e){if(!e)return!1;if("string"!==typeof e)return!1;var t=e.match(Sc);if(!t)return!1;var r=t[1];return!!r&&!(!Cc.test(r)&&!Tc.test(r))}(r)?r:Za(e,null!==r&&void 0!==r?r:t)}var Oc={network:"SN_GOERLI",blockIdentifier:"pending"},Nc=class{constructor(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oc;this.responseParser=new Ac,"network"in t?(this.baseUrl=Nc.getNetworkFromName(t.network),this.feederGatewayUrl=Ic(this.baseUrl,"feeder_gateway"),this.gatewayUrl=Ic(this.baseUrl,"gateway")):(this.baseUrl=t.baseUrl,this.feederGatewayUrl=Ic(this.baseUrl,"feeder_gateway",t.feederGatewayUrl),this.gatewayUrl=Ic(this.baseUrl,"gateway",t.gatewayUrl)),this.chainId=null!==(e=null===t||void 0===t?void 0:t.chainId)&&void 0!==e?e:Nc.getChainIdFromBaseUrl(this.baseUrl),this.headers=t.headers,this.blockIdentifier=(null===t||void 0===t?void 0:t.blockIdentifier)||Oc.blockIdentifier}static getNetworkFromName(e){switch(e){case"SN_MAIN":case"0x534e5f4d41494e":return"https://alpha-mainnet.starknet.io";case"SN_GOERLI":case"0x534e5f474f45524c49":return"https://alpha4.starknet.io";default:throw new Error("Could not detect base url from NetworkName")}}static getChainIdFromBaseUrl(e){try{return new URL(e).host.includes("mainnet.starknet.io")?"0x534e5f4d41494e":"0x534e5f474f45524c49"}catch(t){return console.error("Could not parse baseUrl: ".concat(e)),"0x534e5f474f45524c49"}}getFetchUrl(e){return["add_transaction"].includes(e)?this.gatewayUrl:this.feederGatewayUrl}getFetchMethod(e){return["add_transaction","call_contract","estimate_fee","estimate_message_fee","estimate_fee_bulk","simulate_transaction"].includes(e)?"POST":"GET"}getQueryString(e){if(void 0===(t=e)||0===Object.keys(t).length||1===Object.keys(t).length&&Object.entries(t).every((e=>{var t=(0,u.Z)(e,2),r=t[0],n=t[1];return"blockIdentifier"===r&&null===n})))return"";var t,r=Object.entries(e).map((e=>{var t=(0,u.Z)(e,2),r=t[0],n=t[1];if("blockIdentifier"===r){var a=new bc(n);return"".concat(a.queryIdentifier)}return"".concat(r,"=").concat(n)})).join("&");return"?".concat(r)}getHeaders(e){return"POST"===e?(0,l.Z)({"Content-Type":"application/json"},this.headers):this.headers}fetchEndpoint(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c,u,l,d,f,h;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:for(a=t.length,i=new Array(a>1?a-1:0),o=1;o1&&void 0!==t[1]?t[1]:r.blockIdentifier,n.abrupt("return",r.fetchEndpoint("call_contract",{blockIdentifier:u},{contract_address:a,entry_point_selector:Xi(i),calldata:fo.compile(c)}).then(r.responseParser.parseCallContractResponse));case 3:case"end":return n.stop()}}),n)})))()}getBlock(){var e=arguments,t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:t.blockIdentifier,r.abrupt("return",t.fetchEndpoint("get_block",{blockIdentifier:n}).then(t.responseParser.parseGetBlockResponse));case 2:case"end":return r.stop()}}),r)})))()}getNonceForAddress(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,n.abrupt("return",r.fetchEndpoint("get_nonce",{contractAddress:e,blockIdentifier:a}));case 2:case"end":return n.stop()}}),n)})))()}getStorageAt(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:n.blockIdentifier,o=Ri(t).toString(10),a.abrupt("return",n.fetchEndpoint("get_storage_at",{blockIdentifier:i,contractAddress:e,key:o}));case 3:case"end":return a.stop()}}),a)})))()}getTransaction(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Bi(e),r.abrupt("return",t.fetchEndpoint("get_transaction",{transactionHash:n}).then((e=>{if(1===Object.values(e).length)throw new ec(e.status);return t.responseParser.parseGetTransactionResponse(e)})));case 2:case"end":return r.stop()}}),r)})))()}getTransactionReceipt(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Bi(e),r.abrupt("return",t.fetchEndpoint("get_transaction_receipt",{transactionHash:n}).then(t.responseParser.parseGetTransactionReceiptResponse));case 2:case"end":return r.stop()}}),r)})))()}getClassAt(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,n.abrupt("return",r.fetchEndpoint("get_full_contract",{blockIdentifier:a,contractAddress:e}).then(r.responseParser.parseContractClassResponse));case 2:case"end":return n.stop()}}),n)})))()}getClassHashAt(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,n.abrupt("return",r.fetchEndpoint("get_class_hash_at",{blockIdentifier:a,contractAddress:e}));case 2:case"end":return n.stop()}}),n)})))()}getClassByHash(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,n.abrupt("return",r.fetchEndpoint("get_class_by_hash",{classHash:e,blockIdentifier:a}).then(r.responseParser.parseContractClassResponse));case 2:case"end":return n.stop()}}),n)})))()}getCompiledClassByClassHash(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,n.abrupt("return",r.fetchEndpoint("get_compiled_class_by_class_hash",{classHash:e,blockIdentifier:a}));case 2:case"end":return n.stop()}}),n)})))()}getContractVersion(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o,c,u,l,d,f;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(o=(i=r.length>2&&void 0!==r[2]?r[2]:{}).blockIdentifier,c=void 0===o?n.blockIdentifier:o,u=i.compiler,l=void 0===u||u,!e){a.next=7;break}return a.next=4,n.getClassAt(e,c);case 4:case 10:d=a.sent,a.next=14;break;case 7:if(!t){a.next=13;break}return a.next=10,n.getClassByHash(t,c);case 13:throw Error("getContractVersion require contractAddress or classHash");case 14:if(!Yo(d)){a.next=19;break}if(!l){a.next=18;break}return f=Ns(d.abi),a.abrupt("return",{cairo:"1",compiler:f.compiler});case 18:return a.abrupt("return",{cairo:"1",compiler:void 0});case 19:return a.abrupt("return",{cairo:"0",compiler:"0"});case 20:case"end":return a.stop()}}),a)})))()}invokeFunction(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.fetchEndpoint("add_transaction",void 0,{type:"INVOKE_FUNCTION",sender_address:e.contractAddress,calldata:fo.compile(null!==(a=e.calldata)&&void 0!==a?a:[]),signature:Mo(e.signature),nonce:Bi(t.nonce),max_fee:Bi(t.maxFee||0),version:"0x1"}).then(r.responseParser.parseInvokeFunctionResponse));case 1:case"end":return n.stop()}}),n)})))()}deployAccountContract(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=e.classHash,i=e.constructorCalldata,o=e.addressSalt,c=e.signature,n.abrupt("return",r.fetchEndpoint("add_transaction",void 0,{type:"DEPLOY_ACCOUNT",contract_address_salt:null!==o&&void 0!==o?o:Ho(),constructor_calldata:fo.compile(null!==i&&void 0!==i?i:[]),class_hash:Bi(a),max_fee:Bi(t.maxFee||0),version:Bi(t.version||0),nonce:Bi(t.nonce),signature:Mo(c)}).then(r.responseParser.parseDeployContractResponse));case 2:case"end":return n.stop()}}),n)})))()}declareContract(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=e.senderAddress,i=e.contract,o=e.signature,c=e.compiledClassHash,Yo(i)){n.next=3;break}return n.abrupt("return",r.fetchEndpoint("add_transaction",void 0,{type:"DECLARE",contract_class:i,nonce:Bi(t.nonce),signature:Mo(o),sender_address:a,max_fee:Bi(t.maxFee||0),version:Bi(mo)}).then(r.responseParser.parseDeclareContractResponse));case 3:return n.abrupt("return",r.fetchEndpoint("add_transaction",void 0,{type:"DECLARE",sender_address:a,compiled_class_hash:c,contract_class:i,nonce:Bi(t.nonce),signature:Mo(o),max_fee:Bi(t.maxFee||0),version:Bi(bo)}).then(r.responseParser.parseDeclareContractResponse));case 4:case"end":return n.stop()}}),n)})))()}getEstimateFee(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:n.blockIdentifier,o=r.length>3&&void 0!==r[3]&&r[3],a.abrupt("return",n.getInvokeEstimateFee(e,t,i,o));case 3:case"end":return a.stop()}}),a)})))()}getInvokeEstimateFee(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o,c;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:n.blockIdentifier,o=r.length>3&&void 0!==r[3]&&r[3],c=n.buildTransaction((0,l.Z)((0,l.Z)({type:"INVOKE_FUNCTION"},e),t),"fee"),a.abrupt("return",n.fetchEndpoint("estimate_fee",{blockIdentifier:i,skipValidate:o},c).then(n.responseParser.parseFeeEstimateResponse));case 4:case"end":return a.stop()}}),a)})))()}getDeclareEstimateFee(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o,c;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:n.blockIdentifier,o=r.length>3&&void 0!==r[3]&&r[3],c=n.buildTransaction((0,l.Z)((0,l.Z)({type:"DECLARE"},e),t),"fee"),a.abrupt("return",n.fetchEndpoint("estimate_fee",{blockIdentifier:i,skipValidate:o},c).then(n.responseParser.parseFeeEstimateResponse));case 4:case"end":return a.stop()}}),a)})))()}getDeployAccountEstimateFee(e,t){var r=arguments,n=this;return(0,o.Z)((0,s.Z)().mark((function a(){var i,o,c;return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return i=r.length>2&&void 0!==r[2]?r[2]:n.blockIdentifier,o=r.length>3&&void 0!==r[3]&&r[3],c=n.buildTransaction((0,l.Z)((0,l.Z)({type:"DEPLOY_ACCOUNT"},e),t),"fee"),a.abrupt("return",n.fetchEndpoint("estimate_fee",{blockIdentifier:i,skipValidate:o},c).then(n.responseParser.parseFeeEstimateResponse));case 4:case"end":return a.stop()}}),a)})))()}getEstimateFeeBulk(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c,u;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.blockIdentifier,i=void 0===a?r.blockIdentifier:a,o=t.skipValidate,c=void 0!==o&&o,u=e.map((e=>r.buildTransaction(e,"fee"))),n.abrupt("return",r.fetchEndpoint("estimate_fee_bulk",{blockIdentifier:i,skipValidate:c},u).then(r.responseParser.parseFeeEstimateBulkResponse));case 3:case"end":return n.stop()}}),n)})))()}getCode(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,n.abrupt("return",r.fetchEndpoint("get_code",{contractAddress:e,blockIdentifier:a}));case 2:case"end":return n.stop()}}),n)})))()}waitForTransaction(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c,u,l,d,f,h,p,v,_;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:u=!1,l=0,d=null!==(a=null===t||void 0===t?void 0:t.retryInterval)&&void 0!==a?a:5e3,f=null!==(i=null===t||void 0===t?void 0:t.errorStates)&&void 0!==i?i:["REJECTED","NOT_RECEIVED","REVERTED"],h=null!==(o=null===t||void 0===t?void 0:t.successStates)&&void 0!==o?o:["SUCCEEDED","ACCEPTED_ON_L1","ACCEPTED_ON_L2"];case 5:if(u){n.next=27;break}return n.next=8,Jo(d);case 8:return n.next=10,r.getTransactionStatus(e);case 10:if(!("NOT_RECEIVED"===(c=n.sent).finality_status&&l<3)){n.next=15;break}l+=1,n.next=25;break;case 15:if(!h.includes(c.finality_status)&&!h.includes(c.execution_status)){n.next=19;break}u=!0,n.next=25;break;case 19:if(!f.includes(c.finality_status)&&!f.includes(c.execution_status)){n.next=25;break}throw p=void 0,p=c.tx_failure_reason?"".concat(c.tx_status,": ").concat(c.tx_failure_reason.code,"\n").concat(c.tx_failure_reason.error_message):c.tx_revert_reason?"".concat(c.tx_status,": ").concat(c.tx_revert_reason):c.tx_status,(v=new Error(p)).response=c,v;case 25:n.next=5;break;case 27:return n.next=29,r.getTransactionReceipt(e);case 29:return _=n.sent,n.abrupt("return",_);case 31:case"end":return n.stop()}}),n)})))()}getTransactionStatus(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Bi(e),r.abrupt("return",t.fetchEndpoint("get_transaction_status",{transactionHash:n}));case 2:case"end":return r.stop()}}),r)})))()}getContractAddresses(){var e=this;return(0,o.Z)((0,s.Z)().mark((function t(){return(0,s.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.fetchEndpoint("get_contract_addresses"));case 1:case"end":return t.stop()}}),t)})))()}getTransactionTrace(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=Bi(e),r.abrupt("return",t.fetchEndpoint("get_transaction_trace",{transactionHash:n}));case 2:case"end":return r.stop()}}),r)})))()}estimateMessageFee(e){var t=arguments,r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c,u,l;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=e.from_address,i=e.to_address,o=e.entry_point_selector,c=e.payload,u=t.length>1&&void 0!==t[1]?t[1]:r.blockIdentifier,l={from_address:Mi(a),to_address:Ki(i),entry_point_selector:$i(o),payload:Gi(c)},n.abrupt("return",r.fetchEndpoint("estimate_message_fee",{blockIdentifier:u},l));case 4:case"end":return n.stop()}}),n)})))()}getSimulateTransaction(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){var a,i,o,c,u,l,d;return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return a=t.blockIdentifier,i=void 0===a?r.blockIdentifier:a,o=t.skipValidate,c=void 0!==o&&o,u=t.skipExecute,l=void 0!==u&&u,e.length>1&&console.warn("Sequencer simulate process only first element from invocations list"),l&&console.warn("Sequencer can't skip account __execute__"),d=r.buildTransaction(e[0]),n.abrupt("return",r.fetchEndpoint("simulate_transaction",{blockIdentifier:i,skipValidate:null!==c&&void 0!==c&&c},d).then(r.responseParser.parseSimulateTransactionResponse));case 5:case"end":return n.stop()}}),n)})))()}getStateUpdate(){var e=arguments,t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n,a;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:t.blockIdentifier,a=new bc(n).sequencerIdentifier,r.abrupt("return",t.fetchEndpoint("get_state_update",(0,l.Z)({},a)).then(t.responseParser.parseGetStateUpdateResponse));case 3:case"end":return r.stop()}}),r)})))()}getBlockTraces(){var e=arguments,t=this;return(0,o.Z)((0,s.Z)().mark((function r(){var n,a;return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=e.length>0&&void 0!==e[0]?e[0]:t.blockIdentifier,a=new bc(n).sequencerIdentifier,r.abrupt("return",t.fetchEndpoint("get_block_traces",(0,l.Z)({},a)));case 3:case"end":return r.stop()}}),r)})))()}getStarkName(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",pc(r,e,t));case 1:case"end":return n.stop()}}),n)})))()}getAddressFromStarkName(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",_c(r,e,t));case 1:case"end":return n.stop()}}),n)})))()}buildTransaction(e,t){var r,n=ko(t),a={signature:Mo(e.signature),nonce:Bi(e.nonce)};if("INVOKE_FUNCTION"===e.type)return(0,l.Z)({type:e.type,sender_address:e.contractAddress,calldata:fo.compile(null!==(r=e.calldata)&&void 0!==r?r:[]),version:Bi(e.version||n.v1)},a);if("DECLARE"===e.type)return Yo(e.contract)?(0,l.Z)({type:e.type,contract_class:e.contract,compiled_class_hash:e.compiledClassHash,sender_address:e.senderAddress,version:Bi(e.version||n.v2)},a):(0,l.Z)({type:e.type,contract_class:e.contract,sender_address:e.senderAddress,version:Bi(e.version||n.v1)},a);if("DEPLOY_ACCOUNT"===e.type)return(0,l.Z)({type:e.type,constructor_calldata:fo.compile(e.constructorCalldata||[]),class_hash:Bi(e.classHash),contract_address_salt:Bi(e.addressSalt||0),version:Bi(e.version||n.v1)},a);throw Error("Sequencer buildTransaction received unknown TransactionType")}},Rc=class{constructor(e){this.provider=e instanceof Rc?e.provider:e instanceof xc||e instanceof Nc?e:e&&"rpc"in e?new xc(e.rpc):e&&"sequencer"in e?new Nc(e.sequencer):new xc}getChainId(){var e=this;return(0,o.Z)((0,s.Z)().mark((function t(){return(0,s.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.provider.getChainId());case 1:case"end":return t.stop()}}),t)})))()}getBlock(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",t.provider.getBlock(e));case 1:case"end":return r.stop()}}),r)})))()}getClassAt(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.getClassAt(e,t));case 1:case"end":return n.stop()}}),n)})))()}getClassHashAt(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.getClassHashAt(e,t));case 1:case"end":return n.stop()}}),n)})))()}getClassByHash(e){return this.provider.getClassByHash(e)}getEstimateFee(e,t,r){var n=this;return(0,o.Z)((0,s.Z)().mark((function a(){return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",n.provider.getEstimateFee(e,t,r));case 1:case"end":return a.stop()}}),a)})))()}getInvokeEstimateFee(e,t,r,n){var a=this;return(0,o.Z)((0,s.Z)().mark((function i(){return(0,s.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",a.provider.getInvokeEstimateFee(e,t,r,n));case 1:case"end":return i.stop()}}),i)})))()}getEstimateFeeBulk(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.getEstimateFeeBulk(e,t));case 1:case"end":return n.stop()}}),n)})))()}getNonceForAddress(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.getNonceForAddress(e,t));case 1:case"end":return n.stop()}}),n)})))()}getStorageAt(e,t,r){var n=this;return(0,o.Z)((0,s.Z)().mark((function a(){return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",n.provider.getStorageAt(e,t,r));case 1:case"end":return a.stop()}}),a)})))()}getTransaction(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",t.provider.getTransaction(e));case 1:case"end":return r.stop()}}),r)})))()}getTransactionReceipt(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",t.provider.getTransactionReceipt(e));case 1:case"end":return r.stop()}}),r)})))()}callContract(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.callContract(e,t));case 1:case"end":return n.stop()}}),n)})))()}invokeFunction(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.invokeFunction(e,t));case 1:case"end":return n.stop()}}),n)})))()}deployAccountContract(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.deployAccountContract(e,t));case 1:case"end":return n.stop()}}),n)})))()}declareContract(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.declareContract(e,t));case 1:case"end":return n.stop()}}),n)})))()}getDeclareEstimateFee(e,t,r,n){var a=this;return(0,o.Z)((0,s.Z)().mark((function i(){return(0,s.Z)().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",a.provider.getDeclareEstimateFee(e,t,r,n));case 1:case"end":return i.stop()}}),i)})))()}getDeployAccountEstimateFee(e,t,r,n){return this.provider.getDeployAccountEstimateFee(e,t,r,n)}getCode(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.getCode(e,t));case 1:case"end":return n.stop()}}),n)})))()}waitForTransaction(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.waitForTransaction(e,t));case 1:case"end":return n.stop()}}),n)})))()}getSimulateTransaction(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",r.provider.getSimulateTransaction(e,t));case 1:case"end":return n.stop()}}),n)})))()}getStateUpdate(e){var t=this;return(0,o.Z)((0,s.Z)().mark((function r(){return(0,s.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",t.provider.getStateUpdate(e));case 1:case"end":return r.stop()}}),r)})))()}getStarkName(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",pc(r,e,t));case 1:case"end":return n.stop()}}),n)})))()}getAddressFromStarkName(e,t){var r=this;return(0,o.Z)((0,s.Z)().mark((function n(){return(0,s.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",_c(r,e,t));case 1:case"end":return n.stop()}}),n)})))()}getContractVersion(e,t,r){var n=this;return(0,o.Z)((0,s.Z)().mark((function a(){return(0,s.Z)().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.abrupt("return",n.provider.getContractVersion(e,t,r));case 1:case"end":return a.stop()}}),a)})))()}};Sa({},{fromCallsToExecuteCalldata:()=>Bc,fromCallsToExecuteCalldataWithNonce:()=>Pc,fromCallsToExecuteCalldata_cairo1:()=>Lc,getExecuteCalldata:()=>Uc,transformCallsToMulticallArrays:()=>Dc,transformCallsToMulticallArrays_cairo1:()=>Fc});var Dc=e=>{var t=[],r=[];return e.forEach((e=>{var n=fo.compile(e.calldata||[]);t.push({to:Ri(e.contractAddress).toString(10),selector:Ri(Xi(e.entrypoint)).toString(10),data_offset:r.length.toString(),data_len:n.length.toString()}),r.push(...n)})),{callArray:t,calldata:fo.compile({calldata:r})}},Bc=e=>{var t=Dc(e),r=t.callArray,n=t.calldata;return[...fo.compile({callArray:r}),...n]},Pc=(e,t)=>[...Bc(e),Ri(t).toString()],Fc=e=>e.map((e=>({to:Ri(e.contractAddress).toString(10),selector:Ri(Xi(e.entrypoint)).toString(10),calldata:fo.compile(e.calldata||[])}))),Lc=e=>{var t=e.map((e=>({contractAddress:e.contractAddress,entrypoint:e.entrypoint,calldata:Array.isArray(e.calldata)&&"__compiled__"in e.calldata?e.calldata:fo.compile(e.calldata)})));return fo.compile({orderCalls:t})},Uc=function(e){return"1"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0")?Lc(e):Bc(e)};Sa({},{encodeData:()=>Jc,encodeType:()=>Gc,encodeValue:()=>qc,getDependencies:()=>Kc,getMessageHash:()=>Xc,getStructHash:()=>Wc,getTypeHash:()=>Yc,isMerkleTreeType:()=>Mc,prepareSelector:()=>Vc});Sa({},{MerkleTree:()=>zc,proofMerklePath:()=>Hc});var zc=class{constructor(e){this.branches=[],this.leaves=e,this.root=this.build(e)}build(e){if(1===e.length)return e[0];e.length!==this.leaves.length&&this.branches.push(e);for(var t=[],r=0;re>=t?1:-1)),n=(0,u.Z)(r,2);return Q(n[0],n[1])}getProof(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.leaves,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=n.indexOf(e);if(-1===i)throw new Error("leaf not found");if(1===n.length)return a;var s=i%2===0,o=null!==(t=s?n[i+1]:n[i-1])&&void 0!==t?t:"0x0",c=[...a,o],u=this.leaves.length===n.length?-1:this.branches.findIndex((e=>e.length===n.length)),l=null!==(r=this.branches[u+1])&&void 0!==r?r:[this.root];return this.getProof(zc.hash(s?e:o,s?o:e),l,c)}};function Hc(e,t,r){if(0===r.length)return e===t;var n=(0,i.Z)(r),a=n[0],s=n.slice(1);return Hc(e,zc.hash(t,a),s)}function jc(e){try{return Bi(e)}catch(t){if("string"===typeof e)return Bi(ss(e));throw new Error("Invalid BigNumberish: ".concat(e))}}function Vc(e){return Ni(e)?e:Xi(e)}function Mc(e){return"merkletree"===e.type}var Kc=function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return"*"===r[r.length-1]&&(r=r.slice(0,-1)),n.includes(r)?n:t[r]?[r,...t[r].reduce(((r,n)=>[...r,...e(t,n.type,r).filter((e=>!r.includes(e)))]),[])]:n};var Gc=(e,t)=>{var r=Kc(e,t),n=(0,i.Z)(r),a=n[0],s=n.slice(1);return(a?[a,...s.sort()]:[]).map((t=>"".concat(t,"(").concat(e[t].map((e=>"".concat(e.name,":").concat(e.type))),")"))).join("")},Yc=(e,t)=>Xi(Gc(e,t)),qc=function e(t,r,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t[r])return[r,Wc(t,r,n)];if(Object.keys(t).map((e=>"".concat(e,"*"))).includes(r)){var i=n.map((e=>Wc(t,r.slice(0,-1),e)));return[r,Eo(i)]}if("merkletree"===r){var s=function(e,t){if(t.parent&&t.key){var r=e[t.parent].find((e=>e.name===t.key));if(!Mc(r))throw new Error("".concat(t.key," is not a merkle tree"));if(r.contains.endsWith("*"))throw new Error("Merkle tree contain property must not be an array but was given ".concat(t.key));return r.contains}return"raw"}(t,a),o=n.map((r=>e(t,s,r)[1]));return["felt",new zc(o).root]}return"felt*"===r?["felt*",Eo(n)]:"selector"===r?["felt",Vc(n)]:[r,jc(n)]},Jc=(e,t,r)=>{var n=e[t].reduce(((n,a)=>{var i=(0,u.Z)(n,2),s=i[0],o=i[1];if(void 0===r[a.name]||null===r[a.name])throw new Error("Cannot encode data: missing data for '".concat(a.name,"'"));var c=r[a.name],l=qc(e,a.type,c,{parent:t,key:a.name}),d=(0,u.Z)(l,2);return[[...s,d[0]],[...o,d[1]]]}),[["felt"],[Yc(e,t)]]),a=(0,u.Z)(n,2);return[a[0],a[1]]},Wc=(e,t,r)=>Eo(Jc(e,t,r)[1]),Xc=(e,t)=>{if(!(e=>{var t=e;return Boolean(t.types&&t.primaryType&&t.message)})(e))throw new Error("Typed data does not match JSON schema");return Eo([ss("StarkNet Message"),Wc(e.types,"StarkNetDomain",e.domain),t,Wc(e.types,e.primaryType,e.message)])};new Rc({rpc:{default:!0}});function $c(e){return e.filter((e=>"event"===e.type&&(e.size||"enum"!==e.kind))).reduce(((e,t)=>{var r=t.name.slice(t.name.lastIndexOf(":")+1),n=(0,l.Z)({},t);return n.name=r,(0,l.Z)((0,l.Z)({},e),{},{[Fa(re(Oa(r)).toString(16))]:n})}),{})}function Qc(e,t,r,n){return e.flat().reduce(((e,a)=>{var i,s,o=t[a.keys[0]];if(!o)return e;var c={};c[o.name]={},a.keys.shift();var u=a.keys[Symbol.iterator](),l=a.data[Symbol.iterator](),d=(null===(i=o.members)||void 0===i?void 0:i.filter((e=>"key"===e.kind)))||o.keys,f=(null===(s=o.members)||void 0===s?void 0:s.filter((e=>"data"===e.kind)))||o.data;return d.forEach((e=>{c[o.name][e.name]=ro(u,e,r,n,c[o.name])})),f.forEach((e=>{c[o.name][e.name]=ro(l,e,r,n,c[o.name])})),e.push(c),e}),[])}Sa({},{getAbiEvents:()=>$c,parseEvents:()=>Qc});function eu(e){zi(e,Wa,$a,"Starknet Address");var t=function(e){return Fa(Pa(Bi(e)).padStart(64,"0"))}(e);if(!t.match(/^(0x)?[0-9a-fA-F]{64}$/))throw new Error("Invalid Address Format");return t}}}]); +//# sourceMappingURL=https://static-daily.okg.com/crash/okfe/defi-mode/9042/index.07381728.js.map \ No newline at end of file diff --git a/index.1df85f7e.js.download b/index.1df85f7e.js.download new file mode 100644 index 0000000..8869904 --- /dev/null +++ b/index.1df85f7e.js.download @@ -0,0 +1,2 @@ +(self.webpackChunkdefi_mode=self.webpackChunkdefi_mode||[]).push([[5974,5117],{63091:(r,e,t)=>{t(7307),r.exports=self.fetch.bind(self)},7307:(r,e,t)=>{"use strict";t.r(e),t.d(e,{DOMException:()=>A,Headers:()=>h,Request:()=>w,Response:()=>m,fetch:()=>x});var o="undefined"!==typeof globalThis&&globalThis||"undefined"!==typeof self&&self||"undefined"!==typeof t.g&&t.g||{},n={searchParams:"URLSearchParams"in o,iterable:"Symbol"in o&&"iterator"in Symbol,blob:"FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch(r){return!1}}(),formData:"FormData"in o,arrayBuffer:"ArrayBuffer"in o};if(n.arrayBuffer)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(r){return r&&i.indexOf(Object.prototype.toString.call(r))>-1};function s(r){if("string"!==typeof r&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||""===r)throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function c(r){return"string"!==typeof r&&(r=String(r)),r}function f(r){var e={next:function(){var e=r.shift();return{done:void 0===e,value:e}}};return n.iterable&&(e[Symbol.iterator]=function(){return e}),e}function h(r){this.map={},r instanceof h?r.forEach((function(r,e){this.append(e,r)}),this):Array.isArray(r)?r.forEach((function(r){if(2!=r.length)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+r.length);this.append(r[0],r[1])}),this):r&&Object.getOwnPropertyNames(r).forEach((function(e){this.append(e,r[e])}),this)}function d(r){if(!r._noBody)return r.bodyUsed?Promise.reject(new TypeError("Already read")):void(r.bodyUsed=!0)}function u(r){return new Promise((function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}}))}function l(r){var e=new FileReader,t=u(e);return e.readAsArrayBuffer(r),t}function y(r){if(r.slice)return r.slice(0);var e=new Uint8Array(r.byteLength);return e.set(new Uint8Array(r)),e.buffer}function p(){return this.bodyUsed=!1,this._initBody=function(r){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=r,r?"string"===typeof r?this._bodyText=r:n.blob&&Blob.prototype.isPrototypeOf(r)?this._bodyBlob=r:n.formData&&FormData.prototype.isPrototypeOf(r)?this._bodyFormData=r:n.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)?this._bodyText=r.toString():n.arrayBuffer&&n.blob&&((e=r)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=y(r.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):n.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(r)||a(r))?this._bodyArrayBuffer=y(r):this._bodyText=r=Object.prototype.toString.call(r):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||("string"===typeof r?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n.blob&&(this.blob=function(){var r=d(this);if(r)return r;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var r=d(this);return r||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}if(n.blob)return this.blob().then(l);throw new Error("could not read as ArrayBuffer")},this.text=function(){var r=d(this);if(r)return r;if(this._bodyBlob)return function(r){var e=new FileReader,t=u(e),o=/charset=([A-Za-z0-9_-]+)/.exec(r.type),n=o?o[1]:"utf-8";return e.readAsText(r,n),t}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(r){for(var e=new Uint8Array(r),t=new Array(e.length),o=0;o-1?e:r}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal||function(){if("AbortController"in o)return(new AbortController).signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&t)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(t),("GET"===this.method||"HEAD"===this.method)&&("no-store"===e.cache||"no-cache"===e.cache)){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function g(r){var e=new FormData;return r.trim().split("&").forEach((function(r){if(r){var t=r.split("="),o=t.shift().replace(/\+/g," "),n=t.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}})),e}function v(r){var e=new h;return r.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(r){return 0===r.indexOf("\n")?r.substr(1,r.length):r})).forEach((function(r){var t=r.split(":"),o=t.shift().trim();if(o){var n=t.join(":").trim();try{e.append(o,n)}catch(i){console.warn("Response "+i.message)}}})),e}function m(r,e){if(!(this instanceof m))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new h(e.headers),this.url=e.url||"",this._initBody(r)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},p.call(w.prototype),p.call(m.prototype),m.prototype.clone=function(){return new m(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},m.error=function(){var r=new m(null,{status:200,statusText:""});return r.status=0,r.type="error",r};var E=[301,302,303,307,308];m.redirect=function(r,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new m(null,{status:e,headers:{location:r}})};var A=o.DOMException;try{new A}catch(T){(A=function(r,e){this.message=r,this.name=e;var t=Error(r);this.stack=t.stack}).prototype=Object.create(Error.prototype),A.prototype.constructor=A}function x(r,e){return new Promise((function(t,i){var a=new w(r,e);if(a.signal&&a.signal.aborted)return i(new A("Aborted","AbortError"));var f=new XMLHttpRequest;function d(){f.abort()}if(f.onload=function(){var r={statusText:f.statusText,headers:v(f.getAllResponseHeaders()||"")};a.url.startsWith("file://")&&(f.status<200||f.status>599)?r.status=200:r.status=f.status,r.url="responseURL"in f?f.responseURL:r.headers.get("X-Request-URL");var e="response"in f?f.response:f.responseText;setTimeout((function(){t(new m(e,r))}),0)},f.onerror=function(){setTimeout((function(){i(new TypeError("Network request failed"))}),0)},f.ontimeout=function(){setTimeout((function(){i(new TypeError("Network request timed out"))}),0)},f.onabort=function(){setTimeout((function(){i(new A("Aborted","AbortError"))}),0)},f.open(a.method,function(r){try{return""===r&&o.location.href?o.location.href:r}catch(e){return r}}(a.url),!0),"include"===a.credentials?f.withCredentials=!0:"omit"===a.credentials&&(f.withCredentials=!1),"responseType"in f&&(n.blob?f.responseType="blob":n.arrayBuffer&&(f.responseType="arraybuffer")),e&&"object"===typeof e.headers&&!(e.headers instanceof h||o.Headers&&e.headers instanceof o.Headers)){var u=[];Object.getOwnPropertyNames(e.headers).forEach((function(r){u.push(s(r)),f.setRequestHeader(r,c(e.headers[r]))})),a.headers.forEach((function(r,e){-1===u.indexOf(e)&&f.setRequestHeader(e,r)}))}else a.headers.forEach((function(r,e){f.setRequestHeader(e,r)}));a.signal&&(a.signal.addEventListener("abort",d),f.onreadystatechange=function(){4===f.readyState&&a.signal.removeEventListener("abort",d)}),f.send("undefined"===typeof a._bodyInit?null:a._bodyInit)}))}x.polyfill=!0,o.fetch||(o.fetch=x,o.Headers=h,o.Request=w,o.Response=m)},13459:(r,e,t)=>{"use strict";t.d(e,{EP:()=>s,SD:()=>f,Vl:()=>a,ZP:()=>d,gm:()=>c,mk:()=>h});var o=BigInt(2**32-1),n=BigInt(32);function i(r){return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?{h:Number(r&o),l:Number(r>>n&o)}:{h:0|Number(r>>n&o),l:0|Number(r&o)}}function a(r){for(var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=new Uint32Array(r.length),o=new Uint32Array(r.length),n=0;nr<>>32-t,c=(r,e,t)=>e<>>32-t,f=(r,e,t)=>e<>>64-t,h=(r,e,t)=>r<>>64-t;const d={fromBig:i,split:a,toBig:(r,e)=>BigInt(r>>>0)<>>0),shrSH:(r,e,t)=>r>>>t,shrSL:(r,e,t)=>r<<32-t|e>>>t,rotrSH:(r,e,t)=>r>>>t|e<<32-t,rotrSL:(r,e,t)=>r<<32-t|e>>>t,rotrBH:(r,e,t)=>r<<64-t|e>>>t-32,rotrBL:(r,e,t)=>r>>>t-32|e<<64-t,rotr32H:(r,e)=>e,rotr32L:(r,e)=>r,rotlSH:s,rotlSL:c,rotlBH:f,rotlBL:h,add:function(r,e,t,o){var n=(e>>>0)+(o>>>0);return{h:r+t+(n/2**32|0)|0,l:0|n}},add3L:(r,e,t)=>(r>>>0)+(e>>>0)+(t>>>0),add3H:(r,e,t,o)=>e+t+o+(r/2**32|0)|0,add4L:(r,e,t,o)=>(r>>>0)+(e>>>0)+(t>>>0)+(o>>>0),add4H:(r,e,t,o,n)=>e+t+o+n+(r/2**32|0)|0,add5H:(r,e,t,o,n,i)=>e+t+o+n+i+(r/2**32|0)|0,add5L:(r,e,t,o,n)=>(r>>>0)+(e>>>0)+(t>>>0)+(o>>>0)+(n>>>0)}},55117:(r,e,t)=>{"use strict";t.r(e),t.d(e,{assertNumber:()=>n,base16:()=>v,base32:()=>m,base32crockford:()=>A,base32hex:()=>E,base58:()=>_,base58check:()=>D,base58flickr:()=>R,base58xmr:()=>S,base58xrp:()=>P,base64:()=>x,base64url:()=>T,base64urlnopad:()=>B,bech32:()=>k,bech32m:()=>F,bytes:()=>z,bytesToString:()=>Z,hex:()=>q,str:()=>G,stringToBytes:()=>V,utf8:()=>N,utils:()=>g});var o=t(37762);function n(r){if(!Number.isSafeInteger(r))throw new Error("Wrong integer: ".concat(r))}function i(){for(var r=(r,e)=>t=>r(e(t)),e=arguments.length,t=new Array(e),o=0;oe?r(e,t.encode):t.encode),void 0),decode:t.reduce(((e,t)=>e?r(e,t.decode):t.decode),void 0)}}function a(r){return{encode:e=>{if(!Array.isArray(e)||e.length&&"number"!==typeof e[0])throw new Error("alphabet.encode input should be an array of numbers");return e.map((e=>{if(n(e),e<0||e>=r.length)throw new Error("Digit index outside alphabet: ".concat(e," (alphabet: ").concat(r.length,")"));return r[e]}))},decode:e=>{if(!Array.isArray(e)||e.length&&"string"!==typeof e[0])throw new Error("alphabet.decode input should be array of strings");return e.map((e=>{if("string"!==typeof e)throw new Error("alphabet.decode: not string element=".concat(e));var t=r.indexOf(e);if(-1===t)throw new Error('Unknown letter: "'.concat(e,'". Allowed: ').concat(r));return t}))}}}function s(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if("string"!==typeof r)throw new Error("join separator should be string");return{encode:e=>{if(!Array.isArray(e)||e.length&&"string"!==typeof e[0])throw new Error("join.encode input should be array of strings");var t,n=(0,o.Z)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;if("string"!==typeof i)throw new Error("join.encode: non-string input=".concat(i))}}catch(a){n.e(a)}finally{n.f()}return e.join(r)},decode:e=>{if("string"!==typeof e)throw new Error("join.decode input should be string");return e.split(r)}}}function c(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"=";if(n(r),"string"!==typeof e)throw new Error("padding chr should be string");return{encode(t){if(!Array.isArray(t)||t.length&&"string"!==typeof t[0])throw new Error("padding.encode input should be array of strings");var n,i=(0,o.Z)(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if("string"!==typeof a)throw new Error("padding.encode: non-string input=".concat(a))}}catch(s){i.e(s)}finally{i.f()}for(;t.length*r%8;)t.push(e);return t},decode(t){if(!Array.isArray(t)||t.length&&"string"!==typeof t[0])throw new Error("padding.encode input should be array of strings");var n,i=(0,o.Z)(t);try{for(i.s();!(n=i.n()).done;){var a=n.value;if("string"!==typeof a)throw new Error("padding.decode: non-string input=".concat(a))}}catch(c){i.e(c)}finally{i.f()}var s=t.length;if(s*r%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;s>0&&t[s-1]===e;s--)if(!((s-1)*r%8))throw new Error("Invalid padding: string has too much padding");return t.slice(0,s)}}}function f(r){if("function"!==typeof r)throw new Error("normalize fn should be function");return{encode:r=>r,decode:e=>r(e)}}function h(r,e,t){if(e<2)throw new Error("convertRadix: wrong from=".concat(e,", base cannot be less than 2"));if(t<2)throw new Error("convertRadix: wrong to=".concat(t,", base cannot be less than 2"));if(!Array.isArray(r))throw new Error("convertRadix: data should be array");if(!r.length)return[];var o=0,i=[],a=Array.from(r);for(a.forEach((r=>{if(n(r),r<0||r>=e)throw new Error("Wrong integer: ".concat(r))}));;){for(var s=0,c=!0,f=o;fe?d(e,r%e):r,u=(r,e)=>r+(e-d(r,e));function l(r,e,t,i){if(!Array.isArray(r))throw new Error("convertRadix2: data should be array");if(e<=0||e>32)throw new Error("convertRadix2: wrong from=".concat(e));if(t<=0||t>32)throw new Error("convertRadix2: wrong to=".concat(t));if(u(e,t)>32)throw new Error("convertRadix2: carry overflow from=".concat(e," to=").concat(t," carryBits=").concat(u(e,t)));var a,s=0,c=0,f=2**t-1,h=[],d=(0,o.Z)(r);try{for(d.s();!(a=d.n()).done;){var l=a.value;if(n(l),l>=2**e)throw new Error("convertRadix2: invalid data word=".concat(l," from=").concat(e));if(s=s<32)throw new Error("convertRadix2: carry overflow pos=".concat(c," from=").concat(e));for(c+=e;c>=t;c-=t)h.push((s>>c-t&f)>>>0);s&=2**c-1}}catch(y){d.e(y)}finally{d.f()}if(s=s<=e)throw new Error("Excess padding");if(!i&&s)throw new Error("Non-zero padding: ".concat(s));return i&&c>0&&h.push(s>>>0),h}function y(r){return n(r),{encode:e=>{if(!(e instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return h(Array.from(e),256,r)},decode:e=>{if(!Array.isArray(e)||e.length&&"number"!==typeof e[0])throw new Error("radix.decode input should be array of strings");return Uint8Array.from(h(e,r,256))}}}function p(r){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(n(r),r<=0||r>32)throw new Error("radix2: bits should be in (0..32]");if(u(8,r)>32||u(r,8)>32)throw new Error("radix2: carry overflow");return{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return l(Array.from(t),8,r,!e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!==typeof t[0])throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(l(t,r,8,e))}}}function b(r){if("function"!==typeof r)throw new Error("unsafeWrapper fn should be function");return function(){try{for(var e=arguments.length,t=new Array(e),o=0;or.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),x=i(p(6),a("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),c(6),s("")),T=i(p(6),a("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),c(6),s("")),B=i(p(6),a("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),s("")),U=r=>i(y(58),a(r),s("")),_=U("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),R=U("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),P=U("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"),O=[0,2,3,5,6,7,9,10,11],S={encode(r){for(var e="",t=0;ti(w(4,(e=>r(r(e)))),_),I=i(a("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),s("")),L=[996825010,642813549,513874426,1027748829,705979059];function j(r){for(var e=r>>25,t=(33554431&r)<<5,o=0;o>o&1)&&(t^=L[o]);return t}function C(r,e){for(var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=r.length,i=1,a=0;a126)throw new Error("Invalid prefix (".concat(r,")"));i=j(i)^s>>5}i=j(i);for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:90;if("string"!==typeof r)throw new Error("bech32.decode input should be string, not ".concat(typeof r));if(r.length<8||!1!==t&&r.length>t)throw new TypeError("Wrong string length: ".concat(r.length," (").concat(r,"). Expected (8..").concat(t,")"));var o=r.toLowerCase();if(r!==o&&r!==r.toUpperCase())throw new Error("String must be lowercase or uppercase");var n=(r=o).lastIndexOf("1");if(0===n||-1===n)throw new Error('Letter "1" must be present between prefix and data only');var i=r.slice(0,n),a=r.slice(n+1);if(a.length<6)throw new Error("Data must be at least 6 characters long");var s=I.decode(a).slice(0,-6),c=C(i,s,e);if(!a.endsWith(c))throw new Error("Invalid checksum in ".concat(r,': expected "').concat(c,'"'));return{prefix:i,words:s}}return{encode:function(r,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:90;if("string"!==typeof r)throw new Error("bech32.encode prefix should be string, not ".concat(typeof r));if(!Array.isArray(t)||t.length&&"number"!==typeof t[0])throw new Error("bech32.encode words should be array of numbers, not ".concat(typeof t));var n=r.length+7+t.length;if(!1!==o&&n>o)throw new TypeError("Length ".concat(n," exceeds limit ").concat(o));var i=r.toLowerCase(),a=C(i,t,e);return"".concat(i,"1").concat(I.encode(t)).concat(a)},decode:a,decodeToBytes:function(r){var e=a(r,!1),t=e.prefix,n=e.words;return{prefix:t,words:n,bytes:o(n)}},decodeUnsafe:b(a),fromWords:o,fromWordsUnsafe:i,toWords:n}}var k=H("bech32"),F=H("bech32m"),N={encode:r=>(new TextDecoder).decode(r),decode:r=>(new TextEncoder).encode(r)},q=i(p(4),a("0123456789abcdef"),s(""),f((r=>{if("string"!==typeof r||r.length%2)throw new TypeError("hex.decode: expected string, got ".concat(typeof r," with length ").concat(r.length));return r.toLowerCase()}))),W={utf8:N,hex:q,base16:v,base32:m,base64:x,base64url:T,base58:_,base58xmr:S},M="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr",Z=(r,e)=>{if("string"!==typeof r||!W.hasOwnProperty(r))throw new TypeError(M);if(!(e instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return W[r].encode(e)},G=Z,V=(r,e)=>{if(!W.hasOwnProperty(r))throw new TypeError(M);if("string"!==typeof e)throw new TypeError("stringToBytes() expects string");return W[r].decode(e)},z=V}}]); +//# sourceMappingURL=https://static-daily.okg.com/crash/okfe/defi-mode/5974/index.1df85f7e.js.map \ No newline at end of file diff --git a/index.54a6878f.js.download b/index.54a6878f.js.download new file mode 100644 index 0000000..21d1fa9 --- /dev/null +++ b/index.54a6878f.js.download @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkdefi_mode=self.webpackChunkdefi_mode||[]).push([[2464],{8578:(t,r,e)=>{e.d(r,{X:()=>s,_:()=>u});var n=e(1413),i=e(15568),o=e(73334),a=e(74698);function s(t){return{hash:t,hmac:function(r){for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;a(0,a.weierstrass)((0,n.Z)((0,n.Z)({},t),s(r)));return Object.freeze((0,n.Z)((0,n.Z)({},e(r)),{},{create:e}))}},97721:(t,r,e)=>{e.d(r,{K:()=>h,M:()=>u});var n=e(1413),i=e(94258),o=e(91030),a=BigInt(0),s=BigInt(1);function u(t,r){var e=(t,r)=>{var e=r.negate();return t?e:r},n=t=>({windows:Math.ceil(r/t)+1,windowSize:2**(t-1)});return{constTimeNegate:e,unsafeLadder(r,e){for(var n=t.ZERO,i=r;e>a;)e&s&&(n=n.add(i)),i=i.double(),e>>=s;return n},precomputeWindow(t,r){for(var e=n(r),i=e.windows,o=e.windowSize,a=[],s=t,u=s,h=0;h>=v,g>h&&(g-=c,o+=s);var y=w,m=w+Math.abs(g)-1,E=p%2!==0,b=g<0;0===g?d=d.add(e(E,i[y])):f=f.add(e(b,i[m]))}return{p:f,f:d}},wNAFCached(t,r,e,n){var i=t._WINDOW_SIZE||1,o=r.get(t);return o||(o=this.precomputeWindow(t,i),1!==i&&r.set(t,n(o))),this.wNAF(i,o,e)}}}function h(t){return(0,i.OP)(t.Fp),(0,o.FF)(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze((0,n.Z)((0,n.Z)((0,n.Z)({},(0,i.kK)(t.n,t.nBitLength)),t),{p:t.Fp.ORDER}))}},94258:(t,r,e)=>{e.d(r,{DV:()=>B,OP:()=>y,PS:()=>x,Q:()=>m,Tu:()=>w,U_:()=>v,Us:()=>S,gN:()=>b,kK:()=>E,oA:()=>c,wQ:()=>d});var n=e(91030),i=BigInt(0),o=BigInt(1),a=BigInt(2),s=BigInt(3),u=BigInt(4),h=BigInt(5),f=BigInt(8);BigInt(9),BigInt(16);function d(t,r){var e=t%r;return e>=i?e:r+e}function l(t,r,e){if(e<=i||r 0");if(e===o)return i;for(var n=o;r>i;)r&o&&(n=n*t%e),t=t*t%e,r>>=o;return n}function c(t,r,e){for(var n=t;r-- >i;)n*=n,n%=e;return n}function v(t,r){if(t===i||r<=i)throw new Error("invert: expected positive integers, got n=".concat(t," mod=").concat(r));for(var e=d(t,r),n=r,a=i,s=o,u=o,h=i;e!==i;){var f=n/e,l=n%e,c=a-u*f,v=s-h*f;n=e,e=l,a=u,s=h,u=c,h=v}if(n!==o)throw new Error("invert: does not exist");return d(a,r)}function p(t){if(t%u===s){var r=(t+o)/u;return function(t,e){var n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw new Error("Cannot find square root");return n}}if(t%f===h){var e=(t-h)/f;return function(t,r){var n=t.mul(r,a),i=t.pow(n,e),o=t.mul(r,i),s=t.mul(t.mul(o,a),i),u=t.mul(o,t.sub(s,t.ONE));if(!t.eql(t.sqr(u),r))throw new Error("Cannot find square root");return u}}return function(t){var r,e,n,s=(t-o)/a;for(r=t-o,e=0;r%a===i;r/=a,e++);for(n=a;n(d(t,r)&o)===o,g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function y(t){var r=g.reduce(((t,r)=>(t[r]="function",t)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.FF)(t,r)}function m(t,r,e){if(e 0");if(e===i)return t.ONE;if(e===o)return r;for(var n=t.ONE,a=r;e>i;)e&o&&(n=t.mul(n,a)),a=t.sqr(a),e>>=o;return n}function E(t,r){var e=void 0!==r?r:t.toString(2).length;return{nBitLength:e,nByteLength:Math.ceil(e/8)}}function b(t,r){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(t<=i)throw new Error("Expected Field ORDER > 0, got ".concat(t));var s=E(t,r),u=s.nBitLength,h=s.nByteLength;if(h>2048)throw new Error("Field lengths over 2048 bytes are not supported");var f=p(t),l=Object.freeze({ORDER:t,BITS:u,BYTES:h,MASK:(0,n.dQ)(u),ZERO:i,ONE:o,create:r=>d(r,t),isValid:r=>{if("bigint"!==typeof r)throw new Error("Invalid field element: expected bigint, got ".concat(typeof r));return i<=r&&rt===i,isOdd:t=>(t&o)===o,neg:r=>d(-r,t),eql:(t,r)=>t===r,sqr:r=>d(r*r,t),add:(r,e)=>d(r+e,t),sub:(r,e)=>d(r-e,t),mul:(r,e)=>d(r*e,t),pow:(t,r)=>m(l,t,r),div:(r,e)=>d(r*v(e,t),t),sqrN:t=>t*t,addN:(t,r)=>t+r,subN:(t,r)=>t-r,mulN:(t,r)=>t*r,inv:r=>v(r,t),sqrt:a.sqrt||(t=>f(l,t)),invertBatch:t=>function(t,r){var e=new Array(r.length),n=r.reduce(((r,n,i)=>t.is0(n)?r:(e[i]=r,t.mul(r,n))),t.ONE),i=t.inv(n);return r.reduceRight(((r,n,i)=>t.is0(n)?r:(e[i]=t.mul(r,e[i]),t.mul(r,n))),i),e}(l,t),cmov:(t,r,e)=>e?r:t,toBytes:t=>e?(0,n.S5)(t,h):(0,n.tL)(t,h),fromBytes:t=>{if(t.length!==h)throw new Error("Fp.fromBytes: expected ".concat(h,", got ").concat(t.length));return e?(0,n.ty)(t):(0,n.Hv)(t)}});return Object.freeze(l)}function B(t,r){if(!t.isOdd)throw new Error("Field doesn't have isOdd");var e=t.sqrt(r);return t.isOdd(e)?t.neg(e):e}function A(t){if("bigint"!==typeof t)throw new Error("field order must be bigint");var r=t.toString(2).length;return Math.ceil(r/8)}function x(t){var r=A(t);return r+Math.ceil(r/2)}function S(t,r){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=t.length,a=A(r),s=x(r);if(i<16||i1024)throw new Error("expected ".concat(s,"-1024 bytes of input, got ").concat(i));var u=d(e?(0,n.Hv)(t):(0,n.ty)(t),r-o)+o;return e?(0,n.S5)(u,a):(0,n.tL)(u,a)}},91030:(t,r,e)=>{e.d(r,{FF:()=>A,Hv:()=>d,S5:()=>v,Yt:()=>p,ci:()=>u,dQ:()=>y,eV:()=>g,ly:()=>h,n$:()=>b,nr:()=>f,ql:()=>w,tL:()=>c,ty:()=>l});var n=e(29439),i=(BigInt(0),BigInt(1)),o=BigInt(2),a=t=>t instanceof Uint8Array,s=Array.from({length:256},((t,r)=>r.toString(16).padStart(2,"0")));function u(t){if(!a(t))throw new Error("Uint8Array expected");for(var r="",e=0;et+r.length),0)),i=0;return r.forEach((t=>{if(!a(t))throw new Error("Uint8Array expected");n.set(t,i),i+=t.length})),n}var y=t=>(o<new Uint8Array(t),E=t=>Uint8Array.from(t);function b(t,r,e){if("number"!==typeof t||t<2)throw new Error("hashLen must be a number");if("number"!==typeof r||r<2)throw new Error("qByteLen must be a number");if("function"!==typeof e)throw new Error("hmacFn must be a function");var n=m(t),i=m(t),o=0,a=()=>{n.fill(1),i.fill(0),o=0},s=function(){for(var t=arguments.length,r=new Array(t),o=0;o0&&void 0!==arguments[0]?arguments[0]:m();i=s(E([0]),t),n=s(),0!==t.length&&(i=s(E([1]),t),n=s())},h=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");for(var t=0,e=[];t{a(),u(t);for(var e=void 0;!(e=r(h()));)u();return a(),e}}var B={bigint:t=>"bigint"===typeof t,function:t=>"function"===typeof t,boolean:t=>"boolean"===typeof t,string:t=>"string"===typeof t,stringOrUint8Array:t=>"string"===typeof t||t instanceof Uint8Array,isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,r)=>r.Fp.isValid(t),hash:t=>"function"===typeof t&&Number.isSafeInteger(t.outputLen)};function A(t,r){for(var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=(r,e,n)=>{var i=B[e];if("function"!==typeof i)throw new Error('Invalid validator "'.concat(e,'", expected function'));var o=t[r];if((!n||void 0!==o)&&!i(o,t))throw new Error("Invalid param ".concat(String(r),"=").concat(o," (").concat(typeof o,"), expected ").concat(e))},o=0,a=Object.entries(r);o{e.r(r),e.d(r,{DER:()=>h,SWUFpSqrtRatio:()=>g,mapToCurveSimpleSWU:()=>y,weierstrass:()=>w,weierstrassPoints:()=>p});var n=e(1413),i=e(94258),o=e(91030),a=e(97721);var s=o.Hv,u=o.nr,h={Err:class extends Error{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")}},_parseInt(t){var r=h.Err;if(t.length<2||2!==t[0])throw new r("Invalid signature integer tag");var e=t[1],n=t.subarray(2,e+2);if(!e||n.length!==e)throw new r("Invalid signature integer: wrong length");if(128&n[0])throw new r("Invalid signature integer: negative");if(0===n[0]&&!(128&n[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:s(n),l:t.subarray(e+2)}},toSig(t){var r=h.Err,e="string"===typeof t?u(t):t;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");var n=e.length;if(n<2||48!=e[0])throw new r("Invalid signature tag");if(e[1]!==n-2)throw new r("Invalid signature: incorrect length");var i=h._parseInt(e.subarray(2)),o=i.d,a=i.l,s=h._parseInt(a),f=s.d;if(s.l.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s:f}},hexFromSig(t){var r=t=>8&Number.parseInt(t[0],16)?"00"+t:t,e=t=>{var r=t.toString(16);return 1&r.length?"0".concat(r):r},n=r(e(t.s)),i=r(e(t.r)),o=n.length/2,a=i.length/2,s=e(o),u=e(a);return"30".concat(e(a+o+4),"02").concat(u).concat(i,"02").concat(s).concat(n)}},f=BigInt(0),d=BigInt(1),l=BigInt(2),c=BigInt(3),v=BigInt(4);function p(t){var r=function(t){var r=(0,a.K)(t);o.FF(r,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});var e=r.endo,i=r.Fp,s=r.a;if(e){if(!i.eql(s,i.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!==typeof e||"bigint"!==typeof e.beta||"function"!==typeof e.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze((0,n.Z)({},r))}(t),e=r.Fp,s=r.toBytes||((t,r,n)=>{var i=r.toAffine();return o.eV(Uint8Array.from([4]),e.toBytes(i.x),e.toBytes(i.y))}),u=r.fromBytes||(t=>{var r=t.subarray(1);return{x:e.fromBytes(r.subarray(0,e.BYTES)),y:e.fromBytes(r.subarray(e.BYTES,2*e.BYTES))}});function h(t){var n=r.a,i=r.b,o=e.sqr(t),a=e.mul(o,t);return e.add(e.add(a,e.mul(t,n)),i)}if(!e.eql(e.sqr(r.Gy),h(r.Gx)))throw new Error("bad generator point: equation left != right");function l(t){return"bigint"===typeof t&&fe.eql(t,e.ZERO);return o(n)&&o(i)?y.ZERO:new y(n,i,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){var r=e.invertBatch(t.map((t=>t.pz)));return t.map(((t,e)=>t.toAffine(r[e]))).map(y.fromAffine)}static fromHex(t){var r=y.fromAffine(u((0,o.ql)("pointHex",t)));return r.assertValidity(),r}static fromPrivateKey(t){return y.BASE.multiply(p(t))}_setWindowSize(t){this._WINDOW_SIZE=t,w.delete(this)}assertValidity(){if(this.is0()){if(r.allowInfinityPoint&&!e.is0(this.py))return;throw new Error("bad point: ZERO")}var t=this.toAffine(),n=t.x,i=t.y;if(!e.isValid(n)||!e.isValid(i))throw new Error("bad point: x or y not FE");var o=e.sqr(i),a=h(n);if(!e.eql(o,a))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){var t=this.toAffine().y;if(e.isOdd)return!e.isOdd(t);throw new Error("Field doesn't support isOdd")}equals(t){g(t);var r=this.px,n=this.py,i=this.pz,o=t.px,a=t.py,s=t.pz,u=e.eql(e.mul(r,s),e.mul(o,i)),h=e.eql(e.mul(n,s),e.mul(a,i));return u&&h}negate(){return new y(this.px,e.neg(this.py),this.pz)}double(){var t=r.a,n=r.b,i=e.mul(n,c),o=this.px,a=this.py,s=this.pz,u=e.ZERO,h=e.ZERO,f=e.ZERO,d=e.mul(o,o),l=e.mul(a,a),v=e.mul(s,s),p=e.mul(o,a);return p=e.add(p,p),f=e.mul(o,s),f=e.add(f,f),u=e.mul(t,f),h=e.mul(i,v),h=e.add(u,h),u=e.sub(l,h),h=e.add(l,h),h=e.mul(u,h),u=e.mul(p,u),f=e.mul(i,f),v=e.mul(t,v),p=e.sub(d,v),p=e.mul(t,p),p=e.add(p,f),f=e.add(d,d),d=e.add(f,d),d=e.add(d,v),d=e.mul(d,p),h=e.add(h,d),v=e.mul(a,s),v=e.add(v,v),d=e.mul(v,p),u=e.sub(u,d),f=e.mul(v,l),f=e.add(f,f),f=e.add(f,f),new y(u,h,f)}add(t){g(t);var n=this.px,i=this.py,o=this.pz,a=t.px,s=t.py,u=t.pz,h=e.ZERO,f=e.ZERO,d=e.ZERO,l=r.a,v=e.mul(r.b,c),p=e.mul(n,a),w=e.mul(i,s),m=e.mul(o,u),E=e.add(n,i),b=e.add(a,s);E=e.mul(E,b),b=e.add(p,w),E=e.sub(E,b),b=e.add(n,o);var B=e.add(a,u);return b=e.mul(b,B),B=e.add(p,m),b=e.sub(b,B),B=e.add(i,o),h=e.add(s,u),B=e.mul(B,h),h=e.add(w,m),B=e.sub(B,h),d=e.mul(l,b),h=e.mul(v,m),d=e.add(h,d),h=e.sub(w,d),d=e.add(w,d),f=e.mul(h,d),w=e.add(p,p),w=e.add(w,p),m=e.mul(l,m),b=e.mul(v,b),w=e.add(w,m),m=e.sub(p,m),m=e.mul(l,m),b=e.add(b,m),p=e.mul(w,b),f=e.add(f,p),p=e.mul(B,b),h=e.mul(E,h),h=e.sub(h,p),p=e.mul(E,w),d=e.mul(B,d),d=e.add(d,p),new y(h,f,d)}subtract(t){return this.add(t.negate())}is0(){return this.equals(y.ZERO)}wNAF(t){return E.wNAFCached(this,w,t,(t=>{var r=e.invertBatch(t.map((t=>t.pz)));return t.map(((t,e)=>t.toAffine(r[e]))).map(y.fromAffine)}))}multiplyUnsafe(t){var n=y.ZERO;if(t===f)return n;if(v(t),t===d)return this;var i=r.endo;if(!i)return E.unsafeLadder(this,t);for(var o=i.splitScalar(t),a=o.k1neg,s=o.k1,u=o.k2neg,h=o.k2,l=n,c=n,p=this;s>f||h>f;)s&d&&(l=l.add(p)),h&d&&(c=c.add(p)),p=p.double(),s>>=d,h>>=d;return a&&(l=l.negate()),u&&(c=c.negate()),c=new y(e.mul(c.px,i.beta),c.py,c.pz),l.add(c)}multiply(t){v(t);var n,i,o=t,a=r.endo;if(a){var s=a.splitScalar(o),u=s.k1neg,h=s.k1,f=s.k2neg,d=s.k2,l=this.wNAF(h),c=l.p,p=l.f,w=this.wNAF(d),g=w.p,m=w.f;c=E.constTimeNegate(u,c),g=E.constTimeNegate(f,g),g=new y(e.mul(g.px,a.beta),g.py,g.pz),n=c.add(g),i=p.add(m)}else{var b=this.wNAF(o);n=b.p,i=b.f}return y.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(t,r,e){var n=y.BASE,i=(t,r)=>r!==f&&r!==d&&t.equals(n)?t.multiply(r):t.multiplyUnsafe(r),o=i(this,r).add(i(t,e));return o.is0()?void 0:o}toAffine(t){var r=this.px,n=this.py,i=this.pz,o=this.is0();null==t&&(t=o?e.ONE:e.inv(i));var a=e.mul(r,t),s=e.mul(n,t),u=e.mul(i,t);if(o)return{x:e.ZERO,y:e.ZERO};if(!e.eql(u,e.ONE))throw new Error("invZ was invalid");return{x:a,y:s}}isTorsionFree(){var t=r.h,e=r.isTorsionFree;if(t===d)return!0;if(e)return e(y,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){var t=r.h,e=r.clearCofactor;return t===d?this:e?e(y,this):this.multiplyUnsafe(r.h)}toRawBytes(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.assertValidity(),s(y,this,t)}toHex(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return o.ci(this.toRawBytes(t))}}y.BASE=new y(r.Gx,r.Gy,e.ONE),y.ZERO=new y(e.ZERO,e.ONE,e.ZERO);var m=r.nBitLength,E=(0,a.M)(y,r.endo?Math.ceil(m/2):m);return{CURVE:r,ProjectivePoint:y,normPrivateKeyToScalar:p,weierstrassEquation:h,isWithinCurveOrder:l}}function w(t){var r=function(t){var r=(0,a.K)(t);return o.FF(r,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze((0,n.Z)({lowS:!0},r))}(t),e=r.Fp,s=r.n,u=e.BYTES+1,l=2*e.BYTES+1;function c(t){return i.wQ(t,s)}function v(t){return i.U_(t,s)}var w=p((0,n.Z)((0,n.Z)({},r),{},{toBytes(t,r,n){var i=r.toAffine(),a=e.toBytes(i.x),s=o.eV;return n?s(Uint8Array.from([r.hasEvenY()?2:3]),a):s(Uint8Array.from([4]),a,e.toBytes(i.y))},fromBytes(t){var r=t.length,n=t[0],i=t.subarray(1);if(r!==u||2!==n&&3!==n){if(r===l&&4===n)return{x:e.fromBytes(i.subarray(0,e.BYTES)),y:e.fromBytes(i.subarray(e.BYTES,2*e.BYTES))};throw new Error("Point of length ".concat(r," was invalid. Expected ").concat(u," compressed bytes or ").concat(l," uncompressed bytes"))}var a=o.Hv(i);if(!(f<(s=a)&&so.ci(o.tL(t,r.nByteLength));function B(t){return t>s>>d}var A=(t,r,e)=>o.Hv(t.slice(r,e));class x{constructor(t,r,e){this.r=t,this.s=r,this.recovery=e,this.assertValidity()}static fromCompact(t){var e=r.nByteLength;return t=(0,o.ql)("compactSignature",t,2*e),new x(A(t,0,e),A(t,e,2*e))}static fromDER(t){var r=h.toSig((0,o.ql)("DER",t)),e=r.r,n=r.s;return new x(e,n)}assertValidity(){if(!E(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!E(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(t){return new x(this.r,this.s,t)}recoverPublicKey(t){var n=this.r,i=this.s,a=this.recovery,s=q((0,o.ql)("msgHash",t));if(null==a||![0,1,2,3].includes(a))throw new Error("recovery id invalid");var u=2===a||3===a?n+r.n:n;if(u>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");var h=0===(1&a)?"02":"03",f=g.fromHex(h+b(u)),d=v(u),l=c(-s*d),p=c(i*d),w=g.BASE.multiplyAndAddUnsafe(f,l,p);if(!w)throw new Error("point at infinify");return w.assertValidity(),w}hasHighS(){return B(this.s)}normalizeS(){return this.hasHighS()?new x(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return o.nr(this.toDERHex())}toDERHex(){return h.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return o.nr(this.toCompactHex())}toCompactHex(){return b(this.r)+b(this.s)}}var S={isValidPrivateKey(t){try{return y(t),!0}catch(r){return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{var t=i.PS(r.n);return i.Us(r.randomBytes(t),r.n)},precompute(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.BASE;return r._setWindowSize(t),r.multiply(BigInt(3)),r}};function O(t){var r=t instanceof Uint8Array,e="string"===typeof t,n=(r||e)&&t.length;return r?n===u||n===l:e?n===2*u||n===2*l:t instanceof g}var I=r.bits2int||function(t){var e=o.Hv(t),n=8*t.length-r.nBitLength;return n>0?e>>BigInt(n):e},q=r.bits2int_modN||function(t){return c(I(t))},L=o.dQ(r.nBitLength);function R(t){if("bigint"!==typeof t)throw new Error("bigint expected");if(!(f<=t&&t2&&void 0!==arguments[2]?arguments[2]:N;if(["recovered","canonical"].some((t=>t in i)))throw new Error("sign() legacy options not supported");var a=r.hash,s=r.randomBytes,u=i.lowS,h=i.prehash,l=i.extraEntropy;null==u&&(u=!0),t=(0,o.ql)("msgHash",t),h&&(t=(0,o.ql)("prehashed msgHash",a(t)));var p=q(t),w=y(n),m=[R(w),R(p)];if(null!=l){var b=!0===l?s(e.BYTES):l;m.push((0,o.ql)("extraEntropy",b))}var A=o.eV(...m),S=p;return{seed:A,k2sig:function(t){var r=I(t);if(E(r)){var e=v(r),n=g.BASE.multiply(r).toAffine(),i=c(n.x);if(i!==f){var o=c(e*c(S+i*w));if(o!==f){var a=(n.x===i?0:2)|Number(n.y&d),s=o;return u&&B(o)&&(s=function(t){return B(t)?c(-t):t}(o),a^=1),new x(i,s,a)}}}}}}var N={lowS:r.lowS,prehash:!1},H={lowS:r.lowS,prehash:!1};return g.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return g.fromPrivateKey(t).toRawBytes(r)},getSharedSecret:function(t,r){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(O(t))throw new Error("first arg must be private key");if(!O(r))throw new Error("second arg must be public key");return g.fromHex(r).multiply(y(t)).toRawBytes(e)},sign:function(t,e){var n=U(t,e,arguments.length>2&&void 0!==arguments[2]?arguments[2]:N),i=n.seed,a=n.k2sig,s=r;return o.n$(s.hash.outputLen,s.nByteLength,s.hmac)(i,a)},verify:function(t,e,n){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:H,s=t;if(e=(0,o.ql)("msgHash",e),n=(0,o.ql)("publicKey",n),"strict"in a)throw new Error("options.strict was renamed to lowS");var u,f=a.lowS,d=a.prehash,l=void 0;try{if("string"===typeof s||s instanceof Uint8Array)try{l=x.fromDER(s)}catch(I){if(!(I instanceof h.Err))throw I;l=x.fromCompact(s)}else{if("object"!==typeof s||"bigint"!==typeof s.r||"bigint"!==typeof s.s)throw new Error("PARSE");var p=s.r,w=s.s;l=new x(p,w)}u=g.fromHex(n)}catch(L){if("PARSE"===L.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(f&&l.hasHighS())return!1;d&&(e=r.hash(e));var y=l,m=y.r,E=y.s,b=q(e),B=v(E),A=c(b*B),S=c(m*B),O=null===(i=g.BASE.multiplyAndAddUnsafe(u,A,S))||void 0===i?void 0:i.toAffine();return!!O&&c(O.x)===m},ProjectivePoint:g,Signature:x,utils:S}}function g(t,r){for(var e=t.ORDER,n=f,i=e-d;i%l===f;i/=l)n+=d;var o=n,a=l<{var n=g,i=t.pow(e,p),a=t.sqr(i);a=t.mul(a,e);var s=t.mul(r,a);s=t.pow(s,h),s=t.mul(s,i),i=t.mul(s,e),a=t.mul(s,r);var u=t.mul(a,i);s=t.pow(u,w);var f=t.eql(s,t.ONE);i=t.mul(a,y),s=t.mul(u,n),a=t.cmov(i,a,f),u=t.cmov(s,u,f);for(var c=o;c>d;c--){var v=c-l;v=l<{var n=t.sqr(e),i=t.mul(r,e);n=t.mul(n,i);var o=t.pow(n,E);o=t.mul(o,i);var a=t.mul(o,b),s=t.mul(t.sqr(o),e),u=t.eql(s,r);return{isValid:u,value:t.cmov(a,o,u)}}}return m}function y(t,r){if(i.OP(t),!t.isValid(r.A)||!t.isValid(r.B)||!t.isValid(r.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");var e=g(t,r.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{var i,o,a,s,u,h,f,d;i=t.sqr(n),i=t.mul(i,r.Z),o=t.sqr(i),o=t.add(o,i),a=t.add(o,t.ONE),a=t.mul(a,r.B),s=t.cmov(r.Z,t.neg(o),!t.eql(o,t.ZERO)),s=t.mul(s,r.A),o=t.sqr(a),h=t.sqr(s),u=t.mul(h,r.A),o=t.add(o,u),o=t.mul(o,a),h=t.mul(h,s),u=t.mul(h,r.B),o=t.add(o,u),f=t.mul(i,a);var l=e(o,h),c=l.isValid,v=l.value;d=t.mul(i,n),d=t.mul(d,v),f=t.cmov(f,a,c),d=t.cmov(d,v,c);var p=t.isOdd(n)===t.isOdd(d);return d=t.cmov(t.neg(d),d,p),{x:f=t.div(f,s),y:d}}}},30812:(t,r,e)=>{function n(t){if(!Number.isSafeInteger(t)||t<0)throw new Error("Wrong positive integer: ".concat(t))}function i(t){if(!(t instanceof Uint8Array))throw new Error("Expected Uint8Array");for(var r=arguments.length,e=new Array(r>1?r-1:0),n=1;n0&&!e.includes(t.length))throw new Error("Expected Uint8Array of length ".concat(e,", not of length=").concat(t.length))}function o(t){if("function"!==typeof t||"function"!==typeof t.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");n(t.outputLen),n(t.blockLen)}function a(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(t.destroyed)throw new Error("Hash instance has been destroyed");if(r&&t.finished)throw new Error("Hash#digest() has already been called")}function s(t,r){i(t);var e=r.outputLen;if(t.lengtha,J8:()=>s,Rx:()=>n,aI:()=>i,vp:()=>o})},73941:(t,r,e)=>{e.d(r,{N:()=>o});var n=e(30812),i=e(73334);class o extends i.kb{constructor(t,r,e,n){super(),this.blockLen=t,this.outputLen=r,this.padOffset=e,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=(0,i.GL)(this.buffer)}update(t){(0,n.Gg)(this);for(var r=this.view,e=this.buffer,o=this.blockLen,a=(t=(0,i.O0)(t)).length,s=0;so-s&&(this.process(e,0),s=0);for(var u=s;u>i&o),s=Number(e&o),u=n?4:0,h=n?0:4;t.setUint32(r+u,a,n),t.setUint32(r+h,s,n)}(e,o-8,BigInt(8*this.length),a),this.process(e,0);var h=(0,i.GL)(t),f=this.outputLen;if(f%4)throw new Error("_sha2: outputLen should be aligned to 32bit");var d=f/4,l=this.get();if(d>l.length)throw new Error("_sha2: outputLen bigger than state");for(var c=0;c{e.d(r,{b:()=>a});var n=e(30812),i=e(73334);class o extends i.kb{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,(0,n.vp)(t);var e=(0,i.O0)(r);if(this.iHash=t.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;var o=this.blockLen,a=new Uint8Array(o);a.set(e.length>o?t.create().update(e).digest():e);for(var s=0;snew o(t,r).update(e).digest();a.create=(t,r)=>new o(t,r)},18299:(t,r,e)=>{e.d(r,{J:()=>f});var n=e(73941),i=e(73334),o=(t,r,e)=>t&r^t&e^r&e,a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class h extends n.N{constructor(){super(64,32,8,!1),this.A=0|s[0],this.B=0|s[1],this.C=0|s[2],this.D=0|s[3],this.E=0|s[4],this.F=0|s[5],this.G=0|s[6],this.H=0|s[7]}get(){return[this.A,this.B,this.C,this.D,this.E,this.F,this.G,this.H]}set(t,r,e,n,i,o,a,s){this.A=0|t,this.B=0|r,this.C=0|e,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|a,this.H=0|s}process(t,r){for(var e=0;e<16;e++,r+=4)u[e]=t.getUint32(r,!1);for(var n=16;n<64;n++){var s=u[n-15],h=u[n-2],f=(0,i.np)(s,7)^(0,i.np)(s,18)^s>>>3,d=(0,i.np)(h,17)^(0,i.np)(h,19)^h>>>10;u[n]=d+u[n-7]+f+u[n-16]|0}for(var l,c=this.A,v=this.B,p=this.C,w=this.D,g=this.E,y=this.F,m=this.G,E=this.H,b=0;b<64;b++){var B=E+((0,i.np)(g,6)^(0,i.np)(g,11)^(0,i.np)(g,25))+((l=g)&y^~l&m)+a[b]+u[b]|0,A=((0,i.np)(c,2)^(0,i.np)(c,13)^(0,i.np)(c,22))+o(c,v,p)|0;E=m,m=y,y=g,g=w+B|0,w=p,p=v,v=c,c=B+A|0}c=c+this.A|0,v=v+this.B|0,p=p+this.C|0,w=w+this.D|0,g=g+this.E|0,y=y+this.F|0,m=m+this.G|0,E=E+this.H|0,this.set(c,v,p,w,g,y,m,E)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}var f=(0,i.hE)((()=>new h))},73334:(t,r,e)=>{e.d(r,{kb:()=>v,ci:()=>h,U5:()=>w,eV:()=>c,GL:()=>a,nr:()=>f,O6:()=>m,np:()=>s,O0:()=>l,Jq:()=>o,iY:()=>d,hE:()=>g,K$:()=>y});var n="object"===typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,i=t=>t instanceof Uint8Array,o=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),a=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),s=(t,r)=>t<<32-r|t>>>r;if(!(68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]))throw new Error("Non little-endian hardware is not supported");var u=Array.from({length:256},((t,r)=>r.toString(16).padStart(2,"0")));function h(t){if(!i(t))throw new Error("Uint8Array expected");for(var r="",e=0;et+r.length),0)),o=0;return r.forEach((t=>{if(!i(t))throw new Error("Uint8Array expected");n.set(t,o),o+=t.length})),n}class v{clone(){return this._cloneInto()}}var p={}.toString;function w(t,r){if(void 0!==r&&"[object Object]"!==p.call(r))throw new Error("Options should be object or undefined");return Object.assign(t,r)}function g(t){var r=r=>t().update(l(r)).digest(),e=t();return r.outputLen=e.outputLen,r.blockLen=e.blockLen,r.create=()=>t(),r}function y(t){var r=(r,e)=>t(e).update(l(r)).digest(),e=t({});return r.outputLen=e.outputLen,r.blockLen=e.blockLen,r.create=r=>t(r),r}function m(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32;if(n&&"function"===typeof n.getRandomValues)return n.getRandomValues(new Uint8Array(t));throw new Error("crypto.getRandomValues must be defined")}}}]); +//# sourceMappingURL=https://static-daily.okg.com/crash/okfe/defi-mode/2464/index.54a6878f.js.map \ No newline at end of file diff --git a/index.dc1043b3.js.download b/index.dc1043b3.js.download new file mode 100644 index 0000000..46cd62c --- /dev/null +++ b/index.dc1043b3.js.download @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunkdefi_mode=self.webpackChunkdefi_mode||[]).push([[8267],{54281:(e,t,n)=>{n.d(t,{Z:()=>D});var r=n(1413),a=n(45987),i=n(29439),s=n(87363),o=n.n(s),l=n(95640),c=n.n(l),u=n(7562),h=n(36065),d=n(2627),p=n(21367),f=n(43980),m=n(52834),v=n(26846),x=n(67469),g={ENTER:13};var y=n(77016),b=e=>"function"===typeof e?e():e,C=e=>e&&o().isValidElement(e)&&e.type.elementType===y.Z.Select,S=n(45263),Z=["prefixCls","placeholder","placeholderClassName"];function w(e,t){var n=e.prefixCls,i=e.placeholder,s=e.placeholderClassName,o=(0,a.Z)(e,Z);return(0,S.jsxs)("div",{className:"".concat(n,"-custom-placeholder"),children:[(0,S.jsx)("input",(0,r.Z)({ref:t},o)),!o.value&&i&&(0,S.jsx)("div",{className:c()("".concat(n,"-placeholder"),"".concat(n,"-ellipsis"),s),children:i})]})}const P=(0,s.forwardRef)(w),N={always:"always",blur:"blur"};var T=["onRef","noStyle","className","isTextarea","inputClassName","inputStyle","autoResize","originTitle","originSize","virtualPlaceholder","ellipsis","autoFill","avoidFillByPassword","placeholderClassName"],j=()=>{};class k extends o().Component{constructor(e){super(e),this.onChange=e=>{var t=this.props.onChange;t&&t(e,e.target.value)},this.onFocus=e=>{var t=this.props.onFocus;this.setState({focus:!0}),t&&t(e)},this.onBlur=e=>{var t=this.props.onBlur;this.setState({focus:!1}),t&&t(e)},this.onKeyDowHandler=e=>{var t=e.keyCode,n=this.props,r=n.onPressEnter,a=n.onKeyDown;a&&a(e),t===g.ENTER&&r&&r(e)},this.isShowError=e=>{var t=this.props.forceError,n=this.state.focus;return!!t||this.renderError(null!==e&&void 0!==e?e:n)},this.renderLabel=()=>{var e=this.props,t=e.label,n=e.title,r=e.action,a=e.size,i=e.titlePlaceMode,s=e.styleType,o=n||t||i,l=b(r);return o||l?(0,S.jsx)(v.Z,{size:a,title:o,action:l,placeMode:i,styleType:s}):null},this.renderInput=()=>{var e=this.props,t=e.onRef,n=e.noStyle,i=e.className,s=e.isTextarea,o=e.inputClassName,l=e.inputStyle,u=e.autoResize,d=e.originTitle,p=e.originSize,v=e.virtualPlaceholder,g=e.ellipsis,y=e.autoFill,b=e.avoidFillByPassword,C=e.placeholderClassName,Z=(0,a.Z)(e,T),w=this.state.isCsr,N=(0,m.v1)(Z,["prefix","prefixIcon","suffix","suffixIcon","error","theme","cleanable","style","children","autoHeight","onPressEnter","label","title","tips","action","showErrorIcon","errorType","placeMode","titlePlaceMode","forceError","noPrefixPadding","noSuffixPadding","innerClassName","noOperation","helpText","boxIsFocus","circle","showErrorOutline","onClear","getBoxRef","innerStyle","customRender","tipsAlwaysShow","styleType","withPercent"]),j=(0,r.Z)((0,r.Z)({},N),{},{ref:e=>{t(e)},className:n?i:c()("".concat(x.er,"-input"),g&&"".concat(x.er,"-ellipsis"),s&&"input-textarea",{ta:s&&!u},s&&u&&"textarea-auto-resize",o),style:l,onFocus:this.onFocus,onChange:this.onChange,onBlur:this.onBlur,onKeyDown:this.onKeyDowHandler}),k=d?{title:d}:{},F=p?{size:p}:{},I=w?{autoComplete:"off",name:this.inputName}:{},E=y?{}:I,R=(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},E),j),{},{autoCapitalize:"off",autoCorrect:"off"},k),F);(0,f.X2)()&&"tel"===R.type&&(R.dir=R.dir||"rtl");var z=v?(0,S.jsx)(P,(0,r.Z)((0,r.Z)({},R),{},{placeholderClassName:C,prefixCls:x.er})):(0,S.jsxs)(S.Fragment,{children:[y||!w||(0,h.G6)()?null:(0,S.jsx)("input",{type:"hidden",autoComplete:"off",readOnly:"readonly",style:{display:"none"}}),(0,S.jsx)("input",(0,r.Z)({},R)),!y&&w&&((0,h.G6)()||b)?(0,S.jsx)("div",{style:{position:"absolute",height:0,opacity:0,overflow:"hidden"},children:(0,S.jsx)("input",{style:{position:"absolute",backgroundColor:"transparent",caretColor:"transparent",border:"none",outline:"none",top:"-10000px",left:"-10000px",zIndex:-100},tabIndex:"-1",type:"text",autoComplete:"off"})}):null]});return s?(0,S.jsx)("textarea",(0,r.Z)({},j)):z},this.renderSuffix=()=>{var e=this.props,t=e.suffix,n=e.showErrorIcon,r=e.error,a=b(r),i=null;return n&&this.isShowError(a)&&(i=(0,S.jsx)(u.Z,{className:"okds-warning-circle-fill suffix-icon error-icon"})),i||t?(0,S.jsxs)("div",{className:"".concat(x.er,"-suffix"),children:[i,t]}):null},this.renderError=e=>{var t=this.props,n=t.error,r=t.errorType,a=b(n),i=a&&!0!==a?(0,S.jsx)("span",{className:"".concat(x.er,"-error"),children:a}):a;return(r===N.always||!e)&&i},this.renderTips=()=>{var e=this.props.tips,t=b(e);return t?(0,S.jsx)("span",{className:"".concat(x.er,"-tips"),children:t}):null},this.renderHelpText=()=>{var e=this.props.helpText,t=b(e);return t?(0,S.jsx)("span",{className:"".concat(x.er,"-help-text"),children:t}):null},this.state={focus:!1,isCsr:!1},this.inputName=p.Z.__test__okd_input_name||"okd_".concat((new Date).getTime()+Math.floor(1e3*Math.random()))}componentDidMount(){this.setState({isCsr:!0})}render(){var e=this.props,t=e.style,n=e.disabled,r=e.className,a=e.placeMode,i=e.forceError,o=e.children,l=e.autoHeight,u=e.noSuffixPadding,h=e.noPrefixPadding,p=e.isTextarea,f=e.size,m=e.innerClassName,v=e.noStyle,g=e.prefix,y=e.boxIsFocus,b=e.circle,C=void 0!==b&&b,Z=e.autoResize,w=e.getBoxRef,P=void 0===w?()=>{}:w,N=e.customRender,T=void 0===N?()=>{}:N,j=e.innerStyle,k=e.tipsAlwaysShow,F=e.styleType;if(v)return this.renderInput();var I=this.state.focus,E=y||I,R=this.renderError(E),z=this.renderTips(),D=this.renderHelpText(),A=c()(d.Z.data.okdNamespace,"".concat(x.er),F===x.wD.reversed&&"".concat(x.er,"-reversed"),"".concat(x.er,"-").concat(f),{["".concat(x.er,"-place-mode")]:a,focus:E,disabled:n,error:this.isShowError()},r),M=c()("".concat(x.er,"-box"),{"auto-size":l,"no-padding-left":h,"no-padding-right":u,"input-circle":C,ta:p&&!Z},m),B=this.renderInput(),V=this.renderSuffix(),O=T({prefix:g,inputComponent:B,suffix:V,children:o});return(0,S.jsxs)("div",{className:A,style:t,children:[this.renderLabel(),(0,S.jsx)("div",{className:M,ref:P,style:j,children:O||(0,S.jsxs)(s.Fragment,{children:[g,o||B,V]})}),(R||z||D||a||i)&&(0,S.jsxs)("div",{className:"".concat(x.er,"-tips-box"),children:[R||z,D]}),k&&z&&R?(0,S.jsx)("div",{className:"".concat(x.er,"-tips-box"),children:z}):null]})}}k.defaultProps={prefix:"",suffix:"",disabled:!1,error:"",size:x.dG.md,tips:"",helpText:"",value:"",title:"",action:"",cleanable:!1,onChange:null,errorType:N.blur,className:"",inputClassName:"",inputStyle:null,circle:!1,placeMode:!1,titlePlaceMode:!1,autoHeight:!1,noPrefixPadding:!1,noSuffixPadding:!1,noStyle:!1,boxIsFocus:!1,onRef:j,onClear:j,customRender:j,getBoxRef:j,innerClassName:"",onBlur:null,onFocus:null,onPressEnter:null,tipsAlwaysShow:!1,styleType:void 0,originTitle:"",originSize:"",virtualPlaceholder:!1,ellipsis:!1,autoFill:!1,avoidFillByPassword:!1,placeholderClassName:void 0},k.TIP_TYPE=N,k.SIZE=x.dG,k.STYLE_TYPE=x.wD;const F=k;var I=n(61392),E=(n(96409),["noSuffixPadding","noPrefixPadding","prefix","suffix","children"]),R=()=>{};class z extends o().Component{constructor(){super(...arguments),this.onClear=e=>{var t=this.props,n=t.onChange,r=t.onClear;n&&n({target:{value:""}}),r&&r(e)},this.getSelect=(e,t)=>{var n=C(e),r=null;return n&&(r=o().cloneElement(e,{isInline:!0,align:t?I.JR.left:I.JR.right})),[n,r]},this.renderPrefix=()=>{var e=this.props,t=e.prefix,n=e.prefixIcon,r=e.onPrefixIconClick,a=b(t);n&&(a=(0,S.jsx)(u.Z,{onClick:r,className:"".concat(n," prefix-icon")}));var s=this.getSelect(t,!0),o=(0,i.Z)(s,2),l=o[0],c=o[1];return l&&(a=(0,S.jsx)("span",{className:"select",children:c})),a?(0,S.jsx)("span",{className:"".concat(x.er,"-prefix"),children:a}):null},this.renderSuffix=()=>{var e=this.props,t=e.suffix,n=e.suffixIcon,r=e.cleanable,a=e.value,s=e.clearIcon,l=e.onSuffixIconClick,h=null,d=b(t),p=this.getSelect(t,!1),f=(0,i.Z)(p,2),m=f[0],v=f[1];return r&&a&&(h=s?(0,S.jsx)("span",{onClick:this.onClear,children:s}):(0,S.jsx)(u.Z,{onClick:this.onClear,className:c()("okds-clear-fill suffix-icon clean-icon",n)})),n&&(d=(0,S.jsx)(u.Z,{onClick:l,className:"".concat(n," suffix-icon")})),m&&(d=(0,S.jsx)("span",{className:"select",children:v})),h||d?(0,S.jsxs)(o().Fragment,{children:[h,d]}):null}}render(){var e=this.props,t=e.noSuffixPadding,n=e.noPrefixPadding,i=e.prefix,s=e.suffix,o=e.children,l=(0,a.Z)(e,E),c=(0,m.v1)(l,["onPrefixIconClick","onSuffixIconClick","prefixIcon","suffixIcon","clearIcon","onClear"]),u=C(i)||n,h=C(s)||t;return(0,S.jsx)(F,(0,r.Z)((0,r.Z)({},c),{},{noSuffixPadding:h,noPrefixPadding:u,prefix:this.renderPrefix(),suffix:this.renderSuffix(),children:o}))}}z.defaultProps={prefixIcon:null,suffixIcon:null,showErrorIcon:!1,clearIcon:null,onPrefixIconClick:R,onSuffixIconClick:R,onClear:R},z.elementType=y.Z.Input,z.TIP_TYPE=F.TIP_TYPE,z.STYLE_TYPE=F.STYLE_TYPE;const D=z},4717:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(1413),a=(n(87363),n(95640)),i=n.n(a),s=n(54281),o=n(67469),l=n(45263);function c(e){var t=e.className;return(0,l.jsx)(s.Z,(0,r.Z)((0,r.Z)({cleanable:!0,prefixIcon:"okds-search ".concat(o.er,"-search-prefix-icon"),suffixIcon:"".concat(o.er,"-search-suffix-icon")},e),{},{className:i()("".concat(o.er,"-search"),t)}))}},26846:(e,t,n)=>{n.d(t,{Z:()=>d});var r=n(87363),a=n.n(r),i=n(95640),s=n.n(i),o=n(19427),l=n(67469),c=n(45263),u="".concat(o.Bq,"-label");class h extends a().PureComponent{render(){var e=this.props,t=e.title,n=e.action,r=e.className,a=e.size,i=e.placeMode,o=e.onClick,l=e.styleType,h="function"===typeof n?n():n;h=h?(0,c.jsx)("span",{className:"".concat(u,"-action"),children:h}):null;var d=i?"".concat(u,"-place"):"",p=t||i?(0,c.jsx)("span",{className:"".concat(u,"-text ").concat(d),children:t}):null;if(!h&&!p)return null;var f=s()("".concat(u),l&&"".concat(u,"-").concat(l),"label-".concat(a),{"top-right":h&&!p},{"top-between":h&&p},r);return(0,c.jsxs)("div",{className:f,onClick:o,children:[p,h]})}}h.defaultProps={title:"",action:"",size:l.dG.md,placeMode:!1,className:"",onClick:()=>{},styleType:void 0},h.sizeMap=l.dG;const d=h},67469:(e,t,n)=>{n.d(t,{LB:()=>o,dG:()=>s,er:()=>i,wD:()=>l});var r=n(19427),a=n(59257),i="".concat(r.Bq,"-input"),s={[a.Z.xs]:a.Z.xs,[a.Z.sm]:a.Z.sm,[a.Z.md]:a.Z.md,[a.Z.lg]:a.Z.lg,[a.Z.xl]:a.Z.xl},o="%",l={reversed:"reversed"}},8526:(e,t,n)=>{n.d(t,{Z:()=>ve});n(86286);var r=n(54281),a=n(45987),i=n(1413),s=n(87363),o=n.n(s),l=n(29439),c=n(95640),u=n.n(c),h=n(7562),d=n(67469),p=n(93380),f=n(53949),m=n(94595),v=(e,t)=>{var n=p.yx.BigNumber,r=new n(t);return n(e).gt(r)},x=(e,t)=>new(0,p.yx.BigNumber)(e).plus(t).toFormat({groupSeparator:"",decimalSeparator:"."}),g=(e,t)=>new(0,p.yx.BigNumber)(e).minus(t).toFormat({groupSeparator:"",decimalSeparator:"."}),y=()=>{var e=f.Z.locale||"en_us",t=(0,m.Fg)(e);return{locale:e,smallDigitalSymbol:t.smallDigitalSymbol,micrometerSymbol:t.micrometerSymbol}},b=(e,t)=>{var n="",r="",a=String(e).replace(/(-)(\1)+/g,"$2");return a.indexOf("-")>-1&&a.length>0&&(r="-",a=a.split("-")[1]),t&&1===t.length&&(a.indexOf(t)>-1?(n=t,a=a.replace(t,"")):n=t),{unit:n,minus:r,valueWithoutSymbol:a}},C=e=>{var t="".concat(e);return/e/i.test(t)&&(t=(+t).toFixed(18).replace(/\.?0+$/,"")),t},S=e=>{var t=y().smallDigitalSymbol;return String(e).replace(/,$|\.$/,t)},Z=e=>{var t;switch(e){case".":t=new RegExp("^\\".concat(e,"|^-\\").concat(e));break;case",":t=new RegExp("^".concat(e,"|^-").concat(e));break;default:t=new RegExp("^\\s|^-\\s")}return t},w=(e,t)=>{var n=t?/([^-,\.\u3002\d])/g:/([^,\.\u3002\d])/g,r=C(String(e));return r=r.replace(n,"").replace(/\u3002/g,".").replace(/(,)(\1)+/g,"$2").replace(/(\.)(\1)+/g,"$2"),/,\./.test(r)&&(r=r.replace(".","")),/\.,/.test(r)&&(r=r.replace(",","")),r},P=e=>null===e||void 0===e?void 0:e.replace(/\u200F|\u200E/g,""),N=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=y().locale,a=w(e,n),i=b(a,t),s=i.minus,o=i.valueWithoutSymbol,c=(e=>{var t=e,n=/-/.test(t),r=y(),a=r.smallDigitalSymbol,i=r.micrometerSymbol,s=Z(a),o=Z(i);if(o.test(t))return t.replace(o,"");if(s.test(t)){var c=t.split(s),u=(0,l.Z)(c,2)[1].replaceAll(i,"");return n?"-0".concat(a).concat(u):"0".concat(a).concat(u)}return t})(o);if(/,|\./.test(c)){var u=S(c),h=(0,m.AO)(P(u),{locale:r,handleInput:!0});return"".concat(s).concat(h)}return"".concat(s).concat(o)},T=e=>{var t=e.value,n=e.max,r=e.min,a=y().smallDigitalSymbol,i=t;return v(i,n)&&(i=(e=>new(0,p.yx.BigNumber)(e).toFormat({groupSeparator:"",decimalSeparator:"."}))(n)),v(r,i)&&(i=r),String(i).replace(/\./,a)},j=e=>{var t=e.value,n=e.precision,r=e.symbol,a=e.enableMinus,i=e.withSymbol,s=void 0===i||i,o=w(t,a),l=b(String(o),r),c=l.unit,u=l.minus,h=((e,t)=>{var n=e.split("."),r=n[0];if(n.length>1){var a=n[1];return t>0?"".concat(r,".").concat(a.slice(0,t)):0===t?"".concat(r):"".concat(r,".").concat(a)}return r})(l.valueWithoutSymbol,n);return c&&s?"".concat(u).concat(h).concat(c):"".concat(u).concat(h)},k=(e,t,n)=>{if(""===e||"number"!=typeof e&&"string"!=typeof e)return e;if(!t)return e;var r=b(e,n),a=r.unit,i=r.minus,s=r.valueWithoutSymbol,o=(e=>{var t,n=e.value,r=e.unit,a=e.minus,i=y().smallDigitalSymbol,s=/\.|,/,o=s.test(n),c=(null===n||void 0===n||null===(t=n.split)||void 0===t?void 0:t.call(n,s))||[],u=(0,l.Z)(c,2),h=u[0],p=void 0===h?"":h,f=u[1],v=void 0===f?"":f;if(r===d.LB){var x=p?(0,m.uf)(p,{style:"percent"}):"".concat(p).concat(r);if(x.startsWith(d.LB))return o?"".concat(a).concat(x).concat(i).concat(v):"".concat(a).concat(x);var g=p?(0,m.uf)(p):p;return o?"".concat(a).concat(g).concat(i).concat(v).concat(r):"".concat(a).concat(g).concat(r)}var b=p?(0,m.uf)(p):p;return o?"".concat(a).concat(b).concat(i).concat(v).concat(r):"".concat(a).concat(b).concat(r)})({value:S(s),unit:a,minus:i});return P(o)},F=n(45263);function I(e){var t=(0,s.useState)(!1),n=(0,l.Z)(t,2),r=n[0],a=n[1],i=(0,s.useState)(!1),o=(0,l.Z)(i,2),c=o[0],p=o[1],f=e.suffix,m=e.precision,v=e.symbol,b=e.value,S=e.step,Z=e.max,w=e.min,P=e.onSub,N=e.onAfterSub,T=e.withOperation,k=e.alwaysOperation,I=e.onAdd,E=e.onAfterAdd,R=e.onChange,z=e.enableMinus,D=u()("".concat(d.er,"-number-suffix-part up"),{["".concat(d.er,"-number-suffix-part-disabled")]:r}),A=u()("".concat(d.er,"-number-suffix-part"),{["".concat(d.er,"-number-suffix-part-disabled")]:c}),M=u()("".concat(d.er,"-number-suffix"),{"operation-always":k}),B=(e,t)=>{var n=j({value:b,precision:m,symbol:v,enableMinus:z,withSymbol:!1}),r=C(e(n,S));r<=w?(p(!0),r=w):r>=Z?(a(!0),r=Z):(a(!1),p(!1));var i={target:{value:"".concat(String(r).replace(".",y().smallDigitalSymbol)).concat(v)}};R(i),t(r)};return(0,F.jsxs)(F.Fragment,{children:[f,T&&(0,F.jsxs)("div",{className:M,children:[(0,F.jsx)("div",{onClick:()=>{I()&&B(x,E)},className:D,children:(0,F.jsx)(h.Z,{className:"okds-arrow-chevron-down-sm"})}),(0,F.jsx)("div",{className:"".concat(d.er,"-number-suffix-line")}),(0,F.jsx)("div",{onClick:()=>{P()&&B(g,N)},className:A,children:(0,F.jsx)(h.Z,{className:"okds-arrow-chevron-down-sm"})})]})]})}var E=n(52834),R=["value","enableThousands","enableMultiple","multipleDigit","suffix","withOperation","alwaysOperation","symbol","localSwitch","onRef","precision","enableMinus"],z=()=>!0,D=()=>{};class A extends o().Component{static getDerivedStateFromProps(e,t){var n=e.value;return"value"in e&&n!==t.value?{value:n}:null}constructor(e){var t;super(e),t=this,this.onBlur=e=>{this.focused=!1;var t=e;!this.props.onChangeTriggerValidate&&this.handleValueRange((e=>{this.onChange(e),t=e})),this.executeCallback(t,this.props.onBlur),this.setState({updateValueFlag:!0})},this.onClick=e=>{this.executeCallback(e,this.props.onClick)},this.onCut=e=>{this.executeCallback(e,this.props.onCut)},this.onCopy=e=>{this.executeCallback(e,this.props.onCopy)},this.onDoubleClick=e=>{this.executeCallback(e,this.props.onDoubleClick)},this.onFocus=e=>{this.focused=!0,this.setState({updateValueFlag:!1}),this.executeCallback(e,this.props.onFocus)},this.onKeyDown=e=>{this.lastKeyCode=e.keyCode,this.recordCursorPosition(),this.executeCallback(e,this.props.onKeyDown)},this.onChange=e=>{this.executeCallback(e,((e,t)=>{var n=e;this.props.onChangeTriggerValidate&&this.handleValueRange((e=>{var t=e.target;n=t.value}),(0,i.Z)((0,i.Z)({},this.props),{},{value:e})),this.props.onChange(n,t)}))},this.onKeyUp=e=>{this.recordCursorPosition(),this.executeCallback(e,this.props.onKeyUp)},this.onMouseUp=function(){var e=t.props.onMouseUp;t.recordCursorPosition(),e&&e(...arguments)},this.onKeyPress=e=>{this.executeCallback(e,this.props.onKeyPress)},this.handleValueRange=(e,t)=>{var n=t||this.props,r=n.value,a=n.max,i=n.min;(v(i,r)||v(r,a))&&e({target:{value:T({value:r,max:a,min:i})}})},this.executeCallback=(e,t)=>{var n=this.props,r=n.precision,a=n.symbol,i=n.enableMinus,s=j({value:N(e.target.value.replace(a,""),a,i),precision:r,symbol:a,enableMinus:i,withSymbol:!1});"undefined"!==typeof t&&t(s,e)},this.recordCursorPosition=()=>{try{this.cursorStart=this.input.selectionStart,this.cursorEnd=this.input.selectionEnd,this.currentValue=this.input.value,this.cursorAfter=this.input.value.substring(this.cursorEnd)}catch(e){}},this.restoreByAfter=e=>{if(void 0===e)return!1;var t=this.input.value,n=t.lastIndexOf(e);return-1!==n&&(n+e.length===t.length&&(this.fixCaret(n,n),!0))},this.partRestoreByAfter=e=>void 0!==e&&Array.prototype.some.call(e,((t,n)=>{var r=e.substring(n);return this.restoreByAfter(r)}));var n=e.value;this.state={value:n,updateValueFlag:!0},this.handleValueRange(this.onChange,e)}componentDidUpdate(){var e=this.props,t=e.value,n=e.precision,r=e.symbol,a=e.enableMinus;this.state.updateValueFlag&&this.handleValueRange(this.onChange);try{if(void 0!==this.cursorStart&&this.focused)if(this.currentValue===this.input.value)switch(this.lastKeyCode){case 8:this.fixCaret(this.cursorStart-1,this.cursorStart-1);break;case 46:this.fixCaret(this.cursorStart+1,this.cursorStart+1)}else if(!this.partRestoreByAfter(this.cursorAfter)&&j({value:String(this.state.value),precision:n,symbol:r,enableMinus:a})!==t){var i=this.cursorStart+1;this.cursorAfter?8===this.lastKeyCode?i=this.cursorStart-1:46===this.lastKeyCode&&(i=this.cursorStart):i=this.input.value.length,this.fixCaret(i,i)}}catch(s){}this.lastKeyCode=null}fixCaret(e,t){if(void 0!==e&&void 0!==t&&this.input&&this.input.value)try{var n=this.input.selectionStart,r=this.input.selectionEnd;e===n&&t===r||this.input.setSelectionRange(e,t)}catch(a){}}render(){var e=this.props,t=e.value,n=e.enableThousands,s=e.enableMultiple,o=e.multipleDigit,l=(e.suffix,e.withOperation),c=(e.alwaysOperation,e.symbol),u=(e.localSwitch,e.onRef),h=e.precision,d=e.enableMinus,p=(0,a.Z)(e,R),f=j({value:t,precision:h,symbol:c,enableMinus:d});f=s?((e,t,n,r)=>{var a=y().micrometerSymbol,i=String(e);if(3===t)i=k(i,n,r);else if(2===t){if(i.length>=2){var s=i.substring(0,i.length-1),o=i.substring(i.length-1,i.length);s=k(s,n,r),i="".concat(s).concat(a).concat(o)}}else if(1===t&&i.length>=3){var l=i.substring(0,i.length-2),c=i.substring(i.length-2,i.length);l=k(l,n,r),i="".concat(l).concat(a).concat(c)}return i})(f,o,n,c):k(f,n,c);var m=(0,E.v1)(p,["onAdd","onSub","onAfterAdd","onAfterSub","onChangeTriggerValidate"]),v=f;return(0,F.jsx)(r.Z,(0,i.Z)((0,i.Z)({inputMode:"decimal",noSuffixPadding:l,enable_thousands:String(n)},m),{},{suffix:(0,F.jsx)(I,(0,i.Z)((0,i.Z)({},this.props),{},{onChange:this.onChange})),type:"text",onCopy:this.onCopy,onBlur:this.onBlur,onClick:this.onClick,onChange:this.onChange,onCut:this.onCut,onDoubleClick:this.onDoubleClick,onFocus:this.onFocus,onKeyUp:this.onKeyUp,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onKeyPress:this.onKeyPress,onRef:e=>{this.input=e,u&&u(e)},value:v}))}}A.defaultProps={value:"",precision:void 0,autoComplete:"off",symbol:"",enableThousands:!0,step:1,onAdd:z,onSub:z,onAfterAdd:D,onAfterSub:D,withOperation:!1,alwaysOperation:!1,max:Number.MAX_SAFE_INTEGER,min:0,enableMinus:!0,withPercent:!1,onChangeTriggerValidate:!1};const M=A;var B=n(43980),V=["withPercent"];var O=n(77016),K=function(e){function t(t,n){var r=t.withPercent,s=(0,a.Z)(t,V),o=s.suffix,l=s.prefix,c=s.value,h=s.placeholderClassName,p={};return!!!(0,m.uf)(100,{style:"percent"}).startsWith(d.LB)&&!(0,B.X2)()||o!==d.LB&&!r||(p=l?{virtualPlaceholder:!0,placeholder:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{className:"".concat(d.er,"-number-localization-percent"),children:o}),(0,F.jsx)("span",{children:t.placeholder})]}),placeholderClassName:u()("".concat(d.er,"-number-localization"),h),suffix:"",symbol:c?d.LB:"",inputClassName:"".concat(d.er,"-number-localization")}:{prefix:o,suffix:"",inputClassName:"".concat(d.er,"-number-localization")}),(0,F.jsx)(e,(0,i.Z)((0,i.Z)({ref:n},s),p))}return(0,s.forwardRef)(t)}(M);K.elementType=O.Z.InputNumber;const _=K;var L=["btnText","maxSeconds","currentSecond","onSendClick","onTimerFinished","sendDisabled"];class H extends o().Component{constructor(e){super(e),this.onClick=()=>{var e=this.props,t=e.onSendClick,n=e.maxSeconds,r=e.sendDisabled;if(t&&!r&&!this.loading){this.loading=!0;var a=t({clearTimer:this.clearTimer});a&&a.then?a.then((()=>{this.setState({current:n}),this.startTimer()}),(()=>{this.loading=!1})).catch((()=>{})):(this.setState({current:n}),this.startTimer())}},this.startTimer=()=>{this.timerId=setInterval((()=>{var e=this.state.current;this.setState({current:e-1},(()=>{this.state.current<=0&&this.clearTimer()}))}),1e3)},this.clearTimer=()=>{var e=this.props.onTimerFinished;this.timerId&&(clearInterval(this.timerId),this.timerId=null,this.loading=!1,this.setState({current:0}),e&&e())},this.renderSuffix=()=>{var e,t=this.props,n=t.btnText,r=t.sendDisabled,a=t.currentSecond;e=void 0!==a&&null!==a?a:this.state.current;var i=(0,F.jsx)("div",{onClick:this.onClick,className:"".concat(d.er,"-code-btn ").concat(r?"disabled":""),children:n});return 0!==e&&(i=(0,F.jsxs)("div",{className:"".concat(d.er,"-count-down"),children:[e,"s"]})),i},this.state={current:0},this.timerId=null,this.loading=!1}componentWillUnmount(){this.timerId&&clearInterval(this.timerId)}render(){var e=this.props,t=(e.btnText,e.maxSeconds,e.currentSecond,e.onSendClick,e.onTimerFinished,e.sendDisabled,(0,a.Z)(e,L));return(0,F.jsx)(r.Z,(0,i.Z)((0,i.Z)({},t),{},{type:"tel",suffix:this.renderSuffix()}))}}H.defaultProps={btnText:"",maxSeconds:60,currentSecond:void 0,maxLength:6,sendDisabled:!1,onTimerFinished:null},H.elementType=O.Z.InputCode;const Y=H;var U=n(59257),G=["onChange","length","onFinish","size","className","style","disabled","defaultValue","type","inputClassName","inputStyle","width","autoFocus"],W=()=>{},q=(0,s.forwardRef)(((e,t)=>{var n=e.onChange,r=e.length,o=e.onFinish,c=e.size,h=e.className,p=e.style,f=e.disabled,m=e.defaultValue,v=e.type,x=void 0===v?"number":v,g=e.inputClassName,y=e.inputStyle,b=e.width,C=e.autoFocus,S=(0,a.Z)(e,G),Z=e=>new Array(r).fill("").map(((t,n)=>{var r;return null!==(r=e[n])&&void 0!==r?r:""})),w=(0,s.useState)(Z(m)),P=(0,l.Z)(w,2),N=P[0],T=P[1],j=(0,s.useState)(-1),k=(0,l.Z)(j,2),I=k[0],E=k[1],R=(0,s.useMemo)((()=>new Array(r).fill(null).map((()=>(0,s.createRef)()))),[r]),z=e=>"number"!==x||/^\d/.test(e),D=e=>{var t=R[e].current;t&&requestAnimationFrame((()=>{t.select()}))},A=(e,t)=>{var a=[...N];a[t]=e,T(a);var i=a.join("");i.length===r?o(i):n(i)},M=(0,s.useCallback)((e=>{var t,n=null===(t=R[e])||void 0===t?void 0:t.current;n&&requestAnimationFrame((()=>{n.focus()}))}),[R]);(0,s.useImperativeHandle)(t,(()=>({setValues:T,focusInput:M})));var B=e=>{var t,n=null===(t=R[e])||void 0===t?void 0:t.current;n&&requestAnimationFrame((()=>{n.blur()}))},V=u()("".concat(d.er,"-verify"),h),O=u()("".concat(d.er,"-verify-input"),"input-".concat(c),g,{disabled:f}),K=(0,i.Z)((0,i.Z)({},y),{},{width:b}),_=(0,i.Z)((0,i.Z)({},S),{},{autoCapitalize:"off",autoCorrect:"off",maxLength:"2",type:"tel",disabled:f});return(0,s.useEffect)((()=>{C&&setTimeout((()=>{M(0)}))}),[]),(0,F.jsx)("div",{className:V,style:p,children:R.map(((e,t)=>(0,F.jsx)("input",(0,i.Z)({autoComplete:"one-time-code",className:O,style:K,onChange:e=>((e,t)=>{var n=e.target.value,a=n.replace(N[t],"");if(z(a)){if(a.length>1)return T(Z(n)),n.length===r?(o(n),void B(t)):void 0;A(a,t),t!==r-1?M(t+1):B(t)}else D(t)})(e,t),onFocus:()=>(e=>{var t;(null===(t=R[e])||void 0===t?void 0:t.current)&&(E(e),D(e))})(t),onKeyDown:e=>((e,t)=>{var n=e.key;if("Backspace"===n||"Delete"===n)return e.preventDefault(),A("",I),void(""===N[I]&&M(t-1));n===N[t]&&M(t+1)})(e,t),onPaste:e=>((e,t)=>{e.preventDefault();var n=e.clipboardData.getData("text").slice(0,r);if(z(n)){if(T(Z(n)),n.length===r)return o(n),void B(t);M(n.length)}})(e,t),ref:e,value:N[t]},_),t)))})}));q.elementType=O.Z.InputVerify,q.defaultProps={length:6,onChange:W,onFinish:W,size:U.Z.md,disabled:!1,className:"",style:{},inputClassName:"",inputStyle:{},width:40,defaultValue:"",autoFocus:!1};const $=q;var X=["target"],J=["defaultCipher","filterReg","autoFill"];class Q extends o().PureComponent{constructor(e){super(e),this.onClick=()=>{var e=this.state.isCipher;this.setState({isCipher:!e})},this.onChange=e=>{var t=this.props.onChange,n=e.target.value;this.composing||(n=this.filter(n));var r=this.composeEventObject(e,n);t&&t(r,n)},this.onCompositionStart=e=>{this.composing=!0;var t=this.props.onCompositionStart;t&&t(e)},this.onCompositionEnd=e=>{this.composing=!1;var t=this.props,n=t.onCompositionEnd,r=t.onChange,a=this.filter(e.target.value),i=this.composeEventObject(e,a);n&&n(i),r&&r(i,a)},this.filter=e=>e.replace(this.props.filterReg,""),this.composeEventObject=(e,t)=>{e.target;var n=(0,a.Z)(e,X);return(0,i.Z)({target:(0,i.Z)((0,i.Z)({},e.target),{},{value:t})},n)},this.renderSuffix=()=>{var e=this.state.isCipher?"okds-eye-hide-filled":"okds-eye-show-filled";return(0,F.jsx)(h.Z,{className:"".concat(d.er,"-switch-icon suffix-icon ").concat(e),onClick:this.onClick})},this.state={isCipher:e.defaultCipher},this.composing=!1}render(){var e=this.props,t=(e.defaultCipher,e.filterReg,e.autoFill),n=(0,a.Z)(e,J),s=this.state.isCipher;return(0,F.jsxs)(o().Fragment,{children:[!t&&(0,F.jsx)("input",{type:"password",autoComplete:"new-password",readOnly:"readonly",style:{display:"none"}}),(0,F.jsx)(r.Z,(0,i.Z)((0,i.Z)({},n),{},{onCompositionEnd:this.onCompositionEnd,onCompositionStart:this.onCompositionStart,onChange:this.onChange,type:s?"password":"text",suffix:this.renderSuffix(),autoFill:!0}))]})}}Q.defaultProps={defaultCipher:!0,filterReg:/[^\u0000-\u00FF]/g,autoFill:!0},Q.elementType=O.Z.InputPassword;const ee=Q;var te=n(4717),ne=n(60378),re=n(21367),ae=n(19427),ie=Object.prototype.toString;function se(e){return"[object Number]"===ie.call(e)&&e===e}var oe="\n position: absolute;\n min-height: 0 !important;\n max-height: none;\n height:0;\n visibility: hidden;\n z-index: -100;\n top: 0;\n right: 0;\n",le=["border-width","box-sizing","font-family","font-weight","font-size","font-variant","letter-spacing","line-height","padding-top","padding-bottom","padding-left","padding-right","text-indent","text-rendering","text-transform","width"],ce=null;const ue=function(e,t){if(e&&!(0,ne.y)()){var n=(()=>{var t,n,r;return r=e,"[object Object]"===ie.call(r)&&(t=e.minRows,n=e.maxRows),{minRows:t,maxRows:n}})(),r=n.minRows,a=n.maxRows,i=t,s=function(e){if((0,ne.y)())return{paddingSize:0,boxSizing:"border-box",borderSize:0};var t,n;ce||(null===(t=ce=re.Z.document.createElement("textarea"))||void 0===t||null===(n=t.classList)||void 0===n||n.add("".concat(ae.Bq,"-input-textarea-resize-virtual-dom")),re.Z.document.body.appendChild(ce));var r=re.Z.getComputedStyle(e),a="\n ".concat(le.map((e=>"".concat(e,":").concat(null===r||void 0===r?void 0:r.getPropertyValue(e)))).join(";"),"\n ");return ce.setAttribute("style","".concat(oe).concat(a,";line-height: ").concat(r.getPropertyValue("font-size"),";")),{paddingSize:parseFloat(null===r||void 0===r?void 0:r.getPropertyValue("padding-top"))+parseFloat(null===r||void 0===r?void 0:r.getPropertyValue("padding-bottom")),boxSizing:null===r||void 0===r?void 0:r.getPropertyValue("box-sizing"),borderSize:parseFloat(null===r||void 0===r?void 0:r.getPropertyValue("border-top-width"))+parseFloat(null===r||void 0===r?void 0:r.getPropertyValue("border-bottom-width"))}}(i),o=s.paddingSize,l=s.boxSizing,c=s.borderSize;ce.value=i.value||i.placeholder||"";var u,h,d,p=ce.scrollHeight+c;if(r||a){ce.value="";var f=ce.scrollHeight-o;se(r)&&(u=f*r,"border-box"===l&&(u+=o,u+=c),p=Math.max(p,u)),se(a)&&(h=f*a,"border-box"===l&&(h+=o,h+=c),d=p>h?"auto":"",h=Math.min(p,h))}var m={};return m.height=p,u&&(m.minHeight=u),h&&(m.maxHeight=h),d&&(m.overflowY=d),m}return{}};var he=["onChange","maxLength","showCount","cleanable","cleanText","helpText","value","innerClassName","autoResize","onRef"],de=()=>{},pe=e=>{var t=e.onChange,n=e.maxLength,o=e.showCount,c=(e.cleanable,e.cleanText),h=(e.helpText,e.value),d=void 0===h?"":h,f=e.innerClassName,m=void 0===f?"":f,v=e.autoResize,x=e.onRef,g=void 0===x?de:x,y=(0,a.Z)(e,he),b=(0,s.useState)(0),C=(0,l.Z)(b,2),S=C[0],Z=C[1],w=(0,s.useRef)(null),P=(0,s.useRef)(null),N=(0,s.useState)({}),T=(0,l.Z)(N,2),j=T[0],k=T[1];(0,s.useEffect)((()=>{var e=String(d).length;Z(e)}),[d]);(0,s.useEffect)((()=>{v&&(()=>{var e=ue(v,w.current);e&&k(e)})()}),[v,d]);var I;o&&(I=p.yx.thousandFormat(S),n&&(I+=" / ".concat(p.yx.thousandFormat(n))));var E=!!c&&(0,F.jsx)("span",{onClick:()=>{t&&t({target:{value:""}})},children:c});return(0,F.jsx)(r.Z,(0,i.Z)((0,i.Z)({},y),{},{value:d,isTextarea:!0,maxLength:n,helpText:I,action:E,cleanable:!1,onChange:t,onRef:e=>{w.current=e,g(e)},getBoxRef:e=>{P.current||(P.current=null===e||void 0===e?void 0:e.offsetHeight)},autoResize:v,innerClassName:u()(m,v&&"auto-resize-auto-height"),inputStyle:(0,i.Z)((0,i.Z)({},j),y.inputStyle)}))};pe.defaultProps={maxLength:void 0,showCount:!1,cleanable:!1,cleanText:"",autoResize:!1},pe.elementType=O.Z.TextArea;const fe=pe;var me=n(26846);n(82662);r.Z.Number=_,r.Z.Code=Y,r.Z.Verify=$,r.Z.Password=ee,r.Z.TextArea=fe,r.Z.Search=te.Z,r.Z.Label=me.Z,r.Z.SIZE=d.dG,r.Z.STYLE_TYPE=d.wD;const ve=r.Z},4946:(e,t,n)=>{n.d(t,{Z:()=>h});var r=n(1413),a=n(45987),i=(n(86286),n(87363),n(53949)),s=n(1677),o=n(2627),l=n(53477),c=n(45263),u=["fetchConfig"];function h(e){var t=e.localeProps,n=void 0===t?{}:t,l=e.children,h=e.locale,d=n.fetchConfig,p=(0,a.Z)(n,u),f=(0,r.Z)((0,r.Z)((0,r.Z)({},o.Z.data.localeProviderProps),p),{},{fetchConfig:(0,r.Z)((0,r.Z)({},o.Z.data.localeProviderProps.fetchConfig),{},{locale:i.Z.locale},d)});return h&&(f.fetchConfig.locale=h),(0,c.jsx)(s.Z,(0,r.Z)((0,r.Z)({},f),{},{children:l}))}h.toLocale=(e,t)=>(0,l.I)("web_common",e,t)},53477:(e,t,n)=>{n.d(t,{I:()=>a,O:()=>i});var r=n(14300);function a(e,t,n){return r.O4[e](t,n)}var i=(e,t)=>a("web_common",e,t)},82662:()=>{}}]); +//# sourceMappingURL=https://static-daily.okg.com/crash/okfe/defi-mode/8267/index.dc1043b3.js.map \ No newline at end of file