-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathokxconnect_min.js
More file actions
1 lines (1 loc) ยท 261 KB
/
okxconnect_min.js
File metadata and controls
1 lines (1 loc) ยท 261 KB
1
function asyncGeneratorStep(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function _asyncToGenerator(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function o(e){asyncGeneratorStep(r,t,n,o,i,"next",e)}function i(e){asyncGeneratorStep(r,t,n,o,i,"throw",e)}o(void 0)})}}function _createForOfIteratorHelper(e,t){var n,r,o,i,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return o=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){o=!0,n=e},f:function(){try{r||null==a.return||a.return()}finally{if(o)throw n}}};if(Array.isArray(e)||(a=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ownKeys(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _callSuper(e,t,n){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,n||[],_getPrototypeOf(e).constructor):t.apply(e,n))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _construct(e,t,n){var r;return _isNativeReflectConstruct()?Reflect.construct.apply(null,arguments):((r=[null]).push.apply(r,t),t=new(e.bind.apply(e,r)),n&&_setPrototypeOf(t,n.prototype),t)}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var c,a={},e=Object.prototype,u=e.hasOwnProperty,f=Object.defineProperty||function(e,t,n){e[t]=n.value},t="function"==typeof Symbol?Symbol:{},r=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",o=t.toStringTag||"@@toStringTag";function i(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(c){i=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o,i,a,s,t=t&&t.prototype instanceof y?t:y,t=Object.create(t.prototype),r=new R(r||[]);return f(t,"_invoke",{value:(o=e,i=n,a=r,s=l,function(e,t){if(s===p)throw Error("Generator is already running");if(s===g){if("throw"===e)throw t;return{value:c,done:!0}}for(a.method=e,a.arg=t;;){var n=a.delegate;if(n){n=function e(t,n){var r=n.method,o=t.iterator[r];if(o===c)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=c,e(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;r=h(o,t.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,v;o=r.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=c),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}(n,a);if(n){if(n===v)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===l)throw s=g,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=p;n=h(o,i,a);if("normal"===n.type){if(s=a.done?g:d,n.arg===v)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s=g,a.method="throw",a.arg=n.arg)}})}),t}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}a.wrap=s;var l="suspendedStart",d="suspendedYield",p="executing",g="completed",v={};function y(){}function _(){}function b(){}var t={},w=(i(t,r,function(){return this}),Object.getPrototypeOf),w=w&&w(w(T([]))),E=(w&&w!==e&&u.call(w,r)&&(t=w),b.prototype=y.prototype=Object.create(t));function m(e){["next","throw","return"].forEach(function(t){i(e,t,function(e){return this._invoke(t,e)})})}function O(a,s){var t;f(this,"_invoke",{value:function(n,r){function e(){return new s(function(e,t){!function t(e,n,r,o){var i,e=h(a[e],a,n);if("throw"!==e.type)return(n=(i=e.arg).value)&&"object"==_typeof(n)&&u.call(n,"__await")?s.resolve(n.__await).then(function(e){t("next",e,r,o)},function(e){t("throw",e,r,o)}):s.resolve(n).then(function(e){i.value=e,r(i)},function(e){return t("throw",e,r,o)});o(e.arg)}(n,r,e,t)})}return t=t?t.then(e,e):e()}})}function C(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 S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function T(t){if(t||""===t){var n,e=t[r];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return n=-1,(e=function e(){for(;++n<t.length;)if(u.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=c,e.done=!0,e}).next=e}throw new TypeError(_typeof(t)+" is not iterable")}return f(E,"constructor",{value:_.prototype=b,configurable:!0}),f(b,"constructor",{value:_,configurable:!0}),_.displayName=i(b,o,"GeneratorFunction"),a.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,i(e,o,"GeneratorFunction")),e.prototype=Object.create(E),e},a.awrap=function(e){return{__await:e}},m(O.prototype),i(O.prototype,n,function(){return this}),a.AsyncIterator=O,a.async=function(e,t,n,r,o){void 0===o&&(o=Promise);var i=new O(s(e,t,n,r),o);return a.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},m(E),i(E,o,"Generator"),i(E,r,function(){return this}),i(E,"toString",function(){return"[object Generator]"}),a.keys=function(e){var t,n=Object(e),r=[];for(t in n)r.push(t);return r.reverse(),function e(){for(;r.length;){var t=r.pop();if(t in n)return e.value=t,e.done=!1,e}return e.done=!0,e}},a.values=T,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&u.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function e(e,t){return i.type="throw",i.arg=n,r.next=e,t&&(r.method="next",r.arg=c),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var o=this.tryEntries[t],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=u.call(o,"catchLoc"),s=u.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&u.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}var i=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,r,o=this.tryEntries[t];if(o.tryLoc===e)return"throw"===(n=o.completion).type&&(r=n.arg,S(o)),r}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=c),v}},a}function _typeof(e){return(_typeof="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})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}var OKXTonConnectSDK;(()=>{var n={972:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var a=n(4512);function r(e,t,n){return(t=void 0===t?new Uint8Array(2):t)[(n=void 0===n?0:n)+0]=e>>>8,t[n+1]=e>>>0,t}function o(e,t,n){return(t=void 0===t?new Uint8Array(2):t)[(n=void 0===n?0:n)+0]=e>>>0,t[n+1]=e>>>8,t}function i(e,t){return e[t=void 0===t?0:t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function s(e,t){return(e[t=void 0===t?0:t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function c(e,t){return e[(t=void 0===t?0:t)+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t]}function u(e,t){return(e[(t=void 0===t?0:t)+3]<<24|e[t+2]<<16|e[t+1]<<8|e[t])>>>0}function f(e,t,n){return(t=void 0===t?new Uint8Array(4):t)[(n=void 0===n?0:n)+0]=e>>>24,t[n+1]=e>>>16,t[n+2]=e>>>8,t[n+3]=e>>>0,t}function h(e,t,n){return(t=void 0===t?new Uint8Array(4):t)[(n=void 0===n?0:n)+0]=e>>>0,t[n+1]=e>>>8,t[n+2]=e>>>16,t[n+3]=e>>>24,t}function l(e,t,n){return f(e/4294967296>>>0,t=void 0===t?new Uint8Array(8):t,n=void 0===n?0:n),f(e>>>0,t,n+4),t}function d(e,t,n){return h(e>>>0,t=void 0===t?new Uint8Array(8):t,n=void 0===n?0:n),h(e/4294967296>>>0,t,n+4),t}t.readInt16BE=function(e,t){return(e[(t=void 0===t?0:t)+0]<<8|e[t+1])<<16>>16},t.readUint16BE=function(e,t){return(e[(t=void 0===t?0:t)+0]<<8|e[t+1])>>>0},t.readInt16LE=function(e,t){return(e[(t=void 0===t?0:t)+1]<<8|e[t])<<16>>16},t.readUint16LE=function(e,t){return(e[(t=void 0===t?0:t)+1]<<8|e[t])>>>0},t.writeUint16BE=r,t.writeInt16BE=r,t.writeUint16LE=o,t.writeInt16LE=o,t.readInt32BE=i,t.readUint32BE=s,t.readInt32LE=c,t.readUint32LE=u,t.writeUint32BE=f,t.writeInt32BE=f,t.writeUint32LE=h,t.writeInt32LE=h,t.readInt64BE=function(e,t){var n=i(e,t=void 0===t?0:t),e=i(e,t+4);return 4294967296*n+e-4294967296*(e>>31)},t.readUint64BE=function(e,t){return 4294967296*s(e,t=void 0===t?0:t)+s(e,t+4)},t.readInt64LE=function(e,t){var n=c(e,t=void 0===t?0:t);return 4294967296*c(e,t+4)+n-4294967296*(n>>31)},t.readUint64LE=function(e,t){var n=u(e,t=void 0===t?0:t);return 4294967296*u(e,t+4)+n},t.writeUint64BE=l,t.writeInt64BE=l,t.writeUint64LE=d,t.writeInt64LE=d,t.readUintBE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintBE: array is too short for the given bitLength");for(var r=0,o=1,i=e/8+n-1;n<=i;i--)r+=t[i]*o,o*=256;return r},t.readUintLE=function(e,t,n){if(void 0===n&&(n=0),e%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(e/8>t.length-n)throw new Error("readUintLE: array is too short for the given bitLength");for(var r=0,o=1,i=n;i<n+e/8;i++)r+=t[i]*o,o*=256;return r},t.writeUintBE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintBE supports only bitLengths divisible by 8");if(!a.isSafeInteger(t))throw new Error("writeUintBE value must be an integer");for(var o=1,i=e/8+r-1;r<=i;i--)n[i]=t/o&255,o*=256;return n},t.writeUintLE=function(e,t,n,r){if(void 0===n&&(n=new Uint8Array(e/8)),void 0===r&&(r=0),e%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!a.isSafeInteger(t))throw new Error("writeUintLE value must be an integer");for(var o=1,i=r;i<r+e/8;i++)n[i]=t/o&255,o*=256;return n},t.readFloat32BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t)},t.readFloat32LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat32(t,!0)},t.readFloat64BE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t)},t.readFloat64LE=function(e,t){return void 0===t&&(t=0),new DataView(e.buffer,e.byteOffset,e.byteLength).getFloat64(t,!0)},t.writeFloat32BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e),t},t.writeFloat32LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(4)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat32(n,e,!0),t},t.writeFloat64BE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e),t},t.writeFloat64LE=function(e,t,n){return void 0===t&&(t=new Uint8Array(8)),void 0===n&&(n=0),new DataView(t.buffer,t.byteOffset,t.byteLength).setFloat64(n,e,!0),t}},4904:function(t,s,e){Object.defineProperty(s,"__esModule",{value:!0}),s.convertSecretKeyToX25519=s.convertPublicKeyToX25519=s.verify=s.sign=s.extractPublicKeyFromSecretKey=s.generateKeyPair=s.generateKeyPairFromSeed=s.SEED_LENGTH=s.SECRET_KEY_LENGTH=s.PUBLIC_KEY_LENGTH=s.SIGNATURE_LENGTH=void 0;var n=e(7052),l=e(4974),r=e(6228);function v(e){var t=new Float64Array(16);if(e)for(var n=0;n<e.length;n++)t[n]=e[n];return t}s.SIGNATURE_LENGTH=64,s.PUBLIC_KEY_LENGTH=32,s.SECRET_KEY_LENGTH=64,s.SEED_LENGTH=32,new Uint8Array(32)[0]=9;var y=v(),_=v([1]),b=v([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=v([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),o=v([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),i=v([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),w=v([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function E(e,t){for(var n=0;n<16;n++)e[n]=0|t[n]}function u(e){for(var t=1,n=0;n<16;n++){var r=e[n]+t+65535,t=Math.floor(r/65536);e[n]=r-65536*t}e[0]+=t-1+37*(t-1)}function f(e,t,n){for(var r=~(n-1),o=0;o<16;o++){var i=r&(e[o]^t[o]);e[o]^=i,t[o]^=i}}function a(e,t){for(var n=v(),r=v(),o=0;o<16;o++)r[o]=t[o];u(r),u(r),u(r);for(var i=0;i<2;i++){n[0]=r[0]-65517;for(var a=1;a<15;a++)n[a]=r[a]-65535-(n[a-1]>>16&1),n[a-1]&=65535;n[15]=r[15]-32767-(n[14]>>16&1);var s=n[15]>>16&1;n[14]&=65535,f(r,n,1-s)}for(var c=0;c<16;c++)e[2*c]=255&r[c],e[2*c+1]=r[c]>>8}function c(e,t){for(var n=0,r=0;r<32;r++)n|=e[r]^t[r];return(1&n-1>>>8)-1}function m(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return a(n,e),a(r,t),c(n,r)}function O(e){var t=new Uint8Array(32);return a(t,e),1&t[0]}function C(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function S(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function R(e,t,n){var L=0,M=0,U=0,K=0,r=0,o=0,i=0,a=0,s=0,c=0,u=0,f=0,h=0,l=0,d=0,p=0,g=0,v=0,y=0,_=0,b=0,H=0,j=0,W=0,X=0,F=0,z=0,G=0,J=0,Y=0,V=0,w=n[0],E=n[1],m=n[2],O=n[3],C=n[4],S=n[5],R=n[6],T=n[7],k=n[8],N=n[9],x=n[10],A=n[11],D=n[12],P=n[13],I=n[14],n=n[15],B=t[0];L+=B*w,U+=B*m,K+=B*O,r+=B*C,o+=B*S,i+=B*R,a+=B*T,s+=B*k,c+=B*N,u+=B*x,f+=B*A,h+=B*D,l+=B*P,d+=B*I,p+=B*n,M=0+B*E+(B=t[1])*w,K+=B*m,r+=B*O,o+=B*C,i+=B*S,a+=B*R,s+=B*T,c+=B*k,u+=B*N,f+=B*x,h+=B*A,l+=B*D,d+=B*P,p+=B*I,g+=B*n,U=U+B*E+(B=t[2])*w,r+=B*m,o+=B*O,i+=B*C,a+=B*S,s+=B*R,c+=B*T,u+=B*k,f+=B*N,h+=B*x,l+=B*A,d+=B*D,p+=B*P,g+=B*I,v+=B*n,K=K+B*E+(B=t[3])*w,o+=B*m,i+=B*O,a+=B*C,s+=B*S,c+=B*R,u+=B*T,f+=B*k,h+=B*N,l+=B*x,d+=B*A,p+=B*D,g+=B*P,v+=B*I,y+=B*n,r=r+B*E+(B=t[4])*w,i+=B*m,a+=B*O,s+=B*C,c+=B*S,u+=B*R,f+=B*T,h+=B*k,l+=B*N,d+=B*x,p+=B*A,g+=B*D,v+=B*P,y+=B*I,_+=B*n,o=o+B*E+(B=t[5])*w,a+=B*m,s+=B*O,c+=B*C,u+=B*S,f+=B*R,h+=B*T,l+=B*k,d+=B*N,p+=B*x,g+=B*A,v+=B*D,y+=B*P,_+=B*I,b+=B*n,i=i+B*E+(B=t[6])*w,s+=B*m,c+=B*O,u+=B*C,f+=B*S,h+=B*R,l+=B*T,d+=B*k,p+=B*N,g+=B*x,v+=B*A,y+=B*D,_+=B*P,b+=B*I,H+=B*n,a=a+B*E+(B=t[7])*w,c+=B*m,u+=B*O,f+=B*C,h+=B*S,l+=B*R,d+=B*T,p+=B*k,g+=B*N,v+=B*x,y+=B*A,_+=B*D,b+=B*P,H+=B*I,j+=B*n,s=s+B*E+(B=t[8])*w,u+=B*m,f+=B*O,h+=B*C,l+=B*S,d+=B*R,p+=B*T,g+=B*k,v+=B*N,y+=B*x,_+=B*A,b+=B*D,H+=B*P,j+=B*I,W+=B*n,c=c+B*E+(B=t[9])*w,f+=B*m,h+=B*O,l+=B*C,d+=B*S,p+=B*R,g+=B*T,v+=B*k,y+=B*N,_+=B*x,b+=B*A,H+=B*D,j+=B*P,W+=B*I,X+=B*n,u=u+B*E+(B=t[10])*w,h+=B*m,l+=B*O,d+=B*C,p+=B*S,g+=B*R,v+=B*T,y+=B*k,_+=B*N,b+=B*x,H+=B*A,j+=B*D,W+=B*P,X+=B*I,F+=B*n,f=f+B*E+(B=t[11])*w,l+=B*m,d+=B*O,p+=B*C,g+=B*S,v+=B*R,y+=B*T,_+=B*k,b+=B*N,H+=B*x,j+=B*A,W+=B*D,X+=B*P,F+=B*I,z+=B*n,h=h+B*E+(B=t[12])*w,d+=B*m,p+=B*O,g+=B*C,v+=B*S,y+=B*R,_+=B*T,b+=B*k,H+=B*N,j+=B*x,W+=B*A,X+=B*D,F+=B*P,z+=B*I,G+=B*n,l=l+B*E+(B=t[13])*w,p+=B*m,g+=B*O,v+=B*C,y+=B*S,_+=B*R,b+=B*T,H+=B*k,j+=B*N,W+=B*x,X+=B*A,F+=B*D,z+=B*P,G+=B*I,J+=B*n,d=d+B*E+(B=t[14])*w,g+=B*m,v+=B*O,y+=B*C,_+=B*S,b+=B*R,H+=B*T,j+=B*k,W+=B*N,X+=B*x,F+=B*A,z+=B*D,G+=B*P,J+=B*I,Y+=B*n,p=p+B*E+(B=t[15])*w,M+=38*(v+=B*m),U+=38*(y+=B*O),K+=38*(_+=B*C),r+=38*(b+=B*S),o+=38*(H+=B*R),i+=38*(j+=B*T),a+=38*(W+=B*k),s+=38*(X+=B*N),c+=38*(F+=B*x),u+=38*(z+=B*A),f+=38*(G+=B*D),h+=38*(J+=B*P),l+=38*(Y+=B*I),d+=38*(V+=B*n),L=(B=1+(L+=38*(g+=B*E))+65535)-65536*(t=Math.floor(B/65536)),M=(B=M+t+65535)-65536*(t=Math.floor(B/65536)),U=(B=U+t+65535)-65536*(t=Math.floor(B/65536)),K=(B=K+t+65535)-65536*(t=Math.floor(B/65536)),r=(B=r+t+65535)-65536*(t=Math.floor(B/65536)),o=(B=o+t+65535)-65536*(t=Math.floor(B/65536)),i=(B=i+t+65535)-65536*(t=Math.floor(B/65536)),a=(B=a+t+65535)-65536*(t=Math.floor(B/65536)),s=(B=s+t+65535)-65536*(t=Math.floor(B/65536)),c=(B=c+t+65535)-65536*(t=Math.floor(B/65536)),u=(B=u+t+65535)-65536*(t=Math.floor(B/65536)),f=(B=f+t+65535)-65536*(t=Math.floor(B/65536)),h=(B=h+t+65535)-65536*(t=Math.floor(B/65536)),l=(B=l+t+65535)-65536*(t=Math.floor(B/65536)),d=(B=d+t+65535)-65536*(t=Math.floor(B/65536)),p=(B=p+t+65535)-65536*(t=Math.floor(B/65536)),L+=t-1+37*(t-1),L=(B=1+L+65535)-65536*(t=Math.floor(B/65536)),M=(B=M+t+65535)-65536*(t=Math.floor(B/65536)),U=(B=U+t+65535)-65536*(t=Math.floor(B/65536)),K=(B=K+t+65535)-65536*(t=Math.floor(B/65536)),r=(B=r+t+65535)-65536*(t=Math.floor(B/65536)),o=(B=o+t+65535)-65536*(t=Math.floor(B/65536)),i=(B=i+t+65535)-65536*(t=Math.floor(B/65536)),a=(B=a+t+65535)-65536*(t=Math.floor(B/65536)),s=(B=s+t+65535)-65536*(t=Math.floor(B/65536)),c=(B=c+t+65535)-65536*(t=Math.floor(B/65536)),u=(B=u+t+65535)-65536*(t=Math.floor(B/65536)),f=(B=f+t+65535)-65536*(t=Math.floor(B/65536)),h=(B=h+t+65535)-65536*(t=Math.floor(B/65536)),l=(B=l+t+65535)-65536*(t=Math.floor(B/65536)),d=(B=d+t+65535)-65536*(t=Math.floor(B/65536)),p=(B=p+t+65535)-65536*(t=Math.floor(B/65536)),e[0]=L+=t-1+37*(t-1),e[1]=M,e[2]=U,e[3]=K,e[4]=r,e[5]=o,e[6]=i,e[7]=a,e[8]=s,e[9]=c,e[10]=u,e[11]=f,e[12]=h,e[13]=l,e[14]=d,e[15]=p}function T(e,t){R(e,t,t)}function d(e,t){for(var n=v(),r=0;r<16;r++)n[r]=t[r];for(r=253;0<=r;r--)T(n,n),2!==r&&4!==r&&R(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function p(e,t){var n=v(),r=v(),o=v(),i=v(),a=v(),s=v(),c=v(),u=v(),f=v();S(n,e[1],e[0]),S(f,t[1],t[0]),R(n,n,f),C(r,e[0],e[1]),C(f,t[0],t[1]),R(r,r,f),R(o,e[3],t[3]),R(o,o,h),R(i,e[2],t[2]),C(i,i,i),S(a,r,n),S(s,i,o),C(c,i,o),C(u,r,n),R(e[0],a,s),R(e[1],u,c),R(e[2],c,s),R(e[3],a,u)}function g(e,t,n){for(var r=0;r<4;r++)f(e[r],t[r],n)}function k(e,t){var n=v(),r=v(),o=v();d(o,t[2]),R(n,t[0],o),R(r,t[1],o),a(e,r),e[31]^=O(n)<<7}function N(e,t,n){E(e[0],y),E(e[1],_),E(e[2],_),E(e[3],y);for(var r=255;0<=r;--r){var o=n[r/8|0]>>(7&r)&1;g(e,t,o),p(t,e),p(e,e),g(e,t,o)}}function x(e,t){var n=[v(),v(),v(),v()];E(n[0],o),E(n[1],i),E(n[2],_),R(n[3],o,i),N(e,n,t)}function A(e){if(e.length!==s.SEED_LENGTH)throw new Error("ed25519: seed must be ".concat(s.SEED_LENGTH," bytes"));var t=(0,l.hash)(e),n=(t[0]&=248,t[31]&=127,t[31]|=64,new Uint8Array(32)),r=[v(),v(),v(),v()],t=(x(r,t),k(n,r),new Uint8Array(64));return t.set(e),t.set(n,32),{publicKey:n,secretKey:t}}s.generateKeyPairFromSeed=A,s.generateKeyPair=function(e){var e=(0,n.randomBytes)(32,e),t=A(e);return(0,r.wipe)(e),t},s.extractPublicKeyFromSecretKey=function(e){if(e.length!==s.SECRET_KEY_LENGTH)throw new Error("ed25519: secret key must be ".concat(s.SECRET_KEY_LENGTH," bytes"));return new Uint8Array(e.subarray(32))};var D=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function P(e,t){for(var n,r,o,i=63;32<=i;--i){for(n=0,r=i-32,o=i-12;r<o;++r)t[r]+=n-16*t[i]*D[r-(i-32)],n=Math.floor((t[r]+128)/256),t[r]-=256*n;t[r]+=n,t[i]=0}for(r=n=0;r<32;r++)t[r]+=n-(t[31]>>4)*D[r],n=t[r]>>8,t[r]&=255;for(r=0;r<32;r++)t[r]-=n*D[r];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,e[i]=255&t[i]}function I(e){for(var t=new Float64Array(64),n=0;n<64;n++)t[n]=e[n];for(var r=0;r<64;r++)e[r]=0;P(e,t)}function B(e,t){for(var n=v(),r=v(),o=v(),i=v(),a=v(),s=v(),c=v(),u=(E(e[2],_),e[1]),f=t,h=0;h<16;h++)u[h]=f[2*h]+(f[2*h+1]<<8);u[15]&=32767,T(o,e[1]),R(i,o,b),S(o,o,e[2]),C(i,e[2],i),T(a,i),T(s,a),R(c,s,a),R(n,c,o),R(n,n,i);for(var l=n,d=n,p=v(),g=0;g<16;g++)p[g]=d[g];for(g=250;0<=g;g--)T(p,p),1!==g&&R(p,p,d);for(g=0;g<16;g++)l[g]=p[g];return R(n,n,o),R(n,n,i),R(n,n,i),R(e[0],n,i),T(r,e[0]),R(r,r,i),m(r,o)&&R(e[0],e[0],w),T(r,e[0]),R(r,r,i),m(r,o)?-1:(O(e[0])===t[31]>>7&&S(e[0],y,e[0]),R(e[3],e[0],e[1]),0)}s.sign=function(e,t){var n=new Float64Array(64),r=[v(),v(),v(),v()],o=(0,l.hash)(e.subarray(0,32)),i=(o[0]&=248,o[31]&=127,o[31]|=64,new Uint8Array(64)),a=(i.set(o.subarray(32),32),new l.SHA512),s=(a.update(i.subarray(32)),a.update(t),a.digest()),c=(a.clean(),I(s),x(r,s),k(i,r),a.reset(),a.update(i.subarray(0,32)),a.update(e.subarray(32)),a.update(t),a.digest());I(c);for(var u=0;u<32;u++)n[u]=s[u];for(var f=0;f<32;f++)for(var h=0;h<32;h++)n[f+h]+=c[f]*o[h];return P(i.subarray(32),n),i},s.verify=function(e,t,n){var r,o=new Uint8Array(32),i=[v(),v(),v(),v()],a=[v(),v(),v(),v()];if(n.length!==s.SIGNATURE_LENGTH)throw new Error("ed25519: signature must be ".concat(s.SIGNATURE_LENGTH," bytes"));return!B(a,e)&&((r=new l.SHA512).update(n.subarray(0,32)),r.update(e),r.update(t),I(e=r.digest()),N(i,a,e),x(a,n.subarray(32)),p(i,a),k(o,i),!c(n,o))},s.convertPublicKeyToX25519=function(e){var t=[v(),v(),v(),v()];if(B(t,e))throw new Error("Ed25519: invalid public key");var e=v(),n=v(),t=t[1],t=(C(e,_,t),S(n,_,t),d(n,n),R(e,e,n),new Uint8Array(32));return a(t,e),t},s.convertSecretKeyToX25519=function(e){var e=(0,l.hash)(e.subarray(0,32)),t=(e[0]&=248,e[31]&=127,e[31]|=64,new Uint8Array(e.subarray(0,32)));return(0,r.wipe)(e),t}},4512:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.mul=Math.imul||function(e,t){var n=65535&e,r=65535&t;return n*r+((e>>>16&65535)*r+n*(t>>>16&65535)<<16>>>0)|0},t.add=function(e,t){return e+t|0},t.sub=function(e,t){return e-t|0},t.rotl=function(e,t){return e<<t|e>>>32-t},t.rotr=function(e,t){return e<<32-t|e>>>t},t.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},t.MAX_SAFE_INTEGER=9007199254740991,t.isSafeInteger=function(e){return t.isInteger(e)&&e>=-t.MAX_SAFE_INTEGER&&e<=t.MAX_SAFE_INTEGER}},7052:function(e,u,t){Object.defineProperty(u,"__esModule",{value:!0}),u.randomStringForEntropy=u.randomString=u.randomUint32=u.randomBytes=u.defaultRandomSource=void 0;var n=t(5492),r=t(972),f=t(6228);function h(e){return(1<arguments.length&&void 0!==arguments[1]?arguments[1]:u.defaultRandomSource).randomBytes(e)}u.defaultRandomSource=new n.SystemRandomSource,u.randomBytes=h,u.randomUint32=function(){var e=h(4,0<arguments.length&&void 0!==arguments[0]?arguments[0]:u.defaultRandomSource),t=(0,r.readUint32LE)(e);return(0,f.wipe)(e),t};var l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:u.defaultRandomSource;if(t.length<2)throw new Error("randomString charset is too short");if(256<t.length)throw new Error("randomString charset is too long");for(var r="",o=t.length,i=256-256%o;0<e;){for(var a=h(Math.ceil(256*e/i),n),s=0;s<a.length&&0<e;s++){var c=a[s];c<i&&(r+=t.charAt(c%o),e--)}(0,f.wipe)(a)}return r}u.randomString=o,u.randomStringForEntropy=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:u.defaultRandomSource;return o(Math.ceil(e/(Math.log(t.length)/Math.LN2)),t,n)}},7029:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserRandomSource=void 0,t.BrowserRandomSource=(()=>_createClass(function e(){_classCallCheck(this,e),this.isAvailable=!1,this.isInstantiated=!1;var t="undefined"!=typeof self?self.crypto||self.msCrypto:null;t&&void 0!==t.getRandomValues&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)},[{key:"randomBytes",value:function(e){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");for(var t=new Uint8Array(e),n=0;n<t.length;n+=65536)this._crypto.getRandomValues(t.subarray(n,n+Math.min(t.length-n,65536)));return t}}]))()},5821:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRandomSource=void 0;var o=n(6228);t.NodeRandomSource=(()=>_createClass(function e(){_classCallCheck(this,e),this.isAvailable=!1,this.isInstantiated=!1;var t=n(9432);t&&t.randomBytes&&(this._crypto=t,this.isAvailable=!0,this.isInstantiated=!0)},[{key:"randomBytes",value:function(e){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");var t=this._crypto.randomBytes(e);if(t.length!==e)throw new Error("NodeRandomSource: got fewer bytes than requested");for(var n=new Uint8Array(e),r=0;r<n.length;r++)n[r]=t[r];return(0,o.wipe)(t),n}}]))()},5492:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SystemRandomSource=void 0;var r=n(7029),o=n(5821);t.SystemRandomSource=(()=>_createClass(function e(){return _classCallCheck(this,e),this.isAvailable=!1,this.name="",this._source=new r.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new o.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)},[{key:"randomBytes",value:function(e){if(this.isAvailable)return this._source.randomBytes(e);throw new Error("System random byte generator is not available.")}}]))()},204:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var y=n(972),r=n(6228),o=(t.DIGEST_LENGTH=32,t.BLOCK_SIZE=64,i.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},i.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},i.prototype.clean=function(){r.wipe(this._buffer),r.wipe(this._temp),this.reset()},i.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,0<this._bufferLength){for(;this._bufferLength<this.blockSize&&0<t;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(s(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=s(this._temp,this._state,e,n,t),t%=this.blockSize);0<t;)this._buffer[this._bufferLength++]=e[n++],t--;return this},i.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,n=this._bufferLength,r=t/536870912|0,o=t<<3,i=t%64<56?64:128;this._buffer[n]=128;for(var a=n+1;a<i-8;a++)this._buffer[a]=0;y.writeUint32BE(r,this._buffer,i-8),y.writeUint32BE(o,this._buffer,i-4),s(this._temp,this._state,this._buffer,0,i),this._finished=!0}for(a=0;a<this.digestLength/4;a++)y.writeUint32BE(this._state[a],e,4*a);return this},i.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},i.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{state:new Int32Array(this._state),buffer:0<this._bufferLength?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},i.prototype.restoreState=function(e){return this._state.set(e.state),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},i.prototype.cleanSavedState=function(e){r.wipe(e.state),e.buffer&&r.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},i);function i(){this.digestLength=t.DIGEST_LENGTH,this.blockSize=t.BLOCK_SIZE,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}t.SHA256=o;var _=new Int32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function s(e,t,n,r,o){for(;64<=o;){for(var i=t[0],a=t[1],s=t[2],c=t[3],u=t[4],f=t[5],h=t[6],l=t[7],d=0;d<16;d++)e[d]=y.readUint32BE(n,r+4*d);for(d=16;d<64;d++){var p=e[d-2],g=(p>>>17|p<<15)^(p>>>19|p<<13)^p>>>10,v=((p=e[d-15])>>>7|p<<25)^(p>>>18|p<<14)^p>>>3;e[d]=(g+e[d-7]|0)+(v+e[d-16]|0)}for(d=0;d<64;d++)g=(((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&f^~u&h)|0)+(l+(_[d]+e[d]|0)|0)|0,v=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&a^i&s^a&s)|0,l=h,h=f,f=u,u=c+g|0,c=s,s=a,a=i,i=g+v|0;t[0]+=i,t[1]+=a,t[2]+=s,t[3]+=c,t[4]+=u,t[5]+=f,t[6]+=h,t[7]+=l,r+=64,o-=64}return r}t.hash=function(e){var t=new o,e=(t.update(e),t.digest());return t.clean(),e}},4974:function(e,r,t){Object.defineProperty(r,"__esModule",{value:!0});var V=t(972),n=t(6228),o=(r.DIGEST_LENGTH=64,r.BLOCK_SIZE=128,i.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},i.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},i.prototype.clean=function(){n.wipe(this._buffer),n.wipe(this._tempHi),n.wipe(this._tempLo),this.reset()},i.prototype.update=function(e,t){if(void 0===t&&(t=e.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var n=0;if(this._bytesHashed+=t,0<this._bufferLength){for(;this._bufferLength<r.BLOCK_SIZE&&0<t;)this._buffer[this._bufferLength++]=e[n++],t--;this._bufferLength===this.blockSize&&(s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(t>=this.blockSize&&(n=s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,e,n,t),t%=this.blockSize);0<t;)this._buffer[this._bufferLength++]=e[n++],t--;return this},i.prototype.finish=function(e){if(!this._finished){var t=this._bytesHashed,n=this._bufferLength,r=t/536870912|0,o=t<<3,i=t%128<112?128:256;this._buffer[n]=128;for(var a=n+1;a<i-8;a++)this._buffer[a]=0;V.writeUint32BE(r,this._buffer,i-8),V.writeUint32BE(o,this._buffer,i-4),s(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,i),this._finished=!0}for(a=0;a<this.digestLength/8;a++)V.writeUint32BE(this._stateHi[a],e,8*a),V.writeUint32BE(this._stateLo[a],e,8*a+4);return this},i.prototype.digest=function(){var e=new Uint8Array(this.digestLength);return this.finish(e),e},i.prototype.saveState=function(){if(this._finished)throw new Error("SHA256: cannot save finished state");return{stateHi:new Int32Array(this._stateHi),stateLo:new Int32Array(this._stateLo),buffer:0<this._bufferLength?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},i.prototype.restoreState=function(e){return this._stateHi.set(e.stateHi),this._stateLo.set(e.stateLo),this._bufferLength=e.bufferLength,e.buffer&&this._buffer.set(e.buffer),this._bytesHashed=e.bytesHashed,this._finished=!1,this},i.prototype.cleanSavedState=function(e){n.wipe(e.stateHi),n.wipe(e.stateLo),e.buffer&&n.wipe(e.buffer),e.bufferLength=0,e.bytesHashed=0},i);function i(){this.digestLength=r.DIGEST_LENGTH,this.blockSize=r.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}r.SHA512=o;var q=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function s(e,t,n,r,o,i,a){for(var s,c,u,f,h=n[0],l=n[1],d=n[2],p=n[3],g=n[4],v=n[5],y=n[6],_=n[7],b=r[0],w=r[1],E=r[2],m=r[3],O=r[4],C=r[5],S=r[6],R=r[7];128<=a;){for(var T=0;T<16;T++){var k=8*T+i;e[T]=V.readUint32BE(o,k),t[T]=V.readUint32BE(o,k+4)}for(T=0;T<80;T++){var N,x,A=h,L=l,M=d,U=p,K=g,H=v,j=y,W=b,X=w,F=E,z=m,G=O,J=C,Y=S,D=65535&(c=R),P=c>>>16,I=65535&(s=_),B=s>>>16;if(D+=65535&(c=(O>>>14|g<<18)^(O>>>18|g<<14)^(g>>>9|O<<23)),P+=c>>>16,I+=65535&(s=(g>>>14|O<<18)^(g>>>18|O<<14)^(O>>>9|g<<23)),B+=s>>>16,D+=65535&(c=O&C^~O&S),P+=c>>>16,I+=65535&(s=g&v^~g&y),B+=s>>>16,s=q[2*T],D+=65535&(c=q[2*T+1]),P+=c>>>16,B+=s>>>16,I=(I+=65535&s)+(65535&(s=e[T%16]))+((P=P+((c=t[T%16])>>>16)+((D+=65535&c)>>>16))>>>16),D=65535&(c=f=65535&D|P<<16),P=c>>>16,I=65535&(s=u=65535&I|(B=B+(s>>>16)+(I>>>16))<<16),B=s>>>16,D+=65535&(c=(b>>>28|h<<4)^(h>>>2|b<<30)^(h>>>7|b<<25)),I+=65535&(s=(h>>>28|b<<4)^(b>>>2|h<<30)^(b>>>7|h<<25)),B+=s>>>16,N=65535&(I=I+(65535&(s=h&l^h&d^l&d))+((P=(P+=c>>>16)+((c=b&w^b&E^w&E)>>>16)+((D+=65535&c)>>>16))>>>16))|(B=B+(s>>>16)+(I>>>16))<<16,x=65535&D|P<<16,D=65535&(c=z),I=65535&(s=U),B=s>>>16,l=A,d=L,p=M,g=65535&(I=I+(65535&(s=u))+((P=(P=c>>>16)+((c=f)>>>16)+((D+=65535&c)>>>16))>>>16))|(B=B+(s>>>16)+(I>>>16))<<16,v=K,y=H,_=j,h=N,w=W,E=X,m=F,O=65535&D|P<<16,C=G,S=J,R=Y,b=x,T%16==15)for(k=0;k<16;k++)s=e[k],D=65535&(c=t[k]),P=c>>>16,I=65535&s,B=s>>>16,D+=65535&(c=t[(k+9)%16]),P+=c>>>16,I+=65535&(s=e[(k+9)%16]),B+=s>>>16,D+=65535&(c=((f=t[(k+1)%16])>>>1|(u=e[(k+1)%16])<<31)^(f>>>8|u<<24)^(f>>>7|u<<25)),I+=65535&(s=(u>>>1|f<<31)^(u>>>8|f<<24)^u>>>7),B+=s>>>16,P=(P+=c>>>16)+((c=((f=t[(k+14)%16])>>>19|(u=e[(k+14)%16])<<13)^(u>>>29|f<<3)^(f>>>6|u<<26))>>>16),I+=65535&(s=(u>>>19|f<<13)^(f>>>29|u<<3)^u>>>6),B=B+(s>>>16)+((I+=(P+=(D+=65535&c)>>>16)>>>16)>>>16),e[k]=65535&I|B<<16,t[k]=65535&D|P<<16}D=65535&(c=b),I=65535&(s=h),B=(B=s>>>16)+((s=n[0])>>>16)+((I=I+(65535&s)+((P=(P=c>>>16)+((c=r[0])>>>16)+((D+=65535&c)>>>16))>>>16))>>>16),n[0]=h=65535&I|B<<16,r[0]=b=65535&D|P<<16,D=65535&(c=w),I=65535&(s=l),B=(B=s>>>16)+((s=n[1])>>>16)+((I=I+(65535&s)+((P=(P=c>>>16)+((c=r[1])>>>16)+((D+=65535&c)>>>16))>>>16))>>>16),n[1]=l=65535&I|B<<16,r[1]=w=65535&D|P<<16,D=65535&(c=E),I=65535&(s=d),B=(B=s>>>16)+((s=n[2])>>>16)+((I=I+(65535&s)+((P=(P=c>>>16)+((c=r[2])>>>16)+((D+=65535&c)>>>16))>>>16))>>>16),n[2]=d=65535&I|B<<16,r[2]=E=65535&D|P<<16,D=65535&(c=m),I=65535&(s=p),B=(B=s>>>16)+((s=n[3])>>>16)+((I=I+(65535&s)+((P=(P=c>>>16)+((c=r[3])>>>16)+((D+=65535&c)>>>16))>>>16))>>>16),n[3]=p=65535&I|B<<16,r[3]=m=65535&D|P<<16,D=65535&(c=O),I=65535&(s=g),B=(B=s>>>16)+((s=n[4])>>>16)+((I=I+(65535&s)+((P=(P=c>>>16)+((c=r[4])>>>16)+((D+=65535&c)>>>16))>>>16))>>>16),n[4]=g=65535&I|B<<16,r[4]=O=65535&D|P<<16,D=65535&(c=C),I=65535&(s=v),B=(B=s>>>16)+((s=n[5])>>>16)+((I=I+(65535&s)+((P=(P=c>>>16)+((c=r[5])>>>16)+((D+=65535&c)>>>16))>>>16))>>>16),n[5]=v=65535&I|B<<16,r[5]=C=65535&D|P<<16,D=65535&(c=S),I=65535&(s=y),B=(B=s>>>16)+((s=n[6])>>>16)+((I=I+(65535&s)+((P=(P=c>>>16)+((c=r[6])>>>16)+((D+=65535&c)>>>16))>>>16))>>>16),n[6]=y=65535&I|B<<16,r[6]=S=65535&D|P<<16,D=65535&(c=R),I=65535&(s=_),B=(B=s>>>16)+((s=n[7])>>>16)+((I=I+(65535&s)+((P=(P=c>>>16)+((c=r[7])>>>16)+((D+=65535&c)>>>16))>>>16))>>>16),n[7]=_=65535&I|B<<16,r[7]=R=65535&D|P<<16,i+=128,a-=128}return i}r.hash=function(e){var t=new o,e=(t.update(e),t.digest());return t.clean(),e}},6228:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.wipe=function(e){for(var t=0;t<e.length;t++)e[t]=0;return e}},7526:function(e,t){t.byteLength=function(e){var e=f(e),t=e[0],e=e[1];return 3*(t+e)/4-e},t.toByteArray=function(e){for(var t,n=f(e),r=n[0],n=n[1],o=new u(3*(r+n)/4-n),i=0,a=0<n?r-4:r,s=0;s<a;s+=4)t=c[e.charCodeAt(s)]<<18|c[e.charCodeAt(s+1)]<<12|c[e.charCodeAt(s+2)]<<6|c[e.charCodeAt(s+3)],o[i++]=t>>16&255,o[i++]=t>>8&255,o[i++]=255&t;return 2===n&&(t=c[e.charCodeAt(s)]<<2|c[e.charCodeAt(s+1)]>>4,o[i++]=255&t),1===n&&(t=c[e.charCodeAt(s)]<<10|c[e.charCodeAt(s+1)]<<4|c[e.charCodeAt(s+2)]>>2,o[i++]=t>>8&255,o[i++]=255&t),o},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,o=[],i=0,a=n-r;i<a;i+=16383)o.push(((e,t,n)=>{for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(s[(r=r)>>18&63]+s[r>>12&63]+s[r>>6&63]+s[63&r]);return o.join("")})(e,i,a<i+16383?a:i+16383));return 1==r?(t=e[n-1],o.push(s[t>>2]+s[t<<4&63]+"==")):2==r&&(t=(e[n-2]<<8)+e[n-1],o.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"=")),o.join("")};for(var s=[],c=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=0;r<64;++r)s[r]=n[r],c[n.charCodeAt(r)]=r;function f(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");e=e.indexOf("=");return[e=-1===e?t:e,e===t?0:4-e%4]}c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63},8287:function(e,n,t){var C=t(7526),i=t(251),t="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,r=(n.Buffer=h,n.SlowBuffer=function(e){return h.alloc(+(e=+e!=e?0:e))},n.INSPECT_MAX_BYTES=50,2147483647);function u(e){if(r<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,h.prototype),e}function h(e,t,n){if("number"!=typeof e)return o(e,t,n);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}function o(e,t,n){if("string"==typeof e){var r=e,o=t;if(h.isEncoding(o="string"==typeof o&&""!==o?o:"utf8"))return(r=(a=u(i=0|p(r,o))).write(r,o))!==i?a.slice(0,r):a;throw new TypeError("Unknown encoding: "+o)}if(ArrayBuffer.isView(e))return D(i=e,Uint8Array)?l((r=new Uint8Array(i)).buffer,r.byteOffset,r.byteLength):f(i);var i;if(null!=e){if(D(e,ArrayBuffer)||e&&D(e.buffer,ArrayBuffer))return l(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(D(e,SharedArrayBuffer)||e&&D(e.buffer,SharedArrayBuffer)))return l(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var a=e.valueOf&&e.valueOf();if(null!=a&&a!==e)return h.from(a,t,n);var s,c=h.isBuffer(o=e)?(0!==(s=u(c=0|d(o.length))).length&&o.copy(s,0,0,c),s):void 0!==o.length?"number"!=typeof o.length||P(o.length)?u(0):f(o):"Buffer"===o.type&&Array.isArray(o.data)?f(o.data):void 0;if(c)return c;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return h.from(e[Symbol.toPrimitive]("string"),t,n)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+_typeof(e))}function a(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return a(e),u(e<0?0:0|d(e))}function f(e){for(var t=e.length<0?0:0|d(e.length),n=u(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function l(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');e=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n);return Object.setPrototypeOf(e,h.prototype),e}function d(e){if(r<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function p(e,t){if(h.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||D(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+_typeof(e));var n=e.length,r=2<arguments.length&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return x(e).length;default:if(o)return r?-1:N(e).length;t=(""+t).toLowerCase(),o=!0}}function c(e,t,n){var r,o=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var i=this,a=t,s=n,c=i.length;(!s||s<0||c<s)&&(s=c);for(var u="",f=a=!a||a<0?0:a;f<s;++f)u+=I[i[f]];return u;case"utf8":case"utf-8":return S(this,t,n);case"ascii":var h=this,c=t,l=n,d="";l=Math.min(h.length,l);for(var p=c;p<l;++p)d+=String.fromCharCode(127&h[p]);return d;case"latin1":case"binary":var g=this,a=t,v=n,y="";v=Math.min(g.length,v);for(var _=a;_<v;++_)y+=String.fromCharCode(g[_]);return y;case"base64":return b=this,r=n,0===(w=t)&&r===b.length?C.fromByteArray(b):C.fromByteArray(b.slice(w,r));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":for(var b=t,w=n,E=this.slice(b,w),m="",O=0;O<E.length-1;O+=2)m+=String.fromCharCode(E[O]+256*E[O+1]);return m;default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),(n=P(n=+n)?o?0:e.length-1:n)<0&&(n=e.length+n),e.length<=n){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=h.from(t,r)),h.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):y(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,o){var i=1,a=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a/=i=2,s/=2,n/=2}function c(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o)for(var u=-1,f=n;f<a;f++)if(c(e,f)===c(t,-1===u?0:f-u)){if(f-(u=-1===u?f:u)+1===s)return u*i}else-1!==u&&(f-=f-u),u=-1;else for(f=n=a<n+s?a-s:n;0<=f;f--){for(var h=!0,l=0;l<s;l++)if(c(e,f+l)!==c(t,l)){h=!1;break}if(h)return f}return-1}function _(e,t,n,r){return A((e=>{for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t})(t),e,n,r)}function b(e,t,n,r){return A(((e,t)=>{for(var n,r,o=[],i=0;i<e.length&&!((t-=2)<0);++i)r=(n=e.charCodeAt(i))>>8,o.push(n%256),o.push(r);return o})(t,e.length-n),e,n,r)}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,c,u=e[o],f=null,h=239<u?4:223<u?3:191<u?2:1;if(o+h<=n)switch(h){case 1:u<128&&(f=u);break;case 2:128==(192&(i=e[o+1]))&&127<(c=(31&u)<<6|63&i)&&(f=c);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&2047<(c=(15&u)<<12|(63&i)<<6|63&a)&&(c<55296||57343<c)&&(f=c);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&65535<(c=(15&u)<<18|(63&i)<<12|(63&a)<<6|63&s)&&c<1114112&&(f=c)}null===f?(f=65533,h=1):65535<f&&(r.push((f-=65536)>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=h}var l=r,d=l.length;if(d<=w)return String.fromCharCode.apply(String,l);for(var p="",g=0;g<d;)p+=String.fromCharCode.apply(String,l.slice(g,g+=w));return p}n.kMaxLength=r,(h.TYPED_ARRAY_SUPPORT=(()=>{try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}})())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=o,Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(e,t,n){return t=t,n=n,a(e=e),!(e<=0)&&void 0!==t?"string"==typeof n?u(e).fill(t,n):u(e).fill(t):u(e)},h.allocUnsafe=s,h.allocUnsafeSlow=s,h.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==h.prototype},h.compare=function(e,t){if(D(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),D(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(e)||!h.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},h.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);if(void 0===t)for(o=t=0;o<e.length;++o)t+=e[o].length;for(var n=h.allocUnsafe(t),r=0,o=0;o<e.length;++o){var i=e[o];if(D(i,Uint8Array))r+i.length>n.length?h.from(i).copy(n,r):Uint8Array.prototype.set.call(n,i,r);else{if(!h.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,r)}r+=i.length}return n},h.byteLength=p,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},h.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},h.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},h.prototype.toLocaleString=h.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):c.apply(this,arguments)},h.prototype.equals=function(e){if(h.isBuffer(e))return this===e||0===h.compare(this,e);throw new TypeError("Argument must be a Buffer")},h.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES,e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim();return this.length>t&&(e+=" ... "),"<Buffer "+e+">"},t&&(h.prototype[t]=h.prototype.inspect),h.prototype.compare=function(e,t,n,r,o){if(D(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+_typeof(e));if(void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),(t=void 0===t?0:t)<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(o<=r&&n<=t)return 0;if(o<=r)return-1;if(n<=t)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),c=this.slice(r,o),u=e.slice(t,n),f=0;f<s;++f)if(c[f]!==u[f]){i=c[f],a=u[f];break}return i<a?-1:a<i?1:0},h.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},h.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},h.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},h.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||o<n)&&(n=o),0<e.length&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var i,a,s,c=!1;;)switch(r){case"hex":var u=this,f=e,h=t,l=n,d=(h=Number(h)||0,u.length-h);(!l||(l=Number(l))>d)&&(l=d),(d=f.length)/2<l&&(l=d/2);for(var p=0;p<l;++p){var g=parseInt(f.substr(2*p,2),16);if(P(g))return p;u[h+p]=g}return p;case"utf8":case"utf-8":return d=t,s=n,A(N(e,(a=this).length-d),a,d,s);case"ascii":case"latin1":case"binary":return _(this,e,t,n);case"base64":return a=this,s=t,i=n,A(x(e),a,s,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,e,t,n);default:if(c)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),c=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var w=4096;function E(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(n<e+t)throw new RangeError("Trying to access beyond buffer length")}function m(e,t,n,r,o,i){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<t||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function O(e,t,n,r){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,o){return t=+t,n>>>=0,o||O(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function T(e,t,n,r,o){return t=+t,n>>>=0,o||O(e,0,n,8),i.write(e,t,n,r,52,8),n+8}h.prototype.slice=function(e,t){var n=this.length,n=((e=~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),t<e&&(t=e),this.subarray(e,t));return Object.setPrototypeOf(n,h.prototype),n},h.prototype.readUintLE=h.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},h.prototype.readUintBE=h.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e+--t],o=1;0<t&&(o*=256);)r+=this[e+--t]*o;return r},h.prototype.readUint8=h.prototype.readUInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),this[e]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(e,t){return e>>>=0,t||E(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},h.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||E(e,t,this.length);for(var r=t,o=1,i=this[e+--r];0<r&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},h.prototype.readInt8=function(e,t){return e>>>=0,t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){e>>>=0,t||E(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},h.prototype.readInt16BE=function(e,t){e>>>=0,t||E(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},h.prototype.readInt32LE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return e>>>=0,t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return e>>>=0,t||E(e,4,this.length),i.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return e>>>=0,t||E(e,4,this.length),i.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return e>>>=0,t||E(e,8,this.length),i.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return e>>>=0,t||E(e,8,this.length),i.read(this,e,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||m(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||m(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;0<=--o&&(i*=256);)this[t+o]=e/i&255;return t+n},h.prototype.writeUint8=h.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,1,255,0),this[t]=255&e,t+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeIntLE=function(e,t,n,r){e=+e,t>>>=0,r||m(this,e,t,n,(r=Math.pow(2,8*n-1))-1,-r);var o=0,i=1,a=0;for(this[t]=255&e;++o<n&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},h.prototype.writeIntBE=function(e,t,n,r){e=+e,t>>>=0,r||m(this,e,t,n,(r=Math.pow(2,8*n-1))-1,-r);var o=n-1,i=1,a=0;for(this[t+o]=255&e;0<=--o&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},h.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},h.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},h.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||m(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},h.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},h.prototype.writeDoubleLE=function(e,t,n){return T(this,e,t,!0,n)},h.prototype.writeDoubleBE=function(e,t,n){return T(this,e,t,!1,n)},h.prototype.copy=function(e,t,n,r){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n=n||0,r||0===r||(r=this.length),t>=e.length&&(t=e.length),(r=0<r&&r<n?n:r)===n)return 0;if(0===e.length||0===this.length)return 0;if((t=t||0)<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length);var o=(r=e.length-t<r-n?e.length-t+n:r)-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},h.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!h.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var o;1===e.length&&(o=e.charCodeAt(0),"utf8"===r&&o<128||"latin1"===r)&&(e=o)}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");var i;if(!(n<=t))if(t>>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(i=t;i<n;++i)this[i]=e;else{var a=h.isBuffer(e)?e:h.from(e,r),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var k=/[^+/0-9A-Za-z-_]/g;function N(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if(55295<(n=e.charCodeAt(a))&&n<57344){if(!o){if(56319<n){-1<(t-=3)&&i.push(239,191,189);continue}if(a+1===r){-1<(t-=3)&&i.push(239,191,189);continue}o=n;continue}if(n<56320){-1<(t-=3)&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&-1<(t-=3)&&i.push(239,191,189);if(o=null,n<128){if(--t<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function x(e){return C.toByteArray((e=>{if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e})(e))}function A(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function D(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function P(e){return e!=e}var I=(()=>{for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,o=0;o<16;++o)t[r+o]=e[n]+e[o];return t})()},955:function(e,t,n){var O;e.exports=(O=n(9021),n(754),n(4636),n(9506),n(7165),(()=>{for(var e=O,t=e.lib.BlockCipher,n=e.algo,u=[],r=[],o=[],i=[],a=[],s=[],f=[],h=[],l=[],d=[],c=[],p=0;p<256;p++)c[p]=p<128?p<<1:p<<1^283;for(var g=0,v=0,p=0;p<256;p++){var y=v^v<<1^v<<2^v<<3^v<<4,_=(u[g]=y=y>>>8^255&y^99,c[r[y]=g]),b=c[_],w=c[b],E=257*c[y]^16843008*y;o[g]=E<<24|E>>>8,i[g]=E<<16|E>>>16,a[g]=E<<8|E>>>24,s[g]=E,f[y]=(E=16843009*w^65537*b^257*_^16843008*g)<<24|E>>>8,h[y]=E<<16|E>>>16,l[y]=E<<8|E>>>24,d[y]=E,g?(g=_^c[c[c[w^_]]],v^=c[c[v]]):g=v=1}var m=[0,1,2,4,8,16,32,64,128,27,54],n=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*(1+(this._nRounds=6+n)),o=this._keySchedule=[],i=0;i<r;i++)i<n?o[i]=t[i]:(c=o[i-1],i%n?6<n&&i%n==4&&(c=u[c>>>24]<<24|u[c>>>16&255]<<16|u[c>>>8&255]<<8|u[255&c]):(c=u[(c=c<<8|c>>>24)>>>24]<<24|u[c>>>16&255]<<16|u[c>>>8&255]<<8|u[255&c],c^=m[i/n|0]<<24),o[i]=o[i-n]^c);for(var a=this._invKeySchedule=[],s=0;s<r;s++){var i=r-s,c=s%4?o[i]:o[i-4];a[s]=s<4||i<=4?c:f[u[c>>>24]]^h[u[c>>>16&255]]^l[u[c>>>8&255]]^d[u[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,o,i,a,s,u)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,f,h,l,d,r),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,o,i,a,s){for(var c=this._nRounds,u=e[t]^n[0],f=e[t+1]^n[1],h=e[t+2]^n[2],l=e[t+3]^n[3],d=4,p=1;p<c;p++)var g=r[u>>>24]^o[f>>>16&255]^i[h>>>8&255]^a[255&l]^n[d++],v=r[f>>>24]^o[h>>>16&255]^i[l>>>8&255]^a[255&u]^n[d++],y=r[h>>>24]^o[l>>>16&255]^i[u>>>8&255]^a[255&f]^n[d++],_=r[l>>>24]^o[u>>>16&255]^i[f>>>8&255]^a[255&h]^n[d++],u=g,f=v,h=y,l=_;g=(s[u>>>24]<<24|s[f>>>16&255]<<16|s[h>>>8&255]<<8|s[255&l])^n[d++],v=(s[f>>>24]<<24|s[h>>>16&255]<<16|s[l>>>8&255]<<8|s[255&u])^n[d++],y=(s[h>>>24]<<24|s[l>>>16&255]<<16|s[u>>>8&255]<<8|s[255&f])^n[d++],_=(s[l>>>24]<<24|s[u>>>16&255]<<16|s[f>>>8&255]<<8|s[255&h])^n[d++],e[t]=g,e[t+1]=v,e[t+2]=y,e[t+3]=_},keySize:8});e.AES=t._createHelper(n)})(),O.AES)},3128:function(e,t,n){var r,g,v,y,_,o;function s(e,t){var n=e.sbox[0][t>>24&255]+e.sbox[1][t>>16&255];return(n^=e.sbox[2][t>>8&255])+e.sbox[3][255&t]}function b(e,t,n){for(var r,o=t,i=n,a=0;a<g;++a)r=o^=e.pbox[a],o=i=s(e,o)^i,i=r;return r=o,o=i,i=r,i^=e.pbox[g],{left:o^=e.pbox[g+1],right:i}}e.exports=(e=n(9021),n(754),n(4636),n(9506),n(7165),r=(n=e).lib.BlockCipher,g=16,v=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],y=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]],_={pbox:[],sbox:[]},o=n.algo.Blowfish=r.extend({_doReset:function(){if(this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=_,r=t,o=e.sigBytes/4,i=0;i<4;i++){n.sbox[i]=[];for(var a=0;a<256;a++)n.sbox[i][a]=y[i][a]}for(var s=0,c=0;c<g+2;c++)n.pbox[c]=v[c]^r[s],o<=++s&&(s=0);for(var u=0,f=0,h=0,l=0;l<g+2;l+=2)u=(h=b(n,u,f)).left,f=h.right,n.pbox[l]=u,n.pbox[l+1]=f;for(var d=0;d<4;d++)for(var p=0;p<256;p+=2)u=(h=b(n,u,f)).left,f=h.right,n.sbox[d][p]=u,n.sbox[d][p+1]=f}},encryptBlock:function(e,t){var n=b(_,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},decryptBlock:function(e,t){var n=((e,t,n)=>{for(var r,o=t,i=n,a=g+1;1<a;--a)r=o^=e.pbox[a],o=i=s(e,o)^i,i=r;return r=o,o=i,i=r,i^=e.pbox[1],{left:o^=e.pbox[0],right:i}})(_,e[t],e[t+1]);e[t]=n.left,e[t+1]=n.right},blockSize:2,keySize:4,ivSize:2}),n.Blowfish=r._createHelper(o),e.Blowfish)},7165:function(e,t,n){var r,a,o,i,s,c,u,f,h,l,d;function p(e,t,n){var r,o=this._iv;o?(r=o,this._iv=void 0):r=this._prevBlock;for(var i=0;i<n;i++)e[t+i]^=r[i]}function g(e){return"string"==typeof e?d:l}e.exports=(e=n(9021),n(9506),void(e.lib.Cipher||(e=(n=e).lib,r=e.Base,a=e.WordArray,o=e.BufferedBlockAlgorithm,(i=n.enc).Utf8,s=i.Base64,c=n.algo.EvpKDF,u=e.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(r){return{encrypt:function(e,t,n){return g(t).encrypt(r,e,t,n)},decrypt:function(e,t,n){return g(t).decrypt(r,e,t,n)}}}}),e.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),i=n.mode={},f=e.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),f=i.CBC=((i=f.extend()).Encryptor=i.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;p.call(this,e,t,r),n.encryptBlock(e,t),this._prevBlock=e.slice(t,t+r)}}),i.Decryptor=i.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,o=e.slice(t,t+r);n.decryptBlock(e,t),p.call(this,e,t,r),this._prevBlock=o}}),i),i=(n.pad={}).Pkcs7={pad:function(e,t){for(var t=4*t,n=t-e.sigBytes%t,r=n<<24|n<<16|n<<8|n,o=[],i=0;i<n;i+=4)o.push(r);t=a.create(o,n);e.concat(t)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.BlockCipher=u.extend({cfg:u.cfg.extend({mode:f,padding:i}),reset:function(){u.reset.call(this);var e,t=this.cfg,n=t.iv,t=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=t.createEncryptor:(e=t.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(t,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),h=e.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),f=(n.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,e=e.salt;return(e?a.create([1398893684,1701076831]).concat(e).concat(t):t).toString(s)},parse:function(e){var t,e=s.parse(e),n=e.words;return 1398893684==n[0]&&1701076831==n[1]&&(t=a.create(n.slice(2,4)),n.splice(0,4),e.sigBytes-=16),h.create({ciphertext:e,salt:t})}},l=e.SerializableCipher=r.extend({cfg:r.extend({format:f}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var o=e.createEncryptor(n,r),t=o.finalize(t),o=o.cfg;return h.create({ciphertext:t,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),i=(n.kdf={}).OpenSSL={execute:function(e,t,n,r,o){r=r||a.random(8),o=(o?c.create({keySize:t+n,hasher:o}):c.create({keySize:t+n})).compute(e,r);e=a.create(o.words.slice(t),4*n);return o.sigBytes=4*t,h.create({key:o,iv:e,salt:r})}},d=e.PasswordBasedCipher=l.extend({cfg:l.cfg.extend({kdf:i}),encrypt:function(e,t,n,r){n=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize,r.salt,r.hasher),r.iv=n.iv,e=l.encrypt.call(this,e,t,n.key,r);return e.mixIn(n),e},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt,r.hasher);return r.iv=n.iv,l.decrypt.call(this,e,t,n.key,r)}}))))},9021:function(e,t,p){e.exports=(u=>{var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),!(r=!(r=!(r="undefined"!=typeof globalThis&&globalThis.crypto?globalThis.crypto:r)&&"undefined"!=typeof window&&window.msCrypto?window.msCrypto:r)&&void 0!==p.g&&p.g.crypto?p.g.crypto:r))try{r=p(477)}catch(u){}var n=Object.create||function(e){return d.prototype=e,e=new d,d.prototype=null,e},e={},t=e.lib={},o=t.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},f=t.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||a).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;t[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var s=0;s<o;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=u.ceil(t/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push((()=>{if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")})());return new f.init(t,e)}}),i=e.enc={},a=i.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new f.init(n,t/2)}},s=i.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new f.init(n,t)}},c=i.Utf8={stringify:function(e){try{return decodeURIComponent(escape(s.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return s.parse(unescape(encodeURIComponent(e)))}},h=t.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new f.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=c.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t,n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,a=o/(4*i),s=(e?u.ceil(a):u.max((0|a)-this._minBufferSize,0))*i,e=u.min(4*s,o);if(s){for(var c=0;c<s;c+=i)this._doProcessBlock(r,c);t=r.splice(0,s),n.sigBytes-=e}return new f.init(t,e)},clone:function(){var e=o.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),l=(t.Hasher=h.extend({cfg:o.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){h.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(n){return function(e,t){return new n.init(t).finalize(e)}},_createHmacHelper:function(n){return function(e,t){return new l.HMAC.init(n,t).finalize(e)}}}),e.algo={});function d(){}return e})(Math)},754:function(e,t,n){var d;e.exports=(e=n(9021),d=e.lib.WordArray,e.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var o=[],i=0;i<n;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<n;s++)o.push(r.charAt(a>>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,n=this._map;if(!(r=this._reverseMap))for(var r=this._reverseMap=[],o=0;o<n.length;o++)r[n.charCodeAt(o)]=o;for(var i,a=n.charAt(64),s=(a&&-1!==(a=e.indexOf(a))&&(t=a),e),c=t,u=r,f=[],h=0,l=0;l<c;l++)l%4&&(i=u[s.charCodeAt(l-1)]<<l%4*2|u[s.charCodeAt(l)]>>>6-l%4*2,f[h>>>2]|=i<<24-h%4*8,h++);return d.create(f,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.enc.Base64)},4725:function(e,t,n){var d;e.exports=(e=n(9021),d=e.lib.WordArray,e.enc.Base64url={stringify:function(e,t){var n=e.words,r=e.sigBytes,o=(t=void 0===t?!0:t)?this._safe_map:this._map;e.clamp();for(var i=[],a=0;a<r;a+=3)for(var s=(n[a>>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,c=0;c<4&&a+.75*c<r;c++)i.push(o.charAt(s>>>6*(3-c)&63));var u=o.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e,t){var n=e.length,r=(t=void 0===t?!0:t)?this._safe_map:this._map;if(!(o=this._reverseMap))for(var o=this._reverseMap=[],i=0;i<r.length;i++)o[r.charCodeAt(i)]=i;for(var a,t=r.charAt(64),s=(t&&-1!==(t=e.indexOf(t))&&(n=t),e),c=n,u=o,f=[],h=0,l=0;l<c;l++)l%4&&(a=u[s.charCodeAt(l-1)]<<l%4*2|u[s.charCodeAt(l)]>>>6-l%4*2,f[h>>>2]|=a<<24-h%4*8,h++);return d.create(f,h)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},e.enc.Base64url)},5503:function(e,t,n){var o;function a(e){return e<<8&4278255360|e>>>8&16711935}e.exports=(e=n(9021),o=e.lib.WordArray,(n=e.enc).Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o+=2){var i=t[o>>>2]>>>16-o%4*8&65535;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>1]|=e.charCodeAt(r)<<16-r%2*16;return o.create(n,2*t)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o+=2){var i=a(t[o>>>2]>>>16-o%4*8&65535);r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>1]|=a(e.charCodeAt(r)<<16-r%2*16);return o.create(n,2*t)}},e.enc.Utf16)},9506:function(e,t,n){var r,f,o,i,a;e.exports=(e=n(9021),n(5471),n(1025),r=(o=(n=e).lib).Base,f=o.WordArray,i=(o=n.algo).MD5,a=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:i,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,o=r.hasher.create(),i=f.create(),a=i.words,s=r.keySize,c=r.iterations;a.length<s;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var u=1;u<c;u++)n=o.finalize(n),o.reset();i.concat(n)}return i.sigBytes=4*s,i}}),n.EvpKDF=function(e,t,n){return a.create(n).compute(e,t)},e.EvpKDF)},25:function(e,t,n){var r,o;e.exports=(e=n(9021),n(7165),r=e.lib.CipherParams,o=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(o)},parse:function(e){e=o.parse(e);return r.create({ciphertext:e})}},e.format.Hex)},1025:function(e,t,n){var s;e.exports=(n=(e=n(9021)).lib.Base,s=e.enc.Utf8,void(e.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));var n=e.blockSize,r=4*n;(t=t.sigBytes>r?e.finalize(t):t).clamp();for(var e=this._oKey=t.clone(),t=this._iKey=t.clone(),o=e.words,i=t.words,a=0;a<n;a++)o[a]^=1549556828,i[a]^=909522486;e.sigBytes=t.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,e=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(e))}})))},1396:function(e,t,n){e.exports=(e=n(9021),n(3240),n(6440),n(5503),n(754),n(4725),n(4636),n(5471),n(3009),n(6308),n(1380),n(9557),n(5953),n(8056),n(1025),n(19),n(9506),n(7165),n(2169),n(6939),n(6372),n(3797),n(8454),n(2073),n(4905),n(482),n(2155),n(8124),n(25),n(955),n(7628),n(7193),n(6298),n(2696),n(3128),e)},6440:function(e,t,n){var o;e.exports=(e=n(9021),"function"==typeof ArrayBuffer&&(n=e.lib.WordArray,o=n.init,(n.init=function(e){if((e=(e=e instanceof ArrayBuffer?new Uint8Array(e):e)instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e)instanceof Uint8Array){for(var t=e.byteLength,n=[],r=0;r<t;r++)n[r>>>2]|=e[r]<<24-r%4*8;o.call(this,n,t)}else o.apply(this,arguments)}).prototype=n),e.lib.WordArray)},4636:function(e,t,n){var i;e.exports=(i=n(9021),(c=>{for(var e=i,t=(r=e.lib).WordArray,n=r.Hasher,r=e.algo,R=[],o=0;o<64;o++)R[o]=4294967296*c.abs(c.sin(o+1))|0;function T(e,t,n,r,o,i,a){e=e+(t&n|~t&r)+o+a;return(e<<i|e>>>32-i)+t}function k(e,t,n,r,o,i,a){e=e+(t&r|n&~r)+o+a;return(e<<i|e>>>32-i)+t}function N(e,t,n,r,o,i,a){e=e+(t^n^r)+o+a;return(e<<i|e>>>32-i)+t}function x(e,t,n,r,o,i,a){e=e+(n^(t|~r))+o+a;return(e<<i|e>>>32-i)+t}r=r.MD5=n.extend({_doReset:function(){this._hash=new t.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,o=e[r];e[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var i=this._hash.words,a=e[t+0],s=e[t+1],c=e[t+2],u=e[t+3],f=e[t+4],h=e[t+5],l=e[t+6],d=e[t+7],p=e[t+8],g=e[t+9],v=e[t+10],y=e[t+11],_=e[t+12],b=e[t+13],w=e[t+14],E=e[t+15],m=T(i[0],S=i[1],C=i[2],O=i[3],a,7,R[0]),O=T(O,m,S,C,s,12,R[1]),C=T(C,O,m,S,c,17,R[2]),S=T(S,C,O,m,u,22,R[3]);m=T(m,S,C,O,f,7,R[4]),O=T(O,m,S,C,h,12,R[5]),C=T(C,O,m,S,l,17,R[6]),S=T(S,C,O,m,d,22,R[7]),m=T(m,S,C,O,p,7,R[8]),O=T(O,m,S,C,g,12,R[9]),C=T(C,O,m,S,v,17,R[10]),S=T(S,C,O,m,y,22,R[11]),m=T(m,S,C,O,_,7,R[12]),O=T(O,m,S,C,b,12,R[13]),C=T(C,O,m,S,w,17,R[14]),m=k(m,S=T(S,C,O,m,E,22,R[15]),C,O,s,5,R[16]),O=k(O,m,S,C,l,9,R[17]),C=k(C,O,m,S,y,14,R[18]),S=k(S,C,O,m,a,20,R[19]),m=k(m,S,C,O,h,5,R[20]),O=k(O,m,S,C,v,9,R[21]),C=k(C,O,m,S,E,14,R[22]),S=k(S,C,O,m,f,20,R[23]),m=k(m,S,C,O,g,5,R[24]),O=k(O,m,S,C,w,9,R[25]),C=k(C,O,m,S,u,14,R[26]),S=k(S,C,O,m,p,20,R[27]),m=k(m,S,C,O,b,5,R[28]),O=k(O,m,S,C,c,9,R[29]),C=k(C,O,m,S,d,14,R[30]),m=N(m,S=k(S,C,O,m,_,20,R[31]),C,O,h,4,R[32]),O=N(O,m,S,C,p,11,R[33]),C=N(C,O,m,S,y,16,R[34]),S=N(S,C,O,m,w,23,R[35]),m=N(m,S,C,O,s,4,R[36]),O=N(O,m,S,C,f,11,R[37]),C=N(C,O,m,S,d,16,R[38]),S=N(S,C,O,m,v,23,R[39]),m=N(m,S,C,O,b,4,R[40]),O=N(O,m,S,C,a,11,R[41]),C=N(C,O,m,S,u,16,R[42]),S=N(S,C,O,m,l,23,R[43]),m=N(m,S,C,O,g,4,R[44]),O=N(O,m,S,C,_,11,R[45]),C=N(C,O,m,S,E,16,R[46]),m=x(m,S=N(S,C,O,m,c,23,R[47]),C,O,a,6,R[48]),O=x(O,m,S,C,d,10,R[49]),C=x(C,O,m,S,w,15,R[50]),S=x(S,C,O,m,h,21,R[51]),m=x(m,S,C,O,_,6,R[52]),O=x(O,m,S,C,u,10,R[53]),C=x(C,O,m,S,v,15,R[54]),S=x(S,C,O,m,s,21,R[55]),m=x(m,S,C,O,p,6,R[56]),O=x(O,m,S,C,E,10,R[57]),C=x(C,O,m,S,l,15,R[58]),S=x(S,C,O,m,b,21,R[59]),m=x(m,S,C,O,f,6,R[60]),O=x(O,m,S,C,y,10,R[61]),C=x(C,O,m,S,c,15,R[62]),S=x(S,C,O,m,g,21,R[63]),i[0]=i[0]+m|0,i[1]=i[1]+S|0,i[2]=i[2]+C|0,i[3]=i[3]+O|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes,o=(t[r>>>5]|=128<<24-r%32,c.floor(n/4294967296));t[15+(64+r>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),t[14+(64+r>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var o=this._hash,i=o.words,a=0;a<4;a++){var s=i[a];i[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return o},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),e.MD5=n._createHelper(r),e.HmacMD5=n._createHmacHelper(r)})(Math),i.MD5)},2169:function(e,t,n){function i(e,t,n,r){var o,i=this._iv;i?(o=i.slice(0),this._iv=void 0):o=this._prevBlock,r.encryptBlock(o,0);for(var a=0;a<n;a++)e[t+a]^=o[a]}e.exports=(e=n(9021),n(7165),e.mode.CFB=((n=e.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize;i.call(this,e,t,r,n),this._prevBlock=e.slice(t,t+r)}}),n.Decryptor=n.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,o=e.slice(t,t+r);i.call(this,e,t,r,n),this._prevBlock=o}}),n),e.mode.CFB)},6372:function(e,t,n){var r;function c(e){var t,n,r;return 255&~(e>>24)?e+=1<<24:(n=e>>8&255,r=255&e,255===(t=e>>16&255)?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e=(e+=t<<16)+(n<<8)+r),e}e.exports=(e=n(9021),n(7165),e.mode.CTRGladman=(n=e.lib.BlockCipherMode.extend(),r=n.Encryptor=n.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,o=this._iv,i=this._counter,a=(o&&(i=this._counter=o.slice(0),this._iv=void 0),0===((o=i)[0]=c(o[0]))&&(o[1]=c(o[1])),i.slice(0));n.encryptBlock(a,0);for(var s=0;s<r;s++)e[t+s]^=a[s]}}),n.Decryptor=r,n),e.mode.CTRGladman)},6939:function(e,t,n){var r;e.exports=(e=n(9021),n(7165),e.mode.CTR=(r=(n=e.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,o=this._iv,i=this._counter,a=(o&&(i=this._counter=o.slice(0),this._iv=void 0),i.slice(0));n.encryptBlock(a,0),i[r-1]=i[r-1]+1|0;for(var s=0;s<r;s++)e[t+s]^=a[s]}}),n.Decryptor=r,n),e.mode.CTR)},8454:function(e,t,n){e.exports=(e=n(9021),n(7165),e.mode.ECB=((n=e.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),n.Decryptor=n.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),n),e.mode.ECB)},3797:function(e,t,n){var r;e.exports=(e=n(9021),n(7165),e.mode.OFB=(r=(n=e.lib.BlockCipherMode.extend()).Encryptor=n.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,o=this._iv,i=this._keystream;o&&(i=this._keystream=o.slice(0),this._iv=void 0),n.encryptBlock(i,0);for(var a=0;a<r;a++)e[t+a]^=i[a]}}),n.Decryptor=r,n),e.mode.OFB)},2073:function(e,t,n){e.exports=(e=n(9021),n(7165),e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,t=4*t,t=t-n%t,n=n+t-1;e.clamp(),e.words[n>>>2]|=t<<24-n%4*8,e.sigBytes+=t},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923)},4905:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.Iso10126={pad:function(e,t){t*=4,t-=e.sigBytes%t;e.concat(r.lib.WordArray.random(t-1)).concat(r.lib.WordArray.create([t<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},482:function(e,t,n){var r;e.exports=(r=n(9021),n(7165),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},8124:function(e,t,n){e.exports=(e=n(9021),n(7165),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding)},2155:function(e,t,n){e.exports=(e=n(9021),n(7165),e.pad.ZeroPadding={pad:function(e,t){t*=4;e.clamp(),e.sigBytes+=t-(e.sigBytes%t||t)},unpad:function(e){for(var t=e.words,n=e.sigBytes-1,n=e.sigBytes-1;0<=n;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e.pad.ZeroPadding)},19:function(e,t,n){var r,y,o,i,_,a;e.exports=(e=n(9021),n(3009),n(1025),r=(o=(n=e).lib).Base,y=o.WordArray,i=(o=n.algo).SHA256,_=o.HMAC,a=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:i,iterations:25e4}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=_.create(n.hasher,e),o=y.create(),i=y.create([1]),a=o.words,s=i.words,c=n.keySize,u=n.iterations;a.length<c;){var f=r.update(t).finalize(i);r.reset();for(var h=f.words,l=h.length,d=f,p=1;p<u;p++){d=r.finalize(d),r.reset();for(var g=d.words,v=0;v<l;v++)h[v]^=g[v]}o.concat(f),s[0]++}return o.sigBytes=4*c,o}}),n.PBKDF2=function(e,t,n){return a.create(n).compute(e,t)},e.PBKDF2)},2696:function(e,t,n){var r,o,a,s,i;function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],o=65535&r,i=r>>>16;s[n]=((o*o>>>17)+o*i>>>15)+i*i^((4294901760&r)*r|0)+((65535&r)*r|0)}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.exports=(e=n(9021),n(754),n(4636),n(9506),n(7165),r=(n=e).lib.StreamCipher,o=[],a=[],s=[],i=n.algo.RabbitLegacy=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]],o=this._b=0;o<4;o++)c.call(this);for(o=0;o<8;o++)r[o]^=n[o+4&7];if(t){var e=t.words,t=e[0],e=e[1],t=16711935&(t<<8|t>>>24)|4278255360&(t<<24|t>>>8),e=16711935&(e<<8|e>>>24)|4278255360&(e<<24|e>>>8),i=t>>>16|4294901760&e,a=e<<16|65535&t;for(r[0]^=t,r[1]^=i,r[2]^=e,r[3]^=a,r[4]^=t,r[5]^=i,r[6]^=e,r[7]^=a,o=0;o<4;o++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)o[r]=16711935&(o[r]<<8|o[r]>>>24)|4278255360&(o[r]<<24|o[r]>>>8),e[t+r]^=o[r]},blockSize:4,ivSize:2}),n.RabbitLegacy=r._createHelper(i),e.RabbitLegacy)},6298:function(e,t,n){var r,o,a,s,i;function c(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],o=65535&r,i=r>>>16;s[n]=((o*o>>>17)+o*i>>>15)+i*i^((4294901760&r)*r|0)+((65535&r)*r|0)}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}e.exports=(e=n(9021),n(754),n(4636),n(9506),n(7165),r=(n=e).lib.StreamCipher,o=[],a=[],s=[],i=n.algo.Rabbit=r.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);for(var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]],n=this._b=0;n<4;n++)c.call(this);for(n=0;n<8;n++)o[n]^=r[n+4&7];if(t){var t=t.words,i=t[0],t=t[1],i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),t=16711935&(t<<8|t>>>24)|4278255360&(t<<24|t>>>8),a=i>>>16|4294901760&t,s=t<<16|65535&i;for(o[0]^=i,o[1]^=a,o[2]^=t,o[3]^=s,o[4]^=i,o[5]^=a,o[6]^=t,o[7]^=s,n=0;n<4;n++)c.call(this)}},_doProcessBlock:function(e,t){var n=this._X;c.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)o[r]=16711935&(o[r]<<8|o[r]>>>24)|4278255360&(o[r]<<24|o[r]>>>8),e[t+r]^=o[r]},blockSize:4,ivSize:2}),n.Rabbit=r._createHelper(i),e.Rabbit)},7193:function(e,t,n){var i;e.exports=(i=n(9021),n(754),n(4636),n(9506),n(7165),(()=>{var e=i,t=e.lib.StreamCipher,n=e.algo,r=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],o=0;o<256;o++)r[o]=o;for(var o=0,i=0;o<256;o++){var a=o%n,a=t[a>>>2]>>>24-a%4*8&255,i=(i+r[o]+a)%256,a=r[o];r[o]=r[i],r[i]=a}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=o.call(this)},keySize:8,ivSize:0});function o(){for(var e=this._S,t=this._i,n=this._j,r=0,o=0;o<4;o++){var n=(n+e[t=(t+1)%256])%256,i=e[t];e[t]=e[n],e[n]=i,r|=e[(e[t]+e[n])%256]<<24-8*o}return this._i=t,this._j=n,r}e.RC4=t._createHelper(r),n=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;0<e;e--)o.call(this)}}),e.RC4Drop=t._createHelper(n)})(),i.RC4)},8056:function(e,t,n){var r,o,i,O,C,S,R,T,k;function N(e,t,n){return e&t|~e&n}function x(e,t,n){return e&n|t&~n}function A(e,t){return e<<t|e>>>32-t}e.exports=(e=n(9021),Math,r=(n=e).lib,o=r.WordArray,i=r.Hasher,r=n.algo,O=o.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),C=o.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),S=o.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),R=o.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),T=o.create([0,1518500249,1859775393,2400959708,2840853838]),k=o.create([1352829926,1548603684,1836072691,2053994217,0]),r=r.RIPEMD160=i.extend({_doReset:function(){this._hash=o.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,o=e[r];e[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}for(var i,a,s,c,u,f,h=this._hash.words,l=T.words,d=k.words,p=O.words,g=C.words,v=S.words,y=R.words,_=i=h[0],b=a=h[1],w=s=h[2],E=c=h[3],m=u=h[4],n=0;n<80;n+=1)f=(f=A(f=(f=i+e[t+p[n]]|0)+(n<16?(a^s^c)+l[0]:n<32?N(a,s,c)+l[1]:n<48?((a|~s)^c)+l[2]:n<64?x(a,s,c)+l[3]:(a^(s|~c))+l[4])|0,v[n]))+u|0,i=u,u=c,c=A(s,10),s=a,a=f,f=(f=A(f=(f=_+e[t+g[n]]|0)+(n<16?(b^(w|~E))+d[0]:n<32?x(b,w,E)+d[1]:n<48?((b|~w)^E)+d[2]:n<64?N(b,w,E)+d[3]:(b^w^E)+d[4])|0,y[n]))+m|0,_=m,m=E,E=A(w,10),w=b,b=f;f=h[1]+s+E|0,h[1]=h[2]+c+m|0,h[2]=h[3]+u+_|0,h[3]=h[4]+i+b|0,h[4]=h[0]+a+w|0,h[0]=f},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(64+r>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var r=this._hash,o=r.words,i=0;i<5;i++){var a=o[i];o[i]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return r},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),n.RIPEMD160=i._createHelper(r),n.HmacRIPEMD160=i._createHmacHelper(r),e.RIPEMD160)},5471:function(e,t,n){var r,o,f,i;e.exports=(i=(n=e=n(9021)).lib,r=i.WordArray,o=i.Hasher,f=[],i=n.algo.SHA1=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],c=0;c<80;c++){c<16?f[c]=0|e[t+c]:(u=f[c-3]^f[c-8]^f[c-14]^f[c-16],f[c]=u<<1|u>>>31);var u=(r<<5|r>>>27)+s+f[c];u+=c<20?1518500249+(o&i|~o&a):c<40?1859775393+(o^i^a):c<60?(o&i|o&a|i&a)-1894007588:(o^i^a)-899497514,s=a,a=i,i=o<<30|o>>>2,o=r,r=u}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(64+r>>>9<<4)]=Math.floor(n/4294967296),t[15+(64+r>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=o._createHelper(i),n.HmacSHA1=o._createHmacHelper(i),e.SHA1)},6308:function(e,t,n){var r,o,i;e.exports=(e=n(9021),n(3009),r=(n=e).lib.WordArray,o=(i=n.algo).SHA256,i=i.SHA224=o.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=4,e}}),n.SHA224=o._createHelper(i),n.HmacSHA224=o._createHmacHelper(i),e.SHA224)},3009:function(e,t,n){var u;e.exports=(u=n(9021),(o=>{var e=u,t=(r=e.lib).WordArray,n=r.Hasher,r=e.algo,i=[],p=[];function a(e){return 4294967296*(e-(0|e))|0}for(var s=2,c=0;c<64;)(e=>{for(var t=o.sqrt(e),n=2;n<=t;n++)if(!(e%n))return;return 1})(s)&&(c<8&&(i[c]=a(o.pow(s,.5))),p[c]=a(o.pow(s,1/3)),c++),s++;var g=[],r=r.SHA256=n.extend({_doReset:function(){this._hash=new t.init(i.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],c=n[5],u=n[6],f=n[7],h=0;h<64;h++){g[h]=h<16?0|e[t+h]:(((l=g[h-15])<<25|l>>>7)^(l<<14|l>>>18)^l>>>3)+g[h-7]+(((l=g[h-2])<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+g[h-16];var l=r&o^r&i^o&i,d=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&u)+p[h]+g[h],f=u,u=c,c=s,s=a+d|0,a=i,i=o,o=r,r=d+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+l)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+u|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(64+r>>>9<<4)]=o.floor(n/4294967296),t[15+(64+r>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA256=n._createHelper(r),e.HmacSHA256=n._createHmacHelper(r)})(Math),u.SHA256)},5953:function(e,t,n){var y;e.exports=(y=n(9021),n(3240),(f=>{for(var e=y,h=(t=e.lib).WordArray,r=t.Hasher,n=e.x64.Word,t=e.algo,R=[],T=[],k=[],o=1,i=0,a=0;a<24;a++){R[o+5*i]=(a+1)*(a+2)/2%64;var s=(2*o+3*i)%5,o=i%5,i=s}for(o=0;o<5;o++)for(i=0;i<5;i++)T[o+5*i]=i+(2*o+3*i)%5*5;for(var c=1,u=0;u<24;u++){for(var l,d=0,p=0,g=0;g<7;g++)1&c&&((l=(1<<g)-1)<32?p^=1<<l:d^=1<<l-32),128&c?c=c<<1^113:c<<=1;k[u]=n.create(d,p)}for(var N=[],v=0;v<25;v++)N[v]=n.create();t=t.SHA3=r.extend({cfg:r.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new n.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,o=0;o<r;o++){var i=e[t+2*o],a=e[t+2*o+1],i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);(m=n[o]).high^=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),m.low^=i}for(var s=0;s<24;s++){for(var c=0;c<5;c++){for(var u=0,f=0,h=0;h<5;h++)u^=(m=n[c+5*h]).high,f^=m.low;var l=N[c];l.high=u,l.low=f}for(c=0;c<5;c++)for(var d=N[(c+4)%5],p=N[(c+1)%5],g=p.high,p=p.low,u=d.high^(g<<1|p>>>31),f=d.low^(p<<1|g>>>31),h=0;h<5;h++)(m=n[c+5*h]).high^=u,m.low^=f;for(var v=1;v<25;v++){var y=(m=n[v]).high,_=m.low,b=R[v],y=(f=b<32?(u=y<<b|_>>>32-b,_<<b|y>>>32-b):(u=_<<b-32|y>>>64-b,y<<b-32|_>>>64-b),N[T[v]]);y.high=u,y.low=f}var w=N[0],E=n[0];for(w.high=E.high,w.low=E.low,c=0;c<5;c++)for(h=0;h<5;h++){var m=n[v=c+5*h],O=N[v],C=N[(c+1)%5+5*h],S=N[(c+2)%5+5*h];m.high=O.high^~C.high&S.high,m.low=O.low^~C.low&S.low}m=n[0],w=k[s];m.high^=w.high,m.low^=w.low}},_doFinalize:function(){var e=this._data,t=e.words,n=(this._nDataBytes,8*e.sigBytes),r=32*this.blockSize;t[n>>>5]|=1<<24-n%32,t[(f.ceil((1+n)/r)*r>>>5)-1]|=128,e.sigBytes=4*t.length,this._process();for(var o=this._state,n=this.cfg.outputLength/8,i=n/8,a=[],s=0;s<i;s++){var c=o[s],u=c.high,c=c.low,u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8);a.push(16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)),a.push(u)}return new h.init(a,n)},clone:function(){for(var e=r.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}}),e.SHA3=r._createHelper(t),e.HmacSHA3=r._createHmacHelper(t)})(Math),y.SHA3)},9557:function(e,t,n){var r,o,i,a;e.exports=(e=n(9021),n(3240),n(1380),a=(n=e).x64,r=a.Word,o=a.WordArray,i=(a=n.algo).SHA512,a=a.SHA384=i.extend({_doReset:function(){this._hash=new o.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=i._createHelper(a),n.HmacSHA384=i._createHmacHelper(a),e.SHA384)},1380:function(e,t,n){var s;e.exports=(s=n(9021),n(3240),(()=>{var e=s,t=e.lib.Hasher,n=(o=e.x64).Word,r=o.WordArray,o=e.algo;function i(){return n.create.apply(n,arguments)}for(var te=[i(1116352408,3609767458),i(1899447441,602891725),i(3049323471,3964484399),i(3921009573,2173295548),i(961987163,4081628472),i(1508970993,3053834265),i(2453635748,2937671579),i(2870763221,3664609560),i(3624381080,2734883394),i(310598401,1164996542),i(607225278,1323610764),i(1426881987,3590304994),i(1925078388,4068182383),i(2162078206,991336113),i(2614888103,633803317),i(3248222580,3479774868),i(3835390401,2666613458),i(4022224774,944711139),i(264347078,2341262773),i(604807628,2007800933),i(770255983,1495990901),i(1249150122,1856431235),i(1555081692,3175218132),i(1996064986,2198950837),i(2554220882,3999719339),i(2821834349,766784016),i(2952996808,2566594879),i(3210313671,3203337956),i(3336571891,1034457026),i(3584528711,2466948901),i(113926993,3758326383),i(338241895,168717936),i(666307205,1188179964),i(773529912,1546045734),i(1294757372,1522805485),i(1396182291,2643833823),i(1695183700,2343527390),i(1986661051,1014477480),i(2177026350,1206759142),i(2456956037,344077627),i(2730485921,1290863460),i(2820302411,3158454273),i(3259730800,3505952657),i(3345764771,106217008),i(3516065817,3606008344),i(3600352804,1432725776),i(4094571909,1467031594),i(275423344,851169720),i(430227734,3100823752),i(506948616,1363258195),i(659060556,3750685593),i(883997877,3785050280),i(958139571,3318307427),i(1322822218,3812723403),i(1537002063,2003034995),i(1747873779,3602036899),i(1955562222,1575990012),i(2024104815,1125592928),i(2227730452,2716904306),i(2361852424,442776044),i(2428436474,593698344),i(2756734187,3733110249),i(3204031479,2999351573),i(3329325298,3815920427),i(3391569614,3928383900),i(3515267271,566280711),i(3940187606,3454069534),i(4118630271,4000239992),i(116418474,1914138554),i(174292421,2731055270),i(289380356,3203993006),i(460393269,320620315),i(685471733,587496836),i(852142971,1086792851),i(1017036298,365543100),i(1126000580,2618297676),i(1288033470,3409855158),i(1501505948,4234509866),i(1607167915,987167468),i(1816402316,1246189591)],ne=[],a=0;a<80;a++)ne[a]=i();o=o.SHA512=t.extend({_doReset:function(){this._hash=new r.init([new n.init(1779033703,4089235720),new n.init(3144134277,2227873595),new n.init(1013904242,4271175723),new n.init(2773480762,1595750129),new n.init(1359893119,2917565137),new n.init(2600822924,725511199),new n.init(528734635,4215389547),new n.init(1541459225,327033209)])},_doProcessBlock:function(L,M){for(var e=this._hash.words,t=e[0],n=e[1],r=e[2],o=e[3],i=e[4],a=e[5],s=e[6],e=e[7],U=t.high,c=t.low,K=n.high,u=n.low,H=r.high,f=r.low,j=o.high,h=o.low,W=i.high,l=i.low,X=a.high,d=a.low,F=s.high,p=s.low,z=e.high,g=e.low,v=U,y=c,_=K,b=u,w=H,E=f,G=j,m=h,O=W,C=l,J=X,S=d,Y=F,R=p,V=z,q=g,T=0;T<80;T++){var k,N,x=ne[T];T<16?(N=x.high=0|L[M+2*T],k=x.low=0|L[M+2*T+1]):(B=(P=ne[T-15]).high,I=(Z=ne[T-2]).high,D=(A=ne[T-7]).high,Q=($=ne[T-16]).high,N=(N=(N=((B>>>1|(P=P.low)<<31)^(B>>>8|P<<24)^B>>>7)+D+((k=(D=(P>>>1|B<<31)^(P>>>8|B<<24)^(P>>>7|B<<25))+A.low)>>>0<D>>>0?1:0))+((I>>>19|(P=Z.low)<<13)^(I<<3|P>>>29)^I>>>6)+((k+=B=(P>>>19|I<<13)^(P<<3|I>>>29)^(P>>>6|I<<26))>>>0<B>>>0?1:0))+Q+((k+=A=$.low)>>>0<A>>>0?1:0),x.high=N,x.low=k);var A,D=O&J^~O&Y,Z=C&S^~C&R,P=v&_^v&w^_&w,I=(y>>>28|v<<4)^(y<<30|v>>>2)^(y<<25|v>>>7),B=te[T],Q=B.high,$=B.low,x=V+((O>>>14|C<<18)^(O>>>18|C<<14)^(O<<23|C>>>9))+((A=q+((C>>>14|O<<18)^(C>>>18|O<<14)^(C<<23|O>>>9)))>>>0<q>>>0?1:0),ee=I+(y&b^y&E^b&E),V=Y,q=R,Y=J,R=S,J=O,S=C,O=G+(x=x+D+((A+=Z)>>>0<Z>>>0?1:0)+Q+((A+=$)>>>0<$>>>0?1:0)+N+((A+=k)>>>0<k>>>0?1:0))+((C=m+A|0)>>>0<m>>>0?1:0)|0,G=w,m=E,w=_,E=b,_=v,b=y,v=x+(((v>>>28|y<<4)^(v<<30|y>>>2)^(v<<25|y>>>7))+P+(ee>>>0<I>>>0?1:0))+((y=A+ee|0)>>>0<A>>>0?1:0)|0}c=t.low=c+y,t.high=U+v+(c>>>0<y>>>0?1:0),u=n.low=u+b,n.high=K+_+(u>>>0<b>>>0?1:0),f=r.low=f+E,r.high=H+w+(f>>>0<E>>>0?1:0),h=o.low=h+m,o.high=j+G+(h>>>0<m>>>0?1:0),l=i.low=l+C,i.high=W+O+(l>>>0<C>>>0?1:0),d=a.low=d+S,a.high=X+J+(d>>>0<S>>>0?1:0),p=s.low=p+R,s.high=F+Y+(p>>>0<R>>>0?1:0),g=e.low=g+q,e.high=z+V+(g>>>0<q>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(128+r>>>10<<5)]=Math.floor(n/4294967296),t[31+(128+r>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32}),e.SHA512=t._createHelper(o),e.HmacSHA512=t._createHmacHelper(o)})(),s.SHA512)},7628:function(e,t,n){var i;e.exports=(i=n(9021),n(754),n(4636),n(9506),n(7165),(()=>{var e=i,r=(t=e.lib).WordArray,t=t.BlockCipher,n=e.algo,u=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],f=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],h=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],o=n.DES=t.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=u[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var o=this._subKeys=[],i=0;i<16;i++){for(var a=o[i]=[],s=h[i],n=0;n<24;n++)a[n/6|0]|=t[(f[n]-1+s)%28]<<31-n%6,a[4+(n/6|0)]|=t[28+(f[n+24]-1+s)%28]<<31-n%6;for(a[0]=a[0]<<1|a[0]>>>31,n=1;n<7;n++)a[n]=a[n]>>>4*(n-1)+3;a[7]=a[7]<<5|a[7]>>>27}var c=this._invSubKeys=[];for(n=0;n<16;n++)c[n]=o[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],p.call(this,4,252645135),p.call(this,16,65535),g.call(this,2,858993459),g.call(this,8,16711935),p.call(this,1,1431655765);for(var r=0;r<16;r++){for(var o=n[r],i=this._lBlock,a=this._rBlock,s=0,c=0;c<8;c++)s|=l[c][((a^o[c])&d[c])>>>0];this._lBlock=a,this._rBlock=i^s}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,p.call(this,1,1431655765),g.call(this,8,16711935),g.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function p(e,t){t=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=t,this._lBlock^=t<<e}function g(e,t){t=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=t,this._rBlock^=t<<e}e.DES=t._createHelper(o),n=n.TripleDES=t.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),e=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=o.createEncryptor(r.create(t)),this._des2=o.createEncryptor(r.create(n)),this._des3=o.createEncryptor(r.create(e))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2}),e.TripleDES=t._createHelper(n)})(),i.TripleDES)},3240:function(e,t,n){var o,i;e.exports=(e=n(9021),n=e.lib,o=n.Base,i=n.WordArray,(n=e.x64={}).Word=o.extend({init:function(e,t){this.high=e,this.low=t}}),n.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var o=e[r];n.push(o.high),n.push(o.low)}return i.create(n,this.sigBytes)},clone:function(){for(var e=o.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),e)},7007:function(e){var t="object"==("undefined"==typeof Reflect?"undefined":_typeof(Reflect))?Reflect:null,c=t&&"function"==typeof t.apply?t.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)},n=t&&"function"==typeof t.ownKeys?t.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)},r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(o,i){return new Promise(function(e,t){function n(e){o.removeListener(i,r),t(e)}function r(){"function"==typeof o.removeListener&&o.removeListener("error",n),e([].slice.call(arguments))}p(o,i,r,{once:!0}),"error"!==i&&"function"==typeof o.on&&p(o,"error",n,{once:!0})})},(o.EventEmitter=o).prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var i=10;function u(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+_typeof(e))}function a(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function s(e,t,n,r){var o,i;return u(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener||n),o=e._events),i=o[t]),void 0===i?(i=o[t]=n,++e._eventsCount):("function"==typeof i?i=o[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),0<(o=a(e))&&i.length>o&&!i.warned&&(i.warned=!0,(r=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit")).name="MaxListenersExceededWarning",r.emitter=e,r.type=t,r.count=i.length,console)&&console.warn&&console.warn(r)),e}function f(e,t,n){e={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},t=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(e);return t.listener=n,e.wrapFn=t}function h(e,t,n){e=e._events;if(void 0===e)return[];e=e[t];{if(void 0===e)return[];if("function"==typeof e)return n?[e.listener||e]:[e];if(n){for(var r=e,o=new Array(r.length),i=0;i<o.length;++i)o[i]=r[i].listener||r[i];return o}return d(e,e.length)}}function l(e){var t=this._events;if(void 0!==t){t=t[e];if("function"==typeof t)return 1;if(void 0!==t)return t.length}return 0}function d(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function p(n,r,o,i){if("function"==typeof n.on)i.once?n.once(r,o):n.on(r,o);else{if("function"!=typeof n.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+_typeof(n));n.addEventListener(r,function e(t){i.once&&n.removeEventListener(r,e),o(t)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return a(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){if((i=0<t.length?t[0]:i)instanceof Error)throw i;r=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw r.context=i,r}var i=o[e];if(void 0===i)return!1;if("function"==typeof i)c(i,this,t);else for(var a=i.length,s=d(i,a),n=0;n<a;++n)c(s[n],this,t);return!0},o.prototype.on=o.prototype.addListener=function(e,t){return s(this,e,t,!1)},o.prototype.prependListener=function(e,t){return s(this,e,t,!0)},o.prototype.once=function(e,t){return u(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return u(t),this.prependListener(e,f(this,e,t)),this},o.prototype.off=o.prototype.removeListener=function(e,t){var n,r,o,i,a;if(u(t),void 0!==(r=this._events)&&void 0!==(n=r[e]))if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;0<=i;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;if(0===o)n.shift();else{var s=n;var c=o;for(;c+1<s.length;c++)s[c]=s[c+1];s.pop()}1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.removeAllListeners=function(e){var t,n;if(void 0!==(n=this._events))if(void 0===n.removeListener)0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]);else if(0===arguments.length){for(var r,o=Object.keys(n),i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0}else if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;0<=i;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):l.call(e,t)},o.prototype.listenerCount=l,o.prototype.eventNames=function(){return 0<this._eventsCount?n(this._events):[]}},251:function(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,f=-7,h=n?o-1:0,l=n?-1:1,o=e[t+h];for(h+=l,i=o&(1<<-f)-1,o>>=-f,f+=s;0<f;i=256*i+e[t+h],h+=l,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=r;0<f;a=256*a+e[t+h],h+=l,f-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(o?-1:1);a+=Math.pow(2,r),i-=u}return(o?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c=8*i-o-1,u=(1<<c)-1,f=u>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:i-1,d=r?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(r=Math.pow(2,-a))<1&&(a--,r*=2),2<=(t+=1<=a+f?h/r:h*Math.pow(2,1-f))*r&&(a++,r/=2),u<=a+f?(s=0,a=u):1<=a+f?(s=(t*r-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));8<=o;e[n+l]=255&s,l+=d,s/=256,o-=8);for(a=a<<o|s,c+=o;0<c;e[n+l]=255&a,l+=d,a/=256,c-=8);e[n+l-d]|=128*i}},6386:function(e,t,n){var r,i=n(6443).Buffer;n=this,r=function(){var e={};function o(e){if(!/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/.test(e))throw new TypeError("invalid encoding")}return e.decodeUTF8=function(e){if("string"!=typeof e)throw new TypeError("expected string");for(var t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n},e.encodeUTF8=function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return decodeURIComponent(escape(t.join("")))},"undefined"==typeof atob?void 0!==i.from?(e.encodeBase64=function(e){return i.from(e).toString("base64")},e.decodeBase64=function(e){return o(e),new Uint8Array(Array.prototype.slice.call(i.from(e,"base64"),0))}):(e.encodeBase64=function(e){return new i(e).toString("base64")},e.decodeBase64=function(e){return o(e),new Uint8Array(Array.prototype.slice.call(new i(e,"base64"),0))}):(e.encodeBase64=function(e){for(var t=[],n=e.length,r=0;r<n;r++)t.push(String.fromCharCode(e[r]));return btoa(t.join(""))},e.decodeBase64=function(e){o(e);for(var t=atob(e),n=new Uint8Array(t.length),r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}),e},e.exports?e.exports=r():(n.nacl||(n.nacl={}),n.nacl.util=r())},8947:function(e,t,r){function K(e,t,n,r){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=r>>24&255,e[t+5]=r>>16&255,e[t+6]=r>>8&255,e[t+7]=255&r}function o(e,t,n,r,o){for(var i=0,a=0;a<o;a++)i|=e[t+a]^n[r+a];return(1&i-1>>>8)-1}function H(e,t,n,r){return o(e,t,n,r,16)}function _(e,t,n,r){return o(e,t,n,r,32)}function h(e,t,n,r){for(var o,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,f=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,l=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,t=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,y=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,n=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,r=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,_=i,b=a,w=s,E=c,m=u,O=f,C=h,S=l,R=d,T=t,k=p,N=g,x=v,A=y,D=n,P=r,I=0;I<20;I+=2)_^=(o=(x^=(o=(R^=(o=(m^=(o=_+x|0)<<7|o>>>25)+_|0)<<9|o>>>23)+m|0)<<13|o>>>19)+R|0)<<18|o>>>14,O^=(o=(b^=(o=(A^=(o=(T^=(o=O+b|0)<<7|o>>>25)+O|0)<<9|o>>>23)+T|0)<<13|o>>>19)+A|0)<<18|o>>>14,k^=(o=(C^=(o=(w^=(o=(D^=(o=k+C|0)<<7|o>>>25)+k|0)<<9|o>>>23)+D|0)<<13|o>>>19)+w|0)<<18|o>>>14,P^=(o=(N^=(o=(S^=(o=(E^=(o=P+N|0)<<7|o>>>25)+P|0)<<9|o>>>23)+E|0)<<13|o>>>19)+S|0)<<18|o>>>14,_^=(o=(E^=(o=(w^=(o=(b^=(o=_+E|0)<<7|o>>>25)+_|0)<<9|o>>>23)+b|0)<<13|o>>>19)+w|0)<<18|o>>>14,O^=(o=(m^=(o=(S^=(o=(C^=(o=O+m|0)<<7|o>>>25)+O|0)<<9|o>>>23)+C|0)<<13|o>>>19)+S|0)<<18|o>>>14,k^=(o=(T^=(o=(R^=(o=(N^=(o=k+T|0)<<7|o>>>25)+k|0)<<9|o>>>23)+N|0)<<13|o>>>19)+R|0)<<18|o>>>14,P^=(o=(D^=(o=(A^=(o=(x^=(o=P+D|0)<<7|o>>>25)+P|0)<<9|o>>>23)+x|0)<<13|o>>>19)+A|0)<<18|o>>>14;b=b+a|0,w=w+s|0,E=E+c|0,m=m+u|0,O=O+f|0,C=C+h|0,S=S+l|0,R=R+d|0,T=T+t|0,k=k+p|0,N=N+g|0,x=x+v|0,A=A+y|0,D=D+n|0,P=P+r|0,e[0]=(_=_+i|0)>>>0&255,e[1]=_>>>8&255,e[2]=_>>>16&255,e[3]=_>>>24&255,e[4]=b>>>0&255,e[5]=b>>>8&255,e[6]=b>>>16&255,e[7]=b>>>24&255,e[8]=w>>>0&255,e[9]=w>>>8&255,e[10]=w>>>16&255,e[11]=w>>>24&255,e[12]=E>>>0&255,e[13]=E>>>8&255,e[14]=E>>>16&255,e[15]=E>>>24&255,e[16]=m>>>0&255,e[17]=m>>>8&255,e[18]=m>>>16&255,e[19]=m>>>24&255,e[20]=O>>>0&255,e[21]=O>>>8&255,e[22]=O>>>16&255,e[23]=O>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=S>>>0&255,e[29]=S>>>8&255,e[30]=S>>>16&255,e[31]=S>>>24&255,e[32]=R>>>0&255,e[33]=R>>>8&255,e[34]=R>>>16&255,e[35]=R>>>24&255,e[36]=T>>>0&255,e[37]=T>>>8&255,e[38]=T>>>16&255,e[39]=T>>>24&255,e[40]=k>>>0&255,e[41]=k>>>8&255,e[42]=k>>>16&255,e[43]=k>>>24&255,e[44]=N>>>0&255,e[45]=N>>>8&255,e[46]=N>>>16&255,e[47]=N>>>24&255,e[48]=x>>>0&255,e[49]=x>>>8&255,e[50]=x>>>16&255,e[51]=x>>>24&255,e[52]=A>>>0&255,e[53]=A>>>8&255,e[54]=A>>>16&255,e[55]=A>>>24&255,e[56]=D>>>0&255,e[57]=D>>>8&255,e[58]=D>>>16&255,e[59]=D>>>24&255,e[60]=P>>>0&255,e[61]=P>>>8&255,e[62]=P>>>16&255,e[63]=P>>>24&255}function f(e,t,n,r){for(var o,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,f=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,h=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,l=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,g=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,y=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,_=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,b=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,E=0;E<20;E+=2)i^=(o=(y^=(o=(d^=(o=(u^=(o=i+y|0)<<7|o>>>25)+i|0)<<9|o>>>23)+u|0)<<13|o>>>19)+d|0)<<18|o>>>14,f^=(o=(a^=(o=(_^=(o=(p^=(o=f+a|0)<<7|o>>>25)+f|0)<<9|o>>>23)+p|0)<<13|o>>>19)+_|0)<<18|o>>>14,g^=(o=(h^=(o=(s^=(o=(b^=(o=g+h|0)<<7|o>>>25)+g|0)<<9|o>>>23)+b|0)<<13|o>>>19)+s|0)<<18|o>>>14,w^=(o=(v^=(o=(l^=(o=(c^=(o=w+v|0)<<7|o>>>25)+w|0)<<9|o>>>23)+c|0)<<13|o>>>19)+l|0)<<18|o>>>14,i^=(o=(c^=(o=(s^=(o=(a^=(o=i+c|0)<<7|o>>>25)+i|0)<<9|o>>>23)+a|0)<<13|o>>>19)+s|0)<<18|o>>>14,f^=(o=(u^=(o=(l^=(o=(h^=(o=f+u|0)<<7|o>>>25)+f|0)<<9|o>>>23)+h|0)<<13|o>>>19)+l|0)<<18|o>>>14,g^=(o=(p^=(o=(d^=(o=(v^=(o=g+p|0)<<7|o>>>25)+g|0)<<9|o>>>23)+v|0)<<13|o>>>19)+d|0)<<18|o>>>14,w^=(o=(b^=(o=(_^=(o=(y^=(o=w+b|0)<<7|o>>>25)+w|0)<<9|o>>>23)+y|0)<<13|o>>>19)+_|0)<<18|o>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=f>>>0&255,e[5]=f>>>8&255,e[6]=f>>>16&255,e[7]=f>>>24&255,e[8]=g>>>0&255,e[9]=g>>>8&255,e[10]=g>>>16&255,e[11]=g>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=h>>>0&255,e[17]=h>>>8&255,e[18]=h>>>16&255,e[19]=h>>>24&255,e[20]=l>>>0&255,e[21]=l>>>8&255,e[22]=l>>>16&255,e[23]=l>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}function j(e,t,n,r,o,i,a){for(var s,c=new Uint8Array(16),u=new Uint8Array(64),f=0;f<16;f++)c[f]=0;for(f=0;f<8;f++)c[f]=i[f];for(;64<=o;){for(h(u,c,a,B),f=0;f<64;f++)e[t+f]=n[r+f]^u[f];for(s=1,f=8;f<16;f++)s=s+(255&c[f])|0,c[f]=255&s,s>>>=8;o-=64,t+=64,r+=64}if(0<o)for(h(u,c,a,B),f=0;f<o;f++)e[t+f]=n[r+f]^u[f];return 0}function W(e,t,n,r,o){for(var i,a=new Uint8Array(16),s=new Uint8Array(64),c=0;c<16;c++)a[c]=0;for(c=0;c<8;c++)a[c]=r[c];for(;64<=n;){for(h(s,a,o,B),c=0;c<64;c++)e[t+c]=s[c];for(i=1,c=8;c<16;c++)i=i+(255&a[c])|0,a[c]=255&i,i>>>=8;n-=64,t+=64}if(0<n)for(h(s,a,o,B),c=0;c<n;c++)e[t+c]=s[c];return 0}function X(e,t,n,r,o){var i=new Uint8Array(32);f(i,r,o,B);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=r[s+16];return W(e,t,n,a,i)}function s(e,t,n,r,o,i,a){var s=new Uint8Array(32);f(s,i,a,B);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=i[u+16];return j(e,t,n,r,o,c,s)}function c(e,t,n,r,o,i){i=new L(i);return i.update(n,r,o),i.finish(e,t),0}function F(e,t,n,r,o,i){var a=new Uint8Array(16);return c(a,0,n,r,o,i),H(e,t,a,0)}function a(e,t,n,r,o){var i;if(n<32)return-1;for(s(e,0,t,0,n,r,o),c(e,16,e,32,n-32,e),i=0;i<16;i++)e[i]=0;return 0}function u(e,t,n,r,o){var i,a=new Uint8Array(32);if(n<32)return-1;if(X(a,0,32,r,o),0!==F(t,16,t,32,n-32,a))return-1;for(s(e,0,t,0,n,r,o),i=0;i<32;i++)e[i]=0;return 0}function b(e,t){for(var n=0;n<16;n++)e[n]=0|t[n]}function l(e){for(var t,n=1,r=0;r<16;r++)t=e[r]+n+65535,n=Math.floor(t/65536),e[r]=t-65536*n;e[0]+=n-1+37*(n-1)}function p(e,t,n){for(var r,o=~(n-1),i=0;i<16;i++)r=o&(e[i]^t[i]),e[i]^=r,t[i]^=r}function g(e,t){for(var n,r,o=A(),i=A(),a=0;a<16;a++)i[a]=t[a];for(l(i),l(i),l(i),n=0;n<2;n++){for(o[0]=i[0]-65517,a=1;a<15;a++)o[a]=i[a]-65535-(o[a-1]>>16&1),o[a-1]&=65535;o[15]=i[15]-32767-(o[14]>>16&1),r=o[15]>>16&1,o[14]&=65535,p(i,o,1-r)}for(a=0;a<16;a++)e[2*a]=255&i[a],e[2*a+1]=i[a]>>8}function z(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return g(n,e),g(r,t),_(n,0,r,0)}function G(e){var t=new Uint8Array(32);return g(t,e),1&t[0]}function w(e,t){for(var n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function E(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function m(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function O(e,t,n){var r,L=0,M=0,U=0,K=0,o=0,i=0,a=0,s=0,c=0,u=0,f=0,h=0,l=0,d=0,p=0,g=0,v=0,y=0,_=0,b=0,w=0,H=0,j=0,W=0,X=0,F=0,z=0,G=0,J=0,Y=0,V=0,E=n[0],m=n[1],O=n[2],C=n[3],S=n[4],R=n[5],T=n[6],k=n[7],N=n[8],x=n[9],A=n[10],D=n[11],P=n[12],I=n[13],B=n[14],n=n[15];L+=(r=t[0])*E,U+=r*O,K+=r*C,o+=r*S,i+=r*R,a+=r*T,s+=r*k,c+=r*N,u+=r*x,f+=r*A,h+=r*D,l+=r*P,d+=r*I,p+=r*B,g+=r*n,M=0+r*m+(r=t[1])*E,K+=r*O,o+=r*C,i+=r*S,a+=r*R,s+=r*T,c+=r*k,u+=r*N,f+=r*x,h+=r*A,l+=r*D,d+=r*P,p+=r*I,g+=r*B,v+=r*n,U=U+r*m+(r=t[2])*E,o+=r*O,i+=r*C,a+=r*S,s+=r*R,c+=r*T,u+=r*k,f+=r*N,h+=r*x,l+=r*A,d+=r*D,p+=r*P,g+=r*I,v+=r*B,y+=r*n,K=K+r*m+(r=t[3])*E,i+=r*O,a+=r*C,s+=r*S,c+=r*R,u+=r*T,f+=r*k,h+=r*N,l+=r*x,d+=r*A,p+=r*D,g+=r*P,v+=r*I,y+=r*B,_+=r*n,o=o+r*m+(r=t[4])*E,a+=r*O,s+=r*C,c+=r*S,u+=r*R,f+=r*T,h+=r*k,l+=r*N,d+=r*x,p+=r*A,g+=r*D,v+=r*P,y+=r*I,_+=r*B,b+=r*n,i=i+r*m+(r=t[5])*E,s+=r*O,c+=r*C,u+=r*S,f+=r*R,h+=r*T,l+=r*k,d+=r*N,p+=r*x,g+=r*A,v+=r*D,y+=r*P,_+=r*I,b+=r*B,w+=r*n,a=a+r*m+(r=t[6])*E,c+=r*O,u+=r*C,f+=r*S,h+=r*R,l+=r*T,d+=r*k,p+=r*N,g+=r*x,v+=r*A,y+=r*D,_+=r*P,b+=r*I,w+=r*B,H+=r*n,s=s+r*m+(r=t[7])*E,u+=r*O,f+=r*C,h+=r*S,l+=r*R,d+=r*T,p+=r*k,g+=r*N,v+=r*x,y+=r*A,_+=r*D,b+=r*P,w+=r*I,H+=r*B,j+=r*n,c=c+r*m+(r=t[8])*E,f+=r*O,h+=r*C,l+=r*S,d+=r*R,p+=r*T,g+=r*k,v+=r*N,y+=r*x,_+=r*A,b+=r*D,w+=r*P,H+=r*I,j+=r*B,W+=r*n,u=u+r*m+(r=t[9])*E,h+=r*O,l+=r*C,d+=r*S,p+=r*R,g+=r*T,v+=r*k,y+=r*N,_+=r*x,b+=r*A,w+=r*D,H+=r*P,j+=r*I,W+=r*B,X+=r*n,f=f+r*m+(r=t[10])*E,l+=r*O,d+=r*C,p+=r*S,g+=r*R,v+=r*T,y+=r*k,_+=r*N,b+=r*x,w+=r*A,H+=r*D,j+=r*P,W+=r*I,X+=r*B,F+=r*n,h=h+r*m+(r=t[11])*E,d+=r*O,p+=r*C,g+=r*S,v+=r*R,y+=r*T,_+=r*k,b+=r*N,w+=r*x,H+=r*A,j+=r*D,W+=r*P,X+=r*I,F+=r*B,z+=r*n,l=l+r*m+(r=t[12])*E,p+=r*O,g+=r*C,v+=r*S,y+=r*R,_+=r*T,b+=r*k,w+=r*N,H+=r*x,j+=r*A,W+=r*D,X+=r*P,F+=r*I,z+=r*B,G+=r*n,d=d+r*m+(r=t[13])*E,g+=r*O,v+=r*C,y+=r*S,_+=r*R,b+=r*T,w+=r*k,H+=r*N,j+=r*x,W+=r*A,X+=r*D,F+=r*P,z+=r*I,G+=r*B,J+=r*n,p=p+r*m+(r=t[14])*E,v+=r*O,y+=r*C,_+=r*S,b+=r*R,w+=r*T,H+=r*k,j+=r*N,W+=r*x,X+=r*A,F+=r*D,z+=r*P,G+=r*I,J+=r*B,Y+=r*n,g=g+r*m+(r=t[15])*E,M+=38*(y+=r*O),U+=38*(_+=r*C),K+=38*(b+=r*S),o+=38*(w+=r*R),i+=38*(H+=r*T),a+=38*(j+=r*k),s+=38*(W+=r*N),c+=38*(X+=r*x),u+=38*(F+=r*A),f+=38*(z+=r*D),h+=38*(G+=r*P),l+=38*(J+=r*I),d+=38*(Y+=r*B),p+=38*(V+=r*n),L=(r=(L+=38*(v+=r*m))+1+65535)-65536*(t=Math.floor(r/65536)),M=(r=M+t+65535)-65536*(t=Math.floor(r/65536)),U=(r=U+t+65535)-65536*(t=Math.floor(r/65536)),K=(r=K+t+65535)-65536*(t=Math.floor(r/65536)),o=(r=o+t+65535)-65536*(t=Math.floor(r/65536)),i=(r=i+t+65535)-65536*(t=Math.floor(r/65536)),a=(r=a+t+65535)-65536*(t=Math.floor(r/65536)),s=(r=s+t+65535)-65536*(t=Math.floor(r/65536)),c=(r=c+t+65535)-65536*(t=Math.floor(r/65536)),u=(r=u+t+65535)-65536*(t=Math.floor(r/65536)),f=(r=f+t+65535)-65536*(t=Math.floor(r/65536)),h=(r=h+t+65535)-65536*(t=Math.floor(r/65536)),l=(r=l+t+65535)-65536*(t=Math.floor(r/65536)),d=(r=d+t+65535)-65536*(t=Math.floor(r/65536)),p=(r=p+t+65535)-65536*(t=Math.floor(r/65536)),g=(r=g+t+65535)-65536*(t=Math.floor(r/65536)),L=(r=(L+=t-1+37*(t-1))+1+65535)-65536*(t=Math.floor(r/65536)),M=(r=M+t+65535)-65536*(t=Math.floor(r/65536)),U=(r=U+t+65535)-65536*(t=Math.floor(r/65536)),K=(r=K+t+65535)-65536*(t=Math.floor(r/65536)),o=(r=o+t+65535)-65536*(t=Math.floor(r/65536)),i=(r=i+t+65535)-65536*(t=Math.floor(r/65536)),a=(r=a+t+65535)-65536*(t=Math.floor(r/65536)),s=(r=s+t+65535)-65536*(t=Math.floor(r/65536)),c=(r=c+t+65535)-65536*(t=Math.floor(r/65536)),u=(r=u+t+65535)-65536*(t=Math.floor(r/65536)),f=(r=f+t+65535)-65536*(t=Math.floor(r/65536)),h=(r=h+t+65535)-65536*(t=Math.floor(r/65536)),l=(r=l+t+65535)-65536*(t=Math.floor(r/65536)),d=(r=d+t+65535)-65536*(t=Math.floor(r/65536)),p=(r=p+t+65535)-65536*(t=Math.floor(r/65536)),g=(r=g+t+65535)-65536*(t=Math.floor(r/65536)),e[0]=L+=t-1+37*(t-1),e[1]=M,e[2]=U,e[3]=K,e[4]=o,e[5]=i,e[6]=a,e[7]=s,e[8]=c,e[9]=u,e[10]=f,e[11]=h,e[12]=l,e[13]=d,e[14]=p,e[15]=g}function C(e,t){O(e,t,t)}function J(e,t){for(var n=A(),r=0;r<16;r++)n[r]=t[r];for(r=253;0<=r;r--)C(n,n),2!==r&&4!==r&&O(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function Y(e,t){for(var n=A(),r=0;r<16;r++)n[r]=t[r];for(r=250;0<=r;r--)C(n,n),1!==r&&O(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function i(e,t,n){for(var r,o=new Uint8Array(32),i=new Float64Array(80),a=A(),s=A(),c=A(),u=A(),f=A(),h=A(),l=0;l<31;l++)o[l]=t[l];for(o[31]=127&t[31]|64,o[0]&=248,w(i,n),l=0;l<16;l++)s[l]=i[l],u[l]=a[l]=c[l]=0;for(a[0]=u[0]=1,l=254;0<=l;--l)p(a,s,r=o[l>>>3]>>>(7&l)&1),p(c,u,r),E(f,a,c),m(a,a,c),E(c,s,u),m(s,s,u),C(u,f),C(h,a),O(a,c,a),O(c,s,f),E(f,a,c),m(a,a,c),C(s,a),m(c,u,h),O(a,c,ae),E(a,a,u),O(c,c,a),O(a,u,h),O(u,s,i),C(s,f),p(a,s,r),p(c,u,r);for(l=0;l<16;l++)i[l+16]=a[l],i[l+32]=c[l],i[l+48]=s[l],i[l+64]=u[l];var n=i.subarray(32),d=i.subarray(16);return J(n,n),O(d,d,n),g(e,d),0}function n(e,t){return i(e,t,ie)}function V(e,t){return D(t,32),n(e,t)}function d(e,t,n){var r=new Uint8Array(32);return i(r,n,t),f(e,oe,r,B)}function q(e,t,n,r){for(var o,i,a,s,L,M,U,K,H,j,W,X,F,z,G,J,c,u,f,h,l,d,p,g,v,y,_=new Int32Array(16),b=new Int32Array(16),w=e[0],E=e[1],m=e[2],O=e[3],C=e[4],S=e[5],R=e[6],T=e[7],k=t[0],N=t[1],x=t[2],A=t[3],D=t[4],P=t[5],I=t[6],B=t[7],Y=0;128<=r;){for(f=0;f<16;f++)_[f]=n[(h=8*f+Y)+0]<<24|n[h+1]<<16|n[h+2]<<8|n[h+3],b[f]=n[h+4]<<24|n[h+5]<<16|n[h+6]<<8|n[h+7];for(f=0;f<80;f++)if(o=w,i=E,a=m,s=O,H=k,j=N,W=x,X=A,p=65535&(d=B),g=d>>>16,v=65535&(l=T),y=l>>>16,p+=65535&(d=((F=D)>>>14|(L=C)<<18)^(D>>>18|C<<14)^(C>>>9|D<<23)),g+=d>>>16,v+=65535&(l=(C>>>14|D<<18)^(C>>>18|D<<14)^(D>>>9|C<<23)),y+=l>>>16,p+=65535&(d=D&(z=P)^~D&(G=I)),g+=d>>>16,v+=65535&(l=C&(M=S)^~C&(U=R)),y+=l>>>16,l=pe[2*f],p+=65535&(d=pe[2*f+1]),g+=d>>>16,y+=l>>>16,v=(v+=65535&l)+(65535&(l=_[f%16]))+((g=g+((d=b[f%16])>>>16)+((p+=65535&d)>>>16))>>>16),p=65535&(d=u=65535&p|g<<16),g=d>>>16,v=65535&(l=c=65535&v|(y=y+(l>>>16)+(v>>>16))<<16),y=l>>>16,p+=65535&(d=(k>>>28|w<<4)^(w>>>2|k<<30)^(w>>>7|k<<25)),v+=65535&(l=(w>>>28|k<<4)^(k>>>2|w<<30)^(k>>>7|w<<25)),y+=l>>>16,K=65535&(v=v+(65535&(l=w&E^w&m^E&m))+((g=(g+=d>>>16)+((d=k&N^k&x^N&x)>>>16)+((p+=65535&d)>>>16))>>>16))|(y=y+(l>>>16)+(v>>>16))<<16,J=65535&p|g<<16,p=65535&(d=X),v=65535&(l=s),y=l>>>16,E=o,m=i,O=a,C=65535&(v=v+(65535&(l=c))+((g=(g=d>>>16)+((d=u)>>>16)+((p+=65535&d)>>>16))>>>16))|(y=y+(l>>>16)+(v>>>16))<<16,S=L,R=M,T=U,w=K,N=H,x=j,A=W,D=65535&p|g<<16,P=F,I=z,B=G,k=J,f%16==15)for(h=0;h<16;h++)l=_[h],p=65535&(d=b[h]),g=d>>>16,v=65535&l,y=l>>>16,l=_[(h+9)%16],p+=65535&(d=b[(h+9)%16]),g+=d>>>16,v+=65535&l,y+=l>>>16,c=_[(h+1)%16],p+=65535&(d=((u=b[(h+1)%16])>>>1|c<<31)^(u>>>8|c<<24)^(u>>>7|c<<25)),g+=d>>>16,v+=65535&(l=(c>>>1|u<<31)^(c>>>8|u<<24)^c>>>7),y+=l>>>16,c=_[(h+14)%16],g+=(d=((u=b[(h+14)%16])>>>19|c<<13)^(c>>>29|u<<3)^(u>>>6|c<<26))>>>16,v+=65535&(l=(c>>>19|u<<13)^(u>>>29|c<<3)^c>>>6),y=y+(l>>>16)+((v+=(g+=(p+=65535&d)>>>16)>>>16)>>>16),_[h]=65535&v|y<<16,b[h]=65535&p|g<<16;p=65535&(d=k),v=65535&(l=w),y=(y=l>>>16)+((l=e[0])>>>16)+((v=v+(65535&l)+((g=(g=d>>>16)+((d=t[0])>>>16)+((p+=65535&d)>>>16))>>>16))>>>16),e[0]=w=65535&v|y<<16,t[0]=k=65535&p|g<<16,p=65535&(d=N),v=65535&(l=E),y=(y=l>>>16)+((l=e[1])>>>16)+((v=v+(65535&l)+((g=(g=d>>>16)+((d=t[1])>>>16)+((p+=65535&d)>>>16))>>>16))>>>16),e[1]=E=65535&v|y<<16,t[1]=N=65535&p|g<<16,p=65535&(d=x),v=65535&(l=m),y=(y=l>>>16)+((l=e[2])>>>16)+((v=v+(65535&l)+((g=(g=d>>>16)+((d=t[2])>>>16)+((p+=65535&d)>>>16))>>>16))>>>16),e[2]=m=65535&v|y<<16,t[2]=x=65535&p|g<<16,p=65535&(d=A),v=65535&(l=O),y=(y=l>>>16)+((l=e[3])>>>16)+((v=v+(65535&l)+((g=(g=d>>>16)+((d=t[3])>>>16)+((p+=65535&d)>>>16))>>>16))>>>16),e[3]=O=65535&v|y<<16,t[3]=A=65535&p|g<<16,p=65535&(d=D),v=65535&(l=C),y=(y=l>>>16)+((l=e[4])>>>16)+((v=v+(65535&l)+((g=(g=d>>>16)+((d=t[4])>>>16)+((p+=65535&d)>>>16))>>>16))>>>16),e[4]=C=65535&v|y<<16,t[4]=D=65535&p|g<<16,p=65535&(d=P),v=65535&(l=S),y=(y=l>>>16)+((l=e[5])>>>16)+((v=v+(65535&l)+((g=(g=d>>>16)+((d=t[5])>>>16)+((p+=65535&d)>>>16))>>>16))>>>16),e[5]=S=65535&v|y<<16,t[5]=P=65535&p|g<<16,p=65535&(d=I),v=65535&(l=R),y=(y=l>>>16)+((l=e[6])>>>16)+((v=v+(65535&l)+((g=(g=d>>>16)+((d=t[6])>>>16)+((p+=65535&d)>>>16))>>>16))>>>16),e[6]=R=65535&v|y<<16,t[6]=I=65535&p|g<<16,p=65535&(d=B),v=65535&(l=T),y=(y=l>>>16)+((l=e[7])>>>16)+((v=v+(65535&l)+((g=(g=d>>>16)+((d=t[7])>>>16)+((p+=65535&d)>>>16))>>>16))>>>16),e[7]=T=65535&v|y<<16,t[7]=B=65535&p|g<<16,Y+=128,r-=128}}function S(e,t,n){var r,o=new Int32Array(8),i=new Int32Array(8),a=new Uint8Array(256),s=n;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,q(o,i,t,n),n%=128,r=0;r<n;r++)a[r]=t[s-n+r];for(a[n]=128,a[(n=256-128*(n<112?1:0))-9]=0,K(a,n-8,s/536870912|0,s<<3),q(o,i,a,n),r=0;r<8;r++)K(e,8*r,o[r],i[r]);return 0}function R(e,t){var n=A(),r=A(),o=A(),i=A(),a=A(),s=A(),c=A(),u=A(),f=A();m(n,e[1],e[0]),m(f,t[1],t[0]),O(n,n,f),E(r,e[0],e[1]),E(f,t[0],t[1]),O(r,r,f),O(o,e[3],t[3]),O(o,o,ce),O(i,e[2],t[2]),E(i,i,i),m(a,r,n),m(s,i,o),E(c,i,o),E(u,r,n),O(e[0],a,s),O(e[1],u,c),O(e[2],c,s),O(e[3],a,u)}function Z(e,t,n){for(var r=0;r<4;r++)p(e[r],t[r],n)}function T(e,t){var n=A(),r=A(),o=A();J(o,t[2]),O(n,t[0],o),O(r,t[1],o),g(e,r),e[31]^=G(n)<<7}function k(e,t,n){var r,o;for(b(e[0],P),b(e[1],I),b(e[2],I),b(e[3],P),o=255;0<=o;--o)Z(e,t,r=n[o/8|0]>>(7&o)&1),R(t,e),R(e,e),Z(e,t,r)}function N(e,t){var n=[A(),A(),A(),A()];b(n[0],ue),b(n[1],fe),b(n[2],I),O(n[3],ue,fe),k(e,n,t)}function v(e,t,n){var r,o=new Uint8Array(64),i=[A(),A(),A(),A()];for(n||D(t,32),S(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,N(i,o),T(e,i),r=0;r<32;r++)t[r+32]=e[r];return 0}function Q(e,t){for(var n,r,o,i=63;32<=i;--i){for(n=0,r=i-32,o=i-12;r<o;++r)t[r]+=n-16*t[i]*M[r-(i-32)],n=Math.floor((t[r]+128)/256),t[r]-=256*n;t[r]+=n,t[i]=0}for(r=n=0;r<32;r++)t[r]+=n-(t[31]>>4)*M[r],n=t[r]>>8,t[r]&=255;for(r=0;r<32;r++)t[r]-=n*M[r];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,e[i]=255&t[i]}function $(e){for(var t=new Float64Array(64),n=0;n<64;n++)t[n]=e[n];for(n=0;n<64;n++)e[n]=0;Q(e,t)}function ee(e,t,n,r){for(var o,i=new Uint8Array(64),a=new Uint8Array(64),s=new Uint8Array(64),c=new Float64Array(64),u=[A(),A(),A(),A()],f=(S(i,r,32),i[0]&=248,i[31]&=127,i[31]|=64,n+64),h=0;h<n;h++)e[64+h]=t[h];for(h=0;h<32;h++)e[32+h]=i[32+h];for(S(s,e.subarray(32),n+32),$(s),N(u,s),T(e,u),h=32;h<64;h++)e[h]=r[h];for(S(a,e,n+64),$(a),h=0;h<64;h++)c[h]=0;for(h=0;h<32;h++)c[h]=s[h];for(h=0;h<32;h++)for(o=0;o<32;o++)c[h+o]+=a[h]*i[o];return Q(e.subarray(32),c),f}function te(e,t,n,r){var o,i,a,s,c,u,f,h,l,d,p=new Uint8Array(32),g=new Uint8Array(64),v=[A(),A(),A(),A()],y=[A(),A(),A(),A()];if(n<64)return-1;if(i=y,a=r,s=A(),c=A(),u=A(),f=A(),h=A(),l=A(),d=A(),b(i[2],I),w(i[1],a),C(u,i[1]),O(f,u,se),m(u,u,i[2]),E(f,i[2],f),C(h,f),C(l,h),O(d,l,h),O(s,d,u),O(s,s,f),Y(s,s),O(s,s,u),O(s,s,f),O(s,s,f),O(i[0],s,f),C(c,i[0]),O(c,c,f),z(c,u)&&O(i[0],i[0],he),C(c,i[0]),O(c,c,f),z(c,u)?-1:(G(i[0])===a[31]>>7&&m(i[0],P,i[0]),O(i[3],i[0],i[1]),0))return-1;for(o=0;o<n;o++)e[o]=t[o];for(o=0;o<32;o++)e[o+32]=r[o];if(S(g,e,n),$(g),k(v,y,g),N(y,t.subarray(32)),R(v,y),T(p,v),n-=64,_(t,0,p,0)){for(o=0;o<n;o++)e[o]=0;return-1}for(o=0;o<n;o++)e[o]=t[o+64];return n}function ne(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function y(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function re(e){for(var t=0;t<e.length;t++)e[t]=0}var x,A,D,oe,ie,P,I,ae,se,ce,ue,fe,he,B,L,le,de,pe,M,U;x=e.exports||(self.nacl=self.nacl||{}),A=function(e){var t,n=new Float64Array(16);if(e)for(t=0;t<e.length;t++)n[t]=e[t];return n},D=function(){throw new Error("no PRNG")},oe=new Uint8Array(16),(ie=new Uint8Array(32))[0]=9,P=A(),I=A([1]),ae=A([56129,1]),se=A([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),ce=A([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),ue=A([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),fe=A([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),he=A([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]),B=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]),(L=function(e){var t;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,t=255&e[this.fin=0]|(255&e[1])<<8,this.r[0]=8191&t,this.r[1]=8191&(t>>>13|(t=255&e[2]|(255&e[3])<<8)<<3),this.r[2]=7939&(t>>>10|(t=255&e[4]|(255&e[5])<<8)<<6),this.r[3]=8191&(t>>>7|(t=255&e[6]|(255&e[7])<<8)<<9),this.r[4]=255&(t>>>4|(t=255&e[8]|(255&e[9])<<8)<<12),this.r[5]=t>>>1&8190,this.r[6]=8191&(t>>>14|(t=255&e[10]|(255&e[11])<<8)<<2),this.r[7]=8065&(t>>>11|(t=255&e[12]|(255&e[13])<<8)<<5),this.r[8]=8191&(t>>>8|(t=255&e[14]|(255&e[15])<<8)<<8),this.r[9]=t>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8}).prototype.blocks=function(e,t,n){for(var r,o,i,a,s,c,u,f,h,l,d,p=this.fin?0:2048,g=this.h[0],v=this.h[1],y=this.h[2],_=this.h[3],b=this.h[4],w=this.h[5],E=this.h[6],m=this.h[7],O=this.h[8],C=this.h[9],S=this.r[0],R=this.r[1],T=this.r[2],k=this.r[3],N=this.r[4],x=this.r[5],A=this.r[6],D=this.r[7],P=this.r[8],I=this.r[9];16<=n;)o=0,r=(o=(o=(o=(o=(o+=(g+=8191&(i=255&e[t+0]|(255&e[t+1])<<8))*S)+(v+=8191&(i>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*I))+(y+=8191&(i>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*P))+(_+=8191&(i>>>7|(i=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*D))+(b+=8191&(i>>>4|(i=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*A))>>>13,i=r+=(o=(o=(o=(o=(o&8191)+(w+=i>>>1&8191)*(5*x))+(E+=8191&(i>>>14|(i=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*N))+(m+=8191&(i>>>11|(i=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*k))+(O+=8191&(i>>>8|(i=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*T)+(C+=i>>>5|p)*(5*R))>>>13,r=(i=(i=(i+=g*R)+v*S+y*(5*I))+_*(5*P)+b*(5*D))>>>13,a=r+=(i=(i=(i=(i&8191)+w*(5*A))+E*(5*x)+m*(5*N))+O*(5*k)+C*(5*T))>>>13,r=(a=(a=(a+=g*T)+v*R+y*S)+_*(5*I)+b*(5*P))>>>13,s=r+=(a=(a=(a=(a&8191)+w*(5*D))+E*(5*A)+m*(5*x))+O*(5*N)+C*(5*k))>>>13,r=(s=(s=(s+=g*k)+v*T+y*R)+_*S+b*(5*I))>>>13,c=r+=(s=(s=(s=(s&8191)+w*(5*P))+E*(5*D)+m*(5*A))+O*(5*x)+C*(5*N))>>>13,r=(c=(c=(c+=g*N)+v*k+y*T)+_*R+b*S)>>>13,u=r+=(c=(c=(c=(c&8191)+w*(5*I))+E*(5*P)+m*(5*D))+O*(5*A)+C*(5*x))>>>13,r=(u=(u=(u+=g*x)+v*N+y*k)+_*T+b*R)>>>13,f=r+=(u=(u=(u=(u&8191)+w*S)+E*(5*I)+m*(5*P))+O*(5*D)+C*(5*A))>>>13,r=(f=(f=(f+=g*A)+v*x+y*N)+_*k+b*T)>>>13,h=r+=(f=(f=(f=(f&8191)+w*R)+E*S+m*(5*I))+O*(5*P)+C*(5*D))>>>13,r=(h=(h=(h+=g*D)+v*A+y*x)+_*N+b*k)>>>13,l=r+=(h=(h=(h=(h&8191)+w*T)+E*R+m*S)+O*(5*I)+C*(5*P))>>>13,r=(l=(l=(l+=g*P)+v*D+y*A)+_*x+b*N)>>>13,d=r+=(l=(l=(l=(l&8191)+w*k)+E*T+m*R)+O*S+C*(5*I))>>>13,r=(d=(d=(d+=g*I)+v*P+y*D)+_*A+b*x)>>>13,g=o=8191&(r=(((r+=(d=(d=(d=(d&8191)+w*N)+E*k+m*T)+O*R+C*S)>>>13)<<2)+r|0)+(8191&o)|0),v=i=(i&8191)+(r>>>=13),y=a&=8191,_=s&=8191,b=c&=8191,w=u&=8191,E=f&=8191,m=h&=8191,O=l&=8191,C=d&=8191,t+=16,n-=16;this.h[0]=g,this.h[1]=v,this.h[2]=y,this.h[3]=_,this.h[4]=b,this.h[5]=w,this.h[6]=E,this.h[7]=m,this.h[8]=O,this.h[9]=C},L.prototype.finish=function(e,t){var n,r,o,i,a=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,a[0]=this.h[0]+5,n=a[0]>>>13,a[0]&=8191,i=1;i<10;i++)a[i]=this.h[i]+n,n=a[i]>>>13,a[i]&=8191;for(a[9]-=8192,r=(1^n)-1,i=0;i<10;i++)a[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|a[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},L.prototype.update=function(e,t,n){var r,o;if(this.leftover){for((o=16-this.leftover)>n&&(o=n),r=0;r<o;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(16<=n&&(this.blocks(e,t,o=n-n%16),t+=o,n-=o),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}},le=a,de=u,pe=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],M=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),x.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:s,crypto_stream:X,crypto_stream_salsa20_xor:j,crypto_stream_salsa20:W,crypto_onetimeauth:c,crypto_onetimeauth_verify:F,crypto_verify_16:H,crypto_verify_32:_,crypto_secretbox:a,crypto_secretbox_open:u,crypto_scalarmult:i,crypto_scalarmult_base:n,crypto_box_beforenm:d,crypto_box_afternm:le,crypto_box:function(e,t,n,r,o,i){var a=new Uint8Array(32);return d(a,o,i),le(e,t,n,r,a)},crypto_box_open:function(e,t,n,r,o,i){var a=new Uint8Array(32);return d(a,o,i),de(e,t,n,r,a)},crypto_box_keypair:V,crypto_hash:S,crypto_sign:ee,crypto_sign_keypair:v,crypto_sign_open:te,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:A,D:se,L:M,pack25519:g,unpack25519:w,M:O,A:E,S:C,Z:m,pow2523:Y,add:R,set25519:b,modL:Q,scalarmult:k,scalarbase:N},x.randomBytes=function(e){var t=new Uint8Array(e);return D(t,e),t},x.secretbox=function(e,t,n){y(e,t,n),ne(n,t);for(var r=new Uint8Array(32+e.length),o=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+32]=e[i];return a(o,r,r.length,t,n),o.subarray(16)},x.secretbox.open=function(e,t,n){y(e,t,n),ne(n,t);for(var r=new Uint8Array(16+e.length),o=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+16]=e[i];return r.length<32||0!==u(o,r,r.length,t,n)?null:o.subarray(32)},x.secretbox.keyLength=32,x.secretbox.nonceLength=24,x.secretbox.overheadLength=16,x.scalarMult=function(e,t){if(y(e,t),32!==e.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return i(n,e,t),n},x.scalarMult.base=function(e){if(y(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return n(t,e),t},x.scalarMult.scalarLength=32,x.scalarMult.groupElementLength=32,x.box=function(e,t,n,r){n=x.box.before(n,r);return x.secretbox(e,t,n)},x.box.before=function(e,t){y(e,t);var n=t;if(32!==e.length)throw new Error("bad public key size");if(32!==n.length)throw new Error("bad secret key size");n=new Uint8Array(32);return d(n,e,t),n},x.box.after=x.secretbox,x.box.open=function(e,t,n,r){n=x.box.before(n,r);return x.secretbox.open(e,t,n)},x.box.open.after=x.secretbox.open,x.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return V(e,t),{publicKey:e,secretKey:t}},x.box.keyPair.fromSecretKey=function(e){if(y(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return n(t,e),{publicKey:t,secretKey:new Uint8Array(e)}},x.box.publicKeyLength=32,x.box.secretKeyLength=32,x.box.sharedKeyLength=32,x.box.nonceLength=24,x.box.overheadLength=x.secretbox.overheadLength,x.sign=function(e,t){if(y(e,t),64!==t.length)throw new Error("bad secret key size");var n=new Uint8Array(64+e.length);return ee(n,e,e.length,t),n},x.sign.open=function(e,t){if(y(e,t),32!==t.length)throw new Error("bad public key size");var n=new Uint8Array(e.length),e=te(n,e,e.length,t);if(e<0)return null;for(var r=new Uint8Array(e),o=0;o<r.length;o++)r[o]=n[o];return r},x.sign.detached=function(e,t){for(var n=x.sign(e,t),r=new Uint8Array(64),o=0;o<r.length;o++)r[o]=n[o];return r},x.sign.detached.verify=function(e,t,n){if(y(e,t,n),64!==t.length)throw new Error("bad signature size");if(32!==n.length)throw new Error("bad public key size");for(var r=new Uint8Array(64+e.length),o=new Uint8Array(64+e.length),i=0;i<64;i++)r[i]=t[i];for(i=0;i<e.length;i++)r[i+64]=e[i];return 0<=te(o,r,r.length,n)},x.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64);return v(e,t),{publicKey:e,secretKey:t}},x.sign.keyPair.fromSecretKey=function(e){if(y(e),64!==e.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),n=0;n<t.length;n++)t[n]=e[32+n];return{publicKey:t,secretKey:new Uint8Array(e)}},x.sign.keyPair.fromSeed=function(e){if(y(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(32),n=new Uint8Array(64),r=0;r<32;r++)n[r]=e[r];return v(t,n,!0),{publicKey:t,secretKey:n}},x.sign.publicKeyLength=32,x.sign.secretKeyLength=64,x.sign.seedLength=32,x.sign.signatureLength=64,x.hash=function(e){y(e);var t=new Uint8Array(64);return S(t,e,e.length),t},x.hash.hashLength=64,x.verify=function(e,t){return y(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===o(e,0,t,0,e.length)},x.setPRNG=function(e){D=e},(U="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&U.getRandomValues?x.setPRNG(function(e,t){for(var n=new Uint8Array(t),r=0;r<t;r+=65536)U.getRandomValues(n.subarray(r,r+Math.min(t-r,65536)));for(r=0;r<t;r++)e[r]=n[r];re(n)}):(U=r(1281))&&U.randomBytes&&x.setPRNG(function(e,t){for(var n=U.randomBytes(t),r=0;r<t;r++)e[r]=n[r];re(n)})},1591:function(e){e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},8573:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CONNECT_METHOD_FETCHMSG=t.CONNECT_METHOD_RECEIVE=t.CONNECT_METHOD_UNSUB=t.CONNECT_METHOD_SUB=t.CONNECT_METHOD_PUBLISH=t.CONNECT_METHOD_LOGIN=t.CONNECT_METHOD_PUSH=void 0,t.CONNECT_METHOD_PUSH="push",t.CONNECT_METHOD_LOGIN="login",t.CONNECT_METHOD_PUBLISH="publish",t.CONNECT_METHOD_SUB="subscribe",t.CONNECT_METHOD_UNSUB="unsubscribe",t.CONNECT_METHOD_RECEIVE="receive",t.CONNECT_METHOD_FETCHMSG="fetchMessages"},3397:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((c=c.apply(e,a||[])).next())})},s=(Object.defineProperty(t,"__esModule",{value:!0}),t.OKXWalletConnector=void 0,n(8538)),c=n(3781),u=n(1665),f=n(7007),h=i(n(2082)),l=(0,u.resolveWebSocketImplementation)();t.OKXWalletConnector=(()=>_createClass(function e(t){if(_classCallCheck(this,e),this.events=new f.EventEmitter,this.state=s.ConnectorState.InitState,!(0,u.checkWSUrl)(t))throw new Error("CONNECTOR: invalid url ".concat(t));this.url=t,this.heartbeatTimer=null},[{key:"connecting",get:function(){return this.state==s.ConnectorState.Connecting}},{key:"onPayload",value:function(e){void 0!==e.data&&(h.logDebug("get received data"),h.logDebug(e),"string"==typeof e.data&&"pong"===e.data?h.logDebug("CONNECT: receive pong ".concat(Date.now().toString())):this.events.emit("payload",e.data))}},{key:"onClose",value:function(e){this.socket=void 0,this.events.emit("close",e)}},{key:"onError",value:function(e,t){e={id:e,msg:t.toString()};this.events.emit("payload",e)}},{key:"onopen",value:function(e){var t=this;e.onmessage=function(e){return t.onPayload(e)},e.onclose=function(e){return t.onClose(e)},this.socket=e,this.state=s.ConnectorState.Connected,this.events.emit("open")}},{key:"emitError",value:function(e){this.events.emit("fail",e)}},{key:"heartbeat",value:function(){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(this.heartbeatTimer&&clearTimeout(this.heartbeatTimer),this.state!=s.ConnectorState.Connected&&this.state!=s.ConnectorState.OnError)?e.next=30:this.socket?this.socket.readyState!==WebSocket.OPEN?e.next=6:(h.logDebug("send ping heart beat: ".concat(Date.now().toString(),", ").concat(this.socket)),this.socket.send("ping"),this.heartbeatTimer=setTimeout(this.heartbeat.bind(this),5e3),e.next=16):e.next=18;break;case 6:if(h.logDebug("socket not ready"),this.state==s.ConnectorState.Connected||this.state==s.ConnectorState.OnError)return h.logDebug("socket reconnect by heartbeat"),e.prev=8,e.next=11,this.registOpen();e.next=16;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(8),h.logError("regist open failed"),this.heartbeatTimer=setTimeout(this.heartbeat.bind(this),5e3);case 16:e.next=28;break;case 18:if(h.logDebug("socket not exist"),this.state==s.ConnectorState.Connected||this.state==s.ConnectorState.OnError)return h.logDebug("socket reconnect by heartbeat"),e.prev=20,e.next=23,this.registOpen();e.next=28;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(20),h.logError("regist open failed"),this.heartbeatTimer=setTimeout(this.heartbeat.bind(this),5e3);case 28:e.next=31;break;case 30:h.logDebug("heart beat close");case 31:case"end":return e.stop()}},e,this,[[8,13],[20,25]])}))}},{key:"registOpen",value:function(){var e,r=this,o=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.url;if((0,u.checkWSUrl)(o))return this.connecting?(e=this.events.getMaxListeners(),(this.events.listenerCount("open")>=e||this.events.listenerCount("fail")>=e)&&this.events.setMaxListeners(e+1),new Promise(function(e,t){r.events.once("fail",function(e){r.events.getMaxListeners()>s.EVENT_EMITTER_MAX_LISTENERS&&r.events.setMaxListeners(s.EVENT_EMITTER_MAX_LISTENERS),t(e)}),r.events.once("open",function(){if(r.events.getMaxListeners()>s.EVENT_EMITTER_MAX_LISTENERS&&r.events.setMaxListeners(s.EVENT_EMITTER_MAX_LISTENERS),void 0===r.socket)return t(new Error("Connect lost"));e(r.socket)})})):(this.url=o,this.state=s.ConnectorState.Connecting,new URLSearchParams(o).get("origin"),new Promise(function(e,t){var n=new l(o,[]);(0,u.hasBuiltInWebSocket)()?n.onerror=function(e){r.state=s.ConnectorState.OnError,r.emitError(e.error),t(new Error(e.message))}:n.on("error",function(e){r.state=s.ConnectorState.OnError,r.emitError(e),t(new Error("socketError"))}),n.onopen=function(){h.logDebug("socket opened"),r.onopen(n),r.heartbeat(),e(n)}}));throw new Error("CONNECTOR: invalid url ".concat(o))}},{key:"onVisibleChanged",value:function(){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:"visible"===document.visibilityState&&(h.logDebug("get changed ".concat(this.state,", ").concat(this.socket)),this.state==s.ConnectorState.Connected)&&void 0===this.socket?e.next=4:e.next=13;break;case 4:return h.logDebug("CONNECTION need reopen"),e.prev=5,e.next=8,this.registOpen();case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),h.logError("regist open failed");case 13:case"end":return e.stop()}},e,this,[[5,10]])}))}},{key:"connect",value:function(){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.registOpen(this.url);case 2:document.removeEventListener("visibilitychange",this.onVisibleChanged.bind(this)),document.addEventListener("visibilitychange",this.onVisibleChanged.bind(this));case 4:case"end":return e.stop()}},e,this)}))}},{key:"disconnect",value:function(){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var n=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(this.state=s.ConnectorState.Disconnected,new Promise(function(t,e){void 0!==n.socket?(n.socket.onclose=function(e){n.onClose(e),t()},n.socket.close(),n.heartbeatTimer&&clearTimeout(n.heartbeatTimer)):t()})));case 1:case"end":return e.stop()}},e,this)}))}},{key:"currentStatus",value:function(){return{state:this.state,url:this.url}}},{key:"addListener",value:function(r,o,i,a){this.listenPayloadHandler&&this.events.removeListener("payload",this.listenPayloadHandler),this.listenPayloadHandler=function(e){h.logDebug("<<< get payload ".concat(e));var t=(0,c.safeJsonParse)(e);if(t.params&&t.params.data){t=null==(t=t.params.data)?void 0:t.message;if(t)try{var n=o(t);i(r,n)}catch(e){h.logDebug("CONNECT: decrypt failed: ".concat(e)),a(r,e.message)}}},this.events.on("payload",this.listenPayloadHandler),this.failHandler&&this.events.removeListener("fail",this.failHandler),this.failHandler=function(e){e?(h.logDebug("CONNECT failed: ".concat(e)),a(r,e.message)):a(r,"Unkonow error")},this.events.on("fail",this.failHandler)}},{key:"addPackageParse",value:function(r){var e=this;this.payloadHandler&&this.events.removeListener("payload",this.payloadHandler),this.payloadHandler=function(n){return a(e,void 0,void 0,_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return h.logDebug("CONNECTION @[".concat((new Date).toUTCString(),"] <<<< received e:").concat(n)),t=(0,c.safeJsonParse)(n),e.next=4,r(t);case 4:case"end":return e.stop()}},e)}))},this.events.on("payload",this.payloadHandler)}},{key:"once",value:function(e,t){this.events.once(e,t)}},{key:"off",value:function(e,t){this.events.off(e,t)}},{key:"removeListener",value:function(e,t){this.events.removeListener(e,t)}},{key:"send",value:function(t,n){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=void 0===this.socket,e.t0)return h.logDebug(">>> send payload undefined ".concat(n)),e.next=5,t();e.next=5;break;case 5:try{h.logDebug("CONNECTION @[".concat((new Date).toUTCString(),"]>>> send payload ").concat((0,c.safeJsonStringify)(n))),this.socket&&this.socket.send((0,c.safeJsonStringify)(n))}catch(e){this.onError(n.id,e)}case 6:case"end":return e.stop()}},e,this)}))}},{key:"getMsgPayloadFromHistory",value:function(r){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===r)return e.abrupt("return");e.next=2;break;case 2:t={params:{data:r}},n=(0,c.safeJsonStringify)(r),h.logDebug("get received data from history"),h.logDebug(n),n=(0,c.safeJsonStringify)(t),this.events.emit("payload",n);case 4:case"end":return e.stop()}},e,this)}))}},{key:"onOpen",value:function(t){var e=this;this.openHandler&&this.events.removeListener("open",this.openHandler),this.openHandler=function(){return a(e,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return h.logDebug("CONNECTION @[".concat((new Date).toUTCString(),"] >>> ws opened: ")),e.next=3,t();case 3:case"end":return e.stop()}},e)}))},this.events.on("open",this.openHandler)}}]))()},5832:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},u=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((c=c.apply(e,a||[])).next())})},a=(Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionManager=void 0,n(3397)),s=n(8573),c=n(8829),f=n(3025),h=n(8538),l=n(7007),d=n(7854),p=n(1665),g=n(4237),v=n(7298),y=n(3781),_=i(n(2082)),b=n(2082);t.ConnectionManager=(()=>_createClass(function e(){_classCallCheck(this,e),this.events=new l.EventEmitter,this.connectStorage=new d.Storage(c.OKXCONNECTOR_CACHE_KEY),this.crypto=new g.SessionCrypto,this.jwtKeyPair=this.getCachedJWTKeyPair(),this.saveJWTKeyPair(this.jwtKeyPair),this.connector=new a.OKXWalletConnector(h.OKXCONNECTOR_WS_URL),this.packageId=Date.now(),this.connectedWalletPK="",this.currentTopic="",_.logDebug("this.connectedWalletPK constructor ".concat(this.connectedWalletPK))},[{key:"refreshPackageId",value:function(){this.packageId=Date.now()}},{key:"saveCryptoKeyPair",value:function(e){e=(0,y.safeJsonStringify)(e);this.connectStorage.encryptStoreMsg(e,c.OKXCONNECTOR_CRYPTO_KEY)}},{key:"getCachedCryptoKeyPair",value:function(){var e=this.connectStorage.getAndDecrypt(c.OKXCONNECTOR_CRYPTO_KEY);return"string"==typeof e?(_.logDebug("get cached crypto key:"),_.logDebug(e),(0,y.safeJsonParse)(e)):(this.connectStorage.clearCache(),null)}},{key:"saveJWTKeyPair",value:function(e){e={publicKey:(0,p.toHexString)(e.publicKey),secretKey:(0,p.toHexString)(e.secretKey)},_.logDebug("save jwt kp"),e=(0,y.safeJsonStringify)(e);_.logDebug(e),this.connectStorage.encryptStoreMsg(e,c.OKXCONNECTOR_JWT_KEY)}},{key:"getCachedJWTKeyPair",value:function(){var e=this.connectStorage.getAndDecrypt(c.OKXCONNECTOR_JWT_KEY);return"string"==typeof e?(_.logDebug("get cached jwt kp:"),_.logDebug(e),e=(0,y.safeJsonParse)(e),_.logDebug("save jwt kp"),_.logDebug(e),{publicKey:(0,p.hexToByteArray)(e.publicKey),secretKey:(0,p.hexToByteArray)(e.secretKey)}):(0,v.generateKeyPair)()}},{key:"isWalletPKReady",value:function(){return _.logDebug("isWalletPKReady ===> ".concat(this.connectedWalletPK)),0<this.connectedWalletPK.length}},{key:"makeJWT",value:function(t){return u(this,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,v.signJWT)(t,f.OKXCONNECTOR_JWT_SIDE,f.OKXCONNECTOR_JWT_TTL,this.jwtKeyPair);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e,this)}))}},{key:"parsePackage",value:function(e){return u(this,arguments,void 0,function(n){var r=this,o=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return _regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r.events.emit(n.id,n),o){e.next=9;break}return e.next=3,r.sendACK(n.id,!0);case 3:if(t=null==(t=r.connectStorage.getItem(c.OKXCONNECTOR_TOKEN_CACHE))?void 0:t.content,e.t0=t,e.t0)return r.refreshPackageId(),e.next=9,r.sendReceive(r.packageId.toString(),n.id,t);e.next=9;break;case 9:case"end":return e.stop()}},e)})()})}},{key:"restoreConnect",value:function(t){return u(this,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(_.logDebug("connectionManager restoreConenct ".concat(t)),"string"!=typeof t||0===t.length)throw new Error("CONNECTION: invalid topic");e.next=2;break;case 2:return _.logDebug("connectionManager restoreConenct disconnect"),e.next=5,this.disconnect(!0);case 5:return this.connectStorage.saveContent(t,c.OKXCONNECTOR_TOKEN_CACHE),_.logDebug("connectionManager restoreConenct conect"),e.next=9,this.connect(!0);case 9:case"end":return e.stop()}},e,this)}))}},{key:"getConnectInfo",value:function(){var e=(0,p.generateTopic)();return _.logDebug("generate topic token: ".concat(e)),{channelId:this.currentTopic=e,clientId:this.crypto.stringifyKeypair().publicKey}}},{key:"connect",value:function(){return u(this,arguments,void 0,function(){var r=this,o=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return _regeneratorRuntime().mark(function e(){var a,t,n;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.timeLog=(new Date).getTime(),(0,b.logDebug)("ConnectTime---enter->",r.timeLog),t=r.connectStorage.getItem(c.OKXCONNECTOR_TOKEN_CACHE),a=r.currentTopic,_.logDebug("generate topic token: ".concat(a)),o&&(null!=t&&(_.logDebug("read last connect id: ".concat(t)),a=t.content),(t=r.connectStorage.getItem(c.OKXCONNECTOR_CRYPTO_SENDER_PK_CACHE))&&(r.connectedWalletPK=t.content),t=r.getCachedCryptoKeyPair(),r.crypto=new g.SessionCrypto(t)),_.logDebug("use crypto client id: ".concat(r.crypto.stringifyKeypair().publicKey)),r.connectStorage.saveContent(a,c.OKXCONNECTOR_TOKEN_CACHE),e.next=7,r.makeJWT(a);case 7:return n=e.sent,e.abrupt("return",(_.logDebug("generate jwt token: ".concat(n)),r.connectStorage.saveContent(n,"jwt"),new Promise(function(o,i){r.connector.onOpen(function(){return u(r,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,r=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _.logDebug("1. connector on open"),t=(new Date).getTime(),(0,b.logDebug)("ConnectTime---open->",t-this.timeLog),this.events.once(this.packageId.toString(),function(n){return u(r,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,r=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&n.error)return _.logError("failed when login"),e.next=4,this.connector.disconnect();e.next=6;break;case 4:(t=new Error).message=n.error.message,t.name=n.error.code.toString(),i(t);case 6:return this.refreshPackageId(),this.events.once(this.packageId.toString(),function(n){return u(r,void 0,void 0,_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n&&n.error)return _.logError("failed when subscribe"),e.next=4,this.connector.disconnect();e.next=6;break;case 4:(t=new Error).message=n.error.message,t.name=n.error.code.toString(),i(t);case 6:return this.refreshPackageId(),_.logDebug("4. subscribe callback then send fetch: ".concat(this.packageId)),t=(new Date).getTime(),(0,b.logDebug)("ConnectTime--subscribe callback->",t-this.timeLog),e.next=11,this.sendFetchAndConsumeMessages(this.packageId.toString(),a);case 11:o();case 12:case"end":return e.stop()}},e,this)}))}),_.logDebug("3. login callback then send subscribe: ".concat(this.packageId)),t=(new Date).getTime(),(0,b.logDebug)("ConnectTime---login callback->",t-this.timeLog),e.next=11,this.connector.send(function(){return u(r,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _.logDebug("CONNECT: reconnect before send"),e.next=3,this.connector.connect();case 3:case"end":return e.stop()}},e,this)}))},{id:this.packageId.toString(),jsonrpc:h.CONNECT_JSONRPC_VER,method:s.CONNECT_METHOD_SUB,params:{topic:a}});case 11:case"end":return e.stop()}},e,this)}))}),_.logDebug("2. login called"),e.next=7,this.connector.send(function(){return u(r,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _.logDebug("CONNECT: reconnect before send"),e.next=3,this.connector.connect();case 3:case"end":return e.stop()}},e,this)}))},{id:this.packageId.toString(),jsonrpc:h.CONNECT_JSONRPC_VER,method:s.CONNECT_METHOD_LOGIN,params:{token:n}});case 7:this.connector.addPackageParse(function(e){var t;_.logDebug("connect: parse package"),_.logDebug(e),"params"in e&&"data"in e.params?(void 0!==(t=null==(t=e.params.data)?void 0:t.message)&&(t=t.replace(/'/g,'"'),"string"!=typeof(t=(0,y.safeJsonParse)(t)))&&"clientId"in t&&t.clientId&&0<t.clientId.length&&(r.connectedWalletPK=t.clientId,_.logDebug("this.connectedWalletPK addPackageParse ".concat(r.connectedWalletPK)),r.connectStorage.saveContent(r.connectedWalletPK,c.OKXCONNECTOR_CRYPTO_SENDER_PK_CACHE),r.saveCryptoKeyPair(r.crypto.stringifyKeypair())),r.parsePackage(e,e.method===s.CONNECT_METHOD_RECEIVE)):r.parsePackage(e,!0)});case 8:case"end":return e.stop()}},e,this)}))}),r.connector.connect()})));case 9:case"end":return e.stop()}},e)})()})}},{key:"disconnect",value:function(){return u(this,arguments,void 0,function(){var t=this,n=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return _regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.connector.disconnect();case 2:t.connectStorage.clearCache(c.OKXCONNECTOR_TOKEN_CACHE),n||(t.connectStorage.clearCache(c.OKXCONNECTOR_CRYPTO_SENDER_PK_CACHE),t.connectedWalletPK="");case 4:case"end":return e.stop()}},e)})()})}},{key:"addListener",value:function(e,t,n){var r=this;this.connector.addListener((0,y.safeJsonStringify)(e),function(e){var t;if(e=e.replace(/'/g,'"'),_.logDebug("addListener ===> ".concat(e)),void 0!==e)return t=(e=(0,y.safeJsonParse)(e)).message,e.clientId&&0<e.clientId.length&&(r.connectedWalletPK=e.clientId,r.connectStorage.saveContent(r.connectedWalletPK,c.OKXCONNECTOR_CRYPTO_SENDER_PK_CACHE),_.logDebug("this.connectedWalletPK addListener ".concat(r.connectedWalletPK)),r.saveCryptoKeyPair(r.crypto.stringifyKeypair())),e=r.crypto.decrypt(t,r.connectedWalletPK),_.logDebug("addListener ===> ".concat(e)),e},t,n)}},{key:"send",value:function(o){return u(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n,r=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(_.logDebug("messagesend =====> ".concat(o)),this.isWalletPKReady()){e.next=2;break}throw new Error("connection not finish");case 2:return t=this.crypto.encrypt(o,this.connectedWalletPK),n=this.connectStorage.getItem(c.OKXCONNECTOR_TOKEN_CACHE),this.refreshPackageId(),n={id:this.packageId.toString(),method:s.CONNECT_METHOD_PUBLISH,jsonrpc:h.CONNECT_JSONRPC_VER,params:{message:{messageId:Date.now().toString(),topic:null==n?void 0:n.content,message:t,ttl:h.OKXCONNECTOR_MESSAGE_TTL}}},this.events.once(this.packageId.toString(),function(t){return u(r,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t&&t.error?_.logError("@".concat((new Date).toUTCString()," >>> failed when send msg")):t&&!t.error&&_.logDebug("CONNECTION @[".concat((new Date).toUTCString(),"] >>> send msg with id ").concat(this.packageId," successed"));case 1:case"end":return e.stop()}},e,this)}))}),e.next=8,this.connector.send(function(){return u(r,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _.logDebug("CONNECT: reconnect before send"),e.next=3,this.connector.connect();case 3:case"end":return e.stop()}},e,this)}))},n);case 8:return e.abrupt("return",this.packageId);case 9:case"end":return e.stop()}},e,this)}))}},{key:"sendACK",value:function(e,t){return u(this,arguments,void 0,function(n,r){var o=this,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;return _regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!0===r)return t={id:n,jsonrpc:h.CONNECT_JSONRPC_VER,result:!0},e.next=4,o.connector.send(function(){return u(o,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _.logDebug("CONNECT: reconnect before send"),e.next=3,this.connector.connect();case 3:case"end":return e.stop()}},e,this)}))},t);e.next=6;break;case 4:e.next=10;break;case 6:if(i)return t={id:n,jsonrpc:h.CONNECT_JSONRPC_VER,error:{code:i.code,message:i.message}},e.next=10,o.connector.send(function(){return u(o,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _.logDebug("CONNECT: reconnect before send"),e.next=3,this.connector.connect();case 3:case"end":return e.stop()}},e,this)}))},t);e.next=10;break;case 10:case"end":return e.stop()}},e)})()})}},{key:"sendReceive",value:function(r,o,i){return u(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t={id:r,jsonrpc:h.CONNECT_JSONRPC_VER,method:s.CONNECT_METHOD_RECEIVE,params:{data:{messageId:o,topic:i}}},e.next=3,this.connector.send(function(){return u(n,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _.logDebug("CONNECT: reconnect before send"),e.next=3,this.connector.connect();case 3:case"end":return e.stop()}},e,this)}))},t);case 3:case"end":return e.stop()}},e,this)}))}},{key:"sendFetchAndConsumeMessages",value:function(r,c){return u(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.events.once(r,function(s){return u(n,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n,r,o,i,a;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!s.result){e.next=23;break}if(n=s.result.hasMore,!(r=s.result.data)){e.next=16;break}o=0;case 4:if(o<r.length){if(i=r[o],a=i.messageId,e.t0=i.topic==c,e.t0)return e.next=10,this.connector.getMsgPayloadFromHistory(i);e.next=13}else e.next=16;break;case 10:return this.refreshPackageId(),e.next=13,this.sendReceive(this.packageId.toString(),a,c);case 13:o++,e.next=4;break;case 16:if(e.t1=n,e.t1)return this.refreshPackageId(),e.next=21,this.sendFetchAndConsumeMessages(this.packageId.toString(),c);e.next=21;break;case 21:e.next=24;break;case 23:_.logDebug("CONNECT: get error rsp ".concat(null==(i=s.error)?void 0:i.code," : ").concat(null==(t=s.error)?void 0:t.message));case 24:case"end":return e.stop()}},e,this)}))}),_.logDebug("5. send fetch more"),t=(new Date).getTime(),(0,b.logDebug)("ConnectTime---5->",t-this.timeLog),t={id:r,jsonrpc:h.CONNECT_JSONRPC_VER,method:s.CONNECT_METHOD_FETCHMSG,params:{data:{topic:c}}},e.next=6,this.connector.send(function(){return u(n,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return _.logDebug("CONNECT: reconnect before send"),e.next=3,this.connector.connect();case 3:case"end":return e.stop()}},e,this)}))},t);case 6:case"end":return e.stop()}},e,this)}))}},{key:"cleanCache",value:function(){return u(this,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.connectStorage.clearCache();case 1:case"end":return e.stop()}},e,this)}))}}]))()},8538:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectorState=t.CONNECT_JSONRPC_VER=t.OKXCONNECTOR_MESSAGE_TTL=t.OKXCONNECTOR_WS_URL=t.EVENT_EMITTER_MAX_LISTENERS=void 0,t.EVENT_EMITTER_MAX_LISTENERS=10,t.OKXCONNECTOR_WS_URL="wss://wsdex.okx.com/ws/v1/wallet-connect-relay",t.OKXCONNECTOR_MESSAGE_TTL=3e5,t.CONNECT_JSONRPC_VER="2.0",t.ConnectorState={InitState:0,Connecting:1,Connected:2,Disconnected:3,OnError:4}},3961:function(e,t,n){var r=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((c=c.apply(e,a||[])).next())})},s=(Object.defineProperty(t,"__esModule",{value:!0}),t.Engine=void 0,n(3110)),c=n(3781),u=n(2082);t.Engine=(()=>_createClass(function e(t){var n=this;_classCallCheck(this,e),this.pendingRequests=new Map,this.disconnectListener=[],this.connectionManager=t,this.connectionManager.addListener("sdk_response",function(e,t){t=(0,c.safeJsonParse)(t),(0,u.logDebug)("Engine ==>> addListener ==> success ==> ".concat(t)),n.handleResponse(e,t)},function(){})},[{key:"addDisconnectListener",value:function(e){this.disconnectListener.push(e)}},{key:"disconnect",value:function(){(0,u.logDebug)("Engine ==>> disconnect"),this.pendingRequests.clear()}},{key:"getRequestId",value:function(){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=Date.now().toString(),e.abrupt("return",((0,u.logDebug)("Engine ==>> getRequestId ==>",t),t));case 2:case"end":return e.stop()}},e)}))}},{key:"bindRequestForPromise",value:function(e,t){this.pendingRequests.set(e,t)}},{key:"send",value:function(o,i,a){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n,r=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getRequestId();case 2:return t=e.sent,e.next=5,(0,s.callForSuccess)(function(){return r.connectionManager.send(JSON.stringify(Object.assign(Object.assign({},o),{requestId:t})))},a);case 5:n=e.sent,this.connectionManager.events.once(n.toString(),function(e){(0,u.logDebug)("Engine ==> send => onAck => ".concat((0,c.safeJsonStringify)(e))),e&&e.result&&null!=(e=i.onAck)&&e.call(i)}),i.resolve&&this.bindRequestForPromise(t,i.resolve);case 7:case"end":return e.stop()}},e,this)}))}},{key:"handleResponse",value:function(e,t){var n,r;(0,u.logDebug)("Engine ==>> handleResponse_1 ======>response: ".concat((0,c.safeJsonStringify)(t))),"requestId"in t&&((0,u.logDebug)("Engine ==>> handleResponse_2 ===> in response"),n=t.requestId,(r=this.pendingRequests.get(n))?((0,u.logDebug)("Engine ==>> handleResponse_3 ===> find resolve:",r),r(t),this.pendingRequests.delete(n)):((0,u.logDebug)("Engine ==>> handleResponse_3 ===> not find resolve:"),"disconnect"===t.method&&(this.disconnectListener.forEach(function(e){return e()}),this.disconnectListener=[],this.disconnect())))}}]))()},7298:function(e,u,t){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((c=c.apply(e,a||[])).next())})},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},s=(Object.defineProperty(u,"__esModule",{value:!0}),u.MULTICODEC_ED25519_LENGTH=u.MULTICODEC_ED25519_HEADER=u.MULTICODEC_ED25519_BASE=u.MULTICODEC_ED25519_ENCODING=u.DID_METHOD=u.DID_PREFIX=u.DID_DELIMITER=u.KEY_PAIR_SEED_LENGTH=u.DATA_ENCODING=u.JSON_ENCODING=u.JWT_ENCODING=u.JWT_DELIMITER=u.JWT_IRIDIUM_TYP=u.JWT_IRIDIUM_ALG=u.JWTHeaderType=void 0,u.generateKeyPair=function(){return d.default.sign.keyPair()},u.decodeJSON=g,u.encodeJSON=v,u.encodeIss=y,u.decodeIss=_,u.encodeSig=b,u.decodeSig=w,u.encodeData=E,u.decodeData=function(e){e=(0,c.toString)(e,u.DATA_ENCODING).split(u.JWT_DELIMITER);return{header:g(e[0]),payload:g(e[1])}},u.encodeJWT=m,u.decodeJWT=O,u.signJWT=function(e,t,n,r){return a(this,arguments,void 0,function(o,i,a,s){var c=4<arguments.length&&void 0!==arguments[4]?arguments[4]:Math.floor(Date.now());return _regeneratorRuntime().mark(function e(){var t,n,r;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t={alg:u.JWT_IRIDIUM_ALG,typ:u.JWT_IRIDIUM_TYP},n={iss:y(s.publicKey),sub:o,aud:i,act:"authenticate user",iat:c,exp:c+a},r=E({header:t,payload:n}),p.logDebug("get sec kp: ".concat(s.secretKey," {").concat(s.secretKey.length,"}")),e.abrupt("return",m({header:t,payload:n,signature:d.default.sign.detached(r,s.secretKey)}));case 3:case"end":return e.stop()}},e)})()})},u.verifyJWT=function(i){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n,r,o;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=O(i),o=r.header,t=r.payload,n=r.data,r=r.signature,o.alg!==u.JWT_IRIDIUM_ALG||o.typ!==u.JWT_IRIDIUM_TYP)throw new Error("JWT must use EdDSA algorithm");e.next=3;break;case 3:return o=_(t.iss),e.abrupt("return",s.verify(o,n,r));case 5:case"end":return e.stop()}},e)}))},n(t(4904))),c=t(7302),f=t(4117),h=t(3781),l=t(1665),d=i(t(8947)),p=n(t(2082));function g(e){return(0,h.safeJsonParse)((0,c.toString)((0,f.fromString)(e,u.JWT_ENCODING),u.JSON_ENCODING))}function v(e){return(0,c.toString)((0,f.fromString)((0,h.safeJsonStringify)(e),u.JSON_ENCODING),u.JWT_ENCODING)}function y(e){p.logDebug("publicKey: ".concat((0,l.toHexString)(e)));e=(0,c.toString)(e,u.MULTICODEC_ED25519_ENCODING);return[u.DID_PREFIX,u.DID_METHOD,e].join(u.DID_DELIMITER)}function _(e){var e=_slicedToArray(e.split(u.DID_DELIMITER),3),t=e[0],n=e[2];if(t!==u.DID_PREFIX||e[1]!==u.DID_METHOD)throw new Error('Issuer must be a DID with method "key"');t=(0,f.fromString)(n,u.MULTICODEC_ED25519_ENCODING);if(t.length!==u.MULTICODEC_ED25519_LENGTH)throw new Error("Issuer must be a public key with length 32 bytes");return t}function b(e){return(0,c.toString)(e,u.JWT_ENCODING)}function w(e){return(0,f.fromString)(e,u.JWT_ENCODING)}function E(e){return(0,f.fromString)([v(e.header),v(e.payload)].join(u.JWT_DELIMITER),u.DATA_ENCODING)}function m(e){return[v(e.header),v(e.payload),b(e.signature)].join(u.JWT_DELIMITER)}function O(e){e=e.split(u.JWT_DELIMITER);return{header:g(e[0]),payload:g(e[1]),signature:w(e[2]),data:(0,f.fromString)(e.slice(0,2).join(u.JWT_DELIMITER),u.DATA_ENCODING)}}u.JWTHeaderType="dapp",u.JWT_IRIDIUM_ALG="EdDSA",u.JWT_IRIDIUM_TYP="JWT",u.JWT_DELIMITER=".",u.JWT_ENCODING="base64url",u.JSON_ENCODING="utf8",u.DATA_ENCODING="utf8",u.KEY_PAIR_SEED_LENGTH=32,u.DID_DELIMITER=":",u.DID_PREFIX="did",u.DID_METHOD="key",u.MULTICODEC_ED25519_ENCODING="base58btc",u.MULTICODEC_ED25519_BASE="z",u.MULTICODEC_ED25519_HEADER="K36",u.MULTICODEC_ED25519_LENGTH=32},3025:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.OKXCONNECTOR_JWT_TTL=t.OKXCONNECTOR_JWT_SIDE=void 0,t.OKXCONNECTOR_JWT_SIDE="wallet",t.OKXCONNECTOR_JWT_TTL=864e5},7854:function(e,t,n){var i=n(8287).Buffer,r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},c=(Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=void 0,n(8829)),u=s(n(8947)),f=n(1665),h=n(1665),l=n(3781),d=a(n(2082)),p=n(1396),g=n(2082),s=(()=>{function o(e){_classCallCheck(this,o);var t=(0,h.resolveLocalStorage)(),t=(this.storeKey="",this.cipherIV="",this.subKey=e,d.logDebug("--------get current local storage --------"),d.logDebug(t),t.getItem(o.cacheKey+e));null==t?(d.logDebug("with no cache"),this.cache={}):(d.logDebug(t),0<(null==t?void 0:t.length)&&(e=(0,l.safeJsonParse)(t),this.cache=e),d.logDebug("get cache obj: ".concat(this.cache)),void 0!==this.cache&&null!=this.cache||(this.cache={}))}return _createClass(o,[{key:"saveContent",value:function(e,t){e={id:2<arguments.length&&void 0!==arguments[2]?arguments[2]:"-",timestamp:Date.now().toString(),content:e};this.saveItem(e,t)}},{key:"saveItem",value:function(e,t){var n=o.cacheKey+this.subKey,r=(0,h.resolveLocalStorage)(),e=(d.logDebug(this.cache),d.logDebug("get cache obj: ".concat(this.cache,", ").concat(t,", ").concat(e)),this.cache[t]=e,(0,l.safeJsonStringify)(this.cache));d.logDebug("STORAGE: ".concat(t," @ ").concat(this.cache)),r.setItem(n,e)}},{key:"getItem",value:function(e){return d.logDebug("STORAGE >> getItem: ".concat(e," @ ").concat(this.cache)),this.cache[e]}},{key:"getCachedPBKDF2InfoKey",value:function(){var e,t,n,r;return 0<this.storeKey.length&&0<(null==(e=this.cipherIV)?void 0:e.length)||((e=null==(e=this.getItem(c.OKXCONNECTOR_STORAGER_CRYPTO_SALT))?void 0:e.content)||(e=(0,f.toHexString)(u.default.randomBytes(24)),this.saveContent(e,c.OKXCONNECTOR_STORAGER_CRYPTO_SALT)),(t=null==(t=this.getItem(c.OKXCONNECTOR_STORAGE_CRYPTO_PASSWORD))?void 0:t.content)||(t=(0,f.toHexString)(u.default.randomBytes(32)),this.saveContent(t,c.OKXCONNECTOR_STORAGE_CRYPTO_PASSWORD)),(r=null==(r=this.getItem(c.OKXCONNECTOR_STORAGE_CRYPTO_CIPHERIV))?void 0:r.content)||(n=i.from(u.default.randomBytes(16)),r=(0,f.toHexString)(n),this.saveContent(r,c.OKXCONNECTOR_STORAGE_CRYPTO_CIPHERIV)),this.cipherIV=r,this.storeKey=(0,p.PBKDF2)(t,e,{iterations:10}).toString()),{pw:this.storeKey,iv:this.cipherIV}}},{key:"encryptStoreMsg",value:function(e,t){(0,g.logDebug)("encryptStoreMsg encryptStoreMsg start ".concat(Date.now()));var n=this.getCachedPBKDF2InfoKey(),e=((0,g.logDebug)("encryptStoreMsg encryptStoreMsg mid ".concat(Date.now())),p.AES.encrypt(e,n.pw).toString());this.saveContent(e,t),(0,g.logDebug)("encryptStoreMsg encryptStoreMsg end ".concat(Date.now()))}},{key:"getAndDecrypt",value:function(e){(0,g.logDebug)("encryptStoreMsg getAndDecrypt start ".concat(Date.now()));var t,e=this.getItem(e);return e&&e.content?(t=this.getCachedPBKDF2InfoKey(),(0,g.logDebug)("encryptStoreMsg getAndDecrypt mid ".concat(Date.now())),e=p.AES.decrypt(e.content,t.pw).toString(p.enc.Utf8),(0,g.logDebug)("encryptStoreMsg getAndDecrypt end ".concat(Date.now())),e):null}},{key:"clearCache",value:function(){var e,t,n,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:void 0;void 0===r?(this.cache={},e=o.cacheKey+this.subKey,localStorage.setItem(e,"")):(e=o.cacheKey+this.subKey,t=(0,h.resolveLocalStorage)(),d.logDebug(this.cache),n=(this.cache[r]=null,l.safeJsonStringify)(this.cache),d.logDebug("STORAGE: clean key ".concat(r," @ ").concat(this.cache)),t.setItem(e,n))}}])})();(t.Storage=s).cacheKey="OKXStorageKey"},8829:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.OKXCONNECTOR_STORAGE_CIPHER_METHOD=t.OKXCONNECTOR_STORAGE_CRYPTO_CIPHERIV=t.OKXCONNECTOR_STORAGER_CRYPTO_SALT=t.OKXCONNECTOR_STORAGE_CRYPTO_PASSWORD=t.OKXCONNECTOR_TON_KEY=t.OKXCONNECTOR_CRYPTO_SENDER_PK_CACHE=t.OKXCONNECTOR_TOKEN_CACHE=t.OKXCONNECTOR_JWT_KEY=t.OKXCONNECTOR_CRYPTO_KEY=t.OKXCONNECTOR_CACHE_KEY=void 0,t.OKXCONNECTOR_CACHE_KEY="ck",t.OKXCONNECTOR_CRYPTO_KEY="cck_k",t.OKXCONNECTOR_JWT_KEY="cjk_k",t.OKXCONNECTOR_TOKEN_CACHE="ct",t.OKXCONNECTOR_CRYPTO_SENDER_PK_CACHE="csp",t.OKXCONNECTOR_TON_KEY="OKXStorage_ctc",t.OKXCONNECTOR_STORAGE_CRYPTO_PASSWORD="scp",t.OKXCONNECTOR_STORAGER_CRYPTO_SALT="scs",t.OKXCONNECTOR_STORAGE_CRYPTO_CIPHERIV="scpc",t.OKXCONNECTOR_STORAGE_CIPHER_METHOD="aes-256-cbc"},4237:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(t,"__esModule",{value:!0}),t.SessionCrypto=void 0,r(n(8947))),i=n(1665);t.SessionCrypto=(()=>_createClass(function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:void 0;_classCallCheck(this,e),this.nonceLength=24,this.sessionKeyPair=t?this.createKeypairFromString(t):this.createKeypair()},[{key:"createKeypair",value:function(){return o.default.box.keyPair()}},{key:"createKeypairFromString",value:function(e){return{publicKey:(0,i.hexToByteArray)(e.publicKey),secretKey:(0,i.hexToByteArray)(e.secretKey)}}},{key:"createNonce",value:function(){return o.default.randomBytes(this.nonceLength)}},{key:"keyPair",get:function(){return this.sessionKeyPair}},{key:"encrypt",value:function(e,t){var e=(new TextEncoder).encode(e),n=this.createNonce(),e=o.default.box(e,n,(0,i.hexToByteArray)(t),this.keyPair.secretKey),t=(0,i.toHexString)((0,i.concatUint8Arrays)(n,e)),n=(new TextEncoder).encode(t);return(0,i.base64encode)(n,!1)}},{key:"decrypt",value:function(e,t){var n=(0,i.base64decode)(e,!0).toUint8Array(),n=_slicedToArray((0,i.splitToUint8Arrays)(n,this.nonceLength),2),r=n[0],n=o.default.box.open(n[1],r,(0,i.hexToByteArray)(t),this.keyPair.secretKey);if(n)return(new TextDecoder).decode(n);throw new Error("Decryption error: \n message: ".concat(e.toString()," \n sender pubkey: ").concat(t.toString()," \n keypair pubkey: ").concat(this.keyPair.publicKey.toString()," \n keypair secretkey: ").concat(this.keyPair.secretKey.toString()))}},{key:"stringifyKeypair",value:function(){return{publicKey:(0,i.toHexString)(this.keyPair.publicKey),secretKey:(0,i.toHexString)(this.keyPair.secretKey)}}}]))()},9118:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.OKX_CONNECT_ERROR_CODES=t.OkxConnectError=void 0;var r=n(243);Object.defineProperty(t,"OkxConnectError",{enumerable:!0,get:function(){return r.OkxConnectError}}),Object.defineProperty(t,"OKX_CONNECT_ERROR_CODES",{enumerable:!0,get:function(){return r.OKX_CONNECT_ERROR_CODES}})},243:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.OKX_CONNECT_ERROR_CODES=t.OkxConnectError=void 0;var o,n=(()=>{function r(e,t){var n;return _classCallCheck(this,r),(n=_callSuper(this,r,[t=null==t?e==o.UNKNOWN_ERROR?"unknown error":e==o.BAD_REQUEST_ERROR?"bad request error":e==o.ALREADY_CONNECTED_ERROR?"already connected error":e==o.NOT_CONNECTED_ERROR?"not connected error":e==o.UNKNOWN_APP_ERROR?"unknown app error":e==o.USER_REJECTS_ERROR?"user rejects error":e==o.METHOD_NOT_SUPPORTED?"method not supported":"unknown error":t])).code=e,n.message="".concat(r.prefix," ").concat(t?"\n"+t:""),Object.setPrototypeOf(_assertThisInitialized(n),r.prototype),n}return _inherits(r,_wrapNativeSuper(Error)),_createClass(r)})();(t.OkxConnectError=n).prefix="[OKX_CONNECT_SDK_ERROR]",(n=o||(t.OKX_CONNECT_ERROR_CODES=o={}))[n.UNKNOWN_ERROR=0]="UNKNOWN_ERROR",n[n.BAD_REQUEST_ERROR=1]="BAD_REQUEST_ERROR",n[n.ALREADY_CONNECTED_ERROR=11]="ALREADY_CONNECTED_ERROR",n[n.NOT_CONNECTED_ERROR=12]="NOT_CONNECTED_ERROR",n[n.UNKNOWN_APP_ERROR=100]="UNKNOWN_APP_ERROR",n[n.USER_REJECTS_ERROR=300]="USER_REJECTS_ERROR",n[n.METHOD_NOT_SUPPORTED=400]="METHOD_NOT_SUPPORTED"},1607:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(9118),t)},3110:function(e,t){var n=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((c=c.apply(e,a||[])).next())})};function s(o,i){return n(this,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,t){var n,r;null!=(n=null==i?void 0:i.signal)&&n.aborted?t(new Error("Delay aborted")):(r=setTimeout(function(){return e()},o),null!=(n=null==i?void 0:i.signal)&&n.addEventListener("abort",function(){clearTimeout(r),t(new Error("Delay aborted"))}))}));case 1:case"end":return e.stop()}},e)}))}Object.defineProperty(t,"__esModule",{value:!0}),t.callForSuccess=function(i,a){return n(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n,r,o;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=null!=(t=null==a?void 0:a.attempts)?t:3,n=null!=(n=null==a?void 0:a.delayMs)?n:800,"function"!=typeof i)throw new Error("Expected a function, got "+_typeof(i));e.next=3;break;case 3:o=0;case 4:if(o<t)return e.prev=5,e.next=8,i();e.next=21;break;case 8:return e.abrupt("return",e.sent);case 11:if(e.prev=11,e.t0=e.catch(5),r=e.t0,o++,e.t1=o<t,e.t1)return e.next=19,s(n);e.next=19;break;case 19:e.next=4;break;case 21:throw r;case 22:case"end":return e.stop()}},e,null,[[5,11]])}))},t.delay=s},9160:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.generateOKXLink=function(e){e='{ "protocolVer":1, "channelId":"'.concat(e.channelId,'", "clientId":"').concat(e.clientId,'", "dAppInfo":{ "url":"url", "name":"testApp", "iconUrl":"url" }, "requestId":"').concat(e.requestId,'", "requests":[ { "name":"ton_addr" }, { "name":"ton_proof", "payload":"').concat(e.testPayload,'"}], "redirect":"').concat(e.redirect,'" }');return"https://www.okx.com/download?deeplink=okx%3A%2F%2Fweb3%2Fwallet%2Fconnect%3Fparam%3D".concat(r.Buffer.from(e).toString("base64"))};var r=n(8287)},2082:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.logDebug=function(){if("undefined"!=typeof console)try{for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];o&&(e=console).debug.apply(e,["[OKX_CONNECT_SDK]"].concat(n))}catch(n){}},t.logError=function(){if("undefined"!=typeof console)try{for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).error.apply(e,["[OKX_CONNECT_SDK]"].concat(n))}catch(n){}};var o=!(t.logWarning=function(){if("undefined"!=typeof console)try{for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).warn.apply(e,["[OKX_CONNECT_SDK]"].concat(n))}catch(n){}})},3781:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.safeJsonParse=function(t){if("string"!=typeof t)throw(0,r.logDebug)(t),new Error("Cannot safe json parse value of type "+_typeof(t));try{return i(t)}catch(e){return console.error("safeJsonParse error:",e),t}},t.safeJsonStringify=function(e){return"string"==typeof e?e:o(e)||""};var r=n(2082),o=function(e){return JSON.stringify(e,function(e,t){return"bigint"==typeof t?t.toString()+"n":t})},i=function(e){e=e.replace(/(?<!")(?<=:)\b(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))(?=[,\}\]]|$)/g,function(e){return'"'.concat(e,'n"')});return JSON.parse(e,function(e,t){return"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t})}},4073:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.removeUrlLastSlash=o,t.addPathToUrl=function(e,t){return o(e)+"/"+t},t.getUniversalLink=i,t.openOKXDeeplinkWithFallback=function(e){var t=i(e);!/iPad|iPhone|iPod/.test(navigator.userAgent)||window.MSStream?(console.log("android:",window.TelegramWebviewProxy,t),window.TelegramWebviewProxy?window.open(e):window.location.href=e):-1!=window.location.href.indexOf("oker.fit")?window.location.href=e:window.open(t,"_self")};var r=n(2058);function o(e){return"/"===e.slice(-1)?e.slice(0,-1):e}function i(e){e=encodeURIComponent(e);return"".concat(r.standardUniversalLink,"?deeplink=").concat(e)}},1665:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},o=(Object.defineProperty(t,"__esModule",{value:!0}),t.RANDOM_LENGTH=t.isBrowser=t.resolveLocalStorage=t.hasLocalStorage=t.hasBuiltInWebSocket=t.resolveWebSocketImplementation=void 0,t.hexToByteArray=function(e){if(e.length%2!=0)throw new Error("Cannot convert ".concat(e," to bytesArray"));for(var t=new Uint8Array(e.length/2),n=0;n<e.length;n+=2)t[n/2]=parseInt(e.slice(n,n+2),16);return t},t.toHexString=function(e){var t="";return e.forEach(function(e){t+=("0"+(255&e).toString(16)).slice(-2)}),t},t.concatUint8Arrays=function(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n},t.splitToUint8Arrays=function(e,t){if(t>=e.length)throw new Error("Index is out of buffer");return[e.slice(0,t),e.slice(t)]},t.base64encode=function(e,t){e=e instanceof Uint8Array?e:("string"!=typeof e&&(e=(0,u.safeJsonStringify)(e)),i.default.decodeUTF8(e));return e=i.default.encodeBase64(e),t?encodeURIComponent(e):e},t.base64decode=function(e,t){n=e,t&&(n=decodeURIComponent(e));var n,r=i.default.decodeBase64(n);return{toString:function(){return i.default.encodeUTF8(r)},toObject:function(){try{return(0,u.safeJsonParse)(i.default.encodeUTF8(r))}catch(e){return null}},toUint8Array:function(){return r}}},t.checkWSUrl=function(e){var e=e.match(new RegExp(/^\w+:/,"gi"));return!(!e||!e.length)&&(e=e[0],new RegExp("^wss?:").test(e))},t.hashKey=d,t.generateRandomBytes32=p,t.generateTopic=function(){var e=p();return(0,h.logDebug)("generate topic called ".concat(e)),d((0,s.toString)(e,l))},t.generateDeepLink=function(e){return(0,f.generateOKXLink)(e)},t.isIos=function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream},r(n(8947))),i=r(n(6386)),a=n(4117),s=n(7302),c=n(204),u=n(3781),f=n(9160),h=n(2082),l="base16";function d(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:l,e=((0,h.logDebug)("hash key called ".concat(e)),(0,c.hash)((0,a.fromString)(e,t)));return(0,s.toString)(e,t)}function p(){return o.default.randomBytes(t.RANDOM_LENGTH)}t.resolveWebSocketImplementation=function(){return"undefined"!=typeof WebSocket?WebSocket:void 0!==n.g&&void 0!==n.g.WebSocket?n.g.WebSocket:"undefined"!=typeof window&&void 0!==window.WebSocket?window.WebSocket:"undefined"!=typeof self&&void 0!==self.WebSocket?self.WebSocket:n(1591)},t.hasBuiltInWebSocket=function(){return"undefined"!=typeof WebSocket||void 0!==n.g&&void 0!==n.g.WebSocket||"undefined"!=typeof window&&void 0!==window.WebSocket||"undefined"!=typeof self&&void 0!==self.WebSocket},t.hasLocalStorage=function(){return void 0!==n.g&&void 0!==n.g.localStorage||"undefined"!=typeof window&&void 0!==window.localStorage},t.resolveLocalStorage=function(){return void 0!==n.g&&void 0!==n.g.localStorage?n.g.localStorage:"undefined"!=typeof window&&void 0!==window.localStorage?window.localStorage:localStorage},t.isBrowser=function(){return"undefined"!=typeof window},t.RANDOM_LENGTH=32},2058:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.standardDeeplink=t.standardUniversalLink=t.tonConnectSdkVersion=void 0,t.tonConnectSdkVersion="1",t.standardUniversalLink="https://www.okx.com/download",t.standardDeeplink="okx://web3/wallet/connect"},5056:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)},i=(Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,n(1934));Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i.OKXTonConnect}}),o(n(9391),t),o(n(8015),t)},9852:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},2237:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(1007),t),o(n(9852),t)},1007:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},9391:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(1825),t),o(n(3318),t),o(n(2237),t),o(n(2399),t)},8335:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},3318:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(8335),t),o(n(7260),t)},7260:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},2399:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(4836),t),o(n(2839),t)},7663:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CONNECT_ITEM_ERROR_CODES=void 0,t.CONNECT_ITEM_ERROR_CODES={UNKNOWN_ERROR:0,0:"UNKNOWN_ERROR",METHOD_NOT_SUPPORTED:400,400:"METHOD_NOT_SUPPORTED"}},4836:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CONNECT_ITEM_ERROR_CODES=void 0;var r=n(7663);Object.defineProperty(t,"CONNECT_ITEM_ERROR_CODES",{enumerable:!0,get:function(){return r.CONNECT_ITEM_ERROR_CODES}})},9051:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DISCONNECT_ERROR_CODES=void 0,t.DISCONNECT_ERROR_CODES={UNKNOWN_ERROR:0,0:"UNKNOWN_ERROR",BAD_REQUEST_ERROR:1,1:"BAD_REQUEST_ERROR",UNKNOWN_APP_ERROR:100,100:"UNKNOWN_APP_ERROR",METHOD_NOT_SUPPORTED:400,400:"METHOD_NOT_SUPPORTED"}},2839:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DISCONNECT_ERROR_CODES=t.SIGN_DATA_ERROR_CODES=void 0;var r=n(3753),o=(Object.defineProperty(t,"SIGN_DATA_ERROR_CODES",{enumerable:!0,get:function(){return r.SIGN_DATA_ERROR_CODES}}),n(9051));Object.defineProperty(t,"DISCONNECT_ERROR_CODES",{enumerable:!0,get:function(){return o.DISCONNECT_ERROR_CODES}})},3753:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SIGN_DATA_ERROR_CODES=void 0,t.SIGN_DATA_ERROR_CODES={UNKNOWN_ERROR:0,0:"UNKNOWN_ERROR",BAD_REQUEST_ERROR:1,1:"BAD_REQUEST_ERROR",UNKNOWN_APP_ERROR:100,100:"UNKNOWN_APP_ERROR",USER_REJECTS_ERROR:300,300:"USER_REJECTS_ERROR",METHOD_NOT_SUPPORTED:400,400:"METHOD_NOT_SUPPORTED"}},8748:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CHAIN=void 0,(t.CHAIN={}).MAINNET="-239"},1825:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CHAIN=void 0;var r=n(8748);Object.defineProperty(t,"CHAIN",{enumerable:!0,get:function(){return r.CHAIN}})},4146:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RpcParser=void 0,t.RpcParser=(()=>_createClass(function e(){_classCallCheck(this,e)},[{key:"isError",value:function(e){return"error"in e}}]))()},214:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sendTransactionParser=void 0;var r=n(4146),n=(()=>{function e(){return _classCallCheck(this,e),_callSuper(this,e,arguments)}return _inherits(e,r.RpcParser),_createClass(e,[{key:"convertToRpcRequest",value:function(e){return{method:"ton_sendTransaction",params:e}}},{key:"convertFromRpcResponse",value:function(e){return{boc:e.result.toString()}}}])})();t.sendTransactionParser=new n},1748:function(e,t,n){var r=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((c=c.apply(e,a||[])).next())})},o=(Object.defineProperty(t,"__esModule",{value:!0}),t.BridgeConnectionStorage=void 0,n(243)),i=n(2082);t.BridgeConnectionStorage=(()=>_createClass(function e(t){_classCallCheck(this,e),this.storage=t,this.storeKey="ton_connect_info"},[{key:"storeConnection",value:function(t){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",((0,i.logDebug)("BridgeConnectionStorage ==>> storeConnection ==>> connection:",t),this.storage.saveContent(JSON.stringify(t),this.storeKey)));case 1:case"end":return e.stop()}},e,this)}))}},{key:"removeConnection",value:function(){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",((0,i.logDebug)("BridgeConnectionStorage ==>> removeConnection"),this.storage.clearCache(this.storeKey)));case 1:case"end":return e.stop()}},e,this)}))}},{key:"getConnection",value:function(){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.storage.getItem(this.storeKey),(0,i.logDebug)("BridgeConnectionStorage ==>> getConnection ==>>this.storage: ",this.storage),t&&null!=t&&t.content){e.next=3;break}return e.abrupt("return",null);case 3:if(e.prev=3,n=null==t?void 0:t.content)return e.abrupt("return",(n=JSON.parse(n),(0,i.logDebug)("BridgeConnectionStorage ==>> getConnection ==>>connection: ",n),n));e.next=7;break;case 7:return e.abrupt("return",null);case 10:return e.prev=10,e.t0=e.catch(3),e.abrupt("return",null);case 13:case"end":return e.stop()}},e,this,[[3,10]])}))}},{key:"getHttpConnection",value:function(){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getConnection();case 2:if(t=e.sent){e.next=5;break}throw new o.OkxConnectError(o.OKX_CONNECT_ERROR_CODES.UNKNOWN_ERROR,"Trying to read HTTP connection source while nothing is stored");case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}},e,this)}))}},{key:"storeLastWalletEventId",value:function(n){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getConnection();case 2:if((t=e.sent)&&"connectEvent"in t)return e.abrupt("return",(t.lastWalletEventId=n,this.storeConnection(t)));e.next=5;break;case 5:case"end":return e.stop()}},e,this)}))}},{key:"getLastWalletEventId",value:function(){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getConnection();case 2:if((t=e.sent)&&"lastWalletEventId"in t)return e.abrupt("return",t.lastWalletEventId);e.next=5;break;case 5:case"end":return e.stop()}},e,this)}))}}]))()},2309:function(e,t,n){var a=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((c=c.apply(e,a||[])).next())})},i=(Object.defineProperty(t,"__esModule",{value:!0}),t.BridgeProvider=void 0,n(6455)),s=n(1748),f=n(4073),h=n(2082),r=n(5832),l=n(2058),c=n(3961),d=n(8287),p=n(1607),g=n(1665),n=(()=>{function o(e){_classCallCheck(this,o),this.storage=e,this.type="http",this.listeners=[],this.connectManager=new r.ConnectionManager,this.walletConnectionSource={universalLink:l.standardUniversalLink},this.engine=new c.Engine(this.connectManager),this.openUniversalLink=!1,this.connectionStorage=new s.BridgeConnectionStorage(e)}return _createClass(o,[{key:"connect",value:function(s,c,u){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n,r,o,i,a;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(0,h.logDebug)("bridge-provider ==>> connect_1 ==>>message:",s),(0,h.logDebug)("bridge-provider ==>> connect_1 ==>>redirect:",c),(0,h.logDebug)("bridge-provider ==>> connect_1 ==>>openUniversalLink:",u),e.prev=1,r=this.connectManager.getConnectInfo(),e.next=5,this.engine.getRequestId();case 5:return o=e.sent,this.openUniversalLink=u,i={protocolVer:Number(l.tonConnectSdkVersion),topic:r.channelId,clientId:r.clientId,requestId:o,dAppInfo:s.dappInfo,requests:s.items,redirect:null!=c?c:"none"},i=JSON.stringify(i),i=d.Buffer.from(i).toString("base64"),i="".concat(l.standardDeeplink,"?param=").concat(i),(0,h.logDebug)("bridge-provider ==>> connect_2 ==>>fullUrl:",i),e.next=11,this.connectionStorage.storeConnection({type:"http",connectionSource:this.walletConnectionSource,channelId:r.channelId,openUniversalLink:u});case 11:return(a=(0,g.isIos)())&&null!==u&&!0===u&&(0,f.openOKXDeeplinkWithFallback)(i),e.next=15,null==(t=this.connectManager)?void 0:t.disconnect(!1);case 15:return null!=(t=this.engine)&&t.bindRequestForPromise(o,this.connectListener.bind(this)),null!=(n=this.engine)&&n.addDisconnectListener(this.disconnectListener.bind(this)),e.next=19,this.connectManager.connect();case 19:return a||null!==u&&!0===u&&(0,f.openOKXDeeplinkWithFallback)(i),e.abrupt("return",(0,f.getUniversalLink)(i));case 23:throw e.prev=23,e.t0=e.catch(1),console.error("Error connecting:",e.t0),new p.OkxConnectError(p.OKX_CONNECT_ERROR_CODES.UNKNOWN_ERROR,"connect error");case 26:case"end":return e.stop()}},e,this,[[1,23]])}))}},{key:"listen",value:function(t){var e=this;return this.listeners.push(t),function(){return e.listeners=e.listeners.filter(function(e){return e!==t})}}},{key:"disconnectListener",value:function(){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(0,h.logDebug)("bridge-provider ==>> disconnectListener"),t={event:"disconnect",requestId:Number(1),payload:{}},this.listeners.forEach(function(e){return e(t)}),e.next=5,this.closeConnection();case 5:case"end":return e.stop()}},e,this)}))}},{key:"connectListener",value:function(f){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n,r,o,i,a,s,c,u;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=f,(0,h.logDebug)("bridge-provider ==>> connectListener_1 ==>>walletMessage:",t),void 0!==t.requestId)return e.next=4,this.connectionStorage.getLastWalletEventId();e.next=7;break;case 4:if(void 0!==(r=e.sent)&&Number(t.requestId)<=r)return e.abrupt("return",void(0,h.logError)("Received event id (=".concat(t.requestId,") must be greater than stored last wallet event id (=").concat(r,") ")));e.next=7;break;case 7:if(n=this.listeners,"connect"===t.method)return r=t.payload.responses.find(function(e){return"ton_addr"===e.name}),a=t.payload.responses.find(function(e){return"ton_proof"===e.name}),o=t.payload.wallet,o={platform:o.platform,appName:o.appName,appVersion:o.appVersion,maxProtocolVersion:o.maxProtocolVersion,features:o.features.ton},i=[],r&&i.push(r),a&&i.push(a),e.next=13,this.connectionStorage.getConnection();e.next=22;break;case 13:return a=e.sent,s={type:"http",lastWalletEventId:Number(t.requestId),connectEvent:{event:"connect",payload:{items:i,device:o}},connectionSource:this.walletConnectionSource,channelId:null==a?void 0:a.channelId,openUniversalLink:null==a?void 0:a.openUniversalLink},(0,h.logDebug)("bridge-provider ==>> connectListener_2 ==>>storeConnection:",s),e.next=18,this.connectionStorage.storeConnection(s);case 18:c={event:"connect",requestId:Number(t.requestId),payload:s.connectEvent.payload},(0,h.logDebug)("bridge-provider ==>> connectListener_3 ==>>listeners.forEach:",c),n.forEach(function(e){return e(c)}),e.next=27;break;case 22:if("connect_error"===t.method)return e.next=25,this.connectionStorage.storeLastWalletEventId(Number(t.requestId));e.next=27;break;case 25:u={event:"connect_error",requestId:Number(t.requestId),payload:t.payload},(0,h.logDebug)("bridge-provider ==>> connectListener_4 ==>>connect_error:",u),n.forEach(function(e){return e(u)});case 27:case"end":return e.stop()}},e,this)}))}},{key:"closeConnection",value:function(){return a(this,arguments,void 0,function(){var n=this,r=0<arguments.length&&void 0!==arguments[0]&&arguments[0],o=1<arguments.length&&void 0!==arguments[1]&&arguments[1];return _regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((0,h.logDebug)("bridge-provider ==>> closeConnection ==>>fromRestore:",r," needOpenUrl:",o),n.listeners=[],e.t0=o,e.t0){e.next=6;break}return e.next=6,null==(t=n.connectManager)?void 0:t.disconnect(r);case 6:if(e.t1=r,e.t1){e.next=11;break}return null!=(t=n.engine)&&t.disconnect(),e.next=11,n.connectionStorage.removeConnection();case 11:case"end":return e.stop()}},e)})()})}},{key:"restoreConnection",value:function(){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n,r;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(0,h.logDebug)("bridge-provider ==>> restoreConnection_1"),e.next=3,this.connectionStorage.getHttpConnection();case 3:if(!(r=e.sent)||(0,i.isPendingConnectionHttp)(r))e.next=26;else{if((0,h.logDebug)("bridge-provider ==>> restoreConnection_2 ==>>storedConnection.channelId:",r.channelId),r.channelId)return e.prev=6,n={event:"connect",requestId:Number(0),payload:r.connectEvent.payload},this.listeners.forEach(function(e){return e(n)}),r=r.channelId,(0,h.logDebug)("bridge-provider ==>> restoreConnection_3 ==>>this.connectManager.restoreConnect:",r),null!=(t=this.engine)&&t.addDisconnectListener(this.disconnectListener.bind(this)),e.next=14,this.connectManager.restoreConnect(r);e.next=23}break;case 14:e.next=21;break;case 16:return e.prev=16,e.t0=e.catch(6),(0,h.logDebug)("bridge-provider ==>> restoreConnection_4 ==>>closeConnection_1"),e.next=21,this.closeConnection();case 21:e.next=26;break;case 23:return(0,h.logDebug)("bridge-provider ==>> restoreConnection_4 ==>>closeConnection_2"),e.next=26,this.closeConnection();case 26:case"end":return e.stop()}},e,this,[[6,16]])}))}},{key:"openOKXWallet",value:function(){(0,h.logDebug)("bridge-provider ==>> openOKXWallet",this.openUniversalLink),this.openUniversalLink&&(0,f.openOKXDeeplinkWithFallback)(l.standardDeeplink)}},{key:"disconnect",value:function(){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",((0,h.logDebug)("bridge-provider ==>> disconnect_1"),new Promise(function(o){return a(t,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n,r=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=!1,n=function(){t||(t=!0,r.closeConnection().then(o))},e.prev=2,e.next=5,this.sendRequest({method:"disconnect"},{onRequestSent:n,attempts:1});case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(2),t||this.closeConnection().then(o);case 10:return e.prev=10,n(),e.finish(10);case 13:case"end":return e.stop()}},e,this,[[2,7,10,13]])}))})));case 1:case"end":return e.stop()}},e)}))}},{key:"sendRequest",value:function(o,i){var e=this;return(0,h.logDebug)("bridge-provider ==>> sendRequest"),new Promise(function(n,r){return a(e,void 0,void 0,_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,null==(t=this.engine)?void 0:t.send(o,{resolve:function(e){n(e)},onAck:function(){var e;null!=(e=null==i?void 0:i.onRequestSent)&&e.call(i)}},{attempts:null==i?void 0:i.attempts});case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),r(e.t0);case 8:case"end":return e.stop()}},e,this,[[0,5]])}))})}}],[{key:"fromStorage",value:function(r){return a(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(0,h.logDebug)("bridge-provider ==>> fromStorage ==>>storage:",r),n=new s.BridgeConnectionStorage(r),e.next=4,n.getHttpConnection();case 4:if(t=e.sent,(0,i.isPendingConnectionHttp)(t))return e.abrupt("return",null);e.next=7;break;case 7:return n=new o(r),e.abrupt("return",(n.openUniversalLink=t.openUniversalLink,n));case 9:case"end":return e.stop()}},e)}))}}])})();t.BridgeProvider=n},6455:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPendingConnectionHttp=function(e){return!("connectEvent"in e)}},1934:function(e,t,n){var r=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((c=c.apply(e,a||[])).next())})},f=this&&this.__rest||function(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n},o=(Object.defineProperty(t,"__esModule",{value:!0}),t.OKXTonConnect=void 0,n(2309)),h=n(7038),i=n(352),l=n(214),a=n(2058),s=n(1748),d=n(2082),p=n(1607),c=n(7854),u=n(8829),g=n(1665);t.OKXTonConnect=(()=>_createClass(function e(t){if(_classCallCheck(this,e),this._wallet=null,this.provider=null,this.statusChangeSubscriptions=[],this.statusChangeErrorSubscriptions=[],this.storage=new c.Storage(u.OKXCONNECTOR_TON_KEY),!t.metaData)throw new p.OkxConnectError(p.OKX_CONNECT_ERROR_CODES.UNKNOWN_ERROR,"dapp metaData can not be null");this.dappSettings={metaData:Object.assign(Object.assign({},t.metaData),{url:window.location.hostname})},this.tracker=new i.TonConnectTracker({tonConnectSdkVersion:a.tonConnectSdkVersion}),this.bridgeConnectionStorage=new s.BridgeConnectionStorage(this.storage)},[{key:"connected",get:function(){return null!==this._wallet}},{key:"account",get:function(){var e;return(null==(e=this._wallet)?void 0:e.account)||null}},{key:"wallet",get:function(){return this._wallet},set:function(e){var t=this;this._wallet=e,this.statusChangeSubscriptions.forEach(function(e){return e(t._wallet)})}},{key:"connect",value:function(n){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((0,d.logDebug)("ton-Connect ==>> connect_1 >> request:",n),this.connected)throw new p.OkxConnectError(p.OKX_CONNECT_ERROR_CODES.ALREADY_CONNECTED_ERROR,"Connected Wallet");e.next=2;break;case 2:return e.next=4,null==(t=this.provider)?void 0:t.closeConnection(!1,!0);case 4:return this.provider=new o.BridgeProvider(this.storage),this.provider.listen(this.walletEventsListener.bind(this)),this.tracker.trackConnectionStarted(),e.next=9,this.provider.connect(this.createConnectRequest(n),null==n?void 0:n.redirect,null==n?void 0:n.openUniversalLink);case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}},e,this)}))}},{key:"walletEventsListener",value:function(e){switch((0,d.logDebug)("ton-Connect ==>> walletEventsListener_1 >> e:",e),e.event){case"connect":this.onWalletConnected(e.payload);break;case"connect_error":this.onWalletConnectError(e.payload);break;case"disconnect":this.onWalletDisconnected("wallet")}}},{key:"onWalletConnected",value:function(e){(0,d.logDebug)("ton-Connect ==>> onWalletConnected_1 >> connectEvent:",e);var t=e.items.find(function(e){return"ton_addr"===e.name}),n=e.items.find(function(e){return"ton_proof"===e.name});if(!t)throw new p.OkxConnectError(p.OKX_CONNECT_ERROR_CODES.UNKNOWN_ERROR,"ton_addr connection item was not found");e={device:e.device,provider:this.provider.type,account:{address:t.address,chain:t.network,walletStateInit:t.walletStateInit,publicKey:t.publicKey}};n&&(e.connectItems={tonProof:n}),this.wallet=e,(0,d.logDebug)("ton-Connect ==>> onWalletConnected_2 >> wallet:",e),this.tracker.trackConnectionCompleted(e)}},{key:"onWalletConnectError",value:function(e){(0,d.logDebug)("ton-Connect ==>> onWalletConnectError_1 >> connectEventError:",e);var t,n=new p.OkxConnectError(e.code,e.message);(0,d.logDebug)("ton-Connect ==>> onWalletConnectError_1 >> error:",n),this.statusChangeErrorSubscriptions.forEach(function(e){return e(n)}),this.tracker.trackConnectionError(null!=(t=e.message)?t:"",e.code)}},{key:"onWalletDisconnected",value:function(e){this.tracker.trackDisconnection(this.wallet,e),this.wallet=null}},{key:"disconnect",value:function(){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if((0,d.logDebug)("ton-Connect ==>> disconnect_1"),this.connected){e.next=2;break}throw new p.OkxConnectError(p.OKX_CONNECT_ERROR_CODES.NOT_CONNECTED_ERROR,"wallet is not connected");case 2:return(0,d.logDebug)("ton-Connect ==>> disconnect_222"),this.onWalletDisconnected("dapp"),e.next=6,null==(t=this.provider)?void 0:t.disconnect();case 6:case"end":return e.stop()}},e,this)}))}},{key:"onStatusChange",value:function(t,n){var e=this;return this.statusChangeSubscriptions.push(t),n&&this.statusChangeErrorSubscriptions.push(n),function(){e.statusChangeSubscriptions=e.statusChangeSubscriptions.filter(function(e){return e!==t}),n&&(e.statusChangeErrorSubscriptions=e.statusChangeErrorSubscriptions.filter(function(e){return e!==n}))}}},{key:"restoreConnection",value:function(){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(0,d.logDebug)("ton-Connect ==>> restoreConnection_1"),this.tracker.trackConnectionRestoringStarted(),n=null,e.prev=2,e.next=5,o.BridgeProvider.fromStorage(this.storage);case 5:n=e.sent,e.next=15;break;case 8:return e.prev=8,e.t0=e.catch(2),this.tracker.trackConnectionRestoringError("Provider is not restored"),e.next=13,this.bridgeConnectionStorage.removeConnection();case 13:return null!=n&&n.closeConnection(),e.abrupt("return",void(n=null));case 15:if(n){e.next=17;break}return e.abrupt("return",((0,d.logError)("Provider is not restored"),void this.tracker.trackConnectionRestoringError("Provider is not restored")));case 17:return(0,d.logDebug)("ton-Connect ==>> restoreConnection_2 ==>> Provider is restored "),null!=(t=this.provider)&&t.closeConnection(!0,!1),(this.provider=n).listen(this.walletEventsListener.bind(this)),e.next=23,this.provider.restoreConnection();case 23:this.connected?this.tracker.trackConnectionRestoringCompleted(this.wallet):this.tracker.trackConnectionRestoringError("Connection restoring failed");case 24:case"end":return e.stop()}},e,this,[[2,8]])}))}},{key:"sendTransaction",value:function(c,u){return r(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n,r,o,i,a,s=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return(0,d.logDebug)("ton-Connect ==>> sendTransaction_1",c),this.checkConnection(),(0,h.checkSendTransactionSupport)(this.wallet.device.features,{requiredMessagesNumber:c.messages.length}),this.tracker.trackTransactionSentForSignature(this.wallet,c),(0,d.logDebug)("ton-Connect ==>> sendTransaction_2 ==>> check params"),t=c.validUntil,n=f(c,["validUntil"]),r=c.from||this.account.address,o=this.account.chain,(0,d.logDebug)("ton-Connect ==>> sendTransaction_2 ==>> await sendRequest",o),(0,g.isIos)()&&null!=(a=this.provider)&&a.openOKXWallet(),e.next=6,this.provider.sendRequest(l.sendTransactionParser.convertToRpcRequest(Object.assign(Object.assign({},n),{valid_until:t,from:r,network:o})),{onRequestSent:function(){var e;(0,g.isIos)()||null==(e=s.provider)||e.openOKXWallet(),null!=(e=null==u?void 0:u.onRequestSent)&&e.call(u)}});case 6:if(i=e.sent,(0,d.logDebug)("ton-Connect ==>> sendTransaction_3 ==>>sendRequest response:",i),l.sendTransactionParser.isError(i))throw this.tracker.trackTransactionSigningFailed(this.wallet,c,i.error.message,i.error.code),new p.OkxConnectError(i.error.code,i.error.message);e.next=9;break;case 9:return a=l.sendTransactionParser.convertFromRpcResponse(i),e.abrupt("return",(this.tracker.trackTransactionSigned(this.wallet,c,a),a));case 11:case"end":return e.stop()}},e,this)}))}},{key:"checkConnection",value:function(){if((0,d.logDebug)("ton-Connect ==>> checkConnection"),!this.connected)throw new p.OkxConnectError(p.OKX_CONNECT_ERROR_CODES.NOT_CONNECTED_ERROR,"Wallet not connected")}},{key:"createConnectRequest",value:function(e){(0,d.logDebug)("ton-Connect ==>> createConnectRequest");var t=[{name:"ton_addr"}];return null!=e&&e.tonProof&&t.push({name:"ton_proof",payload:e.tonProof}),{dappInfo:this.dappSettings.metaData,items:t}}}]))()},4034:function(e,t){var n=this&&this.__awaiter||function(e,a,s,c){return new(s=s||Promise)(function(n,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function o(e){try{i(c.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((c=c.apply(e,a||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserEventDispatcher=void 0,t.BrowserEventDispatcher=(()=>_createClass(function e(){_classCallCheck(this,e),this.window=window},[{key:"dispatchEvent",value:function(r,o){return n(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=new CustomEvent(r,{detail:o}),null!=(t=this.window)&&t.dispatchEvent(n);case 2:case"end":return e.stop()}},e,this)}))}},{key:"addEventListener",value:function(r,o,i){return n(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(null!=(t=this.window)&&t.addEventListener(r,o,i),function(){var e;return null==(e=n.window)?void 0:e.removeEventListener(r,o)}));case 1:case"end":return e.stop()}},e,this)}))}}]))()},352:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.TonConnectTracker=void 0;var o=n(9734),r=n(4034);t.TonConnectTracker=(()=>_createClass(function e(t){_classCallCheck(this,e),this.eventPrefix="ton-connect-",this.eventDispatcher=new r.BrowserEventDispatcher,this.tonConnectSdkVersion=t.tonConnectSdkVersion},[{key:"version",get:function(){return(0,o.createVersionInfo)({ton_connect_sdk_lib:this.tonConnectSdkVersion})}},{key:"dispatchUserActionEvent",value:function(e){try{this.eventDispatcher.dispatchEvent("".concat(this.eventPrefix).concat(e.type),e).catch()}catch(e){}}},{key:"trackConnectionStarted",value:function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.createConnectionStartedEvent.apply(void 0,[this.version].concat(t));this.dispatchUserActionEvent(r)}catch(t){}}},{key:"trackConnectionDeepLink",value:function(){try{var e=o.createConnectionDeepLinkEvent.apply(void 0,arguments);this.dispatchUserActionEvent(e)}catch(e){}}},{key:"trackConnectionCompleted",value:function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.createConnectionCompletedEvent.apply(void 0,[this.version].concat(t));this.dispatchUserActionEvent(r)}catch(t){}}},{key:"trackConnectionError",value:function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.createConnectionErrorEvent.apply(void 0,[this.version].concat(t));this.dispatchUserActionEvent(r)}catch(t){}}},{key:"trackConnectionRestoringStarted",value:function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.createConnectionRestoringStartedEvent.apply(void 0,[this.version].concat(t));this.dispatchUserActionEvent(r)}catch(t){}}},{key:"trackConnectionRestoringCompleted",value:function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.createConnectionRestoringCompletedEvent.apply(void 0,[this.version].concat(t));this.dispatchUserActionEvent(r)}catch(t){}}},{key:"trackConnectionRestoringError",value:function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.createConnectionRestoringErrorEvent.apply(void 0,[this.version].concat(t));this.dispatchUserActionEvent(r)}catch(t){}}},{key:"trackDisconnection",value:function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.createDisconnectionEvent.apply(void 0,[this.version].concat(t));this.dispatchUserActionEvent(r)}catch(t){}}},{key:"trackTransactionSentForSignature",value:function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.createTransactionSentForSignatureEvent.apply(void 0,[this.version].concat(t));this.dispatchUserActionEvent(r)}catch(t){}}},{key:"trackTransactionSigned",value:function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.createTransactionSignedEvent.apply(void 0,[this.version].concat(t));this.dispatchUserActionEvent(r)}catch(t){}}},{key:"trackTransactionSigningFailed",value:function(){try{for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=o.createTransactionSigningFailedEvent.apply(void 0,[this.version].concat(t));this.dispatchUserActionEvent(r)}catch(t){}}}]))()},8015:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.OKX_TON_CONNECTION_AND_TRANSACTION_EVENT=void 0,t.OKX_TON_CONNECTION_AND_TRANSACTION_EVENT={OKX_TON_CONNECTION_STARTED:"ton-connect-connection-started",OKX_TON_CONNECTION_COMPLETED:"ton-connect-connection-completed",OKX_TON_CONNECTION_ERROR:"ton-connect-connection-error",OKX_TON_CONNECTION_RESTORING_STARTED:"ton-connect-connection-restoring-started",OKX_TON_CONNECTION_RESTORING_COMPLETED:"ton-connect-connection-restoring-completed",OKX_TON_CONNECTION_RESTORING_ERROR:"ton-connect-connection-restoring-error",OKX_TON_DISCONNECTION:"ton-connect-disconnection",OKX_TON_TRANSACTION_SENT_FOR_SIGNATURE:"ton-connect-transaction-sent-for-signature",OKX_TON_TRANSACTION_SIGNED:"ton-connect-transaction-signed",OKX_TON_TRANSACTION_SIGNING_FAILED:"ton-connect-transaction-signing-failed"}},9734:function(e,t){function o(e){return{ton_connect_sdk_lib:e.ton_connect_sdk_lib}}function i(e,t){var n,r=null!=(r=null==t?void 0:t.connectItems)&&r.tonProof&&"proof"in t.connectItems.tonProof?"ton_proof":"ton_addr";return{wallet_address:null!=(n=null==(n=null==t?void 0:t.account)?void 0:n.address)?n:null,wallet_type:null!=(n=null==t?void 0:t.device.appName)?n:null,wallet_version:null!=(n=null==t?void 0:t.device.appVersion)?n:null,auth_type:r,custom_data:Object.assign({chain_id:null!=(r=null==(n=null==t?void 0:t.account)?void 0:n.chain)?r:null,provider:null!=(n=null==t?void 0:t.provider)?n:null},o(e))}}function a(e,t){var n;return{valid_until:null!=(n=String(t.validUntil))?n:null,from:null!=(e=null!=(n=t.from)?n:null==(n=null==e?void 0:e.account)?void 0:n.address)?e:null,messages:t.messages.map(function(e){var t;return{address:null!=(t=e.address)?t:null,amount:null!=(t=e.amount)?t:null}})}}Object.defineProperty(t,"__esModule",{value:!0}),t.createVersionInfo=o,t.createConnectionStartedEvent=function(e){return{type:"connection-started",custom_data:o(e)}},t.createConnectionDeepLinkEvent=function(e){return{type:"connection-get-deeplink",deeplinkUrl:e}},t.createConnectionCompletedEvent=function(e,t){return Object.assign({type:"connection-completed",is_success:!0},i(e,t))},t.createConnectionErrorEvent=function(e,t,n){return{type:"connection-error",is_success:!1,error_message:t,error_code:null!=n?n:null,custom_data:o(e)}},t.createConnectionRestoringStartedEvent=function(e){return{type:"connection-restoring-started",custom_data:o(e)}},t.createConnectionRestoringCompletedEvent=function(e,t){return Object.assign({type:"connection-restoring-completed",is_success:!0},i(e,t))},t.createConnectionRestoringErrorEvent=function(e,t){return{type:"connection-restoring-error",is_success:!1,error_message:t,custom_data:o(e)}},t.createTransactionSentForSignatureEvent=function(e,t,n){return Object.assign(Object.assign({type:"transaction-sent-for-signature"},i(e,t)),a(t,n))},t.createTransactionSignedEvent=function(e,t,n,r){return Object.assign(Object.assign({type:"transaction-signed",is_success:!0,signed_transaction:r.boc},i(e,t)),a(t,n))},t.createTransactionSigningFailedEvent=function(e,t,n,r,o){return Object.assign(Object.assign({type:"transaction-signing-failed",is_success:!1,error_message:r,error_code:null!=o?o:null},i(e,t)),a(t,n))},t.createDisconnectionEvent=function(e,t,n){return Object.assign({type:"disconnection",scope:n},i(e,t))}},7038:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.checkSendTransactionSupport=function(e,t){if(!e.includes("ton_sendTransaction"))throw new r.OkxConnectError(r.OKX_CONNECT_ERROR_CODES.METHOD_NOT_SUPPORTED,"Wallet doesn't support SendTransaction feature.");if(4<t.requiredMessagesNumber)throw new r.OkxConnectError(r.OKX_CONNECT_ERROR_CODES.METHOD_NOT_SUPPORTED,"Wallet is not able to handle such SendTransaction request. Max support messages number is 4, but ".concat(t.requiredMessagesNumber," is required."))};var r=n(1607)},9432:function(){},477:function(){},6443:function(){},1281:function(){},4117:function(e,t,n){n.r(t),n.d(t,{fromString:function(){return o}});var r=n(8200);function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"utf8",n=r.A[t];if(n)return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.decoder.decode("".concat(n.prefix).concat(e)):globalThis.Buffer.from(e,"utf8");throw new Error('Unsupported encoding "'.concat(t,'"'))}},7302:function(e,t,n){n.r(t),n.d(t,{toString:function(){return o}});var r=n(8200);function o(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"utf8",n=r.A[t];if(n)return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?n.encoder.encode(e).substring(1):globalThis.Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString("utf8");throw new Error('Unsupported encoding "'.concat(t,'"'))}},8200:function(L,e,t){t.d(e,{A:function(){return xe}});function i(e){if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("Unknown type, must be binary type")}function a(e){var t=e.name;return new k(t,e.prefix,e.encode,e.decode)}function n(e){var t=e.prefix,n=e.name,r=(e=O(e.alphabet,n)).encode,o=e.decode;return a({prefix:t,name:n,encode:r,decode:function(e){return i(o(e))}})}function r(e){var p=e.name,g=e.bitsPerChar,v=e.alphabet;return a({prefix:e.prefix,name:p,encode:function(e){for(var t=e,n=v,r=g,e="="===n[n.length-1],o=(1<<r)-1,i="",a=0,s=0,c=0;c<t.length;++c)for(s=s<<8|t[c],a+=8;r<a;)i+=n[o&s>>(a-=r)];if(a&&(i+=n[o&s<<r-a]),e)for(;i.length*r&7;)i+="=";return i},decode:function(e){for(var t=e,n=v,r=g,o=p,i={},a=0;a<n.length;++a)i[n[a]]=a;for(var s=t.length;"="===t[s-1];)--s;for(var c=new Uint8Array(s*r/8|0),u=0,f=0,h=0,l=0;l<s;++l){var d=i[t[l]];if(void 0===d)throw new SyntaxError("Non-".concat(o," character"));f=f<<r|d,8<=(u+=r)&&(u-=8,c[h++]=255&f>>u)}if(r<=u||255&f<<8-u)throw new SyntaxError("Unexpected end of data");return c}})}function o(e,t,n){t=t||[];for(var r=n=n||0;ie<=e;)t[n++]=255&e|128,e/=128;for(;-128&e;)t[n++]=255&e|128,e>>>=7;return t[n]=0|e,o.bytes=n-r+1,t}function s(e,t){var n,r=0,o=0,i=t=t||0,a=e.length;do{if(a<=i)throw s.bytes=0,new RangeError("Could not decode varint")}while(n=e[i++],r+=o<28?(127&n)<<o:(127&n)*Math.pow(2,o),o+=7,128<=n);return s.bytes=i-t,r}function c(e,t){P.encode(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)}function u(e){return P.encodingLength(e)}function f(e,t){var n=t.byteLength,r=u(e),o=r+u(n),i=new Uint8Array(o+n);return c(e,i,0),c(n,i,r),i.set(t,o),new ge(e,n,t,i)}function h(e){var t=e.name;return new ve(t,e.code,e.encode)}function l(n){return(()=>{var t=_asyncToGenerator(_regeneratorRuntime().mark(function e(t){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=Uint8Array,e.next=3,crypto.subtle.digest(n,t);case 3:return e.t1=e.sent,e.abrupt("return",new e.t0(e.t1));case 5:case"end":return e.stop()}},e)}));return function(e){return t.apply(this,arguments)}})()}var e={},d=(t.r(e),t.d(e,{identity:function(){return N}}),{}),p=(t.r(d),t.d(d,{base2:function(){return x}}),{}),g=(t.r(p),t.d(p,{base8:function(){return A}}),{}),v=(t.r(g),t.d(g,{base10:function(){return D}}),{}),y=(t.r(v),t.d(v,{base16:function(){return M},base16upper:function(){return U}}),{}),_=(t.r(y),t.d(y,{base32:function(){return K},base32hex:function(){return X},base32hexpad:function(){return z},base32hexpadupper:function(){return G},base32hexupper:function(){return F},base32pad:function(){return j},base32padupper:function(){return W},base32upper:function(){return H},base32z:function(){return J}}),{}),b=(t.r(_),t.d(_,{base36:function(){return Y},base36upper:function(){return V}}),{}),w=(t.r(b),t.d(b,{base58btc:function(){return q},base58flickr:function(){return Z}}),{}),E=(t.r(w),t.d(w,{base64:function(){return Q},base64pad:function(){return $},base64url:function(){return ee},base64urlpad:function(){return te}}),{}),m=(t.r(E),t.d(E,{base256emoji:function(){return oe}}),{}),m=(t.r(m),t.d(m,{sha256:function(){return ye},sha512:function(){return _e}}),{}),m=(t.r(m),t.d(m,{identity:function(){return be}}),{}),m=(t.r(m),t.d(m,{code:function(){return Ee},decode:function(){return Oe},encode:function(){return me},name:function(){return we}}),{}),O=(t.r(m),t.d(m,{code:function(){return Te},decode:function(){return Ne},encode:function(){return ke},name:function(){return Re}}),function(l,t){if(255<=l.length)throw new TypeError("Alphabet too long");for(var d=new Uint8Array(256),e=0;e<d.length;e++)d[e]=255;for(var n=0;n<l.length;n++){var r=l.charAt(n),o=r.charCodeAt(0);if(255!==d[o])throw new TypeError(r+" is ambiguous");d[o]=n}var p=l.length,g=l.charAt(0),v=Math.log(p)/Math.log(256),y=Math.log(256)/Math.log(p);function i(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;var t=0;if(" "!==e[t]){for(var n=0,r=0;e[t]===g;)n++,t++;for(var o=(e.length-t)*v+1>>>0,i=new Uint8Array(o);e[t];){var a=d[e.charCodeAt(t)];if(255===a)return;for(var s=0,c=o-1;(0!==a||s<r)&&-1!==c;c--,s++)a+=p*i[c]>>>0,i[c]=a%256>>>0,a=a/256>>>0;if(0!==a)throw new Error("Non-zero carry");r=s,t++}if(" "!==e[t]){for(var u=o-r;u!==o&&0===i[u];)u++;for(var f=new Uint8Array(n+(o-u)),h=n;u!==o;)f[h++]=i[u++];return f}}}return{encode:function(e){if(e instanceof Uint8Array||(ArrayBuffer.isView(e)?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):Array.isArray(e)&&(e=Uint8Array.from(e))),!(e instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===e.length)return"";for(var t=0,n=0,r=0,o=e.length;r!==o&&0===e[r];)r++,t++;for(var i=(o-r)*y+1>>>0,a=new Uint8Array(i);r!==o;){for(var s=e[r],c=0,u=i-1;(0!==s||c<n)&&-1!==u;u--,c++)s+=256*a[u]>>>0,a[u]=s%p>>>0,s=s/p>>>0;if(0!==s)throw new Error("Non-zero carry");n=c,r++}for(var f=i-n;f!==i&&0===a[f];)f++;for(var h=g.repeat(t);f<i;++f)h+=l.charAt(a[f]);return h},decodeUnsafe:i,decode:function(e){e=i(e);if(e)return e;throw new Error("Non-".concat(t," character"))}}}),C=(new Uint8Array(0),(()=>_createClass(function e(t,n,r){_classCallCheck(this,e),this.name=t,this.prefix=n,this.baseEncode=r},[{key:"encode",value:function(e){if(e instanceof Uint8Array)return"".concat(this.prefix).concat(this.baseEncode(e));throw Error("Unknown type, must be binary type")}}]))()),S=(()=>_createClass(function e(t,n,r){if(_classCallCheck(this,e),this.name=t,void 0===(this.prefix=n).codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=n.codePointAt(0),this.baseDecode=r},[{key:"decode",value:function(e){if("string"!=typeof e)throw Error("Can only multibase decode strings");if(e.codePointAt(0)!==this.prefixCodePoint)throw Error("Unable to decode multibase string ".concat(JSON.stringify(e),", ").concat(this.name," decoder only supports inputs prefixed with ").concat(this.prefix));return this.baseDecode(e.slice(this.prefix.length))}},{key:"or",value:function(e){return T(this,e)}}]))(),R=(()=>_createClass(function e(t){_classCallCheck(this,e),this.decoders=t},[{key:"or",value:function(e){return T(this,e)}},{key:"decode",value:function(e){var t=e[0],t=this.decoders[t];if(t)return t.decode(e);throw RangeError("Unable to decode multibase string ".concat(JSON.stringify(e),", only inputs prefixed with ").concat(Object.keys(this.decoders)," are supported"))}}]))(),T=function(e,t){return new R(_objectSpread(_objectSpread({},e.decoders||_defineProperty({},e.prefix,e)),t.decoders||_defineProperty({},t.prefix,t)))},k=(()=>_createClass(function e(t,n,r,o){_classCallCheck(this,e),this.name=t,this.prefix=n,this.baseEncode=r,this.baseDecode=o,this.encoder=new C(t,n,r),this.decoder=new S(t,n,o)},[{key:"encode",value:function(e){return this.encoder.encode(e)}},{key:"decode",value:function(e){return this.decoder.decode(e)}}]))(),N=a({prefix:"\0",name:"identity",encode:function(e){return e=e,(new TextDecoder).decode(e)},decode:function(e){return e=e,(new TextEncoder).encode(e)}}),x=r({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),A=r({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),D=n({prefix:"9",name:"base10",alphabet:"0123456789"}),M=r({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),U=r({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),K=r({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),H=r({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),j=r({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),W=r({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),X=r({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),F=r({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),z=r({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),G=r({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),J=r({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),Y=n({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),V=n({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),q=n({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Z=n({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),Q=r({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),$=r({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),ee=r({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),te=r({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),t=Array.from("๐๐ชโ๐ฐ๐๐๐๐๐๐๐๐๐๐๐๐๐โ๐ป๐ฅ๐พ๐ฟ๐โค๐๐คฃ๐๐๐๐ญ๐๐๐
๐๐๐ฅ๐ฅฐ๐๐๐๐ข๐ค๐๐๐ช๐โบ๐๐ค๐๐๐๐๐น๐คฆ๐๐โโจ๐คท๐ฑ๐๐ธ๐๐๐๐๐๐๐๐๐คฉ๐๐๐ค๐๐ฏ๐๐๐ถ๐๐คญโฃ๐๐๐๐ช๐๐ฅ๐๐๐ฉ๐ก๐คช๐๐ฅณ๐ฅ๐คค๐๐๐ณโ๐๐๐ด๐๐ฌ๐๐๐ท๐ป๐โญโ
๐ฅบ๐๐๐ค๐ฆโ๐ฃ๐๐โน๐๐๐ โ๐๐บ๐๐ป๐๐๐๐๐น๐ฃ๐ซ๐๐๐ต๐ค๐๐ด๐ค๐ผ๐ซโฝ๐คโ๐๐คซ๐๐ฎ๐๐ป๐๐ถ๐๐ฒ๐ฟ๐งก๐โก๐๐โโ๐๐ฐ๐คจ๐ถ๐ค๐ถ๐ฐ๐๐ข๐ค๐๐จ๐จ๐คฌโ๐๐บ๐ค๐๐๐ฑ๐๐ถ๐ฅดโถโกโ๐๐ธโฌ๐จ๐๐ฆ๐ท๐บโ ๐
๐๐ต๐๐คฒ๐ค ๐คง๐๐ต๐
๐ง๐พ๐๐๐ค๐๐คฏ๐ทโ๐ง๐ฏ๐๐๐ค๐๐โ๐ด๐ฃ๐ธ๐๐๐ฅ๐คข๐
๐ก๐ฉ๐๐ธ๐ป๐ค๐คฎ๐ผ๐ฅต๐ฉ๐๐๐ผ๐๐ฃ๐ฅ"),ne=t.reduce(function(e,t,n){return e[n]=t,e},[]),re=t.reduce(function(e,t,n){return e[t.codePointAt(0)]=n,e},[]),oe=a({prefix:"๐",name:"base256emoji",encode:function(e){return e.reduce(function(e,t){return e+ne[t]},"")},decode:function(e){var t,n=[],r=_createForOfIteratorHelper(e);try{for(r.s();!(t=r.n()).done;){var o=t.value,i=re[o.codePointAt(0)];if(void 0===i)throw new Error("Non-base256emoji character: ".concat(o));n.push(i)}}catch(e){r.e(e)}finally{r.f()}return new Uint8Array(n)}}),ie=Math.pow(2,31),ae=Math.pow(2,7),se=Math.pow(2,14),ce=Math.pow(2,21),ue=Math.pow(2,28),fe=Math.pow(2,35),he=Math.pow(2,42),le=Math.pow(2,49),de=Math.pow(2,56),pe=Math.pow(2,63),P={encode:o,decode:s,encodingLength:function(e){return e<ae?1:e<se?2:e<ce?3:e<ue?4:e<fe?5:e<he?6:e<le?7:e<de?8:e<pe?9:10}},ge=_createClass(function e(t,n,r,o){_classCallCheck(this,e),this.code=t,this.size=n,this.digest=r,this.bytes=o}),ve=(()=>_createClass(function e(t,n,r){_classCallCheck(this,e),this.name=t,this.code=n,this.encode=r},[{key:"digest",value:function(e){var t=this;if(e instanceof Uint8Array)return(e=this.encode(e))instanceof Uint8Array?f(this.code,e):e.then(function(e){return f(t.code,e)});throw Error("Unknown type, must be binary type")}}]))(),ye=h({name:"sha2-256",code:18,encode:l("SHA-256")}),_e=h({name:"sha2-512",code:19,encode:l("SHA-512")}),I=i,be={code:0,name:"identity",encode:I,digest:function(e){return f(0,I(e))}},we="raw",Ee=85,me=i,Oe=i,Ce=new TextEncoder,Se=new TextDecoder,Re="json",Te=512,ke=function(e){return Ce.encode(JSON.stringify(e))},Ne=function(e){return JSON.parse(Se.decode(e))},m=(Symbol.toStringTag,Symbol.for("nodejs.util.inspect.custom"),Symbol.for("@ipld/js-cid/CID"),_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({},e),d),p),g),v),y),_),b),w),E));function B(e,t,n,r){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:n},decoder:{decode:r}}}var t=B("utf8","u",function(e){return"u"+new TextDecoder("utf8").decode(e)},function(e){return(new TextEncoder).encode(e.substring(1))}),e=B("ascii","a",function(e){for(var t="a",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},function(e){for(var t=function(e){e=0<arguments.length&&void 0!==e?e:0;return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?globalThis.Buffer.allocUnsafe(e):new Uint8Array(e)}((e=e.substring(1)).length),n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}),xe=_objectSpread({utf8:t,"utf-8":t,hex:m.base16,latin1:e,ascii:e,binary:e},m)}},r={};function o(e){var t=r[e];return void 0!==t||(t=r[e]={exports:{}},n[e].call(t.exports,t,t.exports,o)),t.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==("undefined"==typeof globalThis?"undefined":_typeof(globalThis)))return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==("undefined"==typeof window?"undefined":_typeof(window)))return window}}(),o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var e,t,i,a,s,c={};e=c,Object.defineProperty(e,"__esModule",{value:!0}),e.CHAIN=e.OKX_TON_CONNECTION_AND_TRANSACTION_EVENT=e.OKX_CONNECT_ERROR_CODES=e.OkxConnectError=e.OKXTonConnect=void 0,t=o(1934),Object.defineProperty(e,"OKXTonConnect",{enumerable:!0,get:function(){return t.OKXTonConnect}}),i=o(1607),Object.defineProperty(e,"OkxConnectError",{enumerable:!0,get:function(){return i.OkxConnectError}}),Object.defineProperty(e,"OKX_CONNECT_ERROR_CODES",{enumerable:!0,get:function(){return i.OKX_CONNECT_ERROR_CODES}}),a=o(5056),Object.defineProperty(e,"OKX_TON_CONNECTION_AND_TRANSACTION_EVENT",{enumerable:!0,get:function(){return a.OKX_TON_CONNECTION_AND_TRANSACTION_EVENT}}),s=o(5056),Object.defineProperty(e,"CHAIN",{enumerable:!0,get:function(){return s.CHAIN}}),OKXTonConnectSDK=c})();