!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=335)}([function(t,e,n){"use strict";n.r(e),n.d(e,"__extends",(function(){return i})),n.d(e,"__assign",(function(){return o})),n.d(e,"__rest",(function(){return a})),n.d(e,"__decorate",(function(){return s})),n.d(e,"__param",(function(){return u})),n.d(e,"__metadata",(function(){return c})),n.d(e,"__awaiter",(function(){return f})),n.d(e,"__generator",(function(){return l})),n.d(e,"__createBinding",(function(){return h})),n.d(e,"__exportStar",(function(){return d})),n.d(e,"__values",(function(){return p})),n.d(e,"__read",(function(){return m})),n.d(e,"__spread",(function(){return g})),n.d(e,"__spreadArrays",(function(){return v})),n.d(e,"__await",(function(){return y})),n.d(e,"__asyncGenerator",(function(){return b})),n.d(e,"__asyncDelegator",(function(){return w})),n.d(e,"__asyncValues",(function(){return _})),n.d(e,"__makeTemplateObject",(function(){return S})),n.d(e,"__importStar",(function(){return M})),n.d(e,"__importDefault",(function(){return k})),n.d(e,"__classPrivateFieldGet",(function(){return E})),n.d(e,"__classPrivateFieldSet",(function(){return x})); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(i=t[s])&&(a=(o<3?i(a):o>3?i(e,n,a):i(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function u(t,e){return function(n,r){e(n,r,t)}}function c(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function f(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function l(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function g(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(n=i[t](e)).value instanceof y?Promise.resolve(n.value.v).then(u,c):f(o[0][2],n)}catch(t){f(o[0][3],t)}var n}function u(t){s("next",t)}function c(t){s("throw",t)}function f(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(t){var e,n;return e={},r("next"),r("throw",(function(t){throw t})),r("return"),e[Symbol.iterator]=function(){return this},e;function r(r,i){e[r]=t[r]?function(e){return(n=!n)?{value:y(t[r](e)),done:"return"===r}:i?i(e):e}:i}}function _(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=p(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,i){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,i,(e=t[n](e)).done,e.value)}))}}}function S(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}function M(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function k(t){return t&&t.__esModule?t:{default:t}}function E(t,e){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return e.get(t)}function x(t,e,n){if(!e.has(t))throw new TypeError("attempted to set private field on non-instance");return e.set(t,n),n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return u})),n.d(e,"e",(function(){return c})),n.d(e,"f",(function(){return f})),n.d(e,"g",(function(){return l})),n.d(e,"d",(function(){return m})),n.d(e,"c",(function(){return g}));var r=n(0),i=function(){var t=[],e=[],n=new Set,s=function(n){return t.forEach((function(t){n.add(t.middleware,Object(r.__assign)({},t))})),e.forEach((function(t){n.addRelativeTo(t.middleware,Object(r.__assign)({},t))})),n},u=function(t){var e=[];return t.before.forEach((function(t){0===t.before.length&&0===t.after.length?e.push(t):e.push.apply(e,Object(r.__spread)(u(t)))})),e.push(t),t.after.reverse().forEach((function(t){0===t.before.length&&0===t.after.length?e.push(t):e.push.apply(e,Object(r.__spread)(u(t)))})),e},c=function(){var n,i=[],s=[],c={};return t.forEach((function(t){var e=Object(r.__assign)(Object(r.__assign)({},t),{before:[],after:[]});e.name&&(c[e.name]=e),i.push(e)})),e.forEach((function(t){var e=Object(r.__assign)(Object(r.__assign)({},t),{before:[],after:[]});e.name&&(c[e.name]=e),s.push(e)})),s.forEach((function(t){if(t.toMiddleware){var e=c[t.toMiddleware];if(void 0===e)throw new Error(t.toMiddleware+" is not found when adding "+(t.name||"anonymous")+" middleware "+t.relation+" "+t.toMiddleware);"after"===t.relation&&e.after.push(t),"before"===t.relation&&e.before.push(t)}})),(n=i,n.sort((function(t,e){return o[e.step]-o[t.step]||a[e.priority||"normal"]-a[t.priority||"normal"]}))).map(u).reduce((function(t,e){return t.push.apply(t,Object(r.__spread)(e)),t}),[]).map((function(t){return t.middleware}))},f={add:function(e,i){void 0===i&&(i={});var o=i.name,a=Object(r.__assign)({step:"initialize",priority:"normal",middleware:e},i);if(o){if(n.has(o))throw new Error("Duplicate middleware name '"+o+"'");n.add(o)}t.push(a)},addRelativeTo:function(t,i){var o=i.name,a=Object(r.__assign)({middleware:t},i);if(o){if(n.has(o))throw new Error("Duplicated middleware name '"+o+"'");n.add(o)}e.push(a)},clone:function(){return s(i())},use:function(t){t.applyToStack(f)},remove:function(r){return"string"==typeof r?function(r){var i=!1,o=function(t){return!t.name||t.name!==r||(i=!0,n.delete(r),!1)};return t=t.filter(o),e=e.filter(o),i}(r):function(r){var i=!1,o=function(t){return t.middleware!==r||(i=!0,t.name&&n.delete(t.name),!1)};return t=t.filter(o),e=e.filter(o),i}(r)},removeByTag:function(r){var i=!1,o=function(t){var e=t.tags,o=t.name;return!e||!e.includes(r)||(o&&n.delete(o),i=!0,!1)};return t=t.filter(o),e=e.filter(o),i},concat:function(t){var e=s(i());return e.use(t),e},applyToStack:s,resolve:function(t,e){var n,i;try{for(var o=Object(r.__values)(c().reverse()),a=o.next();!a.done;a=o.next()){t=(0,a.value)(t,e)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return t}};return f},o={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},a={high:3,normal:2,low:1},s=function(){function t(t){this.middlewareStack=i(),this.config=t}return t.prototype.send=function(t,e,n){var r="function"!=typeof e?e:void 0,i="function"==typeof e?e:n,o=t.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return o(t).then((function(t){return t.output}));o(t).then((function(t){return i(null,t.output)}),(function(t){return i(t)})).catch((function(){}))},t.prototype.destroy=function(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()},t}(),u=function(){this.middlewareStack=i()};function c(t){return encodeURIComponent(t).replace(/[!'()*]/g,(function(t){return"%"+t.charCodeAt(0).toString(16)}))}var f=function(t){return Array.isArray(t)?t:[t]},l=function(t){for(var e in t)t.hasOwnProperty(e)&&void 0!==t[e]["#text"]?t[e]=t[e]["#text"]:"object"==typeof t[e]&&null!==t[e]&&(t[e]=l(t[e]));return t},h=function(){var t=Object.getPrototypeOf(this).constructor,e=Function.bind.apply(String,Object(r.__spread)([null],arguments)),n=new e;return Object.setPrototypeOf(n,t.prototype),n};h.prototype=Object.create(String.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(h,String);!function(t){function e(){return null!==t&&t.apply(this,arguments)||this}Object(r.__extends)(e,t),e.prototype.deserializeJSON=function(){return JSON.parse(t.prototype.toString.call(this))},e.prototype.toJSON=function(){return t.prototype.toString.call(this)},e.fromObject=function(t){return t instanceof e?t:new e(t instanceof String||"string"==typeof t?t:JSON.stringify(t))}}(h);var d=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],p=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function m(t){var e=t.getUTCFullYear(),n=t.getUTCMonth(),r=t.getUTCDay(),i=t.getUTCDate(),o=t.getUTCHours(),a=t.getUTCMinutes(),s=t.getUTCSeconds();return d[r]+", "+(i<10?"0"+i:""+i)+" "+p[n]+" "+e+" "+(o<10?"0"+o:""+o)+":"+(a<10?"0"+a:""+a)+":"+(s<10?"0"+s:""+s)+" GMT"}var g="***SensitiveInformation***"},function(t,e,n){"use strict";t.exports=n(538)},function(t,e,n){var r=n(9),i=n(38),o=n(24),a=n(25),s=n(39),u=function(t,e,n){var c,f,l,h,d=t&u.F,p=t&u.G,m=t&u.S,g=t&u.P,v=t&u.B,y=p?r:m?r[e]||(r[e]={}):(r[e]||{}).prototype,b=p?i:i[e]||(i[e]={}),w=b.prototype||(b.prototype={});for(c in p&&(n=e),n)l=((f=!d&&y&&void 0!==y[c])?y:n)[c],h=v&&f?s(l,r):g&&"function"==typeof l?s(Function.call,l):l,y&&a(y,c,l,t&u.U),b[c]!=l&&o(b,c,h),g&&w[c]!=l&&(w[c]=l)};r.core=i,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o}));var r=function(){function t(t){this.statusCode=t.statusCode,this.headers=t.headers||{},this.body=t.body}return t.isInstance=function(t){if(!t)return!1;var e=t;return"number"==typeof e.statusCode&&"object"==typeof e.headers},t}(),i=n(0),o=function(){function t(t){this.method=t.method||"GET",this.hostname=t.hostname||"localhost",this.port=t.port,this.query=t.query||{},this.headers=t.headers||{},this.body=t.body,this.protocol=t.protocol?":"!==t.protocol.substr(-1)?t.protocol+":":t.protocol:"https:",this.path=t.path?"/"!==t.path.charAt(0)?"/"+t.path:t.path:"/"}return t.isInstance=function(t){if(!t)return!1;var e=t;return"method"in e&&"protocol"in e&&"hostname"in e&&"path"in e&&"object"==typeof e.query&&"object"==typeof e.headers},t.prototype.clone=function(){var e,n=new t(Object(i.__assign)(Object(i.__assign)({},this),{headers:Object(i.__assign)({},this.headers)}));return n.query&&(n.query=(e=n.query,Object.keys(e).reduce((function(t,n){var r,o=e[n];return Object(i.__assign)(Object(i.__assign)({},t),((r={})[n]=Array.isArray(o)?Object(i.__spread)(o):o,r))}),{}))),n},t}()},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var r=n(542),i=n(543),o=n(242);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(r)return z(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,n);case"utf8":case"utf-8":return x(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:y(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,r,i){var o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=n;os&&(n=s-u),o=n;o>=0;o--){for(var l=!0,h=0;hi&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function E(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function x(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),s=Math.min(o,a),c=this.slice(r,i),f=t.slice(e,n),l=0;li)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return M(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function O(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function R(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function j(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function L(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,r,o){return o||L(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function U(t,e,n,r,o){return o||L(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||P(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||P(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||P(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||P(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||O(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):j(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);O(this,t,e,n,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);O(this,t,e,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):j(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||O(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):j(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return U(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return U(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function F(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(23))},function(t,e,n){var r=n(11);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(6),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var r=n(96)("wks"),i=n(66),o=n(9).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e,n){var r=n(41),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){t.exports=!n(10)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(0),i={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"]},o={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"]};function a(t,e,n){return{applyToStack:function(a){a.add(function(t,e){return function(n,i){return function(o){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var a,s,u,c,f;return Object(r.__generator)(this,(function(l){switch(l.label){case 0:return a=i.logger,s=i.outputFilterSensitiveLog,[4,n(o)];case 1:return u=l.sent().response,"function"==typeof(null==a?void 0:a.debug)&&a.debug({httpResponse:u}),[4,e(u,t)];case 2:return c=l.sent(),c.$metadata,f=Object(r.__rest)(c,["$metadata"]),"function"==typeof(null==a?void 0:a.info)&&a.info({output:s(f)}),[2,{response:u,output:c}]}}))}))}}}(t,n),i),a.add(function(t,e){return function(n,i){return function(o){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var a,s,u;return Object(r.__generator)(this,(function(c){switch(c.label){case 0:return a=i.logger,s=i.inputFilterSensitiveLog,"function"==typeof(null==a?void 0:a.info)&&a.info({input:s(o.input)}),[4,e(o.input,t)];case 1:return u=c.sent(),"function"==typeof(null==a?void 0:a.debug)&&a.debug({httpRequest:u}),[2,n(Object(r.__assign)(Object(r.__assign)({},o),{request:u}))]}}))}))}}}(t,e),o)}}}},function(t,e,n){var r=n(7),i=n(205),o=n(44),a=Object.defineProperty;e.f=n(14)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(45);t.exports=function(t){return Object(r(t))}},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&d())}function d(){if(!f){var t=s(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l1)for(var n=1;n>>2]>>>24-o%4*8&255;e[r+o>>>2]|=a<<24-(r+o)%4*8}else for(o=0;o>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,n=this.sigBytes;e[n>>>2]&=4294967295<<32-n%4*8,e.length=t.ceil(n/4)},clone:function(){var t=o.clone.call(this);return t.words=this.words.slice(0),t},random:function(e){for(var n,r=[],i=function(e){e=e;var n=987654321,r=4294967295;return function(){var i=((n=36969*(65535&n)+(n>>16)&r)<<16)+(e=18e3*(65535&e)+(e>>16)&r)&r;return i/=4294967296,(i+=.5)*(t.random()>.5?1:-1)}},o=0;o>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>3]|=parseInt(t.substr(r,2),16)<<24-r%8*4;return new a.init(n,e/2)}},c=s.Latin1={stringify:function(t){for(var e=t.words,n=t.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(t){for(var e=t.length,n=[],r=0;r>>2]|=(255&t.charCodeAt(r))<<24-r%4*8;return new a.init(n,e)}},f=s.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return c.parse(unescape(encodeURIComponent(t)))}},l=i.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=f.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var n=this._data,r=n.words,i=n.sigBytes,o=this.blockSize,s=i/(4*o),u=(s=e?t.ceil(s):t.max((0|s)-this._minBufferSize,0))*o,c=t.min(4*u,i);if(u){for(var f=0;f"+i+""};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",n)}},function(t,e,n){"use strict";var r=n(307),i=Object.prototype.toString;function o(t){return"[object Array]"===i.call(t)}function a(t){return void 0===t}function s(t){return null!==t&&"object"==typeof t}function u(t){if("[object Object]"!==i.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function c(t){return"[object Function]"===i.call(t)}function f(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;no?1*r:0})),!0},a=function(t,e){var n=Object.assign({},t);return e&&("string"==typeof e?delete n[e]:e.forEach((function(t){delete n[t]}))),n},s=function(t,e){void 0===e&&(e="application/octet-stream");var n=t.toLowerCase(),i=r.filter((function(t){return n.endsWith("."+t.ext)}));return i.length>0?i[0].type:e},u=function(t){var e=t.toLowerCase();return!!e.startsWith("text/")||("application/json"===e||"application/xml"===e||"application/sh"===e)},c=function(){for(var t="",e="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",n=32;n>0;n-=1)t+=e[Math.floor(Math.random()*e.length)];return t},f=function(t){if(t.isResolved)return t;var e=!0,n=!1,r=!1,i=t.then((function(t){return r=!0,e=!1,t}),(function(t){throw n=!0,e=!1,t}));return i.isFullfilled=function(){return r},i.isPending=function(){return e},i.isRejected=function(){return n},i},l=function(){if("undefined"==typeof self)return!1;var t=self;return void 0!==t.WorkerGlobalScope&&self instanceof t.WorkerGlobalScope},h=function(){return{isBrowser:"undefined"!=typeof window&&void 0!==window.document,isNode:void 0!==t&&null!=t.versions&&null!=t.versions.node}},d=function(t,e,n){if(void 0===e&&(e=[]),void 0===n&&(n=[]),!m(t))return t;var r={};for(var i in t){if(t.hasOwnProperty(i))r[e.includes(i)?i:i[0].toLowerCase()+i.slice(1)]=n.includes(i)?t[i]:d(t[i],e,n)}return r},p=function(t,e,n){if(void 0===e&&(e=[]),void 0===n&&(n=[]),!m(t))return t;var r={};for(var i in t){if(t.hasOwnProperty(i))r[e.includes(i)?i:i[0].toUpperCase()+i.slice(1)]=n.includes(i)?t[i]:p(t[i],e,n)}return r},m=function(t){return!(!(t instanceof Object)||t instanceof Array||t instanceof Function||t instanceof Number||t instanceof String||t instanceof Boolean)},g=function(){function t(){}return t.isEmpty=i,t.sortByField=o,t.objectLessAttributes=a,t.filenameToContentType=s,t.isTextFile=u,t.generateRandomString=c,t.makeQuerablePromise=f,t.isWebWorker=l,t.browserOrNode=h,t.transferKeyToLowerCase=d,t.transferKeyToUpperCase=p,t.isStrictObject=m,t}()}).call(this,n(194))},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,"a",(function(){return i}))},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(97),i=n(45);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(98),i=n(65),o=n(31),a=n(44),s=n(30),u=n(205),c=Object.getOwnPropertyDescriptor;e.f=n(14)?c:function(t,e){if(t=o(t),e=a(e,!0),u)try{return c(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(30),i=n(17),o=n(146)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=n,n.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},function(t,e,n){"use strict";var r=e,i=n(52),o=n(34),a=n(281);r.assert=o,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(t,e,n){var r=new Array(Math.max(t.bitLength(),n)+1);r.fill(0);for(var i=1<(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,r[a]=s,o.iushrn(1)}return r},r.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var r,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var a,s,u=t.andln(3)+i&3,c=e.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),a=0==(1&u)?0:3!==(r=t.andln(7)+i&7)&&5!==r||2!==c?u:-u,n[0].push(a),s=0==(1&c)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==u?c:-c,n[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return n},r.cachedProperty=function(t,e,n){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e,n){"use strict";var r=n(645),i=n(646);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=b,e.resolve=function(t,e){return b(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?b(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=b(t));return t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var a=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),l=["%","/","?",";","#"].concat(f),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=n(647);function b(t,e,n){if(t&&i.isObject(t)&&t instanceof o)return t;var r=new o;return r.parse(t,e,n),r}o.prototype.parse=function(t,e,n){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),s=-1!==o&&o127?R+="x":R+=O[j];if(!R.match(d)){var N=I.slice(0,A),U=I.slice(A+1),B=O.match(p);B&&(N.push(B[1]),U.unshift(B[2])),U.length&&(b="/"+U.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=r.toASCII(this.hostname));var D=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+D,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[S])for(A=0,P=f.length;A0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift());return n.search=t.search,n.query=t.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!M.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=M.slice(-1)[0],x=(n.host||t.host||M.length>1)&&("."===E||".."===E)||""===E,A=0,C=M.length;C>=0;C--)"."===(E=M[C])?M.splice(C,1):".."===E?(M.splice(C,1),A++):A&&(M.splice(C,1),A--);if(!_&&!S)for(;A--;A)M.unshift("..");!_||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),x&&"/"!==M.join("/").substr(-1)&&M.push("");var T,I=""===M[0]||M[0]&&"/"===M[0].charAt(0);k&&(n.hostname=n.host=I?"":M.length?M.shift():"",(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift()));return(_=_||n.host&&M.length)&&!I&&M.unshift(""),M.length?n.pathname=M.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},o.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(64),i=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=new r.a("Amplify"),a=new(function(){function t(){this._components=[],this._config={},this._modules={},this.Auth=null,this.Analytics=null,this.API=null,this.Credentials=null,this.Storage=null,this.I18n=null,this.Cache=null,this.PubSub=null,this.Interactions=null,this.Pushnotification=null,this.UI=null,this.XR=null,this.Predictions=null,this.DataStore=null,this.Logger=r.a,this.ServiceWorker=null}return t.prototype.register=function(t){o.debug("component registered in amplify",t),this._components.push(t),"function"==typeof t.getModuleName?(this._modules[t.getModuleName()]=t,this[t.getModuleName()]=t):o.debug("no getModuleName method for component",t),t.configure(this._config)},t.prototype.configure=function(t){var e=this;return t?(this._config=Object.assign(this._config,t),o.debug("amplify config",this._config),Object.entries(this._modules).forEach((function(t){var n=i(t,2),r=(n[0],n[1]);Object.keys(r).forEach((function(t){e._modules[t]&&(r[t]=e._modules[t])}))})),this._components.map((function(t){t.configure(e._config)})),this._config):this._config},t.prototype.addPluggable=function(t){t&&t.getCategory&&"function"==typeof t.getCategory&&this._components.map((function(e){e.addPluggable&&"function"==typeof e.addPluggable&&e.addPluggable(t)}))},t}())},function(t,e){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(20);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){"use strict";var r=n(10);t.exports=function(t,e){return!!t&&r((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(n,r){function i(){void 0!==o&&t.removeListener("error",o),n([].slice.call(arguments))}var o;"error"!==e&&(o=function(n){t.removeListener(e,i),r(n)},t.once("error",o)),t.once(e,i)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function f(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function l(t,e,n,r){var i,o,a,s;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),a=o[e]),void 0===a)a=o[e]=n,++t._eventsCount;else if("function"==typeof a?a=o[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=f(t))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return t}function h(){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)}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function p(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n0&&(a=e[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var c=u.length,f=g(u,c);for(n=0;n=0;o--)if(n[o]===e||n[o].listener===e){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1=0;r--)this.removeListener(t,e[r]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){var r=n(11);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(3),i=n(38),o=n(10);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},function(t,e,n){var r=n(39),i=n(97),o=n(17),a=n(13),s=n(162);t.exports=function(t,e){var n=1==t,u=2==t,c=3==t,f=4==t,l=6==t,h=5==t||l,d=e||s;return function(e,s,p){for(var m,g,v=o(e),y=i(v),b=r(s,p,3),w=a(y.length),_=0,S=n?d(e,w):u?d(e,0):void 0;w>_;_++)if((h||_ in y)&&(g=b(m=y[_],_,v),t))if(n)S[_]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return _;case 2:S.push(m)}else if(f)return!1;return l?-1:c||f?f:S}}},function(t,e,n){"use strict";var r=n(34),i=n(5);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i>6|192,n[r++]=63&a|128):o(t,i)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i>>0}return a},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],o=r+t[e+1]>>>0,a=(o>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,o,a,s){var u=0,c=e;return u+=(c=c+r>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,n,r,i,o,a,s){return e+r+o+s>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,a,s,u,c){var f=0,l=e;return f+=(l=l+r>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function(t,e,n,r,i,o,a,s,u,c){return e+r+o+s+c>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return m})),n.d(e,"c",(function(){return v}));var r=n(0),i={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high"},o=function(t){return{applyToStack:function(e){e.add(function(t){return function(e){return function(n){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){return Object(r.__generator)(this,(function(r){return[2,t.retryStrategy.retry(e,n)]}))}))}}}(t),i)}}},a=n(4),s=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],u=["Throttling","ThrottlingException","ThrottledException","RequestThrottledException","TooManyRequestsException","ProvisionedThroughputExceededException","TransactionInProgressException","RequestLimitExceeded","BandwidthLimitExceeded","LimitExceededException","RequestThrottled","SlowDown","PriorRequestNotComplete","EC2ThrottledException"],c=["AbortError","TimeoutError","RequestTimeout","RequestTimeoutException"],f=[500,502,503,504],l=function(t){var e;return u.includes(t.name)||1==(null===(e=t.$retryable)||void 0===e?void 0:e.throttling)},h=n(319),d=function(t,e){return Math.floor(Math.min(2e4,Math.random()*Math.pow(2,e)*t))},p=function(t){return!!t&&(function(t){return void 0!==t.$retryable}(t)||function(t){return s.includes(t.name)}(t)||l(t)||function(t){var e;return c.includes(t.name)||f.includes((null===(e=t.$metadata)||void 0===e?void 0:e.httpStatusCode)||0)}(t))},m=3,g=function(){function t(t,e){var n,r,i,o,a,s,u,c;this.maxAttemptsProvider=t,this.retryDecider=null!==(n=null==e?void 0:e.retryDecider)&&void 0!==n?n:p,this.delayDecider=null!==(r=null==e?void 0:e.delayDecider)&&void 0!==r?r:d,this.retryQuota=null!==(i=null==e?void 0:e.retryQuota)&&void 0!==i?i:(a=o=500,s=o,u=function(t){return"TimeoutError"===t.name?10:5},c=function(t){return u(t)<=s},Object.freeze({hasRetryTokens:c,retrieveRetryTokens:function(t){if(!c(t))throw new Error("No retry token available");var e=u(t);return s-=e,e},releaseRetryTokens:function(t){s+=null!=t?t:1,s=Math.min(s,a)}}))}return t.prototype.shouldRetry=function(t,e,n){return en;)i[n]=e[n++];return i},Tt=function(t,e,n){F(t,e,{get:function(){return this._d[n]}})},It=function(t){var e,n,r,i,o,a,s=S(t),u=arguments.length,f=u>1?arguments[1]:void 0,l=void 0!==f,h=A(s);if(null!=h&&!M(h)){for(a=h.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(l&&u>2&&(f=c(f,arguments[2],2)),e=0,n=m(s.length),i=xt(this,n);n>e;e++)i[e]=l?f(s[e],e):s[e];return i},Pt=function(){for(var t=0,e=arguments.length,n=xt(this,e);e>t;)n[t]=arguments[t++];return n},Ot=!!W&&o((function(){dt.call(new W(1))})),Rt=function(){return dt.apply(Ot?lt.call(Et(this)):Et(this),arguments)},jt={copyWithin:function(t,e){return B.call(Et(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return X(Et(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return U.apply(Et(this),arguments)},filter:function(t){return At(this,$(Et(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Et(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Et(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Y(Et(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Et(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Et(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Et(this),arguments)},lastIndexOf:function(t){return at.apply(Et(this),arguments)},map:function(t){return _t(Et(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Et(this),arguments)},reduceRight:function(t){return ut.apply(Et(this),arguments)},reverse:function(){for(var t,e=Et(this).length,n=Math.floor(e/2),r=0;r1?arguments[1]:void 0)},sort:function(t){return ft.call(Et(this),t)},subarray:function(t,e){var n=Et(this),r=n.length,i=v(t,r);return new(O(n,n[vt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===e?r:v(e,r))-i))}},Lt=function(t,e){return At(this,lt.call(Et(this),t,e))},Nt=function(t){Et(this);var e=kt(arguments[1],1),n=this.length,r=S(t),i=m(r.length),o=0;if(i+e>n)throw K("Wrong length!");for(;o255?255:255&r),i.v[d](n*e+i.o,r,St)}(this,n,t)},enumerable:!0})};b?(p=n((function(t,n,r,i){f(t,p,c,"_d");var o,a,s,u,l=0,d=0;if(_(n)){if(!(n instanceof Z||"ArrayBuffer"==(u=w(n))||"SharedArrayBuffer"==u))return bt in n?Ct(p,n):It.call(p,n);o=n,d=kt(r,e);var v=n.byteLength;if(void 0===i){if(v%e)throw K("Wrong length!");if((a=v-d)<0)throw K("Wrong length!")}else if((a=m(i)*e)+d>v)throw K("Wrong length!");s=a/e}else s=g(n),o=new Z(a=s*e);for(h(t,"_d",{b:o,o:d,l:a,e:s,v:new G(o)});l=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],d=l[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],M=8191&S,k=S>>>13,E=0|a[5],x=8191&E,A=E>>>13,C=0|a[6],T=8191&C,I=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,j=0|a[8],L=8191&j,N=j>>>13,U=0|a[9],B=8191&U,D=U>>>13,z=0|s[0],F=8191&z,q=z>>>13,K=0|s[1],H=8191&K,W=K>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],$=8191&Y,J=Y>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,q))+Math.imul(h,F)|0))<<13)|0;c=((o=Math.imul(h,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,q))+Math.imul(m,F)|0,o=Math.imul(m,q);var vt=(c+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,F),i=(i=Math.imul(v,q))+Math.imul(y,F)|0,o=Math.imul(y,q),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,q))+Math.imul(_,F)|0,o=Math.imul(_,q),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var bt=(c+(r=r+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,q))+Math.imul(k,F)|0,o=Math.imul(k,q),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,J)|0;var wt=(c+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,F),i=(i=Math.imul(x,q))+Math.imul(A,F)|0,o=Math.imul(A,q),r=r+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(h,nt)|0))<<13)|0;c=((o=o+Math.imul(h,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,q))+Math.imul(I,F)|0,o=Math.imul(I,q),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var St=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(O,F),i=(i=Math.imul(O,q))+Math.imul(R,F)|0,o=Math.imul(R,q),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,J)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(c+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,q))+Math.imul(N,F)|0,o=Math.imul(N,q),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,J)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,q))+Math.imul(D,F)|0,o=Math.imul(D,q),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,W)|0,r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,J)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var Et=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,H),i=(i=Math.imul(B,W))+Math.imul(D,H)|0,o=Math.imul(D,W),r=r+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,J)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,ht)|0;var xt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,G))+Math.imul(D,Z)|0,o=Math.imul(D,G),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,r=r+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var At=(c+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,J))+Math.imul(D,$)|0,o=Math.imul(D,J),r=r+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,ht)|0;var Ct=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(N,nt)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Tt=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(D,nt)|0,o=Math.imul(D,rt),r=r+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,r=r+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ht)|0;var It=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),r=r+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ht)|0;var Pt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ht)|0;var Ot=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,lt),i=(i=Math.imul(B,ht))+Math.imul(D,lt)|0,o=Math.imul(D,ht);var Rt=(c+(r=r+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;c=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var jt=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(D,pt)|0))<<13)|0;return c=((o=Math.imul(D,mt))+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Mt,u[8]=kt,u[9]=Et,u[10]=xt,u[11]=At,u[12]=Ct,u[13]=Tt,u[14]=It,u[15]=Pt,u[16]=Ot,u[17]=Rt,u[18]=jt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,l);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0==(n.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var l=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,S),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(60)(t))},function(t,e,n){"use strict";const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i="["+r+"][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",o=new RegExp("^"+i+"$");e.isExist=function(t){return void 0!==t},e.isEmptyObject=function(t){return 0===Object.keys(t).length},e.merge=function(t,e,n){if(e){const r=Object.keys(e),i=r.length;for(let o=0;o>=6;var f=o/4*3;a>>=s%8;for(var l=Math.floor(s/8),h=0;h>d)}}return new Uint8Array(n)}function l(t){for(var e="",n=0;n>f]}e+="==".slice(0,4-u)}return e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return u}));var r=n(0),i=n(4),o=n(90);var a=function(){function t(t){void 0===t&&(t={}),this.httpOptions=t}return t.prototype.destroy=function(){},t.prototype.handle=function(t,e){var n=null==e?void 0:e.abortSignal,a=this.httpOptions.requestTimeout;if(null==n?void 0:n.aborted){var s=new Error("Request aborted");return s.name="AbortError",Promise.reject(s)}var u=t.path;if(t.query){var c=Object(o.a)(t.query);c&&(u+="?"+c)}var f=t.port,l=t.protocol+"//"+t.hostname+(f?":"+f:"")+u,h={body:t.body,headers:new Headers(t.headers),method:t.method};"undefined"!=typeof AbortController&&(h.signal=n);var d,p=new Request(l,h),m=[fetch(p).then((function(t){var e,n,o=t.headers,a={};try{for(var s=Object(r.__values)(o.entries()),u=s.next();!u.done;u=s.next()){var c=u.value;a[c[0]]=c[1]}}catch(t){e={error:t}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(e)throw e.error}}return void 0!==t.body?{response:new i.b({headers:a,statusCode:t.status,body:t.body})}:t.blob().then((function(e){return{response:new i.b({headers:a,statusCode:t.status,body:e})}}))})),(d=a,void 0===d&&(d=0),new Promise((function(t,e){d&&setTimeout((function(){var t=new Error("Request did not complete within "+d+" ms");t.name="TimeoutError",e(t)}),d)})))];return n&&m.push(new Promise((function(t,e){n.onabort=function(){var t=new Error("Request aborted");t.name="AbortError",e(t)}}))),Promise.race(m)},t}(),s=n(61),u=function(t){return"function"==typeof Blob&&t instanceof Blob?function(t){return Object(r.__awaiter)(this,void 0,void 0,(function(){var e,n;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return[4,c(t)];case 1:return e=r.sent(),n=Object(s.a)(e),[2,new Uint8Array(n)]}}))}))}(t):function(t){return Object(r.__awaiter)(this,void 0,void 0,(function(){var e,n,i,o,a,s,u;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:e=new Uint8Array(0),n=t.getReader(),i=!1,r.label=1;case 1:return i?[3,3]:[4,n.read()];case 2:return o=r.sent(),a=o.done,(s=o.value)&&(u=e,(e=new Uint8Array(u.length+s.length)).set(u),e.set(s,u.length)),i=a,[3,1];case 3:return[2,e]}}))}))}(t)};function c(t){return new Promise((function(e,n){var r=new FileReader;r.onloadend=function(){var t;if(2!==r.readyState)return n(new Error("Reader aborted too early"));var i=null!==(t=r.result)&&void 0!==t?t:"",o=i.indexOf(","),a=o>-1?o+1:i.length;e(i.substring(a))},r.onabort=function(){return n(new Error("Read aborted"))},r.onerror=function(){return n(r.error)},r.readAsDataURL(t)}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r=function(t){return"function"==typeof TextEncoder?function(t){return(new TextEncoder).encode(t)}(t):function(t){for(var e=[],n=0,r=t.length;n>6|192,63&i|128);else if(n+1>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else e.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(e)}(t)},i=function(t){return"function"==typeof TextDecoder?function(t){return new TextDecoder("utf-8").decode(t)}(t):function(t){for(var e="",n=0,r=t.length;n0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},i=function(){for(var t=[],e=0;e=a){var u=console.log.bind(console);"ERROR"===e&&console.error&&(u=console.error.bind(console)),"WARN"===e&&console.warn&&(u=console.warn.bind(console));var c="["+e+"] "+this._ts()+" "+this.name;if(1===n.length&&"string"==typeof n[0])u(c+" - "+n[0]);else if(1===n.length)u(c,n[0]);else if("string"==typeof n[0]){var f=n.slice(1);1===f.length&&(f=f[0]),u(c+" - "+n[0],f)}else u(c,n)}},t.prototype.log=function(){for(var t=[],e=0;edocument.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[o[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=u(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(207),i=n(147).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){"use strict";var r=n(9),i=n(16),o=n(14),a=n(12)("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(39),i=n(220),o=n(159),a=n(7),s=n(13),u=n(161),c={},f={};(e=t.exports=function(t,e,n,l,h){var d,p,m,g,v=h?function(){return t}:u(t),y=r(n,l,e?2:1),b=0;if("function"!=typeof v)throw TypeError(t+" is not iterable!");if(o(v)){for(d=s(t.length);d>b;b++)if((g=e?y(a(p=t[b])[0],p[1]):y(t[b]))===c||g===f)return g}else for(m=v.call(t);!(p=m.next()).done;)if((g=i(m,y,p.value,e))===c||g===f)return g}).BREAK=c,e.RETURN=f},function(t,e,n){var r=n(25);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){var r=n(11);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";var r=n(8).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function f(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0)return i>0&&(t.lastNeed=i-1),i;if(--r=0)return i>0&&(t.lastNeed=i-2),i;if(--r=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";var r=n(126),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=l;var o=Object.create(n(102));o.inherits=n(5);var a=n(253),s=n(177);o.inherits(l,a);for(var u=i(s.prototype),c=0;c4294967295)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(t);if(t>0)if(t>65536)for(var a=0;a2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,a,s;if("string"==typeof e&&(i="not ",e.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var u=function(t,e,n){return"number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(r," ").concat(o(e,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,n){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n(245),o=n(249);n(5)(c,i);for(var a=r(o.prototype),s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,n){"use strict";var r={};function i(t,e,n){n||(n=Error);var i=function(t){var n,r;function i(n,r,i){return t.call(this,function(t,n,r){return"string"==typeof e?e:e(t,n,r)}(n,r,i))||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i}(n);i.prototype.name=n.name,i.prototype.code=t,r[t]=i}function o(t,e){if(Array.isArray(t)){var n=t.length;return t=t.map((function(t){return String(t)})),n>2?"one of ".concat(e," ").concat(t.slice(0,n-1).join(", "),", or ")+t[n-1]:2===n?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,n){var r,i,a,s;if("string"==typeof e&&(i="not ",e.substr(!a||a<0?0:+a,i.length)===i)?(r="must not be",e=e.replace(/^not /,"")):r="must be",function(t,e,n){return(void 0===n||n>t.length)&&(n=t.length),t.substring(n-e.length,n)===e}(t," argument"))s="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var u=function(t,e,n){return"number"!=typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(u," ").concat(r," ").concat(o(e,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r},function(t,e,n){"use strict";(function(e){var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=c;var i=n(275),o=n(279);n(5)(c,i);for(var a=r(o.prototype),s=0;s=0&&!o.headers[":authority"]?(delete o.headers.host,o.headers[":authority"]=""):o.headers.host||(o.headers.host=o.hostname),[2,e(n)]):[2,e(n)]}))}))}}}(t),a)}}}},function(t,e,n){"use strict"; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */e.parse=function(t,e){if("string"!=typeof t)throw new TypeError("argument str must be a string");for(var n={},i=e||{},a=t.split(o),u=i.decode||r,c=0;c=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o>>7)^(p<<14|p>>>18)^p>>>3,g=c[d-2],v=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;c[d]=m+c[d-7]+v+c[d-16]}var y=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),w=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&f^~s&l)+u[d]+c[d];h=l,l=f,f=s,s=a+w|0,a=o,o=i,i=r,r=w+(b+y)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+f|0,n[6]=n[6]+l|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=o._createHelper(f),e.HmacSHA256=o._createHmacHelper(f)}(Math),r.SHA256)},function(t,e,n){t.exports=n(667)()},function(t,e,n){var r,i,o;t.exports=(o=n(21),i=(r=o).lib.WordArray,r.enc.Base64={stringify:function(t){var e=t.words,n=t.sigBytes,r=this._map;t.clamp();for(var i=[],o=0;o>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(t){var e=t.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var o=0;o>>6-a%4*2;r[o>>>2]|=(s|u)<<24-o%4*8,o++}return i.create(r,o)}(t,e,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},o.enc.Base64)},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return function(){throw new Error(t)}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return l}));var r=n(0),i=n(140);function o(t){var e,n=this,o=a(t.credentials||t.credentialDefaultProvider(t)),s=t.signingEscapePath,u=void 0===s||s,c=t.systemClockOffset,f=void 0===c?t.systemClockOffset||0:c,l=t.sha256;return e=t.signer?a(t.signer):function(){return a(t.region)().then((function(e){return Object(r.__awaiter)(n,void 0,void 0,(function(){return Object(r.__generator)(this,(function(n){switch(n.label){case 0:return[4,t.regionInfoProvider(e)];case 1:return[2,[n.sent()||{},e]]}}))}))})).then((function(e){var n=Object(r.__read)(e,2),a=n[0],s=n[1],c=a.signingRegion,f=void 0===c?t.signingRegion:c,h=a.signingService,d=void 0===h?t.signingName:h;return t.signingRegion=t.signingRegion||f||s,t.signingName=t.signingName||d,new i.a({credentials:o,region:t.signingRegion,service:t.signingName,sha256:l,uriEscapePath:u})}))},Object(r.__assign)(Object(r.__assign)({},t),{systemClockOffset:f,signingEscapePath:u,credentials:o,signer:e})}function a(t){if("object"==typeof t){var e=Promise.resolve(t);return function(){return e}}return t}var s=n(4),u=function(t){return new Date(Date.now()+t)};function c(t){return function(e,n){return function(i){return Object(r.__awaiter)(this,void 0,void 0,(function(){var o,a,c,f,l,h,d,p,m;return Object(r.__generator)(this,(function(g){switch(g.label){case 0:return s.a.isInstance(i.request)?"function"!=typeof t.signer?[3,2]:[4,t.signer()]:[2,e(i)];case 1:return a=g.sent(),[3,3];case 2:a=t.signer,g.label=3;case 3:return o=a,f=e,l=[Object(r.__assign)({},i)],m={},[4,o.sign(i.request,{signingDate:new Date(Date.now()+t.systemClockOffset),signingRegion:n.signing_region,signingService:n.signing_service})];case 4:return[4,f.apply(void 0,[r.__assign.apply(void 0,l.concat([(m.request=g.sent(),m)]))])];case 5:return c=g.sent(),h=c.response.headers,(d=h&&(h.date||h.Date))&&(p=Date.parse(d),v=p,y=t.systemClockOffset,Math.abs(u(y).getTime()-v)>=3e5&&(t.systemClockOffset=p-Date.now())),[2,c]}var v,y}))}))}}}var f={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware"},l=function(t){return{applyToStack:function(e){e.addRelativeTo(c(t),f)}}}},function(t,e,n){var r=n(31),i=n(13),o=n(68);t.exports=function(t){return function(e,n,a){var s,u=r(e),c=i(u.length),f=o(a,c);if(t&&n!=n){for(;c>f;)if((s=u[f++])!=s)return!0}else for(;c>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(40);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(41),i=n(45);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),c=s.length;return u<0||u>=c?t?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}}},function(t,e,n){var r=n(11),i=n(40),o=n(12)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(12)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(81),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){"use strict";n(224);var r=n(25),i=n(24),o=n(10),a=n(45),s=n(12),u=n(165),c=s("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var h=s(t),d=!o((function(){var e={};return e[h]=function(){return 7},7!=""[t](e)})),p=d?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[h](""),!e})):void 0;if(!d||!p||"replace"===t&&!f||"split"===t&&!l){var m=/./[h],g=n(a,h,""[t],(function(t,e,n,r,i){return e.exec===u?d&&!i?{done:!0,value:m.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),v=g[0],y=g[1];r(String.prototype,t,v),i(RegExp.prototype,h,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},function(t,e,n){var r=n(9).navigator;t.exports=r&&r.userAgent||""},function(t,e,n){"use strict";var r=n(9),i=n(3),o=n(25),a=n(74),s=n(57),u=n(73),c=n(72),f=n(11),l=n(10),h=n(117),d=n(80),p=n(151);t.exports=function(t,e,n,m,g,v){var y=r[t],b=y,w=g?"set":"add",_=b&&b.prototype,S={},M=function(t){var e=_[t];o(_,t,"delete"==t||"has"==t?function(t){return!(v&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof b&&(v||_.forEach&&!l((function(){(new b).entries().next()})))){var k=new b,E=k[w](v?{}:-0,1)!=k,x=l((function(){k.has(1)})),A=h((function(t){new b(t)})),C=!v&&l((function(){for(var t=new b,e=5;e--;)t[w](e,e);return!t.has(-0)}));A||((b=e((function(e,n){c(e,b,t);var r=p(new y,e,b);return null!=n&&u(n,g,r[w],r),r}))).prototype=_,_.constructor=b),(x||C)&&(M("delete"),M("has"),g&&M("get")),(C||E)&&M(w),v&&_.clear&&delete _.clear}else b=m.getConstructor(e,t,g,w),a(b.prototype,n),s.NEED=!0;return d(b,t),S[t]=b,i(i.G+i.W+i.F*(b!=y),S),v||m.setStrong(b,t,g),b}},function(t,e,n){for(var r,i=n(9),o=n(24),a=n(66),s=a("typed_array"),u=a("view"),c=!(!i.ArrayBuffer||!i.DataView),f=c,l=0,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=i[h[l++]])?(o(r.prototype,s,!0),o(r.prototype,u,!0)):f=!1;t.exports={ABV:c,CONSTR:f,TYPED:s,VIEW:u}},function(t,e,n){"use strict";t.exports=n(56)||!n(10)((function(){var t=Math.random();__defineSetter__.call(null,t,(function(){})),delete n(9)[t]}))},function(t,e,n){"use strict";var r=n(3);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=new Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){"use strict";var r=n(3),i=n(20),o=n(39),a=n(73);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,u=arguments[1];return i(this),(e=void 0!==u)&&i(u),null==t?new this:(n=[],e?(r=0,s=o(u,arguments[2],2),a(t,!1,(function(t){n.push(s(t,r++))}))):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a>>24]^f[p>>>16&255]^l[m>>>8&255]^h[255&g]^e[v++],a=c[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^h[255&d]^e[v++],s=c[m>>>24]^f[g>>>16&255]^l[d>>>8&255]^h[255&p]^e[v++],u=c[g>>>24]^f[d>>>16&255]^l[p>>>8&255]^h[255&m]^e[v++],d=o,p=a,m=s,g=u;return o=(r[d>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^e[v++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&d])^e[v++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[d>>>8&255]<<8|r[255&p])^e[v++],u=(r[g>>>24]<<24|r[d>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^e[v++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,n[a]=c,r[c]=a;var f=t[a],l=t[f],h=t[l],d=257*t[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*h^65537*l^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=f^t[t[t[h^f]]],s^=t[t[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,r=4*(n+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-e]^a}for(var c=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=r.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var n=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},function(t,e,n){var r=n(8).Buffer,i=n(171);t.exports=function(t,e,n,o){if(r.isBuffer(t)||(t=r.from(t,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=r.alloc(a),u=r.alloc(o||0),c=r.alloc(0);a>0||o>0;){var f=new i;f.update(c),f.update(t),e&&f.update(e),c=f.digest();var l=0;if(a>0){var h=s.length-a;l=Math.min(a,c.length),c.copy(s,h,0,l),a-=l}if(l0){var d=u.length-o,p=Math.min(o,c.length-l);c.copy(u,d,l,l+p),o-=p}}return c.fill(0),{key:s,iv:u}}},function(t,e,n){"use strict";var r=n(52),i=n(35),o=i.getNAF,a=i.getJSF,s=i.assert;function u(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var n=t._getDoubles(),r=o(e,1,this._bitLength),i=(1<=a;f--)u=(u<<1)+r[f];c.push(u)}for(var l=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(a=0;a=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var l=a[c];s(0!==l),u="affine"===t.type?l>0?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):l>0?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,n,r,i){var s,u,c,f=this._wnafT1,l=this._wnafT2,h=this._wnafT3,d=0;for(s=0;s=1;s-=2){var m=s-1,g=s;if(1===f[m]&&1===f[g]){var v=[e[m],null,null,e[g]];0===e[m].y.cmp(e[g].y)?(v[1]=e[m].add(e[g]),v[2]=e[m].toJ().mixedAdd(e[g].neg())):0===e[m].y.cmp(e[g].y.redNeg())?(v[1]=e[m].toJ().mixedAdd(e[g]),v[2]=e[m].add(e[g].neg())):(v[1]=e[m].toJ().mixedAdd(e[g]),v[2]=e[m].toJ().mixedAdd(e[g].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=a(n[m],n[g]);for(d=Math.max(b[0].length,d),h[m]=new Array(d),h[g]=new Array(d),u=0;u=0;s--){for(var k=0;s>=0;){var E=!0;for(u=0;u=0&&k++,S=S.dblp(k),s<0)break;for(u=0;u0?c=l[u][x-1>>1]:x<0&&(c=l[u][-x-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(s=0;s=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,r.nameRegexp);!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const a={attributeNamePrefix:"@_",attrNodeName:!1,textNodeName:"#text",ignoreAttributes:!0,ignoreNameSpace:!1,allowBooleanAttributes:!1,parseNodeValue:!0,parseAttributeValue:!1,arrayMode:!1,trimValues:!0,cdataTagName:!1,cdataPositionChar:"\\c",tagValueProcessor:function(t,e){return t},attrValueProcessor:function(t,e){return t},stopNodes:[]};e.defaultOptions=a;const s=["attributeNamePrefix","attrNodeName","textNodeName","ignoreAttributes","ignoreNameSpace","allowBooleanAttributes","parseNodeValue","parseAttributeValue","arrayMode","trimValues","cdataTagName","cdataPositionChar","tagValueProcessor","attrValueProcessor","parseTrueNumberOnly","stopNodes"];function u(t,e,n){return e&&(n.trimValues&&(e=e.trim()),e=f(e=n.tagValueProcessor(e,t),n.parseNodeValue,n.parseTrueNumberOnly)),e}function c(t,e){if(e.ignoreNameSpace){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}function f(t,e,n){if(e&&"string"==typeof t){let e;return""===t.trim()||isNaN(t)?e="true"===t||"false"!==t&&t:(-1!==t.indexOf("0x")?e=Number.parseInt(t,16):-1!==t.indexOf(".")?(e=Number.parseFloat(t),t=t.replace(/\.?0+$/,"")):e=Number.parseInt(t,10),n&&(e=String(e)===t?e:t)),e}return r.isExist(t)?t:""}e.props=s;const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])(.*?)\\3)?","g");function h(t,e){if(!e.ignoreAttributes&&"string"==typeof t){t=t.replace(/\r?\n/g," ");const n=r.getAllMatches(t,l),i=n.length,o={};for(let t=0;t"===e)return{data:r,index:i};"\t"===e&&(e=" ")}r+=e}}function p(t,e,n,r){const i=t.indexOf(e,n);if(-1===i)throw new Error(r);return i+e.length-1}e.getTraversalObj=function(t,e){t=t.replace(/\r\n?/g,"\n"),e=i(e,a,s);const n=new o("!xml");let c=n,f="";for(let n=0;n",n,"Closing Tag is not closed.");let o=t.substring(n+2,i).trim();if(e.ignoreNameSpace){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}c&&(c.val?c.val=r.getValue(c.val)+""+u(o,f,e):c.val=u(o,f,e)),e.stopNodes.length&&e.stopNodes.includes(c.tagname)&&(c.child=[],null==c.attrsMap&&(c.attrsMap={}),c.val=t.substr(c.startIndex+1,n-c.startIndex-1)),c=c.parent,f="",n=i}else if("?"===t[n+1])n=p(t,"?>",n,"Pi Tag is not closed.");else if("!--"===t.substr(n+1,3))n=p(t,"--\x3e",n,"Comment is not closed.");else if("!D"===t.substr(n+1,2)){const e=p(t,">",n,"DOCTYPE is not closed.");n=t.substring(n,e).indexOf("[")>=0?t.indexOf("]>",n)+1:e}else if("!["===t.substr(n+1,2)){const i=p(t,"]]>",n,"CDATA is not closed.")-2,a=t.substring(n+9,i);if(f&&(c.val=r.getValue(c.val)+""+u(c.tagname,f,e),f=""),e.cdataTagName){const t=new o(e.cdataTagName,c,a);c.addChild(t),c.val=r.getValue(c.val)+e.cdataPositionChar,a&&(t.val=a)}else c.val=(c.val||"")+(a||"");n=i+2}else{const i=d(t,n+1);let a=i.data;const s=i.index,l=a.indexOf(" ");let p=a;if(-1!==l&&(p=a.substr(0,l).replace(/\s\s*$/,""),a=a.substr(l+1)),e.ignoreNameSpace){const t=p.indexOf(":");-1!==t&&(p=p.substr(t+1))}if(c&&f&&"!xml"!==c.tagname&&(c.val=r.getValue(c.val)+""+u(c.tagname,f,e)),a.length>0&&a.lastIndexOf("/")===a.length-1){"/"===p[p.length-1]?(p=p.substr(0,p.length-1),a=p):a=a.substr(0,a.length-1);const t=new o(p,c,"");p!==a&&(t.attrsMap=h(a,e)),c.addChild(t)}else{const t=new o(p,c);e.stopNodes.length&&e.stopNodes.includes(t.tagname)&&(t.startIndex=s),p!==a&&(t.attrsMap=h(a,e)),c.addChild(t),c=t}f="",n=s}else f+=t[n]}return n}},function(t,e,n){"use strict";var r=n(37),i={keyPrefix:"aws-amplify-cache",capacityInBytes:1048576,itemMaxSize:21e4,defaultTTL:2592e5,defaultPriority:5,warningThreshold:.8,storage:(new(n(318).a)).getStorage()};function o(t){var e=0;e=t.length;for(var n=t.length;n>=0;n-=1){var r=t.charCodeAt(n);r>127&&r<=2047?e+=1:r>2047&&r<=65535&&(e+=2),r>=56320&&r<=57343&&(n-=1)}return e}function a(){return(new Date).getTime()}function s(t){return Number.isInteger?Number.isInteger(t):function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}(t)}var u,c={},f=(function(){function t(){}t.clear=function(){c={}},t.getItem=function(t){return c[t]||null},t.setItem=function(t,e){c[t]=e},t.removeItem=function(t){delete c[t]}}(),n(64)),l=new f.a("StorageCache"),h=function(){function t(t){this.config=Object.assign({},t),this.cacheCurSizeKey=this.config.keyPrefix+"CurSize",this.checkConfig()}return t.prototype.getModuleName=function(){return"Cache"},t.prototype.checkConfig=function(){s(this.config.capacityInBytes)||(l.error("Invalid parameter: capacityInBytes. It should be an Integer. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes),s(this.config.itemMaxSize)||(l.error("Invalid parameter: itemMaxSize. It should be an Integer. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),s(this.config.defaultTTL)||(l.error("Invalid parameter: defaultTTL. It should be an Integer. Setting back to default."),this.config.defaultTTL=i.defaultTTL),s(this.config.defaultPriority)||(l.error("Invalid parameter: defaultPriority. It should be an Integer. Setting back to default."),this.config.defaultPriority=i.defaultPriority),this.config.itemMaxSize>this.config.capacityInBytes&&(l.error("Invalid parameter: itemMaxSize. It should be smaller than capacityInBytes. Setting back to default."),this.config.itemMaxSize=i.itemMaxSize),(this.config.defaultPriority>5||this.config.defaultPriority<1)&&(l.error("Invalid parameter: defaultPriority. It should be between 1 and 5. Setting back to default."),this.config.defaultPriority=i.defaultPriority),(Number(this.config.warningThreshold)>1||Number(this.config.warningThreshold)<0)&&(l.error("Invalid parameter: warningThreshold. It should be between 0 and 1. Setting back to default."),this.config.warningThreshold=i.warningThreshold);this.config.capacityInBytes>5242880&&(l.error("Cache Capacity should be less than 5MB. Setting back to default. Setting back to default."),this.config.capacityInBytes=i.capacityInBytes)},t.prototype.fillCacheItem=function(t,e,n){var r={key:t,data:e,timestamp:a(),visitedTime:a(),priority:n.priority,expires:n.expires,type:typeof e,byteSize:0};return r.byteSize=o(JSON.stringify(r)),r.byteSize=o(JSON.stringify(r)),r},t.prototype.configure=function(t){return t?(t.keyPrefix&&l.warn("Don't try to configure keyPrefix!"),this.config=Object.assign({},this.config,t,t.Cache),this.checkConfig(),this.config):this.config},t}(),d=(u=function(t,e){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),p=new f.a("Cache"),m=new(function(t){function e(e){var n=this,r=e?Object.assign({},i,e):i;return(n=t.call(this,r)||this).config.storage=r.storage,n.getItem=n.getItem.bind(n),n.setItem=n.setItem.bind(n),n.removeItem=n.removeItem.bind(n),n}return d(e,t),e.prototype._decreaseCurSizeInBytes=function(t){var e=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(e-t).toString())},e.prototype._increaseCurSizeInBytes=function(t){var e=this.getCacheCurSize();this.config.storage.setItem(this.cacheCurSizeKey,(e+t).toString())},e.prototype._refreshItem=function(t,e){return t.visitedTime=a(),this.config.storage.setItem(e,JSON.stringify(t)),t},e.prototype._isExpired=function(t){var e=this.config.storage.getItem(t),n=JSON.parse(e);return a()>=n.expires},e.prototype._removeItem=function(t,e){var n=e||JSON.parse(this.config.storage.getItem(t)).byteSize;this._decreaseCurSizeInBytes(n),this.config.storage.removeItem(t)},e.prototype._setItem=function(t,e){this._increaseCurSizeInBytes(e.byteSize);try{this.config.storage.setItem(t,JSON.stringify(e))}catch(t){this._decreaseCurSizeInBytes(e.byteSize),p.error("Failed to set item "+t)}},e.prototype._sizeToPop=function(t){var e=this.getCacheCurSize()+t-this.config.capacityInBytes,n=(1-this.config.warningThreshold)*this.config.capacityInBytes;return e>n?e:n},e.prototype._isCacheFull=function(t){return t+this.getCacheCurSize()>this.config.capacityInBytes},e.prototype._findValidKeys=function(){for(var t=[],e=[],n=0;ne.priority?-1:t.priority5)p.warn("Invalid parameter: priority due to out or range. It should be within 1 and 5.");else{var o=this.fillCacheItem(r,e,i);if(o.byteSize>this.config.itemMaxSize)p.warn("Item with key: "+t+" you are trying to put into is too big!");else try{var s=this.config.storage.getItem(r);if(s&&this._removeItem(r,JSON.parse(s).byteSize),this._isCacheFull(o.byteSize)){var u=this._findValidKeys();if(this._isCacheFull(o.byteSize)){var c=this._sizeToPop(o.byteSize);this._popOutItems(u,c)}}this._setItem(r,o)}catch(t){p.warn("setItem failed! "+t)}}}else p.warn("The value of item should not be undefined!");else p.warn("Invalid key: should not be empty or 'CurSize'")},e.prototype.getItem=function(t,e){p.log("Get item: key is "+t+" with options "+e);var n=null,r=this.config.keyPrefix+t;if(r===this.config.keyPrefix||r===this.cacheCurSizeKey)return p.warn("Invalid key: should not be empty or 'CurSize'"),null;try{if(null!=(n=this.config.storage.getItem(r))){if(!this._isExpired(r)){var i=JSON.parse(n);return(i=this._refreshItem(i,r)).data}this._removeItem(r,JSON.parse(n).byteSize),n=null}if(e&&void 0!==e.callback){var o=e.callback();return null!==o&&this.setItem(t,o,e),o}return null}catch(t){return p.warn("getItem failed! "+t),null}},e.prototype.removeItem=function(t){p.log("Remove item: key is "+t);var e=this.config.keyPrefix+t;if(e!==this.config.keyPrefix&&e!==this.cacheCurSizeKey)try{var n=this.config.storage.getItem(e);n&&this._removeItem(e,JSON.parse(n).byteSize)}catch(t){p.warn("removeItem failed! "+t)}},e.prototype.clear=function(){p.log("Clear Cache");for(var t=[],e=0;e=0;n--){var r=t.charCodeAt(n);r>127&&r<=2047?e++:r>2047&&r<=65535&&(e+=2)}return e}return"number"==typeof t.byteLength?t.byteLength:"number"==typeof t.size?t.size:void 0}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){return"aws-sdk-js-v3-"+t+"/"+e+" "+("undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Crc32=e.crc32=void 0;var r=n(0);e.crc32=function(t){return(new i).update(t).digest()};var i=function(){function t(){this.checksum=4294967295}return t.prototype.update=function(t){var e,n;try{for(var i=r.__values(t),a=i.next();!a.done;a=i.next()){var s=a.value;this.checksum=this.checksum>>>8^o[255&(this.checksum^s)]}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return this},t.prototype.digest=function(){return(4294967295^this.checksum)>>>0},t}();e.Crc32=i;var o=Uint32Array.from([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117])},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var r=n(0),i="X-Amz-Date".toLowerCase(),o=["authorization",i,"date"],a="X-Amz-Signature".toLowerCase(),s="X-Amz-Security-Token".toLowerCase(),u={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},c=/^proxy-/,f=/^sec-/,l="AWS4-HMAC-SHA256-PAYLOAD",h={},d=[];function p(t,e,n){return t+"/"+e+"/"+n+"/aws4_request"}var m=n(19);function g(t,e,n){var i,o,a=t.headers,s={};try{for(var l=Object(r.__values)(Object.keys(a).sort()),h=l.next();!h.done;h=l.next()){var d=h.value,p=d.toLowerCase();(p in u||(null==e?void 0:e.has(p))||c.test(p)||f.test(p))&&(!n||n&&!n.has(p))||(s[p]=a[d].trim().replace(/\s+/g," "))}}catch(t){i={error:t}}finally{try{h&&!h.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}return s}var v=n(54);var y=n(320);function b(t,e){var n=t.headers,i=t.body;return Object(r.__awaiter)(this,void 0,void 0,(function(){var t,o,a,s,u,c,f;return Object(r.__generator)(this,(function(l){switch(l.label){case 0:try{for(t=Object(r.__values)(Object.keys(n)),o=t.next();!o.done;o=t.next())if("x-amz-content-sha256"===(a=o.value).toLowerCase())return[2,n[a]]}catch(t){c={error:t}}finally{try{o&&!o.done&&(f=t.return)&&f.call(t)}finally{if(c)throw c.error}}return null!=i?[3,1]:[2,"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"];case 1:return"string"==typeof i||ArrayBuffer.isView(i)||Object(y.a)(i)?((s=new e).update(i),u=m.b,[4,s.digest()]):[3,3];case 2:return[2,u.apply(void 0,[l.sent()])];case 3:return[2,"UNSIGNED-PAYLOAD"]}}))}))}function w(t){var e=t.headers,n=t.query,i=Object(r.__rest)(t,["headers","query"]);return Object(r.__assign)(Object(r.__assign)({},i),{headers:Object(r.__assign)({},e),query:n?_(n):void 0})}function _(t){return Object.keys(t).reduce((function(e,n){var i,o=t[n];return Object(r.__assign)(Object(r.__assign)({},e),((i={})[n]=Array.isArray(o)?Object(r.__spread)(o):o,i))}),{})}function S(t){var e,n;t="function"==typeof t.clone?t.clone():w(t);try{for(var i=Object(r.__values)(Object.keys(t.headers)),a=i.next();!a.done;a=i.next()){var s=a.value;o.indexOf(s.toLowerCase())>-1&&delete t.headers[s]}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return t}function M(t){return function(t){if("number"==typeof t)return new Date(1e3*t);if("string"==typeof t)return Number(t)?new Date(1e3*Number(t)):new Date(t);return t}(t).toISOString().replace(/\.\d{3}Z$/,"Z")}var k=function(){function t(t){var e=t.applyChecksum,n=t.credentials,r=t.region,i=t.service,o=t.sha256,a=t.uriEscapePath,s=void 0===a||a;this.service=i,this.sha256=o,this.uriEscapePath=s,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=A(r),this.credentialProvider=C(n)}return t.prototype.presign=function(t,e){return void 0===e&&(e={}),Object(r.__awaiter)(this,void 0,void 0,(function(){var n,i,o,a,s,u,c,f,l,h,d,m,v,y,_,M,k,A,C,T,I,P,O;return Object(r.__generator)(this,(function(R){switch(R.label){case 0:return n=e.signingDate,i=void 0===n?new Date:n,o=e.expiresIn,a=void 0===o?3600:o,s=e.unsignableHeaders,u=e.signableHeaders,c=e.signingRegion,f=e.signingService,[4,this.credentialProvider()];case 1:return l=R.sent(),null==c?[3,2]:(d=c,[3,4]);case 2:return[4,this.regionProvider()];case 3:d=R.sent(),R.label=4;case 4:return h=d,m=E(i),v=m.longDate,y=m.shortDate,a>604800?[2,Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future")]:(_=p(y,h,null!=f?f:this.service),M=function(t){var e,n,i="function"==typeof t.clone?t.clone():w(t),o=i.headers,a=i.query,s=void 0===a?{}:a;try{for(var u=Object(r.__values)(Object.keys(o)),c=u.next();!c.done;c=u.next()){var f=c.value;"x-amz-"===f.toLowerCase().substr(0,6)&&(s[f]=o[f],delete o[f])}}catch(t){e={error:t}}finally{try{c&&!c.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return Object(r.__assign)(Object(r.__assign)({},t),{headers:o,query:s})}(S(t)),l.sessionToken&&(M.query["X-Amz-Security-Token"]=l.sessionToken),M.query["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",M.query["X-Amz-Credential"]=l.accessKeyId+"/"+_,M.query["X-Amz-Date"]=v,M.query["X-Amz-Expires"]=a.toString(10),k=g(M,s,u),M.query["X-Amz-SignedHeaders"]=x(k),A=M.query,C="X-Amz-Signature",T=this.getSignature,I=[v,_,this.getSigningKey(l,h,y,f)],P=this.createCanonicalRequest,O=[M,k],[4,b(t,this.sha256)]);case 5:return[4,T.apply(this,I.concat([P.apply(this,O.concat([R.sent()]))]))];case 6:return A[C]=R.sent(),[2,M]}}))}))},t.prototype.sign=function(t,e){return Object(r.__awaiter)(this,void 0,void 0,(function(){return Object(r.__generator)(this,(function(n){return"string"==typeof t?[2,this.signString(t,e)]:t.headers&&t.payload?[2,this.signEvent(t,e)]:[2,this.signRequest(t,e)]}))}))},t.prototype.signEvent=function(t,e){var n=t.headers,i=t.payload,o=e.signingDate,a=void 0===o?new Date:o,s=e.priorSignature,u=e.signingRegion,c=e.signingService;return Object(r.__awaiter)(this,void 0,void 0,(function(){var t,e,o,f,h,d,g,v,y,w,_;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return null==u?[3,1]:(e=u,[3,3]);case 1:return[4,this.regionProvider()];case 2:e=r.sent(),r.label=3;case 3:return t=e,o=E(a),f=o.shortDate,h=o.longDate,d=p(f,t,null!=c?c:this.service),[4,b({headers:{},body:i},this.sha256)];case 4:return g=r.sent(),(v=new this.sha256).update(n),w=m.b,[4,v.digest()];case 5:return y=w.apply(void 0,[r.sent()]),_=[l,h,d,s,y,g].join("\n"),[2,this.signString(_,{signingDate:a,signingRegion:t,signingService:c})]}}))}))},t.prototype.signString=function(t,e){var n=void 0===e?{}:e,i=n.signingDate,o=void 0===i?new Date:i,a=n.signingRegion,s=n.signingService;return Object(r.__awaiter)(this,void 0,void 0,(function(){var e,n,i,u,c,f,l,h;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.credentialProvider()];case 1:return e=r.sent(),null==a?[3,2]:(i=a,[3,4]);case 2:return[4,this.regionProvider()];case 3:i=r.sent(),r.label=4;case 4:return n=i,u=E(o).shortDate,l=(f=this.sha256).bind,[4,this.getSigningKey(e,n,u,s)];case 5:return(c=new(l.apply(f,[void 0,r.sent()]))).update(t),h=m.b,[4,c.digest()];case 6:return[2,h.apply(void 0,[r.sent()])]}}))}))},t.prototype.signRequest=function(t,e){var n=void 0===e?{}:e,o=n.signingDate,a=void 0===o?new Date:o,u=n.signableHeaders,c=n.unsignableHeaders,f=n.signingRegion,l=n.signingService;return Object(r.__awaiter)(this,void 0,void 0,(function(){var e,n,o,h,d,m,v,y,w,_,M;return Object(r.__generator)(this,(function(k){switch(k.label){case 0:return[4,this.credentialProvider()];case 1:return e=k.sent(),null==f?[3,2]:(o=f,[3,4]);case 2:return[4,this.regionProvider()];case 3:o=k.sent(),k.label=4;case 4:return n=o,h=S(t),d=E(a),m=d.longDate,v=d.shortDate,y=p(v,n,null!=l?l:this.service),h.headers[i]=m,e.sessionToken&&(h.headers[s]=e.sessionToken),[4,b(h,this.sha256)];case 5:return w=k.sent(),!function(t,e){var n,i;t=t.toLowerCase();try{for(var o=Object(r.__values)(Object.keys(e)),a=o.next();!a.done;a=o.next()){if(t===a.value.toLowerCase())return!0}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return!1}("x-amz-content-sha256",h.headers)&&this.applyChecksum&&(h.headers["x-amz-content-sha256"]=w),_=g(h,c,u),[4,this.getSignature(m,y,this.getSigningKey(e,n,v,l),this.createCanonicalRequest(h,_,w))];case 6:return M=k.sent(),h.headers.authorization="AWS4-HMAC-SHA256 Credential="+e.accessKeyId+"/"+y+", SignedHeaders="+x(_)+", Signature="+M,[2,h]}}))}))},t.prototype.createCanonicalRequest=function(t,e,n){var i=Object.keys(e).sort();return t.method+"\n"+this.getCanonicalPath(t)+"\n"+function(t){var e,n,i=t.query,o=void 0===i?{}:i,s=[],u={},c=function(t){if(t.toLowerCase()===a)return"continue";s.push(t);var e=o[t];"string"==typeof e?u[t]=Object(v.a)(t)+"="+Object(v.a)(e):Array.isArray(e)&&(u[t]=e.slice(0).sort().reduce((function(e,n){return e.concat([Object(v.a)(t)+"="+Object(v.a)(n)])}),[]).join("&"))};try{for(var f=Object(r.__values)(Object.keys(o).sort()),l=f.next();!l.done;l=f.next()){c(l.value)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(e)throw e.error}}return s.map((function(t){return u[t]})).filter((function(t){return t})).join("&")}(t)+"\n"+i.map((function(t){return t+":"+e[t]})).join("\n")+"\n\n"+i.join(";")+"\n"+n},t.prototype.createStringToSign=function(t,e,n){return Object(r.__awaiter)(this,void 0,void 0,(function(){var i,o;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return(i=new this.sha256).update(n),[4,i.digest()];case 1:return o=r.sent(),[2,"AWS4-HMAC-SHA256\n"+t+"\n"+e+"\n"+Object(m.b)(o)]}}))}))},t.prototype.getCanonicalPath=function(t){var e=t.path;return this.uriEscapePath?"/"+encodeURIComponent(e.replace(/^\//,"")).replace(/%2F/g,"/"):e},t.prototype.getSignature=function(t,e,n,i){return Object(r.__awaiter)(this,void 0,void 0,(function(){var o,a,s,u,c;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return[4,this.createStringToSign(t,e,i)];case 1:return o=r.sent(),u=(s=this.sha256).bind,[4,n];case 2:return(a=new(u.apply(s,[void 0,r.sent()]))).update(o),c=m.b,[4,a.digest()];case 3:return[2,c.apply(void 0,[r.sent()])]}}))}))},t.prototype.getSigningKey=function(t,e,n,i){return function(t,e,n,i,o){var a=n+":"+i+":"+o+":"+e.accessKeyId+":"+e.sessionToken;if(a in h)return h[a];for(d.push(a);d.length>50;)delete h[d.shift()];return h[a]=new Promise((function(s,u){var c,f,l=Promise.resolve("AWS4"+e.secretAccessKey),d=function(e){(l=l.then((function(n){return r=e,(i=new t(n)).update(r),i.digest();var r,i}))).catch((function(){}))};try{for(var p=Object(r.__values)([n,i,o,"aws4_request"]),m=p.next();!m.done;m=p.next()){d(m.value)}}catch(t){c={error:t}}finally{try{m&&!m.done&&(f=p.return)&&f.call(p)}finally{if(c)throw c.error}}l.then(s,(function(t){delete h[a],u(t)}))}))}(this.sha256,t,n,e,i||this.service)},t}(),E=function(t){var e=M(t).replace(/[\-:]/g,"");return{longDate:e,shortDate:e.substr(0,8)}},x=function(t){return Object.keys(t).sort().join(";")},A=function(t){if("string"==typeof t){var e=Promise.resolve(t);return function(){return e}}return t},C=function(t){if("object"==typeof t){var e=Promise.resolve(t);return function(){return e}}return t}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(0),i={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize"},o=function(t){return{applyToStack:function(t){t.add((function(t,e){return function(n){return Object(r.__awaiter)(void 0,void 0,void 0,(function(){var i,o,a,s;return Object(r.__generator)(this,(function(r){switch(r.label){case 0:return i=e.logger,[4,t(n)];case 1:return o=r.sent(),i?(a=o.response,"function"==typeof i.info&&i.info({metadata:{statusCode:a.statusCode,requestId:null!==(s=a.headers["x-amzn-requestid"])&&void 0!==s?s:a.headers["x-amzn-request-id"],extendedRequestId:a.headers["x-amz-id-2"],cfId:a.headers["x-amz-cf-id"]}}),[2,o]):[2,o]}}))}))}}),i)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r={userAgent:"aws-amplify/3.8.11 js",product:"",navigator:null,isReactNative:!1};if("undefined"!=typeof navigator&&navigator.product)switch(r.product=navigator.product||"",r.navigator=navigator||null,navigator.product){case"ReactNative":r.userAgent="aws-amplify/3.8.11 react-native",r.isReactNative=!0;break;default:r.userAgent="aws-amplify/3.8.11 js",r.isReactNative=!1}var i=function(){return r.userAgent}},,function(t,e,n){var r=n(11),i=n(9).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(9),i=n(38),o=n(56),a=n(206),s=n(16).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var r=n(96)("keys"),i=n(66);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(9).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(11),i=n(7),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(39)(Function.call,n(32).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var r=n(11),i=n(149).set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){"use strict";var r=n(41),i=n(45);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){"use strict";var r=n(56),i=n(3),o=n(25),a=n(24),s=n(83),u=n(156),c=n(80),f=n(33),l=n(12)("iterator"),h=!([].keys&&"next"in[].keys()),d=function(){return this};t.exports=function(t,e,n,p,m,g,v){u(n,e,p);var y,b,w,_=function(t){if(!h&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",M="values"==m,k=!1,E=t.prototype,x=E[l]||E["@@iterator"]||m&&E[m],A=x||_(m),C=m?M?_("entries"):A:void 0,T="Array"==e&&E.entries||x;if(T&&(w=f(T.call(new t)))!==Object.prototype&&w.next&&(c(w,S,!0),r||"function"==typeof w[l]||a(w,l,d)),M&&x&&"values"!==x.name&&(k=!0,A=function(){return x.call(this)}),r&&!v||!h&&!k&&E[l]||a(E,l,A),s[e]=A,s[S]=d,m)if(y={values:M?A:_("values"),keys:g?A:_("keys"),entries:C},v)for(b in y)b in E||o(E,b,y[b]);else i(i.P+i.F*(h||k),e,y);return y}},function(t,e,n){"use strict";var r=n(69),i=n(65),o=n(80),a={};n(24)(a,n(12)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){var r=n(116),i=n(45);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(12)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var r=n(83),i=n(12)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(16),i=n(65);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(81),i=n(12)("iterator"),o=n(83);t.exports=n(38).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(428);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){"use strict";var r=n(17),i=n(68),o=n(13);t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(58),i=n(223),o=n(83),a=n(31);t.exports=n(155)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e,n){"use strict";var r,i,o=n(99),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,c=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=void 0!==/()??/.exec("")[1];(c||f)&&(u=function(t){var e,n,r,i,u=this;return f&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),c&&(e=u.lastIndex),r=a.call(u,t),c&&r&&(u.lastIndex=u.global?r.index+r[0].length:e),f&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;in;)e.push(arguments[n++]);return v[++g]=function(){s("function"==typeof t?t:Function(t),e)},r(g),g},d=function(t){delete v[t]},"process"==n(40)(l)?r=function(t){l.nextTick(a(y,t,1))}:m&&m.now?r=function(t){m.now(a(y,t,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(t){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),y.call(t)}}:function(t){setTimeout(a(y,t,1),0)}),t.exports={set:h,clear:d}},function(t,e,n){var r=n(9),i=n(167).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(40)(a);t.exports=function(){var t,e,n,c=function(){var r,i;for(u&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(c)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(c)}}else n=function(){i.call(r,c)};else{var l=!0,h=document.createTextNode("");new o(c).observe(h,{characterData:!0}),n=function(){h.data=l=!l}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";var r=n(20);function i(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new i(t)}},function(t,e,n){"use strict";var r=n(9),i=n(14),o=n(56),a=n(122),s=n(24),u=n(74),c=n(10),f=n(72),l=n(41),h=n(13),d=n(233),p=n(70).f,m=n(16).f,g=n(163),v=n(80),y=r.ArrayBuffer,b=r.DataView,w=r.Math,_=r.RangeError,S=r.Infinity,M=y,k=w.abs,E=w.pow,x=w.floor,A=w.log,C=w.LN2,T=i?"_b":"buffer",I=i?"_l":"byteLength",P=i?"_o":"byteOffset";function O(t,e,n){var r,i,o,a=new Array(n),s=8*n-e-1,u=(1<>1,f=23===e?E(2,-24)-E(2,-77):0,l=0,h=t<0||0===t&&1/t<0?1:0;for((t=k(t))!=t||t===S?(i=t!=t?1:0,r=u):(r=x(A(t)/C),t*(o=E(2,-r))<1&&(r--,o*=2),(t+=r+c>=1?f/o:f*E(2,1-c))*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(t*o-1)*E(2,e),r+=c):(i=t*E(2,c-1)*E(2,e),r=0));e>=8;a[l++]=255&i,i/=256,e-=8);for(r=r<0;a[l++]=255&r,r/=256,s-=8);return a[--l]|=128*h,a}function R(t,e,n){var r,i=8*n-e-1,o=(1<>1,s=i-7,u=n-1,c=t[u--],f=127&c;for(c>>=7;s>0;f=256*f+t[u],u--,s-=8);for(r=f&(1<<-s)-1,f>>=-s,s+=e;s>0;r=256*r+t[u],u--,s-=8);if(0===f)f=1-a;else{if(f===o)return r?NaN:c?-S:S;r+=E(2,e),f-=a}return(c?-1:1)*r*E(2,f-e)}function j(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function L(t){return[255&t]}function N(t){return[255&t,t>>8&255]}function U(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function B(t){return O(t,52,8)}function D(t){return O(t,23,4)}function z(t,e,n){m(t.prototype,e,{get:function(){return this[n]}})}function F(t,e,n,r){var i=d(+n);if(i+e>t[I])throw _("Wrong index!");var o=t[T]._b,a=i+t[P],s=o.slice(a,a+e);return r?s:s.reverse()}function q(t,e,n,r,i,o){var a=d(+n);if(a+e>t[I])throw _("Wrong index!");for(var s=t[T]._b,u=a+t[P],c=r(+i),f=0;fV;)(K=W[V++])in y||s(y,K,M[K]);o||(H.constructor=y)}var Z=new b(new y(2)),G=b.prototype.setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||u(b.prototype,{setInt8:function(t,e){G.call(this,t,e<<24>>24)},setUint8:function(t,e){G.call(this,t,e<<24>>24)}},!0)}else y=function(t){f(this,y,"ArrayBuffer");var e=d(t);this._b=g.call(new Array(e),0),this[I]=e},b=function(t,e,n){f(this,b,"DataView"),f(t,y,"DataView");var r=t[I],i=l(e);if(i<0||i>r)throw _("Wrong offset!");if(i+(n=void 0===n?r-i:h(n))>r)throw _("Wrong length!");this[T]=t,this[P]=i,this[I]=n},i&&(z(y,"byteLength","_l"),z(b,"buffer","_b"),z(b,"byteLength","_l"),z(b,"byteOffset","_o")),u(b.prototype,{getInt8:function(t){return F(this,1,t)[0]<<24>>24},getUint8:function(t){return F(this,1,t)[0]},getInt16:function(t){var e=F(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=F(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return j(F(this,4,t,arguments[1]))},getUint32:function(t){return j(F(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return R(F(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return R(F(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){q(this,1,t,L,e)},setUint8:function(t,e){q(this,1,t,L,e)},setInt16:function(t,e){q(this,2,t,N,e,arguments[2])},setUint16:function(t,e){q(this,2,t,N,e,arguments[2])},setInt32:function(t,e){q(this,4,t,U,e,arguments[2])},setUint32:function(t,e){q(this,4,t,U,e,arguments[2])},setFloat32:function(t,e){q(this,4,t,D,e,arguments[2])},setFloat64:function(t,e){q(this,8,t,B,e,arguments[2])}});v(y,"ArrayBuffer"),v(b,"DataView"),s(b.prototype,a.VIEW,!0),e.ArrayBuffer=y,e.DataView=b},function(t,e,n){"use strict";var r=n(5),i=n(244),o=n(8).Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<>>32-e}function c(t,e,n,r,i,o,a){return u(t+(e&n|~e&r)+i+o|0,a)+e|0}function f(t,e,n,r,i,o,a){return u(t+(e&r|n&~r)+i+o|0,a)+e|0}function l(t,e,n,r,i,o,a){return u(t+(e^n^r)+i+o|0,a)+e|0}function h(t,e,n,r,i,o,a){return u(t+(n^(e|~r))+i+o|0,a)+e|0}r(s,i),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,r=this._b,i=this._c,o=this._d;n=c(n,r,i,o,t[0],3614090360,7),o=c(o,n,r,i,t[1],3905402710,12),i=c(i,o,n,r,t[2],606105819,17),r=c(r,i,o,n,t[3],3250441966,22),n=c(n,r,i,o,t[4],4118548399,7),o=c(o,n,r,i,t[5],1200080426,12),i=c(i,o,n,r,t[6],2821735955,17),r=c(r,i,o,n,t[7],4249261313,22),n=c(n,r,i,o,t[8],1770035416,7),o=c(o,n,r,i,t[9],2336552879,12),i=c(i,o,n,r,t[10],4294925233,17),r=c(r,i,o,n,t[11],2304563134,22),n=c(n,r,i,o,t[12],1804603682,7),o=c(o,n,r,i,t[13],4254626195,12),i=c(i,o,n,r,t[14],2792965006,17),n=f(n,r=c(r,i,o,n,t[15],1236535329,22),i,o,t[1],4129170786,5),o=f(o,n,r,i,t[6],3225465664,9),i=f(i,o,n,r,t[11],643717713,14),r=f(r,i,o,n,t[0],3921069994,20),n=f(n,r,i,o,t[5],3593408605,5),o=f(o,n,r,i,t[10],38016083,9),i=f(i,o,n,r,t[15],3634488961,14),r=f(r,i,o,n,t[4],3889429448,20),n=f(n,r,i,o,t[9],568446438,5),o=f(o,n,r,i,t[14],3275163606,9),i=f(i,o,n,r,t[3],4107603335,14),r=f(r,i,o,n,t[8],1163531501,20),n=f(n,r,i,o,t[13],2850285829,5),o=f(o,n,r,i,t[2],4243563512,9),i=f(i,o,n,r,t[7],1735328473,14),n=l(n,r=f(r,i,o,n,t[12],2368359562,20),i,o,t[5],4294588738,4),o=l(o,n,r,i,t[8],2272392833,11),i=l(i,o,n,r,t[11],1839030562,16),r=l(r,i,o,n,t[14],4259657740,23),n=l(n,r,i,o,t[1],2763975236,4),o=l(o,n,r,i,t[4],1272893353,11),i=l(i,o,n,r,t[7],4139469664,16),r=l(r,i,o,n,t[10],3200236656,23),n=l(n,r,i,o,t[13],681279174,4),o=l(o,n,r,i,t[0],3936430074,11),i=l(i,o,n,r,t[3],3572445317,16),r=l(r,i,o,n,t[6],76029189,23),n=l(n,r,i,o,t[9],3654602809,4),o=l(o,n,r,i,t[12],3873151461,11),i=l(i,o,n,r,t[15],530742520,16),n=h(n,r=l(r,i,o,n,t[2],3299628645,23),i,o,t[0],4096336452,6),o=h(o,n,r,i,t[7],1126891415,10),i=h(i,o,n,r,t[14],2878612391,15),r=h(r,i,o,n,t[5],4237533241,21),n=h(n,r,i,o,t[12],1700485571,6),o=h(o,n,r,i,t[3],2399980690,10),i=h(i,o,n,r,t[10],4293915773,15),r=h(r,i,o,n,t[1],2240044497,21),n=h(n,r,i,o,t[8],1873313359,6),o=h(o,n,r,i,t[15],4264355552,10),i=h(i,o,n,r,t[6],2734768916,15),r=h(r,i,o,n,t[13],1309151649,21),n=h(n,r,i,o,t[4],4149444226,6),o=h(o,n,r,i,t[11],3174756917,10),i=h(i,o,n,r,t[2],718787259,15),r=h(r,i,o,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=s},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(23))},function(t,e,n){"use strict";var r=n(85).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"==typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i>>32-e}function m(t,e,n,r,i,o,a,s){return p(t+(e^n^r)+o+a|0,s)+i|0}function g(t,e,n,r,i,o,a,s){return p(t+(e&n|~e&r)+o+a|0,s)+i|0}function v(t,e,n,r,i,o,a,s){return p(t+((e|~n)^r)+o+a|0,s)+i|0}function y(t,e,n,r,i,o,a,s){return p(t+(e&r|n&~r)+o+a|0,s)+i|0}function b(t,e,n,r,i,o,a,s){return p(t+(e^(n|~r))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,M=0|this._d,k=0|this._e,E=0;E<80;E+=1){var x,A;E<16?(x=m(n,r,i,o,d,t[s[E]],l[0],c[E]),A=b(w,_,S,M,k,t[u[E]],h[0],f[E])):E<32?(x=g(n,r,i,o,d,t[s[E]],l[1],c[E]),A=y(w,_,S,M,k,t[u[E]],h[1],f[E])):E<48?(x=v(n,r,i,o,d,t[s[E]],l[2],c[E]),A=v(w,_,S,M,k,t[u[E]],h[2],f[E])):E<64?(x=y(n,r,i,o,d,t[s[E]],l[3],c[E]),A=g(w,_,S,M,k,t[u[E]],h[3],f[E])):(x=b(n,r,i,o,d,t[s[E]],l[4],c[E]),A=m(w,_,S,M,k,t[u[E]],h[4],f[E])),n=d,d=o,o=p(i,10),i=r,r=x,w=k,k=M,M=p(S,10),S=_,_=A}var C=this._b+i+M|0;this._b=this._c+o+k|0,this._c=this._d+d+w|0,this._d=this._e+n+_|0,this._e=this._a+r+S|0,this._a=C},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=r.alloc?r.alloc(20):new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(555),e.sha1=n(556),e.sha224=n(557),e.sha256=n(251),e.sha384=n(558),e.sha512=n(252)},function(t,e,n){(e=t.exports=n(253)).Stream=e,e.Readable=e,e.Writable=n(177),e.Duplex=n(77),e.Transform=n(256),e.PassThrough=n(565)},function(t,e,n){"use strict";(function(e,r,i){var o=n(126);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var s,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;y.WritableState=v;var c=Object.create(n(102));c.inherits=n(5);var f={deprecate:n(172)},l=n(254),h=n(8).Buffer,d=i.Uint8Array||function(){};var p,m=n(255);function g(){}function v(t,e){s=s||n(77),t=t||{};var r=e instanceof s;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(k,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),k(t,e))}(t,n,r,e,i);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||_(t,n),r?u(w,t,n,a,i):w(t,n,a,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function y(t){if(s=s||n(77),!(p.call(y,this)||this instanceof s))return new y(t);this._writableState=new v(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function b(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),k(t,e)}function _(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,f=n.encoding,l=n.callback;if(b(t,e,!1,e.objectMode?1:c.length,c,f,l),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function S(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function M(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),k(t,e)}))}function k(t,e){var n=S(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(M,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}c.inherits(y,l),v.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(v.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===y&&(t&&t._writableState instanceof v)}})):p=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=t,h.isBuffer(r)||r instanceof d);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(n=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=g),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(s||function(t,e,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,t,n))&&(i.pendingcb++,a=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,n));return e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,k(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(18),n(563).setImmediate,n(23))},function(t,e,n){"use strict";var r=n(34);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var n=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r0;r--)e+=this._buffer(t,e),n+=this._flushBuffer(i,n);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,n;return t&&(e=this.update(t)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(n):n},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e */ var r=n(6),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";var r=n(88).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,n,o){if("function"==typeof n)return t(e,null,n);n||(n={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var n=arguments.length,r=new Array(n),i=0;i=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,n){var i=function(t){var e=o(t);return{blinder:e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(n),a=n.modulus.byteLength(),s=new r(t).mul(i.blinder).umod(n.modulus),u=s.toRed(r.mont(n.prime1)),c=s.toRed(r.mont(n.prime2)),f=n.coefficient,l=n.prime1,h=n.prime2,d=u.redPow(n.exponent1).fromRed(),p=c.redPow(n.exponent2).fromRed(),m=d.isub(p).imul(f).umod(l).imul(h);return p.iadd(m).imul(i.unblinder).umod(n.modulus).toArrayLike(e,"be",a)}a.getr=o,t.exports=a}).call(this,n(6).Buffer)},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(605).Buffer}catch(t){}function s(t,e,n){for(var i=0,o=Math.min(t.length,n),a=0,s=e;s=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:c,a|=u}return r(!(240&a),"Invalid character in "+t),i}function u(t,e,n,i){for(var o=0,a=0,s=Math.min(t.length,n),u=e;u=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&a0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this._strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this._strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(t){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?l[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=h[t],f=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(t);n=(p=p.idivn(f)).isZero()?m+n:l[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},a&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(a,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function p(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n._strip()}o.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,i),a},o.prototype._toArrayLikeLE=function(t,e){for(var n=0,r=0,i=0,o=0;i>8&255),n>16&255),6===o?(n>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n=0&&(t[n--]=a>>8&255),n>=0&&(t[n--]=a>>16&255),6===o?(n>=0&&(t[n--]=a>>24&255),r=0,o=0):(r=a>>>24,o+=2)}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],M=8191&S,k=S>>>13,E=0|a[5],x=8191&E,A=E>>>13,C=0|a[6],T=8191&C,I=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,j=0|a[8],L=8191&j,N=j>>>13,U=0|a[9],B=8191&U,D=U>>>13,z=0|s[0],F=8191&z,q=z>>>13,K=0|s[1],H=8191&K,W=K>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],$=8191&Y,J=Y>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,q))+Math.imul(h,F)|0))<<13)|0;c=((o=Math.imul(h,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,q))+Math.imul(m,F)|0,o=Math.imul(m,q);var vt=(c+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,F),i=(i=Math.imul(v,q))+Math.imul(y,F)|0,o=Math.imul(y,q),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,q))+Math.imul(_,F)|0,o=Math.imul(_,q),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var bt=(c+(r=r+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,q))+Math.imul(k,F)|0,o=Math.imul(k,q),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,J)|0;var wt=(c+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,F),i=(i=Math.imul(x,q))+Math.imul(A,F)|0,o=Math.imul(A,q),r=r+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(h,nt)|0))<<13)|0;c=((o=o+Math.imul(h,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,q))+Math.imul(I,F)|0,o=Math.imul(I,q),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var St=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(O,F),i=(i=Math.imul(O,q))+Math.imul(R,F)|0,o=Math.imul(R,q),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,J)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(c+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,q))+Math.imul(N,F)|0,o=Math.imul(N,q),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,J)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,q))+Math.imul(D,F)|0,o=Math.imul(D,q),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,W)|0,r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,J)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var Et=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,H),i=(i=Math.imul(B,W))+Math.imul(D,H)|0,o=Math.imul(D,W),r=r+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,J)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,ht)|0;var xt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,G))+Math.imul(D,Z)|0,o=Math.imul(D,G),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,r=r+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var At=(c+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,J))+Math.imul(D,$)|0,o=Math.imul(D,J),r=r+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,ht)|0;var Ct=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(N,nt)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Tt=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(D,nt)|0,o=Math.imul(D,rt),r=r+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,r=r+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ht)|0;var It=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),r=r+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ht)|0;var Pt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ht)|0;var Ot=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,lt),i=(i=Math.imul(B,ht))+Math.imul(D,lt)|0,o=Math.imul(D,ht);var Rt=(c+(r=r+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;c=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var jt=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(D,pt)|0))<<13)|0;return c=((o=Math.imul(D,mt))+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Mt,u[8]=kt,u[9]=Et,u[10]=xt,u[11]=At,u[12]=Ct,u[13]=Tt,u[14]=It,u[15]=Pt,u[16]=Ot,u[17]=Rt,u[18]=jt,0!==c&&(u[19]=c,n.length++),n};function g(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function v(t,e,n){return g(t,e,n)}function y(t,e){this.x=t,this.y=e}Math.imul||(m=p),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):n<63?p(this,t,e):n<1024?g(this,t,e):v(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},y.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,n+=o/67108864|0,n+=a>>>26,this.words[i]=67108863&a}return 0!==n&&(this.words[i]=n,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i&1}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this._strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,l);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(n*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/t|0,n=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0==(n.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function w(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){w.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){w.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){w.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){w.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}w.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},w.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},w.prototype.split=function(t,e){t.iushrn(this.n,0,e)},w.prototype.imulK=function(t){return t.imul(this.k)},i(_,w),_.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},_.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new _;else if("p224"===t)e=new S;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return b[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(c(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},E.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var l=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,E),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(60)(t))},function(t,e,n){"use strict";var r=e;r.version=n(606).version,r.utils=n(35),r.rand=n(181),r.curve=n(282),r.curves=n(187),r.ec=n(618),r.eddsa=n(622)},function(t,e,n){"use strict";var r,i=e,o=n(188),a=n(282),s=n(35).assert;function u(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var n=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(617)}catch(t){r=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(t,e,n){var r=e;r.utils=n(48),r.common=n(104),r.sha=n(611),r.ripemd=n(615),r.hmac=n(616),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(t,e,n){"use strict";(function(e){var r,i=n(6),o=i.Buffer,a={};for(r in i)i.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=i[r]);var s=a.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(s[r]=o[r]);if(a.Buffer.prototype=o.prototype,s.from&&s.from!==Uint8Array.from||(s.from=function(t,e,n){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return o(t,e,n)}),s.alloc||(s.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=o(t);return e&&0!==e.length?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r}),!a.kStringMaxLength)try{a.kStringMaxLength=e.binding("buffer").kStringMaxLength}catch(t){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a}).call(this,n(18))},function(t,e,n){"use strict";const r=n(191).Reporter,i=n(105).EncoderBuffer,o=n(105).DecoderBuffer,a=n(34),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(t,e,n){const r={};this._baseState=r,r.name=n,r.enc=t,r.parent=e||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=c;const f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const t=this._baseState,e={};f.forEach((function(n){e[n]=t[n]}));const n=new this.constructor(e.parent);return n._baseState=e,n},c.prototype._wrap=function(){const t=this._baseState;u.forEach((function(e){this[e]=function(){const n=new this.constructor(this);return t.children.push(n),n[e].apply(n,arguments)}}),this)},c.prototype._init=function(t){const e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),a.equal(e.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(t){const e=this._baseState,n=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==n.length&&(a(null===e.children),e.children=n,n.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(n){n==(0|n)&&(n|=0);const r=t[n];e[r]=n})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){c.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),s.forEach((function(t){c.prototype[t]=function(){const e=this._baseState,n=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(n),this}})),c.prototype.use=function(t){a(t);const e=this._baseState;return a(null===e.use),e.use=t,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(t){const e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},c.prototype.explicit=function(t){const e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},c.prototype.implicit=function(t){const e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},c.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},c.prototype.key=function(t){const e=this._baseState;return a(null===e.key),e.key=t,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(t){const e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},c.prototype.contains=function(t){const e=this._baseState;return a(null===e.use),e.contains=t,this},c.prototype._decode=function(t,e){const n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));let r,i=n.default,a=!0,s=null;if(null!==n.key&&(s=t.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(a=this._peekTag(t,r,n.any),t.isError(a))return a}else{const r=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),a=!0}catch(t){a=!1}t.restore(r)}}if(n.obj&&a&&(r=t.enterObject()),a){if(null!==n.explicit){const e=this._decodeTag(t,n.explicit);if(t.isError(e))return e;t=e}const r=t.offset;if(null===n.use&&null===n.choice){let e;n.any&&(e=t.save());const r=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(r))return r;n.any?i=t.raw(e):t=r}if(e&&e.track&&null!==n.tag&&e.track(t.path(),r,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(t,e)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const r=new o(i);i=this._getUse(n.contains,t._reporterState.obj)._decode(r,e)}}return n.obj&&a&&(i=t.leaveObject(r)),null===n.key||null===i&&!0!==a?null!==s&&t.exitKey(s):t.leaveKey(s,n.key,i),i},c.prototype._decodeGeneric=function(t,e,n){const r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],n):/str$/.test(t)?this._decodeStr(e,t,n):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],n):"objid"===t?this._decodeObjid(e,null,null,n):"gentime"===t||"utctime"===t?this._decodeTime(e,t,n):"null_"===t?this._decodeNull(e,n):"bool"===t?this._decodeBool(e,n):"objDesc"===t?this._decodeStr(e,t,n):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,n):e.error("unknown tag: "+t)},c.prototype._getUse=function(t,e){const n=this._baseState;return n.useDecoder=this._use(t,e),a(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},c.prototype._decodeChoice=function(t,e){const n=this._baseState;let r=null,i=!1;return Object.keys(n.choice).some((function(o){const a=t.save(),s=n.choice[o];try{const n=s._decode(t,e);if(t.isError(n))return!1;r={type:o,value:n},i=!0}catch(e){return t.restore(a),!1}return!0}),this),i?r:t.error("Choice not matched")},c.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},c.prototype._encode=function(t,e,n){const r=this._baseState;if(null!==r.default&&r.default===t)return;const i=this._encodeValue(t,e,n);return void 0===i||this._skipDefault(i,e,n)?void 0:i},c.prototype._encodeValue=function(t,e,n){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new r);let o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}let a=null,s=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)a=this._getUse(i.contains,n)._encode(t,e),s=!0;else if(i.children)a=i.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,e,t);if(null===n._baseState.key)return e.error("Child should have a key");const r=e.enterKey(n._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const i=n._encode(t[n._baseState.key],e,t);return e.leaveKey(r),i}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(n){const r=this._baseState;return this._getUse(r.args[0],t)._encode(n,e)}),n))}else null!==i.use?o=this._getUse(i.use,n)._encode(t,e):(a=this._encodePrimitive(i.tag,t),s=!0);if(!i.any&&null===i.choice){const t=null!==i.implicit?i.implicit:i.tag,n=null===i.implicit?"universal":"context";null===t?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(t,s,n,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(t,e){const n=this._baseState,r=n.choice[t.type];return r||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(t.value,e)},c.prototype._encodePrimitive=function(t,e){const n=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&n.args)return this._encodeObjid(e,n.reverseArgs[0],n.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,n.args&&n.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},c.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},c.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},function(t,e,n){"use strict";const r=n(5);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,n){const r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){const e=this._reporterState,n=e.obj;return e.obj=t,n},i.prototype.error=function(t){let e;const n=this._reporterState,r=t instanceof o;if(e=r?t:new o(n.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!n.options.partial)throw e;return r||n.errors.push(e),e},i.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},r(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,n){"use strict";function r(t){const e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);const r=t[n];e[r]=n})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=r(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=r(e.tag)},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(641).Buffer}catch(t){}function s(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],d=l[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],M=8191&S,k=S>>>13,E=0|a[5],x=8191&E,A=E>>>13,C=0|a[6],T=8191&C,I=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,j=0|a[8],L=8191&j,N=j>>>13,U=0|a[9],B=8191&U,D=U>>>13,z=0|s[0],F=8191&z,q=z>>>13,K=0|s[1],H=8191&K,W=K>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],$=8191&Y,J=Y>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,q))+Math.imul(h,F)|0))<<13)|0;c=((o=Math.imul(h,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,q))+Math.imul(m,F)|0,o=Math.imul(m,q);var vt=(c+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,F),i=(i=Math.imul(v,q))+Math.imul(y,F)|0,o=Math.imul(y,q),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,q))+Math.imul(_,F)|0,o=Math.imul(_,q),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var bt=(c+(r=r+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,q))+Math.imul(k,F)|0,o=Math.imul(k,q),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,J)|0;var wt=(c+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,F),i=(i=Math.imul(x,q))+Math.imul(A,F)|0,o=Math.imul(A,q),r=r+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(h,nt)|0))<<13)|0;c=((o=o+Math.imul(h,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,q))+Math.imul(I,F)|0,o=Math.imul(I,q),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var St=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(O,F),i=(i=Math.imul(O,q))+Math.imul(R,F)|0,o=Math.imul(R,q),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,J)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(c+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,q))+Math.imul(N,F)|0,o=Math.imul(N,q),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,J)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,q))+Math.imul(D,F)|0,o=Math.imul(D,q),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,W)|0,r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,J)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var Et=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,H),i=(i=Math.imul(B,W))+Math.imul(D,H)|0,o=Math.imul(D,W),r=r+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,J)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,ht)|0;var xt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,G))+Math.imul(D,Z)|0,o=Math.imul(D,G),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,r=r+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var At=(c+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,J))+Math.imul(D,$)|0,o=Math.imul(D,J),r=r+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,ht)|0;var Ct=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(N,nt)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Tt=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(D,nt)|0,o=Math.imul(D,rt),r=r+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,r=r+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ht)|0;var It=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),r=r+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ht)|0;var Pt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ht)|0;var Ot=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,lt),i=(i=Math.imul(B,ht))+Math.imul(D,lt)|0,o=Math.imul(D,ht);var Rt=(c+(r=r+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;c=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var jt=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(D,pt)|0))<<13)|0;return c=((o=Math.imul(D,mt))+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Mt,u[8]=kt,u[9]=Et,u[10]=xt,u[11]=At,u[12]=Ct,u[13]=Tt,u[14]=It,u[15]=Pt,u[16]=Ot,u[17]=Rt,u[18]=jt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,l);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0==(n.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var l=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,S),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(60)(t))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,c=[],f=!1,l=-1;function h(){f&&u&&(f=!1,u.length?c=u.concat(c):l=-1,c.length&&d())}function d(){if(!f){var t=s(h);f=!0;for(var e=c.length;e;){for(u=c,c=[];++l1)for(var n=1;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]/g,">").replace(/"/g,""")+'"'))}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=o.return)&&e.call(o)}finally{if(t)throw t.error}}return r+(n?">"+this.children.map((function(t){return t.toString()})).join("")+"":"/>")},t}();var ei=function(){function t(t){this.value=t}return t.prototype.toString=function(){return(""+this.value).replace(/&/g,"&").replace(//g,">")},t}(),ni=n(325),ri=function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c;return h(this,(function(l){switch(l.label){case 0:return r=[f({},t)],c={},[4,Ei(t.body,e)];case 1:switch(n=f.apply(void 0,r.concat([(c.body=l.sent(),c)])),o="UnknownError",o=xi(t,n.body),o){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":return[3,2]}return[3,4];case 2:return a=[{}],[4,pi(n,e)];case 3:return i=f.apply(void 0,[f.apply(void 0,a.concat([l.sent()])),{name:o,$metadata:Si(t)}]),[3,5];case 4:s=n.body,o=s.code||s.Code||o,i=f(f({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Si(t)}),l.label=5;case 5:return u=i.message||i.Message||o,i.message=u,delete i.Message,[2,Promise.reject(Object.assign(new Error(u),i))]}}))}))},ii=function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u;return h(this,(function(c){switch(c.label){case 0:return r=[f({},t)],u={},[4,Ei(t.body,e)];case 1:return n=f.apply(void 0,r.concat([(u.body=c.sent(),u)])),o="UnknownError",o=xi(t,n.body),a=n.body,o=a.code||a.Code||o,i=f(f({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Si(t)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},oi=function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u;return h(this,(function(c){switch(c.label){case 0:return r=[f({},t)],u={},[4,Ei(t.body,e)];case 1:return n=f.apply(void 0,r.concat([(u.body=c.sent(),u)])),o="UnknownError",o=xi(t,n.body),a=n.body,o=a.code||a.Code||o,i=f(f({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Si(t)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},ai=function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u;return h(this,(function(c){switch(c.label){case 0:return r=[f({},t)],u={},[4,Ei(t.body,e)];case 1:return n=f.apply(void 0,r.concat([(u.body=c.sent(),u)])),o="UnknownError",o=xi(t,n.body),a=n.body,o=a.code||a.Code||o,i=f(f({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Si(t)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},si=function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c;return h(this,(function(l){switch(l.label){case 0:return r=[f({},t)],c={},[4,Ei(t.body,e)];case 1:switch(n=f.apply(void 0,r.concat([(c.body=l.sent(),c)])),o="UnknownError",o=xi(t,n.body),o){case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":return[3,2]}return[3,4];case 2:return a=[{}],[4,di(n,e)];case 3:return i=f.apply(void 0,[f.apply(void 0,a.concat([l.sent()])),{name:o,$metadata:Si(t)}]),[3,5];case 4:s=n.body,o=s.code||s.Code||o,i=f(f({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Si(t)}),l.label=5;case 5:return u=i.message||i.Message||o,i.message=u,delete i.Message,[2,Promise.reject(Object.assign(new Error(u),i))]}}))}))},ui=function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c;return h(this,(function(l){switch(l.label){case 0:return r=[f({},t)],c={},[4,Ei(t.body,e)];case 1:switch(n=f.apply(void 0,r.concat([(c.body=l.sent(),c)])),o="UnknownError",o=xi(t,n.body),o){case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":return[3,2]}return[3,4];case 2:return a=[{}],[4,hi(n,e)];case 3:return i=f.apply(void 0,[f.apply(void 0,a.concat([l.sent()])),{name:o,$metadata:Si(t)}]),[3,5];case 4:s=n.body,o=s.code||s.Code||o,i=f(f({},s),{name:""+o,message:s.message||s.Message||o,$fault:"client",$metadata:Si(t)}),l.label=5;case 5:return u=i.message||i.Message||o,i.message=u,delete i.Message,[2,Promise.reject(Object.assign(new Error(u),i))]}}))}))},ci=function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u;return h(this,(function(c){switch(c.label){case 0:return r=[f({},t)],u={},[4,Ei(t.body,e)];case 1:return n=f.apply(void 0,r.concat([(u.body=c.sent(),u)])),o="UnknownError",o=xi(t,n.body),a=n.body,o=a.code||a.Code||o,i=f(f({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Si(t)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},fi=function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u;return h(this,(function(c){switch(c.label){case 0:return r=[f({},t)],u={},[4,Ei(t.body,e)];case 1:return n=f.apply(void 0,r.concat([(u.body=c.sent(),u)])),o="UnknownError",o=xi(t,n.body),a=n.body,o=a.code||a.Code||o,i=f(f({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Si(t)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},li=function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u;return h(this,(function(c){switch(c.label){case 0:return r=[f({},t)],u={},[4,Ei(t.body,e)];case 1:return n=f.apply(void 0,r.concat([(u.body=c.sent(),u)])),o="UnknownError",o=xi(t,n.body),a=n.body,o=a.code||a.Code||o,i=f(f({},a),{name:""+o,message:a.message||a.Message||o,$fault:"client",$metadata:Si(t)}),s=i.message||i.Message||o,i.message=s,delete i.Message,[2,Promise.reject(Object.assign(new Error(s),i))]}}))}))},hi=function(t,e){return l(void 0,void 0,void 0,(function(){var e;return h(this,(function(n){return e={name:"NoSuchBucket",$fault:"client",$metadata:Si(t)},t.body,[2,e]}))}))},di=function(t,e){return l(void 0,void 0,void 0,(function(){var e;return h(this,(function(n){return e={name:"NoSuchKey",$fault:"client",$metadata:Si(t)},t.body,[2,e]}))}))},pi=function(t,e){return l(void 0,void 0,void 0,(function(){var e;return h(this,(function(n){return e={name:"NoSuchUpload",$fault:"client",$metadata:Si(t)},t.body,[2,e]}))}))},mi=function(t,e){var n=new ti("CompletedMultipartUpload");void 0!==t.Parts&&gi(t.Parts,e).map((function(t){t=t.withName("Part"),n.addChildNode(t)}));return n},gi=function(t,e){return t.map((function(t){return function(t,e){var n=new ti("CompletedPart");if(void 0!==t.ETag){var r=new ti("ETag").addChildNode(new ei(t.ETag)).withName("ETag");n.addChildNode(r)}if(void 0!==t.PartNumber){r=new ti("PartNumber").addChildNode(new ei(String(t.PartNumber))).withName("PartNumber");n.addChildNode(r)}return n}(t).withName("member")}))},vi=function(t,e){return(t||[]).map((function(t){return function(t,e){var n={Prefix:void 0};return void 0!==t.Prefix&&(n.Prefix=t.Prefix),n}(t)}))},yi=function(t,e){var n={ID:void 0,DisplayName:void 0};return void 0!==t.ID&&(n.ID=t.ID),void 0!==t.DisplayName&&(n.DisplayName=t.DisplayName),n},bi=function(t,e){return(t||[]).map((function(t){return function(t,e){var n={Size:void 0,ETag:void 0,Owner:void 0,StorageClass:void 0,Key:void 0,LastModified:void 0};return void 0!==t.Size&&(n.Size=parseInt(t.Size)),void 0!==t.ETag&&(n.ETag=t.ETag),void 0!==t.Owner&&(n.Owner=wi(t.Owner,e)),void 0!==t.StorageClass&&(n.StorageClass=t.StorageClass),void 0!==t.Key&&(n.Key=t.Key),void 0!==t.LastModified&&(n.LastModified=new Date(t.LastModified)),n}(t,e)}))},wi=function(t,e){var n={DisplayName:void 0,ID:void 0};return void 0!==t.DisplayName&&(n.DisplayName=t.DisplayName),void 0!==t.ID&&(n.ID=t.ID),n},_i=function(t,e){return(t||[]).map((function(t){return function(t,e){var n={Size:void 0,LastModified:void 0,PartNumber:void 0,ETag:void 0};return void 0!==t.Size&&(n.Size=parseInt(t.Size)),void 0!==t.LastModified&&(n.LastModified=new Date(t.LastModified)),void 0!==t.PartNumber&&(n.PartNumber=parseInt(t.PartNumber)),void 0!==t.ETag&&(n.ETag=t.ETag),n}(t)}))},Si=function(t){return{httpStatusCode:t.statusCode,httpHeaders:t.headers,requestId:t.headers["x-amzn-requestid"]}},Mi=function(t,e){return void 0===t&&(t=new Uint8Array),t instanceof Uint8Array?Promise.resolve(t):e.streamCollector(t)||Promise.resolve(new Uint8Array)},ki=function(t){return!(void 0===t||""===t||Object.getOwnPropertyNames(t).includes("length")&&0==t.length||Object.getOwnPropertyNames(t).includes("size")&&0==t.size)},Ei=function(t,e){return function(t,e){return Mi(t,e).then((function(t){return e.utf8Encoder(t)}))}(t,e).then((function(t){if(t.length){var e=Object(ni.parse)(t,{attributeNamePrefix:"",ignoreAttributes:!1,parseNodeValue:!1,tagValueProcessor:function(t,e){return t.replace(/&/g,"&").replace(/'/g,"'").replace(/"/g,'"').replace(/>/g,">").replace(/</g,"<")}}),n=Object.keys(e)[0],r=e[n];return r["#text"]&&(r[n]=r["#text"],delete r["#text"]),Object(Jr.g)(r)}return{}}))},xi=function(t,e){return void 0!==e.Code?e.Code:404==t.statusCode?"NotFound":""},Ai=function(t){return"string"==typeof t&&0===t.indexOf("arn:")&&t.split(":").length>=6},Ci=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,Ti=/(\d+\.){3}\d+/,Ii=/\.\./,Pi=/\./,Oi=/^(.+\.)?s3[.-]([a-z0-9-]+)\./,Ri=/^s3(-external-1)?\.amazonaws\.com$/,ji=function(t){return Ni(t)?t.replace(/fips-|-fips/,""):t},Li=function(t){var e=t.match(Oi);return[e[2],t.replace(new RegExp("^"+e[0]),"")]},Ni=function(t){return t.startsWith("fips-")||t.endsWith("-fips")},Ui=function(t,e){return t===e||ji(t)===e||t===ji(e)},Bi=function(t,e){if(void 0===e&&(e={tlsCompatible:!0}),t.length>=64||!/^[a-z0-9][a-z0-9.-]+[a-z0-9]$/.test(t)||/(\d+\.){3}\d+/.test(t)||/[.-]{2}/.test(t)||(null==e?void 0:e.tlsCompatible)&&Pi.test(t))throw new Error("Invalid DNS label "+t)},Di=function(t){var e=t.baseHostname;return Oi.test(e)?function(t){return"string"==typeof t.bucketName}(t)?Fi(t):zi(t):{bucketEndpoint:!1,hostname:e}},zi=function(t){var e,n=Object(Qr.__read)((e=t.baseHostname,Ri.test(e)?[e.replace(".amazonaws.com",""),"amazonaws.com"]:Li(e)),2),r=n[0],i=n[1],o=t.pathStyleEndpoint,a=t.dualstackEndpoint,s=void 0!==a&&a,u=t.accelerateEndpoint,c=void 0!==u&&u,f=t.tlsCompatible,l=void 0===f||f,h=t.useArnRegion,d=t.bucketName,p=t.clientPartition,m=void 0===p?"aws":p,g=t.clientSigningRegion,v=void 0===g?r:g;!function(t){if(t.pathStyleEndpoint)throw new Error("Path-style S3 endpoint is not supported when bucket is an ARN");if(t.accelerateEndpoint)throw new Error("Accelerate endpoint is not supported when bucket is an ARN");if(!t.tlsCompatible)throw new Error("HTTPS is required when bucket is an ARN")}({pathStyleEndpoint:o,accelerateEndpoint:c,tlsCompatible:l});var y=d.service,b=d.partition,w=d.accountId,_=d.region,S=d.resource;!function(t){if("s3"!==t&&"s3-outposts"!==t)throw new Error("Expect 's3' or 's3-outposts' in ARN service component")}(y),function(t,e){if(t!==e.clientPartition)throw new Error('Partition in ARN is incompatible, got "'+t+'" but expected "'+e.clientPartition+'"')}(b,{clientPartition:m}),function(t){if(!/[0-9]{12}/.exec(t))throw new Error("Access point ARN accountID does not match regex '[0-9]{12}'")}(w),function(t,e){if(""===t)throw new Error("ARN region is empty");if(!e.useArnRegion&&!Ui(t,e.clientRegion)&&!Ui(t,e.clientSigningRegion))throw new Error("Region in ARN is incompatible, got "+t+" but expected "+e.clientRegion);if(e.useArnRegion&&Ni(t))throw new Error("Endpoint does not support FIPS region")}(_,{useArnRegion:h,clientRegion:r,clientSigningRegion:v});var M=function(t){var e=t.includes(":")?":":"/",n=Object(Qr.__read)(t.split(e)),r=n[0],i=n.slice(1);if("accesspoint"===r){if(1!==i.length||""===i[0])throw new Error("Access Point ARN should have one resource accesspoint"+e+"{accesspointname}");return{accesspointName:i[0]}}if("outpost"===r){if(!i[0]||"accesspoint"!==i[1]||!i[2]||3!==i.length)throw new Error("Outpost ARN should have resource outpost"+e+"{outpostId}"+e+"accesspoint"+e+"{accesspointName}");var o=Object(Qr.__read)(i,3),a=o[0];o[1];return{outpostId:a,accesspointName:o[2]}}throw new Error("ARN resource should begin with 'accesspoint"+e+"' or 'outpost"+e+"'")}(S),k=M.accesspointName,E=M.outpostId;Bi(k+"-"+w,{tlsCompatible:l});var x=h?_:r,A=h?_:v;return E?(function(t){if("s3-outposts"!==t)throw new Error("Expect 's3-posts' in Outpost ARN service component")}(y),Bi(E,{tlsCompatible:l}),function(t){if(t)throw new Error("Dualstack endpoint is not supported with Outpost")}(s),function(t){if(Ni(null!=t?t:""))throw new Error("FIPS region is not supported with Outpost, got "+t)}(x),{bucketEndpoint:!0,hostname:k+"-"+w+"."+E+".s3-outposts."+x+"."+i,signingRegion:A,signingService:"s3-outposts"}):(function(t){if("s3"!==t)throw new Error("Expect 's3' in Accesspoint ARN service component")}(y),{bucketEndpoint:!0,hostname:k+"-"+w+".s3-accesspoint"+(s?".dualstack":"")+"."+x+"."+i,signingRegion:A})},Fi=function(t){var e,n=t.accelerateEndpoint,r=void 0!==n&&n,i=t.baseHostname,o=t.bucketName,a=t.dualstackEndpoint,s=void 0!==a&&a,u=t.pathStyleEndpoint,c=void 0!==u&&u,f=t.tlsCompatible,l=void 0===f||f,h=Object(Qr.__read)((e=i,Ri.test(e)?["us-east-1","amazonaws.com"]:Li(e)),2),d=h[0],p=h[1];return c||!function(t){return Ci.test(t)&&!Ti.test(t)&&!Ii.test(t)}(o)||l&&Pi.test(o)?{bucketEndpoint:!1,hostname:s?"s3.dualstack."+d+"."+p:i}:(r?i="s3-accelerate"+(s?".dualstack":"")+"."+p:s&&(i="s3.dualstack."+d+"."+p),{bucketEndpoint:!0,hostname:o+"."+i})},qi=function(t){return function(e,n){return function(r){return Object(Qr.__awaiter)(void 0,void 0,void 0,(function(){var i,o,a,s,u,c,f,l,h,d,p,m,g,v,y,b,w;return Object(Qr.__generator)(this,(function(_){switch(_.label){case 0:return i=r.input.Bucket,o=t.bucketEndpoint,a=r.request,Xr.a.isInstance(a)?t.bucketEndpoint?(a.hostname=i,[3,6]):[3,1]:[3,7];case 1:return Ai(i)?(s=function(t){var e=t.split(":");if(e.length<6||"arn"!==e[0])throw new Error("Malformed ARN");var n=Object(Qr.__read)(e);return{partition:n[1],service:n[2],region:n[3],accountId:n[4],resource:n.slice(5).join(":")}}(i),c=ji,[4,t.region()]):[3,5];case 2:return u=c.apply(void 0,[_.sent()]),[4,t.regionInfoProvider(u)];case 3:return f=_.sent()||{},l=f.partition,h=f.signingRegion,d=void 0===h?u:h,[4,t.useArnRegion()];case 4:return p=_.sent(),m=Di({bucketName:s,baseHostname:a.hostname,accelerateEndpoint:t.useAccelerateEndpoint,dualstackEndpoint:t.useDualstackEndpoint,pathStyleEndpoint:t.forcePathStyle,tlsCompatible:"https:"===a.protocol,useArnRegion:p,clientPartition:l,clientSigningRegion:d}),b=m.hostname,w=m.bucketEndpoint,g=m.signingRegion,v=m.signingService,g&&g!==d&&(n.signing_region=g),v&&"s3"!==v&&(n.signing_service=v),a.hostname=b,o=w,[3,6];case 5:y=Di({bucketName:i,baseHostname:a.hostname,accelerateEndpoint:t.useAccelerateEndpoint,dualstackEndpoint:t.useDualstackEndpoint,pathStyleEndpoint:t.forcePathStyle,tlsCompatible:"https:"===a.protocol}),b=y.hostname,w=y.bucketEndpoint,a.hostname=b,o=w,_.label=6;case 6:o&&(a.path=a.path.replace(/^(\/)?[^\/]+/,""),""===a.path&&(a.path="/")),_.label=7;case 7:return[2,e(Object(Qr.__assign)(Object(Qr.__assign)({},r),{request:a}))]}}))}))}}},Ki={tags:["BUCKET_ENDPOINT"],name:"bucketEndpointMiddleware",relation:"before",toMiddleware:"hostHeaderMiddleware"},Hi=function(t){return{applyToStack:function(e){e.addRelativeTo(qi(t),Ki)}}};var Wi=n(15);var Vi={name:"ssecMiddleware",step:"initialize",tags:["SSE"]},Zi=function(t){return{applyToStack:function(e){e.add(function(t){var e=this;return function(n){return function(r){return Object(Qr.__awaiter)(e,void 0,void 0,(function(){var e,i,o,a,s,u,c,f,l,h,d,p,m,g,v,y,b;return Object(Qr.__generator)(this,(function(w){switch(w.label){case 0:e=Object(Qr.__assign)({},r.input),i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}],w.label=1;case 1:w.trys.push([1,6,7,8]),o=Object(Qr.__values)(i),a=o.next(),w.label=2;case 2:return a.done?[3,5]:(s=a.value,(u=e[s.target])?(c=ArrayBuffer.isView(u)?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):"string"==typeof u?t.utf8Decoder(u):new Uint8Array(u),f=t.base64Encoder(c),(l=new t.md5).update(c),h=[Object(Qr.__assign)({},e)],(b={})[s.target]=f,d=s.hash,m=(p=t).base64Encoder,[4,l.digest()]):[3,4]);case 3:e=Qr.__assign.apply(void 0,h.concat([(b[d]=m.apply(p,[w.sent()]),b)])),w.label=4;case 4:return a=o.next(),[3,2];case 5:return[3,8];case 6:return g=w.sent(),v={error:g},[3,8];case 7:try{a&&!a.done&&(y=o.return)&&y.call(o)}finally{if(v)throw v.error}return[7];case 8:return[2,n(Object(Qr.__assign)(Object(Qr.__assign)({},r),{input:e}))]}}))}))}}}(t),Vi)}}},Gi=function(t){function e(e){var n=t.call(this)||this;return n.input=e,n}return c(e,t),e.prototype.resolveMiddleware=function(t,e,n){this.middlewareStack.use(Object(Wi.a)(e,this.serialize,this.deserialize)),this.middlewareStack.use(Zi(e)),this.middlewareStack.use(Hi(e));var r=t.concat(this.middlewareStack),i=e.logger,o={logger:i,clientName:"S3Client",commandName:"GetObjectCommand",inputFilterSensitiveLog:Xe.filterSensitiveLog,outputFilterSensitiveLog:Je.filterSensitiveLog};"function"==typeof i.info&&i.info({clientName:"S3Client",commandName:"GetObjectCommand"});var a=e.requestHandler;return r.resolve((function(t){return a.handle(t.request,n||{})}),o)},e.prototype.serialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l;return h(this,(function(h){switch(h.label){case 0:if(n=f(f(f(f(f(f(f(f(f(f({"Content-Type":""},ki(t.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":t.SSECustomerKey}),ki(t.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":t.SSECustomerAlgorithm}),ki(t.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":t.SSECustomerKeyMD5}),ki(t.RequestPayer)&&{"x-amz-request-payer":t.RequestPayer}),ki(t.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":t.ExpectedBucketOwner}),ki(t.IfUnmodifiedSince)&&{"If-Unmodified-Since":Object(Jr.d)(t.IfUnmodifiedSince).toString()}),ki(t.IfModifiedSince)&&{"If-Modified-Since":Object(Jr.d)(t.IfModifiedSince).toString()}),ki(t.IfNoneMatch)&&{"If-None-Match":t.IfNoneMatch}),ki(t.IfMatch)&&{"If-Match":t.IfMatch}),ki(t.Range)&&{Range:t.Range}),r="/{Bucket}/{Key+}",void 0===t.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=t.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(r=r.replace("{Bucket}",Object(Jr.e)(i)),void 0===t.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=t.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return r=r.replace("{Key+}",i.split("/").map((function(t){return Object(Jr.e)(t)})).join("/")),o=f(f(f(f(f(f(f(f({"x-id":"GetObject"},void 0!==t.ResponseContentEncoding&&{"response-content-encoding":t.ResponseContentEncoding}),void 0!==t.ResponseCacheControl&&{"response-cache-control":t.ResponseCacheControl}),void 0!==t.ResponseContentLanguage&&{"response-content-language":t.ResponseContentLanguage}),void 0!==t.ResponseContentDisposition&&{"response-content-disposition":t.ResponseContentDisposition}),void 0!==t.PartNumber&&{partNumber:t.PartNumber.toString()}),void 0!==t.VersionId&&{versionId:t.VersionId}),void 0!==t.ResponseExpires&&{"response-expires":(t.ResponseExpires.toISOString().split(".")[0]+"Z").toString()}),void 0!==t.ResponseContentType&&{"response-content-type":t.ResponseContentType}),[4,e.endpoint()];case 1:return a=h.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,l=a.port,[2,new Xr.a({protocol:c,hostname:s,port:l,method:"GET",headers:n,path:r,query:o,body:void 0})]}}))}))}(t,e)},e.prototype.deserialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r;return h(this,(function(i){return 200!==t.statusCode&&t.statusCode>=300?[2,si(t,e)]:(n={$metadata:Si(t),AcceptRanges:void 0,Body:void 0,CacheControl:void 0,ContentDisposition:void 0,ContentEncoding:void 0,ContentLanguage:void 0,ContentLength:void 0,ContentRange:void 0,ContentType:void 0,DeleteMarker:void 0,ETag:void 0,Expiration:void 0,Expires:void 0,LastModified:void 0,Metadata:void 0,MissingMeta:void 0,ObjectLockLegalHoldStatus:void 0,ObjectLockMode:void 0,ObjectLockRetainUntilDate:void 0,PartsCount:void 0,ReplicationStatus:void 0,RequestCharged:void 0,Restore:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,StorageClass:void 0,TagCount:void 0,VersionId:void 0,WebsiteRedirectLocation:void 0},void 0!==t.headers["x-amz-object-lock-mode"]&&(n.ObjectLockMode=t.headers["x-amz-object-lock-mode"]),void 0!==t.headers["content-language"]&&(n.ContentLanguage=t.headers["content-language"]),void 0!==t.headers["content-disposition"]&&(n.ContentDisposition=t.headers["content-disposition"]),void 0!==t.headers["cache-control"]&&(n.CacheControl=t.headers["cache-control"]),void 0!==t.headers["content-type"]&&(n.ContentType=t.headers["content-type"]),void 0!==t.headers["content-range"]&&(n.ContentRange=t.headers["content-range"]),void 0!==t.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(n.SSEKMSKeyId=t.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==t.headers["content-length"]&&(n.ContentLength=parseInt(t.headers["content-length"],10)),void 0!==t.headers["x-amz-object-lock-retain-until-date"]&&(n.ObjectLockRetainUntilDate=new Date(t.headers["x-amz-object-lock-retain-until-date"])),void 0!==t.headers["x-amz-object-lock-legal-hold"]&&(n.ObjectLockLegalHoldStatus=t.headers["x-amz-object-lock-legal-hold"]),void 0!==t.headers["x-amz-delete-marker"]&&(n.DeleteMarker="true"===t.headers["x-amz-delete-marker"]),void 0!==t.headers["x-amz-storage-class"]&&(n.StorageClass=t.headers["x-amz-storage-class"]),void 0!==t.headers["content-encoding"]&&(n.ContentEncoding=t.headers["content-encoding"]),void 0!==t.headers["x-amz-restore"]&&(n.Restore=t.headers["x-amz-restore"]),void 0!==t.headers["x-amz-website-redirect-location"]&&(n.WebsiteRedirectLocation=t.headers["x-amz-website-redirect-location"]),void 0!==t.headers["x-amz-server-side-encryption"]&&(n.ServerSideEncryption=t.headers["x-amz-server-side-encryption"]),void 0!==t.headers["x-amz-mp-parts-count"]&&(n.PartsCount=parseInt(t.headers["x-amz-mp-parts-count"],10)),void 0!==t.headers["x-amz-server-side-encryption-customer-algorithm"]&&(n.SSECustomerAlgorithm=t.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==t.headers["accept-ranges"]&&(n.AcceptRanges=t.headers["accept-ranges"]),void 0!==t.headers["x-amz-version-id"]&&(n.VersionId=t.headers["x-amz-version-id"]),void 0!==t.headers.expires&&(n.Expires=new Date(t.headers.expires)),void 0!==t.headers["x-amz-expiration"]&&(n.Expiration=t.headers["x-amz-expiration"]),void 0!==t.headers["x-amz-missing-meta"]&&(n.MissingMeta=parseInt(t.headers["x-amz-missing-meta"],10)),void 0!==t.headers["x-amz-replication-status"]&&(n.ReplicationStatus=t.headers["x-amz-replication-status"]),void 0!==t.headers["x-amz-tagging-count"]&&(n.TagCount=parseInt(t.headers["x-amz-tagging-count"],10)),void 0!==t.headers["x-amz-server-side-encryption-customer-key-md5"]&&(n.SSECustomerKeyMD5=t.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==t.headers["last-modified"]&&(n.LastModified=new Date(t.headers["last-modified"])),void 0!==t.headers.etag&&(n.ETag=t.headers.etag),void 0!==t.headers["x-amz-request-charged"]&&(n.RequestCharged=t.headers["x-amz-request-charged"]),Object.keys(t.headers).forEach((function(e){void 0===n.Metadata&&(n.Metadata={}),e.startsWith("x-amz-meta-")&&(n.Metadata[e.substring(11)]=t.headers[e])})),r=t.body,n.Body=r,[2,Promise.resolve(n)])}))}))}(t,e)},e}(Jr.b),Yi=function(t){function e(e){var n=t.call(this)||this;return n.input=e,n}return c(e,t),e.prototype.resolveMiddleware=function(t,e,n){this.middlewareStack.use(Object(Wi.a)(e,this.serialize,this.deserialize)),this.middlewareStack.use(Hi(e));var r=t.concat(this.middlewareStack),i=e.logger,o={logger:i,clientName:"S3Client",commandName:"DeleteObjectCommand",inputFilterSensitiveLog:J.filterSensitiveLog,outputFilterSensitiveLog:$.filterSensitiveLog};"function"==typeof i.info&&i.info({clientName:"S3Client",commandName:"DeleteObjectCommand"});var a=e.requestHandler;return r.resolve((function(t){return a.handle(t.request,n||{})}),o)},e.prototype.serialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l;return h(this,(function(h){switch(h.label){case 0:if(n=f(f(f(f({"Content-Type":""},ki(t.MFA)&&{"x-amz-mfa":t.MFA}),ki(t.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":t.ExpectedBucketOwner}),ki(t.BypassGovernanceRetention)&&{"x-amz-bypass-governance-retention":t.BypassGovernanceRetention.toString()}),ki(t.RequestPayer)&&{"x-amz-request-payer":t.RequestPayer}),r="/{Bucket}/{Key+}",void 0===t.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=t.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(r=r.replace("{Bucket}",Object(Jr.e)(i)),void 0===t.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=t.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return r=r.replace("{Key+}",i.split("/").map((function(t){return Object(Jr.e)(t)})).join("/")),o=f({"x-id":"DeleteObject"},void 0!==t.VersionId&&{versionId:t.VersionId}),[4,e.endpoint()];case 1:return a=h.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,l=a.port,[2,new Xr.a({protocol:c,hostname:s,port:l,method:"DELETE",headers:n,path:r,query:o,body:void 0})]}}))}))}(t,e)},e.prototype.deserialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n;return h(this,(function(r){switch(r.label){case 0:return 204!==t.statusCode&&t.statusCode>=300?[2,ai(t,e)]:(n={$metadata:Si(t),DeleteMarker:void 0,RequestCharged:void 0,VersionId:void 0},void 0!==t.headers["x-amz-delete-marker"]&&(n.DeleteMarker="true"===t.headers["x-amz-delete-marker"]),void 0!==t.headers["x-amz-request-charged"]&&(n.RequestCharged=t.headers["x-amz-request-charged"]),void 0!==t.headers["x-amz-version-id"]&&(n.VersionId=t.headers["x-amz-version-id"]),[4,Mi(t.body,e)]);case 1:return r.sent(),[2,Promise.resolve(n)]}}))}))}(t,e)},e}(Jr.b),$i=function(t){function e(e){var n=t.call(this)||this;return n.input=e,n}return c(e,t),e.prototype.resolveMiddleware=function(t,e,n){this.middlewareStack.use(Object(Wi.a)(e,this.serialize,this.deserialize)),this.middlewareStack.use(Hi(e));var r=t.concat(this.middlewareStack),i=e.logger,o={logger:i,clientName:"S3Client",commandName:"ListObjectsCommand",inputFilterSensitiveLog:zn.filterSensitiveLog,outputFilterSensitiveLog:Dn.filterSensitiveLog};"function"==typeof i.info&&i.info({clientName:"S3Client",commandName:"ListObjectsCommand"});var a=e.requestHandler;return r.resolve((function(t){return a.handle(t.request,n||{})}),o)},e.prototype.serialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l;return h(this,(function(h){switch(h.label){case 0:if(n=f(f({"Content-Type":""},ki(t.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":t.ExpectedBucketOwner}),ki(t.RequestPayer)&&{"x-amz-request-payer":t.RequestPayer}),r="/{Bucket}",void 0===t.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=t.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");return r=r.replace("{Bucket}",Object(Jr.e)(i)),o=f(f(f(f(f({},void 0!==t.MaxKeys&&{"max-keys":t.MaxKeys.toString()}),void 0!==t.Marker&&{marker:t.Marker}),void 0!==t.Prefix&&{prefix:t.Prefix}),void 0!==t.Delimiter&&{delimiter:t.Delimiter}),void 0!==t.EncodingType&&{"encoding-type":t.EncodingType}),[4,e.endpoint()];case 1:return a=h.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,l=a.port,[2,new Xr.a({protocol:c,hostname:s,port:l,method:"GET",headers:n,path:r,query:o,body:void 0})]}}))}))}(t,e)},e.prototype.deserialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r;return h(this,(function(i){switch(i.label){case 0:return 200!==t.statusCode&&t.statusCode>=300?[2,ui(t,e)]:(n={$metadata:Si(t),CommonPrefixes:void 0,Contents:void 0,Delimiter:void 0,EncodingType:void 0,IsTruncated:void 0,Marker:void 0,MaxKeys:void 0,Name:void 0,NextMarker:void 0,Prefix:void 0},[4,Ei(t.body,e)]);case 1:return""===(r=i.sent()).CommonPrefixes&&(n.CommonPrefixes=[]),void 0!==r.CommonPrefixes&&(n.CommonPrefixes=vi(Object(Jr.f)(r.CommonPrefixes),e)),""===r.Contents&&(n.Contents=[]),void 0!==r.Contents&&(n.Contents=bi(Object(Jr.f)(r.Contents),e)),void 0!==r.Delimiter&&(n.Delimiter=r.Delimiter),void 0!==r.EncodingType&&(n.EncodingType=r.EncodingType),void 0!==r.IsTruncated&&(n.IsTruncated="true"==r.IsTruncated),void 0!==r.Marker&&(n.Marker=r.Marker),void 0!==r.MaxKeys&&(n.MaxKeys=parseInt(r.MaxKeys)),void 0!==r.Name&&(n.Name=r.Name),void 0!==r.NextMarker&&(n.NextMarker=r.NextMarker),void 0!==r.Prefix&&(n.Prefix=r.Prefix),[2,Promise.resolve(n)]}}))}))}(t,e)},e}(Jr.b),Ji=n(201),Xi=n(134),Qi=n(139),to=n(19),eo=function(){function t(t){if(this.bytes=t,8!==t.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}return t.fromNumber=function(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var n=new Uint8Array(8),r=7,i=Math.abs(Math.round(e));r>-1&&i>0;r--,i/=256)n[r]=i;return e<0&&no(n),new t(n)},t.prototype.valueOf=function(){var t=this.bytes.slice(0),e=128&t[0];return e&&no(t),parseInt(Object(to.b)(t),16)*(e?-1:1)},t.prototype.toString=function(){return String(this.valueOf())},t}();function no(t){for(var e=0;e<8;e++)t[e]^=255;for(e=7;e>-1&&(t[e]++,0===t[e]);e--);}var ro,io=function(){function t(t,e){this.toUtf8=t,this.fromUtf8=e}return t.prototype.format=function(t){var e,n,r,i,o=[];try{for(var a=Object(Qr.__values)(Object.keys(t)),s=a.next();!s.done;s=a.next()){var u=s.value,c=this.fromUtf8(u);o.push(Uint8Array.from([c.byteLength]),c,this.formatHeaderValue(t[u]))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}var f=new Uint8Array(o.reduce((function(t,e){return t+e.byteLength}),0)),l=0;try{for(var h=Object(Qr.__values)(o),d=h.next();!d.done;d=h.next()){var p=d.value;f.set(p,l),l+=p.byteLength}}catch(t){r={error:t}}finally{try{d&&!d.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}return f},t.prototype.formatHeaderValue=function(t){switch(t.type){case"boolean":return Uint8Array.from([t.value?0:1]);case"byte":return Uint8Array.from([2,t.value]);case"short":var e=new DataView(new ArrayBuffer(3));return e.setUint8(0,3),e.setInt16(1,t.value,!1),new Uint8Array(e.buffer);case"integer":var n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,t.value,!1),new Uint8Array(n.buffer);case"long":var r=new Uint8Array(9);return r[0]=5,r.set(t.value.bytes,1),r;case"binary":var i=new DataView(new ArrayBuffer(3+t.value.byteLength));i.setUint8(0,6),i.setUint16(1,t.value.byteLength,!1);var o=new Uint8Array(i.buffer);return o.set(t.value,3),o;case"string":var a=this.fromUtf8(t.value),s=new DataView(new ArrayBuffer(3+a.byteLength));s.setUint8(0,7),s.setUint16(1,a.byteLength,!1);var u=new Uint8Array(s.buffer);return u.set(a,3),u;case"timestamp":var c=new Uint8Array(9);return c[0]=8,c.set(eo.fromNumber(t.value.valueOf()).bytes,1),c;case"uuid":if(!mo.test(t.value))throw new Error("Invalid UUID received: "+t.value);var f=new Uint8Array(17);return f[0]=9,f.set(Object(to.a)(t.value.replace(/\-/g,"")),1),f}},t.prototype.parse=function(t){for(var e={},n=0;n=a?r():o.readAsArrayBuffer(t.slice(s,Math.min(a,s+n)))}o.addEventListener("load",(function(t){var n=t.target.result;e(new Uint8Array(n)),s+=n.byteLength,u()})),u()}))}var So=n(110),Mo=n(63),ko=[1732584193,4023233417,2562383102,271733878],Eo=function(){function t(){this.state=Uint32Array.from(ko),this.buffer=new DataView(new ArrayBuffer(64)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return t.prototype.update=function(t){if(!function(t){if("string"==typeof t)return 0===t.length;return 0===t.byteLength}(t)){if(this.finished)throw new Error("Attempted to update an already finished hash.");var e=function(t){if("string"==typeof t)return Object(Mo.a)(t);if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(t)}(t),n=0,r=e.byteLength;for(this.bytesHashed+=r;r>0;)this.buffer.setUint8(this.bufferLength++,e[n++]),r--,64===this.bufferLength&&(this.hashBuffer(),this.bufferLength=0)}},t.prototype.digest=function(){return Object(Qr.__awaiter)(this,void 0,void 0,(function(){var t,e,n,r,i,o,a;return Object(Qr.__generator)(this,(function(s){if(!this.finished){if(e=(t=this).buffer,n=t.bufferLength,r=t.bytesHashed,i=8*r,e.setUint8(this.bufferLength++,128),n%64>=56){for(a=this.bufferLength;a<64;a++)e.setUint8(a,0);this.hashBuffer(),this.bufferLength=0}for(a=this.bufferLength;a<56;a++)e.setUint8(a,0);e.setUint32(56,i>>>0,!0),e.setUint32(60,Math.floor(i/4294967296),!0),this.hashBuffer(),this.finished=!0}for(o=new DataView(new ArrayBuffer(16)),a=0;a<4;a++)o.setUint32(4*a,this.state[a],!0);return[2,new Uint8Array(o.buffer,o.byteOffset,o.byteLength)]}))}))},t.prototype.hashBuffer=function(){var t=this.buffer,e=this.state,n=e[0],r=e[1],i=e[2],o=e[3];n=Ao(n,r,i,o,t.getUint32(0,!0),7,3614090360),o=Ao(o,n,r,i,t.getUint32(4,!0),12,3905402710),i=Ao(i,o,n,r,t.getUint32(8,!0),17,606105819),r=Ao(r,i,o,n,t.getUint32(12,!0),22,3250441966),n=Ao(n,r,i,o,t.getUint32(16,!0),7,4118548399),o=Ao(o,n,r,i,t.getUint32(20,!0),12,1200080426),i=Ao(i,o,n,r,t.getUint32(24,!0),17,2821735955),r=Ao(r,i,o,n,t.getUint32(28,!0),22,4249261313),n=Ao(n,r,i,o,t.getUint32(32,!0),7,1770035416),o=Ao(o,n,r,i,t.getUint32(36,!0),12,2336552879),i=Ao(i,o,n,r,t.getUint32(40,!0),17,4294925233),r=Ao(r,i,o,n,t.getUint32(44,!0),22,2304563134),n=Ao(n,r,i,o,t.getUint32(48,!0),7,1804603682),o=Ao(o,n,r,i,t.getUint32(52,!0),12,4254626195),i=Ao(i,o,n,r,t.getUint32(56,!0),17,2792965006),n=Co(n,r=Ao(r,i,o,n,t.getUint32(60,!0),22,1236535329),i,o,t.getUint32(4,!0),5,4129170786),o=Co(o,n,r,i,t.getUint32(24,!0),9,3225465664),i=Co(i,o,n,r,t.getUint32(44,!0),14,643717713),r=Co(r,i,o,n,t.getUint32(0,!0),20,3921069994),n=Co(n,r,i,o,t.getUint32(20,!0),5,3593408605),o=Co(o,n,r,i,t.getUint32(40,!0),9,38016083),i=Co(i,o,n,r,t.getUint32(60,!0),14,3634488961),r=Co(r,i,o,n,t.getUint32(16,!0),20,3889429448),n=Co(n,r,i,o,t.getUint32(36,!0),5,568446438),o=Co(o,n,r,i,t.getUint32(56,!0),9,3275163606),i=Co(i,o,n,r,t.getUint32(12,!0),14,4107603335),r=Co(r,i,o,n,t.getUint32(32,!0),20,1163531501),n=Co(n,r,i,o,t.getUint32(52,!0),5,2850285829),o=Co(o,n,r,i,t.getUint32(8,!0),9,4243563512),i=Co(i,o,n,r,t.getUint32(28,!0),14,1735328473),n=To(n,r=Co(r,i,o,n,t.getUint32(48,!0),20,2368359562),i,o,t.getUint32(20,!0),4,4294588738),o=To(o,n,r,i,t.getUint32(32,!0),11,2272392833),i=To(i,o,n,r,t.getUint32(44,!0),16,1839030562),r=To(r,i,o,n,t.getUint32(56,!0),23,4259657740),n=To(n,r,i,o,t.getUint32(4,!0),4,2763975236),o=To(o,n,r,i,t.getUint32(16,!0),11,1272893353),i=To(i,o,n,r,t.getUint32(28,!0),16,4139469664),r=To(r,i,o,n,t.getUint32(40,!0),23,3200236656),n=To(n,r,i,o,t.getUint32(52,!0),4,681279174),o=To(o,n,r,i,t.getUint32(0,!0),11,3936430074),i=To(i,o,n,r,t.getUint32(12,!0),16,3572445317),r=To(r,i,o,n,t.getUint32(24,!0),23,76029189),n=To(n,r,i,o,t.getUint32(36,!0),4,3654602809),o=To(o,n,r,i,t.getUint32(48,!0),11,3873151461),i=To(i,o,n,r,t.getUint32(60,!0),16,530742520),n=Io(n,r=To(r,i,o,n,t.getUint32(8,!0),23,3299628645),i,o,t.getUint32(0,!0),6,4096336452),o=Io(o,n,r,i,t.getUint32(28,!0),10,1126891415),i=Io(i,o,n,r,t.getUint32(56,!0),15,2878612391),r=Io(r,i,o,n,t.getUint32(20,!0),21,4237533241),n=Io(n,r,i,o,t.getUint32(48,!0),6,1700485571),o=Io(o,n,r,i,t.getUint32(12,!0),10,2399980690),i=Io(i,o,n,r,t.getUint32(40,!0),15,4293915773),r=Io(r,i,o,n,t.getUint32(4,!0),21,2240044497),n=Io(n,r,i,o,t.getUint32(32,!0),6,1873313359),o=Io(o,n,r,i,t.getUint32(60,!0),10,4264355552),i=Io(i,o,n,r,t.getUint32(24,!0),15,2734768916),r=Io(r,i,o,n,t.getUint32(52,!0),21,1309151649),n=Io(n,r,i,o,t.getUint32(16,!0),6,4149444226),o=Io(o,n,r,i,t.getUint32(44,!0),10,3174756917),i=Io(i,o,n,r,t.getUint32(8,!0),15,718787259),r=Io(r,i,o,n,t.getUint32(36,!0),21,3951481745),e[0]=n+e[0]&4294967295,e[1]=r+e[1]&4294967295,e[2]=i+e[2]&4294967295,e[3]=o+e[3]&4294967295},t}();function xo(t,e,n,r,i,o){return((e=(e+t&4294967295)+(r+o&4294967295)&4294967295)<>>32-i)+n&4294967295}function Ao(t,e,n,r,i,o,a){return xo(e&n|~e&r,t,e,i,o,a)}function Co(t,e,n,r,i,o,a){return xo(e&r|n&~r,t,e,i,o,a)}function To(t,e,n,r,i,o,a){return xo(e^n^r,t,e,i,o,a)}function Io(t,e,n,r,i,o,a){return xo(n^(e|~r),t,e,i,o,a)}var Po=n(49),Oo=n(135),Ro=n(61),jo=n(137),Lo=n(138),No=new Set(["ap-east-1","ap-northeast-1","ap-northeast-2","ap-south-1","ap-southeast-1","ap-southeast-2","ca-central-1","eu-central-1","eu-north-1","eu-west-1","eu-west-2","eu-west-3","me-south-1","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]),Uo=new Set(["cn-north-1","cn-northwest-1"]),Bo=new Set(["us-iso-east-1"]),Do=new Set(["us-isob-east-1"]),zo=new Set(["us-gov-east-1","us-gov-west-1"]),Fo=f(f({},{apiVersion:"2006-03-01",disableHostPrefix:!1,logger:{},regionInfoProvider:function(t,e){var n=void 0;switch(t){case"ap-east-1":n={hostname:"s3.ap-east-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-1":n={hostname:"s3.ap-northeast-1.amazonaws.com",partition:"aws"};break;case"ap-northeast-2":n={hostname:"s3.ap-northeast-2.amazonaws.com",partition:"aws"};break;case"ap-south-1":n={hostname:"s3.ap-south-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-1":n={hostname:"s3.ap-southeast-1.amazonaws.com",partition:"aws"};break;case"ap-southeast-2":n={hostname:"s3.ap-southeast-2.amazonaws.com",partition:"aws"};break;case"ca-central-1":n={hostname:"s3.ca-central-1.amazonaws.com",partition:"aws"};break;case"cn-north-1":n={hostname:"s3.cn-north-1.amazonaws.com.cn",partition:"aws-cn"};break;case"cn-northwest-1":n={hostname:"s3.cn-northwest-1.amazonaws.com.cn",partition:"aws-cn"};break;case"eu-central-1":n={hostname:"s3.eu-central-1.amazonaws.com",partition:"aws"};break;case"eu-north-1":n={hostname:"s3.eu-north-1.amazonaws.com",partition:"aws"};break;case"eu-west-1":n={hostname:"s3.eu-west-1.amazonaws.com",partition:"aws"};break;case"eu-west-2":n={hostname:"s3.eu-west-2.amazonaws.com",partition:"aws"};break;case"eu-west-3":n={hostname:"s3.eu-west-3.amazonaws.com",partition:"aws"};break;case"fips-us-gov-west-1":n={hostname:"s3-fips-us-gov-west-1.amazonaws.com",partition:"aws-us-gov",signingRegion:"us-gov-west-1"};break;case"me-south-1":n={hostname:"s3.me-south-1.amazonaws.com",partition:"aws"};break;case"s3-external-1":n={hostname:"s3-external-1.amazonaws.com",partition:"aws",signingRegion:"us-east-1"};break;case"sa-east-1":n={hostname:"s3.sa-east-1.amazonaws.com",partition:"aws"};break;case"us-east-1":n={hostname:"s3.amazonaws.com",partition:"aws"};break;case"us-east-2":n={hostname:"s3.us-east-2.amazonaws.com",partition:"aws"};break;case"us-gov-east-1":n={hostname:"s3.us-gov-east-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-gov-west-1":n={hostname:"s3.us-gov-west-1.amazonaws.com",partition:"aws-us-gov"};break;case"us-iso-east-1":n={hostname:"s3.us-iso-east-1.c2s.ic.gov",partition:"aws-iso"};break;case"us-isob-east-1":n={hostname:"s3.us-isob-east-1.sc2s.sgov.gov",partition:"aws-iso-b"};break;case"us-west-1":n={hostname:"s3.us-west-1.amazonaws.com",partition:"aws"};break;case"us-west-2":n={hostname:"s3.us-west-2.amazonaws.com",partition:"aws"};break;default:No.has(t)&&(n={hostname:"s3.{region}.amazonaws.com".replace("{region}",t),partition:"aws"}),Uo.has(t)&&(n={hostname:"s3.{region}.amazonaws.com.cn".replace("{region}",t),partition:"aws-cn"}),Bo.has(t)&&(n={hostname:"s3.{region}.c2s.ic.gov".replace("{region}",t),partition:"aws-iso"}),Do.has(t)&&(n={hostname:"s3.{region}.sc2s.sgov.gov".replace("{region}",t),partition:"aws-iso-b"}),zo.has(t)&&(n={hostname:"s3.{region}.amazonaws.com".replace("{region}",t),partition:"aws-us-gov"}),void 0===n&&(n={hostname:"s3.{region}.amazonaws.com".replace("{region}",t),partition:"aws"})}return Promise.resolve(n)},signingEscapePath:!1,signingName:"s3",useArnRegion:!1}),{runtime:"browser",base64Decoder:Ro.a,base64Encoder:Ro.b,bodyLengthChecker:jo.a,credentialDefaultProvider:Object(So.a)("Credential is missing"),defaultUserAgent:Object(Lo.a)(Ji.name,Ji.version),eventStreamSerdeProvider:function(t){return new yo(t)},maxAttempts:Po.a,md5:Eo,region:Object(So.a)("Region is missing"),requestHandler:new wo.a,sha256:Xi.Sha256,streamCollector:wo.b,streamHasher:function(t,e){return Object(Qr.__awaiter)(this,void 0,void 0,(function(){var n;return Object(Qr.__generator)(this,(function(r){switch(r.label){case 0:return n=new t,[4,_o(e,(function(t){n.update(t)}))];case 1:return r.sent(),[2,n.digest()]}}))}))},urlParser:Oo.a,utf8Decoder:Mo.a,utf8Encoder:Mo.b}),qo=n(94),Ko=n(133);var Ho={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware"},Wo=function(t){return{applyToStack:function(e){e.add(function(t){var e=this;return function(n){return function(r){return Object(Qr.__awaiter)(e,void 0,void 0,(function(){var e;return Object(Qr.__generator)(this,(function(i){return e=r.request,Xr.a.isInstance(e)&&e.body&&"node"===t.runtime&&(e.headers=Object(Qr.__assign)(Object(Qr.__assign)({},e.headers),{Expect:"100-continue"})),[2,n(Object(Qr.__assign)(Object(Qr.__assign)({},r),{request:e}))]}))}))}}}(t),Ho)}}},Vo=n(92),Zo=n(141);var Go={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware"},Yo=function(t){return{applyToStack:function(t){t.add(function(){var t=this;return function(e){return function(n){return Object(Qr.__awaiter)(t,void 0,void 0,(function(){var t,r;return Object(Qr.__generator)(this,(function(i){if("string"==typeof(t=n.input.Bucket)&&!Ai(t)&&t.indexOf("/")>=0)throw(r=new Error("Bucket name shouldn't contain '/', received '"+t+"'")).name="InvalidBucketName",r;return[2,e(Object(Qr.__assign)({},n))]}))}))}}}(),Go)}}},$o={step:"build",tags:["USE_REGIONAL_ENDPOINT","S3"],name:"useRegionalEndpointMiddleware"},Jo=function(t){return{applyToStack:function(e){e.add(function(t){return function(e){return function(n){return Object(Qr.__awaiter)(void 0,void 0,void 0,(function(){var r,i;return Object(Qr.__generator)(this,(function(o){switch(o.label){case 0:return r=n.request,!Xr.a.isInstance(r)||t.isCustomEndpoint?[2,e(Object(Qr.__assign)({},n))]:"s3.amazonaws.com"!==r.hostname?[3,1]:(r.hostname="s3.us-east-1.amazonaws.com",[3,3]);case 1:return i="aws-global",[4,t.region()];case 2:i===o.sent()&&(r.hostname="s3.amazonaws.com"),o.label=3;case 3:return[2,e(Object(Qr.__assign)({},n))]}}))}))}}}(t),$o)}}},Xo=n(111),Qo=n(95),ta=function(t){function e(e){var n,r,i,o,a,s,u,c,l,h,d,p=this,m=f(f({},Fo),e),g=Object(qo.b)(m),v=Object(qo.a)(g),y=Object(Xo.b)(v),b=Object(Po.c)(y),w=Object(Qo.b)(b),_=(r=(n=w).bucketEndpoint,i=void 0!==r&&r,o=n.forcePathStyle,a=void 0!==o&&o,s=n.useAccelerateEndpoint,u=void 0!==s&&s,c=n.useDualstackEndpoint,l=void 0!==c&&c,h=n.useArnRegion,d=void 0!==h&&h,Object(Qr.__assign)(Object(Qr.__assign)({},n),{bucketEndpoint:i,forcePathStyle:a,useAccelerateEndpoint:u,useDualstackEndpoint:l,useArnRegion:"function"==typeof d?d:function(){return Promise.resolve(d)}})),S=function(t){return Object(Qr.__assign)(Object(Qr.__assign)({},t),{eventStreamMarshaller:t.eventStreamSerdeProvider(t)})}(Object(Vo.b)(_));return(p=t.call(this,S)||this).config=S,p.middlewareStack.use(Object(Xo.a)(p.config)),p.middlewareStack.use(Object(Po.b)(p.config)),p.middlewareStack.use(Object(Qo.a)(p.config)),p.middlewareStack.use(Object(Ko.a)(p.config)),p.middlewareStack.use(Yo(p.config)),p.middlewareStack.use(Jo(p.config)),p.middlewareStack.use(Wo(p.config)),p.middlewareStack.use(Object(Vo.a)(p.config)),p.middlewareStack.use(Object(Zo.a)(p.config)),p}return c(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this)},e}(Jr.a),ea=n(90);function na(t){var e=t.port,n=t.query,r=t.protocol,i=t.path,o=t.hostname;r&&":"!==r.substr(-1)&&(r+=":"),e&&(o+=":"+e),i&&"/"!==i.charAt(0)&&(i="/"+i);var a=n?Object(ea.a)(n):"";return a&&"?"!==a[0]&&(a="?"+a),r+"//"+o+i+a}function ra(t,e){return Object(Qr.__awaiter)(this,void 0,void 0,(function(){var n,r,i=this;return Object(Qr.__generator)(this,(function(o){switch(o.label){case 0:return n=function(t){return function(t){return Object(Qr.__awaiter)(i,void 0,void 0,(function(){return Object(Qr.__generator)(this,(function(e){return[2,{output:{request:t.request},response:void 0}]}))}))}},(r=t.middlewareStack.clone()).add(n,{step:"build",priority:"low"}),[4,e.resolveMiddleware(r,t.config,void 0)(e).then((function(t){return t.output.request}))];case 1:return[2,o.sent()]}}))}))}var ia=n(140),oa=function(){function t(t){var e=Object(Qr.__assign)({service:t.signingName||t.service||"s3",uriEscapePath:t.uriEscapePath||!1},t);this.signer=new ia.a(e)}return t.prototype.presign=function(t,e){void 0===e&&(e={});var n=e.unsignableHeaders,r=void 0===n?new Set:n,i=Object(Qr.__rest)(e,["unsignableHeaders"]);return Object(Qr.__awaiter)(this,void 0,void 0,(function(){return Object(Qr.__generator)(this,(function(e){return r.add("content-type"),t.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",[2,this.signer.presign(t,Object(Qr.__assign)({expiresIn:900,unsignableHeaders:r},i))]}))}))},t}(),aa=n(326),sa=n.n(aa),ua=new r.a("axios-http-handler"),ca=function(){function t(t,e){void 0===t&&(t={}),this.httpOptions=t,this.emitter=e}return t.prototype.destroy=function(){},t.prototype.handle=function(t,e){var n=this.httpOptions.requestTimeout,r=this.emitter,i=t.path;if(t.query){var o=Object(ea.a)(t.query);o&&(i+="?"+o)}var a=t.port,s=t.protocol+"//"+t.hostname+(a?":"+a:"")+i,u={};u.url=s,u.method=t.method,u.headers=t.headers,delete u.headers.host,t.body?u.data=t.body:u.headers["Content-Type"]&&(u.data=null),r&&(u.onUploadProgress=function(t){r.emit("sendProgress",t),ua.debug(t)}),u.responseType="blob";var c=[sa.a.request(u).then((function(t){return{response:new Xr.b({headers:t.headers,statusCode:t.status,body:t.data})}})).catch((function(t){throw ua.error(t),t})),fa(n)];return Promise.race(c)},t}();function fa(t){return void 0===t&&(t=0),new Promise((function(e,n){t&&setTimeout((function(){var e=new Error("Request did not complete within "+t+" ms");e.name="TimeoutError",n(e)}),t)}))}var la,ha,da,pa,ma,ga,va,ya,ba,wa,_a,Sa,Ma,ka,Ea,xa,Aa,Ca,Ta,Ia,Pa=function(t){function e(e){var n=t.call(this)||this;return n.input=e,n}return c(e,t),e.prototype.resolveMiddleware=function(t,e,n){this.middlewareStack.use(Object(Wi.a)(e,this.serialize,this.deserialize)),this.middlewareStack.use(Zi(e)),this.middlewareStack.use(Hi(e));var r=t.concat(this.middlewareStack),i=e.logger,o={logger:i,clientName:"S3Client",commandName:"PutObjectCommand",inputFilterSensitiveLog:_r.filterSensitiveLog,outputFilterSensitiveLog:wr.filterSensitiveLog};"function"==typeof i.info&&i.info({clientName:"S3Client",commandName:"PutObjectCommand"});var a=e.requestHandler;return r.resolve((function(t){return a.handle(t.request,n||{})}),o)},e.prototype.serialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,d,p;return h(this,(function(h){switch(h.label){case 0:if(n=f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f({"Content-Type":"application/octet-stream"},ki(t.GrantFullControl)&&{"x-amz-grant-full-control":t.GrantFullControl}),ki(t.ContentEncoding)&&{"Content-Encoding":t.ContentEncoding}),ki(t.RequestPayer)&&{"x-amz-request-payer":t.RequestPayer}),ki(t.GrantReadACP)&&{"x-amz-grant-read-acp":t.GrantReadACP}),ki(t.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":t.SSECustomerKeyMD5}),ki(t.CacheControl)&&{"Cache-Control":t.CacheControl}),ki(t.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":t.WebsiteRedirectLocation}),ki(t.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":t.ObjectLockLegalHoldStatus}),ki(t.GrantWriteACP)&&{"x-amz-grant-write-acp":t.GrantWriteACP}),ki(t.ContentLength)&&{"Content-Length":t.ContentLength.toString()}),ki(t.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(t.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),ki(t.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":t.SSECustomerAlgorithm}),ki(t.ContentDisposition)&&{"Content-Disposition":t.ContentDisposition}),ki(t.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":t.SSECustomerKey}),ki(t.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":t.SSEKMSEncryptionContext}),ki(t.Tagging)&&{"x-amz-tagging":t.Tagging}),ki(t.Expires)&&{Expires:Object(Jr.d)(t.Expires).toString()}),ki(t.StorageClass)&&{"x-amz-storage-class":t.StorageClass}),ki(t.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":t.ExpectedBucketOwner}),ki(t.ContentMD5)&&{"Content-MD5":t.ContentMD5}),ki(t.ServerSideEncryption)&&{"x-amz-server-side-encryption":t.ServerSideEncryption}),ki(t.ObjectLockMode)&&{"x-amz-object-lock-mode":t.ObjectLockMode}),ki(t.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":t.SSEKMSKeyId}),ki(t.ContentLanguage)&&{"Content-Language":t.ContentLanguage}),ki(t.GrantRead)&&{"x-amz-grant-read":t.GrantRead}),ki(t.ACL)&&{"x-amz-acl":t.ACL}),ki(t.ContentType)&&{"Content-Type":t.ContentType}),void 0!==t.Metadata&&Object.keys(t.Metadata).reduce((function(e,n){return e["x-amz-meta-"+n]=t.Metadata[n],e}),{})),r="/{Bucket}/{Key+}",void 0===t.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=t.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(r=r.replace("{Bucket}",Object(Jr.e)(i)),void 0===t.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=t.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return r=r.replace("{Key+}",i.split("/").map((function(t){return Object(Jr.e)(t)})).join("/")),o={"x-id":"PutObject"},void 0!==t.Body&&(s=t.Body,a=s),[4,e.endpoint()];case 1:return u=h.sent(),c=u.hostname,l=u.protocol,d=void 0===l?"https":l,p=u.port,[2,new Xr.a({protocol:d,hostname:c,port:p,method:"PUT",headers:n,path:r,query:o,body:a})]}}))}))}(t,e)},e.prototype.deserialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n;return h(this,(function(r){switch(r.label){case 0:return 200!==t.statusCode&&t.statusCode>=300?[2,fi(t,e)]:(n={$metadata:Si(t),ETag:void 0,Expiration:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==t.headers["x-amz-server-side-encryption-context"]&&(n.SSEKMSEncryptionContext=t.headers["x-amz-server-side-encryption-context"]),void 0!==t.headers["x-amz-expiration"]&&(n.Expiration=t.headers["x-amz-expiration"]),void 0!==t.headers["x-amz-server-side-encryption-customer-key-md5"]&&(n.SSECustomerKeyMD5=t.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==t.headers.etag&&(n.ETag=t.headers.etag),void 0!==t.headers["x-amz-server-side-encryption-customer-algorithm"]&&(n.SSECustomerAlgorithm=t.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==t.headers["x-amz-version-id"]&&(n.VersionId=t.headers["x-amz-version-id"]),void 0!==t.headers["x-amz-request-charged"]&&(n.RequestCharged=t.headers["x-amz-request-charged"]),void 0!==t.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(n.SSEKMSKeyId=t.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==t.headers["x-amz-server-side-encryption"]&&(n.ServerSideEncryption=t.headers["x-amz-server-side-encryption"]),[4,Mi(t.body,e)]);case 1:return r.sent(),[2,Promise.resolve(n)]}}))}))}(t,e)},e}(Jr.b),Oa=function(t){function e(e){var n=t.call(this)||this;return n.input=e,n}return c(e,t),e.prototype.resolveMiddleware=function(t,e,n){this.middlewareStack.use(Object(Wi.a)(e,this.serialize,this.deserialize)),this.middlewareStack.use(Zi(e)),this.middlewareStack.use(Hi(e));var r=t.concat(this.middlewareStack),i=e.logger,o={logger:i,clientName:"S3Client",commandName:"CreateMultipartUploadCommand",inputFilterSensitiveLog:U.filterSensitiveLog,outputFilterSensitiveLog:N.filterSensitiveLog};"function"==typeof i.info&&i.info({clientName:"S3Client",commandName:"CreateMultipartUploadCommand"});var a=e.requestHandler;return r.resolve((function(t){return a.handle(t.request,n||{})}),o)},e.prototype.serialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l;return h(this,(function(h){switch(h.label){case 0:if(n=f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f({"Content-Type":""},ki(t.GrantFullControl)&&{"x-amz-grant-full-control":t.GrantFullControl}),ki(t.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":t.SSECustomerKeyMD5}),ki(t.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":t.SSECustomerAlgorithm}),ki(t.SSEKMSKeyId)&&{"x-amz-server-side-encryption-aws-kms-key-id":t.SSEKMSKeyId}),ki(t.ObjectLockLegalHoldStatus)&&{"x-amz-object-lock-legal-hold":t.ObjectLockLegalHoldStatus}),ki(t.RequestPayer)&&{"x-amz-request-payer":t.RequestPayer}),ki(t.GrantRead)&&{"x-amz-grant-read":t.GrantRead}),ki(t.GrantWriteACP)&&{"x-amz-grant-write-acp":t.GrantWriteACP}),ki(t.WebsiteRedirectLocation)&&{"x-amz-website-redirect-location":t.WebsiteRedirectLocation}),ki(t.ContentType)&&{"Content-Type":t.ContentType}),ki(t.ContentLanguage)&&{"Content-Language":t.ContentLanguage}),ki(t.CacheControl)&&{"Cache-Control":t.CacheControl}),ki(t.GrantReadACP)&&{"x-amz-grant-read-acp":t.GrantReadACP}),ki(t.Tagging)&&{"x-amz-tagging":t.Tagging}),ki(t.SSEKMSEncryptionContext)&&{"x-amz-server-side-encryption-context":t.SSEKMSEncryptionContext}),ki(t.ACL)&&{"x-amz-acl":t.ACL}),ki(t.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":t.SSECustomerKey}),ki(t.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":t.ExpectedBucketOwner}),ki(t.Expires)&&{Expires:Object(Jr.d)(t.Expires).toString()}),ki(t.ObjectLockRetainUntilDate)&&{"x-amz-object-lock-retain-until-date":(t.ObjectLockRetainUntilDate.toISOString().split(".")[0]+"Z").toString()}),ki(t.ServerSideEncryption)&&{"x-amz-server-side-encryption":t.ServerSideEncryption}),ki(t.ContentDisposition)&&{"Content-Disposition":t.ContentDisposition}),ki(t.ObjectLockMode)&&{"x-amz-object-lock-mode":t.ObjectLockMode}),ki(t.StorageClass)&&{"x-amz-storage-class":t.StorageClass}),ki(t.ContentEncoding)&&{"Content-Encoding":t.ContentEncoding}),void 0!==t.Metadata&&Object.keys(t.Metadata).reduce((function(e,n){return e["x-amz-meta-"+n]=t.Metadata[n],e}),{})),r="/{Bucket}/{Key+}",void 0===t.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=t.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(r=r.replace("{Bucket}",Object(Jr.e)(i)),void 0===t.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=t.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return r=r.replace("{Key+}",i.split("/").map((function(t){return Object(Jr.e)(t)})).join("/")),o={uploads:""},[4,e.endpoint()];case 1:return a=h.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,l=a.port,[2,new Xr.a({protocol:c,hostname:s,port:l,method:"POST",headers:n,path:r,query:o,body:void 0})]}}))}))}(t,e)},e.prototype.deserialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r;return h(this,(function(i){switch(i.label){case 0:return 200!==t.statusCode&&t.statusCode>=300?[2,oi(t,e)]:(n={$metadata:Si(t),AbortDate:void 0,AbortRuleId:void 0,Bucket:void 0,Key:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSEncryptionContext:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,UploadId:void 0},void 0!==t.headers["x-amz-server-side-encryption-context"]&&(n.SSEKMSEncryptionContext=t.headers["x-amz-server-side-encryption-context"]),void 0!==t.headers["x-amz-server-side-encryption"]&&(n.ServerSideEncryption=t.headers["x-amz-server-side-encryption"]),void 0!==t.headers["x-amz-request-charged"]&&(n.RequestCharged=t.headers["x-amz-request-charged"]),void 0!==t.headers["x-amz-abort-date"]&&(n.AbortDate=new Date(t.headers["x-amz-abort-date"])),void 0!==t.headers["x-amz-server-side-encryption-customer-algorithm"]&&(n.SSECustomerAlgorithm=t.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==t.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(n.SSEKMSKeyId=t.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==t.headers["x-amz-abort-rule-id"]&&(n.AbortRuleId=t.headers["x-amz-abort-rule-id"]),void 0!==t.headers["x-amz-server-side-encryption-customer-key-md5"]&&(n.SSECustomerKeyMD5=t.headers["x-amz-server-side-encryption-customer-key-md5"]),[4,Ei(t.body,e)]);case 1:return void 0!==(r=i.sent()).Bucket&&(n.Bucket=r.Bucket),void 0!==r.Key&&(n.Key=r.Key),void 0!==r.UploadId&&(n.UploadId=r.UploadId),[2,Promise.resolve(n)]}}))}))}(t,e)},e}(Jr.b);!function(t){t.SELECT="SELECT"}(la||(la={})),(ha||(ha={})).filterSensitiveLog=function(t){return f(f({},t),t.OutputLocation&&{OutputLocation:Dr.filterSensitiveLog(t.OutputLocation)})},(da||(da={})).filterSensitiveLog=function(t){return f(f({},t),t.RestoreRequest&&{RestoreRequest:ha.filterSensitiveLog(t.RestoreRequest)})},(pa||(pa={})).filterSensitiveLog=function(t){return f({},t)},(ma||(ma={})).filterSensitiveLog=function(t){return f({},t)},(ga||(ga={})).filterSensitiveLog=function(t){return f({},t)},(va||(va={})).filterSensitiveLog=function(t){return f({},t)},(ya||(ya={})).filterSensitiveLog=function(t){return f({},t)},(ba||(ba={})).filterSensitiveLog=function(t){return f({},t)},(wa||(wa={})).filterSensitiveLog=function(t){return f({},t)},function(t){t.visit=function(t,e){return void 0!==t.Cont?e.Cont(t.Cont):void 0!==t.Progress?e.Progress(t.Progress):void 0!==t.Stats?e.Stats(t.Stats):void 0!==t.End?e.End(t.End):void 0!==t.Records?e.Records(t.Records):e._(t.$unknown[0],t.$unknown[1])},t.filterSensitiveLog=function(t){var e;return void 0!==t.Cont?{Cont:pa.filterSensitiveLog(t.Cont)}:void 0!==t.Progress?{Progress:va.filterSensitiveLog(t.Progress)}:void 0!==t.Stats?{Stats:wa.filterSensitiveLog(t.Stats)}:void 0!==t.End?{End:ma.filterSensitiveLog(t.End)}:void 0!==t.Records?{Records:ya.filterSensitiveLog(t.Records)}:void 0!==t.$unknown?((e={})[t.$unknown[0]]="UNKNOWN",e):void 0}}(_a||(_a={})),(Sa||(Sa={})).filterSensitiveLog=function(t){return f(f({},t),t.Payload&&{Payload:"STREAMING_CONTENT"})},(Ma||(Ma={})).filterSensitiveLog=function(t){return f({},t)},(ka||(ka={})).filterSensitiveLog=function(t){return f({},t)},(Ea||(Ea={})).filterSensitiveLog=function(t){return f(f({},t),t.SSECustomerKey&&{SSECustomerKey:Jr.c})},(xa||(xa={})).filterSensitiveLog=function(t){return f(f({},t),t.SSEKMSKeyId&&{SSEKMSKeyId:Jr.c})},(Aa||(Aa={})).filterSensitiveLog=function(t){return f(f({},t),t.SSECustomerKey&&{SSECustomerKey:Jr.c})},(Ca||(Ca={})).filterSensitiveLog=function(t){return f({},t)},(Ta||(Ta={})).filterSensitiveLog=function(t){return f(f({},t),t.SSEKMSKeyId&&{SSEKMSKeyId:Jr.c})},(Ia||(Ia={})).filterSensitiveLog=function(t){return f(f(f({},t),t.SSECustomerKey&&{SSECustomerKey:Jr.c}),t.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:Jr.c})};var Ra=function(t){function e(e){var n=t.call(this)||this;return n.input=e,n}return c(e,t),e.prototype.resolveMiddleware=function(t,e,n){this.middlewareStack.use(Object(Wi.a)(e,this.serialize,this.deserialize)),this.middlewareStack.use(Zi(e)),this.middlewareStack.use(Hi(e));var r=t.concat(this.middlewareStack),i=e.logger,o={logger:i,clientName:"S3Client",commandName:"UploadPartCommand",inputFilterSensitiveLog:Aa.filterSensitiveLog,outputFilterSensitiveLog:xa.filterSensitiveLog};"function"==typeof i.info&&i.info({clientName:"S3Client",commandName:"UploadPartCommand"});var a=e.requestHandler;return r.resolve((function(t){return a.handle(t.request,n||{})}),o)},e.prototype.serialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,d,p;return h(this,(function(h){switch(h.label){case 0:if(n=f(f(f(f(f(f(f({"Content-Type":"application/octet-stream"},ki(t.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":t.ExpectedBucketOwner}),ki(t.RequestPayer)&&{"x-amz-request-payer":t.RequestPayer}),ki(t.ContentLength)&&{"Content-Length":t.ContentLength.toString()}),ki(t.SSECustomerKey)&&{"x-amz-server-side-encryption-customer-key":t.SSECustomerKey}),ki(t.SSECustomerAlgorithm)&&{"x-amz-server-side-encryption-customer-algorithm":t.SSECustomerAlgorithm}),ki(t.SSECustomerKeyMD5)&&{"x-amz-server-side-encryption-customer-key-MD5":t.SSECustomerKeyMD5}),ki(t.ContentMD5)&&{"Content-MD5":t.ContentMD5}),r="/{Bucket}/{Key+}",void 0===t.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=t.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(r=r.replace("{Bucket}",Object(Jr.e)(i)),void 0===t.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=t.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return r=r.replace("{Key+}",i.split("/").map((function(t){return Object(Jr.e)(t)})).join("/")),o=f(f({"x-id":"UploadPart"},void 0!==t.PartNumber&&{partNumber:t.PartNumber.toString()}),void 0!==t.UploadId&&{uploadId:t.UploadId}),void 0!==t.Body&&(s=t.Body,a=s),[4,e.endpoint()];case 1:return u=h.sent(),c=u.hostname,l=u.protocol,d=void 0===l?"https":l,p=u.port,[2,new Xr.a({protocol:d,hostname:c,port:p,method:"PUT",headers:n,path:r,query:o,body:a})]}}))}))}(t,e)},e.prototype.deserialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n;return h(this,(function(r){switch(r.label){case 0:return 200!==t.statusCode&&t.statusCode>=300?[2,li(t,e)]:(n={$metadata:Si(t),ETag:void 0,RequestCharged:void 0,SSECustomerAlgorithm:void 0,SSECustomerKeyMD5:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0},void 0!==t.headers["x-amz-server-side-encryption-customer-key-md5"]&&(n.SSECustomerKeyMD5=t.headers["x-amz-server-side-encryption-customer-key-md5"]),void 0!==t.headers["x-amz-server-side-encryption"]&&(n.ServerSideEncryption=t.headers["x-amz-server-side-encryption"]),void 0!==t.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(n.SSEKMSKeyId=t.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==t.headers["x-amz-server-side-encryption-customer-algorithm"]&&(n.SSECustomerAlgorithm=t.headers["x-amz-server-side-encryption-customer-algorithm"]),void 0!==t.headers["x-amz-request-charged"]&&(n.RequestCharged=t.headers["x-amz-request-charged"]),void 0!==t.headers.etag&&(n.ETag=t.headers.etag),[4,Mi(t.body,e)]);case 1:return r.sent(),[2,Promise.resolve(n)]}}))}))}(t,e)},e}(Jr.b),ja=function(t){function e(e){var n=t.call(this)||this;return n.input=e,n}return c(e,t),e.prototype.resolveMiddleware=function(t,e,n){this.middlewareStack.use(Object(Wi.a)(e,this.serialize,this.deserialize)),this.middlewareStack.use(Hi(e));var r=t.concat(this.middlewareStack),i=e.logger,o={logger:i,clientName:"S3Client",commandName:"CompleteMultipartUploadCommand",inputFilterSensitiveLog:x.filterSensitiveLog,outputFilterSensitiveLog:M.filterSensitiveLog};"function"==typeof i.info&&i.info({clientName:"S3Client",commandName:"CompleteMultipartUploadCommand"});var a=e.requestHandler;return r.resolve((function(t){return a.handle(t.request,n||{})}),o)},e.prototype.serialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l,d,p;return h(this,(function(h){switch(h.label){case 0:if(n=f(f({"Content-Type":"application/xml"},ki(t.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":t.ExpectedBucketOwner}),ki(t.RequestPayer)&&{"x-amz-request-payer":t.RequestPayer}),r="/{Bucket}/{Key+}",void 0===t.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=t.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");if(r=r.replace("{Key+}",i.split("/").map((function(t){return Object(Jr.e)(t)})).join("/")),void 0===t.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=t.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");return r=r.replace("{Bucket}",Object(Jr.e)(i)),o=f({},void 0!==t.UploadId&&{uploadId:t.UploadId}),void 0!==t.MultipartUpload&&(s=mi(t.MultipartUpload,e),a='',s.addAttribute("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),a+=s.toString()),[4,e.endpoint()];case 1:return u=h.sent(),c=u.hostname,l=u.protocol,d=void 0===l?"https":l,p=u.port,[2,new Xr.a({protocol:d,hostname:c,port:p,method:"POST",headers:n,path:r,query:o,body:a})]}}))}))}(t,e)},e.prototype.deserialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r;return h(this,(function(i){switch(i.label){case 0:return 200!==t.statusCode&&t.statusCode>=300?[2,ii(t,e)]:(n={$metadata:Si(t),Bucket:void 0,ETag:void 0,Expiration:void 0,Key:void 0,Location:void 0,RequestCharged:void 0,SSEKMSKeyId:void 0,ServerSideEncryption:void 0,VersionId:void 0},void 0!==t.headers["x-amz-expiration"]&&(n.Expiration=t.headers["x-amz-expiration"]),void 0!==t.headers["x-amz-server-side-encryption"]&&(n.ServerSideEncryption=t.headers["x-amz-server-side-encryption"]),void 0!==t.headers["x-amz-server-side-encryption-aws-kms-key-id"]&&(n.SSEKMSKeyId=t.headers["x-amz-server-side-encryption-aws-kms-key-id"]),void 0!==t.headers["x-amz-version-id"]&&(n.VersionId=t.headers["x-amz-version-id"]),void 0!==t.headers["x-amz-request-charged"]&&(n.RequestCharged=t.headers["x-amz-request-charged"]),[4,Ei(t.body,e)]);case 1:return void 0!==(r=i.sent()).Bucket&&(n.Bucket=r.Bucket),void 0!==r.ETag&&(n.ETag=r.ETag),void 0!==r.Key&&(n.Key=r.Key),void 0!==r.Location&&(n.Location=r.Location),[2,Promise.resolve(n)]}}))}))}(t,e)},e}(Jr.b),La=function(t){function e(e){var n=t.call(this)||this;return n.input=e,n}return c(e,t),e.prototype.resolveMiddleware=function(t,e,n){this.middlewareStack.use(Object(Wi.a)(e,this.serialize,this.deserialize)),this.middlewareStack.use(Hi(e));var r=t.concat(this.middlewareStack),i=e.logger,o={logger:i,clientName:"S3Client",commandName:"AbortMultipartUploadCommand",inputFilterSensitiveLog:m.filterSensitiveLog,outputFilterSensitiveLog:p.filterSensitiveLog};"function"==typeof i.info&&i.info({clientName:"S3Client",commandName:"AbortMultipartUploadCommand"});var a=e.requestHandler;return r.resolve((function(t){return a.handle(t.request,n||{})}),o)},e.prototype.serialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l;return h(this,(function(h){switch(h.label){case 0:if(n=f(f({"Content-Type":""},ki(t.RequestPayer)&&{"x-amz-request-payer":t.RequestPayer}),ki(t.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":t.ExpectedBucketOwner}),r="/{Bucket}/{Key+}",void 0===t.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=t.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");if(r=r.replace("{Key+}",i.split("/").map((function(t){return Object(Jr.e)(t)})).join("/")),void 0===t.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=t.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");return r=r.replace("{Bucket}",Object(Jr.e)(i)),o=f({"x-id":"AbortMultipartUpload"},void 0!==t.UploadId&&{uploadId:t.UploadId}),[4,e.endpoint()];case 1:return a=h.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,l=a.port,[2,new Xr.a({protocol:c,hostname:s,port:l,method:"DELETE",headers:n,path:r,query:o,body:void 0})]}}))}))}(t,e)},e.prototype.deserialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n;return h(this,(function(r){switch(r.label){case 0:return 204!==t.statusCode&&t.statusCode>=300?[2,ri(t,e)]:(n={$metadata:Si(t),RequestCharged:void 0},void 0!==t.headers["x-amz-request-charged"]&&(n.RequestCharged=t.headers["x-amz-request-charged"]),[4,Mi(t.body,e)]);case 1:return r.sent(),[2,Promise.resolve(n)]}}))}))}(t,e)},e}(Jr.b),Na=function(t){function e(e){var n=t.call(this)||this;return n.input=e,n}return c(e,t),e.prototype.resolveMiddleware=function(t,e,n){this.middlewareStack.use(Object(Wi.a)(e,this.serialize,this.deserialize)),this.middlewareStack.use(Hi(e));var r=t.concat(this.middlewareStack),i=e.logger,o={logger:i,clientName:"S3Client",commandName:"ListPartsCommand",inputFilterSensitiveLog:Yn.filterSensitiveLog,outputFilterSensitiveLog:Gn.filterSensitiveLog};"function"==typeof i.info&&i.info({clientName:"S3Client",commandName:"ListPartsCommand"});var a=e.requestHandler;return r.resolve((function(t){return a.handle(t.request,n||{})}),o)},e.prototype.serialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r,i,o,a,s,u,c,l;return h(this,(function(h){switch(h.label){case 0:if(n=f(f({"Content-Type":""},ki(t.RequestPayer)&&{"x-amz-request-payer":t.RequestPayer}),ki(t.ExpectedBucketOwner)&&{"x-amz-expected-bucket-owner":t.ExpectedBucketOwner}),r="/{Bucket}/{Key+}",void 0===t.Bucket)throw new Error("No value provided for input HTTP label: Bucket.");if((i=t.Bucket).length<=0)throw new Error("Empty value provided for input HTTP label: Bucket.");if(r=r.replace("{Bucket}",Object(Jr.e)(i)),void 0===t.Key)throw new Error("No value provided for input HTTP label: Key.");if((i=t.Key).length<=0)throw new Error("Empty value provided for input HTTP label: Key.");return r=r.replace("{Key+}",i.split("/").map((function(t){return Object(Jr.e)(t)})).join("/")),o=f(f(f({"x-id":"ListParts"},void 0!==t.UploadId&&{uploadId:t.UploadId}),void 0!==t.MaxParts&&{"max-parts":t.MaxParts.toString()}),void 0!==t.PartNumberMarker&&{"part-number-marker":t.PartNumberMarker.toString()}),[4,e.endpoint()];case 1:return a=h.sent(),s=a.hostname,u=a.protocol,c=void 0===u?"https":u,l=a.port,[2,new Xr.a({protocol:c,hostname:s,port:l,method:"GET",headers:n,path:r,query:o,body:void 0})]}}))}))}(t,e)},e.prototype.deserialize=function(t,e){return function(t,e){return l(void 0,void 0,void 0,(function(){var n,r;return h(this,(function(i){switch(i.label){case 0:return 200!==t.statusCode&&t.statusCode>=300?[2,ci(t,e)]:(n={$metadata:Si(t),AbortDate:void 0,AbortRuleId:void 0,Bucket:void 0,Initiator:void 0,IsTruncated:void 0,Key:void 0,MaxParts:void 0,NextPartNumberMarker:void 0,Owner:void 0,PartNumberMarker:void 0,Parts:void 0,RequestCharged:void 0,StorageClass:void 0,UploadId:void 0},void 0!==t.headers["x-amz-abort-rule-id"]&&(n.AbortRuleId=t.headers["x-amz-abort-rule-id"]),void 0!==t.headers["x-amz-request-charged"]&&(n.RequestCharged=t.headers["x-amz-request-charged"]),void 0!==t.headers["x-amz-abort-date"]&&(n.AbortDate=new Date(t.headers["x-amz-abort-date"])),[4,Ei(t.body,e)]);case 1:return void 0!==(r=i.sent()).Bucket&&(n.Bucket=r.Bucket),void 0!==r.Initiator&&(n.Initiator=yi(r.Initiator,e)),void 0!==r.IsTruncated&&(n.IsTruncated="true"==r.IsTruncated),void 0!==r.Key&&(n.Key=r.Key),void 0!==r.MaxParts&&(n.MaxParts=parseInt(r.MaxParts)),void 0!==r.NextPartNumberMarker&&(n.NextPartNumberMarker=parseInt(r.NextPartNumberMarker)),void 0!==r.Owner&&(n.Owner=wi(r.Owner,e)),void 0!==r.PartNumberMarker&&(n.PartNumberMarker=parseInt(r.PartNumberMarker)),""===r.Part&&(n.Parts=[]),void 0!==r.Part&&(n.Parts=_i(Object(Jr.f)(r.Part),e)),void 0!==r.StorageClass&&(n.StorageClass=r.StorageClass),void 0!==r.UploadId&&(n.UploadId=r.UploadId),[2,Promise.resolve(n)]}}))}))}(t,e)},e}(Jr.b),Ua=n(43),Ba=n(136),Da=n(36),za=function(t){var e,n=Object(Da.parse)(t),r=n.hostname,i=void 0===r?"localhost":r,o=n.pathname,a=void 0===o?"/":o,s=n.port,u=n.protocol,c=void 0===u?"https:":u,f=n.search;return f&&(e=Object(Ba.a)(f)),{hostname:i,port:s?parseInt(s):void 0,protocol:c,path:a,query:e}},Fa=function(){return(Fa=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Wa=new r.a("AWSS3ProviderManagedUpload"),Va=function(){function t(t,e,n){this.minPartSize=5242880,this.queueSize=4,this.body=null,this.params=null,this.opts=null,this.multiPartMap=[],this.cancel=!1,this.bytesUploaded=0,this.totalBytesToUpload=0,this.emitter=null,this.params=t,this.opts=e,this.emitter=n}return t.prototype.upload=function(){return qa(this,void 0,void 0,(function(){var t,e,n,r,i,o;return Ka(this,(function(a){switch(a.label){case 0:return t=this,[4,this.validateAndSanitizeBody(this.params.Body)];case 1:return t.body=a.sent(),this.totalBytesToUpload=this.byteLength(this.body),this.totalBytesToUpload<=this.minPartSize?(this.params.Body=this.body,e=new Pa(this.params),[4,this._createNewS3Client(this.opts,this.emitter)]):[3,3];case 2:return[2,a.sent().send(e)];case 3:return[4,this.createMultiPartUpload()];case 4:n=a.sent(),r=Math.ceil(this.totalBytesToUpload/this.minPartSize),i=0,a.label=5;case 5:return i0)throw new Error("Multi Part upload clean up failed");return[2]}}))}))},t.prototype.setupEventListener=function(t){var e=this;t.emitter.on("sendProgress",(function(n){e.progressChanged(t.partNumber,n.loaded-t._lastUploadedBytes),t._lastUploadedBytes=n.loaded}))},t.prototype.progressChanged=function(t,e){this.bytesUploaded+=e,this.emitter.emit("sendProgress",{loaded:this.bytesUploaded,total:this.totalBytesToUpload,part:t,key:this.params.Key})},t.prototype.byteLength=function(t){if(null==t)return 0;if("number"==typeof t.byteLength)return t.byteLength;if("number"==typeof t.length)return t.length;if("number"==typeof t.size)return t.size;if("string"!=typeof t.path)throw new Error("Cannot determine length of "+t)},t.prototype.validateAndSanitizeBody=function(t){return qa(this,void 0,void 0,(function(){return Ka(this,(function(e){switch(e.label){case 0:return this.isGenericObject(t)?[2,JSON.stringify(t)]:[3,1];case 1:return this.isBlob(t)?s.a.isReactNative?[4,Object(wo.b)(t)]:[3,3]:[3,4];case 2:return[2,e.sent()];case 3:case 4:return[2,t]}}))}))},t.prototype.isBlob=function(t){return"undefined"!=typeof Blob&&t instanceof Blob},t.prototype.isGenericObject=function(t){if(null!==t&&"object"==typeof t)try{return!(this.byteLength(t)>=0)}catch(t){return!0}return!1},t.prototype._createNewS3Client=function(t,e){return qa(this,void 0,void 0,(function(){var n,r,i,o,a;return Ka(this,(function(u){switch(u.label){case 0:return[4,this._getCredentials()];case 1:return n=u.sent(),r=t.region,i=t.dangerouslyConnectToHttpEndpointForTesting,o={},i&&(o={endpoint:"http://localhost:20005",tls:!1,bucketEndpoint:!1,forcePathStyle:!0}),(a=new ta(Fa(Fa({region:r,credentials:n},o),{requestHandler:new ca({},e),customUserAgent:Object(s.b)(),urlParser:za}))).middlewareStack.remove("contentLengthMiddleware"),[2,a]}}))}))},t.prototype._getCredentials=function(){return a.a.get().then((function(t){if(!t)return!1;var e=a.a.shear(t);return Wa.debug("set credentials for storage",e),e})).catch((function(t){return Wa.warn("ensure credentials error",t),!1}))},t}(),Za=function(){return(Za=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},is=new r.a("StorageClass"),os=function(){function t(){this._config={},this._pluggables=[],is.debug("Storage Options",this._config),this.get=this.get.bind(this),this.put=this.put.bind(this),this.remove=this.remove.bind(this),this.list=this.list.bind(this)}return t.prototype.getModuleName=function(){return"Storage"},t.prototype.addPluggable=function(t){if(t&&"Storage"===t.getCategory()){this._pluggables.push(t);return t.configure(this._config[t.getProviderName()])}},t.prototype.getPluggable=function(t){var e=this._pluggables.find((function(e){return e.getProviderName()===t}));return void 0===e?(is.debug("No plugin found with providerName",t),null):e},t.prototype.removePluggable=function(t){this._pluggables=this._pluggables.filter((function(e){return e.getProviderName()!==t}))},t.prototype.configure=function(t){var e=this;if(is.debug("configure Storage"),!t)return this._config;var n=i.a.parseMobilehubConfig(t),r=Object.keys(n.Storage),o=["bucket","region","level","track","customPrefix","serverSideEncryption","SSECustomerAlgorithm","SSECustomerKey","SSECustomerKeyMD5","SSEKMSKeyId"],a=function(t){return o.some((function(e){return e===t}))};return r&&r.find((function(t){return a(t)}))&&!n.Storage.AWSS3&&(n.Storage.AWSS3={}),Object.entries(n.Storage).map((function(t){var e=rs(t,2),r=e[0],i=e[1];r&&a(r)&&void 0!==i&&(n.Storage.AWSS3[r]=i,delete n.Storage[r])})),Object.keys(n.Storage).forEach((function(t){"string"!=typeof n.Storage[t]&&(e._config[t]=ts(ts({},e._config[t]),n.Storage[t]))})),this._pluggables.forEach((function(t){t.configure(e._config[t.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new Qa),this._config},t.prototype.get=function(t,e){return es(this,void 0,void 0,(function(){var n,r,i;return ns(this,(function(o){return n=(e||{}).provider,r=void 0===n?"AWSS3":n,void 0===(i=this._pluggables.find((function(t){return t.getProviderName()===r})))&&(is.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider")),[2,i.get(t,e)]}))}))},t.prototype.put=function(t,e,n){return es(this,void 0,void 0,(function(){var r,i,o;return ns(this,(function(a){return r=(n||{}).provider,i=void 0===r?"AWSS3":r,void 0===(o=this._pluggables.find((function(t){return t.getProviderName()===i})))&&(is.debug("No plugin found with providerName",i),Promise.reject("No plugin found in Storage for the provider")),[2,o.put(t,e,n)]}))}))},t.prototype.remove=function(t,e){return es(this,void 0,void 0,(function(){var n,r,i;return ns(this,(function(o){return n=(e||{}).provider,r=void 0===n?"AWSS3":n,void 0===(i=this._pluggables.find((function(t){return t.getProviderName()===r})))&&(is.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider")),[2,i.remove(t,e)]}))}))},t.prototype.list=function(t,e){return es(this,void 0,void 0,(function(){var n,r,i;return ns(this,(function(o){return n=(e||{}).provider,r=void 0===n?"AWSS3":n,void 0===(i=this._pluggables.find((function(t){return t.getProviderName()===r})))&&(is.debug("No plugin found with providerName",r),Promise.reject("No plugin found in Storage for the provider")),[2,i.list(t,e)]}))}))},t}(),as=n(37),ss=function(){return(ss=Object.assign||function(t){for(var e,n=1,r=arguments.length;n>6|192,63&i|128);else if(n+1>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}else e.push(i>>12|224,i>>6&63|128,63&i|128)}return Uint8Array.from(e)}(t)},i=function(t){return"function"==typeof TextDecoder?function(t){return new TextDecoder("utf-8").decode(t)}(t):function(t){for(var e="",n=0,r=t.length;n=10.0.0"},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/master/clients/client-cognito-identity","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-cognito-identity"}}')},function(t,e,n){"use strict";(function(t){var r=n(2),i=n.n(r),o=n(29),a=n(108),s=n.n(a),u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:{};function c(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}var f=i.a.createContext||function(t,e){var n,i,a,f="__create-react-context-"+((u[a="__global_unique_id__"]=(u[a]||0)+1)+"__"),l=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=c(e.props.value),e}Object(o.a)(n,t);var r=n.prototype;return r.getChildContext=function(){var t;return(t={})[f]=this.emitter,t},r.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,i=t.value;((o=r)===(a=i)?0!==o||1/o==1/a:o!=o&&a!=a)?n=0:(n="function"==typeof e?e(r,i):1073741823,0!==(n|=0)&&this.emitter.set(t.value,n))}var o,a},r.render=function(){return this.props.children},n}(r.Component);l.childContextTypes=((n={})[f]=s.a.object.isRequired,n);var h=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!=((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}Object(o.a)(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?1073741823:e},r.componentDidMount=function(){this.context[f]&&this.context[f].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?1073741823:t},r.componentWillUnmount=function(){this.context[f]&&this.context[f].off(this.onUpdate)},r.getValue=function(){return this.context[f]?this.context[f].get():t},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(r.Component);return h.contextTypes=((i={})[f]=s.a.object,i),{Provider:l,Consumer:h}};e.a=f}).call(this,n(55))},function(t,e,n){var r=n(669);t.exports=d,t.exports.parse=o,t.exports.compile=function(t,e){return s(o(t,e),e)},t.exports.tokensToFunction=s,t.exports.tokensToRegExp=h;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,a=0,s="",f=e&&e.delimiter||"/";null!=(n=i.exec(t));){var l=n[0],h=n[1],d=n.index;if(s+=t.slice(a,d),a=d+l.length,h)s+=h[1];else{var p=t[a],m=n[2],g=n[3],v=n[4],y=n[5],b=n[6],w=n[7];s&&(r.push(s),s="");var _=null!=m&&null!=p&&p!==m,S="+"===b||"*"===b,M="?"===b||"*"===b,k=n[2]||f,E=v||y;r.push({name:g||o++,prefix:m||"",delimiter:k,optional:M,repeat:S,partial:_,asterisk:!!w,pattern:E?c(E):w?".*":"[^"+u(k)+"]+?"})}}return a=10.0.0"},"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","homepage":"https://github.com/aws/aws-sdk-js-v3/tree/master/clients/client-s3","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-s3"}}')},,,,function(t,e,n){t.exports=!n(14)&&!n(10)((function(){return 7!=Object.defineProperty(n(144)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){e.f=n(12)},function(t,e,n){var r=n(30),i=n(31),o=n(112)(!1),a=n(146)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,c=[];for(n in s)n!=a&&r(s,n)&&c.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(16),i=n(7),o=n(67);t.exports=n(14)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(31),i=n(70).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,e,n){"use strict";var r=n(14),i=n(67),o=n(113),a=n(98),s=n(17),u=n(97),c=Object.assign;t.exports=!c||n(10)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r}))?function(t,e){for(var n=s(t),c=arguments.length,f=1,l=o.f,h=a.f;c>f;)for(var d,p=u(arguments[f++]),m=l?i(p).concat(l(p)):i(p),g=m.length,v=0;g>v;)d=m[v++],r&&!h.call(p,d)||(n[d]=p[d]);return n}:c},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var r=n(20),i=n(11),o=n(213),a=[].slice,s={},u=function(t,e,n){if(!(e in s)){for(var r=[],i=0;i>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(9).parseFloat,i=n(82).trim;t.exports=1/r(n(150)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){var r=n(40);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){var r=n(11),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){var r=n(153),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),u=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),c=r(t);return is||n!=n?c*(1/0):c*n}},function(t,e,n){var r=n(7);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(20),i=n(17),o=n(97),a=n(13);t.exports=function(t,e,n,s,u){r(e);var c=i(t),f=o(c),l=a(c.length),h=u?l-1:0,d=u?-1:1;if(n<2)for(;;){if(h in f){s=f[h],h+=d;break}if(h+=d,u?h<0:l<=h)throw TypeError("Reduce of empty array with no initial value")}for(;u?h>=0:l>h;h+=d)h in f&&(s=e(s,f[h],h,c));return s}},function(t,e,n){"use strict";var r=n(17),i=n(68),o=n(13);t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),s=i(t,a),u=i(e,a),c=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===c?a:i(c,a))-u,a-s),l=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=l,u+=l;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(165);n(3)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,e,n){n(14)&&"g"!=/./g.flags&&n(16).f(RegExp.prototype,"flags",{configurable:!0,get:n(99)})},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(7),i=n(11),o=n(169);t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var r=n(229),i=n(75);t.exports=n(121)("Map",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(t){var e=r.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return r.def(i(this,"Map"),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(16).f,i=n(69),o=n(74),a=n(39),s=n(72),u=n(73),c=n(155),f=n(223),l=n(71),h=n(14),d=n(57).fastKey,p=n(75),m=h?"_s":"size",g=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var f=t((function(t,r){s(t,f,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[m]=0,null!=r&&u(r,n,t[c],t)}));return o(f.prototype,{clear:function(){for(var t=p(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[m]=0},delete:function(t){var n=p(this,e),r=g(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[m]--}return!!r},forEach:function(t){p(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!g(p(this,e),t)}}),h&&r(f.prototype,"size",{get:function(){return p(this,e)[m]}}),f},def:function(t,e,n){var r,i,o=g(t,e);return o?o.v=n:(t._l=o={i:i=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[m]++,"F"!==i&&(t._i[i]=o)),t},getEntry:g,setStrong:function(t,e,n){c(t,e,(function(t,n){this._t=p(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?f(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,f(1))}),n?"entries":"values",!n,!0),l(e)}}},function(t,e,n){"use strict";var r=n(229),i=n(75);t.exports=n(121)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"Set"),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(9),o=n(47)(0),a=n(25),s=n(57),u=n(210),c=n(232),f=n(11),l=n(75),h=n(75),d=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,m=Object.isExtensible,g=c.ufstore,v=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},y={get:function(t){if(f(t)){var e=p(t);return!0===e?g(l(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(l(this,"WeakMap"),t,e)}},b=t.exports=n(121)("WeakMap",v,y,c,!0,!0);h&&d&&(u((r=c.getConstructor(v,"WeakMap")).prototype,y),s.NEED=!0,o(["delete","has","get","set"],(function(t){var e=b.prototype,n=e[t];a(e,t,(function(e,i){if(f(e)&&!m(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)}))})))},function(t,e,n){"use strict";var r=n(74),i=n(57).getWeak,o=n(7),a=n(11),s=n(72),u=n(73),c=n(47),f=n(30),l=n(75),h=c(5),d=c(6),p=0,m=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},v=function(t,e){return h(t.a,(function(t){return t[0]===e}))};g.prototype={get:function(t){var e=v(this,t);if(e)return e[1]},has:function(t){return!!v(this,t)},set:function(t,e){var n=v(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=d(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var c=t((function(t,r){s(t,c,e,"_i"),t._t=e,t._i=p++,t._l=void 0,null!=r&&u(r,n,t[o],t)}));return r(c.prototype,{delete:function(t){if(!a(t))return!1;var n=i(t);return!0===n?m(l(this,e)).delete(t):n&&f(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=i(t);return!0===n?m(l(this,e)).has(t):n&&f(n,this._i)}}),c},def:function(t,e,n){var r=i(o(e),!0);return!0===r?m(t).set(e,n):r[t._i]=n,t},ufstore:m}},function(t,e,n){var r=n(41),i=n(13);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(70),i=n(113),o=n(7),a=n(9).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){"use strict";var r=n(114),i=n(11),o=n(13),a=n(39),s=n(12)("isConcatSpreadable");t.exports=function t(e,n,u,c,f,l,h,d){for(var p,m,g=f,v=0,y=!!h&&a(h,d,3);v0)g=t(e,n,p,o(p.length),g,l-1)-1;else{if(g>=9007199254740991)throw TypeError();e[g]=p}g++}v++}return g}},function(t,e,n){var r=n(13),i=n(152),o=n(45);t.exports=function(t,e,n,a){var s=String(o(t)),u=s.length,c=void 0===n?" ":String(n),f=r(e);if(f<=u||""==c)return s;var l=f-u,h=i.call(c,Math.ceil(l/c.length));return h.length>l&&(h=h.slice(0,l)),a?h+s:s+h}},function(t,e,n){var r=n(14),i=n(67),o=n(31),a=n(98).f;t.exports=function(t){return function(e){for(var n,s=o(e),u=i(s),c=u.length,f=0,l=[];c>f;)n=u[f++],r&&!a.call(s,n)||l.push(t?[n,s[n]]:s[n]);return l}}},function(t,e,n){var r=n(81),i=n(239);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(73);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e){t.exports=Math.scale||function(t,e,n,r,i){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||i!=i?NaN:t===1/0||t===-1/0?t:(t-e)*(i-r)/(n-e)+r}},function(t,e,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,s,u=a(t),c=1;c>>2]|=t[i]<<24-i%4*8;e.call(this,r,n)}else e.apply(this,arguments)}).prototype=t}}(),r.lib.WordArray)},function(t,e,n){"use strict";var r=n(546).Buffer,i=n(547).Transform;function o(t){i.call(this),this._block=r.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(5)(o,i),o.prototype._transform=function(t,e,n){var r=null;try{this.update(t,e)}catch(t){r=t}n(r)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=r.from(t,e));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,n){"use strict";(function(e,r){var i;t.exports=E,E.ReadableState=k;n(43).EventEmitter;var o=function(t,e){return t.listeners(e).length},a=n(246),s=n(6).Buffer,u=e.Uint8Array||function(){};var c,f=n(548);c=f&&f.debuglog?f.debuglog("stream"):function(){};var l,h,d,p=n(549),m=n(247),g=n(248).getHighWaterMark,v=n(85).codes,y=v.ERR_INVALID_ARG_TYPE,b=v.ERR_STREAM_PUSH_AFTER_EOF,w=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(5)(E,a);var S=m.errorOrDestroy,M=["error","close","destroy","pause","resume"];function k(t,e,r){i=i||n(86),t=t||{},"boolean"!=typeof r&&(r=e instanceof i),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",r),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=n(76).StringDecoder),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function E(t){if(i=i||n(86),!(this instanceof E))return new E(t);var e=this instanceof i;this._readableState=new k(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function x(t,e,n,r,i){c("readableAddChunk",e);var o,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.sync?T(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,a);else if(i||(o=function(t,e){var n;r=e,s.isBuffer(r)||r instanceof u||"string"==typeof e||void 0===e||t.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],e));var r;return n}(a,e)),o)S(t,o);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r)a.endEmitted?S(t,new _):A(t,a,e,!0);else if(a.ended)S(t,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?A(t,a,e,!1):P(t,a)):A(t,a,e,!1)}else r||(a.reading=!1,P(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,N(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(O,t,e))}function O(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function j(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function U(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function B(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(D,e,t))}function D(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function z(t,e){for(var n=0,r=t.length;n=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):T(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t0?U(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(t){S(this,new w("_read()"))},E.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var a=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:g;function s(e,r){c("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",f),t.removeListener("error",d),t.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",h),l=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function u(){c("onend"),t.end()}i.endEmitted?r.nextTick(a):n.once("end",a),t.on("unpipe",s);var f=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,N(t))}}(n);t.on("drain",f);var l=!1;function h(e){c("ondata");var r=t.write(e);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==z(i.pipes,t))&&!l&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(e){c("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&S(t,e)}function p(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),t},E.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?T(this):i.reading||r.nextTick(j,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(t,e){var n=a.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(R,this),n},E.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(R,this),e},E.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(L,t,e))}(this,t)),t.paused=!1,this},E.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(t,e,n){n(new m("_write()"))},E.prototype._writev=null,E.prototype.end=function(t,e,n){var i=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),E.prototype.destroy=l.destroy,E.prototype._undestroy=l.undestroy,E.prototype._destroy=function(t,e){e(t)}}).call(this,n(23),n(18))},function(t,e,n){"use strict";t.exports=f;var r=n(85).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(86);function c(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function h(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)n[v]=t.readInt32BE(4*v);for(;v<64;++v)n[v]=0|(((e=n[v-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+n[v-7]+d(n[v-15])+n[v-16];for(var y=0;y<64;++y){var b=g+h(u)+c(u,p,m)+a[y]+n[y]|0,w=l(r)+f(r,i,o)|0;g=m,m=p,p=u,u=s+b|0,s=o,o=i,i=r,r=b+w|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},function(t,e,n){var r=n(5),i=n(87),o=n(8).Buffer,a=[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],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(t,e,n){return n^t&(e^n)}function f(t,e,n){return t&e|n&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function v(t,e){return t>>>0>>0?1:0}r(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,y=0|this._gh,b=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,M=0|this._dl,k=0|this._el,E=0|this._fl,x=0|this._gl,A=0|this._hl,C=0;C<32;C+=2)e[C]=t.readInt32BE(4*C),e[C+1]=t.readInt32BE(4*C+4);for(;C<160;C+=2){var T=e[C-30],I=e[C-30+1],P=d(T,I),O=p(I,T),R=m(T=e[C-4],I=e[C-4+1]),j=g(I,T),L=e[C-14],N=e[C-14+1],U=e[C-32],B=e[C-32+1],D=O+N|0,z=P+L+v(D,O)|0;z=(z=z+R+v(D=D+j|0,j)|0)+U+v(D=D+B|0,B)|0,e[C]=z,e[C+1]=D}for(var F=0;F<160;F+=2){z=e[F],D=e[F+1];var q=f(n,r,i),K=f(w,_,S),H=l(n,w),W=l(w,n),V=h(s,k),Z=h(k,s),G=a[F],Y=a[F+1],$=c(s,u,y),J=c(k,E,x),X=A+Z|0,Q=b+V+v(X,A)|0;Q=(Q=(Q=Q+$+v(X=X+J|0,J)|0)+G+v(X=X+Y|0,Y)|0)+z+v(X=X+D|0,D)|0;var tt=W+K|0,et=H+q+v(tt,W)|0;b=y,A=x,y=u,x=E,u=s,E=k,s=o+Q+v(k=M+X|0,M)|0,o=i,M=S,i=r,S=_,r=n,_=w,n=Q+et+v(w=X+tt|0,X)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+M|0,this._el=this._el+k|0,this._fl=this._fl+E|0,this._gl=this._gl+x|0,this._hl=this._hl+A|0,this._ah=this._ah+n+v(this._al,w)|0,this._bh=this._bh+r+v(this._bl,_)|0,this._ch=this._ch+i+v(this._cl,S)|0,this._dh=this._dh+o+v(this._dl,M)|0,this._eh=this._eh+s+v(this._el,k)|0,this._fh=this._fh+u+v(this._fl,E)|0,this._gh=this._gh+y+v(this._gl,x)|0,this._hh=this._hh+b+v(this._hl,A)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},function(t,e,n){"use strict";(function(e,r){var i=n(126);t.exports=b;var o,a=n(242);b.ReadableState=y;n(43).EventEmitter;var s=function(t,e){return t.listeners(e).length},u=n(254),c=n(8).Buffer,f=e.Uint8Array||function(){};var l=Object.create(n(102));l.inherits=n(5);var h=n(560),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,m=n(561),g=n(255);l.inherits(b,u);var v=["error","close","destroy","pause","resume"];function y(t,e){t=t||{};var r=e instanceof(o=o||n(77));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=n(76).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||n(77),!(this instanceof b))return new b(t);this._readableState=new y(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,n,r,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,M(t)}(t,a)):(i||(o=function(t,e){var n;r=e,c.isBuffer(r)||r instanceof f||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?_(t,a,e,!1):E(t,a)):_(t,a,e,!1))):r||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function M(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(k,t):k(t))}function k(t){d("emit readable"),t.emit("readable"),T(t)}function E(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(x,t,e))}function x(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),0===(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(O,e,t))}function O(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var n=0,r=t.length;n=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):M(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&P(this),null;var r,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?I(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&P(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?f:b;function c(e,r){d("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),t.removeListener("close",v),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",c),n.removeListener("end",f),n.removeListener("end",b),n.removeListener("data",m),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function f(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",c);var l=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,T(t))}}(n);t.on("drain",l);var h=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==R(o.pipes,t))&&!h&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function g(e){d("onerror",e),b(),t.removeListener("error",g),0===s(t,"error")&&t.emit("error",e)}function v(){t.removeListener("finish",y),b()}function y(){d("onfinish"),t.removeListener("close",v),b()}function b(){d("unpipe"),n.unpipe(t)}return n.on("data",m),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",g),t.once("close",v),t.once("finish",y),t.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;on)?e=("rmd160"===t?new u:c(t)).update(e).digest():e.lengthn||e!=e)throw new TypeError("Bad key length")}},function(t,e,n){(function(e){var n;if(e.browser)n="utf-8";else if(e.version){n=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";t.exports=n}).call(this,n(18))},function(t,e,n){var r=n(258),i=n(174),o=n(175),a=n(8).Buffer,s=n(261),u=n(262),c=n(264),f=a.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(t,e,n){var s=function(t){function e(e){return o(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?r:e}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=s(e):e.length>>0},e.writeUInt32BE=function(t,e,n){t[0+n]=e>>>24,t[1+n]=e>>>16&255,t[2+n]=e>>>8&255,t[3+n]=255&e},e.ip=function(t,e,n,r){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}n[r+0]=i>>>0,n[r+1]=o>>>0},e.rip=function(t,e,n,r){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},e.pc1=function(t,e,n,r){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},e.r28shl=function(t,e){return t<>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u>>r[u]&1;for(u=s;u>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},e.expand=function(t,e,n){var r=0,i=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[n+0]=r>>>0,e[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(e>>>18-6*r&63)]}return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,n=0;n>>o[n]&1;return e>>>0},e.padSplit=function(t,e,n){for(var r=t.toString(2);r.length>>1];n=o.r28shl(n,s),i=o.r28shl(i,s),o.pc2(n,i,t.keys,a)}},u.prototype._update=function(t,e,n,r){var i=this._desState,a=o.readUInt32BE(t,e),s=o.readUInt32BE(t,e+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(n,a,r),o.writeUInt32BE(n,s,r+4)},u.prototype._pad=function(t,e){for(var n=t.length-e,r=e;r>>0,a=h}o.rip(s,a,r,i)},u.prototype._decrypt=function(t,e,n,r,i){for(var a=n,s=e,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],f=t.keys[u+1];o.expand(a,t.tmp,0),c^=t.tmp[0],f^=t.tmp[1];var l=o.substitute(c,f),h=a;a=(s^o.permute(l))>>>0,s=h}o.rip(a,s,r,i)}},function(t,e,n){var r=n(103),i=n(8).Buffer,o=n(268);function a(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var n=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*n)]);for(var s=0;st;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(u),e.cmp(u)){if(!e.cmp(c))for(;n.mod(f).cmp(l);)n.iadd(d)}else for(;n.mod(o).cmp(h);)n.iadd(d);if(g(p=n.shrn(1))&&g(n)&&v(p)&&v(n)&&a.test(p)&&a.test(n))return n}}},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(589).Buffer}catch(t){}function s(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],d=l[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],M=8191&S,k=S>>>13,E=0|a[5],x=8191&E,A=E>>>13,C=0|a[6],T=8191&C,I=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,j=0|a[8],L=8191&j,N=j>>>13,U=0|a[9],B=8191&U,D=U>>>13,z=0|s[0],F=8191&z,q=z>>>13,K=0|s[1],H=8191&K,W=K>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],$=8191&Y,J=Y>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,q))+Math.imul(h,F)|0))<<13)|0;c=((o=Math.imul(h,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,q))+Math.imul(m,F)|0,o=Math.imul(m,q);var vt=(c+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,F),i=(i=Math.imul(v,q))+Math.imul(y,F)|0,o=Math.imul(y,q),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,q))+Math.imul(_,F)|0,o=Math.imul(_,q),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var bt=(c+(r=r+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,q))+Math.imul(k,F)|0,o=Math.imul(k,q),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,J)|0;var wt=(c+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,F),i=(i=Math.imul(x,q))+Math.imul(A,F)|0,o=Math.imul(A,q),r=r+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(h,nt)|0))<<13)|0;c=((o=o+Math.imul(h,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,q))+Math.imul(I,F)|0,o=Math.imul(I,q),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var St=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(O,F),i=(i=Math.imul(O,q))+Math.imul(R,F)|0,o=Math.imul(R,q),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,J)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(c+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,q))+Math.imul(N,F)|0,o=Math.imul(N,q),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,J)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,q))+Math.imul(D,F)|0,o=Math.imul(D,q),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,W)|0,r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,J)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var Et=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,H),i=(i=Math.imul(B,W))+Math.imul(D,H)|0,o=Math.imul(D,W),r=r+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,J)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,ht)|0;var xt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,G))+Math.imul(D,Z)|0,o=Math.imul(D,G),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,r=r+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var At=(c+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,J))+Math.imul(D,$)|0,o=Math.imul(D,J),r=r+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,ht)|0;var Ct=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(N,nt)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Tt=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(D,nt)|0,o=Math.imul(D,rt),r=r+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,r=r+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ht)|0;var It=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),r=r+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ht)|0;var Pt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ht)|0;var Ot=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,lt),i=(i=Math.imul(B,ht))+Math.imul(D,lt)|0,o=Math.imul(D,ht);var Rt=(c+(r=r+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;c=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var jt=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(D,pt)|0))<<13)|0;return c=((o=Math.imul(D,mt))+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Mt,u[8]=kt,u[9]=Et,u[10]=xt,u[11]=At,u[12]=Ct,u[13]=Tt,u[14]=It,u[15]=Pt,u[16]=Ot,u[17]=Rt,u[18]=jt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,l);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0==(n.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var l=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,S),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(60)(t))},function(t,e,n){var r=n(590),i=n(181);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),n=Math.ceil(e/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var n=e.sub(t);return t.add(this._randbelow(n))},o.prototype.test=function(t,e,n){var i=t.bitLength(),o=r.mont(t),a=new r(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var c=t.shrn(u),f=s.toRed(o);e>0;e--){var l=this._randrange(new r(2),s);n&&n(l);var h=l.toRed(o).redPow(c);if(0!==h.cmp(a)&&0!==h.cmp(f)){for(var d=1;d0;e--){var f=this._randrange(new r(2),a),l=t.gcd(f);if(0!==l.cmpn(1))return l;var h=f.toRed(i).redPow(u);if(0!==h.cmp(o)&&0!==h.cmp(c)){for(var d=1;d0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),r)a.endEmitted?S(t,new _):A(t,a,e,!0);else if(a.ended)S(t,new b);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?A(t,a,e,!1):P(t,a)):A(t,a,e,!1)}else r||(a.reading=!1,P(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,N(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(O,t,e))}function O(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function j(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function U(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):n=e.buffer.consume(t,e.decoder),n);var n}function B(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(D,e,t))}function D(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var n=e._writableState;(!n||n.autoDestroy&&n.finished)&&e.destroy()}}function z(t,e){for(var n=0,r=t.length;n=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):T(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&B(this),null;var r,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t0?U(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&B(this)),null!==r&&this.emit("data",r),r},E.prototype._read=function(t){S(this,new w("_read()"))},E.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var a=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:g;function s(e,r){c("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",f),t.removeListener("error",d),t.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",g),n.removeListener("data",h),l=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function u(){c("onend"),t.end()}i.endEmitted?r.nextTick(a):n.once("end",a),t.on("unpipe",s);var f=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,N(t))}}(n);t.on("drain",f);var l=!1;function h(e){c("ondata");var r=t.write(e);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==z(i.pipes,t))&&!l&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(e){c("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&S(t,e)}function p(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),t},E.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?T(this):i.reading||r.nextTick(j,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(t,e){var n=a.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(R,this),n},E.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(R,this),e},E.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(L,t,e))}(this,t)),t.paused=!1,this},E.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(t,e,n){n(new m("_write()"))},E.prototype._writev=null,E.prototype.end=function(t,e,n){var i=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),E.prototype.destroy=l.destroy,E.prototype._undestroy=l.undestroy,E.prototype._destroy=function(t,e){e(t)}}).call(this,n(23),n(18))},function(t,e,n){"use strict";t.exports=f;var r=n(88).codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,o=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=r.ERR_TRANSFORM_WITH_LENGTH_0,u=n(89);function c(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length>8,a=255&i;o?n.push(o,a):n.push(a)}return n},r.zero2=i,r.toHex=o,r.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,n){"use strict";var r=e;r.base=n(129),r.short=n(608),r.mont=n(609),r.edwards=n(610)},function(t,e,n){"use strict";var r=n(48).rotr32;function i(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function a(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?a(e,n,r):2===t?o(e,n,r):void 0},e.ch32=i,e.maj32=o,e.p32=a,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},function(t,e,n){"use strict";var r=n(48),i=n(104),o=n(283),a=n(34),s=r.sum32,u=r.sum32_4,c=r.sum32_5,f=o.ch32,l=o.maj32,h=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,v=[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 y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}r.inherits(y,g),t.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function u(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=6)i=s(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=s(t,e,n+6),this.words[r]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,s=Math.min(o,o-a)+n,c=0,f=n;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;n.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,u=0|f}return 0!==u?n.words[c]=0|u:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+n:u+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],d=l[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?m+n:c[h-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,u="le"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;nt.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;rt.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o>>26;for(;0!==i&&o>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,g=0|a[2],v=8191&g,y=g>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],M=8191&S,k=S>>>13,E=0|a[5],x=8191&E,A=E>>>13,C=0|a[6],T=8191&C,I=C>>>13,P=0|a[7],O=8191&P,R=P>>>13,j=0|a[8],L=8191&j,N=j>>>13,U=0|a[9],B=8191&U,D=U>>>13,z=0|s[0],F=8191&z,q=z>>>13,K=0|s[1],H=8191&K,W=K>>>13,V=0|s[2],Z=8191&V,G=V>>>13,Y=0|s[3],$=8191&Y,J=Y>>>13,X=0|s[4],Q=8191&X,tt=X>>>13,et=0|s[5],nt=8191&et,rt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var gt=(c+(r=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,q))+Math.imul(h,F)|0))<<13)|0;c=((o=Math.imul(h,q))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(p,F),i=(i=Math.imul(p,q))+Math.imul(m,F)|0,o=Math.imul(m,q);var vt=(c+(r=r+Math.imul(l,H)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,H)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(v,F),i=(i=Math.imul(v,q))+Math.imul(y,F)|0,o=Math.imul(y,q),r=r+Math.imul(p,H)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,H)|0,o=o+Math.imul(m,W)|0;var yt=(c+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(w,F),i=(i=Math.imul(w,q))+Math.imul(_,F)|0,o=Math.imul(_,q),r=r+Math.imul(v,H)|0,i=(i=i+Math.imul(v,W)|0)+Math.imul(y,H)|0,o=o+Math.imul(y,W)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Z)|0,o=o+Math.imul(m,G)|0;var bt=(c+(r=r+Math.imul(l,$)|0)|0)+((8191&(i=(i=i+Math.imul(l,J)|0)+Math.imul(h,$)|0))<<13)|0;c=((o=o+Math.imul(h,J)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(M,F),i=(i=Math.imul(M,q))+Math.imul(k,F)|0,o=Math.imul(k,q),r=r+Math.imul(w,H)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,H)|0,o=o+Math.imul(_,W)|0,r=r+Math.imul(v,Z)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,Z)|0,o=o+Math.imul(y,G)|0,r=r+Math.imul(p,$)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,J)|0;var wt=(c+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(x,F),i=(i=Math.imul(x,q))+Math.imul(A,F)|0,o=Math.imul(A,q),r=r+Math.imul(M,H)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(k,H)|0,o=o+Math.imul(k,W)|0,r=r+Math.imul(w,Z)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Z)|0,o=o+Math.imul(_,G)|0,r=r+Math.imul(v,$)|0,i=(i=i+Math.imul(v,J)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(h,nt)|0))<<13)|0;c=((o=o+Math.imul(h,rt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(T,F),i=(i=Math.imul(T,q))+Math.imul(I,F)|0,o=Math.imul(I,q),r=r+Math.imul(x,H)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(A,H)|0,o=o+Math.imul(A,W)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,G)|0,r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,J)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,J)|0,r=r+Math.imul(v,Q)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(m,nt)|0,o=o+Math.imul(m,rt)|0;var St=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(O,F),i=(i=Math.imul(O,q))+Math.imul(R,F)|0,o=Math.imul(R,q),r=r+Math.imul(T,H)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(I,H)|0,o=o+Math.imul(I,W)|0,r=r+Math.imul(x,Z)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(A,Z)|0,o=o+Math.imul(A,G)|0,r=r+Math.imul(M,$)|0,i=(i=i+Math.imul(M,J)|0)+Math.imul(k,$)|0,o=o+Math.imul(k,J)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,r=r+Math.imul(v,nt)|0,i=(i=i+Math.imul(v,rt)|0)+Math.imul(y,nt)|0,o=o+Math.imul(y,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var Mt=(c+(r=r+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(L,F),i=(i=Math.imul(L,q))+Math.imul(N,F)|0,o=Math.imul(N,q),r=r+Math.imul(O,H)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(R,H)|0,o=o+Math.imul(R,W)|0,r=r+Math.imul(T,Z)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(x,$)|0,i=(i=i+Math.imul(x,J)|0)+Math.imul(A,$)|0,o=o+Math.imul(A,J)|0,r=r+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(_,nt)|0,o=o+Math.imul(_,rt)|0,r=r+Math.imul(v,ot)|0,i=(i=i+Math.imul(v,at)|0)+Math.imul(y,ot)|0,o=o+Math.imul(y,at)|0,r=r+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var kt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(B,F),i=(i=Math.imul(B,q))+Math.imul(D,F)|0,o=Math.imul(D,q),r=r+Math.imul(L,H)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(N,H)|0,o=o+Math.imul(N,W)|0,r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(R,Z)|0,o=o+Math.imul(R,G)|0,r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,J)|0)+Math.imul(I,$)|0,o=o+Math.imul(I,J)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,r=r+Math.imul(v,ut)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,ut)|0,o=o+Math.imul(y,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var Et=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(B,H),i=(i=Math.imul(B,W))+Math.imul(D,H)|0,o=Math.imul(D,W),r=r+Math.imul(L,Z)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(N,Z)|0,o=o+Math.imul(N,G)|0,r=r+Math.imul(O,$)|0,i=(i=i+Math.imul(O,J)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,J)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(x,nt)|0,i=(i=i+Math.imul(x,rt)|0)+Math.imul(A,nt)|0,o=o+Math.imul(A,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,r=r+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,r=r+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,lt)|0,o=o+Math.imul(y,ht)|0;var xt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(B,Z),i=(i=Math.imul(B,G))+Math.imul(D,Z)|0,o=Math.imul(D,G),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,J)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,r=r+Math.imul(M,ut)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(k,ut)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var At=(c+(r=r+Math.imul(v,pt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,pt)|0))<<13)|0;c=((o=o+Math.imul(y,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(B,$),i=(i=Math.imul(B,J))+Math.imul(D,$)|0,o=Math.imul(D,J),r=r+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(R,nt)|0,o=o+Math.imul(R,rt)|0,r=r+Math.imul(T,ot)|0,i=(i=i+Math.imul(T,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,ht)|0;var Ct=(c+(r=r+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(N,nt)|0,o=o+Math.imul(N,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,at)|0,r=r+Math.imul(T,ut)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(I,ut)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Tt=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(B,nt),i=(i=Math.imul(B,rt))+Math.imul(D,nt)|0,o=Math.imul(D,rt),r=r+Math.imul(L,ot)|0,i=(i=i+Math.imul(L,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,r=r+Math.imul(O,ut)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(R,ut)|0,o=o+Math.imul(R,ct)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ht)|0;var It=(c+(r=r+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(B,ot),i=(i=Math.imul(B,at))+Math.imul(D,ot)|0,o=Math.imul(D,at),r=r+Math.imul(L,ut)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ht)|0;var Pt=(c+(r=r+Math.imul(T,pt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(B,ut),i=(i=Math.imul(B,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ht)|0;var Ot=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(R,pt)|0))<<13)|0;c=((o=o+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(B,lt),i=(i=Math.imul(B,ht))+Math.imul(D,lt)|0,o=Math.imul(D,ht);var Rt=(c+(r=r+Math.imul(L,pt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(N,pt)|0))<<13)|0;c=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863;var jt=(c+(r=Math.imul(B,pt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(D,pt)|0))<<13)|0;return c=((o=Math.imul(D,mt))+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,u[0]=gt,u[1]=vt,u[2]=yt,u[3]=bt,u[4]=wt,u[5]=_t,u[6]=St,u[7]=Mt,u[8]=kt,u[9]=Et,u[10]=xt,u[11]=At,u[12]=Ct,u[13]=Tt,u[14]=It,u[15]=Pt,u[16]=Ot,u[17]=Rt,u[18]=jt,0!==c&&(u[19]=c,n.length++),n};function p(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},m.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},m.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a>>=1)i++;return 1<>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,u=r.length-i.length;if("mod"!==e){(s=new o(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,l);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:s.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,s},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(s),a.isub(u)):(n.isub(e),s.isub(i),u.isub(a))}return{a:s,b:u,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),s=new o(0),u=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,h=1;0==(n.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(n.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(s)):(n.isub(e),s.isub(a))}return(i=0===e.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){ri&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){S.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new b;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},S.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},S.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var s=new o(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();r(g=0;r--){for(var c=e.words[r],f=u-1;f>=0;f--){var l=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++s||0===r&&0===f)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}u=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new M(t)},i(M,S),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(60)(t))},function(t,e,n){"use strict";const r=e;r.der=n(289),r.pem=n(628)},function(t,e,n){"use strict";const r=n(5),i=n(189).Buffer,o=n(190),a=n(192);function s(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.call(this,"der",t)}function c(t){return t<10?"0"+t:t}t.exports=s,s.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},r(u,o),u.prototype._encodeComposite=function(t,e,n,r){const o=function(t,e,n,r){let i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(a.tagByName.hasOwnProperty(t))i=a.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);i=t}if(i>=31)return r.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=a.tagClassByName[n||"universal"]<<6,i}(t,e,n,this.reporter);if(r.length<128){const t=i.alloc(2);return t[0]=o,t[1]=r.length,this._createEncoderBuffer([t,r])}let s=1;for(let t=r.length;t>=256;t>>=8)s++;const u=i.alloc(2+s);u[0]=o,u[1]=128|s;for(let t=1+s,e=r.length;e>0;t--,e>>=8)u[t]=255&e;return this._createEncoderBuffer([u,r])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=i.alloc(2*t.length);for(let n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let r=0;for(let e=0;e=128;n>>=7)r++}const o=i.alloc(r);let a=o.length-1;for(let e=t.length-1;e>=0;e--){let n=t[e];for(o[a--]=127&n;(n>>=7)>0;)o[a--]=128|127&n}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(t,e){let n;const r=new Date(t);return"gentime"===e?n=[c(r.getUTCFullYear()),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?n=[c(r.getUTCFullYear()%100),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(n,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=i.from(e)}if(i.isBuffer(t)){let e=t.length;0===t.length&&e++;const n=i.alloc(e);return t.copy(n),0===t.length&&(n[0]=0),this._createEncoderBuffer(n)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let n=1;for(let e=t;e>=256;e>>=8)n++;const r=new Array(n);for(let e=r.length-1;e>=0;e--)r[e]=255&t,t>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(i.from(r))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,n){const r=this._baseState;let i;if(null===r.default)return!1;const o=t.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,e,n).join()),o.length!==r.defaultBuffer.length)return!1;for(i=0;i>6],i=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=t.readUInt8(e),t.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function l(t,e,n){let r=t.readUInt8(n);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;const i=127&r;if(i>4)return t.error("length octect is too long");r=0;for(let e=0;e>>((3&e)<<3)&255;return i}}},function(t,e){for(var n=[],r=0;r<256;++r)n[r]=(r+256).toString(16).substr(1);t.exports=function(t,e){var r=e||0,i=n;return[i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]]].join("")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sha256=void 0;var r=n(300),i=n(301),o=n(197),a=n(195),s=function(){function t(t){t?(this.operation=function(t){return new Promise((function(e,n){var r=a.locateWindow().msCrypto.subtle.importKey("raw",u(t),i.SHA_256_HMAC_ALGO,!1,["sign"]);r.oncomplete=function(){r.result&&e(r.result),n("ImportKey completed without importing key.")},r.onerror=function(){n("ImportKey failed to import key.")}}))}(t).then((function(t){return a.locateWindow().msCrypto.subtle.sign(i.SHA_256_HMAC_ALGO,t)})),this.operation.catch((function(){}))):this.operation=Promise.resolve(a.locateWindow().msCrypto.subtle.digest("SHA-256"))}return t.prototype.update=function(t){var e=this;r.isEmptyData(t)||(this.operation=this.operation.then((function(n){return n.onerror=function(){e.operation=Promise.reject(new Error("Error encountered updating hash"))},n.process(u(t)),n})),this.operation.catch((function(){})))},t.prototype.digest=function(){return this.operation.then((function(t){return new Promise((function(e,n){t.onerror=function(){n("Error encountered finalizing hash")},t.oncomplete=function(){t.result&&e(new Uint8Array(t.result)),n("Error encountered finalizing hash")},t.finish()}))}))},t}();function u(t){return"string"==typeof t?o.fromUtf8(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}e.Sha256=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isEmptyData=void 0,e.isEmptyData=function(t){return"string"==typeof t?0===t.length:0===t.byteLength}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_DATA_SHA_256=e.SHA_256_HMAC_ALGO=e.SHA_256_HASH=void 0,e.SHA_256_HASH={name:"SHA-256"},e.SHA_256_HMAC_ALGO={name:"HMAC",hash:e.SHA_256_HASH},e.EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85])},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sha256=void 0;var r=n(197),i=n(300),o=n(301),a=n(195),s=function(){function t(t){this.toHash=new Uint8Array(0),void 0!==t&&(this.key=new Promise((function(e,n){a.locateWindow().crypto.subtle.importKey("raw",u(t),o.SHA_256_HMAC_ALGO,!1,["sign"]).then(e,n)})),this.key.catch((function(){})))}return t.prototype.update=function(t){if(!i.isEmptyData(t)){var e=u(t),n=new Uint8Array(this.toHash.byteLength+e.byteLength);n.set(this.toHash,0),n.set(e,this.toHash.byteLength),this.toHash=n}},t.prototype.digest=function(){var t=this;return this.key?this.key.then((function(e){return a.locateWindow().crypto.subtle.sign(o.SHA_256_HMAC_ALGO,e,t.toHash).then((function(t){return new Uint8Array(t)}))})):i.isEmptyData(this.toHash)?Promise.resolve(o.EMPTY_DATA_SHA_256):Promise.resolve().then((function(){return a.locateWindow().crypto.subtle.digest(o.SHA_256_HASH,t.toHash)})).then((function(t){return Promise.resolve(new Uint8Array(t))}))},t}();function u(t){return"string"==typeof t?r.fromUtf8(t):ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(t)}e.Sha256=s},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MAX_HASHABLE_LENGTH=e.INIT=e.KEY=e.DIGEST_LENGTH=e.BLOCK_SIZE=void 0,e.BLOCK_SIZE=64,e.DIGEST_LENGTH=32,e.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),e.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],e.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1},function(t,e,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n=200&&t<300}};u.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(t){u.headers[t]={}})),r.forEach(["post","put","patch"],(function(t){u.headers[t]=r.merge(o)})),t.exports=u}).call(this,n(194))},function(t,e,n){"use strict";var r=n(27),i=n(691),o=n(693),a=n(308),s=n(694),u=n(697),c=n(698),f=n(312);t.exports=function(t){return new Promise((function(e,n){var l=t.data,h=t.headers;r.isFormData(l)&&delete h["Content-Type"];var d=new XMLHttpRequest;if(t.auth){var p=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";h.Authorization="Basic "+btoa(p+":"+m)}var g=s(t.baseURL,t.url);if(d.open(t.method.toUpperCase(),a(g,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d.onreadystatechange=function(){if(d&&4===d.readyState&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var r="getAllResponseHeaders"in d?u(d.getAllResponseHeaders()):null,o={data:t.responseType&&"text"!==t.responseType?d.response:d.responseText,status:d.status,statusText:d.statusText,headers:r,config:t,request:d};i(e,n,o),d=null}},d.onabort=function(){d&&(n(f("Request aborted",t,"ECONNABORTED",d)),d=null)},d.onerror=function(){n(f("Network Error",t,null,d)),d=null},d.ontimeout=function(){var e="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(f(e,t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var v=(t.withCredentials||c(g))&&t.xsrfCookieName?o.read(t.xsrfCookieName):void 0;v&&(h[t.xsrfHeaderName]=v)}if("setRequestHeader"in d&&r.forEach(h,(function(t,e){void 0===l&&"content-type"===e.toLowerCase()?delete h[e]:d.setRequestHeader(e,t)})),r.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then((function(t){d&&(d.abort(),n(t),d=null)})),l||(l=null),d.send(l)}))}},function(t,e,n){"use strict";var r=n(692);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";var r=n(27);t.exports=function(t,e){e=e||{};var n={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function u(t,e){return r.isPlainObject(t)&&r.isPlainObject(e)?r.merge(t,e):r.isPlainObject(e)?r.merge({},e):r.isArray(e)?e.slice():e}function c(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(t[i],e[i])}r.forEach(i,(function(t){r.isUndefined(e[t])||(n[t]=u(void 0,e[t]))})),r.forEach(o,c),r.forEach(a,(function(i){r.isUndefined(e[i])?r.isUndefined(t[i])||(n[i]=u(void 0,t[i])):n[i]=u(void 0,e[i])})),r.forEach(s,(function(r){r in e?n[r]=u(t[r],e[r]):r in t&&(n[r]=u(void 0,t[r]))}));var f=i.concat(o).concat(a).concat(s),l=Object.keys(t).concat(Object.keys(e)).filter((function(t){return-1===f.indexOf(t)}));return r.forEach(l,c),n}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e,n){t.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),r(n(1)),r(n(2)),r(n(3)),r(n(4)),r(n(5)),r(n(6)),r(n(7)),r(n(8)),r(n(9)),r(n(10)),r(n(11)),r(n(12)),r(n(13))},function(t,e,n){t.exports={a:"Anchor__a___1_Iz8"}},function(t,e,n){t.exports={button:"Button__button___vS7Mv",signInButton:"Button__signInButton___3bUH-",googleSignInButton:"Button__googleSignInButton___1YiCu",signInButtonIcon:"Button__signInButtonIcon___ihN75",auth0SignInButton:"Button__auth0SignInButton___znnCj",facebookSignInButton:"Button__facebookSignInButton___34Txh",amazonSignInButton:"Button__amazonSignInButton___2EMtl",oAuthSignInButton:"Button__oAuthSignInButton___3UGOl",signInButtonContent:"Button__signInButtonContent___xqTXJ"}},function(t,e,n){t.exports={formContainer:"Form__formContainer___1GA3x",formSection:"Form__formSection___1PPvW",formField:"Form__formField___38Ikl",formRow:"Form__formRow___2mwRs"}},function(t,e,n){t.exports={hint:"Hint__hint___2XngB"}},function(t,e,n){t.exports={input:"Input__input___3e_bf",inputLabel:"Input__inputLabel___3VF0S",label:"Input__label___23sO8",radio:"Input__radio___2hllK"}},function(t,e,n){t.exports={navBar:"Nav__navBar___xtCFA",navRight:"Nav__navRight___1QG2J",nav:"Nav__nav___2Dx2Y",navItem:"Nav__navItem___1LtFQ"}},function(t,e,n){t.exports={photoPickerButton:"PhotoPicker__photoPickerButton___2XdVn",photoPlaceholder:"PhotoPicker__photoPlaceholder___2JXO4",photoPlaceholderIcon:"PhotoPicker__photoPlaceholderIcon___3Et71"}},function(t,e,n){t.exports={container:"Section__container___3YYTG",actionRow:"Section__actionRow___2LWSU",sectionHeader:"Section__sectionHeader___2djyg",sectionHeaderHint:"Section__sectionHeaderHint___3Wxdc",sectionBody:"Section__sectionBody___ihqqd",sectionHeaderContent:"Section__sectionHeaderContent___1UCqa",sectionFooter:"Section__sectionFooter___1T54C",sectionFooterPrimaryContent:"Section__sectionFooterPrimaryContent___2r9ZX",sectionFooterSecondaryContent:"Section__sectionFooterSecondaryContent___Nj41Q"}},function(t,e,n){t.exports={selectInput:"SelectInput__selectInput___3efO4"}},function(t,e,n){t.exports={strike:"Strike__strike___1XV1b",strikeContent:"Strike__strikeContent___10gLb"}},function(t,e,n){t.exports={toast:"Toast__toast___XXr3v",toastClose:"Toast__toastClose___18lU4"}},function(t,e,n){t.exports={totpQrcode:"Totp__totpQrcode___1crLx"}},function(t,e,n){t.exports={sumerianSceneContainer:"XR__sumerianSceneContainer___3nVMt",sumerianScene:"XR__sumerianScene___2Tt7-",loadingOverlay:"XR__loadingOverlay___IbqcI",loadingContainer:"XR__loadingContainer___2Itxb",loadingLogo:"XR__loadingLogo___Ub7xQ",loadingSceneName:"XR__loadingSceneName___3__ne",loadingBar:"XR__loadingBar___2vcke",loadingBarFill:"XR__loadingBarFill___3M-D9",sceneErrorText:"XR__sceneErrorText___2y0tp",sceneBar:"XR__sceneBar___2ShrP",sceneName:"XR__sceneName___1ApHr",sceneActions:"XR__sceneActions___7plGs",actionButton:"XR__actionButton___2poIM",tooltip:"XR__tooltip___UYyhn",actionIcon:"XR__actionIcon___2qnd2",autoShowTooltip:"XR__autoShowTooltip___V1QH7"}}])},function(t,e,n){"use strict";!function t(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(t){console.error(t)}}}(),t.exports=n(539)},function(t,e,n){"use strict";(function(t){var r;if(n.d(e,"a",(function(){return i})),"undefined"!=typeof window&&window.crypto&&(r=window.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==t&&t.crypto&&(r=t.crypto),!r)try{r=n(545)}catch(t){}function i(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")}}).call(this,n(55))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r={},i=function(){function t(){}return t.setItem=function(t,e){return r[t]=e,r[t]},t.getItem=function(t){return Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0},t.removeItem=function(t){return delete r[t]},t.clear=function(){return r={}},t}(),o=function(){function t(){try{this.storageWindow=window.localStorage,this.storageWindow.setItem("aws.amplify.test-ls",1),this.storageWindow.removeItem("aws.amplify.test-ls")}catch(t){this.storageWindow=i}}return t.prototype.getStorage=function(){return this.storageWindow},t}()},function(t,e,n){var r=n(651),i=n(652),o=i;o.v1=r,o.v4=i,t.exports=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var r=function(t){return"function"==typeof ArrayBuffer&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(t)}},function(t,e,n){"use strict";var r=n(306),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function u(t){return r.isMemo(t)?a:s[t.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,n,r){if("string"!=typeof n){if(p){var i=d(n);i&&i!==p&&t(e,i,r)}var a=f(n);l&&(a=a.concat(l(n)));for(var s=u(e),m=u(n),g=0;g>2,s=(3&e)<<4|n>>4,u=1>6:64,c=2>4,n=(15&a)<<4|(s=o.indexOf(t.charAt(c++)))>>2,r=(3&s)<<6|(u=o.indexOf(t.charAt(c++))),h[f++]=e,64!==s&&(h[f++]=n),64!==u&&(h[f++]=r);return h}},{"./support":30,"./utils":32}],2:[function(t,e,n){"use strict";var r=t("./external"),i=t("./stream/DataWorker"),o=t("./stream/DataLengthProbe"),a=t("./stream/Crc32Probe");function s(t,e,n,r,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=n,this.compression=r,this.compressedContent=i}o=t("./stream/DataLengthProbe"),s.prototype={getContentWorker:function(){var t=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,n){return t.pipe(new a).pipe(new o("uncompressedSize")).pipe(e.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,n){"use strict";var r=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(t){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,n){"use strict";var r=t("./utils"),i=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==r.getTypeOf(t)?function(t,e,n,r){var o=i,a=0+n;t^=-1;for(var s=0;s>>8^o[255&(t^e[s])];return-1^t}(0|e,t,t.length):function(t,e,n,r){var o=i,a=0+n;t^=-1;for(var s=0;s>>8^o[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,e,n){"use strict";var r;r="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:r}},{lie:37}],7:[function(t,e,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),s=r?"uint8array":"array";function u(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}n.magic="\b\0",o.inherits(u,a),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,t.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},n.compressWorker=function(t){return new u("Deflate",t)},n.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,n){"use strict";function r(t,e){var n,r="";for(n=0;n>>=8;return r}function i(t,e,n,i,a,f){var l,h,d=t.file,p=t.compression,m=f!==s.utf8encode,g=o.transformTo("string",f(d.name)),v=o.transformTo("string",s.utf8encode(d.name)),y=d.comment,b=o.transformTo("string",f(y)),w=o.transformTo("string",s.utf8encode(y)),_=v.length!==d.name.length,S=w.length!==y.length,M="",k="",E="",x=d.dir,A=d.date,C={crc32:0,compressedSize:0,uncompressedSize:0};e&&!n||(C.crc32=t.crc32,C.compressedSize=t.compressedSize,C.uncompressedSize=t.uncompressedSize);var T=0;e&&(T|=8),m||!_&&!S||(T|=2048);var I=0,P=0;x&&(I|=16),"UNIX"===a?(P=798,I|=function(t,e){var n=t;return t||(n=e?16893:33204),(65535&n)<<16}(d.unixPermissions,x)):(P=20,I|=function(t){return 63&(t||0)}(d.dosPermissions)),l=A.getUTCHours(),l<<=6,l|=A.getUTCMinutes(),l<<=5,l|=A.getUTCSeconds()/2,h=A.getUTCFullYear()-1980,h<<=4,h|=A.getUTCMonth()+1,h<<=5,h|=A.getUTCDate(),_&&(k=r(1,1)+r(u(g),4)+v,M+="up"+r(k.length,2)+k),S&&(E=r(1,1)+r(u(b),4)+w,M+="uc"+r(E.length,2)+E);var O="";return O+="\n\0",O+=r(T,2),O+=p.magic,O+=r(l,2),O+=r(h,2),O+=r(C.crc32,4),O+=r(C.compressedSize,4),O+=r(C.uncompressedSize,4),O+=r(g.length,2),O+=r(M.length,2),{fileRecord:c.LOCAL_FILE_HEADER+O+g+M,dirRecord:c.CENTRAL_FILE_HEADER+r(P,2)+O+r(b.length,2)+"\0\0\0\0"+r(I,4)+r(i,4)+g+M+b}}var o=t("../utils"),a=t("../stream/GenericWorker"),s=t("../utf8"),u=t("../crc32"),c=t("../signature");function f(t,e,n,r){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(f,a),f.prototype.push=function(t){var e=t.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:n?(e+100*(n-r-1))/n:100}}))},f.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var n=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},f.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,n=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),e)this.push({data:function(t){return c.DATA_DESCRIPTOR+r(t.crc32,4)+r(t.compressedSize,4)+r(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},f.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)n=(n<<8)+this.byteAt(e);return this.index+=t,n},readString:function(t){return r.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,n){"use strict";var r=t("./Uint8ArrayReader");function i(t){r.call(this,t)}t("../utils").inherits(i,r),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,n){"use strict";var r=t("./DataReader");function i(t){r.call(this,t)}t("../utils").inherits(i,r),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,n){"use strict";var r=t("./ArrayReader");function i(t){r.call(this,t)}t("../utils").inherits(i,r),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,n){"use strict";var r=t("../utils"),i=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),s=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=r.getTypeOf(t);return r.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new s(t):i.uint8array?new u(r.transformTo("uint8array",t)):new o(r.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,n){"use strict";var r=t("./GenericWorker"),i=t("../utils");function o(t){r.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(o,r),o.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,n){"use strict";var r=t("./GenericWorker"),i=t("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,r),o.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,n){"use strict";var r=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}r.inherits(o,i),o.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,n){"use strict";var r=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=r.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,n){"use strict";function r(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var n=0;n "+t:t}},e.exports=r},{}],29:[function(t,n,r){"use strict";var i=t("../utils"),o=t("./ConvertWorker"),a=t("./GenericWorker"),s=t("../base64"),u=t("../support"),c=t("../external"),f=null;if(u.nodestream)try{f=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function l(t,e,n){var r=e;switch(e){case"blob":case"arraybuffer":r="uint8array";break;case"base64":r="string"}try{this._internalType=r,this._outputType=e,this._mimeType=n,i.checkSupport(r),this._worker=t.pipe(new o(r)),t.lock()}catch(t){this._worker=new a("error"),this._worker.error(t)}}l.prototype={accumulate:function(t){return function(t,n){return new c.Promise((function(r,o){var a=[],u=t._internalType,c=t._outputType,f=t._mimeType;t.on("data",(function(t,e){a.push(t),n&&n(e)})).on("error",(function(t){a=[],o(t)})).on("end",(function(){try{var t=function(t,e,n){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),n);case"base64":return s.encode(e);default:return i.transformTo(t,e)}}(c,function(t,n){var r,i=0,o=null,a=0;for(r=0;r>>6:(n<65536?e[a++]=224|n>>>12:(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63),e[a++]=128|n>>>6&63),e[a++]=128|63&n);return e}(t)},n.utf8decode=function(t){return i.nodebuffer?r.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,n,i,o,a=t.length,u=new Array(2*a);for(e=n=0;e>10&1023,u[n++]=56320|1023&i)}return u.length!==n&&(u.subarray?u=u.subarray(0,n):u.length=n),r.applyFromCharCode(u)}(t=r.transformTo(i.uint8array?"uint8array":"array",t))},r.inherits(c,a),c.prototype.processChunk=function(t){var e=r.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var a=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+s[t[n]]>e?n:e}(e),u=e;a!==e.length&&(i.uint8array?(u=e.subarray(0,a),this.leftOver=e.subarray(a,e.length)):(u=e.slice(0,a),this.leftOver=e.slice(a,e.length))),this.push({data:n.utf8decode(u),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,r.inherits(f,a),f.prototype.processChunk=function(t){this.push({data:n.utf8encode(t.data),meta:t.meta})},n.Utf8EncodeWorker=f},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var r=t("./support"),i=t("./base64"),o=t("./nodejsUtils"),a=t("set-immediate-shim"),s=t("./external");function u(t){return t}function c(t,e){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,n,r,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(n<65536?e[a++]=224|n>>>12:(e[a++]=240|n>>>18,e[a++]=128|n>>>12&63),e[a++]=128|n>>>6&63),e[a++]=128|63&n);return e},n.buf2binstring=function(t){return u(t,t.length)},n.binstring2buf=function(t){for(var e=new r.Buf8(t.length),n=0,i=e.length;n>10&1023,c[r++]=56320|1023&i)}return u(c,r)},n.utf8border=function(t,e){var n;for((e=e||t.length)>t.length&&(e=t.length),n=e-1;0<=n&&128==(192&t[n]);)n--;return n<0||0===n?e:n+a[t[n]]>e?n:e}},{"./common":41}],43:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e,n,i){var o=r,a=i+n;t^=-1;for(var s=i;s>>8^o[255&(t^e[s])];return-1^t}},{}],46:[function(t,e,n){"use strict";var r,i=t("../utils/common"),o=t("./trees"),a=t("./adler32"),s=t("./crc32"),u=t("./messages"),c=-2,f=258,l=262,h=113;function d(t,e){return t.msg=u[e],e}function p(t){return(t<<1)-(4t.avail_out&&(n=t.avail_out),0!==n&&(i.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function v(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,g(t.strm)}function y(t,e){t.pending_buf[t.pending++]=e}function b(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var n,r,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-l?t.strstart-(t.w_size-l):0,c=t.window,h=t.w_mask,d=t.prev,p=t.strstart+f,m=c[o+a-1],g=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(n=e)+a]===g&&c[n+a-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&ou&&0!=--i);return a<=t.lookahead?a:t.lookahead}function _(t){var e,n,r,o,u,c,f,h,d,p,m=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-l)){for(i.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=n=t.hash_size;r=t.head[--e],t.head[e]=m<=r?r-m:0,--n;);for(e=n=m;r=t.prev[--e],t.prev[e]=m<=r?r-m:0,--n;);o+=m}if(0===t.strm.avail_in)break;if(c=t.strm,f=t.window,h=t.strstart+t.lookahead,p=void 0,(d=o)<(p=c.avail_in)&&(p=d),n=0===p?0:(c.avail_in-=p,i.arraySet(f,c.input,c.next_in,p,h),1===c.state.wrap?c.adler=a(c.adler,f,p,h):2===c.state.wrap&&(c.adler=s(c.adler,f,p,h)),c.next_in+=p,c.total_in+=p,p),t.lookahead+=n,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(r=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-3,r=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(_(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,v(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-l&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(v(t,!1),t.strm.avail_out),1)})),new k(4,4,8,4,S),new k(4,5,16,8,S),new k(4,6,32,32,S),new k(4,4,16,16,M),new k(8,16,32,32,M),new k(8,16,128,128,M),new k(8,32,128,256,M),new k(32,128,258,1024,M),new k(32,258,258,4096,M)],n.deflateInit=function(t,e){return C(t,e,8,15,8,0)},n.deflateInit2=C,n.deflateReset=A,n.deflateResetKeep=x,n.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},n.deflate=function(t,e){var n,i,a,u;if(!t||!t.state||5>8&255),y(i,i.gzhead.time>>16&255),y(i,i.gzhead.time>>24&255),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(y(i,255&i.gzhead.extra.length),y(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(y(i,0),y(i,0),y(i,0),y(i,0),y(i,0),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,3),i.status=h);else{var l=8+(i.w_bits-8<<4)<<8;l|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(l|=32),l+=31-l%31,i.status=h,b(i,l),0!==i.strstart&&(b(i,t.adler>>>16),b(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending!==i.pending_buf_size));)y(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&g(t),i.pending+2<=i.pending_buf_size&&(y(i,255&t.adler),y(i,t.adler>>8&255),t.adler=0,i.status=h)):i.status=h),0!==i.pending){if(g(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(n)&&4!==e)return d(t,-5);if(666===i.status&&0!==t.avail_in)return d(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var w=2===i.strategy?function(t,e){for(var n;;){if(0===t.lookahead&&(_(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var n,r,i,a,s=t.window;;){if(t.lookahead<=f){if(_(t),t.lookahead<=f&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(n=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(v(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(v(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(v(t,!1),0===t.strm.avail_out)?1:2}(i,e):r[i.level].func(i,e);if(3!==w&&4!==w||(i.status=666),1===w||3===w)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),g(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(y(i,255&t.adler),y(i,t.adler>>8&255),y(i,t.adler>>16&255),y(i,t.adler>>24&255),y(i,255&t.total_in),y(i,t.total_in>>8&255),y(i,t.total_in>>16&255),y(i,t.total_in>>24&255)):(b(i,t.adler>>>16),b(i,65535&t.adler)),g(t),0=n.w_size&&(0===s&&(m(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new i.Buf8(n.w_size),i.arraySet(h,e,d-n.w_size,n.w_size,0),e=h,d=n.w_size),u=t.avail_in,f=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,_(n);n.lookahead>=3;){for(r=n.strstart,o=n.lookahead-2;n.ins_h=(n.ins_h<>>=w=b>>>24,p-=w,0==(w=b>>>16&255))x[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(d&(1<>>=w,p-=w),p<15&&(d+=E[r++]<>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=g[(65535&b)+(d&(1<>>=w,p-=w,(w=o-a)>3,d&=(1<<(p-=_<<3))-1,t.next_in=r,t.next_out=o,t.avail_in=r>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function f(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new r.Buf32(852),e.distcode=e.distdyn=new r.Buf32(592),e.sane=1,e.back=-1,0):u}function h(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,l(t)):u}function d(t,e){var n,r;return t&&t.state?(r=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=a.wsize?(r.arraySet(a.window,e,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),r.arraySet(a.window,e,n-i,o,a.wnext),(i-=o)?(r.arraySet(a.window,e,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=o(n.check,N,2,0),v=g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",n.mode=30;break}if(8!=(15&g)){t.msg="unknown compression method",n.mode=30;break}if(v-=4,P=8+(15&(g>>>=4)),0===n.wbits)n.wbits=P;else if(P>n.wbits){t.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,n.check=o(n.check,N,2,0)),v=g=0,n.mode=3;case 3:for(;v<32;){if(0===p)break t;p--,g+=f[h++]<>>8&255,N[2]=g>>>16&255,N[3]=g>>>24&255,n.check=o(n.check,N,4,0)),v=g=0,n.mode=4;case 4:for(;v<16;){if(0===p)break t;p--,g+=f[h++]<>8),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,n.check=o(n.check,N,2,0)),v=g=0,n.mode=5;case 5:if(1024&n.flags){for(;v<16;){if(0===p)break t;p--,g+=f[h++]<>>8&255,n.check=o(n.check,N,2,0)),v=g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(p<(S=n.length)&&(S=p),S&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,f,h,S,P)),512&n.flags&&(n.check=o(n.check,f,S,h)),p-=S,h+=S,n.length-=S),n.length))break t;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===p)break t;for(S=0;P=f[h+S++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P)),P&&S>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=12;break;case 10:for(;v<32;){if(0===p)break t;p--,g+=f[h++]<>>=7&v,v-=7&v,n.mode=27;break}for(;v<3;){if(0===p)break t;p--,g+=f[h++]<>>=1)){case 0:n.mode=14;break;case 1:if(y(n),n.mode=20,6!==e)break;g>>>=2,v-=2;break t;case 2:n.mode=17;break;case 3:t.msg="invalid block type",n.mode=30}g>>>=2,v-=2;break;case 14:for(g>>>=7&v,v-=7&v;v<32;){if(0===p)break t;p--,g+=f[h++]<>>16^65535)){t.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&g,v=g=0,n.mode=15,6===e)break t;case 15:n.mode=16;case 16:if(S=n.length){if(p>>=5,v-=5,n.ndist=1+(31&g),g>>>=5,v-=5,n.ncode=4+(15&g),g>>>=4,v-=4,286>>=3,v-=3}for(;n.have<19;)n.lens[U[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,R={bits:n.lenbits},O=s(0,n.lens,0,19,n.lencode,0,n.work,R),n.lenbits=R.bits,O){t.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,A=65535&L,!((E=L>>>24)<=v);){if(0===p)break t;p--,g+=f[h++]<>>=E,v-=E,n.lens[n.have++]=A;else{if(16===A){for(j=E+2;v>>=E,v-=E,0===n.have){t.msg="invalid bit length repeat",n.mode=30;break}P=n.lens[n.have-1],S=3+(3&g),g>>>=2,v-=2}else if(17===A){for(j=E+3;v>>=E)),g>>>=3,v-=3}else{for(j=E+7;v>>=E)),g>>>=7,v-=7}if(n.have+S>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=30;break}for(;S--;)n.lens[n.have++]=P}}if(30===n.mode)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,R={bits:n.lenbits},O=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,R),n.lenbits=R.bits,O){t.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,R={bits:n.distbits},O=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,R),n.distbits=R.bits,O){t.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===e)break t;case 20:n.mode=21;case 21:if(6<=p&&258<=m){t.next_out=d,t.avail_out=m,t.next_in=h,t.avail_in=p,n.hold=g,n.bits=v,a(t,_),d=t.next_out,l=t.output,m=t.avail_out,h=t.next_in,f=t.input,p=t.avail_in,g=n.hold,v=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;x=(L=n.lencode[g&(1<>>16&255,A=65535&L,!((E=L>>>24)<=v);){if(0===p)break t;p--,g+=f[h++]<>C)])>>>16&255,A=65535&L,!(C+(E=L>>>24)<=v);){if(0===p)break t;p--,g+=f[h++]<>>=C,v-=C,n.back+=C}if(g>>>=E,v-=E,n.back+=E,n.length=A,0===x){n.mode=26;break}if(32&x){n.back=-1,n.mode=12;break}if(64&x){t.msg="invalid literal/length code",n.mode=30;break}n.extra=15&x,n.mode=22;case 22:if(n.extra){for(j=n.extra;v>>=n.extra,v-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;x=(L=n.distcode[g&(1<>>16&255,A=65535&L,!((E=L>>>24)<=v);){if(0===p)break t;p--,g+=f[h++]<>C)])>>>16&255,A=65535&L,!(C+(E=L>>>24)<=v);){if(0===p)break t;p--,g+=f[h++]<>>=C,v-=C,n.back+=C}if(g>>>=E,v-=E,n.back+=E,64&x){t.msg="invalid distance code",n.mode=30;break}n.offset=A,n.extra=15&x,n.mode=24;case 24:if(n.extra){for(j=n.extra;v>>=n.extra,v-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===m)break t;if(S=_-m,n.offset>S){if((S=n.offset-S)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=30;break}M=S>n.wnext?(S-=n.wnext,n.wsize-S):n.wnext-S,S>n.length&&(S=n.length),k=n.window}else k=l,M=d-n.offset,S=n.length;for(my?(w=U[B+l[k]],R[j+l[k]]):(w=96,0),d=1<>T)+(p-=d)]=b<<24|w<<16|_|0,0!==p;);for(d=1<>=1;if(0!==d?(O&=d-1,O+=d):O=0,k++,0==--L[M]){if(M===x)break;M=e[n+l[k]]}if(A>>7)]}function E(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function x(t,e,n){t.bi_valid>16-n?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=n-16):(t.bi_buf|=e<>>=1,n<<=1,0<--e;);return n>>>1}function T(t,e,n){var r,i,o=new Array(16),a=0;for(r=1;r<=u;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=C(o[s]++,s))}}function I(t){var e;for(e=0;e>1;1<=n;n--)R(t,o,n);for(i=c;n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(t,o,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,o[2*i]=o[2*n]+o[2*r],t.depth[i]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,o[2*n+1]=o[2*r+1]=i,t.heap[1]=i++,R(t,o,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,r,i,o,a,s,c=e.dyn_tree,f=e.max_code,l=e.stat_desc.static_tree,h=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(o=0;o<=u;o++)t.bl_count[o]=0;for(c[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<573;n++)m<(o=c[2*c[2*(r=t.heap[n])+1]+1]+1)&&(o=m,g++),c[2*r+1]=o,f>=7;r>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e>>3,(a=t.static_len+3+7>>>3)<=i&&(i=a)):i=a=n+5,n+4<=i&&-1!==e?D(t,e,n,r):4===t.strategy||a===i?(x(t,2+(r?1:0),3),j(t,d,p)):(x(t,4+(r?1:0),3),function(t,e,n,r){var i;for(x(t,e-257,5),x(t,n-1,5),x(t,r-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(g[n]+o+1)]++,t.dyn_dtree[2*k(e)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){x(t,2,3),A(t,256,d),function(t){16===t.bi_valid?(E(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){"use strict";e.exports="function"==typeof r?r:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}).call(this,n(673).Buffer,n(55),n(677).setImmediate)},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(64),i=n(28),o=n(37),a=function(){function t(){this._logger=new r.a("ServiceWorker")}return Object.defineProperty(t.prototype,"serviceWorker",{get:function(){return this._serviceWorker},enumerable:!0,configurable:!0}),t.prototype.register=function(t,e){var n=this;return void 0===t&&(t="/service-worker.js"),void 0===e&&(e="/"),this._logger.debug("registering "+t),this._logger.debug("registering service worker with scope "+e),new Promise((function(r,i){if(!navigator||!("serviceWorker"in navigator))return i(new Error("Service Worker not available"));navigator.serviceWorker.register(t,{scope:e}).then((function(t){return t.installing?n._serviceWorker=t.installing:t.waiting?n._serviceWorker=t.waiting:t.active&&(n._serviceWorker=t.active),n._registration=t,n._setupListeners(),n._logger.debug("Service Worker Registration Success: "+t),r(t)})).catch((function(t){return n._logger.debug("Service Worker Registration Failed "+t),i(t)}))}))},t.prototype.enablePush=function(t){var e=this;if(!this._registration)throw new Error("Service Worker not registered");return this._publicKey=t,new Promise((function(n,r){if(!Object(i.b)().isBrowser)return r(new Error("Service Worker not available"));e._registration.pushManager.getSubscription().then((function(r){if(!r)return e._logger.debug("User is NOT subscribed to push"),e._registration.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:e._urlB64ToUint8Array(t)}).then((function(t){e._subscription=t,e._logger.debug("User subscribed: "+JSON.stringify(t)),n(t)})).catch((function(t){e._logger.error(t)}));e._subscription=r,e._logger.debug("User is subscribed to push: "+JSON.stringify(r)),n(r)}))}))},t.prototype._urlB64ToUint8Array=function(t){for(var e=(t+"=".repeat((4-t.length%4)%4)).replace(/\-/g,"+").replace(/_/g,"/"),n=window.atob(e),r=new Uint8Array(n.length),i=0;i=0&&this.changeListeners.splice(e,1)},t}(),m=n(28),g=Object(m.b)().isBrowser,v=function(){function t(t){void 0===t&&(t={}),this.cookies=new p,this.store=g?window.localStorage:Object.create(null),this.cookies=t.req?new p(t.req.headers.cookie):new p,Object.assign(this.store,this.cookies.getAll())}return Object.defineProperty(t.prototype,"length",{get:function(){return Object.entries(this.store).length},enumerable:!0,configurable:!0}),t.prototype.clear=function(){var t=this;Array.from(new Array(this.length)).map((function(e,n){return t.key(n)})).forEach((function(e){return t.removeItem(e)}))},t.prototype.getItem=function(t){return this.getLocalItem(t)},t.prototype.getLocalItem=function(t){return Object.prototype.hasOwnProperty.call(this.store,t)?this.store[t]:null},t.prototype.getUniversalItem=function(t){return this.cookies.get(t)},t.prototype.key=function(t){return Object.keys(this.store)[t]},t.prototype.removeItem=function(t){this.removeLocalItem(t),this.removeUniversalItem(t)},t.prototype.removeLocalItem=function(t){delete this.store[t]},t.prototype.removeUniversalItem=function(t){this.cookies.remove(t,{path:"/"})},t.prototype.setItem=function(t,e){switch(this.setLocalItem(t,e),t.split(".").pop()){case"LastAuthUser":case"accessToken":case"idToken":this.setUniversalItem(t,e)}},t.prototype.setLocalItem=function(t,e){this.store[t]=e},t.prototype.setUniversalItem=function(t,e){this.cookies.set(t,e,{path:"/",sameSite:!0,secure:"localhost"!==window.location.hostname})},t}(),y=n(318);var b=n(37),w=function(){function t(t){var e=t||{},n=e.ValidationData,r=e.Username,i=e.Password,o=e.AuthParameters,a=e.ClientMetadata;this.validationData=n||{},this.authParameters=o||{},this.clientMetadata=a||{},this.username=r,this.password=i}var e=t.prototype;return e.getUsername=function(){return this.username},e.getPassword=function(){return this.password},e.getValidationData=function(){return this.validationData},e.getAuthParameters=function(){return this.authParameters},e.getClientMetadata=function(){return this.clientMetadata},t}(),_=n(6),S=n(21),M=n.n(S),k=(n(243),n(107)),E=n.n(k),x=n(91),A=n.n(x),C=n(317); /*! * Copyright 2016 Amazon.com, * Inc. or its affiliates. All Rights Reserved. * * Licensed under the Amazon Software License (the "License"). * You may not use this file except in compliance with the * License. A copy of the License is located at * * http://aws.amazon.com/asl/ * * or in the "license" file accompanying this file. This file is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, express or implied. See the License * for the specific language governing permissions and * limitations under the License. */var T,I=function(){function t(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length}var e=t.prototype;return e.random=function(e){for(var n=[],r=0;r>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")}(this)},t}(),P=O;function O(t,e){null!=t&&this.fromString(t,e)}function R(){return new O(null)}var j="undefined"!=typeof navigator;j&&"Microsoft Internet Explorer"==navigator.appName?(O.prototype.am=function(t,e,n,r,i,o){for(var a=32767&e,s=e>>15;--o>=0;){var u=32767&this[t],c=this[t++]>>15,f=s*u+c*a;i=((u=a*u+((32767&f)<<15)+n[r]+(1073741823&i))>>>30)+(f>>>15)+s*c+(i>>>30),n[r++]=1073741823&u}return i},T=30):j&&"Netscape"!=navigator.appName?(O.prototype.am=function(t,e,n,r,i,o){for(;--o>=0;){var a=e*this[t++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i},T=26):(O.prototype.am=function(t,e,n,r,i,o){for(var a=16383&e,s=e>>14;--o>=0;){var u=16383&this[t],c=this[t++]>>14,f=s*u+c*a;i=((u=a*u+((16383&f)<<14)+n[r]+i)>>28)+(f>>14)+s*c,n[r++]=268435455&u}return i},T=28),O.prototype.DB=T,O.prototype.DM=(1<>>16)&&(t=e,n+=16),0!=(e=t>>8)&&(t=e,n+=8),0!=(e=t>>4)&&(t=e,n+=4),0!=(e=t>>2)&&(t=e,n+=2),0!=(e=t>>1)&&(t=e,n+=1),n}function q(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},q.prototype.revert=function(t){var e=R();return t.copyTo(e),this.reduce(e),e},q.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[n=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[n]>=t.DV;)t[n]-=t.DV,t[++n]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},q.prototype.mulTo=function(t,e,n){t.multiplyTo(e,n),this.reduce(n)},q.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},O.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},O.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},O.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");n=2}this.t=0,this.s=0;for(var r=t.length,i=!1,o=0;--r>=0;){var a=D(t,r);a<0?"-"==t.charAt(r)&&(i=!0):(i=!1,0==o?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<>this.DB-o):this[this.t-1]|=a<=this.DB&&(o-=this.DB))}this.clamp(),i&&O.ZERO.subTo(this,this)},O.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},O.prototype.dlShiftTo=function(t,e){var n;for(n=this.t-1;n>=0;--n)e[n+t]=this[n];for(n=t-1;n>=0;--n)e[n]=0;e.t=this.t+t,e.s=this.s},O.prototype.drShiftTo=function(t,e){for(var n=t;n=0;--n)e[n+a+1]=this[n]>>i|s,s=(this[n]&o)<=0;--n)e[n]=0;e[a]=s,e.t=this.t+a+1,e.s=this.s,e.clamp()},O.prototype.rShiftTo=function(t,e){e.s=this.s;var n=Math.floor(t/this.DB);if(n>=this.t)e.t=0;else{var r=t%this.DB,i=this.DB-r,o=(1<>r;for(var a=n+1;a>r;r>0&&(e[this.t-n-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[n++]=this.DV+r:r>0&&(e[n++]=r),e.t=n,e.clamp()},O.prototype.multiplyTo=function(t,e){var n=this.abs(),r=t.abs(),i=n.t;for(e.t=i+r.t;--i>=0;)e[i]=0;for(i=0;i=0;)t[n]=0;for(n=0;n=e.DV&&(t[n+e.t]-=e.DV,t[n+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(n,e[n],t,2*n,0,1)),t.s=0,t.clamp()},O.prototype.divRemTo=function(t,e,n){var r=t.abs();if(!(r.t<=0)){var i=this.abs();if(i.t0?(r.lShiftTo(u,o),i.lShiftTo(u,n)):(r.copyTo(o),i.copyTo(n));var c=o.t,f=o[c-1];if(0!=f){var l=f*(1<1?o[c-2]>>this.F2:0),h=this.FV/l,d=(1<=0&&(n[n.t++]=1,n.subTo(v,n)),O.ONE.dlShiftTo(c,v),v.subTo(o,o);o.t=0;){var y=n[--m]==f?this.DM:Math.floor(n[m]*h+(n[m-1]+p)*d);if((n[m]+=o.am(0,y,n,g,0,c))0&&n.rShiftTo(u,n),a<0&&O.ZERO.subTo(n,n)}}},O.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},O.prototype.addTo=function(t,e){for(var n=0,r=0,i=Math.min(t.t,this.t);n>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[n++]=r:r<-1&&(e[n++]=this.DV+r),e.t=n,e.clamp()},O.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)throw new Error("Only radix 2, 4, 8, 16, 32 are supported");e=2}var n,r=(1<0)for(s>s)>0&&(i=!0,o=B(n));a>=0;)s>(s+=this.DB-e)):(n=this[a]>>(s-=e)&r,s<=0&&(s+=this.DB,--a)),n>0&&(i=!0),i&&(o+=B(n));return i?o:"0"},O.prototype.negate=function(){var t=R();return O.ZERO.subTo(this,t),t},O.prototype.abs=function(){return this.s<0?this.negate():this},O.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var n=this.t;if(0!=(e=n-t.t))return this.s<0?-e:e;for(;--n>=0;)if(0!=(e=this[n]-t[n]))return e;return 0},O.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+F(this[this.t-1]^this.s&this.DM)},O.prototype.mod=function(t){var e=R();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(O.ZERO)>0&&t.subTo(e,e),e},O.prototype.equals=function(t){return 0==this.compareTo(t)},O.prototype.add=function(t){var e=R();return this.addTo(t,e),e},O.prototype.subtract=function(t){var e=R();return this.subTo(t,e),e},O.prototype.multiply=function(t){var e=R();return this.multiplyTo(t,e),e},O.prototype.divide=function(t){var e=R();return this.divRemTo(t,e,null),e},O.prototype.modPow=function(t,e,n){var r,i=t.bitLength(),o=z(1),a=new q(e);if(i<=0)return o;r=i<18?1:i<48?3:i<144?4:i<768?5:6;var s=new Array,u=3,c=r-1,f=(1<1){var l=R();for(a.sqrTo(s[1],l);u<=f;)s[u]=R(),a.mulTo(l,s[u-2],s[u]),u+=2}var h,d,p=t.t-1,m=!0,g=R();for(i=F(t[p])-1;p>=0;){for(i>=c?h=t[p]>>i-c&f:(h=(t[p]&(1<0&&(h|=t[p-1]>>this.DB+i-c)),u=r;0==(1&h);)h>>=1,--u;if((i-=u)<0&&(i+=this.DB,--p),m)s[h].copyTo(o),m=!1;else{for(;u>1;)a.sqrTo(o,g),a.sqrTo(g,o),u-=2;u>0?a.sqrTo(o,g):(d=o,o=g,g=d),a.mulTo(g,s[h],o)}for(;p>=0&&0==(t[p]&1<0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Ct="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Tt=function(t,e,n){u.a.dispatch("auth",{event:t,data:e,message:n},"Auth",Ct)},It=new s.a("OAuth"),Pt=function(){function t(t){var e=t.config,n=t.cognitoClientId,r=t.scopes,i=void 0===r?[]:r;if(this._urlOpener=e.urlOpener||Mt,this._config=e,this._cognitoClientId=n,!this.isValidScopes(i))throw Error("scopes must be a String Array");this._scopes=i}return t.prototype.isValidScopes=function(t){return Array.isArray(t)&&t.every((function(t){return"string"==typeof t}))},t.prototype.oauthSignIn=function(t,e,n,i,o,a){void 0===t&&(t="code"),void 0===o&&(o=r.Cognito);var s=this._generateState(32),u=a?s+"-"+a.split("").map((function(t){return t.charCodeAt(0).toString(16).padStart(2,"0")})).join(""):s;!function(t){window.sessionStorage.setItem("oauth_state",t)}(u);var c,f=this._generateRandom(128);c=f,window.sessionStorage.setItem("ouath_pkce_key",c);var l=this._generateChallenge(f),h=this._scopes.join(" "),d="https://"+e+"/oauth2/authorize?"+Object.entries(kt(kt({redirect_uri:n,response_type:t,client_id:i,identity_provider:o,scope:h,state:u},"code"===t?{code_challenge:l}:{}),"code"===t?{code_challenge_method:"S256"}:{})).map((function(t){var e=At(t,2),n=e[0],r=e[1];return encodeURIComponent(n)+"="+encodeURIComponent(r)})).join("&");It.debug("Redirecting to "+d),this._urlOpener(d,n)},t.prototype._handleCodeFlow=function(t){return Et(this,void 0,void 0,(function(){var e,n,r,i,o,s,u,c,f,l,h,d;return xt(this,(function(p){switch(p.label){case 0:return(e=(Object(St.parse)(t).query||"").split("&").map((function(t){return t.split("=")})).reduce((function(t,e){var n,r=At(e,2),i=r[0],o=r[1];return kt(kt({},t),((n={})[i]=o,n))}),{code:void 0}).code)&&Object(St.parse)(t).pathname===Object(St.parse)(this._config.redirectSignIn).pathname?(n="https://"+this._config.domain+"/oauth2/token",Tt("codeFlow",{},"Retrieving tokens from "+n),r=a(this._config)?this._cognitoClientId:this._config.clientID,i=a(this._config)?this._config.redirectSignIn:this._config.redirectUri,m=window.sessionStorage.getItem("ouath_pkce_key"),window.sessionStorage.removeItem("ouath_pkce_key"),s=kt({grant_type:"authorization_code",code:e,client_id:r,redirect_uri:i},(o=m)?{code_verifier:o}:{}),It.debug("Calling token endpoint: "+n+" with",s),u=Object.entries(s).map((function(t){var e=At(t,2),n=e[0],r=e[1];return encodeURIComponent(n)+"="+encodeURIComponent(r)})).join("&"),[4,fetch(n,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:u})]):[2];case 1:return[4,p.sent().json()];case 2:if(c=p.sent(),f=c.access_token,l=c.refresh_token,h=c.id_token,d=c.error)throw new Error(d);return[2,{accessToken:f,refreshToken:l,idToken:h}]}var m}))}))},t.prototype._handleImplicitFlow=function(t){return Et(this,void 0,void 0,(function(){var e,n,r;return xt(this,(function(i){return e=(Object(St.parse)(t).hash||"#").substr(1).split("&").map((function(t){return t.split("=")})).reduce((function(t,e){var n,r=At(e,2),i=r[0],o=r[1];return kt(kt({},t),((n={})[i]=o,n))}),{id_token:void 0,access_token:void 0}),n=e.id_token,r=e.access_token,Tt("implicitFlow",{},"Got tokens from "+t),It.debug("Retrieving implicit tokens from "+t+" with"),[2,{accessToken:r,idToken:n,refreshToken:null}]}))}))},t.prototype.handleAuthResponse=function(t){return Et(this,void 0,void 0,(function(){var e,n,r,i,o,a,s;return xt(this,(function(u){switch(u.label){case 0:if(u.trys.push([0,5,,6]),e=t?kt(kt({},(Object(St.parse)(t).hash||"#").substr(1).split("&").map((function(t){return t.split("=")})).reduce((function(t,e){var n=At(e,2),r=n[0],i=n[1];return t[r]=i,t}),{})),(Object(St.parse)(t).query||"").split("&").map((function(t){return t.split("=")})).reduce((function(t,e){var n=At(e,2),r=n[0],i=n[1];return t[r]=i,t}),{})):{},n=e.error,r=e.error_description,n)throw new Error(r);return i=this._validateState(e),It.debug("Starting "+this._config.responseType+" flow with "+t),"code"!==this._config.responseType?[3,2]:(o=[{}],[4,this._handleCodeFlow(t)]);case 1:return[2,kt.apply(void 0,[kt.apply(void 0,o.concat([u.sent()])),{state:i}])];case 2:return a=[{}],[4,this._handleImplicitFlow(t)];case 3:return[2,kt.apply(void 0,[kt.apply(void 0,a.concat([u.sent()])),{state:i}])];case 4:return[3,6];case 5:throw s=u.sent(),It.error("Error handling auth response.",s),s;case 6:return[2]}}))}))},t.prototype._validateState=function(t){if(t){var e,n=(e=window.sessionStorage.getItem("oauth_state"),window.sessionStorage.removeItem("oauth_state"),e),r=t.state;if(n&&n!==r)throw new Error("Invalid state in OAuth flow");return r}},t.prototype.signOut=function(){return Et(this,void 0,void 0,(function(){var t,e,n;return xt(this,(function(r){return t="https://"+this._config.domain+"/logout?",e=a(this._config)?this._cognitoClientId:this._config.oauth.clientID,n=a(this._config)?this._config.redirectSignOut:this._config.returnTo,t+=Object.entries({client_id:e,logout_uri:encodeURIComponent(n)}).map((function(t){var e=At(t,2);return e[0]+"="+e[1]})).join("&"),Tt("oAuthSignOut",{oAuth:"signOut"},"Signing out from "+t),It.debug("Signing out from "+t),[2,this._urlOpener(t)]}))}))},t.prototype._generateState=function(t){for(var e="",n=t,r="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";n>0;--n)e+=r[Math.round(Math.random()*(r.length-1))];return e},t.prototype._generateChallenge=function(t){return this._base64URL(E()(t))},t.prototype._base64URL=function(t){return t.toString(X.a).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")},t.prototype._generateRandom=function(t){var e=new Uint8Array(t);if("undefined"!=typeof window&&window.crypto)window.crypto.getRandomValues(e);else for(var n=0;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},qt=new s.a("AuthClass"),Kt="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",Ht=function(t,e,n){u.a.dispatch("auth",{event:t,data:e,message:n},"Auth",Kt)},Wt=new(function(){function t(t){var e=this;this.userPool=null,this.user=null,this.oAuthFlowInProgress=!1,this.Credentials=c.a,this.wrapRefreshSessionCallback=function(t){return function(e,n){return n?Ht("tokenRefresh",void 0,"New token retrieved"):Ht("tokenRefresh_failure",e,"Failed to retrieve new token"),t(e,n)}},this.configure(t),this.currentCredentials=this.currentCredentials.bind(this),this.currentUserCredentials=this.currentUserCredentials.bind(this),u.a.listen("auth",(function(t){switch(t.payload.event){case"signIn":e._storage.setItem("amplify-signin-with-hostedUI","false");break;case"signOut":e._storage.removeItem("amplify-signin-with-hostedUI");break;case"cognitoHostedUI":e._storage.setItem("amplify-signin-with-hostedUI","true")}}))}return t.prototype.getModuleName=function(){return"Auth"},t.prototype.configure=function(t){var e=this;if(!t)return this._config||{};qt.debug("configure Auth");var n=Object.assign({},this._config,f.a.parseMobilehubConfig(t).Auth,t);this._config=n;var r=this._config,i=r.userPoolId,o=r.userPoolWebClientId,s=r.cookieStorage,u=r.oauth,c=r.region,l=r.identityPoolId,h=r.mandatorySignIn,d=r.refreshHandlers,p=r.identityPoolRegion,g=r.clientMetadata,b=r.endpoint;if(this._config.storage){if(!this._isValidAuthStorage(this._config.storage))throw qt.error("The storage in the Auth config is not valid!"),new Error("Empty storage object");this._storage=this._config.storage}else this._storage=s?new _t(s):t.ssr?new v:(new y.a).getStorage();if(this._storageSync=Promise.resolve(),"function"==typeof this._storage.sync&&(this._storageSync=this._storage.sync()),i){var w={UserPoolId:i,ClientId:o,endpoint:b};w.Storage=this._storage,this.userPool=new bt(w,this.wrapRefreshSessionCallback)}this.Credentials.configure({mandatorySignIn:h,region:p||c,userPoolId:i,identityPoolId:l,refreshHandlers:d,storage:this._storage});var _=u?a(this._config.oauth)?u:u.awsCognito:void 0;if(_){var S=Object.assign({cognitoClientId:o,UserPoolId:i,domain:_.domain,scopes:_.scope,redirectSignIn:_.redirectSignIn,redirectSignOut:_.redirectSignOut,responseType:_.responseType,Storage:this._storage,urlOpener:_.urlOpener,clientMetadata:g},_.options);this._oAuthHandler=new Pt({scopes:S.scopes,config:S,cognitoClientId:S.cognitoClientId});var M={};!function(t){if(m.a.browserOrNode().isBrowser&&window.location)t({url:window.location.href});else if(!m.a.browserOrNode().isNode)throw new Error("Not supported")}((function(t){var n=t.url;M[n]||(M[n]=!0,e._handleAuthResponse(n))}))}return Ht("configured",null,"The Auth category has been configured successfully"),this._config},t.prototype.signUp=function(t){for(var e=this,n=[],r=1;ri;)Y(t,n=r[i++],e[n]);return t},J=function(t){var e=B.call(this,t=S(t,!0));return!(this===q&&i(z,t)&&!i(F,t))&&(!(e||!i(this,t)||!i(z,t)||i(this,N)&&this[N][t])||e)},X=function(t,e){if(t=_(t),e=S(e,!0),t!==q||!i(z,e)||i(F,e)){var n=I(t,e);return!n||!i(z,e)||i(t,N)&&t[N][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=O(_(t)),r=[],o=0;n.length>o;)i(z,e=n[o++])||e==N||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===q,r=O(n?F:_(t)),o=[],a=0;r.length>a;)!i(z,e=r[a++])||n&&!i(q,e)||o.push(z[e]);return o};K||(s((R=function(){if(this instanceof R)throw TypeError("Symbol is not a constructor!");var t=h(arguments.length>0?arguments[0]:void 0),e=function(n){this===q&&e.call(F,n),i(this,N)&&i(this[N],t)&&(this[N][t]=!1),V(this,t,M(1,n))};return o&&W&&V(q,t,{configurable:!0,set:e}),Z(t)}).prototype,"toString",(function(){return this._k})),x.f=X,C.f=Y,n(70).f=E.f=Q,n(98).f=J,A.f=tt,o&&!n(56)&&s(q,"propertyIsEnumerable",J,!0),p.f=function(t){return Z(d(t))}),a(a.G+a.W+a.F*!K,{Symbol:R});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var rt=T(d.store),it=0;rt.length>it;)m(rt[it++]);a(a.S+a.F*!K,"Symbol",{for:function(t){return i(D,t+="")?D[t]:D[t]=R(t)},keyFor:function(t){if(!G(t))throw TypeError(t+" is not a symbol!");for(var e in D)if(D[e]===t)return e},useSetter:function(){W=!0},useSimple:function(){W=!1}}),a(a.S+a.F*!K,"Object",{create:function(t,e){return void 0===e?k(t):$(k(t),e)},defineProperty:Y,defineProperties:$,getOwnPropertyDescriptor:X,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var ot=c((function(){A.f(1)}));a(a.S+a.F*ot,"Object",{getOwnPropertySymbols:function(t){return A.f(w(t))}}),j&&a(a.S+a.F*(!K||c((function(){var t=R();return"[null]"!=L([t])||"{}"!=L({a:t})||"{}"!=L(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!G(t))return v(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!G(e))return e}),r[1]=e,L.apply(j,r)}}),R.prototype[U]||n(24)(R.prototype,U,R.prototype.valueOf),l(R,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},function(t,e,n){t.exports=n(96)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(67),i=n(113),o=n(98);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,c=0;s.length>c;)u.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var r=n(3);r(r.S,"Object",{create:n(69)})},function(t,e,n){var r=n(3);r(r.S+r.F*!n(14),"Object",{defineProperty:n(16).f})},function(t,e,n){var r=n(3);r(r.S+r.F*!n(14),"Object",{defineProperties:n(208)})},function(t,e,n){var r=n(31),i=n(32).f;n(46)("getOwnPropertyDescriptor",(function(){return function(t,e){return i(r(t),e)}}))},function(t,e,n){var r=n(17),i=n(33);n(46)("getPrototypeOf",(function(){return function(t){return i(r(t))}}))},function(t,e,n){var r=n(17),i=n(67);n(46)("keys",(function(){return function(t){return i(r(t))}}))},function(t,e,n){n(46)("getOwnPropertyNames",(function(){return n(209).f}))},function(t,e,n){var r=n(11),i=n(57).onFreeze;n(46)("freeze",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(11),i=n(57).onFreeze;n(46)("seal",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(11),i=n(57).onFreeze;n(46)("preventExtensions",(function(t){return function(e){return t&&r(e)?t(i(e)):e}}))},function(t,e,n){var r=n(11);n(46)("isFrozen",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},function(t,e,n){var r=n(11);n(46)("isSealed",(function(t){return function(e){return!r(e)||!!t&&t(e)}}))},function(t,e,n){var r=n(11);n(46)("isExtensible",(function(t){return function(e){return!!r(e)&&(!t||t(e))}}))},function(t,e,n){var r=n(3);r(r.S+r.F,"Object",{assign:n(210)})},function(t,e,n){var r=n(3);r(r.S,"Object",{is:n(211)})},function(t,e,n){var r=n(3);r(r.S,"Object",{setPrototypeOf:n(149).set})},function(t,e,n){"use strict";var r=n(81),i={};i[n(12)("toStringTag")]="z",i+""!="[object z]"&&n(25)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,e,n){var r=n(3);r(r.P,"Function",{bind:n(212)})},function(t,e,n){var r=n(16).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(14)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var r=n(11),i=n(33),o=n(12)("hasInstance"),a=Function.prototype;o in a||n(16).f(a,o,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var r=n(3),i=n(214);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var r=n(3),i=n(215);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){"use strict";var r=n(9),i=n(30),o=n(40),a=n(151),s=n(44),u=n(10),c=n(70).f,f=n(32).f,l=n(16).f,h=n(82).trim,d=r.Number,p=d,m=d.prototype,g="Number"==o(n(69)(m)),v="trim"in String.prototype,y=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,r,i,o=(e=v?e.trim():h(e,3)).charCodeAt(0);if(43===o||45===o){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,u=e.slice(2),c=0,f=u.length;ci)return NaN;return parseInt(u,r)}}return+e};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof d&&(g?u((function(){m.valueOf.call(n)})):"Number"!=o(n))?a(new p(y(e)),n,d):y(e)};for(var b,w=n(14)?c(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),_=0;w.length>_;_++)i(p,b=w[_])&&!i(d,b)&&l(d,b,f(p,b));d.prototype=m,m.constructor=d,n(25)(r,"Number",d)}},function(t,e,n){"use strict";var r=n(3),i=n(41),o=n(216),a=n(152),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*c[n],c[n]=r%1e7,r=u(r/1e7)},h=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=u(n/t),n=n%t*1e7},d=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},p=function(t,e,n){return 0===e?n:e%2==1?p(t,e-1,n*t):p(t*t,e/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(10)((function(){s.call({})}))),"Number",{toFixed:function(t){var e,n,r,s,u=o(this,f),c=i(t),m="",g="0";if(c<0||c>20)throw RangeError(f);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(m="-",u=-u),u>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(u*p(2,69,1))-69)<0?u*p(2,-e,1):u/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(l(0,n),r=c;r>=7;)l(1e7,0),r-=7;for(l(p(10,r,1),0),r=e-1;r>=23;)h(1<<23),r-=23;h(1<0?m+((s=g.length)<=c?"0."+a.call("0",c-s)+g:g.slice(0,s-c)+"."+g.slice(s-c)):m+g}})},function(t,e,n){"use strict";var r=n(3),i=n(10),o=n(216),a=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==a.call(1,void 0)}))||!i((function(){a.call({})}))),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(3);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(3),i=n(9).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(3);r(r.S,"Number",{isInteger:n(217)})},function(t,e,n){var r=n(3);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(3),i=n(217),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(3);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(3);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(3),i=n(215);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(3),i=n(214);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(3),i=n(218),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e,n){var r=n(3),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var r=n(3),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(3),i=n(153);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var r=n(3);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(3),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(3),i=n(154);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var r=n(3);r(r.S,"Math",{fround:n(219)})},function(t,e,n){var r=n(3),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,a=0,s=arguments.length,u=0;a0?(r=n/u)*r:n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(t,e,n){var r=n(3),i=Math.imul;r(r.S+r.F*n(10)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r;return 0|i*o+((65535&n>>>16)*o+i*(65535&r>>>16)<<16>>>0)}})},function(t,e,n){var r=n(3);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(3);r(r.S,"Math",{log1p:n(218)})},function(t,e,n){var r=n(3);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(3);r(r.S,"Math",{sign:n(153)})},function(t,e,n){var r=n(3),i=n(154),o=Math.exp;r(r.S+r.F*n(10)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(3),i=n(154),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(3);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(3),i=n(68),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(3),i=n(31),o=n(13);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var r=n(3),i=n(115)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(3),i=n(13),o=n(157),a="".endsWith;r(r.P+r.F*n(158)("endsWith"),"String",{endsWith:function(t){var e=o(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),s=void 0===n?r:Math.min(i(n),r),u=String(t);return a?a.call(e,u,s):e.slice(s-u.length,s)===u}})},function(t,e,n){"use strict";var r=n(3),i=n(157);r(r.P+r.F*n(158)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(3);r(r.P,"String",{repeat:n(152)})},function(t,e,n){"use strict";var r=n(3),i=n(13),o=n(157),a="".startsWith;r(r.P+r.F*n(158)("startsWith"),"String",{startsWith:function(t){var e=o(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return a?a.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(26)("anchor",(function(t){return function(e){return t(this,"a","name",e)}}))},function(t,e,n){"use strict";n(26)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,e,n){"use strict";n(26)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,e,n){"use strict";n(26)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,e,n){"use strict";n(26)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,e,n){"use strict";n(26)("fontcolor",(function(t){return function(e){return t(this,"font","color",e)}}))},function(t,e,n){"use strict";n(26)("fontsize",(function(t){return function(e){return t(this,"font","size",e)}}))},function(t,e,n){"use strict";n(26)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,e,n){"use strict";n(26)("link",(function(t){return function(e){return t(this,"a","href",e)}}))},function(t,e,n){"use strict";n(26)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,e,n){"use strict";n(26)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,e,n){"use strict";n(26)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,e,n){"use strict";n(26)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,e,n){var r=n(3);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(3),i=n(17),o=n(44);r(r.P+r.F*n(10)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(3),i=n(417);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var r=n(10),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-50000000000001))}))||!r((function(){o.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},function(t,e,n){var r=Date.prototype,i=r.toString,o=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(25)(r,"toString",(function(){var t=o.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,e,n){var r=n(12)("toPrimitive"),i=Date.prototype;r in i||n(24)(i,r,n(420))},function(t,e,n){"use strict";var r=n(7),i=n(44);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),"number"!=t)}},function(t,e,n){var r=n(3);r(r.S,"Array",{isArray:n(114)})},function(t,e,n){"use strict";var r=n(39),i=n(3),o=n(17),a=n(220),s=n(159),u=n(13),c=n(160),f=n(161);i(i.S+i.F*!n(117)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,l,h=o(t),d="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,g=void 0!==m,v=0,y=f(h);if(g&&(m=r(m,p>2?arguments[2]:void 0,2)),null==y||d==Array&&s(y))for(n=new d(e=u(h.length));e>v;v++)c(n,v,g?m(h[v],v):h[v]);else for(l=y.call(h),n=new d;!(i=l.next()).done;v++)c(n,v,g?a(l,m,[i.value,v],!0):i.value);return n.length=v,n}})},function(t,e,n){"use strict";var r=n(3),i=n(160);r(r.S+r.F*n(10)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(3),i=n(31),o=[].join;r(r.P+r.F*(n(97)!=Object||!n(42)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(3),i=n(148),o=n(40),a=n(68),s=n(13),u=[].slice;r(r.P+r.F*n(10)((function(){i&&u.call(i)})),"Array",{slice:function(t,e){var n=s(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var i=a(t,n),c=a(e,n),f=s(c-i),l=new Array(f),h=0;h1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(3);r(r.P,"Array",{copyWithin:n(222)}),n(58)("copyWithin")},function(t,e,n){var r=n(3);r(r.P,"Array",{fill:n(163)}),n(58)("fill")},function(t,e,n){"use strict";var r=n(3),i=n(47)(5),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),r(r.P+r.F*o,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(58)("find")},function(t,e,n){"use strict";var r=n(3),i=n(47)(6),o="findIndex",a=!0;o in[]&&Array(1)[o]((function(){a=!1})),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(58)(o)},function(t,e,n){n(71)("Array")},function(t,e,n){var r=n(9),i=n(151),o=n(16).f,a=n(70).f,s=n(116),u=n(99),c=r.RegExp,f=c,l=c.prototype,h=/a/g,d=/a/g,p=new c(h)!==h;if(n(14)&&(!p||n(10)((function(){return d[n(12)("match")]=!1,c(h)!=h||c(d)==d||"/a/i"!=c(h,"i")})))){c=function(t,e){var n=this instanceof c,r=s(t),o=void 0===e;return!n&&r&&t.constructor===c&&o?t:i(p?new f(r&&!o?t.source:t,e):f((r=t instanceof c)?t.source:t,r&&o?u.call(t):e),n?this:l,c)};for(var m=function(t){t in c||o(c,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},g=a(f),v=0;g.length>v;)m(g[v++]);l.constructor=c,c.prototype=l,n(25)(r,"RegExp",c)}n(71)("RegExp")},function(t,e,n){"use strict";n(225);var r=n(7),i=n(99),o=n(14),a=/./.toString,s=function(t){n(25)(RegExp.prototype,"toString",t,!0)};n(10)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(t,e,n){"use strict";var r=n(7),i=n(13),o=n(166),a=n(118);n(119)("match",1,(function(t,e,n,s){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=s(n,t,this);if(e.done)return e.value;var u=r(t),c=String(this);if(!u.global)return a(u,c);var f=u.unicode;u.lastIndex=0;for(var l,h=[],d=0;null!==(l=a(u,c));){var p=String(l[0]);h[d]=p,""===p&&(u.lastIndex=o(c,i(u.lastIndex),f)),d++}return 0===d?null:h}]}))},function(t,e,n){"use strict";var r=n(7),i=n(17),o=n(13),a=n(41),s=n(166),u=n(118),c=Math.max,f=Math.min,l=Math.floor,h=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;n(119)("replace",2,(function(t,e,n,p){return[function(r,i){var o=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=p(n,t,this,e);if(i.done)return i.value;var l=r(t),h=String(this),d="function"==typeof e;d||(e=String(e));var g=l.global;if(g){var v=l.unicode;l.lastIndex=0}for(var y=[];;){var b=u(l,h);if(null===b)break;if(y.push(b),!g)break;""===String(b[0])&&(l.lastIndex=s(h,o(l.lastIndex),v))}for(var w,_="",S=0,M=0;M=S&&(_+=h.slice(S,E)+I,S=E+k.length)}return _+h.slice(S)}];function m(t,e,r,o,a,s){var u=r+t.length,c=o.length,f=d;return void 0!==a&&(a=i(a),f=h),n.call(s,f,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(u);case"<":s=a[i.slice(1,-1)];break;default:var f=+i;if(0===f)return n;if(f>c){var h=l(f/10);return 0===h?n:h<=c?void 0===o[h-1]?i.charAt(1):o[h-1]+i.charAt(1):n}s=o[f-1]}return void 0===s?"":s}))}}))},function(t,e,n){"use strict";var r=n(7),i=n(211),o=n(118);n(119)("search",1,(function(t,e,n,a){return[function(n){var r=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var s=r(t),u=String(this),c=s.lastIndex;i(c,0)||(s.lastIndex=0);var f=o(s,u);return i(s.lastIndex,c)||(s.lastIndex=c),null===f?-1:f.index}]}))},function(t,e,n){"use strict";var r=n(116),i=n(7),o=n(100),a=n(166),s=n(13),u=n(118),c=n(165),f=n(10),l=Math.min,h=[].push,d="length",p=!f((function(){RegExp(4294967295,"y")}));n(119)("split",2,(function(t,e,n,f){var m;return m="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[d]||2!="ab".split(/(?:ab)*/)[d]||4!=".".split(/(.?)(.?)/)[d]||".".split(/()()/)[d]>1||"".split(/.?/)[d]?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);for(var o,a,s,u=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,p=void 0===e?4294967295:e>>>0,m=new RegExp(t.source,f+"g");(o=c.call(m,i))&&!((a=m.lastIndex)>l&&(u.push(i.slice(l,o.index)),o[d]>1&&o.index=p));)m.lastIndex===o.index&&m.lastIndex++;return l===i[d]?!s&&m.test("")||u.push(""):u.push(i.slice(l)),u[d]>p?u.slice(0,p):u}:"0".split(void 0,0)[d]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):m.call(String(i),n,r)},function(t,e){var r=f(m,t,this,e,m!==n);if(r.done)return r.value;var c=i(t),h=String(this),d=o(c,RegExp),g=c.unicode,v=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(p?"y":"g"),y=new d(p?c:"^(?:"+c.source+")",v),b=void 0===e?4294967295:e>>>0;if(0===b)return[];if(0===h.length)return null===u(y,h)?[h]:[];for(var w=0,_=0,S=[];_o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&j(t)}))}},j=function(t){v.call(u,(function(){var e,n,r,i=t._v,o=L(t);if(o&&(e=w((function(){C?k.emit("unhandledRejection",i,t):(n=u.onunhandledrejection)?n({promise:t,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)})),t._h=C||L(t)?2:1),t._a=void 0,o&&e.e)throw e.v}))},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){v.call(u,(function(){var e;C?k.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})}))},U=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),R(e,!0))},B=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw M("Promise can't be resolved itself");(e=O(t))?y((function(){var r={_w:n,_d:!1};try{e.call(t,c(B,r,1),c(U,r,1))}catch(t){U.call(r,t)}})):(n._v=t,n._s=1,R(n,!1))}catch(t){U.call({_w:n,_d:!1},t)}}};P||(A=function(t){p(this,A,"Promise","_h"),d(t),r.call(this);try{t(c(B,this,1),c(U,this,1))}catch(t){U.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(74)(A.prototype,{then:function(t,e){var n=I(g(this,A));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=C?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&R(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=c(B,t,1),this.reject=c(U,t,1)},b.f=I=function(t){return t===A||t===a?new o(t):i(t)}),l(l.G+l.W+l.F*!P,{Promise:A}),n(80)(A,"Promise"),n(71)("Promise"),a=n(38).Promise,l(l.S+l.F*!P,"Promise",{reject:function(t){var e=I(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(s||!P),"Promise",{resolve:function(t){return S(s&&this===a?A:this,t)}}),l(l.S+l.F*!(P&&n(117)((function(t){A.all(t).catch(T)}))),"Promise",{all:function(t){var e=this,n=I(e),r=n.resolve,i=n.reject,o=w((function(){var n=[],o=0,a=1;m(t,!1,(function(t){var s=o++,u=!1;n.push(void 0),a++,e.resolve(t).then((function(t){u||(u=!0,n[s]=t,--a||r(n))}),i)})),--a||r(n)}));return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=I(e),r=n.reject,i=w((function(){m(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(t,e,n){"use strict";var r=n(232),i=n(75);n(121)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return r.def(i(this,"WeakSet"),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(3),i=n(122),o=n(170),a=n(7),s=n(68),u=n(13),c=n(11),f=n(9).ArrayBuffer,l=n(100),h=o.ArrayBuffer,d=o.DataView,p=i.ABV&&f.isView,m=h.prototype.slice,g=i.VIEW;r(r.G+r.W+r.F*(f!==h),{ArrayBuffer:h}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return p&&p(t)||c(t)&&g in t}}),r(r.P+r.U+r.F*n(10)((function(){return!new h(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,e){if(void 0!==m&&void 0===e)return m.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),o=new(l(this,h))(u(i-r)),c=new d(this),f=new d(o),p=0;r=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}})),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){var r=n(32),i=n(33),o=n(30),a=n(3),s=n(11),u=n(7);a(a.S,"Reflect",{get:function t(e,n){var a,c,f=arguments.length<3?e:arguments[2];return u(e)===f?e[n]:(a=r.f(e,n))?o(a,"value")?a.value:void 0!==a.get?a.get.call(f):void 0:s(c=i(e))?t(c,n,f):void 0}})},function(t,e,n){var r=n(32),i=n(3),o=n(7);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},function(t,e,n){var r=n(3),i=n(33),o=n(7);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){var r=n(3);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(3),i=n(7),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){var r=n(3);r(r.S,"Reflect",{ownKeys:n(234)})},function(t,e,n){var r=n(3),i=n(7),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,n){var r=n(16),i=n(32),o=n(33),a=n(30),s=n(3),u=n(65),c=n(7),f=n(11);s(s.S,"Reflect",{set:function t(e,n,s){var l,h,d=arguments.length<4?e:arguments[3],p=i.f(c(e),n);if(!p){if(f(h=o(e)))return t(h,n,s,d);p=u(0)}if(a(p,"value")){if(!1===p.writable||!f(d))return!1;if(l=i.f(d,n)){if(l.get||l.set||!1===l.writable)return!1;l.value=s,r.f(d,n,l)}else r.f(d,n,u(0,s));return!0}return void 0!==p.set&&(p.set.call(d,s),!0)}})},function(t,e,n){var r=n(3),i=n(149);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var r=n(3),i=n(112)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(58)("includes")},function(t,e,n){"use strict";var r=n(3),i=n(235),o=n(17),a=n(13),s=n(20),u=n(162);r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return s(t),e=a(r.length),n=u(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n(58)("flatMap")},function(t,e,n){"use strict";var r=n(3),i=n(235),o=n(17),a=n(13),s=n(41),u=n(162);r(r.P,"Array",{flatten:function(){var t=arguments[0],e=o(this),n=a(e.length),r=u(e,0);return i(r,e,e,n,0,void 0===t?1:s(t)),r}}),n(58)("flatten")},function(t,e,n){"use strict";var r=n(3),i=n(115)(!0),o=n(10)((function(){return"𠮷"!=="𠮷".at(0)}));r(r.P+r.F*o,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(3),i=n(236),o=n(120),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){"use strict";var r=n(3),i=n(236),o=n(120),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o);r(r.P+r.F*a,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(82)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,e,n){"use strict";n(82)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,e,n){"use strict";var r=n(3),i=n(45),o=n(13),a=n(116),s=n(99),u=RegExp.prototype,c=function(t,e){this._r=t,this._s=e};n(156)(c,"RegExp String",(function(){var t=this._r.exec(this._s);return{value:t,done:null===t}})),r(r.P,"String",{matchAll:function(t){if(i(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in u?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(t.lastIndex),new c(r,e)}})},function(t,e,n){n(145)("asyncIterator")},function(t,e,n){n(145)("observable")},function(t,e,n){var r=n(3),i=n(234),o=n(31),a=n(32),s=n(160);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),u=a.f,c=i(r),f={},l=0;c.length>l;)void 0!==(n=u(r,e=c[l++]))&&s(f,e,n);return f}})},function(t,e,n){var r=n(3),i=n(237)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){var r=n(3),i=n(237)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";var r=n(3),i=n(17),o=n(20),a=n(16);n(14)&&r(r.P+n(123),"Object",{__defineGetter__:function(t,e){a.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(3),i=n(17),o=n(20),a=n(16);n(14)&&r(r.P+n(123),"Object",{__defineSetter__:function(t,e){a.f(i(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(3),i=n(17),o=n(44),a=n(33),s=n(32).f;n(14)&&r(r.P+n(123),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=s(n,r))return e.get}while(n=a(n))}})},function(t,e,n){"use strict";var r=n(3),i=n(17),o=n(44),a=n(33),s=n(32).f;n(14)&&r(r.P+n(123),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=o(t,!0);do{if(e=s(n,r))return e.set}while(n=a(n))}})},function(t,e,n){var r=n(3);r(r.P+r.R,"Map",{toJSON:n(238)("Map")})},function(t,e,n){var r=n(3);r(r.P+r.R,"Set",{toJSON:n(238)("Set")})},function(t,e,n){n(124)("Map")},function(t,e,n){n(124)("Set")},function(t,e,n){n(124)("WeakMap")},function(t,e,n){n(124)("WeakSet")},function(t,e,n){n(125)("Map")},function(t,e,n){n(125)("Set")},function(t,e,n){n(125)("WeakMap")},function(t,e,n){n(125)("WeakSet")},function(t,e,n){var r=n(3);r(r.G,{global:n(9)})},function(t,e,n){var r=n(3);r(r.S,"System",{global:n(9)})},function(t,e,n){var r=n(3),i=n(40);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,n){var r=n(3);r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var r=n(3);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var r=n(3),i=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*i}})},function(t,e,n){var r=n(3),i=n(240),o=n(219);r(r.S,"Math",{fscale:function(t,e,n,r,a){return o(i(t,e,n,r,a))}})},function(t,e,n){var r=n(3);r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,o=n>>>0;return(e>>>0)+(r>>>0)+((i&o|(i|o)&~(i+o>>>0))>>>31)|0}})},function(t,e,n){var r=n(3);r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,o=n>>>0;return(e>>>0)-(r>>>0)-((~i&o|~(i^o)&i-o>>>0)>>>31)|0}})},function(t,e,n){var r=n(3);r(r.S,"Math",{imulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,a=n>>16,s=r>>16,u=(a*o>>>0)+(i*o>>>16);return a*s+(u>>16)+((i*s>>>0)+(65535&u)>>16)}})},function(t,e,n){var r=n(3);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var r=n(3),i=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*i}})},function(t,e,n){var r=n(3);r(r.S,"Math",{scale:n(240)})},function(t,e,n){var r=n(3);r(r.S,"Math",{umulh:function(t,e){var n=+t,r=+e,i=65535&n,o=65535&r,a=n>>>16,s=r>>>16,u=(a*o>>>0)+(i*o>>>16);return a*s+(u>>>16)+((i*s>>>0)+(65535&u)>>>16)}})},function(t,e,n){var r=n(3);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var r=n(3),i=n(38),o=n(9),a=n(100),s=n(227);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){"use strict";var r=n(3),i=n(169),o=n(226);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=n(51),i=n(7),o=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,i(n),o(r))}})},function(t,e,n){var r=n(51),i=n(7),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var u=s.get(e);return u.delete(n),!!u.size||s.delete(e)}})},function(t,e,n){var r=n(51),i=n(7),o=n(33),a=r.has,s=r.get,u=r.key,c=function(t,e,n){if(a(t,e,n))return s(t,e,n);var r=o(e);return null!==r?c(t,r,n):void 0};r.exp({getMetadata:function(t,e){return c(t,i(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,n){var r=n(230),i=n(239),o=n(51),a=n(7),s=n(33),u=o.keys,c=o.key,f=function(t,e){var n=u(t,e),o=s(t);if(null===o)return n;var a=f(o,e);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(t){return f(a(t),arguments.length<2?void 0:c(arguments[1]))}})},function(t,e,n){var r=n(51),i=n(7),o=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(51),i=n(7),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){var r=n(51),i=n(7),o=n(33),a=r.has,s=r.key,u=function(t,e,n){if(a(t,e,n))return!0;var r=o(e);return null!==r&&u(t,r,n)};r.exp({hasMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(51),i=n(7),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(51),i=n(7),o=n(20),a=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?i:o)(n),a(r))}}})},function(t,e,n){var r=n(3),i=n(168)(),o=n(9).process,a="process"==n(40)(o);r(r.G,{asap:function(t){var e=a&&o.domain;i(e?e.bind(t):t)}})},function(t,e,n){"use strict";var r=n(3),i=n(9),o=n(38),a=n(168)(),s=n(12)("observable"),u=n(20),c=n(7),f=n(72),l=n(74),h=n(24),d=n(73),p=d.RETURN,m=function(t){return null==t?void 0:u(t)},g=function(t){var e=t._c;e&&(t._c=void 0,e())},v=function(t){return void 0===t._o},y=function(t){v(t)||(t._o=void 0,g(t))},b=function(t,e){c(t),this._c=void 0,this._o=t,t=new w(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(e){return void t.error(e)}v(this)&&g(this)};b.prototype=l({},{unsubscribe:function(){y(this)}});var w=function(t){this._s=t};w.prototype=l({},{next:function(t){var e=this._s;if(!v(e)){var n=e._o;try{var r=m(n.next);if(r)return r.call(n,t)}catch(t){try{y(e)}finally{throw t}}}},error:function(t){var e=this._s;if(v(e))throw t;var n=e._o;e._o=void 0;try{var r=m(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{g(e)}finally{throw t}}return g(e),t},complete:function(t){var e=this._s;if(!v(e)){var n=e._o;e._o=void 0;try{var r=m(n.complete);t=r?r.call(n,t):void 0}catch(t){try{g(e)}finally{throw t}}return g(e),t}}});var _=function(t){f(this,_,"Observable","_f")._f=u(t)};l(_.prototype,{subscribe:function(t){return new b(t,this._f)},forEach:function(t){var e=this;return new(o.Promise||i.Promise)((function(n,r){u(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:n})}))}}),l(_,{from:function(t){var e="function"==typeof this?this:_,n=m(c(t)[s]);if(n){var r=c(n.call(t));return r.constructor===e?r:new e((function(t){return r.subscribe(t)}))}return new e((function(e){var n=!1;return a((function(){if(!n){try{if(d(t,!1,(function(t){if(e.next(t),n)return p}))===p)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}})),function(){n=!0}}))},of:function(){for(var t=0,e=arguments.length,n=new Array(e);t2,i=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*s,{setTimeout:u(r.setTimeout),setInterval:u(r.setInterval)})},function(t,e,n){var r=n(3),i=n(167);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(164),i=n(67),o=n(25),a=n(9),s=n(24),u=n(83),c=n(12),f=c("iterator"),l=c("toStringTag"),h=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(d),m=0;m=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}}}function m(t,e,n,r){var i=e&&e.prototype instanceof v?e:v,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(t,e,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return A()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=S(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=g(t,e,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function g(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function v(){}function y(){}function b(){}function w(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function _(t){function n(e,i,o,a){var s=g(t[e],t,i);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?Promise.resolve(c.__await).then((function(t){n("next",t,o,a)}),(function(t){n("throw",t,o,a)})):Promise.resolve(c).then((function(t){u.value=t,o(u)}),a)}a(s.arg)}var i;"object"==typeof e.process&&e.process.domain&&(n=e.process.domain.bind(n)),this._invoke=function(t,e){function r(){return new Promise((function(r,i){n(t,e,r,i)}))}return i=i?i.then(r,r):r()}}function S(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=g(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,f;var i=r.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++nI.length&&I.push(t)}function R(t,e,n){return null==t?0:function t(e,n,r,i){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var u=!1;if(null===e)u=!0;else switch(s){case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case o:case a:u=!0}}if(u)return r(i,e,""===n?"."+j(e,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(e))for(var c=0;c