/*! For license information please see 2.f974d6ce.chunk.js.LICENSE.txt */ (this["webpackJsonplamassu-admin"]=this["webpackJsonplamassu-admin"]||[]).push([[2],[function(t,e,n){"use strict";t.exports=n(606)},function(t,e,n){"use strict";t.exports=n(602)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(209);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(t,e)||Object(r.a)(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(t,e,n){"use strict";n.d(e,"d",(function(){return ft})),n.d(e,"b",(function(){return dt})),n.d(e,"h",(function(){return wt})),n.d(e,"e",(function(){return Ot})),n.d(e,"f",(function(){return qt})),n.d(e,"a",(function(){return Gt})),n.d(e,"g",(function(){return H})),n.d(e,"c",(function(){return Yt}));var r,i,o=n(50),a=n(45),u=n(46);try{r=Map}catch(Qt){}try{i=Set}catch(Qt){}function s(t,e,n){if(!t||"object"!==typeof t||"function"===typeof t)return t;if(t.nodeType&&"cloneNode"in t)return t.cloneNode(!0);if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t);if(Array.isArray(t))return t.map(c);if(r&&t instanceof r)return new Map(Array.from(t.entries()));if(i&&t instanceof i)return new Set(Array.from(t.values()));if(t instanceof Object){e.push(t);var o=Object.create(t);for(var a in n.push(o),t){var u=e.findIndex((function(e){return e===t[a]}));o[a]=u>-1?n[u]:s(t[a],e,n)}return o}return t}function c(t){return s(t,[],[])}var f=Object.prototype.toString,l=Error.prototype.toString,d=RegExp.prototype.toString,h="undefined"!==typeof Symbol?Symbol.prototype.toString:function(){return""},p=/^Symbol\((.*)\)(.*)$/;function g(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}function m(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null==t||!0===t||!1===t)return""+t;var n=typeof t;if("number"===n)return g(t);if("string"===n)return e?'"'.concat(t,'"'):t;if("function"===n)return"[Function "+(t.name||"anonymous")+"]";if("symbol"===n)return h.call(t).replace(p,"Symbol($1)");var r=f.call(t).slice(8,-1);return"Date"===r?isNaN(t.getTime())?""+t:t.toISOString(t):"Error"===r||t instanceof Error?"["+l.call(t)+"]":"RegExp"===r?d.call(t):null}function b(t,e){var n=m(t,e);return null!==n?n:JSON.stringify(t,(function(t,n){var r=m(this[t],e);return null!==r?r:n}),2)}var v={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:function(t){var e=t.path,n=t.type,r=t.value,i=t.originalValue,o=null!=i&&i!==r,a="".concat(e," must be a `").concat(n,"` type, ")+"but the final value was: `".concat(b(r,!0),"`")+(o?" (cast from the value `".concat(b(i,!0),"`)."):".");return null===r&&(a+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),a},defined:"${path} must be defined"},y={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},_={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},w={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},S={isValue:"${path} field must be ${value}"},O={noUnknown:"${path} field has unspecified keys: ${unknown}"},x={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must be have ${length} items"},E=(Object.assign(Object.create(null),{mixed:v,string:y,number:_,date:w,object:O,array:x,boolean:S}),n(189)),M=n.n(E),T=function(t){return t&&t.__isYupSchema__},$=function(){function t(e,n){if(Object(a.a)(this,t),this.refs=e,this.refs=e,"function"!==typeof n){if(!M()(n,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");var r=n.is,i=n.then,o=n.otherwise,u="function"===typeof r?r:function(){for(var t=arguments.length,e=new Array(t),n=0;n1?"".concat(s.errors.length," errors occurred"):s.errors[0],Error.captureStackTrace&&Error.captureStackTrace(Object(A.a)(s),n),s}return Object(u.a)(n,null,[{key:"formatError",value:function(t,e){var n=e.label||e.path||"this";return n!==e.path&&(e=N({},e,{path:n})),"string"===typeof t?t.replace(R,(function(t,n){return b(e[n])})):"function"===typeof t?t(e):t}},{key:"isError",value:function(t){return t&&"ValidationError"===t.name}}]),n}(Object(I.a)(Error));function D(t,e){var n=t.endEarly,r=t.tests,i=t.args,a=t.value,u=t.errors,s=t.sort,c=t.path,f=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(e),l=r.length,d=[];if(u=u||[],!l)return u.length?f(new j(u,a,c)):f(null,a);for(var h=0;h1&&void 0!==arguments[1]?arguments[1]:{};if(Object(a.a)(this,t),"string"!==typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===U,this.isValue=this.key[0]===z,this.isSibling=!this.isContext&&!this.isValue;var r=this.isContext?U:this.isValue?z:"";this.path=this.key.slice(r.length),this.getter=this.path&&Object(B.getter)(this.path,!0),this.map=n.map}return Object(u.a)(t,[{key:"getValue",value:function(t,e,n){var r=this.isContext?n:this.isValue?t:e;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}},{key:"cast",value:function(t,e){return this.getValue(t,null==e?void 0:e.parent,null==e?void 0:e.context)}},{key:"resolve",value:function(){return this}},{key:"describe",value:function(){return{type:"ref",key:this.key}}},{key:"toString",value:function(){return"Ref(".concat(this.key,")")}}],[{key:"isRef",value:function(t){return t&&t.__isYupRef}}]),t}();function q(){return(q=Object.assign||function(t){for(var e=1;e=0||(i[n]=t[n]);return i}(e,["value","path","label","options","originalValue","sync"]),l=t.name,d=t.test,h=t.params,p=t.message,g=u.parent,m=u.context;function b(t){return V.isRef(t)?t.getValue(r,g,m):t}function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=F()(q({value:r,originalValue:s,label:a,path:t.path||o},h,t.params),b),n=new j(j.formatError(t.message||p,e),r,e.path,t.type||l);return n.params=e,n}var y=q({path:o,parent:g,type:l,createError:v,resolve:b,options:u,originalValue:s},f);if(c){var _;try{var w;if("function"===typeof(null==(w=_=d.call(y,r,y))?void 0:w.then))throw new Error('Validation test of type: "'.concat(y.type,'" returned a Promise during a synchronous validate. ')+"This test will finish after the validate call has returned")}catch(S){return void n(S)}j.isError(_)?n(_):_?n(null,_):n(v())}else try{Promise.resolve(d.call(y,r,y)).then((function(t){j.isError(t)?n(t):t?n(null,t):n(v())}))}catch(S){n(S)}}return e.OPTIONS=t,e}V.prototype.__isYupRef=!0;var G=function(t){return t.substr(0,t.length-1).substr(1)};function K(t,e,n){var r,i,o,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return e?(Object(B.forEach)(e,(function(u,s,c){var f=s?G(u):u;if((t=t.resolve({context:a,parent:r,value:n})).innerType){var l=c?parseInt(f,10):0;if(n&&l>=n.length)throw new Error("Yup.reach cannot resolve an array item at index: ".concat(u,", in the path: ").concat(e,". ")+"because there is no value at that index. ");r=n,n=n&&n[l],t=t.innerType}if(!c){if(!t.fields||!t.fields[f])throw new Error("The schema does not contain the path: ".concat(e,". ")+"(failed at: ".concat(o,' which is a type: "').concat(t._type,'")'));r=n,n=n&&n[f],t=t.fields[f]}i=f,o=s?"["+u+"]":"."+u})),{schema:t,parent:r,parentPath:i}):{parent:r,parentPath:e,schema:t}}var Y=n(2),Z=n(23),Q=function(){function t(){Object(a.a)(this,t),this.list=new Set,this.refs=new Map}return Object(u.a)(t,[{key:"size",get:function(){return this.list.size+this.refs.size}},{key:"describe",value:function(){var t,e=[],n=Object(Z.a)(this.list);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.push(r)}}catch(u){n.e(u)}finally{n.f()}var i,o=Object(Z.a)(this.refs);try{for(o.s();!(i=o.n()).done;){var a=Object(Y.a)(i.value,2)[1];e.push(a.describe())}}catch(u){o.e(u)}finally{o.f()}return e}},{key:"toArray",value:function(){return Array.from(this.list).concat(Array.from(this.refs.values()))}},{key:"add",value:function(t){V.isRef(t)?this.refs.set(t.key,t):this.list.add(t)}},{key:"delete",value:function(t){V.isRef(t)?this.refs.delete(t.key):this.list.delete(t)}},{key:"has",value:function(t,e){if(this.list.has(t))return!0;for(var n,r=this.refs.values();!(n=r.next()).done;)if(e(n.value)===t)return!0;return!1}},{key:"clone",value:function(){var e=new t;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}},{key:"merge",value:function(t,e){var n=this.clone();return t.list.forEach((function(t){return n.add(t)})),t.refs.forEach((function(t){return n.add(t)})),e.list.forEach((function(t){return n.delete(t)})),e.refs.forEach((function(t){return n.delete(t)})),n}}]),t}();function X(){return(X=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=this.resolve(X({value:t},e)),r=n._cast(t,e);if(void 0!==t&&!1!==e.assert&&!0!==n.isType(r)){var i=b(t),o=b(r);throw new TypeError("The value of ".concat(e.path||"field"," could not be cast to a value ")+'that satisfies the schema type: "'.concat(n._type,'". \n\n')+"attempted value: ".concat(i," \n")+(o!==i?"result of cast: ".concat(o):""))}return r}},{key:"_cast",value:function(t,e){var n=this,r=void 0===t?t:this.transforms.reduce((function(e,r){return r.call(n,e,t,n)}),t);return void 0===r&&(r=this.getDefault()),r}},{key:"_validate",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=n.sync,o=n.path,a=n.from,u=void 0===a?[]:a,s=n.originalValue,c=void 0===s?t:s,f=n.strict,l=void 0===f?this.spec.strict:f,d=n.abortEarly,h=void 0===d?this.spec.abortEarly:d,p=t;l||(p=this._cast(p,X({assert:!1},n)));var g={value:p,path:o,options:n,originalValue:c,schema:this,label:this.spec.label,sync:i,from:u},m=[];this._typeError&&m.push(this._typeError),this._whitelistError&&m.push(this._whitelistError),this._blacklistError&&m.push(this._blacklistError),D({args:g,value:p,path:o,sync:i,tests:m,endEarly:h},(function(t){t?r(t,p):D({tests:e.tests,args:g,path:o,sync:i,value:p,endEarly:h},r)}))}},{key:"validate",value:function(t,e,n){var r=this.resolve(X({},e,{value:t}));return"function"===typeof n?r._validate(t,e,n):new Promise((function(n,i){return r._validate(t,e,(function(t,e){t?i(t):n(e)}))}))}},{key:"validateSync",value:function(t,e){var n;return this.resolve(X({},e,{value:t}))._validate(t,X({},e,{sync:!0}),(function(t,e){if(t)throw t;n=e})),n}},{key:"isValid",value:function(t,e){return this.validate(t,e).then((function(){return!0}),(function(t){if(j.isError(t))return!1;throw t}))}},{key:"isValidSync",value:function(t,e){try{return this.validateSync(t,e),!0}catch(n){if(j.isError(n))return!1;throw n}}},{key:"_getDefault",value:function(){var t=this.spec.default;return null==t?t:"function"===typeof t?t.call(this):c(t)}},{key:"getDefault",value:function(t){return this.resolve(t||{})._getDefault()}},{key:"default",value:function(t){if(0===arguments.length)return this._getDefault();var e=this.clone({default:t});return e}},{key:"strict",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.clone();return e.spec.strict=t,e}},{key:"_isPresent",value:function(t){return null!=t}},{key:"defined",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v.defined;return this.test({message:t,name:"defined",exclusive:!0,test:function(t){return void 0!==t}})}},{key:"required",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v.required;return this.clone({presence:"required"}).withMutation((function(e){return e.test({message:t,name:"required",exclusive:!0,test:function(t){return this.schema._isPresent(t)}})}))}},{key:"notRequired",value:function(){var t=this.clone({presence:"optional"});return t.tests=t.tests.filter((function(t){return"required"!==t.OPTIONS.name})),t}},{key:"nullable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.clone({nullable:!1!==t});return e}},{key:"transform",value:function(t){var e=this.clone();return e.transforms.push(t),e}},{key:"test",value:function(){var t;if(void 0===(t=1===arguments.length?"function"===typeof(arguments.length<=0?void 0:arguments[0])?{test:arguments.length<=0?void 0:arguments[0]}:arguments.length<=0?void 0:arguments[0]:2===arguments.length?{name:arguments.length<=0?void 0:arguments[0],test:arguments.length<=1?void 0:arguments[1]}:{name:arguments.length<=0?void 0:arguments[0],message:arguments.length<=1?void 0:arguments[1],test:arguments.length<=2?void 0:arguments[2]}).message&&(t.message=v.default),"function"!==typeof t.test)throw new TypeError("`test` is a required parameters");var e=this.clone(),n=W(t),r=t.exclusive||t.name&&!0===e.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(e.exclusiveTests[t.name]=!!t.exclusive),e.tests=e.tests.filter((function(e){if(e.OPTIONS.name===t.name){if(r)return!1;if(e.OPTIONS.test===n.OPTIONS.test)return!1}return!0})),e.tests.push(n),e}},{key:"when",value:function(t,e){Array.isArray(t)||"string"===typeof t||(e=t,t=".");var n=this.clone(),r=P(t).map((function(t){return new V(t)}));return r.forEach((function(t){t.isSibling&&n.deps.push(t.key)})),n.conditions.push(new $(r,e)),n}},{key:"typeError",value:function(t){var e=this.clone();return e._typeError=W({message:t,name:"typeError",test:function(t){return!(void 0!==t&&!this.schema.isType(t))||this.createError({params:{type:this.schema._type}})}}),e}},{key:"oneOf",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.oneOf,n=this.clone();return t.forEach((function(t){n._whitelist.add(t),n._blacklist.delete(t)})),n._whitelistError=W({message:e,name:"oneOf",test:function(t){if(void 0===t)return!0;var e=this.schema._whitelist;return!!e.has(t,this.resolve)||this.createError({params:{values:e.toArray().join(", ")}})}}),n}},{key:"notOneOf",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v.notOneOf,n=this.clone();return t.forEach((function(t){n._blacklist.add(t),n._whitelist.delete(t)})),n._blacklistError=W({message:e,name:"notOneOf",test:function(t){var e=this.schema._blacklist;return!e.has(t,this.resolve)||this.createError({params:{values:e.toArray().join(", ")}})}}),n}},{key:"strip",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.clone();return e.spec.strip=t,e}},{key:"describe",value:function(){var t=this.clone(),e=t.spec,n=e.label;return{meta:e.meta,label:n,type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map((function(t){return{name:t.OPTIONS.name,params:t.OPTIONS.params}})).filter((function(t,e,n){return n.findIndex((function(e){return e.name===t.name}))===e}))}}}]),t}();J.prototype.__isYupSchema__=!0;for(var tt=function(){var t=nt[et];J.prototype["".concat(t,"At")]=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=K(this,e,n,r.context),o=i.parent,a=i.parentPath,u=i.schema;return u[t](o&&o[a],X({},r,{parent:o,path:e}))}},et=0,nt=["validate","validateSync"];et0&&void 0!==arguments[0]?arguments[0]:S.isValue;return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test:function(t){return lt(t)||!0===t}})}},{key:"isFalse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:S.isValue;return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test:function(t){return lt(t)||!1===t}})}}]),n}(J);dt.prototype=ht.prototype;var pt=n(62),gt=n(51),mt=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,bt=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,vt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,yt=function(t){return lt(t)||t===t.trim()},_t={}.toString();function wt(){return new St}var St=function(t){Object(k.a)(n,t);var e=Object(C.a)(n);function n(){var t;return Object(a.a)(this,n),(t=e.call(this,{type:"string"})).withMutation((function(){t.transform((function(t){if(this.isType(t))return t;if(Array.isArray(t))return t;var e=null!=t&&t.toString?t.toString():t;return e===_t?t:e}))})),t}return Object(u.a)(n,[{key:"_typeCheck",value:function(t){return t instanceof String&&(t=t.valueOf()),"string"===typeof t}},{key:"_isPresent",value:function(t){return Object(pt.a)(Object(gt.a)(n.prototype),"_isPresent",this).call(this,t)&&!!t.length}},{key:"length",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.length;return this.test({message:e,name:"length",exclusive:!0,params:{length:t},test:function(e){return lt(e)||e.length===this.resolve(t)}})}},{key:"min",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.min;return this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return lt(e)||e.length>=this.resolve(t)}})}},{key:"max",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:y.max;return this.test({name:"max",exclusive:!0,message:e,params:{max:t},test:function(e){return lt(e)||e.length<=this.resolve(t)}})}},{key:"matches",value:function(t,e){var n,r,i=!1;if(e)if("object"===typeof e){var o=e.excludeEmptyString;i=void 0!==o&&o,n=e.message,r=e.name}else n=e;return this.test({name:r||"matches",message:n||y.matches,params:{regex:t},test:function(e){return lt(e)||""===e&&i||-1!==e.search(t)}})}},{key:"email",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.email;return this.matches(mt,{name:"email",message:t,excludeEmptyString:!0})}},{key:"url",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.url;return this.matches(bt,{name:"url",message:t,excludeEmptyString:!0})}},{key:"uuid",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.uuid;return this.matches(vt,{name:"uuid",message:t,excludeEmptyString:!1})}},{key:"ensure",value:function(){return this.default("").transform((function(t){return null===t?"":t}))}},{key:"trim",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.trim;return this.transform((function(t){return null!=t?t.trim():t})).test({message:t,name:"trim",test:yt})}},{key:"lowercase",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.lowercase;return this.transform((function(t){return lt(t)?t:t.toLowerCase()})).test({message:t,name:"string_case",exclusive:!0,test:function(t){return lt(t)||t===t.toLowerCase()}})}},{key:"uppercase",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y.uppercase;return this.transform((function(t){return lt(t)?t:t.toUpperCase()})).test({message:t,name:"string_case",exclusive:!0,test:function(t){return lt(t)||t===t.toUpperCase()}})}}]),n}(J);wt.prototype=St.prototype;function Ot(){return new xt}var xt=function(t){Object(k.a)(n,t);var e=Object(C.a)(n);function n(){var t;return Object(a.a)(this,n),(t=e.call(this,{type:"number"})).withMutation((function(){t.transform((function(t){var e=t;if("string"===typeof e){if(""===(e=e.replace(/\s/g,"")))return NaN;e=+e}return this.isType(e)?e:parseFloat(e)}))})),t}return Object(u.a)(n,[{key:"_typeCheck",value:function(t){return t instanceof Number&&(t=t.valueOf()),"number"===typeof t&&!function(t){return t!=+t}(t)}},{key:"min",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.min;return this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return lt(e)||e>=this.resolve(t)}})}},{key:"max",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.max;return this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(e){return lt(e)||e<=this.resolve(t)}})}},{key:"lessThan",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_.lessThan;return this.test({message:e,name:"max",exclusive:!0,params:{less:t},test:function(e){return lt(e)||e1&&void 0!==arguments[1]?arguments[1]:_.moreThan;return this.test({message:e,name:"min",exclusive:!0,params:{more:t},test:function(e){return lt(e)||e>this.resolve(t)}})}},{key:"positive",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_.positive;return this.moreThan(0,t)}},{key:"negative",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_.negative;return this.lessThan(0,t)}},{key:"integer",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:_.integer;return this.test({name:"integer",message:t,test:function(t){return lt(t)||Number.isInteger(t)}})}},{key:"truncate",value:function(){return this.transform((function(t){return lt(t)?t:0|t}))}},{key:"round",value:function(t){var e,n=["ceil","floor","round","trunc"];if("trunc"===(t=(null==(e=t)?void 0:e.toLowerCase())||"round"))return this.truncate();if(-1===n.indexOf(t.toLowerCase()))throw new TypeError("Only valid options for round() are: "+n.join(", "));return this.transform((function(e){return lt(e)?e:Math[t](e)}))}}]),n}(J);Ot.prototype=xt.prototype;var Et=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;var Mt=new Date("");function Tt(){return new $t}var $t=function(t){Object(k.a)(n,t);var e=Object(C.a)(n);function n(){var t;return Object(a.a)(this,n),(t=e.call(this,{type:"date"})).withMutation((function(){t.transform((function(t){return this.isType(t)?t:(t=function(t){var e,n,r=[1,4,5,6,7,10,11],i=0;if(n=Et.exec(t)){for(var o,a=0;o=r[a];++a)n[o]=+n[o]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(i=60*n[10]+n[11],"+"===n[9]&&(i=0-i)),e=Date.UTC(n[1],n[2],n[3],n[4],n[5]+i,n[6],n[7])):e=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else e=Date.parse?Date.parse(t):NaN;return e}(t),isNaN(t)?Mt:new Date(t))}))})),t}return Object(u.a)(n,[{key:"_typeCheck",value:function(t){return e=t,"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(t.getTime());var e}},{key:"prepareParam",value:function(t,e){var n;if(V.isRef(t))n=t;else{var r=this.cast(t);if(!this._typeCheck(r))throw new TypeError("`".concat(e,"` must be a Date or a value that can be `cast()` to a Date"));n=r}return n}},{key:"min",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.min,n=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(t){return lt(t)||t>=this.resolve(n)}})}},{key:"max",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w.max,n=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(t){return lt(t)||t<=this.resolve(n)}})}}]),n}(J);$t.INVALID_DATE=Mt,Tt.prototype=$t.prototype,Tt.INVALID_DATE=Mt;var At=n(397),kt=n.n(At),Ct=n(539),It=n.n(Ct),Pt=n(540),Nt=n.n(Pt),Rt=n(541),jt=n.n(Rt);function Dt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=[];function i(t,i){var o=Object(B.split)(t)[0];~r.indexOf(o)||r.push(o),~e.indexOf("".concat(i,"-").concat(o))||n.push([i,o])}var o=function(e){if(M()(t,e)){var n=t[e];~r.indexOf(e)||r.push(e),V.isRef(n)&&n.isSibling?i(n.path,e):T(n)&&"deps"in n&&n.deps.forEach((function(t){return i(t,e)}))}};for(var a in t)o(a);return jt.a.array(r,n).reverse()}function Lt(t,e){var n=1/0;return t.some((function(t,r){var i;if(-1!==(null==(i=e.path)?void 0:i.indexOf(t)))return n=r,!0})),n}function Ft(t){return function(e,n){return Lt(t,e)-Lt(t,n)}}function Bt(){return(Bt=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},o=Object(pt.a)(Object(gt.a)(n.prototype),"_cast",this).call(this,t,i);if(void 0===o)return this.getDefault();if(!this._typeCheck(o))return o;var a,u=this.fields,s=null!=(e=i.stripUnknown)?e:this.spec.noUnknown,c=this._nodes.concat(Object.keys(o).filter((function(t){return-1===r._nodes.indexOf(t)}))),f={},l=Bt({},i,{parent:f,__validating:i.__validating||!1}),d=!1,h=Object(Z.a)(c);try{for(h.s();!(a=h.n()).done;){var p=a.value,g=u[p],m=M()(o,p);if(g){var b=void 0,v=o[p];l.path=(i.path?"".concat(i.path,"."):"")+p;var y="spec"in(g=g.resolve({value:v,context:i.context,parent:f}))?g.spec:void 0,_=null==y?void 0:y.strict;if(null==y?void 0:y.strip){d=d||p in o;continue}void 0!==(b=i.__validating&&_?o[p]:g.cast(o[p],l))&&(f[p]=b)}else m&&!s&&(f[p]=o[p]);f[p]!==o[p]&&(d=!0)}}catch(w){h.e(w)}finally{h.f()}return d?f:o}},{key:"_validate",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0,a=[],u=r.sync,s=r.from,c=void 0===s?[]:s,f=r.originalValue,l=void 0===f?t:f,d=r.abortEarly,h=void 0===d?this.spec.abortEarly:d,p=r.recursive,g=void 0===p?this.spec.recursive:p;c=[{schema:this,value:l}].concat(Object(o.a)(c)),r.__validating=!0,r.originalValue=l,r.from=c,Object(pt.a)(Object(gt.a)(n.prototype),"_validate",this).call(this,t,r,(function(t,n){if(t){if(!j.isError(t)||h)return void i(t,n);a.push(t)}if(g&&Ut(n)){l=l||n;var o=e._nodes.map((function(t){return function(i,o){var a=-1===t.indexOf(".")?(r.path?"".concat(r.path,"."):"")+t:"".concat(r.path||"",'["').concat(t,'"]'),u=e.fields[t];u&&"validate"in u?u.validate(n[t],Bt({},r,{path:a,from:c,strict:!0,parent:n,originalValue:l[t]}),o):o(null)}}));D({sync:u,tests:o,value:n,errors:a,endEarly:h,sort:e._sortErrors,path:r.path},i)}else i(a[0]||null,n)}))}},{key:"clone",value:function(t){var e=Object(pt.a)(Object(gt.a)(n.prototype),"clone",this).call(this,t);return e.fields=Bt({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}},{key:"concat",value:function(t){for(var e=Object(pt.a)(Object(gt.a)(n.prototype),"concat",this).call(this,t),r=e.fields,i=0,o=Object.entries(this.fields);i1&&void 0!==arguments[1]?arguments[1]:[],n=this.clone(),r=Object.assign(n.fields,t);if(n.fields=r,n._sortErrors=Ft(Object.keys(r)),e.length){Array.isArray(e[0])||(e=[e]);var i=e.map((function(t){var e=Object(Y.a)(t,2),n=e[0],r=e[1];return"".concat(n,"-").concat(r)}));n._excludedEdges=n._excludedEdges.concat(i)}return n._nodes=Dt(r,n._excludedEdges),n}},{key:"pick",value:function(t){var e,n={},r=Object(Z.a)(t);try{for(r.s();!(e=r.n()).done;){var i=e.value;this.fields[i]&&(n[i]=this.fields[i])}}catch(o){r.e(o)}finally{r.f()}return this.clone().withMutation((function(t){return t.fields={},t.shape(n)}))}},{key:"omit",value:function(t){var e=this.clone(),n=e.fields;e.fields={};var r,i=Object(Z.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;delete n[o]}}catch(a){i.e(a)}finally{i.f()}return e.withMutation((function(){return e.shape(n)}))}},{key:"from",value:function(t,e,n){var r=Object(B.getter)(t,!0);return this.transform((function(i){if(null==i)return i;var o=i;return M()(i,t)&&(o=Bt({},i),n||delete o[t],o[e]=r(i)),o}))}},{key:"noUnknown",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.noUnknown;"string"===typeof t&&(e=t,t=!0);var n=this.test({name:"noUnknown",exclusive:!0,message:e,test:function(e){if(null==e)return!0;var n=zt(this.schema,e);return!t||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=t,n}},{key:"unknown",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:O.noUnknown;return this.noUnknown(!t,e)}},{key:"transformKeys",value:function(t){return this.transform((function(e){return e&&Nt()(e,(function(e,n){return t(n)}))}))}},{key:"camelCase",value:function(){return this.transformKeys(It.a)}},{key:"snakeCase",value:function(){return this.transformKeys(kt.a)}},{key:"constantCase",value:function(){return this.transformKeys((function(t){return kt()(t).toUpperCase()}))}},{key:"describe",value:function(){var t=Object(pt.a)(Object(gt.a)(n.prototype),"describe",this).call(this);return t.fields=F()(this.fields,(function(t){return t.describe()})),t}}]),n}(J);function qt(t){return new Vt(t)}function Wt(){return(Wt=Object.assign||function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2?arguments[2]:void 0,u=[],s=o.sync,c=o.path,f=this.innerType,l=null!=(e=o.abortEarly)?e:this.spec.abortEarly,d=null!=(r=o.recursive)?r:this.spec.recursive,h=null!=o.originalValue?o.originalValue:t;Object(pt.a)(Object(gt.a)(n.prototype),"_validate",this).call(this,t,o,(function(t,e){if(t){if(!j.isError(t)||l)return void a(t,e);u.push(t)}if(d&&f&&i._typeCheck(e)){h=h||e;for(var n=new Array(e.length),r=function(t){var r=e[t],i="".concat(o.path||"","[").concat(t,"]"),a=Wt({},o,{path:i,strict:!0,parent:e,index:t,originalValue:h[t]});n[t]=function(t,e){return f.validate(r,a,e)}},p=0;p1&&void 0!==arguments[1]?arguments[1]:x.length;return this.test({message:e,name:"length",exclusive:!0,params:{length:t},test:function(e){return lt(e)||e.length===this.resolve(t)}})}},{key:"min",value:function(t,e){return e=e||x.min,this.test({message:e,name:"min",exclusive:!0,params:{min:t},test:function(e){return lt(e)||e.length>=this.resolve(t)}})}},{key:"max",value:function(t,e){return e=e||x.max,this.test({message:e,name:"max",exclusive:!0,params:{max:t},test:function(e){return lt(e)||e.length<=this.resolve(t)}})}},{key:"ensure",value:function(){var t=this;return this.default((function(){return[]})).transform((function(e,n){return t._typeCheck(e)?e:null==n?[]:[].concat(n)}))}},{key:"compact",value:function(t){var e=t?function(e,n,r){return!t(e,n,r)}:function(t){return!!t};return this.transform((function(t){return null!=t?t.filter(e):t}))}},{key:"describe",value:function(){var t=Object(pt.a)(Object(gt.a)(n.prototype),"describe",this).call(this);return this.innerType&&(t.innerType=this.innerType.describe()),t}},{key:"nullable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return Object(pt.a)(Object(gt.a)(n.prototype),"nullable",this).call(this,t)}},{key:"defined",value:function(){return Object(pt.a)(Object(gt.a)(n.prototype),"defined",this).call(this)}},{key:"required",value:function(t){return Object(pt.a)(Object(gt.a)(n.prototype),"required",this).call(this,t)}}]),n}(J);function Yt(t){return new Zt(t)}Gt.prototype=Kt.prototype;var Zt=function(){function t(e){var n=this;Object(a.a)(this,t),this.type="lazy",this.__isYupSchema__=!0,this._resolve=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.builder(t,e);if(!T(r))throw new TypeError("lazy() functions must return a valid schema");return r.resolve(e)},this.builder=e}return Object(u.a)(t,[{key:"resolve",value:function(t){return this._resolve(t.value,t)}},{key:"cast",value:function(t,e){return this._resolve(t,e).cast(t,e)}},{key:"validate",value:function(t,e,n){return this._resolve(t,e).validate(t,e,n)}},{key:"validateSync",value:function(t,e){return this._resolve(t,e).validateSync(t,e)}},{key:"validateAt",value:function(t,e,n){return this._resolve(e,n).validateAt(t,e,n)}},{key:"validateSyncAt",value:function(t,e,n){return this._resolve(e,n).validateSyncAt(t,e,n)}},{key:"describe",value:function(){return null}},{key:"isValid",value:function(t,e){return this._resolve(t,e).isValid(t,e)}},{key:"isValidSync",value:function(t,e){return this._resolve(t,e).isValidSync(t,e)}}]),t}()},function(t,e,n){"use strict";function r(){return(r=Object.assign||function(t){for(var e=1;e0&&(c=new a.b({graphQLErrors:s})),t=Object(i.a)(Object(i.a)({},t),{loading:r,networkStatus:u,error:c,called:!0}),r){var l=this.previousData.result&&this.previousData.result.data;t.data=l&&f?Object(i.a)(Object(i.a)({},l),f):l||f}else if(c)Object.assign(t,{data:(this.currentObservable.query.getLastResult()||{}).data});else{var d=this.currentObservable.query.options.fetchPolicy;if(e.partialRefetch&&!f&&o&&"cache-only"!==d)return Object.assign(t,{loading:!0,networkStatus:a.c.loading}),t.refetch(),t;t.data=f}}return t.client=this.client,this.previousData.loading=this.previousData.result&&this.previousData.result.loading||!1,this.previousData.result=t,this.currentObservable.query&&this.currentObservable.query.resetQueryStoreErrors(),t},e.prototype.handleErrorOrCompleted=function(){if(this.currentObservable.query&&this.previousData.result){var t=this.previousData.result,e=t.data,n=t.loading,r=t.error;if(!n){var i=this.getOptions(),o=i.query,a=i.variables,s=i.onCompleted,c=i.onError;if(this.previousOptions&&!this.previousData.loading&&Object(u.a)(this.previousOptions.query,o)&&Object(u.a)(this.previousOptions.variables,a))return;s&&!r?s(e):c&&r&&c(r)}}},e.prototype.removeQuerySubscription=function(){this.currentObservable.subscription&&(this.currentObservable.subscription.unsubscribe(),delete this.currentObservable.subscription)},e.prototype.observableQueryFields=function(){return{variables:this.currentObservable.query.variables,refetch:this.obsRefetch,fetchMore:this.obsFetchMore,updateQuery:this.obsUpdateQuery,startPolling:this.obsStartPolling,stopPolling:this.obsStopPolling,subscribeToMore:this.obsSubscribeToMore}},e}(c);function l(t,e,n){void 0===n&&(n=!1);var a=Object(o.useContext)(Object(r.c)()),s=Object(o.useReducer)((function(t){return t+1}),0),c=s[0],l=s[1],d=e?Object(i.a)(Object(i.a)({},e),{query:t}):{query:t},h=Object(o.useRef)(),p=h.current||new f({options:d,context:a,onNewData:function(){p.ssrInitiated()?l():Promise.resolve().then(l)}});p.setOptions(d),p.context=a,p.ssrInitiated()&&!h.current&&(h.current=p);var g=function(t,e){var n=Object(o.useRef)();return n.current&&Object(u.a)(e,n.current.key)||(n.current={key:e,value:t()}),n.current.value}((function(){return n?p.executeLazy():p.execute()}),{options:Object(i.a)(Object(i.a)({},d),{onError:void 0,onCompleted:void 0}),context:a,tick:c}),m=n?g[1]:g;return Object(o.useEffect)((function(){return h.current||(h.current=p),function(){return p.cleanup()}}),[]),Object(o.useEffect)((function(){return p.afterExecute({lazy:n})}),[m.loading,m.networkStatus,m.error,m.data]),g}function d(t,e){return l(t,e,!1)}function h(t,e){return l(t,e,!0)}var p=function(t){function e(e){var n=e.options,i=e.context,o=e.result,a=e.setResult,u=t.call(this,n,i)||this;return u.runMutation=function(t){void 0===t&&(t={}),u.onMutationStart();var e=u.generateNewMutationId();return u.mutate(t).then((function(t){return u.onMutationCompleted(t,e),t})).catch((function(t){if(u.onMutationError(t,e),!u.getOptions().onError)throw t}))},u.verifyDocumentType(n.mutation,r.b.Mutation),u.result=o,u.setResult=a,u.mostRecentMutationId=0,u}return Object(i.c)(e,t),e.prototype.execute=function(t){return this.isMounted=!0,this.verifyDocumentType(this.getOptions().mutation,r.b.Mutation),t.client=this.refreshClient().client,[this.runMutation,t]},e.prototype.afterExecute=function(){return this.isMounted=!0,this.unmount.bind(this)},e.prototype.cleanup=function(){},e.prototype.mutate=function(t){var e=this.getOptions(),n=e.mutation,r=e.variables,o=e.optimisticResponse,a=e.update,u=e.context,s=void 0===u?{}:u,c=e.awaitRefetchQueries,f=void 0!==c&&c,l=e.fetchPolicy,d=Object(i.a)({},t),h=Object.assign({},r,d.variables);return delete d.variables,this.refreshClient().client.mutate(Object(i.a)({mutation:n,optimisticResponse:o,refetchQueries:d.refetchQueries||this.getOptions().refetchQueries,awaitRefetchQueries:f,update:a,context:s,fetchPolicy:l,variables:h},d))},e.prototype.onMutationStart=function(){this.result.loading||this.getOptions().ignoreResults||this.updateResult({loading:!0,error:void 0,data:void 0,called:!0})},e.prototype.onMutationCompleted=function(t,e){var n=this.getOptions(),r=n.onCompleted,i=n.ignoreResults,o=t.data,u=t.errors,s=u&&u.length>0?new a.b({graphQLErrors:u}):void 0;this.isMostRecentMutation(e)&&!i&&this.updateResult({called:!0,loading:!1,data:o,error:s}),r&&r(o)},e.prototype.onMutationError=function(t,e){var n=this.getOptions().onError;this.isMostRecentMutation(e)&&this.updateResult({loading:!1,error:t,data:void 0,called:!0}),n&&n(t)},e.prototype.generateNewMutationId=function(){return++this.mostRecentMutationId},e.prototype.isMostRecentMutation=function(t){return this.mostRecentMutationId===t},e.prototype.updateResult=function(t){!this.isMounted||this.previousResult&&Object(u.a)(this.previousResult,t)||(this.setResult(t),this.previousResult=t)},e}(c);function g(t,e){var n=Object(o.useContext)(Object(r.c)()),a=Object(o.useState)({called:!1,loading:!1}),u=a[0],s=a[1],c=e?Object(i.a)(Object(i.a)({},e),{mutation:t}):{mutation:t},f=Object(o.useRef)();var l=(f.current||(f.current=new p({options:c,context:n,result:u,setResult:s})),f.current);return l.setOptions(c),l.context=n,Object(o.useEffect)((function(){return l.afterExecute()})),l.execute(u)}!function(t){function e(e){var n=e.options,r=e.context,i=e.setResult,o=t.call(this,n,r)||this;return o.currentObservable={},o.setResult=i,o.initialize(n),o}Object(i.c)(e,t),e.prototype.execute=function(t){if(!0===this.getOptions().skip)return this.cleanup(),{loading:!1,error:void 0,data:void 0,variables:this.getOptions().variables};var e=t;this.refreshClient().isNew&&(e=this.getLoadingResult());var n=this.getOptions().shouldResubscribe;return"function"===typeof n&&(n=!!n(this.getOptions())),!1!==n&&this.previousOptions&&Object.keys(this.previousOptions).length>0&&(this.previousOptions.subscription!==this.getOptions().subscription||!Object(u.a)(this.previousOptions.variables,this.getOptions().variables)||this.previousOptions.skip!==this.getOptions().skip)&&(this.cleanup(),e=this.getLoadingResult()),this.initialize(this.getOptions()),this.startSubscription(),this.previousOptions=this.getOptions(),Object(i.a)(Object(i.a)({},e),{variables:this.getOptions().variables})},e.prototype.afterExecute=function(){this.isMounted=!0},e.prototype.cleanup=function(){this.endSubscription(),delete this.currentObservable.query},e.prototype.initialize=function(t){this.currentObservable.query||!0===this.getOptions().skip||(this.currentObservable.query=this.refreshClient().client.subscribe({query:t.subscription,variables:t.variables,fetchPolicy:t.fetchPolicy}))},e.prototype.startSubscription=function(){this.currentObservable.subscription||(this.currentObservable.subscription=this.currentObservable.query.subscribe({next:this.updateCurrentData.bind(this),error:this.updateError.bind(this),complete:this.completeSubscription.bind(this)}))},e.prototype.getLoadingResult=function(){return{loading:!0,error:void 0,data:void 0}},e.prototype.updateResult=function(t){this.isMounted&&this.setResult(t)},e.prototype.updateCurrentData=function(t){var e=this.getOptions().onSubscriptionData;this.updateResult({data:t.data,loading:!1,error:void 0}),e&&e({client:this.refreshClient().client,subscriptionData:t})},e.prototype.updateError=function(t){this.updateResult({error:t,loading:!1})},e.prototype.completeSubscription=function(){var t=this.getOptions().onSubscriptionComplete;t&&t(),this.endSubscription()},e.prototype.endSubscription=function(){this.currentObservable.subscription&&(this.currentObservable.subscription.unsubscribe(),delete this.currentObservable.subscription)}}(c);!function(){function t(){this.queryPromises=new Map,this.queryInfoTrie=new Map}t.prototype.registerSSRObservable=function(t,e){this.lookupQueryInfo(e).observable=t},t.prototype.getSSRObservable=function(t){return this.lookupQueryInfo(t).observable},t.prototype.addQueryPromise=function(t,e){return this.lookupQueryInfo(t.getOptions()).seen?e():(this.queryPromises.set(t.getOptions(),new Promise((function(e){e(t.fetchData())}))),null)},t.prototype.hasPromises=function(){return this.queryPromises.size>0},t.prototype.consumeAndAwaitPromises=function(){var t=this,e=[];return this.queryPromises.forEach((function(n,r){t.lookupQueryInfo(r).seen=!0,e.push(n)})),this.queryPromises.clear(),Promise.all(e)},t.prototype.lookupQueryInfo=function(t){var e=this.queryInfoTrie,n=t.query,r=t.variables,i=e.get(n)||new Map;e.has(n)||e.set(n,i);var o=JSON.stringify(r),a=i.get(o)||{seen:!1,observable:null};return i.has(o)||i.set(o,a),a}}()},function(t,e,n){"use strict";function r(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}n.d(e,"a",(function(){return r}))},function(t,e,n){var r=n(969).parse;function i(t){return t.replace(/[\s,]+/g," ").trim()}var o={},a={};var u=!0;function s(t,e){var n=Object.prototype.toString.call(t);if("[object Array]"===n)return t.map((function(t){return s(t,e)}));if("[object Object]"!==n)throw new Error("Unexpected input.");e&&t.loc&&delete t.loc,t.loc&&(delete t.loc.startToken,delete t.loc.endToken);var r,i,o,a=Object.keys(t);for(r in a)a.hasOwnProperty(r)&&(i=t[a[r]],"[object Object]"!==(o=Object.prototype.toString.call(i))&&"[object Array]"!==o||(t[a[r]]=s(i,!0)));return t}var c=!1;function f(t){var e=i(t);if(o[e])return o[e];var n=r(t,{experimentalFragmentVariables:c});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");return n=s(n=function(t){for(var e,n={},r=[],o=0;o-1};var F=function(t,e){var n=this.__data__,r=N(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function B(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991},Kt={};Kt["[object Float32Array]"]=Kt["[object Float64Array]"]=Kt["[object Int8Array]"]=Kt["[object Int16Array]"]=Kt["[object Int32Array]"]=Kt["[object Uint8Array]"]=Kt["[object Uint8ClampedArray]"]=Kt["[object Uint16Array]"]=Kt["[object Uint32Array]"]=!0,Kt["[object Arguments]"]=Kt["[object Array]"]=Kt["[object ArrayBuffer]"]=Kt["[object Boolean]"]=Kt["[object DataView]"]=Kt["[object Date]"]=Kt["[object Error]"]=Kt["[object Function]"]=Kt["[object Map]"]=Kt["[object Number]"]=Kt["[object Object]"]=Kt["[object RegExp]"]=Kt["[object Set]"]=Kt["[object String]"]=Kt["[object WeakMap]"]=!1;var Yt=function(t){return E(t)&&Gt(t.length)&&!!Kt[S(t)]};var Zt=function(t){return function(e){return t(e)}},Qt=n(154),Xt=Qt.a&&Qt.a.isTypedArray,Jt=Xt?Zt(Xt):Yt,te=Object.prototype.hasOwnProperty;var ee=function(t,e){var n=Ht(t),r=!n&&zt(t),i=!n&&!r&&Object(Vt.a)(t),o=!n&&!r&&!i&&Jt(t),a=n||r||i||o,u=a?Dt(t.length,String):[],s=u.length;for(var c in t)!e&&!te.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Wt(c,s))||u.push(c);return u},ne=Object.prototype;var re=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||ne)},ie=O(Object.keys,Object),oe=Object.prototype.hasOwnProperty;var ae=function(t){if(!re(t))return ie(t);var e=[];for(var n in Object(t))oe.call(t,n)&&"constructor"!=n&&e.push(n);return e};var ue=function(t){return null!=t&&Gt(t.length)&&!G(t)};var se=function(t){return ue(t)?ee(t):ae(t)};var ce=function(t,e){return t&&jt(e,se(e),t)};var fe=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},le=Object.prototype.hasOwnProperty;var de=function(t){if(!W(t))return fe(t);var e=re(t),n=[];for(var r in t)("constructor"!=r||!e&&le.call(t,r))&&n.push(r);return n};var he=function(t){return ue(t)?ee(t,!0):de(t)};var pe=function(t,e){return t&&jt(e,he(e),t)},ge=n(538);var me=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n=0||(i[n]=t[n]);return i}function Bn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var Un=function(t){return Array.isArray(t)&&0===t.length},zn=function(t){return"function"===typeof t},Hn=function(t){return null!==t&&"object"===typeof t},Vn=function(t){return String(Math.floor(Number(t)))===t},qn=function(t){return"[object String]"===Object.prototype.toString.call(t)},Wn=function(t){return 0===r.Children.count(t)},Gn=function(t){return Hn(t)&&zn(t.then)};function Kn(t,e,n,r){void 0===r&&(r=0);for(var i=Cn(e);t&&r=0?[]:{}}}return(0===o?t:i)[a[o]]===n?t:(void 0===n?delete i[a[o]]:i[a[o]]=n,0===o&&void 0===n&&delete r[a[o]],r)}function Zn(t,e,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var i=0,o=Object.keys(t);i=n.length)break;o=n[i++]}else{if((i=n.next()).done)break;o=i.value}var a=o;Kn(e,a.path)||(e=Yn(e,a.path,a.message))}}return e}(n)):e(n)}))}))}),[g.validationSchema]),T=Object(r.useCallback)((function(t,e){return new Promise((function(n){return n(w.current[t].validate(e))}))}),[]),$=Object(r.useCallback)((function(t){var e=Object.keys(w.current).filter((function(t){return zn(w.current[t].validate)})),n=e.length>0?e.map((function(e){return T(e,Kn(t,e))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(t){return t.reduce((function(t,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(t=Yn(t,e[r],n)),t}),{})}))}),[T]),A=Object(r.useCallback)((function(t){return Promise.all([$(t),g.validationSchema?M(t):{},g.validate?E(t):{}]).then((function(t){var e=t[0],n=t[1],r=t[2];return l.all([e,n,r],{arrayMerge:ur})}))}),[g.validate,g.validationSchema,$,E,M]),k=cr((function(t){return void 0===t&&(t=O.values),Object(Pn.unstable_runWithPriority)(Pn.unstable_LowPriority,(function(){return A(t).then((function(t){return _.current&&x({type:"SET_ERRORS",payload:t}),t})).catch((function(t){0}))}))})),C=cr((function(t){return void 0===t&&(t=O.values),x({type:"SET_ISVALIDATING",payload:!0}),A(t).then((function(t){return _.current&&(x({type:"SET_ISVALIDATING",payload:!1}),o()(O.errors,t)||x({type:"SET_ERRORS",payload:t})),t}))}));Object(r.useEffect)((function(){s&&!0===_.current&&o()(m.current,g.initialValues)&&k(m.current)}),[s,k]);var I=Object(r.useCallback)((function(t){var e=t&&t.values?t.values:m.current,n=t&&t.errors?t.errors:b.current?b.current:g.initialErrors||{},r=t&&t.touched?t.touched:v.current?v.current:g.initialTouched||{},i=t&&t.status?t.status:y.current?y.current:g.initialStatus;m.current=e,b.current=n,v.current=r,y.current=i;var o=function(){x({type:"RESET_FORM",payload:{isSubmitting:!!t&&!!t.isSubmitting,errors:n,touched:r,status:i,values:e,isValidating:!!t&&!!t.isValidating,submitCount:t&&t.submitCount&&"number"===typeof t.submitCount?t.submitCount:0}})};if(g.onReset){var a=g.onReset(O.values,Q);Gn(a)?a.then(o):o()}else o()}),[g.initialErrors,g.initialStatus,g.initialTouched]);Object(r.useEffect)((function(){!0!==_.current||o()(m.current,g.initialValues)||(d&&(m.current=g.initialValues,I()),s&&k(m.current))}),[d,g.initialValues,I,s,k]),Object(r.useEffect)((function(){d&&!0===_.current&&!o()(b.current,g.initialErrors)&&(b.current=g.initialErrors||nr,x({type:"SET_ERRORS",payload:g.initialErrors||nr}))}),[d,g.initialErrors]),Object(r.useEffect)((function(){d&&!0===_.current&&!o()(v.current,g.initialTouched)&&(v.current=g.initialTouched||rr,x({type:"SET_TOUCHED",payload:g.initialTouched||rr}))}),[d,g.initialTouched]),Object(r.useEffect)((function(){d&&!0===_.current&&!o()(y.current,g.initialStatus)&&(y.current=g.initialStatus,x({type:"SET_STATUS",payload:g.initialStatus}))}),[d,g.initialStatus,g.initialTouched]);var P=cr((function(t){if(w.current[t]&&zn(w.current[t].validate)){var e=Kn(O.values,t),n=w.current[t].validate(e);return Gn(n)?(x({type:"SET_ISVALIDATING",payload:!0}),n.then((function(t){return t})).then((function(e){x({type:"SET_FIELD_ERROR",payload:{field:t,value:e}}),x({type:"SET_ISVALIDATING",payload:!1})}))):(x({type:"SET_FIELD_ERROR",payload:{field:t,value:n}}),Promise.resolve(n))}return g.validationSchema?(x({type:"SET_ISVALIDATING",payload:!0}),M(O.values,t).then((function(t){return t})).then((function(e){x({type:"SET_FIELD_ERROR",payload:{field:t,value:e[t]}}),x({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),N=Object(r.useCallback)((function(t,e){var n=e.validate;w.current[t]={validate:n}}),[]),R=Object(r.useCallback)((function(t){delete w.current[t]}),[]),j=cr((function(t,e){return x({type:"SET_TOUCHED",payload:t}),(void 0===e?a:e)?k(O.values):Promise.resolve()})),D=Object(r.useCallback)((function(t){x({type:"SET_ERRORS",payload:t})}),[]),L=cr((function(t,e){var r=zn(t)?t(O.values):t;return x({type:"SET_VALUES",payload:r}),(void 0===e?n:e)?k(r):Promise.resolve()})),F=Object(r.useCallback)((function(t,e){x({type:"SET_FIELD_ERROR",payload:{field:t,value:e}})}),[]),B=cr((function(t,e,r){return x({type:"SET_FIELD_VALUE",payload:{field:t,value:e}}),(void 0===r?n:r)?k(Yn(O.values,t,e)):Promise.resolve()})),U=Object(r.useCallback)((function(t,e){var n,r=e,i=t;if(!qn(t)){t.persist&&t.persist();var o=t.target?t.target:t.currentTarget,a=o.type,u=o.name,s=o.id,c=o.value,f=o.checked,l=(o.outerHTML,o.options),d=o.multiple;r=e||(u||s),i=/number|range/.test(a)?(n=parseFloat(c),isNaN(n)?"":n):/checkbox/.test(a)?function(t,e,n){if("boolean"===typeof t)return Boolean(e);var r=[],i=!1,o=-1;if(Array.isArray(t))r=t,i=(o=t.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(e);if(e&&n&&!i)return r.concat(n);if(!i)return r;return r.slice(0,o).concat(r.slice(o+1))}(Kn(O.values,r),f,c):d?function(t){return Array.from(t).filter((function(t){return t.selected})).map((function(t){return t.value}))}(l):c}r&&B(r,i)}),[B,O.values]),z=cr((function(t){if(qn(t))return function(e){return U(e,t)};U(t)})),H=cr((function(t,e,n){return void 0===e&&(e=!0),x({type:"SET_FIELD_TOUCHED",payload:{field:t,value:e}}),(void 0===n?a:n)?k(O.values):Promise.resolve()})),V=Object(r.useCallback)((function(t,e){t.persist&&t.persist();var n=t.target,r=n.name,i=n.id,o=(n.outerHTML,e||(r||i));H(o,!0)}),[H]),q=cr((function(t){if(qn(t))return function(e){return V(e,t)};V(t)})),W=Object(r.useCallback)((function(t){zn(t)?x({type:"SET_FORMIK_STATE",payload:t}):x({type:"SET_FORMIK_STATE",payload:function(){return t}})}),[]),G=Object(r.useCallback)((function(t){x({type:"SET_STATUS",payload:t})}),[]),K=Object(r.useCallback)((function(t){x({type:"SET_ISSUBMITTING",payload:t})}),[]),Y=cr((function(){return x({type:"SUBMIT_ATTEMPT"}),C().then((function(t){var e=t instanceof Error;if(!e&&0===Object.keys(t).length){var n;try{if(void 0===(n=X()))return}catch(r){throw r}return Promise.resolve(n).then((function(t){return _.current&&x({type:"SUBMIT_SUCCESS"}),t})).catch((function(t){if(_.current)throw x({type:"SUBMIT_FAILURE"}),t}))}if(_.current&&(x({type:"SUBMIT_FAILURE"}),e))throw t}))})),Z=cr((function(t){t&&t.preventDefault&&zn(t.preventDefault)&&t.preventDefault(),t&&t.stopPropagation&&zn(t.stopPropagation)&&t.stopPropagation(),Y().catch((function(t){console.warn("Warning: An unhandled error was caught from submitForm()",t)}))})),Q={resetForm:I,validateForm:C,validateField:P,setErrors:D,setFieldError:F,setFieldTouched:H,setFieldValue:B,setStatus:G,setSubmitting:K,setTouched:j,setValues:L,setFormikState:W,submitForm:Y},X=cr((function(){return h(O.values,Q)})),J=cr((function(t){t&&t.preventDefault&&zn(t.preventDefault)&&t.preventDefault(),t&&t.stopPropagation&&zn(t.stopPropagation)&&t.stopPropagation(),I()})),tt=Object(r.useCallback)((function(t){return{value:Kn(O.values,t),error:Kn(O.errors,t),touched:!!Kn(O.touched,t),initialValue:Kn(m.current,t),initialTouched:!!Kn(v.current,t),initialError:Kn(b.current,t)}}),[O.errors,O.touched,O.values]),et=Object(r.useCallback)((function(t){return{setValue:function(e,n){return B(t,e,n)},setTouched:function(e,n){return H(t,e,n)},setError:function(e){return F(t,e)}}}),[B,H,F]),nt=Object(r.useCallback)((function(t){var e=Hn(t),n=e?t.name:t,r=Kn(O.values,n),i={name:n,value:r,onChange:z,onBlur:q};if(e){var o=t.type,a=t.value,u=t.as,s=t.multiple;"checkbox"===o?void 0===a?i.checked=!!r:(i.checked=!(!Array.isArray(r)||!~r.indexOf(a)),i.value=a):"radio"===o?(i.checked=r===a,i.value=a):"select"===u&&s&&(i.value=i.value||[],i.multiple=!0)}return i}),[q,z,O.values]),rt=Object(r.useMemo)((function(){return!o()(m.current,O.values)}),[m.current,O.values]),it=Object(r.useMemo)((function(){return"undefined"!==typeof c?rt?O.errors&&0===Object.keys(O.errors).length:!1!==c&&zn(c)?c(g):c:O.errors&&0===Object.keys(O.errors).length}),[c,rt,O.errors,g]);return Dn({},O,{initialValues:m.current,initialErrors:b.current,initialTouched:v.current,initialStatus:y.current,handleBlur:q,handleChange:z,handleReset:J,handleSubmit:Z,resetForm:I,setErrors:D,setFormikState:W,setFieldTouched:H,setFieldValue:B,setFieldError:F,setStatus:G,setSubmitting:K,setTouched:j,setValues:L,submitForm:Y,validateForm:C,validateField:P,isValid:it,dirty:rt,unregisterField:R,registerField:N,getFieldProps:nt,getFieldMeta:tt,getFieldHelpers:et,validateOnBlur:a,validateOnChange:n,validateOnMount:s})}function or(t){var e=ir(t),n=t.component,i=t.children,o=t.render,a=t.innerRef;return Object(r.useImperativeHandle)(a,(function(){return e})),Object(r.createElement)(Xn,{value:e},n?Object(r.createElement)(n,e):o?o(e):i?zn(i)?i(e):Wn(i)?null:r.Children.only(i):null)}function ar(t){var e=Array.isArray(t)?[]:{};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r=String(n);!0===Array.isArray(t[r])?e[r]=t[r].map((function(t){return!0===Array.isArray(t)||C(t)?ar(t):""!==t?t:void 0})):C(t[r])?e[r]=ar(t[r]):e[r]=""!==t[r]?t[r]:void 0}return e}function ur(t,e,n){var r=t.slice();return e.forEach((function(e,i){if("undefined"===typeof r[i]){var o=!1!==n.clone&&n.isMergeableObject(e);r[i]=o?l(Array.isArray(e)?[]:{},e,n):e}else n.isMergeableObject(e)?r[i]=l(t[i],e,n):-1===t.indexOf(e)&&r.push(e)})),r}var sr="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?r.useLayoutEffect:r.useEffect;function cr(t){var e=Object(r.useRef)(t);return sr((function(){e.current=t})),Object(r.useCallback)((function(){for(var t=arguments.length,n=new Array(t),r=0;rt?e:t}),0);return Array.from(Dn({},t,{length:e+1}))}return[]},gr=function(t){function e(e){var n;return(n=t.call(this,e)||this).updateArrayField=function(t,e,r){var i=n.props,o=i.name;(0,i.formik.setFormikState)((function(n){var i="function"===typeof r?r:t,a="function"===typeof e?e:t,u=Yn(n.values,o,t(Kn(n.values,o))),s=r?i(Kn(n.errors,o)):void 0,c=e?a(Kn(n.touched,o)):void 0;return Un(s)&&(s=void 0),Un(c)&&(c=void 0),Dn({},n,{values:u,errors:r?Yn(n.errors,o,s):n.errors,touched:e?Yn(n.touched,o,c):n.touched})}))},n.push=function(t){return n.updateArrayField((function(e){return[].concat(pr(e),[jn(t)])}),!1,!1)},n.handlePush=function(t){return function(){return n.push(t)}},n.swap=function(t,e){return n.updateArrayField((function(n){return function(t,e,n){var r=pr(t),i=r[e];return r[e]=r[n],r[n]=i,r}(n,t,e)}),!0,!0)},n.handleSwap=function(t,e){return function(){return n.swap(t,e)}},n.move=function(t,e){return n.updateArrayField((function(n){return function(t,e,n){var r=pr(t),i=r[e];return r.splice(e,1),r.splice(n,0,i),r}(n,t,e)}),!0,!0)},n.handleMove=function(t,e){return function(){return n.move(t,e)}},n.insert=function(t,e){return n.updateArrayField((function(n){return hr(n,t,e)}),(function(e){return hr(e,t,null)}),(function(e){return hr(e,t,null)}))},n.handleInsert=function(t,e){return function(){return n.insert(t,e)}},n.replace=function(t,e){return n.updateArrayField((function(n){return function(t,e,n){var r=pr(t);return r[e]=n,r}(n,t,e)}),!1,!1)},n.handleReplace=function(t,e){return function(){return n.replace(t,e)}},n.unshift=function(t){var e=-1;return n.updateArrayField((function(n){var r=n?[t].concat(n):[t];return e<0&&(e=r.length),r}),(function(t){var n=t?[null].concat(t):[null];return e<0&&(e=n.length),n}),(function(t){var n=t?[null].concat(t):[null];return e<0&&(e=n.length),n})),e},n.handleUnshift=function(t){return function(){return n.unshift(t)}},n.handleRemove=function(t){return function(){return n.remove(t)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(Bn(n)),n.pop=n.pop.bind(Bn(n)),n}Ln(e,t);var n=e.prototype;return n.componentDidUpdate=function(t){this.props.validateOnChange&&this.props.formik.validateOnChange&&!o()(Kn(t.formik.values,t.name),Kn(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(t){var e;return this.updateArrayField((function(n){var r=n?pr(n):[];return e||(e=r[t]),zn(r.splice)&&r.splice(t,1),r}),!0,!0),e},n.pop=function(){var t;return this.updateArrayField((function(e){var n=e;return t||(t=n&&n.pop&&n.pop()),n}),!0,!0),t},n.render=function(){var t={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},e=this.props,n=e.component,i=e.render,o=e.children,a=e.name,u=Dn({},t,{form:Fn(e.formik,["validate","validationSchema"]),name:a});return n?Object(r.createElement)(n,u):i?i(u):o?"function"===typeof o?o(u):Wn(o)?null:r.Children.only(o):null},e}(r.Component);gr.defaultProps={validateOnChange:!0};var mr=dr(gr),br=(r.Component,dr(function(t){function e(e){var n;n=t.call(this,e)||this;var r=e.render,i=e.children,o=e.component,a=e.as;e.name;return r&&Object(In.a)(!1),o&&r&&Object(In.a)(!1),a&&i&&zn(i)&&Object(In.a)(!1),o&&i&&zn(i)&&Object(In.a)(!1),r&&i&&!Wn(i)&&Object(In.a)(!1),n}Ln(e,t);var n=e.prototype;return n.shouldComponentUpdate=function(t){return this.props.shouldUpdate?this.props.shouldUpdate(t,this.props):t.name!==this.props.name||Kn(t.formik.values,this.props.name)!==Kn(this.props.formik.values,this.props.name)||Kn(t.formik.errors,this.props.name)!==Kn(this.props.formik.errors,this.props.name)||Kn(t.formik.touched,this.props.name)!==Kn(this.props.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(t).length||t.formik.isSubmitting!==this.props.formik.isSubmitting},n.componentDidMount=function(){this.props.formik.registerField(this.props.name,{validate:this.props.validate})},n.componentDidUpdate=function(t){this.props.name!==t.name&&(this.props.formik.unregisterField(t.name),this.props.formik.registerField(this.props.name,{validate:this.props.validate})),this.props.validate!==t.validate&&this.props.formik.registerField(this.props.name,{validate:this.props.validate})},n.componentWillUnmount=function(){this.props.formik.unregisterField(this.props.name)},n.render=function(){var t=this.props,e=t.name,n=t.render,i=t.as,o=t.children,a=t.component,u=t.formik,s=Fn(t,["validate","name","render","as","children","component","shouldUpdate","formik"]),c=Fn(u,["validate","validationSchema"]),f={value:"radio"===s.type||"checkbox"===s.type?s.value:Kn(u.values,e),name:e,onChange:u.handleChange,onBlur:u.handleBlur},l={field:f,meta:{value:Kn(u.values,e),error:Kn(u.errors,e),touched:!!Kn(u.touched,e),initialValue:Kn(u.initialValues,e),initialTouched:!!Kn(u.initialTouched,e),initialError:Kn(u.initialErrors,e)},form:c};if(n)return n(l);if(zn(o))return o(l);if(a){if("string"===typeof a){var d=s.innerRef,h=Fn(s,["innerRef"]);return Object(r.createElement)(a,Dn({ref:d},f,h),o)}return Object(r.createElement)(a,Dn({field:f,form:u},s),o)}var p=i||"input";if("string"===typeof p){var g=s.innerRef,m=Fn(s,["innerRef"]);return Object(r.createElement)(p,Dn({ref:g},f,m),o)}return Object(r.createElement)(p,Dn({},f,s),o)},e}(r.Component)))},function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){t.exports=n(607)()},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return u})),n.d(e,"e",(function(){return s}));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;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||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},,function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}n.d(e,"a",(function(){return r}))},,function(t,e,n){"use strict";function r(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(209);function i(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=Object(r.a)(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,s=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return u=t.done,t},e:function(t){s=!0,a=t},f:function(){try{u||null==n.return||n.return()}finally{if(s)throw a}}}}},function(t,e,n){"use strict";var r=n(4),i=n(17),o=n(1),a=n.n(o),u=(n(13),n(125)),s=n.n(u),c=n(975),f=n(1013),l=n(401),d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var o=e.defaultTheme,u=e.withTheme,d=void 0!==u&&u,h=e.name,p=Object(i.a)(e,["defaultTheme","withTheme","name"]);var g=h,m=Object(c.a)(t,Object(r.a)({defaultTheme:o,Component:n,name:h||n.displayName,classNamePrefix:g},p)),b=a.a.forwardRef((function(t,e){t.classes;var u,s=t.innerRef,c=Object(i.a)(t,["classes","innerRef"]),p=m(Object(r.a)({},n.defaultProps,t)),g=c;return("string"===typeof h||d)&&(u=Object(l.a)()||o,h&&(g=Object(f.a)({theme:u,name:h,props:c})),d&&!g.theme&&(g.theme=u)),a.a.createElement(n,Object(r.a)({ref:s||e,classes:p},g))}));return s()(b,n),b}},h=n(136);e.a=function(t,e){return d(t,Object(r.a)({defaultTheme:h.a},e))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(22);function i(t){Object(r.a)(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===typeof t&&"[object Date]"===e?new Date(t.getTime()):"number"===typeof t||"[object Number]"===e?new Date(t):("string"!==typeof t&&"[object String]"!==e||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"),console.warn((new Error).stack)),new Date(NaN))}},function(t,e,n){"use strict";n.r(e),n.d(e,"hexToRgb",(function(){return r.g})),n.d(e,"rgbToHex",(function(){return r.k})),n.d(e,"hslToRgb",(function(){return r.h})),n.d(e,"decomposeColor",(function(){return r.b})),n.d(e,"recomposeColor",(function(){return r.j})),n.d(e,"getContrastRatio",(function(){return r.e})),n.d(e,"getLuminance",(function(){return r.f})),n.d(e,"emphasize",(function(){return r.c})),n.d(e,"fade",(function(){return r.d})),n.d(e,"darken",(function(){return r.a})),n.d(e,"lighten",(function(){return r.i})),n.d(e,"createMuiTheme",(function(){return i.a})),n.d(e,"unstable_createMuiStrictModeTheme",(function(){return a})),n.d(e,"createStyles",(function(){return u})),n.d(e,"makeStyles",(function(){return s.a})),n.d(e,"responsiveFontSizes",(function(){return v})),n.d(e,"styled",(function(){return y.a})),n.d(e,"easing",(function(){return _.c})),n.d(e,"duration",(function(){return _.b})),n.d(e,"useTheme",(function(){return w.a})),n.d(e,"withStyles",(function(){return S.a})),n.d(e,"withTheme",(function(){return k})),n.d(e,"createGenerateClassName",(function(){return C.a})),n.d(e,"jssPreset",(function(){return I.a})),n.d(e,"ServerStyleSheets",(function(){return D})),n.d(e,"StylesProvider",(function(){return j.b})),n.d(e,"MuiThemeProvider",(function(){return L.a})),n.d(e,"ThemeProvider",(function(){return L.a}));var r=n(35),i=n(208),o=n(393);function a(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.breakpoints,r=void 0===n?["sm","md","lg"]:n,i=e.disableAlign,o=void 0!==i&&i,a=e.factor,u=void 0===a?2:a,s=e.variants,l=void 0===s?["h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","caption","button","overline"]:s,h=Object(c.a)({},t);h.typography=Object(c.a)({},h.typography);var v=h.typography,y=p(v.htmlFontSize),_=r.map((function(t){return h.breakpoints.values[t]}));return l.forEach((function(t){var e=v[t],n=parseFloat(y(e.fontSize,"rem"));if(!(n<=1)){var r=n,i=1+(r-1)/u,a=e.lineHeight;if(!d(a)&&!o)throw new Error(Object(f.a)(6));d(a)||(a=parseFloat(y(a,"rem"))/parseFloat(n));var s=null;o||(s=function(t){return g({size:t,grid:m({pixels:4,lineHeight:a,htmlFontSize:v.htmlFontSize})})}),v[t]=Object(c.a)({},e,b({cssProperty:"fontSize",min:i,max:r,unit:"rem",breakpoints:_,transform:s}))}})),h}var y=n(280),_=n(90),w=n(96),S=n(24),O=n(17),x=n(1),E=n.n(x),M=(n(13),n(125)),T=n.n(M),$=n(401);function A(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.defaultTheme,n=function(t){var n=E.a.forwardRef((function(n,r){var i=n.innerRef,o=Object(O.a)(n,["innerRef"]),a=Object($.a)()||e;return E.a.createElement(t,Object(c.a)({theme:a,ref:i||r},o))}));return T()(n,t),n};return n}A();var k=A({defaultTheme:n(136).a}),C=n(971),I=n(574),P=n(297),N=n(171),R=n(73),j=n(1008),D=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(P.a)(this,t),this.options=e}return Object(N.a)(t,[{key:"collect",value:function(t){var e=new Map;this.sheetsRegistry=new R.b;var n=Object(C.a)();return E.a.createElement(j.b,Object(c.a)({sheetsManager:e,serverGenerateClassName:n,sheetsRegistry:this.sheetsRegistry},this.options),t)}},{key:"toString",value:function(){return this.sheetsRegistry?this.sheetsRegistry.toString():""}},{key:"getStyleElement",value:function(t){return E.a.createElement("style",Object(c.a)({id:"jss-server-side",key:"jss-server-side",dangerouslySetInnerHTML:{__html:this.toString()}},t))}}]),t}(),L=n(1096)},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return B})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return E})),n.d(e,"d",(function(){return V})),n.d(e,"e",(function(){return W})),n.d(e,"f",(function(){return K})),n.d(e,"g",(function(){return I})),n.d(e,"h",(function(){return P})),n.d(e,"i",(function(){return y})),n.d(e,"j",(function(){return A})),n.d(e,"k",(function(){return x})),n.d(e,"l",(function(){return C})),n.d(e,"m",(function(){return T})),n.d(e,"n",(function(){return $})),n.d(e,"o",(function(){return k})),n.d(e,"p",(function(){return l})),n.d(e,"q",(function(){return tt})),n.d(e,"r",(function(){return S})),n.d(e,"s",(function(){return w})),n.d(e,"t",(function(){return p})),n.d(e,"u",(function(){return m})),n.d(e,"v",(function(){return g})),n.d(e,"w",(function(){return v})),n.d(e,"x",(function(){return Q})),n.d(e,"y",(function(){return X})),n.d(e,"z",(function(){return nt})),n.d(e,"A",(function(){return it})),n.d(e,"B",(function(){return ot})),n.d(e,"C",(function(){return q})),n.d(e,"D",(function(){return z})),n.d(e,"E",(function(){return h})),n.d(e,"F",(function(){return _})),n.d(e,"G",(function(){return c})),n.d(e,"H",(function(){return b})),n.d(e,"I",(function(){return J}));var r=n(99),i=n(31),o=n(14),a=n(532),u=n.n(a);n(77);function s(t,e,n,r){if(function(t){return"IntValue"===t.kind}(n)||function(t){return"FloatValue"===t.kind}(n))t[e.value]=Number(n.value);else if(function(t){return"BooleanValue"===t.kind}(n)||function(t){return"StringValue"===t.kind}(n))t[e.value]=n.value;else if(function(t){return"ObjectValue"===t.kind}(n)){var o={};n.fields.map((function(t){return s(o,t.name,t.value,r)})),t[e.value]=o}else if(function(t){return"Variable"===t.kind}(n)){var a=(r||{})[n.name.value];t[e.value]=a}else if(function(t){return"ListValue"===t.kind}(n))t[e.value]=n.values.map((function(t){var n={};return s(n,e,t,r),n[e.value]}));else if(function(t){return"EnumValue"===t.kind}(n))t[e.value]=n.value;else{if(!function(t){return"NullValue"===t.kind}(n))throw new i.a(17);t[e.value]=null}}function c(t,e){var n=null;t.directives&&(n={},t.directives.forEach((function(t){n[t.name.value]={},t.arguments&&t.arguments.forEach((function(r){var i=r.name,o=r.value;return s(n[t.name.value],i,o,e)}))})));var r=null;return t.arguments&&t.arguments.length&&(r={},t.arguments.forEach((function(t){var n=t.name,i=t.value;return s(r,n,i,e)}))),l(t.name.value,r,n)}var f=["connection","include","skip","client","rest","export"];function l(t,e,n){if(n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var i=e,o={};return r.forEach((function(t){o[t]=i[t]})),n.connection.key+"("+JSON.stringify(o)+")"}return n.connection.key}var a=t;if(e){var s=u()(e);a+="("+s+")"}return n&&Object.keys(n).forEach((function(t){-1===f.indexOf(t)&&(n[t]&&Object.keys(n[t]).length?a+="@"+t+"("+JSON.stringify(n[t])+")":a+="@"+t)})),a}function d(t,e){if(t.arguments&&t.arguments.length){var n={};return t.arguments.forEach((function(t){var r=t.name,i=t.value;return s(n,r,i,e)})),n}return null}function h(t){return t.alias?t.alias.value:t.name.value}function p(t){return"Field"===t.kind}function g(t){return"InlineFragment"===t.kind}function m(t){return t&&"id"===t.type&&"boolean"===typeof t.generated}function b(t,e){return void 0===e&&(e=!1),Object(o.a)({type:"id",generated:e},"string"===typeof t?{id:t,typename:void 0}:t)}function v(t){return null!=t&&"object"===typeof t&&"json"===t.type}function y(t,e){if(t.directives&&t.directives.length){var n={};return t.directives.forEach((function(t){n[t.name.value]=d(t,e)})),n}return null}function _(t,e){return void 0===e&&(e={}),(n=t.directives,n?n.filter(O).map((function(t){var e=t.arguments;t.name.value,Object(i.b)(e&&1===e.length,14);var n=e[0];Object(i.b)(n.name&&"if"===n.name.value,15);var r=n.value;return Object(i.b)(r&&("Variable"===r.kind||"BooleanValue"===r.kind),16),{directive:t,ifArgument:n}})):[]).every((function(t){var n=t.directive,r=t.ifArgument,o=!1;return"Variable"===r.value.kind?(o=e[r.value.name.value],Object(i.b)(void 0!==o,13)):o=r.value.value,"skip"===n.name.value?!o:o}));var n}function w(t,e){return function(t){var e=[];return Object(r.b)(t,{Directive:function(t){e.push(t.name.value)}}),e}(e).some((function(e){return t.indexOf(e)>-1}))}function S(t){return t&&w(["client"],t)&&w(["export"],t)}function O(t){var e=t.name.value;return"skip"===e||"include"===e}function x(t,e){var n=e,r=[];return t.definitions.forEach((function(t){if("OperationDefinition"===t.kind)throw new i.a(11);"FragmentDefinition"===t.kind&&r.push(t)})),"undefined"===typeof n&&(Object(i.b)(1===r.length,12),n=r[0].name.value),Object(o.a)(Object(o.a)({},t),{definitions:Object(o.e)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],t.definitions)})}function E(t){for(var e=[],n=1;n1){var r=[];e=st(e,r);for(var i=1;ie?1:t>=e?0:NaN},o=function(t){var e=t,n=t;function r(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[o],e)<0?r=o+1:i=o}return r}return 1===t.length&&(e=function(e,n){return t(e)-n},n=function(t){return function(e,n){return i(t(e),n)}}(t)),{left:r,center:function(t,n,i,o){null==i&&(i=0),null==o&&(o=t.length);var a=r(t,n,i,o-1);return a>i&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r>>1;n(t[o],e)>0?i=o:r=o+1}return r}}};var a=n(34),u=n.n(a),s=n(23),c=u.a.mark(l),f=function(t){return null===t?NaN:+t};function l(t,e){var n,r,i,o,a,f,l;return u.a.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(void 0!==e){u.next=21;break}n=Object(s.a)(t),u.prev=2,n.s();case 4:if((r=n.n()).done){u.next=11;break}if(!(null!=(i=r.value)&&(i=+i)>=i)){u.next=9;break}return u.next=9,i;case 9:u.next=4;break;case 11:u.next=16;break;case 13:u.prev=13,u.t0=u.catch(2),n.e(u.t0);case 16:return u.prev=16,n.f(),u.finish(16);case 19:u.next=40;break;case 21:o=-1,a=Object(s.a)(t),u.prev=23,a.s();case 25:if((f=a.n()).done){u.next=32;break}if(l=f.value,!(null!=(l=e(l,++o,t))&&(l=+l)>=l)){u.next=30;break}return u.next=30,l;case 30:u.next=25;break;case 32:u.next=37;break;case 34:u.prev=34,u.t1=u.catch(23),a.e(u.t1);case 37:return u.prev=37,a.f(),u.finish(37);case 40:case"end":return u.stop()}}),c,null,[[2,13,16,19],[23,34,37,40]])}var d=o(i),h=d.right,p=d.left,g=o(f).center,m=h;function b(t,e){var n=0;if(void 0===e){var r,i=Object(s.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;null!=o&&(o=+o)>=o&&++n}}catch(l){i.e(l)}finally{i.f()}}else{var a,u=-1,c=Object(s.a)(t);try{for(c.s();!(a=c.n()).done;){var f=a.value;null!=(f=e(f,++u,t))&&(f=+f)>=f&&++n}}catch(l){c.e(l)}finally{c.f()}}return n}var v=n(50);function y(t){return 0|t.length}function _(t){return!(t>0)}function w(t){return"object"!==typeof t||"length"in t?t:Array.from(t)}function S(t){return function(e){return t.apply(void 0,Object(v.a)(e))}}function O(){for(var t=arguments.length,e=new Array(t),n=0;nt?1:e>=t?0:NaN};function M(t,e){var n,r=0,i=0,o=0;if(void 0===e){var a,u=Object(s.a)(t);try{for(u.s();!(a=u.n()).done;){var c=a.value;null!=c&&(c=+c)>=c&&(o+=(n=c-i)*(c-(i+=n/++r)))}}catch(p){u.e(p)}finally{u.f()}}else{var f,l=-1,d=Object(s.a)(t);try{for(d.s();!(f=d.n()).done;){var h=f.value;null!=(h=e(h,++l,t))&&(h=+h)>=h&&(o+=(n=h-i)*(h-(i+=n/++r)))}}catch(p){d.e(p)}finally{d.f()}}if(r>1)return o/(r-1)}function T(t,e){var n=M(t,e);return n?Math.sqrt(n):n}var $=function(t,e){var n,r;if(void 0===e){var i,o=Object(s.a)(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;null!=a&&(void 0===n?a>=a&&(n=r=a):(n>a&&(n=a),r=l&&(n=r=l):(n>l&&(n=l),r0){for(o=r[--i];i>0&&(t=o,!(n=(e=r[--i])-((o=t+e)-t))););i>0&&(n<0&&r[i-1]<0||n>0&&r[i-1]>0)&&(e=2*n)==(t=o+e)-o&&(o=t)}return o}}]),t}(),I=function(t,e){var n=new C;if(void 0===e){var r,i=Object(s.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;(o=+o)&&n.add(o)}}catch(l){i.e(l)}finally{i.f()}}else{var a,u=-1,c=Object(s.a)(t);try{for(c.s();!(a=c.n()).done;){var f=a.value;(f=+e(f,++u,t))&&n.add(f)}}catch(l){c.e(l)}finally{c.f()}}return+n},P=n(2),N=n(190),R=n(62),j=n(51),D=n(86),L=n(87),F=n(250),B=function(t){Object(D.a)(n,t);var e=Object(L.a)(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q;Object(A.a)(this,n),t=e.call(this),Object.defineProperties(Object(N.a)(t),{_intern:{value:new Map},_key:{value:i}});var o,a=Object(s.a)(r);try{for(a.s();!(o=a.n()).done;){var u=Object(P.a)(o.value,2),c=u[0],f=u[1];t.set(c,f)}}catch(l){a.e(l)}finally{a.f()}return t}return Object(k.a)(n,[{key:"get",value:function(t){return Object(R.a)(Object(j.a)(n.prototype),"get",this).call(this,z(this,t))}},{key:"has",value:function(t){return Object(R.a)(Object(j.a)(n.prototype),"has",this).call(this,z(this,t))}},{key:"set",value:function(t,e){return Object(R.a)(Object(j.a)(n.prototype),"set",this).call(this,H(this,t),e)}},{key:"delete",value:function(t){return Object(R.a)(Object(j.a)(n.prototype),"delete",this).call(this,V(this,t))}}]),n}(Object(F.a)(Map)),U=function(t){Object(D.a)(n,t);var e=Object(L.a)(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:q;Object(A.a)(this,n),t=e.call(this),Object.defineProperties(Object(N.a)(t),{_intern:{value:new Map},_key:{value:i}});var o,a=Object(s.a)(r);try{for(a.s();!(o=a.n()).done;){var u=o.value;t.add(u)}}catch(c){a.e(c)}finally{a.f()}return t}return Object(k.a)(n,[{key:"has",value:function(t){return Object(R.a)(Object(j.a)(n.prototype),"has",this).call(this,z(this,t))}},{key:"add",value:function(t){return Object(R.a)(Object(j.a)(n.prototype),"add",this).call(this,H(this,t))}},{key:"delete",value:function(t){return Object(R.a)(Object(j.a)(n.prototype),"delete",this).call(this,V(this,t))}}]),n}(Object(F.a)(Set));function z(t,e){var n=t._intern,r=(0,t._key)(e);return n.has(r)?n.get(r):e}function H(t,e){var n=t._intern,r=(0,t._key)(e);return n.has(r)?n.get(r):(n.set(r,e),e)}function V(t,e){var n=t._intern,r=(0,t._key)(e);return n.has(r)&&(e=n.get(e),n.delete(r)),e}function q(t){return null!==t&&"object"===typeof t?t.valueOf():t}var W=function(t){return t};function G(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r1?e-1:0),r=1;r2?n-2:0),i=2;i2?n-2:0),i=2;i1?e-1:0),r=1;r1?e-1:0),r=1;r=r.length)return n(i);var a,u=new B,c=r[o++],f=-1,l=Object(s.a)(i);try{for(l.s();!(a=l.n()).done;){var d=a.value,h=c(d,++f,i),p=u.get(h);p?p.push(d):u.set(h,[d])}}catch(_){l.e(_)}finally{l.f()}var g,m=Object(s.a)(u);try{for(m.s();!(g=m.n()).done;){var b=Object(P.a)(g.value,2),v=b[0],y=b[1];u.set(v,t(y,o))}}catch(_){m.e(_)}finally{m.f()}return e(u)}(t,0)}var et=function(t,e){return Array.from(e,(function(e){return t[e]}))};function nt(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r1){var f=Uint32Array.from(t,(function(t,e){return e}));return n.length>1?(n=n.map((function(e){return t.map(e)})),f.sort((function(t,e){var r,o=Object(s.a)(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,u=i(a[t],a[e]);if(u)return u}}catch(c){o.e(c)}finally{o.f()}}))):(c=t.map(c),f.sort((function(t,e){return i(c[t],c[e])}))),et(t,f)}return t.sort(c)}function rt(t,e,n){return(1===e.length?nt(Y(t,e,n),(function(t,e){var n=Object(P.a)(t,2),r=n[0],o=n[1],a=Object(P.a)(e,2),u=a[0],s=a[1];return i(o,s)||i(r,u)})):nt(G(t,n),(function(t,n){var r=Object(P.a)(t,2),o=r[0],a=r[1],u=Object(P.a)(n,2),s=u[0],c=u[1];return e(a,c)||i(o,s)}))).map((function(t){return Object(P.a)(t,1)[0]}))}var it=Array.prototype,ot=it.slice,at=(it.map,function(t){return function(){return t}}),ut=Math.sqrt(50),st=Math.sqrt(10),ct=Math.sqrt(2),ft=function(t,e,n){var r,i,o,a,u=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++u=0?(o>=ut?10:o>=st?5:o>=ct?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=ut?10:o>=st?5:o>=ct?2:1)}function dt(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=ut?i*=10:o>=st?i*=5:o>=ct&&(i*=2),e0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}var pt=function(t){return Math.ceil(Math.log(b(t))/Math.LN2)+1},gt=function(){var t=W,e=$,n=pt;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a=r.length,u=new Array(a);for(i=0;i=f)if(d>=f&&e===$){var b=lt(c,f,h);isFinite(b)&&(b>0?f=(Math.floor(f/b)+1)*b:b<0&&(f=(Math.ceil(f*-b)+1)/-b))}else l.pop()}for(var v=l.length;l[0]<=c;)l.shift(),--v;for(;l[v-1]>f;)l.pop(),--v;var y,_=new Array(v+1);for(i=0;i<=v;++i)(y=_[i]=[]).x0=i>0?l[i-1]:c,y.x1=i=o)&&(n=o)}}catch(l){i.e(l)}finally{i.f()}}else{var a,u=-1,c=Object(s.a)(t);try{for(c.s();!(a=c.n()).done;){var f=a.value;null!=(f=e(f,++u,t))&&(n=f)&&(n=f)}}catch(l){c.e(l)}finally{c.f()}}return n}function bt(t,e){var n;if(void 0===e){var r,i=Object(s.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;null!=o&&(n>o||void 0===n&&o>=o)&&(n=o)}}catch(l){i.e(l)}finally{i.f()}}else{var a,u=-1,c=Object(s.a)(t);try{for(c.s();!(a=c.n()).done;){var f=a.value;null!=(f=e(f,++u,t))&&(n>f||void 0===n&&f>=f)&&(n=f)}}catch(l){c.e(l)}finally{c.f()}}return n}function vt(t,e){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.length-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:i;r>n;){if(r-n>600){var a=r-n+1,u=e-n+1,s=Math.log(a),c=.5*Math.exp(2*s/3),f=.5*Math.sqrt(s*c*(a-c)/a)*(u-a/2<0?-1:1),l=Math.max(n,Math.floor(e-u*c/a+f)),d=Math.min(r,Math.floor(e+(a-u)*c/a+f));vt(t,e,l,d,o)}var h=t[e],p=n,g=r;for(yt(t,n,e),o(t[r],h)>0&&yt(t,n,r);p0;)--g}0===o(t[n],h)?yt(t,n,g):yt(t,++g,r),g<=e&&(n=g+1),e<=g&&(r=g-1)}return t}function yt(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function _t(t,e,n){if(r=(t=Float64Array.from(l(t,n))).length){if((e=+e)<=0||r<2)return bt(t);if(e>=1)return mt(t);var r,i=(r-1)*e,o=Math.floor(i),a=mt(vt(t,o).subarray(0,o+1));return a+(bt(t.subarray(o+1))-a)*(i-o)}}function wt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f;if(r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t),u=+n(t[o+1],o+1,t);return a+(u-a)*(i-o)}}var St=function(t,e,n){return Math.ceil((n-e)/(2*(_t(t,.75)-_t(t,.25))*Math.pow(b(t),-1/3)))},Ot=function(t,e,n){return Math.ceil((n-e)/(3.5*T(t)*Math.pow(b(t),-1/3)))};function xt(t,e){var n,r=-1,i=-1;if(void 0===e){var o,a=Object(s.a)(t);try{for(a.s();!(o=a.n()).done;){var u=o.value;++i,null!=u&&(n=u)&&(n=u,r=i)}}catch(d){a.e(d)}finally{a.f()}}else{var c,f=Object(s.a)(t);try{for(f.s();!(c=f.n()).done;){var l=c.value;null!=(l=e(l,++i,t))&&(n=l)&&(n=l,r=i)}}catch(d){f.e(d)}finally{f.f()}}return r}function Et(t,e){var n=0,r=0;if(void 0===e){var i,o=Object(s.a)(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;null!=a&&(a=+a)>=a&&(++n,r+=a)}}catch(d){o.e(d)}finally{o.f()}}else{var u,c=-1,f=Object(s.a)(t);try{for(f.s();!(u=f.n()).done;){var l=u.value;null!=(l=e(l,++c,t))&&(l=+l)>=l&&(++n,r+=l)}}catch(d){f.e(d)}finally{f.f()}}if(n)return r/n}var Mt=function(t,e){return _t(t,.5,e)},Tt=u.a.mark($t);function $t(t){var e,n,r;return u.a.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:e=Object(s.a)(t),i.prev=1,e.s();case 3:if((n=e.n()).done){i.next=8;break}return r=n.value,i.delegateYield(r,"t0",6);case 6:i.next=3;break;case 8:i.next=13;break;case 10:i.prev=10,i.t1=i.catch(1),e.e(i.t1);case 13:return i.prev=13,e.f(),i.finish(13);case 16:case"end":return i.stop()}}),Tt,null,[[1,10,13,16]])}function At(t){return Array.from($t(t))}function kt(t,e){var n,r=-1,i=-1;if(void 0===e){var o,a=Object(s.a)(t);try{for(a.s();!(o=a.n()).done;){var u=o.value;++i,null!=u&&(n>u||void 0===n&&u>=u)&&(n=u,r=i)}}catch(d){a.e(d)}finally{a.f()}}else{var c,f=Object(s.a)(t);try{for(f.s();!(c=f.n()).done;){var l=c.value;null!=(l=e(l,++i,t))&&(n>l||void 0===n&&l>=l)&&(n=l,r=i)}}catch(d){f.e(d)}finally{f.f()}}return r}function Ct(t){var e,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:It,i=[],o=!1,a=Object(s.a)(t);try{for(a.s();!(n=a.n()).done;){var u=n.value;o&&i.push(r(e,u)),e=u,o=!0}}catch(c){a.e(c)}finally{a.f()}return i}function It(t,e){return[t,e]}var Pt=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r1&&void 0!==arguments[1]?arguments[1]:i,r=!1;if(1===n.length){var o,a,u=Object(s.a)(t);try{for(u.s();!(a=u.n()).done;){var c=a.value,f=n(c);(r?i(f,o)<0:0===i(f,f))&&(e=c,o=f,r=!0)}}catch(p){u.e(p)}finally{u.f()}}else{var l,d=Object(s.a)(t);try{for(d.s();!(l=d.n()).done;){var h=l.value;(r?n(h,e)<0:0===n(h,h))&&(e=h,r=!0)}}catch(p){d.e(p)}finally{d.f()}}return e}function Rt(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(1===n.length)return kt(t,n);var r,o=-1,a=-1,u=Object(s.a)(t);try{for(u.s();!(r=u.n()).done;){var c=r.value;++a,(o<0?0===n(c,c):n(c,e)<0)&&(e=c,o=a)}}catch(f){u.e(f)}finally{u.f()}return o}function jt(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i,r=!1;if(1===n.length){var o,a,u=Object(s.a)(t);try{for(u.s();!(a=u.n()).done;){var c=a.value,f=n(c);(r?i(f,o)>0:0===i(f,f))&&(e=c,o=f,r=!0)}}catch(p){u.e(p)}finally{u.f()}}else{var l,d=Object(s.a)(t);try{for(d.s();!(l=d.n()).done;){var h=l.value;(r?n(h,e)>0:0===n(h,h))&&(e=h,r=!0)}}catch(p){d.e(p)}finally{d.f()}}return e}function Dt(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if(1===n.length)return xt(t,n);var r,o=-1,a=-1,u=Object(s.a)(t);try{for(u.s();!(r=u.n()).done;){var c=r.value;++a,(o<0?0===n(c,c):n(c,e)>0)&&(e=c,o=a)}}catch(f){u.e(f)}finally{u.f()}return o}function Lt(t,e){var n=Rt(t,e);return n<0?void 0:n}var Ft=Bt(Math.random);function Bt(t){return function(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,i=r-(n=+n);i;){var o=t()*i--|0,a=e[i+n];e[i+n]=e[o+n],e[o+n]=a}return e}}function Ut(t,e){var n=0;if(void 0===e){var r,i=Object(s.a)(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;(o=+o)&&(n+=o)}}catch(l){i.e(l)}finally{i.f()}}else{var a,u=-1,c=Object(s.a)(t);try{for(c.s();!(a=c.n()).done;){var f=a.value;(f=+e(f,++u,t))&&(n+=f)}}catch(l){c.e(l)}finally{c.f()}}return n}var zt=function(t){if(!(i=t.length))return[];for(var e=-1,n=bt(t,Ht),r=new Array(n);++e1?e-1:0),r=1;r1?e-1:0),r=1;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function we(t,e){for(var n,r=0,i=t.length;r0)for(var n,r,i=new Array(n),o=0;oe?1:t>=e?0:NaN}var He="http://www.w3.org/1999/xhtml",Ve={svg:"http://www.w3.org/2000/svg",xhtml:He,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},qe=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ve.hasOwnProperty(e)?{space:Ve[e],local:t}:t};function We(t){return function(){this.removeAttribute(t)}}function Ge(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ke(t,e){return function(){this.setAttribute(t,e)}}function Ye(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ze(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Qe(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var Xe=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Je(t){return function(){this.style.removeProperty(t)}}function tn(t,e,n){return function(){this.style.setProperty(t,e,n)}}function en(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function nn(t,e){return t.style.getPropertyValue(e)||Xe(t).getComputedStyle(t,null).getPropertyValue(e)}function rn(t){return function(){delete this[t]}}function on(t,e){return function(){this[t]=e}}function an(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function un(t){return t.trim().split(/^|\s+/)}function sn(t){return t.classList||new cn(t)}function cn(t){this._node=t,this._names=un(t.getAttribute("class")||"")}function fn(t,e){for(var n=sn(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function gn(){this.textContent=""}function mn(t){return function(){this.textContent=t}}function bn(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function vn(){this.innerHTML=""}function yn(t){return function(){this.innerHTML=t}}function _n(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function wn(){this.nextSibling&&this.parentNode.appendChild(this)}function Sn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function On(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===He&&e.documentElement.namespaceURI===He?e.createElement(t):e.createElementNS(n,t)}}function xn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var En=function(t){var e=qe(t);return(e.local?xn:On)(e)};function Mn(){return null}function Tn(){var t=this.parentNode;t&&t.removeChild(this)}function $n(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function An(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function kn(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Cn(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r=w&&(w=_+1);!(y=m[w])&&++w=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ze);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==e?Je:"function"===typeof e?en:tn)(t,e,null==n?"":n)):nn(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?rn:"function"===typeof e?an:on)(t,e)):this.node()[t]},classed:function(t,e){var n=un(t+"");if(arguments.length<2){for(var r=sn(this.node()),i=-1,o=n.length;++i>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?hr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?hr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=nr.exec(t))?new mr(e[1],e[2],e[3],1):(e=rr.exec(t))?new mr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ir.exec(t))?hr(e[1],e[2],e[3],e[4]):(e=or.exec(t))?hr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ar.exec(t))?_r(e[1],e[2]/100,e[3]/100,1):(e=ur.exec(t))?_r(e[1],e[2]/100,e[3]/100,e[4]):sr.hasOwnProperty(t)?dr(sr[t]):"transparent"===t?new mr(NaN,NaN,NaN,0):null}function dr(t){return new mr(t>>16&255,t>>8&255,255&t,1)}function hr(t,e,n,r){return r<=0&&(t=e=n=NaN),new mr(t,e,n,r)}function pr(t){return t instanceof Yn||(t=lr(t)),t?new mr((t=t.rgb()).r,t.g,t.b,t.opacity):new mr}function gr(t,e,n,r){return 1===arguments.length?pr(t):new mr(t,e,n,null==r?1:r)}function mr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function br(){return"#"+yr(this.r)+yr(this.g)+yr(this.b)}function vr(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function yr(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function _r(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Or(t,e,n,r)}function wr(t){if(t instanceof Or)return new Or(t.h,t.s,t.l,t.opacity);if(t instanceof Yn||(t=lr(t)),!t)return new Or;if(t instanceof Or)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=e===o?(n-r)/u+6*(n0&&s<1?0:a,new Or(a,u,s,t.opacity)}function Sr(t,e,n,r){return 1===arguments.length?wr(t):new Or(t,e,n,null==r?1:r)}function Or(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function xr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Er(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}Gn(Yn,lr,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:cr,formatHex:cr,formatHsl:function(){return wr(this).formatHsl()},formatRgb:fr,toString:fr}),Gn(mr,gr,Kn(Yn,{brighter:function(t){return t=null==t?Qn:Math.pow(Qn,t),new mr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Zn:Math.pow(Zn,t),new mr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:br,formatHex:br,formatRgb:vr,toString:vr})),Gn(Or,Sr,Kn(Yn,{brighter:function(t){return t=null==t?Qn:Math.pow(Qn,t),new Or(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Zn:Math.pow(Zn,t),new Or(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new mr(xr(t>=240?t-240:t+120,i,r),xr(t,i,r),xr(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Mr=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r180||n<-180?n-360*Math.round(n/360):n):$r(isNaN(t)?e:t)}function Cr(t){return 1===(t=+t)?Ir:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):$r(isNaN(e)?n:e)}}function Ir(t,e){var n=e-t;return n?Ar(t,n):$r(isNaN(t)?e:t)}var Pr=function t(e){var n=Cr(e);function r(t,e){var r=n((t=gr(t)).r,(e=gr(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Ir(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Nr(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),u=new Array(i);for(n=0;no&&(i=e.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:zr(n,r)})),o=qr.lastIndex;return o=0&&e._call.call(null,t),e=e._next;--Xr}function li(){ni=(ei=ii.now())+ri,Xr=Jr=0;try{fi()}finally{Xr=0,function(){var t,e,n=Wr,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Wr=e);Gr=t,hi(r)}(),ni=0}}function di(){var t=ii.now(),e=t-ei;e>1e3&&(ri-=e,ei=t)}function hi(t){Xr||(Jr&&(Jr=clearTimeout(Jr)),t-ni>24?(t<1/0&&(Jr=setTimeout(li,t-ii.now()-ri)),ti&&(ti=clearInterval(ti))):(ti||(ei=ii.now(),ti=setInterval(di,1e3)),Xr=1,oi(li)))}si.prototype=ci.prototype={constructor:si,restart:function(t,e,n){if("function"!==typeof t)throw new TypeError("callback is not a function");n=(null==n?ai():+n)+(null==e?0:+e),this._next||Gr===this||(Gr?Gr._next=this:Wr=this,Gr=this),this._call=t,this._time=n,hi()},stop:function(){this._call&&(this._call=null,this._time=1/0,hi())}};var pi=function(t,e,n){var r=new si;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},gi=Oe("start","end","cancel","interrupt"),mi=[],bi=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(o){var c,f,l,d;if(1!==n.state)return s();for(c in i)if((d=i[c]).name===n.name){if(3===d.state)return pi(a);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return n}function yi(t,e){var n=_i(t,e);if(n.state>3)throw new Error("too late; already running");return n}function _i(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var wi,Si=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}},Oi=180/Math.PI,xi={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Ei=function(t,e,n,r,i,o){var a,u,s;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),t*r180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:zr(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,u,s),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:zr(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,u,s),function(t,e,n,r,o,a){if(t!==n||e!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:zr(t,n)},{i:u-2,x:zr(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=null,function(t){for(var e,n=-1,r=s.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?vi:yi;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}var Yi=Un.prototype.constructor;function Zi(t){return function(){this.style.removeProperty(t)}}function Qi(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Xi(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Qi(t,o,n)),r}return o._value=e,o}function Ji(t){return function(e){this.textContent=t.call(this,e)}}function to(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Ji(r)),e}return r._value=t,r}var eo=0;function no(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ro(t){return Un().transition(t)}function io(){return++eo}var oo=Un.prototype;function ao(t){return t*t*t}function uo(t){return--t*t*t+1}function so(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}no.prototype=ro.prototype=Object(xe.a)({constructor:no,select:function(t){var e=this._name,n=this._id;"function"!==typeof t&&(t=Me(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a1&&n.name===e)return new no([[t]],lo,e,+r);return null},po=function(t){return function(){return t}};function go(t,e){var n=e.sourceEvent,r=e.target,i=e.selection,o=e.mode,a=e.dispatch;Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:o,enumerable:!0,configurable:!0},_:{value:a}})}function mo(t){t.stopImmediatePropagation()}var bo=function(t){t.preventDefault(),t.stopImmediatePropagation()},vo={name:"drag"},yo={name:"space"},_o={name:"handle"},wo={name:"center"},So=Math.abs,Oo=Math.max,xo=Math.min;function Eo(t){return[+t[0],+t[1]]}function Mo(t){return[Eo(t[0]),Eo(t[1])]}var To={name:"x",handles:["w","e"].map(Ro),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},$o={name:"y",handles:["n","s"].map(Ro),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Ao={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Ro),input:function(t){return null==t?null:Mo(t)},output:function(t){return t}},ko={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Co={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Io={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Po={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},No={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ro(t){return{type:t}}function jo(t){return!t.ctrlKey&&!t.button}function Do(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Lo(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fo(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Bo(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Uo(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function zo(){return qo(To)}function Ho(){return qo($o)}var Vo=function(){return qo(Ao)};function qo(t){var e,n=Do,r=jo,i=Lo,o=!0,a=Oe("start","brush","end"),u=6;function c(e){var n=e.property("__brush",m).selectAll(".overlay").data([Ro("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ko.overlay).merge(n).each((function(){var t=Fo(this).extent;zn(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Ro("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ko.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return ko[t.type]})),e.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",g).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){var t=zn(this),e=Fo(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-u/2:e[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-u/2:e[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new d(t,e,n):r}function d(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function h(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,a,u,c,d,h,p,g,m,b,v,y=this,_=n.target.__data__.type,w="selection"===(o&&n.metaKey?_="overlay":_)?vo:o&&n.altKey?wo:_o,S=t===$o?null:Po[_],O=t===To?null:No[_],x=Fo(y),E=x.extent,M=x.selection,T=E[0][0],$=E[0][1],A=E[1][0],k=E[1][1],C=0,I=0,P=S&&O&&o&&n.shiftKey,N=Array.from(n.touches||[n],(function(t){var e=t.identifier;return(t=Qr(t,y)).point0=t.slice(),t.identifier=e,t}));if("overlay"===_){M&&(m=!0);var R=[N[0],N[1]||N[0]];x.selection=M=[[i=t===$o?T:xo(R[0][0],R[1][0]),u=t===To?$:xo(R[0][1],R[1][1])],[d=t===$o?A:Oo(R[0][0],R[1][0]),p=t===To?k:Oo(R[0][1],R[1][1])]],N.length>1&&U()}else i=M[0][0],u=M[0][1],d=M[1][0],p=M[1][1];a=i,c=u,h=d,g=p;var j=zn(y).attr("pointer-events","none"),D=j.selectAll(".overlay").attr("cursor",ko[_]);Si(y);var L=l(y,arguments,!0).beforestart();if(n.touches)L.moved=B,L.ended=z;else{var F=zn(n.view).on("mousemove.brush",B,!0).on("mouseup.brush",z,!0);o&&F.on("keydown.brush",H,!0).on("keyup.brush",V,!0),qn(n.view)}f.call(y),L.start(n,w.name)}function B(t){var e,n=Object(s.a)(t.changedTouches||[t]);try{for(n.s();!(e=n.n()).done;){var r,i=e.value,o=Object(s.a)(N);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.identifier===i.identifier&&(a.cur=Qr(i,y))}}catch(d){o.e(d)}finally{o.f()}}}catch(d){n.e(d)}finally{n.f()}if(P&&!b&&!v&&1===N.length){var u=N[0];So(u.cur[0]-u[0])>So(u.cur[1]-u[1])?v=!0:b=!0}var c,f=Object(s.a)(N);try{for(f.s();!(c=f.n()).done;){var l=c.value;l.cur&&(l[0]=l.cur[0],l[1]=l.cur[1])}}catch(d){f.e(d)}finally{f.f()}m=!0,bo(t),U(t)}function U(t){var e,n=N[0],r=n.point0;switch(C=n[0]-r[0],I=n[1]-r[1],w){case yo:case vo:S&&(C=Oo(T-i,xo(A-d,C)),a=i+C,h=d+C),O&&(I=Oo($-u,xo(k-p,I)),c=u+I,g=p+I);break;case _o:N[1]?(S&&(a=Oo(T,xo(A,N[0][0])),h=Oo(T,xo(A,N[1][0])),S=1),O&&(c=Oo($,xo(k,N[0][1])),g=Oo($,xo(k,N[1][1])),O=1)):(S<0?(C=Oo(T-i,xo(A-i,C)),a=i+C,h=d):S>0&&(C=Oo(T-d,xo(A-d,C)),a=i,h=d+C),O<0?(I=Oo($-u,xo(k-u,I)),c=u+I,g=p):O>0&&(I=Oo($-p,xo(k-p,I)),c=u,g=p+I));break;case wo:S&&(a=Oo(T,xo(A,i-C*S)),h=Oo(T,xo(A,d+C*S))),O&&(c=Oo($,xo(k,u-I*O)),g=Oo($,xo(k,p+I*O)))}h0&&(i=a-C),O<0?p=g-I:O>0&&(u=c-I),w=yo,D.attr("cursor",ko.selection),U());break;default:return}bo(t)}function V(t){switch(t.keyCode){case 16:P&&(b=v=P=!1,U());break;case 18:w===wo&&(S<0?d=h:S>0&&(i=a),O<0?p=g:O>0&&(u=c),w=_o,U());break;case 32:w===yo&&(t.altKey?(S&&(d=h-C*S,i=a+C*S),O&&(p=g-I*O,u=c+I*O),w=wo):(S<0?d=h:S>0&&(i=a),O<0?p=g:O>0&&(u=c),w=_o),D.attr("cursor",ko[_]),U());break;default:return}bo(t)}}function p(t){l(this,arguments).moved(t)}function g(t){l(this,arguments).ended(t)}function m(){var e=this.__brush||{selection:null};return e.extent=Mo(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.tween?e.on("start.brush",(function(t){l(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){l(this,arguments).end(t)})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),o=r.selection,a=t.input("function"===typeof n?n.apply(this,arguments):n,r.extent),u=Yr(o,a);function s(t){r.selection=1===t&&null===a?null:u(t),f.call(e),i.brush()}return null!==o&&null!==a?s:s(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,o=t.input("function"===typeof n?n.apply(e,r):n,i.extent),a=l(e,r).beforestart();Si(e),i.selection=null===o?null:o,f.call(e),a.start().brush().end()}))},c.clear=function(t){c.move(t,null)},d.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0===--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=zn(this.that).datum();a.call(e,this.that,new go(e,{sourceEvent:n,target:c,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},c.extent=function(t){return arguments.length?(n="function"===typeof t?t:po(Mo(t)),c):n},c.filter=function(t){return arguments.length?(r="function"===typeof t?t:po(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"===typeof t?t:po(!!t),c):i},c.handleSize=function(t){return arguments.length?(u=+t,c):u},c.keyModifiers=function(t){return arguments.length?(o=!!t,c):o},c.on=function(){var t=a.on.apply(a,arguments);return t===a?c:t},c}var Wo=Math.abs,Go=Math.cos,Ko=Math.sin,Yo=Math.PI,Zo=Yo/2,Qo=2*Yo,Xo=Math.max,Jo=1e-12;function ta(t,e){return Array.from({length:e-t},(function(e,n){return t+n}))}function ea(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var na=function(){return oa(!1,!1)};function ra(){return oa(!1,!0)}function ia(){return oa(!0,!1)}function oa(t,e){var n=0,r=null,i=null,o=null;function a(a){var u,c=a.length,f=new Array(c),l=ta(0,c),d=new Array(c*c),h=new Array(c),p=0;a=Float64Array.from({length:c*c},e?function(t,e){return a[e%c][e/c|0]}:function(t,e){return a[e/c|0][e%c]});for(var g=0;gsa)if(Math.abs(f*u-s*c)>sa&&i){var d=n-o,h=r-a,p=u*u+s*s,g=d*d+h*h,m=Math.sqrt(p),b=Math.sqrt(l),v=i*Math.tan((aa-Math.acos((p+l-g)/(2*m*b)))/2),y=v/b,_=v/m;Math.abs(y-1)>sa&&(this._+="L"+(t+y*c)+","+(e+y*f)),this._+="A"+i+","+i+",0,0,"+ +(f*d>c*h)+","+(this._x1=t+_*u)+","+(this._y1=e+_*s)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),u=n*Math.sin(r),s=t+a,c=e+u,f=1^o,l=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+c:(Math.abs(this._x1-s)>sa||Math.abs(this._y1-c)>sa)&&(this._+="L"+s+","+c),n&&(l<0&&(l=l%ua+ua),l>ca?this._+="A"+n+","+n+",0,1,"+f+","+(t-a)+","+(e-u)+"A"+n+","+n+",0,1,"+f+","+(this._x1=s)+","+(this._y1=c):l>sa&&(this._+="A"+n+","+n+",0,"+ +(l>=aa)+","+f+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var da=la,ha=Array.prototype.slice,pa=function(t){return function(){return t}};function ga(t){return t.source}function ma(t){return t.target}function ba(t){return t.radius}function va(t){return t.startAngle}function ya(t){return t.endAngle}function _a(){return 0}function wa(){return 10}function Sa(t){var e=ga,n=ma,r=ba,i=ba,o=va,a=ya,u=_a,s=null;function c(){var c,f=e.apply(this,arguments),l=n.apply(this,arguments),d=u.apply(this,arguments)/2,h=ha.call(arguments),p=+r.apply(this,(h[0]=f,h)),g=o.apply(this,h)-Zo,m=a.apply(this,h)-Zo,b=+i.apply(this,(h[0]=l,h)),v=o.apply(this,h)-Zo,y=a.apply(this,h)-Zo;if(s||(s=c=da()),d>Jo&&(Wo(m-g)>2*d+Jo?m>g?(g+=d,m-=d):(g-=d,m+=d):g=m=(g+m)/2,Wo(y-v)>2*d+Jo?y>v?(v+=d,y-=d):(v-=d,y+=d):v=y=(v+y)/2),s.moveTo(p*Go(g),p*Ko(g)),s.arc(0,0,p,g,m),g!==v||m!==y)if(t){var _=+t.apply(this,arguments),w=b-_,S=(v+y)/2;s.quadraticCurveTo(0,0,w*Go(v),w*Ko(v)),s.lineTo(b*Go(S),b*Ko(S)),s.lineTo(w*Go(y),w*Ko(y))}else s.quadraticCurveTo(0,0,b*Go(v),b*Ko(v)),s.arc(0,0,b,v,y);if(s.quadraticCurveTo(0,0,p*Go(g),p*Ko(g)),s.closePath(),c)return s=null,c+""||null}return t&&(c.headRadius=function(e){return arguments.length?(t="function"===typeof e?e:pa(+e),c):t}),c.radius=function(t){return arguments.length?(r=i="function"===typeof t?t:pa(+t),c):r},c.sourceRadius=function(t){return arguments.length?(r="function"===typeof t?t:pa(+t),c):r},c.targetRadius=function(t){return arguments.length?(i="function"===typeof t?t:pa(+t),c):i},c.startAngle=function(t){return arguments.length?(o="function"===typeof t?t:pa(+t),c):o},c.endAngle=function(t){return arguments.length?(a="function"===typeof t?t:pa(+t),c):a},c.padAngle=function(t){return arguments.length?(u="function"===typeof t?t:pa(+t),c):u},c.source=function(t){return arguments.length?(e=t,c):e},c.target=function(t){return arguments.length?(n=t,c):n},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}var Oa=function(){return Sa()};function xa(){return Sa(wa)}var Ea=Math.PI/180,Ma=180/Math.PI,Ta=.96422,$a=.82521,Aa=4/29,ka=6/29,Ca=3*ka*ka;function Ia(t){if(t instanceof Ra)return new Ra(t.l,t.a,t.b,t.opacity);if(t instanceof Ha)return Va(t);t instanceof mr||(t=pr(t));var e,n,r=Fa(t.r),i=Fa(t.g),o=Fa(t.b),a=ja((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?e=n=a:(e=ja((.4360747*r+.3850649*i+.1430804*o)/Ta),n=ja((.0139322*r+.0971045*i+.7141733*o)/$a)),new Ra(116*a-16,500*(e-a),200*(a-n),t.opacity)}function Pa(t,e){return new Ra(t,0,0,null==e?1:e)}function Na(t,e,n,r){return 1===arguments.length?Ia(t):new Ra(t,e,n,null==r?1:r)}function Ra(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function ja(t){return t>.008856451679035631?Math.pow(t,1/3):t/Ca+Aa}function Da(t){return t>ka?t*t*t:Ca*(t-Aa)}function La(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Fa(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ba(t){if(t instanceof Ha)return new Ha(t.h,t.c,t.l,t.opacity);if(t instanceof Ra||(t=Ia(t)),0===t.a&&0===t.b)return new Ha(NaN,0r!==h>r&&n<(d-c)*(r-f)/(h-f)+c&&(i=-i)}return i}function uu(t,e,n){var r,i,o,a;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],a=e[r],i<=o&&o<=a||a<=o&&o<=i)}var su=function(){},cu=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],fu=function(){var t=1,e=1,n=pt,r=u;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(ru);else{var r=$(t),i=r[0],a=r[1];e=dt(i,a,e),e=Pt(Math.floor(i/e)*e,Math.floor(a/e)*e,e)}return e.map((function(e){return o(t,e)}))}function o(n,i){var o=[],u=[];return function(n,r,i){var o,u,s,c,f,l,d=new Array,h=new Array;o=u=-1,c=n[0]>=r,cu[c<<1].forEach(p);for(;++o=r,cu[s|c<<1].forEach(p);cu[c<<0].forEach(p);for(;++u=r,f=n[u*t]>=r,cu[c<<1|f<<2].forEach(p);++o=r,l=f,f=n[u*t+o+1]>=r,cu[s|c<<1|f<<2|l<<3].forEach(p);cu[c|f<<3].forEach(p)}o=-1,f=n[u*t]>=r,cu[f<<2].forEach(p);for(;++o=r,cu[f<<2|l<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+o,t[0][1]+u],s=[t[1][0]+o,t[1][1]+u],c=a(r),f=a(s);(e=h[c])?(n=d[f])?(delete h[e.end],delete d[n.start],e===n?(e.ring.push(s),i(e.ring)):d[e.start]=h[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[e.end],e.ring.push(s),h[e.end=f]=e):(e=d[f])?(n=h[c])?(delete d[e.start],delete h[n.end],e===n?(e.ring.push(s),i(e.ring)):d[n.start]=h[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=c]=e):d[c]=h[f]={start:c,end:f,ring:[r,s]}}cu[f<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e0?o.push([t]):u.push(t)})),u.forEach((function(t){for(var e,n=0,r=o.length;n0&&a0&&u=0&&o>=0))throw new Error("invalid size");return t=r,e=o,i},i.thresholds=function(t){return arguments.length?(n="function"===typeof t?t:Array.isArray(t)?iu(nu.call(t)):iu(t),i):n},i.smooth=function(t){return arguments.length?(r=t?u:su,i):r===u},i};function lu(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a=n&&(u>=o&&(s-=t.data[u-o+a*r]),e.data[u-n+a*r]=s/Math.min(u+1,r-1+o-u,o))}function du(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a=n&&(u>=o&&(s-=t.data[a+(u-o)*r]),e.data[a+(u-n)*r]=s/Math.min(u+1,i-1+o-u,o))}function hu(t){return t[0]}function pu(t){return t[1]}function gu(){return 1}var mu=function(){var t=hu,e=pu,n=gu,r=960,i=500,o=20,a=2,u=3*o,s=r+2*u>>a,c=i+2*u>>a,f=iu(20);function l(r){var i=new Float32Array(s*c),l=new Float32Array(s*c);r.forEach((function(r,o,f){var l=+t(r,o,f)+u>>a,d=+e(r,o,f)+u>>a,h=+n(r,o,f);l>=0&&l=0&&d>a),du({width:s,height:c,data:l},{width:s,height:c,data:i},o>>a),lu({width:s,height:c,data:i},{width:s,height:c,data:l},o>>a),du({width:s,height:c,data:l},{width:s,height:c,data:i},o>>a),lu({width:s,height:c,data:i},{width:s,height:c,data:l},o>>a),du({width:s,height:c,data:l},{width:s,height:c,data:i},o>>a);var h=f(i);if(!Array.isArray(h)){var p=mt(i);h=dt(0,p,h),(h=Pt(0,Math.floor(p/h)*h,h)).shift()}return fu().thresholds(h).size([s,c])(i).map(d)}function d(t){return t.value*=Math.pow(2,-2*a),t.coordinates.forEach(h),t}function h(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,a)-u,t[1]=t[1]*Math.pow(2,a)-u}function m(){return s=r+2*(u=3*o)>>a,c=i+2*u>>a,l}return l.x=function(e){return arguments.length?(t="function"===typeof e?e:iu(+e),l):t},l.y=function(t){return arguments.length?(e="function"===typeof t?t:iu(+t),l):e},l.weight=function(t){return arguments.length?(n="function"===typeof t?t:iu(+t),l):n},l.size=function(t){if(!arguments.length)return[r,i];var e=+t[0],n=+t[1];if(!(e>=0&&n>=0))throw new Error("invalid size");return r=e,i=n,m()},l.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(t)/Math.LN2),m()},l.thresholds=function(t){return arguments.length?(f="function"===typeof t?t:Array.isArray(t)?iu(nu.call(t)):iu(t),l):f},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*t*t+1)-1)/2),m()},l},bu=Math.pow(2,-52),vu=new Uint32Array(512),yu=function(){function t(e){Object(A.a)(this,t);var n=e.length>>1;if(n>0&&"number"!==typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;var r=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*r),this._halfedges=new Int32Array(3*r),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}return Object(k.a)(t,[{key:"update",value:function(){for(var t=this.coords,e=this._hullPrev,n=this._hullNext,r=this._hullTri,i=this._hullHash,o=t.length>>1,a=1/0,u=1/0,s=-1/0,c=-1/0,f=0;fs&&(s=l),d>c&&(c=d),this._ids[f]=f}for(var h,p,g,m=(a+s)/2,b=(u+c)/2,v=1/0,y=0;y0&&(p=O,v=x)}for(var E=t[2*p],M=t[2*p+1],T=1/0,$=0;$j&&(P[N++]=D,j=this._dists[D])}return this.hull=P.subarray(0,N),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Su(w,S,E,M,k,C)){var L=p,F=E,B=M;p=g,E=k,M=C,g=L,k=F,C=B}var U=function(t,e,n,r,i,o){var a=n-t,u=r-e,s=i-t,c=o-e,f=a*a+u*u,l=s*s+c*c,d=.5/(a*c-u*s);return{x:t+(c*f-u*l)*d,y:e+(a*l-s*f)*d}}(w,S,E,M,k,C);this._cx=U.x,this._cy=U.y;for(var z=0;z0&&Math.abs(K-V)<=bu&&Math.abs(Y-q)<=bu)&&(V=K,q=Y,G!==h&&G!==p&&G!==g)){for(var Z=0,Q=0,X=this._hashKey(K,Y);Q0?3-n:1+n)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}},{key:"_legalize",value:function(t){for(var e=this._triangles,n=this._halfedges,r=this.coords,i=0,o=0;;){var a=n[t],u=t-t%3;if(o=u+(t+2)%3,-1!==a){var s=a-a%3,c=u+(t+1)%3,f=s+(a+2)%3,l=e[o],d=e[t],h=e[c],p=e[f];if(Ou(r[2*l],r[2*l+1],r[2*d],r[2*d+1],r[2*h],r[2*h+1],r[2*p],r[2*p+1])){e[t]=p,e[a]=l;var g=n[f];if(-1===g){var m=this._hullStart;do{if(this._hullTri[m]===f){this._hullTri[m]=t;break}m=this._hullPrev[m]}while(m!==this._hullStart)}this._link(t,g),this._link(a,n[o]),this._link(o,f);var b=s+(a+1)%3;i1&&void 0!==arguments[1]?arguments[1]:Tu,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$u,i=e.length,o=new Float64Array(2*i),a=0;a=33306690738754716e-32*Math.abs(a+u)?a-u:0}function Su(t,e,n,r,i,o){return(wu(i,o,t,e,n,r)||wu(t,e,n,r,i,o)||wu(n,r,i,o,t,e))<0}function Ou(t,e,n,r,i,o,a,u){var s=t-a,c=e-u,f=n-a,l=r-u,d=i-a,h=o-u,p=f*f+l*l,g=d*d+h*h;return s*(l*g-p*h)-c*(f*g-p*d)+(s*s+c*c)*(f*h-l*d)<0}function xu(t,e,n,r,i,o){var a=n-t,u=r-e,s=i-t,c=o-e,f=a*a+u*u,l=s*s+c*c,d=.5/(a*c-u*s),h=(c*f-u*l)*d,p=(a*l-s*f)*d;return h*h+p*p}function Eu(t,e,n,r){if(r-n<=20)for(var i=n+1;i<=r;i++){for(var o=t[i],a=e[o],u=i-1;u>=n&&e[t[u]]>a;)t[u+1]=t[u--];t[u+1]=o}else{var s=n+1,c=r;Mu(t,n+r>>1,s),e[t[n]]>e[t[r]]&&Mu(t,n,r),e[t[s]]>e[t[r]]&&Mu(t,s,r),e[t[n]]>e[t[s]]&&Mu(t,n,s);for(var f=t[s],l=e[f];;){do{s++}while(e[t[s]]l);if(c=c-n?(Eu(t,e,s,r),Eu(t,e,n,c-1)):(Eu(t,e,n,c-1),Eu(t,e,s,r))}}function Mu(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Tu(t){return t[0]}function $u(t){return t[1]}var Au=1e-6,ku=function(){function t(){Object(A.a)(this,t),this._x0=this._y0=this._x1=this._y1=null,this._=""}return Object(k.a)(t,[{key:"moveTo",value:function(t,e){this._+="M".concat(this._x0=this._x1=+t,",").concat(this._y0=this._y1=+e)}},{key:"closePath",value:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}},{key:"lineTo",value:function(t,e){this._+="L".concat(this._x1=+t,",").concat(this._y1=+e)}},{key:"arc",value:function(t,e,n){var r=(t=+t)+(n=+n),i=e=+e;if(n<0)throw new Error("negative radius");null===this._x1?this._+="M".concat(r,",").concat(i):(Math.abs(this._x1-r)>Au||Math.abs(this._y1-i)>Au)&&(this._+="L"+r+","+i),n&&(this._+="A".concat(n,",").concat(n,",0,1,1,").concat(t-n,",").concat(e,"A").concat(n,",").concat(n,",0,1,1,").concat(this._x1=r,",").concat(this._y1=i))}},{key:"rect",value:function(t,e,n,r){this._+="M".concat(this._x0=this._x1=+t,",").concat(this._y0=this._y1=+e,"h").concat(+n,"v").concat(+r,"h").concat(-n,"Z")}},{key:"value",value:function(){return this._||null}}]),t}(),Cu=function(){function t(){Object(A.a)(this,t),this._=[]}return Object(k.a)(t,[{key:"moveTo",value:function(t,e){this._.push([t,e])}},{key:"closePath",value:function(){this._.push(this._[0].slice())}},{key:"lineTo",value:function(t,e){this._.push([t,e])}},{key:"value",value:function(){return this._.length?this._:null}}]),t}(),Iu=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0,960,500],r=Object(P.a)(n,4),i=r[0],o=r[1],a=r[2],u=r[3];if(Object(A.a)(this,t),!((a=+a)>=(i=+i))||!((u=+u)>=(o=+o)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=a,this.xmin=i,this.ymax=u,this.ymin=o,this._init()}return Object(k.a)(t,[{key:"update",value:function(){return this.delaunay.update(),this._init(),this}},{key:"_init",value:function(){for(var t,e,n=this.delaunay,r=n.points,i=n.hull,o=n.triangles,a=this.vectors,u=this.circumcenters=this._circumcenters.subarray(0,o.length/3*2),s=0,c=0,f=o.length;s1;)i-=2;for(var o=2;o4)for(var u=0;u0){if(e>=this.ymax)return null;(i=(this.ymax-e)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/n)this.xmax?2:0)|(ethis.ymax?8:0)}}]),t}(),Pu=u.a.mark(Uu),Nu=2*Math.PI,Ru=Math.pow;function ju(t){return t[0]}function Du(t){return t[1]}function Lu(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}var Fu=function(){function t(e){Object(A.a)(this,t),this._delaunator=new yu(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}return Object(k.a)(t,[{key:"update",value:function(){return this._delaunator.update(),this._init(),this}},{key:"_init",value:function(){var t=this._delaunator,e=this.points;if(t.hull&&t.hull.length>2&&function(t){for(var e=t.triangles,n=t.coords,r=0;r1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},(function(t,e){return e})).sort((function(t,n){return e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]}));for(var n=this.collinear[0],r=this.collinear[this.collinear.length-1],i=[e[2*n],e[2*n+1],e[2*r],e[2*r+1]],o=1e-8*Math.hypot(i[3]-i[1],i[2]-i[0]),a=0,u=e.length/2;a0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=f[0],this.triangles[1]=f[1],this.triangles[2]=f[1],d[f[0]]=1,2===f.length&&(d[f[1]]=0))}},{key:"voronoi",value:function(t){return new Iu(this,t)}},{key:"neighbors",value:u.a.mark((function t(e){var n,r,i,o,a,s,c,f,l,d,h;return u.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.inedges,r=this.hull,i=this._hullIndex,o=this.halfedges,a=this.triangles,!(s=this.collinear)){t.next=10;break}if(!((c=s.indexOf(e))>0)){t.next=6;break}return t.next=6,s[c-1];case 6:if(!(c2&&void 0!==arguments[2]?arguments[2]:0;if((t=+t)!==t||(e=+e)!==e)return-1;for(var r,i=n;(r=this._step(n,t,e))>=0&&r!==n&&r!==i;)n=r;return r}},{key:"_step",value:function(t,e,n){var r=this.inedges,i=this.hull,o=this._hullIndex,a=this.halfedges,u=this.triangles,s=this.points;if(-1===r[t]||!s.length)return(t+1)%(s.length>>1);var c=t,f=Ru(e-s[2*t],2)+Ru(n-s[2*t+1],2),l=r[t],d=l;do{var h=u[d],p=Ru(e-s[2*h],2)+Ru(n-s[2*h+1],2);if(p1&&void 0!==arguments[1]?arguments[1]:2,n=null==t?t=new ku:void 0,r=this.points,i=0,o=r.length;i1&&void 0!==arguments[1]?arguments[1]:ju,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Du,i=arguments.length>3?arguments[3]:void 0;return new t("length"in e?Bu(e,n,r,i):Float64Array.from(Uu(e,n,r,i)))}}]),t}();function Bu(t,e,n,r){for(var i=t.length,o=new Float64Array(2*i),a=0;al}s.mouse("drag",r)}function g(t){zn(t.view).on("mousemove.drag mouseup.drag",null),Wn(t.view,n),Vn(t),s.mouse("end",t)}function m(t,e){if(i.call(this,t,e)){var n,r,a=t.changedTouches,u=o.call(this,t,e),s=a.length;for(n=0;n9999?"+"+Ju(e,6):Ju(e,4))+"-"+Ju(t.getUTCMonth()+1,2)+"-"+Ju(t.getUTCDate(),2)+(o?"T"+Ju(n,2)+":"+Ju(r,2)+":"+Ju(i,2)+"."+Ju(o,3)+"Z":i?"T"+Ju(n,2)+":"+Ju(r,2)+":"+Ju(i,2)+"Z":r||n?"T"+Ju(n,2)+":"+Ju(r,2)+"Z":"")}var es=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,u=0,s=o<=0,c=!1;function f(){if(s)return Zu;if(c)return c=!1,Yu;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++=o?s=!0:10===(r=t.charCodeAt(a++))?c=!0:13===r&&(c=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a=(o=(g+b)/2))?g=o:b=o,(f=n>=(a=(m+v)/2))?m=a:v=a,i=h,!(h=h[l=f<<1|c]))return i[l]=p,t;if(u=+t._x.call(null,h.data),s=+t._y.call(null,h.data),e===u&&n===s)return p.next=h,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(c=e>=(o=(g+b)/2))?g=o:b=o,(f=n>=(a=(m+v)/2))?m=a:v=a}while((l=f<<1|c)===(d=(s>=a)<<1|u>=o));return i[d]=h,i[l]=p,t}var bc=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function vc(t){return t[0]}function yc(t){return t[1]}function _c(t,e,n){var r=new wc(null==e?vc:e,null==n?yc:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function wc(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Sc(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Oc=_c.prototype=wc.prototype;Oc.copy=function(){var t,e,n=new wc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Sc(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Sc(e));return n},Oc.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return mc(this.cover(e,n),e,n,t)},Oc.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),u=new Array(o),s=1/0,c=1/0,f=-1/0,l=-1/0;for(n=0;nf&&(f=r),il&&(l=i));if(s>f||c>l)return this;for(this.cover(s,c).cover(f,l),n=0;nt||t>=i||r>e||e>=o;)switch(u=(ed||(o=s.y0)>h||(a=s.x1)=b)<<1|t>=m)&&(s=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=s)}else{var v=t-+this._x.call(null,g.data),y=e-+this._y.call(null,g.data),_=v*v+y*y;if(_=(u=(p+m)/2))?p=u:m=u,(f=a>=(s=(g+b)/2))?g=s:b=s,e=h,!(h=h[l=f<<1|c]))return this;if(!h.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,d=l)}for(;h.data!==t;)if(r=h,!(h=h.next))return this;return(i=h.next)&&delete h.next,r?(i?r.next=i:delete r.next,this):e?(i?e[l]=i:delete e[l],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[d]=h:this._root=h),this):(this._root=i,this)},Oc.removeAll=function(t){for(var e=0,n=t.length;ec+p||of+p||as.index){var g=c-u.x-u.vx,m=f-u.y-u.vy,b=g*g+m*m;bt.r&&(t.r=t[e].r)}function s(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r1?(null==n?u.delete(t):u.set(t,p(n)),e):u.get(t)},find:function(e,n,r){var i,o,a,u,s,c=0,f=t.length;for(null==r?r=1/0:r*=r,c=0;c1?(c.on(t,n),e):c.on(t)}}},Dc=function(){var t,e,n,r,i,o=xc(-30),a=1,u=1/0,s=.81;function c(n){var i,o=t.length,a=_c(t,Pc,Nc).visitAfter(l);for(r=n,i=0;i=u)){(t.data!==e||t.next)&&(0===l&&(p+=(l=Ec(n))*l),0===d&&(p+=(d=Ec(n))*d),p1?r[0]+r.slice(2):r,+t.slice(n+1)]}var zc=function(t){return(t=Uc(Math.abs(t)))?t[1]:NaN},Hc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vc(t){if(!(e=Hc.exec(t)))throw new Error("invalid format: "+t);var e;return new qc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function qc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}Vc.prototype=qc.prototype,qc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Wc,Gc,Kc,Yc,Zc=function(t,e){var n=Uc(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Qc={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Zc(100*t,e)},r:Zc,s:function(t,e){var n=Uc(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Wc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Uc(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Xc=function(t){return t},Jc=Array.prototype.map,tf=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"],ef=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Xc:(e=Jc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(t.substring(i-=u,i+u)),!((s+=u+1)>r));)u=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?Xc:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Jc.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"\u2212":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function l(t){var e=(t=Vc(t)).fill,n=t.align,l=t.sign,d=t.symbol,h=t.zero,p=t.width,g=t.comma,m=t.precision,b=t.trim,v=t.type;"n"===v?(g=!0,v="g"):Qc[v]||(void 0===m&&(m=12),b=!0,v="g"),(h||"0"===e&&"="===n)&&(h=!0,e="0",n="=");var y="$"===d?i:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===d?o:/[%p]/.test(v)?s:"",w=Qc[v],S=/[defgprs%]/.test(v);function O(t){var i,o,s,d=y,O=_;if("c"===v)O=w(t)+O,t="";else{var x=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),m),b&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),x&&0===+t&&"+"!==l&&(x=!1),d=(x?"("===l?l:c:"-"===l||"("===l?"":l)+d,O=("s"===v?tf[8+Wc/3]:"")+O+(x&&"("===l?")":""),S)for(i=-1,o=t.length;++i(s=t.charCodeAt(i))||s>57){O=(46===s?a+t.slice(i+1):t.slice(i))+O,t=t.slice(0,i);break}}g&&!h&&(t=r(t,1/0));var E=d.length+t.length+O.length,M=E>1)+d+t+O+M.slice(E);break;default:t=M+d+t+O}return u(t)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),O.toString=function(){return t+""},O}return{format:l,formatPrefix:function(t,e){var n=l(((t=Vc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(zc(e)/3))),i=Math.pow(10,-r),o=tf[8+r/3];return function(t){return n(i*t)+o}}}};function nf(t){return Gc=ef(t),Kc=Gc.format,Yc=Gc.formatPrefix,Gc}nf({thousands:",",grouping:[3],currency:["$",""]});var rf=function(t){return Math.max(0,-zc(Math.abs(t)))},of=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(zc(e)/3)))-zc(Math.abs(t)))},af=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,zc(e)-zc(t))+1},uf=1e-6,sf=1e-12,cf=Math.PI,ff=cf/2,lf=cf/4,df=2*cf,hf=180/cf,pf=cf/180,gf=Math.abs,mf=Math.atan,bf=Math.atan2,vf=Math.cos,yf=Math.ceil,_f=Math.exp,wf=(Math.floor,Math.hypot),Sf=Math.log,Of=Math.pow,xf=Math.sin,Ef=Math.sign||function(t){return t>0?1:t<0?-1:0},Mf=Math.sqrt,Tf=Math.tan;function $f(t){return t>1?0:t<-1?cf:Math.acos(t)}function Af(t){return t>1?ff:t<-1?-ff:Math.asin(t)}function kf(t){return(t=xf(t/2))*t}function Cf(){}function If(t,e){t&&Nf.hasOwnProperty(t.type)&&Nf[t.type](t,e)}var Pf={Feature:function(t,e){If(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=vf(e=(e*=pf)/2+lf),a=xf(e),u=Uf*a,s=Bf*o+u*vf(i),c=u*r*xf(i);Hf.add(bf(c,s)),Ff=t,Bf=o,Uf=a}var Zf,Qf,Xf,Jf,tl,el,nl,rl,il,ol,al,ul=function(t){return Vf=new C,zf(t,qf),2*Vf};function sl(t){return[bf(t[1],t[0]),Af(t[2])]}function cl(t){var e=t[0],n=t[1],r=vf(n);return[r*vf(e),r*xf(e),xf(n)]}function fl(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ll(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function dl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function hl(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function pl(t){var e=Mf(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var gl={point:ml,lineStart:vl,lineEnd:yl,polygonStart:function(){gl.point=_l,gl.lineStart=wl,gl.lineEnd=Sl,il=new C,qf.polygonStart()},polygonEnd:function(){qf.polygonEnd(),gl.point=ml,gl.lineStart=vl,gl.lineEnd=yl,Hf<0?(Zf=-(Xf=180),Qf=-(Jf=90)):il>uf?Jf=90:il<-1e-6&&(Qf=-90),al[0]=Zf,al[1]=Xf},sphere:function(){Zf=-(Xf=180),Qf=-(Jf=90)}};function ml(t,e){ol.push(al=[Zf=t,Xf=t]),eJf&&(Jf=e)}function bl(t,e){var n=cl([t*pf,e*pf]);if(rl){var r=ll(rl,n),i=ll([r[1],-r[0],0],r);pl(i),i=sl(i);var o,a=t-tl,u=a>0?1:-1,s=i[0]*hf*u,c=gf(a)>180;c^(u*tlJf&&(Jf=o):c^(u*tl<(s=(s+360)%360-180)&&sJf&&(Jf=e)),c?tOl(Zf,Xf)&&(Xf=t):Ol(t,Xf)>Ol(Zf,Xf)&&(Zf=t):Xf>=Zf?(tXf&&(Xf=t)):t>tl?Ol(Zf,t)>Ol(Zf,Xf)&&(Xf=t):Ol(t,Xf)>Ol(Zf,Xf)&&(Zf=t)}else ol.push(al=[Zf=t,Xf=t]);eJf&&(Jf=e),rl=n,tl=t}function vl(){gl.point=bl}function yl(){al[0]=Zf,al[1]=Xf,gl.point=ml,rl=null}function _l(t,e){if(rl){var n=t-tl;il.add(gf(n)>180?n+(n>0?360:-360):n)}else el=t,nl=e;qf.point(t,e),bl(t,e)}function wl(){qf.lineStart()}function Sl(){_l(el,nl),qf.lineEnd(),gf(il)>uf&&(Zf=-(Xf=180)),al[0]=Zf,al[1]=Xf,rl=null}function Ol(t,e){return(e-=t)<0?e+360:e}function xl(t,e){return t[0]-e[0]}function El(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eOl(r[0],r[1])&&(r[1]=i[1]),Ol(i[0],r[1])>Ol(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(u=Ol(r[1],i[0]))>a&&(a=u,Zf=i[0],Xf=r[1])}return ol=al=null,Zf===1/0||Qf===1/0?[[NaN,NaN],[NaN,NaN]]:[[Zf,Qf],[Xf,Jf]]},Hl={sphere:Cf,point:Vl,lineStart:Wl,lineEnd:Yl,polygonStart:function(){Hl.lineStart=Zl,Hl.lineEnd=Ql},polygonEnd:function(){Hl.lineStart=Wl,Hl.lineEnd=Yl}};function Vl(t,e){t*=pf;var n=vf(e*=pf);ql(n*vf(t),n*xf(t),xf(e))}function ql(t,e,n){++Ml,$l+=(t-$l)/Ml,Al+=(e-Al)/Ml,kl+=(n-kl)/Ml}function Wl(){Hl.point=Gl}function Gl(t,e){t*=pf;var n=vf(e*=pf);Fl=n*vf(t),Bl=n*xf(t),Ul=xf(e),Hl.point=Kl,ql(Fl,Bl,Ul)}function Kl(t,e){t*=pf;var n=vf(e*=pf),r=n*vf(t),i=n*xf(t),o=xf(e),a=bf(Mf((a=Bl*o-Ul*i)*a+(a=Ul*r-Fl*o)*a+(a=Fl*i-Bl*r)*a),Fl*r+Bl*i+Ul*o);Tl+=a,Cl+=a*(Fl+(Fl=r)),Il+=a*(Bl+(Bl=i)),Pl+=a*(Ul+(Ul=o)),ql(Fl,Bl,Ul)}function Yl(){Hl.point=Vl}function Zl(){Hl.point=Xl}function Ql(){Jl(Dl,Ll),Hl.point=Vl}function Xl(t,e){Dl=t,Ll=e,t*=pf,e*=pf,Hl.point=Jl;var n=vf(e);Fl=n*vf(t),Bl=n*xf(t),Ul=xf(e),ql(Fl,Bl,Ul)}function Jl(t,e){t*=pf;var n=vf(e*=pf),r=n*vf(t),i=n*xf(t),o=xf(e),a=Bl*o-Ul*i,u=Ul*r-Fl*o,s=Fl*i-Bl*r,c=wf(a,u,s),f=Af(c),l=c&&-f/c;Nl.add(l*a),Rl.add(l*u),jl.add(l*s),Tl+=f,Cl+=f*(Fl+(Fl=r)),Il+=f*(Bl+(Bl=i)),Pl+=f*(Ul+(Ul=o)),ql(Fl,Bl,Ul)}var td=function(t){Ml=Tl=$l=Al=kl=Cl=Il=Pl=0,Nl=new C,Rl=new C,jl=new C,zf(t,Hl);var e=+Nl,n=+Rl,r=+jl,i=wf(e,n,r);return icf?t+Math.round(-t/df)*df:t,e]}function id(t,e,n){return(t%=df)?e||n?nd(ad(t),ud(e,n)):ad(t):e||n?ud(e,n):rd}function od(t){return function(e,n){return[(e+=t)>cf?e-df:e<-cf?e+df:e,n]}}function ad(t){var e=od(t);return e.invert=od(-t),e}function ud(t,e){var n=vf(t),r=xf(t),i=vf(e),o=xf(e);function a(t,e){var a=vf(e),u=vf(t)*a,s=xf(t)*a,c=xf(e),f=c*n+u*r;return[bf(s*i-f*o,u*n-c*r),Af(f*i+s*o)]}return a.invert=function(t,e){var a=vf(e),u=vf(t)*a,s=xf(t)*a,c=xf(e),f=c*i-s*o;return[bf(s*i+c*o,u*n+f*r),Af(f*n-u*r)]},a}rd.invert=rd;var sd=function(t){function e(e){return(e=t(e[0]*pf,e[1]*pf))[0]*=hf,e[1]*=hf,e}return t=id(t[0]*pf,t[1]*pf,t.length>2?t[2]*pf:0),e.invert=function(e){return(e=t.invert(e[0]*pf,e[1]*pf))[0]*=hf,e[1]*=hf,e},e};function cd(t,e,n,r,i,o){if(n){var a=vf(e),u=xf(e),s=r*n;null==i?(i=e+r*df,o=e-s/2):(i=fd(a,i),o=fd(a,o),(r>0?io)&&(i+=r*df));for(var c,f=i;r>0?f>o:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},hd=function(t,e){return gf(t[0]-e[0])=0;--o)i.point((f=c[o])[0],f[1]);else r(d.x,d.p.x,-1,i);d=d.p}c=(d=d.o).z,h=!h}while(!d.v);i.lineEnd()}}};function md(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,M=E*x,T=M>cf,$=m*S;if(s.add(bf($*E*xf(M),b*O+$*vf(M))),a+=T?x+E*df:x,T^p>=n^_>=n){var A=ll(cl(h),cl(y));pl(A);var k=ll(o,A);pl(k);var I=(T^x>=0?-1:1)*Af(k[2]);(r>I||r===I&&(A[0]||A[1]))&&(u+=T^x>=0?1:-1)}}return(a<-1e-6||a0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t1&&2&s&&d.push(d.pop().concat(d.shift())),a.push(d.filter(_d))}return d}};function _d(t){return t.length>1}function wd(t,e){return((t=t.x)[0]<0?t[1]-ff-uf:ff-t[1])-((e=e.x)[0]<0?e[1]-ff-uf:ff-e[1])}var Sd=yd((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var u=o>0?cf:-cf,s=gf(o-n);gf(s-cf)0?ff:-ff),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),e=0):i!==u&&s>=cf&&(gf(n-i)uf?mf((xf(e)*(o=vf(r))*xf(n)-xf(r)*(i=vf(e))*xf(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),e=0),t.point(n=o,r=a),i=u},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*ff,r.point(-cf,i),r.point(0,i),r.point(cf,i),r.point(cf,0),r.point(cf,-i),r.point(0,-i),r.point(-cf,-i),r.point(-cf,0),r.point(-cf,i);else if(gf(t[0]-e[0])>uf){var o=t[0]0,i=gf(e)>uf;function o(t,n){return vf(t)*vf(n)>e}function a(t,n,r){var i=[1,0,0],o=ll(cl(t),cl(n)),a=fl(o,o),u=o[0],s=a-u*u;if(!s)return!r&&t;var c=e*a/s,f=-e*u/s,l=ll(i,o),d=hl(i,c);dl(d,hl(o,f));var h=l,p=fl(d,h),g=fl(h,h),m=p*p-g*(fl(d,d)-1);if(!(m<0)){var b=Mf(m),v=hl(h,(-p-b)/g);if(dl(v,d),v=sl(v),!r)return v;var y,_=t[0],w=n[0],S=t[1],O=n[1];w<_&&(y=_,_=w,w=y);var x=w-_,E=gf(x-cf)0^v[1]<(gf(v[0]-_)cf^(_<=v[0]&&v[0]<=w)){var M=hl(h,(-p+b)/g);return dl(M,d),[v,sl(M)]}}}function u(e,n){var i=r?t:cf-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return yd(o,(function(t){var e,n,s,c,f;return{lineStart:function(){c=s=!1,f=1},point:function(l,d){var h,p=[l,d],g=o(l,d),m=r?g?0:u(l,d):g?u(l+(l<0?cf:-cf),d):0;if(!e&&(c=s=g)&&t.lineStart(),g!==s&&(!(h=a(e,p))||hd(e,h)||hd(p,h))&&(p[2]=1),g!==s)f=0,g?(t.lineStart(),h=a(p,e),t.point(h[0],h[1])):(h=a(e,p),t.point(h[0],h[1],2),t.lineEnd()),e=h;else if(i&&e&&r^g){var b;m&n||!(b=a(p,e,!0))||(f=0,r?(t.lineStart(),t.point(b[0][0],b[0][1]),t.point(b[1][0],b[1][1]),t.lineEnd()):(t.point(b[1][0],b[1][1]),t.lineEnd(),t.lineStart(),t.point(b[0][0],b[0][1],3)))}!g||e&&hd(e,p)||t.point(p[0],p[1]),e=p,s=g,n=m},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return f|(c&&s)<<1}}}),(function(e,r,i,o){cd(o,t,n,i,e,r)}),r?[0,-t]:[-cf,t-cf])},xd=1e9,Ed=-xd;function Md(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,u,c){var f=0,l=0;if(null==i||(f=a(i,u))!==(l=a(o,u))||s(i,o)<0^u>0)do{c.point(0===f||3===f?t:n,f>1?r:e)}while((f=(f+u+4)%4)!==l);else c.point(o[0],o[1])}function a(r,i){return gf(r[0]-t)0?0:3:gf(r[0]-n)0?2:1:gf(r[1]-e)0?1:0:i>0?3:2}function u(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,c,f,l,d,h,p,g,m,b,v,y=a,_=dd(),w={point:S,lineStart:function(){w.point=O,c&&c.push(f=[]);b=!0,m=!1,p=g=NaN},lineEnd:function(){s&&(O(l,d),h&&m&&_.rejoin(),s.push(_.result()));w.point=S,m&&y.lineEnd()},polygonStart:function(){y=_,s=[],c=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;nr&&(d-o)*(r-a)>(h-a)*(t-o)&&++e:h<=r&&(d-o)*(r-a)<(h-a)*(t-o)&&--e;return e}(),n=v&&e,i=(s=At(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&gd(s,u,e,o,a),a.polygonEnd());y=a,s=c=f=null}};function S(t,e){i(t,e)&&y.point(t,e)}function O(o,a){var u=i(o,a);if(c&&f.push([o,a]),b)l=o,d=a,h=u,b=!1,u&&(y.lineStart(),y.point(o,a));else if(u&&m)y.point(o,a);else{var s=[p=Math.max(Ed,Math.min(xd,p)),g=Math.max(Ed,Math.min(xd,g))],_=[o=Math.max(Ed,Math.min(xd,o)),a=Math.max(Ed,Math.min(xd,a))];!function(t,e,n,r,i,o){var a,u=t[0],s=t[1],c=0,f=1,l=e[0]-u,d=e[1]-s;if(a=n-u,l||!(a>0)){if(a/=l,l<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>f)return;a>c&&(c=a)}else if(l>0){if(a0)){if(a/=d,d<0){if(a0){if(a>f)return;a>c&&(c=a)}if(a=o-s,d||!(a<0)){if(a/=d,d<0){if(a>f)return;a>c&&(c=a)}else if(d>0){if(a0&&(t[0]=u+c*l,t[1]=s+c*d),f<1&&(e[0]=u+f*l,e[1]=s+f*d),!0}}}}}(s,_,t,e,n,r)?u&&(y.lineStart(),y.point(o,a),v=!1):(m||(y.lineStart(),y.point(s[0],s[1])),y.point(_[0],_[1]),u||y.lineEnd(),v=!1)}p=o,g=a,m=u}return w}}var Td,$d,Ad,kd,Cd=function(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=Md(r,i,o,a)(e=n)},extent:function(u){return arguments.length?(r=+u[0][0],i=+u[0][1],o=+u[1][0],a=+u[1][1],t=e=null,n):[[r,i],[o,a]]}}},Id={sphere:Cf,point:Cf,lineStart:function(){Id.point=Nd,Id.lineEnd=Pd},lineEnd:Cf,polygonStart:Cf,polygonEnd:Cf};function Pd(){Id.point=Id.lineEnd=Cf}function Nd(t,e){$d=t*=pf,Ad=xf(e*=pf),kd=vf(e),Id.point=Rd}function Rd(t,e){t*=pf;var n=xf(e*=pf),r=vf(e),i=gf(t-$d),o=vf(i),a=r*xf(i),u=kd*n-Ad*r*o,s=Ad*n+kd*r*o;Td.add(bf(Mf(a*a+u*u),s)),$d=t,Ad=n,kd=r}var jd=function(t){return Td=new C,zf(t,Id),+Td},Dd=[null,null],Ld={type:"LineString",coordinates:Dd},Fd=function(t,e){return Dd[0]=t,Dd[1]=e,jd(Ld)},Bd={Feature:function(t,e){return zd(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r0&&(i=Fd(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))uf})).map(s)).concat(Pt(yf(o/h)*h,i,h).filter((function(t){return gf(t%g)>uf})).map(c))}return b.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},b.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(l(a).slice(1),f(n).reverse().slice(1),l(u).reverse().slice(1))]}},b.extent=function(t){return arguments.length?b.extentMajor(t).extentMinor(t):b.extentMinor()},b.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],u=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),u>a&&(t=u,u=a,a=t),b.precision(m)):[[r,u],[n,a]]},b.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),b.precision(m)):[[e,o],[t,i]]},b.step=function(t){return arguments.length?b.stepMajor(t).stepMinor(t):b.stepMinor()},b.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],b):[p,g]},b.stepMinor=function(t){return arguments.length?(d=+t[0],h=+t[1],b):[d,h]},b.precision=function(d){return arguments.length?(m=+d,s=Yd(o,i,90),c=Zd(e,t,m),f=Yd(u,a,90),l=Zd(r,n,m),b):m},b.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Xd(){return Qd()()}var Jd,th,eh,nh,rh=function(t,e){var n=t[0]*pf,r=t[1]*pf,i=e[0]*pf,o=e[1]*pf,a=vf(r),u=xf(r),s=vf(o),c=xf(o),f=a*vf(n),l=a*xf(n),d=s*vf(i),h=s*xf(i),p=2*Af(Mf(kf(o-r)+a*s*kf(i-n))),g=xf(p),m=p?function(t){var e=xf(t*=p)/g,n=xf(p-t)/g,r=n*f+e*d,i=n*l+e*h,o=n*u+e*c;return[bf(i,r)*hf,bf(o,Mf(r*r+i*i))*hf]}:function(){return[n*hf,r*hf]};return m.distance=p,m},ih=function(t){return t},oh=new C,ah=new C,uh={point:Cf,lineStart:Cf,lineEnd:Cf,polygonStart:function(){uh.lineStart=sh,uh.lineEnd=lh},polygonEnd:function(){uh.lineStart=uh.lineEnd=uh.point=Cf,oh.add(gf(ah)),ah=new C},result:function(){var t=oh/2;return oh=new C,t}};function sh(){uh.point=ch}function ch(t,e){uh.point=fh,Jd=eh=t,th=nh=e}function fh(t,e){ah.add(nh*t-eh*e),eh=t,nh=e}function lh(){fh(Jd,th)}var dh=uh,hh=1/0,ph=hh,gh=-hh,mh=gh;var bh,vh,yh,_h,wh={point:function(t,e){tgh&&(gh=t);emh&&(mh=e)},lineStart:Cf,lineEnd:Cf,polygonStart:Cf,polygonEnd:Cf,result:function(){var t=[[hh,ph],[gh,mh]];return gh=mh=-(ph=hh=1/0),t}},Sh=0,Oh=0,xh=0,Eh=0,Mh=0,Th=0,$h=0,Ah=0,kh=0,Ch={point:Ih,lineStart:Ph,lineEnd:jh,polygonStart:function(){Ch.lineStart=Dh,Ch.lineEnd=Lh},polygonEnd:function(){Ch.point=Ih,Ch.lineStart=Ph,Ch.lineEnd=jh},result:function(){var t=kh?[$h/kh,Ah/kh]:Th?[Eh/Th,Mh/Th]:xh?[Sh/xh,Oh/xh]:[NaN,NaN];return Sh=Oh=xh=Eh=Mh=Th=$h=Ah=kh=0,t}};function Ih(t,e){Sh+=t,Oh+=e,++xh}function Ph(){Ch.point=Nh}function Nh(t,e){Ch.point=Rh,Ih(yh=t,_h=e)}function Rh(t,e){var n=t-yh,r=e-_h,i=Mf(n*n+r*r);Eh+=i*(yh+t)/2,Mh+=i*(_h+e)/2,Th+=i,Ih(yh=t,_h=e)}function jh(){Ch.point=Ih}function Dh(){Ch.point=Fh}function Lh(){Bh(bh,vh)}function Fh(t,e){Ch.point=Bh,Ih(bh=yh=t,vh=_h=e)}function Bh(t,e){var n=t-yh,r=e-_h,i=Mf(n*n+r*r);Eh+=i*(yh+t)/2,Mh+=i*(_h+e)/2,Th+=i,$h+=(i=_h*t-yh*e)*(yh+t),Ah+=i*(_h+e),kh+=3*i,Ih(yh=t,_h=e)}var Uh=Ch;function zh(t){this._context=t}zh.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,df)}},result:Cf};var Hh,Vh,qh,Wh,Gh,Kh=new C,Yh={point:Cf,lineStart:function(){Yh.point=Zh},lineEnd:function(){Hh&&Qh(Vh,qh),Yh.point=Cf},polygonStart:function(){Hh=!0},polygonEnd:function(){Hh=null},result:function(){var t=+Kh;return Kh=new C,t}};function Zh(t,e){Yh.point=Qh,Vh=Wh=t,qh=Gh=e}function Qh(t,e){Wh-=t,Gh-=e,Kh.add(Mf(Wh*Wh+Gh*Gh)),Wh=t,Gh=e}var Xh=Yh;function Jh(){this._string=[]}function tp(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Jh.prototype={_radius:4.5,_circle:tp(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=tp(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ep=function(t,e){var n,r,i=4.5;function o(t){return t&&("function"===typeof i&&r.pointRadius(+i.apply(this,arguments)),zf(t,n(r))),r.result()}return o.area=function(t){return zf(t,n(dh)),dh.result()},o.measure=function(t){return zf(t,n(Xh)),Xh.result()},o.bounds=function(t){return zf(t,n(wh)),wh.result()},o.centroid=function(t){return zf(t,n(Uh)),Uh.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,ih):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new Jh):new zh(e=t),"function"!==typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"===typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)},np=function(t){return{stream:rp(t)}};function rp(t){return function(e){var n=new ip;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ip(){}function op(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),zf(n,t.stream(wh)),e(wh.result()),null!=r&&t.clipExtent(r),t}function ap(t,e,n){return op(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,u=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,u])}),n)}function up(t,e,n){return ap(t,[[0,0],e],n)}function sp(t,e,n){return op(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function cp(t,e,n){return op(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}ip.prototype={constructor:ip,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var fp=vf(30*pf),lp=function(t,e){return+e?function(t,e){function n(r,i,o,a,u,s,c,f,l,d,h,p,g,m){var b=c-r,v=f-i,y=b*b+v*v;if(y>4*e&&g--){var _=a+d,w=u+h,S=s+p,O=Mf(_*_+w*w+S*S),x=Af(S/=O),E=gf(gf(S)-1)e||gf((b*A+v*k)/y-.5)>.3||a*d+u*h+s*p2?t[2]%360*pf:0,A()):[m*hf,b*hf,v*hf]},T.angle=function(t){return arguments.length?(y=t%360*pf,A()):y*hf},T.reflectX=function(t){return arguments.length?(_=t?-1:1,A()):_<0},T.reflectY=function(t){return arguments.length?(w=t?-1:1,A()):w<0},T.precision=function(t){return arguments.length?(a=lp(u,M=t*t),k()):Mf(M)},T.fitExtent=function(t,e){return ap(T,t,e)},T.fitSize=function(t,e){return up(T,t,e)},T.fitWidth=function(t,e){return sp(T,t,e)},T.fitHeight=function(t,e){return cp(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&$,A()}}function mp(t){var e=0,n=cf/3,r=gp(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*pf,n=t[1]*pf):[e*hf,n*hf]},i}function bp(t,e){var n=xf(t),r=(n+xf(e))/2;if(gf(r)=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},f.stream=function(n){return t&&e===n?t:t=function(t){var e=t.length;return{point:function(n,r){for(var i=-1;++i0?e<-ff+uf&&(e=-ff+uf):e>ff-uf&&(e=ff-uf);var n=i/Of(kp(e),r);return[n*xf(r*t),i-n*vf(r*t)]}return o.invert=function(t,e){var n=i-e,o=Ef(r)*Mf(t*t+n*n),a=bf(t,gf(n))*Ef(n);return n*r<0&&(a-=cf*Ef(t)*Ef(n)),[a/r,2*mf(Of(i/o,1/r))-ff]},o}var Ip=function(){return mp(Cp).scale(109.5).parallels([30,30])};function Pp(t,e){return[t,e]}Pp.invert=Pp;var Np=function(){return pp(Pp).scale(152.63)};function Rp(t,e){var n=vf(t),r=t===e?xf(t):(n-vf(e))/(e-t),i=n/r+t;if(gf(r)uf&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var Kp=function(){return pp(Gp).scale(175.295)};function Yp(t,e){return[vf(e)*xf(t),xf(e)]}Yp.invert=Sp(Af);var Zp=function(){return pp(Yp).scale(249.5).clipAngle(90.000001)};function Qp(t,e){var n=vf(e),r=1+vf(t)*n;return[n*xf(t)/r,xf(e)/r]}Qp.invert=Sp((function(t){return 2*mf(t)}));var Xp=function(){return pp(Qp).scale(250).clipAngle(142)};function Jp(t,e){return[Sf(Tf((ff+e)/2)),-t]}Jp.invert=function(t,e){return[-e,2*mf(_f(t))-ff]};var tg=function(){var t=Ap(Jp),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function eg(t,e){return t.parent===e.parent?1:2}function ng(t,e){return t+e.x}function rg(t,e){return Math.max(t,e.y)}var ig=function(){var t=eg,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(ng,0)/t.length}(n),e.y=function(t){return 1+t.reduce(rg,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)}));var u=function(t){for(var e;e=t.children;)t=e[0];return t}(i),s=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),c=u.x-t(u,s)/2,f=s.x+t(s,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-c)/(f-c)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function og(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}var ag=u.a.mark(ug);function ug(){var t,e,n,r,i,o;return u.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:n=[t=this];case 1:e=n.reverse(),n=[];case 2:if(!(t=e.pop())){a.next=8;break}return a.next=5,t;case 5:if(r=t.children)for(i=0,o=r.length;i=0;--o)s.push(r=i[o]=new hg(i[o])),r.parent=n,r.depth=n.depth+1;return u.eachBefore(dg)}function cg(t){return t.children}function fg(t){return Array.isArray(t)?t[1]:null}function lg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function dg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function hg(t){this.data=t,this.depth=this.height=0,this.parent=null}hg.prototype=sg.prototype=Object(xe.a)({constructor:hg,count:function(){return this.eachAfter(og)},each:function(t,e){var n,r=-1,i=Object(s.a)(this);try{for(i.s();!(n=i.n()).done;){var o=n.value;t.call(e,o,++r,this)}}catch(a){i.e(a)}finally{i.f()}return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],u=[],s=-1;o=a.pop();)if(u.push(o),n=o.children)for(r=0,i=n.length;r=0;--r)o.push(n[r]);return this},find:function(t,e){var n,r=-1,i=Object(s.a)(this);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(t.call(e,o,++r,this))return o}}catch(a){i.e(a)}finally{i.f()}},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return sg(this).eachBefore(lg)}},Symbol.iterator,ug);var pg=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Array.from(t))).length,o=[];r0&&n*n>r*r+i*i}function vg(t,e){for(var n=0;n(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=t.x-r*u-o*s,n.y=t.y-r*s+o*u):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*u-o*s,n.y=e.y+r*s+o*u)):(n.x=e.x+n.r,n.y=e.y)}function Og(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function xg(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Eg(t){this._=t,this.next=null,this.previous=null}function Mg(t){if(!(o=(e=t,t="object"===typeof e&&"length"in e?e:Array.from(e)).length))return 0;var e,n,r,i,o,a,u,s,c,f,l,d;if((n=t[0]).x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;Sg(r,n,i=t[2]),n=new Eg(n),r=new Eg(r),i=new Eg(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(s=3;s0)throw new Error("cycle");return o}return n.id=function(e){return arguments.length?(t=Ag(e),n):t},n.parentId=function(t){return arguments.length?(e=Ag(t),n):e},n};function qg(t,e){return t.parent===e.parent?1:2}function Wg(t){var e=t.children;return e?e[0]:t.t}function Gg(t){var e=t.children;return e?e[e.length-1]:t.t}function Kg(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Yg(t,e,n){return t.a.parent===e.parent?t.a:n}function Zg(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Zg.prototype=Object.create(hg.prototype);var Qg=function(){var t=qg,e=1,n=1,r=null;function i(i){var s=function(t){for(var e,n,r,i,o,a=new Zg(t,0),u=[a];e=u.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(n=e.children[i]=new Zg(r[i],i)),n.parent=e;return(a.parent=new Zg(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(u);else{var c=i,f=i,l=i;i.eachBefore((function(t){t.xf.x&&(f=t),t.depth>l.depth&&(l=t)}));var d=c===f?1:t(c,f)/2,h=d-c.x,p=e/(f.x+d+h),g=n/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+h)*p,t.y=t.depth*g}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,u=n,s=o.parent.children[0],c=o.m,f=a.m,l=u.m,d=s.m;u=Gg(u),o=Wg(o),u&&o;)s=Wg(s),(a=Gg(a)).a=e,(i=u.z+l-o.z-c+t(u._,o._))>0&&(Kg(Yg(u,e,r),e,i),c+=i,f+=i),l+=u.m,c+=o.m,d+=s.m,f+=a.m;u&&!Gg(a)&&(a.t=u,a.m+=l-f),o&&!Wg(s)&&(s.t=o,s.m+=c-d,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},Xg=function(t,e,n,r,i){for(var o,a=t.children,u=-1,s=a.length,c=t.value&&(i-n)/t.value;++ud&&(d=u),m=f*f*g,(h=Math.max(d/m,m/l))>p){f-=u;break}p=h}b.push(a={value:f,dice:s1?e:1)},n}(Jg),nm=function(){var t=em,e=!1,n=1,r=1,i=[0],o=kg,a=kg,u=kg,s=kg,c=kg;function f(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(l),i=[0],e&&t.eachBefore(Dg),t}function l(e){var n=i[e.depth],r=e.x0+n,f=e.y0+n,l=e.x1-n,d=e.y1-n;l=n-1){var f=u[e];return f.x0=i,f.y0=o,f.x1=a,void(f.y1=s)}var l=c[e],d=r/2+l,h=e+1,p=n-1;for(;h>>1;c[g]s-o){var v=r?(i*b+a*m)/r:a;t(e,h,m,i,o,v,s),t(h,n,b,v,o,a,s)}else{var y=r?(o*b+s*m)/r:s;t(e,h,m,i,o,a,y),t(h,n,b,i,y,a,s)}}(0,s,t.value,e,n,r,i)},im=function(t,e,n,r,i){(1&t.depth?Xg:Lg)(t,e,n,r,i)},om=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,u,s,c,f,l=-1,d=a.length,h=t.value;++l1?e:1)},n}(Jg),am=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},um=function(t,e){var n=kr(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},sm=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}};function cm(t){return((t=Math.exp(t))+1/t)/2}var fm=function t(e,n,r){function i(t,i){var o,a,u=t[0],s=t[1],c=t[2],f=i[0],l=i[1],d=i[2],h=f-u,p=l-s,g=h*h+p*p;if(g<1e-12)a=Math.log(d/c)/e,o=function(t){return[u+t*h,s+t*p,c*Math.exp(e*t*a)]};else{var m=Math.sqrt(g),b=(d*d-c*c+r*g)/(2*c*n*m),v=(d*d-c*c-r*g)/(2*d*n*m),y=Math.log(Math.sqrt(b*b+1)-b),_=Math.log(Math.sqrt(v*v+1)-v);a=(_-y)/e,o=function(t){var r,i=t*a,o=cm(y),f=c/(n*m)*(o*(r=e*i+y,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[u+f*h,s+f*p,c*o/cm(e*i+y)]}}return o.duration=1e3*a*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);function lm(t){return function(e,n){var r=t((e=Sr(e)).h,(n=Sr(n)).h),i=Ir(e.s,n.s),o=Ir(e.l,n.l),a=Ir(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var dm=lm(kr),hm=lm(Ir);function pm(t,e){var n=Ir((t=Na(t)).l,(e=Na(e)).l),r=Ir(t.a,e.a),i=Ir(t.b,e.b),o=Ir(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}}function gm(t){return function(e,n){var r=t((e=za(e)).h,(n=za(n)).h),i=Ir(e.c,n.c),o=Ir(e.l,n.l),a=Ir(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var mm=gm(kr),bm=gm(Ir);function vm(t){return function e(n){function r(e,r){var i=t((e=tu(e)).h,(r=tu(r)).h),o=Ir(e.s,r.s),a=Ir(e.l,r.l),u=Ir(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=o(t),e.l=a(Math.pow(t,n)),e.opacity=u(t),e+""}}return n=+n,r.gamma=e,r}(1)}var ym=vm(kr),_m=vm(Ir);function wm(t,e){void 0===e&&(e=t,t=Yr);for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n1&&(n=t[a[u-2]],r=t[a[u-1]],i=t[e],(r[0]-n[0])*(i[1]-n[1])-(r[1]-n[1])*(i[0]-n[0])<=0);)--u;a[u++]=e}return a.slice(0,u)}var Tm=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e=0;--e)c.push(t[r[o[e]][2]]);for(e=+u;eu!==c>u&&a<(s-n)*(u-r)/(c-r)+n&&(f=!f),s=n,c=r;return f},Am=function(t){for(var e,n,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],s=0;++r1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(km),Nm=function t(e){var n=Pm.source(e);function r(){var t=n.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(km),Rm=function t(e){function n(t){return(t=+t)<=0?function(){return 0}:function(){for(var n=0,r=t;r>1;--r)n+=e();return n+r*e()}}return n.source=t,n}(km),jm=function t(e){var n=Rm.source(e);function r(t){if(0===(t=+t))return e;var r=n(t);return function(){return r()/t}}return r.source=t,r}(km),Dm=function t(e){function n(t){return function(){return-Math.log1p(-e())/t}}return n.source=t,n}(km),Lm=function t(e){function n(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-e(),t)}}return n.source=t,n}(km),Fm=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+t)}}return n.source=t,n}(km),Bm=function t(e){function n(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?function(){return 1/0}:1===t?function(){return 1}:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-e())/t)})}return n.source=t,n}(km),Um=function t(e){var n=Pm.source(e)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return function(){return 0};if(r=null==r?1:+r,1===t)return function(){return-Math.log1p(-e())*r};var i=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(i)),a=t<1?function(){return Math.pow(e(),1/t)}:function(){return 1};return function(){do{do{var t=n(),u=1+o*t}while(u<=0);u*=u*u;var s=1-e()}while(s>=1-.0331*t*t*t*t&&Math.log(s)>=.5*t*t+i*(1-u+Math.log(u)));return i*u*a()*r}}return r.source=t,r}(km),zm=function t(e){var n=Um.source(e);function r(t,e){var r=n(t),i=n(e);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(km),Hm=function t(e){var n=Bm.source(e),r=zm.source(e);function i(t,e){return t=+t,(e=+e)>=1?function(){return t}:e<=0?function(){return 0}:function(){for(var i=0,o=t,a=e;o*a>16&&o*(1-a)>16;){var u=Math.floor((o+1)*a),s=r(u,o-u+1)();s<=a?(i+=u,o-=u,a=(a-s)/(1-s)):(o=u-1,a/=s)}for(var c=a<.5,f=n(c?a:1-a),l=f(),d=0;l<=o;++d)l+=f();return i+(c?d:o-d)}}return i.source=t,i}(km),Vm=function t(e){function n(t,n,r){var i;return 0===(t=+t)?i=function(t){return-Math.log(t)}:(t=1/t,i=function(e){return Math.pow(e,t)}),n=null==n?0:+n,r=null==r?1:+r,function(){return n+r*i(-Math.log1p(-e()))}}return n.source=t,n}(km),qm=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){return t+n*Math.tan(Math.PI*e())}}return n.source=t,n}(km),Wm=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,function(){var r=e();return t+n*Math.log(r/(1-r))}}return n.source=t,n}(km),Gm=function t(e){var n=Um.source(e),r=Hm.source(e);function i(t){return function(){for(var i=0,o=t;o>16;){var a=Math.floor(.875*o),u=n(a)();if(u>o)return i+r(a-1,o/u)();i+=a,o-=u}for(var s=-Math.log1p(-e()),c=0;s<=o;++c)s-=Math.log1p(-e());return i+c}}return i.source=t,i}(km),Km=1664525,Ym=1013904223,Zm=1/4294967296;function Qm(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Math.random(),e=0|(0<=t&&t<1?t/Zm:Math.abs(t));return function(){return Zm*((e=Km*e+Ym|0)>>>0)}}function Xm(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Jm(t,e){switch(arguments.length){case 0:break;case 1:"function"===typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"===typeof e?this.interpolator(e):this.range(e)}return this}var tb=Symbol("implicit");function eb(){var t=new Map,e=[],n=[],r=tb;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==tb)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Map;var r,o=Object(s.a)(n);try{for(o.s();!(r=o.n()).done;){var a=r.value,u=a+"";t.has(u)||t.set(u,e.push(a))}}catch(c){o.e(c)}finally{o.f()}return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return eb(e,n).unknown(r)},Xm.apply(i,arguments),i}function nb(){var t,e,n=eb().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,u=!1,s=0,c=0,f=.5;function l(){var n=r().length,l=ae&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(a[0],a[t-1])),r=t>2?fb:cb,i=o=null,l}function l(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),u,s)))(t(c(e)))}return l.invert=function(n){return c(e((o||(o=r(u,a.map(t),zr)))(n)))},l.domain=function(t){return arguments.length?(a=Array.from(t,ob),f()):a.slice()},l.range=function(t){return arguments.length?(u=Array.from(t),f()):u.slice()},l.rangeRound=function(t){return u=Array.from(t),s=sm,f()},l.clamp=function(t){return arguments.length?(c=!!t||ub,f()):c!==ub},l.interpolate=function(t){return arguments.length?(s=t,f()):s},l.unknown=function(t){return arguments.length?(n=t,l):n},function(n,r){return t=n,e=r,f()}}function hb(){return db()(ub,ub)}function pb(t,e,n,r){var i,o=dt(t,e,n);switch((r=Vc(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=of(o,a))||(r.precision=i),Yc(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=af(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=rf(o))||(r.precision=i-2*("%"===r.type))}return Kc(r)}function gb(t){var e=t.domain;return t.ticks=function(t){var n=e();return ft(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return pb(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),a=0,u=o.length-1,s=o[a],c=o[u],f=10;for(c0;){if((i=lt(s,c,n))===r)return o[a]=s,o[u]=c,e(o);if(i>0)s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i}r=i}return t},t}function mb(){var t=hb();return t.copy=function(){return lb(t,mb())},Xm.apply(t,arguments),gb(t)}function bb(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,ob),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return bb(t).unknown(e)},t=arguments.length?Array.from(t,ob):[0,1],gb(n)}function vb(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a0){for(;d<=h;++d)for(f=1,c=n(d);fs)break;g.push(l)}}else for(;d<=h;++d)for(f=o-1,c=n(d);f>=1;--f)if(!((l=c*f)s)break;g.push(l)}2*g.length0?r[i-1]:e[0],i=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(e){return arguments.length?(t=e,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return Ub().domain([e,n]).range(o).unknown(t)},Xm.apply(gb(a),arguments)}function zb(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[m(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Array.from(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Array.from(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return zb().domain(e).range(n).unknown(t)},Xm.apply(i,arguments)}var Hb=new Date,Vb=new Date;function qb(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return u;do{u.push(a=new Date(+n)),e(n,o),t(n)}while(a=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Hb.setTime(+e),Vb.setTime(+r),t(Hb),t(Vb),Math.floor(n(Hb,Vb))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t===0}:function(e){return i.count(0,e)%t===0}):i:null}),i}var Wb=qb((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Wb.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qb((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Gb=Wb,Kb=Wb.range,Yb=qb((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Zb=Yb,Qb=Yb.range,Xb=1e3,Jb=6e4,tv=36e5,ev=864e5,nv=6048e5;function rv(t){return qb((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Jb)/nv}))}var iv=rv(0),ov=rv(1),av=rv(2),uv=rv(3),sv=rv(4),cv=rv(5),fv=rv(6),lv=iv.range,dv=ov.range,hv=av.range,pv=uv.range,gv=sv.range,mv=cv.range,bv=fv.range,vv=qb((function(t){return t.setHours(0,0,0,0)}),(function(t,e){return t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Jb)/ev}),(function(t){return t.getDate()-1})),yv=vv,_v=vv.range,wv=qb((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xb-t.getMinutes()*Jb)}),(function(t,e){t.setTime(+t+e*tv)}),(function(t,e){return(e-t)/tv}),(function(t){return t.getHours()})),Sv=wv,Ov=wv.range,xv=qb((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xb)}),(function(t,e){t.setTime(+t+e*Jb)}),(function(t,e){return(e-t)/Jb}),(function(t){return t.getMinutes()})),Ev=xv,Mv=xv.range,Tv=qb((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*Xb)}),(function(t,e){return(e-t)/Xb}),(function(t){return t.getUTCSeconds()})),$v=Tv,Av=Tv.range,kv=qb((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));kv.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?qb((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):kv:null};var Cv=kv,Iv=kv.range;function Pv(t){return qb((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/nv}))}var Nv=Pv(0),Rv=Pv(1),jv=Pv(2),Dv=Pv(3),Lv=Pv(4),Fv=Pv(5),Bv=Pv(6),Uv=Nv.range,zv=Rv.range,Hv=jv.range,Vv=Dv.range,qv=Lv.range,Wv=Fv.range,Gv=Bv.range,Kv=qb((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/ev}),(function(t){return t.getUTCDate()-1})),Yv=Kv,Zv=Kv.range,Qv=qb((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Qv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?qb((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Xv=Qv,Jv=Qv.range;function ty(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ey(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function ny(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function ry(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,s=t.shortMonths,c=gy(i),f=my(i),l=gy(o),d=my(o),h=gy(a),p=my(a),g=gy(u),m=my(u),b=gy(s),v=my(s),y={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Dy,e:Dy,f:zy,g:Jy,G:e_,H:Ly,I:Fy,j:By,L:Uy,m:Hy,M:Vy,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:x_,s:E_,S:qy,u:Wy,U:Gy,V:Yy,w:Zy,W:Qy,x:null,X:null,y:Xy,Y:t_,Z:n_,"%":O_},_={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:r_,e:r_,f:s_,g:y_,G:w_,H:i_,I:o_,j:a_,L:u_,m:c_,M:f_,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:x_,s:E_,S:l_,u:d_,U:h_,V:g_,w:m_,W:b_,x:null,X:null,y:v_,Y:__,Z:S_,"%":O_},w={a:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=b.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=m.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return x(t,e,n,r)},d:Ty,e:Ty,f:Py,g:Oy,G:Sy,H:Ay,I:Ay,j:$y,L:Iy,m:My,M:ky,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=f.get(r[0].toLowerCase()),n+r[0].length):-1},q:Ey,Q:Ry,s:jy,S:Cy,u:vy,U:yy,V:_y,w:by,W:wy,x:function(t,e,r){return x(t,n,e,r)},X:function(t,e,n){return x(t,r,e,n)},y:Oy,Y:Sy,Z:xy,"%":Ny};function S(t,e){return function(n){var r,i,o,a=[],u=-1,s=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++u53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=ey(ny(o.y,0,1))).getUTCDay(),r=i>4||0===i?Rv.ceil(r):Rv(r),r=Yv.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=ty(ny(o.y,0,1))).getDay(),r=i>4||0===i?ov.ceil(r):ov(r),r=yv.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?ey(ny(o.y,0,1)).getUTCDay():ty(ny(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ey(o)):ty(o)}}function x(t,e,n,r){for(var i,o,a=0,u=e.length,s=n.length;a=s)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=w[i in cy?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return y.x=S(n,y),y.X=S(r,y),y.c=S(e,y),_.x=S(n,_),_.X=S(r,_),_.c=S(e,_),{format:function(t){var e=S(t+="",y);return e.toString=function(){return t},e},parse:function(t){var e=O(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=S(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=O(t+="",!0);return e.toString=function(){return t},e}}}var iy,oy,ay,uy,sy,cy={"-":"",_:" ",0:"0"},fy=/^\s*\d+/,ly=/^%/,dy=/[\\^$*+?|[\]().{}]/g;function hy(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),n+r[0].length):-1}function xy(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ey(t,e,n){var r=fy.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function My(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ty(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function $y(t,e,n){var r=fy.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ay(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ky(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Cy(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Iy(t,e,n){var r=fy.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Py(t,e,n){var r=fy.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ny(t,e,n){var r=ly.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ry(t,e,n){var r=fy.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function jy(t,e,n){var r=fy.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Dy(t,e){return hy(t.getDate(),e,2)}function Ly(t,e){return hy(t.getHours(),e,2)}function Fy(t,e){return hy(t.getHours()%12||12,e,2)}function By(t,e){return hy(1+yv.count(Gb(t),t),e,3)}function Uy(t,e){return hy(t.getMilliseconds(),e,3)}function zy(t,e){return Uy(t,e)+"000"}function Hy(t,e){return hy(t.getMonth()+1,e,2)}function Vy(t,e){return hy(t.getMinutes(),e,2)}function qy(t,e){return hy(t.getSeconds(),e,2)}function Wy(t){var e=t.getDay();return 0===e?7:e}function Gy(t,e){return hy(iv.count(Gb(t)-1,t),e,2)}function Ky(t){var e=t.getDay();return e>=4||0===e?sv(t):sv.ceil(t)}function Yy(t,e){return t=Ky(t),hy(sv.count(Gb(t),t)+(4===Gb(t).getDay()),e,2)}function Zy(t){return t.getDay()}function Qy(t,e){return hy(ov.count(Gb(t)-1,t),e,2)}function Xy(t,e){return hy(t.getFullYear()%100,e,2)}function Jy(t,e){return hy((t=Ky(t)).getFullYear()%100,e,2)}function t_(t,e){return hy(t.getFullYear()%1e4,e,4)}function e_(t,e){var n=t.getDay();return hy((t=n>=4||0===n?sv(t):sv.ceil(t)).getFullYear()%1e4,e,4)}function n_(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+hy(e/60|0,"0",2)+hy(e%60,"0",2)}function r_(t,e){return hy(t.getUTCDate(),e,2)}function i_(t,e){return hy(t.getUTCHours(),e,2)}function o_(t,e){return hy(t.getUTCHours()%12||12,e,2)}function a_(t,e){return hy(1+Yv.count(Xv(t),t),e,3)}function u_(t,e){return hy(t.getUTCMilliseconds(),e,3)}function s_(t,e){return u_(t,e)+"000"}function c_(t,e){return hy(t.getUTCMonth()+1,e,2)}function f_(t,e){return hy(t.getUTCMinutes(),e,2)}function l_(t,e){return hy(t.getUTCSeconds(),e,2)}function d_(t){var e=t.getUTCDay();return 0===e?7:e}function h_(t,e){return hy(Nv.count(Xv(t)-1,t),e,2)}function p_(t){var e=t.getUTCDay();return e>=4||0===e?Lv(t):Lv.ceil(t)}function g_(t,e){return t=p_(t),hy(Lv.count(Xv(t),t)+(4===Xv(t).getUTCDay()),e,2)}function m_(t){return t.getUTCDay()}function b_(t,e){return hy(Rv.count(Xv(t)-1,t),e,2)}function v_(t,e){return hy(t.getUTCFullYear()%100,e,2)}function y_(t,e){return hy((t=p_(t)).getUTCFullYear()%100,e,2)}function __(t,e){return hy(t.getUTCFullYear()%1e4,e,4)}function w_(t,e){var n=t.getUTCDay();return hy((t=n>=4||0===n?Lv(t):Lv.ceil(t)).getUTCFullYear()%1e4,e,4)}function S_(){return"+0000"}function O_(){return"%"}function x_(t){return+t}function E_(t){return Math.floor(+t/1e3)}function M_(t){return iy=ry(t),oy=iy.format,ay=iy.parse,uy=iy.utcFormat,sy=iy.utcParse,iy}M_({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var T_=1e3,$_=6e4,A_=36e5,k_=864e5,C_=2592e6,I_=31536e6;function P_(t){return new Date(t)}function N_(t){return t instanceof Date?+t:+new Date(+t)}function R_(t,e,n,r,i,a,u,s,c){var f=hb(),l=f.invert,d=f.domain,h=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),b=c("%a %d"),v=c("%b %d"),y=c("%B"),_=c("%Y"),w=[[u,1,T_],[u,5,5e3],[u,15,15e3],[u,30,3e4],[a,1,$_],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,A_],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,k_],[r,2,1728e5],[n,1,6048e5],[e,1,C_],[e,3,7776e6],[t,1,I_]];function S(o){return(u(o)1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return OS.h=360*t-100,OS.s=1.5-1.5*e,OS.l=.8-.9*e,OS+""},ES=gr(),MS=Math.PI/3,TS=2*Math.PI/3,$S=function(t){var e;return t=(.5-t)*Math.PI,ES.r=255*(e=Math.sin(t))*e,ES.g=255*(e=Math.sin(t+MS))*e,ES.b=255*(e=Math.sin(t+TS))*e,ES+""},AS=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function kS(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var CS=kS(uw("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),IS=kS(uw("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),PS=kS(uw("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),NS=kS(uw("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),RS=function(t){return zn(En(t).call(document.documentElement))},jS=0;function DS(){return new LS}function LS(){this._="@"+(++jS).toString(36)}LS.prototype=DS.prototype={constructor:LS,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var FS=function(t,e){return t.target&&(t=Zr(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,(function(t){return Qr(t,e)}))},BS=function(t){return"string"===typeof t?new Fn([document.querySelectorAll(t)],[document.documentElement]):new Fn([null==t?[]:Te(t)],Ln)},US=function(t){return function(){return t}},zS=Math.abs,HS=Math.atan2,VS=Math.cos,qS=Math.max,WS=Math.min,GS=Math.sin,KS=Math.sqrt,YS=1e-12,ZS=Math.PI,QS=ZS/2,XS=2*ZS;function JS(t){return t>1?0:t<-1?ZS:Math.acos(t)}function tO(t){return t>=1?QS:t<=-1?-QS:Math.asin(t)}function eO(t){return t.innerRadius}function nO(t){return t.outerRadius}function rO(t){return t.startAngle}function iO(t){return t.endAngle}function oO(t){return t&&t.padAngle}function aO(t,e,n,r,i,o,a,u){var s=n-t,c=r-e,f=a-i,l=u-o,d=l*s-f*c;if(!(d*dk*k+C*C&&(x=M,E=T),{cx:x,cy:E,x01:-f,y01:-l,x11:x*(i/w-1),y11:E*(i/w-1)}}var sO=function(){var t=eO,e=nO,n=US(0),r=null,i=rO,o=iO,a=oO,u=null;function s(){var s,c,f=+t.apply(this,arguments),l=+e.apply(this,arguments),d=i.apply(this,arguments)-QS,h=o.apply(this,arguments)-QS,p=zS(h-d),g=h>d;if(u||(u=s=da()),lYS)if(p>XS-YS)u.moveTo(l*VS(d),l*GS(d)),u.arc(0,0,l,d,h,!g),f>YS&&(u.moveTo(f*VS(h),f*GS(h)),u.arc(0,0,f,h,d,g));else{var m,b,v=d,y=h,_=d,w=h,S=p,O=p,x=a.apply(this,arguments)/2,E=x>YS&&(r?+r.apply(this,arguments):KS(f*f+l*l)),M=WS(zS(l-f)/2,+n.apply(this,arguments)),T=M,$=M;if(E>YS){var A=tO(E/f*GS(x)),k=tO(E/l*GS(x));(S-=2*A)>YS?(_+=A*=g?1:-1,w-=A):(S=0,_=w=(d+h)/2),(O-=2*k)>YS?(v+=k*=g?1:-1,y-=k):(O=0,v=y=(d+h)/2)}var C=l*VS(v),I=l*GS(v),P=f*VS(w),N=f*GS(w);if(M>YS){var R,j=l*VS(y),D=l*GS(y),L=f*VS(_),F=f*GS(_);if(pYS?$>YS?(m=uO(L,F,C,I,l,$,g),b=uO(j,D,P,N,l,$,g),u.moveTo(m.cx+m.x01,m.cy+m.y01),$YS&&S>YS?T>YS?(m=uO(P,N,j,D,f,-T,g),b=uO(C,I,L,F,f,-T,g),u.lineTo(m.cx+m.x01,m.cy+m.y01),T=f;--l)u.point(m[l],b[l]);u.lineEnd(),u.areaEnd()}g&&(m[c]=+t(d,c,s),b[c]=+e(d,c,s),u.point(r?+r(d,c,s):m[c],n?+n(d,c,s):b[c]))}if(h)return u=null,h+""||null}function c(){return gO().defined(i).curve(a).context(o)}return t="function"===typeof t?t:void 0===t?hO:US(+t),e="function"===typeof e?e:US(void 0===e?0:+e),n="function"===typeof n?n:void 0===n?pO:US(+n),s.x=function(e){return arguments.length?(t="function"===typeof e?e:US(+e),r=null,s):t},s.x0=function(e){return arguments.length?(t="function"===typeof e?e:US(+e),s):t},s.x1=function(t){return arguments.length?(r=null==t?null:"function"===typeof t?t:US(+t),s):r},s.y=function(t){return arguments.length?(e="function"===typeof t?t:US(+t),n=null,s):e},s.y0=function(t){return arguments.length?(e="function"===typeof t?t:US(+t),s):e},s.y1=function(t){return arguments.length?(n=null==t?null:"function"===typeof t?t:US(+t),s):n},s.lineX0=s.lineY0=function(){return c().x(t).y(e)},s.lineY1=function(){return c().x(t).y(n)},s.lineX1=function(){return c().x(r).y(e)},s.defined=function(t){return arguments.length?(i="function"===typeof t?t:US(!!t),s):i},s.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),s):a},s.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),s):o},s},bO=function(t,e){return et?1:e>=t?0:NaN},vO=function(t){return t},yO=function(){var t=vO,e=bO,n=null,r=US(0),i=US(XS),o=US(0);function a(a){var u,s,c,f,l,d=(a=fO(a)).length,h=0,p=new Array(d),g=new Array(d),m=+r.apply(this,arguments),b=Math.min(XS,Math.max(-XS,i.apply(this,arguments)-m)),v=Math.min(Math.abs(b)/d,o.apply(this,arguments)),y=v*(b<0?-1:1);for(u=0;u0&&(h+=l);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),u=0,c=h?(b-d*y)/h:0;u0?l*c:0)+y,g[s]={data:a[s],index:u,value:l,startAngle:m,endAngle:f,padAngle:v};return g}return a.value=function(e){return arguments.length?(t="function"===typeof e?e:US(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"===typeof t?t:US(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"===typeof t?t:US(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"===typeof t?t:US(+t),a):o},a},_O=SO(dO);function wO(t){this._curve=t}function SO(t){function e(e){return new wO(t(e))}return e._curve=t,e}function OO(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(SO(t)):e()._curve},t}wO.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var xO=function(){return OO(gO().curve(_O))},EO=function(){var t=mO().curve(_O),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return OO(n())},delete t.lineX0,t.lineEndAngle=function(){return OO(r())},delete t.lineX1,t.lineInnerRadius=function(){return OO(i())},delete t.lineY0,t.lineOuterRadius=function(){return OO(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(SO(t)):e()._curve},t},MO=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]};function TO(t){return t.source}function $O(t){return t.target}function AO(t){var e=TO,n=$O,r=hO,i=pO,o=null;function a(){var a,u=cO.call(arguments),s=e.apply(this,u),c=n.apply(this,u);if(o||(o=a=da()),t(o,+r.apply(this,(u[0]=s,u)),+i.apply(this,u),+r.apply(this,(u[0]=c,u)),+i.apply(this,u)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"===typeof t?t:US(+t),a):r},a.y=function(t){return arguments.length?(i="function"===typeof t?t:US(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}function kO(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function CO(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function IO(t,e,n,r,i){var o=MO(e,n),a=MO(e,n=(n+i)/2),u=MO(r,n),s=MO(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],u[0],u[1],s[0],s[1])}function PO(){return AO(kO)}function NO(){return AO(CO)}function RO(){var t=AO(IO);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var jO={draw:function(t,e){var n=Math.sqrt(e/ZS);t.moveTo(n,0),t.arc(0,0,n,0,XS)}},DO={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},LO=Math.sqrt(1/3),FO=2*LO,BO={draw:function(t,e){var n=Math.sqrt(e/FO),r=n*LO;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},UO=Math.sin(ZS/10)/Math.sin(7*ZS/10),zO=Math.sin(XS/10)*UO,HO=-Math.cos(XS/10)*UO,VO={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=zO*n,i=HO*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=XS*o/5,u=Math.cos(a),s=Math.sin(a);t.lineTo(s*n,-u*n),t.lineTo(u*r-s*i,s*r+u*i)}t.closePath()}},qO={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},WO=Math.sqrt(3),GO={draw:function(t,e){var n=-Math.sqrt(e/(3*WO));t.moveTo(0,2*n),t.lineTo(-WO*n,-n),t.lineTo(WO*n,-n),t.closePath()}},KO=-.5,YO=Math.sqrt(3)/2,ZO=1/Math.sqrt(12),QO=3*(ZO/2+1),XO={draw:function(t,e){var n=Math.sqrt(e/QO),r=n/2,i=n*ZO,o=r,a=n*ZO+n,u=-o,s=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,s),t.lineTo(KO*r-YO*i,YO*r+KO*i),t.lineTo(KO*o-YO*a,YO*o+KO*a),t.lineTo(KO*u-YO*s,YO*u+KO*s),t.lineTo(KO*r+YO*i,KO*i-YO*r),t.lineTo(KO*o+YO*a,KO*a-YO*o),t.lineTo(KO*u+YO*s,KO*s-YO*u),t.closePath()}},JO=[jO,DO,BO,qO,VO,GO,XO],tx=function(t,e){var n=null;function r(){var r;if(n||(n=r=da()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return t="function"===typeof t?t:US(t||jO),e="function"===typeof e?e:US(void 0===e?64:+e),r.type=function(e){return arguments.length?(t="function"===typeof e?e:US(e),r):t},r.size=function(t){return arguments.length?(e="function"===typeof t?t:US(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},ex=function(){};function nx(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function rx(t){this._context=t}rx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:nx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:nx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var ix=function(t){return new rx(t)};function ox(t){this._context=t}ox.prototype={areaStart:ex,areaEnd:ex,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:nx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var ax=function(t){return new ox(t)};function ux(t){this._context=t}ux.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:nx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var sx=function(t){return new ux(t)};function cx(t,e){this._basis=new rx(t),this._beta=e}cx.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,u=e[n]-o,s=-1;++s<=n;)r=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+r*a),this._beta*e[s]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var fx=function t(e){function n(t){return 1===e?new rx(t):new cx(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function lx(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function dx(t,e){this._context=t,this._k=(1-e)/6}dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:lx(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:lx(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var hx=function t(e){function n(t){return new dx(t,e)}return n.tension=function(e){return t(+e)},n}(0);function px(t,e){this._context=t,this._k=(1-e)/6}px.prototype={areaStart:ex,areaEnd:ex,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:lx(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var gx=function t(e){function n(t){return new px(t,e)}return n.tension=function(e){return t(+e)},n}(0);function mx(t,e){this._context=t,this._k=(1-e)/6}mx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:lx(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var bx=function t(e){function n(t){return new mx(t,e)}return n.tension=function(e){return t(+e)},n}(0);function vx(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>YS){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>YS){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/f,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function yx(t,e){this._context=t,this._alpha=e}yx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:vx(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _x=function t(e){function n(t){return e?new yx(t,e):new dx(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function wx(t,e){this._context=t,this._alpha=e}wx.prototype={areaStart:ex,areaEnd:ex,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:vx(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Sx=function t(e){function n(t){return e?new wx(t,e):new px(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ox(t,e){this._context=t,this._alpha=e}Ox.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:vx(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xx=function t(e){function n(t){return e?new Ox(t,e):new mx(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ex(t){this._context=t}Ex.prototype={areaStart:ex,areaEnd:ex,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var Mx=function(t){return new Ex(t)};function Tx(t){return t<0?-1:1}function $x(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(Tx(o)+Tx(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function Ax(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function kx(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*e,o-u,a-u*n,o,a)}function Cx(t){this._context=t}function Ix(t){this._context=new Px(t)}function Px(t){this._context=t}function Nx(t){return new Cx(t)}function Rx(t){return new Ix(t)}function jx(t){this._context=t}function Dx(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Bx=function(t){return new Fx(t,.5)};function Ux(t){return new Fx(t,0)}function zx(t){return new Fx(t,1)}var Hx=function(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],u=a.length;o=0;)n[e]=e;return n};function qx(t,e){return t[e]}function Wx(t){var e=[];return e.key=t,e}var Gx=function(){var t=US([]),e=Vx,n=Hx,r=qx;function i(i){var o,a,u,c=Array.from(t.apply(this,arguments),Wx),f=c.length,l=-1,d=Object(s.a)(i);try{for(d.s();!(u=d.n()).done;){var h=u.value;for(o=0,++l;o0){for(var n,r,i,o=0,a=t[0].length;o0)for(var n,r,i,o,a,u,s=0,c=t[e[0]].length;s0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},Zx=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,a=1;ao&&(o=e,r=n);return r}var tE=function(t){var e=t.map(eE);return Vx(t).sort((function(t,n){return e[t]-e[n]}))};function eE(t){for(var e,n=0,r=-1,i=t.length;++rr?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var SE=function(){var t,e,n,r=mE,i=bE,o=wE,a=yE,u=_E,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,l=fm,d=Oe("start","zoom","end"),h=500,p=0,g=10;function m(t){t.property("__zoom",vE).on("wheel.zoom",O).on("mousedown.zoom",x).on("dblclick.zoom",E).filter(u).on("touchstart.zoom",M).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",$).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new lE(e,t.x,t.y)}function v(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new lE(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n,r){t.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,a=w(t,o).event(r),u=i.apply(t,o),s=null==n?y(u):"function"===typeof n?n.apply(t,o):n,c=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),f=t.__zoom,d="function"===typeof e?e.apply(t,o):e,h=l(f.invert(s).concat(c/f.k),d.invert(s).concat(c/d.k));return function(t){if(1===t)t=d;else{var e=h(t),n=c/e[2];t=new lE(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function w(t,e,n){return!n&&t.__zooming||new S(t,e)}function S(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function O(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i1?e-1:0),a=1;ap}u.event(t).zoom("mouse",o(v(u.that.__zoom,u.mouse[0]=Qr(t,l),u.mouse[1]),u.extent,c))}function m(t){s.on("mousemove.zoom mouseup.zoom",null),Wn(t.view,u.moved),gE(t),u.event(t).end()}}function E(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),a=1;a0?zn(this).transition().duration(f).call(_,h,s,t):zn(this).call(m.transform,h,s,t)}}function M(n){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a1?e-1:0),r=1;r1?r-1:0),o=1;o=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(s.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 U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(t).length;default:if(r)return U(t).length;e=(""+e).toLowerCase(),r=!0}}function g(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 k(this,e,n);case"utf8":case"utf-8":return M(this,e,n);case"ascii":return $(this,e,n);case"latin1":case"binary":return A(this,e,n);case"base64":return E(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function m(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(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=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"===typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){var o,a=1,u=t.length,s=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,u/=2,s/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=n;ou&&(n=u-s),o=n;o>=0;o--){for(var l=!0,d=0;di&&(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 M(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]))&&(s=(31&c)<<6|63&o)>127&&(f=s);break;case 3:o=t[i+1],a=t[i+2],128===(192&o)&&128===(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128===(192&o)&&128===(192&a)&&128===(192&u)&&(s=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(f=s)}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<=T)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+=" ... ")),""},s.prototype.compare=function(t,e,n,r,i){if(!s.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),u=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 y(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return S(this,t,e,n);case"base64":return O(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function $(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 P(t,e,n,r,i,o){if(!s.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 N(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 R(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 j(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 D(t,e,n,r,o){return o||j(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function L(t,e,n,r,o){return o||j(t,0,n,8),i.write(t,e,n,r,52,8),n+8}s.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},s.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||I(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||I(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},s.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||P(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},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);P(this,t,e,n,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o>0)-u&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);P(this,t,e,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):N(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):N(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return D(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return D(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return L(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return L(this,t,e,!1,n)},s.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||!s.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 z(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!==0;)t+="=";return t}(t))}function H(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(59))},function(t,e,n){"use strict";function r(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return s}));var r=n(14),i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(t,e){return t.__proto__=e,t}:o,u=function(t){function e(n){void 0===n&&(n=i);var r=t.call(this,"number"===typeof n?i+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=i,a(r,e.prototype),r}return Object(r.c)(e,t),e}(Error);function s(t,e){if(!t)throw new u(e)}function c(t){return function(){return console[t].apply(console,arguments)}}!function(t){t.warn=c("warn"),t.error=c("error")}(s||(s={}));var f={env:{}};if("object"===typeof t)f=t;else try{Function("stub","process = stub")(f)}catch(l){}}).call(this,n(70))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(57);function i(t){return function e(n){return 0===arguments.length||Object(r.a)(n)?e:t.apply(this,arguments)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(284);function i(t){if("string"!==typeof t)throw new Error(Object(r.a)(7));return t.charAt(0).toUpperCase()+t.slice(1)}},function(t,e,n){t.exports=n(719)},function(t,e,n){"use strict";n.d(e,"g",(function(){return o})),n.d(e,"k",(function(){return a})),n.d(e,"h",(function(){return u})),n.d(e,"b",(function(){return s})),n.d(e,"j",(function(){return c})),n.d(e,"e",(function(){return f})),n.d(e,"f",(function(){return l})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return h})),n.d(e,"a",(function(){return p})),n.d(e,"i",(function(){return g}));var r=n(284);function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),n)}function o(t){t=t.substr(1);var e=new RegExp(".{1,".concat(t.length>=6?2:1,"}"),"g"),n=t.match(e);return n&&1===n[0].length&&(n=n.map((function(t){return t+t}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(t,e){return e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3})).join(", "),")"):""}function a(t){if(0===t.indexOf("#"))return t;var e=s(t).values;return"#".concat(e.map((function(t){return function(t){var e=t.toString(16);return 1===e.length?"0".concat(e):e}(t)})).join(""))}function u(t){var e=(t=s(t)).values,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+n/30)%12;return i-o*Math.max(Math.min(e-3,9-e,1),-1)},u="rgb",f=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===t.type&&(u+="a",f.push(e[3])),c({type:u,values:f})}function s(t){if(t.type)return t;if("#"===t.charAt(0))return s(o(t));var e=t.indexOf("("),n=t.substring(0,e);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,t));var i=t.substring(e+1,t.length-1).split(",");return{type:n,values:i=i.map((function(t){return parseFloat(t)}))}}function c(t){var e=t.type,n=t.values;return-1!==e.indexOf("rgb")?n=n.map((function(t,e){return e<3?parseInt(t,10):t})):-1!==e.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(e,"(").concat(n.join(", "),")")}function f(t,e){var n=l(t),r=l(e);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function l(t){var e="hsl"===(t=s(t)).type?s(u(t)).values:t.values;return e=e.map((function(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function d(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return l(t)>.5?p(t,e):g(t,e)}function h(t,e){return t=s(t),e=i(e),"rgb"!==t.type&&"hsl"!==t.type||(t.type+="a"),t.values[3]=e,c(t)}function p(t,e){if(t=s(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb"))for(var n=0;n<3;n+=1)t.values[n]*=1-e;return c(t)}function g(t,e){if(t=s(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(var n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;return c(t)}},function(t,e,n){var r=n(29),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){"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){var r;!function(i){"use strict";var o,a=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u=Math.ceil,s=Math.floor,c="[BigNumber Error] ",f=c+"Number primitive has more than 15 significant digits: ",l=1e14,d=14,h=9007199254740991,p=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],g=1e7,m=1e9;function b(t){var e=0|t;return t>0||t===e?e:e-1}function v(t){for(var e,n,r=1,i=t.length,o=t[0]+"";rc^n?1:-1;for(u=(s=i.length)<(c=o.length)?s:c,a=0;ao[a]^n?1:-1;return s==c?0:s>c^n?1:-1}function _(t,e,n,r){if(tn||t!==s(t))throw Error(c+(r||"Argument")+("number"==typeof t?tn?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return b(t.e/d)==e&&t.c[e]%2!=0}function S(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function O(t,e,n){var r,i;if(e<0){for(i=n+".";++e;i+=n);t=i+t}else if(++e>(r=t.length)){for(i=n,e-=r;--e;i+=n);t+=i}else ek?b.c=b.e=null:t.e=10;l/=10,c++);return void(c>k?b.c=b.e=null:(b.e=c,b.c=[t]))}m=String(t)}else{if(!a.test(m=String(t)))return i(b,m,p);b.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(c=m.indexOf("."))>-1&&(m=m.replace(".","")),(l=m.search(/e/i))>0?(c<0&&(c=l),c+=+m.slice(l+1),m=m.substring(0,l)):c<0&&(c=m.length)}else{if(_(e,2,R.length,"Base"),10==e)return B(b=new j(t),E+b.e+1,M);if(m=String(t),p="number"==typeof t){if(0*t!=0)return i(b,m,p,e);if(b.s=1/t<0?(m=m.slice(1),-1):1,j.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(f+t)}else b.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=R.slice(0,e),c=l=0,g=m.length;lc){c=g;continue}}else if(!u&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){u=!0,l=-1,c=0;continue}return i(b,String(t),p,e)}p=!1,(c=(m=r(m,e,10,b.s)).indexOf("."))>-1?m=m.replace(".",""):c=m.length}for(l=0;48===m.charCodeAt(l);l++);for(g=m.length;48===m.charCodeAt(--g););if(m=m.slice(l,++g)){if(g-=l,p&&j.DEBUG&&g>15&&(t>h||t!==s(t)))throw Error(f+b.s*t);if((c=c-l-1)>k)b.c=b.e=null;else if(c=$)?S(s,a):O(s,a,"0");else if(o=(t=B(new j(t),e,n)).e,u=(s=v(t.c)).length,1==r||2==r&&(e<=o||o<=T)){for(;uu){if(--e>0)for(s+=".";e--;s+="0");}else if((e+=o-u)>0)for(o+1==u&&(s+=".");e--;s+="0");return t.s<0&&i?"-"+s:s}function L(t,e){for(var n,r=1,i=new j(t[0]);r=10;i/=10,r++);return(n=r+n*d-1)>k?t.c=t.e=null:n=10;c/=10,i++);if((o=e-i)<0)o+=d,a=e,g=(f=m[h=0])/b[i-a-1]%10|0;else if((h=u((o+1)/d))>=m.length){if(!r)break t;for(;m.length<=h;m.push(0));f=g=0,i=1,a=(o%=d)-d+1}else{for(f=c=m[h],i=1;c>=10;c/=10,i++);g=(a=(o%=d)-d+i)<0?0:f/b[i-a-1]%10|0}if(r=r||e<0||null!=m[h+1]||(a<0?f:f%b[i-a-1]),r=n<4?(g||r)&&(0==n||n==(t.s<0?3:2)):g>5||5==g&&(4==n||r||6==n&&(o>0?a>0?f/b[i-a]:0:m[h-1])%10&1||n==(t.s<0?8:7)),e<1||!m[0])return m.length=0,r?(e-=t.e+1,m[0]=b[(d-e%d)%d],t.e=-e||0):m[0]=t.e=0,t;if(0==o?(m.length=h,c=1,h--):(m.length=h+1,c=b[d-o],m[h]=a>0?s(f/b[i-a]%b[a])*c:0),r)for(;;){if(0==h){for(o=1,a=m[0];a>=10;a/=10,o++);for(a=m[0]+=c,c=1;a>=10;a/=10,c++);o!=c&&(t.e++,m[0]==l&&(m[0]=1));break}if(m[h]+=c,m[h]!=l)break;m[h--]=0,c=1}for(o=m.length;0===m[--o];m.pop());}t.e>k?t.c=t.e=null:t.e=$?S(e,n):O(e,n,"0"),t.s<0?"-"+e:e)}return j.clone=t,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(t){var e,n;if(null!=t){if("object"!=typeof t)throw Error(c+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(_(n=t[e],0,m,e),E=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(_(n=t[e],0,8,e),M=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((n=t[e])&&n.pop?(_(n[0],-m,0,e),_(n[1],0,m,e),T=n[0],$=n[1]):(_(n,-m,m,e),T=-($=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if((n=t[e])&&n.pop)_(n[0],-m,-1,e),_(n[1],1,m,e),A=n[0],k=n[1];else{if(_(n,-m,m,e),!n)throw Error(c+e+" cannot be zero: "+n);A=-(k=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if((n=t[e])!==!!n)throw Error(c+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw C=!n,Error(c+"crypto unavailable");C=n}else C=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(_(n=t[e],0,9,e),I=n),t.hasOwnProperty(e="POW_PRECISION")&&(_(n=t[e],0,m,e),P=n),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(n=t[e]))throw Error(c+e+" not an object: "+n);N=n}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(n=t[e])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(c+e+" invalid: "+n);R=n}}return{DECIMAL_PLACES:E,ROUNDING_MODE:M,EXPONENTIAL_AT:[T,$],RANGE:[A,k],CRYPTO:C,MODULO_MODE:I,POW_PRECISION:P,FORMAT:N,ALPHABET:R}},j.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!j.DEBUG)return!0;var e,n,r=t.c,i=t.e,o=t.s;t:if("[object Array]"=={}.toString.call(r)){if((1===o||-1===o)&&i>=-m&&i<=m&&i===s(i)){if(0===r[0]){if(0===i&&1===r.length)return!0;break t}if((e=(i+1)%d)<1&&(e+=d),String(r[0]).length==e){for(e=0;e=l||n!==s(n))break t;if(0!==n)return!0}}}else if(null===r&&null===i&&(null===o||1===o||-1===o))return!0;throw Error(c+"Invalid BigNumber: "+t)},j.maximum=j.max=function(){return L(arguments,o.lt)},j.minimum=j.min=function(){return L(arguments,o.gt)},j.random=function(){var t=9007199254740992,e=Math.random()*t&2097151?function(){return s(Math.random()*t)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)};return function(t){var n,r,i,o,a,f=0,l=[],h=new j(x);if(null==t?t=E:_(t,0,m),o=u(t/d),C)if(crypto.getRandomValues){for(n=crypto.getRandomValues(new Uint32Array(o*=2));f>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),n[f]=r[0],n[f+1]=r[1]):(l.push(a%1e14),f+=2);f=o/2}else{if(!crypto.randomBytes)throw C=!1,Error(c+"crypto unavailable");for(n=crypto.randomBytes(o*=7);f=9e15?crypto.randomBytes(7).copy(n,f):(l.push(a%1e14),f+=7);f=o/7}if(!C)for(;f=10;a/=10,f++);fn-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/n|0,a[i]%=n)}return a.reverse()}return function(r,i,o,a,u){var s,c,f,l,d,h,p,g,m=r.indexOf("."),b=E,y=M;for(m>=0&&(l=P,P=0,r=r.replace(".",""),h=(g=new j(i)).pow(r.length-m),P=l,g.c=e(O(v(h.c),h.e,"0"),10,o,t),g.e=g.c.length),f=l=(p=e(r,i,o,u?(s=R,t):(s=t,R))).length;0==p[--l];p.pop());if(!p[0])return s.charAt(0);if(m<0?--f:(h.c=p,h.e=f,h.s=a,p=(h=n(h,g,b,y,o)).c,d=h.r,f=h.e),m=p[c=f+b+1],l=o/2,d=d||c<0||null!=p[c+1],d=y<4?(null!=m||d)&&(0==y||y==(h.s<0?3:2)):m>l||m==l&&(4==y||d||6==y&&1&p[c-1]||y==(h.s<0?8:7)),c<1||!p[0])r=d?O(s.charAt(1),-b,s.charAt(0)):s.charAt(0);else{if(p.length=c,d)for(--o;++p[--c]>o;)p[c]=0,c||(++f,p=[1].concat(p));for(l=p.length;!p[--l];);for(m=0,r="";m<=l;r+=s.charAt(p[m++]));r=O(r,f,s.charAt(0))}return r}}(),n=function(){function t(t,e,n){var r,i,o,a,u=0,s=t.length,c=e%g,f=e/g|0;for(t=t.slice();s--;)u=((i=c*(o=t[s]%g)+(r=f*o+(a=t[s]/g|0)*c)%g*g+u)/n|0)+(r/g|0)+f*a,t[s]=i%n;return u&&(t=[u].concat(t)),t}function e(t,e,n,r){var i,o;if(n!=r)o=n>r?1:-1;else for(i=o=0;ie[i]?1:-1;break}return o}function n(t,e,n,r){for(var i=0;n--;)t[n]-=i,i=t[n]1;t.splice(0,1));}return function(r,i,o,a,u){var c,f,h,p,g,m,v,y,_,w,S,O,x,E,M,T,$,A=r.s==i.s?1:-1,k=r.c,C=i.c;if(!k||!k[0]||!C||!C[0])return new j(r.s&&i.s&&(k?!C||k[0]!=C[0]:C)?k&&0==k[0]||!C?0*A:A/0:NaN);for(_=(y=new j(A)).c=[],A=o+(f=r.e-i.e)+1,u||(u=l,f=b(r.e/d)-b(i.e/d),A=A/d|0),h=0;C[h]==(k[h]||0);h++);if(C[h]>(k[h]||0)&&f--,A<0)_.push(1),p=!0;else{for(E=k.length,T=C.length,h=0,A+=2,(g=s(u/(C[0]+1)))>1&&(C=t(C,g,u),k=t(k,g,u),T=C.length,E=k.length),x=T,S=(w=k.slice(0,T)).length;S=u/2&&M++;do{if(g=0,(c=e(C,w,T,S))<0){if(O=w[0],T!=S&&(O=O*u+(w[1]||0)),(g=s(O/M))>1)for(g>=u&&(g=u-1),v=(m=t(C,g,u)).length,S=w.length;1==e(m,w,v,S);)g--,n(m,T=10;A/=10,h++);B(y,o+(y.e=h+f*d-1)+1,a,p)}else y.e=f,y.r=+p;return y}}(),i=function(){var t=/^(-?)0([xbo])(?=\w[\w.]*$)/i,e=/^([^.]+)\.$/,n=/^\.([^.]+)$/,r=/^-?(Infinity|NaN)$/,i=/^\s*\+(?=[\w.])|^\s+|\s+$/g;return function(o,a,u,s){var f,l=u?a:a.replace(i,"");if(r.test(l))o.s=isNaN(l)?null:l<0?-1:1;else{if(!u&&(l=l.replace(t,(function(t,e,n){return f="x"==(n=n.toLowerCase())?16:"b"==n?2:8,s&&s!=f?t:e})),s&&(f=s,l=l.replace(e,"$1").replace(n,"0.$1")),a!=l))return new j(l,f);if(j.DEBUG)throw Error(c+"Not a"+(s?" base "+s:"")+" number: "+a);o.s=null}o.c=o.e=null}}(),o.absoluteValue=o.abs=function(){var t=new j(this);return t.s<0&&(t.s=1),t},o.comparedTo=function(t,e){return y(this,new j(t,e))},o.decimalPlaces=o.dp=function(t,e){var n,r,i,o=this;if(null!=t)return _(t,0,m),null==e?e=M:_(e,0,8),B(new j(o),t+o.e+1,e);if(!(n=o.c))return null;if(r=((i=n.length-1)-b(this.e/d))*d,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},o.dividedBy=o.div=function(t,e){return n(this,new j(t,e),E,M)},o.dividedToIntegerBy=o.idiv=function(t,e){return n(this,new j(t,e),0,1)},o.exponentiatedBy=o.pow=function(t,e){var n,r,i,o,a,f,l,h,p=this;if((t=new j(t)).c&&!t.isInteger())throw Error(c+"Exponent not an integer: "+U(t));if(null!=e&&(e=new j(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return h=new j(Math.pow(+U(p),a?2-w(t):+U(t))),e?h.mod(e):h;if(f=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new j(NaN);(r=!f&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&w(t)?-0:0,p.e>-1&&(o=1/o),new j(f?1/o:o);P&&(o=u(P/d+2))}for(a?(n=new j(.5),f&&(t.s=1),l=w(t)):l=(i=Math.abs(+U(t)))%2,h=new j(x);;){if(l){if(!(h=h.times(p)).c)break;o?h.c.length>o&&(h.c.length=o):r&&(h=h.mod(e))}if(i){if(0===(i=s(i/2)))break;l=i%2}else if(B(t=t.times(n),t.e+1,1),t.e>14)l=w(t);else{if(0===(i=+U(t)))break;l=i%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):r&&(p=p.mod(e))}return r?h:(f&&(h=x.div(h)),e?h.mod(e):o?B(h,P,M,undefined):h)},o.integerValue=function(t){var e=new j(this);return null==t?t=M:_(t,0,8),B(e,e.e+1,t)},o.isEqualTo=o.eq=function(t,e){return 0===y(this,new j(t,e))},o.isFinite=function(){return!!this.c},o.isGreaterThan=o.gt=function(t,e){return y(this,new j(t,e))>0},o.isGreaterThanOrEqualTo=o.gte=function(t,e){return 1===(e=y(this,new j(t,e)))||0===e},o.isInteger=function(){return!!this.c&&b(this.e/d)>this.c.length-2},o.isLessThan=o.lt=function(t,e){return y(this,new j(t,e))<0},o.isLessThanOrEqualTo=o.lte=function(t,e){return-1===(e=y(this,new j(t,e)))||0===e},o.isNaN=function(){return!this.s},o.isNegative=function(){return this.s<0},o.isPositive=function(){return this.s>0},o.isZero=function(){return!!this.c&&0==this.c[0]},o.minus=function(t,e){var n,r,i,o,a=this,u=a.s;if(e=(t=new j(t,e)).s,!u||!e)return new j(NaN);if(u!=e)return t.s=-e,a.plus(t);var s=a.e/d,c=t.e/d,f=a.c,h=t.c;if(!s||!c){if(!f||!h)return f?(t.s=-e,t):new j(h?a:NaN);if(!f[0]||!h[0])return h[0]?(t.s=-e,t):new j(f[0]?a:3==M?-0:0)}if(s=b(s),c=b(c),f=f.slice(),u=s-c){for((o=u<0)?(u=-u,i=f):(c=s,i=h),i.reverse(),e=u;e--;i.push(0));i.reverse()}else for(r=(o=(u=f.length)<(e=h.length))?u:e,u=e=0;e0)for(;e--;f[n++]=0);for(e=l-1;r>u;){if(f[--r]=0;){for(n=0,p=O[i]%_,m=O[i]/_|0,o=i+(a=s);o>i;)n=((c=p*(c=S[--a]%_)+(u=m*c+(f=S[a]/_|0)*p)%_*_+v[o]+n)/y|0)+(u/_|0)+m*f,v[o--]=c%y;v[o]=n}return n?++r:v.splice(0,1),F(t,v,r)},o.negated=function(){var t=new j(this);return t.s=-t.s||null,t},o.plus=function(t,e){var n,r=this,i=r.s;if(e=(t=new j(t,e)).s,!i||!e)return new j(NaN);if(i!=e)return t.s=-e,r.minus(t);var o=r.e/d,a=t.e/d,u=r.c,s=t.c;if(!o||!a){if(!u||!s)return new j(i/0);if(!u[0]||!s[0])return s[0]?t:new j(u[0]?r:0*i)}if(o=b(o),a=b(a),u=u.slice(),i=o-a){for(i>0?(a=o,n=s):(i=-i,n=u),n.reverse();i--;n.push(0));n.reverse()}for((i=u.length)-(e=s.length)<0&&(n=s,s=u,u=n,e=i),i=0;e;)i=(u[--e]=u[e]+s[e]+i)/l|0,u[e]=l===u[e]?0:u[e]%l;return i&&(u=[i].concat(u),++a),F(t,u,a)},o.precision=o.sd=function(t,e){var n,r,i,o=this;if(null!=t&&t!==!!t)return _(t,1,m),null==e?e=M:_(e,0,8),B(new j(o),t,e);if(!(n=o.c))return null;if(r=(i=n.length-1)*d+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];i>=10;i/=10,r++);}return t&&o.e+1>r&&(r=o.e+1),r},o.shiftedBy=function(t){return _(t,-9007199254740991,h),this.times("1e"+t)},o.squareRoot=o.sqrt=function(){var t,e,r,i,o,a=this,u=a.c,s=a.s,c=a.e,f=E+4,l=new j("0.5");if(1!==s||!u||!u[0])return new j(!s||s<0&&(!u||u[0])?NaN:u?a:1/0);if(0==(s=Math.sqrt(+U(a)))||s==1/0?(((e=v(u)).length+c)%2==0&&(e+="0"),s=Math.sqrt(+e),c=b((c+1)/2)-(c<0||c%2),r=new j(e=s==1/0?"1e"+c:(e=s.toExponential()).slice(0,e.indexOf("e")+1)+c)):r=new j(s+""),r.c[0])for((s=(c=r.e)+f)<3&&(s=0);;)if(o=r,r=l.times(o.plus(n(a,o,f,1))),v(o.c).slice(0,s)===(e=v(r.c)).slice(0,s)){if(r.e0&&g>0){for(o=g%u||u,l=p.substr(0,o);o0&&(l+=f+p.slice(o)),h&&(l="-"+l)}r=d?l+(n.decimalSeparator||"")+((s=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+s+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):l}return(n.prefix||"")+r+(n.suffix||"")},o.toFraction=function(t){var e,r,i,o,a,u,s,f,l,h,g,m,b=this,y=b.c;if(null!=t&&(!(s=new j(t)).isInteger()&&(s.c||1!==s.s)||s.lt(x)))throw Error(c+"Argument "+(s.isInteger()?"out of range: ":"not an integer: ")+U(s));if(!y)return new j(b);for(e=new j(x),l=r=new j(x),i=f=new j(x),m=v(y),a=e.e=m.length-b.e-1,e.c[0]=p[(u=a%d)<0?d+u:u],t=!t||s.comparedTo(e)>0?a>0?e:l:s,u=k,k=1/0,s=new j(m),f.c[0]=0;h=n(s,e,0,1),1!=(o=r.plus(h.times(i))).comparedTo(t);)r=i,i=o,l=f.plus(h.times(o=l)),f=o,e=s.minus(h.times(o=e)),s=o;return o=n(t.minus(r),i,0,1),f=f.plus(o.times(l)),r=r.plus(o.times(i)),f.s=l.s=b.s,g=n(l,i,a*=2,M).minus(b).abs().comparedTo(n(f,r,a,M).minus(b).abs())<1?[l,i]:[f,r],k=u,g},o.toNumber=function(){return+U(this)},o.toPrecision=function(t,e){return null!=t&&_(t,1,m),D(this,t,e,2)},o.toString=function(t){var e,n=this,i=n.s,o=n.e;return null===o?i?(e="Infinity",i<0&&(e="-"+e)):e="NaN":(null==t?e=o<=T||o>=$?S(v(n.c),o):O(v(n.c),o,"0"):10===t?e=O(v((n=B(new j(n),E+o+1,M)).c),n.e,"0"):(_(t,2,R.length,"Base"),e=r(O(v(n.c),o,"0"),10,t,i,!0)),i<0&&n.c[0]&&(e="-"+e)),e},o.valueOf=o.toJSON=function(){return U(this)},o._isBigNumber=!0,null!=e&&j.set(e),j}()).default=o.BigNumber=o,void 0===(r=function(){return o}.call(e,n,e,t))||(t.exports=r)}()},function(t,e,n){"use strict";function r(t,e,n){return(n=n||[]).length>=e?t.apply(null,n.slice(0,e).reverse()):function(){var i=Array.prototype.slice.call(arguments);return r(t,e,n.concat(i))}}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e){return function(){return null}}n.r(e),n.d(e,"chainPropTypes",(function(){return r})),n.d(e,"deepmerge",(function(){return i.a})),n.d(e,"elementAcceptingRef",(function(){return s})),n.d(e,"elementTypeAcceptingRef",(function(){return c})),n.d(e,"exactProp",(function(){return f})),n.d(e,"formatMuiErrorMessage",(function(){return l.a})),n.d(e,"getDisplayName",(function(){return v})),n.d(e,"HTMLElementType",(function(){return y})),n.d(e,"ponyfillGlobal",(function(){return _})),n.d(e,"refType",(function(){return w}));var i=n(393),o=n(13),a=n.n(o);var u=(a.a.element,function(){return null});u.isRequired=(a.a.element.isRequired,function(){return null});var s=u;var c=(o.elementType,function(){return null});n(58),n(4);function f(t){return t}var l=n(284),d=n(135),h=n(103),p=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function g(t){var e="".concat(t).match(p);return e&&e[1]||""}function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return t.displayName||t.name||g(t)||e}function b(t,e,n){var r=m(e);return t.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function v(t){if(null!=t){if("string"===typeof t)return t;if("function"===typeof t)return m(t,"Component");if("object"===Object(d.a)(t))switch(t.$$typeof){case h.ForwardRef:return b(t,t.render,"ForwardRef");case h.Memo:return b(t,t.type,"memo");default:return}}}function y(t,e,n,r,i){return null}var _="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w=a.a.oneOfType([a.a.func,a.a.object])},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(32),i=n(16),o=n(57);function a(t){return function e(n,a,u){switch(arguments.length){case 0:return e;case 1:return Object(o.a)(n)?e:Object(i.a)((function(e,r){return t(n,e,r)}));case 2:return Object(o.a)(n)&&Object(o.a)(a)?e:Object(o.a)(n)?Object(i.a)((function(e,n){return t(e,a,n)})):Object(o.a)(a)?Object(i.a)((function(e,r){return t(n,e,r)})):Object(r.a)((function(e){return t(n,a,e)}));default:return Object(o.a)(n)&&Object(o.a)(a)&&Object(o.a)(u)?e:Object(o.a)(n)&&Object(o.a)(a)?Object(i.a)((function(e,n){return t(e,n,u)})):Object(o.a)(n)&&Object(o.a)(u)?Object(i.a)((function(e,n){return t(e,a,n)})):Object(o.a)(a)&&Object(o.a)(u)?Object(i.a)((function(e,r){return t(n,e,r)})):Object(o.a)(n)?Object(r.a)((function(e){return t(e,a,u)})):Object(o.a)(a)?Object(r.a)((function(e){return t(n,e,u)})):Object(o.a)(u)?Object(r.a)((function(e){return t(n,a,e)})):t(n,a,u)}}}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n"']/g,Q=RegExp(Y.source),X=RegExp(Z.source),J=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,nt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rt=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ot=/[\\^$.*+?()[\]{}|]/g,at=RegExp(ot.source),ut=/^\s+|\s+$/g,st=/^\s+/,ct=/\s+$/,ft=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,dt=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,pt=/\\(\\)?/g,gt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,mt=/\w*$/,bt=/^[-+]0x[0-9a-f]+$/i,vt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,wt=/^(?:0|[1-9]\d*)$/,St=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ot=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,Et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Mt="\\u2700-\\u27bf",Tt="a-z\\xdf-\\xf6\\xf8-\\xff",$t="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\ufe0e\\ufe0f",kt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ct="['\u2019]",It="[\\ud800-\\udfff]",Pt="["+kt+"]",Nt="["+Et+"]",Rt="\\d+",jt="[\\u2700-\\u27bf]",Dt="["+Tt+"]",Lt="[^\\ud800-\\udfff"+kt+Rt+Mt+Tt+$t+"]",Ft="\\ud83c[\\udffb-\\udfff]",Bt="[^\\ud800-\\udfff]",Ut="(?:\\ud83c[\\udde6-\\uddff]){2}",zt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ht="["+$t+"]",Vt="(?:"+Dt+"|"+Lt+")",qt="(?:"+Ht+"|"+Lt+")",Wt="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Gt="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Kt="(?:"+Nt+"|"+Ft+")"+"?",Yt="[\\ufe0e\\ufe0f]?",Zt=Yt+Kt+("(?:\\u200d(?:"+[Bt,Ut,zt].join("|")+")"+Yt+Kt+")*"),Qt="(?:"+[jt,Ut,zt].join("|")+")"+Zt,Xt="(?:"+[Bt+Nt+"?",Nt,Ut,zt,It].join("|")+")",Jt=RegExp(Ct,"g"),te=RegExp(Nt,"g"),ee=RegExp(Ft+"(?="+Ft+")|"+Xt+Zt,"g"),ne=RegExp([Ht+"?"+Dt+"+"+Wt+"(?="+[Pt,Ht,"$"].join("|")+")",qt+"+"+Gt+"(?="+[Pt,Ht+Vt,"$"].join("|")+")",Ht+"?"+Vt+"+"+Wt,Ht+"+"+Gt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rt,Qt].join("|"),"g"),re=RegExp("[\\u200d\\ud800-\\udfff"+Et+At+"]"),ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,oe=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ae=-1,ue={};ue[D]=ue[L]=ue[F]=ue[B]=ue[U]=ue[z]=ue[H]=ue[V]=ue[q]=!0,ue[y]=ue[_]=ue[R]=ue[w]=ue[j]=ue[S]=ue[O]=ue[x]=ue[M]=ue[T]=ue[$]=ue[k]=ue[C]=ue[I]=ue[N]=!1;var se={};se[y]=se[_]=se[R]=se[j]=se[w]=se[S]=se[D]=se[L]=se[F]=se[B]=se[U]=se[M]=se[T]=se[$]=se[k]=se[C]=se[I]=se[P]=se[z]=se[H]=se[V]=se[q]=!0,se[O]=se[x]=se[N]=!1;var ce={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fe=parseFloat,le=parseInt,de="object"==typeof t&&t&&t.Object===Object&&t,he="object"==typeof self&&self&&self.Object===Object&&self,pe=de||he||Function("return this")(),ge=e&&!e.nodeType&&e,me=ge&&"object"==typeof r&&r&&!r.nodeType&&r,be=me&&me.exports===ge,ve=be&&de.process,ye=function(){try{var t=me&&me.require&&me.require("util").types;return t||ve&&ve.binding&&ve.binding("util")}catch(e){}}(),_e=ye&&ye.isArrayBuffer,we=ye&&ye.isDate,Se=ye&&ye.isMap,Oe=ye&&ye.isRegExp,xe=ye&&ye.isSet,Ee=ye&&ye.isTypedArray;function Me(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Te(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i-1}function Pe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r-1;);return n}function en(t,e){for(var n=t.length;n--&&ze(e,t[n],0)>-1;);return n}function nn(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var rn=Ge({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),on=Ge({"&":"&","<":"<",">":">",'"':""","'":"'"});function an(t){return"\\"+ce[t]}function un(t){return re.test(t)}function sn(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function cn(t,e){return function(n){return t(e(n))}}function fn(t,e){for(var n=-1,r=t.length,i=0,o=[];++n",""":'"',"'":"'"});var mn=function t(e){var n=(e=null==e?pe:mn.defaults(pe.Object(),e,mn.pick(pe,oe))).Array,r=e.Date,i=e.Error,Et=e.Function,Mt=e.Math,Tt=e.Object,$t=e.RegExp,At=e.String,kt=e.TypeError,Ct=n.prototype,It=Et.prototype,Pt=Tt.prototype,Nt=e["__core-js_shared__"],Rt=It.toString,jt=Pt.hasOwnProperty,Dt=0,Lt=function(){var t=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Ft=Pt.toString,Bt=Rt.call(Tt),Ut=pe._,zt=$t("^"+Rt.call(jt).replace(ot,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ht=be?e.Buffer:o,Vt=e.Symbol,qt=e.Uint8Array,Wt=Ht?Ht.allocUnsafe:o,Gt=cn(Tt.getPrototypeOf,Tt),Kt=Tt.create,Yt=Pt.propertyIsEnumerable,Zt=Ct.splice,Qt=Vt?Vt.isConcatSpreadable:o,Xt=Vt?Vt.iterator:o,ee=Vt?Vt.toStringTag:o,re=function(){try{var t=lo(Tt,"defineProperty");return t({},"",{}),t}catch(e){}}(),ce=e.clearTimeout!==pe.clearTimeout&&e.clearTimeout,de=r&&r.now!==pe.Date.now&&r.now,he=e.setTimeout!==pe.setTimeout&&e.setTimeout,ge=Mt.ceil,me=Mt.floor,ve=Tt.getOwnPropertySymbols,ye=Ht?Ht.isBuffer:o,Fe=e.isFinite,Ge=Ct.join,bn=cn(Tt.keys,Tt),vn=Mt.max,yn=Mt.min,_n=r.now,wn=e.parseInt,Sn=Mt.random,On=Ct.reverse,xn=lo(e,"DataView"),En=lo(e,"Map"),Mn=lo(e,"Promise"),Tn=lo(e,"Set"),$n=lo(e,"WeakMap"),An=lo(Tt,"create"),kn=$n&&new $n,Cn={},In=Fo(xn),Pn=Fo(En),Nn=Fo(Mn),Rn=Fo(Tn),jn=Fo($n),Dn=Vt?Vt.prototype:o,Ln=Dn?Dn.valueOf:o,Fn=Dn?Dn.toString:o;function Bn(t){if(nu(t)&&!qa(t)&&!(t instanceof Vn)){if(t instanceof Hn)return t;if(jt.call(t,"__wrapped__"))return Bo(t)}return new Hn(t)}var Un=function(){function t(){}return function(e){if(!eu(e))return{};if(Kt)return Kt(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function zn(){}function Hn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function Vn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=b,this.__views__=[]}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e=e?t:e)),t}function sr(t,e,n,r,i,a){var u,s=1&e,c=2&e,f=4&e;if(n&&(u=i?n(t,r,i,a):n(t)),u!==o)return u;if(!eu(t))return t;var l=qa(t);if(l){if(u=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&jt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!s)return Ai(t,u)}else{var d=go(t),h=d==x||d==E;if(Ya(t))return Oi(t,s);if(d==$||d==y||h&&!i){if(u=c||h?{}:bo(t),!s)return c?function(t,e){return ki(t,po(t),e)}(t,function(t,e){return t&&ki(e,Pu(e),t)}(u,t)):function(t,e){return ki(t,ho(t),e)}(t,ir(u,t))}else{if(!se[d])return i?t:{};u=function(t,e,n){var r=t.constructor;switch(e){case R:return xi(t);case w:case S:return new r(+t);case j:return function(t,e){var n=e?xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case D:case L:case F:case B:case U:case z:case H:case V:case q:return Ei(t,n);case M:return new r;case T:case I:return new r(t);case k:return function(t){var e=new t.constructor(t.source,mt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case C:return new r;case P:return i=t,Ln?Tt(Ln.call(i)):{}}var i}(t,d,s)}}a||(a=new Yn);var p=a.get(t);if(p)return p;a.set(t,u),uu(t)?t.forEach((function(r){u.add(sr(r,e,n,r,t,a))})):ru(t)&&t.forEach((function(r,i){u.set(i,sr(r,e,n,i,t,a))}));var g=l?o:(f?c?io:ro:c?Pu:Iu)(t);return $e(g||t,(function(r,i){g&&(r=t[i=r]),er(u,i,sr(r,e,n,i,t,a))})),u}function cr(t,e,n){var r=n.length;if(null==t)return!r;for(t=Tt(t);r--;){var i=n[r],a=e[i],u=t[i];if(u===o&&!(i in t)||!a(u))return!1}return!0}function fr(t,e,n){if("function"!=typeof t)throw new kt(a);return Io((function(){t.apply(o,n)}),e)}function lr(t,e,n,r){var i=-1,o=Ie,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;n&&(e=Ne(e,Qe(n))),r?(o=Pe,a=!1):e.length>=200&&(o=Je,a=!1,e=new Kn(e));t:for(;++i-1},Wn.prototype.set=function(t,e){var n=this.__data__,r=nr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(En||Wn),string:new qn}},Gn.prototype.delete=function(t){var e=co(this,t).delete(t);return this.size-=e?1:0,e},Gn.prototype.get=function(t){return co(this,t).get(t)},Gn.prototype.has=function(t){return co(this,t).has(t)},Gn.prototype.set=function(t,e){var n=co(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Kn.prototype.add=Kn.prototype.push=function(t){return this.__data__.set(t,u),this},Kn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Yn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Yn.prototype.get=function(t){return this.__data__.get(t)},Yn.prototype.has=function(t){return this.__data__.has(t)},Yn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!En||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(t,e),this.size=n.size,this};var dr=Pi(_r),hr=Pi(wr,!0);function pr(t,e){var n=!0;return dr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function gr(t,e,n){for(var r=-1,i=t.length;++r0&&n(u)?e>1?br(u,e-1,n,r,i):Re(i,u):r||(i[i.length]=u)}return i}var vr=Ni(),yr=Ni(!0);function _r(t,e){return t&&vr(t,e,Iu)}function wr(t,e){return t&&yr(t,e,Iu)}function Sr(t,e){return Ce(e,(function(e){return Xa(t[e])}))}function Or(t,e){for(var n=0,r=(e=yi(e,t)).length;null!=t&&ne}function Tr(t,e){return null!=t&&jt.call(t,e)}function $r(t,e){return null!=t&&e in Tt(t)}function Ar(t,e,r){for(var i=r?Pe:Ie,a=t[0].length,u=t.length,s=u,c=n(u),f=1/0,l=[];s--;){var d=t[s];s&&e&&(d=Ne(d,Qe(e))),f=yn(d.length,f),c[s]=!r&&(e||a>=120&&d.length>=120)?new Kn(s&&d):o}d=t[0];var h=-1,p=c[0];t:for(;++h=u?s:s*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function qr(t,e,n){for(var r=-1,i=e.length,o={};++r-1;)u!==t&&Zt.call(u,s,1),Zt.call(t,s,1);return t}function Gr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;yo(i)?Zt.call(t,i,1):li(t,i)}}return t}function Kr(t,e){return t+me(Sn()*(e-t+1))}function Yr(t,e){var n="";if(!t||e<1||e>g)return n;do{e%2&&(n+=t),(e=me(e/2))&&(t+=t)}while(e);return n}function Zr(t,e){return Po(To(t,e,is),t+"")}function Qr(t){return Qn(Uu(t))}function Xr(t,e){var n=Uu(t);return jo(n,ur(e,0,n.length))}function Jr(t,e,n,r){if(!eu(t))return t;for(var i=-1,a=(e=yi(e,t)).length,u=a-1,s=t;null!=s&&++io?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=n(o);++i>>1,a=t[o];null!==a&&!cu(a)&&(n?a<=e:a=200){var c=e?null:Yi(t);if(c)return ln(c);a=!1,i=Je,s=new Kn}else s=e?[]:u;t:for(;++r=r?t:ri(t,e,n)}var Si=ce||function(t){return pe.clearTimeout(t)};function Oi(t,e){if(e)return t.slice();var n=t.length,r=Wt?Wt(n):new t.constructor(n);return t.copy(r),r}function xi(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Ei(t,e){var n=e?xi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Mi(t,e){if(t!==e){var n=t!==o,r=null===t,i=t===t,a=cu(t),u=e!==o,s=null===e,c=e===e,f=cu(e);if(!s&&!f&&!a&&t>e||a&&u&&c&&!s&&!f||r&&u&&c||!n&&c||!i)return 1;if(!r&&!a&&!f&&t1?n[i-1]:o,u=i>2?n[2]:o;for(a=t.length>3&&"function"==typeof a?(i--,a):o,u&&_o(n[0],n[1],u)&&(a=i<3?o:a,i=1),e=Tt(e);++r-1?i[a?e[u]:u]:o}}function Fi(t){return no((function(e){var n=e.length,r=n,i=Hn.prototype.thru;for(t&&e.reverse();r--;){var u=e[r];if("function"!=typeof u)throw new kt(a);if(i&&!s&&"wrapper"==ao(u))var s=new Hn([],!0)}for(r=s?r:n;++r1&&y.reverse(),h&&fs))return!1;var f=a.get(t),l=a.get(e);if(f&&l)return f==e&&l==t;var d=-1,h=!0,p=2&n?new Kn:o;for(a.set(t,e),a.set(e,t);++d-1&&t%1==0&&t1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(ft,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return $e(v,(function(n){var r="_."+n[0];e&n[1]&&!Ie(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(dt):[]}(r),n)))}function Ro(t){var e=0,n=0;return function(){var r=_n(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function jo(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,aa(t,n)}));function ha(t){var e=Bn(t);return e.__chain__=!0,e}function pa(t,e){return e(t)}var ga=no((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return ar(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Vn&&yo(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:pa,args:[i],thisArg:o}),new Hn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(o),t}))):this.thru(i)}));var ma=Ci((function(t,e,n){jt.call(t,n)?++t[n]:or(t,n,1)}));var ba=Li(Vo),va=Li(qo);function ya(t,e){return(qa(t)?$e:dr)(t,so(e,3))}function _a(t,e){return(qa(t)?Ae:hr)(t,so(e,3))}var wa=Ci((function(t,e,n){jt.call(t,n)?t[n].push(e):or(t,n,[e])}));var Sa=Zr((function(t,e,r){var i=-1,o="function"==typeof e,a=Ga(t)?n(t.length):[];return dr(t,(function(t){a[++i]=o?Me(e,t,r):kr(t,e,r)})),a})),Oa=Ci((function(t,e,n){or(t,n,e)}));function xa(t,e){return(qa(t)?Ne:Fr)(t,so(e,3))}var Ea=Ci((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Ma=Zr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&_o(t,e[0],e[1])?e=[]:n>2&&_o(e[0],e[1],e[2])&&(e=[e[0]]),Vr(t,br(e,1),[])})),Ta=de||function(){return pe.Date.now()};function $a(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,Qi(t,d,o,o,o,o,e)}function Aa(t,e){var n;if("function"!=typeof e)throw new kt(a);return t=gu(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var ka=Zr((function(t,e,n){var r=1;if(n.length){var i=fn(n,uo(ka));r|=f}return Qi(t,r,e,n,i)})),Ca=Zr((function(t,e,n){var r=3;if(n.length){var i=fn(n,uo(Ca));r|=f}return Qi(e,r,t,n,i)}));function Ia(t,e,n){var r,i,u,s,c,f,l=0,d=!1,h=!1,p=!0;if("function"!=typeof t)throw new kt(a);function g(e){var n=r,a=i;return r=i=o,l=e,s=t.apply(a,n)}function m(t){return l=t,c=Io(v,e),d?g(t):s}function b(t){var n=t-f;return f===o||n>=e||n<0||h&&t-l>=u}function v(){var t=Ta();if(b(t))return y(t);c=Io(v,function(t){var n=e-(t-f);return h?yn(n,u-(t-l)):n}(t))}function y(t){return c=o,p&&r?g(t):(r=i=o,s)}function _(){var t=Ta(),n=b(t);if(r=arguments,i=this,f=t,n){if(c===o)return m(f);if(h)return Si(c),c=Io(v,e),g(f)}return c===o&&(c=Io(v,e)),s}return e=bu(e)||0,eu(n)&&(d=!!n.leading,u=(h="maxWait"in n)?vn(bu(n.maxWait)||0,e):u,p="trailing"in n?!!n.trailing:p),_.cancel=function(){c!==o&&Si(c),l=0,r=f=i=c=o},_.flush=function(){return c===o?s:y(Ta())},_}var Pa=Zr((function(t,e){return fr(t,1,e)})),Na=Zr((function(t,e,n){return fr(t,bu(e)||0,n)}));function Ra(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new kt(a);var n=function n(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Ra.Cache||Gn),n}function ja(t){if("function"!=typeof t)throw new kt(a);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ra.Cache=Gn;var Da=_i((function(t,e){var n=(e=1==e.length&&qa(e[0])?Ne(e[0],Qe(so())):Ne(br(e,1),Qe(so()))).length;return Zr((function(r){for(var i=-1,o=yn(r.length,n);++i=e})),Va=Cr(function(){return arguments}())?Cr:function(t){return nu(t)&&jt.call(t,"callee")&&!Yt.call(t,"callee")},qa=n.isArray,Wa=_e?Qe(_e):function(t){return nu(t)&&Er(t)==R};function Ga(t){return null!=t&&tu(t.length)&&!Xa(t)}function Ka(t){return nu(t)&&Ga(t)}var Ya=ye||bs,Za=we?Qe(we):function(t){return nu(t)&&Er(t)==S};function Qa(t){if(!nu(t))return!1;var e=Er(t);return e==O||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ou(t)}function Xa(t){if(!eu(t))return!1;var e=Er(t);return e==x||e==E||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ja(t){return"number"==typeof t&&t==gu(t)}function tu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=g}function eu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function nu(t){return null!=t&&"object"==typeof t}var ru=Se?Qe(Se):function(t){return nu(t)&&go(t)==M};function iu(t){return"number"==typeof t||nu(t)&&Er(t)==T}function ou(t){if(!nu(t)||Er(t)!=$)return!1;var e=Gt(t);if(null===e)return!0;var n=jt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Rt.call(n)==Bt}var au=Oe?Qe(Oe):function(t){return nu(t)&&Er(t)==k};var uu=xe?Qe(xe):function(t){return nu(t)&&go(t)==C};function su(t){return"string"==typeof t||!qa(t)&&nu(t)&&Er(t)==I}function cu(t){return"symbol"==typeof t||nu(t)&&Er(t)==P}var fu=Ee?Qe(Ee):function(t){return nu(t)&&tu(t.length)&&!!ue[Er(t)]};var lu=Wi(Lr),du=Wi((function(t,e){return t<=e}));function hu(t){if(!t)return[];if(Ga(t))return su(t)?pn(t):Ai(t);if(Xt&&t[Xt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Xt]());var e=go(t);return(e==M?sn:e==C?ln:Uu)(t)}function pu(t){return t?(t=bu(t))===p||t===-1/0?17976931348623157e292*(t<0?-1:1):t===t?t:0:0===t?t:0}function gu(t){var e=pu(t),n=e%1;return e===e?n?e-n:e:0}function mu(t){return t?ur(gu(t),0,b):0}function bu(t){if("number"==typeof t)return t;if(cu(t))return m;if(eu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=eu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ut,"");var n=vt.test(t);return n||_t.test(t)?le(t.slice(2),n?2:8):bt.test(t)?m:+t}function vu(t){return ki(t,Pu(t))}function yu(t){return null==t?"":ci(t)}var _u=Ii((function(t,e){if(xo(e)||Ga(e))ki(e,Iu(e),t);else for(var n in e)jt.call(e,n)&&er(t,n,e[n])})),wu=Ii((function(t,e){ki(e,Pu(e),t)})),Su=Ii((function(t,e,n,r){ki(e,Pu(e),t,r)})),Ou=Ii((function(t,e,n,r){ki(e,Iu(e),t,r)})),xu=no(ar);var Eu=Zr((function(t,e){t=Tt(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&_o(e[0],e[1],i)&&(r=1);++n1),e})),ki(t,io(t),n),r&&(n=sr(n,7,to));for(var i=e.length;i--;)li(n,e[i]);return n}));var Du=no((function(t,e){return null==t?{}:function(t,e){return qr(t,e,(function(e,n){return $u(t,n)}))}(t,e)}));function Lu(t,e){if(null==t)return{};var n=Ne(io(t),(function(t){return[t]}));return e=so(e),qr(t,n,(function(t,n){return e(t,n[0])}))}var Fu=Zi(Iu),Bu=Zi(Pu);function Uu(t){return null==t?[]:Xe(t,Iu(t))}var zu=ji((function(t,e,n){return e=e.toLowerCase(),t+(n?Hu(e):e)}));function Hu(t){return Qu(yu(t).toLowerCase())}function Vu(t){return(t=yu(t))&&t.replace(St,rn).replace(te,"")}var qu=ji((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Wu=ji((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Gu=Ri("toLowerCase");var Ku=ji((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Yu=ji((function(t,e,n){return t+(n?" ":"")+Qu(e)}));var Zu=ji((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Qu=Ri("toUpperCase");function Xu(t,e,n){return t=yu(t),(e=n?o:e)===o?function(t){return ie.test(t)}(t)?function(t){return t.match(ne)||[]}(t):function(t){return t.match(ht)||[]}(t):t.match(e)||[]}var Ju=Zr((function(t,e){try{return Me(t,o,e)}catch(n){return Qa(n)?n:new i(n)}})),ts=no((function(t,e){return $e(e,(function(e){e=Lo(e),or(t,e,ka(t[e],t))})),t}));function es(t){return function(){return t}}var ns=Fi(),rs=Fi(!0);function is(t){return t}function os(t){return Rr("function"==typeof t?t:sr(t,1))}var as=Zr((function(t,e){return function(n){return kr(n,t,e)}})),us=Zr((function(t,e){return function(n){return kr(t,n,e)}}));function ss(t,e,n){var r=Iu(e),i=Sr(e,r);null!=n||eu(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Sr(e,Iu(e)));var o=!(eu(n)&&"chain"in n)||!!n.chain,a=Xa(t);return $e(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=Ai(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Re([this.value()],arguments))})})),t}function cs(){}var fs=Hi(Ne),ls=Hi(ke),ds=Hi(Le);function hs(t){return wo(t)?We(Lo(t)):function(t){return function(e){return Or(e,t)}}(t)}var ps=qi(),gs=qi(!0);function ms(){return[]}function bs(){return!1}var vs=zi((function(t,e){return t+e}),0),ys=Ki("ceil"),_s=zi((function(t,e){return t/e}),1),ws=Ki("floor");var Ss=zi((function(t,e){return t*e}),1),Os=Ki("round"),xs=zi((function(t,e){return t-e}),0);return Bn.after=function(t,e){if("function"!=typeof e)throw new kt(a);return t=gu(t),function(){if(--t<1)return e.apply(this,arguments)}},Bn.ary=$a,Bn.assign=_u,Bn.assignIn=wu,Bn.assignInWith=Su,Bn.assignWith=Ou,Bn.at=xu,Bn.before=Aa,Bn.bind=ka,Bn.bindAll=ts,Bn.bindKey=Ca,Bn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qa(t)?t:[t]},Bn.chain=ha,Bn.chunk=function(t,e,r){e=(r?_o(t,e,r):e===o)?1:vn(gu(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,u=0,s=n(ge(i/e));ai?0:i+n),(r=r===o||r>i?i:gu(r))<0&&(r+=i),r=n>r?0:mu(r);n>>0)?(t=yu(t))&&("string"==typeof e||null!=e&&!au(e))&&!(e=ci(e))&&un(t)?wi(pn(t),0,n):t.split(e,n):[]},Bn.spread=function(t,e){if("function"!=typeof t)throw new kt(a);return e=null==e?0:vn(gu(e),0),Zr((function(n){var r=n[e],i=wi(n,0,e);return r&&Re(i,r),Me(t,this,i)}))},Bn.tail=function(t){var e=null==t?0:t.length;return e?ri(t,1,e):[]},Bn.take=function(t,e,n){return t&&t.length?ri(t,0,(e=n||e===o?1:gu(e))<0?0:e):[]},Bn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?ri(t,(e=r-(e=n||e===o?1:gu(e)))<0?0:e,r):[]},Bn.takeRightWhile=function(t,e){return t&&t.length?hi(t,so(e,3),!1,!0):[]},Bn.takeWhile=function(t,e){return t&&t.length?hi(t,so(e,3)):[]},Bn.tap=function(t,e){return e(t),t},Bn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new kt(a);return eu(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Ia(t,e,{leading:r,maxWait:e,trailing:i})},Bn.thru=pa,Bn.toArray=hu,Bn.toPairs=Fu,Bn.toPairsIn=Bu,Bn.toPath=function(t){return qa(t)?Ne(t,Lo):cu(t)?[t]:Ai(Do(yu(t)))},Bn.toPlainObject=vu,Bn.transform=function(t,e,n){var r=qa(t),i=r||Ya(t)||fu(t);if(e=so(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:eu(t)&&Xa(o)?Un(Gt(t)):{}}return(i?$e:_r)(t,(function(t,r,i){return e(n,t,r,i)})),n},Bn.unary=function(t){return $a(t,1)},Bn.union=na,Bn.unionBy=ra,Bn.unionWith=ia,Bn.uniq=function(t){return t&&t.length?fi(t):[]},Bn.uniqBy=function(t,e){return t&&t.length?fi(t,so(e,2)):[]},Bn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?fi(t,o,e):[]},Bn.unset=function(t,e){return null==t||li(t,e)},Bn.unzip=oa,Bn.unzipWith=aa,Bn.update=function(t,e,n){return null==t?t:di(t,e,vi(n))},Bn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:di(t,e,vi(n),r)},Bn.values=Uu,Bn.valuesIn=function(t){return null==t?[]:Xe(t,Pu(t))},Bn.without=ua,Bn.words=Xu,Bn.wrap=function(t,e){return La(vi(e),t)},Bn.xor=sa,Bn.xorBy=ca,Bn.xorWith=fa,Bn.zip=la,Bn.zipObject=function(t,e){return mi(t||[],e||[],er)},Bn.zipObjectDeep=function(t,e){return mi(t||[],e||[],Jr)},Bn.zipWith=da,Bn.entries=Fu,Bn.entriesIn=Bu,Bn.extend=wu,Bn.extendWith=Su,ss(Bn,Bn),Bn.add=vs,Bn.attempt=Ju,Bn.camelCase=zu,Bn.capitalize=Hu,Bn.ceil=ys,Bn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=bu(n))===n?n:0),e!==o&&(e=(e=bu(e))===e?e:0),ur(bu(t),e,n)},Bn.clone=function(t){return sr(t,4)},Bn.cloneDeep=function(t){return sr(t,5)},Bn.cloneDeepWith=function(t,e){return sr(t,5,e="function"==typeof e?e:o)},Bn.cloneWith=function(t,e){return sr(t,4,e="function"==typeof e?e:o)},Bn.conformsTo=function(t,e){return null==e||cr(t,e,Iu(e))},Bn.deburr=Vu,Bn.defaultTo=function(t,e){return null==t||t!==t?e:t},Bn.divide=_s,Bn.endsWith=function(t,e,n){t=yu(t),e=ci(e);var r=t.length,i=n=n===o?r:ur(gu(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Bn.eq=Ua,Bn.escape=function(t){return(t=yu(t))&&X.test(t)?t.replace(Z,on):t},Bn.escapeRegExp=function(t){return(t=yu(t))&&at.test(t)?t.replace(ot,"\\$&"):t},Bn.every=function(t,e,n){var r=qa(t)?ke:pr;return n&&_o(t,e,n)&&(e=o),r(t,so(e,3))},Bn.find=ba,Bn.findIndex=Vo,Bn.findKey=function(t,e){return Be(t,so(e,3),_r)},Bn.findLast=va,Bn.findLastIndex=qo,Bn.findLastKey=function(t,e){return Be(t,so(e,3),wr)},Bn.floor=ws,Bn.forEach=ya,Bn.forEachRight=_a,Bn.forIn=function(t,e){return null==t?t:vr(t,so(e,3),Pu)},Bn.forInRight=function(t,e){return null==t?t:yr(t,so(e,3),Pu)},Bn.forOwn=function(t,e){return t&&_r(t,so(e,3))},Bn.forOwnRight=function(t,e){return t&&wr(t,so(e,3))},Bn.get=Tu,Bn.gt=za,Bn.gte=Ha,Bn.has=function(t,e){return null!=t&&mo(t,e,Tr)},Bn.hasIn=$u,Bn.head=Go,Bn.identity=is,Bn.includes=function(t,e,n,r){t=Ga(t)?t:Uu(t),n=n&&!r?gu(n):0;var i=t.length;return n<0&&(n=vn(i+n,0)),su(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&ze(t,e,n)>-1},Bn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:gu(n);return i<0&&(i=vn(r+i,0)),ze(t,e,i)},Bn.inRange=function(t,e,n){return e=pu(e),n===o?(n=e,e=0):n=pu(n),function(t,e,n){return t>=yn(e,n)&&t=-9007199254740991&&t<=g},Bn.isSet=uu,Bn.isString=su,Bn.isSymbol=cu,Bn.isTypedArray=fu,Bn.isUndefined=function(t){return t===o},Bn.isWeakMap=function(t){return nu(t)&&go(t)==N},Bn.isWeakSet=function(t){return nu(t)&&"[object WeakSet]"==Er(t)},Bn.join=function(t,e){return null==t?"":Ge.call(t,e)},Bn.kebabCase=qu,Bn.last=Qo,Bn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=gu(n))<0?vn(r+i,0):yn(i,r-1)),e===e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Ue(t,Ve,i,!0)},Bn.lowerCase=Wu,Bn.lowerFirst=Gu,Bn.lt=lu,Bn.lte=du,Bn.max=function(t){return t&&t.length?gr(t,is,Mr):o},Bn.maxBy=function(t,e){return t&&t.length?gr(t,so(e,2),Mr):o},Bn.mean=function(t){return qe(t,is)},Bn.meanBy=function(t,e){return qe(t,so(e,2))},Bn.min=function(t){return t&&t.length?gr(t,is,Lr):o},Bn.minBy=function(t,e){return t&&t.length?gr(t,so(e,2),Lr):o},Bn.stubArray=ms,Bn.stubFalse=bs,Bn.stubObject=function(){return{}},Bn.stubString=function(){return""},Bn.stubTrue=function(){return!0},Bn.multiply=Ss,Bn.nth=function(t,e){return t&&t.length?Hr(t,gu(e)):o},Bn.noConflict=function(){return pe._===this&&(pe._=Ut),this},Bn.noop=cs,Bn.now=Ta,Bn.pad=function(t,e,n){t=yu(t);var r=(e=gu(e))?hn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Vi(me(i),n)+t+Vi(ge(i),n)},Bn.padEnd=function(t,e,n){t=yu(t);var r=(e=gu(e))?hn(t):0;return e&&re){var r=t;t=e,e=r}if(n||t%1||e%1){var i=Sn();return yn(t+i*(e-t+fe("1e-"+((i+"").length-1))),e)}return Kr(t,e)},Bn.reduce=function(t,e,n){var r=qa(t)?je:Ke,i=arguments.length<3;return r(t,so(e,4),n,i,dr)},Bn.reduceRight=function(t,e,n){var r=qa(t)?De:Ke,i=arguments.length<3;return r(t,so(e,4),n,i,hr)},Bn.repeat=function(t,e,n){return e=(n?_o(t,e,n):e===o)?1:gu(e),Yr(yu(t),e)},Bn.replace=function(){var t=arguments,e=yu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Bn.result=function(t,e,n){var r=-1,i=(e=yi(e,t)).length;for(i||(i=1,t=o);++rg)return[];var n=b,r=yn(t,b);e=so(e),t-=b;for(var i=Ze(r,e);++n=a)return t;var s=n-hn(r);if(s<1)return r;var c=u?wi(u,0,s).join(""):t.slice(0,s);if(i===o)return c+r;if(u&&(s+=c.length-s),au(i)){if(t.slice(s).search(i)){var f,l=c;for(i.global||(i=$t(i.source,yu(mt.exec(i))+"g")),i.lastIndex=0;f=i.exec(l);)var d=f.index;c=c.slice(0,d===o?s:d)}}else if(t.indexOf(ci(i),s)!=s){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},Bn.unescape=function(t){return(t=yu(t))&&Q.test(t)?t.replace(Y,gn):t},Bn.uniqueId=function(t){var e=++Dt;return yu(t)+e},Bn.upperCase=Zu,Bn.upperFirst=Qu,Bn.each=ya,Bn.eachRight=_a,Bn.first=Go,ss(Bn,function(){var t={};return _r(Bn,(function(e,n){jt.call(Bn.prototype,n)||(t[n]=e)})),t}(),{chain:!1}),Bn.VERSION="4.17.20",$e(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Bn[t].placeholder=Bn})),$e(["drop","take"],(function(t,e){Vn.prototype[t]=function(n){n=n===o?1:vn(gu(n),0);var r=this.__filtered__&&!e?new Vn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,b),type:t+(r.__dir__<0?"Right":"")}),r},Vn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),$e(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Vn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:so(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),$e(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Vn.prototype[t]=function(){return this[n](1).value()[0]}})),$e(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Vn.prototype[t]=function(){return this.__filtered__?new Vn(this):this[n](1)}})),Vn.prototype.compact=function(){return this.filter(is)},Vn.prototype.find=function(t){return this.filter(t).head()},Vn.prototype.findLast=function(t){return this.reverse().find(t)},Vn.prototype.invokeMap=Zr((function(t,e){return"function"==typeof t?new Vn(this):this.map((function(n){return kr(n,t,e)}))})),Vn.prototype.reject=function(t){return this.filter(ja(so(t)))},Vn.prototype.slice=function(t,e){t=gu(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Vn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=gu(e))<0?n.dropRight(-e):n.take(e-t)),n)},Vn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Vn.prototype.toArray=function(){return this.take(b)},_r(Vn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Bn[r?"take"+("last"==e?"Right":""):e],a=r||/^find/.test(e);i&&(Bn.prototype[e]=function(){var e=this.__wrapped__,u=r?[1]:arguments,s=e instanceof Vn,c=u[0],f=s||qa(e),l=function(t){var e=i.apply(Bn,Re([t],u));return r&&d?e[0]:e};f&&n&&"function"==typeof c&&1!=c.length&&(s=f=!1);var d=this.__chain__,h=!!this.__actions__.length,p=a&&!d,g=s&&!h;if(!a&&f){e=g?e:new Vn(this);var m=t.apply(e,u);return m.__actions__.push({func:pa,args:[l],thisArg:o}),new Hn(m,d)}return p&&g?t.apply(this,u):(m=this.thru(l),p?r?m.value()[0]:m.value():m)})})),$e(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Ct[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Bn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(qa(i)?i:[],t)}return this[n]((function(n){return e.apply(qa(n)?n:[],t)}))}})),_r(Vn.prototype,(function(t,e){var n=Bn[e];if(n){var r=n.name+"";jt.call(Cn,r)||(Cn[r]=[]),Cn[r].push({name:e,func:n})}})),Cn[Bi(o,2).name]=[{name:"wrapper",func:o}],Vn.prototype.clone=function(){var t=new Vn(this.__wrapped__);return t.__actions__=Ai(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Ai(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Ai(this.__views__),t},Vn.prototype.reverse=function(){if(this.__filtered__){var t=new Vn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Vn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=qa(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Bn.prototype.plant=function(t){for(var e,n=this;n instanceof zn;){var r=Bo(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Bn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Vn){var e=t;return this.__actions__.length&&(e=new Vn(this)),(e=e.reverse()).__actions__.push({func:pa,args:[ea],thisArg:o}),new Hn(e,this.__chain__)}return this.thru(ea)},Bn.prototype.toJSON=Bn.prototype.valueOf=Bn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Bn.prototype.first=Bn.prototype.head,Xt&&(Bn.prototype[Xt]=function(){return this}),Bn}();pe._=mn,(i=function(){return mn}.call(e,n,e,r))===o||(r.exports=i)}).call(this)}).call(this,n(59),n(94)(t))},function(t,e,n){t.exports=function(){var t=t||function(t,e){var n=Object.create||function(){function t(){}return function(e){var n;return t.prototype=e,n=new t,t.prototype=null,n}}(),r={},i=r.lib={},o=i.Base={extend:function(t){var e=n(this);return t&&e.mixIn(t),e.hasOwnProperty("init")&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),e.init.prototype=e,e.$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},a=i.WordArray=o.extend({init:function(t,n){t=this.words=t||[],this.sigBytes=n!=e?n:4*t.length},toString:function(t){return(t||s).stringify(this)},concat:function(t){var e=this.words,n=t.words,r=this.sigBytes,i=t.sigBytes;if(this.clamp(),r%4)for(var o=0;o>>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=u.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=u.Utf8={stringify:function(t){try{return decodeURIComponent(escape(c.stringify(t)))}catch(e){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,u=i/(4*o),s=(u=e?t.ceil(u):t.max((0|u)-this._minBufferSize,0))*o,c=t.min(4*s,i);if(s){for(var f=0;f=f.OP_1&&t<=f.OP_16||t===f.OP_1NEGATE)}(t)}function p(t){return s.Array(t)&&t.every(h)}function g(t){return 0===t.length?f.OP_0:1===t.length?t[0]>=1&&t[0]<=16?d+t[0]:129===t[0]?f.OP_1NEGATE:void 0:void 0}function m(t){if(r.isBuffer(t))return t;u(s.Array,t);var e=t.reduce((function(t,e){return r.isBuffer(e)?1===e.length&&void 0!==g(e)?t+1:t+a.encodingLength(e.length)+e.length:t+1}),0),n=r.allocUnsafe(e),i=0;if(t.forEach((function(t){if(r.isBuffer(t)){var e=g(t);if(void 0!==e)return n.writeUInt8(e,i),void(i+=1);i+=a.encode(n,t.length,i),t.copy(n,i),i+=t.length}else n.writeUInt8(t,i),i+=1})),i!==n.length)throw new Error("Could not decode chunks");return n}function b(t){if(s.Array(t))return t;u(s.Buffer,t);for(var e=[],n=0;nf.OP_0&&r<=f.OP_PUSHDATA4){var i=a.decode(t,n);if(null===i)return null;if((n+=i.size)+i.number>t.length)return null;var o=t.slice(n,n+i.number);n+=i.number;var c=g(o);void 0!==c?e.push(c):e.push(o)}else e.push(r),n+=1}return e}function v(t){var e=-129&t;return e>0&&e<4}t.exports={compile:m,decompile:b,fromASM:function(t){return u(s.String,t),m(t.split(" ").map((function(t){return void 0!==f[t]?f[t]:(u(s.Hex,t),r.from(t,"hex"))})))},toASM:function(t){return r.isBuffer(t)&&(t=b(t)),t.map((function(t){if(r.isBuffer(t)){var e=g(t);if(void 0===e)return t.toString("hex");t=e}return l[t]})).join(" ")},toStack:function(t){return t=b(t),u(p,t),t.map((function(t){return r.isBuffer(t)?t:t===f.OP_0?r.allocUnsafe(0):c.encode(t-d)}))},number:n(461),signature:n(782),isCanonicalPubKey:function(t){return o.isPoint(t)},isCanonicalScriptSignature:function(t){return!!r.isBuffer(t)&&(!!v(t[t.length-1])&&i.check(t.slice(0,-1)))},isPushOnly:p,isDefinedHashType:v}},function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(e,t)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(51);function i(t,e,n){return(i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Object(r.a)(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}},function(t,e,n){"use strict";(function(e){var r=n(29),i=(n(267),n(80),n(52));function o(t,e){if(t.length!==e.length)return!1;for(var n=t.length,r=0;r>24&255),n.push(t>>16&255),n.push(t>>8&255),n.push(255&t),e.from(n)},integerFromBuffer:function(t){return i.checkArgumentType(t,"Buffer","buffer"),t[0]<<24|t[1]<<16|t[2]<<8|t[3]},integerFromSingleByteBuffer:function(t){return i.checkArgumentType(t,"Buffer","buffer"),t[0]},bufferToHex:function(t){return i.checkArgumentType(t,"Buffer","buffer"),t.toString("hex")},reverse:function(t){return e.from(t).reverse()}},t.exports.NULL_HASH=t.exports.fill(e.alloc(32),0),t.exports.EMPTY_BUFFER=e.alloc(0)}).call(this,n(29).Buffer)},function(t,e,n){"use strict";e.a={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}}},function(t,e,n){"use strict";function r(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r=0||(i[n]=t[n]);return i}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(c){return void n(c)}u.done?e(s):Promise.resolve(s).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function u(t){r(a,i,o,u,s,"next",t)}function s(t){r(a,i,o,u,s,"throw",t)}u(void 0)}))}}n.d(e,"a",(function(){return i}))},function(t){t.exports=JSON.parse('{"OP_FALSE":0,"OP_0":0,"OP_PUSHDATA1":76,"OP_PUSHDATA2":77,"OP_PUSHDATA4":78,"OP_1NEGATE":79,"OP_RESERVED":80,"OP_TRUE":81,"OP_1":81,"OP_2":82,"OP_3":83,"OP_4":84,"OP_5":85,"OP_6":86,"OP_7":87,"OP_8":88,"OP_9":89,"OP_10":90,"OP_11":91,"OP_12":92,"OP_13":93,"OP_14":94,"OP_15":95,"OP_16":96,"OP_NOP":97,"OP_VER":98,"OP_IF":99,"OP_NOTIF":100,"OP_VERIF":101,"OP_VERNOTIF":102,"OP_ELSE":103,"OP_ENDIF":104,"OP_VERIFY":105,"OP_RETURN":106,"OP_TOALTSTACK":107,"OP_FROMALTSTACK":108,"OP_2DROP":109,"OP_2DUP":110,"OP_3DUP":111,"OP_2OVER":112,"OP_2ROT":113,"OP_2SWAP":114,"OP_IFDUP":115,"OP_DEPTH":116,"OP_DROP":117,"OP_DUP":118,"OP_NIP":119,"OP_OVER":120,"OP_PICK":121,"OP_ROLL":122,"OP_ROT":123,"OP_SWAP":124,"OP_TUCK":125,"OP_CAT":126,"OP_SUBSTR":127,"OP_LEFT":128,"OP_RIGHT":129,"OP_SIZE":130,"OP_INVERT":131,"OP_AND":132,"OP_OR":133,"OP_XOR":134,"OP_EQUAL":135,"OP_EQUALVERIFY":136,"OP_RESERVED1":137,"OP_RESERVED2":138,"OP_1ADD":139,"OP_1SUB":140,"OP_2MUL":141,"OP_2DIV":142,"OP_NEGATE":143,"OP_ABS":144,"OP_NOT":145,"OP_0NOTEQUAL":146,"OP_ADD":147,"OP_SUB":148,"OP_MUL":149,"OP_DIV":150,"OP_MOD":151,"OP_LSHIFT":152,"OP_RSHIFT":153,"OP_BOOLAND":154,"OP_BOOLOR":155,"OP_NUMEQUAL":156,"OP_NUMEQUALVERIFY":157,"OP_NUMNOTEQUAL":158,"OP_LESSTHAN":159,"OP_GREATERTHAN":160,"OP_LESSTHANOREQUAL":161,"OP_GREATERTHANOREQUAL":162,"OP_MIN":163,"OP_MAX":164,"OP_WITHIN":165,"OP_RIPEMD160":166,"OP_SHA1":167,"OP_SHA256":168,"OP_HASH160":169,"OP_HASH256":170,"OP_CODESEPARATOR":171,"OP_CHECKSIG":172,"OP_CHECKSIGVERIFY":173,"OP_CHECKMULTISIG":174,"OP_CHECKMULTISIGVERIFY":175,"OP_NOP1":176,"OP_NOP2":177,"OP_CHECKLOCKTIMEVERIFY":177,"OP_NOP3":178,"OP_CHECKSEQUENCEVERIFY":178,"OP_NOP4":179,"OP_NOP5":180,"OP_NOP6":181,"OP_NOP7":182,"OP_NOP8":183,"OP_NOP9":184,"OP_NOP10":185,"OP_PUBKEYHASH":253,"OP_PUBKEY":254,"OP_INVALIDOPCODE":255}')},function(t,e,n){var r=n(437),i=n(729),o=r.COINS,a=r.ALL_CRYPTOS,u=r.CRYPTO_CURRENCIES,s=i;t.exports={COINS:o,ALL_CRYPTOS:a,CRYPTO_CURRENCIES:u,utils:s}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(523);function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Object(r.a)(t,e)}},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 u(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 s,c=[],f=!1,l=-1;function d(){f&&s&&(f=!1,s.length?c=s.concat(c):l=-1,c.length&&h())}function h(){if(!f){var t=u(d);f=!0;for(var e=c.length;e;){for(s=c,c=[];++l1)for(var n=1;n<+~=|^:(),"'`\s])/g,b="undefined"!==typeof CSS&&CSS.escape,v=function(t){return b?b(t):t.replace(m,"\\$1")},y=function(){function t(t,e,n){this.type="style",this.key=void 0,this.isProcessed=!1,this.style=void 0,this.renderer=void 0,this.renderable=void 0,this.options=void 0;var r=n.sheet,i=n.Renderer;this.key=t,this.options=n,this.style=e,r?this.renderer=r.renderer:i&&(this.renderer=new i)}return t.prototype.prop=function(t,e,n){if(void 0===e)return this.style[t];var r=!!n&&n.force;if(!r&&this.style[t]===e)return this;var i=e;n&&!1===n.process||(i=this.options.jss.plugins.onChangeValue(e,t,this));var o=null==i||!1===i,a=t in this.style;if(o&&!a&&!r)return this;var u=o&&a;if(u?delete this.style[t]:this.style[t]=i,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,t):this.renderer.setProperty(this.renderable,t,i),this;var s=this.options.sheet;return s&&s.attached,this},t}(),_=function(t){function e(e,n,r){var i;(i=t.call(this,e,n,r)||this).selectorText=void 0,i.id=void 0,i.renderable=void 0;var o=r.selector,a=r.scoped,s=r.sheet,c=r.generateId;return o?i.selectorText=o:!1!==a&&(i.id=c(Object(u.a)(Object(u.a)(i)),s),i.selectorText="."+v(i.id)),i}Object(a.a)(e,t);var n=e.prototype;return n.applyTo=function(t){var e=this.renderer;if(e){var n=this.toJSON();for(var r in n)e.setProperty(t,r,n[r])}return this},n.toJSON=function(){var t={};for(var e in this.style){var n=this.style[e];"object"!==typeof n?t[e]=n:Array.isArray(n)&&(t[e]=h(n))}return t},n.toString=function(t){var e=this.options.sheet,n=!!e&&e.options.link?Object(r.a)({},t,{allowEmpty:!0}):t;return g(this.selectorText,this.style,n)},Object(o.a)(e,[{key:"selector",set:function(t){if(t!==this.selectorText){this.selectorText=t;var e=this.renderer,n=this.renderable;if(n&&e)e.setSelector(n,t)||e.replaceRule(n,this)}},get:function(){return this.selectorText}}]),e}(y),w={onCreateRule:function(t,e,n){return"@"===t[0]||n.parent&&"keyframes"===n.parent.type?null:new _(t,e,n)}},S={indent:1,children:!0},O=/@([\w-]+)/,x=function(){function t(t,e,n){this.type="conditional",this.at=void 0,this.key=void 0,this.query=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0,this.key=t;var i=t.match(O);for(var o in this.at=i?i[1]:"unknown",this.query=n.name||"@"+this.at,this.options=n,this.rules=new G(Object(r.a)({},n,{parent:this})),e)this.rules.add(o,e[o]);this.rules.process()}var e=t.prototype;return e.getRule=function(t){return this.rules.get(t)},e.indexOf=function(t){return this.rules.indexOf(t)},e.addRule=function(t,e,n){var r=this.rules.add(t,e,n);return r?(this.options.jss.plugins.onProcessRule(r),r):null},e.toString=function(t){if(void 0===t&&(t=S),null==t.indent&&(t.indent=S.indent),null==t.children&&(t.children=S.children),!1===t.children)return this.query+" {}";var e=this.rules.toString(t);return e?this.query+" {\n"+e+"\n}":""},t}(),E=/@media|@supports\s+/,M={onCreateRule:function(t,e,n){return E.test(t)?new x(t,e,n):null}},T={indent:1,children:!0},$=/@keyframes\s+([\w-]+)/,A=function(){function t(t,e,n){this.type="keyframes",this.at="@keyframes",this.key=void 0,this.name=void 0,this.id=void 0,this.rules=void 0,this.options=void 0,this.isProcessed=!1,this.renderable=void 0;var i=t.match($);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=n;var o=n.scoped,a=n.sheet,u=n.generateId;for(var s in this.id=!1===o?this.name:v(u(this,a)),this.rules=new G(Object(r.a)({},n,{parent:this})),e)this.rules.add(s,e[s],Object(r.a)({},n,{parent:this}));this.rules.process()}return t.prototype.toString=function(t){if(void 0===t&&(t=T),null==t.indent&&(t.indent=T.indent),null==t.children&&(t.children=T.children),!1===t.children)return this.at+" "+this.id+" {}";var e=this.rules.toString(t);return e&&(e="\n"+e+"\n"),this.at+" "+this.id+" {"+e+"}"},t}(),k=/@keyframes\s+/,C=/\$([\w-]+)/g,I=function(t,e){return"string"===typeof t?t.replace(C,(function(t,n){return n in e?e[n]:t})):t},P=function(t,e,n){var r=t[e],i=I(r,n);i!==r&&(t[e]=i)},N={onCreateRule:function(t,e,n){return"string"===typeof t&&k.test(t)?new A(t,e,n):null},onProcessStyle:function(t,e,n){return"style"===e.type&&n?("animation-name"in t&&P(t,"animation-name",n.keyframes),"animation"in t&&P(t,"animation",n.keyframes),t):t},onChangeValue:function(t,e,n){var r=n.options.sheet;if(!r)return t;switch(e){case"animation":case"animation-name":return I(t,r.keyframes);default:return t}}},R=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i=this.index)e.push(t);else for(var r=0;rn)return void e.splice(r,0,t)},e.reset=function(){this.registry=[]},e.remove=function(t){var e=this.registry.indexOf(t);this.registry.splice(e,1)},e.toString=function(t){for(var e=void 0===t?{}:t,n=e.attached,r=Object(s.a)(e,["attached"]),i="",o=0;o0){var n=function(t,e){for(var n=0;ne.index&&r.options.insertionPoint===e.insertionPoint)return r}return null}(e,t);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if((n=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.attached&&r.options.insertionPoint===e.insertionPoint)return r}return null}(e,t))&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=t.insertionPoint;if(r&&"string"===typeof r){var i=function(t){for(var e=ut(),n=0;nn?n:e},dt=function(){function t(t){this.getPropertyValue=rt,this.setProperty=it,this.removeProperty=ot,this.setSelector=at,this.element=void 0,this.sheet=void 0,this.hasInsertedRules=!1,this.cssRules=[],t&&Q.add(t),this.sheet=t;var e=this.sheet?this.sheet.options:{},n=e.media,r=e.meta,i=e.element;this.element=i||function(){var t=document.createElement("style");return t.textContent="\n",t}(),this.element.setAttribute("data-jss",""),n&&this.element.setAttribute("media",n),r&&this.element.setAttribute("data-meta",r);var o=ct();o&&this.element.setAttribute("nonce",o)}var e=t.prototype;return e.attach=function(){if(!this.element.parentNode&&this.sheet){!function(t,e){var n=e.insertionPoint,r=st(e);if(!1!==r&&r.parent)r.parent.insertBefore(t,r.node);else if(n&&"number"===typeof n.nodeType){var i=n,o=i.parentNode;o&&o.insertBefore(t,i.nextSibling)}else ut().appendChild(t)}(this.element,this.sheet.options);var t=Boolean(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&t&&(this.hasInsertedRules=!1,this.deploy())}},e.detach=function(){if(this.sheet){var t=this.element.parentNode;t&&t.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent="\n")}},e.deploy=function(){var t=this.sheet;t&&(t.options.link?this.insertRules(t.rules):this.element.textContent="\n"+t.toString()+"\n")},e.insertRules=function(t,e){for(var n=0;ne.maxLength)&&((void 0===e.length||n.length===e.length)&&n.every((function(e,n){try{return d(t,e,r)}catch(i){throw s(i,n)}}))))))}return t=l(t),e=e||{},n.toJSON=function(){var n="["+o(t)+"]";return void 0!==e.length?n+="{"+e.length+"}":void 0===e.minLength&&void 0===e.maxLength||(n+="{"+(void 0===e.minLength?0:e.minLength)+","+(void 0===e.maxLength?1/0:e.maxLength)+"}"),n},n},maybe:function t(e){function n(n,r){return i.Nil(n)||e(n,r,t)}return e=l(e),n.toJSON=function(){return"?"+o(e)},n},map:function(t,e){function n(n,r){if(!i.Object(n))return!1;if(i.Nil(n))return!1;for(var o in n){try{e&&d(e,o,r)}catch(u){throw s(u,o,"key")}try{var a=n[o];d(t,a,r)}catch(u){throw s(u,o)}}return!0}return t=l(t),e&&(e=l(e)),n.toJSON=e?function(){return"{"+o(e)+": "+o(t)+"}"}:function(){return"{"+o(t)+"}"},n},object:function(t){var e={};for(var n in t)e[n]=l(t[n]);function r(t,n){if(!i.Object(t))return!1;if(i.Nil(t))return!1;var r;try{for(r in e){d(e[r],t[r],n)}}catch(o){throw s(o,r)}if(n)for(r in t)if(!e[r])throw new u(void 0,r);return!0}return r.toJSON=function(){return o(e)},r},anyOf:function(){var t=[].slice.call(arguments).map(l);function e(e,n){return t.some((function(t){try{return d(t,e,n)}catch(r){return!1}}))}return e.toJSON=function(){return t.map(o).join("|")},e},allOf:function(){var t=[].slice.call(arguments).map(l);function e(e,n){return t.every((function(t){try{return d(t,e,n)}catch(r){return!1}}))}return e.toJSON=function(){return t.map(o).join(" & ")},e},quacksLike:function(t){function e(e){return t===c(e)}return e.toJSON=function(){return t},e},tuple:function(){var t=[].slice.call(arguments).map(l);function e(e,n){return!i.Nil(e)&&(!i.Nil(e.length)&&((!n||e.length===t.length)&&t.every((function(t,r){try{return d(t,e[r],n)}catch(i){throw s(i,r)}}))))}return e.toJSON=function(){return"("+t.map(o).join(", ")+")"},e},value:function(t){function e(e){return e===t}return e.toJSON=function(){return t},e}};function l(t){if(i.String(t))return"?"===t[0]?f.maybe(t.slice(1)):i[t]||f.quacksLike(t);if(t&&i.Object(t)){if(i.Array(t)){if(1!==t.length)throw new TypeError("Expected compile() parameter of type Array of length 1");return f.arrayOf(t[0])}return f.object(t)}return i.Function(t)?t:f.value(t)}function d(t,e,n,r){if(i.Function(t)){if(t(e,n))return!0;throw new a(r||t,e)}return d(l(t),e,n)}for(var h in f.oneOf=f.anyOf,i)d[h]=i[h];for(h in f)d[h]=f[h];var p=n(780);for(h in p)d[h]=p[h];d.compile=l,d.TfTypeError=a,d.TfPropertyTypeError=u,t.exports=d},function(t,e,n){"use strict";(function(e){var r=n(112),i=n(52),o=n(48),a=function(t){for(var n=e.alloc(t.length),r=0;rt.size?n=r.trim(n,o):o0&&0===(127&t[t.length-1])&&(t.length<=1||0===(128&t[t.length-2])))throw new Error("non-minimally encoded script number");return r.fromSM(t,{endian:"little"})},r.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})},r.trim=function(t,e){return t.slice(e-t.length,t.length)},r.pad=function(t,n,r){for(var i=e.alloc(r),o=0;o=0}}},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e>>2];t.sigBytes-=e}},g=(n.BlockCipher=f.extend({cfg:f.cfg.extend({mode:h,padding:p}),reset:function(){f.reset.call(this);var t=this.cfg,e=t.iv,n=t.mode;if(this._xformMode==this._ENC_XFORM_MODE)var r=n.createEncryptor;else r=n.createDecryptor,this._minBufferSize=1;this._mode&&this._mode.__creator==r?this._mode.init(this,e&&e.words):(this._mode=r.call(n,this,e&&e.words),this._mode.__creator=r)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){t.pad(this._data,this.blockSize);var e=this._process(!0)}else e=this._process(!0),t.unpad(e);return e},blockSize:4}),n.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),m=(e.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,n=t.salt;if(n)var r=i.create([1398893684,1701076831]).concat(n).concat(e);else r=e;return r.toString(s)},parse:function(t){var e=s.parse(t),n=e.words;if(1398893684==n[0]&&1701076831==n[1]){var r=i.create(n.slice(2,4));n.splice(0,4),e.sigBytes-=16}return g.create({ciphertext:e,salt:r})}},b=n.SerializableCipher=r.extend({cfg:r.extend({format:m}),encrypt:function(t,e,n,r){r=this.cfg.extend(r);var i=t.createEncryptor(n,r),o=i.finalize(e),a=i.cfg;return g.create({ciphertext:o,key:n,iv:a.iv,algorithm:t,mode:a.mode,padding:a.padding,blockSize:t.blockSize,formatter:r.format})},decrypt:function(t,e,n,r){return r=this.cfg.extend(r),e=this._parse(e,r.format),t.createDecryptor(n,r).finalize(e.ciphertext)},_parse:function(t,e){return"string"==typeof t?e.parse(t,this):t}}),v=(e.kdf={}).OpenSSL={execute:function(t,e,n,r){r||(r=i.random(8));var o=c.create({keySize:e+n}).compute(t,r),a=i.create(o.words.slice(e),4*n);return o.sigBytes=4*e,g.create({key:o,iv:a,salt:r})}},y=n.PasswordBasedCipher=b.extend({cfg:b.cfg.extend({kdf:v}),encrypt:function(t,e,n,r){var i=(r=this.cfg.extend(r)).kdf.execute(n,t.keySize,t.ivSize);r.iv=i.iv;var o=b.encrypt.call(this,t,e,i.key,r);return o.mixIn(i),o},decrypt:function(t,e,n,r){r=this.cfg.extend(r),e=this._parse(e,r.format);var i=r.kdf.execute(n,t.keySize,t.ivSize,e.salt);return r.iv=i.iv,b.decrypt.call(this,t,e,i.key,r)}})}()))}()},function(t,e,n){"use strict";(function(e){var r=n(481),i=n(63),o=n(52),a=t.exports;a.sha1=function(t){return o.checkArgument(i.isBuffer(t)),r.createHash("sha1").update(t).digest()},a.sha1.blocksize=512,a.sha256=function(t){return o.checkArgument(i.isBuffer(t)),r.createHash("sha256").update(t).digest()},a.sha256.blocksize=512,a.sha256sha256=function(t){return o.checkArgument(i.isBuffer(t)),a.sha256(a.sha256(t))},a.ripemd160=function(t){return o.checkArgument(i.isBuffer(t)),r.createHash("ripemd160").update(t).digest()},a.sha256ripemd160=function(t){return o.checkArgument(i.isBuffer(t)),a.ripemd160(a.sha256(t))},a.sha512=function(t){return o.checkArgument(i.isBuffer(t)),r.createHash("sha512").update(t).digest()},a.sha512.blocksize=1024,a.hmac=function(t,n,r){o.checkArgument(i.isBuffer(n)),o.checkArgument(i.isBuffer(r)),o.checkArgument(t.blocksize);var a=t.blocksize/8;if(r.length>a)r=t(r);else if(r0&&void 0!==arguments[0]?arguments[0]:["all"],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.duration,u=void 0===n?o.standard:n,s=e.easing,c=void 0===s?i.easeInOut:s,f=e.delay,l=void 0===f?0:f;Object(r.a)(e,["duration","easing","delay"]);return(Array.isArray(t)?t:[t]).map((function(t){return"".concat(t," ").concat("string"===typeof u?u:a(u)," ").concat(c," ").concat("string"===typeof l?l:a(l))})).join(",")},getAutoHeightDuration:function(t){if(!t)return 0;var e=t/36;return Math.round(10*(4+15*Math.pow(e,.25)+e/5))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(526);var i=n(282),o=n(527);function a(t,e){return Object(r.a)(t)||function(t,e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}}(t,e)||Object(i.a)(t,e)||Object(o.a)()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return l})),n.d(e,"e",(function(){return d}));var r,i=n(1),o=n.n(i),a=n(31);function u(){return r||(r=o.a.createContext({})),r}var s,c=function(t){var e=t.client,n=t.children,r=u();return o.a.createElement(r.Consumer,null,(function(t){return void 0===t&&(t={}),e&&t.client!==e&&(t=Object.assign({},t,{client:e})),Object(a.b)(t.client,5),o.a.createElement(r.Provider,{value:t},n)}))};!function(t){t[t.Query=0]="Query",t[t.Mutation=1]="Mutation",t[t.Subscription=2]="Subscription"}(s||(s={}));var f=new Map;function l(t){var e;switch(t){case s.Query:e="Query";break;case s.Mutation:e="Mutation";break;case s.Subscription:e="Subscription"}return e}function d(t){var e,n,r=f.get(t);if(r)return r;Object(a.b)(!!t&&!!t.kind,1);var i=t.definitions.filter((function(t){return"FragmentDefinition"===t.kind})),o=t.definitions.filter((function(t){return"OperationDefinition"===t.kind&&"query"===t.operation})),u=t.definitions.filter((function(t){return"OperationDefinition"===t.kind&&"mutation"===t.operation})),c=t.definitions.filter((function(t){return"OperationDefinition"===t.kind&&"subscription"===t.operation}));Object(a.b)(!i.length||o.length||u.length||c.length,2),Object(a.b)(o.length+u.length+c.length<=1,3),n=o.length?s.Query:s.Mutation,o.length||u.length||(n=s.Subscription);var l=o.length?o:u.length?u:c;Object(a.b)(1===l.length,4);var d=l[0];e=d.variableDefinitions||[];var h={name:d.name&&"Name"===d.name.kind?d.name.value:"data",type:n,variables:e};return f.set(t,h),h}},function(t,e,n){"use strict";e.a=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},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";n.d(e,"a",(function(){return o}));var r=n(401),i=(n(1),n(136));function o(){return Object(r.a)()||i.a}},function(t,e,n){"use strict";var r=n(16),i=n(72),o=n(138),a=n(76),u=n(64),s=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=u.a.init,t.prototype["@@transducer/result"]=u.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.xf["@@transducer/step"](t,this.f(e))},t}(),c=Object(r.a)((function(t,e){return new s(t,e)})),f=n(85),l=n(98),d=Object(r.a)(Object(i.a)(["fantasy-land/map","map"],c,(function(t,e){switch(Object.prototype.toString.call(e)){case"[object Function]":return Object(f.a)(e.length,(function(){return t.call(this,e.apply(this,arguments))}));case"[object Object]":return Object(a.a)((function(n,r){return n[r]=t(e[r]),n}),{},Object(l.a)(e));default:return Object(o.a)(t,e)}})));e.a=d},function(t,e,n){"use strict";var r=n(32),i=n(61),o=n(289),a=!{toString:null}.propertyIsEnumerable("toString"),u=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],s=function(){return arguments.propertyIsEnumerable("length")}(),c=function(t,e){for(var n=0;n=0;)e=u[n],Object(i.a)(e,t)&&!c(r,e)&&(r[r.length]=e),n-=1;return r})):Object(r.a)((function(t){return Object(t)!==t?[]:Object.keys(t)}));e.a=f},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}));var r=n(287),i={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},o=Object.freeze({});function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i,a=void 0,c=Array.isArray(t),f=[t],l=-1,d=[],h=void 0,p=void 0,g=void 0,m=[],b=[],v=t;do{var y=++l===f.length,_=y&&0!==d.length;if(y){if(p=0===b.length?void 0:m[m.length-1],h=g,g=b.pop(),_){if(c)h=h.slice();else{for(var w={},S=0,O=Object.keys(h);S72)return!1;if(48!=t[0])return!1;if(t[1]!=t.length-2)return!1;if(2!=t[2])return!1;var e=t[3];if(0==e)return!1;if(128&t[4])return!1;if(e>t.length-7)return!1;if(e>1&&0==t[4]&&!(128&t[5]))return!1;var n=e+4;if(2!=t[n])return!1;var r=t[n+1];return 0!=r&&(!(128&t[n+2])&&(n+r+2==t.length&&!(r>1&&0==t[n+2]&&!(128&t[n+3]))))},s.prototype.hasLowS=function(){return!this.s.lt(new r(1))&&!this.s.gt(new r("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex"))},s.prototype.hasDefinedHashtype=function(){if(!u.isNaturalNumber(this.nhashtype))return!1;var t=~(s.SIGHASH_FORKID|s.SIGHASH_ANYONECANPAY)>>>0,e=this.nhashtype&t;return!(es.SIGHASH_SINGLE)},s.prototype.toTxFormat=function(t){var n=this.toDER(t),r=e.alloc(1);return r.writeUInt8(this.nhashtype,0),e.concat([n,r])},s.SIGHASH_ALL=1,s.SIGHASH_NONE=2,s.SIGHASH_SINGLE=3,s.SIGHASH_FORKID=64,s.SIGHASH_ANYONECANPAY=128,t.exports=s}).call(this,n(29).Buffer)},function(t,e,n){"use strict";(function(e){var r=n(79),i=n(186),o=n(84),a=n(80),u=n(159),s=n(48),c=n(52);function f(t,e){if(!(this instanceof f))return new f(t,e);if(c.checkArgument(t,"First argument is required, please include public key data."),t instanceof f)return t;e=e||{};var n=this._classifyArgs(t,e);return n.point.validate(),a.defineImmutable(this,{point:n.point,compressed:n.compressed,network:n.network||u.defaultNetwork}),this}f.prototype._classifyArgs=function(t,n){var r={compressed:s.isUndefined(n.compressed)||n.compressed};if(t instanceof i)r.point=t;else if(t.x&&t.y)r=f._transformObject(t);else if("string"===typeof t)r=f._transformDER(e.from(t,"hex"));else if(f._isBuffer(t))r=f._transformDER(t);else{if(!f._isPrivateKey(t))throw new TypeError("First argument is an unrecognized data format.");r=f._transformPrivateKey(t)}return r.network||(r.network=s.isUndefined(n.network)?void 0:u.get(n.network)),r},f._isPrivateKey=function(t){return t instanceof n(273)},f._isBuffer=function(t){return t instanceof e||t instanceof Uint8Array},f._transformPrivateKey=function(t){c.checkArgument(f._isPrivateKey(t),"Must be an instance of PrivateKey");var e={};return e.point=i.getG().mul(t.bn),e.compressed=t.compressed,e.network=t.network,e},f._transformDER=function(t,e){c.checkArgument(f._isBuffer(t),"Must be a hex buffer of DER encoded public key");var n,o,a,u,l={};if(e=!!s.isUndefined(e)||e,4!==t[0]&&(e||6!==t[0]&&7!==t[0]))if(3===t[0])a=t.slice(1),n=new r(a),(l=f._transformX(!0,n)).compressed=!0;else{if(2!==t[0])throw new TypeError("Invalid DER format public key");a=t.slice(1),n=new r(a),(l=f._transformX(!1,n)).compressed=!0}else{if(a=t.slice(1,33),u=t.slice(33,65),32!==a.length||32!==u.length||65!==t.length)throw new TypeError("Length of x and y must be 32 bytes");n=new r(a),o=new r(u),l.point=new i(n,o),l.compressed=!1}return l},f._transformX=function(t,e){c.checkArgument("boolean"===typeof t,"Must specify whether y is odd or not (true or false)");var n={};return n.point=i.fromX(t,e),n},f._transformObject=function(t){var e=new r(t.x,"hex"),n=new r(t.y,"hex");return new f(new i(e,n),{compressed:t.compressed})},f.fromPrivateKey=function(t){c.checkArgument(f._isPrivateKey(t),"Must be an instance of PrivateKey");var e=f._transformPrivateKey(t);return new f(e.point,{compressed:e.compressed,network:e.network})},f.fromDER=f.fromBuffer=function(t,e){c.checkArgument(f._isBuffer(t),"Must be a hex buffer of DER encoded public key");var n=f._transformDER(t,e);return new f(n.point,{compressed:n.compressed})},f.fromPoint=function(t,e){return c.checkArgument(t instanceof i,"First argument must be an instance of Point."),new f(t,{compressed:e})},f.fromString=function(t,n){var r=e.from(t,n||"hex"),i=f._transformDER(r);return new f(i.point,{compressed:i.compressed})},f.fromX=function(t,e){var n=f._transformX(t,e);return new f(n.point,{compressed:n.compressed})},f.getValidationError=function(t){var e;try{new f(t)}catch(n){e=n}return e},f.isValid=function(t){return!f.getValidationError(t)},f.prototype.toObject=f.prototype.toJSON=function(){return{x:this.point.getX().toString("hex",2),y:this.point.getY().toString("hex",2),compressed:this.compressed}},f.prototype.toBuffer=f.prototype.toDER=function(){var t,n=this.point.getX(),r=this.point.getY(),i=n.toBuffer({size:32}),o=r.toBuffer({size:32});return this.compressed?(t=o[o.length-1]%2?e.from([3]):e.from([2]),e.concat([t,i])):(t=e.from([4]),e.concat([t,i,o]))},f.prototype._getID=function(){return o.sha256ripemd160(this.toBuffer())},f.prototype.toAddress=function(t){return n(187).fromPublicKey(this,t||this.network)},f.prototype.toString=function(){return this.toDER().toString("hex")},f.prototype.inspect=function(){return""},t.exports=f}).call(this,n(29).Buffer)},function(t,e,n){var r=n(725).runInContext();t.exports=n(726)(r,r)},function(t,e,n){"use strict";t.exports=n(614)},function(t,e,n){"use strict";var r=n(164),i=n(41),o=Object(i.a)(Object(r.a)("slice",(function(t,e,n){return Array.prototype.slice.call(n,t,e)})));e.a=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1),i=n(191);function o(){return r.useContext(i.a)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(300);function i(t,e){return Object(r.a)(e,t,0)>=0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(245);var i=n(525),o=n(282);function a(t){return function(t){if(Array.isArray(t))return Object(r.a)(t)}(t)||Object(i.a)(t)||Object(o.a)(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(t,e,n){"use strict";function r(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.r(e),n.d(e,"ApolloLink",(function(){return y})),n.d(e,"concat",(function(){return v})),n.d(e,"createOperation",(function(){return d})),n.d(e,"empty",(function(){return g})),n.d(e,"execute",(function(){return _})),n.d(e,"from",(function(){return m})),n.d(e,"fromError",(function(){return l})),n.d(e,"fromPromise",(function(){return f})),n.d(e,"makePromise",(function(){return c})),n.d(e,"split",(function(){return b})),n.d(e,"toPromise",(function(){return s}));var r=n(82);n.d(e,"Observable",(function(){return r.a}));var i=n(31),o=n(14),a=n(27);n.d(e,"getOperationName",(function(){return a.n}));!function(t){function e(e,n){var r=t.call(this,e)||this;return r.link=n,r}Object(o.c)(e,t)}(Error);function u(t){return t.request.length<=1}function s(t){var e=!1;return new Promise((function(n,r){t.subscribe({next:function(t){e||(e=!0,n(t))},error:r})}))}var c=s;function f(t){return new r.a((function(e){t.then((function(t){e.next(t),e.complete()})).catch(e.error.bind(e))}))}function l(t){return new r.a((function(e){e.error(t)}))}function d(t,e){var n=Object(o.a)({},t);return Object.defineProperty(e,"setContext",{enumerable:!1,value:function(t){n="function"===typeof t?Object(o.a)({},n,t(n)):Object(o.a)({},n,t)}}),Object.defineProperty(e,"getContext",{enumerable:!1,value:function(){return Object(o.a)({},n)}}),Object.defineProperty(e,"toKey",{enumerable:!1,value:function(){return function(t){var e=t.query,n=t.variables,r=t.operationName;return JSON.stringify([r,e,n])}(e)}}),e}function h(t,e){return e?e(t):r.a.of()}function p(t){return"function"===typeof t?new y(t):t}function g(){return new y((function(){return r.a.of()}))}function m(t){return 0===t.length?g():t.map(p).reduce((function(t,e){return t.concat(e)}))}function b(t,e,n){var i=p(e),o=p(n||new y(h));return u(i)&&u(o)?new y((function(e){return t(e)?i.request(e)||r.a.of():o.request(e)||r.a.of()})):new y((function(e,n){return t(e)?i.request(e,n)||r.a.of():o.request(e,n)||r.a.of()}))}var v=function(t,e){var n=p(t);if(u(n))return n;var i=p(e);return u(i)?new y((function(t){return n.request(t,(function(t){return i.request(t)||r.a.of()}))||r.a.of()})):new y((function(t,e){return n.request(t,(function(t){return i.request(t,e)||r.a.of()}))||r.a.of()}))},y=function(){function t(t){t&&(this.request=t)}return t.prototype.split=function(e,n,r){return this.concat(b(e,n,r||new t(h)))},t.prototype.concat=function(t){return v(this,t)},t.prototype.request=function(t,e){throw new i.a(1)},t.empty=g,t.from=m,t.split=b,t.execute=_,t}();function _(t,e){return t.request(d(e.context,function(t){var e={variables:t.variables||{},extensions:t.extensions||{},operationName:t.operationName,query:t.query};return e.operationName||(e.operationName="string"!==typeof e.query?Object(a.n)(e.query):""),e}(function(t){for(var e=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(t);n=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function s(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?u-49+10:u>=17?u-17+10:u}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-u&67108863,(u+=24)>=26&&(u-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-u&67108863,(u+=24)>=26&&(u-=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=u(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=u(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,u=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 d(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,u=67108863&a,s=a/67108864|0;n.words[0]=u;for(var c=1;c>>26,l=67108863&s,d=Math.min(c,e.length-1),h=Math.max(0,c-t.length+1);h<=d;h++){var p=c-h|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[h])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,s=0|f}return 0!==s?n.words[c]=0|s: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-s.length]+s+n:s+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 d=f[t],h=l[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(t);n=(p=p.idivn(h)).isZero()?g+n:c[d-g.length]+g+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("undefined"!==typeof 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,u,s="le"===e,c=new t(o),f=this.clone();if(s){for(u=0;!f.isZero();u++)a=f.andln(255),f.iushrn(8),c[u]=a;for(;u=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,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],b=8191&m,v=m>>>13,y=0|a[3],_=8191&y,w=y>>>13,S=0|a[4],O=8191&S,x=S>>>13,E=0|a[5],M=8191&E,T=E>>>13,$=0|a[6],A=8191&$,k=$>>>13,C=0|a[7],I=8191&C,P=C>>>13,N=0|a[8],R=8191&N,j=N>>>13,D=0|a[9],L=8191&D,F=D>>>13,B=0|u[0],U=8191&B,z=B>>>13,H=0|u[1],V=8191&H,q=H>>>13,W=0|u[2],G=8191&W,K=W>>>13,Y=0|u[3],Z=8191&Y,Q=Y>>>13,X=0|u[4],J=8191&X,tt=X>>>13,et=0|u[5],nt=8191&et,rt=et>>>13,it=0|u[6],ot=8191&it,at=it>>>13,ut=0|u[7],st=8191&ut,ct=ut>>>13,ft=0|u[8],lt=8191&ft,dt=ft>>>13,ht=0|u[9],pt=8191&ht,gt=ht>>>13;n.negative=t.negative^e.negative,n.length=19;var mt=(c+(r=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(g,U)|0,o=Math.imul(g,z);var bt=(c+(r=r+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,q)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,U),i=(i=Math.imul(b,z))+Math.imul(v,U)|0,o=Math.imul(v,z),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,q)|0;var vt=(c+(r=r+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(_,U),i=(i=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,q)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,q)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,K)|0;var yt=(c+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(x,U)|0,o=Math.imul(x,z),r=r+Math.imul(_,V)|0,i=(i=i+Math.imul(_,q)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,q)|0,r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,K)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Q)|0;var _t=(c+(r=r+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(M,U),i=(i=Math.imul(M,z))+Math.imul(T,U)|0,o=Math.imul(T,z),r=r+Math.imul(O,V)|0,i=(i=i+Math.imul(O,q)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,q)|0,r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,K)|0,r=r+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;c=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(A,U),i=(i=Math.imul(A,z))+Math.imul(k,U)|0,o=Math.imul(k,z),r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,q)|0,r=r+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,K)|0,r=r+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,Q)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(g,nt)|0,o=o+Math.imul(g,rt)|0;var St=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;c=((o=o+Math.imul(d,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(P,U)|0,o=Math.imul(P,z),r=r+Math.imul(A,V)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,r=r+Math.imul(M,G)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,K)|0,r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Ot=(c+(r=r+Math.imul(l,st)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(d,st)|0))<<13)|0;c=((o=o+Math.imul(d,ct)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(R,U),i=(i=Math.imul(R,z))+Math.imul(j,U)|0,o=Math.imul(j,z),r=r+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,q)|0,r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,r=r+Math.imul(p,st)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,st)|0,o=o+Math.imul(g,ct)|0;var xt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;c=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(L,U),i=(i=Math.imul(L,z))+Math.imul(F,U)|0,o=Math.imul(F,z),r=r+Math.imul(R,V)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,q)|0,r=r+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,r=r+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Q)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(b,st)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,st)|0,o=o+Math.imul(v,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,dt)|0;var Et=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((o=o+Math.imul(d,gt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(L,V),i=(i=Math.imul(L,q))+Math.imul(F,V)|0,o=Math.imul(F,q),r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,K)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,r=r+Math.imul(_,st)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,st)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Mt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(L,G),i=(i=Math.imul(L,K))+Math.imul(F,G)|0,o=Math.imul(F,K),r=r+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Q)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(O,st)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(x,st)|0,o=o+Math.imul(x,ct)|0,r=r+Math.imul(_,lt)|0,i=(i=i+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var Tt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(L,Z),i=(i=Math.imul(L,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,r=r+Math.imul(M,st)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(T,st)|0,o=o+Math.imul(T,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var $t=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,r=Math.imul(L,J),i=(i=Math.imul(L,tt))+Math.imul(F,J)|0,o=Math.imul(F,tt),r=r+Math.imul(R,nt)|0,i=(i=i+Math.imul(R,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(A,st)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(k,st)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var At=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(L,nt),i=(i=Math.imul(L,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,r=r+Math.imul(I,st)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(P,st)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var kt=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(T,pt)|0))<<13)|0;c=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(R,st)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(j,st)|0,o=o+Math.imul(j,ct)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Ct=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(L,st),i=(i=Math.imul(L,ct))+Math.imul(F,st)|0,o=Math.imul(F,ct),r=r+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var It=(c+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(L,lt),i=(i=Math.imul(L,dt))+Math.imul(F,lt)|0,o=Math.imul(F,dt);var Pt=(c+(r=r+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Nt=(c+(r=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,s[0]=mt,s[1]=bt,s[2]=vt,s[3]=yt,s[4]=_t,s[5]=wt,s[6]=St,s[7]=Ot,s[8]=xt,s[9]=Et,s[10]=Mt,s[11]=Tt,s[12]=$t,s[13]=At,s[14]=kt,s[15]=Ct,s[16]=It,s[17]=Pt,s[18]=Nt,0!==c&&(s[19]=c,n.length++),n};function p(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(h=d),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?h(this,t,e):n<63?d(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]=u,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},g.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),u=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&u}return s&&0!==f&&(s.words[s.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)-(s/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===u)return this.strip();for(r(-1===u),u=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 u,s=r.length-i.length;if("mod"!==e){(u=new o(null)).length=s+1,u.words=new Array(u.length);for(var c=0;c=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:u||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?(u=this.neg().divmod(t,e),"mod"!==e&&(i=u.div.neg()),"div"!==e&&(a=u.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(u=this.divmod(t.neg(),e),"mod"!==e&&(i=u.div.neg()),{div:i,mod:u.mod}):0!==(this.negative&t.negative)?(u=this.neg().divmod(t.neg(),e),"div"!==e&&(a=u.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:u.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,u},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),u=new o(0),s=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 d=0,h=1;0===(e.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(u.isOdd()||s.isOdd())&&(u.iadd(f),s.isub(l)),u.iushrn(1),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(u),a.isub(s)):(n.isub(e),u.isub(i),s.isub(a))}return{a:u,b:s,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),u=new o(0),s=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(s),a.iushrn(1);for(var l=0,d=1;0===(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)u.isOdd()&&u.iadd(s),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(u)):(n.isub(e),u.isub(a))}return(i=0===e.cmpn(1)?a:u).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,u&=67108863,this.words[a]=u}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 m={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.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 O(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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.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):n.strip(),n},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.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(m[t])return m[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return m[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 u=new o(1).toRed(this),s=u.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(s);)f.redIAdd(s);for(var l=this.pow(f,i),d=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=a;0!==h.cmp(u);){for(var g=h,m=0;0!==g.cmp(u);m++)g=g.redSqr();r(m=0;r--){for(var c=e.words[r],f=s-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===++u||0===r&&0===f)&&(i=this.mul(i,n[a]),u=0,a=0)):u=0}s=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 O(t)},i(O,S),O.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},O.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},O.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)},O.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)},O.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(94)(t))},function(t,e,n){"use strict";var r=e,i=n(149),o=n(95),a=n(261);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)-s:s,o.isubn(u)):u=0,r[a]=u,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,u,s=t.andln(3)+i&3,c=e.andln(3)+o&3;3===s&&(s=-1),3===c&&(c=-1),a=0===(1&s)?0:3!==(r=t.andln(7)+i&7)&&5!==r||2!==c?s:-s,n[0].push(a),u=0===(1&c)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==s?c:-c,n[1].push(u),2*i===a+1&&(i=1-i),2*o===u+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(48);function i(t,e){return t.replace("{0}",e[0]).replace("{1}",e[1]).replace("{2}",e[2])}var o=function(t,e){var n=function(){if(r.isString(e.message))this.message=i(e.message,arguments);else{if(!r.isFunction(e.message))throw new Error("Invalid error definition for "+e.name);this.message=e.message.apply(null,arguments)}this.stack=this.message+"\n"+(new Error).stack};return(n.prototype=Object.create(t.prototype)).name=t.prototype.name+e.name,t[e.name]=n,e.errors&&a(n,e.errors),n},a=function(t,e){r.each(e,(function(e){o(t,e)}))},u={Error:function(){this.message="Internal error",this.stack=this.message+"\n"+(new Error).stack}};u.Error.prototype=Object.create(Error.prototype),u.Error.prototype.name="bitcore.Error";var s,c=n(871);s=u.Error,a(s,c),t.exports=u.Error,t.exports.extend=function(t){return o(u.Error,t)}},function(t,e,n){"use strict";var r=e,i=n(150),o=n(95),a=n(261);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)-s:s,o.isubn(u)):u=0,r[a]=u,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,u,s=t.andln(3)+i&3,c=e.andln(3)+o&3;3===s&&(s=-1),3===c&&(c=-1),a=0===(1&s)?0:3!==(r=t.andln(7)+i&7)&&5!==r||2!==c?s:-s,n[0].push(a),u=0===(1&c)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==s?c:-c,n[1].push(u),2*i===a+1&&(i=1-i),2*o===u+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=e,i=n(151),o=n(95),a=n(261);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)-s:s,o.isubn(u)):u=0,r[a]=u,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,u,s=t.andln(3)+i&3,c=e.andln(3)+o&3;3===s&&(s=-1),3===c&&(c=-1),a=0===(1&s)?0:3!==(r=t.andln(7)+i&7)&&5!==r||2!==c?s:-s,n[0].push(a),u=0===(1&c)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==s?c:-c,n[1].push(u),2*i===a+1&&(i=1-i),2*o===u+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){t.exports=n(512),t.exports.Interpreter=n(514)},function(t,e,n){"use strict";function r(t){var e=t.props,n=t.states,r=t.muiFormControl;return n.reduce((function(t,n){return t[n]=e[n],r&&"undefined"===typeof e[n]&&(t[n]=r[n]),t}),{})}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(16);function i(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}var o=n(225);var a=n(61);var u="function"===typeof Object.is?Object.is:function(t,e){return t===e?0!==t||1/t===1/e:t!==t&&e!==e},s=n(98),c=n(247);function f(t,e,n,r){var a=i(t),u=i(e);function s(t,e){return l(t,e,n.slice(),r.slice())}return!Object(o.a)((function(t,e){return!Object(o.a)(s,e,t)}),u,a)}function l(t,e,n,r){if(u(t,e))return!0;var i=Object(c.a)(t);if(i!==Object(c.a)(e))return!1;if(null==t||null==e)return!1;if("function"===typeof t["fantasy-land/equals"]||"function"===typeof e["fantasy-land/equals"])return"function"===typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e)&&"function"===typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t);if("function"===typeof t.equals||"function"===typeof e.equals)return"function"===typeof t.equals&&t.equals(e)&&"function"===typeof e.equals&&e.equals(t);switch(i){case"Arguments":case"Array":case"Object":if("function"===typeof t.constructor&&"Promise"===function(t){var e=String(t).match(/^function (\w*)/);return null==e?"":e[1]}(t.constructor))return t===e;break;case"Boolean":case"Number":case"String":if(typeof t!==typeof e||!u(t.valueOf(),e.valueOf()))return!1;break;case"Date":if(!u(t.valueOf(),e.valueOf()))return!1;break;case"Error":return t.name===e.name&&t.message===e.message;case"RegExp":if(t.source!==e.source||t.global!==e.global||t.ignoreCase!==e.ignoreCase||t.multiline!==e.multiline||t.sticky!==e.sticky||t.unicode!==e.unicode)return!1}for(var o=n.length-1;o>=0;){if(n[o]===t)return r[o]===e;o-=1}switch(i){case"Map":return t.size===e.size&&f(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&f(t.values(),e.values(),n.concat([t]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var d=Object(s.a)(t);if(d.length!==Object(s.a)(e).length)return!1;var h=n.concat([t]),p=r.concat([e]);for(o=d.length-1;o>=0;){var g=d[o];if(!Object(a.a)(g,e)||!l(e[g],t[g],h,p))return!1;o-=1}return!0}var d=Object(r.a)((function(t,e){return l(t,e,[],[])}));e.a=d},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(1),i="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function o(t){var e=r.useRef(t);return i((function(){e.current=t})),r.useCallback((function(){return e.current.apply(void 0,arguments)}),[])}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}));var r=function(t){return t.scrollTop};function i(t,e){var n=t.timeout,r=t.style,i=void 0===r?{}:r;return{duration:i.transitionDuration||"number"===typeof n?n:n[e.mode]||0,delay:i.transitionDelay}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return O})),n.d(e,"b",(function(){return A})),n.d(e,"d",(function(){return C})),n.d(e,"c",(function(){return g})),n.d(e,"f",(function(){return m})),n.d(e,"e",(function(){return p}));var r=n(4);function i(t){return"/"===t.charAt(0)}function o(t,e){for(var n=e,r=n+1,i=t.length;r=0;d--){var h=a[d];"."===h?o(a,d):".."===h?(o(a,d),l++):l&&(o(a,d),l--)}if(!c)for(;l--;l)a.unshift("..");!c||""===a[0]||a[0]&&i(a[0])||a.unshift("");var p=a.join("/");return n&&"/"!==p.substr(-1)&&(p+="/"),p};function u(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}var s=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"===typeof e||"object"===typeof n){var r=u(e),i=u(n);return r!==e||i!==n?t(r,i):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1},c=n(110);function f(t){return"/"===t.charAt(0)?t:"/"+t}function l(t){return"/"===t.charAt(0)?t.substr(1):t}function d(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function h(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function p(t){var e=t.pathname,n=t.search,r=t.hash,i=e||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function g(t,e,n,i){var o;"string"===typeof t?(o=function(t){var e=t||"/",n="",r="",i=e.indexOf("#");-1!==i&&(r=e.substr(i),e=e.substr(0,i));var o=e.indexOf("?");return-1!==o&&(n=e.substr(o),e=e.substr(0,o)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=Object(r.a)({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(u){throw u instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):u}return n&&(o.key=n),i?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=a(o.pathname,i.pathname)):o.pathname=i.pathname:o.pathname||(o.pathname="/"),o}function m(t,e){return t.pathname===e.pathname&&t.search===e.search&&t.hash===e.hash&&t.key===e.key&&s(t.state,e.state)}function b(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,i){if(null!=t){var o="function"===typeof t?t(e,n):t;"string"===typeof o?"function"===typeof r?r(o,i):i(!0):i(!1!==o)}else i(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;re?n.splice(e,n.length-e,i):n.push(i),l({action:r,location:i,index:e,entries:n})}}))},replace:function(t,e){var r="REPLACE",i=g(t,e,d(),_.location);f.confirmTransitionTo(i,r,n,(function(t){t&&(_.entries[_.index]=i,l({action:r,location:i}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(t){var e=_.index+t;return e>=0&&e<_.entries.length},block:function(t){return void 0===t&&(t=!1),f.setPrompt(t)},listen:function(t){return f.appendListener(t)}};return _}},function(t,e){t.exports={bitcoin:{messagePrefix:"\x18Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},regtest:{messagePrefix:"\x18Bitcoin Signed Message:\n",bech32:"bcrt",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239},testnet:{messagePrefix:"\x18Bitcoin Signed Message:\n",bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239}}},function(t,e,n){"use strict";function r(t){return"[object String]"===Object.prototype.toString.call(t)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(103),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},u={};function s(t){return r.isMemo(t)?a:u[t.$$typeof]||i}u[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[r.Memo]=a;var c=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;t.exports=function t(e,n,r){if("string"!==typeof n){if(p){var i=h(n);i&&i!==p&&t(e,i,r)}var a=f(n);l&&(a=a.concat(l(n)));for(var u=s(e),g=s(n),m=0;m0?1:a}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(30),i=n(25),o=n(22);function a(t,e){Object(o.a)(1,arguments);var n=e||{},a=n.locale,u=a&&a.options&&a.options.weekStartsOn,s=null==u?0:Object(r.a)(u),c=null==n.weekStartsOn?s:Object(r.a)(n.weekStartsOn);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=Object(i.a)(t),l=f.getUTCDay(),d=(l=0)return"";switch(Object.prototype.toString.call(i)){case"[object Boolean]":return"object"===typeof i?"new Boolean ("+r(i.valueOf())+")":i.toString();case"[object Number]":return"object"===typeof i?"new Number ("+r(i.valueOf())+")":1/i===-1/0?"-0":i.toString(10);case"[object String]":return"object"===typeof i?"new String ("+r(i.valueOf())+")":JSON.stringify(i);case"[object Date]":return"new Date ("+r(isNaN(i.valueOf())?NaN:i.toISOString())+")";case"[object Error]":return"new "+i.name+" ("+r(i.message)+")";case"[object Arguments]":return"function () { return arguments; } ("+Array.prototype.map.call(i,r).join(", ")+")";case"[object Array]":e.push(i);try{return"["+i.map(r).concat(Object.keys(i).sort().filter((function(t){return!/^\d+$/.test(t)})).map(n(i))).join(", ")+"]"}finally{e.pop()}case"[object Object]":e.push(i);try{return!(t in i)||null!=i.constructor&&i.constructor.prototype===i?"{"+Object.keys(i).sort().map(n(i)).join(", ")+"}":i[t]()}finally{e.pop()}default:return String(i)}}return r}))},function(t,e,n){var r,i,o;!function(a){"use strict";"object"===typeof t.exports?t.exports=a(n(198)):null!=n(148)?(i=[n(198)],void 0===(o="function"===typeof(r=a)?r.apply(e,i):r)||(t.exports=o)):self.sanctuaryTypeClasses=a(self.sanctuaryTypeIdentifiers)}((function(t){"use strict";if("undefined"!==typeof __doctest){__doctest.require("sanctuary-identity");var e=__doctest.require("./test/List"),n=__doctest.require("sanctuary-maybe");__doctest.require("sanctuary-pair"),__doctest.require("./test/Sum"),e.Nil,e.Cons,n.Nothing,n.Just}function r(t){return function(e){return t.concat(e)}}function i(t){return function(e){return t}}function o(t,e){Object.keys(t).forEach(e,t)}function a(t,e){return Object.prototype.hasOwnProperty.call(e,t)}function u(t){return t}function s(t){return function(e){return[t,e]}}function c(e,n){return typeof e===typeof n&&t(e)===t(n)}function f(t){return Object.keys(t).sort()}function l(t){return function(e){return t(e)}}function d(t){return{value:t,done:!1}}function h(t){return{value:t,done:!0}}function p(t,e,n,r){if(!(this instanceof p))return new p(t,e,n,r);this.name=t,this.url=e,this.test=function(t){return n.every((function(e){return e.test(t)}))&&r(t)}}p["@@type"]="sanctuary-type-classes/TypeClass@1";var g="Constructor",m="Value";function b(t,e,n){for(var r=n,i=0;ii)return!1;if(!X(this[r],t[r]))return tt(this[r],t[r])}},"fantasy-land/concat":Z,"fantasy-land/filter":function(t){var e={};return o(this,(function(n){t(this[n])&&(e[n]=this[n])})),e},"fantasy-land/map":function(t){var e={};return o(this,(function(n){e[n]=t(this[n])})),e},"fantasy-land/ap":function(t){var e={};return o(this,(function(n){a(n,t)&&(e[n]=t[n](this[n]))})),e},"fantasy-land/alt":Z,"fantasy-land/reduce":function(t,e){var n=this;return f(this).reduce((function(e,r){return t(e,n[r])}),e)},"fantasy-land/traverse":function(t,e){var n=this;return Object.keys(this).reduce((function(t,r){return ct((function(t){return function(e){var n={};return n[r]=e,Z.call(t,n)}}),t,e(n[r]))}),ft(t,{}))}}},Function:{"fantasy-land/id":function(){return u},"fantasy-land/of":function(t){return function(e){return t}},"fantasy-land/chainRec":function(t,e){return function(n){for(var r=d(e);!r.done;)r=t(d,h,r.value)(n);return r.value}},prototype:{"fantasy-land/equals":function(t){return t===this},"fantasy-land/compose":function(t){var e=this;return function(n){return t(e(n))}},"fantasy-land/map":function(t){var e=this;return function(n){return t(e(n))}},"fantasy-land/promap":function(t,e){var n=this;return function(r){return e(n(t(r)))}},"fantasy-land/ap":function(t){var e=this;return function(n){return t(n)(e(n))}},"fantasy-land/chain":function(t){var e=this;return function(n){return t(e(n))(n)}},"fantasy-land/extend":function(t){var e=this;return function(n){return t((function(t){return e(rt(n,t))}))}},"fantasy-land/contramap":function(t){var e=this;return function(n){return e(t(n))}}}}},X=function(){var t=[];return function(e,n){if(!c(e,n))return!1;if(t.some((function(t){return t[0]===e&&t[1]===n})))return!0;t.push([e,n]);try{return S.test(e)&&S.test(n)&&S.methods.equals(e)(n)}finally{t.pop()}}}();function J(t,e){return c(t,e)&&!tt(e,t)}var tt=function(){var t=[];return function(e,n){if(!c(e,n))return!1;if(t.some((function(t){return t[0]===e&&t[1]===n})))return X(e,n);t.push([e,n]);try{return O.test(e)&&O.test(n)&&O.methods.lte(e)(n)}finally{t.pop()}}}();function et(t,e){return tt(t,e)?t:e}function nt(t,e){return tt(t,e)?e:t}function rt(t,e){return M.methods.concat(t)(e)}function it(t){return T.methods.empty(t)()}function ot(t,e){return A.methods.filter(e)(t)}function at(t,e){return k.methods.map(e)(t)}function ut(t,e,n){return C.methods.bimap(n)(t,e)}function st(t,e){return P.methods.ap(e)(t)}function ct(t,e,n){return st(at(t,e),n)}function ft(t,e){return N.methods.of(t)(e)}function lt(t,e){return R.methods.chain(e)(t)}function dt(t,e,n){return U.methods.reduce(n)(t,e)}function ht(t,e){return Array.isArray(e)?e.some(l(t)):dt((function(e,n){return e||t(n)}),!1,e)}function pt(t,e){var n=dt((function(e,n){return e.push({idx:e.length,x:n,fx:t(n)}),e}),[],e),r=function(t){switch(typeof(t&&t.fx)){case"number":return function(t,e){return t<=e||t!==t};case"string":return function(t,e){return t<=e};default:return tt}}(n[0]);if(n.sort((function(t,e){return r(t.fx,e.fx)?r(e.fx,t.fx)?t.idx-e.idx:-1:1})),Array.isArray(e)){for(var i=0;i=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 u(t){return 1===t.length?"0"+t:t}function s(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,u){var s=0,c=e;return s+=(c=c+r>>>0)>>0)>>0)>>0},e.sum64_4_lo=function(t,e,n,r,i,o,a,u){return e+r+o+u>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,a,u,s,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,u,s,c){return e+r+o+u+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){var r=n(78),i=Math.pow(2,31)-1;function o(t){return r.String(t)&&t.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}o.toJSON=function(){return"BIP32 derivation path"};var a=r.quacksLike("Point"),u=r.compile({messagePrefix:r.oneOf(r.Buffer,r.String),bip32:{public:r.UInt32,private:r.UInt32},pubKeyHash:r.UInt8,scriptHash:r.UInt8,wif:r.UInt8}),s={BIP32Path:o,Buffer256bit:r.BufferN(32),ECPoint:a,Hash160bit:r.BufferN(20),Hash256bit:r.BufferN(32),Network:u,Satoshi:function(t){return r.UInt53(t)&&t<=21e14},UInt31:function(t){return r.UInt32(t)&&t<=i}};for(var c in r)s[c]=r[c];t.exports=s},function(t,e,n){(function(e){var r=n(102),i=n(202),o=n(814),a=o.bech32,u=o.bech32m,s=n(815),c=n(828);function f(t,e){for(var n=0;n16)return console.log("Unsupported witness version for bech32m"),!1;var o=u.fromWords(r.words.slice(1));if(o.length<2||o.length>40)return console.log("Invalid bech32m address length: ".concat(o.length)),!1;return"main"===t&&r.prefix===n.mainNetPrefix||"test"===t&&r.prefix===n.testNetPrefix},bech32Validator:l,isBech32Address:function(t,e){return l("main",t,e)||l("test",t,e)},zecBech32Validator:function(t,e,n){var r;try{r=a.decode(e)}catch(o){return console.log("Failed to decode bech32 address"),!1}var i=a.fromWords(r.words);if(43!==i.length)return console.log("Invalid bech32 address length: ".concat(i.length)),!1;return"main"===t&&r.prefix===n.mainNetPrefix||"test"===t&&r.prefix===n.testNetPrefix},xmrValidator:function(t,n,i){try{var o=c.decode(n),a=o.slice(-8),u=(d=function(t){if(t.length%2!==0)return null;for(var e=new Uint8Array(t.length/2),n=0;n>18&63)+f.charAt(i>>12&63)+f.charAt(i>>6&63)+f.charAt(63&i);return 2==o?(e=t.charCodeAt(u)<<8,n=t.charCodeAt(++u),a+=f.charAt((i=e+n)>>10)+f.charAt(i>>4&63)+f.charAt(i<<2&63)+"="):1==o&&(i=t.charCodeAt(u),a+=f.charAt(i>>2)+f.charAt(i<<4&63)+"=="),a},decode:function(t){var e=(t=String(t).replace(l,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&c("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,i=0,o="",a=-1;++a>(-2*i&6)));return o},version:"1.0.0"};void 0===(i=function(){return d}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n(94)(t),n(59))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(25),i=n(22);function o(t){Object(i.a)(1,arguments);var e=1,n=Object(r.a)(t),o=n.getUTCDay(),a=(o=0&&s===u&&c())}var M=n(196),T=n.n(M),$=(n(13),function(){function t(e){var n=e.cellCount,r=e.cellSizeGetter,o=e.estimatedCellSize;i()(this,t),m()(this,"_cellSizeAndPositionData",{}),m()(this,"_lastMeasuredIndex",-1),m()(this,"_lastBatchedIndex",-1),m()(this,"_cellCount",void 0),m()(this,"_cellSizeGetter",void 0),m()(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=n,this._estimatedCellSize=o}return a()(t,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(t){var e=t.cellCount,n=t.estimatedCellSize,r=t.cellSizeGetter;this._cellCount=e,this._estimatedCellSize=n,this._cellSizeGetter=r}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(t){if(t<0||t>=this._cellCount)throw Error("Requested index ".concat(t," is outside of range 0..").concat(this._cellCount));if(t>this._lastMeasuredIndex)for(var e=this.getSizeAndPositionOfLastMeasuredCell(),n=e.offset+e.size,r=this._lastMeasuredIndex+1;r<=t;r++){var i=this._cellSizeGetter({index:r});if(void 0===i||isNaN(i))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(i));null===i?(this._cellSizeAndPositionData[r]={offset:n,size:0},this._lastBatchedIndex=t):(this._cellSizeAndPositionData[r]={offset:n,size:i},n+=i,this._lastMeasuredIndex=t)}return this._cellSizeAndPositionData[t]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var t=this.getSizeAndPositionOfLastMeasuredCell();return t.offset+t.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(t){var e=t.align,n=void 0===e?"auto":e,r=t.containerSize,i=t.currentOffset,o=t.targetIndex;if(r<=0)return 0;var a,u=this.getSizeAndPositionOfCell(o),s=u.offset,c=s-r+u.size;switch(n){case"start":a=s;break;case"end":a=c;break;case"center":a=s-(r-u.size)/2;break;default:a=Math.max(c,Math.min(s,i))}var f=this.getTotalSize();return Math.max(0,Math.min(f-r,a))}},{key:"getVisibleCellRange",value:function(t){var e=t.containerSize,n=t.offset;if(0===this.getTotalSize())return{};var r=n+e,i=this._findNearestCell(n),o=this.getSizeAndPositionOfCell(i);n=o.offset+o.size;for(var a=i;nn&&(t=r-1)}return e>0?e-1:0}},{key:"_exponentialSearch",value:function(t,e){for(var n=1;t=t?this._binarySearch(n,0,t):this._exponentialSearch(n,t)}}]),t}()),A=function(){return"undefined"!==typeof window&&window.chrome?16777100:15e5},k=function(){function t(e){var n=e.maxScrollSize,r=void 0===n?A():n,o=T()(e,["maxScrollSize"]);i()(this,t),m()(this,"_cellSizeAndPositionManager",void 0),m()(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new $(o),this._maxScrollSize=r}return a()(t,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(t){this._cellSizeAndPositionManager.configure(t)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(t){var e=t.containerSize,n=t.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize(),o=this._getOffsetPercentage({containerSize:e,offset:n,totalSize:i});return Math.round(o*(i-r))}},{key:"getSizeAndPositionOfCell",value:function(t){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(t)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(t){var e=t.align,n=void 0===e?"auto":e,r=t.containerSize,i=t.currentOffset,o=t.targetIndex;i=this._safeOffsetToOffset({containerSize:r,offset:i});var a=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:r,currentOffset:i,targetIndex:o});return this._offsetToSafeOffset({containerSize:r,offset:a})}},{key:"getVisibleCellRange",value:function(t){var e=t.containerSize,n=t.offset;return n=this._safeOffsetToOffset({containerSize:e,offset:n}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:e,offset:n})}},{key:"resetCell",value:function(t){this._cellSizeAndPositionManager.resetCell(t)}},{key:"_getOffsetPercentage",value:function(t){var e=t.containerSize,n=t.offset,r=t.totalSize;return r<=e?0:n/(r-e)}},{key:"_offsetToSafeOffset",value:function(t){var e=t.containerSize,n=t.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();if(r===i)return n;var o=this._getOffsetPercentage({containerSize:e,offset:n,totalSize:r});return Math.round(o*(i-e))}},{key:"_safeOffsetToOffset",value:function(t){var e=t.containerSize,n=t.offset,r=this._cellSizeAndPositionManager.getTotalSize(),i=this.getTotalSize();if(r===i)return n;var o=this._getOffsetPercentage({containerSize:e,offset:n,totalSize:i});return Math.round(o*(r-e))}}]),t}();function C(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e={};return function(n){var r=n.callback,i=n.indices,o=Object.keys(i),a=!t||o.every((function(t){var e=i[t];return Array.isArray(e)?e.length>0:e>=0})),u=o.length!==Object.keys(e).length||o.some((function(t){var n=e[t],r=i[t];return Array.isArray(r)?n.join(",")!==r.join(","):n!==r}));e=i,a&&u&&r(i)}}function I(t){var e=t.cellSize,n=t.cellSizeAndPositionManager,r=t.previousCellsCount,i=t.previousCellSize,o=t.previousScrollToAlignment,a=t.previousScrollToIndex,u=t.previousSize,s=t.scrollOffset,c=t.scrollToAlignment,f=t.scrollToIndex,l=t.size,d=t.sizeJustIncreasedFromZero,h=t.updateScrollIndexCallback,p=n.getCellCount(),g=f>=0&&f0&&(ln.getTotalSize()-l&&h(p-1)}var P,N,R=!("undefined"===typeof window||!window.document||!window.document.createElement);function j(t){if((!P&&0!==P||t)&&R){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),P=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return P}var D,L,F=(N="undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).requestAnimationFrame||N.webkitRequestAnimationFrame||N.mozRequestAnimationFrame||N.oRequestAnimationFrame||N.msRequestAnimationFrame||function(t){return N.setTimeout(t,1e3/60)},B=N.cancelAnimationFrame||N.webkitCancelAnimationFrame||N.mozCancelAnimationFrame||N.oCancelAnimationFrame||N.msCancelAnimationFrame||function(t){N.clearTimeout(t)},U=F,z=B,H=function(t){return z(t.id)},V=function(t,e){var n;Promise.resolve().then((function(){n=Date.now()}));var r={id:U((function i(){Date.now()-n>=e?t.call():r.id=U(i)}))};return r};function q(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function W(t){for(var e=1;e0&&(n._initialScrollTop=n._getCalculatedScrollTop(t,n.state)),t.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(t,n.state)),n}return p()(e,t),a()(e,[{key:"getOffsetForCell",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.alignment,n=void 0===e?this.props.scrollToAlignment:e,r=t.columnIndex,i=void 0===r?this.props.scrollToColumn:r,o=t.rowIndex,a=void 0===o?this.props.scrollToRow:o,u=W({},this.props,{scrollToAlignment:n,scrollToColumn:i,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(u),scrollTop:this._getCalculatedScrollTop(u)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(t){var e=t.scrollLeft,n=void 0===e?0:e,r=t.scrollTop,i=void 0===r?0:r;if(!(i<0)){this._debounceScrollEnded();var o=this.props,a=o.autoHeight,u=o.autoWidth,s=o.height,c=o.width,f=this.state.instanceProps,l=f.scrollbarSize,d=f.rowSizeAndPositionManager.getTotalSize(),h=f.columnSizeAndPositionManager.getTotalSize(),p=Math.min(Math.max(0,h-c+l),n),g=Math.min(Math.max(0,d-s+l),i);if(this.state.scrollLeft!==p||this.state.scrollTop!==g){var m={isScrolling:!0,scrollDirectionHorizontal:p!==this.state.scrollLeft?p>this.state.scrollLeft?1:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:g!==this.state.scrollTop?g>this.state.scrollTop?1:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:G};a||(m.scrollTop=g),u||(m.scrollLeft=p),m.needToResetStyleCache=!1,this.setState(m)}this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:g,totalColumnsWidth:h,totalRowsHeight:d})}}},{key:"invalidateCellSizeAfterRender",value:function(t){var e=t.columnIndex,n=t.rowIndex;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,e):e,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var t=this.props,e=t.columnCount,n=t.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(e-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.columnIndex,n=void 0===e?0:e,r=t.rowIndex,i=void 0===r?0:r,o=this.props,a=o.scrollToColumn,u=o.scrollToRow,s=this.state.instanceProps;s.columnSizeAndPositionManager.resetCell(n),s.rowSizeAndPositionManager.resetCell(i),this._recomputeScrollLeftFlag=a>=0&&(1===this.state.scrollDirectionHorizontal?n<=a:n>=a),this._recomputeScrollTopFlag=u>=0&&(1===this.state.scrollDirectionVertical?i<=u:i>=u),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(t){var e=t.columnIndex,n=t.rowIndex,r=this.props.columnCount,i=this.props;r>1&&void 0!==e&&this._updateScrollLeftForScrollToColumn(W({},i,{scrollToColumn:e})),void 0!==n&&this._updateScrollTopForScrollToRow(W({},i,{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var t=this.props,n=t.getScrollbarSize,r=t.height,i=t.scrollLeft,o=t.scrollToColumn,a=t.scrollTop,u=t.scrollToRow,s=t.width,c=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),c.scrollbarSizeMeasured||this.setState((function(t){var e=W({},t,{needToResetStyleCache:!1});return e.instanceProps.scrollbarSize=n(),e.instanceProps.scrollbarSizeMeasured=!0,e})),"number"===typeof i&&i>=0||"number"===typeof a&&a>=0){var f=e._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:i,scrollTop:a});f&&(f.needToResetStyleCache=!1,this.setState(f))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var l=r>0&&s>0;o>=0&&l&&this._updateScrollLeftForScrollToColumn(),u>=0&&l&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:i||0,scrollTop:a||0,totalColumnsWidth:c.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:c.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(t,e){var n=this,r=this.props,i=r.autoHeight,o=r.autoWidth,a=r.columnCount,u=r.height,s=r.rowCount,c=r.scrollToAlignment,f=r.scrollToColumn,l=r.scrollToRow,d=r.width,h=this.state,p=h.scrollLeft,g=h.scrollPositionChangeReason,m=h.scrollTop,b=h.instanceProps;this._handleInvalidatedGridSize();var v=a>0&&0===t.columnCount||s>0&&0===t.rowCount;g===K&&(!o&&p>=0&&(p!==this._scrollingContainer.scrollLeft||v)&&(this._scrollingContainer.scrollLeft=p),!i&&m>=0&&(m!==this._scrollingContainer.scrollTop||v)&&(this._scrollingContainer.scrollTop=m));var y=(0===t.width||0===t.height)&&u>0&&d>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):I({cellSizeAndPositionManager:b.columnSizeAndPositionManager,previousCellsCount:t.columnCount,previousCellSize:t.columnWidth,previousScrollToAlignment:t.scrollToAlignment,previousScrollToIndex:t.scrollToColumn,previousSize:t.width,scrollOffset:p,scrollToAlignment:c,scrollToIndex:f,size:d,sizeJustIncreasedFromZero:y,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):I({cellSizeAndPositionManager:b.rowSizeAndPositionManager,previousCellsCount:t.rowCount,previousCellSize:t.rowHeight,previousScrollToAlignment:t.scrollToAlignment,previousScrollToIndex:t.scrollToRow,previousSize:t.height,scrollOffset:m,scrollToAlignment:c,scrollToIndex:l,size:u,sizeJustIncreasedFromZero:y,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),p!==e.scrollLeft||m!==e.scrollTop){var _=b.rowSizeAndPositionManager.getTotalSize(),w=b.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:m,totalColumnsWidth:w,totalRowsHeight:_})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&H(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var t=this.props,e=t.autoContainerWidth,n=t.autoHeight,r=t.autoWidth,i=t.className,o=t.containerProps,a=t.containerRole,u=t.containerStyle,s=t.height,c=t.id,f=t.noContentRenderer,l=t.role,d=t.style,h=t.tabIndex,p=t.width,g=this.state,m=g.instanceProps,v=g.needToResetStyleCache,y=this._isScrolling(),_={boxSizing:"border-box",direction:"ltr",height:n?"auto":s,position:"relative",width:r?"auto":p,WebkitOverflowScrolling:"touch",willChange:"transform"};v&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var w=m.columnSizeAndPositionManager.getTotalSize(),S=m.rowSizeAndPositionManager.getTotalSize(),E=S>s?m.scrollbarSize:0,M=w>p?m.scrollbarSize:0;M===this._horizontalScrollBarSize&&E===this._verticalScrollBarSize||(this._horizontalScrollBarSize=M,this._verticalScrollBarSize=E,this._scrollbarPresenceChanged=!0),_.overflowX=w+E<=p?"hidden":"auto",_.overflowY=S+M<=s?"hidden":"auto";var T=this._childrenToDisplay,$=0===T.length&&s>0&&p>0;return b.createElement("div",O()({ref:this._setScrollingContainerRef},o,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:Object(x.a)("ReactVirtualized__Grid",i),id:c,onScroll:this._onScroll,role:l,style:W({},_,{},d),tabIndex:h}),T.length>0&&b.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:a,style:W({width:e?"auto":w,height:S,maxWidth:w,maxHeight:S,overflow:"hidden",pointerEvents:y?"none":"",position:"relative"},u)},T),$&&f())}},{key:"_calculateChildrenToRender",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=t.cellRenderer,r=t.cellRangeRenderer,i=t.columnCount,o=t.deferredMeasurementCache,a=t.height,u=t.overscanColumnCount,s=t.overscanIndicesGetter,c=t.overscanRowCount,f=t.rowCount,l=t.width,d=t.isScrollingOptOut,h=e.scrollDirectionHorizontal,p=e.scrollDirectionVertical,g=e.instanceProps,m=this._initialScrollTop>0?this._initialScrollTop:e.scrollTop,b=this._initialScrollLeft>0?this._initialScrollLeft:e.scrollLeft,v=this._isScrolling(t,e);if(this._childrenToDisplay=[],a>0&&l>0){var y=g.columnSizeAndPositionManager.getVisibleCellRange({containerSize:l,offset:b}),_=g.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:m}),w=g.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:l,offset:b}),S=g.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:m});this._renderedColumnStartIndex=y.start,this._renderedColumnStopIndex=y.stop,this._renderedRowStartIndex=_.start,this._renderedRowStopIndex=_.stop;var O=s({direction:"horizontal",cellCount:i,overscanCellsCount:u,scrollDirection:h,startIndex:"number"===typeof y.start?y.start:0,stopIndex:"number"===typeof y.stop?y.stop:-1}),x=s({direction:"vertical",cellCount:f,overscanCellsCount:c,scrollDirection:p,startIndex:"number"===typeof _.start?_.start:0,stopIndex:"number"===typeof _.stop?_.stop:-1}),E=O.overscanStartIndex,M=O.overscanStopIndex,T=x.overscanStartIndex,$=x.overscanStopIndex;if(o){if(!o.hasFixedHeight())for(var A=T;A<=$;A++)if(!o.has(A,0)){E=0,M=i-1;break}if(!o.hasFixedWidth())for(var k=E;k<=M;k++)if(!o.has(0,k)){T=0,$=f-1;break}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:g.columnSizeAndPositionManager,columnStartIndex:E,columnStopIndex:M,deferredMeasurementCache:o,horizontalOffsetAdjustment:w,isScrolling:v,isScrollingOptOut:d,parent:this,rowSizeAndPositionManager:g.rowSizeAndPositionManager,rowStartIndex:T,rowStopIndex:$,scrollLeft:b,scrollTop:m,styleCache:this._styleCache,verticalOffsetAdjustment:S,visibleColumnIndices:y,visibleRowIndices:_}),this._columnStartIndex=E,this._columnStopIndex=M,this._rowStartIndex=T,this._rowStopIndex=$}}},{key:"_debounceScrollEnded",value:function(){var t=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&H(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=V(this._debounceScrollEndedCallback,t)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"===typeof this._deferredInvalidateColumnIndex&&"number"===typeof this._deferredInvalidateRowIndex){var t=this._deferredInvalidateColumnIndex,e=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:t,rowIndex:e})}}},{key:"_invokeOnScrollMemoizer",value:function(t){var e=this,n=t.scrollLeft,r=t.scrollTop,i=t.totalColumnsWidth,o=t.totalRowsHeight;this._onScrollMemoizer({callback:function(t){var n=t.scrollLeft,r=t.scrollTop,a=e.props,u=a.height;(0,a.onScroll)({clientHeight:u,clientWidth:a.width,scrollHeight:o,scrollLeft:n,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(t,"isScrolling")?Boolean(t.isScrolling):Boolean(e.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var t=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,t({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(t){var n=t.scrollLeft,r=t.scrollTop,i=e._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:r});i&&(i.needToResetStyleCache=!1,this.setState(i))}},{key:"_getCalculatedScrollLeft",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return e._getCalculatedScrollLeft(t,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=e._getScrollLeftForScrollToColumnStateUpdate(t,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollTop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return e._getCalculatedScrollTop(t,n)}},{key:"_resetStyleCache",value:function(){var t=this._styleCache,e=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var i=this._columnStartIndex;i<=this._columnStopIndex;i++){var o="".concat(r,"-").concat(i);this._styleCache[o]=t[o],n&&(this._cellCache[o]=e[o])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=e._getScrollTopForScrollToRowStateUpdate(t,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}}],[{key:"getDerivedStateFromProps",value:function(t,n){var r={};0===t.columnCount&&0!==n.scrollLeft||0===t.rowCount&&0!==n.scrollTop?(r.scrollLeft=0,r.scrollTop=0):(t.scrollLeft!==n.scrollLeft&&t.scrollToColumn<0||t.scrollTop!==n.scrollTop&&t.scrollToRow<0)&&Object.assign(r,e._getScrollToPositionStateUpdate({prevState:n,scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}));var i,o,a=n.instanceProps;return r.needToResetStyleCache=!1,t.columnWidth===a.prevColumnWidth&&t.rowHeight===a.prevRowHeight||(r.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:t.columnCount,estimatedCellSize:e._getEstimatedColumnSize(t),cellSizeGetter:e._wrapSizeGetter(t.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:t.rowCount,estimatedCellSize:e._getEstimatedRowSize(t),cellSizeGetter:e._wrapSizeGetter(t.rowHeight)}),0!==a.prevColumnCount&&0!==a.prevRowCount||(a.prevColumnCount=0,a.prevRowCount=0),t.autoHeight&&!1===t.isScrolling&&!0===a.prevIsScrolling&&Object.assign(r,{isScrolling:!1}),E({cellCount:a.prevColumnCount,cellSize:"number"===typeof a.prevColumnWidth?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:t,nextCellsCount:t.columnCount,nextCellSize:"number"===typeof t.columnWidth?t.columnWidth:null,nextScrollToIndex:t.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){i=e._getScrollLeftForScrollToColumnStateUpdate(t,n)}}),E({cellCount:a.prevRowCount,cellSize:"number"===typeof a.prevRowHeight?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:t,nextCellsCount:t.rowCount,nextCellSize:"number"===typeof t.rowHeight?t.rowHeight:null,nextScrollToIndex:t.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){o=e._getScrollTopForScrollToRowStateUpdate(t,n)}}),a.prevColumnCount=t.columnCount,a.prevColumnWidth=t.columnWidth,a.prevIsScrolling=!0===t.isScrolling,a.prevRowCount=t.rowCount,a.prevRowHeight=t.rowHeight,a.prevScrollToColumn=t.scrollToColumn,a.prevScrollToRow=t.scrollToRow,a.scrollbarSize=t.getScrollbarSize(),void 0===a.scrollbarSize?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,r.instanceProps=a,W({},r,{},i,{},o)}},{key:"_getEstimatedColumnSize",value:function(t){return"number"===typeof t.columnWidth?t.columnWidth:t.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(t){return"number"===typeof t.rowHeight?t.rowHeight:t.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(t){var e=t.prevState,n=t.scrollLeft,r=t.scrollTop,i={scrollPositionChangeReason:K};return"number"===typeof n&&n>=0&&(i.scrollDirectionHorizontal=n>e.scrollLeft?1:-1,i.scrollLeft=n),"number"===typeof r&&r>=0&&(i.scrollDirectionVertical=r>e.scrollTop?1:-1,i.scrollTop=r),"number"===typeof n&&n>=0&&n!==e.scrollLeft||"number"===typeof r&&r>=0&&r!==e.scrollTop?i:{}}},{key:"_wrapSizeGetter",value:function(t){return"function"===typeof t?t:function(){return t}}},{key:"_getCalculatedScrollLeft",value:function(t,e){var n=t.columnCount,r=t.height,i=t.scrollToAlignment,o=t.scrollToColumn,a=t.width,u=e.scrollLeft,s=e.instanceProps;if(n>0){var c=n-1,f=o<0?c:Math.min(c,o),l=s.rowSizeAndPositionManager.getTotalSize(),d=s.scrollbarSizeMeasured&&l>r?s.scrollbarSize:0;return s.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:a-d,currentOffset:u,targetIndex:f})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(t,n){var r=n.scrollLeft,i=e._getCalculatedScrollLeft(t,n);return"number"===typeof i&&i>=0&&r!==i?e._getScrollToPositionStateUpdate({prevState:n,scrollLeft:i,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(t,e){var n=t.height,r=t.rowCount,i=t.scrollToAlignment,o=t.scrollToRow,a=t.width,u=e.scrollTop,s=e.instanceProps;if(r>0){var c=r-1,f=o<0?c:Math.min(c,o),l=s.columnSizeAndPositionManager.getTotalSize(),d=s.scrollbarSizeMeasured&&l>a?s.scrollbarSize:0;return s.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:i,containerSize:n-d,currentOffset:u,targetIndex:f})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(t,n){var r=n.scrollTop,i=e._getCalculatedScrollTop(t,n);return"number"===typeof i&&i>=0&&r!==i?e._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:i}):{}}}]),e}(b.PureComponent),m()(D,"propTypes",null),L);m()(Y,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(t){for(var e=t.cellCache,n=t.cellRenderer,r=t.columnSizeAndPositionManager,i=t.columnStartIndex,o=t.columnStopIndex,a=t.deferredMeasurementCache,u=t.horizontalOffsetAdjustment,s=t.isScrolling,c=t.isScrollingOptOut,f=t.parent,l=t.rowSizeAndPositionManager,d=t.rowStartIndex,h=t.rowStopIndex,p=t.styleCache,g=t.verticalOffsetAdjustment,m=t.visibleColumnIndices,b=t.visibleRowIndices,v=[],y=r.areOffsetsAdjusted()||l.areOffsetsAdjusted(),_=!s&&!y,w=d;w<=h;w++)for(var S=l.getSizeAndPositionOfCell(w),O=i;O<=o;O++){var x=r.getSizeAndPositionOfCell(O),E=O>=m.start&&O<=m.stop&&w>=b.start&&w<=b.stop,M="".concat(w,"-").concat(O),T=void 0;_&&p[M]?T=p[M]:a&&!a.has(w,O)?T={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(T={height:S.size,left:x.offset+u,position:"absolute",top:S.offset+g,width:x.size},p[M]=T);var $={columnIndex:O,isScrolling:s,isVisible:E,key:M,parent:f,rowIndex:w,style:T},A=void 0;!c&&!s||u||g?A=n($):(e[M]||(e[M]=n($)),A=e[M]),null!=A&&!1!==A&&v.push(A)}return v},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:j,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(t){var e=t.cellCount,n=t.overscanCellsCount,r=t.scrollDirection,i=t.startIndex,o=t.stopIndex;return 1===r?{overscanStartIndex:Math.max(0,i),overscanStopIndex:Math.min(e-1,o+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(e-1,o)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),w(Y);var Z=Y;function Q(t){var e=t.cellCount,n=t.overscanCellsCount,r=t.scrollDirection,i=t.startIndex,o=t.stopIndex;return n=Math.max(1,n),1===r?{overscanStartIndex:Math.max(0,i-1),overscanStopIndex:Math.min(e-1,o+n)}:{overscanStartIndex:Math.max(0,i-n),overscanStopIndex:Math.min(e-1,o+1)}}var X,J;function tt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var et=(J=X=function(t){function e(){var t,n;i()(this,e);for(var r=arguments.length,o=new Array(r),a=0;a0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t),m()(this,"_cellHeightCache",{}),m()(this,"_cellWidthCache",{}),m()(this,"_columnWidthCache",{}),m()(this,"_rowHeightCache",{}),m()(this,"_defaultHeight",void 0),m()(this,"_defaultWidth",void 0),m()(this,"_minHeight",void 0),m()(this,"_minWidth",void 0),m()(this,"_keyMapper",void 0),m()(this,"_hasFixedHeight",void 0),m()(this,"_hasFixedWidth",void 0),m()(this,"_columnCount",0),m()(this,"_rowCount",0),m()(this,"columnWidth",(function(t){var n=t.index,r=e._keyMapper(0,n);return void 0!==e._columnWidthCache[r]?e._columnWidthCache[r]:e._defaultWidth})),m()(this,"rowHeight",(function(t){var n=t.index,r=e._keyMapper(n,0);return void 0!==e._rowHeightCache[r]?e._rowHeightCache[r]:e._defaultHeight}));var r=n.defaultHeight,o=n.defaultWidth,a=n.fixedHeight,u=n.fixedWidth,s=n.keyMapper,c=n.minHeight,f=n.minWidth;this._hasFixedHeight=!0===a,this._hasFixedWidth=!0===u,this._minHeight=c||0,this._minWidth=f||0,this._keyMapper=s||ht,this._defaultHeight=Math.max(this._minHeight,"number"===typeof r?r:30),this._defaultWidth=Math.max(this._minWidth,"number"===typeof o?o:100)}return a()(t,[{key:"clear",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._keyMapper(t,e);delete this._cellHeightCache[n],delete this._cellWidthCache[n],this._updateCachedColumnAndRowSizes(t,e)}},{key:"clearAll",value:function(){this._cellHeightCache={},this._cellWidthCache={},this._columnWidthCache={},this._rowHeightCache={},this._rowCount=0,this._columnCount=0}},{key:"hasFixedHeight",value:function(){return this._hasFixedHeight}},{key:"hasFixedWidth",value:function(){return this._hasFixedWidth}},{key:"getHeight",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedHeight)return this._defaultHeight;var n=this._keyMapper(t,e);return void 0!==this._cellHeightCache[n]?Math.max(this._minHeight,this._cellHeightCache[n]):this._defaultHeight}},{key:"getWidth",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this._hasFixedWidth)return this._defaultWidth;var n=this._keyMapper(t,e);return void 0!==this._cellWidthCache[n]?Math.max(this._minWidth,this._cellWidthCache[n]):this._defaultWidth}},{key:"has",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this._keyMapper(t,e);return void 0!==this._cellHeightCache[n]}},{key:"set",value:function(t,e,n,r){var i=this._keyMapper(t,e);e>=this._columnCount&&(this._columnCount=e+1),t>=this._rowCount&&(this._rowCount=t+1),this._cellHeightCache[i]=r,this._cellWidthCache[i]=n,this._updateCachedColumnAndRowSizes(t,e)}},{key:"_updateCachedColumnAndRowSizes",value:function(t,e){if(!this._hasFixedWidth){for(var n=0,r=0;r=0){var f=e.getScrollPositionForCell({align:i,cellIndex:o,height:r,scrollLeft:s,scrollTop:c,width:a});f.scrollLeft===s&&f.scrollTop===c||n._setScrollPosition(f)}})),m()(d()(n),"_onScroll",(function(t){if(t.target===n._scrollingContainer){n._enablePointerEventsAfterDelay();var e=n.props,r=e.cellLayoutManager,i=e.height,o=e.isScrollingChange,a=e.width,u=n._scrollbarSize,s=r.getTotalSize(),c=s.height,f=s.width,l=Math.max(0,Math.min(f-a+u,t.target.scrollLeft)),d=Math.max(0,Math.min(c-i+u,t.target.scrollTop));if(n.state.scrollLeft!==l||n.state.scrollTop!==d){var h=t.cancelable?mt:bt;n.state.isScrolling||o(!0),n.setState({isScrolling:!0,scrollLeft:l,scrollPositionChangeReason:h,scrollTop:d})}n._invokeOnScrollMemoizer({scrollLeft:l,scrollTop:d,totalWidth:f,totalHeight:c})}})),n._scrollbarSize=j(),void 0===n._scrollbarSize?(n._scrollbarSizeMeasured=!1,n._scrollbarSize=0):n._scrollbarSizeMeasured=!0,n}return p()(e,t),a()(e,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var t=this.props,e=t.cellLayoutManager,n=t.scrollLeft,r=t.scrollToCell,i=t.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=j(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(n>=0||i>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:i}),this._invokeOnSectionRenderedHelper();var o=e.getTotalSize(),a=o.height,u=o.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:i||0,totalHeight:a,totalWidth:u})}},{key:"componentDidUpdate",value:function(t,e){var n=this.props,r=n.height,i=n.scrollToAlignment,o=n.scrollToCell,a=n.width,u=this.state,s=u.scrollLeft,c=u.scrollPositionChangeReason,f=u.scrollTop;c===bt&&(s>=0&&s!==e.scrollLeft&&s!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=s),f>=0&&f!==e.scrollTop&&f!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=f)),r===t.height&&i===t.scrollToAlignment&&o===t.scrollToCell&&a===t.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var t=this.props,e=t.autoHeight,n=t.cellCount,r=t.cellLayoutManager,i=t.className,o=t.height,a=t.horizontalOverscanSize,u=t.id,s=t.noContentRenderer,c=t.style,f=t.verticalOverscanSize,l=t.width,d=this.state,h=d.isScrolling,p=d.scrollLeft,g=d.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var m=r.getTotalSize(),v=m.height,y=m.width,_=Math.max(0,p-a),w=Math.max(0,g-f),S=Math.min(y,p+l+a),O=Math.min(v,g+o+f),E=o>0&&l>0?r.cellRenderers({height:O-w,isScrolling:h,width:S-_,x:_,y:w}):[],M={boxSizing:"border-box",direction:"ltr",height:e?"auto":o,position:"relative",WebkitOverflowScrolling:"touch",width:l,willChange:"transform"},T=v>o?this._scrollbarSize:0,$=y>l?this._scrollbarSize:0;return M.overflowX=y+T<=l?"hidden":"auto",M.overflowY=v+$<=o?"hidden":"auto",b.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:Object(x.a)("ReactVirtualized__Collection",i),id:u,onScroll:this._onScroll,role:"grid",style:gt({},M,{},c),tabIndex:0},n>0&&b.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:v,maxHeight:v,maxWidth:y,overflow:"hidden",pointerEvents:h?"none":"",width:y}},E),0===n&&s())}},{key:"_enablePointerEventsAfterDelay",value:function(){var t=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout((function(){(0,t.props.isScrollingChange)(!1),t._disablePointerEventsTimeoutId=null,t.setState({isScrolling:!1})}),150)}},{key:"_invokeOnScrollMemoizer",value:function(t){var e=this,n=t.scrollLeft,r=t.scrollTop,i=t.totalHeight,o=t.totalWidth;this._onScrollMemoizer({callback:function(t){var n=t.scrollLeft,r=t.scrollTop,a=e.props,u=a.height;(0,a.onScroll)({clientHeight:u,clientWidth:a.width,scrollHeight:i,scrollLeft:n,scrollTop:r,scrollWidth:o})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_setScrollPosition",value:function(t){var e=t.scrollLeft,n=t.scrollTop,r={scrollPositionChangeReason:bt};e>=0&&(r.scrollLeft=e),n>=0&&(r.scrollTop=n),(e>=0&&e!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(t,e){return 0!==t.cellCount||0===e.scrollLeft&&0===e.scrollTop?t.scrollLeft!==e.scrollLeft||t.scrollTop!==e.scrollTop?{scrollLeft:null!=t.scrollLeft?t.scrollLeft:e.scrollLeft,scrollTop:null!=t.scrollTop?t.scrollTop:e.scrollTop,scrollPositionChangeReason:bt}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:bt}}}]),e}(b.PureComponent);m()(vt,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),vt.propTypes={},w(vt);var yt=vt,_t=function(){function t(e){var n=e.height,r=e.width,o=e.x,a=e.y;i()(this,t),this.height=n,this.width=r,this.x=o,this.y=a,this._indexMap={},this._indices=[]}return a()(t,[{key:"addCellIndex",value:function(t){var e=t.index;this._indexMap[e]||(this._indexMap[e]=!0,this._indices.push(e))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),t}(),wt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100;i()(this,t),this._sectionSize=e,this._cellMetadata=[],this._sections={}}return a()(t,[{key:"getCellIndices",value:function(t){var e=t.height,n=t.width,r=t.x,i=t.y,o={};return this.getSections({height:e,width:n,x:r,y:i}).forEach((function(t){return t.getCellIndices().forEach((function(t){o[t]=t}))})),Object.keys(o).map((function(t){return o[t]}))}},{key:"getCellMetadata",value:function(t){var e=t.index;return this._cellMetadata[e]}},{key:"getSections",value:function(t){for(var e=t.height,n=t.width,r=t.x,i=t.y,o=Math.floor(r/this._sectionSize),a=Math.floor((r+n-1)/this._sectionSize),u=Math.floor(i/this._sectionSize),s=Math.floor((i+e-1)/this._sectionSize),c=[],f=o;f<=a;f++)for(var l=u;l<=s;l++){var d="".concat(f,".").concat(l);this._sections[d]||(this._sections[d]=new _t({height:this._sectionSize,width:this._sectionSize,x:f*this._sectionSize,y:l*this._sectionSize})),c.push(this._sections[d])}return c}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var t=this;return Object.keys(this._sections).map((function(e){return t._sections[e].toString()}))}},{key:"registerCell",value:function(t){var e=t.cellMetadatum,n=t.index;this._cellMetadata[n]=e,this.getSections(e).forEach((function(t){return t.addCellIndex({index:n})}))}}]),t}();function St(t){var e=t.align,n=void 0===e?"auto":e,r=t.cellOffset,i=t.cellSize,o=t.containerSize,a=t.currentOffset,u=r,s=u-o+i;switch(n){case"start":return u;case"end":return s;case"center":return u-(o-i)/2;default:return Math.max(s,Math.min(u,a))}}var Ot=function(t){function e(t,n){var r;return i()(this,e),(r=s()(this,f()(e).call(this,t,n)))._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(d()(r)),r._setCollectionViewRef=r._setCollectionViewRef.bind(d()(r)),r}return p()(e,t),a()(e,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var t=O()({},this.props);return b.createElement(yt,O()({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},t))}},{key:"calculateSizeAndPositionData",value:function(){var t=this.props,e=function(t){for(var e=t.cellCount,n=t.cellSizeAndPositionGetter,r=t.sectionSize,i=[],o=new wt(r),a=0,u=0,s=0;s=0&&nn||i1&&void 0!==arguments[1]?arguments[1]:0,n="function"===typeof t.recomputeGridSize?t.recomputeGridSize:t.recomputeRowHeights;n?n.call(t,e):t.forceUpdate()}(e._registeredChild,e._lastRenderedStartIndex)}))}))}},{key:"_onRowsRendered",value:function(t){var e=t.startIndex,n=t.stopIndex;this._lastRenderedStartIndex=e,this._lastRenderedStopIndex=n,this._doStuff(e,n)}},{key:"_doStuff",value:function(t,e){var n,r=this,i=this.props,o=i.isRowLoaded,a=i.minimumBatchSize,u=i.rowCount,s=i.threshold,c=function(t){for(var e=t.isRowLoaded,n=t.minimumBatchSize,r=t.rowCount,i=t.startIndex,o=t.stopIndex,a=[],u=null,s=null,c=i;c<=o;c++){e({index:c})?null!==s&&(a.push({startIndex:u,stopIndex:s}),u=s=null):(s=c,null===u&&(u=c))}if(null!==s){for(var f=Math.min(Math.max(s,u+n-1),r-1),l=s+1;l<=f&&!e({index:l});l++)s=l;a.push({startIndex:u,stopIndex:s})}if(a.length)for(var d=a[0];d.stopIndex-d.startIndex+10;){var h=d.startIndex-1;if(e({index:h}))break;d.startIndex=h}return a}({isRowLoaded:o,minimumBatchSize:a,rowCount:u,startIndex:Math.max(0,t-s),stopIndex:Math.min(u-1,e+s)}),f=(n=[]).concat.apply(n,Mt()(c.map((function(t){return[t.startIndex,t.stopIndex]}))));this._loadMoreRowsMemoizer({callback:function(){r._loadUnloadedRanges(c)},indices:{squashedUnloadedRanges:f}})}},{key:"_registerChild",value:function(t){this._registeredChild=t}}]),e}(b.PureComponent);m()(Tt,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),Tt.propTypes={};var $t,At,kt=(At=$t=function(t){function e(){var t,n;i()(this,e);for(var r=arguments.length,o=new Array(r),a=0;a0&&void 0!==arguments[0]?arguments[0]:{},e=t.columnIndex,n=void 0===e?0:e,r=t.rowIndex,i=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:i,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:t,columnIndex:0})}},{key:"scrollToPosition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:t})}},{key:"scrollToRow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:t})}},{key:"render",value:function(){var t=this.props,e=t.className,n=t.noRowsRenderer,r=t.scrollToIndex,i=t.width,o=Object(x.a)("ReactVirtualized__List",e);return b.createElement(Z,O()({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:o,columnWidth:i,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),e}(b.PureComponent),m()($t,"propTypes",null),At);m()(kt,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:Q,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});var Ct=n(561),It=n.n(Ct);var Pt={ge:function(t,e,n,r,i){return"function"===typeof n?function(t,e,n,r,i){for(var o=n+1;e<=n;){var a=e+n>>>1;i(t[a],r)>=0?(o=a,n=a-1):e=a+1}return o}(t,void 0===r?0:0|r,void 0===i?t.length-1:0|i,e,n):function(t,e,n,r){for(var i=n+1;e<=n;){var o=e+n>>>1;t[o]>=r?(i=o,n=o-1):e=o+1}return i}(t,void 0===n?0:0|n,void 0===r?t.length-1:0|r,e)},gt:function(t,e,n,r,i){return"function"===typeof n?function(t,e,n,r,i){for(var o=n+1;e<=n;){var a=e+n>>>1;i(t[a],r)>0?(o=a,n=a-1):e=a+1}return o}(t,void 0===r?0:0|r,void 0===i?t.length-1:0|i,e,n):function(t,e,n,r){for(var i=n+1;e<=n;){var o=e+n>>>1;t[o]>r?(i=o,n=o-1):e=o+1}return i}(t,void 0===n?0:0|n,void 0===r?t.length-1:0|r,e)},lt:function(t,e,n,r,i){return"function"===typeof n?function(t,e,n,r,i){for(var o=e-1;e<=n;){var a=e+n>>>1;i(t[a],r)<0?(o=a,e=a+1):n=a-1}return o}(t,void 0===r?0:0|r,void 0===i?t.length-1:0|i,e,n):function(t,e,n,r){for(var i=e-1;e<=n;){var o=e+n>>>1;t[o]>>1;i(t[a],r)<=0?(o=a,e=a+1):n=a-1}return o}(t,void 0===r?0:0|r,void 0===i?t.length-1:0|i,e,n):function(t,e,n,r){for(var i=e-1;e<=n;){var o=e+n>>>1;t[o]<=r?(i=o,e=o+1):n=o-1}return i}(t,void 0===n?0:0|n,void 0===r?t.length-1:0|r,e)},eq:function(t,e,n,r,i){return"function"===typeof n?function(t,e,n,r,i){for(;e<=n;){var o=e+n>>>1,a=i(t[o],r);if(0===a)return o;a<=0?e=o+1:n=o-1}return-1}(t,void 0===r?0:0|r,void 0===i?t.length-1:0|i,e,n):function(t,e,n,r){for(;e<=n;){var i=e+n>>>1,o=t[i];if(o===r)return i;o<=r?e=i+1:n=i-1}return-1}(t,void 0===n?0:0|n,void 0===r?t.length-1:0|r,e)}};function Nt(t,e,n,r,i){this.mid=t,this.left=e,this.right=n,this.leftPoints=r,this.rightPoints=i,this.count=(e?e.count:0)+(n?n.count:0)+r.length}var Rt=Nt.prototype;function jt(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function Dt(t,e){var n=Wt(e);t.mid=n.mid,t.left=n.left,t.right=n.right,t.leftPoints=n.leftPoints,t.rightPoints=n.rightPoints,t.count=n.count}function Lt(t,e){var n=t.intervals([]);n.push(e),Dt(t,n)}function Ft(t,e){var n=t.intervals([]),r=n.indexOf(e);return r<0?0:(n.splice(r,1),Dt(t,n),1)}function Bt(t,e,n){for(var r=0;r=0&&t[r][1]>=e;--r){var i=n(t[r]);if(i)return i}}function zt(t,e){for(var n=0;n>1],i=[],o=[],a=[];for(n=0;n3*(e+1)?Lt(this,t):this.left.insert(t):this.left=Wt([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?Lt(this,t):this.right.insert(t):this.right=Wt([t]);else{var n=Pt.ge(this.leftPoints,t,Vt),r=Pt.ge(this.rightPoints,t,qt);this.leftPoints.splice(n,0,t),this.rightPoints.splice(r,0,t)}},Rt.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?Ft(this,t):2===(o=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===o&&(this.count-=1),o):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?Ft(this,t):2===(o=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===o&&(this.count-=1),o):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var n=this,r=this.left;r.right;)n=r,r=r.right;if(n===this)r.right=this.right;else{var i=this.left,o=this.right;n.count-=r.count,n.right=r.left,r.left=i,r.right=o}jt(this,r),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?jt(this,this.left):jt(this,this.right);return 1}for(i=Pt.ge(this.leftPoints,t,Vt);ithis.mid){var n;if(this.right)if(n=this.right.queryPoint(t,e))return n;return Ut(this.rightPoints,t,e)}return zt(this.leftPoints,e)},Rt.queryInterval=function(t,e,n){var r;if(tthis.mid&&this.right&&(r=this.right.queryInterval(t,e,n)))return r;return ethis.mid?Ut(this.rightPoints,t,n):zt(this.leftPoints,n)};var Kt=Gt.prototype;Kt.insert=function(t){this.root?this.root.insert(t):this.root=new Nt(t[0],null,null,[t],[t])},Kt.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},Kt.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},Kt.queryInterval=function(t,e,n){if(t<=e&&this.root)return this.root.queryInterval(t,e,n)},Object.defineProperty(Kt,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(Kt,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var Yt,Zt,Qt=function(){function t(){var e;i()(this,t),m()(this,"_columnSizeMap",{}),m()(this,"_intervalTree",e&&0!==e.length?new Gt(Wt(e)):new Gt(null)),m()(this,"_leftMap",{})}return a()(t,[{key:"estimateTotalHeight",value:function(t,e,n){var r=t-this.count;return this.tallestColumnSize+Math.ceil(r/e)*n}},{key:"range",value:function(t,e,n){var r=this;this._intervalTree.queryInterval(t,t+e,(function(t){var e=It()(t,3),i=e[0],o=(e[1],e[2]);return n(o,r._leftMap[o],i)}))}},{key:"setPosition",value:function(t,e,n,r){this._intervalTree.insert([n,n+r,t]),this._leftMap[t]=e;var i=this._columnSizeMap,o=i[e];i[e]=void 0===o?n+r:Math.max(o,n+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var t=this._columnSizeMap,e=0;for(var n in t){var r=t[n];e=0===e?r:Math.min(e,r)}return e}},{key:"tallestColumnSize",get:function(){var t=this._columnSizeMap,e=0;for(var n in t){var r=t[n];e=Math.max(e,r)}return e}}]),t}();function Xt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Jt(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{};i()(this,t),m()(this,"_cellMeasurerCache",void 0),m()(this,"_columnIndexOffset",void 0),m()(this,"_rowIndexOffset",void 0),m()(this,"columnWidth",(function(t){var n=t.index;e._cellMeasurerCache.columnWidth({index:n+e._columnIndexOffset})})),m()(this,"rowHeight",(function(t){var n=t.index;e._cellMeasurerCache.rowHeight({index:n+e._rowIndexOffset})}));var r=n.cellMeasurerCache,o=n.columnIndexOffset,a=void 0===o?0:o,u=n.rowIndexOffset,s=void 0===u?0:u;this._cellMeasurerCache=r,this._columnIndexOffset=a,this._rowIndexOffset=s}return a()(t,[{key:"clear",value:function(t,e){this._cellMeasurerCache.clear(t+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(t+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"getWidth",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(t+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"has",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(t+this._rowIndexOffset,e+this._columnIndexOffset)}},{key:"set",value:function(t,e,n,r){this._cellMeasurerCache.set(t+this._rowIndexOffset,e+this._columnIndexOffset,n,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),t}();function re(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ie(t){for(var e=1;e0?new ne({cellMeasurerCache:o,columnIndexOffset:0,rowIndexOffset:u}):o,r._deferredMeasurementCacheBottomRightGrid=a>0||u>0?new ne({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:u}):o,r._deferredMeasurementCacheTopRightGrid=a>0?new ne({cellMeasurerCache:o,columnIndexOffset:a,rowIndexOffset:0}):o),r}return p()(e,t),a()(e,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.columnIndex,n=void 0===e?0:e,r=t.rowIndex,i=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,i):i}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.columnIndex,n=void 0===e?0:e,r=t.rowIndex,i=void 0===r?0:r,o=this.props,a=o.fixedColumnCount,u=o.fixedRowCount,s=Math.max(0,n-a),c=Math.max(0,i-u);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:c}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:s,rowIndex:c}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:i}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:s,rowIndex:i}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var t=this.props,e=t.scrollLeft,n=t.scrollTop;if(e>0||n>0){var r={};e>0&&(r.scrollLeft=e),n>0&&(r.scrollTop=n),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var t=this.props,e=t.onScroll,n=t.onSectionRendered,r=(t.onScrollbarPresenceChange,t.scrollLeft,t.scrollToColumn),i=(t.scrollTop,t.scrollToRow),o=T()(t,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var a=this.state,u=a.scrollLeft,s=a.scrollTop;return b.createElement("div",{style:this._containerOuterStyle},b.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(o),this._renderTopRightGrid(ie({},o,{onScroll:e,scrollLeft:u}))),b.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(ie({},o,{onScroll:e,scrollTop:s})),this._renderBottomRightGrid(ie({},o,{onScroll:e,onSectionRendered:n,scrollLeft:u,scrollToColumn:r,scrollToRow:i,scrollTop:s}))))}},{key:"_getBottomGridHeight",value:function(t){return t.height-this._getTopGridHeight(t)}},{key:"_getLeftGridWidth",value:function(t){var e=t.fixedColumnCount,n=t.columnWidth;if(null==this._leftGridWidth)if("function"===typeof n){for(var r=0,i=0;i=0?t.scrollLeft:e.scrollLeft,scrollTop:null!=t.scrollTop&&t.scrollTop>=0?t.scrollTop:e.scrollTop}:null}}]),e}(b.PureComponent);m()(oe,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),oe.propTypes={},w(oe);var ae=function(t){function e(t,n){var r;return i()(this,e),(r=s()(this,f()(e).call(this,t,n))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(d()(r)),r}return p()(e,t),a()(e,[{key:"render",value:function(){var t=this.props.children,e=this.state,n=e.clientHeight,r=e.clientWidth,i=e.scrollHeight,o=e.scrollLeft,a=e.scrollTop,u=e.scrollWidth;return t({clientHeight:n,clientWidth:r,onScroll:this._onScroll,scrollHeight:i,scrollLeft:o,scrollTop:a,scrollWidth:u})}},{key:"_onScroll",value:function(t){var e=t.clientHeight,n=t.clientWidth,r=t.scrollHeight,i=t.scrollLeft,o=t.scrollTop,a=t.scrollWidth;this.setState({clientHeight:e,clientWidth:n,scrollHeight:r,scrollLeft:i,scrollTop:o,scrollWidth:a})}}]),e}(b.PureComponent);ae.propTypes={};function ue(t){var e=t.className,n=t.columns,r=t.style;return b.createElement("div",{className:e,role:"row",style:r},n)}ue.propTypes=null;var se={ASC:"ASC",DESC:"DESC"};function ce(t){var e=t.sortDirection,n=Object(x.a)("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":e===se.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":e===se.DESC});return b.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},e===se.ASC?b.createElement("path",{d:"M7 14l5-5 5 5z"}):b.createElement("path",{d:"M7 10l5 5 5-5z"}),b.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function fe(t){var e=t.dataKey,n=t.label,r=t.sortBy,i=t.sortDirection,o=r===e,a=[b.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"===typeof n?n:null},n)];return o&&a.push(b.createElement(ce,{key:"SortIndicator",sortDirection:i})),a}function le(t){var e=t.className,n=t.columns,r=t.index,i=t.key,o=t.onRowClick,a=t.onRowDoubleClick,u=t.onRowMouseOut,s=t.onRowMouseOver,c=t.onRowRightClick,f=t.rowData,l=t.style,d={"aria-rowindex":r+1};return(o||a||u||s||c)&&(d["aria-label"]="row",d.tabIndex=0,o&&(d.onClick=function(t){return o({event:t,index:r,rowData:f})}),a&&(d.onDoubleClick=function(t){return a({event:t,index:r,rowData:f})}),u&&(d.onMouseOut=function(t){return u({event:t,index:r,rowData:f})}),s&&(d.onMouseOver=function(t){return s({event:t,index:r,rowData:f})}),c&&(d.onContextMenu=function(t){return c({event:t,index:r,rowData:f})})),b.createElement("div",O()({},d,{className:e,key:i,role:"row",style:l}),n)}ce.propTypes={},fe.propTypes=null,le.propTypes=null;var de=function(t){function e(){return i()(this,e),s()(this,f()(e).apply(this,arguments))}return p()(e,t),e}(b.Component);function he(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function pe(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.columnIndex,n=void 0===e?0:e,r=t.rowIndex,i=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:i,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:t})}},{key:"scrollToPosition",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:t})}},{key:"scrollToRow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:t})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var t=Object(ft.findDOMNode)(this.Grid),e=t.clientWidth||0;return(t.offsetWidth||0)-e}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var t=this,e=this.props,n=e.children,r=e.className,i=e.disableHeader,o=e.gridClassName,a=e.gridStyle,u=e.headerHeight,s=e.headerRowRenderer,c=e.height,f=e.id,l=e.noRowsRenderer,d=e.rowClassName,h=e.rowStyle,p=e.scrollToIndex,g=e.style,m=e.width,v=this.state.scrollbarWidth,y=i?c:c-u,_="function"===typeof d?d({index:-1}):d,w="function"===typeof h?h({index:-1}):h;return this._cachedColumnStyles=[],b.Children.toArray(n).forEach((function(e,n){var r=t._getFlexStyleForColumn(e,e.props.style);t._cachedColumnStyles[n]=pe({overflow:"hidden"},r)})),b.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":b.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:Object(x.a)("ReactVirtualized__Table",r),id:f,role:"grid",style:g},!i&&s({className:Object(x.a)("ReactVirtualized__Table__headerRow",_),columns:this._getHeaderColumns(),style:pe({height:u,overflow:"hidden",paddingRight:v,width:m},w)}),b.createElement(Z,O()({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:Object(x.a)("ReactVirtualized__Table__Grid",o),cellRenderer:this._createRow,columnWidth:m,columnCount:1,height:y,id:void 0,noContentRenderer:l,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:v,scrollToRow:p,style:pe({},a,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(t){var e=t.column,n=t.columnIndex,r=t.isScrolling,i=t.parent,o=t.rowData,a=t.rowIndex,u=this.props.onColumnClick,s=e.props,c=s.cellDataGetter,f=s.cellRenderer,l=s.className,d=s.columnData,h=s.dataKey,p=s.id,g=f({cellData:c({columnData:d,dataKey:h,rowData:o}),columnData:d,columnIndex:n,dataKey:h,isScrolling:r,parent:i,rowData:o,rowIndex:a}),m=this._cachedColumnStyles[n],v="string"===typeof g?g:null;return b.createElement("div",{"aria-colindex":n+1,"aria-describedby":p,className:Object(x.a)("ReactVirtualized__Table__rowColumn",l),key:"Row"+a+"-Col"+n,onClick:function(t){u&&u({columnData:d,dataKey:h,event:t})},role:"gridcell",style:m,title:v},g)}},{key:"_createHeader",value:function(t){var e,n,r,i,o,a=t.column,u=t.index,s=this.props,c=s.headerClassName,f=s.headerStyle,l=s.onHeaderClick,d=s.sort,h=s.sortBy,p=s.sortDirection,g=a.props,m=g.columnData,v=g.dataKey,y=g.defaultSortDirection,_=g.disableSort,w=g.headerRenderer,S=g.id,O=g.label,E=!_&&d,M=Object(x.a)("ReactVirtualized__Table__headerColumn",c,a.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:E}),T=this._getFlexStyleForColumn(a,pe({},f,{},a.props.headerStyle)),$=w({columnData:m,dataKey:v,disableSort:_,label:O,sortBy:h,sortDirection:p});if(E||l){var A=h!==v?y:p===se.DESC?se.ASC:se.DESC,k=function(t){E&&d({defaultSortDirection:y,event:t,sortBy:v,sortDirection:A}),l&&l({columnData:m,dataKey:v,event:t})};o=a.props["aria-label"]||O||v,i="none",r=0,e=k,n=function(t){"Enter"!==t.key&&" "!==t.key||k(t)}}return h===v&&(i=p===se.ASC?"ascending":"descending"),b.createElement("div",{"aria-label":o,"aria-sort":i,className:M,id:S,key:"Header-Col"+u,onClick:e,onKeyDown:n,role:"columnheader",style:T,tabIndex:r},$)}},{key:"_createRow",value:function(t){var e=this,n=t.rowIndex,r=t.isScrolling,i=t.key,o=t.parent,a=t.style,u=this.props,s=u.children,c=u.onRowClick,f=u.onRowDoubleClick,l=u.onRowRightClick,d=u.onRowMouseOver,h=u.onRowMouseOut,p=u.rowClassName,g=u.rowGetter,m=u.rowRenderer,v=u.rowStyle,y=this.state.scrollbarWidth,_="function"===typeof p?p({index:n}):p,w="function"===typeof v?v({index:n}):v,S=g({index:n}),O=b.Children.toArray(s).map((function(t,i){return e._createColumn({column:t,columnIndex:i,isScrolling:r,parent:o,rowData:S,rowIndex:n,scrollbarWidth:y})})),E=Object(x.a)("ReactVirtualized__Table__row",_),M=pe({},a,{height:this._getRowHeight(n),overflow:"hidden",paddingRight:y},w);return m({className:E,columns:O,index:n,isScrolling:r,key:i,onRowClick:c,onRowDoubleClick:f,onRowRightClick:l,onRowMouseOver:d,onRowMouseOut:h,rowData:S,style:M})}},{key:"_getFlexStyleForColumn",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(t.props.flexGrow," ").concat(t.props.flexShrink," ").concat(t.props.width,"px"),r=pe({},e,{flex:n,msFlex:n,WebkitFlex:n});return t.props.maxWidth&&(r.maxWidth=t.props.maxWidth),t.props.minWidth&&(r.minWidth=t.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var t=this,e=this.props,n=e.children;return(e.disableHeader?[]:b.Children.toArray(n)).map((function(e,n){return t._createHeader({column:e,index:n})}))}},{key:"_getRowHeight",value:function(t){var e=this.props.rowHeight;return"function"===typeof e?e({index:t}):e}},{key:"_onScroll",value:function(t){var e=t.clientHeight,n=t.scrollHeight,r=t.scrollTop;(0,this.props.onScroll)({clientHeight:e,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(t){var e=t.rowOverscanStartIndex,n=t.rowOverscanStopIndex,r=t.rowStartIndex,i=t.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:e,overscanStopIndex:n,startIndex:r,stopIndex:i})}},{key:"_setRef",value:function(t){this.Grid=t}},{key:"_setScrollbarWidth",value:function(){var t=this.getScrollbarWidth();this.setState({scrollbarWidth:t})}}]),e}(b.PureComponent);m()(ge,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:Q,overscanRowCount:10,rowRenderer:le,headerRowRenderer:ue,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),ge.propTypes={};var me=[],be=null,ve=null;function ye(){ve&&(ve=null,document.body&&null!=be&&(document.body.style.pointerEvents=be),be=null)}function _e(){ye(),me.forEach((function(t){return t.__resetIsScrolling()}))}function we(t){t.currentTarget===window&&null==be&&document.body&&(be=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){ve&&H(ve);var t=0;me.forEach((function(e){t=Math.max(t,e.props.scrollingResetTimeInterval)})),ve=V(_e,t)}(),me.forEach((function(e){e.props.scrollElement===t.currentTarget&&e.__handleWindowScrollEvent()}))}function Se(t,e){me.some((function(t){return t.props.scrollElement===e}))||e.addEventListener("scroll",we),me.push(t)}function Oe(t,e){(me=me.filter((function(e){return e!==t}))).length||(e.removeEventListener("scroll",we),ve&&(H(ve),ye()))}var xe,Ee,Me=function(t){return t===window},Te=function(t){return t.getBoundingClientRect()};function $e(t,e){if(t){if(Me(t)){var n=window,r=n.innerHeight,i=n.innerWidth;return{height:"number"===typeof r?r:0,width:"number"===typeof i?i:0}}return Te(t)}return{height:e.serverHeight,width:e.serverWidth}}function Ae(t,e){if(Me(e)&&document.documentElement){var n=document.documentElement,r=Te(t),i=Te(n);return{top:r.top-i.top,left:r.left-i.left}}var o=ke(e),a=Te(t),u=Te(e);return{top:a.top+o.top-u.top,left:a.left+o.left-u.left}}function ke(t){return Me(t)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:t.scrollTop,left:t.scrollLeft}}function Ce(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ie(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,e=this.props.onResize,n=this.state,r=n.height,i=n.width,o=this._child||ft.findDOMNode(this);if(o instanceof Element&&t){var a=Ae(o,t);this._positionFromTop=a.top,this._positionFromLeft=a.left}var u=$e(t,this.props);r===u.height&&i===u.width||(this.setState({height:u.height,width:u.width}),e({height:u.height,width:u.width}))}},{key:"componentDidMount",value:function(){var t=this.props.scrollElement;this._detectElementResize=Object(it.a)(),this.updatePosition(t),t&&(Se(this,t),this._registerResizeListener(t)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(t,e){var n=this.props.scrollElement,r=t.scrollElement;r!==n&&null!=r&&null!=n&&(this.updatePosition(n),Oe(this,r),Se(this,n),this._unregisterResizeListener(r),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var t=this.props.scrollElement;t&&(Oe(this,t),this._unregisterResizeListener(t)),this._isMounted=!1}},{key:"render",value:function(){var t=this.props.children,e=this.state,n=e.isScrolling,r=e.scrollTop,i=e.scrollLeft,o=e.height,a=e.width;return t({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:o,isScrolling:n,scrollLeft:i,scrollTop:r,width:a})}}]),e}(b.PureComponent),m()(xe,"propTypes",null),Ee);m()(Ne,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:Pe(),serverHeight:0,serverWidth:0})},function(t,e,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty,a="undefined"!==typeof Element;function u(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var n,s,c,f=r(t),l=r(e);if(f&&l){if((s=t.length)!=e.length)return!1;for(n=s;0!==n--;)if(!u(t[n],e[n]))return!1;return!0}if(f!=l)return!1;var d=t instanceof Date,h=e instanceof Date;if(d!=h)return!1;if(d&&h)return t.getTime()==e.getTime();var p=t instanceof RegExp,g=e instanceof RegExp;if(p!=g)return!1;if(p&&g)return t.toString()==e.toString();var m=i(t);if((s=m.length)!==i(e).length)return!1;for(n=s;0!==n--;)if(!o.call(e,m[n]))return!1;if(a&&t instanceof Element&&e instanceof Element)return t===e;for(n=s;0!==n--;)if(("_owner"!==(c=m[n])||!t.$$typeof)&&!u(t[c],e[c]))return!1;return!0}return t!==t&&e!==e}t.exports=function(t,e){try{return u(t,e)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||-2146828260===n.number)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}}},,function(t,e,n){var r=n(414),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){(function(e){t.exports=e}).call(this,{})},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="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:n(737).Buffer}catch(E){}function u(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function s(t,e,n){var r=u(t,n);return n-1>=e&&(r|=u(t,n-1)<<4),r}function c(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?u-49+10:u>=17?u-17+10:u}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++,this.negative=1),i=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<>>26-u&67108863,(u+=24)>=26&&(u-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-u&67108863,(u+=24)>=26&&(u-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=2)i=s(t,e,r)<=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(r=(t.length-e)%2===0?e+1:e;r=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;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,u=Math.min(o,o-a)+n,s=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 f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[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];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,u=67108863&a,s=a/67108864|0;n.words[0]=u;for(var c=1;c>>26,l=67108863&s,d=Math.min(c,e.length-1),h=Math.max(0,c-t.length+1);h<=d;h++){var p=c-h|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[h])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,s=0|f}return 0!==s?n.words[c]=0|s: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?f[6-s.length]+s+n:s+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=l[t],h=d[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(t);n=(p=p.idivn(h)).isZero()?g+n:f[c-g.length]+g+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("undefined"!==typeof 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,u,s="le"===e,c=new t(o),f=this.clone();if(s){for(u=0;!f.isZero();u++)a=f.andln(255),f.iushrn(8),c[u]=a;for(;u=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,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],b=8191&m,v=m>>>13,y=0|a[3],_=8191&y,w=y>>>13,S=0|a[4],O=8191&S,x=S>>>13,E=0|a[5],M=8191&E,T=E>>>13,$=0|a[6],A=8191&$,k=$>>>13,C=0|a[7],I=8191&C,P=C>>>13,N=0|a[8],R=8191&N,j=N>>>13,D=0|a[9],L=8191&D,F=D>>>13,B=0|u[0],U=8191&B,z=B>>>13,H=0|u[1],V=8191&H,q=H>>>13,W=0|u[2],G=8191&W,K=W>>>13,Y=0|u[3],Z=8191&Y,Q=Y>>>13,X=0|u[4],J=8191&X,tt=X>>>13,et=0|u[5],nt=8191&et,rt=et>>>13,it=0|u[6],ot=8191&it,at=it>>>13,ut=0|u[7],st=8191&ut,ct=ut>>>13,ft=0|u[8],lt=8191&ft,dt=ft>>>13,ht=0|u[9],pt=8191&ht,gt=ht>>>13;n.negative=t.negative^e.negative,n.length=19;var mt=(c+(r=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(g,U)|0,o=Math.imul(g,z);var bt=(c+(r=r+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,q)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,U),i=(i=Math.imul(b,z))+Math.imul(v,U)|0,o=Math.imul(v,z),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,q)|0;var vt=(c+(r=r+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(_,U),i=(i=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,q)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,q)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,K)|0;var yt=(c+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(x,U)|0,o=Math.imul(x,z),r=r+Math.imul(_,V)|0,i=(i=i+Math.imul(_,q)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,q)|0,r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,K)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Q)|0;var _t=(c+(r=r+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(M,U),i=(i=Math.imul(M,z))+Math.imul(T,U)|0,o=Math.imul(T,z),r=r+Math.imul(O,V)|0,i=(i=i+Math.imul(O,q)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,q)|0,r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,K)|0,r=r+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;c=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(A,U),i=(i=Math.imul(A,z))+Math.imul(k,U)|0,o=Math.imul(k,z),r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,q)|0,r=r+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,K)|0,r=r+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,Q)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(g,nt)|0,o=o+Math.imul(g,rt)|0;var St=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;c=((o=o+Math.imul(d,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(P,U)|0,o=Math.imul(P,z),r=r+Math.imul(A,V)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,r=r+Math.imul(M,G)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,K)|0,r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Ot=(c+(r=r+Math.imul(l,st)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(d,st)|0))<<13)|0;c=((o=o+Math.imul(d,ct)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(R,U),i=(i=Math.imul(R,z))+Math.imul(j,U)|0,o=Math.imul(j,z),r=r+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,q)|0,r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,r=r+Math.imul(p,st)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,st)|0,o=o+Math.imul(g,ct)|0;var xt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;c=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(L,U),i=(i=Math.imul(L,z))+Math.imul(F,U)|0,o=Math.imul(F,z),r=r+Math.imul(R,V)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,q)|0,r=r+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,r=r+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Q)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(b,st)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,st)|0,o=o+Math.imul(v,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,dt)|0;var Et=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((o=o+Math.imul(d,gt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(L,V),i=(i=Math.imul(L,q))+Math.imul(F,V)|0,o=Math.imul(F,q),r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,K)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,r=r+Math.imul(_,st)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,st)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Mt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(L,G),i=(i=Math.imul(L,K))+Math.imul(F,G)|0,o=Math.imul(F,K),r=r+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Q)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(O,st)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(x,st)|0,o=o+Math.imul(x,ct)|0,r=r+Math.imul(_,lt)|0,i=(i=i+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var Tt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(L,Z),i=(i=Math.imul(L,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,r=r+Math.imul(M,st)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(T,st)|0,o=o+Math.imul(T,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var $t=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,r=Math.imul(L,J),i=(i=Math.imul(L,tt))+Math.imul(F,J)|0,o=Math.imul(F,tt),r=r+Math.imul(R,nt)|0,i=(i=i+Math.imul(R,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(A,st)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(k,st)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var At=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(L,nt),i=(i=Math.imul(L,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,r=r+Math.imul(I,st)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(P,st)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var kt=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(T,pt)|0))<<13)|0;c=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(R,st)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(j,st)|0,o=o+Math.imul(j,ct)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Ct=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(L,st),i=(i=Math.imul(L,ct))+Math.imul(F,st)|0,o=Math.imul(F,ct),r=r+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var It=(c+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(L,lt),i=(i=Math.imul(L,dt))+Math.imul(F,lt)|0,o=Math.imul(F,dt);var Pt=(c+(r=r+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Nt=(c+(r=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,s[0]=mt,s[1]=bt,s[2]=vt,s[3]=yt,s[4]=_t,s[5]=wt,s[6]=St,s[7]=Ot,s[8]=xt,s[9]=Et,s[10]=Mt,s[11]=Tt,s[12]=$t,s[13]=At,s[14]=kt,s[15]=Ct,s[16]=It,s[17]=Pt,s[18]=Nt,0!==c&&(s[19]=c,n.length++),n};function g(t,e,n){return(new m).mulp(t,e,n)}function m(t,e){this.x=t,this.y=e}Math.imul||(p=h),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?p(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]=u,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):g(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),u=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&u}return s&&0!==f&&(s.words[s.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)-(s/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===u)return this.strip();for(r(-1===u),u=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 u,s=r.length-i.length;if("mod"!==e){(u=new o(null)).length=s+1,u.words=new Array(u.length);for(var c=0;c=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:u||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?(u=this.neg().divmod(t,e),"mod"!==e&&(i=u.div.neg()),"div"!==e&&(a=u.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(u=this.divmod(t.neg(),e),"mod"!==e&&(i=u.div.neg()),{div:i,mod:u.mod}):0!==(this.negative&t.negative)?(u=this.neg().divmod(t.neg(),e),"div"!==e&&(a=u.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:u.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,u},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),u=new o(0),s=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 d=0,h=1;0===(e.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(u.isOdd()||s.isOdd())&&(u.iadd(f),s.isub(l)),u.iushrn(1),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(u),a.isub(s)):(n.isub(e),u.isub(i),s.isub(a))}return{a:u,b:s,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),u=new o(0),s=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(s),a.iushrn(1);for(var l=0,d=1;0===(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)u.isOdd()&&u.iadd(s),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(u)):(n.isub(e),u.isub(a))}return(i=0===e.cmpn(1)?a:u).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,u&=67108863,this.words[a]=u}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 O(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 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 _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function O(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){O.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=4194303,r=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&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(b[t])return b[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new _;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return b[t]=e,e},O.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},O.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")},O.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},O.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},O.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)},O.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},O.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)},O.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},O.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},O.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},O.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},O.prototype.isqr=function(t){return this.imul(t,t.clone())},O.prototype.sqr=function(t){return this.mul(t,t)},O.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 u=new o(1).toRed(this),s=u.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(s);)f.redIAdd(s);for(var l=this.pow(f,i),d=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=a;0!==h.cmp(u);){for(var g=h,m=0;0!==g.cmp(u);m++)g=g.redSqr();r(m=0;r--){for(var c=e.words[r],f=s-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===++u||0===r&&0===f)&&(i=this.mul(i,n[a]),u=0,a=0)):u=0}s=26}return i},O.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},O.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,O),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(94)(t))},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(897).Buffer}catch(x){}function u(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 s(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?u-49+10:u>=17?u-17+10:u}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-u&67108863,(u+=24)>=26&&(u-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-u&67108863,(u+=24)>=26&&(u-=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=u(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=u(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,u=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 d(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,u=67108863&a,s=a/67108864|0;n.words[0]=u;for(var c=1;c>>26,l=67108863&s,d=Math.min(c,e.length-1),h=Math.max(0,c-t.length+1);h<=d;h++){var p=c-h|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[h])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,s=0|f}return 0!==s?n.words[c]=0|s: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-s.length]+s+n:s+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 d=f[t],h=l[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(t);n=(p=p.idivn(h)).isZero()?g+n:c[d-g.length]+g+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("undefined"!==typeof 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,u,s="le"===e,c=new t(o),f=this.clone();if(s){for(u=0;!f.isZero();u++)a=f.andln(255),f.iushrn(8),c[u]=a;for(;u=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,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],b=8191&m,v=m>>>13,y=0|a[3],_=8191&y,w=y>>>13,S=0|a[4],O=8191&S,x=S>>>13,E=0|a[5],M=8191&E,T=E>>>13,$=0|a[6],A=8191&$,k=$>>>13,C=0|a[7],I=8191&C,P=C>>>13,N=0|a[8],R=8191&N,j=N>>>13,D=0|a[9],L=8191&D,F=D>>>13,B=0|u[0],U=8191&B,z=B>>>13,H=0|u[1],V=8191&H,q=H>>>13,W=0|u[2],G=8191&W,K=W>>>13,Y=0|u[3],Z=8191&Y,Q=Y>>>13,X=0|u[4],J=8191&X,tt=X>>>13,et=0|u[5],nt=8191&et,rt=et>>>13,it=0|u[6],ot=8191&it,at=it>>>13,ut=0|u[7],st=8191&ut,ct=ut>>>13,ft=0|u[8],lt=8191&ft,dt=ft>>>13,ht=0|u[9],pt=8191&ht,gt=ht>>>13;n.negative=t.negative^e.negative,n.length=19;var mt=(c+(r=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(g,U)|0,o=Math.imul(g,z);var bt=(c+(r=r+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,q)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,U),i=(i=Math.imul(b,z))+Math.imul(v,U)|0,o=Math.imul(v,z),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,q)|0;var vt=(c+(r=r+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(_,U),i=(i=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,q)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,q)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,K)|0;var yt=(c+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(x,U)|0,o=Math.imul(x,z),r=r+Math.imul(_,V)|0,i=(i=i+Math.imul(_,q)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,q)|0,r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,K)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Q)|0;var _t=(c+(r=r+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(M,U),i=(i=Math.imul(M,z))+Math.imul(T,U)|0,o=Math.imul(T,z),r=r+Math.imul(O,V)|0,i=(i=i+Math.imul(O,q)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,q)|0,r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,K)|0,r=r+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;c=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(A,U),i=(i=Math.imul(A,z))+Math.imul(k,U)|0,o=Math.imul(k,z),r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,q)|0,r=r+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,K)|0,r=r+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,Q)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(g,nt)|0,o=o+Math.imul(g,rt)|0;var St=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;c=((o=o+Math.imul(d,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(P,U)|0,o=Math.imul(P,z),r=r+Math.imul(A,V)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,r=r+Math.imul(M,G)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,K)|0,r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Ot=(c+(r=r+Math.imul(l,st)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(d,st)|0))<<13)|0;c=((o=o+Math.imul(d,ct)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(R,U),i=(i=Math.imul(R,z))+Math.imul(j,U)|0,o=Math.imul(j,z),r=r+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,q)|0,r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,r=r+Math.imul(p,st)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,st)|0,o=o+Math.imul(g,ct)|0;var xt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;c=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(L,U),i=(i=Math.imul(L,z))+Math.imul(F,U)|0,o=Math.imul(F,z),r=r+Math.imul(R,V)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,q)|0,r=r+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,r=r+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Q)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(b,st)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,st)|0,o=o+Math.imul(v,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,dt)|0;var Et=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((o=o+Math.imul(d,gt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(L,V),i=(i=Math.imul(L,q))+Math.imul(F,V)|0,o=Math.imul(F,q),r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,K)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,r=r+Math.imul(_,st)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,st)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Mt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(L,G),i=(i=Math.imul(L,K))+Math.imul(F,G)|0,o=Math.imul(F,K),r=r+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Q)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(O,st)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(x,st)|0,o=o+Math.imul(x,ct)|0,r=r+Math.imul(_,lt)|0,i=(i=i+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var Tt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(L,Z),i=(i=Math.imul(L,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,r=r+Math.imul(M,st)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(T,st)|0,o=o+Math.imul(T,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var $t=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,r=Math.imul(L,J),i=(i=Math.imul(L,tt))+Math.imul(F,J)|0,o=Math.imul(F,tt),r=r+Math.imul(R,nt)|0,i=(i=i+Math.imul(R,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(A,st)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(k,st)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var At=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(L,nt),i=(i=Math.imul(L,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,r=r+Math.imul(I,st)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(P,st)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var kt=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(T,pt)|0))<<13)|0;c=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(R,st)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(j,st)|0,o=o+Math.imul(j,ct)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Ct=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(L,st),i=(i=Math.imul(L,ct))+Math.imul(F,st)|0,o=Math.imul(F,ct),r=r+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var It=(c+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(L,lt),i=(i=Math.imul(L,dt))+Math.imul(F,lt)|0,o=Math.imul(F,dt);var Pt=(c+(r=r+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Nt=(c+(r=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,s[0]=mt,s[1]=bt,s[2]=vt,s[3]=yt,s[4]=_t,s[5]=wt,s[6]=St,s[7]=Ot,s[8]=xt,s[9]=Et,s[10]=Mt,s[11]=Tt,s[12]=$t,s[13]=At,s[14]=kt,s[15]=Ct,s[16]=It,s[17]=Pt,s[18]=Nt,0!==c&&(s[19]=c,n.length++),n};function p(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(h=d),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?h(this,t,e):n<63?d(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]=u,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},g.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),u=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&u}return s&&0!==f&&(s.words[s.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)-(s/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===u)return this.strip();for(r(-1===u),u=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 u,s=r.length-i.length;if("mod"!==e){(u=new o(null)).length=s+1,u.words=new Array(u.length);for(var c=0;c=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:u||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?(u=this.neg().divmod(t,e),"mod"!==e&&(i=u.div.neg()),"div"!==e&&(a=u.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(u=this.divmod(t.neg(),e),"mod"!==e&&(i=u.div.neg()),{div:i,mod:u.mod}):0!==(this.negative&t.negative)?(u=this.neg().divmod(t.neg(),e),"div"!==e&&(a=u.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:u.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,u},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),u=new o(0),s=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 d=0,h=1;0===(e.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(u.isOdd()||s.isOdd())&&(u.iadd(f),s.isub(l)),u.iushrn(1),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(u),a.isub(s)):(n.isub(e),u.isub(i),s.isub(a))}return{a:u,b:s,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),u=new o(0),s=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(s),a.iushrn(1);for(var l=0,d=1;0===(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)u.isOdd()&&u.iadd(s),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(u)):(n.isub(e),u.isub(a))}return(i=0===e.cmpn(1)?a:u).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,u&=67108863,this.words[a]=u}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 m={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.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 O(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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.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},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.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(m[t])return m[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return m[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 u=new o(1).toRed(this),s=u.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(s);)f.redIAdd(s);for(var l=this.pow(f,i),d=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=a;0!==h.cmp(u);){for(var g=h,m=0;0!==g.cmp(u);m++)g=g.redSqr();r(m=0;r--){for(var c=e.words[r],f=s-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===++u||0===r&&0===f)&&(i=this.mul(i,n[a]),u=0,a=0)):u=0}s=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 O(t)},i(O,S),O.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},O.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},O.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)},O.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)},O.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(94)(t))},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(922).Buffer}catch(x){}function u(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 s(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a=49?u-49+10:u>=17?u-17+10:u}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-u&67108863,(u+=24)>=26&&(u-=26,o++);else if("le"===n)for(i=0,o=0;i>>26-u&67108863,(u+=24)>=26&&(u-=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=u(t,n,n+6),this.words[r]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=u(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,u=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 d(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,u=67108863&a,s=a/67108864|0;n.words[0]=u;for(var c=1;c>>26,l=67108863&s,d=Math.min(c,e.length-1),h=Math.max(0,c-t.length+1);h<=d;h++){var p=c-h|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[h])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,s=0|f}return 0!==s?n.words[c]=0|s: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-s.length]+s+n:s+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 d=f[t],h=l[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(h).toString(t);n=(p=p.idivn(h)).isZero()?g+n:c[d-g.length]+g+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("undefined"!==typeof 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,u,s="le"===e,c=new t(o),f=this.clone();if(s){for(u=0;!f.isZero();u++)a=f.andln(255),f.iushrn(8),c[u]=a;for(;u=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,h=0|a[1],p=8191&h,g=h>>>13,m=0|a[2],b=8191&m,v=m>>>13,y=0|a[3],_=8191&y,w=y>>>13,S=0|a[4],O=8191&S,x=S>>>13,E=0|a[5],M=8191&E,T=E>>>13,$=0|a[6],A=8191&$,k=$>>>13,C=0|a[7],I=8191&C,P=C>>>13,N=0|a[8],R=8191&N,j=N>>>13,D=0|a[9],L=8191&D,F=D>>>13,B=0|u[0],U=8191&B,z=B>>>13,H=0|u[1],V=8191&H,q=H>>>13,W=0|u[2],G=8191&W,K=W>>>13,Y=0|u[3],Z=8191&Y,Q=Y>>>13,X=0|u[4],J=8191&X,tt=X>>>13,et=0|u[5],nt=8191&et,rt=et>>>13,it=0|u[6],ot=8191&it,at=it>>>13,ut=0|u[7],st=8191&ut,ct=ut>>>13,ft=0|u[8],lt=8191&ft,dt=ft>>>13,ht=0|u[9],pt=8191&ht,gt=ht>>>13;n.negative=t.negative^e.negative,n.length=19;var mt=(c+(r=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(d,U)|0))<<13)|0;c=((o=Math.imul(d,z))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(g,U)|0,o=Math.imul(g,z);var bt=(c+(r=r+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,q)|0)+Math.imul(d,V)|0))<<13)|0;c=((o=o+Math.imul(d,q)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,U),i=(i=Math.imul(b,z))+Math.imul(v,U)|0,o=Math.imul(v,z),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,q)|0;var vt=(c+(r=r+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(d,G)|0))<<13)|0;c=((o=o+Math.imul(d,K)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(_,U),i=(i=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,q)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,q)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,K)|0;var yt=(c+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,Q)|0)+Math.imul(d,Z)|0))<<13)|0;c=((o=o+Math.imul(d,Q)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(x,U)|0,o=Math.imul(x,z),r=r+Math.imul(_,V)|0,i=(i=i+Math.imul(_,q)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,q)|0,r=r+Math.imul(b,G)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(v,G)|0,o=o+Math.imul(v,K)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,Q)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,Q)|0;var _t=(c+(r=r+Math.imul(l,J)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(d,J)|0))<<13)|0;c=((o=o+Math.imul(d,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(M,U),i=(i=Math.imul(M,z))+Math.imul(T,U)|0,o=Math.imul(T,z),r=r+Math.imul(O,V)|0,i=(i=i+Math.imul(O,q)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,q)|0,r=r+Math.imul(_,G)|0,i=(i=i+Math.imul(_,K)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,K)|0,r=r+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,Q)|0,r=r+Math.imul(p,J)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(d,nt)|0))<<13)|0;c=((o=o+Math.imul(d,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(A,U),i=(i=Math.imul(A,z))+Math.imul(k,U)|0,o=Math.imul(k,z),r=r+Math.imul(M,V)|0,i=(i=i+Math.imul(M,q)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,q)|0,r=r+Math.imul(O,G)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(x,G)|0,o=o+Math.imul(x,K)|0,r=r+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,Q)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,Q)|0,r=r+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(g,nt)|0,o=o+Math.imul(g,rt)|0;var St=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(d,ot)|0))<<13)|0;c=((o=o+Math.imul(d,at)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(I,U),i=(i=Math.imul(I,z))+Math.imul(P,U)|0,o=Math.imul(P,z),r=r+Math.imul(A,V)|0,i=(i=i+Math.imul(A,q)|0)+Math.imul(k,V)|0,o=o+Math.imul(k,q)|0,r=r+Math.imul(M,G)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(T,G)|0,o=o+Math.imul(T,K)|0,r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,Q)|0)+Math.imul(x,Z)|0,o=o+Math.imul(x,Q)|0,r=r+Math.imul(_,J)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,J)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var Ot=(c+(r=r+Math.imul(l,st)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(d,st)|0))<<13)|0;c=((o=o+Math.imul(d,ct)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(R,U),i=(i=Math.imul(R,z))+Math.imul(j,U)|0,o=Math.imul(j,z),r=r+Math.imul(I,V)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(P,V)|0,o=o+Math.imul(P,q)|0,r=r+Math.imul(A,G)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(k,G)|0,o=o+Math.imul(k,K)|0,r=r+Math.imul(M,Z)|0,i=(i=i+Math.imul(M,Q)|0)+Math.imul(T,Z)|0,o=o+Math.imul(T,Q)|0,r=r+Math.imul(O,J)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,r=r+Math.imul(p,st)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,st)|0,o=o+Math.imul(g,ct)|0;var xt=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;c=((o=o+Math.imul(d,dt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(L,U),i=(i=Math.imul(L,z))+Math.imul(F,U)|0,o=Math.imul(F,z),r=r+Math.imul(R,V)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,q)|0,r=r+Math.imul(I,G)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(P,G)|0,o=o+Math.imul(P,K)|0,r=r+Math.imul(A,Z)|0,i=(i=i+Math.imul(A,Q)|0)+Math.imul(k,Z)|0,o=o+Math.imul(k,Q)|0,r=r+Math.imul(M,J)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(x,nt)|0,o=o+Math.imul(x,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(b,st)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,st)|0,o=o+Math.imul(v,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,dt)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,dt)|0;var Et=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(d,pt)|0))<<13)|0;c=((o=o+Math.imul(d,gt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(L,V),i=(i=Math.imul(L,q))+Math.imul(F,V)|0,o=Math.imul(F,q),r=r+Math.imul(R,G)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,K)|0,r=r+Math.imul(I,Z)|0,i=(i=i+Math.imul(I,Q)|0)+Math.imul(P,Z)|0,o=o+Math.imul(P,Q)|0,r=r+Math.imul(A,J)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,tt)|0,r=r+Math.imul(M,nt)|0,i=(i=i+Math.imul(M,rt)|0)+Math.imul(T,nt)|0,o=o+Math.imul(T,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,at)|0,r=r+Math.imul(_,st)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,st)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,dt)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,dt)|0;var Mt=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(L,G),i=(i=Math.imul(L,K))+Math.imul(F,G)|0,o=Math.imul(F,K),r=r+Math.imul(R,Z)|0,i=(i=i+Math.imul(R,Q)|0)+Math.imul(j,Z)|0,o=o+Math.imul(j,Q)|0,r=r+Math.imul(I,J)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,tt)|0,r=r+Math.imul(A,nt)|0,i=(i=i+Math.imul(A,rt)|0)+Math.imul(k,nt)|0,o=o+Math.imul(k,rt)|0,r=r+Math.imul(M,ot)|0,i=(i=i+Math.imul(M,at)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,at)|0,r=r+Math.imul(O,st)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(x,st)|0,o=o+Math.imul(x,ct)|0,r=r+Math.imul(_,lt)|0,i=(i=i+Math.imul(_,dt)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,dt)|0;var Tt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(L,Z),i=(i=Math.imul(L,Q))+Math.imul(F,Z)|0,o=Math.imul(F,Q),r=r+Math.imul(R,J)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(j,J)|0,o=o+Math.imul(j,tt)|0,r=r+Math.imul(I,nt)|0,i=(i=i+Math.imul(I,rt)|0)+Math.imul(P,nt)|0,o=o+Math.imul(P,rt)|0,r=r+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,at)|0)+Math.imul(k,ot)|0,o=o+Math.imul(k,at)|0,r=r+Math.imul(M,st)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(T,st)|0,o=o+Math.imul(T,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,dt)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,dt)|0;var $t=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+($t>>>26)|0,$t&=67108863,r=Math.imul(L,J),i=(i=Math.imul(L,tt))+Math.imul(F,J)|0,o=Math.imul(F,tt),r=r+Math.imul(R,nt)|0,i=(i=i+Math.imul(R,rt)|0)+Math.imul(j,nt)|0,o=o+Math.imul(j,rt)|0,r=r+Math.imul(I,ot)|0,i=(i=i+Math.imul(I,at)|0)+Math.imul(P,ot)|0,o=o+Math.imul(P,at)|0,r=r+Math.imul(A,st)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(k,st)|0,o=o+Math.imul(k,ct)|0,r=r+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,dt)|0)+Math.imul(T,lt)|0,o=o+Math.imul(T,dt)|0;var At=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(x,pt)|0))<<13)|0;c=((o=o+Math.imul(x,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(L,nt),i=(i=Math.imul(L,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,at)|0,r=r+Math.imul(I,st)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(P,st)|0,o=o+Math.imul(P,ct)|0,r=r+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,dt)|0)+Math.imul(k,lt)|0,o=o+Math.imul(k,dt)|0;var kt=(c+(r=r+Math.imul(M,pt)|0)|0)+((8191&(i=(i=i+Math.imul(M,gt)|0)+Math.imul(T,pt)|0))<<13)|0;c=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(L,ot),i=(i=Math.imul(L,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(R,st)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(j,st)|0,o=o+Math.imul(j,ct)|0,r=r+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,dt)|0)+Math.imul(P,lt)|0,o=o+Math.imul(P,dt)|0;var Ct=(c+(r=r+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(k,pt)|0))<<13)|0;c=((o=o+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(L,st),i=(i=Math.imul(L,ct))+Math.imul(F,st)|0,o=Math.imul(F,ct),r=r+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,dt)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,dt)|0;var It=(c+(r=r+Math.imul(I,pt)|0)|0)+((8191&(i=(i=i+Math.imul(I,gt)|0)+Math.imul(P,pt)|0))<<13)|0;c=((o=o+Math.imul(P,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(L,lt),i=(i=Math.imul(L,dt))+Math.imul(F,lt)|0,o=Math.imul(F,dt);var Pt=(c+(r=r+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,gt)|0)+Math.imul(j,pt)|0))<<13)|0;c=((o=o+Math.imul(j,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863;var Nt=(c+(r=Math.imul(L,pt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,s[0]=mt,s[1]=bt,s[2]=vt,s[3]=yt,s[4]=_t,s[5]=wt,s[6]=St,s[7]=Ot,s[8]=xt,s[9]=Et,s[10]=Mt,s[11]=Tt,s[12]=$t,s[13]=At,s[14]=kt,s[15]=Ct,s[16]=It,s[17]=Pt,s[18]=Nt,0!==c&&(s[19]=c,n.length++),n};function p(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(h=d),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?h(this,t,e):n<63?d(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]=u,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r>=1;return r},g.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),u=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&u}return s&&0!==f&&(s.words[s.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)-(s/67108864|0),this.words[i+n]=67108863&o}for(;i>26,this.words[i+n]=67108863&o;if(0===u)return this.strip();for(r(-1===u),u=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 u,s=r.length-i.length;if("mod"!==e){(u=new o(null)).length=s+1,u.words=new Array(u.length);for(var c=0;c=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:u||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?(u=this.neg().divmod(t,e),"mod"!==e&&(i=u.div.neg()),"div"!==e&&(a=u.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(u=this.divmod(t.neg(),e),"mod"!==e&&(i=u.div.neg()),{div:i,mod:u.mod}):0!==(this.negative&t.negative)?(u=this.neg().divmod(t.neg(),e),"div"!==e&&(a=u.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:u.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,u},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),u=new o(0),s=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 d=0,h=1;0===(e.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(e.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0===(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(u.isOdd()||s.isOdd())&&(u.iadd(f),s.isub(l)),u.iushrn(1),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(u),a.isub(s)):(n.isub(e),u.isub(i),s.isub(a))}return{a:u,b:s,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),u=new o(0),s=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(s),a.iushrn(1);for(var l=0,d=1;0===(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)u.isOdd()&&u.iadd(s),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(u)):(n.isub(e),u.isub(a))}return(i=0===e.cmpn(1)?a:u).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,u&=67108863,this.words[a]=u}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 m={k256:null,p224:null,p192:null,p25519:null};function b(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 v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.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 O(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)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.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},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i>>22,o=a}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.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(m[t])return m[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new y;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return m[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 u=new o(1).toRed(this),s=u.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(s);)f.redIAdd(s);for(var l=this.pow(f,i),d=this.pow(t,i.addn(1).iushrn(1)),h=this.pow(t,i),p=a;0!==h.cmp(u);){for(var g=h,m=0;0!==g.cmp(u);m++)g=g.redSqr();r(m=0;r--){for(var c=e.words[r],f=s-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===++u||0===r&&0===f)&&(i=this.mul(i,n[a]),u=0,a=0)):u=0}s=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 O(t)},i(O,S),O.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},O.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},O.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)},O.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)},O.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(94)(t))},function(t,e,n){"use strict";(function(e){n(29);var r=n(100),i=n(117),o=n(153),a=n(160),u=n(134),s=n(79),c=n(84),f=n(375),l=n(386),d=n(52),h=n(63),p=n(514),g=n(48),m=p.SCRIPT_ENABLE_SIGHASH_FORKID,b=function(t,f,l,b,v,y){var _=n(387),w=n(388);g.isUndefined(y)&&(y=m);var S,O=_.shallowCopy(t);(b=new i(b),y&p.SCRIPT_ENABLE_REPLAY_PROTECTION)&&(f=(16711680|57005^f>>8)<<8|255&f);if(f&r.SIGHASH_FORKID&&y&p.SCRIPT_ENABLE_SIGHASH_FORKID)return function(t,e,n,i,o){var f=t.inputs[n];function l(t,e){var n=new u;g.isUndefined(e)?g.each(t.outputs,(function(t){t.toBufferWriter(n)})):t.outputs[e].toBufferWriter(n);var r=n.toBuffer();return c.sha256sha256(r)}d.checkArgument(o instanceof s,"For ForkId=0 signatures, satoshis or complete input must be provided");var p=h.emptyBuffer(32),m=h.emptyBuffer(32),b=h.emptyBuffer(32);e&r.SIGHASH_ANYONECANPAY||(p=function(t){var e=new u;g.each(t.inputs,(function(t){e.writeReverse(t.prevTxId),e.writeUInt32LE(t.outputIndex)}));var n=e.toBuffer();return c.sha256sha256(n)}(t)),e&r.SIGHASH_ANYONECANPAY||(31&e)==r.SIGHASH_SINGLE||(31&e)==r.SIGHASH_NONE||(m=function(t){var e=new u;g.each(t.inputs,(function(t){e.writeUInt32LE(t.sequenceNumber)}));var n=e.toBuffer();return c.sha256sha256(n)}(t)),(31&e)!=r.SIGHASH_SINGLE&&(31&e)!=r.SIGHASH_NONE?b=l(t):(31&e)==r.SIGHASH_SINGLE&&n>>0);var _=v.toBuffer(),w=c.sha256sha256(_);return new a(w).readReverse()}(O,f,l,b,v);for(b.removeCodeseparators(),S=0;S=O.outputs.length)return e.from("0000000000000000000000000000000000000000000000000000000000000001","hex");for(O.outputs.length=l+1,S=0;S9007199254740991?"transaction txout satoshis greater than max safe integer":this._satoshis!==this._satoshisBN.toNumber()?"transaction txout satoshis has corrupted value":this._satoshis<0&&"transaction txout negative"},Object.defineProperty(l.prototype,"satoshisBN",{configurable:!1,enumerable:!0,get:function(){return this._satoshisBN},set:function(t){this._satoshisBN=t,this._satoshis=t.toNumber(),c.checkState(a.isNaturalNumber(this._satoshis),"Output satoshis is not a natural number")}}),l.prototype.toObject=l.prototype.toJSON=function(){var t={satoshis:this.satoshis};return t.script=this._scriptBuffer.toString("hex"),t},l.fromObject=function(t){return new l(t)},l.prototype.setScriptFromBuffer=function(t){this._scriptBuffer=t;try{this._script=s.fromBuffer(this._scriptBuffer),this._script._isOutput=!0}catch(e){if(!(e instanceof f.Script.InvalidBuffer))throw e;this._script=null}},l.prototype.setScript=function(t){if(t instanceof s)this._scriptBuffer=t.toBuffer(),this._script=t,this._script._isOutput=!0;else if(r.isString(t))this._script=s.fromString(t),this._scriptBuffer=this._script.toBuffer(),this._script._isOutput=!0;else{if(!o.isBuffer(t))throw new TypeError("Invalid argument type: script");this.setScriptFromBuffer(t)}return this},l.prototype.inspect=function(){var t;return t=this.script?this.script.inspect():this._scriptBuffer.toString("hex"),""},l.fromBufferReader=function(t){var n={};n.satoshis=t.readUInt64LEBN();var r=t.readVarintNum();return n.script=0!==r?t.read(r):e.from([]),new l(n)},l.prototype.toBufferWriter=function(t){t||(t=new u),t.writeUInt64LEBN(this._satoshisBN);var e=this._scriptBuffer;return t.writeVarintNum(e.length),t.write(e),t},t.exports=l}).call(this,n(29).Buffer)},function(t,e,n){"use strict";(function(t){var r=n(291),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.a.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(e){}}();e.a=u}).call(this,n(253)(t))},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){var r=n(36).Buffer,i=n(757).Transform,o=n(238).StringDecoder;function a(t){i.call(this),this.hashMode="string"===typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(37)(a,i),a.prototype.update=function(t,e,n){"string"===typeof t&&(t=r.from(t,e));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(i){r=i}finally{n(r)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(n){e=n}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r},t.exports=a},function(t,e,n){var r=n(158);function i(t){return r("rmd160").update(t).digest()}function o(t){return r("sha256").update(t).digest()}t.exports={hash160:function(t){return i(o(t))},hash256:function(t){return o(o(t))},ripemd160:i,sha1:function(t){return r("sha1").update(t).digest()},sha256:o}},function(t,e,n){"use strict";var r=n(37),i=n(358),o=n(360),a=n(361),u=n(156);function s(t){u.call(this,"digest"),this._hash=t}r(s,u),s.prototype._update=function(t){this._hash.update(t)},s.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new s(a(t))}},function(t,e,n){"use strict";var r=n(48),i=n(63),o=n(80),a=[],u={};function s(){}function c(t,e){if(~a.indexOf(t))return t;if(!e)return u[t];r.isArray(e)||(e=[e]);for(var n=0;n=this.buf.length},u.prototype.finished=u.prototype.eof,u.prototype.read=function(t){i.checkArgument(!r.isUndefined(t),"Must specify a length");var e=this.buf.slice(this.pos,this.pos+t);return this.pos=this.pos+t,e},u.prototype.readAll=function(){var t=this.buf.slice(this.pos,this.buf.length);return this.pos=this.buf.length,t},u.prototype.readUInt8=function(){var t=this.buf.readUInt8(this.pos);return this.pos=this.pos+1,t},u.prototype.readUInt16BE=function(){var t=this.buf.readUInt16BE(this.pos);return this.pos=this.pos+2,t},u.prototype.readUInt16LE=function(){var t=this.buf.readUInt16LE(this.pos);return this.pos=this.pos+2,t},u.prototype.readUInt32BE=function(){var t=this.buf.readUInt32BE(this.pos);return this.pos=this.pos+4,t},u.prototype.readUInt32LE=function(){var t=this.buf.readUInt32LE(this.pos);return this.pos=this.pos+4,t},u.prototype.readInt32LE=function(){var t=this.buf.readInt32LE(this.pos);return this.pos=this.pos+4,t},u.prototype.readUInt64BEBN=function(){var t=this.buf.slice(this.pos,this.pos+8),e=a.fromBuffer(t);return this.pos=this.pos+8,e},u.prototype.readUInt64LEBN=function(){var t,e=this.buf.readUInt32LE(this.pos),n=4294967296*this.buf.readUInt32LE(this.pos+4)+e;if(n<=9007199254740991)t=new a(n);else{var r=Array.prototype.slice.call(this.buf,this.pos,this.pos+8);t=new a(r,10,"le")}return this.pos=this.pos+8,t},u.prototype.readVarintNum=function(){var t=this.readUInt8();switch(t){case 253:return this.readUInt16LE();case 254:return this.readUInt32LE();case 255:var e=this.readUInt64LEBN().toNumber();if(e<=Math.pow(2,53))return e;throw new Error("number too large to retain precision - use readVarintBN");default:return t}},u.prototype.readVarLengthBuffer=function(){var t=this.readVarintNum(),e=this.read(t);return i.checkState(e.length===t,"Invalid length while reading varlength buffer. Expected to read: "+t+" and read "+e.length),e},u.prototype.readVarintBuf=function(){switch(this.buf.readUInt8(this.pos)){case 253:return this.read(3);case 254:return this.read(5);case 255:return this.read(9);default:return this.read(1)}},u.prototype.readVarintBN=function(){var t=this.readUInt8();switch(t){case 253:return new a(this.readUInt16LE());case 254:return new a(this.readUInt32LE());case 255:return this.readUInt64LEBN();default:return new a(t)}},u.prototype.reverse=function(){for(var t=e.alloc(this.buf.length),n=0;n=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var n=0;n>6),e+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(e+=String.fromCharCode(224|r>>12),e+=String.fromCharCode(128|r>>6&63),e+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&t.charCodeAt(n)),e+=String.fromCharCode(240|r>>18),e+=String.fromCharCode(128|r>>12&63),e+=String.fromCharCode(128|r>>6&63),e+=String.fromCharCode(128|63&r))}return e}var w={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1},S={value:b.string.isRequired,size:b.number,level:b.oneOf(["L","M","Q","H"]),bgColor:b.string,fgColor:b.string,includeMargin:b.bool};function O(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return t.forEach((function(t,r){var i=null;t.forEach((function(o,a){if(!o&&null!==i)return n.push("M".concat(i+e," ").concat(r+e,"h").concat(a-i,"v1H").concat(i+e,"z")),void(i=null);if(a!==t.length-1)o&&null===i&&(i=a);else{if(!o)return;null===i?n.push("M".concat(a+e,",").concat(r+e," h1v1H").concat(a+e,"z")):n.push("M".concat(i+e,",").concat(r+e," h").concat(a+1-i,"v1H").concat(i+e,"z"))}}))})),n.join("")}var x=function(){try{(new Path2D).addPath(new Path2D)}catch(t){return!1}return!0}(),E=function(t){function e(){var t,n;u(this,e);for(var r=arguments.length,i=new Array(r),o=0;o=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var i=/[^.^\]^[]+|(?=\[\]|\.\.)/g,o=/^\d+$/,a=/^\d/,u=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,s=/^\s*(['"]?)(.*?)(\1)\s*$/,c=new r(512),f=new r(512),l=new r(512);function d(t){return c.get(t)||c.set(t,h(t).map((function(t){return t.replace(s,"$2")})))}function h(t){return t.match(i)}function p(t){return"string"===typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function g(t){return!p(t)&&(function(t){return t.match(a)&&!t.match(o)}(t)||function(t){return u.test(t)}(t))}t.exports={Cache:r,split:h,normalizePath:d,setter:function(t){var e=d(t);return f.get(t)||f.set(t,(function(t,n){for(var r=0,i=e.length,o=t;r0?"in "+i:i+" ago":i};function o(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth,r=t.formats[n]||t.formats[t.defaultWidth];return r}}var a={date:o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:o({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},u={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function s(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,a=i.width?String(i.width):o;r=t.formattingValues[a]||t.formattingValues[o]}else{var u=t.defaultWidth,s=i.width?String(i.width):t.defaultWidth;r=t.values[s]||t.values[u]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function c(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,i=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(i);if(!o)return null;var a,u=o[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(s)?l(s,(function(t){return t.test(u)})):f(s,(function(t){return t.test(u)}));a=t.valueCallback?t.valueCallback(c):c,a=n.valueCallback?n.valueCallback(a):a;var d=e.slice(u.length);return{value:a,rest:d}}}function f(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function l(t,e){for(var n=0;n20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:s({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:s({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:s({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:s({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:s({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(d={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(d.matchPattern);if(!n)return null;var r=n[0],i=t.match(d.parsePattern);if(!i)return null;var o=d.valueCallback?d.valueCallback(i[0]):i[0];o=e.valueCallback?e.valueCallback(o):o;var a=t.slice(r.length);return{value:o,rest:a}}),era:c({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:c({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:c({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:c({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};e.a=h},function(t,e,n){"use strict";function r(t,e){for(var n=0;n0}var g,m=function(t){function e(n){var r=n.graphQLErrors,i=n.networkError,o=n.errorMessage,a=n.extraInfo,u=t.call(this,o)||this;return u.graphQLErrors=r||[],u.networkError=i||null,u.message=o||function(t){var e="";return p(t.graphQLErrors)&&t.graphQLErrors.forEach((function(t){var n=t?t.message:"Error message not found.";e+="GraphQL error: "+n+"\n"})),t.networkError&&(e+="Network error: "+t.networkError.message+"\n"),e=e.replace(/\n$/,"")}(u),u.extraInfo=a,u.__proto__=e.prototype,u}return Object(i.c)(e,t),e}(Error);!function(t){t[t.normal=1]="normal",t[t.refetch=2]="refetch",t[t.poll=3]="poll"}(g||(g={}));var b=function(t){function e(e){var n=e.queryManager,r=e.options,i=e.shouldSubscribe,a=void 0===i||i,u=t.call(this,(function(t){return u.onSubscribe(t)}))||this;u.observers=new Set,u.subscriptions=new Set,u.isTornDown=!1,u.options=r,u.variables=r.variables||{},u.queryId=n.generateQueryId(),u.shouldSubscribe=a;var s=Object(o.m)(r.query);return u.queryName=s&&s.name&&s.name.value,u.queryManager=n,u}return Object(i.c)(e,t),e.prototype.result=function(){var t=this;return new Promise((function(e,n){var r={next:function(n){e(n),t.observers.delete(r),t.observers.size||t.queryManager.removeQuery(t.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:n},i=t.subscribe(r)}))},e.prototype.currentResult=function(){var t=this.getCurrentResult();return void 0===t.data&&(t.data={}),t},e.prototype.getCurrentResult=function(){if(this.isTornDown){var t=this.lastResult;return{data:!this.lastError&&t&&t.data||void 0,error:this.lastError,loading:!1,networkStatus:r.error}}var e,n,o,a=this.queryManager.getCurrentQueryResult(this),u=a.data,s=a.partial,c=this.queryManager.queryStore.get(this.queryId),f=this.options.fetchPolicy,l="network-only"===f||"no-cache"===f;if(c){var h=c.networkStatus;if(n=c,void 0===(o=this.options.errorPolicy)&&(o="none"),n&&(n.networkError||"none"===o&&p(n.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:h,error:new m({graphQLErrors:c.graphQLErrors,networkError:c.networkError})};c.variables&&(this.options.variables=Object(i.a)(Object(i.a)({},this.options.variables),c.variables),this.variables=this.options.variables),e={data:u,loading:d(h),networkStatus:h},c.graphQLErrors&&"all"===this.options.errorPolicy&&(e.errors=c.graphQLErrors)}else{var g=l||s&&"cache-only"!==f;e={data:u,loading:g,networkStatus:g?r.loading:r.ready}}return s||this.updateLastResult(Object(i.a)(Object(i.a)({},e),{stale:!1})),Object(i.a)(Object(i.a)({},e),{partial:s})},e.prototype.isDifferentFromLastResult=function(t){var e=this.lastResultSnapshot;return!(e&&t&&e.networkStatus===t.networkStatus&&e.stale===t.stale&&Object(a.a)(e.data,t.data))},e.prototype.getLastResult=function(){return this.lastResult},e.prototype.getLastError=function(){return this.lastError},e.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},e.prototype.resetQueryStoreErrors=function(){var t=this.queryManager.queryStore.get(this.queryId);t&&(t.networkError=null,t.graphQLErrors=[])},e.prototype.refetch=function(t){var e=this.options.fetchPolicy;return"cache-only"===e?Promise.reject(new f.a(1)):("no-cache"!==e&&"cache-and-network"!==e&&(e="network-only"),Object(a.a)(this.variables,t)||(this.variables=Object(i.a)(Object(i.a)({},this.variables),t)),Object(a.a)(this.options.variables,this.variables)||(this.options.variables=Object(i.a)(Object(i.a)({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,Object(i.a)(Object(i.a)({},this.options),{fetchPolicy:e}),g.refetch))},e.prototype.fetchMore=function(t){var e=this;Object(f.b)(t.updateQuery,2);var n=Object(i.a)(Object(i.a)({},t.query?t:Object(i.a)(Object(i.a)(Object(i.a)({},this.options),t),{variables:Object(i.a)(Object(i.a)({},this.variables),t.variables)})),{fetchPolicy:"network-only"}),r=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(r,n,g.normal,this.queryId).then((function(i){return e.updateQuery((function(e){return t.updateQuery(e,{fetchMoreResult:i.data,variables:n.variables})})),e.queryManager.stopQuery(r),i}),(function(t){throw e.queryManager.stopQuery(r),t}))},e.prototype.subscribeToMore=function(t){var e=this,n=this.queryManager.startGraphQLSubscription({query:t.document,variables:t.variables}).subscribe({next:function(n){var r=t.updateQuery;r&&e.updateQuery((function(t,e){var i=e.variables;return r(t,{subscriptionData:n,variables:i})}))},error:function(e){t.onError&&t.onError(e)}});return this.subscriptions.add(n),function(){e.subscriptions.delete(n)&&n.unsubscribe()}},e.prototype.setOptions=function(t){var e=this.options.fetchPolicy;this.options=Object(i.a)(Object(i.a)({},this.options),t),t.pollInterval?this.startPolling(t.pollInterval):0===t.pollInterval&&this.stopPolling();var n=t.fetchPolicy;return this.setVariables(this.options.variables,e!==n&&("cache-only"===e||"standby"===e||"network-only"===n),t.fetchResults)},e.prototype.setVariables=function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=!0),this.isTornDown=!1,t=t||this.variables,!e&&Object(a.a)(t,this.variables)?this.observers.size&&n?this.result():Promise.resolve():(this.variables=this.options.variables=t,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},e.prototype.updateQuery=function(t){var e=this.queryManager,n=e.getQueryWithPreviousResult(this.queryId),r=n.previousResult,i=n.variables,a=n.document,u=Object(o.I)((function(){return t(r,{variables:i})}));u&&(e.dataStore.markUpdateQueryResult(a,i,u),e.broadcastQueries())},e.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},e.prototype.startPolling=function(t){_(this),this.options.pollInterval=t,this.queryManager.startPollingQuery(this.options,this.queryId)},e.prototype.updateLastResult=function(t){var e=this.lastResult;return this.lastResult=t,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?t:Object(o.f)(t),e},e.prototype.onSubscribe=function(t){var e=this;try{var n=t._subscription._observer;n&&!n.error&&(n.error=v)}catch(i){}var r=!this.observers.size;return this.observers.add(t),t.next&&this.lastResult&&t.next(this.lastResult),t.error&&this.lastError&&t.error(this.lastError),r&&this.setUpQuery(),function(){e.observers.delete(t)&&!e.observers.size&&e.tearDownQuery()}},e.prototype.setUpQuery=function(){var t=this,e=this.queryManager,n=this.queryId;this.shouldSubscribe&&e.addObservableQuery(n,this),this.options.pollInterval&&(_(this),e.startPollingQuery(this.options,n));var o=function(e){t.updateLastResult(Object(i.a)(Object(i.a)({},t.lastResult),{errors:e.graphQLErrors,networkStatus:r.error,loading:!1})),y(t.observers,"error",t.lastError=e)};e.observeQuery(n,this.options,{next:function(n){if(t.lastError||t.isDifferentFromLastResult(n)){var r=t.updateLastResult(n),i=t.options,o=i.query,u=i.variables,s=i.fetchPolicy;e.transform(o).hasClientExports?e.getLocalState().addExportedVariables(o,u).then((function(i){var u=t.variables;t.variables=t.options.variables=i,!n.loading&&r&&"cache-only"!==s&&e.transform(o).serverQuery&&!Object(a.a)(u,i)?t.refetch():y(t.observers,"next",n)})):y(t.observers,"next",n)}},error:o}).catch(o)},e.prototype.tearDownQuery=function(){var t=this.queryManager;this.isTornDown=!0,t.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(t){return t.unsubscribe()})),this.subscriptions.clear(),t.removeObservableQuery(this.queryId),t.stopQuery(this.queryId),this.observers.clear()},e}(h);function v(t){}function y(t,e,n){var r=[];t.forEach((function(t){return t[e]&&r.push(t)})),r.forEach((function(t){return t[e](n)}))}function _(t){var e=t.options.fetchPolicy;Object(f.b)("cache-first"!==e&&"cache-only"!==e,3)}var w=function(){function t(){this.store={}}return t.prototype.getStore=function(){return this.store},t.prototype.get=function(t){return this.store[t]},t.prototype.initMutation=function(t,e,n){this.store[t]={mutation:e,variables:n||{},loading:!0,error:null}},t.prototype.markMutationError=function(t,e){var n=this.store[t];n&&(n.loading=!1,n.error=e)},t.prototype.markMutationResult=function(t){var e=this.store[t];e&&(e.loading=!1,e.error=null)},t.prototype.reset=function(){this.store={}},t}(),S=function(){function t(){this.store={}}return t.prototype.getStore=function(){return this.store},t.prototype.get=function(t){return this.store[t]},t.prototype.initQuery=function(t){var e=this.store[t.queryId];Object(f.b)(!e||e.document===t.document||Object(a.a)(e.document,t.document),19);var n,i=!1,o=null;t.storePreviousVariables&&e&&e.networkStatus!==r.loading&&(Object(a.a)(e.variables,t.variables)||(i=!0,o=e.variables)),n=i?r.setVariables:t.isPoll?r.poll:t.isRefetch?r.refetch:r.loading;var u=[];e&&e.graphQLErrors&&(u=e.graphQLErrors),this.store[t.queryId]={document:t.document,variables:t.variables,previousVariables:o,networkError:null,graphQLErrors:u,networkStatus:n,metadata:t.metadata},"string"===typeof t.fetchMoreForQueryId&&this.store[t.fetchMoreForQueryId]&&(this.store[t.fetchMoreForQueryId].networkStatus=r.fetchMore)},t.prototype.markQueryResult=function(t,e,n){this.store&&this.store[t]&&(this.store[t].networkError=null,this.store[t].graphQLErrors=p(e.errors)?e.errors:[],this.store[t].previousVariables=null,this.store[t].networkStatus=r.ready,"string"===typeof n&&this.store[n]&&(this.store[n].networkStatus=r.ready))},t.prototype.markQueryError=function(t,e,n){this.store&&this.store[t]&&(this.store[t].networkError=e,this.store[t].networkStatus=r.error,"string"===typeof n&&this.markQueryResultClient(n,!0))},t.prototype.markQueryResultClient=function(t,e){var n=this.store&&this.store[t];n&&(n.networkError=null,n.previousVariables=null,e&&(n.networkStatus=r.ready))},t.prototype.stopQuery=function(t){delete this.store[t]},t.prototype.reset=function(t){var e=this;Object.keys(this.store).forEach((function(n){t.indexOf(n)<0?e.stopQuery(n):e.store[n].networkStatus=r.loading}))},t}();var O=function(){function t(t){var e=t.cache,n=t.client,r=t.resolvers,i=t.fragmentMatcher;this.cache=e,n&&(this.client=n),r&&this.addResolvers(r),i&&this.setFragmentMatcher(i)}return t.prototype.addResolvers=function(t){var e=this;this.resolvers=this.resolvers||{},Array.isArray(t)?t.forEach((function(t){e.resolvers=Object(o.A)(e.resolvers,t)})):this.resolvers=Object(o.A)(this.resolvers,t)},t.prototype.setResolvers=function(t){this.resolvers={},this.addResolvers(t)},t.prototype.getResolvers=function(){return this.resolvers||{}},t.prototype.runResolvers=function(t){var e=t.document,n=t.remoteResult,r=t.context,o=t.variables,a=t.onlyRunForcedResolvers,u=void 0!==a&&a;return Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(t){return e?[2,this.resolveDocument(e,n.data,r,o,this.fragmentMatcher,u).then((function(t){return Object(i.a)(Object(i.a)({},n),{data:t.result})}))]:[2,n]}))}))},t.prototype.setFragmentMatcher=function(t){this.fragmentMatcher=t},t.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},t.prototype.clientQuery=function(t){return Object(o.s)(["client"],t)&&this.resolvers?t:null},t.prototype.serverQuery=function(t){return this.resolvers?Object(o.C)(t):t},t.prototype.prepareContext=function(t){void 0===t&&(t={});var e=this.cache;return Object(i.a)(Object(i.a)({},t),{cache:e,getCacheKey:function(t){if(e.config)return e.config.dataIdFromObject(t);Object(f.b)(!1,6)}})},t.prototype.addExportedVariables=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),Object(i.b)(this,void 0,void 0,(function(){return Object(i.d)(this,(function(r){return t?[2,this.resolveDocument(t,this.buildRootValueFromCache(t,e)||{},this.prepareContext(n),e).then((function(t){return Object(i.a)(Object(i.a)({},e),t.exportedVariables)}))]:[2,Object(i.a)({},e)]}))}))},t.prototype.shouldForceResolvers=function(t){var e=!1;return Object(l.b)(t,{Directive:{enter:function(t){if("client"===t.name.value&&t.arguments&&(e=t.arguments.some((function(t){return"always"===t.name.value&&"BooleanValue"===t.value.kind&&!0===t.value.value}))))return l.a}}}),e},t.prototype.buildRootValueFromCache=function(t,e){return this.cache.diff({query:Object(o.d)(t),variables:e,returnPartialData:!0,optimistic:!1}).result},t.prototype.resolveDocument=function(t,e,n,r,a,u){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===a&&(a=function(){return!0}),void 0===u&&(u=!1),Object(i.b)(this,void 0,void 0,(function(){var s,c,f,l,d,h,p,g,m;return Object(i.d)(this,(function(b){var v;return s=Object(o.l)(t),c=Object(o.j)(t),f=Object(o.g)(c),l=s.operation,d=l?(v=l).charAt(0).toUpperCase()+v.slice(1):"Query",p=(h=this).cache,g=h.client,m={fragmentMap:f,context:Object(i.a)(Object(i.a)({},n),{cache:p,client:g}),variables:r,fragmentMatcher:a,defaultOperationType:d,exportedVariables:{},onlyRunForcedResolvers:u},[2,this.resolveSelectionSet(s.selectionSet,e,m).then((function(t){return{result:t,exportedVariables:m.exportedVariables}}))]}))}))},t.prototype.resolveSelectionSet=function(t,e,n){return Object(i.b)(this,void 0,void 0,(function(){var r,a,u,s,c,l=this;return Object(i.d)(this,(function(d){return r=n.fragmentMap,a=n.context,u=n.variables,s=[e],c=function(t){return Object(i.b)(l,void 0,void 0,(function(){var c,l;return Object(i.d)(this,(function(i){return Object(o.F)(t,u)?Object(o.t)(t)?[2,this.resolveField(t,e,n).then((function(e){var n;"undefined"!==typeof e&&s.push(((n={})[Object(o.E)(t)]=e,n))}))]:(Object(o.v)(t)?c=t:(c=r[t.name.value],Object(f.b)(c,7)),c&&c.typeCondition&&(l=c.typeCondition.name.value,n.fragmentMatcher(e,l,a))?[2,this.resolveSelectionSet(c.selectionSet,e,n).then((function(t){s.push(t)}))]:[2]):[2]}))}))},[2,Promise.all(t.selections.map(c)).then((function(){return Object(o.B)(s)}))]}))}))},t.prototype.resolveField=function(t,e,n){return Object(i.b)(this,void 0,void 0,(function(){var r,a,u,s,c,f,l,d,h,p=this;return Object(i.d)(this,(function(i){return r=n.variables,a=t.name.value,u=Object(o.E)(t),s=a!==u,c=e[u]||e[a],f=Promise.resolve(c),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(t)||(l=e.__typename||n.defaultOperationType,(d=this.resolvers&&this.resolvers[l])&&(h=d[s?a:u])&&(f=Promise.resolve(h(e,Object(o.b)(t,r),n.context,{field:t,fragmentMap:n.fragmentMap})))),[2,f.then((function(e){return void 0===e&&(e=c),t.directives&&t.directives.forEach((function(t){"export"===t.name.value&&t.arguments&&t.arguments.forEach((function(t){"as"===t.name.value&&"StringValue"===t.value.kind&&(n.exportedVariables[t.value.value]=e)}))})),t.selectionSet?null==e?e:Array.isArray(e)?p.resolveSubSelectedArray(t,e,n):t.selectionSet?p.resolveSelectionSet(t.selectionSet,e,n):void 0:e}))]}))}))},t.prototype.resolveSubSelectedArray=function(t,e,n){var r=this;return Promise.all(e.map((function(e){return null===e?null:Array.isArray(e)?r.resolveSubSelectedArray(t,e,n):t.selectionSet?r.resolveSelectionSet(t.selectionSet,e,n):void 0})))},t}();function x(t){var e=new Set,n=null;return new h((function(r){return e.add(r),n=n||t.subscribe({next:function(t){e.forEach((function(e){return e.next&&e.next(t)}))},error:function(t){e.forEach((function(e){return e.error&&e.error(t)}))},complete:function(){e.forEach((function(t){return t.complete&&t.complete()}))}}),function(){e.delete(r)&&!e.size&&n&&(n.unsubscribe(),n=null)}}))}var E=Object.prototype.hasOwnProperty,M=function(){function t(t){var e=t.link,n=t.queryDeduplication,r=void 0!==n&&n,i=t.store,a=t.onBroadcast,u=void 0===a?function(){}:a,s=t.ssrMode,c=void 0!==s&&s,f=t.clientAwareness,l=void 0===f?{}:f,d=t.localState,h=t.assumeImmutableResults;this.mutationStore=new w,this.queryStore=new S,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(o.e?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=e,this.queryDeduplication=r,this.dataStore=i,this.onBroadcast=u,this.clientAwareness=l,this.localState=d||new O({cache:i.getCache()}),this.ssrMode=c,this.assumeImmutableResults=!!h}return t.prototype.stop=function(){var t=this;this.queries.forEach((function(e,n){t.stopQueryNoBroadcast(n)})),this.fetchQueryRejectFns.forEach((function(t){t(new f.a(8))}))},t.prototype.mutate=function(t){var e=t.mutation,n=t.variables,r=t.optimisticResponse,a=t.updateQueries,u=t.refetchQueries,s=void 0===u?[]:u,c=t.awaitRefetchQueries,l=void 0!==c&&c,d=t.update,h=t.errorPolicy,g=void 0===h?"none":h,b=t.fetchPolicy,v=t.context,y=void 0===v?{}:v;return Object(i.b)(this,void 0,void 0,(function(){var t,u,c,h=this;return Object(i.d)(this,(function(v){switch(v.label){case 0:return Object(f.b)(e,9),Object(f.b)(!b||"no-cache"===b,10),t=this.generateQueryId(),e=this.transform(e).document,this.setQuery(t,(function(){return{document:e}})),n=this.getVariables(e,n),this.transform(e).hasClientExports?[4,this.localState.addExportedVariables(e,n,y)]:[3,2];case 1:n=v.sent(),v.label=2;case 2:return u=function(){var t={};return a&&h.queries.forEach((function(e,n){var r=e.observableQuery;if(r){var i=r.queryName;i&&E.call(a,i)&&(t[n]={updater:a[i],query:h.queryStore.get(n)})}})),t},this.mutationStore.initMutation(t,e,n),this.dataStore.markMutationInit({mutationId:t,document:e,variables:n,updateQueries:u(),update:d,optimisticResponse:r}),this.broadcastQueries(),c=this,[2,new Promise((function(a,f){var h,v;c.getObservableFromLink(e,Object(i.a)(Object(i.a)({},y),{optimisticResponse:r}),n,!1).subscribe({next:function(r){Object(o.q)(r)&&"none"===g?v=new m({graphQLErrors:r.errors}):(c.mutationStore.markMutationResult(t),"no-cache"!==b&&c.dataStore.markMutationResult({mutationId:t,result:r,document:e,variables:n,updateQueries:u(),update:d}),h=r)},error:function(e){c.mutationStore.markMutationError(t,e),c.dataStore.markMutationComplete({mutationId:t,optimisticResponse:r}),c.broadcastQueries(),c.setQuery(t,(function(){return{document:null}})),f(new m({networkError:e}))},complete:function(){if(v&&c.mutationStore.markMutationError(t,v),c.dataStore.markMutationComplete({mutationId:t,optimisticResponse:r}),c.broadcastQueries(),v)f(v);else{"function"===typeof s&&(s=s(h));var e=[];p(s)&&s.forEach((function(t){if("string"===typeof t)c.queries.forEach((function(n){var r=n.observableQuery;r&&r.queryName===t&&e.push(r.refetch())}));else{var n={query:t.query,variables:t.variables,fetchPolicy:"network-only"};t.context&&(n.context=t.context),e.push(c.query(n))}})),Promise.all(l?e:[]).then((function(){c.setQuery(t,(function(){return{document:null}})),"ignore"===g&&h&&Object(o.q)(h)&&delete h.errors,a(h)}))}}})}))]}}))}))},t.prototype.fetchQuery=function(t,e,n,r){return Object(i.b)(this,void 0,void 0,(function(){var a,u,s,c,f,l,d,h,p,b,v,y,_,w,S,O,x,E,M=this;return Object(i.d)(this,(function(T){switch(T.label){case 0:return a=e.metadata,u=void 0===a?null:a,s=e.fetchPolicy,c=void 0===s?"cache-first":s,f=e.context,l=void 0===f?{}:f,d=this.transform(e.query).document,h=this.getVariables(d,e.variables),this.transform(d).hasClientExports?[4,this.localState.addExportedVariables(d,h,l)]:[3,2];case 1:h=T.sent(),T.label=2;case 2:if(e=Object(i.a)(Object(i.a)({},e),{variables:h}),v=b="network-only"===c||"no-cache"===c,b||(y=this.dataStore.getCache().diff({query:d,variables:h,returnPartialData:!0,optimistic:!1}),_=y.complete,w=y.result,v=!_||"cache-and-network"===c,p=w),S=v&&"cache-only"!==c&&"standby"!==c,Object(o.s)(["live"],d)&&(S=!0),O=this.idCounter++,x="no-cache"!==c?this.updateQueryWatch(t,d,e):void 0,this.setQuery(t,(function(){return{document:d,lastRequestId:O,invalidated:!0,cancel:x}})),this.invalidate(r),this.queryStore.initQuery({queryId:t,document:d,storePreviousVariables:S,variables:h,isPoll:n===g.poll,isRefetch:n===g.refetch,metadata:u,fetchMoreForQueryId:r}),this.broadcastQueries(),S){if(E=this.fetchRequest({requestId:O,queryId:t,document:d,options:e,fetchMoreForQueryId:r}).catch((function(e){throw e.hasOwnProperty("graphQLErrors")?e:(O>=M.getQuery(t).lastRequestId&&(M.queryStore.markQueryError(t,e,r),M.invalidate(t),M.invalidate(r),M.broadcastQueries()),new m({networkError:e}))})),"cache-and-network"!==c)return[2,E];E.catch((function(){}))}return this.queryStore.markQueryResultClient(t,!S),this.invalidate(t),this.invalidate(r),this.transform(d).hasForcedResolvers?[2,this.localState.runResolvers({document:d,remoteResult:{data:p},context:l,variables:h,onlyRunForcedResolvers:!0}).then((function(n){return M.markQueryResult(t,n,e,r),M.broadcastQueries(),n}))]:(this.broadcastQueries(),[2,{data:p}])}}))}))},t.prototype.markQueryResult=function(t,e,n,r){var i=n.fetchPolicy,o=n.variables,a=n.errorPolicy;"no-cache"===i?this.setQuery(t,(function(){return{newData:{result:e.data,complete:!0}}})):this.dataStore.markQueryResult(e,this.getQuery(t).document,o,r,"ignore"===a||"all"===a)},t.prototype.queryListenerForObserver=function(t,e,n){var r=this;function i(t,e){if(n[t])try{n[t](e)}catch(r){}}return function(n,o){if(r.invalidate(t,!1),n){var a=r.getQuery(t),u=a.observableQuery,s=a.document,c=u?u.options.fetchPolicy:e.fetchPolicy;if("standby"!==c){var f=d(n.networkStatus),l=u&&u.getLastResult(),h=!(!l||l.networkStatus===n.networkStatus),g=e.returnPartialData||!o&&n.previousVariables||h&&e.notifyOnNetworkStatusChange||"cache-only"===c||"cache-and-network"===c;if(!f||g){var b=p(n.graphQLErrors),v=u&&u.options.errorPolicy||e.errorPolicy||"none";if("none"===v&&b||n.networkError)return i("error",new m({graphQLErrors:n.graphQLErrors,networkError:n.networkError}));try{var y=void 0,_=void 0;if(o)"no-cache"!==c&&"network-only"!==c&&r.setQuery(t,(function(){return{newData:null}})),y=o.result,_=!o.complete;else{var w=u&&u.getLastError(),S="none"!==v&&(w&&w.graphQLErrors)!==n.graphQLErrors;if(l&&l.data&&!S)y=l.data,_=!1;else{var O=r.dataStore.getCache().diff({query:s,variables:n.previousVariables||n.variables,returnPartialData:!0,optimistic:!0});y=O.result,_=!O.complete}}var x=_&&!(e.returnPartialData||"cache-only"===c),E={data:x?l&&l.data:y,loading:f,networkStatus:n.networkStatus,stale:x};"all"===v&&b&&(E.errors=n.graphQLErrors),i("next",E)}catch(M){i("error",new m({networkError:M}))}}}}}},t.prototype.transform=function(t){var e=this.transformCache;if(!e.has(t)){var n=this.dataStore.getCache(),r=n.transformDocument(t),i=Object(o.D)(n.transformForLink(r)),a=this.localState.clientQuery(r),u=this.localState.serverQuery(i),s={document:r,hasClientExports:Object(o.r)(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:a,serverQuery:u,defaultVars:Object(o.h)(Object(o.m)(r))},c=function(t){t&&!e.has(t)&&e.set(t,s)};c(t),c(r),c(a),c(u)}return e.get(t)},t.prototype.getVariables=function(t,e){return Object(i.a)(Object(i.a)({},this.transform(t).defaultVars),e)},t.prototype.watchQuery=function(t,e){void 0===e&&(e=!0),Object(f.b)("standby"!==t.fetchPolicy,11),t.variables=this.getVariables(t.query,t.variables),"undefined"===typeof t.notifyOnNetworkStatusChange&&(t.notifyOnNetworkStatusChange=!1);var n=Object(i.a)({},t);return new b({queryManager:this,options:n,shouldSubscribe:e})},t.prototype.query=function(t){var e=this;return Object(f.b)(t.query,12),Object(f.b)("Document"===t.query.kind,13),Object(f.b)(!t.returnPartialData,14),Object(f.b)(!t.pollInterval,15),new Promise((function(n,r){var i=e.watchQuery(t,!1);e.fetchQueryRejectFns.set("query:"+i.queryId,r),i.result().then(n,r).then((function(){return e.fetchQueryRejectFns.delete("query:"+i.queryId)}))}))},t.prototype.generateQueryId=function(){return String(this.idCounter++)},t.prototype.stopQueryInStore=function(t){this.stopQueryInStoreNoBroadcast(t),this.broadcastQueries()},t.prototype.stopQueryInStoreNoBroadcast=function(t){this.stopPollingQuery(t),this.queryStore.stopQuery(t),this.invalidate(t)},t.prototype.addQueryListener=function(t,e){this.setQuery(t,(function(t){return t.listeners.add(e),{invalidated:!1}}))},t.prototype.updateQueryWatch=function(t,e,n){var r=this,i=this.getQuery(t).cancel;i&&i();return this.dataStore.getCache().watch({query:e,variables:n.variables,optimistic:!0,previousResult:function(){var e=null,n=r.getQuery(t).observableQuery;if(n){var i=n.getLastResult();i&&(e=i.data)}return e},callback:function(e){r.setQuery(t,(function(){return{invalidated:!0,newData:e}}))}})},t.prototype.addObservableQuery=function(t,e){this.setQuery(t,(function(){return{observableQuery:e}}))},t.prototype.removeObservableQuery=function(t){var e=this.getQuery(t).cancel;this.setQuery(t,(function(){return{observableQuery:null}})),e&&e()},t.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach((function(t){t(new f.a(16))}));var t=[];return this.queries.forEach((function(e,n){e.observableQuery&&t.push(n)})),this.queryStore.reset(t),this.mutationStore.reset(),this.dataStore.reset()},t.prototype.resetStore=function(){var t=this;return this.clearStore().then((function(){return t.reFetchObservableQueries()}))},t.prototype.reFetchObservableQueries=function(t){var e=this;void 0===t&&(t=!1);var n=[];return this.queries.forEach((function(r,i){var o=r.observableQuery;if(o){var a=o.options.fetchPolicy;o.resetLastResults(),"cache-only"===a||!t&&"standby"===a||n.push(o.refetch()),e.setQuery(i,(function(){return{newData:null}})),e.invalidate(i)}})),this.broadcastQueries(),Promise.all(n)},t.prototype.observeQuery=function(t,e,n){return this.addQueryListener(t,this.queryListenerForObserver(t,e,n)),this.fetchQuery(t,e)},t.prototype.startQuery=function(t,e,n){return this.addQueryListener(t,n),this.fetchQuery(t,e).catch((function(){})),t},t.prototype.startGraphQLSubscription=function(t){var e=this,n=t.query,r=t.fetchPolicy,i=t.variables;n=this.transform(n).document,i=this.getVariables(n,i);var a=function(t){return e.getObservableFromLink(n,{},t,!1).map((function(i){if(r&&"no-cache"===r||(e.dataStore.markSubscriptionResult(i,n,t),e.broadcastQueries()),Object(o.q)(i))throw new m({graphQLErrors:i.errors});return i}))};if(this.transform(n).hasClientExports){var u=this.localState.addExportedVariables(n,i).then(a);return new h((function(t){var e=null;return u.then((function(n){return e=n.subscribe(t)}),t.error),function(){return e&&e.unsubscribe()}}))}return a(i)},t.prototype.stopQuery=function(t){this.stopQueryNoBroadcast(t),this.broadcastQueries()},t.prototype.stopQueryNoBroadcast=function(t){this.stopQueryInStoreNoBroadcast(t),this.removeQuery(t)},t.prototype.removeQuery=function(t){this.fetchQueryRejectFns.delete("query:"+t),this.fetchQueryRejectFns.delete("fetchRequest:"+t),this.getQuery(t).subscriptions.forEach((function(t){return t.unsubscribe()})),this.queries.delete(t)},t.prototype.getCurrentQueryResult=function(t,e){void 0===e&&(e=!0);var n=t.options,r=n.variables,i=n.query,o=n.fetchPolicy,a=n.returnPartialData,u=t.getLastResult(),s=this.getQuery(t.queryId).newData;if(s&&s.complete)return{data:s.result,partial:!1};if("no-cache"===o||"network-only"===o)return{data:void 0,partial:!1};var c=this.dataStore.getCache().diff({query:i,variables:r,previousResult:u?u.data:void 0,returnPartialData:!0,optimistic:e}),f=c.result,l=c.complete;return{data:l||a?f:void 0,partial:!l}},t.prototype.getQueryWithPreviousResult=function(t){var e;if("string"===typeof t){var n=this.getQuery(t).observableQuery;Object(f.b)(n,17),e=n}else e=t;var r=e.options,i=r.variables,o=r.query;return{previousResult:this.getCurrentQueryResult(e,!1).data,variables:i,document:o}},t.prototype.broadcastQueries=function(){var t=this;this.onBroadcast(),this.queries.forEach((function(e,n){e.invalidated&&e.listeners.forEach((function(r){r&&r(t.queryStore.get(n),e.newData)}))}))},t.prototype.getLocalState=function(){return this.localState},t.prototype.getObservableFromLink=function(t,e,n,r){var a,u=this;void 0===r&&(r=this.queryDeduplication);var c=this.transform(t).serverQuery;if(c){var f=this.inFlightLinkObservables,l=this.link,d={query:c,variables:n,operationName:Object(o.n)(c)||void 0,context:this.prepareContext(Object(i.a)(Object(i.a)({},e),{forceFetch:!r}))};if(e=d.context,r){var p=f.get(c)||new Map;f.set(c,p);var g=JSON.stringify(n);if(!(a=p.get(g))){p.set(g,a=x(Object(s.execute)(l,d)));var m=function(){p.delete(g),p.size||f.delete(c),b.unsubscribe()},b=a.subscribe({next:m,error:m,complete:m})}}else a=x(Object(s.execute)(l,d))}else a=h.of({data:{}}),e=this.prepareContext(e);var v=this.transform(t).clientQuery;return v&&(a=function(t,e){return new h((function(n){var r=n.next,i=n.error,o=n.complete,a=0,u=!1,s={next:function(t){++a,new Promise((function(n){n(e(t))})).then((function(t){--a,r&&r.call(n,t),u&&s.complete()}),(function(t){--a,i&&i.call(n,t)}))},error:function(t){i&&i.call(n,t)},complete:function(){u=!0,a||o&&o.call(n)}},c=t.subscribe(s);return function(){return c.unsubscribe()}}))}(a,(function(t){return u.localState.runResolvers({document:v,remoteResult:t,context:e,variables:n})}))),a},t.prototype.fetchRequest=function(t){var e,n,i=this,o=t.requestId,a=t.queryId,u=t.document,s=t.options,c=t.fetchMoreForQueryId,f=s.variables,l=s.errorPolicy,d=void 0===l?"none":l,h=s.fetchPolicy;return new Promise((function(t,l){var g=i.getObservableFromLink(u,s.context,f),b="fetchRequest:"+a;i.fetchQueryRejectFns.set(b,l);var v=function(){i.fetchQueryRejectFns.delete(b),i.setQuery(a,(function(t){t.subscriptions.delete(y)}))},y=g.map((function(t){if(o>=i.getQuery(a).lastRequestId&&(i.markQueryResult(a,t,s,c),i.queryStore.markQueryResult(a,t,c),i.invalidate(a),i.invalidate(c),i.broadcastQueries()),"none"===d&&p(t.errors))return l(new m({graphQLErrors:t.errors}));if("all"===d&&(n=t.errors),c||"no-cache"===h)e=t.data;else{var r=i.dataStore.getCache().diff({variables:f,query:u,optimistic:!1,returnPartialData:!0}),g=r.result;(r.complete||s.returnPartialData)&&(e=g)}})).subscribe({error:function(t){v(),l(t)},complete:function(){v(),t({data:e,errors:n,loading:!1,networkStatus:r.ready,stale:!1})}});i.setQuery(a,(function(t){t.subscriptions.add(y)}))}))},t.prototype.getQuery=function(t){return this.queries.get(t)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},t.prototype.setQuery=function(t,e){var n=this.getQuery(t),r=Object(i.a)(Object(i.a)({},n),e(n));this.queries.set(t,r)},t.prototype.invalidate=function(t,e){void 0===e&&(e=!0),t&&this.setQuery(t,(function(){return{invalidated:e}}))},t.prototype.prepareContext=function(t){void 0===t&&(t={});var e=this.localState.prepareContext(t);return Object(i.a)(Object(i.a)({},e),{clientAwareness:this.clientAwareness})},t.prototype.checkInFlight=function(t){var e=this.queryStore.get(t);return e&&e.networkStatus!==r.ready&&e.networkStatus!==r.error},t.prototype.startPollingQuery=function(t,e,n){var r=this,o=t.pollInterval;if(Object(f.b)(o,18),!this.ssrMode){var a=this.pollingInfoByQueryId.get(e);a||this.pollingInfoByQueryId.set(e,a={}),a.interval=o,a.options=Object(i.a)(Object(i.a)({},t),{fetchPolicy:"network-only"});var u=function(){var t=r.pollingInfoByQueryId.get(e);t&&(r.checkInFlight(e)?s():r.fetchQuery(e,t.options,g.poll).then(s,s))},s=function(){var t=r.pollingInfoByQueryId.get(e);t&&(clearTimeout(t.timeout),t.timeout=setTimeout(u,t.interval))};n&&this.addQueryListener(e,n),s()}return e},t.prototype.stopPollingQuery=function(t){this.pollingInfoByQueryId.delete(t)},t}(),T=function(){function t(t){this.cache=t}return t.prototype.getCache=function(){return this.cache},t.prototype.markQueryResult=function(t,e,n,r,i){void 0===i&&(i=!1);var a=!Object(o.q)(t);i&&Object(o.q)(t)&&t.data&&(a=!0),!r&&a&&this.cache.write({result:t.data,dataId:"ROOT_QUERY",query:e,variables:n})},t.prototype.markSubscriptionResult=function(t,e,n){Object(o.q)(t)||this.cache.write({result:t.data,dataId:"ROOT_SUBSCRIPTION",query:e,variables:n})},t.prototype.markMutationInit=function(t){var e,n=this;t.optimisticResponse&&(e="function"===typeof t.optimisticResponse?t.optimisticResponse(t.variables):t.optimisticResponse,this.cache.recordOptimisticTransaction((function(r){var i=n.cache;n.cache=r;try{n.markMutationResult({mutationId:t.mutationId,result:{data:e},document:t.document,variables:t.variables,updateQueries:t.updateQueries,update:t.update})}finally{n.cache=i}}),t.mutationId))},t.prototype.markMutationResult=function(t){var e=this;if(!Object(o.q)(t.result)){var n=[{result:t.result.data,dataId:"ROOT_MUTATION",query:t.document,variables:t.variables}],r=t.updateQueries;r&&Object.keys(r).forEach((function(i){var a=r[i],u=a.query,s=a.updater,c=e.cache.diff({query:u.document,variables:u.variables,returnPartialData:!0,optimistic:!1}),f=c.result;if(c.complete){var l=Object(o.I)((function(){return s(f,{mutationResult:t.result,queryName:Object(o.n)(u.document)||void 0,queryVariables:u.variables})}));l&&n.push({result:l,dataId:"ROOT_QUERY",query:u.document,variables:u.variables})}})),this.cache.performTransaction((function(e){n.forEach((function(t){return e.write(t)}));var r=t.update;r&&Object(o.I)((function(){return r(e,t.result)}))}))}},t.prototype.markMutationComplete=function(t){var e=t.mutationId;t.optimisticResponse&&this.cache.removeOptimistic(e)},t.prototype.markUpdateQueryResult=function(t,e,n){this.cache.write({result:n,dataId:"ROOT_QUERY",variables:e,query:t})},t.prototype.reset=function(){return this.cache.reset()},t}(),$=function(){function t(t){var e=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=t.cache,r=t.ssrMode,i=void 0!==r&&r,o=t.ssrForceFetchDelay,a=void 0===o?0:o,u=t.connectToDevTools,c=t.queryDeduplication,l=void 0===c||c,d=t.defaultOptions,h=t.assumeImmutableResults,p=void 0!==h&&h,g=t.resolvers,m=t.typeDefs,b=t.fragmentMatcher,v=t.name,y=t.version,_=t.link;if(!_&&g&&(_=s.ApolloLink.empty()),!_||!n)throw new f.a(4);this.link=_,this.cache=n,this.store=new T(n),this.disableNetworkFetches=i||a>0,this.queryDeduplication=l,this.defaultOptions=d||{},this.typeDefs=m,a&&setTimeout((function(){return e.disableNetworkFetches=!1}),a),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this);"undefined"!==typeof u&&(u&&"undefined"!==typeof window)&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new O({cache:n,client:this,resolvers:g,fragmentMatcher:b}),this.queryManager=new M({link:this.link,store:this.store,queryDeduplication:l,ssrMode:i,clientAwareness:{name:v,version:y},localState:this.localState,assumeImmutableResults:p,onBroadcast:function(){e.devToolsHookCb&&e.devToolsHookCb({action:{},state:{queries:e.queryManager.queryStore.getStore(),mutations:e.queryManager.mutationStore.getStore()},dataWithOptimisticResults:e.cache.extract(!0)})}})}return t.prototype.stop=function(){this.queryManager.stop()},t.prototype.watchQuery=function(t){return this.defaultOptions.watchQuery&&(t=Object(i.a)(Object(i.a)({},this.defaultOptions.watchQuery),t)),!this.disableNetworkFetches||"network-only"!==t.fetchPolicy&&"cache-and-network"!==t.fetchPolicy||(t=Object(i.a)(Object(i.a)({},t),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(t)},t.prototype.query=function(t){return this.defaultOptions.query&&(t=Object(i.a)(Object(i.a)({},this.defaultOptions.query),t)),Object(f.b)("cache-and-network"!==t.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===t.fetchPolicy&&(t=Object(i.a)(Object(i.a)({},t),{fetchPolicy:"cache-first"})),this.queryManager.query(t)},t.prototype.mutate=function(t){return this.defaultOptions.mutate&&(t=Object(i.a)(Object(i.a)({},this.defaultOptions.mutate),t)),this.queryManager.mutate(t)},t.prototype.subscribe=function(t){return this.queryManager.startGraphQLSubscription(t)},t.prototype.readQuery=function(t,e){return void 0===e&&(e=!1),this.cache.readQuery(t,e)},t.prototype.readFragment=function(t,e){return void 0===e&&(e=!1),this.cache.readFragment(t,e)},t.prototype.writeQuery=function(t){var e=this.cache.writeQuery(t);return this.queryManager.broadcastQueries(),e},t.prototype.writeFragment=function(t){var e=this.cache.writeFragment(t);return this.queryManager.broadcastQueries(),e},t.prototype.writeData=function(t){var e=this.cache.writeData(t);return this.queryManager.broadcastQueries(),e},t.prototype.__actionHookForDevTools=function(t){this.devToolsHookCb=t},t.prototype.__requestRaw=function(t){return Object(s.execute)(this.link,t)},t.prototype.initQueryManager=function(){return this.queryManager},t.prototype.resetStore=function(){var t=this;return Promise.resolve().then((function(){return t.queryManager.clearStore()})).then((function(){return Promise.all(t.resetStoreCallbacks.map((function(t){return t()})))})).then((function(){return t.reFetchObservableQueries()}))},t.prototype.clearStore=function(){var t=this;return Promise.resolve().then((function(){return t.queryManager.clearStore()})).then((function(){return Promise.all(t.clearStoreCallbacks.map((function(t){return t()})))}))},t.prototype.onResetStore=function(t){var e=this;return this.resetStoreCallbacks.push(t),function(){e.resetStoreCallbacks=e.resetStoreCallbacks.filter((function(e){return e!==t}))}},t.prototype.onClearStore=function(t){var e=this;return this.clearStoreCallbacks.push(t),function(){e.clearStoreCallbacks=e.clearStoreCallbacks.filter((function(e){return e!==t}))}},t.prototype.reFetchObservableQueries=function(t){return this.queryManager.reFetchObservableQueries(t)},t.prototype.extract=function(t){return this.cache.extract(t)},t.prototype.restore=function(t){return this.cache.restore(t)},t.prototype.addResolvers=function(t){this.localState.addResolvers(t)},t.prototype.setResolvers=function(t){this.localState.setResolvers(t)},t.prototype.getResolvers=function(){return this.localState.getResolvers()},t.prototype.setLocalStateFragmentMatcher=function(t){this.localState.setFragmentMatcher(t)},t}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(306),i=n(30),o=n(305),a=n(22);function u(t,e){Object(a.a)(2,arguments);var n=Object(i.a)(e);return Object(o.a)(t,-n)}function s(t,e){if(Object(a.a)(2,arguments),!e||"object"!==typeof e)return new Date(NaN);var n=e.years?Object(i.a)(e.years):0,o=e.months?Object(i.a)(e.months):0,s=e.weeks?Object(i.a)(e.weeks):0,c=e.days?Object(i.a)(e.days):0,f=e.hours?Object(i.a)(e.hours):0,l=e.minutes?Object(i.a)(e.minutes):0,d=e.seconds?Object(i.a)(e.seconds):0,h=u(t,o+12*n),p=Object(r.a)(h,c+7*s),g=l+60*f,m=d+60*g,b=1e3*m,v=new Date(p.getTime()-b);return v}},function(t,e,n){var r=n(629),i=n(632);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,n){(function(e){var r=n(112),i=new(0,n(352).ec)("secp256k1"),o=n(755),a=e.alloc(32,0),u=e.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),s=e.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","hex"),c=i.curve.n,f=c.shrn(1),l=i.curve.g,d="Expected Private",h="Expected Point",p="Expected Tweak",g="Expected Hash";function m(t){return e.isBuffer(t)&&32===t.length}function b(t){return!!m(t)&&t.compare(u)<0}function v(t){if(!e.isBuffer(t))return!1;if(t.length<33)return!1;var n=t[0],r=t.slice(1,33);if(0===r.compare(a))return!1;if(r.compare(s)>=0)return!1;if((2===n||3===n)&&33===t.length){try{x(t)}catch(o){return!1}return!0}var i=t.slice(33);return 0!==i.compare(a)&&(!(i.compare(s)>=0)&&(4===n&&65===t.length))}function y(t){return 4!==t[0]}function _(t){return!!m(t)&&(t.compare(a)>0&&t.compare(u)<0)}function w(t,e){return void 0===t&&void 0!==e?y(e):void 0===t||t}function S(t){return new r(t)}function O(t){return t.toArrayLike(e,"be",32)}function x(t){return i.curve.decodePoint(t)}function E(t,n){return e.from(t._encode(n))}function M(t,n,r){if(!m(t))throw new TypeError(g);if(!_(n))throw new TypeError(d);if(void 0!==r&&!m(r))throw new TypeError("Expected Extra Data (32 bytes)");var i,a,u=S(n),s=S(t);o(t,n,(function(t){var e=S(t),n=l.mul(e);return!n.isInfinity()&&(0!==(i=n.x.umod(c)).isZero()&&0!==(a=e.invm(c).mul(s.add(u.mul(i))).umod(c)).isZero())}),_,r),a.cmp(f)>0&&(a=c.sub(a));var h=e.allocUnsafe(64);return O(i).copy(h,0),O(a).copy(h,32),h}t.exports={isPoint:v,isPointCompressed:function(t){return!!v(t)&&y(t)},isPrivate:_,pointAdd:function(t,e,n){if(!v(t))throw new TypeError(h);if(!v(e))throw new TypeError(h);var r=x(t),i=x(e),o=r.add(i);return o.isInfinity()?null:E(o,w(n,t))},pointAddScalar:function(t,e,n){if(!v(t))throw new TypeError(h);if(!b(e))throw new TypeError(p);var r=w(n,t),i=x(t);if(0===e.compare(a))return E(i,r);var o=S(e),u=l.mul(o),s=i.add(u);return s.isInfinity()?null:E(s,r)},pointCompress:function(t,e){if(!v(t))throw new TypeError(h);var n=x(t);if(n.isInfinity())throw new TypeError(h);return E(n,w(e,t))},pointFromScalar:function(t,e){if(!_(t))throw new TypeError(d);var n=S(t),r=l.mul(n);return r.isInfinity()?null:E(r,w(e))},pointMultiply:function(t,e,n){if(!v(t))throw new TypeError(h);if(!b(e))throw new TypeError(p);var r=w(n,t),i=x(t),o=S(e),a=i.mul(o);return a.isInfinity()?null:E(a,r)},privateAdd:function(t,e){if(!_(t))throw new TypeError(d);if(!b(e))throw new TypeError(p);var n=S(t),r=S(e),i=O(n.add(r).umod(c));return _(i)?i:null},privateSub:function(t,e){if(!_(t))throw new TypeError(d);if(!b(e))throw new TypeError(p);var n=S(t),r=S(e),i=O(n.sub(r).umod(c));return _(i)?i:null},sign:function(t,e){return M(t,e)},signWithEntropy:function(t,e,n){return M(t,e,n)},verify:function(t,n,r,i){if(!m(t))throw new TypeError(g);if(!v(n))throw new TypeError(h);if(!function(t){var n=t.slice(0,32),r=t.slice(32,64);return e.isBuffer(t)&&64===t.length&&n.compare(u)<0&&r.compare(u)<0}(r))throw new TypeError("Expected Signature");var o=x(n),a=S(r.slice(0,32)),s=S(r.slice(32,64));if(i&&s.cmp(f)>0)return!1;if(a.gtn(0)<=0)return!1;if(s.gtn(0)<=0)return!1;var d=S(t),p=s.invm(c),b=d.mul(p).umod(c),y=a.mul(p).umod(c),_=l.mulAdd(b,o,y);return!_.isInfinity()&&_.x.umod(c).eq(a)}}}).call(this,n(29).Buffer)},function(t,e,n){var r;function i(t){this.rand=t}if(t.exports=function(t){return r||(r=new i(null)),r.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),n=0;no)throw new RangeError("requested too many random bytes");var n=a.allocUnsafe(t);if(t>0)if(t>i)for(var s=0;s100)throw new TypeError("address string is too long");t=t.trim();var r=u.get(e);if(e&&!r)throw new TypeError("Unknown network");if(t.length>35){var i=p(t);if(!i.network||r&&r.name!==i.network.name)throw new TypeError("Address has mismatched network type.");if(!i.type||n&&n!==i.type)throw new TypeError("Address has mismatched type.");return i}var o=a.decode(t);return h._transformBuffer(o,e,n)},h.fromPublicKey=function(t,e){var n=h._transformPublicKey(t);return e=e||u.defaultNetwork,new h(n.hashBuffer,e,n.type)},h.fromPublicKeyHash=function(t,e){var n=h._transformHash(t);return new h(n.hashBuffer,e,h.PayToPublicKeyHash)},h.fromScriptHash=function(t,e){i.checkArgument(t,"hash parameter is required");var n=h._transformHash(t);return new h(n.hashBuffer,e,h.PayToScriptHash)},h.payingTo=function(t,e){return i.checkArgument(t,"script is required"),i.checkArgument(t instanceof v,"script must be instance of Script"),h.fromScriptHash(s.sha256ripemd160(t.toBuffer()),e)},h.fromScript=function(t,e){i.checkArgument(t instanceof v,"script must be a Script instance");var n=h._transformScript(t,e);return new h(n.hashBuffer,e,n.type)},h.fromBuffer=function(t,e,n){var r=h._transformBuffer(t,e,n);return new h(r.hashBuffer,r.network,r.type)},h.fromString=function(t,e,n){var r=h._transformString(t,e,n);return new h(r.hashBuffer,r.network,r.type)},h.fromObject=function(t){return i.checkState(c.isHexa(t.hash),'Unexpected hash property, "'+t.hash+'", expected to be hex.'),new h(e.from(t.hash,"hex"),t.network,t.type)},h.getValidationError=function(t,e,n){var r;try{new h(t,e,n)}catch(i){r=i}return r},h.isValid=function(t,e,n){return!h.getValidationError(t,e,n)},h.prototype.isPayToPublicKeyHash=function(){return this.type===h.PayToPublicKeyHash},h.prototype.isPayToScriptHash=function(){return this.type===h.PayToScriptHash},h.prototype.toBuffer=function(){var t=e.from([this.network[this.type]]);return e.concat([t,this.hashBuffer])},h.prototype.toObject=h.prototype.toJSON=function(){return{hash:this.hashBuffer.toString("hex"),type:this.type,network:this.network.toString()}},h.prototype.inspect=function(){return""},h.prototype.toCashBuffer=function(){var t=e.from([this.network[this.type]]);return e.concat([t,this.hashBuffer])},h.prototype.toLegacyAddress=function(){return a.encode(this.toBuffer())},h.prototype.toCashAddress=function(t){var e=this.network.prefixArray.concat([0]),n=function(t){switch(t){case"pubkeyhash":return 0;case"scripthash":return 8;default:throw new Error("Invalid type:"+t)}}(this.type)+function(t){switch(8*t.length){case 160:return 0;case 192:return 1;case 224:return 2;case 256:return 3;case 320:return 4;case 384:return 5;case 448:return 6;case 512:return 7;default:throw new Error("Invalid hash size:"+t.length)}}(this.hashBuffer),r=Array.prototype.slice.call(this.hashBuffer,0),i=d([n].concat(r),8,5),o=e.concat(i).concat([0,0,0,0,0,0,0,0]),a=i.concat(function(t){for(var e=[],n=0;n<8;++n)e.push(31&t),t/=32;return e.reverse()}(b(o)));return!0===t?l.encode(a):this.network.prefix+":"+l.encode(a)},h.prototype.toString=h.prototype.toCashAddress;var g=[152,121,243,174,30],m=[4072443489,3077413346,1046459332,783016616,1329849456];function b(t){for(var e=0,n=1,r=0,i=0;i>>3,e&=7,e<<=5,e|=n>>>27,n&=134217727,n<<=5,n^=t[i];for(var o=0;o1&&void 0!==arguments[1]&&arguments[1];return t&&(r(t.value)&&""!==t.value||e&&r(t.defaultValue)&&""!==t.defaultValue)}function o(t){return t.startAdornment}n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";function r(t){return"[object Function]"===Object.prototype.toString.call(t)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(22);function i(t){return Object(r.a)(1,arguments),t instanceof Date||"object"===typeof t&&"[object Date]"===Object.prototype.toString.call(t)}var o=n(25);function a(t){if(Object(r.a)(1,arguments),!i(t)&&"number"!==typeof t)return!1;var e=Object(o.a)(t);return!isNaN(Number(e))}},function(t,e,n){"use strict";var r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i="object"===("undefined"===typeof window?"undefined":r(window))&&"object"===("undefined"===typeof document?"undefined":r(document))&&9===document.nodeType;e.a=i},function(t,e,n){var r=n(956);t.exports=function(t,e){if(null==t)return{};var n,i,o=r(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}},,function(t,e,n){var r,i,o;!function(a){"use strict";"object"===typeof t.exports?t.exports=a():null!=n(148)?(i=[],void 0===(o="function"===typeof(r=a)?r.apply(e,i):r)||(t.exports=o)):self.sanctuaryTypeIdentifiers=a()}((function(){"use strict";var t="@@type",e=new RegExp("^([\\s\\S]+)/([\\s\\S]+?)(?:@([0-9]+))?$");function n(e){return null!=e&&null!=e.constructor&&e.constructor.prototype!==e&&"string"===typeof e.constructor[t]?e.constructor[t]:Object.prototype.toString.call(e).slice("[object ".length,-"]".length)}return n.parse=function(t){var n=e.exec(t);return{namespace:null==n||null==n[1]?null:n[1],name:null==n?t:n[2],version:null==n||null==n[3]?0:Number(n[3])}},n}))},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,u;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"))u="The ".concat(t," ").concat(r," ").concat(o(e,"type"));else{var s=function(t,e,n){return"number"!==typeof n&&(n=0),!(n+e.length>t.length)&&-1!==t.indexOf(e,n)}(t,".")?"property":"argument";u='The "'.concat(t,'" ').concat(s," ").concat(r," ").concat(o(e,"type"))}return u+=". 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(452),o=n(456);n(37)(c,i);for(var a=r(o.prototype),u=0;u=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=n(158),i=n(786);t.exports=i((function(t){var e=r("sha256").update(t).digest();return r("sha256").update(e).digest()}))},function(t,e,n){!function(e,r){var i;t.exports=(i=n(49),function(){var t=i,e=t.lib.WordArray;function n(t,n,r){for(var i=[],o=0,a=0;a>>6-a%4*2;i[o>>>2]|=(u|s)<<24-o%4*8,o++}return e.create(i,o)}t.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,u=0;u<4&&o+.75*u>>6*(3-u)&63));var s=r.charAt(64);if(s)for(;i.length%4;)i.push(s);return i.join("")},parse:function(t){var e=t.length,r=this._map,i=this._reverseMap;if(!i){i=this._reverseMap=[];for(var o=0;o>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=t[e+0],s=t[e+1],h=t[e+2],p=t[e+3],g=t[e+4],m=t[e+5],b=t[e+6],v=t[e+7],y=t[e+8],_=t[e+9],w=t[e+10],S=t[e+11],O=t[e+12],x=t[e+13],E=t[e+14],M=t[e+15],T=o[0],$=o[1],A=o[2],k=o[3];T=c(T,$,A,k,a,7,u[0]),k=c(k,T,$,A,s,12,u[1]),A=c(A,k,T,$,h,17,u[2]),$=c($,A,k,T,p,22,u[3]),T=c(T,$,A,k,g,7,u[4]),k=c(k,T,$,A,m,12,u[5]),A=c(A,k,T,$,b,17,u[6]),$=c($,A,k,T,v,22,u[7]),T=c(T,$,A,k,y,7,u[8]),k=c(k,T,$,A,_,12,u[9]),A=c(A,k,T,$,w,17,u[10]),$=c($,A,k,T,S,22,u[11]),T=c(T,$,A,k,O,7,u[12]),k=c(k,T,$,A,x,12,u[13]),A=c(A,k,T,$,E,17,u[14]),T=f(T,$=c($,A,k,T,M,22,u[15]),A,k,s,5,u[16]),k=f(k,T,$,A,b,9,u[17]),A=f(A,k,T,$,S,14,u[18]),$=f($,A,k,T,a,20,u[19]),T=f(T,$,A,k,m,5,u[20]),k=f(k,T,$,A,w,9,u[21]),A=f(A,k,T,$,M,14,u[22]),$=f($,A,k,T,g,20,u[23]),T=f(T,$,A,k,_,5,u[24]),k=f(k,T,$,A,E,9,u[25]),A=f(A,k,T,$,p,14,u[26]),$=f($,A,k,T,y,20,u[27]),T=f(T,$,A,k,x,5,u[28]),k=f(k,T,$,A,h,9,u[29]),A=f(A,k,T,$,v,14,u[30]),T=l(T,$=f($,A,k,T,O,20,u[31]),A,k,m,4,u[32]),k=l(k,T,$,A,y,11,u[33]),A=l(A,k,T,$,S,16,u[34]),$=l($,A,k,T,E,23,u[35]),T=l(T,$,A,k,s,4,u[36]),k=l(k,T,$,A,g,11,u[37]),A=l(A,k,T,$,v,16,u[38]),$=l($,A,k,T,w,23,u[39]),T=l(T,$,A,k,x,4,u[40]),k=l(k,T,$,A,a,11,u[41]),A=l(A,k,T,$,p,16,u[42]),$=l($,A,k,T,b,23,u[43]),T=l(T,$,A,k,_,4,u[44]),k=l(k,T,$,A,O,11,u[45]),A=l(A,k,T,$,M,16,u[46]),T=d(T,$=l($,A,k,T,h,23,u[47]),A,k,a,6,u[48]),k=d(k,T,$,A,v,10,u[49]),A=d(A,k,T,$,E,15,u[50]),$=d($,A,k,T,m,21,u[51]),T=d(T,$,A,k,O,6,u[52]),k=d(k,T,$,A,p,10,u[53]),A=d(A,k,T,$,w,15,u[54]),$=d($,A,k,T,s,21,u[55]),T=d(T,$,A,k,y,6,u[56]),k=d(k,T,$,A,M,10,u[57]),A=d(A,k,T,$,b,15,u[58]),$=d($,A,k,T,x,21,u[59]),T=d(T,$,A,k,g,6,u[60]),k=d(k,T,$,A,S,10,u[61]),A=d(A,k,T,$,h,15,u[62]),$=d($,A,k,T,_,21,u[63]),o[0]=o[0]+T|0,o[1]=o[1]+$|0,o[2]=o[2]+A|0,o[3]=o[3]+k|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this._process();for(var u=this._hash,s=u.words,c=0;c<4;c++){var f=s[c];s[c]=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8)}return u},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});function c(t,e,n,r,i,o,a){var u=t+(e&n|~e&r)+i+a;return(u<>>32-o)+e}function f(t,e,n,r,i,o,a){var u=t+(e&r|n&~r)+i+a;return(u<>>32-o)+e}function l(t,e,n,r,i,o,a){var u=t+(e^n^r)+i+a;return(u<>>32-o)+e}function d(t,e,n,r,i,o,a){var u=t+(n^(e|~r))+i+a;return(u<>>32-o)+e}e.MD5=o._createHelper(s),e.HmacMD5=o._createHmacHelper(s)}(Math),i.MD5)}()},function(t,e,n){"use strict";(function(e){var r=n(48),i=n(52),o=n(114),a=n(134),u=(n(29),n(63)),s=n(80),c=n(117),f=n(152),l=n(153),d=4294967295,h=d,p=Math.pow(2,31),g=Math.pow(2,22),m=65535,b=Math.pow(2,16)-1;function v(t){return this instanceof v?t?this._fromObject(t):void 0:new v(t)}v.MAXINT=d,v.DEFAULT_SEQNUMBER=h,v.DEFAULT_LOCKTIME_SEQNUMBER=4294967294,v.DEFAULT_RBF_SEQNUMBER=4294967293,v.SEQUENCE_LOCKTIME_TYPE_FLAG=g,Object.defineProperty(v.prototype,"script",{configurable:!1,enumerable:!0,get:function(){return this.isNull()?null:(this._script||(this._script=new c(this._scriptBuffer),this._script._isInput=!0),this._script)}}),v.fromObject=function(t){return i.checkArgument(r.isObject(t)),(new v)._fromObject(t)},v.prototype._fromObject=function(t){var n;if(n=r.isString(t.prevTxId)&&s.isHexa(t.prevTxId)?e.from(t.prevTxId,"hex"):t.prevTxId,this.output=t.output?t.output instanceof l?t.output:new l(t.output):void 0,this.prevTxId=n||t.txidbuf,this.outputIndex=r.isUndefined(t.outputIndex)?t.txoutnum:t.outputIndex,this.sequenceNumber=r.isUndefined(t.sequenceNumber)?r.isUndefined(t.seqnum)?h:t.seqnum:t.sequenceNumber,r.isUndefined(t.script)&&r.isUndefined(t.scriptBuffer))throw new o.Transaction.Input.MissingScript;return this.setScript(t.scriptBuffer||t.script),this},v.prototype.toObject=v.prototype.toJSON=function(){var t={prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,sequenceNumber:this.sequenceNumber,script:this._scriptBuffer.toString("hex")};return this.script&&(t.scriptString=this.script.toString()),this.output&&(t.output=this.output.toObject()),t},v.fromBufferReader=function(t){var e=new v;return e.prevTxId=t.readReverse(32),e.outputIndex=t.readUInt32LE(),e._scriptBuffer=t.readVarLengthBuffer(),e.sequenceNumber=t.readUInt32LE(),e},v.prototype.toBufferWriter=function(t){t||(t=new a),t.writeReverse(this.prevTxId),t.writeUInt32LE(this.outputIndex);var e=this._scriptBuffer;return t.writeVarintNum(e.length),t.write(e),t.writeUInt32LE(this.sequenceNumber),t},v.prototype.setScript=function(t){if(this._script=null,t instanceof c)this._script=t,this._script._isInput=!0,this._scriptBuffer=t.toBuffer();else if(null===t)this._script=c.empty(),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else if(s.isHexa(t))this._scriptBuffer=e.from(t,"hex");else if(r.isString(t))this._script=new c(t),this._script._isInput=!0,this._scriptBuffer=this._script.toBuffer();else{if(!u.isBuffer(t))throw new TypeError("Invalid argument type: script");this._scriptBuffer=e.from(t)}return this},v.prototype.getSignatures=function(){throw new o.AbstractMethodInvoked("Trying to sign unsupported output type (only P2PKH and P2SH multisig inputs are supported) for input: "+JSON.stringify(this))},v.prototype.isFullySigned=function(){throw new o.AbstractMethodInvoked("Input#isFullySigned")},v.prototype.isFinal=function(){return 4294967295!==this.sequenceNumber},v.prototype.addSignature=function(){throw new o.AbstractMethodInvoked("Input#addSignature")},v.prototype.clearSignatures=function(){throw new o.AbstractMethodInvoked("Input#clearSignatures")},v.prototype.isValidSignature=function(t,e,n){return e.signature.nhashtype=e.sigtype,f.verify(t,e.signature,e.publicKey,e.inputIndex,this.output.script,this.output.satoshisBN,void 0,n)},v.prototype.isNull=function(){return"0000000000000000000000000000000000000000000000000000000000000000"===this.prevTxId.toString("hex")&&4294967295===this.outputIndex},v.prototype._estimateSize=function(){return this.toBufferWriter().toBuffer().length},v.prototype.lockForSeconds=function(t){if(i.checkArgument(r.isNumber(t)),t<0||t>=33553920)throw new o.Transaction.Input.LockTimeRange;return t=parseInt(Math.floor(t/512)),this.sequenceNumber=t|g,this},v.prototype.lockUntilBlockHeight=function(t){if(i.checkArgument(r.isNumber(t)),t<0||t>=b)throw new o.Transaction.Input.BlockHeightOutOfRange;return this.sequenceNumber=t,this},v.prototype.getLockTime=function(){return this.sequenceNumber&p?null:this.sequenceNumber&g?512*(this.sequenceNumber&m):this.sequenceNumber&m},t.exports=v}).call(this,n(29).Buffer)},function(t,e){"function"===typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,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(e){var r=n(48),i=n(52),o=n(206),a=n(63),u=n(80),s=n(101),c=n(114),f=n(100);function l(t){if(!(this instanceof l))return new l(t);if(t instanceof l)return t;if(r.isObject(t))return this._fromObject(t);throw new c.InvalidArgument("TransactionSignatures must be instantiated from an object")}o(l,f),l.prototype._fromObject=function(t){return this._checkObjectArgs(t),this.publicKey=new s(t.publicKey),this.prevTxId=a.isBuffer(t.prevTxId)?t.prevTxId:e.from(t.prevTxId,"hex"),this.outputIndex=t.outputIndex,this.inputIndex=t.inputIndex,this.signature=t.signature instanceof f?t.signature:a.isBuffer(t.signature)?f.fromBuffer(t.signature):f.fromString(t.signature),this.sigtype=t.sigtype,this},l.prototype._checkObjectArgs=function(t){i.checkArgument(s(t.publicKey),"publicKey"),i.checkArgument(!r.isUndefined(t.inputIndex),"inputIndex"),i.checkArgument(!r.isUndefined(t.outputIndex),"outputIndex"),i.checkState(r.isNumber(t.inputIndex),"inputIndex must be a number"),i.checkState(r.isNumber(t.outputIndex),"outputIndex must be a number"),i.checkArgument(t.signature,"signature"),i.checkArgument(t.prevTxId,"prevTxId"),i.checkState(t.signature instanceof f||a.isBuffer(t.signature)||u.isHexa(t.signature),"signature must be a buffer or hexa value"),i.checkState(a.isBuffer(t.prevTxId)||u.isHexa(t.prevTxId),"prevTxId must be a buffer or hexa value"),i.checkArgument(t.sigtype,"sigtype"),i.checkState(r.isNumber(t.sigtype),"sigtype must be a number")},l.prototype.toObject=l.prototype.toJSON=function(){return{publicKey:this.publicKey.toString(),prevTxId:this.prevTxId.toString("hex"),outputIndex:this.outputIndex,inputIndex:this.inputIndex,signature:this.signature.toString(),sigtype:this.sigtype}},l.fromObject=function(t){return i.checkArgument(t),new l(t)},t.exports=l}).call(this,n(29).Buffer)},function(t,e,n){"use strict";var r=n(58),i=n(17),o=n(393),a=n(4),u=["xs","sm","md","lg","xl"];function s(t){var e=t.values,n=void 0===e?{xs:0,sm:600,md:960,lg:1280,xl:1920}:e,r=t.unit,o=void 0===r?"px":r,s=t.step,c=void 0===s?5:s,f=Object(i.a)(t,["values","unit","step"]);function l(t){var e="number"===typeof n[t]?n[t]:t;return"@media (min-width:".concat(e).concat(o,")")}function d(t,e){var r=u.indexOf(e);return r===u.length-1?l(t):"@media (min-width:".concat("number"===typeof n[t]?n[t]:t).concat(o,") and ")+"(max-width:".concat((-1!==r&&"number"===typeof n[u[r+1]]?n[u[r+1]]:e)-c/100).concat(o,")")}return Object(a.a)({keys:u,values:n,up:l,down:function(t){var e=u.indexOf(t)+1,r=n[u[e]];return e===u.length?l("xs"):"@media (max-width:".concat(("number"===typeof r&&e>0?r:t)-c/100).concat(o,")")},between:d,only:function(t){return d(t,t)},width:function(t){return n[t]}},f)}function c(t,e,n){var i;return Object(a.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(a.a)({paddingLeft:e(2),paddingRight:e(2)},n,Object(r.a)({},t.up("sm"),Object(a.a)({paddingLeft:e(3),paddingRight:e(3)},n[t.up("sm")])))},toolbar:(i={minHeight:56},Object(r.a)(i,"".concat(t.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(i,t.up("sm"),{minHeight:64}),i)},n)}var f=n(284),l={black:"#000",white:"#fff"},d={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},h={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},p={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},g={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},b={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},y=n(35),_={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:l.white,default:d[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:l.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:d[800],default:"#303030"},action:{active:l.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function S(t,e,n,r){var i=r.light||r,o=r.dark||1.5*r;t[e]||(t.hasOwnProperty(n)?t[e]=t[n]:"light"===e?t.light=Object(y.i)(t.main,i):"dark"===e&&(t.dark=Object(y.a)(t.main,o)))}function O(t){var e=t.primary,n=void 0===e?{light:h[300],main:h[500],dark:h[700]}:e,r=t.secondary,u=void 0===r?{light:p.A200,main:p.A400,dark:p.A700}:r,s=t.error,c=void 0===s?{light:g[300],main:g[500],dark:g[700]}:s,O=t.warning,x=void 0===O?{light:m[300],main:m[500],dark:m[700]}:O,E=t.info,M=void 0===E?{light:b[300],main:b[500],dark:b[700]}:E,T=t.success,$=void 0===T?{light:v[300],main:v[500],dark:v[700]}:T,A=t.type,k=void 0===A?"light":A,C=t.contrastThreshold,I=void 0===C?3:C,P=t.tonalOffset,N=void 0===P?.2:P,R=Object(i.a)(t,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function j(t){return Object(y.e)(t,w.text.primary)>=I?w.text.primary:_.text.primary}var D=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(t=Object(a.a)({},t)).main&&t[e]&&(t.main=t[e]),!t.main)throw new Error(Object(f.a)(4,e));if("string"!==typeof t.main)throw new Error(Object(f.a)(5,JSON.stringify(t.main)));return S(t,"light",n,N),S(t,"dark",r,N),t.contrastText||(t.contrastText=j(t.main)),t},L={dark:w,light:_};return Object(o.a)(Object(a.a)({common:l,type:k,primary:D(n),secondary:D(u,"A400","A200","A700"),error:D(c),warning:D(x),info:D(M),success:D($),grey:d,contrastThreshold:I,getContrastText:j,augmentColor:D,tonalOffset:N},L[k]),R)}function x(t){return Math.round(1e5*t)/1e5}var E={textTransform:"uppercase"},M='"Roboto", "Helvetica", "Arial", sans-serif';function T(t,e){var n="function"===typeof e?e(t):e,r=n.fontFamily,u=void 0===r?M:r,s=n.fontSize,c=void 0===s?14:s,f=n.fontWeightLight,l=void 0===f?300:f,d=n.fontWeightRegular,h=void 0===d?400:d,p=n.fontWeightMedium,g=void 0===p?500:p,m=n.fontWeightBold,b=void 0===m?700:m,v=n.htmlFontSize,y=void 0===v?16:v,_=n.allVariants,w=n.pxToRem,S=Object(i.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var O=c/14,T=w||function(t){return"".concat(t/y*O,"rem")},$=function(t,e,n,r,i){return Object(a.a)({fontFamily:u,fontWeight:t,fontSize:T(e),lineHeight:n},u===M?{letterSpacing:"".concat(x(r/e),"em")}:{},i,_)},A={h1:$(l,96,1.167,-1.5),h2:$(l,60,1.2,-.5),h3:$(h,48,1.167,0),h4:$(h,34,1.235,.25),h5:$(h,24,1.334,0),h6:$(g,20,1.6,.15),subtitle1:$(h,16,1.75,.15),subtitle2:$(g,14,1.57,.1),body1:$(h,16,1.5,.15),body2:$(h,14,1.43,.15),button:$(g,14,1.75,.4,E),caption:$(h,12,1.66,.4),overline:$(h,12,2.66,1,E)};return Object(o.a)(Object(a.a)({htmlFontSize:y,pxToRem:T,round:x,fontFamily:u,fontSize:c,fontWeightLight:l,fontWeightRegular:h,fontWeightMedium:g,fontWeightBold:b},A),S,{clone:!1})}function $(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var A=["none",$(0,2,1,-1,0,1,1,0,0,1,3,0),$(0,3,1,-2,0,2,2,0,0,1,5,0),$(0,3,3,-2,0,3,4,0,0,1,8,0),$(0,2,4,-1,0,4,5,0,0,1,10,0),$(0,3,5,-1,0,5,8,0,0,1,14,0),$(0,3,5,-1,0,6,10,0,0,1,18,0),$(0,4,5,-2,0,7,10,1,0,2,16,1),$(0,5,5,-3,0,8,10,1,0,3,14,2),$(0,5,6,-3,0,9,12,1,0,3,16,2),$(0,6,6,-3,0,10,14,1,0,4,18,3),$(0,6,7,-4,0,11,15,1,0,4,20,3),$(0,7,8,-4,0,12,17,2,0,5,22,4),$(0,7,8,-4,0,13,19,2,0,5,24,4),$(0,7,9,-4,0,14,21,2,0,5,26,4),$(0,8,9,-5,0,15,22,2,0,6,28,5),$(0,8,10,-5,0,16,24,2,0,6,30,5),$(0,8,11,-5,0,17,26,2,0,6,32,5),$(0,9,11,-5,0,18,28,2,0,7,34,6),$(0,9,12,-6,0,19,29,2,0,7,36,6),$(0,10,13,-6,0,20,31,3,0,8,38,7),$(0,10,13,-6,0,21,33,3,0,8,40,7),$(0,10,14,-6,0,22,35,3,0,8,42,7),$(0,11,14,-7,0,23,36,3,0,9,44,8),$(0,11,15,-7,0,24,38,3,0,9,46,8)],k={borderRadius:4},C=n(1144);function I(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(t.mui)return t;var e=Object(C.a)({spacing:t}),n=function(){for(var t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=t.breakpoints,n=void 0===e?{}:e,r=t.mixins,a=void 0===r?{}:r,u=t.palette,f=void 0===u?{}:u,l=t.spacing,d=t.typography,h=void 0===d?{}:d,p=Object(i.a)(t,["breakpoints","mixins","palette","spacing","typography"]),g=O(f),m=s(n),b=I(l),v=Object(o.a)({breakpoints:m,direction:"ltr",mixins:c(m,b,a),overrides:{},palette:g,props:{},shadows:A,typography:T(g,h),spacing:b,shape:k,transitions:P.a,zIndex:N.a},p),y=arguments.length,_=new Array(y>1?y-1:0),w=1;w0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))}));e.a=a},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(162),i=n(57);function o(t,e,n){return function(){for(var a=[],u=0,s=t,c=0;c=arguments.length)?f=e[c]:(f=arguments[u],u+=1),a[c]=f,Object(i.a)(f)||(s-=1),c+=1}return s<=0?n.apply(this,a):Object(r.a)(s,o(t,a,n))}}},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";var r=n(61);e.a="function"===typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1,i=arguments.length;n1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,i=new Array(r),o=0;o=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(u+1,0,d),h.setUTCHours(0,0,0,0);var p=Object(o.a)(h,e),g=new Date(0);g.setUTCFullYear(u,0,d),g.setUTCHours(0,0,0,0);var m=Object(o.a)(g,e);return n.getTime()>=p.getTime()?u+1:n.getTime()>=m.getTime()?u:u-1}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(25),i=n(22);function o(t,e){Object(i.a)(2,arguments);var n=Object(r.a)(t),o=Object(r.a)(e),a=n.getFullYear()-o.getFullYear(),u=n.getMonth()-o.getMonth();return 12*a+u}var a=n(126),u=n(308);function s(t){Object(i.a)(1,arguments);var e=Object(r.a)(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function c(t){Object(i.a)(1,arguments);var e=Object(r.a)(t);return Object(u.a)(e).getTime()===s(e).getTime()}function f(t,e){Object(i.a)(2,arguments);var n,u=Object(r.a)(t),s=Object(r.a)(e),f=Object(a.a)(u,s),l=Math.abs(o(u,s));if(l<1)n=0;else{1===u.getMonth()&&u.getDate()>27&&u.setDate(30),u.setMonth(u.getMonth()-f*l);var d=Object(a.a)(u,s)===-f;c(Object(r.a)(t))&&1===l&&1===Object(a.a)(t,s)&&(d=!1),n=f*(l-Number(d))}return 0===n?0:n}},function(t,e,n){"use strict";var r=n(16),i=n(329),o=Object(r.a)((function(t,e){return Object(i.a)((n=t,function(){return!n.apply(this,arguments)}),e);var n}));e.a=o},function(t,e,n){"use strict";function r(t,e){var n=function(t){if(!o[t]){var e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:"America/New_York",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(new Date("2014-06-25T04:00:00.123Z")),n="06/25/2014, 00:00:00"===e||"\u200e06\u200e/\u200e25\u200e/\u200e2014\u200e \u200e00\u200e:\u200e00\u200e:\u200e00"===e;o[t]=n?new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):new Intl.DateTimeFormat("en-US",{hourCycle:"h23",timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}return o[t]}(e);return n.formatToParts?function(t,e){for(var n=t.formatToParts(e),r=[],o=0;o=0&&(r[a]=parseInt(n[o].value,10))}return r}(n,t):function(t,e){var n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n);return[r[3],r[1],r[2],r[4],r[5],r[6]]}(n,t)}n.d(e,"a",(function(){return s}));var i={year:0,month:1,day:2,hour:3,minute:4,second:5};var o={};var a=36e5,u={timezone:/([Z+-].*)$/,timezoneZ:/^(Z)$/,timezoneHH:/^([+-])(\d{2})$/,timezoneHHMM:/^([+-])(\d{2}):?(\d{2})$/};function s(t,e,n){var r,i,o;if(r=u.timezoneZ.exec(t))return 0;if(r=u.timezoneHH.exec(t))return f(o=parseInt(r[2],10))?(i=o*a,"+"===r[1]?-i:i):NaN;if(r=u.timezoneHHMM.exec(t)){o=parseInt(r[2],10);var s=parseInt(r[3],10);return f(o,s)?(i=o*a+6e4*s,"+"===r[1]?-i:i):NaN}if(function(t){try{return Intl.DateTimeFormat(void 0,{timeZone:t}),!0}catch(e){return!1}}(t)){e=new Date(e||Date.now());var l=c(n?e:function(t){return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}(e),t);return-(n?l:function(t,e,n){var r=t.getTime()-e,i=c(new Date(r),n);if(e===i)return e;r-=i-e;var o=c(new Date(r),n);if(i===o)return i;return Math.max(i,o)}(e,l,t))}return 0}function c(t,e){var n=r(t,e),i=Date.UTC(n[0],n[1]-1,n[2],n[3]%24,n[4],n[5]),o=t.getTime(),a=o%1e3;return i-(o-=a>=0?a:1e3+a)}function f(t,e){return null==e||!(e<0||e>59)}},function(t,e,n){"use strict";function r(t,e,n){for(var r=0,i=n.length;r":l(n,r)},r=function(t,e){return Object(o.a)((function(e){return a(e)+": "+n(t[e])}),e.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+Object(o.a)(n,t).join(", ")+"))";case"[object Array]":return"["+Object(o.a)(n,t).concat(r(t,Object(f.a)((function(t){return/^\d+$/.test(t)}),Object(c.a)(t)))).join(", ")+"]";case"[object Boolean]":return"object"===typeof t?"new Boolean("+n(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?n(NaN):a(s(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"===typeof t?"new Number("+n(t.valueOf())+")":1/t===-1/0?"-0":t.toString(10);case"[object String]":return"object"===typeof t?"new String("+n(t.valueOf())+")":a(t);case"[object Undefined]":return"undefined";default:if("function"===typeof t.toString){var u=t.toString();if("[object Object]"!==u)return u}return"{"+r(t,Object(c.a)(t)).join(", ")+"}"}}var d=Object(r.a)((function(t){return l(t,[])}));e.a=d},function(t,e,n){var r=n(254),i=n(621),o=n(622),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){var r=n(647);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){"use strict";var r=n(178);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){var n=o.default.memo(o.default.forwardRef((function(e,n){return o.default.createElement(a.default,(0,i.default)({ref:n},e),t)})));0;return n.muiName=a.default.muiName,n};var i=r(n(81)),o=r(n(1)),a=r(n(433))},function(t,e,n){(function(t){var r=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),n={},r=0;r=o)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return t}})),s=r[n];n=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),p(n)?r.showHidden=n:n&&e._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=s),f(r,t,r.depth)}function s(t,e){var n=u.styles[e];return n?"\x1b["+u.colors[n][0]+"m"+t+"\x1b["+u.colors[n][1]+"m":t}function c(t,e){return t}function f(t,n,r){if(t.customInspect&&n&&O(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,t);return b(i)||(i=f(t,i,r)),i}var o=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(b(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(m(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,n);if(o)return o;var a=Object.keys(n),u=function(t){var e={};return t.forEach((function(t,n){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),S(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(n);if(0===a.length){if(O(n)){var s=n.name?": "+n.name:"";return t.stylize("[Function"+s+"]","special")}if(y(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(w(n))return t.stylize(Date.prototype.toString.call(n),"date");if(S(n))return l(n)}var c,_="",x=!1,E=["{","}"];(h(n)&&(x=!0,E=["[","]"]),O(n))&&(_=" [Function"+(n.name?": "+n.name:"")+"]");return y(n)&&(_=" "+RegExp.prototype.toString.call(n)),w(n)&&(_=" "+Date.prototype.toUTCString.call(n)),S(n)&&(_=" "+l(n)),0!==a.length||x&&0!=n.length?r<0?y(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=x?function(t,e,n,r,i){for(var o=[],a=0,u=e.length;a=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(c,_,E)):E[0]+_+E[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,n,r,i,o){var a,u,s;if((s=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?u=s.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):s.set&&(u=t.stylize("[Setter]","special")),$(r,i)||(a="["+i+"]"),u||(t.seen.indexOf(s.value)<0?(u=g(n)?f(t,s.value,null):f(t,s.value,n-1)).indexOf("\n")>-1&&(u=o?u.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+u.split("\n").map((function(t){return" "+t})).join("\n")):u=t.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return u;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+u}function h(t){return Array.isArray(t)}function p(t){return"boolean"===typeof t}function g(t){return null===t}function m(t){return"number"===typeof t}function b(t){return"string"===typeof t}function v(t){return void 0===t}function y(t){return _(t)&&"[object RegExp]"===x(t)}function _(t){return"object"===typeof t&&null!==t}function w(t){return _(t)&&"[object Date]"===x(t)}function S(t){return _(t)&&("[object Error]"===x(t)||t instanceof Error)}function O(t){return"function"===typeof t}function x(t){return Object.prototype.toString.call(t)}function E(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(n){if(v(o)&&(o=Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TYPE_CHECK_SANCTUARY:"false",REACT_APP_BUILD_TARGET:"LAMASSU"}).NODE_DEBUG||""),n=n.toUpperCase(),!a[n])if(new RegExp("\\b"+n+"\\b","i").test(o)){var r=t.pid;a[n]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",n,r,t)}}else a[n]=function(){};return a[n]},e.inspect=u,u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=h,e.isBoolean=p,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=m,e.isString=b,e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=v,e.isRegExp=y,e.isObject=_,e.isDate=w,e.isError=S,e.isFunction=O,e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=n(720);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var t=new Date,e=[E(t.getHours()),E(t.getMinutes()),E(t.getSeconds())].join(":");return[t.getDate(),M[t.getMonth()],e].join(" ")}function $(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",T(),e.format.apply(e,arguments))},e.inherits=n(721),e._extend=function(t,e){if(!e||!_(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t};var A="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function k(t,e){if(!t){var n=new Error("Promise was rejected with a falsy value");n.reason=t,t=n}return e(t)}e.promisify=function(t){if("function"!==typeof t)throw new TypeError('The "original" argument must be of type Function');if(A&&t[A]){var e;if("function"!==typeof(e=t[A]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,A,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,n,r=new Promise((function(t,r){e=t,n=r})),i=[],o=0;o=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;o0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,u=s,console&&console.warn&&console.warn(u)}return t}function d(){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 h(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=d.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 u=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw u.context=a,u}var s=i[t];if(void 0===s)return!1;if("function"===typeof s)o(s,this,e);else{var c=s.length,f=m(s,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},u.prototype.listeners=function(t){return p(this,t,!0)},u.prototype.rawListeners=function(t){return p(this,t,!1)},u.listenerCount=function(t,e){return"function"===typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},u.prototype.listenerCount=g,u.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"===typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"===typeof t},e.isString=function(t){return"string"===typeof t},e.isSymbol=function(t){return"symbol"===typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"===typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"===typeof t},e.isPrimitive=function(t){return null===t||"boolean"===typeof t||"number"===typeof t||"string"===typeof t||"symbol"===typeof t||"undefined"===typeof t},e.isBuffer=t.isBuffer}).call(this,n(29).Buffer)},function(t,e,n){"use strict";var r=n(36).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=s,this.end=c,e=4;break;case"utf8":this.fillLast=u,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=d,void(this.end=h)}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 u(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!==(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!==(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!==(192&e[2]))return t.lastNeed=2,"\ufffd"}}(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 s(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 d(t){return t.toString(this.encoding)}function h(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){(function(e){t.exports=function(t,n){for(var r=Math.min(t.length,n.length),i=new e(r),o=0;o>>=8)}return n},t.exports=i}).call(this,n(70),n(29).Buffer)},function(t,e,n){"use strict";var r=n(178);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n(1)),o=(0,r(n(233)).default)(i.default.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext");e.default=o},function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:.15;return c(t)>.5?f(t,e):l(t,e)},e.fade=function(t,e){t=u(t),e=i(e),("rgb"===t.type||"hsl"===t.type)&&(t.type+="a");return t.values[3]=e,s(t)},e.darken=f,e.lighten=l;var r=n(40);function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),n)}function o(t){t=t.substr(1);var e=new RegExp(".{1,".concat(t.length>=6?2:1,"}"),"g"),n=t.match(e);return n&&1===n[0].length&&(n=n.map((function(t){return t+t}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(t,e){return e<3?parseInt(t,16):Math.round(parseInt(t,16)/255*1e3)/1e3})).join(", "),")"):""}function a(t){var e=(t=u(t)).values,n=e[0],r=e[1]/100,i=e[2]/100,o=r*Math.min(i,1-i),a=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+n/30)%12;return i-o*Math.max(Math.min(e-3,9-e,1),-1)},c="rgb",f=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===t.type&&(c+="a",f.push(e[3])),s({type:c,values:f})}function u(t){if(t.type)return t;if("#"===t.charAt(0))return u(o(t));var e=t.indexOf("("),n=t.substring(0,e);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error((0,r.formatMuiErrorMessage)(3,t));var i=t.substring(e+1,t.length-1).split(",");return{type:n,values:i=i.map((function(t){return parseFloat(t)}))}}function s(t){var e=t.type,n=t.values;return-1!==e.indexOf("rgb")?n=n.map((function(t,e){return e<3?parseInt(t,10):t})):-1!==e.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(e,"(").concat(n.join(", "),")")}function c(t){var e="hsl"===(t=u(t)).type?u(a(t)).values:t.values;return e=e.map((function(t){return(t/=255)<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)})),Number((.2126*e[0]+.7152*e[1]+.0722*e[2]).toFixed(3))}function f(t,e){if(t=u(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]*=1-e;else if(-1!==t.type.indexOf("rgb"))for(var n=0;n<3;n+=1)t.values[n]*=1-e;return s(t)}function l(t,e){if(t=u(t),e=i(e),-1!==t.type.indexOf("hsl"))t.values[2]+=(100-t.values[2])*e;else if(-1!==t.type.indexOf("rgb"))for(var n=0;n<3;n+=1)t.values[n]+=(255-t.values[n])*e;return s(t)}},function(t,e,n){"use strict";function r(t){return"[object Number]"===Object.prototype.toString.call(t)}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(51),i=n(213);var o=n(293);function a(t,e,n){return(a=Object(o.a)()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Object(i.a)(o,n.prototype),o}).apply(null,arguments)}function u(t){var e="function"===typeof Map?new Map:void 0;return(u=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!==typeof t)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof e){if(e.has(t))return e.get(t);e.set(t,o)}function o(){return a(t,arguments,Object(r.a)(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Object(i.a)(o,t)})(t)}},,,function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,n){var r=n(147).Symbol;t.exports=r},function(t,e,n){var r=n(177)(Object,"create");t.exports=r},function(t,e,n){var r=n(637),i=n(638),o=n(639),a=n(640),u=n(641);function s(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e>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=n(149),i=n(113),o=i.getNAF,a=i.getJSF,u=i.assert;function s(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=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(t,e){u(t.precomputed);var n=t._getDoubles(),r=o(e,1,this._bitLength),i=(1<=a;f--)s=(s<<1)+r[f];c.push(s)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,s=s.dblp(f),c<0)break;var l=a[c];u(0!==l),s="affine"===t.type?l>0?s.mixedAdd(i[l-1>>1]):s.mixedAdd(i[-l-1>>1].neg()):l>0?s.add(i[l-1>>1]):s.add(i[-l-1>>1].neg())}return"affine"===t.type?s.toP():s},s.prototype._wnafMulAdd=function(t,e,n,r,i){var u,s,c,f=this._wnafT1,l=this._wnafT2,d=this._wnafT3,h=0;for(u=0;u=1;u-=2){var g=u-1,m=u;if(1===f[g]&&1===f[m]){var b=[e[g],null,null,e[m]];0===e[g].y.cmp(e[m].y)?(b[1]=e[g].add(e[m]),b[2]=e[g].toJ().mixedAdd(e[m].neg())):0===e[g].y.cmp(e[m].y.redNeg())?(b[1]=e[g].toJ().mixedAdd(e[m]),b[2]=e[g].add(e[m].neg())):(b[1]=e[g].toJ().mixedAdd(e[m]),b[2]=e[g].toJ().mixedAdd(e[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=a(n[g],n[m]);for(h=Math.max(y[0].length,h),d[g]=new Array(h),d[m]=new Array(h),s=0;s=0;u--){for(var x=0;u>=0;){var E=!0;for(s=0;s=0&&x++,S=S.dblp(x),u<0)break;for(s=0;s0?c=l[s][M-1>>1]:M<0&&(c=l[s][-M-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(u=0;u=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;in)?e=("rmd160"===t?new s:c(t)).update(e).digest():e.length=0;c--)if(f[c]!==l[c])return!1;for(c=f.length-1;c>=0;c--)if(!y(t[u=f[c]],e[u],n,r))return!1;return!0}(t,e,n,r))}return n?t===e:t==e}function _(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(n){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function S(t,e,n,r){var i;if("function"!==typeof e)throw new TypeError('"block" argument must be a function');"string"===typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(n){e=n}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&b(i,n,"Missing expected exception"+r);var o="string"===typeof r,u=!t&&i&&!n;if((!t&&a.isError(i)&&o&&w(i,n)||u)&&b(i,n,"Got unwanted exception"+r),t&&i&&n&&!w(i,n)||!t&&i)throw i}d.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return g(m(t.actual),128)+" "+t.operator+" "+g(m(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var n=new Error;if(n.stack){var r=n.stack,i=p(e),o=r.indexOf("\n"+i);if(o>=0){var a=r.indexOf("\n",o+1);r=r.substring(a+1)}this.stack=r}}},a.inherits(d.AssertionError,Error),d.fail=b,d.ok=v,d.equal=function(t,e,n){t!=e&&b(t,e,n,"==",d.equal)},d.notEqual=function(t,e,n){t==e&&b(t,e,n,"!=",d.notEqual)},d.deepEqual=function(t,e,n){y(t,e,!1)||b(t,e,n,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(t,e,n){y(t,e,!0)||b(t,e,n,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(t,e,n){y(t,e,!1)&&b(t,e,n,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function t(e,n,r){y(e,n,!0)&&b(e,n,r,"notDeepStrictEqual",t)},d.strictEqual=function(t,e,n){t!==e&&b(t,e,n,"===",d.strictEqual)},d.notStrictEqual=function(t,e,n){t===e&&b(t,e,n,"!==",d.notStrictEqual)},d.throws=function(t,e,n){S(!0,t,e,n)},d.doesNotThrow=function(t,e,n){S(!1,t,e,n)},d.ifError=function(t){if(t)throw t},d.strict=r((function t(e,n){e||b(e,!0,n,"==",t)}),d,{equal:d.strictEqual,deepEqual:d.deepStrictEqual,notEqual:d.notStrictEqual,notDeepEqual:d.notDeepStrictEqual}),d.strict.strict=d.strict;var O=Object.keys||function(t){var e=[];for(var n in t)u.call(t,n)&&e.push(n);return e}}).call(this,n(59))},function(t,e,n){var r=n(36).Buffer;function i(t){r.isBuffer(t)||(t=r.from(t));for(var e=t.length/4|0,n=new Array(e),i=0;i>>24]^f[p>>>16&255]^l[g>>>8&255]^d[255&m]^e[b++],a=c[p>>>24]^f[g>>>16&255]^l[m>>>8&255]^d[255&h]^e[b++],u=c[g>>>24]^f[m>>>16&255]^l[h>>>8&255]^d[255&p]^e[b++],s=c[m>>>24]^f[h>>>16&255]^l[p>>>8&255]^d[255&g]^e[b++],h=o,p=a,g=u,m=s;return o=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[g>>>8&255]<<8|r[255&m])^e[b++],a=(r[p>>>24]<<24|r[g>>>16&255]<<16|r[m>>>8&255]<<8|r[255&h])^e[b++],u=(r[g>>>24]<<24|r[m>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^e[b++],s=(r[m>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&g])^e[b++],[o>>>=0,a>>>=0,u>>>=0,s>>>=0]}var u=[0,1,2,4,8,16,32,64,128,27,54],s=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,u=0,s=0;s<256;++s){var c=u^u<<1^u<<2^u<<3^u<<4;c=c>>>8^255&c^99,n[a]=c,r[c]=a;var f=t[a],l=t[f],d=t[l],h=257*t[c]^16843008*c;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*d^65537*l^257*f^16843008*a,o[0][c]=h<<24|h>>>8,o[1][c]=h<<16|h>>>16,o[2][c]=h<<8|h>>>24,o[3][c]=h,0===a?a=u=1:(a=f^t[t[t[d^f]]],u^=t[t[u]])}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=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a],a^=u[o/e|0]<<24):e>6&&o%e===4&&(a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a]),i[o]=i[o-e]^a}for(var c=[],f=0;f>>24]]^s.INV_SUB_MIX[1][s.SBOX[d>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[d>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&d]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,s.SUB_MIX,s.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,s.INV_SUB_MIX,s.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(36).Buffer,i=n(358);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,u=r.alloc(a),s=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 d=u.length-a;l=Math.min(a,c.length),c.copy(u,d,0,l),a-=l}if(l0){var h=s.length-o,p=Math.min(o,c.length-l);c.copy(s,h,l,l+p),o-=p}}return c.fill(0),{key:u,iv:s}}},function(t,e,n){"use strict";var r=n(150),i=n(115),o=i.getNAF,a=i.getJSF,u=i.assert;function s(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=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(t,e){u(t.precomputed);var n=t._getDoubles(),r=o(e,1,this._bitLength),i=(1<=a;f--)s=(s<<1)+r[f];c.push(s)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,s=s.dblp(f),c<0)break;var l=a[c];u(0!==l),s="affine"===t.type?l>0?s.mixedAdd(i[l-1>>1]):s.mixedAdd(i[-l-1>>1].neg()):l>0?s.add(i[l-1>>1]):s.add(i[-l-1>>1].neg())}return"affine"===t.type?s.toP():s},s.prototype._wnafMulAdd=function(t,e,n,r,i){var u,s,c,f=this._wnafT1,l=this._wnafT2,d=this._wnafT3,h=0;for(u=0;u=1;u-=2){var g=u-1,m=u;if(1===f[g]&&1===f[m]){var b=[e[g],null,null,e[m]];0===e[g].y.cmp(e[m].y)?(b[1]=e[g].add(e[m]),b[2]=e[g].toJ().mixedAdd(e[m].neg())):0===e[g].y.cmp(e[m].y.redNeg())?(b[1]=e[g].toJ().mixedAdd(e[m]),b[2]=e[g].add(e[m].neg())):(b[1]=e[g].toJ().mixedAdd(e[m]),b[2]=e[g].toJ().mixedAdd(e[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=a(n[g],n[m]);for(h=Math.max(y[0].length,h),d[g]=new Array(h),d[m]=new Array(h),s=0;s=0;u--){for(var x=0;u>=0;){var E=!0;for(s=0;s=0&&x++,S=S.dblp(x),u<0)break;for(s=0;s0?c=l[s][M-1>>1]:M<0&&(c=l[s][-M-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(u=0;u=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;i0?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=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(t,e){u(t.precomputed);var n=t._getDoubles(),r=o(e,1,this._bitLength),i=(1<=a;f--)s=(s<<1)+r[f];c.push(s)}for(var l=this.jpoint(null,null,null),d=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a=0;c--){for(var f=0;c>=0&&0===a[c];c--)f++;if(c>=0&&f++,s=s.dblp(f),c<0)break;var l=a[c];u(0!==l),s="affine"===t.type?l>0?s.mixedAdd(i[l-1>>1]):s.mixedAdd(i[-l-1>>1].neg()):l>0?s.add(i[l-1>>1]):s.add(i[-l-1>>1].neg())}return"affine"===t.type?s.toP():s},s.prototype._wnafMulAdd=function(t,e,n,r,i){var u,s,c,f=this._wnafT1,l=this._wnafT2,d=this._wnafT3,h=0;for(u=0;u=1;u-=2){var g=u-1,m=u;if(1===f[g]&&1===f[m]){var b=[e[g],null,null,e[m]];0===e[g].y.cmp(e[m].y)?(b[1]=e[g].add(e[m]),b[2]=e[g].toJ().mixedAdd(e[m].neg())):0===e[g].y.cmp(e[m].y.redNeg())?(b[1]=e[g].toJ().mixedAdd(e[m]),b[2]=e[g].add(e[m].neg())):(b[1]=e[g].toJ().mixedAdd(e[m]),b[2]=e[g].toJ().mixedAdd(e[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=a(n[g],n[m]);for(h=Math.max(y[0].length,h),d[g]=new Array(h),d[m]=new Array(h),s=0;s=0;u--){for(var x=0;u>=0;){var E=!0;for(s=0;s=0&&x++,S=S.dblp(x),u<0)break;for(s=0;s0?c=l[s][M-1>>1]:M<0&&(c=l[s][-M-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(u=0;u=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"},t.exports=h}).call(this,n(29).Buffer)},function(t,e,n){"use strict";(function(e){var r=n(48),i=n(364),o=n(29),a="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz".split(""),u=function t(n){if(!(this instanceof t))return new t(n);if(e.isBuffer(n)){var r=n;this.fromBuffer(r)}else if("string"===typeof n){var i=n;this.fromString(i)}else n&&this.set(n)};u.validCharacters=function(t){return o.Buffer.isBuffer(t)&&(t=t.toString()),r.every(r.map(t,(function(t){return r.includes(a,t)})))},u.prototype.set=function(t){return this.buf=t.buf||this.buf||void 0,this},u.encode=function(t){if(!o.Buffer.isBuffer(t))throw new Error("Input should be a buffer");return i.encode(t)},u.decode=function(t){if("string"!==typeof t)throw new Error("Input should be a string");return e.from(i.decode(t))},u.prototype.fromBuffer=function(t){return this.buf=t,this},u.prototype.fromString=function(t){var e=u.decode(t);return this.buf=e,this},u.prototype.toBuffer=function(){return this.buf},u.prototype.toString=function(){return u.encode(this.buf)},t.exports=u}).call(this,n(29).Buffer)},function(t,e,n){"use strict";(function(e){var r=n(48),i=n(52),o=n(63),a=n(80);function u(t){if(!(this instanceof u))return new u(t);var e;if(r.isNumber(t))e=t;else{if(!r.isString(t))throw new TypeError('Unrecognized num type: "'+typeof t+'" for Opcode');e=u.map[t]}return a.defineImmutable(this,{num:e}),this}for(var s in u.fromBuffer=function(t){return i.checkArgument(o.isBuffer(t)),new u(Number("0x"+t.toString("hex")))},u.fromNumber=function(t){return i.checkArgument(r.isNumber(t)),new u(t)},u.fromString=function(t){i.checkArgument(r.isString(t));var e=u.map[t];if("undefined"===typeof e)throw new TypeError("Invalid opcodestr");return new u(e)},u.prototype.toHex=function(){return this.num.toString(16)},u.prototype.toBuffer=function(){return e.from(this.toHex(),"hex")},u.prototype.toNumber=function(){return this.num},u.prototype.toString=function(){var t=u.reverseMap[this.num];if("undefined"===typeof t)throw new Error("Opcode does not have a string representation");return t},u.smallInt=function(t){return i.checkArgument(r.isNumber(t),"Invalid Argument: n should be number"),i.checkArgument(t>=0&&t<=16,"Invalid Argument: n must be between 0 and 16"),0===t?u("OP_0"):new u(u.map.OP_1+t-1)},u.map={OP_FALSE:0,OP_0:0,OP_PUSHDATA1:76,OP_PUSHDATA2:77,OP_PUSHDATA4:78,OP_1NEGATE:79,OP_RESERVED:80,OP_TRUE:81,OP_1:81,OP_2:82,OP_3:83,OP_4:84,OP_5:85,OP_6:86,OP_7:87,OP_8:88,OP_9:89,OP_10:90,OP_11:91,OP_12:92,OP_13:93,OP_14:94,OP_15:95,OP_16:96,OP_NOP:97,OP_VER:98,OP_IF:99,OP_NOTIF:100,OP_VERIF:101,OP_VERNOTIF:102,OP_ELSE:103,OP_ENDIF:104,OP_VERIFY:105,OP_RETURN:106,OP_TOALTSTACK:107,OP_FROMALTSTACK:108,OP_2DROP:109,OP_2DUP:110,OP_3DUP:111,OP_2OVER:112,OP_2ROT:113,OP_2SWAP:114,OP_IFDUP:115,OP_DEPTH:116,OP_DROP:117,OP_DUP:118,OP_NIP:119,OP_OVER:120,OP_PICK:121,OP_ROLL:122,OP_ROT:123,OP_SWAP:124,OP_TUCK:125,OP_CAT:126,OP_SPLIT:127,OP_NUM2BIN:128,OP_BIN2NUM:129,OP_SIZE:130,OP_INVERT:131,OP_AND:132,OP_OR:133,OP_XOR:134,OP_EQUAL:135,OP_EQUALVERIFY:136,OP_RESERVED1:137,OP_RESERVED2:138,OP_1ADD:139,OP_1SUB:140,OP_2MUL:141,OP_2DIV:142,OP_NEGATE:143,OP_ABS:144,OP_NOT:145,OP_0NOTEQUAL:146,OP_ADD:147,OP_SUB:148,OP_MUL:149,OP_DIV:150,OP_MOD:151,OP_LSHIFT:152,OP_RSHIFT:153,OP_BOOLAND:154,OP_BOOLOR:155,OP_NUMEQUAL:156,OP_NUMEQUALVERIFY:157,OP_NUMNOTEQUAL:158,OP_LESSTHAN:159,OP_GREATERTHAN:160,OP_LESSTHANOREQUAL:161,OP_GREATERTHANOREQUAL:162,OP_MIN:163,OP_MAX:164,OP_WITHIN:165,OP_RIPEMD160:166,OP_SHA1:167,OP_SHA256:168,OP_HASH160:169,OP_HASH256:170,OP_CODESEPARATOR:171,OP_CHECKSIG:172,OP_CHECKSIGVERIFY:173,OP_CHECKMULTISIG:174,OP_CHECKMULTISIGVERIFY:175,OP_NOP2:177,OP_CHECKLOCKTIMEVERIFY:177,OP_NOP3:178,OP_CHECKSEQUENCEVERIFY:178,OP_NOP1:176,OP_NOP4:179,OP_NOP5:180,OP_NOP6:181,OP_NOP7:182,OP_NOP8:183,OP_NOP9:184,OP_NOP10:185,OP_CHECKDATASIG:186,OP_CHECKDATASIGVERIFY:187,OP_REVERSEBYTES:188,OP_PREFIX_BEGIN:240,OP_PREFIX_END:241,OP_SMALLINTEGER:250,OP_PUBKEYS:251,OP_PUBKEYHASH:253,OP_PUBKEY:254,OP_INVALIDOPCODE:255},u.reverseMap=[],u.map)u.reverseMap[u.map[s]]=s;r.extend(u,u.map),u.isSmallIntOp=function(t){return t instanceof u&&(t=t.toNumber()),t===u.map.OP_0||t>=u.map.OP_1&&t<=u.map.OP_16},u.prototype.inspect=function(){return""},t.exports=u}).call(this,n(29).Buffer)},function(t,e,n){t.exports=n(387),t.exports.Input=n(388),t.exports.Output=n(153),t.exports.UnspentOutput=n(516),t.exports.Signature=n(207),t.exports.Sighash=n(152)},function(t,e,n){"use strict";(function(e){var r=n(48),i=n(79),o=n(63),a=n(160),u=n(134),s=n(84),c=(n(80),n(52)),f=function t(e){if(!(this instanceof t))return new t(e);var n=t._from(e);return this.version=n.version,this.prevHash=n.prevHash,this.merkleRoot=n.merkleRoot,this.time=n.time,this.timestamp=n.time,this.bits=n.bits,this.nonce=n.nonce,n.hash&&c.checkState(this.hash===n.hash,"Argument object hash property does not match block hash."),this};f._from=function(t){var e={};if(o.isBuffer(t))e=f._fromBufferReader(a(t));else{if(!r.isObject(t))throw new TypeError("Unrecognized argument for BlockHeader");e=f._fromObject(t)}return e},f._fromObject=function(t){c.checkArgument(t,"data is required");var n=t.prevHash,i=t.merkleRoot;return r.isString(t.prevHash)&&(n=o.reverse(e.from(t.prevHash,"hex"))),r.isString(t.merkleRoot)&&(i=o.reverse(e.from(t.merkleRoot,"hex"))),{hash:t.hash,version:t.version,prevHash:n,merkleRoot:i,time:t.time,timestamp:t.time,bits:t.bits,nonce:t.nonce}},f.fromObject=function(t){var e=f._fromObject(t);return new f(e)},f.fromRawBlock=function(t){o.isBuffer(t)||(t=e.from(t,"binary"));var n=a(t);n.pos=f.Constants.START_OF_HEADER;var r=f._fromBufferReader(n);return new f(r)},f.fromBuffer=function(t){var e=f._fromBufferReader(a(t));return new f(e)},f.fromString=function(t){var n=e.from(t,"hex");return f.fromBuffer(n)},f._fromBufferReader=function(t){var e={};return e.version=t.readInt32LE(),e.prevHash=t.read(32),e.merkleRoot=t.read(32),e.time=t.readUInt32LE(),e.bits=t.readUInt32LE(),e.nonce=t.readUInt32LE(),e},f.fromBufferReader=function(t){var e=f._fromBufferReader(t);return new f(e)},f.prototype.toObject=f.prototype.toJSON=function(){return{hash:this.hash,version:this.version,prevHash:o.reverse(this.prevHash).toString("hex"),merkleRoot:o.reverse(this.merkleRoot).toString("hex"),time:this.time,bits:this.bits,nonce:this.nonce}},f.prototype.toBuffer=function(){return this.toBufferWriter().concat()},f.prototype.toString=function(){return this.toBuffer().toString("hex")},f.prototype.toBufferWriter=function(t){return t||(t=new u),t.writeInt32LE(this.version),t.write(this.prevHash),t.write(this.merkleRoot),t.writeUInt32LE(this.time),t.writeUInt32LE(this.bits),t.writeUInt32LE(this.nonce),t},f.prototype.getTargetDifficulty=function(t){t=t||this.bits;for(var e=new i(16777215&t),n=8*((t>>>24)-3);n-- >0;)e=e.mul(new i(2));return e},f.prototype.getDifficulty=function(){var t=this.getTargetDifficulty(486604799).mul(new i(Math.pow(10,8))),e=this.getTargetDifficulty(),n=t.div(e).toString(10),r=n.length-8;return n=n.slice(0,r)+"."+n.slice(r),parseFloat(n)},f.prototype._getHash=function(){var t=this.toBuffer();return s.sha256sha256(t)};var l={configurable:!1,enumerable:!0,get:function(){return this._id||(this._id=a(this._getHash()).readReverse().toString("hex")),this._id},set:r.noop};Object.defineProperty(f.prototype,"id",l),Object.defineProperty(f.prototype,"hash",l),f.prototype.validTimestamp=function(){var t=Math.round((new Date).getTime()/1e3);return!(this.time>t+f.Constants.MAX_TIME_OFFSET)},f.prototype.validProofOfWork=function(){var t=new i(this.id,"hex"),e=this.getTargetDifficulty();return!(t.cmp(e)>0)},f.prototype.inspect=function(){return""},f.Constants={START_OF_HEADER:8,MAX_TIME_OFFSET:7200,LARGEST_HASH:new i("10000000000000000000000000000000000000000000000000000000000000000","hex")},t.exports=f}).call(this,n(29).Buffer)},function(t,e,n){"use strict";n.r(e);var r=n(304);n.d(e,"default",(function(){return r.a}))},function(t,e,n){"use strict";n.r(e);var r=n(395);n.d(e,"default",(function(){return r.a}))},function(t,e,n){"use strict";var r=n(4),i=n(17),o=n(1),a=n.n(o),u=n(15),s=(n(13),n(125)),c=n.n(s),f=n(975);function l(t,e){var n={};return Object.keys(t).forEach((function(r){-1===e.indexOf(r)&&(n[r]=t[r])})),n}var d=n(136);e.a=function(t){var e=function(t){return function(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=o.name,d=Object(i.a)(o,["name"]),h=s,p="function"===typeof e?function(t){return{root:function(n){return e(Object(r.a)({theme:t},n))}}}:{root:e},g=Object(f.a)(p,Object(r.a)({Component:t,name:s||t.displayName,classNamePrefix:h},d));e.filterProps&&(n=e.filterProps,delete e.filterProps),e.propTypes&&(e.propTypes,delete e.propTypes);var m=a.a.forwardRef((function(e,o){var s=e.children,c=e.className,f=e.clone,d=e.component,h=Object(i.a)(e,["children","className","clone","component"]),p=g(e),m=Object(u.a)(p.root,c),b=h;if(n&&(b=l(b,n)),f)return a.a.cloneElement(s,Object(r.a)({className:Object(u.a)(s.props.className,m)},b));if("function"===typeof s)return s(Object(r.a)({className:m},b));var v=d||t;return a.a.createElement(v,Object(r.a)({ref:o,className:m},b),s)}));return c()(m,t),m}}(t);return function(t,n){return e(t,Object(r.a)({defaultTheme:d.a},n))}}},function(t,e,n){"use strict";var r=n(1),i=n.n(r).a.createContext(null);e.a=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(245);function i(t,e){if(t){if("string"===typeof t)return Object(r.a)(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(t,e):void 0}}},function(t,e,n){"use strict";var r="function"===typeof Symbol&&Symbol.for;e.a=r?Symbol.for("mui.nested"):"__THEME_NESTED__"},function(t,e,n){"use strict";function r(t){for(var e="https://material-ui.com/production-error/?code="+t,n=1;n2)return"[Array]";for(var n=Math.min(10,t.length),r=t.length-n,i=[],o=0;o1&&i.push("... ".concat(r," more items"));return"["+i.join(", ")+"]"}(t,n);return function(t,e){var n=Object.keys(t);if(0===n.length)return"{}";if(e.length>2)return"["+function(t){var e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if("Object"===e&&"function"===typeof t.constructor){var n=t.constructor.name;if("string"===typeof n&&""!==n)return n}return e}(t)+"]";return"{ "+n.map((function(n){return n+": "+a(t[n],e)})).join(", ")+" }"}(t,n)}(t,e);default:return String(t)}}},function(t,e,n){"use strict";function r(t){var e=t.split(/\r\n|[\n\r]/g),n=function(t){for(var e=null,n=1;n0&&o(e[0]);)e.shift();for(;e.length>0&&o(e[e.length-1]);)e.pop();return e.join("\n")}function i(t){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===t.indexOf("\n"),i=" "===t[0]||"\t"===t[0],o='"'===t[t.length-1],a=!r||o||n,u="";return!a||r&&i||(u+="\n"+e),u+=e?t.replace(/\n/g,"\n"+e):t,a&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return a}))},function(t,e,n){"use strict";var r=n(61),i=Object.prototype.toString,o=function(){return"[object Arguments]"===i.call(arguments)?function(t){return"[object Arguments]"===i.call(t)}:function(t){return Object(r.a)("callee",t)}}();e.a=o},function(t,e,n){"use strict";function r(t,e){for(var n=0,r=e.length,i=[];n=c?s:(n.setFullYear(s.getFullYear(),s.getMonth(),u),n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(30),i=n(307),o=n(22);function a(t,e){Object(o.a)(2,arguments);var n=Object(r.a)(e);return Object(i.a)(t,-n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(30),i=n(25),o=n(22);function a(t,e){Object(o.a)(2,arguments);var n=Object(i.a)(t),a=Object(r.a)(e);return isNaN(a)?new Date(NaN):a?(n.setDate(n.getDate()+a),n):n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(25),i=n(22);function o(t){Object(i.a)(1,arguments);var e=Object(r.a)(t);return e.setHours(23,59,59,999),e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(219),i=n(22),o=n(220);function a(t,e,n){Object(i.a)(2,arguments);var a=Object(r.a)(t,e)/1e3;return Object(o.a)(null===n||void 0===n?void 0:n.roundingMethod)(a)}},function(t,e,n){"use strict";function r(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}}function i(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}}var o={p:i,P:function(t,e){var n,o=t.match(/(P+)(p+)?/),a=o[1],u=o[2];if(!u)return r(t,e);switch(a){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;case"PPPP":default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",r(a,e)).replace("{{time}}",i(u,e))}};e.a=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(25),i=n(142),o=n(22);function a(t){Object(o.a)(1,arguments);var e=Object(r.a)(t),n=e.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(n+1,0,4),a.setUTCHours(0,0,0,0);var u=Object(i.a)(a),s=new Date(0);s.setUTCFullYear(n,0,4),s.setUTCHours(0,0,0,0);var c=Object(i.a)(s);return e.getTime()>=u.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(313);function i(t){return Object(r.a)({},t)}},function(t,e,n){"use strict";function r(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e=e||{})Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var r=n(30),i=n(108),o=n(224),a=36e5,u={dateTimeDelimeter:/[T ]/,plainTime:/:/,timeZoneDelimeter:/[Z ]/i,YY:/^(\d{2})$/,YYY:[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],YYYY:/^(\d{4})/,YYYYY:[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],MM:/^-(\d{2})$/,DDD:/^-?(\d{3})$/,MMDD:/^-?(\d{2})-?(\d{2})$/,Www:/^-?W(\d{2})$/,WwwD:/^-?W(\d{2})-?(\d{1})$/,HH:/^(\d{2}([.,]\d*)?)$/,HHMM:/^(\d{2}):?(\d{2}([.,]\d*)?)$/,HHMMSS:/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,timezone:/([Z+-].*| UTC|(?:[a-zA-Z]+\/[a-zA-Z_]+(?:\/[a-zA-Z_]+)?))$/};function s(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");if(null===t)return new Date(NaN);var n=e||{},a=null==n.additionalDigits?2:Object(r.a)(n.additionalDigits);if(2!==a&&1!==a&&0!==a)throw new RangeError("additionalDigits must be 0, 1 or 2");if(t instanceof Date||"object"===typeof t&&"[object Date]"===Object.prototype.toString.call(t))return new Date(t.getTime());if("number"===typeof t||"[object Number]"===Object.prototype.toString.call(t))return new Date(t);if("string"!==typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var u=c(t),s=f(u.date,a),h=s.year,p=s.restDateString,g=l(p,h);if(isNaN(g))return new Date(NaN);if(g){var m,b=g.getTime(),v=0;if(u.time&&(v=d(u.time),isNaN(v)))return new Date(NaN);if(u.timezone||n.timeZone){if(m=Object(o.a)(u.timezone||n.timeZone,new Date(b+v)),isNaN(m))return new Date(NaN)}else m=Object(i.a)(new Date(b+v)),m=Object(i.a)(new Date(b+v+m));return new Date(b+v+m)}return new Date(NaN)}function c(t){var e,n={},r=t.split(u.dateTimeDelimeter);if(u.plainTime.test(r[0])?(n.date=null,e=r[0]):(n.date=r[0],e=r[1],n.timezone=r[2],u.timeZoneDelimeter.test(n.date)&&(n.date=t.split(u.timeZoneDelimeter)[0],e=t.substr(n.date.length,t.length))),e){var i=u.timezone.exec(e);i?(n.time=e.replace(i[1],""),n.timezone=i[1]):n.time=e}return n}function f(t,e){var n,r=u.YYY[e],i=u.YYYYY[e];if(n=u.YYYY.exec(t)||i.exec(t)){var o=n[1];return{year:parseInt(o,10),restDateString:t.slice(o.length)}}if(n=u.YY.exec(t)||r.exec(t)){var a=n[1];return{year:100*parseInt(a,10),restDateString:t.slice(a.length)}}return{year:null}}function l(t,e){if(null===e)return null;var n,r,i,o;if(0===t.length)return(r=new Date(0)).setUTCFullYear(e),r;if(n=u.MM.exec(t))return r=new Date(0),b(e,i=parseInt(n[1],10)-1)?(r.setUTCFullYear(e,i),r):new Date(NaN);if(n=u.DDD.exec(t)){r=new Date(0);var a=parseInt(n[1],10);return function(t,e){if(e<1)return!1;var n=m(t);if(n&&e>366)return!1;if(!n&&e>365)return!1;return!0}(e,a)?(r.setUTCFullYear(e,0,a),r):new Date(NaN)}if(n=u.MMDD.exec(t)){r=new Date(0),i=parseInt(n[1],10)-1;var s=parseInt(n[2],10);return b(e,i,s)?(r.setUTCFullYear(e,i,s),r):new Date(NaN)}if(n=u.Www.exec(t))return v(e,o=parseInt(n[1],10)-1)?h(e,o):new Date(NaN);if(n=u.WwwD.exec(t)){o=parseInt(n[1],10)-1;var c=parseInt(n[2],10)-1;return v(e,o,c)?h(e,o,c):new Date(NaN)}return null}function d(t){var e,n,r;if(e=u.HH.exec(t))return y(n=parseFloat(e[1].replace(",",".")))?n%24*a:NaN;if(e=u.HHMM.exec(t))return y(n=parseInt(e[1],10),r=parseFloat(e[2].replace(",",".")))?n%24*a+6e4*r:NaN;if(e=u.HHMMSS.exec(t)){n=parseInt(e[1],10),r=parseInt(e[2],10);var i=parseFloat(e[3].replace(",","."));return y(n,r,i)?n%24*a+6e4*r+1e3*i:NaN}return null}function h(t,e,n){e=e||0,n=n||0;var r=new Date(0);r.setUTCFullYear(t,0,4);var i=7*e+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}var p=[31,28,31,30,31,30,31,31,30,31,30,31],g=[31,29,31,30,31,30,31,31,30,31,30,31];function m(t){return t%400===0||t%4===0&&t%100!==0}function b(t,e,n){if(e<0||e>11)return!1;if(null!=n){if(n<1)return!1;var r=m(t);if(r&&n>g[e])return!1;if(!r&&n>p[e])return!1}return!0}function v(t,e,n){return!(e<0||e>52)&&(null==n||!(n<0||n>6))}function y(t,e,n){return(null==t||!(t<0||t>=25))&&((null==e||!(e<0||e>=60))&&(null==n||!(n<0||n>=60)))}},function(t,e,n){"use strict";var r=n(16),i=Object(r.a)((function(t,e){return e>t?e:t}));e.a=i},function(t,e,n){"use strict";var r=n(16),i=n(97),o=n(536),a=Object(r.a)((function(t,e){return Object(i.a)(Object(o.a)(t),e)}));e.a=a},function(t,e,n){"use strict";var r=n(1),i=r.createContext();e.a=i},function(t,e,n){(function(r){var i,o,a;!function(r){"use strict";"object"===typeof t.exports?t.exports=r(n(434),n(260),n(435),n(436),n(129),n(130),n(198)):null!=n(148)?(o=[n(434),n(260),n(435),n(436),n(129),n(130),n(198)],void 0===(a="function"===typeof(i=r)?i.apply(e,o):i)||(t.exports=a)):self.sanctuary=r(self.sanctuaryDef,self.sanctuaryEither,self.sanctuaryMaybe,self.sanctuaryPair,self.sanctuaryShow,self.sanctuaryTypeClasses,self.sanctuaryTypeIdentifiers)}((function(t,e,i,o,a,u,s){"use strict";if("undefined"!==typeof __doctest){__doctest.require("sanctuary-descending"),__doctest.require("./test/internal/List").Nil,__doctest.require("./test/internal/List").Cons;var c=__doctest.require("./test/internal/Sum");(function(e){var n=e.create({checkTypes:!0,env:e.env.concat([__doctest.require("./test/internal/List").Type(t.Unknown),c.Type])});n.env=e.env})(n(318))}var f=e.Left,l=e.Right,d=i.Nothing,h=i.Just;function p(t){return function(e){return function(n){return t(e(n))}}}function g(t){return function(e){return function(n){return t(n)(e)}}}function m(t){return p((function(e){return t in e?h(e[t]):d}))(y)}function b(t){return function(e){return e[t]()}}function v(t){return function(e){return function(n){return n[t](e)}}}function y(t){return null==t?Object.create(null):Object(t)}var _=t.TypeVariable("a"),w=t.TypeVariable("b"),S=t.TypeVariable("c"),O=t.TypeVariable("d"),x=t.TypeVariable("e"),E=t.TypeVariable("g"),M=t.TypeVariable("r"),T=t.UnaryTypeVariable("f"),$=t.UnaryTypeVariable("m"),A=t.UnaryTypeVariable("t"),k=t.UnaryTypeVariable("w"),C=t.BinaryTypeVariable("p"),I=t.BinaryTypeVariable("s"),P=t.UnaryType("TypeRep")("https://github.com/fantasyland/fantasy-land#type-representatives")([])((function(e){return t.test([])(t.AnyFunction)(e)||null!=e&&t.test([])(t.String)(e["@@type"])}))(V([])),N=t.RecordType({checkTypes:t.Boolean,env:t.Array(t.Any)}),R={};function j(n){var r=t.create(n),o={env:n.env,is:r("is")({})([t.Type,t.Any,t.Boolean])(t.test(n.env)),Maybe:i,Nothing:d,Either:e};return Object.keys(R).forEach((function(t){o[t]=r(t)(R[t].consts)(R[t].types)(R[t].impl)})),o.unchecked=n.checkTypes?j({checkTypes:!1,env:n.env}):o,o}function D(t){return function(e){return u.equals(t,e)}}function L(t){return function(e){return u.gt(e,t)}}function F(t){return function(e){return u.filter(t,e)}}function B(t){return function(e){return u.reject(t,e)}}function U(t){return function(e){return u.map(t,e)}}function z(t){return function(e){return function(n){return u.reduce((function(e,n){return t(e)(n)}),e,n)}}}function H(t){return t}function V(t){return function(e){return t}}function q(t){return function(e){return e(t)}}function W(t){return function(e){return function(n){return t(e,n)}}}function G(t){return function(e){return function(n){return function(r){return t(e,n,r)}}}}function K(t){return function(e){return function(n){return function(r){return function(i){return t(e,n,r,i)}}}}}function Y(t){return function(e){return t(e.fst)(e.snd)}}function Z(t){return t.isJust}function Q(t){return function(e){return function(n){return n.isJust?e(n.value):t}}}function X(t){return function(e){return function(n){return n.isJust?e(n.value):t()}}}function J(t){return U(ht("value"))(F(Z)(t))}function tt(t){return t.isLeft}function et(t){return t.isRight}function nt(t){return function(e){return function(n){return(n.isLeft?t:e)(n.value)}}}function rt(t){return function(e){try{return l(t(e))}catch(n){return f(n)}}}function it(t){return t.isLeft?d:h(t.value)}function ot(t){return!t}function at(t){return function(e){return function(n){return function(r){return(t(r)?e:n)(r)}}}}function ut(t,e){return function(n){return function(r){if(n<0)return d;if(Array.isArray(r))return n<=r.length?h(t(n,r)):d;var i=u.reduce((function(t,n){return u.map((function(t){var r=t.fst,i=t.snd;return o(r-1)(e(r,i,n))}),t)}),h(o(n)(u.empty(r.constructor))),r);return u.map(o.snd,u.reject(p(L(0))(o.fst),i))}}}R.create={consts:{},types:[N,t.Object],impl:j},R.type={consts:{},types:[t.Any,t.RecordType({namespace:t.Maybe(t.String),name:t.String,version:t.NonNegativeInteger})],impl:function(t){var e=s.parse(s(t));return e.namespace=u.reject(D(null),h(e.namespace)),e}},R.show={consts:{},types:[t.Any,t.String],impl:a},R.equals={consts:{a:[u.Setoid]},types:[_,_,t.Boolean],impl:D},R.lt={consts:{a:[u.Ord]},types:[_,_,t.Boolean],impl:function(t){return function(e){return u.lt(e,t)}}},R.lte={consts:{a:[u.Ord]},types:[_,_,t.Boolean],impl:function(t){return function(e){return u.lte(e,t)}}},R.gt={consts:{a:[u.Ord]},types:[_,_,t.Boolean],impl:L},R.gte={consts:{a:[u.Ord]},types:[_,_,t.Boolean],impl:function(t){return function(e){return u.gte(e,t)}}},R.min={consts:{a:[u.Ord]},types:[_,_,_],impl:W(u.min)},R.max={consts:{a:[u.Ord]},types:[_,_,_],impl:W(u.max)},R.clamp={consts:{a:[u.Ord]},types:[_,_,_,_],impl:G(u.clamp)},R.id={consts:{c:[u.Category]},types:[P(S),S],impl:u.id},R.concat={consts:{a:[u.Semigroup]},types:[_,_,_],impl:W(u.concat)},R.empty={consts:{a:[u.Monoid]},types:[P(_),_],impl:u.empty},R.invert={consts:{g:[u.Group]},types:[E,E],impl:u.invert},R.filter={consts:{f:[u.Filterable]},types:[t.Predicate(_),T(_),T(_)],impl:F},R.reject={consts:{f:[u.Filterable]},types:[t.Predicate(_),T(_),T(_)],impl:B},R.map={consts:{f:[u.Functor]},types:[t.Fn(_)(w),T(_),T(w)],impl:U},R.flip={consts:{f:[u.Functor]},types:[T(t.Fn(_)(w)),_,T(w)],impl:W(u.flip)},R.bimap={consts:{p:[u.Bifunctor]},types:[t.Fn(_)(w),t.Fn(S)(O),C(_)(S),C(w)(O)],impl:G(u.bimap)},R.mapLeft={consts:{p:[u.Bifunctor]},types:[t.Fn(_)(w),C(_)(S),C(w)(S)],impl:W(u.mapLeft)},R.promap={consts:{p:[u.Profunctor]},types:[t.Fn(_)(w),t.Fn(S)(O),C(w)(S),C(_)(O)],impl:G(u.promap)},R.alt={consts:{f:[u.Alt]},types:[T(_),T(_),T(_)],impl:function(t){return function(e){return u.alt(e,t)}}},R.zero={consts:{f:[u.Plus]},types:[P(T(_)),T(_)],impl:u.zero},R.reduce={consts:{f:[u.Foldable]},types:[t.Fn(_)(t.Fn(w)(_)),_,T(w),_],impl:z},R.traverse={consts:{f:[u.Applicative],t:[u.Traversable]},types:[P(T(w)),t.Fn(_)(T(w)),A(_),T(A(w))],impl:G(u.traverse)},R.sequence={consts:{f:[u.Applicative],t:[u.Traversable]},types:[P(T(_)),A(T(_)),T(A(_))],impl:W(u.sequence)},R.ap={consts:{f:[u.Apply]},types:[T(t.Fn(_)(w)),T(_),T(w)],impl:W(u.ap)},R.lift2={consts:{f:[u.Apply]},types:[t.Fn(_)(t.Fn(w)(S)),T(_),T(w),T(S)],impl:G(u.lift2)},R.lift3={consts:{f:[u.Apply]},types:[t.Fn(_)(t.Fn(w)(t.Fn(S)(O))),T(_),T(w),T(S),T(O)],impl:K(u.lift3)},R.apFirst={consts:{f:[u.Apply]},types:[T(_),T(w),T(_)],impl:W(u.apFirst)},R.apSecond={consts:{f:[u.Apply]},types:[T(_),T(w),T(w)],impl:W(u.apSecond)},R.of={consts:{f:[u.Applicative]},types:[P(T(_)),_,T(_)],impl:function(t){return function(e){return u.of(t,e)}}},R.chain={consts:{m:[u.Chain]},types:[t.Fn(_)($(w)),$(_),$(w)],impl:W(u.chain)},R.join={consts:{m:[u.Chain]},types:[$($(_)),$(_)],impl:u.join},R.chainRec={consts:{m:[u.ChainRec]},types:[P($(w)),t.Fn(_)($(t.Either(_)(w))),_,$(w)],impl:function(t){return function(e){return function(e){return u.chainRec(t,n,e)};function n(t,n,r){return u.map(nt(t)(n),e(r))}}}},R.extend={consts:{w:[u.Extend]},types:[t.Fn(k(_))(w),k(_),k(w)],impl:W(u.extend)},R.duplicate={consts:{w:[u.Extend]},types:[k(_),k(k(_))],impl:u.duplicate},R.extract={consts:{w:[u.Comonad]},types:[k(_),_],impl:u.extract},R.contramap={consts:{f:[u.Contravariant]},types:[t.Fn(w)(_),T(_),T(w)],impl:W(u.contramap)},R.I={consts:{},types:[_,_],impl:H},R.K={consts:{},types:[_,w,_],impl:V},R.T={consts:{},types:[_,t.Fn(_)(w),w],impl:q},R.curry2={consts:{},types:[t.Function([_,w,S]),_,w,S],impl:W},R.curry3={consts:{},types:[t.Function([_,w,S,O]),_,w,S,O],impl:G},R.curry4={consts:{},types:[t.Function([_,w,S,O,x]),_,w,S,O,x],impl:K},R.curry5={consts:{},types:[t.Function([_,w,S,O,x,M]),_,w,S,O,x,M],impl:function(t){return function(e){return function(n){return function(r){return function(i){return function(o){return t(e,n,r,i,o)}}}}}}},R.compose={consts:{s:[u.Semigroupoid]},types:[I(w)(S),I(_)(w),I(_)(S)],impl:W(u.compose)},R.pipe={consts:{f:[u.Foldable]},types:[T(t.Fn(t.Any)(t.Any)),_,w],impl:function(t){return function(e){return z(q)(e)(t)}}},R.pipeK={consts:{f:[u.Foldable],m:[u.Chain]},types:[T(t.Fn(t.Any)($(t.Any))),$(_),$(w)],impl:function(t){return function(e){return u.reduce((function(t,e){return u.chain(e,t)}),e,t)}}},R.on={consts:{},types:[t.Fn(w)(t.Fn(w)(S)),t.Fn(_)(w),_,_,S],impl:function(t){return function(e){return function(n){return function(r){return t(e(n))(e(r))}}}}},R.Pair={consts:{},types:[_,w,t.Pair(_)(w)],impl:o},R.pair={consts:{},types:[t.Fn(_)(t.Fn(w)(S)),t.Pair(_)(w),S],impl:Y},R.fst={consts:{},types:[t.Pair(_)(w),_],impl:Y(V)},R.snd={consts:{},types:[t.Pair(_)(w),w],impl:Y(g(V))},R.swap={consts:{},types:[t.Pair(_)(w),t.Pair(w)(_)],impl:Y(g(o))},R.Just={consts:{},types:[_,t.Maybe(_)],impl:h},R.isNothing={consts:{},types:[t.Maybe(_),t.Boolean],impl:function(t){return t.isNothing}},R.isJust={consts:{},types:[t.Maybe(_),t.Boolean],impl:Z},R.fromMaybe={consts:{},types:[_,t.Maybe(_),_],impl:g(Q)(H)},R.fromMaybe_={consts:{},types:[t.Thunk(_),t.Maybe(_),_],impl:g(X)(H)},R.maybeToNullable={consts:{},types:[t.Maybe(_),t.Nullable(_)],impl:function(t){return t.isJust?t.value:null}},R.maybe={consts:{},types:[w,t.Fn(_)(w),t.Maybe(_),w],impl:Q},R.maybe_={consts:{},types:[t.Thunk(w),t.Fn(_)(w),t.Maybe(_),w],impl:X},R.justs={consts:{f:[u.Filterable,u.Functor]},types:[T(t.Maybe(_)),T(_)],impl:J},R.mapMaybe={consts:{f:[u.Filterable,u.Functor]},types:[t.Fn(_)(t.Maybe(w)),T(_),T(w)],impl:p(p(J))(U)},R.maybeToEither={consts:{},types:[_,t.Maybe(w),t.Either(_)(w)],impl:function(t){return Q(f(t))(l)}},R.Left={consts:{},types:[_,t.Either(_)(w)],impl:f},R.Right={consts:{},types:[w,t.Either(_)(w)],impl:l},R.isLeft={consts:{},types:[t.Either(_)(w),t.Boolean],impl:tt},R.isRight={consts:{},types:[t.Either(_)(w),t.Boolean],impl:et},R.fromEither={consts:{},types:[w,t.Either(_)(w),w],impl:function(t){return nt(V(t))(H)}},R.either={consts:{},types:[t.Fn(_)(S),t.Fn(w)(S),t.Either(_)(w),S],impl:nt},R.lefts={consts:{f:[u.Filterable,u.Functor]},types:[T(t.Either(_)(w)),T(_)],impl:p(U(ht("value")))(F(tt))},R.rights={consts:{f:[u.Filterable,u.Functor]},types:[T(t.Either(_)(w)),T(w)],impl:p(U(ht("value")))(F(et))},R.tagBy={consts:{},types:[t.Predicate(_),_,t.Either(_)(_)],impl:function(t){return at(t)(l)(f)}},R.encase={consts:{},types:[t.Fn(_)(w),_,t.Either(t.Error)(w)],impl:rt},R.eitherToMaybe={consts:{},types:[t.Either(_)(w),t.Maybe(w)],impl:it},R.and={consts:{},types:[t.Boolean,t.Boolean,t.Boolean],impl:function(t){return function(e){return t&&e}}},R.or={consts:{},types:[t.Boolean,t.Boolean,t.Boolean],impl:function(t){return function(e){return t||e}}},R.not={consts:{},types:[t.Boolean,t.Boolean],impl:ot},R.complement={consts:{},types:[t.Predicate(_),_,t.Boolean],impl:p(ot)},R.boolean={consts:{},types:[_,_,t.Boolean,_],impl:function(t){return function(e){return function(n){return n?e:t}}}},R.ifElse={consts:{},types:[t.Predicate(_),t.Fn(_)(w),t.Fn(_)(w),_,w],impl:at},R.when={consts:{},types:[t.Predicate(_),t.Fn(_)(_),_,_],impl:function(t){return g(at(t))(H)}},R.unless={consts:{},types:[t.Predicate(_),t.Fn(_)(_),_,_],impl:function(t){return at(t)(H)}},R.array={consts:{},types:[w,t.Fn(_)(t.Fn(t.Array(_))(w)),t.Array(_),w],impl:function(t){return function(e){return function(n){return 0===n.length?t:e(n[0])(n.slice(1))}}}},R.head={consts:{f:[u.Foldable]},types:[T(_),t.Maybe(_)],impl:function(t){return Array.isArray(t)?t.length>0?h(t[0]):d:u.reduce((function(t,e){return t.isJust?t:h(e)}),d,t)}},R.last={consts:{f:[u.Foldable]},types:[T(_),t.Maybe(_)],impl:function(t){return Array.isArray(t)?t.length>0?h(t[t.length-1]):d:u.reduce((function(t,e){return h(e)}),d,t)}},R.tail={consts:{f:[u.Applicative,u.Foldable,u.Monoid]},types:[T(_),t.Maybe(T(_))],impl:function(t){if(Array.isArray(t))return t.length>0?h(t.slice(1)):d;var e=u.empty(t.constructor);return u.reduce((function(t,n){return h(Q(e)(ft(n))(t))}),d,t)}},R.init={consts:{f:[u.Applicative,u.Foldable,u.Monoid]},types:[T(_),t.Maybe(T(_))],impl:function(t){if(Array.isArray(t))return t.length>0?h(t.slice(0,-1)):d;var e=u.empty(t.constructor);return u.map(o.snd,u.reduce((function(t,n){return h(o(n)(Q(e)(Y(ft))(t)))}),d,t))}};var st=ut((function(t,e){return e.slice(0,t)}),(function(t,e,n){return t>0?u.append(n,e):e}));R.take={consts:{f:[u.Applicative,u.Foldable,u.Monoid]},types:[t.Integer,T(_),t.Maybe(T(_))],impl:st};var ct=ut((function(t,e){return e.slice(t)}),(function(t,e,n){return t>0?e:u.append(n,e)}));function ft(t){return function(e){return u.append(t,e)}}function lt(t){return function(e){for(var n=[],r=t(e);r.isJust;r=t(r.value.snd))n.push(r.value.fst);return n}}function dt(t){return function(e){return function(n){for(var r=[],i=Math.min(e.length,n.length),o=0;o0?h(e.total/e.count):d}},R.even={consts:{},types:[t.Integer,t.Boolean],impl:function(t){return t%2===0}},R.odd={consts:{},types:[t.Integer,t.Boolean],impl:function(t){return t%2!==0}},R.parseDate={consts:{},types:[t.String,t.Maybe(t.ValidDate)],impl:function(t){var e=new Date(t);return isNaN(e.valueOf())?d:h(e)}};var vt,yt=new RegExp("^\\s*[+-]?"+bt(["Infinity","NaN",bt(["[0-9]+","[0-9]+[.][0-9]+","[0-9]+[.]","[.][0-9]+"])+(vt=["[Ee][+-]?[0-9]+"],bt(vt)+"?")])+"\\s*$");R.parseFloat={consts:{},types:[t.String,t.Maybe(t.Number)],impl:function(t){return yt.test(t)?h(parseFloat(t)):d}};var _t=t.NullaryType("Radix")("")([t.Integer])((function(t){return t>=2&&t<=36}));R.parseInt={consts:{},types:[_t,t.String,t.Maybe(t.Integer)],impl:function(e){return function(n){var r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".slice(0,e),i=new RegExp("^["+r+"]+$","i"),o=n.replace(/^[+-]/,"");if(i.test(16===e?o.replace(/^0x/i,""):o)){var a=parseInt(n,e);if(t.test([])(t.Integer)(a))return h(a)}return d}}},R.parseJson={consts:{},types:[t.Predicate(t.Any),t.String,t.Maybe(_)],impl:function(t){return p(F(t))(p(it)(rt(JSON.parse)))}};var wt=t.RecordType({match:t.String,groups:t.Array(t.Maybe(t.String))});function St(t){return{match:t[0],groups:u.map(p(B(D(void 0)))(h),t.slice(1))}}function Ot(t,e){var n=t.lastIndex,r=e();return t.lastIndex=n,r}return R.regex={consts:{},types:[t.RegexFlags,t.String,t.RegExp],impl:function(t){return function(e){return new RegExp(e,t)}}},R.regexEscape={consts:{},types:[t.String,t.String],impl:function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},R.test={consts:{},types:[t.RegExp,t.String,t.Boolean],impl:function(t){return function(e){return Ot(t,(function(){return t.test(e)}))}}},R.match={consts:{},types:[t.NonGlobalRegExp,t.String,t.Maybe(wt)],impl:function(t){return function(e){return u.map(St,u.reject(D(null),h(e.match(t))))}}},R.matchAll={consts:{},types:[t.GlobalRegExp,t.String,t.Array(wt)],impl:function(t){return function(e){return Ot(t,(function(){return lt((function(n){return u.map((function(t){return o(St(t))(null)}),u.reject(D(null),h(t.exec(e))))}))([])}))}}},R.toUpper={consts:{},types:[t.String,t.String],impl:b("toUpperCase")},R.toLower={consts:{},types:[t.String,t.String],impl:b("toLowerCase")},R.trim={consts:{},types:[t.String,t.String],impl:b("trim")},R.stripPrefix={consts:{},types:[t.String,t.String,t.Maybe(t.String)],impl:function(t){return function(e){var n=t.length;return e.slice(0,n)===t?h(e.slice(n)):d}}},R.stripSuffix={consts:{},types:[t.String,t.String,t.Maybe(t.String)],impl:function(t){return function(e){var n=e.length-t.length;return e.slice(n)===t?h(e.slice(0,n)):d}}},R.words={consts:{},types:[t.String,t.Array(t.String)],impl:function(t){var e=t.split(/\s+/),n=e.length;return e.slice(""===e[0]?1:0,""===e[n-1]?n-1:n)}},R.unwords={consts:{},types:[t.Array(t.String),t.String],impl:v("join")(" ")},R.lines={consts:{},types:[t.String,t.Array(t.String)],impl:function(t){return""===t?[]:t.replace(/\r\n?/g,"\n").match(/^(?=[\s\S]).*/gm)}},R.unlines={consts:{},types:[t.Array(t.String),t.String],impl:function(t){return t.reduce((function(t,e){return t+e+"\n"}),"")}},R.splitOn={consts:{},types:[t.String,t.String,t.Array(t.String)],impl:v("split")},R.splitOnRegex={consts:{},types:[t.GlobalRegExp,t.String,t.Array(t.String)],impl:function(t){return function(e){return Ot(t,(function(){for(var n,r=[],i=0;null!=(n=t.exec(e));)if(t.lastIndex===i&&""===n[0]){if(t.lastIndex===e.length)return r;t.lastIndex+=1}else r.push(e.slice(i,n.index)),i=n.index+n[0].length;return r.push(e.slice(i)),r}))}}},j({checkTypes:"undefined"===typeof r||null==r||null==Object({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_TYPE_CHECK_SANCTUARY:"false",REACT_APP_BUILD_TARGET:"LAMASSU"})||!1,env:t.env})}))}).call(this,n(70))},function(t,e,n){"use strict";var r=n(41),i=n(61),o=Object(r.a)((function(t,e,n){var r,o={};for(r in e)Object(i.a)(r,e)&&(o[r]=Object(i.a)(r,n)?t(r,e[r],n[r]):e[r]);for(r in n)Object(i.a)(r,n)&&!Object(i.a)(r,o)&&(o[r]=n[r]);return o}));e.a=o},function(t,e,n){(function(n){var r,i,o;i=[],void 0===(o="function"===typeof(r=function(){"use strict";function e(t,e){return"undefined"==typeof e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}function r(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){u(r.response,e,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function o(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(r){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,u=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype?function(t,e,n){var u=a.URL||a.webkitURL,s=document.createElement("a");e=e||t.name||"download",s.download=e,s.rel="noopener","string"==typeof t?(s.href=t,s.origin===location.origin?o(s):i(s.href)?r(t,e,n):o(s,s.target="_blank")):(s.href=u.createObjectURL(t),setTimeout((function(){u.revokeObjectURL(s.href)}),4e4),setTimeout((function(){o(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,n,a){if(n=n||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(e(t,a),n);else if(i(t))r(t,n,a);else{var u=document.createElement("a");u.href=t,u.target="_blank",setTimeout((function(){o(u)}))}}:function(t,e,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof t)return r(t,e,n);var o="application/octet-stream"===t.type,u=/constructor/i.test(a.HTMLElement)||a.safari,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||o&&u)&&"object"==typeof FileReader){var c=new FileReader;c.onloadend=function(){var t=c.result;t=s?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=t:location=t,i=null},c.readAsDataURL(t)}else{var f=a.URL||a.webkitURL,l=f.createObjectURL(t);i?i.location=l:location.href=l,i=null,setTimeout((function(){f.revokeObjectURL(l)}),4e4)}});a.saveAs=u.saveAs=u,t.exports=u})?r.apply(e,i):r)||(t.exports=o)}).call(this,n(59))},function(t,e,n){"use strict";var r=n(16),i=n(124),o=Object(r.a)((function(t,e){var n=t<0?e.length+t:t;return Object(i.a)(e)?e.charAt(n):e[n]}));e.a=o},function(t,e,n){"use strict";(function(t){function r(e,n){var r,i="undefined"!==typeof(r="undefined"!==typeof n?n:"undefined"!==typeof window?window:"undefined"!==typeof self?self:t).document&&r.document.attachEvent;if(!i){var o=function(){var t=r.requestAnimationFrame||r.mozRequestAnimationFrame||r.webkitRequestAnimationFrame||function(t){return r.setTimeout(t,20)};return function(e){return t(e)}}(),a=function(){var t=r.cancelAnimationFrame||r.mozCancelAnimationFrame||r.webkitCancelAnimationFrame||r.clearTimeout;return function(e){return t(e)}}(),u=function(t){var e=t.__resizeTriggers__,n=e.firstElementChild,r=e.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},s=function(t){if(!(t.target.className&&"function"===typeof t.target.className.indexOf&&t.target.className.indexOf("contract-trigger")<0&&t.target.className.indexOf("expand-trigger")<0)){var e=this;u(this),this.__resizeRAF__&&a(this.__resizeRAF__),this.__resizeRAF__=o((function(){(function(t){return t.offsetWidth!=t.__resizeLast__.width||t.offsetHeight!=t.__resizeLast__.height})(e)&&(e.__resizeLast__.width=e.offsetWidth,e.__resizeLast__.height=e.offsetHeight,e.__resizeListeners__.forEach((function(n){n.call(e,t)})))}))}},c=!1,f="",l="animationstart",d="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),p=r.document.createElement("fakeelement");if(void 0!==p.style.animationName&&(c=!0),!1===c)for(var g=0;g div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=t.head||t.getElementsByTagName("head")[0],i=t.createElement("style");i.id="detectElementResize",i.type="text/css",null!=e&&i.setAttribute("nonce",e),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(t.createTextNode(n)),r.appendChild(i)}}(o),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=o.createElement("div")).className="resize-triggers";var c='
';if(window.trustedTypes){var f=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return c}});t.__resizeTriggers__.innerHTML=f.createHTML("")}else t.__resizeTriggers__.innerHTML=c;t.appendChild(t.__resizeTriggers__),u(t),t.addEventListener("scroll",s,!0),l&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName==m&&u(t)},t.__resizeTriggers__.addEventListener(l,t.__resizeTriggers__.__animationListener__))}t.__resizeListeners__.push(n)}},removeResizeListener:function(t,e){if(i)t.detachEvent("onresize",e);else if(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),!t.__resizeListeners__.length){t.removeEventListener("scroll",s,!0),t.__resizeTriggers__.__animationListener__&&(t.__resizeTriggers__.removeEventListener(l,t.__resizeTriggers__.__animationListener__),t.__resizeTriggers__.__animationListener__=null);try{t.__resizeTriggers__=!t.removeChild(t.__resizeTriggers__)}catch(n){}}}}}n.d(e,"a",(function(){return r}))}).call(this,n(59))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(211);function i(t){return function e(n){for(var i,o,a,u=[],s=0,c=n.length;s0?n:1-n;return u("yy"===e?r%100:r,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):u(n+1,2)},d:function(t,e){return u(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return u(t.getUTCHours()%12||12,e.length)},H:function(t,e){return u(t.getUTCHours(),e.length)},m:function(t,e){return u(t.getUTCMinutes(),e.length)},s:function(t,e){return u(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,r=t.getUTCMilliseconds();return u(Math.floor(r*Math.pow(10,n-3)),e.length)}},c=n(22),f=864e5;var l=n(336),d=n(311),h=n(335),p=n(221),g="midnight",m="noon",b="morning",v="afternoon",y="evening",_="night";function w(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),o=r%60;if(0===o)return n+String(i);var a=e||"";return n+String(i)+a+u(o,2)}function S(t,e){return t%60===0?(t>0?"-":"+")+u(Math.abs(t)/60,2):O(t,e)}function O(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+u(Math.floor(i/60),2)+n+u(i%60,2)}var x={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return s.y(t,e)},Y:function(t,e,n,r){var i=Object(p.a)(t,r),o=i>0?i:1-i;return"YY"===e?u(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):u(o,e.length)},R:function(t,e){return u(Object(d.a)(t),e.length)},u:function(t,e){return u(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return u(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return u(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return s.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return u(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var i=Object(h.a)(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):u(i,e.length)},I:function(t,e,n){var r=Object(l.a)(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):u(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):s.d(t,e)},D:function(t,e,n){var r=function(t){Object(c.a)(1,arguments);var e=Object(a.a)(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),i=n-r;return Math.floor(i/f)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):u(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return u(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var i=t.getUTCDay(),o=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return u(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),i=0===r?7:r;switch(e){case"i":return String(i);case"ii":return u(i,e.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,i=t.getUTCHours();switch(r=12===i?m:0===i?g:i/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,i=t.getUTCHours();switch(r=i>=17?y:i>=12?v:i>=4?b:_,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return s.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):s.H(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):u(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):u(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):s.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):s.s(t,e)},S:function(t,e){return s.S(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return S(i);case"XXXX":case"XX":return O(i);case"XXXXX":case"XXX":default:return O(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return S(i);case"xxxx":case"xx":return O(i);case"xxxxx":case"xxx":default:return O(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+w(i,":");case"OOOO":default:return"GMT"+O(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+w(i,":");case"zzzz":default:return"GMT"+O(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return u(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return u((r._originalDate||t).getTime(),e.length)}},E=n(310),M=n(108),T=n(143),$=n(30),A=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,k=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,C=/^'([^]*?)'?$/,I=/''/g,P=/[a-zA-Z]/;function N(t,e,n){Object(c.a)(2,arguments);var u=String(e),s=n||{},f=s.locale||i.a,l=f.options&&f.options.firstWeekContainsDate,d=null==l?1:Object($.a)(l),h=null==s.firstWeekContainsDate?d:Object($.a)(s.firstWeekContainsDate);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=f.options&&f.options.weekStartsOn,g=null==p?0:Object($.a)(p),m=null==s.weekStartsOn?g:Object($.a)(s.weekStartsOn);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!f.localize)throw new RangeError("locale must contain localize property");if(!f.formatLong)throw new RangeError("locale must contain formatLong property");var b=Object(a.a)(t);if(!Object(r.a)(b))throw new RangeError("Invalid time value");var v=Object(M.a)(b),y=Object(o.a)(b,v),_={firstWeekContainsDate:h,weekStartsOn:m,locale:f,_originalDate:b},w=u.match(k).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,E.a[e])(t,f.formatLong,_):t})).join("").match(A).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return R(n);var i=x[r];if(i)return!s.useAdditionalWeekYearTokens&&Object(T.b)(n)&&Object(T.c)(n,e,t),!s.useAdditionalDayOfYearTokens&&Object(T.a)(n)&&Object(T.c)(n,e,t),i(y,n,f.localize,_);if(r.match(P))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("");return w}function R(t){return t.match(C)[1].replace(I,"'")}},function(t,e,n){"use strict";var r=n(32),i=n(16),o=n(76),a=n(137),u=n(97),s=Object(i.a)((function(t,e){return"function"===typeof e["fantasy-land/ap"]?e["fantasy-land/ap"](t):"function"===typeof t.ap?t.ap(e):"function"===typeof t?function(n){return t(n)(e(n))}:Object(o.a)((function(t,n){return Object(a.a)(t,Object(u.a)(n,e))}),[],t)})),c=n(85),f=Object(i.a)((function(t,e){var n=Object(c.a)(t,e);return Object(c.a)(t,(function(){return Object(o.a)(s,Object(u.a)(n,arguments[0]),Array.prototype.slice.call(arguments,1))}))})),l=Object(r.a)((function(t){return f(t.length,t)}));e.a=l},function(t,e,n){"use strict";var r=n(212),i=n(72),o=n(61),a=n(76),u=n(64),s=function(){function t(t,e,n,r){this.valueFn=t,this.valueAcc=e,this.keyFn=n,this.xf=r,this.inputs={}}return t.prototype["@@transducer/init"]=u.a.init,t.prototype["@@transducer/result"]=function(t){var e;for(e in this.inputs)if(Object(o.a)(e,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[e]))["@@transducer/reduced"]){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){var n=this.keyFn(e);return this.inputs[n]=this.inputs[n]||[n,this.valueAcc],this.inputs[n][1]=this.valueFn(this.inputs[n][1],e),t},t}(),c=Object(r.a)(4,[],(function(t,e,n,r){return new s(t,e,n,r)})),f=Object(r.a)(4,[],Object(i.a)([],c,(function(t,e,n,r){return Object(a.a)((function(r,i){var a=n(i);return r[a]=t(Object(o.a)(a,r)?r[a]:e,i),r}),{},r)})));e.a=f},function(t,e,n){"use strict";var r=n(16),i=n(72),o=n(290),a=n(188),u=n(76),s=n(64),c=function(){function t(t,e){this.xf=e,this.f=t}return t.prototype["@@transducer/init"]=s.a.init,t.prototype["@@transducer/result"]=s.a.result,t.prototype["@@transducer/step"]=function(t,e){return this.f(e)?this.xf["@@transducer/step"](t,e):t},t}(),f=Object(r.a)((function(t,e){return new c(t,e)})),l=n(98),d=Object(r.a)(Object(i.a)(["filter"],f,(function(t,e){return Object(a.a)(e)?Object(u.a)((function(n,r){return t(e[r])&&(n[r]=e[r]),n}),{},Object(l.a)(e)):Object(o.a)(t,e)})));e.a=d},function(t,e,n){"use strict";var r=n(301),i=n(299),o=n(16),a=Object(o.a)((function(t,e){for(var n,r,o=new i.a,a=[],u=0;u=0&&this.i>=this.n?Object(o.a)(n):n},t}(),s=Object(r.a)((function(t,e){return new u(t,e)})),c=n(104),f=Object(r.a)(Object(i.a)(["take"],s,(function(t,e){return Object(c.a)(0,t<0?1/0:t,e)})));e.a=f},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(25),i=n(22);function o(t,e){Object(i.a)(2,arguments);var n=Object(r.a)(t),o=Object(r.a)(e);return n.getFullYear()-o.getFullYear()}var a=n(126);function u(t,e){Object(i.a)(2,arguments);var n=Object(r.a)(t),u=Object(r.a)(e),s=Object(a.a)(n,u),c=Math.abs(o(n,u));n.setFullYear(1584),u.setFullYear(1584);var f=Object(a.a)(n,u)===-s,l=s*(c-Number(f));return 0===l?0:l}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(25),i=n(108),o=n(174),a=n(22),u=864e5;function s(t,e){Object(a.a)(2,arguments);var n=Object(o.a)(t),r=Object(o.a)(e),s=n.getTime()-Object(i.a)(n),c=r.getTime()-Object(i.a)(r);return Math.round((s-c)/u)}function c(t,e){var n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function f(t,e){Object(a.a)(2,arguments);var n=Object(r.a)(t),i=Object(r.a)(e),o=c(n,i),u=Math.abs(s(n,i));n.setDate(n.getDate()-o*u);var f=Number(c(n,i)===-o),l=o*(u-f);return 0===l?0:l}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(30),i=n(25),o=n(22);function a(t,e){Object(o.a)(2,arguments);var n=Object(i.a)(t).getTime(),a=Object(r.a)(e);return new Date(n+a)}function u(t,e){Object(o.a)(2,arguments);var n=Object(r.a)(e);return a(t,-n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var r=n(25),i=n(127),o=n(30),a=n(221),u=n(22);function s(t,e){Object(u.a)(1,arguments);var n=e||{},r=n.locale,s=r&&r.options&&r.options.firstWeekContainsDate,c=null==s?1:Object(o.a)(s),f=null==n.firstWeekContainsDate?c:Object(o.a)(n.firstWeekContainsDate),l=Object(a.a)(t,e),d=new Date(0);d.setUTCFullYear(l,0,f),d.setUTCHours(0,0,0,0);var h=Object(i.a)(d,e);return h}var c=6048e5;function f(t,e){Object(u.a)(1,arguments);var n=Object(r.a)(t),o=Object(i.a)(n,e).getTime()-s(n,e).getTime();return Math.round(o/c)+1}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(25),i=n(142),o=n(311),a=n(22);function u(t){Object(a.a)(1,arguments);var e=Object(o.a)(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=Object(i.a)(n);return r}var s=6048e5;function c(t){Object(a.a)(1,arguments);var e=Object(r.a)(t),n=Object(i.a)(e).getTime()-u(e).getTime();return Math.round(n/s)+1}},function(t,e,n){"use strict";var r=n(4),i=n(17),o=n(1),a=n.n(o),u=(n(13),n(47)),s=n(15),c=n(44),f=n(120),l=n(24),d=!0,h=!1,p=null,g={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function m(t){t.metaKey||t.altKey||t.ctrlKey||(d=!0)}function b(){d=!1}function v(){"hidden"===this.visibilityState&&h&&(d=!0)}function y(t){var e=t.target;try{return e.matches(":focus-visible")}catch(n){}return d||function(t){var e=t.type,n=t.tagName;return!("INPUT"!==n||!g[e]||t.readOnly)||"TEXTAREA"===n&&!t.readOnly||!!t.isContentEditable}(e)}function _(){h=!0,window.clearTimeout(p),p=window.setTimeout((function(){h=!1}),100)}function w(){return{isFocusVisible:y,onBlurVisible:_,ref:o.useCallback((function(t){var e,n=u.findDOMNode(t);null!=n&&((e=n.ownerDocument).addEventListener("keydown",m,!0),e.addEventListener("mousedown",b,!0),e.addEventListener("pointerdown",b,!0),e.addEventListener("touchstart",b,!0),e.addEventListener("visibilitychange",v,!0))}),[])}}var S=n(107),O=n(65),x=n(172),E=n(69),M=n(226);function T(t,e){var n=Object.create(null);return t&&o.Children.map(t,(function(t){return t})).forEach((function(t){n[t.key]=function(t){return e&&Object(o.isValidElement)(t)?e(t):t}(t)})),n}function $(t,e,n){return null!=n[e]?n[e]:t.props[e]}function A(t,e,n){var r=T(t.children),i=function(t,e){function n(n){return n in e?e[n]:t[n]}t=t||{},e=e||{};var r,i=Object.create(null),o=[];for(var a in t)a in e?o.length&&(i[a]=o,o=[]):o.push(a);var u={};for(var s in e){if(i[s])for(r=0;r0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=e.pulsate,i=void 0!==r&&r,o=e.center,u=void 0===o?a||e.pulsate:o,s=e.fakeElement,c=void 0!==s&&s;if("mousedown"===t.type&&m.current)m.current=!1;else{"touchstart"===t.type&&(m.current=!0);var f,l,d,h=c?null:y.current,p=h?h.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(u||0===t.clientX&&0===t.clientY||!t.clientX&&!t.touches)f=Math.round(p.width/2),l=Math.round(p.height/2);else{var g=t.touches?t.touches[0]:t,w=g.clientX,S=g.clientY;f=Math.round(w-p.left),l=Math.round(S-p.top)}if(u)(d=Math.sqrt((2*Math.pow(p.width,2)+Math.pow(p.height,2))/3))%2===0&&(d+=1);else{var O=2*Math.max(Math.abs((h?h.clientWidth:0)-f),f)+2,x=2*Math.max(Math.abs((h?h.clientHeight:0)-l),l)+2;d=Math.sqrt(Math.pow(O,2)+Math.pow(x,2))}t.touches?null===v.current&&(v.current=function(){_({pulsate:i,rippleX:f,rippleY:l,rippleSize:d,cb:n})},b.current=setTimeout((function(){v.current&&(v.current(),v.current=null)}),80)):_({pulsate:i,rippleX:f,rippleY:l,rippleSize:d,cb:n})}}),[a,_]),O=o.useCallback((function(){w({},{pulsate:!0})}),[w]),x=o.useCallback((function(t,e){if(clearTimeout(b.current),"touchend"===t.type&&v.current)return t.persist(),v.current(),v.current=null,void(b.current=setTimeout((function(){x(t,e)})));v.current=null,h((function(t){return t.length>0?t.slice(1):t})),g.current=e}),[]);return o.useImperativeHandle(e,(function(){return{pulsate:O,start:w,stop:x}}),[O,w,x]),o.createElement("span",Object(r.a)({className:Object(s.a)(u.root,c),ref:y},f),o.createElement(I,{component:null,exit:!0},d))})),j=Object(l.a)((function(t){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(t.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(t.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(t.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(t.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(o.memo(R)),D=o.forwardRef((function(t,e){var n=t.action,a=t.buttonRef,l=t.centerRipple,d=void 0!==l&&l,h=t.children,p=t.classes,g=t.className,m=t.component,b=void 0===m?"button":m,v=t.disabled,y=void 0!==v&&v,_=t.disableRipple,S=void 0!==_&&_,O=t.disableTouchRipple,x=void 0!==O&&O,E=t.focusRipple,M=void 0!==E&&E,T=t.focusVisibleClassName,$=t.onBlur,A=t.onClick,k=t.onFocus,C=t.onFocusVisible,I=t.onKeyDown,P=t.onKeyUp,N=t.onMouseDown,R=t.onMouseLeave,D=t.onMouseUp,L=t.onTouchEnd,F=t.onTouchMove,B=t.onTouchStart,U=t.onDragLeave,z=t.tabIndex,H=void 0===z?0:z,V=t.TouchRippleProps,q=t.type,W=void 0===q?"button":q,G=Object(i.a)(t,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),K=o.useRef(null);var Y=o.useRef(null),Z=o.useState(!1),Q=Z[0],X=Z[1];y&&Q&&X(!1);var J=w(),tt=J.isFocusVisible,et=J.onBlurVisible,nt=J.ref;function rt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:x;return Object(f.a)((function(r){return e&&e(r),!n&&Y.current&&Y.current[t](r),!0}))}o.useImperativeHandle(n,(function(){return{focusVisible:function(){X(!0),K.current.focus()}}}),[]),o.useEffect((function(){Q&&M&&!S&&Y.current.pulsate()}),[S,M,Q]);var it=rt("start",N),ot=rt("stop",U),at=rt("stop",D),ut=rt("stop",(function(t){Q&&t.preventDefault(),R&&R(t)})),st=rt("start",B),ct=rt("stop",L),ft=rt("stop",F),lt=rt("stop",(function(t){Q&&(et(t),X(!1)),$&&$(t)}),!1),dt=Object(f.a)((function(t){K.current||(K.current=t.currentTarget),tt(t)&&(X(!0),C&&C(t)),k&&k(t)})),ht=function(){var t=u.findDOMNode(K.current);return b&&"button"!==b&&!("A"===t.tagName&&t.href)},pt=o.useRef(!1),gt=Object(f.a)((function(t){M&&!pt.current&&Q&&Y.current&&" "===t.key&&(pt.current=!0,t.persist(),Y.current.stop(t,(function(){Y.current.start(t)}))),t.target===t.currentTarget&&ht()&&" "===t.key&&t.preventDefault(),I&&I(t),t.target===t.currentTarget&&ht()&&"Enter"===t.key&&!y&&(t.preventDefault(),A&&A(t))})),mt=Object(f.a)((function(t){M&&" "===t.key&&Y.current&&Q&&!t.defaultPrevented&&(pt.current=!1,t.persist(),Y.current.stop(t,(function(){Y.current.pulsate(t)}))),P&&P(t),A&&t.target===t.currentTarget&&ht()&&" "===t.key&&!t.defaultPrevented&&A(t)})),bt=b;"button"===bt&&G.href&&(bt="a");var vt={};"button"===bt?(vt.type=W,vt.disabled=y):("a"===bt&&G.href||(vt.role="button"),vt["aria-disabled"]=y);var yt=Object(c.a)(a,e),_t=Object(c.a)(nt,K),wt=Object(c.a)(yt,_t),St=o.useState(!1),Ot=St[0],xt=St[1];o.useEffect((function(){xt(!0)}),[]);var Et=Ot&&!S&&!y;return o.createElement(bt,Object(r.a)({className:Object(s.a)(p.root,g,Q&&[p.focusVisible,T],y&&p.disabled),onBlur:lt,onClick:A,onFocus:dt,onKeyDown:gt,onKeyUp:mt,onMouseDown:it,onMouseLeave:ut,onMouseUp:at,onDragLeave:ot,onTouchEnd:ct,onTouchMove:ft,onTouchStart:st,ref:wt,tabIndex:y?-1:H},vt,G),h,Et?o.createElement(j,Object(r.a)({ref:Y,center:d},V)):null)}));e.a=Object(l.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(D)},,,,,,,function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(t){if(null===t||void 0===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(i){return!1}}()?Object.assign:function(t,e){for(var n,u,s=a(t),c=1;c-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){var r=n(653),i=n(659),o=n(663);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){"use strict";var r=e;r.version=n(736).version,r.utils=n(113),r.rand=n(180),r.curve=n(440),r.curves=n(353),r.ec=n(749),r.eddsa=n(752)},function(t,e,n){"use strict";var r,i=e,o=n(181),a=n(440),u=n(113).assert;function s(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,u(this.g.validate(),"Invalid curve"),u(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 s(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=s,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(748)}catch(f){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){"use strict";var r=n(181),i=n(261),o=n(95);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),n=i.toArray(t.nonce,t.nonceEnc||"hex"),r=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,r)}t.exports=a,a.prototype._init=function(t,e,n){var r=t.concat(e).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1},a.prototype.generate=function(t,e,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof e&&(r=n,n=e,e=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var o=[];o.length-1?r:o.nextTick;v.WritableState=b;var c=Object.create(n(237));c.inherits=n(37);var f={deprecate:n(448)},l=n(445),d=n(356).Buffer,h=i.Uint8Array||function(){};var p,g=n(446);function m(){}function b(t,e){u=u||n(182),t=t||{};var r=e instanceof u;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(x,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),x(t,e))}(t,n,r,e,i);else{var a=S(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||w(t,n),r?s(_,t,n,a,i):_(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 v(t){if(u=u||n(182),!p.call(v,this)&&!(this instanceof u))return new v(t);this._writableState=new b(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 y(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 _(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),x(t,e)}function w(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 u=0,s=!0;n;)i[u]=n,n.isBuf||(s=!1),n=n.next,u+=1;i.allBuffers=s,y(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(y(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 O(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),x(t,e)}))}function x(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(O,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}c.inherits(v,l),b.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(b.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(v,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===v&&(t&&t._writableState instanceof b)}})):p=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,n){var r,i=this._writableState,a=!1,u=!i.objectMode&&(r=t,d.isBuffer(r)||r instanceof h);return u&&!d.isBuffer(t)&&(t=function(t){return d.from(t)}(t)),"function"===typeof e&&(n=e,e=null),u?e="buffer":e||(e=i.defaultEncoding),"function"!==typeof n&&(n=m),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(u||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=d.from(e,n));return e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var u=e.objectMode?1:r.length;e.length+=u;var s=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.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&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,x(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(70),n(447).setImmediate,n(59))},function(t,e,n){"use strict";var r=n(37),i=n(451),o=n(36).Buffer,a=new Array(16);function u(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(t,e){return t<>>32-e}function c(t,e,n,r,i,o,a){return s(t+(e&n|~e&r)+i+o|0,a)+e|0}function f(t,e,n,r,i,o,a){return s(t+(e&r|n&~r)+i+o|0,a)+e|0}function l(t,e,n,r,i,o,a){return s(t+(e^n^r)+i+o|0,a)+e|0}function d(t,e,n,r,i,o,a){return s(t+(n^(e|~r))+i+o|0,a)+e|0}r(u,i),u.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=d(n,r=l(r,i,o,n,t[2],3299628645,23),i,o,t[0],4096336452,6),o=d(o,n,r,i,t[7],1126891415,10),i=d(i,o,n,r,t[14],2878612391,15),r=d(r,i,o,n,t[5],4237533241,21),n=d(n,r,i,o,t[12],1700485571,6),o=d(o,n,r,i,t[3],2399980690,10),i=d(i,o,n,r,t[10],4293915773,15),r=d(r,i,o,n,t[1],2240044497,21),n=d(n,r,i,o,t[8],1873313359,6),o=d(o,n,r,i,t[15],4264355552,10),i=d(i,o,n,r,t[6],2734768916,15),r=d(r,i,o,n,t[13],1309151649,21),n=d(n,r,i,o,t[4],4149444226,6),o=d(o,n,r,i,t[11],3174756917,10),i=d(i,o,n,r,t[2],718787259,15),r=d(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},u.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=u},function(t,e,n){"use strict";var r=n(199).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 g(t,e,n,r,i,o,a,u){return p(t+(e^n^r)+o+a|0,u)+i|0}function m(t,e,n,r,i,o,a,u){return p(t+(e&n|~e&r)+o+a|0,u)+i|0}function b(t,e,n,r,i,o,a,u){return p(t+((e|~n)^r)+o+a|0,u)+i|0}function v(t,e,n,r,i,o,a,u){return p(t+(e&r|n&~r)+o+a|0,u)+i|0}function y(t,e,n,r,i,o,a,u){return p(t+(e^(n|~r))+o+a|0,u)+i|0}i(h,o),h.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,h=0|this._e,_=0|this._a,w=0|this._b,S=0|this._c,O=0|this._d,x=0|this._e,E=0;E<80;E+=1){var M,T;E<16?(M=g(n,r,i,o,h,t[u[E]],l[0],c[E]),T=y(_,w,S,O,x,t[s[E]],d[0],f[E])):E<32?(M=m(n,r,i,o,h,t[u[E]],l[1],c[E]),T=v(_,w,S,O,x,t[s[E]],d[1],f[E])):E<48?(M=b(n,r,i,o,h,t[u[E]],l[2],c[E]),T=b(_,w,S,O,x,t[s[E]],d[2],f[E])):E<64?(M=v(n,r,i,o,h,t[u[E]],l[3],c[E]),T=m(_,w,S,O,x,t[s[E]],d[3],f[E])):(M=y(n,r,i,o,h,t[u[E]],l[4],c[E]),T=g(_,w,S,O,x,t[s[E]],d[4],f[E])),n=h,h=o,o=p(i,10),i=r,r=M,_=x,x=O,O=p(S,10),S=w,w=T}var $=this._b+i+O|0;this._b=this._c+o+x|0,this._c=this._d+h+_|0,this._d=this._e+n+w|0,this._e=this._a+r+S|0,this._a=$},h.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=h},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(775),e.sha1=n(776),e.sha224=n(777),e.sha256=n(458),e.sha384=n(778),e.sha512=n(459)},function(t,e){var n={Array:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){return null!==t&&void 0!==t&&t.constructor===Array})),Boolean:function(t){return"boolean"===typeof t},Function:function(t){return"function"===typeof t},Nil:function(t){return void 0===t||null===t},Number:function(t){return"number"===typeof t},Object:function(t){return"object"===typeof t},String:function(t){return"string"===typeof t},"":function(){return!0}};for(var r in n.Null=n.Nil,n)n[r].toJSON=function(t){return t}.bind(null,r);t.exports=n},function(t,e,n){var r=n(36).Buffer,i=n(157),o=n(60),a=n(785),u=n(67),s=n(78),c=n(132),f=n(462);function l(t){var e=t.length;return f.encodingLength(e)+e}function d(){this.version=1,this.locktime=0,this.ins=[],this.outs=[]}d.DEFAULT_SEQUENCE=4294967295,d.SIGHASH_ALL=1,d.SIGHASH_NONE=2,d.SIGHASH_SINGLE=3,d.SIGHASH_ANYONECANPAY=128,d.ADVANCED_TRANSACTION_MARKER=0,d.ADVANCED_TRANSACTION_FLAG=1;var h=r.allocUnsafe(0),p=[],g=r.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),m=r.from("0000000000000000000000000000000000000000000000000000000000000001","hex"),b=r.from("ffffffffffffffff","hex"),v={script:h,valueBuffer:b};d.fromBuffer=function(t,e){var n=0;function r(e){return n+=e,t.slice(n-e,n)}function i(){var e=t.readUInt32LE(n);return n+=4,e}function o(){var e=a.readUInt64LE(t,n);return n+=8,e}function u(){var e=f.decode(t,n);return n+=f.decode.bytes,e}function s(){return r(u())}function c(){for(var t=u(),e=[],n=0;n=this.ins.length)return m;var a=o.compile(o.decompile(e).filter((function(t){return t!==u.OP_CODESEPARATOR}))),f=this.clone();if((31&n)===d.SIGHASH_NONE)f.outs=[],f.ins.forEach((function(e,n){n!==t&&(e.sequence=0)}));else if((31&n)===d.SIGHASH_SINGLE){if(t>=this.outs.length)return m;f.outs.length=t+1;for(var l=0;l>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function s(t){for(var e=1,n=0;n126)return"Invalid prefix ("+t+")";e=u(e)^r>>5}for(e=u(e),n=0;ne)return"Exceeds length limit";var n=t.toLowerCase(),r=t.toUpperCase();if(t!==n&&t!==r)return"Mixed-case string "+t;var o=(t=n).lastIndexOf("1");if(-1===o)return"No separator character for "+t;if(0===o)return"Missing prefix for "+t;var a=t.slice(0,o),c=t.slice(o+1);if(c.length<6)return"Data too short";var f=s(a);if("string"===typeof f)return f;for(var l=[],d=0;d=c.length||l.push(p)}return 1!==f?"Invalid checksum for "+t:{prefix:a,words:l}}function f(t,e,n,r){for(var i=0,o=0,a=(1<=n;)o-=n,u.push(i>>o&a);if(r)o>0&&u.push(i<=e)return"Excess padding";if(i<n)throw new TypeError("Exceeds length limit");var i=s(t=t.toLowerCase());if("string"===typeof i)throw new Error(i);for(var o=t+"1",a=0;a>5!==0)throw new Error("Non 5-bit word");i=u(i)^c,o+=r.charAt(c)}for(a=0;a<6;++a)i=u(i);for(i^=1,a=0;a<6;++a){o+=r.charAt(i>>5*(5-a)&31)}return o},toWordsUnsafe:function(t){var e=f(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=f(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)},fromWordsUnsafe:function(t){var e=f(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=f(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}}},function(t,e,n){var r=n(788),i=n(789),o=n(790),a=n(791),u=n(792),s=n(793),c=n(794);t.exports={embed:r,p2ms:i,p2pk:o,p2pkh:a,p2sh:u,p2wpkh:s,p2wsh:c}},function(t,e,n){t.exports={input:n(796),output:n(797)}},function(t,e,n){t.exports={input:n(799),output:n(800)}},function(t,e,n){t.exports={input:n(801),output:n(802)}},function(t,e,n){!function(e,r){var i;t.exports=(i=n(49),function(){var t=i,e=t.lib,n=e.WordArray,r=e.Hasher,o=t.algo,a=[],u=o.SHA1=r.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],u=n[3],s=n[4],c=0;c<80;c++){if(c<16)a[c]=0|t[e+c];else{var f=a[c-3]^a[c-8]^a[c-14]^a[c-16];a[c]=f<<1|f>>>31}var l=(r<<5|r>>>27)+s+a[c];l+=c<20?1518500249+(i&o|~i&u):c<40?1859775393+(i^o^u):c<60?(i&o|i&u|o&u)-1894007588:(i^o^u)-899497514,s=u,u=o,o=i<<30|i>>>2,i=r,r=l}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+u|0,n[4]=n[4]+s|0},_doFinalize:function(){var t=this._data,e=t.words,n=8*this._nDataBytes,r=8*t.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),e[15+(r+64>>>9<<4)]=n,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=r.clone.call(this);return t._hash=this._hash.clone(),t}});t.SHA1=r._createHelper(u),t.HmacSHA1=r._createHmacHelper(u)}(),i.SHA1)}()},function(t,e,n){!function(e,r){var i;t.exports=(i=n(49),void function(){var t=i,e=t.lib.Base,n=t.enc.Utf8;t.algo.HMAC=e.extend({init:function(t,e){t=this._hasher=new t.init,"string"==typeof e&&(e=n.parse(e));var r=t.blockSize,i=4*r;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var o=this._oKey=e.clone(),a=this._iKey=e.clone(),u=o.words,s=a.words,c=0;c>1,c=i.getN(),f=i.getG(),d=s?n.add(c):n,h=i.fromX(u,d);if(!h.mul(c).isInfinity())throw new Error("nR is not a valid curve point");var p=e.neg().umod(c),g=n.invm(c),m=h.mul(o).add(f.mul(p)).mul(g);return a.fromPoint(m,this.sig.compressed)},d.prototype.sigError=function(){if(!c.isBuffer(this.hashbuf)||32!==this.hashbuf.length)return"hashbuf must be a 32 byte buffer";var t=this.sig.r,e=this.sig.s;if(!t.gt(r.Zero)||!t.lt(i.getN())||!e.gt(r.Zero)||!e.lt(i.getN()))return"r and s not in range";var n=r.fromBuffer(this.hashbuf,this.endian?{endian:this.endian}:void 0),o=i.getN(),a=e.invm(o),u=a.mul(n).umod(o),s=a.mul(t).umod(o),f=i.getG().mulAdd(u,this.pubkey.point,s);return f.isInfinity()?"p is infinity":0!==f.getX().umod(o).cmp(t)&&"Invalid signature"},d.toLowS=function(t){return t.gt(r.fromBuffer(e.from("7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0","hex")))&&(t=i.getN().sub(t)),t},d.prototype._findSignature=function(t,e){var n,o,a,u=i.getN(),s=i.getG(),c=0;do{(!this.k||c>0)&&this.deterministicK(c),c++,n=this.k,o=s.mul(n).x.umod(u),a=n.invm(u).mul(e.add(t.mul(o))).umod(u)}while(o.cmp(r.Zero)<=0||a.cmp(r.Zero)<=0);return{s:a=d.toLowS(a),r:o}},d.prototype.sign=function(){var t=this.hashbuf,e=this.privkey,n=e.bn;l.checkState(t&&e&&n,new Error("invalid parameters")),l.checkState(c.isBuffer(t)&&32===t.length,new Error("hashbuf must be a 32 byte buffer"));var i=r.fromBuffer(t,this.endian?{endian:this.endian}:void 0),a=this._findSignature(n,i);return a.compressed=this.pubkey.compressed,this.sig=new o(a),this},d.prototype.signRandomK=function(){return this.randomK(),this.sign()},d.prototype.toString=function(){var t={};return this.hashbuf&&(t.hashbuf=this.hashbuf.toString("hex")),this.privkey&&(t.privkey=this.privkey.toString()),this.pubkey&&(t.pubkey=this.pubkey.toString()),this.sig&&(t.sig=this.sig.toString()),this.k&&(t.k=this.k.toString()),JSON.stringify(t)},d.prototype.verify=function(){return this.sigError()?this.verified=!1:this.verified=!0,this},d.sign=function(t,e,n){return d().set({hashbuf:t,endian:n,privkey:e}).sign().sig},d.verify=function(t,e,n,r){return d().set({hashbuf:t,endian:r,sig:e,pubkey:n}).verify().verified},t.exports=d}).call(this,n(29).Buffer)},function(t,e,n){"use strict";var r=n(95);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=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(),u=new r(t).mul(i.blinder).umod(n.modulus),s=u.toRed(r.mont(n.prime1)),c=u.toRed(r.mont(n.prime2)),f=n.coefficient,l=n.prime1,d=n.prime2,h=s.redPow(n.exponent1).fromRed(),p=c.redPow(n.exponent2).fromRed(),g=h.isub(p).imul(f).umod(l).imul(d);return p.iadd(g).imul(i.unblinder).umod(n.modulus).toArrayLike(e,"be",a)}a.getr=o,t.exports=a}).call(this,n(29).Buffer)},function(t,e,n){"use strict";var r,i=e,o=n(181),a=n(498),u=n(115).assert;function s(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,u(this.g.validate(),"Invalid curve"),u(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 s(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=s,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(901)}catch(f){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){"use strict";(function(e){var r,i=n(29),o=i.Buffer,a={};for(r in i)i.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(a[r]=i[r]);var u=a.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(u[r]=o[r]);if(a.Buffer.prototype=o.prototype,u.from&&u.from!==Uint8Array.from||(u.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&&"undefined"===typeof 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)}),u.alloc||(u.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(s){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a}).call(this,n(70))},function(t,e,n){"use strict";var r=n(383).Reporter,i=n(240).EncoderBuffer,o=n(240).DecoderBuffer,a=n(95),u=["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"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u);function c(t,e,n){var 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;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var t=this._baseState,e={};f.forEach((function(n){e[n]=t[n]}));var n=new this.constructor(e.parent);return n._baseState=e,n},c.prototype._wrap=function(){var t=this._baseState;s.forEach((function(e){this[e]=function(){var n=new this.constructor(this);return t.children.push(n),n[e].apply(n,arguments)}}),this)},c.prototype._init=function(t){var 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){var 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;var e={};return Object.keys(t).forEach((function(n){n==(0|n)&&(n|=0);var 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(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),u.forEach((function(t){c.prototype[t]=function(){var 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);var 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){var e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},c.prototype.explicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},c.prototype.implicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},c.prototype.obj=function(){var 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){var 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){var 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){var e=this._baseState;return a(null===e.use),e.contains=t,this},c.prototype._decode=function(t,e){var n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));var r,i=n.default,a=!0,u=null;if(null!==n.key&&(u=t.enterKey(n.key)),n.optional){var s=null;if(null!==n.explicit?s=n.explicit:null!==n.implicit?s=n.implicit:null!==n.tag&&(s=n.tag),null!==s||n.any){if(a=this._peekTag(t,s,n.any),t.isError(a))return a}else{var c=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),a=!0}catch(g){a=!1}t.restore(c)}}if(n.obj&&a&&(r=t.enterObject()),a){if(null!==n.explicit){var f=this._decodeTag(t,n.explicit);if(t.isError(f))return f;t=f}var l=t.offset;if(null===n.use&&null===n.choice){var d;n.any&&(d=t.save());var h=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(h))return h;n.any?i=t.raw(d):t=h}if(e&&e.track&&null!==n.tag&&e.track(t.path(),l,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)){var p=new o(i);i=this._getUse(n.contains,t._reporterState.obj)._decode(p,e)}}return n.obj&&a&&(i=t.leaveObject(r)),null===n.key||null===i&&!0!==a?null!==u&&t.exitKey(u):t.leaveKey(u,n.key,i),i},c.prototype._decodeGeneric=function(t,e,n){var 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){var 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){var n=this._baseState,r=null,i=!1;return Object.keys(n.choice).some((function(o){var a=t.save(),u=n.choice[o];try{var s=u._decode(t,e);if(t.isError(s))return!1;r={type:o,value:s},i=!0}catch(c){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){var r=this._baseState;if(null===r.default||r.default!==t){var i=this._encodeValue(t,e,n);if(void 0!==i&&!this._skipDefault(i,e,n))return i}},c.prototype._encodeValue=function(t,e,n){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new r);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var a=null,u=!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),u=!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");var r=e.enterKey(n._baseState.key);if("object"!==typeof t)return e.error("Child expected, but input is not object");var 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");var s=this.clone();s._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(n){var r=this._baseState;return this._getUse(r.args[0],t)._encode(n,e)}),s))}else null!==i.use?o=this._getUse(i.use,n)._encode(t,e):(a=this._encodePrimitive(i.tag,t),u=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===c?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,u,f,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(t,e){var 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){var 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";var r=n(37);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(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var 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){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,n){var 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(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,n=e.obj;return e.obj=t,n},i.prototype.error=function(t){var e,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){var 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(e){this.stack=e.stack}return this}},function(t,e,n){"use strict";function r(t){var e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);var 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){"use strict";var r,i=e,o=n(181),a=n(506),u=n(116).assert;function s(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,u(this.g.validate(),"Invalid curve"),u(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 s(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=s,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(926)}catch(f){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){"use strict";(function(e){var r=n(79),i=n(186),o=n(100),a=(n(101),n(242),n(84)),u=n(63),s=(n(48),n(52)),c=function t(e){if(!(this instanceof t))return new t(e);e&&this.set(e)};function f(t){return t.toBuffer().length<32?t.toBuffer({size:32}):t.toBuffer()}c.prototype.set=function(t){return this.hashbuf=t.hashbuf||this.hashbuf,this.endian=t.endian||this.endian,this.privkey=t.privkey||this.privkey,this.pubkey=t.pubkey||(this.privkey?this.privkey.publicKey:this.pubkey),this.sig=t.sig||this.sig,this.verified=t.verified||this.verified,this},c.prototype.privkey2pubkey=function(){this.pubkey=this.privkey.toPublicKey()},c.prototype.toPublicKey=function(){return this.privkey.toPublicKey()},c.prototype.sign=function(){var t=this.hashbuf,e=this.privkey,n=e.bn;s.checkState(t&&e&&n,new Error("invalid parameters")),s.checkState(u.isBuffer(t)&&32===t.length,new Error("hashbuf must be a 32 byte buffer"));var i=r.fromBuffer(t,this.endian?{endian:this.endian}:void 0),a=this._findSignature(n,i);return a.compressed=this.pubkey.compressed,a.isSchnorr=!0,this.sig=new o(a),this},c.prototype._findSignature=function(t,n){var o=i.getN(),u=i.getG();s.checkState(!t.lte(new r(0)),new Error("privkey out of field of curve")),s.checkState(!t.gte(o),new Error("privkey out of field of curve"));var c=this.nonceFunctionRFC6979(t.toBuffer({size:32}),n.toBuffer({size:32})),l=u.mul(t),d=u.mul(c);c=d.hasSquare()?c:o.sub(c);var h=d.getX();return{r:h,s:r.fromBuffer(a.sha256(e.concat([f(h),i.pointToCompressed(l),n.toBuffer({size:32})]))).mul(t).add(c).mod(o)}},c.prototype.sigError=function(){if(!u.isBuffer(this.hashbuf)||32!==this.hashbuf.length)return"hashbuf must be a 32 byte buffer";var t=f(this.sig.r).length+function(t){return t.toBuffer().length<32?t.toBuffer({size:32}):t.toBuffer()}(this.sig.s).length;if(64!==t&&65!==t)return"signature must be a 64 byte or 65 byte array";var n="little"===this.endian?u.reverse(this.hashbuf):this.hashbuf,o=this.pubkey.point,s=i.getG();if(o.isInfinity())return!0;var c=this.sig.r,l=this.sig.s,d=new r("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","hex"),h=i.getN();if(c.gte(d)||l.gte(h))return!0;var p=f(this.sig.r),g=i.pointToCompressed(o),m=a.sha256(e.concat([p,g,n])),b=r.fromBuffer(m,"big").umod(h),v=s.mul(l),y=o.mul(h.sub(b)),_=v.add(y);return!(!_.isInfinity()&&_.hasSquare()&&_.getX().eq(c))},c.prototype.verify=function(){return this.sigError()?this.verified=!1:this.verified=!0,this},c.prototype.nonceFunctionRFC6979=function(t,n){var o=e.from("0101010101010101010101010101010101010101010101010101010101010101","hex"),u=e.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),c=e.concat([t,n,e.from("","ascii"),e.from("Schnorr+SHA256 ","ascii")]);u=a.sha256hmac(e.concat([o,e.from("00","hex"),c]),u),o=a.sha256hmac(o,u),u=a.sha256hmac(e.concat([o,e.from("01","hex"),c]),u),o=a.sha256hmac(o,u);for(var f=new r(0);o=a.sha256hmac(o,u),f=r.fromBuffer(o),s.checkState(o.length>=32,"V length should be >= 32"),!f.gt(new r(0))||!f.lt(i.getN());)u=a.sha256hmac(e.concat([o,e.from("00","hex")]),u),o=a.hmac(a.sha256,o,u);return f},c.sign=function(t,e,n){return c().set({hashbuf:t,endian:n,privkey:e}).sign().sig},c.verify=function(t,e,n,r){return c().set({hashbuf:t,endian:r,sig:e,pubkey:n}).verify().verified},t.exports=c}).call(this,n(29).Buffer)},function(t,e,n){"use strict";(function(e){var r=n(513),i=n(372),o=n(941),a=n(515),u=n(48),s=n(52),c=n(29),f=e.compare||n(942),l=n(114),d=n(63),h=n(80),p=n(160),g=n(134),m=n(84),b=n(100),v=n(152),y=n(187),_=n(516),w=n(388),S=w.PublicKeyHash,O=w.PublicKey,x=w.MultiSigScriptHash,E=w.MultiSig,M=w.Escrow,T=n(153),$=n(117),A=n(273),k=n(101),C=n(79);function I(t){if(!(this instanceof I))return new I(t);if(this.inputs=[],this.outputs=[],this._inputAmount=void 0,this._outputAmount=void 0,t){if(t instanceof I)return I.shallowCopy(t);if(h.isHexa(t))this.fromString(t);else if(d.isBuffer(t))this.fromBuffer(t);else{if(!u.isObject(t))throw new l.InvalidArgument("Must provide an object or string to deserialize a transaction");this.fromObject(t)}}else this._newTransaction()}I.DUST_AMOUNT=546,I.FEE_SECURITY_MARGIN=150,I.MAX_MONEY=21e14,I.NLOCKTIME_BLOCKHEIGHT_LIMIT=5e8,I.NLOCKTIME_MAX_VALUE=4294967295,I.FEE_PER_KB=1e5,I.CHANGE_OUTPUT_MAX_SIZE=62,I.MAXIMUM_EXTRA_SIZE=26,I.shallowCopy=function(t){return new I(t.toBuffer())};var P={configurable:!1,enumerable:!0,get:function(){return this._hash=new p(this._getHash()).readReverse().toString("hex"),this._hash}};Object.defineProperty(I.prototype,"hash",P),Object.defineProperty(I.prototype,"id",P);var N={configurable:!1,enumerable:!0,get:function(){return this._getInputAmount()}};Object.defineProperty(I.prototype,"inputAmount",N),N.get=function(){return this._getOutputAmount()},Object.defineProperty(I.prototype,"outputAmount",N),I.prototype._getHash=function(){return m.sha256sha256(this.toBuffer())},I.prototype.serialize=function(t){return!0===t||t&&t.disableAll?this.uncheckedSerialize():this.checkedSerialize(t)},I.prototype.uncheckedSerialize=I.prototype.toString=function(){return this.toBuffer().toString("hex")},I.prototype.checkedSerialize=function(t){var e=this.getSerializationError(t);if(e)throw e.message+=" - For more information please see: https://bitcore.io/api/lib/transaction#serialization-checks",e;return this.uncheckedSerialize()},I.prototype.invalidSatoshis=function(){for(var t=!1,e=0;en)return this._missingChange()?new l.Transaction.ChangeAddressMissing("Fee is too large and no change address was provided"):new l.Transaction.FeeError.TooLarge("expected less than "+n+" but got "+e)}if(!t.disableSmallFees){var r=Math.ceil(this._estimateFee()/I.FEE_SECURITY_MARGIN);if(e"},I.prototype.toBuffer=function(){var t=new g;return this.toBufferWriter(t).toBuffer()},I.prototype.toBufferWriter=function(t){return t.writeInt32LE(this.version),t.writeVarintNum(this.inputs.length),u.each(this.inputs,(function(e){e.toBufferWriter(t)})),t.writeVarintNum(this.outputs.length),u.each(this.outputs,(function(e){e.toBufferWriter(t)})),t.writeUInt32LE(this.nLockTime),t},I.prototype.fromBuffer=function(t){var e=new p(t);return this.fromBufferReader(e)},I.prototype.fromBufferReader=function(t){var e,n,r;for(s.checkArgument(!t.finished(),"No transaction data received"),this.version=t.readInt32LE(),n=t.readVarintNum(),e=0;e=I.NLOCKTIME_BLOCKHEIGHT_LIMIT)throw new l.Transaction.BlockHeightTooHigh;if(t<0)throw new l.Transaction.NLockTimeOutOfRange;for(var e=0;e1?this._fromEscrowUtxo(t,t.publicKeys):this._fromNonP2SH(t)),this},I.prototype.associateInputs=function(t,e,n,r){var i,o=this,u=[],s=a(t);try{var c=function(){var t=i.value,a=o.inputs.findIndex((function(e){return e.prevTxId.toString("hex")===t.txId&&e.outputIndex===t.outputIndex}));u.push(a),a>=0&&(o.inputs[a]=o._getInputFrom(t,e,n,r))};for(s.s();!(i=s.n()).done;)c()}catch(f){s.e(f)}finally{s.f()}return u},I.prototype._selectInputType=function(t,e,n){var r;return t=new _(t),e&&n?t.script.isMultisigOut()?r=E:(t.script.isScriptHashOut()||t.script.isWitnessScriptHashOut())&&(r=x):r=t.script.isPublicKeyHashOut()||t.script.isWitnessPublicKeyHashOut()||t.script.isScriptHashOut()?S:t.script.isPublicKeyOut()?O:w,r},I.prototype._getInputFrom=function(t,e,n,r){t=new _(t);var i=this._selectInputType(t,e,n),a={output:new T({script:t.script,satoshis:t.satoshis}),prevTxId:t.txId,outputIndex:t.outputIndex,sequenceNumber:t.sequenceNumber,script:$.empty()};return o(i,[a].concat(e&&n?[e,n,!1,r]:[]))},I.prototype._fromEscrowUtxo=function(t,e){var n=e.map((function(t){return new k(t)})),r=n.slice(1),i=n[0];t=new _(t),this.addInput(new M({output:new T({script:t.script,satoshis:t.satoshis}),prevTxId:t.txId,outputIndex:t.outputIndex,script:$.empty()},r,i))},I.prototype._fromNonP2SH=function(t){var e;e=(t=new _(t)).script.isPublicKeyHashOut()?S:t.script.isPublicKeyOut()?O:w,this.addInput(new e({output:new T({script:t.script,satoshis:t.satoshis}),prevTxId:t.txId,outputIndex:t.outputIndex,script:$.empty()}))},I.prototype._fromMultisigUtxo=function(t,e,n,r){var i;if(s.checkArgument(n<=e.length,"Number of required signatures must be greater than the number of public keys"),(t=new _(t)).script.isMultisigOut())i=E;else{if(!t.script.isScriptHashOut())throw new Error("@TODO");i=x}this.addInput(new i({output:new T({script:t.script,satoshis:t.satoshis}),prevTxId:t.txId,outputIndex:t.outputIndex,script:$.empty()},e,n,void 0,r))},I.prototype.addInput=function(t,e,n){if(s.checkArgumentType(t,w,"input"),!t.output&&(u.isUndefined(e)||u.isUndefined(n)))throw new l.Transaction.NeedMoreInfo("Need information about the UTXO script and satoshis");return t.output||!e||u.isUndefined(n)||(e=e instanceof $?e:new $(e),s.checkArgumentType(n,"number","satoshis"),t.output=new T({script:e,satoshis:n})),this.uncheckedAddInput(t)},I.prototype.uncheckedAddInput=function(t){return s.checkArgumentType(t,w,"input"),this.inputs.push(t),this._inputAmount=void 0,this._updateChangeOutput(),this},I.prototype.hasAllUtxoInfo=function(){return u.every(this.inputs.map((function(t){return!!t.output})))},I.prototype.fee=function(t){return s.checkArgument(u.isNumber(t),"amount must be a number"),this._fee=t,this._updateChangeOutput(),this},I.prototype.feePerKb=function(t){return s.checkArgument(u.isNumber(t),"amount must be a number"),this._feePerKb=t,this._updateChangeOutput(),this},I.prototype.feePerByte=function(t){return s.checkArgument(u.isNumber(t),"amount must be a number"),this._feePerByte=t,this._updateChangeOutput(),this},I.prototype.change=function(t){return s.checkArgument(t,"address is required"),this._changeScript=$.fromAddress(t),this._updateChangeOutput(),this},I.prototype.escrow=function(t,e){s.checkArgument(this.inputs.length>0,"inputs must have already been set when setting escrow"),s.checkArgument(this.outputs.length>0,"non-change outputs must have already been set when setting escrow"),s.checkArgument(!this.getChangeOutput(),"change must still be unset when setting escrow"),s.checkArgument(t,"address is required"),s.checkArgument(e,"amount is required");var n=this._getOutputAmount()+this.getFee()+e,r=this._getInputAmount()-n>I.DUST_AMOUNT;return this.to(t,e),r||(this._fee=void 0),this},I.prototype.getChangeOutput=function(){return u.isUndefined(this._changeIndex)?null:this.outputs[this._changeIndex]},I.prototype.to=function(t,e){if(u.isArray(t)){var n=this;return u.each(t,(function(t){n.to(t.address,t.satoshis)})),this}return s.checkArgument(h.isNaturalNumber(e),"Amount is expected to be a positive integer"),this.addOutput(new T({script:$(new y(t)),satoshis:e})),this},I.prototype.addData=function(t){return this.addOutput(new T({script:$.buildDataOut(t),satoshis:0})),this},I.prototype.addOutput=function(t){return s.checkArgumentType(t,T,"output"),this._addOutput(t),this._updateChangeOutput(),this},I.prototype.clearOutputs=function(){return this.outputs=[],this._clearSignatures(),this._outputAmount=void 0,this._changeIndex=void 0,this._updateChangeOutput(),this},I.prototype._addOutput=function(t){this.outputs.push(t),this._outputAmount=void 0},I.prototype._getOutputAmount=function(){if(u.isUndefined(this._outputAmount)){var t=this;this._outputAmount=0,u.each(this.outputs,(function(e){t._outputAmount+=e.satoshis}))}return this._outputAmount},I.prototype._getInputAmount=function(){return u.isUndefined(this._inputAmount)&&(this._inputAmount=u.sumBy(this.inputs,(function(t){if(u.isUndefined(t.output))throw new l.Transaction.Input.MissingPreviousOutput;return t.output.satoshis}))),this._inputAmount},I.prototype._updateChangeOutput=function(){if(this._changeScript){this._clearSignatures(),u.isUndefined(this._changeIndex)||this._removeOutput(this._changeIndex);var t=this._getUnspentValue()-this.getFee();t>=I.DUST_AMOUNT?(this._changeIndex=this.outputs.length,this._addOutput(new T({script:this._changeScript,satoshis:t}))):this._changeIndex=void 0}},I.prototype.getFee=function(){return this.isCoinbase()?0:u.isUndefined(this._fee)?this._changeScript?this._estimateFee():this._getUnspentValue():this._fee},I.prototype._estimateFee=function(){var t=this._estimateSize(),e=this._getUnspentValue(),n=this._feePerByte||(this._feePerKb||I.FEE_PER_KB)/1e3;function r(t){return t*n}var i=Math.ceil(r(t)),o=Math.ceil(r(t)+r(I.CHANGE_OUTPUT_MAX_SIZE));return!this._changeScript||e<=o?i:o},I.prototype._getUnspentValue=function(){return this._getInputAmount()-this._getOutputAmount()},I.prototype._clearSignatures=function(){u.each(this.inputs,(function(t){t.clearSignatures()}))},I.prototype._estimateSize=function(){var t=I.MAXIMUM_EXTRA_SIZE;return u.each(this.inputs,(function(e){var n=e._estimateSize(),r=g.varintBufNum(n).length;t+=36+r+n})),u.each(this.outputs,(function(e){t+=e.script.toBuffer().length+9})),t},I.prototype._removeOutput=function(t){var e=this.outputs[t];this.outputs=u.without(this.outputs,e),this._outputAmount=void 0},I.prototype.removeOutput=function(t){this._removeOutput(t),this._updateChangeOutput()},I.prototype.sort=function(){return this.sortInputs((function(t){var e=Array.prototype.concat.apply([],t),n=0;return e.forEach((function(t){t.i=n++})),e.sort((function(t,e){return f(t.prevTxId,e.prevTxId)||t.outputIndex-e.outputIndex||t.i-e.i})),e})),this.sortOutputs((function(t){var e=Array.prototype.concat.apply([],t),n=0;return e.forEach((function(t){t.i=n++})),e.sort((function(t,e){return t.satoshis-e.satoshis||f(t.script.toBuffer(),e.script.toBuffer())||t.i-e.i})),e})),this},I.prototype.shuffleOutputs=function(){return this.sortOutputs(u.shuffle)},I.prototype.sortOutputs=function(t){var e=t(this.outputs);return this._newOutputOrder(e)},I.prototype.sortInputs=function(t){return this.inputs=t(this.inputs),this._clearSignatures(),this},I.prototype._newOutputOrder=function(t){if(this.outputs.length!==t.length||0!==u.difference(this.outputs,t).length)throw new l.Transaction.InvalidSorting;if(!u.isUndefined(this._changeIndex)){var e=this.outputs[this._changeIndex];this._changeIndex=u.findIndex(t,e)}return this.outputs=t,this},I.prototype.removeInput=function(t,e){var n;if((n=!e&&u.isNumber(t)?t:u.findIndex(this.inputs,(function(n){return n.prevTxId.toString("hex")===t&&n.outputIndex===e})))<0||n>=this.inputs.length)throw new l.Transaction.InvalidIndex(n,this.inputs.length);var r=this.inputs[n];this.inputs=u.without(this.inputs,r),this._inputAmount=void 0,this._updateChangeOutput()},I.prototype.sign=function(t,e,n){n=n||"ecdsa",s.checkState(this.hasAllUtxoInfo(),"Not all utxo information is available to sign the transaction.");var r=this;return u.isArray(t)?(u.each(t,(function(t){r.sign(t,e,n)})),this):(u.each(this.getSignatures(t,e,n),(function(t){r.applySignature(t,n)})),this)},I.prototype.getSignatures=function(t,e,n){t=new A(t),e=e||b.SIGHASH_ALL|b.SIGHASH_FORKID;var r=this,i=[],o=m.sha256ripemd160(t.publicKey.toBuffer());return u.each(this.inputs,(function(a,s){u.each(a.getSignatures(r,t,s,e,o,n),(function(t){i.push(t)}))})),i},I.prototype.applySignature=function(t,e){return this.inputs[t.inputIndex].addSignature(this,t,e),this},I.prototype.isFullySigned=function(){return u.each(this.inputs,(function(t){if(t.isFullySigned===w.prototype.isFullySigned)throw new l.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction")})),u.every(u.map(this.inputs,(function(t){return t.isFullySigned()})))},I.prototype.isValidSignature=function(t){if(this.inputs[t.inputIndex].isValidSignature===w.prototype.isValidSignature)throw new l.Transaction.UnableToVerifySignature("Unrecognized script kind, or not enough information to execute script.This usually happens when creating a transaction from a serialized transaction");return this.inputs[t.inputIndex].isValidSignature(this,t)},I.prototype.verifySignature=function(t,e,n,r,i,o,a){return v.verify(this,t,e,n,r,i,o,a)},I.prototype.verify=function(){if(0===this.inputs.length)return"transaction txins empty";if(0===this.outputs.length)return"transaction txouts empty";for(var t=new C(0),e=0;e1e6)return"transaction over the maximum block size";var r={};for(e=0;e100)return"coinbase transaction script size invalid"}else for(e=0;e65536)return!1;if(!this.inputs.every((function(t){return t.script.isPublicKeyHashIn()})))return!1;var o;try{o=new I(t)}catch(T){return!1}var a=o.inputs[0];if(a.prevTxId.toString("hex")!==this.id)return!1;var u=this.outputs[a.outputIndex];if(!u)return!1;var s=this.uncheckedSerialize().length/2*n;if(u.toObject().satoshis"},t.exports=u},function(t,e,n){"use strict";t.exports=function(t){var e=t.uri,n=t.name,r=t.type;this.uri=e,this.name=n,this.type=r}},function(t,e,n){"use strict";var r=n(390);t.exports=function(t){return"undefined"!==typeof File&&t instanceof File||"undefined"!==typeof Blob&&t instanceof Blob||t instanceof r}},function(t,e,n){"use strict";n.r(e);var r=n(394);n.d(e,"default",(function(){return r.a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(4),i=n(135);function o(t){return t&&"object"===Object(i.a)(t)&&t.constructor===Object}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0},i=n.clone?Object(r.a)({},t):t;return o(t)&&o(e)&&Object.keys(e).forEach((function(r){"__proto__"!==r&&(o(e[r])&&r in t?i[r]=a(t[r],e[r],n):i[r]=e[r])})),i}},function(t,e,n){"use strict";var r=n(4),i=n(17),o=n(1),a=(n(13),n(15)),u=n(24),s=n(35),c=n(337),f=n(33),l=o.forwardRef((function(t,e){var n=t.edge,u=void 0!==n&&n,s=t.children,l=t.classes,d=t.className,h=t.color,p=void 0===h?"default":h,g=t.disabled,m=void 0!==g&&g,b=t.disableFocusRipple,v=void 0!==b&&b,y=t.size,_=void 0===y?"medium":y,w=Object(i.a)(t,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return o.createElement(c.a,Object(r.a)({className:Object(a.a)(l.root,d,"default"!==p&&l["color".concat(Object(f.a)(p))],m&&l.disabled,"small"===_&&l["size".concat(Object(f.a)(_))],{start:l.edgeStart,end:l.edgeEnd}[u]),centerRipple:!0,focusRipple:!v,disabled:m,ref:e},w),o.createElement("span",{className:l.label},s))}));e.a=Object(u.a)((function(t){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:t.palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{backgroundColor:Object(s.d)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:t.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:t.palette.primary.main,"&:hover":{backgroundColor:Object(s.d)(t.palette.primary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:t.palette.secondary.main,"&:hover":{backgroundColor:Object(s.d)(t.palette.secondary.main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:t.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}}),{name:"MuiIconButton"})(l)},function(t,e,n){"use strict";var r=n(4),i=n(17),o=n(1),a=(n(13),n(47)),u=n(215),s=n(577),c=n(44),f=n(96),l=n(90),d=n(121);function h(t,e){var n=function(t,e){var n,r=e.getBoundingClientRect();if(e.fakeTransform)n=e.fakeTransform;else{var i=window.getComputedStyle(e);n=i.getPropertyValue("-webkit-transform")||i.getPropertyValue("transform")}var o=0,a=0;if(n&&"none"!==n&&"string"===typeof n){var u=n.split("(")[1].split(")")[0].split(",");o=parseInt(u[4],10),a=parseInt(u[5],10)}return"left"===t?"translateX(".concat(window.innerWidth,"px) translateX(").concat(o-r.left,"px)"):"right"===t?"translateX(-".concat(r.left+r.width-o,"px)"):"up"===t?"translateY(".concat(window.innerHeight,"px) translateY(").concat(a-r.top,"px)"):"translateY(-".concat(r.top+r.height-a,"px)")}(t,e);n&&(e.style.webkitTransform=n,e.style.transform=n)}var p={enter:l.b.enteringScreen,exit:l.b.leavingScreen},g=o.forwardRef((function(t,e){var n=t.children,l=t.direction,g=void 0===l?"down":l,m=t.in,b=t.onEnter,v=t.onEntered,y=t.onEntering,_=t.onExit,w=t.onExited,S=t.onExiting,O=t.style,x=t.timeout,E=void 0===x?p:x,M=t.TransitionComponent,T=void 0===M?s.a:M,$=Object(i.a)(t,["children","direction","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),A=Object(f.a)(),k=o.useRef(null),C=o.useCallback((function(t){k.current=a.findDOMNode(t)}),[]),I=Object(c.a)(n.ref,C),P=Object(c.a)(I,e),N=function(t){return function(e){t&&(void 0===e?t(k.current):t(k.current,e))}},R=N((function(t,e){h(g,t),Object(d.b)(t),b&&b(t,e)})),j=N((function(t,e){var n=Object(d.a)({timeout:E,style:O},{mode:"enter"});t.style.webkitTransition=A.transitions.create("-webkit-transform",Object(r.a)({},n,{easing:A.transitions.easing.easeOut})),t.style.transition=A.transitions.create("transform",Object(r.a)({},n,{easing:A.transitions.easing.easeOut})),t.style.webkitTransform="none",t.style.transform="none",y&&y(t,e)})),D=N(v),L=N(S),F=N((function(t){var e=Object(d.a)({timeout:E,style:O},{mode:"exit"});t.style.webkitTransition=A.transitions.create("-webkit-transform",Object(r.a)({},e,{easing:A.transitions.easing.sharp})),t.style.transition=A.transitions.create("transform",Object(r.a)({},e,{easing:A.transitions.easing.sharp})),h(g,t),_&&_(t)})),B=N((function(t){t.style.webkitTransition="",t.style.transition="",w&&w(t)})),U=o.useCallback((function(){k.current&&h(g,k.current)}),[g]);return o.useEffect((function(){if(!m&&"down"!==g&&"right"!==g){var t=Object(u.a)((function(){k.current&&h(g,k.current)}));return window.addEventListener("resize",t),function(){t.clear(),window.removeEventListener("resize",t)}}}),[g,m]),o.useEffect((function(){m||U()}),[m,U]),o.createElement(T,Object(r.a)({nodeRef:k,onEnter:R,onEntered:D,onEntering:j,onExit:F,onExited:B,onExiting:L,appear:!0,in:m,timeout:E},$),(function(t,e){return o.cloneElement(n,Object(r.a)({ref:P,style:Object(r.a)({visibility:"exited"!==t||m?void 0:"hidden"},O,n.props.style)},e))}))}));e.a=g},function(t,e,n){"use strict";t.exports=n(613)},function(t,e,n){var r=n(431)((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));t.exports=r},function(t,e,n){var r=n(718);t.exports=h,t.exports.parse=o,t.exports.compile=function(t,e){return u(o(t,e),e)},t.exports.tokensToFunction=u,t.exports.tokensToRegExp=d;var i=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(t,e){for(var n,r=[],o=0,a=0,u="",f=e&&e.delimiter||"/";null!=(n=i.exec(t));){var l=n[0],d=n[1],h=n.index;if(u+=t.slice(a,h),a=h+l.length,d)u+=d[1];else{var p=t[a],g=n[2],m=n[3],b=n[4],v=n[5],y=n[6],_=n[7];u&&(r.push(u),u="");var w=null!=g&&null!=p&&p!==g,S="+"===y||"*"===y,O="?"===y||"*"===y,x=n[2]||f,E=b||v;r.push({name:m||o++,prefix:g||"",delimiter:x,optional:O,repeat:S,partial:w,asterisk:!!_,pattern:E?c(E):_?".*":"[^"+s(x)+"]+?"})}}return a=r}}),"es6","es3"),$jscomp.findInternal=function(t,e,n){t instanceof String&&(t=String(t));for(var r=t.length,i=0;i=i}}),"es6","es3"),$jscomp.polyfill("String.prototype.repeat",(function(t){return t||function(t){var e=$jscomp.checkStringArgs(this,null,"repeat");if(0>t||1342177279>>=1)&&(e+=e);return n}}),"es6","es3"),$jscomp.arrayIteratorImpl=function(t){var e=0;return function(){return e>>0),goog.uidCounter_=0,goog.cloneObject=function(t){var e=goog.typeOf(t);if("object"==e||"array"==e){if("function"===typeof t.clone)return t.clone();for(var n in e="array"==e?[]:{},t)e[n]=goog.cloneObject(t[n]);return e}return t},goog.bindNative_=function(t,e,n){return t.call.apply(t.bind,arguments)},goog.bindJs_=function(t,e,n){if(!t)throw Error();if(2").replace(/'/g,"'").replace(/"/g,'"').replace(/&/g,"&")),e&&(t=t.replace(/\{\$([^}]+)}/g,(function(t,n){return null!=e&&n in e?e[n]:t}))),t},goog.getMsgWithFallback=function(t,e){return t},goog.exportSymbol=function(t,e,n){goog.exportPath_(t,e,!0,n)},goog.exportProperty=function(t,e,n){t[e]=n},goog.inherits=function(t,e){function n(){}n.prototype=e.prototype,t.superClass_=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.base=function(t,n,r){for(var i=Array(arguments.length-2),o=2;o{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')})),a("es7",(function(){return b("2 ** 2 == 4")})),a("es8",(function(){return b("async () => 1, true")})),a("es9",(function(){return b("({...rest} = {}), true")})),a("es_next",(function(){return!1})),{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(t,e){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var n=this.createRequiresTranspilation_();this.requiresTranspilation_=n.map,this.transpilationTarget_=this.transpilationTarget_||n.target}if(t in this.requiresTranspilation_)return!!this.requiresTranspilation_[t]||!(!goog.inHtmlDocument_()||"es6"!=e||"noModule"in goog.global.document.createElement("script"));throw Error("Unknown language mode: "+t)},goog.Transpiler.prototype.transpile=function(t,e){return goog.transpile_(t,e,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(t){return t.replace(/<\/(SCRIPT)/gi,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={},this.idToPath_={},this.written_={},this.loadingDeps_=[],this.depsToLoad_=[],this.paused_=!1,this.factory_=new goog.DependencyFactory(goog.transpiler_),this.deferredCallbacks_={},this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(t,e){function n(){r&&(goog.global.setTimeout(r,0),r=null)}var r=e;if(t.length){e=[];for(var i=0;i<\/script>';i+="",i=goog.Dependency.defer_?i+"document.getElementById('script-"+r+"').onload = function() {\n goog.Dependency.callback_('"+r+"', this);\n};\n":i+"goog.Dependency.callback_('"+r+"', document.getElementById('script-"+r+"'));",i+="<\/script>",e.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(i):i)}else{var o=e.createElement("script");o.defer=goog.Dependency.defer_,o.async=!1,n&&(o.nonce=n),goog.DebugLoader_.IS_OLD_IE_?(t.pause(),o.onreadystatechange=function(){"loaded"!=o.readyState&&"complete"!=o.readyState||(t.loaded(),t.resume())}):o.onload=function(){o.onload=null,t.loaded()},o.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path,e.head.appendChild(o)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."),t.loaded()):t.pause()},goog.Es6ModuleDependency=function(t,e,n,r,i){goog.Dependency.call(this,t,e,n,r,i)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(t){if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?t.loaded():t.pause();else if(goog.inHtmlDocument_()){var e=goog.global.document,n=this;if(goog.isDocumentLoading_()){var r=function(t,n){var r="",i=goog.getScriptNonce();i&&(r=' nonce="'+i+'"'),t=n?'