window.EmberENV=function(e,t){for(var r in t)e[r]=t[r] return e}(window.EmberENV||{},{FEATURES:{},EXTEND_PROTOTYPES:{Date:!1},_APPLICATION_TEMPLATE_WRAPPER:!1,_DEFAULT_ASYNC_OBSERVERS:!0,_JQUERY_INTEGRATION:!1,_TEMPLATE_ONLY_GLIMMER_COMPONENTS:!0}) var loader,define,requireModule,require,requirejs,runningTests=!1 if(function(e){"use strict" function t(){var e=Object.create(null) return e.__=void 0,delete e.__,e}var r={loader:loader,define:define,requireModule:requireModule,require:require,requirejs:requirejs} requirejs=require=requireModule=function(e){for(var t=[],r=c(e,"(require)",t),n=t.length-1;n>=0;n--)t[n].exports() return r.module.exports},loader={noConflict:function(t){var n,i for(n in t)t.hasOwnProperty(n)&&r.hasOwnProperty(n)&&(i=t[n],e[i]=e[n],e[n]=r[n])},makeDefaultExport:!0} var n=t(),i=(t(),0) function o(e){throw new Error("an unsupported module was defined, expected `define(id, deps, module)` instead got: `"+e+"` arguments to define`")}var a=["require","exports","module"] function s(e,t,r,n){this.uuid=i++,this.id=e,this.deps=!t.length&&r.length?a:t,this.module={exports:{}},this.callback=r,this.hasExportsAsDep=!1,this.isAlias=n,this.reified=new Array(t.length),this.state="new"}function u(){}function l(e){this.id=e}function c(e,t,r){for(var i=n[e]||n[e+"/index"];i&&i.isAlias;)i=n[i.id]||n[i.id+"/index"] return i||function(e,t){throw new Error("Could not find module `"+e+"` imported from `"+t+"`")}(e,t),r&&"pending"!==i.state&&"finalized"!==i.state&&(i.findDeps(r),r.push(i)),i}function f(e,t){if("."!==e.charAt(0))return e for(var r=e.split("/"),n=t.split("/").slice(0,-1),i=0,o=r.length;i=0;--i){var o=this.tryEntries[i],a=o.completion if("root"===o.tryLoc)return n("end") if(o.tryLoc<=this.prev){var s=t.call(o,"catchLoc"),u=t.call(o,"finallyLoc") if(s&&u){if(this.prev=0;--n){var i=this.tryEntries[n] if(i.tryLoc<=this.prev&&t.call(i,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t] if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),v(r),s}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t] if(r.tryLoc===e){var n=r.completion if("throw"===n.type){var i=n.arg v(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:w(e),resultName:t,nextLoc:r},s}}}function l(e,t,r,n){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),a=new b(n||[]) return o._invoke=function(e,t,r){var n="suspendedStart" return function(i,o){if("executing"===n)throw new Error("Generator is already running") if("completed"===n){if("throw"===i)throw o return _()}for(;;){var a=r.delegate if(a){if("return"===i||"throw"===i&&void 0===a.iterator[i]){r.delegate=null var u=a.iterator.return if(u)if("throw"===(l=c(u,a.iterator,o)).type){i="throw",o=l.arg continue}if("return"===i)continue}var l if("throw"===(l=c(a.iterator[i],a.iterator,o)).type){r.delegate=null,i="throw",o=l.arg continue}if(i="next",o=void 0,!(f=l.arg).done)return n="suspendedYield",f r[a.resultName]=f.value,r.next=a.nextLoc,r.delegate=null}if("next"===i)r.sent=r._sent=o else if("throw"===i){if("suspendedStart"===n)throw n="completed",o r.dispatchException(o)&&(i="next",o=void 0)}else"return"===i&&r.abrupt("return",o) if(n="executing","normal"===(l=c(e,t,r)).type){n=r.done?"completed":"suspendedYield" var f={value:l.arg,done:r.done} if(l.arg!==s)return f r.delegate&&"next"===i&&(o=void 0)}else"throw"===l.type&&(n="completed",i="throw",o=l.arg)}}}(e,r,a),o}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(n){return{type:"throw",arg:n}}}function f(){}function h(){}function d(){}function p(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function m(e){this.arg=e}function y(e){function t(r,n,i,o){var a=c(e[r],e,n) if("throw"!==a.type){var s=a.arg,u=s.value return u instanceof m?Promise.resolve(u.arg).then((function(e){t("next",e,i,o)}),(function(e){t("throw",e,i,o)})):Promise.resolve(u).then((function(e){s.value=e,i(s)}),o)}o(a.arg)}var r "object"==typeof process&&process.domain&&(t=process.domain.bind(t)),this._invoke=function(e,n){function i(){return new Promise((function(r,i){t(e,n,r,i)}))}return r=r?r.then(i,i):i()}}function g(e){var t={tryLoc:e[0]} 1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function v(e){var t=e.completion||{} t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(g,this),this.reset(!0)}function w(e){if(e){var r=e[n] if(r)return r.call(e) if("function"==typeof e.next)return e if(!isNaN(e.length)){var i=-1,o=function r(){for(;++i>>0,n=0;npe(e)?(o=e+1,s-pe(e)):(o=e,s),{year:o,dayOfYear:a}}function Pe(e,t,r){var n,i,o=Ce(e.year(),t,r),a=Math.floor((e.dayOfYear()-o-1)/7)+1 return a<1?n=a+Ne(i=e.year()-1,t,r):a>Ne(e.year(),t,r)?(n=a-Ne(e.year(),t,r),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function Ne(e,t,r){var n=Ce(e,t,r),i=Ce(e+1,t,r) return(pe(e)-n+i)/7}function De(e,t){return e.slice(t,7).concat(e.slice(0,t))}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),B("week",5),B("isoWeek",5),ue("w",J),ue("ww",J,G),ue("W",J),ue("WW",J,G),de(["w","ww","W","WW"],(function(e,t,r,n){t[n.substr(0,1)]=_(e)})),H("d",0,"do","day"),H("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),H("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),H("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),B("day",11),B("weekday",11),B("isoWeekday",11),ue("d",J),ue("e",J),ue("E",J),ue("dd",(function(e,t){return t.weekdaysMinRegex(e)})),ue("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),ue("dddd",(function(e,t){return t.weekdaysRegex(e)})),de(["dd","ddd","dddd"],(function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict) null!=i?t.d=i:h(r).invalidWeekday=e})),de(["d","e","E"],(function(e,t,r,n){t[n]=_(e)})) var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Le="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),je="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ue=ae,Fe=ae,ze=ae function He(){function e(e,t){return t.length-e.length}var t,r,n,i,o,a=[],s=[],u=[],l=[] for(t=0;t<7;t++)r=f([2e3,1]).day(t),n=this.weekdaysMin(r,""),i=this.weekdaysShort(r,""),o=this.weekdays(r,""),a.push(n),s.push(i),u.push(o),l.push(n),l.push(i),l.push(o) for(a.sort(e),s.sort(e),u.sort(e),l.sort(e),t=0;t<7;t++)s[t]=ce(s[t]),u[t]=ce(u[t]),l[t]=ce(l[t]) this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ve(){return this.hours()%12||12}function Ke(e,t){H(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function qe(e,t){return t._meridiemParse}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,Ve),H("k",["kk",2],0,(function(){return this.hours()||24})),H("hmm",0,0,(function(){return""+Ve.apply(this)+L(this.minutes(),2)})),H("hmmss",0,0,(function(){return""+Ve.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)})),H("Hmm",0,0,(function(){return""+this.hours()+L(this.minutes(),2)})),H("Hmmss",0,0,(function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)})),Ke("a",!0),Ke("A",!1),R("hour","h"),B("hour",13),ue("a",qe),ue("A",qe),ue("H",J),ue("h",J),ue("k",J),ue("HH",J,G),ue("hh",J,G),ue("kk",J,G),ue("hmm",$),ue("hmmss",Q),ue("Hmm",$),ue("Hmmss",Q),he(["H","HH"],3),he(["k","kk"],(function(e,t,r){var n=_(e) t[3]=24===n?0:n})),he(["a","A"],(function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e})),he(["h","hh"],(function(e,t,r){t[3]=_(e),h(r).bigHour=!0})),he("hmm",(function(e,t,r){var n=e.length-2 t[3]=_(e.substr(0,n)),t[4]=_(e.substr(n)),h(r).bigHour=!0})),he("hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2 t[3]=_(e.substr(0,n)),t[4]=_(e.substr(n,2)),t[5]=_(e.substr(i)),h(r).bigHour=!0})),he("Hmm",(function(e,t,r){var n=e.length-2 t[3]=_(e.substr(0,n)),t[4]=_(e.substr(n))})),he("Hmmss",(function(e,t,r){var n=e.length-4,i=e.length-2 t[3]=_(e.substr(0,n)),t[4]=_(e.substr(n,2)),t[5]=_(e.substr(i))})) var Ge,We=ve("Hours",!0),Ye={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ee,monthsShort:ke,week:{dow:0,doy:6},weekdays:Be,weekdaysMin:je,weekdaysShort:Le,meridiemParse:/[ap]\.?m?\.?/i},Ze={},Je={} function $e(e){return e?e.toLowerCase().replace("_","-"):e}function Qe(e){var t=null if(!Ze[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=Ge._abbr,require("./locale/"+e),Xe(t)}catch(e){}return Ze[e]}function Xe(e,t){var r return e&&((r=o(t)?tt(e):et(e,t))?Ge=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Ge._abbr}function et(e,t){if(null===t)return delete Ze[e],null var r,n=Ye if(t.abbr=e,null!=Ze[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Ze[e]._config else if(null!=t.parentLocale)if(null!=Ze[t.parentLocale])n=Ze[t.parentLocale]._config else{if(null==(r=Qe(t.parentLocale)))return Je[t.parentLocale]||(Je[t.parentLocale]=[]),Je[t.parentLocale].push({name:e,config:t}),null n=r._config}return Ze[e]=new O(I(n,t)),Je[e]&&Je[e].forEach((function(e){et(e.name,e.config)})),Xe(e),Ze[e]}function tt(e){var t if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Ge if(!n(e)){if(t=Qe(e))return t e=[e]}return function(e){for(var t,r,n,i,o=0;o=t&&S(i,r,!0)>=t-1)break t--}o++}return Ge}(e)}function rt(e){var t,r=e._a return r&&-2===h(e).overflow&&(t=r[1]<0||11_e(r[0],r[1])?2:r[3]<0||24Ne(r,o,a)?h(e)._overflowWeeks=!0:null!=u?h(e)._overflowWeekday=!0:(s=Re(r,n,i,o,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=nt(e._a[0],i[0]),(e._dayOfYear>pe(a)||0===e._dayOfYear)&&(h(e)._overflowDayOfYear=!0),n=Oe(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=i[t] for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t] 24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Oe:function(e,t,r,n,i,o,a){var s return e<100&&0<=e?(s=new Date(e+400,t,r,n,i,o,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,r,n,i,o,a),s}).apply(null,s),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(h(e).weekdayMismatch=!0)}}var ot=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,at=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,st=/Z|[+-]\d\d(?::?\d\d)?/,ut=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],lt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ct=/^\/?Date\((\-?\d+)/i function ft(e){var t,r,n,i,o,a,s=e._i,u=ot.exec(s)||at.exec(s) if(u){for(h(e).iso=!0,t=0,r=ut.length;tr.valueOf():r.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},nr.isLocal=function(){return!!this.isValid()&&!this._isUTC},nr.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},nr.isUtc=Ct,nr.isUTC=Ct,nr.zoneAbbr=function(){return this._isUTC?"UTC":""},nr.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},nr.dates=k("dates accessor is deprecated. Use date instead.",$t),nr.months=k("months accessor is deprecated. Use month instead",xe),nr.years=k("years accessor is deprecated. Use year instead",ge),nr.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),nr.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!o(this._isDSTShifted))return this._isDSTShifted var e={} if(y(e,this),(e=yt(e))._a){var t=e._isUTC?f(e._a):vt(e._a) this._isDSTShifted=this.isValid()&&00||i>0)&&(0,r.scheduleOnce)("actions",this,s)},willChange:function(){return this}};(0,n.addArrayObserver)(a,this,u) return function(){return(0,n.removeArrayObserver)(a,i,u)}},wrapModelType:function(e,t){var r=this.getRecords(e,t) return{name:t,count:(0,n.get)(r,"length"),columns:this.columnsForType(e),object:e}},getModelTypes:function(){var e,t=this,r=this.get("containerDebugAdapter") return e=r.canCatalogEntriesByType("model")?r.catalogEntriesByType("model"):this._getObjectsOnNamespaces(),e=(0,o.A)(e).map((function(e){return{klass:t._nameToClass(e),name:e}})),e=(0,o.A)(e).filter((function(e){return t.detect(e.klass)})),(0,o.A)(e)},_getObjectsOnNamespaces:function(){var e=this,t=(0,o.A)(o.Namespace.NAMESPACES),r=(0,o.A)() return t.forEach((function(t){for(var n in t)if(t.hasOwnProperty(n)&&e.detect(t[n])){var o=(0,i.dasherize)(n) r.push(o)}})),r},getRecords:function(){return(0,o.A)()},wrapRecord:function(e){var t={object:e} return t.columnValues=this.getRecordColumnValues(e),t.searchKeywords=this.getRecordKeywords(e),t.filterValues=this.getRecordFilterValues(e),t.color=this.getRecordColor(e),t},getRecordColumnValues:function(){return{}},getRecordKeywords:function(){return(0,o.A)()},getRecordFilterValues:function(){return{}},getRecordColor:function(){return null},observeRecord:function(){return function(){}}}) e.default=a})),e("@ember/-internals/glimmer/index",["exports","ember-babel","@ember/polyfills","@glimmer/opcode-compiler","@ember/-internals/metal","@ember/-internals/owner","@ember/-internals/runtime","@ember/-internals/utils","@ember/-internals/views","@ember/debug","@glimmer/reference","@glimmer/runtime","@glimmer/validator","@ember/-internals/browser-environment","@ember/instrumentation","@ember/service","@ember/runloop","@ember/-internals/environment","@glimmer/util","@ember/deprecated-features","@ember/string","@ember/-internals/container","@glimmer/node","@ember/-internals/routing","@ember/component/template-only","@ember/error","rsvp"],(function(e,t,r,n,i,o,a,s,u,l,c,f,h,d,p,m,y,g,v,b,w,_,S,E,k,M,x){"use strict" var A function T(){var e=(0,t.taggedTemplateLiteralLoose)(["component:-default"]) return T=function(){return e},e}function I(){var e=(0,t.taggedTemplateLiteralLoose)(["template:components/-default"]) return I=function(){return e},e}function O(){var e=(0,t.taggedTemplateLiteralLoose)(["template:-root"]) return O=function(){return e},e}function C(){var e=(0,t.taggedTemplateLiteralLoose)(["template:-root"]) return C=function(){return e},e}function R(){var e=(0,t.taggedTemplateLiteralLoose)(["component:-default"]) return R=function(){return e},e}function P(){var e=(0,t.taggedTemplateLiteralLoose)(["template:components/-default"]) return P=function(){return e},e}function N(){var e=(0,t.taggedTemplateLiteralLoose)(["template:components/-default"]) return N=function(){return e},e}function D(e){return"function"==typeof e}Object.defineProperty(e,"__esModule",{value:!0}),e.template=L,e.helper=ie,e.escapeExpression=function(e){if("string"!=typeof e){if(e&&e.toHTML)return e.toHTML() if(null==e)return"" if(!e)return String(e) e=String(e)}if(!se.test(e))return e return e.replace(ue,le)},e.htmlSafe=ce,e.isHTMLSafe=fe,e._resetRenderers=function(){Xr.length=0},e.renderSettled=function(){null===rn&&(rn=x.default.defer(),(0,y.getCurrentRunLoop)()||y.backburner.schedule("actions",null,tn)) return rn.promise},e.getTemplate=function(e){if(un.hasOwnProperty(e))return un[e]},e.setTemplate=function(e,t){return un[e]=t},e.hasTemplate=function(e){return un.hasOwnProperty(e)},e.getTemplates=function(){return un},e.setTemplates=function(e){un=e},e.setupEngineRegistry=function(e){e.optionsForType("template",{instantiate:!1}),e.register("view:-outlet",gn),e.register("template:-outlet",yn),e.injection("view:-outlet","template","template:-outlet"),e.register((0,_.privatize)(I()),pn),e.optionsForType("helper",{instantiate:!1}),e.register("helper:loc",dn),e.register("component:-text-field",Y),e.register("component:-checkbox",G),e.register("component:link-to",X),e.register("component:input",hn),e.register("template:components/input",mn),e.register("component:textarea",Z),g.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS||e.register((0,_.privatize)(T()),K)},e.setupApplicationRegistry=function(e){e.injection("renderer","env","-environment:main"),e.register("service:-dom-builder",{create:function(e){switch(e.bootOptions._renderMode){case"serialize":return S.serializeBuilder.bind(null) case"rehydrate":return f.rehydrationBuilder.bind(null) default:return f.clientBuilder.bind(null)}}}),e.injection("service:-dom-builder","bootOptions","-environment:main"),e.injection("renderer","builder","service:-dom-builder"),e.register((0,_.privatize)(C()),j),e.injection("renderer","rootTemplate",(0,_.privatize)(O())),e.register("renderer:-dom",sn),e.register("renderer:-inert",an),e.injection("renderer","document","service:-document")},e._registerMacros=function(e){Yr.push(e)},e.capabilities=function(e,t){void 0===t&&(t={}) var r return r="3.13"!==e||Boolean(t.updateHook),{asyncLifeCycleCallbacks:Boolean(t.asyncLifecycleCallbacks),destructor:Boolean(t.destructor),updateHook:r}},e.setComponentManager=function(e,t){var r r=b.COMPONENT_MANAGER_STRING_LOOKUP&&"string"==typeof e?function(t){return t.lookup("component-manager:"+e)}:e return Ur({factory:r,internal:!1,type:"component"},t)},e.getComponentManager=function(e){var t=Fr(e) return t&&!t.internal&&"component"===t.type?t.factory:void 0},e.setModifierManager=function(e,t){return Ur({factory:e,internal:!1,type:"modifier"},t)},e.getModifierManager=zr,e.modifierCapabilities=sr,e.setComponentTemplate=function(e,t){return Cr.set(t,e),t},e.getComponentTemplate=Pr,Object.defineProperty(e,"DOMChanges",{enumerable:!0,get:function(){return f.DOMChanges}}),Object.defineProperty(e,"DOMTreeConstruction",{enumerable:!0,get:function(){return f.DOMTreeConstruction}}),Object.defineProperty(e,"isSerializationFirstNode",{enumerable:!0,get:function(){return f.isSerializationFirstNode}}),Object.defineProperty(e,"NodeDOMTreeConstruction",{enumerable:!0,get:function(){return S.NodeDOMTreeConstruction}}),e.OutletView=e.INVOKE=e.AbstractComponentManager=e._experimentalMacros=e.InteractiveRenderer=e.InertRenderer=e.Renderer=e.SafeString=e.Helper=e.Component=e.LinkComponent=e.TextArea=e.TextField=e.Checkbox=e.templateCacheCounters=e.RootTemplate=void 0 var B={cacheHit:0,cacheMiss:0} function L(e){var t=(0,n.templateFactory)(e),i=new WeakMap,o=t.meta,a=function(e){var n=i.get(e) return void 0===n?(B.cacheMiss++,n=t.create((0,r.assign)({owner:e},o)),i.set(e,n)):B.cacheHit++,n} return a.__id=t.id,a.__meta=o,a}e.templateCacheCounters=B var j=L({id:"s5o9bxSn",block:'{"symbols":[],"statements":[[1,[30,[36,0],[[32,0]],null]]],"hasEval":false,"upvars":["component"]}',meta:{moduleName:"packages/@ember/-internals/glimmer/lib/templates/root.hbs"}}) e.RootTemplate=j var U=(0,s.symbol)("DIRTY_TAG"),F=(0,s.symbol)("ARGS"),z=(0,s.symbol)("IS_DISPATCHING_ATTRS"),H=(0,s.symbol)("HAS_BLOCK"),V=(0,s.symbol)("BOUNDS"),K=u.CoreView.extend(u.ChildViewsSupport,u.ViewStateSupport,u.ClassNamesSupport,a.TargetActionSupport,u.ActionSupport,u.ViewMixin,((A={isComponent:!0,init:function(){this._super.apply(this,arguments),this[z]=!1,this[U]=(0,h.createTag)(),this[V]=null},rerender:function(){(0,h.dirtyTag)(this[U]),this._super()}})[i.PROPERTY_DID_CHANGE]=function(e,t){if(!this[z]){var r=this[F],n=void 0!==r?r[e]:void 0 void 0!==n&&void 0!==n[c.UPDATE_REFERENCED_VALUE]&&n[c.UPDATE_REFERENCED_VALUE](2===arguments.length?t:(0,i.get)(this,e))}},A.getAttr=function(e){return this.get(e)},A.readDOMAttr=function(e){var t=(0,u.getViewElement)(this),r=t,n="http://www.w3.org/2000/svg"===r.namespaceURI,i=(0,f.normalizeProperty)(r,e),o=i.type,a=i.normalized return n||"attr"===o?r.getAttribute(a):r[a]},A.didReceiveAttrs=function(){},A.didRender=function(){},A.willRender=function(){},A.didUpdateAttrs=function(){},A.willUpdate=function(){},A.didUpdate=function(){},A)) e.Component=K,K.toString=function(){return"@ember/component"},K.reopenClass({isComponentFactory:!0,positionalParams:[]}),(0,a.setFrameworkClass)(K) var q=L({id:"SWbqsLhV",block:'{"symbols":[],"statements":[],"hasEval":false,"upvars":[]}',meta:{moduleName:"packages/@ember/-internals/glimmer/lib/templates/empty.hbs"}}),G=K.extend({layout:q,classNames:["ember-checkbox"],tagName:"input",attributeBindings:["type","checked","indeterminate","disabled","tabindex","name","autofocus","required","form"],type:"checkbox",disabled:!1,indeterminate:!1,didInsertElement:function(){this._super.apply(this,arguments),this.element.indeterminate=Boolean(this.indeterminate)},change:function(){(0,i.set)(this,"checked",this.element.checked)}}) e.Checkbox=G,G.toString=function(){return"@ember/component/checkbox"} var W=d.hasDOM?Object.create(null):null var Y=K.extend(u.TextSupport,{layout:q,classNames:["ember-text-field"],tagName:"input",attributeBindings:["accept","autocomplete","autosave","dir","formaction","formenctype","formmethod","formnovalidate","formtarget","height","inputmode","lang","list","type","max","min","multiple","name","pattern","size","step","value","width"],value:"",type:(0,i.computed)({get:function(){return"text"},set:function(e,t){var r="text" return function(e){if(!d.hasDOM)return Boolean(e) if(e in W)return W[e] var t=document.createElement("input") try{t.type=e}catch(r){}return W[e]=t.type===e}(t)&&(r=t),r}}),size:null,pattern:null,min:null,max:null}) e.TextField=Y,Y.toString=function(){return"@ember/component/text-field"} var Z=K.extend(u.TextSupport,{classNames:["ember-text-area"],layout:q,tagName:"textarea",attributeBindings:["rows","cols","name","selectionEnd","selectionStart","autocomplete","wrap","lang","dir","value"],rows:null,cols:null}) e.TextArea=Z,Z.toString=function(){return"@ember/component/text-area"} var J=L({id:"uDKxl8ne",block:'{"symbols":["&default"],"statements":[[6,[37,0],[[27,[32,1]]],null,[["default","else"],[{"statements":[[18,1,null]],"parameters":[]},{"statements":[[1,[32,0,["linkTitle"]]]],"parameters":[]}]]]],"hasEval":false,"upvars":["if"]}',meta:{moduleName:"packages/@ember/-internals/glimmer/lib/templates/link-to.hbs"}}),$=Object.freeze({toString:function(){return"UNDEFINED"}}),Q=Object.freeze({}),X=K.extend({layout:J,tagName:"a",route:$,model:$,models:$,query:$,"current-when":null,title:null,rel:null,tabindex:null,target:null,activeClass:"active",loadingClass:"loading",disabledClass:"disabled",replace:!1,attributeBindings:["href","title","rel","tabindex","target"],classNameBindings:["active","loading","disabled","transitioningIn","transitioningOut"],eventName:"click",init:function(){this._super.apply(this,arguments) var e=this.eventName this.on(e,this,this._invoke)},_routing:(0,m.inject)("-routing"),_currentRoute:(0,i.alias)("_routing.currentRouteName"),_currentRouterState:(0,i.alias)("_routing.currentState"),_targetRouterState:(0,i.alias)("_routing.targetState"),_route:(0,i.computed)("route","_currentRouterState",(function(){var e=this.route return e===$?this._currentRoute:e})),_models:(0,i.computed)("model","models",(function(){var e=this.model,t=this.models return e!==$?[e]:t!==$?t:[]})),_query:(0,i.computed)("query",(function(){var e=this.query return e===$?Q:(0,r.assign)({},e)})),disabled:(0,i.computed)({get:function(e){return!1},set:function(e,t){return this._isDisabled=t,!!t&&this.disabledClass}}),active:(0,i.computed)("activeClass","_active",(function(){return!!this._active&&this.activeClass})),_active:(0,i.computed)("_currentRouterState","_route","_models","_query","loading","current-when",(function(){var e=this._currentRouterState return!!e&&this._isActive(e)})),willBeActive:(0,i.computed)("_currentRouterState","_targetRouterState","_route","_models","_query","loading","current-when",(function(){var e=this._currentRouterState,t=this._targetRouterState if(e!==t)return this._isActive(t)})),_isActive:function(e){if(this.loading)return!1 var t=this["current-when"] if("boolean"==typeof t)return t var r=Boolean(t) t=r?t.split(" "):[this._route] for(var n=this._models,i=this._query,o=this._routing,a=0;a0){var i=n[n.length-1] "object"==typeof i&&null!==i&&i.isQueryParams&&(this.query=i.values,n.pop())}}}}) e.LinkComponent=X,X.toString=function(){return"@ember/routing/link-component"},X.reopenClass({positionalParams:"params"}) var ee=(0,s.symbol)("RECOMPUTE_TAG") function te(e){return void 0!==e.destroy}var re=a.FrameworkObject.extend({init:function(){this._super.apply(this,arguments),this[ee]=(0,h.createTag)()},recompute:function(){var e=this;(0,y.join)((function(){return(0,h.dirtyTag)(e[ee])}))}}) e.Helper=re,re.isHelperFactory=!0,(0,a.setFrameworkClass)(re) var ne=function(){function e(e){this.compute=e,this.isHelperFactory=!0}return e.prototype.create=function(){return{compute:this.compute}},e}() function ie(e){return new ne(e)}var oe=function(){function e(e){this.string=e}var t=e.prototype return t.toString=function(){return""+this.string},t.toHTML=function(){return this.toString()},e}() e.SafeString=oe var ae={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},se=/[&<>"'`=]/,ue=/[&<>"'`=]/g function le(e){return ae[e]}function ce(e){return null==e?e="":"string"!=typeof e&&(e=String(e)),new oe(e)}function fe(e){return null!==e&&"object"==typeof e&&"function"==typeof e.toHTML}var he=function(){function e(e){this.resolver=e}var t=e.prototype return t.lookupHelper=function(e,t){return this.resolver.lookupHelper(e,t)},t.lookupModifier=function(e,t){return this.resolver.lookupModifier(e,t)},t.lookupComponent=function(e,t){var r=this.resolver.lookupComponentHandle(e,t) if(null===r)return null var n=this.resolver.resolve(r),i=n.manager,o=n.state,a=i.getCapabilities(o) return function(e,t){return!t.dynamicLayout}(0,a)?{handle:r,capabilities:a,compilable:i.getJitStaticLayout(o,this.resolver)}:{handle:r,capabilities:a,compilable:null}},t.lookupPartial=function(e,t){return this.resolver.lookupPartial(e,t)},t.resolve=function(e){return this.resolver.resolve(e)},e}(),de=function(){function e(){}var t=e.prototype return t.prepareArgs=function(e,t){return null},t.didCreateElement=function(e,t,r){},t.didRenderLayout=function(e,t){},t.didCreate=function(e){},t.update=function(e,t){},t.didUpdateLayout=function(e,t){},t.didUpdate=function(e){},e}() function pe(e){return{object:e.name+":"+e.outlet}}e.AbstractComponentManager=de var me={dynamicLayout:!1,dynamicTag:!1,prepareArgs:!1,createArgs:g.ENV._DEBUG_RENDER_TREE,attributeHook:!1,elementHook:!1,createCaller:!1,dynamicScope:!0,updateHook:g.ENV._DEBUG_RENDER_TREE,createInstance:!0,wrapped:!1,willDestroy:!1},ye=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.create=function(e,t,r,n){var i=n.outletState,o=t.ref n.outletState=o var a={self:new c.ComponentRootReference(t.controller,e),environment:e,finalize:(0,p._instrumentStart)("render.outlet",pe,t)} if(g.ENV._DEBUG_RENDER_TREE){a.outlet={name:t.outlet},e.extra.debugRenderTree.create(a.outlet,{type:"outlet",name:a.outlet.name,args:f.EMPTY_ARGS,instance:void 0,template:void 0}) var s=i.value(),u=s&&s.render&&s.render.owner,l=o.value().render.owner if(u&&u!==l){var h=l,d=h.mountPoint a.engine={mountPoint:d},e.extra.debugRenderTree.create(a.engine,{type:"engine",name:d,args:f.EMPTY_ARGS,instance:h,template:void 0})}e.extra.debugRenderTree.create(a,{type:"route-template",name:t.name,args:r.capture(),instance:t.controller,template:t.template})}return a},n.getJitStaticLayout=function(e,t){var r=e.template return(0,v.unwrapTemplate)(r).asLayout()},n.getCapabilities=function(){return me},n.getSelf=function(e){return e.self},n.getTag=function(){return g.ENV._DEBUG_RENDER_TREE?(0,h.createTag)():h.CONSTANT_TAG},n.didRenderLayout=function(e,t){e.finalize(),g.ENV._DEBUG_RENDER_TREE&&(e.environment.extra.debugRenderTree.didRender(e,t),e.engine&&e.environment.extra.debugRenderTree.didRender(e.engine,t),e.environment.extra.debugRenderTree.didRender(e.outlet,t))},n.update=function(e){g.ENV._DEBUG_RENDER_TREE&&(e.environment.extra.debugRenderTree.update(e.outlet),e.engine&&e.environment.extra.debugRenderTree.update(e.engine),e.environment.extra.debugRenderTree.update(e))},n.didUpdateLayout=function(e,t){g.ENV._DEBUG_RENDER_TREE&&(e.environment.extra.debugRenderTree.didRender(e,t),e.engine&&e.environment.extra.debugRenderTree.didRender(e.engine,t),e.environment.extra.debugRenderTree.didRender(e.outlet,t))},n.getDestructor=function(e){return g.ENV._DEBUG_RENDER_TREE?{destroy:function(){e.environment.extra.debugRenderTree.willDestroy(e),e.engine&&e.environment.extra.debugRenderTree.willDestroy(e.engine),e.environment.extra.debugRenderTree.willDestroy(e.outlet)}}:null},r}(de),ge=new ye,ve=function(e,t){void 0===t&&(t=ge),this.state=e,this.manager=t} function be(){}var we=function(){function e(e,t,r,n,i){this.environment=e,this.component=t,this.args=r,this.finalizer=n,this.hasWrappedElement=i,this.classRef=null,this.classRef=null,this.argsRevision=null===r?0:(0,h.valueForTag)(r.tag),this.rootRef=new c.ComponentRootReference(t,e)}var t=e.prototype return t.willDestroy=function(){var e=this.component if(this.environment.isInteractive){e.trigger("willDestroyElement"),e.trigger("willClearRender") var t=(0,u.getViewElement)(e) t&&((0,u.clearElementView)(t),(0,u.clearViewElement)(e))}e.renderer.unregister(e)},t.destroy=function(){this.component.destroy()},t.finalize=function(){(0,this.finalizer)(),this.finalizer=be},e}(),_e=function(e){function r(r,n,i){var o,a=function(e){var t,n=e.positional,i=e.named,o=n.value(),a=i.value() return t=r.compute(o,a),r[ee]&&(0,h.consumeTag)(r[ee]),t} return o=e.call(this,a,n,i)||this,(0,t.assertThisInitialized)(o)}return(0,t.inheritsLoose)(r,e),r}(c.HelperRootReference),Se=function(e){function r(t,r,n,i){var o return(o=e.call(this,r)||this).inner=t,o.env=r,o}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.value=function(){return this.inner},n.get=function(e){var t=this.value() return(0,s.isObject)(t)?new Ee(t[e],this.env,this,e):f.PrimitiveReference.create(t)},r}(c.RootReference),Ee=function(e){function r(){return e.apply(this,arguments)||this}return(0,t.inheritsLoose)(r,e),r}(Se) function ke(e,t){for(var r=e,n=0;n-1,c=l?xe(t,a.split(".")):Me(t,a) b.EMBER_COMPONENT_IS_VISIBLE&&"style"===s&&void 0!==Ae&&(c=new Ae(t,c,Me(t,"isVisible"),o)),n.setAttribute(s,c,!1,null)},Ce=ce("display: none;") b.EMBER_COMPONENT_IS_VISIBLE&&(Ae=function(){function e(e,t,r,n){this.inner=t,this.isVisible=r,this.env=n,this.tag=(0,h.combine)([t.tag,r.tag])}var t=e.prototype return t.value=function(){var e=this.inner.value(),t=this.isVisible.value() if(!1!==t)return e if(e){var r=e+" display: none;" return fe(e)?ce(r):r}return Ce},t.get=function(){return f.UNDEFINED_REFERENCE},e}(),Te=function(e,t,r){t.setAttribute("style",new Ae(e,f.UNDEFINED_REFERENCE,e.get("isVisible"),r),!1,null)}) var Re=function(e,t,r,n){var i=r.split(":"),o=i[0],a=i[1],s=i[2] if(""===o)n.setAttribute("class",f.PrimitiveReference.create(a),!0,null) else{var u,l=o.indexOf(".")>-1,c=l?o.split("."):[],h=l?xe(t,c):Me(t,o) u=void 0===a?new Pe(h,l?c[c.length-1]:o):new Ne(h,a,s),n.setAttribute("class",u,!1,null)}},Pe=function(){function e(e,t){this.inner=e,this.path=t,this.tag=e.tag,this.dasherizedPath=null}return e.prototype.value=function(){var e=this.inner.value() if(!0===e){var t=this.path return this.dasherizedPath||(this.dasherizedPath=(0,w.dasherize)(t))}return e||0===e?String(e):null},e}(),Ne=function(){function e(e,t,r){void 0===t&&(t=null),void 0===r&&(r=null),this.inner=e,this.truthy=t,this.falsy=r,this.tag=e.tag}return e.prototype.value=function(){var e=this.inner,t=this.truthy,r=this.falsy return e.value()?t:r},e}(),De=(0,s.symbol)("INVOKE") e.INVOKE=De var Be=(0,s.symbol)("SOURCE"),Le=function(e){function r(t,r){var n return(n=e.call(this,r)||this).inner=t,n.tag=t.tag,n[Be]=t,n}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.value=function(){return this.inner.value()},n.get=function(e){return this.inner.get(e)},n[c.UPDATE_REFERENCED_VALUE]=function(e){return this.inner[c.UPDATE_REFERENCED_VALUE](e)},n[De]=function(e){return this.inner[c.UPDATE_REFERENCED_VALUE](e)},r}(c.RootReference) var je=(0,s.symbol)("ACTION") function Ue(e){return e}function Fe(e,t,r,n,i){var o,a if("function"==typeof r[De])o=r,a=r[De] else{var s=typeof r "string"===s?(o=t,a=t.actions&&t.actions[r]):"function"===s&&(o=e,a=r)}return function(){for(var e=arguments.length,t=new Array(e),r=0;r0))return null var l=Math.min(s.length,t.positional.length) a={},(0,r.assign)(a,t.named.capture().map) for(var c=0;c=e)return null var r=this.valueFor(t),n=this.memoFor(t) return this.position++,{value:r,memo:n}},e}(),mt=function(e){function r(t){var r return(r=e.call(this,t.length)||this).array=t,r}return(0,t.inheritsLoose)(r,e),r.from=function(e){return e.length>0?new this(e):null},r.fromForEachable=function(e){var t=[] return e.forEach((function(e){return t.push(e)})),this.from(t)},r.prototype.valueFor=function(e){return this.array[e]},r}(pt),yt=function(e){function r(t){var r return(r=e.call(this,t.length)||this).array=t,r}return(0,t.inheritsLoose)(r,e),r.from=function(e){return e.length>0?new this(e):null},r.prototype.valueFor=function(e){return(0,i.objectAt)(this.array,e)},r}(pt),gt=function(e){function r(t,r){var n return(n=e.call(this,r.length)||this).keys=t,n.values=r,n}(0,t.inheritsLoose)(r,e),r.fromIndexable=function(e){var t=Object.keys(e),r=t.length if(0===r)return null for(var n=[],o=0;o=2)&&t.push(o),r.push(e),n++})),0===n?null:i?new this(t,r):new mt(r)} var n=r.prototype return n.valueFor=function(e){return this.values[e]},n.memoFor=function(e){return this.keys[e]},r}(pt),vt=function(){function e(e,t){this.iterable=e,this.result=t,this.position=0}e.from=function(e){var t=e[Symbol.iterator](),r=t.next() return r.done?null:new this(t,r)} var t=e.prototype return t.isEmpty=function(){return!1},t.next=function(){var e=this.iterable,t=this.result,r=this.position if(t.done)return null var n=this.valueFor(t,r),i=this.memoFor(t,r) return this.position++,this.result=e.next(),{value:n,memo:i}},e}(),bt=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.valueFor=function(e){return e.value},n.memoFor=function(e,t){return t},r}(vt),wt=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.valueFor=function(e){return e.value[1]},n.memoFor=function(e){return e.value[0]},r}(vt) function _t(e){return"function"==typeof e.forEach}function St(e){return"function"==typeof e[Symbol.iterator]}function Et(e){return(0,s.isProxy)(e)?Boolean((0,i.get)(e,"isTruthy")):(0,a.isArray)(e)?0!==e.length:Boolean(e)}var kt=function(){function e(e){this.owner=e,g.ENV._DEBUG_RENDER_TREE&&(this._debugRenderTree=new ct)}var r=e.prototype return r.begin=function(){g.ENV._DEBUG_RENDER_TREE&&this.debugRenderTree.begin()},r.commit=function(){g.ENV._DEBUG_RENDER_TREE&&this.debugRenderTree.commit()},(0,t.createClass)(e,[{key:"debugRenderTree",get:function(){if(g.ENV._DEBUG_RENDER_TREE)return this._debugRenderTree throw new Error("Can't access debug render tree outside of the inspector (_DEBUG_RENDER_TREE flag is disabled)")}}]),e}(),Mt=function(){function e(e,t){this.toBool=Et,this.toIterator=dt,this.getPath=i.get,this.setPath=i.set,this.extra=new kt(e),this.isInteractive=t,function(e){var t if(d.hasDOM&&(t=it.call(e,"foobar:baz")),"foobar:"===t)e.protocolForURL=it else if("object"==typeof URL)Je=URL,e.protocolForURL=ot else{if("undefined"==typeof module||"function"!=typeof module.require)throw new Error("Could not find valid URL parsing mechanism for URL Sanitization") Je=module.require("url"),e.protocolForURL=ot}}(this)}var t=e.prototype return t.protocolForURL=function(e){return e},t.getTemplatePathDebugContext=function(e){return"While rendering:\n\n"+this.extra.debugRenderTree.logRenderStackForPath(e)},t.setTemplatePathDebugContext=function(e,t,r){var n="root" e instanceof c.IterationItemReference?n="iterator":e instanceof c.PropertyReference&&(n="property"),this.extra.debugRenderTree.createPath(e,t,n,r)},t.onTransactionBegin=function(){this.extra.begin()},t.onTransactionCommit=function(){this.extra.commit()},e}(),xt={dynamicLayout:!1,dynamicTag:!1,prepareArgs:!1,createArgs:!0,attributeHook:!1,elementHook:!1,createCaller:!1,dynamicScope:!0,updateHook:!0,createInstance:!0,wrapped:!1,willDestroy:!1} function At(e){return e.capabilities.asyncLifeCycleCallbacks}function Tt(e){return e.capabilities.updateHook}function It(e){return e.capabilities.destructor}var Ot=new(function(e){function n(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(n,e) var o=n.prototype return o.create=function(e,t,r){var n,o=t.delegate,a=r.capture(),u=a.named,l={},c=function(e){return u.get(e).tag} if(s.HAS_NATIVE_PROXY){var f={get:function(e,t){if(u.has(t)){var r=u.get(t) return(0,h.consumeTag)(r.tag),r.value()}if(t===i.CUSTOM_TAG_FOR)return c},has:function(e,t){return u.has(t)},ownKeys:function(e){return u.names},getOwnPropertyDescriptor:function(e,t){return{enumerable:!0,configurable:!0}}} 0,l=new Proxy(l,f)}else Object.defineProperty(l,i.CUSTOM_TAG_FOR,{configurable:!1,enumerable:!1,value:c}),u.names.forEach((function(e){Object.defineProperty(l,e,{enumerable:!0,configurable:!0,get:function(){var t=u.get(e) return(0,h.consumeTag)(t.tag),t.value()}})})) n={named:l,positional:a.positional.value()} var d=o.createComponent(t.ComponentClass.class,n),p=new Ct(o,d,a,e,l) return g.ENV._DEBUG_RENDER_TREE&&e.extra.debugRenderTree.create(p,{type:"component",name:t.name,args:r.capture(),instance:d,template:t.template}),p},o.update=function(e){g.ENV._DEBUG_RENDER_TREE&&e.env.extra.debugRenderTree.update(e) var t,r=e.delegate,n=e.component,i=e.args t={named:e.namedArgsProxy,positional:i.positional.value()},Tt(r)&&r.updateComponent(n,t)},o.didCreate=function(e){var t=e.delegate,r=e.component At(t)&&t.didCreateComponent(r)},o.didUpdate=function(e){var t=e.delegate,r=e.component;(function(e){return At(e)&&Tt(e)})(t)&&t.didUpdateComponent(r)},o.getContext=function(e){var t=e.delegate,r=e.component t.getContext(r)},o.getSelf=function(e){var t=e.env,r=e.delegate,n=e.component return new c.ComponentRootReference(r.getContext(n),t)},o.getDestructor=function(e){var t=null if(It(e.delegate)&&(t=e),g.ENV._DEBUG_RENDER_TREE){var r=t t={destroy:function(){e.env.extra.debugRenderTree.willDestroy(e),r&&r.destroy()}}}return t},o.getCapabilities=function(e){var t=e.delegate return(0,r.assign)({},xt,{updateHook:g.ENV._DEBUG_RENDER_TREE||t.capabilities.updateHook})},o.getTag=function(e){var t=e.args return(0,h.isConst)(t)?(0,h.createTag)():t.tag},o.didRenderLayout=function(e,t){g.ENV._DEBUG_RENDER_TREE&&e.env.extra.debugRenderTree.didRender(e,t)},o.didUpdateLayout=function(e,t){g.ENV._DEBUG_RENDER_TREE&&e.env.extra.debugRenderTree.didRender(e,t)},o.getJitStaticLayout=function(e){return(0,v.unwrapTemplate)(e.template).asLayout()},n}(de)),Ct=function(){function e(e,t,r,n,i){this.delegate=e,this.component=t,this.args=r,this.env=n,this.namedArgsProxy=i}return e.prototype.destroy=function(){var e=this.delegate,t=this.component It(e)&&e.destroyComponent(t)},e}(),Rt=function(e,t,r,n){this.name=e,this.ComponentClass=t,this.delegate=r,this.template=n,this.manager=Ot,this.state={name:e,ComponentClass:t,template:n,delegate:r}},Pt=function(e,t,r){this.manager=e,this.state={ComponentClass:t,layout:r}},Nt=function(e){function r(t){var r return(r=e.call(this)||this).owner=t,r}return(0,t.inheritsLoose)(r,e),r.prototype.getJitStaticLayout=function(e){var t=e.layout return(0,v.unwrapTemplate)(t).asLayout()},r}(de),Dt={dynamicLayout:!1,dynamicTag:!1,prepareArgs:!1,createArgs:g.ENV._DEBUG_RENDER_TREE,attributeHook:!1,elementHook:!1,createCaller:!1,dynamicScope:!1,updateHook:g.ENV._DEBUG_RENDER_TREE,createInstance:!0,wrapped:!1,willDestroy:!1},Bt=new(function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.getJitStaticLayout=function(e){var t=e.template return(0,v.unwrapTemplate)(t).asLayout()},n.getCapabilities=function(){return Dt},n.create=function(e,t,r){var n=t.name,i=t.template if(g.ENV._DEBUG_RENDER_TREE){var o={environment:e} return e.extra.debugRenderTree.create(o,{type:"component",name:n,args:r.capture(),instance:null,template:i}),o}return null},n.getSelf=function(){return f.NULL_REFERENCE},n.getTag=function(){return g.ENV._DEBUG_RENDER_TREE?(0,h.createTag)():h.CONSTANT_TAG},n.getDestructor=function(e){return g.ENV._DEBUG_RENDER_TREE?{destroy:function(){e.environment.extra.debugRenderTree.willDestroy(e)}}:null},n.didRenderLayout=function(e,t){g.ENV._DEBUG_RENDER_TREE&&e.environment.extra.debugRenderTree.didRender(e,t)},n.update=function(e){g.ENV._DEBUG_RENDER_TREE&&e.environment.extra.debugRenderTree.update(e)},n.didUpdateLayout=function(e,t){g.ENV._DEBUG_RENDER_TREE&&e.environment.extra.debugRenderTree.didRender(e,t)},r}(de)),Lt=function(){function e(e,t){this.name=e,this.template=t,this.manager=Bt}return(0,t.createClass)(e,[{key:"state",get:function(){return this}}]),e}(),jt=function(e){return e.positional.at(0)} function Ut(e){return"checkbox"===e.positional.at(0).value()?"-checkbox":"-text-field"}function Ft(e){var t=e.positional,r=t.at(0).value().split("."),n=r[r.length-1],i=t.at(1).value() return!0===i?(0,w.dasherize)(n):i||0===i?String(i):""}var zt=function(){function e(e){this.inner=e,this.valueTag=(0,h.createUpdatableTag)(),this.tag=(0,h.combine)([e.tag,this.valueTag])}var t=e.prototype return t.value=function(){var e=this.inner.value(),t=(0,i.tagForProperty)(e,"[]") return(0,h.updateTag)(this.valueTag,t),e},t.get=function(e){return this.inner.get(e)},e}() var Ht=function(e){return function(e){return null==e||"function"!=typeof e.toString}(e)?"":String(e)} function Vt(e){return e.positional.value().map(Ht).join("")}function Kt(e){var t=null return t}var qt=Kt() function Gt(e){var t=e.positional,r=t.at(0) return function(){for(var e=t.value(),n=e[0],i=e.slice(1),o=arguments.length,a=new Array(o),s=0;s=0)return!0 for(var r=0;r1)if(o=f.at(0),(u=f.at(1))[De])a=u else{u.propertyKey a=u.value()}for(var d=[],p=2;p0&&(r=function(e){return t.map((function(e){return e.value()})).concat(e)}) e&&(n=function(t){var r=e.value() return r&&t.length>0&&(t[0]=(0,i.get)(t[0],r)),t}) return r&&n?function(e){return n(r(e))}:r||n||Ue}(n.has("value")&&n.get("value"),u) return(r="function"==typeof s[De]?Fe(s,s,s[De],f,l):(0,h.isConst)(c)&&(0,h.isConst)(s)?Fe(a.value(),c.value(),s.value(),f,l):function(e,t,r,n,i){0 return function(){return Fe(e,t.value(),r.value(),n,i).apply(void 0,arguments)}}(a.value(),c,s,f,l))[je]=!0,new Se(r,t.env)},array:function(e){return e.positional.capture()},concat:function(e,t){return new c.HelperRootReference(Vt,e.capture(),t.env)},fn:function(e,t){return new c.HelperRootReference(Gt,e.capture(),t.env)},get:function(e,t){var r=e.positional.at(0),n=e.positional.at(1) if((0,h.isConst)(n)){var i=n.value() return null==i||""===i?f.NULL_REFERENCE:"string"==typeof i&&i.indexOf(".")>-1?ke(r,i.split(".")):r.get(String(i))}return new Yt(e.capture(),t.env)},hash:Zt,log:function(e,t){return new c.HelperRootReference(Qt,e.capture(),t.env)},mut:function(e,t){var r=e.positional.at(0) return"function"==typeof r[De]?r:new Le(r,t.env)},"query-params":function(e,t){return new c.HelperRootReference(Xt,e.capture(),t.env)},readonly:function(e,t){var r=function(e){return e[Be]||e}(e.positional.at(0)) return new er(r,t.env)},unbound:function(e,t){return new Se(e.positional.at(0).value(),t.env)},unless:function(e,t){return new c.HelperRootReference($t,e.capture(),t.env)},"-hash":Zt,"-each-in":function(e){return new ft(e.positional.at(0))},"-input-type":function(e,t){return new c.HelperRootReference(Ut,e.capture(),t.env)},"-normalize-class":function(e,t){return new c.HelperRootReference(Ft,e.capture(),t.env)},"-track-array":function(e){return new zt(e.positional.at(0))},"-get-dynamic-var":f.getDynamicVar,"-mount":function(e,t){var r=t.env,n=e.positional.at(0),i=null if(e.named.has("model")){var o=e.named.capture() 0,i={tag:o.tag,positional:f.EMPTY_ARGS.positional,named:o,length:1,value:function(){return{named:this.named.value(),positional:this.positional.value()}}}}return new Mr(n,r,i)},"-outlet":function(e,t){var r,n=t.dynamicScope() return r=0===e.positional.length?new c.ConstReference("main"):e.positional.at(0),new Or(new Ar(n.outletState,r),t.env)},"-assert-implicit-component-helper-argument":jt},Gr=function(){function e(e){this.handles=[void 0],this.objToHandle=new WeakMap,this.builtInHelpers=qr,this.componentDefinitionCache=new Map,this.componentDefinitionCount=0,this.helperDefinitionCount=0,this.isInteractive=e,this.builtInModifiers={action:{manager:new ar,state:null},on:{manager:new _r(e),state:null}}}var t=e.prototype return t.lookupComponent=function(e,t){var r=this.lookupComponentHandle(e,t) return null===r?null:this.resolve(r)},t.lookupComponentHandle=function(e,t){var r=this.handles.length,n=this.handle(this._lookupComponentDefinition(e,t)) return r===n&&this.componentDefinitionCount++,n},t.resolve=function(e){return this.handles[e]},t.lookupHelper=function(e,t){var r=this.handles.length,n=this._lookupHelper(e,t) if(null!==n){var i=this.handle(n) return r===i&&this.helperDefinitionCount++,i}return null},t.lookupModifier=function(e,t){return this.handle(this._lookupModifier(e,t))},t.lookupPartial=function(e,t){if(b.PARTIALS){var r=this._lookupPartial(e,t) return this.handle(r)}return null},t.compilable=function(){},t.handle=function(e){if(null==e)return null var t=this.objToHandle.get(e) return void 0===t&&(t=this.handles.push(e)-1,this.objToHandle.set(e,t)),t},t._lookupHelper=function(e,t){var r=this.builtInHelpers[e] if(void 0!==r)return r var n=t.moduleName,i=t.owner,o=e,a=Vr(n,void 0),s=i.factoryFor("helper:"+o,a)||i.factoryFor("helper:"+o) return function(e){return"object"==typeof e&&null!==e&&e.class&&e.class.isHelperFactory}(s)?function(e,t){var r=s.create() return te(r)&&t.associateDestroyable({destroy:function(){r.destroy()}}),new _e(r,e.capture(),t.env)}:null},t._lookupPartial=function(e,t){var r=t.owner,i=Nr(e,r)(r) return new n.PartialDefinitionImpl(e,i)},t._lookupModifier=function(e,t){var r=this.builtInModifiers[e] if(void 0===r){var n=t.owner,i=n.factoryFor("modifier:"+e) if(void 0!==i){var o=zr(i.class)(n) return new ur(e,i,o,this.isInteractive)}}return r},t._parseNameForNamespace=function(e){var t=e,r=void 0,n=e.indexOf("::") return-1!==n&&(t=e.slice(n+2),r=e.slice(0,n)),{name:t,namespace:r}},t._lookupComponentDefinition=function(e,t){var r,n,i=e,o=t.owner,a=function(e,t,r){if(r.source||r.namespace){var n=Kr(e,t,r) if(null!==n)return n}return Kr(e,t)}(o,i,Vr(t.moduleName,void 0)) if(null===a)return null n=null===a.component?r=a.layout(o):a.component var s=this.componentDefinitionCache.get(n) if(void 0!==s)return s void 0===r&&null!==a.layout&&(r=a.layout(o)) var u=(0,p._instrumentStart)("render.getComponentDefinition",Hr,i),l=null if(null===a.component?g.ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS&&(l=new Lt(i,r)):(0,k.isTemplateOnlyComponent)(a.component.class)&&(l=new Lt(i,r)),null!==a.component){var c=a.component.class,f=Fr(c) if(null!==f&&"component"===f.type){var h=f.factory l=f.internal?new Pt(h(o),c,r):new Rt(i,a.component,h(o),void 0!==r?r:o.lookup((0,_.privatize)(P()))(o))}}return null===l&&(l=new et(i,a.component||o.factoryFor((0,_.privatize)(R())),r)),u(),this.componentDefinitionCache.set(n,l),l},e}() function Wr(e){return null===e?null:[e[0].map((function(e){return"@"+e})),e[1]]}var Yr=[] function Zr(e,t,r,i){var o=i.resolver.lookupComponent(e,i.meta.referrer) return null!==o?(0,n.staticComponent)(o,[null===t?[]:t,Wr(r),n.EMPTY_BLOCKS]):n.UNHANDLED}function Jr(e,t,r,i,o){var a=o.resolver.lookupComponent(e,o.meta.referrer) return null!==a?(0,n.staticComponent)(a,[t,Wr(r),i]):n.NONE}e._experimentalMacros=Yr var $r=function(){function e(e,t){this.view=e,this.outletState=t}var t=e.prototype return t.child=function(){return new e(this.view,this.outletState)},t.get=function(e){return this.outletState},t.set=function(e,t){return this.outletState=t,t},e}(),Qr=function(){function e(e,t,r,n,i,o,a,s){var l=this this.root=e,this.runtime=t,this.id=(0,u.getViewId)(e),this.result=void 0,this.destroyed=!1,this.render=function(){var e,u=(0,v.unwrapTemplate)(n).asLayout().compile(r),c=(0,f.renderJitMain)(t,r,i,s(t.env,{element:o,nextSibling:null}),(0,v.unwrapHandle)(u),a) do{e=c.next()}while(!e.done) var h=l.result=e.value l.render=function(){return h.rerender({alwaysRevalidate:!1})}}}var t=e.prototype return t.isFor=function(e){return this.root===e},t.destroy=function(){var e=this.result,t=this.runtime.env this.destroyed=!0,this.runtime=void 0,this.root=null,this.result=void 0,this.render=void 0,e&&(0,f.inTransaction)(t,(function(){return e.destroy()}))},e}(),Xr=[] function en(e){var t=Xr.indexOf(e) Xr.splice(t,1)}function tn(){}var rn=null var nn=0 y.backburner.on("begin",(function(){for(var e=0;eg.ENV._RERENDER_LOOP_LIMIT)throw nn=0,Xr[e].destroy(),new Error("infinite rendering invalidation detected") return nn++,y.backburner.join(null,tn)}nn=0,function(){if(null!==rn){var e=rn.resolve rn=null,y.backburner.join(null,e)}}()})) var on=function(){function e(e,t,r,i,o,a,s){void 0===a&&(a=!1),void 0===s&&(s=f.clientBuilder),this._inRenderTransaction=!1,this._lastRevision=-1,this._destroyed=!1,this._rootTemplate=i(e),this._viewRegistry=o,this._destinedForDOM=a,this._roots=[],this._removedRoots=[],this._builder=s var u=this._runtimeResolver=new Gr(r.isInteractive),l=new he(u),c=this._context=(0,n.JitContext)(l);(function(e){var t=e.inlines,r=e.blocks t.addMissing(Zr),r.addMissing(Jr) for(var n=0;n=e||o.render()}t._lastRevision=(0,h.valueForTag)(h.CURRENT_TAG)}))}while(r.length>e) for(;i.length;){var o=i.pop(),a=r.indexOf(o) r.splice(a,1)}0===this._roots.length&&en(this)},i._renderRootsTransaction=function(){if(!this._inRenderTransaction){this._inRenderTransaction=!0 var e=!1 try{this._renderRoots(),e=!0}finally{e||(this._lastRevision=(0,h.valueForTag)(h.CURRENT_TAG)),this._inRenderTransaction=!1}}},i._clearAllRoots=function(){for(var e=this._roots,t=0;t0&&(r.splice(0,this._inheritedEnd),this._inheritedEnd=0) for(var n=0;n=0;i--){var o=e[i] if(o.event===t&&o.target===r&&o.method===n)return i}return-1}e.meta=d})),e("@ember/-internals/metal/index",["exports","ember-babel","@ember/-internals/meta","@ember/-internals/utils","@ember/debug","@ember/-internals/environment","@ember/runloop","@glimmer/validator","@ember/polyfills","@ember/error","ember/version","@ember/-internals/meta/lib/meta","@ember/deprecated-features","@ember/-internals/owner"],(function(e,t,r,n,i,o,a,s,u,l,c,f,h,d){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.computed=Ae,e.isComputed=function(e,t){return Boolean(ee(e,t))},e.getCacheFor=y,e.getCachedValueFor=g,e.peekCacheFor=w,e.alias=function(e){return de(new Oe(e),Ie)},e.deprecateProperty=function(e,t,r,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,set:function(e){Se(this,r,e)},get:function(){return we(this,r)}})},e._getPath=_e,e.get=we,e.getWithDefault=function(e,t,r){var n=we(e,t) if(void 0===n)return r return n},e.set=Se,e.trySet=function(e,t,r){return Se(e,t,r,!0)},e.objectAt=J,e.replace=function(e,t,r,n){void 0===n&&(n=Z) Array.isArray(e)?$(e,t,r,n):e.replace(t,r,n)},e.replaceInNativeArray=$,e.addArrayObserver=function(e,t,r){return Q(e,t,r,_,!1)},e.removeArrayObserver=function(e,t,r){return Q(e,t,r,S,!0)},e.arrayContentWillChange=W,e.arrayContentDidChange=Y,e.eachProxyArrayWillChange=function(e,t,r,n){var i=Pe.get(e) void 0!==i&&i.arrayWillChange(e,t,r,n)},e.eachProxyArrayDidChange=function(e,t,r,n){var i=Pe.get(e) void 0!==i&&i.arrayDidChange(e,t,r,n)},e.addListener=_,e.hasListeners=function(e,t){var n=(0,r.peekMeta)(e) if(null===n)return!1 var i=n.matchingListeners(t) return void 0!==i&&i.length>0},e.on=function(){for(var e=arguments.length,t=new Array(e),r=0;r0&&x.delete(e) A.size>0&&A.delete(e)}(e),(0,a.schedule)("destroy",t,je),!0},e.addObserver=T,e.activateObserver=O,e.removeObserver=I,e.flushAsyncObservers=function(e){void 0===e&&(e=!0) var t=(0,s.valueForTag)(s.CURRENT_TAG) if(N===t)return N=t,A.forEach((function(t,n){var i=(0,r.peekMeta)(n) i&&(i.isSourceDestroying()||i.isMetaDestroyed())?A.delete(n):t.forEach((function(t,r){if(!(0,s.validateTag)(t.tag,t.lastRevision)){var o=function(){try{E(n,r,[n,t.path],void 0,i)}finally{t.tag=(0,s.combine)(ae(n,t.path)),t.lastRevision=(0,s.valueForTag)(t.tag)}} e?(0,a.schedule)("actions",o):o()}}))}))},e.mixin=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n=0;s-=3){var u=i[s],l=i[s+1],c=i[s+2] l&&(c&&S(e,t,u,l),u||(u=e),"string"==typeof l&&(l=u[l]),l.apply(u,n))}return!0}function k(e){return e+":change"}var M=!o.ENV._DEFAULT_ASYNC_OBSERVERS,x=new Map e.SYNC_OBSERVERS=x var A=new Map function T(e,t,n,i,o){void 0===o&&(o=M) var a=k(t) _(e,a,n,i,!1,o) var s=(0,r.peekMeta)(e) null!==s&&(s.isPrototypeMeta(e)||s.isInitializing())||O(e,a,o)}function I(e,t,n,i,o){void 0===o&&(o=M) var a=k(t),s=(0,r.peekMeta)(e) null!==s&&(s.isPrototypeMeta(e)||s.isInitializing())||P(e,a,o),S(e,a,n,i)}function O(e,t,r){void 0===r&&(r=!1) var n=function(e,t){var r=!0===t?x:A return r.has(e)||r.set(e,new Map),r.get(e)}(e,r) if(n.has(t))n.get(t).count++ else{var i=t.split(":")[0],o=(0,s.combine)(ae(e,i)) n.set(t,{count:1,path:i,tag:o,lastRevision:(0,s.valueForTag)(o),suspended:!1})}}e.ASYNC_OBSERVERS=A var C=!1,R=[] function P(e,t,r){if(void 0===r&&(r=!1),!0!==C){var n=!0===r?x:A,i=n.get(e) if(void 0!==i){var o=i.get(t) o.count--,0===o.count&&(i.delete(t),0===i.size&&n.delete(e))}}else R.push([e,t,r])}var N=0 function D(){x.forEach((function(e,t){var n=(0,r.peekMeta)(t) n&&(n.isSourceDestroying()||n.isMetaDestroyed())?x.delete(t):e.forEach((function(e,r){if(!e.suspended&&!(0,s.validateTag)(e.tag,e.lastRevision))try{e.suspended=!0,E(t,r,[t,e.path],void 0,n)}finally{e.tag=(0,s.combine)(ae(t,e.path)),e.lastRevision=(0,s.valueForTag)(e.tag),e.suspended=!1}}))}))}function B(e,t,r){var n=x.get(e) if(n){var i=n.get(k(t)) i&&(i.suspended=r)}}(0,s.setPropertyDidChange)((function(){return a.backburner.ensureInstance()})) var L=(0,n.symbol)("CUSTOM_TAG_FOR") e.CUSTOM_TAG_FOR=L var j=(0,n.symbol)("SELF_TAG") function U(e,t){if(!(0,n.isObject)(e))return s.CONSTANT_TAG if("function"==typeof e[L])return e[L](t) var r=(0,s.tagFor)(e,t) return r}function F(e,t){(0,s.dirtyTagFor)(e,t),(0,s.dirtyTagFor)(e,j)}var z=(0,n.symbol)("PROPERTY_DID_CHANGE") e.PROPERTY_DID_CHANGE=z var H=0 function V(e,t,n,i){var o=void 0===n?(0,r.peekMeta)(e):n null!==o&&(o.isInitializing()||o.isPrototypeMeta(e))||(F(e,t),H<=0&&D(),z in e&&(4===arguments.length?e[z](t,i):e[z](t)))}function K(){H++,C=!0}function q(){--H<=0&&(D(),function(){C=!1 for(var e,r=(0,t.createForOfIteratorHelperLoose)(R);!(e=r()).done;){var n=e.value P(n[0],n[1],n[2])}R=[]}())}function G(e){K() try{e()}finally{q()}}function W(e,t,r,n){return void 0===t?(t=0,r=n=-1):(void 0===r&&(r=-1),void 0===n&&(n=-1)),E(e,"@array:before",[e,t,r,n]),e}function Y(e,t,n,i,o){void 0===o&&(o=!0),void 0===t?(t=0,n=i=-1):(void 0===n&&(n=-1),void 0===i&&(i=-1)) var a=(0,r.peekMeta)(e) o&&((i<0||n<0||i-n!=0)&&V(e,"length",a),V(e,"[]",a)),E(e,"@array:change",[e,t,n,i]) var s=w(e) if(void 0!==s){var u=-1===n?0:n,l=e.length-((-1===i?0:i)-u),c=t<0?l+t:t if(s.has("firstObject")&&0===c&&V(e,"firstObject",a),s.has("lastObject"))l-10&&(n=r)._property.apply(n,t) return r}(0,t.inheritsLoose)(i,e) var o=i.prototype return o.setup=function(t,r,n,i){if(e.prototype.setup.call(this,t,r,n,i),!1===this._hasConfig){var o=n.get,a=n.set void 0!==o&&(this._getter=o),void 0!==a&&(this._setter=function(e,t){var r=a.call(this,t) return void 0!==o&&void 0===r?o.call(this):r})}},o.volatile=function(){this._volatile=!0},o.readOnly=function(){this._readOnly=!0},o.property=function(){this._property.apply(this,arguments)},o._property=function(){var e=[] function t(t){e.push(t)}for(var r=0;r=65&&e<=90){var s=Je(t,a) s&&(0,n.setName)(s,a)}}}function Ge(e){(function e(t,r,i){var o=t.length,a=t.join(".") for(var s in Ke[a]=r,(0,n.setName)(r,a),r)if(Ue.call(r,s)){var u=r[s] if(t[o]=s,u&&u.toString===Ye&&void 0===(0,n.getName)(u))(0,n.setName)(u,t.join(".")) else if(u&&u.isNamespace){if(i.has(u))continue i.add(u),e(t,u,i)}}t.length=o})([e.toString()],e,new Set)}function We(){var e=ze.unprocessedNamespaces if(e&&(qe(),ze.unprocessedNamespaces=!1),e||He){for(var t=Ve,r=0;r=0||"concatenatedProperties"===t||"mergedProperties"===t?r=function(e,t,r,i){var o=i[t]||e[t],a=(0,n.makeArray)(o).concat((0,n.makeArray)(r)) return a}(e,t,r,a):l&&l.indexOf(t)>-1?r=function(e,t,r,i){var o=i[t]||e[t] if(!o)return r var a=(0,u.assign)({},o),s=!1 for(var l in r)if(r.hasOwnProperty(l)){var c=r[l] Qe(c)?(s=!0,a[l]=it(e,l,c,o,{})):a[l]=c}return s&&(a._super=n.ROOT),a}(e,t,r,a):Qe(r)&&(r=it(e,t,r,a,o)),o[t]=void 0,a[t]=r)}function at(e,t,r,i){var o=(0,n.getObservers)(r),a=(0,n.getListeners)(r) if(void 0!==o)for(var s=i?T:I,u=0;u0){r=new Array(t) for(var n=0;n7)},e.supportsHistory=function(e,t){if((-1!==e.indexOf("Android 2.")||-1!==e.indexOf("Android 4.0"))&&-1!==e.indexOf("Mobile Safari")&&-1===e.indexOf("Chrome")&&-1===e.indexOf("Windows Phone"))return!1 return Boolean(t&&"pushState"in t)},e.replacePath=function(e,t){e.replace(i(e)+t)}})),e("@ember/-internals/routing/lib/services/router",["exports","ember-babel","@ember/-internals/runtime","@ember/debug","@ember/object/computed","@ember/service","@ember/-internals/routing/lib/utils"],(function(e,t,r,n,i,o,a){"use strict" function s(e,t){return"/"===t?e:e.substr(t.length,e.length)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var u=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.init=function(){var t=this e.prototype.init.apply(this,arguments),this._router.on("routeWillChange",(function(e){t.trigger("routeWillChange",e)})),this._router.on("routeDidChange",(function(e){t.trigger("routeDidChange",e)}))},n.transitionTo=function(){for(var e=arguments.length,t=new Array(e),r=0;r1?r-1:0),i=1;i0 return!l||(this._router._prepareQueryParams(i,o,s,!0),(0,a.shallowEqual)(s,u.state.queryParams))},n.recognize=function(e){var t=s(e,this.rootURL) return this._router._routerMicrolib.recognize(t)},n.recognizeAndLoad=function(e){var t=s(e,this.rootURL) return this._router._routerMicrolib.recognizeAndLoad(t)},r}(o.default) e.default=u,u.reopen(r.Evented,{currentRouteName:(0,i.readOnly)("_router.currentRouteName"),currentURL:(0,i.readOnly)("_router.currentURL"),location:(0,i.readOnly)("_router.location"),rootURL:(0,i.readOnly)("_router.rootURL"),currentRoute:(0,i.readOnly)("_router.currentRoute")})})),e("@ember/-internals/routing/lib/services/routing",["exports","ember-babel","@ember/object/computed","@ember/polyfills","@ember/service"],(function(e,t,r,n,i){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var o=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var i=r.prototype return i.hasRoute=function(e){return this.router.hasRoute(e)},i.transitionTo=function(e,t,r,n){var i=this.router._doTransition(e,t,r) return n&&i.method("replace"),i},i.normalizeQueryParams=function(e,t,r){this.router._prepareQueryParams(e,t,r)},i.generateURL=function(e,t,r){var i=this.router if(i._routerMicrolib){var o={} return r&&((0,n.assign)(o,r),this.normalizeQueryParams(e,t,o)),i.generate.apply(i,[e].concat(t,[{queryParams:o}]))}},i.isActiveForRoute=function(e,t,r,n,i){var o=this.router._routerMicrolib.recognizer.handlersFor(r),a=o[o.length-1].handler,s=function(e,t){for(var r=0,n=0;ns&&(r=a),n.isActiveIntent(r,e,t,!i)},r}(i.default) e.default=o,o.reopen({targetState:(0,r.readOnly)("router.targetState"),currentState:(0,r.readOnly)("router.currentState"),currentRouteName:(0,r.readOnly)("router.currentRouteName"),currentPath:(0,r.readOnly)("router.currentPath")})})),e("@ember/-internals/routing/lib/system/cache",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var t=function(){function e(){this.cache=new Map}var t=e.prototype return t.has=function(e){return this.cache.has(e)},t.stash=function(e,t,r){var n=this.cache.get(e) void 0===n&&(n=new Map,this.cache.set(e,n)),n.set(t,r)},t.lookup=function(e,t,r){if(!this.has(e))return r var n=this.cache.get(e) return n.has(t)?n.get(t):r},e}() e.default=t})),e("@ember/-internals/routing/lib/system/controller_for",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t,r){return e.lookup("controller:"+t,r)}})),e("@ember/-internals/routing/lib/system/dsl",["exports","@ember/debug","@ember/polyfills"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var n=0 function i(e){return"function"==typeof e}var o=function(){function e(e,t){void 0===e&&(e=null),this.explicitIndex=!1,this.parent=e,this.enableLoadingSubstates=Boolean(t&&t.enableLoadingSubstates),this.matches=[],this.options=t}var t=e.prototype return t.route=function(t,r,n){var o,u=null,l="/_unused_dummy_error_path_route_"+t+"/:error" if(i(r)?(o={},u=r):i(n)?(o=r,u=n):o=r||{},this.enableLoadingSubstates&&(s(this,t+"_loading",{resetNamespace:o.resetNamespace}),s(this,t+"_error",{resetNamespace:o.resetNamespace,path:l})),u){var c=a(this,t,o.resetNamespace),f=new e(c,this.options) s(f,"loading"),s(f,"error",{path:l}),u.call(f),s(this,t,o,f.generate())}else s(this,t,o)},t.push=function(e,t,n,i){var o=t.split(".") if(this.options.engineInfo){var a=t.slice(this.options.engineInfo.fullName.length+1),s=(0,r.assign)({localFullName:a},this.options.engineInfo) i&&(s.serializeMethod=i),this.options.addRouteForEngine(t,s)}else if(i)throw new Error("Defining a route serializer on route '"+t+"' outside an Engine is not allowed.") ""!==e&&"/"!==e&&"index"!==o[o.length-1]||(this.explicitIndex=!0),this.matches.push(e,t,n)},t.generate=function(){var e=this.matches return this.explicitIndex||this.route("index",{path:"/"}),function(t){for(var r=0;r0&&(m.set(this,[]),(0,c.once)(this._router,"_setOutlets"))},s.buildRouteInfoMetadata=function(){},o}(o.Object) function b(e){var t=function(e,t,r){void 0===r&&(r=0) if(!t)return for(var n=0;n0 if(u){var f=(0,n.get)(u,"queryParams")||{} e=function(e,r){var n={},i={defaultValue:!0,type:!0,scope:!0,as:!0} for(var o in e)if(e.hasOwnProperty(o)){var a={};(0,t.assign)(a,e[o],r[o]),n[o]=a,i[o]=!0}for(var s in r)if(r.hasOwnProperty(s)&&!i[s]){var u={};(0,t.assign)(u,r[s],e[s]),n[s]=u}return n}((0,d.normalizeControllerQueryParams)(f),l)}else c&&(u=(0,p.default)(s,a),e=l) var h=[],m={},y=[] for(var g in e)if(e.hasOwnProperty(g)&&"unknownProperty"!==g&&"_super"!==g){var v=e[g],b=v.scope||"model",w=void 0 "controller"===b&&(w=[]) var _=v.as||this.serializeQueryParamKey(g),E=(0,n.get)(u,g) E=S(E) var k=v.type||(0,o.typeOf)(E),M=this.serializeQueryParam(E,_,k),x=a+":"+g,A={undecoratedDefaultValue:(0,n.get)(u,g),defaultValue:E,serializedDefaultValue:M,serializedValue:M,type:k,urlKey:_,prop:g,scopedPropertyName:x,controllerName:a,route:this,parts:w,values:null,scope:b} m[g]=m[_]=m[x]=A,h.push(A),y.push(g)}return{qps:h,map:m,propertyNames:y,states:{inactive:function(e,t){var n=m[e] r._qpChanged(e,t,n)},active:function(e,t){var n=m[e] return r._qpChanged(e,t,n),r._activeQPChanged(n,t)},allowOverrides:function(e,t){var n=m[e] return r._qpChanged(e,t,n),r._updatingQPChanged(n)}}}})),send:function(){for(var e=arguments.length,t=new Array(e),r=0;r1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i=0;--r){var n=e[r],i=n.route if(void 0!==i&&!0!==t(i,n))return}}var S={willResolveModel:function(e,t,r){this._scheduleLoadingEvent(t,r)},error:function(e,t,r){var n=this,i=e[e.length-1] _(e,(function(e,r){if(r!==i){var o=k(e,"error") if(o)return n._markErrorAsHandled(t),n.intermediateTransitionTo(o,t),!1}var a=E(e,"error") return!a||(n._markErrorAsHandled(t),n.intermediateTransitionTo(a,t),!1)})),function(e,t){var r,n,i=[] n=e&&"object"==typeof e&&"object"==typeof e.errorThrown?e.errorThrown:e t&&i.push(t) n&&(n.message&&i.push(n.message),n.stack&&i.push(n.stack),"string"==typeof n&&i.push(n));(r=console).error.apply(r,i)}(t,"Error while processing route: "+r.targetName)},loading:function(e,t){var r=this,n=e[e.length-1] _(e,(function(e,i){if(i!==n){var o=k(e,"loading") if(o)return r.intermediateTransitionTo(o),!1}var a=E(e,"loading") return a?(r.intermediateTransitionTo(a),!1):t.pivotHandler!==e}))}} function E(e,t){var r=(0,n.getOwner)(e),i=e.routeName,o=e.fullRouteName+"_"+t return M(r,e._router,i+"_"+t,o)?o:""}function k(e,t){var r=(0,n.getOwner)(e),i=e.routeName,o=e.fullRouteName,a="application"===o?t:o+"."+t return M(r,e._router,"application"===i?t:i+"."+t,a)?a:""}function M(e,t,r,n){var i=t.hasRoute(n),o=e.hasRegistration("template:"+r)||e.hasRegistration("route:"+r) return i&&o}function x(e,t,r,n){if(!e){if(t)return throw new s.default("Can't trigger action '"+r+"' because your app hasn't finished transitioning into its first route. To trigger an action on destination routes during a transition, you can call `.send()` on the `Transition` object passed to the `model/beforeModel/afterModel` hooks.")}for(var i,o,a=!1,u=e.length-1;u>=0;u--)if(o=(i=e[u].route)&&i.actions&&i.actions[r]){if(!0!==o.apply(i,n))return void("error"===r&&i._router._markErrorAsHandled(n[0])) a=!0}var l=S[r] if(l)l.apply(this,[e].concat(n)) else if(!a&&!t)throw new s.default("Nothing handled the action '"+r+"'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.")}function A(e,t,r){for(var n=e._routerMicrolib.applyIntent(t,r),i=n.routeInfos,o=n.params,a=0;a0;){var n=r.shift() if(n.render.name===t)return n var i=n.outlets for(var o in i)r.push(i[o])}}function R(e,t,n){var i,o={render:n,outlets:Object.create(null),wasUsed:!1} return(i=n.into?C(e,n.into):t)?(0,r.set)(i.outlets,n.outlet,o):e=o,{liveRoutes:e,ownState:o}}function P(e,t,r){var n=C(e,r.routeName) return n||(t.outlets.main={render:{name:r.routeName,outlet:"main"},outlets:{}},t)}w.reopenClass({map:function(e){return this.dslCallbacks||(this.dslCallbacks=[],this.reopenClass({dslCallbacks:this.dslCallbacks})),this.dslCallbacks.push(e),this},_routePath:function(e){var t,r,n=[] function i(e,t){for(var r=0;r0){var s=(0,t.assign)({},i) return this.emberRouter._prepareQueryParams(e,n,s),(0,r.shallowEqual)(s,a.queryParams)}return!0},e}() e.default=n})),e("@ember/-internals/routing/lib/system/transition",[],(function(){})),e("@ember/-internals/routing/lib/utils",["exports","@ember/-internals/metal","@ember/-internals/owner","@ember/error","@ember/polyfills","router_js"],(function(e,t,r,n,i,o){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.extractRouteArgs=function(e){var t,r=(e=e.slice())[e.length-1] t=r&&r.hasOwnProperty("queryParams")?e.pop().queryParams:{} return{routeName:e.shift(),models:e,queryParams:t}},e.getActiveTargetName=function(e){var t=e.activeTransition?e.activeTransition[o.STATE_SYMBOL].routeInfos:e.state.routeInfos return t[t.length-1].name},e.stashParamNames=function(e,t){if(t._namesStashed)return for(var r,n=t[t.length-1].name,i=e._routerMicrolib.recognizer.handlersFor(n),o=0;o0)-(r<0)}})),e("@ember/-internals/runtime/lib/copy",["exports","@ember/debug","@ember/-internals/runtime/lib/system/object","@ember/-internals/runtime/lib/mixins/copyable"],(function(e,t,r,n){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){if("object"!=typeof e||null===e)return e if(!Array.isArray(e)&&n.default.detect(e))return e.copy(t) return function e(t,r,i,o){if("object"!=typeof t||null===t)return t var a,s if(r&&(s=i.indexOf(t))>=0)return o[s] r&&i.push(t) if(Array.isArray(t)){if(a=t.slice(),r)for(o.push(a),s=a.length;--s>=0;)a[s]=e(a[s],r,i,o)}else if(n.default.detect(t))a=t.copy(r,i,o),r&&o.push(a) else if(t instanceof Date)a=new Date(t.getTime()),r&&o.push(a) else{var u for(u in a={},r&&o.push(a),t)Object.prototype.hasOwnProperty.call(t,u)&&"__"!==u.substring(0,2)&&(a[u]=r?e(t[u],r,i,o):t[u])}return a}(e,t,t?[]:null,t?[]:null)}})),e("@ember/-internals/runtime/lib/ext/function",["@ember/-internals/environment","@ember/-internals/metal","@ember/debug","@ember/deprecated-features"],(function(e,t,r,n){"use strict" n.FUNCTION_PROTOTYPE_EXTENSIONS&&e.ENV.EXTEND_PROTOTYPES.Function&&Object.defineProperties(Function.prototype,{property:{configurable:!0,enumerable:!1,writable:!0,value:function(){return t.computed.apply(void 0,Array.prototype.slice.call(arguments).concat([this]))}},observes:{configurable:!0,enumerable:!1,writable:!0,value:function(){return t.observer.apply(void 0,Array.prototype.slice.call(arguments).concat([this]))}},on:{configurable:!0,enumerable:!1,writable:!0,value:function(){return t.on.apply(void 0,Array.prototype.slice.call(arguments).concat([this]))}}})})),e("@ember/-internals/runtime/lib/ext/rsvp",["exports","rsvp","@ember/runloop","@ember/-internals/error-handling","@ember/debug"],(function(e,t,r,n,i){"use strict" function o(e){var t=function(e){if(!e)return if(e.errorThrown)return function(e){var t=e.errorThrown "string"==typeof t&&(t=new Error(t)) return Object.defineProperty(t,"__reason_with_error_thrown__",{value:e,enumerable:!1}),t}(e) if("UnrecognizedURLError"===e.name)return if("TransitionAborted"===e.name)return return e}(e) if(t){var r=(0,n.getDispatchOverride)() if(!r)throw t r(t)}}Object.defineProperty(e,"__esModule",{value:!0}),e.onerrorDefault=o,e.default=void 0,t.configure("async",(function(e,t){r.backburner.schedule("actions",null,e,t)})),t.configure("after",(function(e){r.backburner.schedule(r._rsvpErrorQueue,null,e)})),t.on("error",o) var a=t e.default=a})),e("@ember/-internals/runtime/lib/is-equal",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){if(e&&"function"==typeof e.isEqual)return e.isEqual(t) if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime() return e===t}})),e("@ember/-internals/runtime/lib/mixins/-proxy",["exports","@ember/-internals/meta","@ember/-internals/metal","@ember/-internals/utils","@ember/debug","@glimmer/validator"],(function(e,t,r,n,i,o){"use strict" var a function s(e){var t=(0,r.get)(e,"content") return(0,o.updateTag)((0,r.tagForObject)(e),(0,r.tagForObject)(t)),t}Object.defineProperty(e,"__esModule",{value:!0}),e.contentFor=s,e.default=void 0 var u=r.Mixin.create(((a={content:null,init:function(){this._super.apply(this,arguments),(0,n.setProxy)(this),(0,r.tagForObject)(this)},willDestroy:function(){this.set("content",null),this._super.apply(this,arguments)},isTruthy:(0,r.computed)("content",(function(){return Boolean((0,r.get)(this,"content"))}))})[r.CUSTOM_TAG_FOR]=function(e){var t=(0,o.tagFor)(this,e) return e in this?t:(0,o.combine)([t].concat((0,r.getChainTagsForKey)(this,"content."+e)))},a.unknownProperty=function(e){var t=s(this) if(t)return(0,r.get)(t,e)},a.setUnknownProperty=function(e,n){var i=(0,t.meta)(this) if(i.isInitializing()||i.isPrototypeMeta(this))return(0,r.defineProperty)(this,e,null,n),n var o=s(this) return(0,r.set)(o,e,n)},a)) e.default=u})),e("@ember/-internals/runtime/lib/mixins/action_handler",["exports","@ember/-internals/metal","@ember/debug"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var n=t.Mixin.create({mergedProperties:["actions"],send:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;ii?r=i:r<0&&(r=i+r);e=n)&&(r=n-1),r<0&&(r+=n) for(var i=r;i>=0;i--)if((0,t.objectAt)(this,i)===e)return i return-1},c.addArrayObserver=function(e,r){return(0,t.addArrayObserver)(this,e,r)},c.removeArrayObserver=function(e,r){return(0,t.removeArrayObserver)(this,e,r)},c.hasArrayObservers=(0,t.nativeDescDecorator)({configurable:!0,enumerable:!1,get:function(){return(0,t.hasListeners)(this,"@array:change")||(0,t.hasListeners)(this,"@array:before")}}),c.arrayContentWillChange=function(e,r,n){return(0,t.arrayContentWillChange)(this,e,r,n)},c.arrayContentDidChange=function(e,r,n){return(0,t.arrayContentDidChange)(this,e,r,n)},c.forEach=function(e,t){void 0===t&&(t=null) for(var r=this.length,n=0;n1?t-1:0),i=1;i=0;){(0,t.objectAt)(this,r)===e&&this.removeAt(r)}return this},removeObjects:function(e){(0,t.beginPropertyChanges)() for(var r=e.length-1;r>=0;r--)this.removeObject(e[r]) return(0,t.endPropertyChanges)(),this},addObject:function(e){return this.includes(e)||this.pushObject(e),this},addObjects:function(e){var r=this return(0,t.beginPropertyChanges)(),e.forEach((function(e){return r.addObject(e)})),(0,t.endPropertyChanges)(),this}}) e.MutableArray=A var T=t.Mixin.create(A,s.default,{objectAt:function(e){return this[e]},replace:function(e,r,n){return void 0===n&&(n=h),(0,t.replaceInNativeArray)(this,e,r,n),this}}) e.NativeArray=T var I,O=["length"] T.keys().forEach((function(e){Array.prototype[e]&&O.push(e)})),e.NativeArray=T=(f=T).without.apply(f,O),e.A=I,a.ENV.EXTEND_PROTOTYPES.Array?(T.apply(Array.prototype),e.A=I=function(e){return e||[]}):e.A=I=function(e){return e||(e=[]),x.detect(e)?e:T.apply(e)} var C=x e.default=C})),e("@ember/-internals/runtime/lib/mixins/comparable",["exports","@ember/-internals/metal"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var r=t.Mixin.create({compare:null}) e.default=r})),e("@ember/-internals/runtime/lib/mixins/container_proxy",["exports","@ember/runloop","@ember/-internals/metal"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var n={__container__:null,ownerInjection:function(){return this.__container__.ownerInjection()},lookup:function(e,t){return this.__container__.lookup(e,t)},destroy:function(){var e=this.__container__ e&&(0,t.join)((function(){e.destroy(),(0,t.schedule)("destroy",e,"finalizeDestroy")})),this._super()},factoryFor:function(e,t){return void 0===t&&(t={}),this.__container__.factoryFor(e,t)}},i=r.Mixin.create(n) e.default=i})),e("@ember/-internals/runtime/lib/mixins/copyable",["exports","@ember/-internals/metal"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var r=t.Mixin.create({copy:null}) e.default=r})),e("@ember/-internals/runtime/lib/mixins/enumerable",["exports","@ember/-internals/metal"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var r=t.Mixin.create() e.default=r})),e("@ember/-internals/runtime/lib/mixins/evented",["exports","@ember/-internals/metal"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var r=t.Mixin.create({on:function(e,r,n){return(0,t.addListener)(this,e,r,n),this},one:function(e,r,n){return(0,t.addListener)(this,e,r,n,!0),this},trigger:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i=this._objectsDirtyIndex){var t=(0,r.get)(this,"arrangedContent") if(t)for(var n=this._objects.length=(0,r.get)(t,"length"),i=this._objectsDirtyIndex;io)&&(this._objectsDirtyIndex=o),this._lengthDirty=!0,this.arrayContentDidChange(t,n,i)},i._invalidate=function(){this._objectsDirtyIndex=0,this._lengthDirty=!0},i._revalidate=function(){!0!==this._arrangedContentIsUpdating&&(null!==this._arrangedContentTag&&(0,a.validateTag)(this._arrangedContentTag,this._arrangedContentRevision)||(null===this._arrangedContentTag?this._addArrangedContentArrayObserver():(this._arrangedContentIsUpdating=!0,this._updateArrangedContentArray(),this._arrangedContentIsUpdating=!1),this._arrangedContentTag=(0,a.combine)((0,r.getChainTagsForKey)(this,"arrangedContent")),this._arrangedContentRevision=(0,a.valueForTag)(this._arrangedContentTag)))},(0,t.createClass)(n,[{key:"length",get:function(){if(this._revalidate(),this._lengthDirty){var e=(0,r.get)(this,"arrangedContent") this._length=e?(0,r.get)(e,"length"):0,this._lengthDirty=!1}return this._length},set:function(e){var t,n=this.length-e if(0!==n){n<0&&(t=new Array(-n),n=0) var i=(0,r.get)(this,"content") i&&((0,r.replace)(i,e,n,t),this._invalidate())}}}]),n}(n.default) e.default=u,u.reopen(i.MutableArray,{arrangedContent:(0,r.alias)("content"),arrayContentDidChange:function(e,t,n){return(0,r.arrayContentDidChange)(this,e,t,n,!1)}})})),e("@ember/-internals/runtime/lib/system/core_object",["exports","ember-babel","@ember/-internals/container","@ember/-internals/owner","@ember/polyfills","@ember/-internals/utils","@ember/runloop","@ember/-internals/meta","@ember/-internals/metal","@ember/-internals/runtime/lib/mixins/action_handler","@ember/debug"],(function(e,t,r,n,i,o,a,s,u,l,c){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.setFrameworkClass=function(e){e[m]=!0},e.default=void 0 var f=u.Mixin.prototype.reopen,h=new i._WeakSet,d=new WeakMap var p=new WeakMap,m=(0,o.symbol)("FRAMEWORK_CLASS") function y(e,t){var r=(0,s.meta)(e) if(void 0!==t)for(var n=e.concatenatedProperties,a=e.mergedProperties,l=void 0!==n&&n.length>0,c=void 0!==a&&a.length>0,f=Object.keys(t),h=0;h-1&&(p=g?(0,o.makeArray)(g).concat(p):(0,o.makeArray)(p)),c&&a.indexOf(d)>-1&&(p=(0,i.assign)({},g,p))}y?m.set(e,d,p):"function"!=typeof e.setUnknownProperty||d in e?e[d]=p:e.setUnknownProperty(d,p)}e.init(t),r.unsetInitializing() var v=r.observerEvents() if(void 0!==v)for(var b=0;b"},e.extend=function(){var e=function(e){function r(){return e.apply(this,arguments)||this}return(0,t.inheritsLoose)(r,e),r}(this) return f.apply(e.PrototypeMixin,arguments),e},e.create=function(e,t){var r,i=this if(this[m]){var o,a=d.get(this) void 0!==a?o=a.owner:void 0!==e&&(o=(0,n.getOwner)(e)),r=new i(o)}else r=new i return y(r,void 0===t?e:v.apply(this,arguments)),r},e.reopen=function(){return this.willReopen(),f.apply(this.PrototypeMixin,arguments),this},e.willReopen=function(){var e=this.prototype h.has(e)&&(h.delete(e),p.has(this)&&p.set(this,u.Mixin.create(this.PrototypeMixin)))},e.reopenClass=function(){return(0,u.applyMixin)(this,arguments),this},e.detect=function(e){if("function"!=typeof e)return!1 for(;e;){if(e===this)return!0 e=e.superclass}return!1},e.detectInstance=function(e){return e instanceof this},e.metaForProperty=function(e){var t=this.proto(),r=(0,u.descriptorForProperty)(t,e) return r._meta||{}},e.eachComputedProperty=function(e,t){void 0===t&&(t=this),this.proto() var r={};(0,s.meta)(this.prototype).forEachDescriptors((function(n,i){if(i.enumerable){var o=i._meta||r e.call(t,n,o)}}))},e.proto=function(){var e=this.prototype if(!h.has(e)){h.add(e) var t=this.superclass t&&t.proto(),p.has(this)&&this.PrototypeMixin.apply(e)}return e},(0,t.createClass)(e,[{key:"isDestroyed",get:function(){return(0,s.peekMeta)(this).isSourceDestroyed()},set:function(e){}},{key:"isDestroying",get:function(){return(0,s.peekMeta)(this).isSourceDestroying()},set:function(e){}}],[{key:"PrototypeMixin",get:function(){var e=p.get(this) return void 0===e&&((e=u.Mixin.create()).ownerConstructor=this,p.set(this,e)),e}},{key:"superclass",get:function(){var e=Object.getPrototypeOf(this) return e!==Function.prototype?e:void 0}}]),e}() function v(){for(var e=this.concatenatedProperties,t=this.mergedProperties,r=void 0!==e&&e.length>0,n=void 0!==t&&t.length>0,a={},s=0;s-1){var p=a[h] d=p?(0,o.makeArray)(p).concat(d):(0,o.makeArray)(d)}if(n&&t.indexOf(h)>-1){var m=a[h] d=(0,i.assign)({},m,d)}a[h]=d}return a}g.toString=u.classToString,(0,o.setName)(g,"Ember.CoreObject"),g.isClass=!0,g.isMethod=!1 var b=g e.default=b})),e("@ember/-internals/runtime/lib/system/namespace",["exports","ember-babel","@ember/-internals/metal","@ember/-internals/utils","@ember/-internals/runtime/lib/system/object"],(function(e,t,r,n,i){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var o=function(e){function i(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(i,e) var o=i.prototype return o.init=function(){(0,r.addNamespace)(this)},o.toString=function(){var e=(0,r.get)(this,"name")||(0,r.get)(this,"modulePrefix") return e||((0,r.findNamespaces)(),void 0===(e=(0,n.getName)(this))&&(e=(0,n.guidFor)(this),(0,n.setName)(this,e)),e)},o.nameClasses=function(){(0,r.processNamespace)(this)},o.destroy=function(){(0,r.removeNamespace)(this),e.prototype.destroy.call(this)},i}(i.default) e.default=o,o.prototype.isNamespace=!0,o.NAMESPACES=r.NAMESPACES,o.NAMESPACES_BY_ID=r.NAMESPACES_BY_ID,o.processAll=r.processAllNamespaces,o.byName=r.findNamespace})),e("@ember/-internals/runtime/lib/system/object",["exports","ember-babel","@ember/-internals/container","@ember/-internals/owner","@ember/-internals/utils","@ember/-internals/metal","@ember/-internals/runtime/lib/system/core_object","@ember/-internals/runtime/lib/mixins/observable","@ember/debug"],(function(e,t,r,n,i,o,a,s,u){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.FrameworkObject=e.default=void 0 var l,c=new WeakMap,f=function(e){function i(){return e.apply(this,arguments)||this}return(0,t.inheritsLoose)(i,e),(0,t.createClass)(i,[{key:"_debugContainerKey",get:function(){var e=r.FACTORY_FOR.get(this) return void 0!==e&&e.fullName}},{key:n.OWNER,get:function(){var e=c.get(this) if(void 0!==e)return e var t=r.FACTORY_FOR.get(this) return void 0!==t&&t.owner},set:function(e){c.set(this,e)}}]),i}(a.default) e.default=f,(0,i.setName)(f,"Ember.Object"),s.default.apply(f.prototype),e.FrameworkObject=l,e.FrameworkObject=l=function(e){function i(r){var i return i=e.call(this)||this,(0,n.setOwner)((0,t.assertThisInitialized)(i),r),i}return(0,t.inheritsLoose)(i,e),(0,t.createClass)(i,[{key:"_debugContainerKey",get:function(){var e=r.FACTORY_FOR.get(this) return void 0!==e&&e.fullName}}]),i}(a.default),s.default.apply(l.prototype)})) e("@ember/-internals/runtime/lib/system/object_proxy",["exports","ember-babel","@ember/-internals/runtime/lib/system/object","@ember/-internals/runtime/lib/mixins/-proxy"],(function(e,t,r,n){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var i=function(e){function r(){return e.apply(this,arguments)||this}return(0,t.inheritsLoose)(r,e),r}(r.default) e.default=i,i.PrototypeMixin.reopen(n.default)})),e("@ember/-internals/runtime/lib/type-of",["exports","@ember/-internals/runtime/lib/system/core_object"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.typeOf=function(e){if(null===e)return"null" if(void 0===e)return"undefined" var i=r[n.call(e)]||"object" "function"===i?t.default.detect(e)&&(i="class"):"object"===i&&(e instanceof Error?i="error":e instanceof t.default?i="instance":e instanceof Date&&(i="date")) return i} var r={"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object AsyncFunction]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regexp","[object Object]":"object","[object FileList]":"filelist"},n=Object.prototype.toString})),e("@ember/-internals/utils/index",["exports","@ember/polyfills","@ember/debug"],(function(e,t,r){"use strict" function n(e){var t={} for(var r in t[e]=1,t)if(r===e)return r return e}function i(e){return null!==e&&("object"==typeof e||"function"==typeof e)}Object.defineProperty(e,"__esModule",{value:!0}),e.symbol=h,e.isInternalSymbol=function(e){return-1!==f.indexOf(e)},e.dictionary=function(e){var t=Object.create(e) return t._dict=null,delete t._dict,t},e.uuid=a,e.generateGuid=function(e,t){void 0===t&&(t="ember") var r=t+a() i(e)&&s.set(e,r) return r},e.guidFor=function(e){var t if(i(e))void 0===(t=s.get(e))&&(t="ember"+a(),s.set(e,t)) else if(void 0===(t=u.get(e))){var r=typeof e t="string"===r?"st"+a():"number"===r?"nu"+a():"symbol"===r?"sy"+a():"("+e+")",u.set(e,t)}return t},e.intern=n,e.wrap=function(e,t){if(!w(e))return e if(!A.has(t)&&w(t))return T(e,T(t,b)) return T(e,t)},e.getObservers=E,e.getListeners=x,e.setObservers=S,e.setListeners=M,e.inspect=function(e){if("number"==typeof e&&2===arguments.length)return this return D(e,0)},e.lookupDescriptor=L,e.canInvoke=j,e.tryInvoke=function(e,t,r){if(j(e,t)){return e[t].apply(e,r)}},e.makeArray=function(e){if(null==e)return[] return U(e)?e:[e]},e.getName=function(e){return F.get(e)},e.setName=function(e,t){i(e)&&F.set(e,t)},e.toString=function e(t){if("string"==typeof t)return t if(null===t)return"null" if(void 0===t)return"undefined" if(Array.isArray(t)){for(var r="",n=0;n0&&(r+=","),H(t[n])||(r+=e(t[n])) return r}if("function"==typeof t.toString)return t.toString() return z.call(t)},e.isObject=i,e.isProxy=function(e){if(i(e))return q.has(e) return!1},e.setProxy=function(e){i(e)&&q.add(e)},e.isEmberArray=function(e){return e&&e[J]},e.setWithMandatorySetter=e.teardownMandatorySetter=e.setupMandatorySetter=e.EMBER_ARRAY=e.Cache=e.HAS_NATIVE_PROXY=e.HAS_NATIVE_SYMBOL=e.ROOT=e.checkHasSuper=e.GUID_KEY=e.getOwnPropertyDescriptors=e.getDebugName=void 0 var o=0 function a(){return++o}var s=new WeakMap,u=new Map,l=n("__ember"+Date.now()) e.GUID_KEY=l var c,f=[] function h(e){var t=n("__"+e+(l+Math.floor(Math.random()*Date.now()))+"__") return f.push(t),t}var d=c e.getDebugName=d var p=void 0!==Object.getOwnPropertyDescriptors?Object.getOwnPropertyDescriptors:function(e){var t={} return Object.keys(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t} e.getOwnPropertyDescriptors=p var m=/\.(_super|call\(this|apply\(this)/,y=Function.prototype.toString,g=y.call((function(){return this})).indexOf("return this")>-1?function(e){return m.test(y.call(e))}:function(){return!0} e.checkHasSuper=g var v=new WeakMap,b=Object.freeze((function(){})) function w(e){var t=v.get(e) return void 0===t&&(t=g(e),v.set(e,t)),t}e.ROOT=b,v.set(b,!1) var _=new WeakMap function S(e,t){_.set(e,t)}function E(e){return _.get(e)}var k=new WeakMap function M(e,t){t&&k.set(e,t)}function x(e){return k.get(e)}var A=new t._WeakSet function T(e,t){function r(){var r=this._super this._super=t var n=e.apply(this,arguments) return this._super=r,n}return A.add(r),S(r,E(e)),M(r,x(e)),r}var I=Object.prototype.toString,O=Function.prototype.toString,C=Array.isArray,R=Object.keys,P=JSON.stringify,N=/^[\w$]+$/ function D(e,r,n){var i=!1 switch(typeof e){case"undefined":return"undefined" case"object":if(null===e)return"null" if(C(e)){i=!0 break}if(e.toString===I||void 0===e.toString)break return e.toString() case"function":return e.toString===O?e.name?"[Function:"+e.name+"]":"[Function]":e.toString() case"string":return P(e) case"symbol":case"boolean":case"number":default:return e.toString()}if(void 0===n)n=new t._WeakSet else if(n.has(e))return"[Circular]" return n.add(e),i?function(e,t,r){if(t>4)return"[Array]" for(var n="[",i=0;i=100){n+="... "+(e.length-100)+" more items" break}n+=D(e[i],t,r)}return n+=" ]"}(e,r+1,n):function(e,t,r){if(t>4)return"[Object]" for(var n="{",i=R(e),o=0;o=100){n+="... "+(i.length-100)+" more keys" break}var a=i[o] n+=B(a)+": "+D(e[a],t,r)}return n+=" }"}(e,r+1,n)}function B(e){return N.test(e)?e:P(e)}function L(e,t){var r=e do{var n=Object.getOwnPropertyDescriptor(r,t) if(void 0!==n)return n r=Object.getPrototypeOf(r)}while(null!==r) return null}function j(e,t){return null!=e&&"function"==typeof e[t]}var U=Array.isArray var F=new WeakMap var z=Object.prototype.toString function H(e){return null==e}var V="function"==typeof Symbol&&"symbol"==typeof Symbol() e.HAS_NATIVE_SYMBOL=V var K="function"==typeof Proxy e.HAS_NATIVE_PROXY=K var q=new t._WeakSet var G=function(){function e(e,t,r){this.limit=e,this.func=t,this.store=r,this.size=0,this.misses=0,this.hits=0,this.store=r||new Map}var t=e.prototype return t.get=function(e){return this.store.has(e)?(this.hits++,this.store.get(e)):(this.misses++,this.set(e,this.func(e)))},t.set=function(e,t){return this.limit>this.size&&(this.size++,this.store.set(e,t)),t},t.purge=function(){this.store.clear(),this.size=0,this.hits=0,this.misses=0},e}() e.Cache=G var W,Y,Z,J=h("EMBER_ARRAY") e.EMBER_ARRAY=J,e.setupMandatorySetter=W,e.teardownMandatorySetter=Y,e.setWithMandatorySetter=Z})),e("@ember/-internals/views/index",["exports","@ember/-internals/views/lib/system/jquery","@ember/-internals/views/lib/system/utils","@ember/-internals/views/lib/system/event_dispatcher","@ember/-internals/views/lib/component_lookup","@ember/-internals/views/lib/mixins/text_support","@ember/-internals/views/lib/views/core_view","@ember/-internals/views/lib/mixins/class_names_support","@ember/-internals/views/lib/mixins/child_views_support","@ember/-internals/views/lib/mixins/view_state_support","@ember/-internals/views/lib/mixins/view_support","@ember/-internals/views/lib/mixins/action_support","@ember/-internals/views/lib/compat/attrs","@ember/-internals/views/lib/system/action_manager"],(function(e,t,r,n,i,o,a,s,u,l,c,f,h,d){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"jQuery",{enumerable:!0,get:function(){return t.jQuery}}),Object.defineProperty(e,"jQueryDisabled",{enumerable:!0,get:function(){return t.jQueryDisabled}}),Object.defineProperty(e,"addChildView",{enumerable:!0,get:function(){return r.addChildView}}),Object.defineProperty(e,"isSimpleClick",{enumerable:!0,get:function(){return r.isSimpleClick}}),Object.defineProperty(e,"getViewBounds",{enumerable:!0,get:function(){return r.getViewBounds}}),Object.defineProperty(e,"getViewClientRects",{enumerable:!0,get:function(){return r.getViewClientRects}}),Object.defineProperty(e,"getViewBoundingClientRect",{enumerable:!0,get:function(){return r.getViewBoundingClientRect}}),Object.defineProperty(e,"getRootViews",{enumerable:!0,get:function(){return r.getRootViews}}),Object.defineProperty(e,"getChildViews",{enumerable:!0,get:function(){return r.getChildViews}}),Object.defineProperty(e,"getViewId",{enumerable:!0,get:function(){return r.getViewId}}),Object.defineProperty(e,"getElementView",{enumerable:!0,get:function(){return r.getElementView}}),Object.defineProperty(e,"getViewElement",{enumerable:!0,get:function(){return r.getViewElement}}),Object.defineProperty(e,"setElementView",{enumerable:!0,get:function(){return r.setElementView}}),Object.defineProperty(e,"setViewElement",{enumerable:!0,get:function(){return r.setViewElement}}),Object.defineProperty(e,"clearElementView",{enumerable:!0,get:function(){return r.clearElementView}}),Object.defineProperty(e,"clearViewElement",{enumerable:!0,get:function(){return r.clearViewElement}}),Object.defineProperty(e,"constructStyleDeprecationMessage",{enumerable:!0,get:function(){return r.constructStyleDeprecationMessage}}),Object.defineProperty(e,"EventDispatcher",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"ComponentLookup",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"TextSupport",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"CoreView",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"ClassNamesSupport",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"ChildViewsSupport",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"ViewStateSupport",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"ViewMixin",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"ActionSupport",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"MUTABLE_CELL",{enumerable:!0,get:function(){return h.MUTABLE_CELL}}),Object.defineProperty(e,"ActionManager",{enumerable:!0,get:function(){return d.default}})})),e("@ember/-internals/views/lib/compat/attrs",["exports","@ember/-internals/utils"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.MUTABLE_CELL=void 0 var r=(0,t.symbol)("MUTABLE_CELL") e.MUTABLE_CELL=r})),e("@ember/-internals/views/lib/compat/fallback-view-registry",["exports","@ember/-internals/utils"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var r=(0,t.dictionary)(null) e.default=r})),e("@ember/-internals/views/lib/component_lookup",["exports","@ember/-internals/runtime"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var r=t.Object.extend({componentFor:function(e,t,r){var n="component:"+e return t.factoryFor(n,r)},layoutFor:function(e,t,r){var n="template:components/"+e return t.lookup(n,r)}}) e.default=r})),e("@ember/-internals/views/lib/mixins/action_support",["exports","@ember/-internals/utils","@ember/-internals/metal","@ember/debug","@ember/-internals/views/lib/compat/attrs","@ember/deprecated-features"],(function(e,t,r,n,i,o){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var a={send:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i1?n-1:0),o=1;o1 return!t&&!r},e.constructStyleDeprecationMessage=function(e){return'Binding style attributes may introduce cross-site scripting vulnerabilities; please ensure that values being bound are properly escaped. For more information, including how to disable this warning, see https://emberjs.com/deprecations/v1.x/#toc_binding-style-attributes. Style affected: "'+e+'"'},e.getRootViews=function(e){var t=e.lookup("-view-registry:main"),r=[] return Object.keys(t).forEach((function(e){var n=t[e] null===n.parentView&&r.push(n)})),r},e.getViewId=i,e.getElementView=function(e){return o.get(e)||null},e.getViewElement=function(e){return a.get(e)||null},e.setElementView=function(e,t){o.set(e,t)},e.setViewElement=function(e,t){a.set(e,t)},e.clearElementView=function(e){o.delete(e)},e.clearViewElement=function(e){a.delete(e)},e.getChildViews=function(e){var r=(0,t.getOwner)(e).lookup("-view-registry:main") return l(e,r)},e.initChildViews=u,e.addChildView=function(e,t){var r=s.get(e) void 0===r&&(r=u(e)) r.add(i(t))},e.collectChildViews=l,e.getViewBounds=c,e.getViewRange=f,e.getViewClientRects=function(e){return f(e).getClientRects()},e.getViewBoundingClientRect=function(e){return f(e).getBoundingClientRect()},e.matches=function(e,t){return h.call(e,t)},e.contains=function(e,t){if(void 0!==e.contains)return e.contains(t) var r=t.parentNode for(;r&&(r=r.parentNode);)if(r===e)return!0 return!1},e.elMatches=void 0 var o=new WeakMap,a=new WeakMap var s=new WeakMap function u(e){var t=new Set return s.set(e,t),t}function l(e,t){var r=[],n=s.get(e) return void 0!==n&&n.forEach((function(e){var n=t[e] !n||n.isDestroying||n.isDestroyed||r.push(n)})),r}function c(e){return e.renderer.getBounds(e)}function f(e){var t=c(e),r=document.createRange() return r.setStartBefore(t.firstNode),r.setEndAfter(t.lastNode),r}var h="undefined"!=typeof Element?Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector:void 0 e.elMatches=h})),e("@ember/-internals/views/lib/views/core_view",["exports","@ember/-internals/runtime","@ember/-internals/views/lib/views/states"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var n=t.FrameworkObject.extend(t.Evented,t.ActionHandler,{isView:!0,_states:r.default,init:function(){if(this._super.apply(this,arguments),this._state="preRender",this._currentState=this._states.preRender,!this.renderer)throw new Error("Cannot instantiate a component without a renderer. Please ensure that you are creating "+this+" with a proper container/registry.")},parentView:null,instrumentDetails:function(e){return e.object=this.toString(),e.containerKey=this._debugContainerKey,e.view=this,e},trigger:function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;nr}))},e.gte=function(e,r){return(0,t.computed)(e,(function(){return(0,t.get)(this,e)>=r}))},e.lt=function(e,r){return(0,t.computed)(e,(function(){return(0,t.get)(this,e)2)&&(r=Array.prototype.slice.call(arguments,1)),w(e=(0,t.getString)(e)||e,r)}function S(e){return e.split(/\s+/)}function E(e){return b.get(e)}function k(e){return o.get(e)}function M(e){return u.get(e)}function x(e){return h.get(e)}function A(e){return m.get(e)}function T(e){return g.get(e)}r.ENV.EXTEND_PROTOTYPES.String&&Object.defineProperties(String.prototype,{w:{configurable:!0,enumerable:!1,writeable:!0,value:function(){return S(this)}},loc:{configurable:!0,enumerable:!1,writeable:!0,value:function(){for(var e=arguments.length,t=new Array(e),r=0;r255)throw new Error("Opcode type over 8-bits. Got "+e+".") var r=e|t|arguments.length-2<<8 this.buffer.push(r) for(var n=2;n2147483647)throw new Error("Operand over 32-bits. Got "+i+".") this.buffer.push(i)}this.size=this.buffer.length},t.patch=function(e,t){if(-1!==this.buffer[e+1])throw new Error("Trying to patch operand in populated slot instead of a reserved slot.") this.buffer[e+1]=t},e}() e.InstructionEncoderImpl=t})),e("@glimmer/env",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.CI=e.DEBUG=void 0 e.DEBUG=!1 e.CI=!1})),e("@glimmer/low-level",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.Stack=e.Storage=void 0 var t=function(){function e(){this.array=[],this.next=0}var t=e.prototype return t.add=function(e){var t=this.next,r=this.array if(t===r.length)this.next++ else{var n=r[t] this.next=n}return this.array[t]=e,t},t.deref=function(e){return this.array[e]},t.drop=function(e){this.array[e]=this.next,this.next=e},e}() e.Storage=t var r=function(){function e(e){void 0===e&&(e=[]),this.vec=e}var t=e.prototype return t.clone=function(){return new e(this.vec.slice())},t.sliceFrom=function(t){return new e(this.vec.slice(t))},t.slice=function(t,r){return new e(this.vec.slice(t,r))},t.copy=function(e,t){this.vec[t]=this.vec[e]},t.writeRaw=function(e,t){this.vec[e]=t},t.getRaw=function(e){return this.vec[e]},t.reset=function(){this.vec.length=0},t.len=function(){return this.vec.length},e}() e.Stack=r})),e("@glimmer/node",["exports","ember-babel","@glimmer/runtime","@simple-dom/document"],(function(e,t,r,n){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.serializeBuilder=function(e,t){return a.forInitialRender(e,t)},e.NodeDOMTreeConstruction=void 0 var i=function(e){function i(t){return e.call(this,t||(0,n.default)())||this}(0,t.inheritsLoose)(i,e) var o=i.prototype return o.setupUselessElement=function(){},o.insertHTMLBefore=function(e,t,n){var i=this.document.createRawHTMLSection(n) return e.insertBefore(i,t),new r.ConcreteBounds(e,i,i)},o.createElement=function(e){return this.document.createElement(e)},o.setAttribute=function(e,t,r){e.setAttribute(t,r)},i}(r.DOMTreeConstruction) e.NodeDOMTreeConstruction=i var o=new WeakMap var a=function(e){function n(){var t return(t=e.apply(this,arguments)||this).serializeBlockDepth=0,t}(0,t.inheritsLoose)(n,e) var i=n.prototype return i.__openBlock=function(){var t=this.element.tagName if("TITLE"!==t&&"SCRIPT"!==t&&"STYLE"!==t){var r=this.serializeBlockDepth++ this.__appendComment("%+b:"+r+"%")}e.prototype.__openBlock.call(this)},i.__closeBlock=function(){var t=this.element.tagName if(e.prototype.__closeBlock.call(this),"TITLE"!==t&&"SCRIPT"!==t&&"STYLE"!==t){var r=--this.serializeBlockDepth this.__appendComment("%-b:"+r+"%")}},i.__appendHTML=function(t){var n=this.element.tagName if("TITLE"===n||"SCRIPT"===n||"STYLE"===n)return e.prototype.__appendHTML.call(this,t) var i=this.__appendComment("%glmr%") if("TABLE"===n){var o=t.indexOf("<") if(o>-1)"tr"===t.slice(o+1,o+3)&&(t=""+t+"")}""===t?this.__appendComment("% %"):e.prototype.__appendHTML.call(this,t) var a=this.__appendComment("%glmr%") return new r.ConcreteBounds(this.element,i,a)},i.__appendText=function(t){var r,n,i,o=this.element.tagName,a=(n=(r=this).element,null===(i=r.nextSibling)?n.lastChild:i.previousSibling) return"TITLE"===o||"SCRIPT"===o||"STYLE"===o?e.prototype.__appendText.call(this,t):""===t?this.__appendComment("% %"):(a&&3===a.nodeType&&this.__appendComment("%|%"),e.prototype.__appendText.call(this,t))},i.closeElement=function(){return o.has(this.element)&&(o.delete(this.element),e.prototype.closeElement.call(this)),e.prototype.closeElement.call(this)},i.openElement=function(t){return"tr"===t&&"TBODY"!==this.element.tagName&&"THEAD"!==this.element.tagName&&"TFOOT"!==this.element.tagName&&(this.openElement("tbody"),o.set(this.constructing,!0),this.flushElement(null)),e.prototype.openElement.call(this,t)},i.pushRemoteElement=function(t,r,n){void 0===n&&(n=null) var i=this.dom,o=i.createElement("script") return o.setAttribute("glmr",r),i.insertBefore(t,o,n),e.prototype.pushRemoteElement.call(this,t,r,n)},n}(r.NewElementBuilder)})),e("@glimmer/opcode-compiler",["exports","ember-babel","@glimmer/vm","@glimmer/util","@glimmer/program","@glimmer/encoder"],(function(e,t,r,n,i,o){"use strict" function a(e){return{type:"array",value:e}}function s(e){return{type:"string-array",value:e}}function u(e){return{type:"template-meta",value:e}}function l(e){return{type:"other",value:e}}function c(e){return{type:"label",value:e}}function f(e,t){return{type:"primitive",value:{primitive:e,type:t}}}Object.defineProperty(e,"__esModule",{value:!0}),e.compileStatements=X,e.compilable=Q,e.staticComponent=function(e,t){var r=t[0],n=t[1],i=t[2] if(null===e)return N var o=e.compilable,a=e.capabilities,s=e.handle return o?[le(80,s),me({capabilities:a||h,layout:o,attrs:null,params:r,hash:n,blocks:i})]:[le(80,s),ge({capabilities:a||h,attrs:null,params:r,hash:n,atNames:!0,blocks:i})]},e.invokeStaticBlockWithStack=S,e.invokeStaticBlock=_,e.compileStd=Ee,e.meta=he,e.templateFactory=Ce,e.Component=function(e,t){var r=Ce(JSON.parse(e)) return(0,n.unwrapTemplate)(r.create(t)).asLayout()},e.resolveLayoutForTag=p,e.syntaxCompilationContext=function(e,t){return{program:e,macros:t}},e.Context=function(e,t,r){void 0===e&&(e={}) void 0===t&&(t="aot") void 0===r&&(r=new z) return{program:new xe(new d(e),t),macros:r}},e.JitContext=function(e,t){void 0===e&&(e={}) void 0===t&&(t=new z) return{program:new Ae(new d(e)),macros:t}},e.AotContext=function(e,t){void 0===e&&(e={}) void 0===t&&(t=new z) return{program:new xe(new d(e),"aot"),macros:t}},e.templateCompilationContext=K,e.DefaultCompileTimeResolverDelegate=e.MINIMAL_CAPABILITIES=e.DEFAULT_CAPABILITIES=e.JitProgramCompilationContext=e.ProgramCompilationContext=e.EMPTY_BLOCKS=e.WrappedBuilder=e.PartialDefinitionImpl=e.StdLib=e.debugCompiler=e.NONE=e.UNHANDLED=e.MacrosImpl=void 0 e.DEFAULT_CAPABILITIES={dynamicLayout:!0,dynamicTag:!0,prepareArgs:!0,createArgs:!0,attributeHook:!1,elementHook:!1,dynamicScope:!0,createCaller:!1,updateHook:!0,createInstance:!0,wrapped:!1,willDestroy:!1} var h={dynamicLayout:!1,dynamicTag:!1,prepareArgs:!1,createArgs:!1,attributeHook:!1,elementHook:!1,dynamicScope:!1,createCaller:!1,updateHook:!1,createInstance:!1,wrapped:!1,willDestroy:!1} e.MINIMAL_CAPABILITIES=h var d=function(){function e(e){this.inner=e}var t=e.prototype return t.lookupHelper=function(e,t){if(this.inner.lookupHelper){var r=this.inner.lookupHelper(e,t) if(void 0===r)throw new Error("Unexpected helper ("+e+" from "+JSON.stringify(t)+") (lookupHelper returned undefined)") return r}throw new Error("Can't compile global helper invocations without an implementation of lookupHelper")},t.lookupModifier=function(e,t){if(this.inner.lookupModifier){var r=this.inner.lookupModifier(e,t) if(void 0===r)throw new Error("Unexpected modifier ("+e+" from "+JSON.stringify(t)+") (lookupModifier returned undefined)") return r}throw new Error("Can't compile global modifier invocations without an implementation of lookupModifier")},t.lookupComponent=function(e,t){if(this.inner.lookupComponent){var r=this.inner.lookupComponent(e,t) if(void 0===r)throw new Error("Unexpected component ("+e+" from "+JSON.stringify(t)+") (lookupComponent returned undefined)") return r}throw new Error("Can't compile global component invocations without an implementation of lookupComponent")},t.lookupPartial=function(e,t){if(this.inner.lookupPartial){var r=this.inner.lookupPartial(e,t) if(void 0===r)throw new Error("Unexpected partial ("+e+" from "+JSON.stringify(t)+") (lookupPartial returned undefined)") return r}throw new Error("Can't compile global partial invocations without an implementation of lookupPartial")},t.resolve=function(e){if(this.inner.resolve)return this.inner.resolve(e) throw new Error("Compile-time debugging requires an implementation of resolve")},e}() function p(e,t){var r=t.resolver,n=t.meta.referrer,i=r.lookupComponent(e,n) return null===i?i:{handle:i.handle,compilable:i.compilable,capabilities:i.capabilities||h}}function m(e){return[y(e),le(31)]}function y(e){var t switch(typeof e){case"number":t=(0,n.isSmallInt)(e)?f(e,0):f(e,2) break case"string":t=f(e,1) break case"boolean":case"object":case"undefined":t=f(e,0) break default:throw new Error("Invalid primitive passed to pushPrimitive")}return le(30,t)}function g(e){var t=e.handle,n=e.params,i=e.hash return[le(0),le("SimpleArgs",{params:n,hash:i,atNames:!1}),le(16,t),le(1),le(36,r.$v0)]}function v(e,t){return[le(59),le(58,s(e)),t(),le(60)]}function b(e,t){return[le("SimpleArgs",{params:t,hash:null,atNames:!0}),le(24,e),le(25),le("Option",le("JitCompileBlock")),le(64),le(40),le(1)]}function w(e){return[E(e&&e.symbolTable),le(62),le("PushCompilable",e)]}function _(e){return[le(0),le("PushCompilable",e),le("JitCompileBlock"),le(2),le(1)]}function S(e,t){var n=e.symbolTable.parameters,i=n.length,o=Math.min(t,i) if(0===o)return _(e) var a=[] if(a.push(le(0)),o){a.push(le(39)) for(var s=0;s=0;u--){var l=r[u] o.push(le("Label",l.label),le(34,2),l.callback()),0!==u&&o.push(le(4,c("END")))}return o.push(le("Label","END"),le("StopLabels"),le(70)),o}function M(e){var t=e.args,r=e.body,n=t(),i=n.count,o=n.actions return[le("StartLabels"),le(0),le(6,c("ENDINITIAL")),o,le(69,i),r(),le("Label","FINALLY"),le(70),le(5),le("Label","ENDINITIAL"),le(1),le("StopLabels")]}function x(e){var t=e.args,r=e.ifTrue,n=e.ifFalse return M({args:t,body:function(){var e=[le(66,c("ELSE")),r(),le(4,c("FINALLY")),le("Label","ELSE")] return n&&e.push(n()),e}})}function A(e,t){var r=e.encoder,i=e.syntax.program,o=i.mode,a=i.constants switch(t.op){case"Option":return j(e,function(e){var t=e.op1 return null===t?N:t}(t)) case"Label":return r.label(t.op1) case"StartLabels":return r.startLabels() case"StopLabels":return r.stopLabels() case"JitCompileBlock":return j(e,function(e){return"jit"===e?le(61):N}(o)) case"GetComponentLayout":return r.push(a,function(e){return"aot"===e?94:95}(o),t.op1) case"SetBlock":return r.push(a,function(e){return"aot"===e?20:21}(o),t.op1) default:return(0,n.exhausted)(t)}}function T(e,t){F(e,function(e,t){switch(t.op){case"CompileBlock":return function(e,t){return function(e,t){var r=e[1],n=e[2],i=e[3],o=ne(e[4],t.meta),a=ie(r,t.meta,"Expected block head to be a string") if("string"!=typeof a)return a return t.syntax.macros.blocks.compile(a,n||[],i,o,t)}(t.op1,e)}(e,t) case"CompileInline":return function(e,t){var r=t.op1,n=r.inline,i=r.ifUnhandled,o=function(e,t){return t.syntax.macros.inlines.compile(e,t)}(n,e) return L(o)?o:i(n)}(e,t) case"InvokeStatic":return function(e,t){var r=t.op1 if("aot"===e.program.mode){var n=r.compile(e) return"number"!=typeof n?le("Error",{problem:"Invalid block",start:0,end:0}):le(3,n===J?function(){return r.compile(e)}:n)}return[le(29,l(t.op1)),le(61),le(2)]}(e.syntax,t) case"Args":return function(e){for(var t=e.params,r=e.hash,i=e.blocks,o=e.atNames,a=[],u=i.names,l=0;l0?ee(i,e.meta):null,c=Array.isArray(s)||null===s?ne(s,e.meta):s return ye(e.meta,{definition:n,attrs:l,params:o,hash:a,atNames:u,blocks:c})}(e,t) case"IfResolvedComponent":return function(e,t){var r=t.op1,n=r.name,i=r.attrs,o=r.blocks,a=r.staticTemplate,s=r.dynamicTemplate,u=r.orElse,l=p(n,{resolver:e.syntax.program.resolverDelegate,meta:e.meta}),c=e.meta if(null!==l){var f=l.handle,h=l.capabilities,d=l.compilable,m=ee(i,c),y=ne(o,c) return null!==d?a(f,h,d,{attrs:m,blocks:y}):s(f,h,{attrs:m,blocks:y})}if(u)return u() throw new Error("Compile Error: Cannot find component "+n)}(e,t) default:return(0,n.exhausted)(t)}}(e,t))}function I(e,t,r){void 0!==r.op3?e.push(t,r.op,r.op1,r.op2,r.op3):void 0!==r.op2?e.push(t,r.op,r.op1,r.op2):void 0!==r.op1?e.push(t,r.op,r.op1):e.push(t,r.op)}e.DefaultCompileTimeResolverDelegate=d var O=function(){function e(){this.names={},this.funcs=[]}var t=e.prototype return t.add=function(e,t){this.names[e]=this.funcs.push(t)-1},t.compile=function(e,t){var r=e[0],n=this.names[r] return(0,this.funcs[n])(e,t)},e}(),C=new O function R(e,t){if(void 0===t||0===t.length)return e Array.isArray(e)||(e=[e]) for(var r=0;r=34){var r=e[1] return!(!t.upvars||"component"!==t.upvars[r])}var n return!1}(n,t))return i&&0!==i.length?function(e,t){var n=e.definition,i=e.params,o=e.hash,a=e.atNames return[le(0),le("SimpleArgs",{params:i,hash:o,atNames:a}),le(88),le("Expr",n),le(79,u(t)),le(1),le(36,r.$v0)]}({definition:i[0],params:i.slice(1),hash:o,atNames:!1},t.referrer):le("Error",{problem:"component helper requires at least one argument",start:0,end:0}) var a=ie(n,t,"Expected call head to be a string") return"string"!=typeof a?a:le("IfResolved",{kind:"Helper",name:a,andThen:function(e){return g({handle:e,params:i,hash:o})},span:{start:0,end:0}})})),C.add(32,(function(e){var t=e[1],r=e[2] return R(le(22,t),r)})),C.add(33,(function(e){var t=e[1],r=e[2] return R(le("ResolveFree",t),r)})),C.add(34,(function(e){var t=e[1],r=e[2] return R(le("ResolveContextualFree",{freeVar:t,context:0}),r)})),C.add(35,(function(e){var t=e[1],r=e[2] return R(le("ResolveContextualFree",{freeVar:t,context:1}),r)})),C.add(36,(function(e){var t=e[1],r=e[2] return R(le("ResolveContextualFree",{freeVar:t,context:2}),r)})),C.add(37,(function(e){var t=e[1],r=e[2] return R(le("ResolveContextualFree",{freeVar:t,context:3}),r)})),C.add(38,(function(e){var t=e[1],r=e[2] return R(le("ResolveContextualFree",{freeVar:t,context:4}),r)})),C.add(39,(function(e){var t=e[1],r=e[2] return R(le("ResolveContextualFree",{freeVar:t,context:5}),r)})),C.add(29,(function(){return m(void 0)})),C.add(27,(function(e){return[le("Expr",e[1]),le(26)]})),C.add(28,(function(e){return[le("Expr",e[1]),le(25),le("JitCompileBlock"),le(27)]})) var N={"no-action":!0} e.NONE=N var D={"not-handled":!0} function B(e){return e&&!!e["no-action"]}function L(e){return!e||!e["not-handled"]}function j(e,r){if(!B(r))if(Array.isArray(r))for(var n,i=(0,t.createForOfIteratorHelperLoose)(r);!(n=i()).done;){j(e,n.value)}else"Simple"===r.type?A(e,r):I(e.encoder,e.syntax.program.constants,r)}function U(e,r,i,o){if(!B(i))if(Array.isArray(i))for(var a,s=(0,t.createForOfIteratorHelperLoose)(i);!(a=s()).done;){U(e,r,a.value,o)}else if("Number"===i.type)I(e,o,i) else if("Resolution"===i.type)P(e,r,i,o) else if("Simple"===i.type)A(r,i) else{if("Error"!==i.type)throw(0,n.assertNever)(i,"unexpected action kind") e.error({problem:i.op1.problem,span:{start:i.op1.start,end:i.op1.end}})}}function F(e,r){if(!B(r))if(Array.isArray(r))for(var i,o=(0,t.createForOfIteratorHelperLoose)(r);!(i=o()).done;){F(e,i.value)}else if("Number"===r.type)I(e.encoder,e.syntax.program.constants,r) else if("Compile"===r.type)T(e,r) else if("Resolution"===r.type)P(e.encoder,e,r,e.syntax.program.constants) else if("Simple"===r.type)A(e,r) else if("Error"!==r.type)throw(0,n.assertNever)(r,"unexpected action type")}e.UNHANDLED=D var z=function(){var e=function(e,t){return e.add("if",(function(e,t,r){if(!e||1!==e.length)throw new Error("SYNTAX ERROR: #if requires a single argument") return x({args:function(){return{count:1,actions:[le("Expr",e[0]),le(71)]}},ifTrue:function(){return _(r.get("default"))},ifFalse:function(){return r.has("else")?_(r.get("else")):N}})})),e.add("unless",(function(e,t,r){if(!e||1!==e.length)throw new Error("SYNTAX ERROR: #unless requires a single argument") return x({args:function(){return{count:1,actions:[le("Expr",e[0]),le(71)]}},ifTrue:function(){return r.has("else")?_(r.get("else")):N},ifFalse:function(){return _(r.get("default"))}})})),e.add("with",(function(e,t,n){if(!e||1!==e.length)throw new Error("SYNTAX ERROR: #with requires a single argument") return x({args:function(){return{count:2,actions:[le("Expr",e[0]),le(33,r.$sp,0),le(71)]}},ifTrue:function(){return S(n.get("default"),1)},ifFalse:function(){return n.has("else")?_(n.get("else")):N}})})),e.add("let",(function(e,t,r){if(!e)return ue("let requires arguments",0,0) var n=fe(e),i=n.count return[n.actions,S(r.get("default"),i)]})),e.add("each",(function(e,t,n){return M({args:function(){var r return(r=t&&"key"===t[0][0]?[le("Expr",t[1][0])]:[m(null)]).push(le("Expr",e[0])),{count:2,actions:r}},body:function(){var e=[le(74),le(66,c("ELSE")),le(0),le(33,r.$fp,1),le(6,c("ITER")),le(72,c("BODY")),le("Label","ITER"),le(75,c("BREAK")),le("Label","BODY"),S(n.get("default"),2),le(34,2),le(4,c("FINALLY")),le("Label","BREAK"),le(73),le(1),le(4,c("FINALLY")),le("Label","ELSE")] return n.has("else")&&e.push(_(n.get("else"))),e}})})),e.add("in-element",(function(e,t,n){if(!e||1!==e.length)throw new Error("SYNTAX ERROR: #in-element requires a single argument") return x({args:function(){for(var n=t[0],i=t[1],o=[],a=0;a0?null:function(e){return e[0]>=33}(e)?t.upvars[e[1]]:null}function ae(e){return e.length>=2&&e[0]>=32}e.EMPTY_BLOCKS=re,e.debugCompiler=void 0 var se=function(){function e(){this.labels=(0,n.dict)(),this.targets=[]}var t=e.prototype return t.label=function(e,t){this.labels[e]=t},t.target=function(e,t){this.targets.push({at:e,target:t})},t.patch=function(e){for(var t=this.targets,r=this.labels,n=0;n2?i-2:0),a=2;a0?1:0)) for(var b=f.length-1;b>=0;b--){var _=f[b],S=_.symbol _.isBlock?l.push(le("SetBlock",S)):l.push(le(19,S))}return l.push(le("InvokeStatic",n)),t.createInstance&&l.push(le(103,r.$s0)),l.push(le(1),le(40)),t.dynamicScope&&l.push(le(60)),l.push(le(101),le(35,r.$s0)),l}function ye(e,t){var n=t.definition,i=t.attrs,o=t.params,a=t.hash,s=t.atNames,l=t.blocks return M({args:function(){return{count:2,actions:[le("Expr",n),le(33,r.$sp,0)]}},body:function(){return[le(66,c("ELSE")),le(83,u(e.referrer)),le(81),ge({capabilities:!0,attrs:i,params:o,hash:a,atNames:s,blocks:l}),le("Label","ELSE")]}})}function ge(e){var t=e.capabilities,n=e.attrs,i=e.params,o=e.hash,a=e.atNames,s=e.blocks,u=e.layout,l=!!s,c=!0===t||t.prepareArgs||!(!o||0===o[0].length),f=s.with("attrs",n) return[le(36,r.$s0),le(33,r.$sp,1),le(35,r.$s0),le(0),le("Args",{params:i,hash:o,blocks:f,atNames:a}),le(87,r.$s0),ve(f.has("default"),l,c,(function(){var e return(e=u?[E(u.symbolTable),le("PushCompilable",u),le("JitCompileBlock")]:[le("GetComponentLayout",r.$s0)]).push(le(98,r.$s0)),e})),le(35,r.$s0)]}function ve(e,t,n,i){void 0===i&&(i=null) var o=[le(100),le(59),le(89,0|e,r.$s0)] return i&&o.push(i()),o.push(le(90,r.$s0),le(92,r.$s0),le(38,r.$s0),le(19,0),le(97,r.$s0),n?le(17,r.$s0):N,t?le(18,r.$s0):N,le(34,1),le(99,r.$s0),le(103,r.$s0),le(1),le(40),le(60),le(101)),o}function be(e){return ee(e.block.statements,he(e))}var we=function(){function e(e,t,r){this.main=e,this.trustingGuardedAppend=t,this.cautiousGuardedAppend=r}return e.prototype.getAppend=function(e){return e?this.trustingGuardedAppend:this.cautiousGuardedAppend},(0,t.createClass)(e,[{key:"trusting-append",get:function(){return this.trustingGuardedAppend}},{key:"cautious-append",get:function(){return this.cautiousGuardedAppend}}]),e}() function _e(){return[le(76,r.$s0),ve(!1,!1,!0)]}function Se(e){return[le(78),k((function(t){t(1,(function(){return e?[le(68),le(43)]:le(47)})),t(0,(function(){return[le(82),le(81),[le(36,r.$s0),le(33,r.$sp,1),le(35,r.$s0),le(0),le(85),le(87,r.$s0),ve(!1,!1,!0,(function(){return[le("GetComponentLayout",r.$s0),le(98,r.$s0)]})),le(35,r.$s0)]]})),t(3,(function(){return[le(68),le(44)]})),t(4,(function(){return[le(68),le(45)]})),t(5,(function(){return[le(68),le(46)]}))}))]}function Ee(e){var t=Me(e,_e),r=Me(e,(function(){return Se(!0)})),n=Me(e,(function(){return Se(!1)})) return new we(t,r,n)}e.StdLib=we var ke={asPartial:!1,evalSymbols:null,upvars:null,referrer:{},size:0} function Me(e,t){var r=new ce,n=new z j({encoder:r,meta:ke,syntax:{macros:n,program:e}},t()) var i=r.commit(e.heap,0) if("number"!=typeof i)throw new Error("Unexpected errors compiling std") return i}var xe=function(e,t){this.mode=t,this.constants=new i.WriteOnlyConstants,this.heap=new i.HeapImpl,this.resolverDelegate=e,this.stdlib=Ee(this)} e.ProgramCompilationContext=xe var Ae=function(e){this.constants=new i.JitConstants,this.heap=new i.HeapImpl,this.mode="jit",this.resolverDelegate=e,this.stdlib=Ee(this)} e.JitProgramCompilationContext=Ae var Te=function(){function e(e,t){this.name=e,this.template=t}return e.prototype.getPartial=function(e){var t=(0,n.unwrapTemplate)(this.template).asPartial(),r=t.compile(e) return{symbolTable:t.symbolTable,handle:r}},e}() e.PartialDefinitionImpl=Te var Ie=function(){function e(e){this.layout=e,this.compiled=null var t=e.block,r=t.symbols.slice(),n=r.indexOf("&attrs") this.attrsBlockNumber=-1===n?r.push("&attrs"):n+1,this.symbolTable={hasEval:t.hasEval,symbols:r}}return e.prototype.compile=function(e){if(null!==this.compiled)return this.compiled var t,o,a,s,u=he(this.layout),l=K(e,u) F(l,(t=this.layout,o=this.attrsBlockNumber,[le("StartLabels"),(a=r.$s1,s=function(){return[le(93,r.$s0),le(31),le(33,r.$sp,0)]},[le(36,a),s(),le(35,a)]),le(66,c("BODY")),le(36,r.$s1),le(91),le(49),le(102,r.$s0),b(o,n.EMPTY_ARRAY),le(54),le("Label","BODY"),_(be(t)),le(36,r.$s1),le(66,c("END")),le(55),le("Label","END"),le(35,r.$s1),le("StopLabels")])) var f=l.encoder.commit(l.syntax.program.heap,u.size) return"number"!=typeof f||(this.compiled=f,(0,i.patchStdlibs)(l.syntax.program)),f},e}() e.WrappedBuilder=Ie var Oe=0 function Ce(e){var t,r=e.id,i=e.meta,o=e.block,a=r||"client-"+Oe++ return{id:a,meta:i,create:function(e){var r=e?(0,n.assign)({},e,i):i return t||(t=JSON.parse(o)),new Re({id:a,block:t,referrer:r})}}}var Re=function(){function e(e){this.parsedLayout=e,this.result="ok",this.layout=null,this.partial=null,this.wrappedLayout=null var t=e.block this.symbols=t.symbols,this.hasEval=t.hasEval,this.referrer=e.referrer,this.id=e.id||"client-"+Oe++}var t=e.prototype return t.asLayout=function(){return this.layout?this.layout:this.layout=Q((0,n.assign)({},this.parsedLayout,{asPartial:!1}))},t.asPartial=function(){return this.partial?this.partial:this.layout=Q((0,n.assign)({},this.parsedLayout,{asPartial:!0}))},t.asWrappedLayout=function(){return this.wrappedLayout?this.wrappedLayout:this.wrappedLayout=new Ie((0,n.assign)({},this.parsedLayout,{asPartial:!1}))},e}()})),e("@glimmer/program",["exports","ember-babel","@glimmer/util"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.hydrateHeap=function(e){return new f(e)},e.hydrateProgram=function(e){var t=new f(e.heap),r=new a(e.constants) return new d(r,t)},e.patchStdlibs=function(e){e.heap.patchStdlibs(e.stdlib)},e.programArtifacts=g,e.artifacts=function(e){return g(e.program)},e.RuntimeOpImpl=e.RuntimeProgramImpl=e.HeapImpl=e.RuntimeHeapImpl=e.JitConstants=e.RuntimeConstantsImpl=e.WriteOnlyConstants=e.WELL_KNOWN_EMPTY_ARRAY_POSITION=void 0 var n={} e.WELL_KNOWN_EMPTY_ARRAY_POSITION=0 var i=Object.freeze([]),o=function(){function e(){this.strings=[],this.arrays=[i],this.tables=[],this.handles=[],this.resolved=[],this.numbers=[],this.others=[]}var t=e.prototype return t.other=function(e){return this.others.push(e)-1},t.string=function(e){var t=this.strings.indexOf(e) return t>-1?t:this.strings.push(e)-1},t.stringArray=function(e){for(var t=new Array(e.length),r=0;r-1?t:this.arrays.push(e)-1},t.serializable=function(e){var t=JSON.stringify(e),r=this.strings.indexOf(t) return r>-1?r:this.strings.push(t)-1},t.templateMeta=function(e){return this.serializable(e)},t.number=function(e){var t=this.numbers.indexOf(e) return t>-1?t:this.numbers.push(e)-1},t.toPool=function(){return{strings:this.strings,arrays:this.arrays,handles:this.handles,numbers:this.numbers}},e}() e.WriteOnlyConstants=o var a=function(){function e(e){this.strings=e.strings,this.arrays=e.arrays,this.handles=e.handles,this.numbers=e.numbers,this.others=[]}var t=e.prototype return t.getString=function(e){return this.strings[e]},t.getNumber=function(e){return this.numbers[e]},t.getStringArray=function(e){for(var t=this.getArray(e),r=new Array(t.length),n=0;n-1?t:this.metas.push(e)-1},i.getNumber=function(e){return this.numbers[e]},i.getString=function(e){return this.strings[e]},i.getStringArray=function(e){for(var t=this.getArray(e),r=new Array(t.length),n=0;n>8)}},{key:"isMachine",get:function(){return 1024&this.heap.getbyaddr(this.offset)?1:0}},{key:"type",get:function(){return 255&this.heap.getbyaddr(this.offset)}},{key:"op1",get:function(){return this.heap.getbyaddr(this.offset+1)}},{key:"op2",get:function(){return this.heap.getbyaddr(this.offset+2)}},{key:"op3",get:function(){return this.heap.getbyaddr(this.offset+3)}}]),e}() function l(e,t){return t|e<<2}function c(e,t){return e|t<<30}e.RuntimeOpImpl=u var f=function(){function e(e){var t=e.buffer,r=e.table this.heap=new Int32Array(t),this.table=r}var t=e.prototype return t.getaddr=function(e){return this.table[e]},t.getbyaddr=function(e){return this.heap[e]},t.sizeof=function(e){return m(this.table,e)},t.scopesizeof=function(e){return y(this.table,e)},e}() e.RuntimeHeapImpl=f var h=function(){function e(){this.placeholders=[],this.stdlibs=[],this.offset=0,this.handle=0,this.capacity=1048576,this.heap=new Int32Array(1048576),this.table=[]}var t=e.prototype return t.push=function(e){this.sizeCheck(),this.heap[this.offset++]=e},t.sizeCheck=function(){if(0===this.capacity){var e=p(this.heap,0,this.offset) this.heap=new Int32Array(e.length+1048576),this.heap.set(e,0),this.capacity=1048576}this.capacity--},t.getbyaddr=function(e){return this.heap[e]},t.setbyaddr=function(e,t){this.heap[e]=t},t.malloc=function(){this.table.push(this.offset,0,0) var e=this.handle return this.handle+=3,e},t.finishMalloc=function(e,t){this.table[e+1]=l(t,0)},t.size=function(){return this.offset},t.getaddr=function(e){return this.table[e]},t.gethandle=function(e){this.table.push(e,l(0,3),0) var t=this.handle return this.handle+=3,t},t.sizeof=function(e){return m(this.table,e)},t.scopesizeof=function(e){return y(this.table,e)},t.free=function(e){var t=this.table[e+1] this.table[e+1]=c(t,1)},t.compact=function(){for(var e=0,t=this.table,r=this.table.length,n=this.heap,i=0;i>2}function g(e){return{heap:e.heap.capture(e.stdlib),constants:e.constants.toPool()}}e.RuntimeProgramImpl=d})),e("@glimmer/reference",["exports","ember-babel","@glimmer/util","@glimmer/validator"],(function(e,t,r,n){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.isModified=function(e){return e!==a},e.IterableImpl=e.IterationItemReference=e.PropertyReference=e.HelperRootReference=e.ComponentRootReference=e.RootReference=e.UPDATE_REFERENCED_VALUE=e.IteratorSynchronizer=e.ReferenceIterator=e.IterationArtifacts=e.END=e.ListItem=e.ConstReference=e.ReferenceCache=e.CachedReference=void 0 var i=function(){function e(){this.lastRevision=null,this.lastValue=null}var t=e.prototype return t.value=function(){var e=this.tag,t=this.lastRevision,r=this.lastValue return null!==t&&(0,n.validateTag)(e,t)||(r=this.lastValue=this.compute(),this.lastRevision=(0,n.valueForTag)(e)),r},t.invalidate=function(){this.lastRevision=null},e}() e.CachedReference=i var o=function(){function e(e){this.lastValue=null,this.lastRevision=null,this.initialized=!1,this.tag=e.tag,this.reference=e}var t=e.prototype return t.peek=function(){return this.initialized?this.lastValue:this.initialize()},t.revalidate=function(){if(!this.initialized)return this.initialize() var e=this.reference,t=this.lastRevision,r=e.tag if((0,n.validateTag)(r,t))return a var i=this.lastValue,o=e.value() return this.lastRevision=(0,n.valueForTag)(r),o===i?a:(this.lastValue=o,o)},t.initialize=function(){var e=this.reference,t=this.lastValue=e.value() return this.lastRevision=(0,n.valueForTag)(e.tag),this.initialized=!0,t},e}() e.ReferenceCache=o var a=(0,r.symbol)("NOT_MODIFIED") var s=new(function(){function e(e){this.inner=e,this.tag=n.CONSTANT_TAG}var t=e.prototype return t.value=function(){return this.inner},t.get=function(e){return s},e}())(void 0),u=function(){function e(e){this.inner=e,this.tag=n.CONSTANT_TAG}var t=e.prototype return t.value=function(){return this.inner},t.get=function(e){return s},e}() e.ConstReference=u var l=function(e){function r(t,r){var n return(n=e.call(this,t.valueReferenceFor(r))||this).retained=!1,n.seen=!1,n.key=r.key,n.iterable=t,n.memo=t.memoReferenceFor(r),n}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.update=function(e){this.retained=!0,this.iterable.updateValueReference(this.value,e),this.iterable.updateMemoReference(this.memo,e)},n.shouldRemove=function(){return!this.retained},n.reset=function(){this.retained=!1,this.seen=!1},r}(r.ListNode) e.ListItem=l var c=function(){function e(e){this.iterator=null,this.map=new Map,this.list=new r.LinkedList,this.tag=e.tag,this.iterable=e}var t=e.prototype return t.isEmpty=function(){return(this.iterator=this.iterable.iterate()).isEmpty()},t.iterate=function(){var e return e=null===this.iterator?this.iterable.iterate():this.iterator,this.iterator=null,e},t.advanceToKey=function(e,t){for(var r=t;null!==r&&r.key!==e;)r=this.advanceNode(r) return r},t.has=function(e){return this.map.has(e)},t.get=function(e){return this.map.get(e)},t.wasSeen=function(e){var t=this.map.get(e) return void 0!==t&&t.seen},t.update=function(e){var t=this.get(e.key) return t.update(e),t},t.append=function(e){var t=this.map,r=this.list,n=this.iterable,i=new l(n,e) return t.set(e.key,i),r.append(i),i},t.insertBefore=function(e,t){var r=this.map,n=this.list,i=this.iterable,o=new l(i,e) return r.set(e.key,o),o.retained=!0,n.insertBefore(o,t),o},t.move=function(e,t){var r=this.list e.retained=!0,r.remove(e),r.insertBefore(e,t)},t.remove=function(e){this.list.remove(e),this.map.delete(e.key)},t.nextNode=function(e){return this.list.nextNode(e)},t.advanceNode=function(e){return e.seen=!0,this.list.nextNode(e)},t.head=function(){return this.list.head()},e}() e.IterationArtifacts=c var f,h=function(){function e(e){this.iterator=null var t=new c(e) this.artifacts=t}return e.prototype.next=function(){var e=this.artifacts,t=(this.iterator=this.iterator||e.iterate()).next() return null===t?null:e.append(t)},e}() e.ReferenceIterator=h,function(e){e[e.Append=0]="Append",e[e.Prune=1]="Prune",e[e.Done=2]="Done"}(f||(f={})) var d=(0,r.symbol)("END") e.END=d var p=function(){function e(e){var t=e.target,r=e.artifacts,n=e.env this.target=t,this.artifacts=r,this.iterator=r.iterate(),this.current=r.head(),this.env=n}var t=e.prototype return t.sync=function(){for(var e=f.Append;;)switch(e){case f.Append:e=this.nextAppend() break case f.Prune:e=this.nextPrune() break case f.Done:return void this.nextDone()}},t.advanceToKey=function(e){var t=this.current,r=this.artifacts if(null!==t){var n=r.advanceNode(t) if(n.key!==e){var i=r.advanceToKey(e,t) i&&(this.move(i,t),this.current=r.nextNode(t))}else this.current=r.advanceNode(n)}},t.move=function(e,t){e.next!==t&&(this.artifacts.move(e,t),this.target.move(this.env,e.key,e.value,e.memo,t?t.key:d))},t.nextAppend=function(){var e=this.iterator,t=this.current,r=this.artifacts,n=e.next() if(null===n)return this.startPrune() var i=n.key return null!==t&&t.key===i?this.nextRetain(n,t):r.has(i)?this.nextMove(n):this.nextInsert(n),f.Append},t.nextRetain=function(e,t){var r=this.artifacts t.update(e),this.current=r.nextNode(t),this.target.retain(this.env,e.key,t.value,t.memo)},t.nextMove=function(e){var t=this.current,r=this.artifacts,n=e.key,i=r.update(e) r.wasSeen(n)?this.move(i,t):this.advanceToKey(n)},t.nextInsert=function(e){var t=this.artifacts,r=this.target,n=this.current,i=t.insertBefore(e,n) r.insert(this.env,i.key,i.value,i.memo,n?n.key:null)},t.startPrune=function(){return this.current=this.artifacts.head(),f.Prune},t.nextPrune=function(){var e=this.artifacts,t=this.target,r=this.current if(null===r)return f.Done var n=r return this.current=e.nextNode(n),n.shouldRemove()?(e.remove(n),t.delete(this.env,n.key)):n.reset(),f.Prune},t.nextDone=function(){this.target.done(this.env)},e}() e.IteratorSynchronizer=p var m=(0,r.symbol)("UPDATE_REFERENCED_VALUE") e.UPDATE_REFERENCED_VALUE=m var y=function(){function e(e){this.env=e,this.children=(0,r.dict)(),this.tag=n.CONSTANT_TAG}return e.prototype.get=function(e){var t=this.children[e] return void 0===t&&(t=this.children[e]=new b(this,e,this.env)),t},e}() e.RootReference=y var g=function(e){function r(t,r){var n return(n=e.call(this,r)||this).inner=t,n}return(0,t.inheritsLoose)(r,e),r.prototype.value=function(){return this.inner},r}(y) e.ComponentRootReference=g var v=function(e){function r(r,i,o,a){var s;(s=e.call(this,o)||this).fn=r,s.args=i,s.computeRevision=null,s.computeTag=null,(0,n.isConst)(i)&&s.compute() var u=(0,t.assertThisInitialized)(s),l=u.tag,c=u.computeTag if(null!==c&&(0,n.isConstTag)(c))l=s.tag=n.CONSTANT_TAG,s.computeRevision=(0,n.valueForTag)(l) else{var f=s.valueTag=(0,n.createUpdatableTag)() l=s.tag=(0,n.combine)([i.tag,f]),null!==c&&((0,n.updateTag)(f,c),s.computeRevision=(0,n.valueForTag)(l))}return s}(0,t.inheritsLoose)(r,e) var i=r.prototype return i.compute=function(){var e=this this.computeTag=(0,n.track)((function(){e.computeValue=e.fn(e.args)}),!1)},i.value=function(){var e=this.tag,t=this.computeRevision return null!==t&&(0,n.validateTag)(e,t)||(this.compute(),(0,n.updateTag)(this.valueTag,this.computeTag),this.computeRevision=(0,n.valueForTag)(e)),this.computeValue},r}(y) e.HelperRootReference=v var b=function(){function e(e,t,i){this.parentReference=e,this.propertyKey=t,this.env=i,this.children=(0,r.dict)(),this.lastRevision=null var o=this.valueTag=(0,n.createUpdatableTag)(),a=e.tag this.tag=(0,n.combine)([a,o])}var t=e.prototype return t.value=function(){var e=this,t=this.tag,i=this.lastRevision,o=this.lastValue,a=this.parentReference,s=this.valueTag,u=this.propertyKey if(null===i||!(0,n.validateTag)(t,i)){var l=a.value() if((0,r.isDict)(l)){var c=(0,n.track)((function(){o=e.env.getPath(l,u)}),!1);(0,n.updateTag)(s,c)}else o=void 0 this.lastValue=o,this.lastRevision=(0,n.valueForTag)(t)}return o},t.get=function(t){var r=this.children[t] return void 0===r&&(r=this.children[t]=new e(this,t,this.env)),r},t[m]=function(e){var t=this.parentReference,r=this.propertyKey,n=t.value() this.env.setPath(n,r,e)},e}() e.PropertyReference=b var w=function(){function e(e,t,i,o){this.parentReference=e,this.itemValue=t,this.env=o,this.tag=(0,n.createUpdatableTag)(),this.children=(0,r.dict)()}var t=e.prototype return t.value=function(){return this.itemValue},t.update=function(e){(0,n.dirtyTag)(this.tag),this.itemValue=e},t.get=function(e){var t=this.children[e] return void 0===t&&(t=this.children[e]=new b(this,e,this.env)),t},e}() e.IterationItemReference=w var _={},S=function(e,t){return t},E=function(e,t){return String(t)},k=function(e){return null===e?_:e} function M(e,t){switch(e){case"@key":return T(S) case"@index":return T(E) case"@identity":return T(k) default:return function(e,t){return T((function(r){return t(r,e)}))}(e,t)}}var x=function(){function e(){}var n=e.prototype return n.set=function(e,t){(0,r.isObject)(e)||"function"==typeof e?this.weakMap.set(e,t):this.primitiveMap.set(e,t)},n.get=function(e){return(0,r.isObject)(e)||"function"==typeof e?this.weakMap.get(e):this.primitiveMap.get(e)},(0,t.createClass)(e,[{key:"weakMap",get:function(){return void 0===this._weakMap&&(this._weakMap=new WeakMap),this._weakMap}},{key:"primitiveMap",get:function(){return void 0===this._primitiveMap&&(this._primitiveMap=new Map),this._primitiveMap}}]),e}(),A=new x function T(e){var t=new x return function(r,n){var i=e(r,n),o=t.get(i)||0 return t.set(i,o+1),0===o?i:function(e,t){var r=A.get(e) void 0===r&&(r=[],A.set(e,r)) var n=r[t] return void 0===n&&(n={value:e,count:t},r[t]=n),n}(i,o)}}var I=function(){function e(e,t,r){this.parentRef=e,this.key=t,this.env=r,this.tag=e.tag}var t=e.prototype return t.iterate=function(){var e=this.parentRef,t=this.key,n=this.env,i=e.value(),o=M(t,n.getPath) if(Array.isArray(i))return new C(i,o) var a=n.toIterator(i) return null===a?new C(r.EMPTY_ARRAY,(function(){return null})):new O(a,o)},t.valueReferenceFor=function(e){var t=this.parentRef,r=this.env return new w(t,e.value,e.memo,r)},t.updateValueReference=function(e,t){e.update(t.value)},t.memoReferenceFor=function(e){var t=this.parentRef,r=this.env return new w(t,e.memo,"",r)},t.updateMemoReference=function(e,t){e.update(t.memo)},e}() e.IterableImpl=I var O=function(){function e(e,t){this.inner=e,this.keyFor=t}var t=e.prototype return t.isEmpty=function(){return this.inner.isEmpty()},t.next=function(){var e=this.inner.next() return null!==e&&(e.key=this.keyFor(e.value,e.memo)),e},e}(),C=function(){function e(e,t){this.iterator=e,this.keyFor=t,this.pos=0,0===e.length?this.current={kind:"empty"}:this.current={kind:"first",value:e[this.pos]}}var t=e.prototype return t.isEmpty=function(){return"empty"===this.current.kind},t.next=function(){var e,t=this.current if("first"===t.kind)this.current={kind:"progress"},e=t.value else{if(this.pos>=this.iterator.length-1)return null e=this.iterator[++this.pos]}return{key:(0,this.keyFor)(e,this.pos),value:e,memo:this.pos}},e}()})),e("@glimmer/runtime",["exports","ember-babel","@glimmer/util","@glimmer/reference","@glimmer/program","@glimmer/vm","@glimmer/validator","@glimmer/low-level"],(function(e,t,r,n,i,o,a,s){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.clear=w,e.capabilityFlagsFrom=Ze,e.hasCapability=$e,e.resetDebuggerCallback=function(){St=_t},e.setDebuggerCallback=function(e){St=e},e.curry=function(e,t){void 0===t&&(t=null) return new et(e,t)},e.isCurriedComponentDefinition=Xe,e.isWhitespace=function(e){return U.test(e)},e.normalizeProperty=oe,e.AotRuntime=function(e,t,r,n){void 0===r&&(r={}) void 0===n&&(n={}) return{env:new Re(e,n),resolver:new Ue(r),program:i.RuntimeProgramImpl.hydrate(t)}},e.JitRuntime=function(e,t,r,n){void 0===t&&(t={}) void 0===n&&(n={}) return{env:new Re(e,t),program:new i.RuntimeProgramImpl(r.program.constants,r.program.heap),resolver:new Ue(n)}},e.inTransaction=Fe,e.getDynamicVar=function(e,t){var r=t.dynamicScope(),n=e.positional.at(0) return new It(r,n)},e.renderAot=function(e,t,r,n){void 0===n&&(n=Y) var i=T.forInitialRender(e.env,r),o=new Tt,a=ir.initial(e,{self:n,dynamicScope:o,treeBuilder:i,handle:t}) return new ur(a)},e.renderAotComponent=function(e,t,r,n,i,o){void 0===i&&(i={}) void 0===o&&(o=new Tt) var a,s=ir.empty(e,{treeBuilder:t,handle:r,dynamicScope:o}),u=tt(s.runtime.resolver,n),l=u.manager,c=u.state if(!yt(Ze(l.getCapabilities(c)),l))throw new Error("Cannot invoke components with dynamic layouts as a root component.") a=l.getAotStaticLayout(c,s.runtime.resolver) return cr(s,a,u,i)},e.renderAotMain=function(e,t,r,n,i){void 0===i&&(i=new Tt) var o=ir.initial(e,{self:t,dynamicScope:i,treeBuilder:r,handle:n}) return new ur(o)},e.renderJitComponent=function(e,t,n,i,o,a,s){void 0===a&&(a={}) void 0===s&&(s=new Tt) var u,l=sr.empty(e,{treeBuilder:t,handle:i,dynamicScope:s},n),c=tt(l.runtime.resolver,o),f=c.manager,h=c.state if(!yt(Ze(f.getCapabilities(h)),f))throw new Error("Cannot invoke components with dynamic layouts as a root component.") var d=f.getJitStaticLayout(h,l.runtime.resolver),p=(0,r.unwrapHandle)(d.compile(n)) if(Array.isArray(p)){var m=p[0] throw new Error("Compile Error: "+m.problem+" "+m.span.start+".."+m.span.end+" :: TODO (thread better)")}u={handle:p,symbolTable:d.symbolTable} return cr(l,u,c,a)},e.renderJitMain=function(e,t,r,n,i,o){void 0===o&&(o=new Tt) var a=sr.initial(e,t,{self:r,dynamicScope:o,treeBuilder:n,handle:i}) return new ur(a)},e.renderSync=lr,e.dynamicAttribute=ge,e.clientBuilder=function(e,t){return T.forInitialRender(e,t)},e.isSerializationFirstNode=fr,e.rehydrationBuilder=function(e,t){return dr.forInitialRender(e,t)},e.TEMPLATE_ONLY_COMPONENT=e.SimpleComponentManager=e.SERIALIZATION_FIRST_NODE_STRING=e.RehydrateBuilder=e.RemoteLiveBlock=e.UpdatableBlockImpl=e.NewElementBuilder=e.SimpleDynamicAttribute=e.DynamicAttribute=e.CapturedPositionalArgumentsImpl=e.CapturedNamedArgumentsImpl=e.CapturedArgumentsImpl=e.EMPTY_ARGS=e.LowLevelVM=e.UpdatingVM=e.UNDEFINED_REFERENCE=e.PrimitiveReference=e.NULL_REFERENCE=e.ConditionalReference=e.ScopeImpl=e.EnvironmentImpl=e.DefaultDynamicScope=e.DOMTreeConstruction=e.IDOMChanges=e.DOMChanges=e.MINIMAL_CAPABILITIES=e.DEFAULT_CAPABILITIES=e.CurriedComponentDefinition=e.CursorImpl=e.ConcreteBounds=void 0 var u=(0,r.symbol)("INNER_VM"),l=(0,r.symbol)("DESTRUCTOR_STACK"),c=(0,r.symbol)("STACKS"),f=(0,r.symbol)("REGISTERS"),h=(0,r.symbol)("HEAP"),d=(0,r.symbol)("CONSTANTS"),p=(0,r.symbol)("ARGS"),m=((0,r.symbol)("PC"),function(e,t){this.element=e,this.nextSibling=t}) e.CursorImpl=m var y=function(){function e(e,t,r){this.parentNode=e,this.first=t,this.last=r}var t=e.prototype return t.parentElement=function(){return this.parentNode},t.firstNode=function(){return this.first},t.lastNode=function(){return this.last},e}() e.ConcreteBounds=y var g,v=function(){function e(e,t){this.parentNode=e,this.node=t}var t=e.prototype return t.parentElement=function(){return this.parentNode},t.firstNode=function(){return this.node},t.lastNode=function(){return this.node},e}() function b(e,t){for(var r=e.parentElement(),n=e.firstNode(),i=e.lastNode(),o=n;;){var a=o.nextSibling if(r.insertBefore(o,t),o===i)return a o=a}}function w(e){for(var t=e.parentElement(),r=e.firstNode(),n=e.lastNode(),i=r;;){var o=i.nextSibling if(t.removeChild(i),i===n)return o i=o}}function _(e,t){var n=(0,r.peekAssociated)(e) null!==n&&t.willDestroy((0,r.snapshot)(n))}function S(e,t){var n=(0,r.takeAssociated)(e) null!==n&&t.didDestroy((0,r.snapshot)(n))}function E(e,t){t.willDestroy((0,r.destructor)(e))}function k(e,t){t.didDestroy((0,r.destructor)(e))}var M=function(){function e(e){this.node=e}return e.prototype.firstNode=function(){return this.node},e}(),x=function(){function e(e){this.node=e}return e.prototype.lastNode=function(){return this.node},e}(),A=(0,r.symbol)("CURSOR_STACK"),T=function(){function e(e,t,n){this.constructing=null,this.operations=null,this[g]=new r.Stack,this.modifierStack=new r.Stack,this.blockStack=new r.Stack,this.pushElement(t,n),this.env=e,this.dom=e.getAppendOperations(),this.updateOperations=e.getDOM()}e.forInitialRender=function(e,t){return new this(e,t.element,t.nextSibling).initialize()},e.resume=function(e,t){var r=new this(e,t.parentElement(),t.reset(e)).initialize() return r.pushLiveBlock(t),r} var n=e.prototype return n.initialize=function(){return this.pushSimpleBlock(),this},n.debugBlocks=function(){return this.blockStack.toArray()},n.block=function(){return this.blockStack.current},n.popElement=function(){this[A].pop(),this[A].current},n.pushSimpleBlock=function(){return this.pushLiveBlock(new I(this.element))},n.pushUpdatableBlock=function(){return this.pushLiveBlock(new C(this.element))},n.pushBlockList=function(e){return this.pushLiveBlock(new R(this.element,e))},n.pushLiveBlock=function(e,t){void 0===t&&(t=!1) var r=this.blockStack.current return null!==r&&(t||r.didAppendBounds(e)),this.__openBlock(),this.blockStack.push(e),e},n.popBlock=function(){return this.block().finalize(this),this.__closeBlock(),this.blockStack.pop()},n.__openBlock=function(){},n.__closeBlock=function(){},n.openElement=function(e){var t=this.__openElement(e) return this.constructing=t,t},n.__openElement=function(e){return this.dom.createElement(e,this.element)},n.flushElement=function(e){var t=this.element,r=this.constructing this.__flushElement(t,r),this.constructing=null,this.operations=null,this.pushModifiers(e),this.pushElement(r,null),this.didOpenElement(r)},n.__flushElement=function(e,t){this.dom.insertBefore(e,t,this.nextSibling)},n.closeElement=function(){return this.willCloseElement(),this.popElement(),this.popModifiers()},n.pushRemoteElement=function(e,t,r){return this.__pushRemoteElement(e,t,r)},n.__pushRemoteElement=function(e,t,r){if(this.pushElement(e,r),void 0===r)for(;e.lastChild;)e.removeChild(e.lastChild) var n=new O(e) return this.pushLiveBlock(n,!0)},n.popRemoteElement=function(){this.popBlock(),this.popElement()},n.pushElement=function(e,t){void 0===t&&(t=null),this[A].push(new m(e,t))},n.pushModifiers=function(e){this.modifierStack.push(e)},n.popModifiers=function(){return this.modifierStack.pop()},n.didAppendBounds=function(e){return this.block().didAppendBounds(e),e},n.didAppendNode=function(e){return this.block().didAppendNode(e),e},n.didOpenElement=function(e){return this.block().openElement(e),e},n.willCloseElement=function(){this.block().closeElement()},n.appendText=function(e){return this.didAppendNode(this.__appendText(e))},n.__appendText=function(e){var t=this.dom,r=this.element,n=this.nextSibling,i=t.createTextNode(e) return t.insertBefore(r,i,n),i},n.__appendNode=function(e){return this.dom.insertBefore(this.element,e,this.nextSibling),e},n.__appendFragment=function(e){var t=e.firstChild if(t){var r=new y(this.element,t,e.lastChild) return this.dom.insertBefore(this.element,e,this.nextSibling),r}return new v(this.element,this.__appendComment(""))},n.__appendHTML=function(e){return this.dom.insertHTMLBefore(this.element,this.nextSibling,e)},n.appendDynamicHTML=function(e){var t=this.trustedContent(e) this.didAppendBounds(t)},n.appendDynamicText=function(e){var t=this.untrustedContent(e) return this.didAppendNode(t),t},n.appendDynamicFragment=function(e){var t=this.__appendFragment(e) this.didAppendBounds(t)},n.appendDynamicNode=function(e){var t=this.__appendNode(e),r=new v(this.element,t) this.didAppendBounds(r)},n.trustedContent=function(e){return this.__appendHTML(e)},n.untrustedContent=function(e){return this.__appendText(e)},n.appendComment=function(e){return this.didAppendNode(this.__appendComment(e))},n.__appendComment=function(e){var t=this.dom,r=this.element,n=this.nextSibling,i=t.createComment(e) return t.insertBefore(r,i,n),i},n.__setAttribute=function(e,t,r){this.dom.setAttribute(this.constructing,e,t,r)},n.__setProperty=function(e,t){this.constructing[e]=t},n.setStaticAttribute=function(e,t,r){this.__setAttribute(e,t,r)},n.setDynamicAttribute=function(e,t,r,n){var i=this.constructing,o=this.env.attributeFor(i,e,r,n) return o.set(this,t,this.env),o},(0,t.createClass)(e,[{key:"element",get:function(){return this[A].current.element}},{key:"nextSibling",get:function(){return this[A].current.nextSibling}},{key:"hasBlocks",get:function(){return this.blockStack.size>0}}]),e}() e.NewElementBuilder=T,g=A var I=function(){function e(e){this.parent=e,this.first=null,this.last=null,this.destroyables=null,this.nesting=0}var t=e.prototype return t.parentElement=function(){return this.parent},t.firstNode=function(){return this.first.firstNode()},t.lastNode=function(){return this.last.lastNode()},t.openElement=function(e){this.didAppendNode(e),this.nesting++},t.closeElement=function(){this.nesting--},t.didAppendNode=function(e){0===this.nesting&&(this.first||(this.first=new M(e)),this.last=new x(e))},t.didAppendBounds=function(e){0===this.nesting&&(this.first||(this.first=e),this.last=e)},t.finalize=function(e){null===this.first&&e.appendComment("")},e}(),O=function(e){function n(){return e.apply(this,arguments)||this}return(0,t.inheritsLoose)(n,e),n.prototype[r.DESTROY]=function(){this.parentElement()===this.firstNode().parentNode&&w(this)},n}(I) e.RemoteLiveBlock=O var C=function(e){function r(){return e.apply(this,arguments)||this}return(0,t.inheritsLoose)(r,e),r.prototype.reset=function(e){var t=function(e,t){return _(e,t),S(e,t),w(e)}(this,e) return this.first=null,this.last=null,this.destroyables=null,this.nesting=0,t},r}(I) e.UpdatableBlockImpl=C var R=function(){function e(e,t){this.parent=e,this.boundList=t,this.parent=e,this.boundList=t}var t=e.prototype return t.parentElement=function(){return this.parent},t.firstNode=function(){return this.boundList.head().firstNode()},t.lastNode=function(){return this.boundList.tail().lastNode()},t.openElement=function(e){},t.closeElement=function(){},t.didAppendNode=function(e){},t.didAppendBounds=function(e){},t.finalize=function(e){},e}() var P={foreignObject:1,desc:1,title:1},N=Object.create(null),D=function(){function e(e){this.document=e,this.setupUselessElement()}var t=e.prototype return t.setupUselessElement=function(){this.uselessElement=this.document.createElement("div")},t.createElement=function(e,t){var r,n if(t?(r="http://www.w3.org/2000/svg"===t.namespaceURI||"svg"===e,n=!!P[t.tagName]):(r="svg"===e,n=!1),r&&!n){if(N[e])throw new Error("Cannot create a "+e+" inside an SVG context") return this.document.createElementNS("http://www.w3.org/2000/svg",e)}return this.document.createElement(e)},t.insertBefore=function(e,t,r){e.insertBefore(t,r)},t.insertHTMLBefore=function(e,t,r){if(""===r){var n=this.createComment("") return e.insertBefore(n,t),new y(e,n,n)}var i,o=t?t.previousSibling:e.lastChild if(null===t)e.insertAdjacentHTML("beforeend",r),i=e.lastChild else if(t instanceof HTMLElement)t.insertAdjacentHTML("beforebegin",r),i=t.previousSibling else{var a=this.uselessElement e.insertBefore(a,t),a.insertAdjacentHTML("beforebegin",r),i=a.previousSibling,e.removeChild(a)}var s=o?o.nextSibling:e.firstChild return new y(e,s,i)},t.createTextNode=function(e){return this.document.createTextNode(e)},t.createComment=function(e){return this.document.createComment(e)},e}() function B(e,n,i){if(!e)return n if(!function(e,t){var r=e.createElementNS(t,"svg") try{r.insertAdjacentHTML("beforeend","")}catch(n){}finally{return 1!==r.childNodes.length||"http://www.w3.org/2000/svg"!==r.firstChild.namespaceURI}}(e,i))return n var o=e.createElement("div") return function(e){function n(){return e.apply(this,arguments)||this}return(0,t.inheritsLoose)(n,e),n.prototype.insertHTMLBefore=function(t,n,a){return""===a||t.namespaceURI!==i?e.prototype.insertHTMLBefore.call(this,t,n,a):function(e,t,n,i){var o if("FOREIGNOBJECT"===e.tagName.toUpperCase()){var a=""+n+"";(0,r.clearElement)(t),t.insertAdjacentHTML("afterbegin",a),o=t.firstChild.firstChild}else{var s=""+n+"";(0,r.clearElement)(t),t.insertAdjacentHTML("afterbegin",s),o=t.firstChild}return function(e,t,r){for(var n=e.firstChild,i=n,o=n;o;){var a=o.nextSibling t.insertBefore(o,r),i=o,o=a}return new y(t,n,i)}(o,e,i)}(t,o,a,n)},n}(n)}function L(e,r){return e&&function(e){var t=e.createElement("div") if(t.appendChild(e.createTextNode("first")),t.insertAdjacentHTML("beforeend","second"),2===t.childNodes.length)return!1 return!0}(e)?function(e){function r(t){var r return(r=e.call(this,t)||this).uselessComment=t.createComment(""),r}return(0,t.inheritsLoose)(r,e),r.prototype.insertHTMLBefore=function(t,r,n){if(""===n)return e.prototype.insertHTMLBefore.call(this,t,r,n) var i=!1,o=r?r.previousSibling:t.lastChild o&&o instanceof Text&&(i=!0,t.insertBefore(this.uselessComment,r)) var a=e.prototype.insertHTMLBefore.call(this,t,r,n) return i&&t.removeChild(this.uselessComment),a},r}(r):r}["b","big","blockquote","body","br","center","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","head","hr","i","img","li","listing","main","meta","nobr","ol","p","pre","ruby","s","small","span","strong","strike","sub","sup","table","tt","u","ul","var"].forEach((function(e){return N[e]=1})) var j,U=/[\t-\r \xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]/,F="undefined"==typeof document?null:document;(function(e){var r=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.createElementNS=function(e,t){return this.document.createElementNS(e,t)},n.setAttribute=function(e,t,r,n){void 0===n&&(n=null),n?e.setAttributeNS(n,t,r):e.setAttribute(t,r)},r}(D) e.TreeConstruction=r var n=r n=L(F,n),n=B(F,n,"http://www.w3.org/2000/svg"),e.DOMTreeConstruction=n})(j||(j={})) var z=function(e){function r(t){var r return(r=e.call(this,t)||this).document=t,r.namespace=null,r}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.setAttribute=function(e,t,r){e.setAttribute(t,r)},n.removeAttribute=function(e,t){e.removeAttribute(t)},n.insertAfter=function(e,t,r){this.insertBefore(e,t,r.nextSibling)},r}(D) e.IDOMChanges=z var H=z H=L(F,H) var V=H=B(F,H,"http://www.w3.org/2000/svg") e.DOMChanges=V var K=j.DOMTreeConstruction e.DOMTreeConstruction=K var q=function(e){function r(t){return e.call(this,t)||this}return(0,t.inheritsLoose)(r,e),r.create=function(e){return void 0===e?Y:null===e?Z:!0===e?J:!1===e?$:"number"==typeof e?new W(e):new G(e)},r.prototype.get=function(e){return Y},r}(n.ConstReference) e.PrimitiveReference=q var G=function(e){function r(){var t return(t=e.apply(this,arguments)||this).lengthReference=null,t}return(0,t.inheritsLoose)(r,e),r.prototype.get=function(t){if("length"===t){var r=this.lengthReference return null===r&&(r=this.lengthReference=new W(this.inner.length)),r}return e.prototype.get.call(this,t)},r}(q),W=function(e){function r(t){return e.call(this,t)||this}return(0,t.inheritsLoose)(r,e),r}(q),Y=new W(void 0) e.UNDEFINED_REFERENCE=Y var Z=new W(null) e.NULL_REFERENCE=Z var J=new W(!0),$=new W(!1),Q=function(){function e(e,t){void 0===t&&(t=X),this.inner=e,this.toBool=t,this.tag=e.tag}return e.prototype.value=function(){return this.toBool(this.inner.value())},e}() function X(e){return!!e}function ee(e){return te(e)?"":String(e)}function te(e){return null==e||"function"!=typeof e.toString}function re(e){return"object"==typeof e&&null!==e&&"function"==typeof e.toHTML}function ne(e){return"object"==typeof e&&null!==e&&"number"==typeof e.nodeType}function ie(e){return"string"==typeof e}function oe(e,t){var r,n,i,o,a if(t in e)n=t,r="prop" else{var s=t.toLowerCase() s in e?(r="prop",n=s):(r="attr",n=t)}return"prop"===r&&("style"===n.toLowerCase()||(i=e.tagName,o=n,(a=ae[i.toUpperCase()])&&a[o.toLowerCase()]))&&(r="attr"),{normalized:n,type:r}}e.ConditionalReference=Q var ae={INPUT:{form:!0,autocorrect:!0,list:!0},SELECT:{form:!0},OPTION:{form:!0},TEXTAREA:{form:!0},LABEL:{form:!0},FIELDSET:{form:!0},LEGEND:{form:!0},OBJECT:{form:!0},BUTTON:{form:!0}} var se=["javascript:","vbscript:"],ue=["A","BODY","LINK","IMG","IFRAME","BASE","FORM"],le=["EMBED"],ce=["href","src","background","action"],fe=["src"] function he(e,t){return-1!==e.indexOf(t)}function de(e,t){return(null===e||he(ue,e))&&he(ce,t)}function pe(e,t){return null!==e&&(he(le,e)&&he(fe,t))}function me(e,t){return de(e,t)||pe(e,t)}function ye(e,t,r,n){var i=null if(null==n)return n if(re(n))return n.toHTML() i=t?t.tagName.toUpperCase():null var o=ee(n) if(de(i,r)){var a=e.protocolForURL(o) if(he(se,a))return"unsafe:"+o}return pe(i,r)?"unsafe:"+o:o}function ge(e,t,r){var n=e.tagName,i={element:e,name:t,namespace:r} if("http://www.w3.org/2000/svg"===e.namespaceURI)return ve(n,t,i) var o=oe(e,t),a=o.type,s=o.normalized return"attr"===a?ve(n,s,i):function(e,t,r){if(me(e,t))return new Ee(t,r) if(function(e,t){return("INPUT"===e||"TEXTAREA"===e)&&"value"===t}(e,t))return new Me(t,r) if(function(e,t){return"OPTION"===e&&"selected"===t}(e,t))return new xe(t,r) return new Se(t,r)}(n,s,i)}function ve(e,t,r){return me(e,t)?new ke(r):new we(r)}var be=function(e){this.attribute=e} e.DynamicAttribute=be var we=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.set=function(e,t,r){var n=Ae(t) if(null!==n){var i=this.attribute,o=i.name,a=i.namespace e.__setAttribute(o,n,a)}},n.update=function(e,t){var r=Ae(e),n=this.attribute,i=n.element,o=n.name null===r?i.removeAttribute(o):i.setAttribute(o,r)},r}(be) e.SimpleDynamicAttribute=we var _e,Se=function(e){function r(t,r){var n return(n=e.call(this,r)||this).normalizedName=t,n}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.set=function(e,t,r){null!=t&&(this.value=t,e.__setProperty(this.normalizedName,t))},n.update=function(e,t){var r=this.attribute.element this.value!==e&&(r[this.normalizedName]=this.value=e,null==e&&this.removeAttribute())},n.removeAttribute=function(){var e=this.attribute,t=e.element,r=e.namespace r?t.removeAttributeNS(r,this.normalizedName):t.removeAttribute(this.normalizedName)},r}(be),Ee=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.set=function(t,r,n){var i=this.attribute,o=ye(n,i.element,i.name,r) e.prototype.set.call(this,t,o,n)},n.update=function(t,r){var n=this.attribute,i=ye(r,n.element,n.name,t) e.prototype.update.call(this,i,r)},r}(Se),ke=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.set=function(t,r,n){var i=this.attribute,o=ye(n,i.element,i.name,r) e.prototype.set.call(this,t,o,n)},n.update=function(t,r){var n=this.attribute,i=ye(r,n.element,n.name,t) e.prototype.update.call(this,i,r)},r}(we),Me=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.set=function(e,t){e.__setProperty("value",ee(t))},n.update=function(e){var t=this.attribute.element,r=t.value,n=ee(e) r!==n&&(t.value=n)},r}(Se),xe=function(e){function r(){return e.apply(this,arguments)||this}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.set=function(e,t){null!=t&&!1!==t&&e.__setProperty("selected",!0)},n.update=function(e){var t=this.attribute.element t.selected=!!e},r}(Se) function Ae(e){return!1===e||null==e||void 0===e.toString?null:!0===e?"":"function"==typeof e?null:String(e)}var Te=function(){function e(e,t,r,n){this.slots=e,this.callerScope=t,this.evalScope=r,this.partialMap=n}e.root=function(t,r){void 0===r&&(r=0) for(var n=new Array(r+1),i=0;i<=r;i++)n[i]=Y return new e(n,null,null,null).init({self:t})},e.sized=function(t){void 0===t&&(t=0) for(var r=new Array(t+1),n=0;n<=t;n++)r[n]=Y return new e(r,null,null,null)} var t=e.prototype return t.init=function(e){var t=e.self return this.slots[0]=t,this},t.getSelf=function(){return this.get(0)},t.getSymbol=function(e){return this.get(e)},t.getBlock=function(e){var t=this.get(e) return t===Y?null:t},t.getEvalScope=function(){return this.evalScope},t.getPartialMap=function(){return this.partialMap},t.bind=function(e,t){this.set(e,t)},t.bindSelf=function(e){this.set(0,e)},t.bindSymbol=function(e,t){this.set(e,t)},t.bindBlock=function(e,t){this.set(e,t)},t.bindEvalScope=function(e){this.evalScope=e},t.bindPartialMap=function(e){this.partialMap=e},t.bindCallerScope=function(e){this.callerScope=e},t.getCallerScope=function(){return this.callerScope},t.child=function(){return new e(this.slots.slice(),this.callerScope,this.evalScope,this.partialMap)},t.get=function(e){if(e>=this.slots.length)throw new RangeError("BUG: cannot get $"+e+" from scope; length="+this.slots.length) return this.slots[e]},t.set=function(e,t){if(e>=this.slots.length)throw new RangeError("BUG: cannot get $"+e+" from scope; length="+this.slots.length) this.slots[e]=t},e}() e.ScopeImpl=Te var Ie=(0,r.symbol)("TRANSACTION"),Oe=function(){function e(){this.scheduledInstallManagers=[],this.scheduledInstallModifiers=[],this.scheduledUpdateModifierManagers=[],this.scheduledUpdateModifiers=[],this.createdComponents=[],this.createdManagers=[],this.updatedComponents=[],this.updatedManagers=[],this.destructors=[]}var t=e.prototype return t.didCreate=function(e,t){this.createdComponents.push(e),this.createdManagers.push(t)},t.didUpdate=function(e,t){this.updatedComponents.push(e),this.updatedManagers.push(t)},t.scheduleInstallModifier=function(e,t){this.scheduledInstallModifiers.push(e),this.scheduledInstallManagers.push(t)},t.scheduleUpdateModifier=function(e,t){this.scheduledUpdateModifiers.push(e),this.scheduledUpdateModifierManagers.push(t)},t.willDestroy=function(e){e[r.WILL_DROP]()},t.didDestroy=function(e){this.destructors.push(e)},t.commit=function(){for(var e=this.createdComponents,t=this.createdManagers,n=0;n0?e.join(""):null},r}(n.CachedReference) function We(e){return"function"!=typeof e.toString?"":String(e)}function Ye(e){return e===Y}function Ze(e){return 0|(e.dynamicLayout?1:0)|(e.dynamicTag?2:0)|(e.prepareArgs?4:0)|(e.createArgs?8:0)|(e.attributeHook?16:0)|(e.elementHook?32:0)|(e.dynamicScope?64:0)|(e.createCaller?128:0)|(e.updateHook?256:0)|(e.createInstance?512:0)|(e.wrapped?1024:0)|(e.willDestroy?2048:0)}function Je(e,t,r){return!!(t&r)}function $e(e,t){return!!(e&t)}ze.add(16,(function(e,t){var r=t.op1,n=e.stack,i=e.runtime.resolver.resolve(r)(n.pop(),e) e.loadValue(o.$v0,i)})),ze.add(22,(function(e,t){var r=t.op1,n=e.referenceForSymbol(r) e.stack.push(n)})),ze.add(19,(function(e,t){var r=t.op1,n=e.stack.pop() e.scope().bindSymbol(r,n)})),ze.add(21,(function(e,t){var r=t.op1,n=e.stack.pop(),i=e.stack.pop(),o=e.stack.pop(),a=o?[n,i,o]:null e.scope().bindBlock(r,a)}),"jit"),ze.add(20,(function(e,t){var r=t.op1,n=e.stack.pop(),i=e.stack.pop(),o=e.stack.pop(),a=o?[n,i,o]:null e.scope().bindBlock(r,a)})),ze.add(105,(function(e,t){var r=t.op1,n=e[d].getString(r),i=e.scope().getPartialMap()[n] void 0===i&&(i=e.getSelf().get(n)),e.stack.push(i)})),ze.add(37,(function(e,t){var r=t.op1 e.pushRootScope(r)})),ze.add(23,(function(e,t){var r=t.op1,n=e[d].getString(r),i=e.stack.pop() e.stack.push(i.get(n))})),ze.add(24,(function(e,t){var r=t.op1,n=e.stack,i=e.scope().getBlock(r) n.push(i)})),ze.add(25,(function(e){var t=e.stack,r=t.pop() r&&!Ye(r)?(t.push(r[2]),t.push(r[1]),t.push(r[0])):(t.push(null),t.push(null),t.push(null))})),ze.add(26,(function(e){var t=e.stack,r=t.pop() r&&!Ye(r)?t.push(J):t.push($)})),ze.add(27,(function(e){e.stack.pop(),e.stack.pop() var t=e.stack.pop(),r=t&&t.parameters.length e.stack.push(r?J:$)})),ze.add(28,(function(e,t){for(var r=t.op1,n=new Array(r),i=r;i>0;i--){n[i-1]=e.stack.pop()}e.stack.push(new Ge(n))})) var Qe=(0,r.symbol)("CURRIED COMPONENT DEFINITION") function Xe(e){return!(!e||!e[Qe])}var et=function(){function e(e,t){this.inner=e,this.args=t,this[qe]=!0}return e.prototype.unwrap=function(e){e.realloc(this.offset) for(var t=this;;){var r=t,n=r.args,i=r.inner if(n&&(e.positional.prepend(n.positional),e.named.merge(n.named)),!Xe(i))return i t=i}},(0,t.createClass)(e,[{key:"offset",get:function(){var e=this.inner,t=this.args,r=t?t.positional.length:0 return Xe(e)?r+e.offset:r}}]),e}() function tt(e,t,r){return e.lookupComponent(t,r)}e.CurriedComponentDefinition=et,qe=Qe var rt=function(){function e(e){this.list=e,this.tag=Ve(e),this.list=e}return e.prototype.value=function(){for(var e=[],t=this.list,r=0;r-1073741825?e[d].getString((0,r.decodeHandle)(i,-1)):e[d].getNumber((0,r.decodeHandle)(i,-1073741825)),o.pushJs(n)):o.pushRaw(i)})),ze.add(31,(function(e){var t=e.stack t.push(q.create(t.pop()))})),ze.add(32,(function(e){var t=e.stack t.push(t.peek().value())})),ze.add(33,(function(e,t){var r=t.op1,n=t.op2,i=e.fetchValue(r)-n e.stack.dup(i)})),ze.add(34,(function(e,t){var r=t.op1 e.stack.pop(r)})),ze.add(35,(function(e,t){var r=t.op1 e.load(r)})),ze.add(36,(function(e,t){var r=t.op1 e.fetch(r)})),ze.add(58,(function(e,t){var r=t.op1,n=e[d].getArray(r) e.bindDynamicScope(n)})),ze.add(69,(function(e,t){var r=t.op1 e.enter(r)})),ze.add(70,(function(e){e.exit()})),ze.add(63,(function(e,t){var r=t.op1 e.stack.push(e[d].getSerializable(r))})),ze.add(62,(function(e){e.stack.push(e.scope())})),ze.add(61,(function(e){var t=e.stack,r=t.pop() r?t.push(e.compile(r)):t.push(null)}),"jit"),ze.add(64,(function(e){var t=e.stack,r=t.pop(),n=t.pop(),i=t.pop(),o=t.pop() if(null===i)return e.pushFrame(),void e.pushScope(n) var a=n,s=i.parameters,u=s.length if(u>0){a=a.child() for(var l=0;l>4,l=8&o,c=7&o?e[d].getStringArray(i):r.EMPTY_ARRAY e[p].setup(a,s,c,u,!!l),a.push(e[p])})),ze.add(85,(function(e){var t=e.stack t.push(e[p].empty(t))})),ze.add(88,(function(e){var t=e.stack,r=t.pop().capture() t.push(r)})),ze.add(87,(function(e,t){var r=t.op1,n=e.stack,i=e.fetchValue(r),o=n.pop(),a=i.definition Xe(a)&&(a=function(e,t,r){var n=e.definition=t.unwrap(r),i=n.manager,o=n.state return e.manager=i,e.capabilities=Ze(i.getCapabilities(o)),n}(i,a,o)) var s=a,u=s.manager,l=s.state if(Je(0,i.capabilities,4)){var c=o.blocks.values,f=o.blocks.names,h=u.prepareArgs(l,o) if(h){o.clear() for(var d=0;d=0;s--){var u=a[s],l=n.table.symbols.indexOf(a[s]),c=o.named.get(u,!0);-1!==l&&i.bindSymbol(l+1,c),n.lookup&&(n.lookup[u]=c)}})),ze.add(18,(function(e,t){for(var r=t.op1,n=e.fetchValue(r),i=e.stack.peek().blocks,o=0;o)` to debug this template."),t("this")}var St=_t var Et=function(){function e(e,t,n){this.scope=e,this.locals=(0,r.dict)() for(var i=0;i0&&null!==t){for(var r=this.positional,n=this.named,i=r.base+e,a=r.length+n.length-1;a>=0;a--)t.copy(a+r.base,a+i) r.base+=e,n.base+=e,t[f][o.$sp]+=e}},r.capture=function(){var e=0===this.positional.length?Ft:this.positional.capture(),t=0===this.named.length?Ut:this.named.capture() return new jt(this.tag,e,t,this.length)},r.clear=function(){var e=this.stack,t=this.length t>0&&null!==e&&e.pop(t)},(0,t.createClass)(e,[{key:"tag",get:function(){return Ve([this.positional,this.named])}},{key:"base",get:function(){return this.blocks.base}},{key:"length",get:function(){return this.positional.length+this.named.length+3*this.blocks.length}}]),e}(),Ct=function(){function e(){this.base=0,this.length=0,this.stack=null,this._tag=null,this._references=null}var n=e.prototype return n.empty=function(e,t){this.stack=e,this.base=t,this.length=0,this._tag=a.CONSTANT_TAG,this._references=r.EMPTY_ARRAY},n.setup=function(e,t,n){this.stack=e,this.base=t,this.length=n,0===n?(this._tag=a.CONSTANT_TAG,this._references=r.EMPTY_ARRAY):(this._tag=null,this._references=null)},n.at=function(e){var t=this.base,r=this.length,n=this.stack return e<0||e>=r?Y:n.get(e,t)},n.capture=function(){return new Rt(this.tag,this.references)},n.prepend=function(e){var t=e.length if(t>0){var r=this.base,n=this.length,i=this.stack this.base=r-=t,this.length=n+t for(var o=0;o=r?Y:t[n]},t.valueOf=function(e){return e.value()},e}() e.CapturedPositionalArgumentsImpl=Rt var Pt=function(){function e(){this.base=0,this.length=0,this._references=null,this._names=r.EMPTY_ARRAY,this._atNames=r.EMPTY_ARRAY}var n=e.prototype return n.empty=function(e,t){this.stack=e,this.base=t,this.length=0,this._references=r.EMPTY_ARRAY,this._names=r.EMPTY_ARRAY,this._atNames=r.EMPTY_ARRAY},n.setup=function(e,t,n,i,o){this.stack=e,this.base=t,this.length=n,0===n?(this._references=r.EMPTY_ARRAY,this._names=r.EMPTY_ARRAY,this._atNames=r.EMPTY_ARRAY):(this._references=null,o?(this._names=null,this._atNames=i):(this._names=i,this._atNames=null))},n.has=function(e){return-1!==this.names.indexOf(e)},n.get=function(e,t){void 0===t&&(t=!1) var r=this.base,n=this.stack,i=(t?this.atNames:this.names).indexOf(e) return-1===i?Y:n.get(i,r)},n.capture=function(){return new Nt(this.tag,this.names,this.references)},n.merge=function(e){var t=e.length if(t>0){var r=this.names,n=this.length,i=this.stack,o=e.names Object.isFrozen(r)&&0===r.length&&(r=[]) for(var a=0;a=0;r--){var n=this[d].getString(e[r]) t.set(n,this.stack.pop())}},(0,t.createClass)(e,[{key:"stack",get:function(){return this[u].stack}},{key:"pc",get:function(){return this[u].fetchRegister(o.$pc)}},{key:"program",get:function(){return this.runtime.program}},{key:"env",get:function(){return this.runtime.env}}]),e}() function nr(e,t,r){return void 0===t&&(t=Te.root(Y,0)),{pc:e,scope:t,dynamicScope:r,stack:[]}}e.LowLevelVM=rr,Kt=c,qt=l var ir=function(e){function r(){return e.apply(this,arguments)||this}return(0,t.inheritsLoose)(r,e),r.empty=function(e,t){var r=t.handle,n=t.treeBuilder,i=t.dynamicScope,o=or(e,nr(e.program.heap.getaddr(r),Te.root(Y,0),i),n) return o.pushUpdating(),o},r.initial=function(e,t){var r=t.handle,n=t.self,i=t.treeBuilder,o=t.dynamicScope,a=e.program.heap.scopesizeof(r),s=Te.root(n,a),u=e.program.heap.getaddr(r),l=or(e,nr(u,s,o),i) return l.pushUpdating(),l},r.prototype.capture=function(e,t){return void 0===t&&(t=this[u].fetchRegister(o.$pc)),new Gt(this.captureState(e,t),or)},r}(rr) function or(e,t,r){return new ir(e,t,r)}function ar(e){return function(t,r,n){return new sr(t,r,n,e)}}var sr=function(e){function n(t,r,n,i){var o return(o=e.call(this,t,r,n)||this).context=i,o.resume=ar(o.context),o}(0,t.inheritsLoose)(n,e),n.initial=function(e,t,r){var n=r.handle,i=r.self,o=r.dynamicScope,a=r.treeBuilder,s=e.program.heap.scopesizeof(n),u=Te.root(i,s),l=nr(e.program.heap.getaddr(n),u,o),c=ar(t)(e,l,a) return c.pushUpdating(),c},n.empty=function(e,t,r){var n=t.handle,i=t.treeBuilder,o=t.dynamicScope,a=ar(r)(e,nr(e.program.heap.getaddr(n),Te.root(Y,0),o),i) return a.pushUpdating(),a} var i=n.prototype return i.capture=function(e,t){return void 0===t&&(t=this[u].fetchRegister(o.$pc)),new Gt(this.captureState(e,t),this.resume)},i.compile=function(e){return(0,r.unwrapHandle)(e.compile(this.context))},n}(rr),ur=function(){function e(e){this.vm=e}var t=e.prototype return t.next=function(){return this.vm.next()},t.sync=function(){return lr(this.vm.runtime.env,this)},e}() function lr(e,t){var r e.begin() do{r=t.next()}while(!r.done) var n=r.value return e.commit(),n}function cr(e,t,r,n){var i=Object.keys(n).map((function(e){return[e,n[e]]})),o=["main","else","attrs"],a=i.map((function(e){return"@"+e[0]})) e.pushFrame() for(var s=0;s<3*o.length;s++)e.stack.push(null) return e.stack.push(null),i.forEach((function(t){var r=t[1] e.stack.push(r)})),e[p].setup(e.stack,a,o,0,!0),e.stack.push(e[p]),e.stack.push(t),e.stack.push(r),new ur(e)}function fr(e){return"%+b:0%"===e.nodeValue}e.SERIALIZATION_FIRST_NODE_STRING="%+b:0%" var hr=function(e){function r(t,r,n){var i return(i=e.call(this,t,r)||this).startingBlockDepth=n,i.candidate=null,i.injectedOmittedNode=!1,i.openBlockDepth=n-1,i}return(0,t.inheritsLoose)(r,e),r}(m),dr=function(e){function r(t,r,n){var i if((i=e.call(this,t,r,n)||this).unmatchedAttributes=null,i.blockDepth=0,n)throw new Error("Rehydration with nextSibling not supported") for(var o=i.currentCursor.element.firstChild;!(null===o||pr(o)&&fr(o));)o=o.nextSibling return i.candidate=o,i}(0,t.inheritsLoose)(r,e) var n=r.prototype return n.disableRehydration=function(e){var t=this.currentCursor t.candidate=null,t.nextSibling=e},n.enableRehydration=function(e){var t=this.currentCursor t.candidate=e,t.nextSibling=null},n.pushElement=function(e,t){void 0===t&&(t=null) var r=new hr(e,t,this.blockDepth||0) null!==this.candidate&&(r.candidate=e.firstChild,this.candidate=e.nextSibling),this[A].push(r)},n.clearMismatch=function(e){var t=e,r=this.currentCursor if(null!==r){var n=r.openBlockDepth if(n>=r.startingBlockDepth)for(;t;){if(mr(t))if(n>=yr(t))break t=this.remove(t)}else for(;null!==t;)t=this.remove(t) this.disableRehydration(t)}},n.__openBlock=function(){var e=this.currentCursor if(null!==e){var t=this.blockDepth this.blockDepth++ var r=e.candidate if(null!==r){var n,i=e.element.tagName 8===(n=r).nodeType&&0===n.nodeValue.lastIndexOf("%+b:",0)&&yr(r)===t?(this.candidate=this.remove(r),e.openBlockDepth=t):"TITLE"!==i&&"SCRIPT"!==i&&"STYLE"!==i&&this.clearMismatch(r)}}},n.__closeBlock=function(){var e=this.currentCursor if(null!==e){var t=e.openBlockDepth this.blockDepth-- var r=e.candidate,n=!1 if(null!==r)if(n=!0,mr(r)&&yr(r)===t){var i=this.remove(r) this.candidate=i,e.openBlockDepth--}else this.clearMismatch(r),n=!1 if(!1===n){var o=e.nextSibling if(null!==o&&mr(o)&&yr(o)===this.blockDepth){var a=this.remove(o) this.enableRehydration(a),e.openBlockDepth--}}}},n.__appendNode=function(t){var r=this.candidate return r||e.prototype.__appendNode.call(this,t)},n.__appendHTML=function(t){var r=this.markerBounds() if(r){var n=r.firstNode(),i=r.lastNode(),o=new y(this.element,n.nextSibling,i.previousSibling),a=this.remove(n) return this.remove(i),null!==a&&br(a)&&(this.candidate=this.remove(a),null!==this.candidate&&this.clearMismatch(this.candidate)),o}return e.prototype.__appendHTML.call(this,t)},n.remove=function(e){var t=e.parentNode,r=e.nextSibling return t.removeChild(e),r},n.markerBounds=function(){var e=this.candidate if(e&&vr(e)){for(var t=e,r=t.nextSibling;r&&!vr(r);)r=r.nextSibling return new y(this.element,t,r)}return null},n.__appendText=function(t){var r=this.candidate return r?3===r.nodeType?(r.nodeValue!==t&&(r.nodeValue=t),this.candidate=r.nextSibling,r):function(e){return 8===e.nodeType&&"%|%"===e.nodeValue}(r)||br(r)&&""===t?(this.candidate=this.remove(r),this.__appendText(t)):(this.clearMismatch(r),e.prototype.__appendText.call(this,t)):e.prototype.__appendText.call(this,t)},n.__appendComment=function(t){var r=this.candidate return r&&pr(r)?(r.nodeValue!==t&&(r.nodeValue=t),this.candidate=r.nextSibling,r):(r&&this.clearMismatch(r),e.prototype.__appendComment.call(this,t))},n.__openElement=function(t){var r=this.candidate if(r&&gr(r)&&function(e,t){if("http://www.w3.org/2000/svg"===e.namespaceURI)return e.tagName===t return e.tagName===t.toUpperCase()}(r,t))return this.unmatchedAttributes=[].slice.call(r.attributes),r if(r){if(gr(r)&&"TBODY"===r.tagName)return this.pushElement(r,null),this.currentCursor.injectedOmittedNode=!0,this.__openElement(t) this.clearMismatch(r)}return e.prototype.__openElement.call(this,t)},n.__setAttribute=function(t,r,n){var i=this.unmatchedAttributes if(i){var o=wr(i,t) if(o)return o.value!==r&&(o.value=r),void i.splice(i.indexOf(o),1)}return e.prototype.__setAttribute.call(this,t,r,n)},n.__setProperty=function(t,r){var n=this.unmatchedAttributes if(n){var i=wr(n,t) if(i)return i.value!==r&&(i.value=r),void n.splice(n.indexOf(i),1)}return e.prototype.__setProperty.call(this,t,r)},n.__flushElement=function(t,r){var n=this.unmatchedAttributes if(n){for(var i=0;i0?(p.delete(e),t):null},e.willDestroyAssociated=_,e.didDestroyAssociated=S,e.destructor=E,e.snapshot=function(e){return new k(e)},e.debugDropTree=function e(r){var n=b(r),i=p.get(r)||null,o=null if(i){o=[] for(var a,s=(0,t.createForOfIteratorHelperLoose)(i);!(a=s()).done;){var u=a.value o.push(e(u))}}var l=Object.create(null) l.inner=r,o&&(l.children=o) return l.hasDrop=n,l},e.printDropTree=function(e){I(E(e))},e.printDrop=I,e.keys=function(e){return Object.keys(e)},e.unwrap=function(e){if(null==e)throw new Error("Expected value to be present") return e} e.expect=function(e,t){if(null==e)throw new Error(t) return e},e.unreachable=function(e){void 0===e&&(e="unreachable") return new Error(e)},e.exhausted=l,e.strip=function(e){for(var r="",n=arguments.length,i=new Array(n>1?n-1:0),o=1;o1073741823)switch(e){case 1073741824:return!1 case 1073741825:return!0 case 1073741826:return null case 1073741827:return default:return 1073741827-e}return e},e.isSmallInt=function(e){return function(e,t,r){return e%1==0&&e>=t&&e<=r}(e,-1073741820,1073741823)},e.isHandle=function(e){return e<0},e.encodeHandle=function(e,t,r){void 0===t&&(t=2147483647) void 0===r&&(r=-1) if(e>t)throw new Error("index "+e+" overflowed range 0 to "+t) return r-e},e.decodeHandle=function(e,t){void 0===t&&(t=-1) return t-e},e.unwrapHandle=function(e){if("number"==typeof e)return e var t=e.errors[0] throw new Error("Compile Error: "+t.problem+" @ "+t.span.start+".."+t.span.end)},e.unwrapTemplate=function(e){if("error"===e.result)throw new Error("Compile Error: "+e.problem+" @ "+e.span.start+".."+e.span.end) return e},e.extractHandle=function(e){return"number"==typeof e?e:e.handle},e.isOkHandle=function(e){return"number"==typeof e},e.isErrHandle=function(e){return"number"==typeof e},e.symbol=e.tuple=e.ListContentsDestructor=e.DESTRUCTORS=e.CHILDREN=e.DID_DROP=e.WILL_DROP=e.LINKED=e.DESTROY=e.debugToString=e.ListSlice=e.ListNode=e.LinkedList=e.EMPTY_SLICE=e.SERIALIZATION_FIRST_NODE_STRING=e.Stack=e.DictSet=e.EMPTY_ARRAY=void 0 var r=Object.freeze([]) e.EMPTY_ARRAY=r var n=0 function i(e){return e._guid=++n}function o(e){return e._guid||i(e)}function a(){return Object.create(null)}var s=function(){function e(){this.dict=a()}var t=e.prototype return t.add=function(e){return"string"==typeof e?this.dict[e]=e:this.dict[o(e)]=e,this},t.delete=function(e){"string"==typeof e?delete this.dict[e]:e._guid&&delete this.dict[e._guid]},e}() e.DictSet=s var u=function(){function e(){this.stack=[],this.current=null}var r=e.prototype return r.push=function(e){this.current=e,this.stack.push(e)},r.pop=function(){var e=this.stack.pop(),t=this.stack.length return this.current=0===t?null:this.stack[t-1],void 0===e?null:e},r.nth=function(e){var t=this.stack.length return t=e[s]()}e.COMPUTE=s var c,f=o("TAG_TYPE") e.ALLOW_CYCLES=c var h=function(){function e(e){this.revision=1,this.lastChecked=1,this.lastValue=1,this.isUpdating=!1,this.subtags=null,this.subtag=null,this.subtagBufferCache=null,this[f]=e}return e.prototype[s]=function(){var e=this.lastChecked if(!0===this.isUpdating)this.lastChecked=++a else if(e!==a){this.isUpdating=!0,this.lastChecked=a try{var t=this.subtags,r=this.subtag,n=this.subtagBufferCache,i=this.lastValue,o=this.revision if(null!==r){var u=r[s]() u===n?o=Math.max(o,i):(this.subtagBufferCache=null,o=Math.max(o,u))}if(null!==t)for(var l=0;l=0&&e<=15},e.isOp=function(e){return e>=16},e.isLowLevelRegister=function(e){return e<=3},e.$v0=e.$t1=e.$t0=e.$s1=e.$s0=e.$sp=e.$ra=e.$fp=e.$pc=e.TemporaryRegister=e.SavedRegister=void 0 e.$pc=0 e.$ra=1 e.$fp=2 e.$sp=3 e.$s0=4 e.$s1=5 e.$t0=6 e.$t1=7 var t,r e.$v0=8,e.SavedRegister=t,function(e){e[e.s0=4]="s0",e[e.s1=5]="s1"}(t||(e.SavedRegister=t={})),e.TemporaryRegister=r,function(e){e[e.t0=6]="t0",e[e.t1=7]="t1"}(r||(e.TemporaryRegister=r={}))})),e("@glimmer/wire-format",["exports"],(function(e){"use strict" function t(e){return function(t){return Array.isArray(t)&&t[0]===e}}Object.defineProperty(e,"__esModule",{value:!0}),e.is=t,e.isAttribute=function(e){return 14===e[0]||15===e[0]||22===e[0]||16===e[0]||24===e[0]||23===e[0]||17===e[0]||4===e[0]},e.isArgument=function(e){return 21===e[0]||20===e[0]},e.isHelper=function(e){return Array.isArray(e)&&30===e[0]},e.isGet=e.isFlushElement=void 0 var r=t(12) e.isFlushElement=r var n=t(32) e.isGet=n})),e("@simple-dom/document",["exports","ember-babel"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var r=[] function n(e,t,r){for(var n=0;n=t[r=i+(n=(o-i)/6)-n%6]?i=r+6:o=r return e>=t[i]?i+6:i}var d=function(){function e(e,t,r){void 0===t&&(t={}),void 0===r&&(r={}),this._queueBeingFlushed=[],this.targetQueues=new Map,this.index=0,this._queue=[],this.name=e,this.options=t,this.globalOptions=r}var t=e.prototype return t.stackFor=function(e){if(e0){var s=u(this.globalOptions) r=s?this.invokeWithOnError:this.invoke for(var l=this.index;l0&&this.flush(!0)},t.hasWork=function(){return this._queueBeingFlushed.length>0||this._queue.length>0},t.cancel=function(e){var t=e.target,r=e.method,n=this._queue,i=this.targetQueues.get(t) void 0!==i&&i.delete(r) var o=l(t,r,n) return o>-1?(n.splice(o,4),!0):(o=l(t,r,n=this._queueBeingFlushed))>-1&&(n[o+1]=null,!0)},t.push=function(e,t,r,n){return this._queue.push(e,t,r,n),{queue:this,target:e,method:t}},t.pushUnique=function(e,t,r,n){var i=this.targetQueues.get(e) void 0===i&&(i=new Map,this.targetQueues.set(e,i)) var o=i.get(t) if(void 0===o){var a=this._queue.push(e,t,r,n)-4 i.set(t,a)}else{var s=this._queue s[o+2]=r,s[o+3]=n}return{queue:this,target:e,method:t}},t._getDebugInfo=function(e){if(e)return f(this._queue,4)},t.invoke=function(e,t,r){void 0===r?t.call(e):t.apply(e,r)},t.invokeWithOnError=function(e,t,r,n,i){try{void 0===r?t.call(e):t.apply(e,r)}catch(o){n(o,i)}},e}(),p=function(){function e(e,t){void 0===e&&(e=[]),this.queues={},this.queueNameIndex=0,this.queueNames=e,e.reduce((function(e,r){return e[r]=new d(r,t[r],t),e}),this.queues)}var t=e.prototype return t.schedule=function(e,t,r,n,i,o){var a=this.queues[e] if(void 0===a)throw new Error("You attempted to schedule an action in a queue ("+e+") that doesn't exist") if(null==r)throw new Error("You attempted to schedule an action in a queue ("+e+") for a method that doesn't exist") return this.queueNameIndex=0,i?a.pushUnique(t,r,n,o):a.push(t,r,n,o)},t.flush=function(e){var t,r void 0===e&&(e=!1) for(var n=this.queueNames.length;this.queueNameIndexi){var u=n-i e=new Array(u) for(var l=0;l0){var a=n[o-1] s(a)&&(i=parseInt(n.pop(),10))}return[t,r,n,i]}function w(){var e,t,r,n,i if(2===arguments.length)t=arguments[0],i=arguments[1],e=null else{var o=v.apply(void 0,arguments) e=o[0],t=o[1],void 0===(n=o[2])?i=0:s(i=n.pop())||(r=!0===i,i=n.pop())}return[e,t,n,i=parseInt(i,10),r]}var _=0,S=0,E=0,k=0,M=0,x=0,A=0,T=0,I=0,O=0,C=0,R=0,P=0,N=0,D=0,B=0,L=0,j=0,U=0,F=0,z=0,H=function(){function e(e,t){var r=this this.DEBUG=!1,this.currentInstance=null,this.instanceStack=[],this._eventCallbacks={end:[],begin:[]},this._timerTimeoutId=null,this._timers=[],this._autorun=!1,this._autorunStack=null,this.queueNames=e,this.options=t||{},"string"==typeof this.options.defaultQueue?this._defaultQueue=this.options.defaultQueue:this._defaultQueue=this.queueNames[0],this._onBegin=this.options.onBegin||y,this._onEnd=this.options.onEnd||y,this._boundRunExpiredTimers=this._runExpiredTimers.bind(this),this._boundAutorunEnd=function(){U++,!1!==r._autorun&&(r._autorun=!1,r._autorunStack=null,r._end(!0))} var n=this.options._buildPlatform||o this._platform=n(this._boundAutorunEnd)}var r=e.prototype return r.begin=function(){S++ var e,t=this.options,r=this.currentInstance return!1!==this._autorun?(e=r,this._cancelAutorun()):(null!==r&&(z++,this.instanceStack.push(r)),F++,e=this.currentInstance=new p(this.queueNames,t),k++,this._trigger("begin",e,r)),this._onBegin(e,r),e},r.end=function(){E++,this._end(!1)},r.on=function(e,t){if("function"!=typeof t)throw new TypeError("Callback must be a function") var r=this._eventCallbacks[e] if(void 0===r)throw new TypeError("Cannot on() event "+e+" because it does not exist") r.push(t)},r.off=function(e,t){var r=this._eventCallbacks[e] if(!e||void 0===r)throw new TypeError("Cannot off() event "+e+" because it does not exist") var n=!1 if(t)for(var i=0;i3?n-3:0),o=3;o1?t-1:0),n=1;n3?n-3:0),o=3;o1?t-1:0),n=1;n0||this._autorun},r.cancel=function(e){if(L++,null==e)return!1 var t=typeof e return"number"===t?this._cancelLaterTimer(e):!("object"!==t||!e.queue||!e.method)&&e.queue.cancel(e)},r.ensureInstance=function(){this._ensureInstance()},r.getDebugInfo=function(){var e=this if(this.DEBUG)return{autorun:this._autorunStack,counters:this.counters,timers:f(this._timers,6,2),instanceStack:[this.currentInstance].concat(this.instanceStack).map((function(t){return t&&t._getDebugInfo(e.DEBUG)}))}},r._end=function(e){var t=this.currentInstance,r=null if(null===t)throw new Error("end called without begin") var n,i=!1 try{n=t.flush(e)}finally{if(!i)if(i=!0,1===n){var o=this.queueNames[t.queueNameIndex] this._scheduleAutorun(o)}else this.currentInstance=null,this.instanceStack.length>0&&(r=this.instanceStack.pop(),this.currentInstance=r),this._trigger("end",t,r),this._onEnd(t,r)}},r._join=function(e,t,r){return null===this.currentInstance?this._run(e,t,r):void 0===e&&void 0===r?t():t.apply(e,r)},r._run=function(e,t,r){var n=u(this.options) if(this.begin(),n)try{return t.apply(e,r)}catch(i){n(i)}finally{this.end()}else try{return t.apply(e,r)}finally{this.end()}},r._cancelAutorun=function(){this._autorun&&(this._platform.clearNext(),this._autorun=!1,this._autorunStack=null)},r._later=function(e,t,r,n){var i=this.DEBUG?new Error:void 0,o=this._platform.now()+n,a=_++ if(0===this._timers.length)this._timers.push(o,a,e,t,r,i),this._installTimerTimeout() else{var s=h(o,this._timers) this._timers.splice(s,0,o,a,e,t,r,i),this._reinstallTimerTimeout()}return a},r._cancelLaterTimer=function(e){for(var t=1;t0&&(this.begin(),this._scheduleExpiredTimers(),this.end())},r._scheduleExpiredTimers=function(){for(var e=this._timers,t=0,r=e.length,n=this._defaultQueue,i=this._platform.now();ti)break var o=e[t+4] if(o!==g){var a=e[t+2],s=e[t+3],u=e[t+5] this.currentInstance.schedule(n,a,s,o,!1,u)}}e.splice(0,t),this._installTimerTimeout()},r._reinstallTimerTimeout=function(){this._clearTimerTimeout(),this._installTimerTimeout()},r._clearTimerTimeout=function(){null!==this._timerTimeoutId&&(this._platform.clearTimeout(this._timerTimeoutId),this._timerTimeoutId=null)},r._installTimerTimeout=function(){if(0!==this._timers.length){var e=this._timers[0],t=this._platform.now(),r=Math.max(0,e-t) this._timerTimeoutId=this._platform.setTimeout(this._boundRunExpiredTimers,r)}},r._ensureInstance=function(){var e=this.currentInstance return null===e&&(this._autorunStack=this.DEBUG?new Error:void 0,e=this.begin(),this._scheduleAutorun(this.queueNames[0])),e},r._scheduleAutorun=function(e){j++ var t=this._platform.next,r=this.options.flush r?r(e,t):t(),this._autorun=!0},(0,t.createClass)(e,[{key:"counters",get:function(){return{begin:S,end:E,events:{begin:k,end:0},autoruns:{created:j,completed:U},run:M,join:x,defer:A,schedule:T,scheduleIterable:I,deferOnce:O,scheduleOnce:C,setTimeout:R,later:P,throttle:N,debounce:D,cancelTimers:B,cancel:L,loops:{total:F,nested:z}}}},{key:"defaultQueue",get:function(){return this._defaultQueue}}]),e}() H.Queue=d,H.buildPlatform=o,H.buildNext=i var V=H e.default=V})),e("dag-map",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var t=function(){function e(){this._vertices=new r}return e.prototype.add=function(e,t,r,n){if(!e)throw new Error("argument `key` is required") var i=this._vertices,o=i.add(e) if(o.val=t,r)if("string"==typeof r)i.addEdge(o,i.add(r)) else for(var a=0;a0){var n="cycle detected: "+t throw this.each(this.path,(function(e){n+=" <- "+e})),new Error(n)}}},e.prototype.reset=function(){this.stack.length=0,this.path.length=0,this.result.length=0 for(var e=0,t=this.length;e=0){var a=this[o] if(a.flag)continue if(a.flag=!0,n.push(o),t===a.key)break r.push(~o),this.pushIncoming(a)}else n.pop(),i.push(~o)}},e.prototype.pushIncoming=function(e){for(var t=this.stack,r=e.length-1;r>=0;r--){var n=e[r] this[n].flag||t.push(n)}},e.prototype.each=function(e,t){for(var r=0,n=e.length;r=e.length?{done:!0}:{done:!1,value:e[t++]}} throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)} var t=Object.setPrototypeOf,r=Object.getPrototypeOf,n="object"==typeof Reflect&&"function"==typeof Reflect.construct,i=new Map function o(e,t){for(var r=0;re.length)&&(t=e.length) for(var r=new Array(t),n=0;n0&&47===t.charCodeAt(0)&&(t=t.substr(1)) for(var n=t.split("/"),i=void 0,o=void 0,a=0;a2&&"[]"===o.slice(a-2)&&(s=!0,r[o=o.slice(0,a-2)]||(r[o]=[])),u=i[1]?A(i[1]):""),s?r[o].push(u):r[o]=u}return r},T.prototype.recognize=function(e){var t,r=[this.rootState],n={},i=!1,o=e.indexOf("#");-1!==o&&(e=e.substr(0,o)) var a=e.indexOf("?") if(-1!==a){var u=e.substr(a+1,e.length) e=e.substr(0,a),n=this.parseQueryString(u)}"/"!==e.charAt(0)&&(e="/"+e) var l=e T.ENCODE_AND_DECODE_PATH_SEGMENTS?e=s(e):(e=decodeURI(e),l=decodeURI(l)) var c=e.length c>1&&"/"===e.charAt(c-1)&&(e=e.substr(0,c-1),l=l.substr(0,l.length-1),i=!0) for(var f=0;f0){var n=e[r-1] if(function(e){return e&&s.call(e,"queryParams")}(n))return t=n.queryParams,[a.call(e,0,r-1),t]}return[e,null]}function c(e){for(var t in e){var r=e[t] if("number"==typeof r)e[t]=""+r else if(Array.isArray(r))for(var n=0,i=r.length;n1?t-1:0),n=1;n2?r-2:0),i=2;io;o++)if(n=E.get(e[o]),t.call(r,n,o,i))return n},get name(){return a},get paramNames(){return u},get metadata(){return x(i.route)},get parent(){var t=e[o-1] return void 0===t?null:E.get(t)},get child(){var t=e[o+1] return void 0===t?null:E.get(t)},get localName(){var e=this.name.split(".") return e[e.length-1]},get params(){return s},get queryParams(){return r}} return n&&(d=M(d,l)),E.set(i,d),d}))}function M(e,r){var n={get attributes(){return r}} return Object.isFrozen(e)||e.hasOwnProperty("attributes")?Object.freeze((0,t.assign)({},e,n)):(0,t.assign)(e,n)}function x(e){return null!=e&&void 0!==e.buildRouteInfoMetadata?e.buildRouteInfoMetadata():null}var A=function(){function e(e,t,r,n){this._routePromise=void 0,this._route=null,this.params={},this.isResolved=!1,this.name=t,this.paramNames=r,this.router=e,n&&this._processRoute(n)}var t=e.prototype return t.getModel=function(e){return n.Promise.resolve(this.context)},t.serialize=function(e){return this.params||{}},t.resolve=function(e,t){var r=this return n.Promise.resolve(this.routePromise).then((function(t){return r.checkForAbort(e,t)})).then((function(){return r.runBeforeModelHook(t)})).then((function(){return r.checkForAbort(e,null)})).then((function(){return r.getModel(t)})).then((function(t){return r.checkForAbort(e,t)})).then((function(e){return r.runAfterModelHook(t,e)})).then((function(e){return r.becomeResolved(t,e)}))},t.becomeResolved=function(e,t){var r,n=this.serialize(t) e&&(this.stashResolvedModel(e,t),e[v]=e[v]||{},e[v][this.name]=n) var i=t===this.context !("context"in this)&&i||(r=t) var o=E.get(this),a=new T(this.router,this.name,this.paramNames,n,this.route,r) return void 0!==o&&E.set(a,o),a},t.shouldSupercede=function(e){if(!e)return!0 var t=e.context===this.context return e.name!==this.name||"context"in this&&!t||this.hasOwnProperty("params")&&!function(e,t){if(!e!=!t)return!1 if(!e)return!0 for(var r in e)if(e.hasOwnProperty(r)&&e[r]!==t[r])return!1 return!0}(this.params,e.params)},t.log=function(e,t){e.log&&e.log(this.name+": "+t)},t.updateRoute=function(e){return e._internalName=this.name,this.route=e},t.runBeforeModelHook=function(e){var t return e.trigger&&e.trigger(!0,"willResolveModel",e,this.route),this.route&&void 0!==this.route.beforeModel&&(t=this.route.beforeModel(e)),S(t)&&(t=null),n.Promise.resolve(t)},t.runAfterModelHook=function(e,t){var r,i,o=this.name return this.stashResolvedModel(e,t),void 0!==this.route&&void 0!==this.route.afterModel&&(r=this.route.afterModel(t,e)),r=S(i=r)?null:i,n.Promise.resolve(r).then((function(){return e.resolvedModels[o]}))},t.checkForAbort=function(e,t){return n.Promise.resolve(e()).then((function(){return t}),null)},t.stashResolvedModel=function(e,t){e.resolvedModels=e.resolvedModels||{},e.resolvedModels[this.name]=t},t.fetchRoute=function(){var e=this.router.getRoute(this.name) return this._processRoute(e)},t._processRoute=function(e){var t,r=this return this.routePromise=n.Promise.resolve(e),null!==(t=e)&&"object"==typeof t&&"function"==typeof t.then?(this.routePromise=this.routePromise.then((function(e){return r.updateRoute(e)})),this.route=void 0):e?this.updateRoute(e):void 0},(0,r.createClass)(e,[{key:"route",get:function(){return null!==this._route?this._route:this.fetchRoute()},set:function(e){this._route=e}},{key:"routePromise",get:function(){return this._routePromise||this.fetchRoute(),this._routePromise},set:function(e){this._routePromise=e}}]),e}() e.InternalRouteInfo=A var T=function(e){function t(t,r,n,i,o,a){var s return(s=e.call(this,t,r,n,o)||this).params=i,s.isResolved=!0,s.context=a,s}return(0,r.inheritsLoose)(t,e),t.prototype.resolve=function(e,t){return t&&t.resolvedModels&&(t.resolvedModels[this.name]=this.context),n.Promise.resolve(this)},t}(A),I=function(e){function t(t,r,n,i,o){var a return(a=e.call(this,t,r,n,o)||this).params={},a.params=i,a}return(0,r.inheritsLoose)(t,e),t.prototype.getModel=function(e){var t=this.params e&&e[b]&&(u(t={},this.params),t.queryParams=e[b]) var r=this.route,i=void 0 return r.deserialize?i=r.deserialize(t,e):r.model&&(i=r.model(t,e)),i&&S(i)&&(i=void 0),n.Promise.resolve(i)},t}(A),O=function(e){function t(t,r,n,i){var o return(o=e.call(this,t,r,n)||this).context=i,o.serializer=o.router.getSerializer(r),o}(0,r.inheritsLoose)(t,e) var n=t.prototype return n.getModel=function(t){return void 0!==this.router.log&&this.router.log(this.name+": resolving provided model"),e.prototype.getModel.call(this,t)},n.serialize=function(e){var t=this.paramNames,r=this.context e||(e=r) var n={} if(h(e))return n[t[0]]=e,n if(this.serializer)return this.serializer.call(null,e,t) if(void 0!==this.route&&this.route.serialize)return this.route.serialize(e,t) if(1===t.length){var i=t[0] return/_id$/.test(i)?n[i]=e.id:n[i]=e,n}},t}(A) var C=function(e,t){void 0===t&&(t={}),this.router=e,this.data=t},R=function(){function e(){this.routeInfos=[],this.queryParams={},this.params={}}var t=e.prototype return t.promiseLabel=function(e){var t="" return d(this.routeInfos,(function(e){return""!==t&&(t+="."),t+=e.name,!0})),y("'"+t+"': "+e)},t.resolve=function(e,t){var r=this.params d(this.routeInfos,(function(e){return r[e.name]=e.params||{},!0})),t.resolveIndex=0 var i=this,o=!1 return n.Promise.resolve(null,this.promiseLabel("Start transition")).then(u,null,this.promiseLabel("Resolve route")).catch((function(e){var r=i.routeInfos,a=t.resolveIndex>=r.length?r.length-1:t.resolveIndex return n.Promise.reject(new P(e,i.routeInfos[a].route,o,i))}),this.promiseLabel("Handle error")) function a(){return n.Promise.resolve(e(),i.promiseLabel("Check if should continue")).catch((function(e){return o=!0,n.Promise.reject(e)}),i.promiseLabel("Handle abort"))}function s(e){var r=i.routeInfos[t.resolveIndex].isResolved if(i.routeInfos[t.resolveIndex++]=e,!r){var n=e.route void 0!==n&&n.redirect&&n.redirect(e.context,t)}return a().then(u,null,i.promiseLabel("Resolve route"))}function u(){return t.resolveIndex===i.routeInfos.length?i:i.routeInfos[t.resolveIndex].resolve(a,t).then(s,null,i.promiseLabel("Proceed"))}},e}() e.TransitionState=R var P=function(e,t,r,n){this.error=e,this.route=t,this.wasAborted=r,this.state=n} e.TransitionError=P var N=function(e){function t(t,r,n,i,o,a){var s return void 0===i&&(i=[]),void 0===o&&(o={}),(s=e.call(this,t,a)||this).preTransitionState=void 0,s.name=r,s.pivotHandler=n,s.contexts=i,s.queryParams=o,s}(0,r.inheritsLoose)(t,e) var n=t.prototype return n.applyToState=function(e,t){var r=l([this.name].concat(this.contexts))[0],n=this.router.recognizer.handlersFor(r[0]),i=n[n.length-1].handler return this.applyToHandlers(e,n,i,t,!1)},n.applyToHandlers=function(e,t,r,n,i){var o,a,s=new R,l=this.contexts.slice(0),c=t.length if(this.pivotHandler)for(o=0,a=t.length;o=0;--o){var f=t[o],h=f.handler,d=e.routeInfos[o],p=null if(p=f.names.length>0?o>=c?this.createParamHandlerInfo(h,f.names,l,d):this.getHandlerInfoForDynamicSegment(h,f.names,l,d,r,o):this.createParamHandlerInfo(h,f.names,l,d),i){p=p.becomeResolved(null,p.context) var m=d&&d.context f.names.length>0&&void 0!==d.context&&p.context===m&&(p.params=d&&d.params),p.context=m}var y=d;(o>=c||p.shouldSupercede(d))&&(c=Math.min(o,c),y=p),n&&!i&&(y=y.becomeResolved(null,y.context)),s.routeInfos.unshift(y)}if(l.length>0)throw new Error("More context objects were passed than there are dynamic segments for the route: "+r) return n||this.invalidateChildren(s.routeInfos,c),u(s.queryParams,this.queryParams||{}),s},n.invalidateChildren=function(e,t){for(var r=t,n=e.length;r0){if(h(a=r[r.length-1]))return this.createParamHandlerInfo(e,t,r,n) r.pop()}else{if(n&&n.name===e)return n if(!this.preTransitionState)return n var s=this.preTransitionState.routeInfos[o] a=s&&s.context}return new O(this.router,e,t,a)},n.createParamHandlerInfo=function(e,t,r,n){for(var i={},o=t.length,a=[];o--;){var s=n&&e===n.name&&n.params||{},u=r[r.length-1],l=t[o] h(u)?i[l]=""+r.pop():s.hasOwnProperty(l)?i[l]=s[l]:a.push(l)}if(a.length>0)throw new Error("You didn't provide enough string/numeric parameters to satisfy all of the dynamic segments for route "+e+". Missing params: "+a) return new I(this.router,e,t,i)},t}(C),D=function(){function e(t){var r=Error.call(this,t) this.name="UnrecognizedURLError",this.message=t||"UnrecognizedURL",Error.captureStackTrace?Error.captureStackTrace(this,e):this.stack=r.stack}return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}(),B=function(e){function t(t,r,n){var i return(i=e.call(this,t,n)||this).url=r,i.preTransitionState=void 0,i}return(0,r.inheritsLoose)(t,e),t.prototype.applyToState=function(e){var t,r,n=new R,i=this.router.recognizer.recognize(this.url) if(!i)throw new D(this.url) var o=!1,a=this.url function s(e){if(e&&e.inaccessibleByURL)throw new D(a) return e}for(t=0,r=i.length;t=0&&n;--r){var i=t[r],o=i.handler e.add(t,{as:o}),n="/"===i.path||""===i.path||".index"===o.slice(-6)}}))},r.hasRoute=function(e){return this.recognizer.hasRoute(e)},r.queryParamsTransition=function(e,t,r,n){var i=this if(this.fireQueryParamDidChange(n,e),!t&&this.activeTransition)return this.activeTransition var o=new w(this,void 0,void 0) return o.queryParamsOnly=!0,r.queryParams=this.finalizeQueryParamChange(n.routeInfos,n.queryParams,o),o[b]=n.queryParams,this.toReadOnlyInfos(o,n),this.routeWillChange(o),o.promise=o.promise.then((function(e){return i._updateURL(o,r),i.didTransition(i.currentRouteInfos),i.toInfos(o,n.routeInfos,!0),i.routeDidChange(o),e}),null,y("Transition complete")),o},r.transitionByIntent=function(e,t){try{return this.getTransitionByIntent(e,t)}catch(r){return new w(this,e,void 0,r,void 0)}},r.recognize=function(e){var t=new B(this,e),r=this.generateNewState(t) if(null===r)return r var n=k(r.routeInfos,r.queryParams) return n[n.length-1]},r.recognizeAndLoad=function(e){var t=new B(this,e),r=this.generateNewState(t) if(null===r)return n.Promise.reject("URL "+e+" was not recognized") var i=new w(this,t,r,void 0) return i.then((function(){var e=k(r.routeInfos,i[b],!0) return e[e.length-1]}))},r.generateNewState=function(e){try{return e.applyToState(this.state,!1)}catch(t){return null}},r.getTransitionByIntent=function(e,t){var r,n=this,i=!!this.activeTransition,o=i?this.activeTransition[g]:this.state,a=e.applyToState(o,t),s=p(o.queryParams,a.queryParams) if(L(a.routeInfos,o.routeInfos)){if(s){var u=this.queryParamsTransition(s,i,o,a) return u.queryParamsOnly=!0,u}return this.activeTransition||new w(this,void 0,void 0)}if(t){var l=new w(this,void 0,void 0) return this.toReadOnlyInfos(l,a),this.setupContexts(a),this.routeWillChange(l),this.activeTransition}return r=new w(this,e,a,void 0,this.activeTransition),function(e,t){if(e.length!==t.length)return!1 for(var r=0,n=e.length;r=0;--a){var s=n[a] u(o,s.params),s.route.inaccessibleByURL&&(r=null)}if(r){o.queryParams=e._visibleQueryParams||t.queryParams var l=this.recognizer.generate(i,o),c=e.isCausedByInitialTransition,f="replace"===r&&!e.isCausedByAbortingTransition,h=e.queryParamsOnly&&"replace"===r,d="replace"===r&&e.isCausedByAbortingReplaceTransition c||f||h||d?this.replaceURL(l):this.updateURL(l)}}},r.finalizeQueryParamChange=function(e,t,r){for(var n in t)t.hasOwnProperty(n)&&null===t[n]&&delete t[n] var i=[] this.triggerEvent(e,!0,"finalizeQueryParamChange",[t,i,r]),r&&(r._visibleQueryParams={}) for(var o={},a=0,s=i.length;a0){var n=k(r,(0,t.assign)({},this._lastQueryParams),!0) e.from=n[n.length-1]||null}},r.toInfos=function(e,r,n){if(void 0===n&&(n=!1),void 0!==e&&r.length>0){var i=k(r,(0,t.assign)({},e[b]),n) e.to=i[i.length-1]||null}},r.notifyExistingHandlers=function(e,t){var r,n,i,o,a=this.state.routeInfos for(n=a.length,r=0;r1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1&&(i-=1)),[360*i,100*o,100*l]},i.rgb.hwb=function(e){var t=e[0],r=e[1],n=e[2] return[i.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(r,n))),100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},i.rgb.cmyk=function(e){var t,r=e[0]/255,n=e[1]/255,i=e[2]/255 return[100*((1-r-(t=Math.min(1-r,1-n,1-i)))/(1-t)||0),100*((1-n-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},i.rgb.keyword=function(e){var n=r[e] if(n)return n var i,o,a,s=1/0 for(var u in t)if(t.hasOwnProperty(u)){var l=t[u],c=(o=e,a=l,Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2)+Math.pow(o[2]-a[2],2)) c.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)+.1805*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},i.rgb.lab=function(e){var t=i.rgb.xyz(e),r=t[0],n=t[1],o=t[2] return n/=100,o/=108.883,r=(r/=95.047)>.008856?Math.pow(r,1/3):7.787*r+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},i.hsl.rgb=function(e){var t,r,n,i,o,a=e[0]/360,s=e[1]/100,u=e[2]/100 if(0===s)return[o=255*u,o,o] t=2*u-(r=u<.5?u*(1+s):u+s-u*s),i=[0,0,0] for(var l=0;l<3;l++)(n=a+1/3*-(l-1))<0&&n++,n>1&&n--,o=6*n<1?t+6*(r-t)*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[l]=255*o return i},i.hsl.hsv=function(e){var t=e[0],r=e[1]/100,n=e[2]/100,i=r,o=Math.max(n,.01) return r*=(n*=2)<=1?n:2-n,i*=o<=1?o:2-o,[t,100*(0===n?2*i/(o+i):2*r/(n+r)),100*((n+r)/2)]},i.hsv.rgb=function(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,i=Math.floor(t)%6,o=t-Math.floor(t),a=255*n*(1-r),s=255*n*(1-r*o),u=255*n*(1-r*(1-o)) switch(n*=255,i){case 0:return[n,u,a] case 1:return[s,n,a] case 2:return[a,n,u] case 3:return[a,s,n] case 4:return[u,a,n] case 5:return[n,a,s]}},i.hsv.hsl=function(e){var t,r,n,i=e[0],o=e[1]/100,a=e[2]/100,s=Math.max(a,.01) return n=(2-o)*a,r=o*s,[i,100*(r=(r/=(t=(2-o)*s)<=1?t:2-t)||0),100*(n/=2)]},i.hwb.rgb=function(e){var t,r,n,i,o,a,s,u=e[0]/360,l=e[1]/100,c=e[2]/100,f=l+c switch(f>1&&(l/=f,c/=f),n=6*u-(t=Math.floor(6*u)),0!=(1&t)&&(n=1-n),i=l+n*((r=1-c)-l),t){default:case 6:case 0:o=r,a=i,s=l break case 1:o=i,a=r,s=l break case 2:o=l,a=r,s=i break case 3:o=l,a=i,s=r break case 4:o=i,a=l,s=r break case 5:o=r,a=l,s=i}return[255*o,255*a,255*s]},i.cmyk.rgb=function(e){var t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100 return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},i.xyz.rgb=function(e){var t,r,n,i=e[0]/100,o=e[1]/100,a=e[2]/100 return r=-.9689*i+1.8758*o+.0415*a,n=.0557*i+-.204*o+1.057*a,t=(t=3.2406*i+-1.5372*o+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,[255*(t=Math.min(Math.max(0,t),1)),255*(r=Math.min(Math.max(0,r),1)),255*(n=Math.min(Math.max(0,n),1))]},i.xyz.lab=function(e){var t=e[0],r=e[1],n=e[2] return r/=100,n/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116))]},i.lab.xyz=function(e){var t,r,n,i=e[0] t=e[1]/500+(r=(i+16)/116),n=r-e[2]/200 var o=Math.pow(r,3),a=Math.pow(t,3),s=Math.pow(n,3) return r=o>.008856?o:(r-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,n=s>.008856?s:(n-16/116)/7.787,[t*=95.047,r*=100,n*=108.883]},i.lab.lch=function(e){var t,r=e[0],n=e[1],i=e[2] return(t=360*Math.atan2(i,n)/2/Math.PI)<0&&(t+=360),[r,Math.sqrt(n*n+i*i),t]},i.lch.lab=function(e){var t,r=e[0],n=e[1] return t=e[2]/360*2*Math.PI,[r,n*Math.cos(t),n*Math.sin(t)]},i.rgb.ansi16=function(e){var t=e[0],r=e[1],n=e[2],o=1 in arguments?arguments[1]:i.rgb.hsv(e)[2] if(0===(o=Math.round(o/50)))return 30 var a=30+(Math.round(n/255)<<2|Math.round(r/255)<<1|Math.round(t/255)) return 2===o&&(a+=60),a},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){var t=e[0],r=e[1],n=e[2] return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},i.ansi16.rgb=function(e){var t=e%10 if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t] var r=.5*(1+~~(e>50)) return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},i.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8 return[t,t,t]}var r return e-=16,[Math.floor(e/36)/5*255,Math.floor((r=e%36)/6)/5*255,r%6/5*255]},i.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase() return"000000".substring(t.length)+t},i.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i) if(!t)return[0,0,0] var r=t[0] 3===t[0].length&&(r=r.split("").map((function(e){return e+e})).join("")) var n=parseInt(r,16) return[n>>16&255,n>>8&255,255&n]},i.rgb.hcg=function(e){var t,r=e[0]/255,n=e[1]/255,i=e[2]/255,o=Math.max(Math.max(r,n),i),a=Math.min(Math.min(r,n),i),s=o-a return t=s<=0?0:o===r?(n-i)/s%6:o===n?2+(i-r)/s:4+(r-n)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},i.hsl.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=1,i=0 return(n=r<.5?2*t*r:2*t*(1-r))<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},i.hsv.hcg=function(e){var t=e[1]/100,r=e[2]/100,n=t*r,i=0 return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},i.hcg.rgb=function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100 if(0===r)return[255*n,255*n,255*n] var i,o=[0,0,0],a=t%1*6,s=a%1,u=1-s switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0 break case 1:o[0]=u,o[1]=1,o[2]=0 break case 2:o[0]=0,o[1]=1,o[2]=s break case 3:o[0]=0,o[1]=u,o[2]=1 break case 4:o[0]=s,o[1]=0,o[2]=1 break default:o[0]=1,o[1]=0,o[2]=u}return i=(1-r)*n,[255*(r*o[0]+i),255*(r*o[1]+i),255*(r*o[2]+i)]} i.hcg.hsv=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t),n=0 return r>0&&(n=t/r),[e[0],100*n,100*r]},i.hcg.hsl=function(e){var t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0 return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},i.hcg.hwb=function(e){var t=e[1]/100,r=t+e[2]/100*(1-t) return[e[0],100*(r-t),100*(1-r)]},i.hwb.hcg=function(e){var t=e[1]/100,r=1-e[2]/100,n=r-t,i=0 return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=i.gray.hsv=function(e){return[0,0,e[0]]},i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase() return"000000".substring(r.length)+r},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}})) r.rgb,r.hsl,r.hsv,r.hwb,r.cmyk,r.xyz,r.lab,r.lch,r.hex,r.keyword,r.ansi16,r.ansi256,r.hcg,r.apple,r.gray function n(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,i=0;i1&&(t=Array.prototype.slice.call(arguments)) var r=e(t) if("object"==typeof r)for(var n=r.length,i=0;i1&&(t=Array.prototype.slice.call(arguments)),e(t))} return"conversion"in e&&(t.conversion=e.conversion),t}(n)}))})) var s=a,u={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},l={getRgba:c,getHsla:f,getRgb:function(e){var t=c(e) return t&&t.slice(0,3)},getHsl:function(e){var t=f(e) return t&&t.slice(0,3)},getHwb:h,getAlpha:function(e){var t=c(e) if(t)return t[3] if(t=f(e))return t[3] if(t=h(e))return t[3]},hexString:function(e,t){t=void 0!==t&&3===e.length?t:e[3] return"#"+g(e[0])+g(e[1])+g(e[2])+(t>=0&&t<1?g(Math.round(255*t)):"")},rgbString:function(e,t){if(t<1||e[3]&&e[3]<1)return d(e,t) return"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:d,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return p(e,t) var r=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100) return"rgb("+r+"%, "+n+"%, "+i+"%)"},percentaString:p,hslString:function(e,t){if(t<1||e[3]&&e[3]<1)return m(e,t) return"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:m,hwbString:function(e,t){void 0===t&&(t=void 0!==e[3]?e[3]:1) return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return v[e.slice(0,3)]}} function c(e){if(e){var t=[0,0,0],r=1,n=e.match(/^#([a-fA-F0-9]{3,4})$/i),i="" if(n){i=(n=n[1])[3] for(var o=0;or?(t+.05)/(r+.05):(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e) return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t] return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2] return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,r=(t[0]+e)%360 return t[0]=r<0?360+r:r,this.setValues("hsl",t),this},mix:function(e,t){var r=e,n=void 0===t?.5:t,i=2*n-1,o=this.alpha()-r.alpha(),a=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-a return this.rgb(a*this.red()+s*r.red(),a*this.green()+s*r.green(),a*this.blue()+s*r.blue()).alpha(this.alpha()*n+r.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var e,t,r=new w,n=this.values,i=r.values for(var o in n)n.hasOwnProperty(o)&&(e=n[o],"[object Array]"===(t={}.toString.call(e))?i[o]=e.slice(0):"[object Number]"===t?i[o]=e:console.error("unexpected color value:",e)) return r}},w.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},w.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},w.prototype.getValues=function(e){for(var t=this.values,r={},n=0;n=0;i--)t.call(r,e[i],i) else for(i=0;i=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,r=0,n=1 return 0===e?0:1===e?1:(r||(r=.3),n<1?(n=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r))},easeOutElastic:function(e){var t=1.70158,r=0,n=1 return 0===e?0:1===e?1:(r||(r=.3),n<1?(n=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},easeInOutElastic:function(e){var t=1.70158,r=0,n=1 return 0===e?0:2==(e/=.5)?1:(r||(r=.45),n<1?(n=1,t=r/4):t=r/(2*Math.PI)*Math.asin(1/n),e<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},easeInBack:function(e){var t=1.70158 return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158 return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158 return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-M.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*M.easeInBounce(2*e):.5*M.easeOutBounce(2*e-1)+.5}},x={effects:M} k.easingEffects=M var A=Math.PI,T=A/180,I=2*A,O=A/2,C=A/4,R=2*A/3,P={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,r,n,i,o){if(o){var a=Math.min(o,i/2,n/2),s=t+a,u=r+a,l=t+n-a,c=r+i-a e.moveTo(t,u),st.left-1e-6&&e.xt.top-1e-6&&e.y0&&this.requestAnimationFrame()},advance:function(){for(var e,t,r,n,i=this.animations,o=0;o=r?(z.callback(e.onAnimationComplete,[e],t),t.animating=!1,i.splice(o,1)):++o}},Q=z.options.resolve,X=["push","pop","shift","splice","unshift"] function ee(e,t){var r=e._chartjs if(r){var n=r.listeners,i=n.indexOf(t);-1!==i&&n.splice(i,1),n.length>0||(X.forEach((function(t){delete e[t]})),delete e._chartjs)}}var te=function(e,t){this.initialize(e,t)} z.extend(te.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var r=this r.chart=e,r.index=t,r.linkScales(),r.addElements(),r._type=r.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,r=t.scales,n=this.getDataset(),i=t.options.scales null!==e.xAxisID&&e.xAxisID in r&&!n.xAxisID||(e.xAxisID=n.xAxisID||i.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in r&&!n.yAxisID||(e.yAxisID=n.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&ee(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,r=this.getMeta(),n=this.getDataset().data||[],i=r.data for(e=0,t=n.length;er&&this.insertElements(r,n-r)},insertElements:function(e,t){for(var r=0;ri?(o=i/t.innerRadius,e.arc(a,s,t.innerRadius-i,n+o,r-o,!0)):e.arc(a,s,i,n+Math.PI/2,r-Math.PI/2),e.closePath(),e.clip()}function oe(e,t,r){var n="inner"===t.borderAlign n?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),r.fullCircles&&function(e,t,r,n){var i,o=r.endAngle for(n&&(r.endAngle=r.startAngle+ne,ie(e,r),r.endAngle=o,r.endAngle===r.startAngle&&r.fullCircles&&(r.endAngle+=ne,r.fullCircles--)),e.beginPath(),e.arc(r.x,r.y,r.innerRadius,r.startAngle+ne,r.startAngle,!0),i=0;is;)i-=ne for(;i=a&&i<=s,l=o>=r.innerRadius&&o<=r.outerRadius return u&&l}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,r=(e.innerRadius+e.outerRadius)/2 return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},getArea:function(){var e=this._view return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,r=(e.outerRadius-e.innerRadius)/2+e.innerRadius return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},draw:function(){var e,t=this._chart.ctx,r=this._view,n="inner"===r.borderAlign?.33:0,i={x:r.x,y:r.y,innerRadius:r.innerRadius,outerRadius:Math.max(r.outerRadius-n,0),pixelMargin:n,startAngle:r.startAngle,endAngle:r.endAngle,fullCircles:Math.floor(r.circumference/ne)} if(t.save(),t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,i.fullCircles){for(i.endAngle=i.startAngle+ne,t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),e=0;ee.x&&(t=ge(t,"left","right")):e.baser?r:n,r:u.right||i<0?0:i>t?t:i,b:u.bottom||o<0?0:o>r?r:o,l:u.left||a<0?0:a>t?t:a}}function be(e,t,r){var n=null===t,i=null===r,o=!(!e||n&&i)&&ye(e) return o&&(n||t>=o.left&&t<=o.right)&&(i||r>=o.top&&r<=o.bottom)}B._set("global",{elements:{rectangle:{backgroundColor:pe,borderColor:pe,borderSkipped:"bottom",borderWidth:0}}}) var we=Y.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,r=function(e){var t=ye(e),r=t.right-t.left,n=t.bottom-t.top,i=ve(e,r/2,n/2) return{outer:{x:t.left,y:t.top,w:r,h:n},inner:{x:t.left+i.l,y:t.top+i.t,w:r-i.l-i.r,h:n-i.t-i.b}}}(t),n=r.outer,i=r.inner e.fillStyle=t.backgroundColor,e.fillRect(n.x,n.y,n.w,n.h),n.w===i.w&&n.h===i.h||(e.save(),e.beginPath(),e.rect(n.x,n.y,n.w,n.h),e.clip(),e.fillStyle=t.borderColor,e.rect(i.x,i.y,i.w,i.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view return e.base-e.y},inRange:function(e,t){return be(this._view,e,t)},inLabelRange:function(e,t){var r=this._view return me(r)?be(r,e,null):be(r,null,t)},inXRange:function(e){return be(this._view,e,null)},inYRange:function(e){return be(this._view,null,e)},getCenterPoint:function(){var e,t,r=this._view return me(r)?(e=r.x,t=(r.y+r.base)/2):(e=(r.x+r.base)/2,t=r.y),{x:e,y:t}},getArea:function(){var e=this._view return me(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view return{x:e.x,y:e.y}}}),_e={},Se=ae,Ee=le,ke=de,Me=we _e.Arc=Se,_e.Line=Ee,_e.Point=ke,_e.Rectangle=Me var xe=z._deprecated,Ae=z.valueOrDefault function Te(e,t,r){var n,i,o=r.barThickness,a=t.stackCount,s=t.pixels[e],u=z.isNullOrUndef(o)?function(e,t){var r,n,i,o,a=e._length for(i=1,o=t.length;i0?Math.min(a,Math.abs(n-r)):a,r=n return a}(t.scale,t.pixels):-1 return z.isNullOrUndef(o)?(n=u*r.categoryPercentage,i=r.barPercentage):(n=o*a,i=1),{chunk:n/a,ratio:i,start:s-n/2}}B._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),B._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}}) var Ie=re.extend({dataElementType:_e.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t,r=this re.prototype.initialize.apply(r,arguments),(e=r.getMeta()).stack=r.getDataset().stack,e.bar=!0,t=r._getIndexScale().options,xe("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),xe("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),xe("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),xe("bar chart",r._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),xe("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,r,n=this.getMeta().data for(this._ruler=this.getRuler(),t=0,r=n.length;t=0&&m.min>=0?m.min:m.max,w=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,_=p.length if(g||void 0===g&&void 0!==v)for(n=0;n<_&&(i=p[n]).index!==e;++n)i.stack===v&&(o=void 0===(l=f._parseValue(d[i.index].data[t])).start?l.end:l.min>=0&&l.max>=0?l.max:l.min,(m.min<0&&o<0||m.max>=0&&o>0)&&(b+=o)) return a=f.getPixelForValue(b),u=(s=f.getPixelForValue(b+w))-a,void 0!==y&&Math.abs(u)=0&&!h||w<0&&h?a-y:a+y),{size:u,base:a,head:s,center:s+u/2}},calculateBarIndexPixels:function(e,t,r,n){var i="flex"===n.barThickness?function(e,t,r){var n,i=t.pixels,o=i[e],a=e>0?i[e-1]:null,s=e=Ne?-De:v<-Ne?De:0)+y,w=Math.cos(v),_=Math.sin(v),S=Math.cos(b),E=Math.sin(b),k=v<=0&&b>=0||b>=De,M=v<=Be&&b>=Be||b>=De+Be,x=v<=-Be&&b>=-Be||b>=Ne+Be,A=v===-Ne||b>=Ne?-1:Math.min(w,w*m,S,S*m),T=x?-1:Math.min(_,_*m,E,E*m),I=k?1:Math.max(w,w*m,S,S*m),O=M?1:Math.max(_,_*m,E,E*m) l=(I-A)/2,c=(O-T)/2,f=-(I+A)/2,h=-(O+T)/2}for(n=0,i=p.length;n0&&!isNaN(e)?De*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,r,n,i,o,a,s,u,l=0,c=this.chart if(!e)for(t=0,r=c.data.datasets.length;t(l=s>l?s:l)?u:l) return l},setHoverStyle:function(e){var t=e._model,r=e._options,n=z.getHoverColor e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Pe(r.hoverBackgroundColor,n(r.backgroundColor)),t.borderColor=Pe(r.hoverBorderColor,n(r.borderColor)),t.borderWidth=Pe(r.hoverBorderWidth,r.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,r=0;r0&&ze(u[e-1]._model,s)&&(r.controlPointPreviousX=l(r.controlPointPreviousX,s.left,s.right),r.controlPointPreviousY=l(r.controlPointPreviousY,s.top,s.bottom)),e0&&(o=e.getDatasetMeta(o[0]._datasetIndex).data),o},"x-axis":function(e,t){return nt(e,t,{intersect:!1})},point:function(e,t){return et(e,Qe(t,e))},nearest:function(e,t,r){var n=Qe(t,e) r.axis=r.axis||"xy" var i=rt(r.axis) return tt(e,n,r.intersect,i)},x:function(e,t,r){var n=Qe(t,e),i=[],o=!1 return Xe(e,(function(e){e.inXRange(n.x)&&i.push(e),e.inRange(n.x,n.y)&&(o=!0)})),r.intersect&&!o&&(i=[]),i},y:function(e,t,r){var n=Qe(t,e),i=[],o=!1 return Xe(e,(function(e){e.inYRange(n.y)&&i.push(e),e.inRange(n.x,n.y)&&(o=!0)})),r.intersect&&!o&&(i=[]),i}}},ot=z.extend function at(e,t){return z.where(e,(function(e){return e.pos===t}))}function st(e,t){return e.sort((function(e,r){var n=t?r:e,i=t?e:r return n.weight===i.weight?n.index-i.index:n.weight-i.weight}))}function ut(e,t,r,n){return Math.max(e[r],t[r])+Math.max(e[n],t[n])}function lt(e,t,r){var n,i,o=r.box,a=e.maxPadding if(r.size&&(e[r.pos]-=r.size),r.size=r.horizontal?o.height:o.width,e[r.pos]+=r.size,o.getPadding){var s=o.getPadding() a.top=Math.max(a.top,s.top),a.left=Math.max(a.left,s.left),a.bottom=Math.max(a.bottom,s.bottom),a.right=Math.max(a.right,s.right)}if(n=t.outerWidth-ut(a,e,"left","right"),i=t.outerHeight-ut(a,e,"top","bottom"),n!==e.w||i!==e.h)return e.w=n,e.h=i,r.horizontal?n!==e.w:i!==e.h}function ct(e,t){var r=t.maxPadding function n(e){var n={left:0,top:0,right:0,bottom:0} return e.forEach((function(e){n[e]=Math.max(t[e],r[e])})),n}return n(e?["left","right"]:["top","bottom"])}function ft(e,t,r){var n,i,o,a,s,u,l=[] for(n=0,i=e.length;n div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&dt.default||dt,yt=["animationstart","webkitAnimationStart"],gt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"} function vt(e,t){var r=z.getStyle(e,t),n=r&&r.match(/^(\d+)(\.\d+)?px$/) return n?Number(n[1]):void 0}var bt=!!function(){var e=!1 try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}) window.addEventListener("e",null,t)}catch(r){}return e}()&&{passive:!0} function wt(e,t,r){e.addEventListener(t,r,bt)}function _t(e,t,r){e.removeEventListener(t,r,bt)}function St(e,t,r,n,i){return{type:e,chart:t,native:i||null,x:void 0!==r?r:null,y:void 0!==n?n:null}}function Et(e){var t=document.createElement("div") return t.className=e||"",t}function kt(e,t,r){var n,i,o,a,s=e.$chartjs||(e.$chartjs={}),u=s.resizer=function(e){var t=Et("chartjs-size-monitor"),r=Et("chartjs-size-monitor-expand"),n=Et("chartjs-size-monitor-shrink") r.appendChild(Et()),n.appendChild(Et()),t.appendChild(r),t.appendChild(n),t._reset=function(){r.scrollLeft=1e6,r.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6} var i=function(){t._reset(),e()} return wt(r,"scroll",i.bind(r,"expand")),wt(n,"scroll",i.bind(n,"shrink")),t}((n=function(){if(s.resizer){var n=r.options.maintainAspectRatio&&e.parentNode,i=n?n.clientWidth:0 t(St("resize",r)),n&&n.clientWidth0){var o=e[0] o.label?r=o.label:o.xLabel?r=o.xLabel:i>0&&o.index-1?e.split("\n"):e}function Bt(e){var t=B.global return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Ct(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Ct(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Ct(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Ct(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Ct(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Ct(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Ct(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Ct(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Ct(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Lt(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function jt(e){return Nt([],Dt(e))}var Ut=Y.extend({initialize:function(){this._model=Bt(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options,r=t.callbacks,n=r.beforeTitle.apply(e,arguments),i=r.title.apply(e,arguments),o=r.afterTitle.apply(e,arguments),a=[] return a=Nt(a,Dt(n)),a=Nt(a,Dt(i)),a=Nt(a,Dt(o))},getBeforeBody:function(){return jt(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var r=this,n=r._options.callbacks,i=[] return z.each(e,(function(e){var o={before:[],lines:[],after:[]} Nt(o.before,Dt(n.beforeLabel.call(r,e,t))),Nt(o.lines,n.label.call(r,e,t)),Nt(o.after,Dt(n.afterLabel.call(r,e,t))),i.push(o)})),i},getAfterBody:function(){return jt(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,r=t.beforeFooter.apply(e,arguments),n=t.footer.apply(e,arguments),i=t.afterFooter.apply(e,arguments),o=[] return o=Nt(o,Dt(r)),o=Nt(o,Dt(n)),o=Nt(o,Dt(i))},update:function(e){var t,r,n,i,o,a,s,u,l,c,f=this,h=f._options,d=f._model,p=f._model=Bt(h),m=f._active,y=f._data,g={xAlign:d.xAlign,yAlign:d.yAlign},v={x:d.x,y:d.y},b={width:d.width,height:d.height},w={x:d.caretX,y:d.caretY} if(m.length){p.opacity=1 var _=[],S=[] w=Pt[h.position].call(f,m,f._eventPosition) var E=[] for(t=0,r=m.length;tn.width&&(i=n.width-t.width),i<0&&(i=0)),"top"===c?o+=f:o-="bottom"===c?t.height+f:t.height/2,"center"===c?"left"===l?i+=f:"right"===l&&(i-=f):"left"===l?i-=h:"right"===l&&(i+=h),{x:i,y:o}}(p,b,g=function(e,t){var r,n,i,o,a,s=e._model,u=e._chart,l=e._chart.chartArea,c="center",f="center" s.yu.height-t.height&&(f="bottom") var h=(l.left+l.right)/2,d=(l.top+l.bottom)/2 "center"===f?(r=function(e){return e<=h},n=function(e){return e>h}):(r=function(e){return e<=t.width/2},n=function(e){return e>=u.width-t.width/2}),i=function(e){return e+t.width+s.caretSize+s.caretPadding>u.width},o=function(e){return e-t.width-s.caretSize-s.caretPadding<0},a=function(e){return e<=d?"top":"bottom"},r(s.x)?(c="left",i(s.x)&&(c="center",f=a(s.y))):n(s.x)&&(c="right",o(s.x)&&(c="center",f=a(s.y))) var p=e._options return{xAlign:p.xAlign?p.xAlign:c,yAlign:p.yAlign?p.yAlign:f}}(this,b),f._chart)}else p.opacity=0 return p.xAlign=g.xAlign,p.yAlign=g.yAlign,p.x=v.x,p.y=v.y,p.width=b.width,p.height=b.height,p.caretX=w.x,p.caretY=w.y,f._model=p,e&&h.custom&&h.custom.call(f,p),f},drawCaret:function(e,t){var r=this._chart.ctx,n=this._view,i=this.getCaretPosition(e,t,n) r.lineTo(i.x1,i.y1),r.lineTo(i.x2,i.y2),r.lineTo(i.x3,i.y3)},getCaretPosition:function(e,t,r){var n,i,o,a,s,u,l=r.caretSize,c=r.cornerRadius,f=r.xAlign,h=r.yAlign,d=e.x,p=e.y,m=t.width,y=t.height if("center"===h)s=p+y/2,"left"===f?(i=(n=d)-l,o=n,a=s+l,u=s-l):(i=(n=d+m)+l,o=n,a=s-l,u=s+l) else if("left"===f?(n=(i=d+c+l)-l,o=i+l):"right"===f?(n=(i=d+m-c-l)-l,o=i+l):(n=(i=r.caretX)-l,o=i+l),"top"===h)s=(a=p)-l,u=a else{s=(a=p+y)+l,u=a var g=o o=n,n=g}return{x1:n,x2:i,x3:o,y1:a,y2:s,y3:u}},drawTitle:function(e,t,r){var n,i,o,a=t.title,s=a.length if(s){var u=Rt(t.rtl,t.x,t.width) for(e.x=Lt(t,t._titleAlign),r.textAlign=u.textAlign(t._titleAlign),r.textBaseline="middle",n=t.titleFontSize,i=t.titleSpacing,r.fillStyle=t.titleFontColor,r.font=z.fontString(n,t._titleFontStyle,t._titleFontFamily),o=0;o0&&r.stroke()},draw:function(){var e=this._chart.ctx,t=this._view if(0!==t.opacity){var r={width:t.width,height:t.height},n={x:t.x,y:t.y},i=Math.abs(t.opacity<.001)?0:t.opacity,o=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length this._options.enabled&&o&&(e.save(),e.globalAlpha=i,this.drawBackground(n,t,e,r),n.y+=t.yPadding,z.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(n,t,e),this.drawBody(n,t,e),this.drawFooter(n,t,e),z.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,r=this,n=r._options return r._lastActive=r._lastActive||[],"mouseout"===e.type?r._active=[]:(r._active=r._chart.getElementsAtEventForMode(e,n.mode,n),n.reverse&&r._active.reverse()),(t=!z.arrayEquals(r._active,r._lastActive))&&(r._lastActive=r._active,(n.enabled||n.custom)&&(r._eventPosition={x:e.x,y:e.y},r.update(!0),r.pivot())),t}}),Ft=Pt,zt=Ut zt.positioners=Ft var Ht=z.valueOrDefault function Vt(){return z.merge({},[].slice.call(arguments),{merger:function(e,t,r,n){if("xAxes"===e||"yAxes"===e){var i,o,a,s=r[e].length for(t[e]||(t[e]=[]),i=0;i=t[e].length&&t[e].push({}),!t[e][i].type||a.type&&a.type!==t[e][i].type?z.merge(t[e][i],[Ot.getScaleDefaults(o),a]):z.merge(t[e][i],a)}else z._merger(e,t,r,n)}})}function Kt(){return z.merge({},[].slice.call(arguments),{merger:function(e,t,r,n){var i=t[e]||{},o=r[e] "scales"===e?t[e]=Vt(i,o):"scale"===e?t[e]=z.merge(i,[Ot.getScaleDefaults(o.type),o]):z._merger(e,t,r,n)}})}function qt(e){var t=e.options z.each(e.scales,(function(t){pt.removeBox(e,t)})),t=Kt(B.global,B[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Gt(e,t,r){var n,i=function(e){return e.id===n} do{n=t+r++}while(z.findIndex(e,i)>=0) return n}function Wt(e){return"top"===e||"bottom"===e}function Yt(e,t){return function(r,n){return r[e]===n[e]?r[t]-n[t]:r[e]-n[e]}}B._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0}) var Zt=function(e,t){return this.construct(e,t),this} z.extend(Zt.prototype,{construct:function(e,t){var r=this t=function(e){var t=(e=e||{}).data=e.data||{} return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=Kt(B.global,B[e.type],e.options||{}),e}(t) var n=Tt.acquireContext(e,t),i=n&&n.canvas,o=i&&i.height,a=i&&i.width r.id=z.uid(),r.ctx=n,r.canvas=i,r.config=t,r.width=a,r.height=o,r.aspectRatio=o?a/o:null,r.options=t.options,r._bufferedRender=!1,r._layers=[],r.chart=r,r.controller=r,Zt.instances[r.id]=r,Object.defineProperty(r,"data",{get:function(){return r.config.data},set:function(e){r.config.data=e}}),n&&i?(r.initialize(),r.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this return It.notify(e,"beforeInit"),z.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),It.notify(e,"afterInit"),e},clear:function(){return z.canvas.clear(this),this},stop:function(){return $.cancelAnimation(this),this},resize:function(e){var t=this,r=t.options,n=t.canvas,i=r.maintainAspectRatio&&t.aspectRatio||null,o=Math.max(0,Math.floor(z.getMaximumWidth(n))),a=Math.max(0,Math.floor(i?o/i:z.getMaximumHeight(n))) if((t.width!==o||t.height!==a)&&(n.width=t.width=o,n.height=t.height=a,n.style.width=o+"px",n.style.height=a+"px",z.retinaScale(t,r.devicePixelRatio),!e)){var s={width:o,height:a} It.notify(t,"resize",[s]),r.onResize&&r.onResize(t,s),t.stop(),t.update({duration:r.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},r=e.scale z.each(t.xAxes,(function(e,r){e.id||(e.id=Gt(t.xAxes,"x-axis-",r))})),z.each(t.yAxes,(function(e,r){e.id||(e.id=Gt(t.yAxes,"y-axis-",r))})),r&&(r.id=r.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,r=e.scales||{},n=[],i=Object.keys(r).reduce((function(e,t){return e[t]=!1,e}),{}) t.scales&&(n=n.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&n.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),z.each(n,(function(t){var n=t.options,o=n.id,a=Ht(n.type,t.dtype) Wt(n.position)!==Wt(t.dposition)&&(n.position=t.dposition),i[o]=!0 var s=null if(o in r&&r[o].type===a)(s=r[o]).options=n,s.ctx=e.ctx,s.chart=e else{var u=Ot.getScaleConstructor(a) if(!u)return s=new u({id:o,type:a,options:n,ctx:e.ctx,chart:e}),r[s.id]=s}s.mergeTicksOptions(),t.isDefault&&(e.scale=s)})),z.each(i,(function(e,t){e||delete r[t]})),e.scales=r,Ot.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,r=this,n=[],i=r.data.datasets for(e=0,t=i.length;e=0;--r)this.drawDataset(t[r],e) It.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var r={meta:e,index:e.index,easingValue:t} !1!==It.notify(this,"beforeDatasetDraw",[r])&&(e.controller.draw(t),It.notify(this,"afterDatasetDraw",[r]))},_drawTooltip:function(e){var t=this.tooltip,r={tooltip:t,easingValue:e} !1!==It.notify(this,"beforeTooltipDraw",[r])&&(t.draw(),It.notify(this,"afterTooltipDraw",[r]))},getElementAtEvent:function(e){return it.modes.single(this,e)},getElementsAtEvent:function(e){return it.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return it.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,r){var n=it.modes[t] return"function"==typeof n?n(this,e,r):[]},getDatasetAtEvent:function(e){return it.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e] t._meta||(t._meta={}) var r=t._meta[this.id] return r||(r=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),r},getVisibleDatasetCount:function(){for(var e=0,t=0,r=this.data.datasets.length;t3?r[2]-r[1]:r[1]-r[0] Math.abs(n)>1&&e!==Math.floor(e)&&(n=e-Math.floor(e)) var i=z.log10(Math.abs(n)),o="" if(0!==e)if(Math.max(Math.abs(r[0]),Math.abs(r[r.length-1]))<1e-4){var a=z.log10(Math.abs(e)),s=Math.floor(a)-Math.floor(i) s=Math.max(Math.min(s,20),0),o=e.toExponential(s)}else{var u=-1*Math.floor(i) u=Math.max(Math.min(u,20),0),o=e.toFixed(u)}else o="0" return o},logarithmic:function(e,t,r){var n=e/Math.pow(10,Math.floor(z.log10(e))) return 0===e?"0":1===n||2===n||5===n||0===t||t===r.length-1?e.toExponential():""}}},tr=z.isArray,rr=z.isNullOrUndef,nr=z.valueOrDefault,ir=z.valueAtIndexOrDefault function or(e,t,r){var n,i=e.getTicks().length,o=Math.min(t,i-1),a=e.getPixelForTick(o),s=e._startPixel,u=e._endPixel if(!(r&&(n=1===i?Math.max(a-s,u-a):0===t?(e.getPixelForTick(1)-a)/2:(a-e.getPixelForTick(o-1))/2,(a+=ou+1e-6)))return a}function ar(e,t,r,n){var i,o,a,s,u,l,c,f,h,d,p,m,y,g=r.length,v=[],b=[],w=[] for(i=0;it){for(r=0;r=h||c<=1||!s.isHorizontal()?s.labelRotation=f:(t=(e=s._getLabelSizes()).widest.width,r=e.highest.height-e.highest.offset,n=Math.min(s.maxWidth,s.chart.width-t),t+6>(i=u.offset?s.maxWidth/c:n/(c-1))&&(i=n/(c-(u.offset?.5:1)),o=s.maxHeight-sr(u.gridLines)-l.padding-ur(u.scaleLabel),a=Math.sqrt(t*t+r*r),d=z.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/i,1)),Math.asin(Math.min(o/a,1))-Math.asin(r/a))),d=Math.max(f,Math.min(h,d))),s.labelRotation=d)},afterCalculateTickRotation:function(){z.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){z.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},r=e.chart,n=e.options,i=n.ticks,o=n.scaleLabel,a=n.gridLines,s=e._isVisible(),u="bottom"===n.position,l=e.isHorizontal() if(l?t.width=e.maxWidth:s&&(t.width=sr(a)+ur(o)),l?s&&(t.height=sr(a)+ur(o)):t.height=e.maxHeight,i.display&&s){var c=cr(i),f=e._getLabelSizes(),h=f.first,d=f.last,p=f.widest,m=f.highest,y=.4*c.minor.lineHeight,g=i.padding if(l){var v=0!==e.labelRotation,b=z.toRadians(e.labelRotation),w=Math.cos(b),_=Math.sin(b),S=_*p.width+w*(m.height-(v?m.offset:0))+(v?0:y) t.height=Math.min(e.maxHeight,t.height+S+g) var E,k,M=e.getPixelForTick(0)-e.left,x=e.right-e.getPixelForTick(e.getTicks().length-1) v?(E=u?w*h.width+_*h.offset:_*(h.height-h.offset),k=u?_*(d.height-d.offset):w*d.width+_*d.offset):(E=h.width/2,k=d.width/2),e.paddingLeft=Math.max((E-M)*e.width/(e.width-M),0)+3,e.paddingRight=Math.max((k-x)*e.width/(e.width-x),0)+3}else{var A=i.mirror?0:p.width+g+y t.width=Math.min(e.maxWidth,t.width+A),e.paddingTop=h.height/2,e.paddingBottom=d.height/2}}e.handleMargins(),l?(e.width=e._length=r.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=r.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){z.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(rr(e))return NaN if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y) return e},_convertTicksToLabels:function(e){var t,r,n,i=this for(i.ticks=e.map((function(e){return e.value})),i.beforeTickToLabelConversion(),t=i.convertTicksToLabels(e)||i.ticks,i.afterTickToLabelConversion(),r=0,n=e.length;rr-1?null:this.getPixelForDecimal(e*n+(t?n/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,r,n,i,o=this.options.ticks,a=this._length,s=o.maxTicksLimit||a/this._tickSize()+1,u=o.major.enabled?function(e){var t,r,n=[] for(t=0,r=e.length;ts)return function(e,t,r){var n,i,o=0,a=t[0] for(r=Math.ceil(r),n=0;nl)return o return Math.max(l,1)}(u,e,0,s),l>0){for(t=0,r=l-1;t1?(f-c)/(l-1):null,hr(e,n,z.isNullOrUndef(i)?0:c-i,c),hr(e,n,f,z.isNullOrUndef(i)?e.length:f+i),fr(e)}return hr(e,n),fr(e)},_tickSize:function(){var e=this.options.ticks,t=z.toRadians(this.labelRotation),r=Math.abs(Math.cos(t)),n=Math.abs(Math.sin(t)),i=this._getLabelSizes(),o=e.autoSkipPadding||0,a=i?i.widest.width+o:0,s=i?i.highest.height+o:0 return this.isHorizontal()?s*r>a*n?a/r:s/n:s*n=0&&(a=e),void 0!==o&&(e=r.indexOf(o))>=0&&(s=e),t.minIndex=a,t.maxIndex=s,t.min=r[a],t.max=r[s]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,r=this.maxIndex this.ticks=0===t&&r===e.length-1?e:e.slice(t,r+1)},getLabelForIndex:function(e,t){var r=this.chart return r.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(r.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,r=e.ticks pr.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),r&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(r.length-(t?0:1),1))},getPixelForValue:function(e,t,r){var n,i,o,a=this return mr(t)||mr(r)||(e=a.chart.data.datasets[r].data[t]),mr(e)||(n=a.isHorizontal()?e.x:e.y),(void 0!==n||void 0!==e&&isNaN(t))&&(i=a._getLabels(),e=z.valueOrDefault(n,e),t=-1!==(o=i.indexOf(e))?o:t,isNaN(t)&&(t=e)),a.getPixelForDecimal((t-a._startValue)/a._valueRange)},getPixelForTick:function(e){var t=this.ticks return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange) return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),gr={position:"bottom"} yr._defaults=gr var vr=z.noop,br=z.isNullOrUndef var wr=pr.extend({getRightValue:function(e){return"string"==typeof e?+e:pr.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks if(t.beginAtZero){var r=z.sign(e.min),n=z.sign(e.max) r<0&&n<0?e.max=0:r>0&&n>0&&(e.min=0)}var i=void 0!==t.min||void 0!==t.suggestedMin,o=void 0!==t.max||void 0!==t.suggestedMax void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),i!==o&&e.min>=e.max&&(i?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,r=t.stepSize,n=t.maxTicksLimit return r?e=Math.ceil(this.max/r)-Math.floor(this.min/r)+1:(e=this._computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:vr,buildTicks:function(){var e=this,t=e.options.ticks,r=e.getTickLimit(),n={maxTicks:r=Math.max(2,r),min:t.min,max:t.max,precision:t.precision,stepSize:z.valueOrDefault(t.fixedStepSize,t.stepSize)},i=e.ticks=function(e,t){var r,n,i,o,a=[],s=e.stepSize,u=s||1,l=e.maxTicks-1,c=e.min,f=e.max,h=e.precision,d=t.min,p=t.max,m=z.niceNum((p-d)/l/u)*u if(m<1e-14&&br(c)&&br(f))return[d,p];(o=Math.ceil(p/m)-Math.floor(d/m))>l&&(m=z.niceNum(o*m/l/u)*u),s||br(h)?r=Math.pow(10,z._decimalPlaces(m)):(r=Math.pow(10,h),m=Math.ceil(m*r)/r),n=Math.floor(d/m)*m,i=Math.ceil(p/m)*m,s&&(!br(c)&&z.almostWhole(c/m,m/1e3)&&(n=c),!br(f)&&z.almostWhole(f/m,m/1e3)&&(i=f)),o=(i-n)/m,o=z.almostEquals(o,Math.round(o),m/1e3)?Math.round(o):Math.ceil(o),n=Math.round(n*r)/r,i=Math.round(i*r)/r,a.push(br(c)?n:c) for(var y=1;yt.length-1?null:this.getPixelForValue(t[e])}}),Mr=_r kr._defaults=Mr var xr=z.valueOrDefault,Ar=z.math.log10 var Tr={position:"left",ticks:{callback:er.formatters.logarithmic}} function Ir(e,t){return z.isFinite(e)&&e>=0?e:t}var Or=pr.extend({determineDataLimits:function(){var e,t,r,n,i,o,a=this,s=a.options,u=a.chart,l=u.data.datasets,c=a.isHorizontal() function f(e){return c?e.xAxisID===a.id:e.yAxisID===a.id}a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,a.minNotZero=Number.POSITIVE_INFINITY var h=s.stacked if(void 0===h)for(e=0;e0){var t=z.min(e),r=z.max(e) a.min=Math.min(a.min,t),a.max=Math.max(a.max,r)}}))}else for(e=0;e0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(Ar(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,r=!e.isHorizontal(),n={min:Ir(t.min),max:Ir(t.max)},i=e.ticks=function(e,t){var r,n,i=[],o=xr(e.min,Math.pow(10,Math.floor(Ar(t.min)))),a=Math.floor(Ar(t.max)),s=Math.ceil(t.max/Math.pow(10,a)) 0===o?(r=Math.floor(Ar(t.minNotZero)),n=Math.floor(t.minNotZero/Math.pow(10,r)),i.push(o),o=n*Math.pow(10,r)):(r=Math.floor(Ar(o)),n=Math.floor(o/Math.pow(10,r))) var u=r<0?Math.pow(10,Math.abs(r)):1 do{i.push(o),10===++n&&(n=1,u=++r>=0?1:u),o=Math.round(n*Math.pow(10,r)*u)/u}while(rt.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(Ar(e)) return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,r=0 pr.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),r=xr(e.options.ticks.fontSize,B.global.defaultFontSize)/e._length),e._startValue=Ar(t),e._valueOffset=r,e._valueRange=(Ar(e.max)-Ar(t))/(1-r)},getPixelForValue:function(e){var t=this,r=0 return(e=+t.getRightValue(e))>t.min&&e>0&&(r=(Ar(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(r)},getValueForPixel:function(e){var t=this,r=t.getDecimalForPixel(e) return 0===r&&0===t.min?0:Math.pow(10,t._startValue+(r-t._valueOffset)*t._valueRange)}}),Cr=Tr Or._defaults=Cr var Rr=z.valueOrDefault,Pr=z.valueAtIndexOrDefault,Nr=z.options.resolve,Dr={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:er.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}} function Br(e){var t=e.ticks return t.display&&e.display?Rr(t.fontSize,B.global.defaultFontSize)+2*t.backdropPaddingY:0}function Lr(e,t,r,n,i){return e===n||e===i?{start:t-r/2,end:t+r/2}:ei?{start:t-r,end:t}:{start:t,end:t+r}}function jr(e){return 0===e||180===e?"center":e<180?"left":"right"}function Ur(e,t,r,n){var i,o,a=r.y+n/2 if(z.isArray(t))for(i=0,o=t.length;i270||e<90)&&(r.y-=t.h)}function zr(e){return z.isNumber(e)?e:0}var Hr=wr.extend({setDimensions:function(){var e=this e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Br(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY z.each(t.data.datasets,(function(i,o){if(t.isDatasetVisible(o)){var a=t.getDatasetMeta(o) z.each(i.data,(function(t,i){var o=+e.getRightValue(t) isNaN(o)||a.data[i].hidden||(r=Math.min(o,r),n=Math.max(o,n))}))}})),e.min=r===Number.POSITIVE_INFINITY?0:r,e.max=n===Number.NEGATIVE_INFINITY?0:n,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Br(this.options))},convertTicksToLabels:function(){var e=this wr.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map((function(){var t=z.callback(e.options.pointLabels.callback,arguments,e) return t||0===t?t:""}))},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options e.display&&e.pointLabels.display?function(e){var t,r,n,i=z.options._parseFont(e.options.pointLabels),o={l:0,r:e.width,t:0,b:e.height-e.paddingTop},a={} e.ctx.font=i.string,e._pointLabelSizes=[] var s,u,l,c=e.chart.data.labels.length for(t=0;to.r&&(o.r=d.end,a.r=f),p.starto.b&&(o.b=p.end,a.b=f)}e.setReductions(e.drawingArea,o,a)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,r){var n=this,i=t.l/Math.sin(r.l),o=Math.max(t.r-n.width,0)/Math.sin(r.r),a=-t.t/Math.cos(r.t),s=-Math.max(t.b-(n.height-n.paddingTop),0)/Math.cos(r.b) i=zr(i),o=zr(o),a=zr(a),s=zr(s),n.drawingArea=Math.min(Math.floor(e-(i+o)/2),Math.floor(e-(a+s)/2)),n.setCenterPoint(i,o,a,s)},setCenterPoint:function(e,t,r,n){var i=this,o=i.width-t-i.drawingArea,a=e+i.drawingArea,s=r+i.drawingArea,u=i.height-i.paddingTop-n-i.drawingArea i.xCenter=Math.floor((a+o)/2+i.left),i.yCenter=Math.floor((s+u)/2+i.top+i.paddingTop)},getIndexAngle:function(e){var t=this.chart,r=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360 return(r<0?r+360:r)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this if(z.isNullOrUndef(e))return NaN var r=t.drawingArea/(t.max-t.min) return t.options.ticks.reverse?(t.max-e)*r:(e-t.min)*r},getPointPosition:function(e,t){var r=this.getIndexAngle(e)-Math.PI/2 return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,r=this.max return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&r<0?r:t>0&&r>0?t:0)},_drawGrid:function(){var e,t,r,n=this,i=n.ctx,o=n.options,a=o.gridLines,s=o.angleLines,u=Rr(s.lineWidth,a.lineWidth),l=Rr(s.color,a.color) if(o.pointLabels.display&&function(e){var t=e.ctx,r=e.options,n=r.pointLabels,i=Br(r),o=e.getDistanceFromCenterForValue(r.ticks.reverse?e.min:e.max),a=z.options._parseFont(n) t.save(),t.font=a.string,t.textBaseline="middle" for(var s=e.chart.data.labels.length-1;s>=0;s--){var u=0===s?i/2:0,l=e.getPointPosition(s,o+u+5),c=Pr(n.fontColor,s,B.global.defaultFontColor) t.fillStyle=c var f=e.getIndexAngle(s),h=z.toDegrees(f) t.textAlign=jr(h),Fr(h,e._pointLabelSizes[s],l),Ur(t,e.pointLabels[s],l,a.lineHeight)}t.restore()}(n),a.display&&z.each(n.ticks,(function(e,r){0!==r&&(t=n.getDistanceFromCenterForValue(n.ticksAsNumbers[r]),function(e,t,r,n){var i,o=e.ctx,a=t.circular,s=e.chart.data.labels.length,u=Pr(t.color,n-1),l=Pr(t.lineWidth,n-1) if((a||s)&&u&&l){if(o.save(),o.strokeStyle=u,o.lineWidth=l,o.setLineDash&&(o.setLineDash(t.borderDash||[]),o.lineDashOffset=t.borderDashOffset||0),o.beginPath(),a)o.arc(e.xCenter,e.yCenter,r,0,2*Math.PI) else{i=e.getPointPosition(0,r),o.moveTo(i.x,i.y) for(var c=1;c=0;e--)t=n.getDistanceFromCenterForValue(o.ticks.reverse?n.min:n.max),r=n.getPointPosition(e,t),i.beginPath(),i.moveTo(n.xCenter,n.yCenter),i.lineTo(r.x,r.y),i.stroke() i.restore()}},_drawLabels:function(){var e=this,t=e.ctx,r=e.options.ticks if(r.display){var n,i,o=e.getIndexAngle(0),a=z.options._parseFont(r),s=Rr(r.fontColor,B.global.defaultFontColor) t.save(),t.font=a.string,t.translate(e.xCenter,e.yCenter),t.rotate(o),t.textAlign="center",t.textBaseline="middle",z.each(e.ticks,(function(o,u){(0!==u||r.reverse)&&(n=e.getDistanceFromCenterForValue(e.ticksAsNumbers[u]),r.showLabelBackdrop&&(i=t.measureText(o).width,t.fillStyle=r.backdropColor,t.fillRect(-i/2-r.backdropPaddingX,-n-a.size/2-r.backdropPaddingY,i+2*r.backdropPaddingX,a.size+2*r.backdropPaddingY)),t.fillStyle=s,t.fillText(o,0,-n))})),t.restore()}},_drawTitle:z.noop}),Vr=Dr Hr._defaults=Vr var Kr=z._deprecated,qr=z.options.resolve,Gr=z.valueOrDefault,Wr=Number.MIN_SAFE_INTEGER||-9007199254740991,Yr=Number.MAX_SAFE_INTEGER||9007199254740991,Zr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Jr=Object.keys(Zr) function $r(e,t){return e-t}function Qr(e){return z.valueOrDefault(e.time.min,e.ticks.min)}function Xr(e){return z.valueOrDefault(e.time.max,e.ticks.max)}function en(e,t,r,n){var i=function(e,t,r){for(var n,i,o,a=0,s=e.length-1;a>=0&&a<=s;){if(i=e[(n=a+s>>1)-1]||null,o=e[n],!i)return{lo:null,hi:o} if(o[t]r))return{lo:i,hi:o} s=n-1}}return{lo:o,hi:null}}(e,t,r),o=i.lo?i.hi?i.lo:e[e.length-2]:e[0],a=i.lo?i.hi?i.hi:e[e.length-1]:e[1],s=a[t]-o[t],u=s?(r-o[t])/s:0,l=(a[n]-o[n])*u return o[n]+l}function tn(e,t){var r=e._adapter,n=e.options.time,i=n.parser,o=i||n.format,a=t return"function"==typeof i&&(a=i(a)),z.isFinite(a)||(a="string"==typeof o?r.parse(a,o):r.parse(a)),null!==a?+a:(i||"function"!=typeof o||(a=o(t),z.isFinite(a)||(a=r.parse(a))),a)}function rn(e,t){if(z.isNullOrUndef(t))return null var r=e.options.time,n=tn(e,e.getRightValue(t)) return null===n||r.round&&(n=+e._adapter.startOf(n,r.round)),n}function nn(e,t,r,n){var i,o,a,s=Jr.length for(i=Jr.indexOf(e);i=0&&(t[o].major=!0) return t}(e,o,a,r):o}var an=pr.extend({initialize:function(){this.mergeTicksOptions(),pr.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,r=t.time||(t.time={}),n=e._adapter=new Xt._date(t.adapters.date) return Kr("time scale",r.format,"time.format","time.parser"),Kr("time scale",r.min,"time.min","ticks.min"),Kr("time scale",r.max,"time.max","ticks.max"),z.mergeIf(r.displayFormats,n.formats()),pr.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),pr.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,r,n,i,o,a,s=this,u=s.chart,l=s._adapter,c=s.options,f=c.time.unit||"day",h=Yr,d=Wr,p=[],m=[],y=[],g=s._getLabels() for(e=0,r=g.length;e1?function(e){var t,r,n,i={},o=[] for(t=0,r=e.length;t1e5*l)throw t+" and "+r+" are too far apart with stepSize of "+l+" "+u for(i=f;i=i&&r<=o&&c.push(r) return n.min=i,n.max=o,n._unit=u.unit||(s.autoSkip?nn(u.minUnit,n.min,n.max,f):function(e,t,r,n,i){var o,a for(o=Jr.length-1;o>=Jr.indexOf(r);o--)if(a=Jr[o],Zr[a].common&&e._adapter.diff(i,n,a)>=t-1)return a return Jr[r?Jr.indexOf(r):0]}(n,c.length,u.minUnit,n.min,n.max)),n._majorUnit=s.major.enabled&&"year"!==n._unit?function(e){for(var t=Jr.indexOf(e)+1,r=Jr.length;tt&&s=0&&e0?s:1}}),sn={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}} an._defaults=sn var un={category:yr,linear:kr,logarithmic:Or,radialLinear:Hr,time:an},ln={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"} Xt._date.override("function"==typeof e?{_id:"moment",formats:function(){return ln},parse:function(t,r){return"string"==typeof t&&"string"==typeof r?t=e(t,r):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,r){return e(t).format(r)},add:function(t,r,n){return e(t).add(r,n).valueOf()},diff:function(t,r,n){return e(t).diff(e(r),n)},startOf:function(t,r,n){return t=e(t),"isoWeek"===r?t.isoWeekday(n).valueOf():t.startOf(r).valueOf()},endOf:function(t,r){return e(t).endOf(r).valueOf()},_create:function(t){return e(t)}}:{}),B._set("global",{plugins:{filler:{propagate:!0}}}) var cn={dataset:function(e){var t=e.fill,r=e.chart,n=r.getDatasetMeta(t),i=n&&r.isDatasetVisible(t)&&n.dataset._children||[],o=i.length||0 return o?function(e,t){return t=r)&&n switch(o){case"bottom":return"start" case"top":return"end" case"zero":return"origin" case"origin":case"start":case"end":return o default:return!1}}function hn(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,r,n,i,o,a=e.el._scale,s=a.options,u=a.chart.data.labels.length,l=e.fill,c=[] if(!u)return null for(t=s.ticks.reverse?a.max:a.min,r=s.ticks.reverse?a.min:a.max,n=a.getPointPositionForValue(0,t),i=0;i0;--o)z.canvas.lineTo(e,r[o],r[o-1],!0) else for(a=r[0].cx,s=r[0].cy,u=Math.sqrt(Math.pow(r[0].x-a,2)+Math.pow(r[0].y-s,2)),o=i-1;o>0;--o)e.arc(a,s,u,r[o].angle,r[o-1].angle,!0)}}function gn(e,t,r,n,i,o){var a,s,u,l,c,f,h,d,p=t.length,m=n.spanGaps,y=[],g=[],v=0,b=0 for(e.beginPath(),a=0,s=p;a=0;--r)(t=u[r].$filler)&&t.visible&&(i=(n=t.el)._view,o=n._children||[],a=t.mapper,s=i.backgroundColor||B.global.defaultColor,a&&s&&o.length&&(z.canvas.clipArea(l,e.chartArea),gn(l,o,a,i,s,n._loop),z.canvas.unclipArea(l)))}},bn=z.rtl.getRtlAdapter,wn=z.noop,_n=z.valueOrDefault function Sn(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}B._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var r=t.datasetIndex,n=this.chart,i=n.getDatasetMeta(r) i.hidden=null===i.hidden?!n.data.datasets[r].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,r=e.options.legend||{},n=r.labels&&r.labels.usePointStyle return e._getSortedDatasetMetas().map((function(r){var i=r.controller.getStyle(n?0:void 0) return{text:t[r.index].label,fillStyle:i.backgroundColor,hidden:!e.isDatasetVisible(r.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:r.index}}),this)}}},legendCallback:function(e){var t,r,n,i=document.createElement("ul"),o=e.data.datasets for(i.setAttribute("class",e.id+"-legend"),t=0,r=o.length;tu.width)&&(f+=a+r.padding,c[c.length-(t>0?0:1)]=0),s[t]={left:0,top:0,width:n,height:a},c[c.length-1]+=n+r.padding})),u.height+=f}else{var h=r.padding,d=e.columnWidths=[],p=e.columnHeights=[],m=r.padding,y=0,g=0 z.each(e.legendItems,(function(e,t){var n=Sn(r,a)+a/2+i.measureText(e.text).width t>0&&g+a+2*h>u.height&&(m+=y+r.padding,d.push(y),p.push(g),y=0,g=0),y=Math.max(y,n),g+=a+h,s[t]={left:0,top:0,width:n,height:a}})),m+=y,d.push(y),p.push(g),u.width+=m}e.width=u.width,e.height=u.height}else e.width=u.width=e.height=u.height=0},afterFit:wn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,r=t.labels,n=B.global,i=n.defaultColor,o=n.elements.line,a=e.height,s=e.columnHeights,u=e.width,l=e.lineWidths if(t.display){var c,f=bn(t.rtl,e.left,e.minSize.width),h=e.ctx,d=_n(r.fontColor,n.defaultFontColor),p=z.options._parseFont(r),m=p.size h.textAlign=f.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=d,h.fillStyle=d,h.font=p.string var y=Sn(r,m),g=e.legendHitBoxes,v=function(e,n){switch(t.align){case"start":return r.padding case"end":return e-n default:return(e-n+r.padding)/2}},b=e.isHorizontal() c=b?{x:e.left+v(u,l[0]),y:e.top+r.padding,line:0}:{x:e.left+r.padding,y:e.top+v(a,s[0]),line:0},z.rtl.overrideTextDirection(e.ctx,t.textDirection) var w=m+r.padding z.each(e.legendItems,(function(t,n){var d=h.measureText(t.text).width,p=y+m/2+d,_=c.x,S=c.y f.setWidth(e.minSize.width),b?n>0&&_+p+r.padding>e.left+e.minSize.width&&(S=c.y+=w,c.line++,_=c.x=e.left+v(u,l[c.line])):n>0&&S+w>e.top+e.minSize.height&&(_=c.x=_+e.columnWidths[c.line]+r.padding,c.line++,S=c.y=e.top+v(a,s[c.line])) var E=f.x(_);(function(e,t,n){if(!(isNaN(y)||y<=0)){h.save() var a=_n(n.lineWidth,o.borderWidth) if(h.fillStyle=_n(n.fillStyle,i),h.lineCap=_n(n.lineCap,o.borderCapStyle),h.lineDashOffset=_n(n.lineDashOffset,o.borderDashOffset),h.lineJoin=_n(n.lineJoin,o.borderJoinStyle),h.lineWidth=a,h.strokeStyle=_n(n.strokeStyle,i),h.setLineDash&&h.setLineDash(_n(n.lineDash,o.borderDash)),r&&r.usePointStyle){var s=y*Math.SQRT2/2,u=f.xPlus(e,y/2),l=t+m/2 z.canvas.drawPoint(h,n.pointStyle,s,u,l,n.rotation)}else h.fillRect(f.leftForLtr(e,y),t,y,m),0!==a&&h.strokeRect(f.leftForLtr(e,y),t,y,m) h.restore()}})(E,S,t),g[n].left=f.leftForLtr(E,g[n].width),g[n].top=S,function(e,t,r,n){var i=m/2,o=f.xPlus(e,y+i),a=t+i h.fillText(r.text,o,a),r.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(o,a),h.lineTo(f.xPlus(o,n),a),h.stroke())}(E,S,t,d),b?c.x+=p+r.padding:c.y+=w})),z.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var r,n,i,o=this if(e>=o.left&&e<=o.right&&t>=o.top&&t<=o.bottom)for(i=o.legendHitBoxes,r=0;r=(n=i[r]).left&&e<=n.left+n.width&&t>=n.top&&t<=n.top+n.height)return o.legendItems[r] return null},handleEvent:function(e){var t,r=this,n=r.options,i="mouseup"===e.type?"click":e.type if("mousemove"===i){if(!n.onHover&&!n.onLeave)return}else{if("click"!==i)return if(!n.onClick)return}t=r._getLegendItemAt(e.x,e.y),"click"===i?t&&n.onClick&&n.onClick.call(r,e.native,t):(n.onLeave&&t!==r._hoveredItem&&(r._hoveredItem&&n.onLeave.call(r,e.native,r._hoveredItem),r._hoveredItem=t),n.onHover&&t&&n.onHover.call(r,e.native,t))}}) function kn(e,t){var r=new En({ctx:e.ctx,options:t,chart:e}) pt.configure(e,r,t),pt.addBox(e,r),e.legend=r}var Mn={id:"legend",_element:En,beforeInit:function(e){var t=e.options.legend t&&kn(e,t)},beforeUpdate:function(e){var t=e.options.legend,r=e.legend t?(z.mergeIf(t,B.global.legend),r?(pt.configure(e,r,t),r.options=t):kn(e,t)):r&&(pt.removeBox(e,r),delete e.legend)},afterEvent:function(e,t){var r=e.legend r&&r.handleEvent(t)}},xn=z.noop B._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}}) var An=Y.extend({initialize:function(e){z.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:xn,update:function(e,t,r){var n=this return n.beforeUpdate(),n.maxWidth=e,n.maxHeight=t,n.margins=r,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate(),n.minSize},afterUpdate:xn,beforeSetDimensions:xn,setDimensions:function(){var e=this e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:xn,beforeBuildLabels:xn,buildLabels:xn,afterBuildLabels:xn,beforeFit:xn,fit:function(){var e,t=this,r=t.options,n=t.minSize={},i=t.isHorizontal() r.display?(e=(z.isArray(r.text)?r.text.length:1)*z.options._parseFont(r).lineHeight+2*r.padding,t.width=n.width=i?t.maxWidth:e,t.height=n.height=i?e:t.maxHeight):t.width=n.width=t.height=n.height=0},afterFit:xn,isHorizontal:function(){var e=this.options.position return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,r=e.options if(r.display){var n,i,o,a=z.options._parseFont(r),s=a.lineHeight,u=s/2+r.padding,l=0,c=e.top,f=e.left,h=e.bottom,d=e.right t.fillStyle=z.valueOrDefault(r.fontColor,B.global.defaultFontColor),t.font=a.string,e.isHorizontal()?(i=f+(d-f)/2,o=c+u,n=d-f):(i="left"===r.position?f+u:d-u,o=c+(h-c)/2,n=h-c,l=Math.PI*("left"===r.position?-.5:.5)),t.save(),t.translate(i,o),t.rotate(l),t.textAlign="center",t.textBaseline="middle" var p=r.text if(z.isArray(p))for(var m=0,y=0;y=0;n--){var i=e[n] if(t(i))return i}},z.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},z.almostEquals=function(e,t,r){return Math.abs(e-t)=e},z.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},z.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},z.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0===(e=+e)||isNaN(e)?e:e>0?1:-1},z.toRadians=function(e){return e*(Math.PI/180)},z.toDegrees=function(e){return e*(180/Math.PI)},z._decimalPlaces=function(e){if(z.isFinite(e)){for(var t=1,r=0;Math.round(e*t)/t!==e;)t*=10,r++ return r}},z.getAngleFromPoint=function(e,t){var r=t.x-e.x,n=t.y-e.y,i=Math.sqrt(r*r+n*n),o=Math.atan2(n,r) return o<-.5*Math.PI&&(o+=2*Math.PI),{angle:o,distance:i}},z.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},z.aliasPixel=function(e){return e%2==0?0:.5},z._alignPixel=function(e,t,r){var n=e.currentDevicePixelRatio,i=r/2 return Math.round((t-i)*n)/n+i},z.splineCurve=function(e,t,r,n){var i=e.skip?t:e,o=t,a=r.skip?t:r,s=Math.sqrt(Math.pow(o.x-i.x,2)+Math.pow(o.y-i.y,2)),u=Math.sqrt(Math.pow(a.x-o.x,2)+Math.pow(a.y-o.y,2)),l=s/(s+u),c=u/(s+u),f=n*(l=isNaN(l)?0:l),h=n*(c=isNaN(c)?0:c) return{previous:{x:o.x-f*(a.x-i.x),y:o.y-f*(a.y-i.y)},next:{x:o.x+h*(a.x-i.x),y:o.y+h*(a.y-i.y)}}},z.EPSILON=Number.EPSILON||1e-14,z.splineCurveMonotone=function(e){var t,r,n,i,o,a,s,u,l,c=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),f=c.length for(t=0;t0?c[t-1]:null,(i=t0?c[t-1]:null,i=t=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},z.previousItem=function(e,t,r){return r?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},z.niceNum=function(e,t){var r=Math.floor(z.log10(e)),n=e/Math.pow(10,r) return(t?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,r)},z.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},z.getRelativePosition=function(e,t){var r,n,i=e.originalEvent||e,o=e.target||e.srcElement,a=o.getBoundingClientRect(),s=i.touches s&&s.length>0?(r=s[0].clientX,n=s[0].clientY):(r=i.clientX,n=i.clientY) var u=parseFloat(z.getStyle(o,"padding-left")),l=parseFloat(z.getStyle(o,"padding-top")),c=parseFloat(z.getStyle(o,"padding-right")),f=parseFloat(z.getStyle(o,"padding-bottom")),h=a.right-a.left-u-c,d=a.bottom-a.top-l-f return{x:r=Math.round((r-a.left-u)/h*o.width/t.currentDevicePixelRatio),y:n=Math.round((n-a.top-l)/d*o.height/t.currentDevicePixelRatio)}},z.getConstraintWidth=function(e){return r(e,"max-width","clientWidth")},z.getConstraintHeight=function(e){return r(e,"max-height","clientHeight")},z._calculatePadding=function(e,t,r){return(t=z.getStyle(e,t)).indexOf("%")>-1?r*parseInt(t,10)/100:parseInt(t,10)},z._getParentNode=function(e){var t=e.parentNode return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},z.getMaximumWidth=function(e){var t=z._getParentNode(e) if(!t)return e.clientWidth var r=t.clientWidth,n=r-z._calculatePadding(t,"padding-left",r)-z._calculatePadding(t,"padding-right",r),i=z.getConstraintWidth(e) return isNaN(i)?n:Math.min(n,i)} z.getMaximumHeight=function(e){var t=z._getParentNode(e) if(!t)return e.clientHeight var r=t.clientHeight,n=r-z._calculatePadding(t,"padding-top",r)-z._calculatePadding(t,"padding-bottom",r),i=z.getConstraintHeight(e) return isNaN(i)?n:Math.min(n,i)},z.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},z.retinaScale=function(e,t){var r=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1 if(1!==r){var n=e.canvas,i=e.height,o=e.width n.height=i*r,n.width=o*r,e.ctx.scale(r,r),n.style.height||n.style.width||(n.style.height=i+"px",n.style.width=o+"px")}},z.fontString=function(e,t,r){return t+" "+e+"px "+r},z.longestText=function(e,t,r,n){var i=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[] n.font!==t&&(i=n.data={},o=n.garbageCollect=[],n.font=t),e.font=t var a,s,u,l,c,f=0,h=r.length for(a=0;ar.length){for(a=0;an&&(n=o),n},z.numberOfLabelLines=function(e){var t=1 return z.each(e,(function(e){z.isArray(e)&&e.length>t&&(t=e.length)})),t},z.color=S?function(e){return e instanceof CanvasGradient&&(e=B.global.defaultColor),S(e)}:function(e){return console.error("Color.js not found!"),e},z.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:z.color(e).saturate(.5).darken(.1).rgbString()}}(),Jt._adapters=Xt,Jt.Animation=J,Jt.animationService=$,Jt.controllers=$e,Jt.DatasetController=re,Jt.defaults=B,Jt.Element=Y,Jt.elements=_e,Jt.Interaction=it,Jt.layouts=pt,Jt.platform=Tt,Jt.plugins=It,Jt.Scale=pr,Jt.scaleService=Ot,Jt.Ticks=er,Jt.Tooltip=zt,Jt.helpers.each(un,(function(e,t){Jt.scaleService.registerScaleType(t,e,e._defaults)})),In)In.hasOwnProperty(Pn)&&Jt.plugins.register(In[Pn]) Jt.platform.initialize() var Nn=Jt return"undefined"!=typeof window&&(window.Chart=Jt),Jt.Chart=Jt,Jt.Legend=In.legend._element,Jt.Title=In.title._element,Jt.pluginService=Jt.plugins,Jt.PluginBase=Jt.Element.extend({}),Jt.canvasHelpers=Jt.helpers.canvas,Jt.layoutService=Jt.layouts,Jt.LinearScaleBase=wr,Jt.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(e){Jt[e]=function(t,r){return new Jt(t,Jt.helpers.merge(r||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}})),Nn})),"undefined"==typeof FastBoot){var preferNative=!1 function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _get(e,t,r){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=_superPropBase(e,t) if(n){var i=Object.getOwnPropertyDescriptor(n,t) return i.get?i.get.call(r):i.value}})(e,t,r||e)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function") e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(e){var t=_isNativeReflectConstruct() return function(){var r,n=_getPrototypeOf(e) if(t){var i=_getPrototypeOf(this).constructor r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments) return _possibleConstructorReturn(this,r)}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called") return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1 if(Reflect.construct.sham)return!1 if("function"==typeof Proxy)return!0 try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r-1} function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name") return e.toLowerCase()}function f(e){return"string"!=typeof e&&(e=String(e)),e}function h(e){var t={next:function(){var t=e.shift() return{done:void 0===t,value:t}}} return i&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function p(e){if(e.bodyUsed)return r.reject(new TypeError("Already read")) e.bodyUsed=!0}function m(e){return new r((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=m(t) return t.readAsArrayBuffer(e),r}function g(e){if(e.slice)return e.slice(0) var t=new Uint8Array(e.byteLength) return t.set(new Uint8Array(e)),t.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(e){var t this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=p(this) if(e)return e if(this._bodyBlob)return r.resolve(this._bodyBlob) if(this._bodyArrayBuffer)return r.resolve(new Blob([this._bodyArrayBuffer])) if(this._bodyFormData)throw new Error("could not read FormData body as blob") return r.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||r.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,n,i=p(this) if(i)return i if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=m(t),t.readAsText(e),n if(this._bodyArrayBuffer)return r.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests") this._initBody(i)}function _(e){var t=new FormData return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ") t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function S(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},v.call(w.prototype),v.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""}) return e.type="error",e} var E=[301,302,303,307,308] S.redirect=function(e,t){if(-1===E.indexOf(t))throw new RangeError("Invalid status code") return new S(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException try{new e.DOMException}catch(M){e.DOMException=function(e,t){this.message=e,this.name=t var r=Error(e) this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function k(t,n){return new r((function(r,i){var a=new w(t,n) if(a.signal&&a.signal.aborted)return i(new e.DOMException("Aborted","AbortError")) var s=new XMLHttpRequest function u(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var r=e.split(":"),n=r.shift().trim() if(n){var i=r.join(":").trim() t.append(n,i)}})),t)} n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL") var i="response"in s?s.response:s.responseText r(new S(i,n))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",u),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",u)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}k.polyfill=!0,t.fetch||(t.fetch=k,t.Headers=d,t.Request=w,t.Response=S),e.Headers=d,e.Request=w,e.Response=S,e.fetch=k})({}) if(!t.fetch)throw new Error("fetch is not defined - maybe your browser targets are not covering everything you need?") var o=0 function a(e){return o--,e}e.Ember.Test?(e.Ember.Test.registerWaiter((function(){return 0===o})),t.default=function(){return o++,t.fetch.apply(e,arguments).then((function(e){return e.clone().blob().then(a,a),e}),(function(e){throw a(e),e}))}):t.default=t.fetch,n.forEach((function(e){delete t[e]}))}))})("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this)}"undefined"==typeof FastBoot&& /* flatpickr v4.6.3, @license MIT */ function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).flatpickr=t()}(this,(function(){"use strict" ;/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */var e=function(){return(e=Object.assign||function(e){for(var t,r=1,n=arguments.length;r",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},n={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100 if(t>3&&t<21)return"th" switch(t%10){case 1:return"st" case 2:return"nd" case 3:return"rd" default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},i=function(e){return("0"+e).slice(-2)},o=function(e){return!0===e?1:0} function a(e,t,r){var n return void 0===r&&(r=!1),function(){var i=this,o=arguments null!==n&&clearTimeout(n),n=window.setTimeout((function(){n=null,r||e.apply(i,o)}),t),r&&!n&&e.apply(i,o)}}var s=function(e){return e instanceof Array?e:[e]} function u(e,t,r){if(!0===r)return e.classList.add(t) e.classList.remove(t)}function l(e,t,r){var n=window.document.createElement(e) return t=t||"",r=r||"",n.className=t,void 0!==r&&(n.textContent=r),n}function c(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function f(e,t){var r=l("div","numInputWrapper"),n=l("input","numInput "+e),i=l("span","arrowUp"),o=l("span","arrowDown") if(-1===navigator.userAgent.indexOf("MSIE 9.0")?n.type="number":(n.type="text",n.pattern="\\d*"),void 0!==t)for(var a in t)n.setAttribute(a,t[a]) return r.appendChild(n),r.appendChild(i),r.appendChild(o),r}var h=function(){},d=function(e,t,r){return r.months[t?"shorthand":"longhand"][e]},p={D:h,F:function(e,t,r){e.setMonth(r.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,r){e.setHours(e.getHours()%12+12*o(new RegExp(r.amPM[1],"i").test(t)))},M:function(e,t,r){e.setMonth(r.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,r){var n=parseInt(t),i=new Date(e.getFullYear(),0,2+7*(n-1),0,0,0,0) return i.setDate(i.getDate()-i.getDay()+r.firstDayOfWeek),i},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:h,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:h,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},m={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},y={Z:function(e){return e.toISOString()},D:function(e,t,r){return t.weekdays.shorthand[y.w(e,t,r)]},F:function(e,t,r){return d(y.n(e,t,r)-1,!1,t)},G:function(e,t,r){return i(y.h(e,t,r))},H:function(e){return i(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[o(e.getHours()>11)]},M:function(e,t){return d(e.getMonth(),!0,t)},S:function(e){return i(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,r){return r.getWeek(e)},Y:function(e){return e.getFullYear()},d:function(e){return i(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return i(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return i(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},g=function(e){var t=e.config,i=void 0===t?r:t,o=e.l10n,a=void 0===o?n:o return function(e,t,r){var n=r||a return void 0!==i.formatDate?i.formatDate(e,t,n):t.split("").map((function(t,r,o){return y[t]&&"\\"!==o[r-1]?y[t](e,n,i):"\\"!==t?t:""})).join("")}},v=function(e){var t=e.config,i=void 0===t?r:t,o=e.l10n,a=void 0===o?n:o return function(e,t,n,o){if(0===e||e){var s,u=o||a,l=e if(e instanceof Date)s=new Date(e.getTime()) else if("string"!=typeof e&&void 0!==e.toFixed)s=new Date(e) else if("string"==typeof e){var c=t||(i||r).dateFormat,f=String(e).trim() if("today"===f)s=new Date,n=!0 else if(/Z$/.test(f)||/GMT$/.test(f))s=new Date(e) else if(i&&i.parseDate)s=i.parseDate(e,c) else{s=i&&i.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0) for(var h=void 0,d=[],y=0,g=0,v="";ya&&(c=r===y.hourElement?c-a-o(!y.amPM):n,h&&D(void 0,1,y.hourElement)),y.amPM&&f&&(1===s?c+u===23:Math.abs(c-u)>s)&&(y.amPM.textContent=y.l10n.amPM[o(y.amPM.textContent===y.l10n.amPM[0])]),r.value=i(c)}}(e) var t=y._input.value M(),ge(),y._input.value!==t&&y._debouncedChange()}function M(){if(void 0!==y.hourElement&&void 0!==y.minuteElement){var e,t,r=(parseInt(y.hourElement.value.slice(-2),10)||0)%24,n=(parseInt(y.minuteElement.value,10)||0)%60,i=void 0!==y.secondElement?(parseInt(y.secondElement.value,10)||0)%60:0 void 0!==y.amPM&&(e=r,t=y.amPM.textContent,r=e%12+12*o(t===y.l10n.amPM[1])) var a=void 0!==y.config.minTime||y.config.minDate&&y.minDateHasTime&&y.latestSelectedDateObj&&0===b(y.latestSelectedDateObj,y.config.minDate,!0) if(void 0!==y.config.maxTime||y.config.maxDate&&y.maxDateHasTime&&y.latestSelectedDateObj&&0===b(y.latestSelectedDateObj,y.config.maxDate,!0)){var s=void 0!==y.config.maxTime?y.config.maxTime:y.config.maxDate;(r=Math.min(r,s.getHours()))===s.getHours()&&(n=Math.min(n,s.getMinutes())),n===s.getMinutes()&&(i=Math.min(i,s.getSeconds()))}if(a){var u=void 0!==y.config.minTime?y.config.minTime:y.config.minDate;(r=Math.max(r,u.getHours()))===u.getHours()&&(n=Math.max(n,u.getMinutes())),n===u.getMinutes()&&(i=Math.max(i,u.getSeconds()))}T(r,n,i)}}function x(e){var t=e||y.latestSelectedDateObj t&&T(t.getHours(),t.getMinutes(),t.getSeconds())}function A(){var e=y.config.defaultHour,t=y.config.defaultMinute,r=y.config.defaultSeconds if(void 0!==y.config.minDate){var n=y.config.minDate.getHours(),i=y.config.minDate.getMinutes();(e=Math.max(e,n))===n&&(t=Math.max(i,t)),e===n&&t===i&&(r=y.config.minDate.getSeconds())}if(void 0!==y.config.maxDate){var o=y.config.maxDate.getHours(),a=y.config.maxDate.getMinutes();(e=Math.min(e,o))===o&&(t=Math.min(a,t)),e===o&&t===a&&(r=y.config.maxDate.getSeconds())}T(e,t,r)}function T(e,t,r){void 0!==y.latestSelectedDateObj&&y.latestSelectedDateObj.setHours(e%24,t,r||0,0),y.hourElement&&y.minuteElement&&!y.isMobile&&(y.hourElement.value=i(y.config.time_24hr?e:(12+e)%12+12*o(e%12==0)),y.minuteElement.value=i(t),void 0!==y.amPM&&(y.amPM.textContent=y.l10n.amPM[o(e>=12)]),void 0!==y.secondElement&&(y.secondElement.value=i(r)))}function I(e){var t=parseInt(e.target.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&J(t)}function O(e,t,r,n){return t instanceof Array?t.forEach((function(t){return O(e,t,r,n)})):e instanceof Array?e.forEach((function(e){return O(e,t,r,n)})):(e.addEventListener(t,r,n),void y._handlers.push({element:e,event:t,handler:r,options:n}))}function C(e){return function(t){1===t.which&&e(t)}}function R(){he("onChange")}function P(e,t){var r=void 0!==e?y.parseDate(e):y.latestSelectedDateObj||(y.config.minDate&&y.config.minDate>y.now?y.config.minDate:y.config.maxDate&&y.config.maxDate=0&&b(e,y.selectedDates[1])<=0)}(t)&&!pe(t)&&o.classList.add("inRange"),y.weekNumbers&&1===y.config.showMonths&&"prevMonthDay"!==e&&r%7==1&&y.weekNumbers.insertAdjacentHTML("beforeend",""+y.config.getWeek(t)+""),he("onDayCreate",o),o}function L(e){e.focus(),"range"===y.config.mode&&ee(e)}function j(e){for(var t=e>0?0:y.config.showMonths-1,r=e>0?y.config.showMonths:-1,n=t;n!=r;n+=e)for(var i=y.daysContainer.children[n],o=e>0?0:i.children.length-1,a=e>0?i.children.length:-1,s=o;s!=a;s+=e){var u=i.children[s] if(-1===u.className.indexOf("hidden")&&$(u.dateObj))return u}}function U(e,t){var r=Q(document.activeElement||document.body),n=void 0!==e?e:r?document.activeElement:void 0!==y.selectedDateElem&&Q(y.selectedDateElem)?y.selectedDateElem:void 0!==y.todayDateElem&&Q(y.todayDateElem)?y.todayDateElem:j(t>0?1:-1) return void 0===n?y._input.focus():r?void function(e,t){for(var r=-1===e.className.indexOf("Month")?e.dateObj.getMonth():y.currentMonth,n=t>0?y.config.showMonths:-1,i=t>0?1:-1,o=r-y.currentMonth;o!=n;o+=i)for(var a=y.daysContainer.children[o],s=r-y.currentMonth===o?e.$i+t:t<0?a.children.length-1:0,u=a.children.length,l=s;l>=0&&l0?u:-1);l+=i){var c=a.children[l] if(-1===c.className.indexOf("hidden")&&$(c.dateObj)&&Math.abs(e.$i-l)>=Math.abs(t))return L(c)}y.changeMonth(i),U(j(i),0)}(n,t):L(n)}function F(e,t){for(var r=(new Date(e,t,1).getDay()-y.l10n.firstDayOfWeek+7)%7,n=y.utils.getDaysInMonth((t-1+12)%12),i=y.utils.getDaysInMonth(t),o=window.document.createDocumentFragment(),a=y.config.showMonths>1,s=a?"prevMonthDay hidden":"prevMonthDay",u=a?"nextMonthDay hidden":"nextMonthDay",c=n+1-r,f=0;c<=n;c++,f++)o.appendChild(B(s,new Date(e,t-1,c),c,f)) for(c=1;c<=i;c++,f++)o.appendChild(B("",new Date(e,t,c),c,f)) for(var h=i+1;h<=42-r&&(1===y.config.showMonths||f%7!=0);h++,f++)o.appendChild(B(u,new Date(e,t+1,h%i),h,f)) var d=l("div","dayContainer") return d.appendChild(o),d}function z(){if(void 0!==y.daysContainer){c(y.daysContainer),y.weekNumbers&&c(y.weekNumbers) for(var e=document.createDocumentFragment(),t=0;t1||"dropdown"!==y.config.monthSelectorType)){var e=function(e){return!(void 0!==y.config.minDate&&y.currentYear===y.config.minDate.getFullYear()&&ey.config.maxDate.getMonth())} y.monthsDropdownContainer.tabIndex=-1,y.monthsDropdownContainer.innerHTML="" for(var t=0;t<12;t++)if(e(t)){var r=l("option","flatpickr-monthDropdown-month") r.value=new Date(y.currentYear,t).getMonth().toString(),r.textContent=d(t,y.config.shorthandCurrentMonth,y.l10n),r.tabIndex=-1,y.currentMonth===t&&(r.selected=!0),y.monthsDropdownContainer.appendChild(r)}}}function V(){var e,t=l("div","flatpickr-month"),r=window.document.createDocumentFragment() y.config.showMonths>1||"static"===y.config.monthSelectorType?e=l("span","cur-month"):(y.monthsDropdownContainer=l("select","flatpickr-monthDropdown-months"),O(y.monthsDropdownContainer,"change",(function(e){var t=e.target,r=parseInt(t.value,10) y.changeMonth(r-y.currentMonth),he("onMonthChange")})),H(),e=y.monthsDropdownContainer) var n=f("cur-year",{tabindex:"-1"}),i=n.getElementsByTagName("input")[0] i.setAttribute("aria-label",y.l10n.yearAriaLabel),y.config.minDate&&i.setAttribute("min",y.config.minDate.getFullYear().toString()),y.config.maxDate&&(i.setAttribute("max",y.config.maxDate.getFullYear().toString()),i.disabled=!!y.config.minDate&&y.config.minDate.getFullYear()===y.config.maxDate.getFullYear()) var o=l("div","flatpickr-current-month") return o.appendChild(e),o.appendChild(n),r.appendChild(o),t.appendChild(r),{container:t,yearElement:i,monthElement:e}}function K(){c(y.monthNav),y.monthNav.appendChild(y.prevMonthNav),y.config.showMonths&&(y.yearElements=[],y.monthElements=[]) for(var e=y.config.showMonths;e--;){var t=V() y.yearElements.push(t.yearElement),y.monthElements.push(t.monthElement),y.monthNav.appendChild(t.container)}y.monthNav.appendChild(y.nextMonthNav)}function q(){y.weekdayContainer?c(y.weekdayContainer):y.weekdayContainer=l("div","flatpickr-weekdays") for(var e=y.config.showMonths;e--;){var t=l("div","flatpickr-weekdaycontainer") y.weekdayContainer.appendChild(t)}return G(),y.weekdayContainer}function G(){if(y.weekdayContainer){var e=y.l10n.firstDayOfWeek,t=y.l10n.weekdays.shorthand.slice() e>0&&e\n "+t.join("")+"\n \n "}}function W(e,t){void 0===t&&(t=!0) var r=t?e:e-y.currentMonth r<0&&!0===y._hidePrevMonthArrow||r>0&&!0===y._hideNextMonthArrow||(y.currentMonth+=r,(y.currentMonth<0||y.currentMonth>11)&&(y.currentYear+=y.currentMonth>11?1:-1,y.currentMonth=(y.currentMonth+12)%12,he("onYearChange"),H()),z(),he("onMonthChange"),me())}function Y(e){return!(!y.config.appendTo||!y.config.appendTo.contains(e))||y.calendarContainer.contains(e)}function Z(e){if(y.isOpen&&!y.config.inline){var t="function"==typeof(a=e).composedPath?a.composedPath()[0]:a.target,r=Y(t),n=t===y.input||t===y.altInput||y.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(y.input)||~e.path.indexOf(y.altInput)),i="blur"===e.type?n&&e.relatedTarget&&!Y(e.relatedTarget):!n&&!r&&!Y(e.relatedTarget),o=!y.config.ignoredFocusElements.some((function(e){return e.contains(t)})) i&&o&&(void 0!==y.timeContainer&&void 0!==y.minuteElement&&void 0!==y.hourElement&&k(),y.close(),"range"===y.config.mode&&1===y.selectedDates.length&&(y.clear(!1),y.redraw()))}var a}function J(e){if(!(!e||y.config.minDate&&ey.config.maxDate.getFullYear())){var t=e,r=y.currentYear!==t y.currentYear=t||y.currentYear,y.config.maxDate&&y.currentYear===y.config.maxDate.getFullYear()?y.currentMonth=Math.min(y.config.maxDate.getMonth(),y.currentMonth):y.config.minDate&&y.currentYear===y.config.minDate.getFullYear()&&(y.currentMonth=Math.max(y.config.minDate.getMonth(),y.currentMonth)),r&&(y.redraw(),he("onYearChange"),H())}}function $(e,t){void 0===t&&(t=!0) var r=y.parseDate(e,void 0,t) if(y.config.minDate&&r&&b(r,y.config.minDate,void 0!==t?t:!y.minDateHasTime)<0||y.config.maxDate&&r&&b(r,y.config.maxDate,void 0!==t?t:!y.maxDateHasTime)>0)return!1 if(0===y.config.enable.length&&0===y.config.disable.length)return!0 if(void 0===r)return!1 for(var n=y.config.enable.length>0,i=n?y.config.enable:y.config.disable,o=0,a=void 0;o=a.from.getTime()&&r.getTime()<=a.to.getTime())return n}return!n}function Q(e){return void 0!==y.daysContainer&&(-1===e.className.indexOf("hidden")&&y.daysContainer.contains(e))}function X(e){var t=e.target===y._input,r=y.config.allowInput,n=y.isOpen&&(!r||!t),i=y.config.inline&&t&&!r if(13===e.keyCode&&t){if(r)return y.setDate(y._input.value,!0,e.target===y.altInput?y.config.altFormat:y.config.dateFormat),e.target.blur() y.open()}else if(Y(e.target)||n||i){var o=!!y.timeContainer&&y.timeContainer.contains(e.target) switch(e.keyCode){case 13:o?(e.preventDefault(),k(),se()):ue(e) break case 27:e.preventDefault(),se() break case 8:case 46:t&&!y.config.allowInput&&(e.preventDefault(),y.clear()) break case 37:case 39:if(o||t)y.hourElement&&y.hourElement.focus() else if(e.preventDefault(),void 0!==y.daysContainer&&(!1===r||document.activeElement&&Q(document.activeElement))){var a=39===e.keyCode?1:-1 e.ctrlKey?(e.stopPropagation(),W(a),U(j(1),0)):U(void 0,a)}break case 38:case 40:e.preventDefault() var s=40===e.keyCode?1:-1 y.daysContainer&&void 0!==e.target.$i||e.target===y.input||e.target===y.altInput?e.ctrlKey?(e.stopPropagation(),J(y.currentYear-s),U(j(1),0)):o||U(void 0,7*s):e.target===y.currentYearElement?J(y.currentYear-s):y.config.enableTime&&(!o&&y.hourElement&&y.hourElement.focus(),k(e),y._debouncedChange()) break case 9:if(o){var u=[y.hourElement,y.minuteElement,y.secondElement,y.amPM].concat(y.pluginElements).filter((function(e){return e})),l=u.indexOf(e.target) if(-1!==l){var c=u[l+(e.shiftKey?-1:1)] e.preventDefault(),(c||y._input).focus()}}else!y.config.noCalendar&&y.daysContainer&&y.daysContainer.contains(e.target)&&e.shiftKey&&(e.preventDefault(),y._input.focus())}}if(void 0!==y.amPM&&e.target===y.amPM)switch(e.key){case y.l10n.amPM[0].charAt(0):case y.l10n.amPM[0].charAt(0).toLowerCase():y.amPM.textContent=y.l10n.amPM[0],M(),ge() break case y.l10n.amPM[1].charAt(0):case y.l10n.amPM[1].charAt(0).toLowerCase():y.amPM.textContent=y.l10n.amPM[1],M(),ge()}(t||Y(e.target))&&he("onKeyDown",e)}function ee(e){if(1===y.selectedDates.length&&(!e||e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():y.days.firstElementChild.dateObj.getTime(),r=y.parseDate(y.selectedDates[0],void 0,!0).getTime(),n=Math.min(t,y.selectedDates[0].getTime()),i=Math.max(t,y.selectedDates[0].getTime()),o=!1,a=0,s=0,u=n;un&&ua)?a=u:u>r&&(!s||u0&&d0&&d>s return p?(h.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach((function(e){h.classList.remove(e)})),"continue"):o&&!p?"continue":(["startRange","inRange","endRange","notAllowed"].forEach((function(e){h.classList.remove(e)})),void(void 0!==e&&(e.classList.add(t<=y.selectedDates[0].getTime()?"startRange":"endRange"),rt&&d===r&&h.classList.add("endRange"),d>=a&&(0===s||d<=s)&&(l=r,f=t,(u=d)>Math.min(l,f)&&u0||r.getMinutes()>0||r.getSeconds()>0),y.selectedDates&&(y.selectedDates=y.selectedDates.filter((function(e){return $(e)})),y.selectedDates.length||"min"!==e||x(r),ge()),y.daysContainer&&(ae(),void 0!==r?y.currentYearElement[e]=r.getFullYear().toString():y.currentYearElement.removeAttribute(e),y.currentYearElement.disabled=!!n&&void 0!==r&&n.getFullYear()===r.getFullYear())}}function ie(){"object"!=typeof y.config.locale&&void 0===E.l10ns[y.config.locale]&&y.config.errorHandler(new Error("flatpickr: invalid locale "+y.config.locale)),y.l10n=e({},E.l10ns.default,"object"==typeof y.config.locale?y.config.locale:"default"!==y.config.locale?E.l10ns[y.config.locale]:void 0),m.K="("+y.l10n.amPM[0]+"|"+y.l10n.amPM[1]+"|"+y.l10n.amPM[0].toLowerCase()+"|"+y.l10n.amPM[1].toLowerCase()+")",void 0===e({},p,JSON.parse(JSON.stringify(h.dataset||{}))).time_24hr&&void 0===E.defaultConfig.time_24hr&&(y.config.time_24hr=y.l10n.time_24hr),y.formatDate=g(y),y.parseDate=v({config:y.config,l10n:y.l10n})}function oe(e){if(void 0!==y.calendarContainer){he("onPreCalendarPosition") var t=e||y._positionElement,r=Array.prototype.reduce.call(y.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),n=y.calendarContainer.offsetWidth,i=y.config.position.split(" "),o=i[0],a=i.length>1?i[1]:null,s=t.getBoundingClientRect(),l=window.innerHeight-s.bottom,c="above"===o||"below"!==o&&lr,f=window.pageYOffset+s.top+(c?-r-2:t.offsetHeight+2) if(u(y.calendarContainer,"arrowTop",!c),u(y.calendarContainer,"arrowBottom",c),!y.config.inline){var h=window.pageXOffset+s.left-(null!=a&&"center"===a?(n-s.width)/2:0),d=window.document.body.offsetWidth-(window.pageXOffset+s.right),p=h+n>window.document.body.offsetWidth,m=d+n>window.document.body.offsetWidth if(u(y.calendarContainer,"rightMost",p),!y.config.static)if(y.calendarContainer.style.top=f+"px",p)if(m){var g=document.styleSheets[0] if(void 0===g)return var v=window.document.body.offsetWidth,b=Math.max(0,v/2-n/2),w=g.cssRules.length,_="{left:"+s.left+"px;right:auto;}" u(y.calendarContainer,"rightMost",!1),u(y.calendarContainer,"centerMost",!0),g.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+_,w),y.calendarContainer.style.left=b+"px",y.calendarContainer.style.right="auto"}else y.calendarContainer.style.left="auto",y.calendarContainer.style.right=d+"px" else y.calendarContainer.style.left=h+"px",y.calendarContainer.style.right="auto"}}}function ae(){y.config.noCalendar||y.isMobile||(me(),z())}function se(){y._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(y.close,0):y.close()}function ue(e){e.preventDefault(),e.stopPropagation() var t=function e(t,r){return r(t)?t:t.parentNode?e(t.parentNode,r):void 0}(e.target,(function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")})) if(void 0!==t){var r=t,n=y.latestSelectedDateObj=new Date(r.dateObj.getTime()),i=(n.getMonth()y.currentMonth+y.config.showMonths-1)&&"range"!==y.config.mode if(y.selectedDateElem=r,"single"===y.config.mode)y.selectedDates=[n] else if("multiple"===y.config.mode){var o=pe(n) o?y.selectedDates.splice(parseInt(o),1):y.selectedDates.push(n)}else"range"===y.config.mode&&(2===y.selectedDates.length&&y.clear(!1,!1),y.latestSelectedDateObj=n,y.selectedDates.push(n),0!==b(n,y.selectedDates[0],!0)&&y.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))) if(M(),i){var a=y.currentYear!==n.getFullYear() y.currentYear=n.getFullYear(),y.currentMonth=n.getMonth(),a&&(he("onYearChange"),H()),he("onMonthChange")}if(me(),z(),ge(),y.config.enableTime&&setTimeout((function(){return y.showTimeInput=!0}),50),i||"range"===y.config.mode||1!==y.config.showMonths?void 0!==y.selectedDateElem&&void 0===y.hourElement&&y.selectedDateElem&&y.selectedDateElem.focus():L(r),void 0!==y.hourElement&&void 0!==y.hourElement&&y.hourElement.focus(),y.config.closeOnSelect){var s="single"===y.config.mode&&!y.config.enableTime,u="range"===y.config.mode&&2===y.selectedDates.length&&!y.config.enableTime;(s||u)&&se()}R()}}y.parseDate=v({config:y.config,l10n:y.l10n}),y._handlers=[],y.pluginElements=[],y.loadedPlugins=[],y._bind=O,y._setHoursFromDate=x,y._positionCalendar=oe,y.changeMonth=W,y.changeYear=J,y.clear=function(e,t){void 0===e&&(e=!0) void 0===t&&(t=!0) y.input.value="",void 0!==y.altInput&&(y.altInput.value="") void 0!==y.mobileInput&&(y.mobileInput.value="") y.selectedDates=[],y.latestSelectedDateObj=void 0,!0===t&&(y.currentYear=y._initialDate.getFullYear(),y.currentMonth=y._initialDate.getMonth()) y.showTimeInput=!1,!0===y.config.enableTime&&A() y.redraw(),e&&he("onChange")},y.close=function(){y.isOpen=!1,y.isMobile||(void 0!==y.calendarContainer&&y.calendarContainer.classList.remove("open"),void 0!==y._input&&y._input.classList.remove("active")) he("onClose")},y._createElement=l,y.destroy=function(){void 0!==y.config&&he("onDestroy") for(var e=y._handlers.length;e--;){var t=y._handlers[e] t.element.removeEventListener(t.event,t.handler,t.options)}if(y._handlers=[],y.mobileInput)y.mobileInput.parentNode&&y.mobileInput.parentNode.removeChild(y.mobileInput),y.mobileInput=void 0 else if(y.calendarContainer&&y.calendarContainer.parentNode)if(y.config.static&&y.calendarContainer.parentNode){var r=y.calendarContainer.parentNode if(r.lastChild&&r.removeChild(r.lastChild),r.parentNode){for(;r.firstChild;)r.parentNode.insertBefore(r.firstChild,r) r.parentNode.removeChild(r)}}else y.calendarContainer.parentNode.removeChild(y.calendarContainer) y.altInput&&(y.input.type="text",y.altInput.parentNode&&y.altInput.parentNode.removeChild(y.altInput),delete y.altInput) y.input&&(y.input.type=y.input._type,y.input.classList.remove("flatpickr-input"),y.input.removeAttribute("readonly"),y.input.value="");["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete y[e]}catch(t){}}))},y.isEnabled=$,y.jumpToDate=P,y.open=function(e,t){void 0===t&&(t=y._positionElement) if(!0===y.isMobile)return e&&(e.preventDefault(),e.target&&e.target.blur()),void 0!==y.mobileInput&&(y.mobileInput.focus(),y.mobileInput.click()),void he("onOpen") if(y._input.disabled||y.config.inline)return var r=y.isOpen y.isOpen=!0,r||(y.calendarContainer.classList.add("open"),y._input.classList.add("active"),he("onOpen"),oe(t)) !0===y.config.enableTime&&!0===y.config.noCalendar&&(0===y.selectedDates.length&&re(),!1!==y.config.allowInput||void 0!==e&&y.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return y.hourElement.select()}),50))},y.redraw=ae,y.set=function(e,r){if(null!==e&&"object"==typeof e)for(var n in Object.assign(y.config,e),e)void 0!==le[n]&&le[n].forEach((function(e){return e()})) else y.config[e]=r,void 0!==le[e]?le[e].forEach((function(e){return e()})):t.indexOf(e)>-1&&(y.config[e]=s(r)) y.redraw(),ge(!1)},y.setDate=function(e,t,r){void 0===t&&(t=!1) void 0===r&&(r=y.config.dateFormat) if(0!==e&&!e||e instanceof Array&&0===e.length)return y.clear(t) ce(e,r),y.showTimeInput=y.selectedDates.length>0,y.latestSelectedDateObj=y.selectedDates[y.selectedDates.length-1],y.redraw(),P(),x(),0===y.selectedDates.length&&y.clear(!1) ge(t),t&&he("onChange")},y.toggle=function(e){if(!0===y.isOpen)return y.close() y.open(e)} var le={locale:[ie,G],showMonths:[K,S,q],minDate:[P],maxDate:[P]} function ce(e,t){var r=[] if(e instanceof Array)r=e.map((function(e){return y.parseDate(e,t)})) else if(e instanceof Date||"number"==typeof e)r=[y.parseDate(e,t)] else if("string"==typeof e)switch(y.config.mode){case"single":case"time":r=[y.parseDate(e,t)] break case"multiple":r=e.split(y.config.conjunction).map((function(e){return y.parseDate(e,t)})) break case"range":r=e.split(y.l10n.rangeSeparator).map((function(e){return y.parseDate(e,t)}))}else y.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e))) y.selectedDates=r.filter((function(e){return e instanceof Date&&$(e,!1)})),"range"===y.config.mode&&y.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function fe(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?y.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:y.parseDate(e.from,void 0),to:y.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function he(e,t){if(void 0!==y.config){var r=y.config[e] if(void 0!==r&&r.length>0)for(var n=0;r[n]&&n1||"static"===y.config.monthSelectorType?y.monthElements[t].textContent=d(r.getMonth(),y.config.shorthandCurrentMonth,y.l10n)+" ":y.monthsDropdownContainer.value=r.getMonth().toString(),e.value=r.getFullYear().toString()})),y._hidePrevMonthArrow=void 0!==y.config.minDate&&(y.currentYear===y.config.minDate.getFullYear()?y.currentMonth<=y.config.minDate.getMonth():y.currentYeary.config.maxDate.getMonth():y.currentYear>y.config.maxDate.getFullYear()))}function ye(e){return y.selectedDates.map((function(t){return y.formatDate(t,e)})).filter((function(e,t,r){return"range"!==y.config.mode||y.config.enableTime||r.indexOf(e)===t})).join("range"!==y.config.mode?y.config.conjunction:y.l10n.rangeSeparator)}function ge(e){void 0===e&&(e=!0),void 0!==y.mobileInput&&y.mobileFormatStr&&(y.mobileInput.value=void 0!==y.latestSelectedDateObj?y.formatDate(y.latestSelectedDateObj,y.mobileFormatStr):""),y.input.value=ye(y.config.dateFormat),void 0!==y.altInput&&(y.altInput.value=ye(y.config.altFormat)),!1!==e&&he("onValueUpdate")}function ve(e){var t=y.prevMonthNav.contains(e.target),r=y.nextMonthNav.contains(e.target) t||r?W(t?-1:1):y.yearElements.indexOf(e.target)>=0?e.target.select():e.target.classList.contains("arrowUp")?y.changeYear(y.currentYear+1):e.target.classList.contains("arrowDown")&&y.changeYear(y.currentYear-1)}return function(){y.element=y.input=h,y.isOpen=!1,function(){var n=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],i=e({},p,JSON.parse(JSON.stringify(h.dataset||{}))),o={} y.config.parseDate=i.parseDate,y.config.formatDate=i.formatDate,Object.defineProperty(y.config,"enable",{get:function(){return y.config._enable},set:function(e){y.config._enable=fe(e)}}),Object.defineProperty(y.config,"disable",{get:function(){return y.config._disable},set:function(e){y.config._disable=fe(e)}}) var a="time"===i.mode if(!i.dateFormat&&(i.enableTime||a)){var u=E.defaultConfig.dateFormat||r.dateFormat o.dateFormat=i.noCalendar||a?"H:i"+(i.enableSeconds?":S":""):u+" H:i"+(i.enableSeconds?":S":"")}if(i.altInput&&(i.enableTime||a)&&!i.altFormat){var l=E.defaultConfig.altFormat||r.altFormat o.altFormat=i.noCalendar||a?"h:i"+(i.enableSeconds?":S K":" K"):l+" h:i"+(i.enableSeconds?":S":"")+" K"}i.altInputClass||(y.config.altInputClass=y.input.className+" "+y.config.altInputClass) Object.defineProperty(y.config,"minDate",{get:function(){return y.config._minDate},set:ne("min")}),Object.defineProperty(y.config,"maxDate",{get:function(){return y.config._maxDate},set:ne("max")}) var c=function(e){return function(t){y.config["min"===e?"_minTime":"_maxTime"]=y.parseDate(t,"H:i:S")}} Object.defineProperty(y.config,"minTime",{get:function(){return y.config._minTime},set:c("min")}),Object.defineProperty(y.config,"maxTime",{get:function(){return y.config._maxTime},set:c("max")}),"time"===i.mode&&(y.config.noCalendar=!0,y.config.enableTime=!0) Object.assign(y.config,o,i) for(var f=0;f-1?y.config[m]=s(d[m]).map(_).concat(y.config[m]):void 0===i[m]&&(y.config[m]=d[m])}he("onParseConfig")}(),ie(),function(){if(y.input=y.config.wrap?h.querySelector("[data-input]"):h,!y.input)return void y.config.errorHandler(new Error("Invalid input element specified")) y.input._type=y.input.type,y.input.type="text",y.input.classList.add("flatpickr-input"),y._input=y.input,y.config.altInput&&(y.altInput=l(y.input.nodeName,y.config.altInputClass),y._input=y.altInput,y.altInput.placeholder=y.input.placeholder,y.altInput.disabled=y.input.disabled,y.altInput.required=y.input.required,y.altInput.tabIndex=y.input.tabIndex,y.altInput.type="text",y.input.setAttribute("type","hidden"),!y.config.static&&y.input.parentNode&&y.input.parentNode.insertBefore(y.altInput,y.input.nextSibling)) y.config.allowInput||y._input.setAttribute("readonly","readonly") y._positionElement=y.config.positionElement||y._input}(),function(){y.selectedDates=[],y.now=y.parseDate(y.config.now)||new Date var e=y.config.defaultDate||("INPUT"!==y.input.nodeName&&"TEXTAREA"!==y.input.nodeName||!y.input.placeholder||y.input.value!==y.input.placeholder?y.input.value:null) e&&ce(e,y.config.dateFormat) y._initialDate=y.selectedDates.length>0?y.selectedDates[0]:y.config.minDate&&y.config.minDate.getTime()>y.now.getTime()?y.config.minDate:y.config.maxDate&&y.config.maxDate.getTime()0&&(y.latestSelectedDateObj=y.selectedDates[0]) void 0!==y.config.minTime&&(y.config.minTime=y.parseDate(y.config.minTime,"H:i")) void 0!==y.config.maxTime&&(y.config.maxTime=y.parseDate(y.config.maxTime,"H:i")) y.minDateHasTime=!!y.config.minDate&&(y.config.minDate.getHours()>0||y.config.minDate.getMinutes()>0||y.config.minDate.getSeconds()>0),y.maxDateHasTime=!!y.config.maxDate&&(y.config.maxDate.getHours()>0||y.config.maxDate.getMinutes()>0||y.config.maxDate.getSeconds()>0),Object.defineProperty(y,"showTimeInput",{get:function(){return y._showTimeInput},set:function(e){y._showTimeInput=e,y.calendarContainer&&u(y.calendarContainer,"showTimeInput",e),y.isOpen&&oe()}})}(),y.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=y.currentMonth),void 0===t&&(t=y.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:y.l10n.daysInMonth[e]}},y.isMobile||function(){var e=window.document.createDocumentFragment() if(y.calendarContainer=l("div","flatpickr-calendar"),y.calendarContainer.tabIndex=-1,!y.config.noCalendar){if(e.appendChild((y.monthNav=l("div","flatpickr-months"),y.yearElements=[],y.monthElements=[],y.prevMonthNav=l("span","flatpickr-prev-month"),y.prevMonthNav.innerHTML=y.config.prevArrow,y.nextMonthNav=l("span","flatpickr-next-month"),y.nextMonthNav.innerHTML=y.config.nextArrow,K(),Object.defineProperty(y,"_hidePrevMonthArrow",{get:function(){return y.__hidePrevMonthArrow},set:function(e){y.__hidePrevMonthArrow!==e&&(u(y.prevMonthNav,"flatpickr-disabled",e),y.__hidePrevMonthArrow=e)}}),Object.defineProperty(y,"_hideNextMonthArrow",{get:function(){return y.__hideNextMonthArrow},set:function(e){y.__hideNextMonthArrow!==e&&(u(y.nextMonthNav,"flatpickr-disabled",e),y.__hideNextMonthArrow=e)}}),y.currentYearElement=y.yearElements[0],me(),y.monthNav)),y.innerContainer=l("div","flatpickr-innerContainer"),y.config.weekNumbers){var t=function(){y.calendarContainer.classList.add("hasWeeks") var e=l("div","flatpickr-weekwrapper") e.appendChild(l("span","flatpickr-weekday",y.l10n.weekAbbreviation)) var t=l("div","flatpickr-weeks") return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),r=t.weekWrapper,n=t.weekNumbers y.innerContainer.appendChild(r),y.weekNumbers=n,y.weekWrapper=r}y.rContainer=l("div","flatpickr-rContainer"),y.rContainer.appendChild(q()),y.daysContainer||(y.daysContainer=l("div","flatpickr-days"),y.daysContainer.tabIndex=-1),z(),y.rContainer.appendChild(y.daysContainer),y.innerContainer.appendChild(y.rContainer),e.appendChild(y.innerContainer)}y.config.enableTime&&e.appendChild(function(){y.calendarContainer.classList.add("hasTime"),y.config.noCalendar&&y.calendarContainer.classList.add("noCalendar") y.timeContainer=l("div","flatpickr-time"),y.timeContainer.tabIndex=-1 var e=l("span","flatpickr-time-separator",":"),t=f("flatpickr-hour",{"aria-label":y.l10n.hourAriaLabel}) y.hourElement=t.getElementsByTagName("input")[0] var r=f("flatpickr-minute",{"aria-label":y.l10n.minuteAriaLabel}) y.minuteElement=r.getElementsByTagName("input")[0],y.hourElement.tabIndex=y.minuteElement.tabIndex=-1,y.hourElement.value=i(y.latestSelectedDateObj?y.latestSelectedDateObj.getHours():y.config.time_24hr?y.config.defaultHour:function(e){switch(e%24){case 0:case 12:return 12 default:return e%12}}(y.config.defaultHour)),y.minuteElement.value=i(y.latestSelectedDateObj?y.latestSelectedDateObj.getMinutes():y.config.defaultMinute),y.hourElement.setAttribute("step",y.config.hourIncrement.toString()),y.minuteElement.setAttribute("step",y.config.minuteIncrement.toString()),y.hourElement.setAttribute("min",y.config.time_24hr?"0":"1"),y.hourElement.setAttribute("max",y.config.time_24hr?"23":"12"),y.minuteElement.setAttribute("min","0"),y.minuteElement.setAttribute("max","59"),y.timeContainer.appendChild(t),y.timeContainer.appendChild(e),y.timeContainer.appendChild(r),y.config.time_24hr&&y.timeContainer.classList.add("time24hr") if(y.config.enableSeconds){y.timeContainer.classList.add("hasSeconds") var n=f("flatpickr-second") y.secondElement=n.getElementsByTagName("input")[0],y.secondElement.value=i(y.latestSelectedDateObj?y.latestSelectedDateObj.getSeconds():y.config.defaultSeconds),y.secondElement.setAttribute("step",y.minuteElement.getAttribute("step")),y.secondElement.setAttribute("min","0"),y.secondElement.setAttribute("max","59"),y.timeContainer.appendChild(l("span","flatpickr-time-separator",":")),y.timeContainer.appendChild(n)}y.config.time_24hr||(y.amPM=l("span","flatpickr-am-pm",y.l10n.amPM[o((y.latestSelectedDateObj?y.hourElement.value:y.config.defaultHour)>11)]),y.amPM.title=y.l10n.toggleTitle,y.amPM.tabIndex=-1,y.timeContainer.appendChild(y.amPM)) return y.timeContainer}()) u(y.calendarContainer,"rangeMode","range"===y.config.mode),u(y.calendarContainer,"animate",!0===y.config.animate),u(y.calendarContainer,"multiMonth",y.config.showMonths>1),y.calendarContainer.appendChild(e) var a=void 0!==y.config.appendTo&&void 0!==y.config.appendTo.nodeType if((y.config.inline||y.config.static)&&(y.calendarContainer.classList.add(y.config.inline?"inline":"static"),y.config.inline&&(!a&&y.element.parentNode?y.element.parentNode.insertBefore(y.calendarContainer,y._input.nextSibling):void 0!==y.config.appendTo&&y.config.appendTo.appendChild(y.calendarContainer)),y.config.static)){var s=l("div","flatpickr-wrapper") y.element.parentNode&&y.element.parentNode.insertBefore(s,y.element),s.appendChild(y.element),y.altInput&&s.appendChild(y.altInput),s.appendChild(y.calendarContainer)}y.config.static||y.config.inline||(void 0!==y.config.appendTo?y.config.appendTo:window.document.body).appendChild(y.calendarContainer)}(),function(){y.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(y.element.querySelectorAll("[data-"+e+"]"),(function(t){return O(t,"click",y[e])}))})) if(y.isMobile)return void function(){var e=y.config.enableTime?y.config.noCalendar?"time":"datetime-local":"date" y.mobileInput=l("input",y.input.className+" flatpickr-mobile"),y.mobileInput.step=y.input.getAttribute("step")||"any",y.mobileInput.tabIndex=1,y.mobileInput.type=e,y.mobileInput.disabled=y.input.disabled,y.mobileInput.required=y.input.required,y.mobileInput.placeholder=y.input.placeholder,y.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",y.selectedDates.length>0&&(y.mobileInput.defaultValue=y.mobileInput.value=y.formatDate(y.selectedDates[0],y.mobileFormatStr)) y.config.minDate&&(y.mobileInput.min=y.formatDate(y.config.minDate,"Y-m-d")) y.config.maxDate&&(y.mobileInput.max=y.formatDate(y.config.maxDate,"Y-m-d")) y.input.type="hidden",void 0!==y.altInput&&(y.altInput.type="hidden") try{y.input.parentNode&&y.input.parentNode.insertBefore(y.mobileInput,y.input.nextSibling)}catch(t){}O(y.mobileInput,"change",(function(e){y.setDate(e.target.value,!1,y.mobileFormatStr),he("onChange"),he("onClose")}))}() var e=a(te,50) y._debouncedChange=a(R,300),y.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&O(y.daysContainer,"mouseover",(function(e){"range"===y.config.mode&&ee(e.target)})) O(window.document.body,"keydown",X),y.config.inline||y.config.static||O(window,"resize",e) void 0!==window.ontouchstart?O(window.document,"touchstart",Z):O(window.document,"mousedown",C(Z)) O(window.document,"focus",Z,{capture:!0}),!0===y.config.clickOpens&&(O(y._input,"focus",y.open),O(y._input,"mousedown",C(y.open))) void 0!==y.daysContainer&&(O(y.monthNav,"mousedown",C(ve)),O(y.monthNav,["keyup","increment"],I),O(y.daysContainer,"mousedown",C(ue))) if(void 0!==y.timeContainer&&void 0!==y.minuteElement&&void 0!==y.hourElement){O(y.timeContainer,["increment"],k),O(y.timeContainer,"blur",k,{capture:!0}),O(y.timeContainer,"mousedown",C(N)),O([y.hourElement,y.minuteElement],["focus","click"],(function(e){return e.target.select()})),void 0!==y.secondElement&&O(y.secondElement,"focus",(function(){return y.secondElement&&y.secondElement.select()})),void 0!==y.amPM&&O(y.amPM,"mousedown",C((function(e){k(e),R()})))}}(),(y.selectedDates.length||y.config.noCalendar)&&(y.config.enableTime&&x(y.config.noCalendar?y.latestSelectedDateObj||y.config.minDate:void 0),ge(!1)),S(),y.showTimeInput=y.selectedDates.length>0||y.config.noCalendar var n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent) !y.isMobile&&n&&oe(),he("onReady")}(),y}function S(e,t){for(var r=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),n=[],i=0;i1?r-1:0),i=1;i1?r-1:0),i=1;i2?o-2:0),l=2;l1&&void 0!==arguments[1]?arguments[1]:function(){return o} return function(){for(var n=arguments.length,i=Array(n),o=0;o2?i-2:0),a=2;a2?o-2:0),l=2;l2?h-2:0),p=2;p2?r-2:0),i=2;it}))})),define("ember-awesome-macros/gte",["exports","ember-macro-helpers/curried-computed"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)((function(e,t){return e>=t}))})),define("ember-awesome-macros/hash",["exports","ember-macro-helpers/curried-computed"],(function(e,t){"use strict" function r(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:function(){} return(0,r.default)((function(r,n){for(var i=arguments.length,o=Array(i>2?i-2:0),a=2;a1?r-1:0),i=1;i1))throw new Error("Invalid `diffAttrs` argument. Expected either one or more strings and a function, or an options hash.") e=[].slice.call(arguments),n=e.pop()}return function(){var t=this,r={},a=void 0,s=!1 i.has(this)||(s=!0,i.set(this,{})),a=i.get(this),e.forEach((function(e){var n=t.get(e) o(e,a[e],n)||(r[e]=[a[e],n],a[e]=n)})),n.apply(this,[s?null:r].concat(Array.prototype.slice.call(arguments)))}} var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e} function r(e,t,r){return t===r}})),define("ember-fetch/errors",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.isUnauthorizedResponse=function(e){return 401===e.status},e.isForbiddenResponse=function(e){return 403===e.status},e.isInvalidResponse=function(e){return 422===e.status},e.isBadRequestResponse=function(e){return 400===e.status},e.isNotFoundResponse=function(e){return 404===e.status},e.isGoneResponse=function(e){return 410===e.status},e.isAbortError=function(e){return"AbortError"==e.name},e.isConflictResponse=function(e){return 409===e.status},e.isServerErrorResponse=function(e){return e.status>=500&&e.status<600}})),define("ember-fetch/types",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.isPlainObject=function(e){return"[object Object]"===Object.prototype.toString.call(e)}})),define("ember-fetch/utils/determine-body-promise",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){return e.text().then((function(r){var n=r try{n=JSON.parse(r)}catch(o){if(!(o instanceof SyntaxError))throw o var i=e.status !e.ok||204!==i&&205!==i&&"HEAD"!==t.method?console.warn("This response was unable to be parsed as json.",r):n=void 0}return n}))}})) define("ember-fetch/utils/mung-options-for-fetch",["exports","ember-fetch/utils/serialize-query-params","ember-fetch/types"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var n=Ember.assign({credentials:"same-origin"},e) if(n.method=(n.method||n.type||"GET").toUpperCase(),n.data)if("GET"===n.method||"HEAD"===n.method){if(Object.keys(n.data).length){var i=n.url.indexOf("?")>-1?"&":"?" n.url+="".concat(i).concat((0,t.serializeQueryParams)(n.data))}}else(0,r.isPlainObject)(n.data)?n.body=JSON.stringify(n.data):n.body=n.data return n}})),define("ember-fetch/utils/serialize-query-params",["exports","ember-fetch/types"],(function(e,t){"use strict" function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.serializeQueryParams=i,e.default=void 0 var n=/\[\]$/ function i(e){var i=[] return function e(a,s){var u,l,c if(a)if(Array.isArray(s))for(u=0,l=s.length;ue.length)&&(t=e.length) for(var r=0,n=new Array(t);r1?r-1:0),i=1;i1)return function(e){return e.map(n).reduce((function(e,t){var r=t.filter((function(t){return-1===e.indexOf(t)})) return e.concat(r)}),[])}(i) var o=e.indexOf(r.ARRAY_EACH) return-1===o&&(o=e.indexOf(r.ARRAY_LENGTH)),0===o?[""]:o>0?[e.slice(0,o-1)]:(0,t.default)(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n})),define("ember-macro-helpers/collapse-keys",["exports","ember-macro-helpers/collapse-key"],(function(e,t){"use strict" function r(e){var r=[],n=[] return e.forEach((function(e){var i=(0,t.default)(e) r=r.concat(i) var o=void 0 o=n.length?n[n.length-1]+1:0,n=n.concat(i.map((function(){return o})))})),{collapsedKeys:r,keyMap:n}}Object.defineProperty(e,"__esModule",{value:!0}),e.collapseKeysWithMap=r,e.default=function(e){return r(e).collapsedKeys}})),define("ember-macro-helpers/computed-unsafe",["exports","ember-macro-helpers/-build-computed","ember-macro-helpers/get-value-unsafe","ember-macro-helpers/flatten-keys-unsafe"],(function(e,t,r,n){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) e.default=(0,t.default)({collapseKeys:function(e){return e},getValue:r.default,flattenKeys:n.default})})),define("ember-macro-helpers/computed",["exports","ember-macro-helpers/-build-computed","ember-macro-helpers/collapse-keys","ember-macro-helpers/get-value","ember-macro-helpers/flatten-keys"],(function(e,t,r,n,i){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)({collapseKeys:r.default,getValue:n.default,flattenKeys:i.default})})),define("ember-macro-helpers/create-class-computed",["exports","ember-macro-helpers/get-value","ember-macro-helpers/collapse-keys","ember-macro-helpers/flatten-keys","ember-macro-helpers/-constants"],(function(e,t,r,n,i){"use strict" function o(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{},r=(0,t.default)(e) return void 0!==r?r:e.macro}})),define("ember-macro-helpers/get-value",["exports","ember-macro-helpers/is-computed"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.context,n=e.macro,i=e.key return(0,t.default)(n)?n._getter.call(r,i):"string"!=typeof n?n:Ember.isBlank(n)?r:Ember.get(r,n)}})),define("ember-macro-helpers/index",["exports","ember-macro-helpers/computed","ember-macro-helpers/create-class-computed","ember-macro-helpers/curried-computed","ember-macro-helpers/lazy-computed","ember-macro-helpers/lazy-curried-computed","ember-macro-helpers/literal","ember-macro-helpers/raw","ember-macro-helpers/reads","ember-macro-helpers/writable"],(function(e,t,r,n,i,o,a,s,u,l){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"computed",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"createClassComputed",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"curriedComputed",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"lazyComputed",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"lazyCurriedComputed",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"literal",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"raw",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"reads",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"writable",{enumerable:!0,get:function(){return l.default}})})),define("ember-macro-helpers/is-computed",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return e instanceof t} var t=Ember.ComputedProperty})),define("ember-macro-helpers/lazy-computed",["exports","ember-macro-helpers/-build-computed","ember-macro-helpers/collapse-keys","ember-macro-helpers/get-value","ember-macro-helpers/flatten-keys"],(function(e,t,r,n,i){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.default)({collapseKeys:r.default,getValue:n.default,flattenKeys:i.default,isLazy:!0})})),define("ember-macro-helpers/lazy-curried-computed",["exports","ember-macro-helpers/-build-computed","ember-macro-helpers/lazy-computed"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,t.buildCurriedComputed)(r.default)})),define("ember-macro-helpers/literal",["exports","ember-macro-helpers/raw"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})})),define("ember-macro-helpers/normalize-array-key",["exports","ember-macro-helpers/-constants"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[] if("string"!=typeof e)return e var n=void 0,i=e.indexOf(t.ARRAY_EACH) if(-1!==i){var o=e.split("."),a=o[o.length-1] n=0===a.indexOf("{")?a.substring(1,a.length-1).split(","):[a]}else i=e.indexOf(t.ARRAY_LENGTH),n=[] 0===i?e="":i>0&&(e=e.slice(0,i-1)),r.forEach((function(e){void 0!==e&&-1===n.indexOf(e)&&n.push(e)})) var s=void 0 return 0===n.length?s=t.ARRAY_LENGTH:(s=t.ARRAY_EACH,1===n.length?s+=n[0]:s+="{"+n.join(",")+"}"),Ember.isBlank(e)?s:e+"."+s}})),define("ember-macro-helpers/raw",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return Ember.computed((function(){return e})).readOnly()}})),define("ember-macro-helpers/reads",["exports","ember-macro-helpers/writable"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})})),define("ember-macro-helpers/writable",["exports","ember-macro-helpers/computed"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,n){var i={get:function(e){return e}} return n&&("object"===(void 0===n?"undefined":r(n))&&n.set?i.set=n.set:i.set=function(){return n.apply(this,arguments)}),(0,t.default)(e,i)} var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e}})),define("ember-moment/computeds/-base",["exports","ember-macro-helpers/computed-unsafe"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return function(){for(var r=arguments.length,n=Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:{} if(!e||e&&e.length>3)throw new TypeError("ember-moment: Invalid Number of arguments, at most 3") var i=n(e,3),o=i[0],a=i[1],s=i[2],u=Object.create(r),l=Ember.merge(u,s) return(0,t.default)(o).calendar(a,l)}))})) define("ember-moment/computeds/duration",["exports","moment","ember-moment/computeds/-base"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=(0,r.default)((function(e){return t.default.duration.apply(t.default,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t1&&(r=e.pop()),t.default.apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t1&&(r=e.pop()),t.default.apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t3)throw new TypeError("ember-moment: Invalid Number of arguments, expected 2 or 3") var f=[] return c>2&&f.push(l.shift()),(r=this.morphMoment(u.moment.apply(u,f),{locale:a,timeZone:s})).isBetween.apply(r,n(l).concat([i,o]))}))})})),define("ember-moment/helpers/is-same-or-after",["exports","ember-moment/utils/helper-compute","ember-moment/helpers/-base"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=r.default.extend({compute:(0,t.default)((function(e,t){var r,n=t.precision,i=t.locale,o=t.timeZone this._super.apply(this,arguments) var a=Ember.get(this,"moment"),s=e.length,u=[],l=[] return 1===s?l.push(e[0]):2===s&&(u.push(e[0]),l.push(e[1])),(r=this.morphMoment(a.moment.apply(a,u),{locale:i,timeZone:o})).isSameOrAfter.apply(r,l.concat([n]))}))})})),define("ember-moment/helpers/is-same-or-before",["exports","ember-moment/utils/helper-compute","ember-moment/helpers/-base"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=r.default.extend({compute:(0,t.default)((function(e,t){var r,n=t.precision,i=t.locale,o=t.timeZone this._super.apply(this,arguments) var a=Ember.get(this,"moment"),s=e.length,u=[],l=[] return 1===s?l.push(e[0]):2===s&&(u.push(e[0]),l.push(e[1])),(r=this.morphMoment(a.moment.apply(a,u),{locale:i,timeZone:o})).isSameOrBefore.apply(r,l.concat([n]))}))})})),define("ember-moment/helpers/is-same",["exports","ember-moment/utils/helper-compute","ember-moment/helpers/-base"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=r.default.extend({compute:(0,t.default)((function(e,t){var r,n=t.precision,i=t.locale,o=t.timeZone this._super.apply(this,arguments) var a=Ember.get(this,"moment"),s=e.length,u=[],l=[] return 1===s?l.push(e[0]):2===s&&(u.push(e[0]),l.push(e[1])),(r=this.morphMoment(a.moment.apply(a,u),{locale:i,timeZone:o})).isSame.apply(r,l.concat([n]))}))})})),define("ember-moment/helpers/moment-add",["exports","ember-moment/utils/helper-compute","ember-moment/helpers/-base"],(function(e,t,r){"use strict" function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{} if(this._super.apply(this,arguments),!e||e&&e.length>3)throw new TypeError("ember-moment: Invalid Number of arguments, at most 3") var r=Ember.get(this,"moment"),i=t.locale,o=t.timeZone,a=n(e,3),s=a[0],u=a[1],l=a[2],c=Object.create(t) delete c.locale,delete c.timeZone var f=Ember.assign(c,l) return this.morphMoment(r.moment(s),{locale:i,timeZone:o}).calendar(u,f)}))})})),define("ember-moment/helpers/moment-diff",["exports","ember-moment/utils/helper-compute","ember-moment/helpers/-base"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) var n=function(e,t){if(Array.isArray(e))return e if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0 try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(u){i=!0,o=u}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t) throw new TypeError("Invalid attempt to destructure non-iterable instance")} e.default=r.default.extend({compute:(0,t.default)((function(e,t){var r=t.precision,i=t.float,o=t.locale,a=t.timeZone if(this._super.apply(this,arguments),!e||e&&2!==e.length)throw new TypeError("ember-moment: Invalid Number of arguments, must be 2") var s=Ember.get(this,"moment"),u=n(e,2),l=u[0],c=u[1] return this.morphMoment(s.moment(c),{locale:o,timeZone:a}).diff(l,r,i)}))})})),define("ember-moment/helpers/moment-duration",["exports","moment","ember-moment/helpers/-base"],(function(e,t,r){"use strict" function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t2)throw new TypeError("ember-moment: Invalid Number of arguments, at most 2") var s=a.moment(t.default.duration.apply(t.default,n(e))) return this.morphMoment(s._i,{locale:i,timeZone:o}).humanize()}})})),define("ember-moment/helpers/moment-format",["exports","ember-moment/utils/helper-compute","ember-moment/helpers/-base"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=r.default.extend({defaultFormatDidChange:Ember.observer("moment.defaultFormat",(function(){this.recompute()})),compute:(0,t.default)((function(e,t){var r,n=t.locale,i=t.timeZone this._super.apply(this,arguments) var o=Ember.get(this,"moment"),a=e.length if(a>3)throw new TypeError("ember-moment: Invalid number of arguments, expected at most 3") var s=[],u=[],l=Ember.get(this,"moment.defaultFormat") return s.push(e[0]),1!==a||Ember.isEmpty(l)?2===a?u.push(e[1]):a>2&&(s.push(e[2]),u.push(e[1])):u.push(l),(r=this.morphMoment(o.moment.apply(o,s),{locale:n,timeZone:i})).format.apply(r,u)}))})})),define("ember-moment/helpers/moment-from-now",["exports","ember-moment/utils/helper-compute","ember-moment/helpers/-base"],(function(e,t,r){"use strict" function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:{} this.changeLocale(e,t)},changeLocale:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} Ember.setProperties(this,{locale:e,localeOptions:r}),t.default.updateLocale(e,r),this.trigger("localeChanged",e)},setTimeZone:function(e){this.changeTimeZone(e)},changeTimeZone:function(e){Ember.set(this,"timeZone",e),this.trigger("timeZoneChanged",e)},isMoment:function(e){return t.default.isMoment(e)},moment:function(){var e=t.default.apply(void 0,arguments),r=Ember.getProperties(this,"locale","timeZone"),n=r.locale,i=r.timeZone return n&&e.locale&&(e=e.locale(n)),i&&e.tz&&(e=e.tz(i)),e},utc:function(){var e=t.default.utc.apply(t.default,arguments),r=Ember.getProperties(this,"locale"),n=r.locale return n&&e.locale&&(e=e.locale(n)),e}})})),define("ember-moment/utils/helper-compute",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return function(t,r){if(!t||t&&0===t.length)throw new TypeError("ember-moment: Invalid Number of arguments, expected at least 1") var n=t[0],i=r.allowEmpty||r["allow-empty"] if(null==i&&(i=Ember.get(this,"globalAllowEmpty")),Ember.isBlank(n)){if(i)return console.warn('ember-moment: an empty value (null, undefined, or "") was passed to ember-moment helper')}return e.apply(this,arguments)}}})),define("ember-promise-helpers/helpers/await",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}) var t=function(e,t){if(Array.isArray(e))return e if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0 try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(u){i=!0,o=u}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t) throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=Ember.RSVP.Promise e.default=Ember.Helper.extend({valueBeforeSettled:null,compute:function(e){var r=this,n=t(e,1)[0] return n&&"function"==typeof n.then?this.ensureLatestPromise(n,(function(e){e.then((function(e){r.setValue(e,n)})).catch((function(){r.setValue(null,n)}))})):n},ensureLatestPromise:function(e,t){return this._wasSettled&&e===this._promise?this._value:(this._unsettle(),this._promise=e,t.call(this,r.resolve(e)),this.get("valueBeforeSettled"))},_settle:function(e){this.allowUpdates(e)&&(this._wasSettled=!0,this.recompute())},_unsettle:function(){this._wasSettled=!1,this._promise=null},setValue:function(e,t){this.allowUpdates(t)&&(this._value=e,this._settle(t))},allowUpdates:function(e){return this._promise===e}})})),define("ember-promise-helpers/helpers/is-fulfilled",["exports","ember-promise-helpers/helpers/await"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default.extend({compute:function(e){var t=this,r=e[0] return this.ensureLatestPromise(r,(function(e){e.then((function(){t.setValue(!0,r)})).catch((function(){t.setValue(!1,r)}))}))}})})),define("ember-promise-helpers/helpers/is-pending",["exports","ember-promise-helpers/helpers/await"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default.extend({valueBeforeSettled:!0,compute:function(e){var t=this,r=e[0] return this.ensureLatestPromise(r,(function(e){e.catch((function(){})).finally((function(){t.setValue(!1,r)}))}))}})})),define("ember-promise-helpers/helpers/is-rejected",["exports","ember-promise-helpers/helpers/await"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default.extend({compute:function(e){var t=this,r=e[0] return this.ensureLatestPromise(r,(function(e){e.then((function(){t.setValue(!1,r)})).catch((function(){t.setValue(!0,r)}))}))}})})),define("ember-promise-helpers/helpers/promise-all",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Helper.extend({compute:function(e){var t=Array.isArray(e[0])?e[0]:e return Ember.RSVP.all(t)}})})),define("ember-promise-helpers/helpers/promise-hash",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=Ember.Helper.extend({compute:function(e,t){return Ember.RSVP.hash(t)}})})),define("ember-promise-helpers/helpers/promise-rejected-reason",["exports","ember-promise-helpers/helpers/await"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=t.default.extend({compute:function(e){var t=this,r=e[0] return this.ensureLatestPromise(r,(function(e){e.then((function(){t.setValue(null,r)})).catch((function(e){t.setValue(e,r)}))}))}})})),define("ember-resolver/features",[],(function(){})),define("ember-resolver/index",["exports","ember-resolver/resolvers/classic"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})})),define("ember-resolver/resolver",["exports","ember-resolver/resolvers/classic"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.default}})})),define("ember-resolver/resolvers/classic/container-debug-adapter",["exports","ember-resolver/resolvers/classic/index"],(function(e,t){"use strict" function r(e,t,r){var n=t.match(new RegExp("^/?"+r+"/(.+)/"+e+"$")) if(null!==n)return n[1]}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 var n=Ember.ContainerDebugAdapter.extend({_moduleRegistry:null,init:function(){this._super.apply(this,arguments),this._moduleRegistry||(this._moduleRegistry=new t.ModuleRegistry)},canCatalogEntriesByType:function(e){return"model"===e||this._super.apply(this,arguments)},catalogEntriesByType:function(e){for(var t=this._moduleRegistry.moduleNames(),n=Ember.A(),i=this.namespace.modulePrefix,o=0,a=t.length;o1){var r=t[0] return"component"===r||"helper"===r||"modifier"===r||"template"===r&&0===t[1].indexOf("components/")?r+":"+t[1].replace(/_/g,"-"):r+":"+Ember.String.dasherize(t[1].replace(/\./g,"/"))}return e},pluralize:function(e){return this.pluralizedTypes[e]||(this.pluralizedTypes[e]=e+"s")},podBasedLookupWithPrefix:function(e,t){var r=t.fullNameWithoutType return"template"===t.type&&(r=r.replace(/^components\//,"")),e+"/"+r+"/"+t.type},podBasedModuleName:function(e){var t=this.namespace.podModulePrefix||this.namespace.modulePrefix return this.podBasedLookupWithPrefix(t,e)},podBasedComponentsInSubdir:function(e){var t=this.namespace.podModulePrefix||this.namespace.modulePrefix if(t+="/components","component"===e.type||/^components/.test(e.fullNameWithoutType))return this.podBasedLookupWithPrefix(t,e)},resolveEngine:function(e){var t=e.fullNameWithoutType+"/engine" if(this._moduleRegistry.has(t))return this._extractDefaultExport(t)},resolveRouteMap:function(e){var t=e.fullNameWithoutType,r=t+"/routes" if(this._moduleRegistry.has(r)){var n=this._extractDefaultExport(r) return n}},resolveTemplate:function(e){var t=this.resolveOther(e) return null==t&&(t=Ember.TEMPLATES[e.fullNameWithoutType]),t},mainModuleName:function(e){if("main"===e.fullNameWithoutType)return e.prefix+"/"+e.type},defaultModuleName:function(e){return e.prefix+"/"+this.pluralize(e.type)+"/"+e.fullNameWithoutType},nestedColocationComponentModuleName:function(e){if("component"===e.type)return e.prefix+"/"+this.pluralize(e.type)+"/"+e.fullNameWithoutType+"/index"},prefix:function(e){var t=this.namespace.modulePrefix return this.namespace[e.type+"Prefix"]&&(t=this.namespace[e.type+"Prefix"]),t},moduleNameLookupPatterns:Ember.computed((function(){return[this.podBasedModuleName,this.podBasedComponentsInSubdir,this.mainModuleName,this.defaultModuleName,this.nestedColocationComponentModuleName]})).readOnly(),findModuleName:function(e,t){for(var r,n=this.get("moduleNameLookupPatterns"),i=0,o=n.length;i60?".":new Array(60-t.fullName.length).join("."),r||(r=this.lookupDescription(t)),console&&console.info&&console.info(i,t.fullName,n,r)}},knownForType:function(e){for(var t=this._moduleRegistry.moduleNames(),r=Object.create(null),n=0,i=t.length;nn.length+i.length)return e+":"+t.slice(o+n.length,a) var s=r+"/"+this.pluralize(e)+"/" return 0===t.indexOf(s)&&t.length>s.length?e+":"+t.slice(s.length):void 0},_extractDefaultExport:function(e){var t=require(e,null,null,!0) return t&&t.default&&(t=t.default),t}}) i.reopenClass({moduleBasedResolver:!0}) var o=i e.default=o})),define("ember-resolver/utils/class-factory",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){return{create:function(t){return"function"==typeof e.extend?e.extend(t):e}}}})),define("ember-test-waiters/build-waiter",["exports","ember-test-waiters","ember-test-waiters/noop-test-waiter"],(function(e,t,r){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){0 return new r.default(e)}})),define("ember-test-waiters/index",["exports","ember-test-waiters/waiter-manager","ember-test-waiters/test-waiter","ember-test-waiters/build-waiter","ember-test-waiters/wait-for-promise"],(function(e,t,r,n,i){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"register",{enumerable:!0,get:function(){return t.register}}),Object.defineProperty(e,"unregister",{enumerable:!0,get:function(){return t.unregister}}),Object.defineProperty(e,"getWaiters",{enumerable:!0,get:function(){return t.getWaiters}}),Object.defineProperty(e,"_reset",{enumerable:!0,get:function(){return t._reset}}),Object.defineProperty(e,"getPendingWaiterState",{enumerable:!0,get:function(){return t.getPendingWaiterState}}),Object.defineProperty(e,"hasPendingWaiters",{enumerable:!0,get:function(){return t.hasPendingWaiters}}),Object.defineProperty(e,"TestWaiter",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"buildWaiter",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"waitForPromise",{enumerable:!0,get:function(){return i.default}})})),define("ember-test-waiters/noop-test-waiter",["exports"],(function(e){"use strict" function t(e,t){for(var r=0;re.length)&&(t=e.length) for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:this.nextToken(),t=arguments.length>1?arguments[1]:void 0 if(this.register(),this.items.has(e))throw new Error("beginAsync called for ".concat(e," but it is already pending.")) var r=new Error return this.items.set(e,{get stack(){return r.stack},label:t}),e}},{key:"endAsync",value:function(e){if(!this.items.has(e))throw new Error("endAsync called for ".concat(e," but it is not currently pending.")) this.items.delete(e)}},{key:"waitUntil",value:function(){return 0===this.items.size}},{key:"debugInfo",value:function(){return r(this.items.values())}},{key:"reset",value:function(){this.items.clear()}}])&&i(n.prototype,o),s&&i(n,s),e}() e.default=s})),define("ember-test-waiters/types/index",[],(function(){})),define("ember-test-waiters/wait-for-promise",["exports","ember-test-waiters/test-waiter"],(function(e,t){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e,t){var r=e 0 return r} new t.default("promise-waiter")})),define("ember-test-waiters/waiter-manager",["exports"],(function(e){"use strict" function t(e,t){(null==t||t>e.length)&&(t=e.length) for(var r=0,n=new Array(t);r0}Ember.Test&&Ember.Test.registerWaiter((function(){return!i()}))})),define("ember-truth-helpers/helpers/and",["exports","ember-truth-helpers/utils/truth-convert"],(function(e,t){"use strict" function r(e){for(var r=0,n=e.length;ro}e.default=Ember.Helper.helper(r)})),define("ember-truth-helpers/helpers/gte",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.gte=r var t=function(e,t){if(Array.isArray(e))return e if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0 try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(u){i=!0,o=u}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t) throw new TypeError("Invalid attempt to destructure non-iterable instance")} function r(e,r){var n=t(e,2),i=n[0],o=n[1] return r.forceNumber&&("number"!=typeof i&&(i=Number(i)),"number"!=typeof o&&(o=Number(o))),i>=o}e.default=Ember.Helper.helper(r)})),define("ember-truth-helpers/helpers/is-array",["exports"],(function(e){"use strict" function t(e){for(var t=0,r=e.length;t * @license MIT */ var n=r(258),i=r(126),o=r(127) function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes") return 0|e}function p(e,t){if(u.isBuffer(e))return e.length if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength "string"!=typeof e&&(e=""+e) var r=e.length if(0===r)return 0 for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r case"utf8":case"utf-8":case void 0:return F(e).length case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r case"hex":return r>>>1 case"base64":return z(e).length default:if(n)return F(e).length t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=!1 if((void 0===t||t<0)&&(t=0),t>this.length)return"" if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"" if((r>>>=0)<=(t>>>=0))return"" for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,r) case"utf8":case"utf-8":return x(this,t,r) case"ascii":return A(this,t,r) case"latin1":case"binary":return T(this,t,r) case"base64":return M(this,t,r) case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,t,r) default:if(n)throw new TypeError("Unknown encoding: "+e) e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t] e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1 if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1 r=e.length-1}else if(r<0){if(!i)return-1 r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i) if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i) throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var o,a=1,s=e.length,u=t.length if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1 a=2,s/=2,u/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1 for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var f=!0,h=0;hi&&(n=i):n=i var o=t.length if(o%2!=0)throw new TypeError("Invalid hex string") n>o/2&&(n=o/2) for(var a=0;a>8,i=r%256,o.push(i),o.push(n) return o}(t,e.length-r),e,r,n)}function M(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r) for(var n=[],i=t;i239?4:l>223?3:l>191?2:1 if(i+f<=r)switch(f){case 1:l<128&&(c=l) break case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u) break case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u) break case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(e){var t=e.length if(t<=4096)return String.fromCharCode.apply(String,e) for(var r="",n=0;nn)&&(r=n) for(var i="",o=t;or)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance') if(t>i||te.length)throw new RangeError("Index out of range")}function P(e,t,r,n){t<0&&(t=65535+t+1) for(var i=0,o=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function N(e,t,r,n){t<0&&(t=4294967295+t+1) for(var i=0,o=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range") if(r<0)throw new RangeError("Index out of range")}function B(e,t,r,n,o){return o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1) return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return l(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return c(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers") if(e===t)return 0 for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer") if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index") if(n>=i&&t>=r)return 0 if(n>=i)return-1 if(t>=r)return 1 if(this===e)return 0 for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(n,i),c=e.slice(t,r),f=0;fi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds") n||(n="utf8") for(var o=!1;;)switch(n){case"hex":return b(this,e,t,r) case"utf8":case"utf-8":return w(this,e,t,r) case"ascii":return _(this,e,t,r) case"latin1":case"binary":return S(this,e,t,r) case"base64":return E(this,e,t,r) case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r) default:if(o)throw new TypeError("Unknown encoding: "+n) n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}} u.prototype.slice=function(e,t){var r,n=this.length if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i return n},u.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length) for(var n=this[e],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||C(e,t,this.length) for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||C(e,2,this.length) var r=this[e]|this[e+1]<<8 return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||C(e,2,this.length) var r=this[e+1]|this[e]<<8 return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0) var i=1,o=0 for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255 return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1) R(this,e,t,r,i-1,-i)}var o=0,a=1,s=0 for(this[t]=255&e;++o>0)-s&255 return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1) R(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0 for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255 return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds") if(n<0)throw new RangeError("sourceEnd out of bounds") n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r] else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189) continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189) continue}i=r continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189) if(i=null,r<128){if((t-=1)<0)break o.push(r)}else if(r<2048){if((t-=2)<0)break o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point") if((t-=4)<0)break o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"" for(;e.length%4!=0;)e+="=" return e}(e))}function H(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i] return i}}).call(this,r(4))},function(e,t,r){ /** PROMISIFY CALLBACK-STYLE FUNCTIONS TO ES6 PROMISES * * EXAMPLE: * const fn = promisify( (callback) => callback(null, "Hello world!") ); * fn((err, str) => console.log(str)); * fn().then((str) => console.log(str)); * //Both functions, will log 'Hello world!' * * Note: The function you pass, may have any arguments you want, but the latest * have to be the callback, which you will call with: next(err, value) * * @param method: Function/Array/Map = The function(s) to promisify * @param options: Map = * "context" (default is function): The context which to apply the called function * "replace" (default is falsy): When passed an array/map, if to replace the original object * * @return: A promise if passed a function, otherwise the object with the promises * * @license: MIT * @version: 1.0.3 * @author: Manuel Di Iorio **/ var n=function(e,t){return function(){var r=Array.prototype.slice.call(arguments),n=r.length-1,i=r&&r.length>0?r[n]:null,o="function"==typeof i?i:null return o?e.apply(t,r):new Promise((function(n,i){r.push((function(e,t){if(e)return i(e) n(t)})),e.apply(t,r)}))}} e.exports=function(e,t){t=t||{} var r=Object.prototype.toString.call(e) if("[object Object]"===r||"[object Array]"===r){var i=t.replace?e:{} for(var o in e)e.hasOwnProperty(o)&&(i[o]=n(e[o])) return i}return n(e,t.context||e)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t var r=function(){} r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(e,t){var r,n,i=e.exports={} function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0) if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0) try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}() var u,l=[],c=!1,f=-1 function h(){c&&u&&(c=!1,u.length?l=u.concat(l):f=-1,l.length&&d())}function d(){if(!c){var e=s(h) c=!0 for(var t=l.length;t;){for(u=l,l=[];++f1)for(var r=1;r15?(i=Date.now(),s(e)):(r.push(e),1===r.length&&a.setAttribute("a",o=!o))}}u.nextTick=u.setImmediate}(),u.isNodejs=void 0!==t&&t.versions&&t.versions.node,u.isArray=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},u.isArrayBuffer=function(e){return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer},u.isArrayBufferView=function(e){return e&&u.isArrayBuffer(e.buffer)&&void 0!==e.byteLength},u.ByteBuffer=c,u.ByteStringBuffer=c,u.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>4096&&(this.data.substr(0,1),this._constructedStringLength=0)},u.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read},u.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0},u.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))},u.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e) for(var r=this.data;t>0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e) return this.data=r,this._optimizeConstructedString(t),this},u.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this},u.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(u.encodeUtf8(e))},u.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e))},u.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255))},u.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))},u.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(255&e)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))},u.ByteStringBuffer.prototype.putInt=function(e,t){l(t) var r="" do{t-=8,r+=String.fromCharCode(e>>t&255)}while(t>0) return this.putBytes(r)},u.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<0) return t},u.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},u.ByteStringBuffer.prototype.getBytes=function(e){var t return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},u.ByteStringBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},u.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)},u.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this},u.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)},u.ByteStringBuffer.prototype.copy=function(){var e=u.createBuffer(this.data) return e.read=this.read,e},u.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this},u.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this},u.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e) return this.data=this.data.substr(this.read,t),this.read=0,this},u.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t=e)return this t=Math.max(t||this.growSize,e) var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),n=new Uint8Array(this.length()+t) return n.set(r),this.data=new DataView(n.buffer),this},u.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this},u.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t) for(var r=0;r>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this},u.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this},u.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this},u.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this},u.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this},u.DataBuffer.prototype.putInt=function(e,t){l(t),this.accommodate(t/8) do{t-=8,this.data.setInt8(this.write++,e>>t&255)}while(t>0) return this},u.DataBuffer.prototype.putSignedInt=function(e,t){return l(t),this.accommodate(t/8),e<0&&(e+=2<0) return t},u.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<=r&&(t-=r<<1),t},u.DataBuffer.prototype.getBytes=function(e){var t return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):0===e?t="":(t=0===this.read?this.data:this.data.slice(this.read),this.clear()),t},u.DataBuffer.prototype.bytes=function(e){return void 0===e?this.data.slice(this.read):this.data.slice(this.read,this.read+e)},u.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)},u.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this},u.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)},u.DataBuffer.prototype.copy=function(){return new u.DataBuffer(this)},u.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength) t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this},u.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this},u.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this},u.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t0;)1&t&&(r+=e),(t>>>=1)>0&&(e+=e) return r},u.xorBytes=function(e,t,r){for(var n="",i="",o="",a=0,s=0;r>0;--r,++a)i=e.charCodeAt(a)^t.charCodeAt(a),s>=10&&(n+=o,o="",s=0),o+=String.fromCharCode(i),++s return n+o},u.hexToBytes=function(e){var t="",r=0 for(!0&e.length&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)} var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",h=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],d="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" u.encode64=function(e,t){for(var r,n,i,o="",a="",s=0;s>2),o+=f.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=f.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":f.charAt(63&i)),t&&o.length>t&&(a+=o.substr(0,t)+"\r\n",o=o.substr(t)) return a+o},u.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"") for(var t,r,n,i,o="",a=0;a>4),64!==n&&(o+=String.fromCharCode((15&r)<<4|n>>2),64!==i&&(o+=String.fromCharCode((3&n)<<6|i))) return o},u.encodeUtf8=function(e){return unescape(encodeURIComponent(e))},u.decodeUtf8=function(e){return decodeURIComponent(escape(e))},u.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:s.encode,decode:s.decode}},u.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)},u.binary.raw.decode=function(e,t,r){var n=t n||(n=new Uint8Array(e.length)) for(var i=r=r||0,o=0;o>2),o+=f.charAt((3&r)<<4|n>>4),isNaN(n)?o+="==":(o+=f.charAt((15&n)<<2|i>>6),o+=isNaN(i)?"=":f.charAt(63&i)),t&&o.length>t&&(a+=o.substr(0,t)+"\r\n",o=o.substr(t)) return a+o},u.binary.base64.decode=function(e,t,r){var n,i,o,a,s=t s||(s=new Uint8Array(3*Math.ceil(e.length/4))),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"") for(var u=0,l=r=r||0;u>4,64!==o&&(s[l++]=(15&i)<<4|o>>2,64!==a&&(s[l++]=(3&o)<<6|a)) return t?l-r:s.subarray(0,l)},u.binary.base58.encode=function(e,t){return u.binary.baseN.encode(e,d,t)},u.binary.base58.decode=function(e,t){return u.binary.baseN.decode(e,d,t)},u.text={utf8:{},utf16:{}},u.text.utf8.encode=function(e,t,r){e=u.encodeUtf8(e) var n=t n||(n=new Uint8Array(e.length)) for(var i=r=r||0,o=0;o0?(i=r[n].substring(0,a),o=r[n].substring(a+1)):(i=r[n],o=null),i in t||(t[i]=[]),i in Object.prototype||null===o||t[i].push(unescape(o))}return t} return void 0===e?(null===_&&(_="undefined"!=typeof window&&window.location&&window.location.search?r(window.location.search.substring(1)):{}),t=_):t=r(e),t},u.parseFragment=function(e){var t=e,r="",n=e.indexOf("?") n>0&&(t=e.substring(0,n),r=e.substring(n+1)) var i=t.split("/") return i.length>0&&""===i[0]&&i.shift(),{pathString:t,queryString:r,path:i,query:""===r?{}:u.getQueryVariables(r)}},u.makeRequest=function(e){var t=u.parseFragment(e),r={path:t.pathString,query:t.queryString,getPath:function(e){return void 0===e?t.path:t.path[e]},getQuery:function(e,r){var n return void 0===e?n=t.query:(n=t.query[e])&&void 0!==r&&(n=n[r]),n},getQueryLast:function(e,t){var n=r.getQuery(e) return n?n[n.length-1]:t}} return r},u.makeLink=function(e,t,r){e=jQuery.isArray(e)?e.join("/"):e var n=jQuery.param(t||{}) return r=r||"",e+(n.length>0?"?"+n:"")+(r.length>0?"#"+r:"")},u.setPath=function(e,t,r){if("object"===o(e)&&null!==e)for(var n=0,i=t.length;n0&&o.push(r),a=n.lastIndex var s=t[0][1] switch(s){case"s":case"o":i") break case"%":o.push("%") break default:o.push("<%"+s+"?>")}}return o.push(e.substring(a)),o.join("")},u.formatNumber=function(e,t,r,n){var i=e,o=isNaN(t=Math.abs(t))?2:t,a=void 0===r?",":r,s=void 0===n?".":n,u=i<0?"-":"",l=parseInt(i=Math.abs(+i||0).toFixed(o),10)+"",c=l.length>3?l.length%3:0 return u+(c?l.substr(0,c)+s:"")+l.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+s)+(o?a+Math.abs(i-l).toFixed(o).slice(2):"")},u.formatSize=function(e){return e>=1073741824?u.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?u.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?u.formatNumber(e/1024,0)+" KiB":u.formatNumber(e,0)+" bytes"},u.bytesFromIP=function(e){return-1!==e.indexOf(".")?u.bytesFromIPv4(e):-1!==e.indexOf(":")?u.bytesFromIPv6(e):null},u.bytesFromIPv4=function(e){if(4!==(e=e.split(".")).length)return null for(var t=u.createBuffer(),r=0;rr[n].end-r[n].start&&(n=r.length-1)):r.push({start:s,end:s})}t.push(o)}if(r.length>0){var l=r[n] l.end-l.start>0&&(t.splice(l.start,l.end-l.start+1,""),0===l.start&&t.unshift(""),7===l.end&&t.push(""))}return t.join(":")},u.estimateCores=function(e,t){if("function"==typeof e&&(t=e,e={}),e=e||{},"cores"in u&&!e.update)return t(null,u.cores) if("undefined"!=typeof navigator&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return u.cores=navigator.hardwareConcurrency,t(null,u.cores) if("undefined"==typeof Worker)return u.cores=1,t(null,u.cores) if("undefined"==typeof Blob)return u.cores=2,t(null,u.cores) var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",(function(e){for(var t=Date.now(),r=t+4;Date.now()s.st&&i.sti.st&&s.st>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t,r){if(128!=(192&t[0]))return e.lastNeed=0,"�" if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�" if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e) return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t) if(r){var n=r.charCodeAt(r.length-1) if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"" if(this.lastNeed){var r=this.lastTotal-this.lastNeed return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3 return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"" return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"" var t,r if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"" r=this.lastNeed,this.lastNeed=0}else r=0 return r=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t) if(!this.lastNeed)return e.toString("utf8",t) this.lastTotal=r var n=e.length-(r-this.lastNeed) return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal) e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o="object"===("undefined"==typeof Reflect?"undefined":n(Reflect))?Reflect:null,a=o&&"function"==typeof o.apply?o.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)} i=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)} var s=Number.isNaN||function(e){return e!=e} function u(){u.init.call(this)}e.exports=u,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0 var l=10 function c(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function f(e,t,r,i){var o,a,s,u if("function"!=typeof r)throw new TypeError('The "listener" argument must be of type Function. Received type '+n(r)) if(void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]),void 0===s)s=a[t]=r,++e._eventsCount else if("function"==typeof s?s=a[t]=i?[r,s]:[s,r]:i?s.unshift(r):s.push(r),(o=c(e))>0&&s.length>o&&!s.warned){s.warned=!0 var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit") l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,u=l,console&&console.warn&&console.warn(u)}return e}function h(){for(var e=[],t=0;t0&&(o=t[0]),o instanceof Error)throw o var s=new Error("Unhandled error."+(o?" ("+o.message+")":"")) throw s.context=o,s}var u=i[e] if(void 0===u)return!1 if("function"==typeof u)a(u,this,t) else{var l=u.length,c=y(u,l) for(r=0;r=0;a--)if(r[a]===t||r[a].listener===t){s=r[a].listener,o=a break}if(o<0)return this 0===o?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]) return this},u.prototype.listeners=function(e){return p(this,e,!0)},u.prototype.rawListeners=function(e){return p(this,e,!1)},u.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},u.prototype.listenerCount=m,u.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},function(e,t,r){(t=e.exports=r(170)).Stream=t,t.Readable=t,t.Writable=r(174),t.Duplex=r(34),t.Transform=r(175),t.PassThrough=r(400),t.finished=r(102),t.pipeline=r(401)},function(e,t,r){"use strict";(function(e){var n=r(21),i=r(269) t.names=i.names,t.codes=i.codes,t.defaultLengths=i.defaultLengths var o=r(14) function a(e){t.decode(e)}t.toHexString=function(t){if(!e.isBuffer(t))throw new Error("must be passed a buffer") return t.toString("hex")},t.fromHexString=function(t){return e.from(t,"hex")},t.toB58String=function(t){if(!e.isBuffer(t))throw new Error("must be passed a buffer") return n.encode(t)},t.fromB58String=function(t){var r=t return e.isBuffer(t)&&(r=t.toString()),e.from(n.decode(r))},t.decode=function(r){if(!e.isBuffer(r))throw new Error("multihash must be a Buffer") if(r.length<3)throw new Error("multihash too short. must be > 3 bytes.") var n=o.decode(r) if(!t.isValidCode(n))throw new Error("multihash unknown function code: 0x".concat(n.toString(16))) r=r.slice(o.decode.bytes) var a=o.decode(r) if(a<1)throw new Error("multihash invalid length: 0x".concat(a.toString(16))) if((r=r.slice(o.decode.bytes)).length!==a)throw new Error("multihash length inconsistent: 0x".concat(r.toString("hex"))) return{code:n,name:i.codes[n],length:a,digest:r}},t.encode=function(r,n,i){if(!r||void 0===n)throw new Error("multihash encode requires at least two args: digest, code") var a=t.coerceCode(n) if(!e.isBuffer(r))throw new Error("digest should be a Buffer") if(null==i&&(i=r.length),i&&r.length!==i)throw new Error("digest length should be equal to specified length.") return e.concat([e.from(o.encode(a)),e.from(o.encode(i)),r])},t.coerceCode=function(e){var r=e if("string"==typeof e){if(void 0===i.names[e])throw new Error("Unrecognized hash function named: ".concat(e)) r=i.names[e]}if("number"!=typeof r)throw new Error("Hash function code should be a number. Got: ".concat(r)) if(void 0===i.codes[r]&&!t.isAppCode(r))throw new Error("Unrecognized function code: ".concat(r)) return r},t.isAppCode=function(e){return e>0&&e<16},t.isValidCode=function(e){return!!t.isAppCode(e)||!!i.codes[e]},t.validate=a,t.prefix=function(e){return a(e),e.slice(0,2)}}).call(this,r(0).Buffer)},function(e,t,r){e.exports={encode:r(270),decode:r(271),encodingLength:r(272)}},function(e,t,r){(function(t){var n=r(19),i=r(112),o=r(470),a=function(){},s=/^v?\.0/.test(t.version),u=function(e){return"function"==typeof e},l=function(e,t,r,l){l=n(l) var c=!1 e.on("close",(function(){c=!0})),i(e,{readable:t,writable:r},(function(e){if(e)return l(e) c=!0,l()})) var f=!1 return function(t){if(!c&&!f)return f=!0,function(e){return!!s&&!!o&&(e instanceof(o.ReadStream||a)||e instanceof(o.WriteStream||a))&&u(e.close)}(e)?e.close(a):function(e){return e.setHeader&&u(e.abort)}(e)?e.abort():u(e.destroy)?e.destroy():void l(t||new Error("stream was destroyed"))}},c=function(e){e()},f=function(e,t){return e.pipe(t)} e.exports=function(){var e,t=Array.prototype.slice.call(arguments),r=u(t[t.length-1]||a)&&t.pop()||a if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum") var n=t.map((function(i,o){var a=o0,(function(t){e||(e=t),t&&n.forEach(c),a||(n.forEach(c),r(e))}))})) return t.reduce(f)}}).call(this,r(3))},function(e,t,r){"use strict";(function(t){var n=r(21),i=r(13),o=r(30),a=r(17),s=r(285),u=r(286),l=/^https?:\/\/[^/]+\/(ip(f|n)s)\/((\w+).*)/,c=/^\/(ip(f|n)s)\/((\w+).*)/,f=/^https?:\/\/([^/]+)\.(ip(?:f|n)s)\.[^/]+/ function h(e){try{return new u(e),!0}catch(e){return!1}}function d(e){if(!e)return!1 if(a.isMultiaddr(e))return!0 try{return new a(e),!0}catch(e){return!1}}function p(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,i=g(e) if(!i)return!1 var o=i.match(t) if(!o)return!1 if("ipfs"!==o[r])return!1 var a=o[n] return a&&t===f&&(a=a.toLowerCase()),h(a)}function m(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3?arguments[3]:void 0,i=g(e) if(!i)return!1 var o=i.match(t) if(!o)return!1 if("ipns"!==o[r])return!1 if(n&&t===f){var a=o[n] return h(a=a.toLowerCase())}return!0}function y(e){return"string"==typeof e}function g(e){return t.isBuffer(e)?n.encode(e):!!y(e)&&e}var v=function(e){return p(e,f,2,1)},b=function(e){return m(e,f,2,1)} e.exports={multihash:function(e){var r=g(e) try{var o=t.from(n.decode(r)) return i.decode(o),!0}catch(e){return!1}},multiaddr:d,peerMultiaddr:function(e){return d(e)&&s.IPFS.matches(e)},cid:h,base32cid:function(e){return"base32"===function(e){try{return o.isEncoded(e)}catch(e){return!1}}(e)&&h(e)},ipfsSubdomain:v,ipnsSubdomain:b,subdomain:function(e){return v(e)||b(e)},subdomainPattern:f,ipfsUrl:function(e){return p(e,l)},ipnsUrl:function(e){return m(e,l)},url:function(e){return p(e,l)||m(e,l)},urlPattern:l,ipfsPath:function(e){return p(e,c)},ipnsPath:function(e){return m(e,c)},path:function(e){return p(e,c)||m(e,c)},pathPattern:c,urlOrPath:function(e){return p(e,l)||m(e,l)||p(e,c)||m(e,c)},cidPath:function(e){return y(e)&&!h(e)&&p("/ipfs/".concat(e),c)}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(279),i=r(81),o=r(14),a=r(21),s=r(22).proto((function(e){if(!(this instanceof s))return new s(e) if(null==e&&(e=""),e instanceof t)this.buffer=n.fromBuffer(e) else if("string"==typeof e||e instanceof String){if(e.length>0&&"/"!==e.charAt(0))throw new Error('multiaddr "'.concat(e,'" must start with a "/"')) this.buffer=n.fromString(e)}else{if(!(e.buffer&&e.protos&&e.protoCodes))throw new Error("addr must be a string, Buffer, or another Multiaddr") this.buffer=n.fromBuffer(e.buffer)}}),{className:"Multiaddr",symbolName:"@multiformats/js-multiaddr/multiaddr"}) s.prototype.toString=function(){return n.bufferToString(this.buffer)},s.prototype.toJSON=s.prototype.toString,s.prototype.toOptions=function(){var e={},t=this.toString().split("/") return e.family="ip4"===t[1]?"ipv4":"ipv6",e.host=t[2],e.transport=t[3],e.port=t[4],e},s.prototype.inspect=function(){return""},s.prototype.protos=function(){return this.protoCodes().map((function(e){return Object.assign({},i(e))}))},s.prototype.protoCodes=function(){for(var e=[],t=this.buffer,r=0;r"}},{key:"toJSON",value:function(){return{id:this.toB58String(),privKey:d(this.marshalPrivKey()),pubKey:d(this.marshalPubKey())}}},{key:"toHexString",value:function(){return a.toHexString(this.id)}},{key:"toBytes",value:function(){return this.id}},{key:"toB58String",value:function(){return this._idB58String}},{key:"isEqual",value:function(e){if(n.isBuffer(e))return this.id.equals(e) if(e.id)return this.id.equals(e.id) throw new Error("not valid Id")}},{key:"isValid",value:function(e){this.privKey&&this.privKey.public&&this.privKey.public.bytes&&n.isBuffer(this.pubKey.bytes)&&this.privKey.public.bytes.equals(this.pubKey.bytes)?e():e(new Error("Keys not match"))}},{key:"id",get:function(){return this._id},set:function(e){throw new Error("Id is immutable")}},{key:"privKey",get:function(){return this._privKey},set:function(e){this._privKey=e}},{key:"pubKey",get:function(){return this._pubKey?this._pubKey:this._privKey?this._privKey.public:void 0},set:function(e){this._pubKey=e}}])&&o(t.prototype,r),e}(),{className:"PeerId",symbolName:"@libp2p/js-peer-id/PeerId"}) t=e.exports=c var f=function(e,t){if(e.bytes.length<=42){var r=a.encode(e.bytes,"identity") t(null,r)}else e.hash((function(e,r){t(e,r)}))},h=function(e,t,r){f(t,(function(n,i){null!=n?r(n):r(null,new c(i,e,t))}))} function d(e){if(e)return e.toString("base64")}t.create=function(e,t){"function"==typeof e&&(t=e,e={}),(e=e||{}).bits=e.bits||2048,e.keyType=e.keyType||"RSA",s.generateKeyPair(e.keyType,e.bits,(function(e,r){null!=e?t(e):h(r,r.public,t)}))},t.createFromHexString=function(e){return new c(a.fromHexString(e))},t.createFromBytes=function(e){return new c(e)},t.createFromB58String=function(e){return new c(a.fromB58String(e))},t.createFromPubKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required") var r try{var i=e if("string"==typeof i&&(i=n.from(e,"base64")),!n.isBuffer(i))throw new Error("Supplied key is neither a base64 string nor a buffer") r=s.unmarshalPublicKey(i)}catch(e){return t(e)}h(null,r,t)},t.createFromPrivKey=function(e,t){if("function"!=typeof t)throw new Error("callback is required") var r=e try{if("string"==typeof r&&(r=n.from(e,"base64")),!n.isBuffer(r))throw new Error("Supplied key is neither a base64 string nor a buffer")}catch(e){return t(e)}s.unmarshalPrivateKey(r,(function(e,r){null!=e?t(e):h(r,r.public,t)}))},t.createFromJSON=function(e,t){if("function"!=typeof t)throw new Error("callback is required") var r,i,o,u try{r=a.fromB58String(e.id),i=e.privKey&&n.from(e.privKey,"base64"),o=e.pubKey&&n.from(e.pubKey,"base64"),u=o&&s.unmarshalPublicKey(o)}catch(e){return t(e)}i?l([function(e){return s.unmarshalPrivateKey(i,e)},function(e,t){f(e.public,(function(r,n){t(r,n,e)}))},function(e,t,r){u?f(u,(function(n,i){r(n,e,t,i)})):r(null,e,t)}],(function(e,n,i,o){return e?t(e):u&&!n.equals(o)?t(new Error("Public and private key do not match")):r&&!n.equals(r)?t(new Error("Id and private key do not match")):void t(null,new c(r,i,u))})):t(null,new c(r,null,u))},t.isPeerId=function(e){return Boolean("object"===i(e)&&e._id&&e._idB58String)}}).call(this,r(0).Buffer)},function(e,t,r){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId) var t=e._idleTimeout t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},r(304),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,r(4))},function(e,t,r){"use strict" var n=r(66),i=Object.keys||function(e){var t=[] for(var r in e)t.push(r) return t} e.exports=f var o=r(50) o.inherits=r(2) var a=r(158),s=r(94) o.inherits(f,a) for(var u=i(s.prototype),l=0;l")}},{key:"toJSON",value:function(){return this._json||(this._json=Object.freeze({name:this.name,size:this.size,cid:this._cid.toBaseEncodedString()})),Object.assign({},this._json)}},{key:"name",get:function(){return this._name},set:function(e){throw new Error("Can't set property: 'name' is immutable")}},{key:"nameAsBuffer",get:function(){return null!==this._nameBuf||(this._nameBuf=n.from(this._name)),this._nameBuf}},{key:"size",get:function(){return this._size},set:function(e){throw new Error("Can't set property: 'size' is immutable")}},{key:"cid",get:function(){return this._cid},set:function(e){throw new Error("Can't set property: 'cid' is immutable")}}])&&i(t.prototype,r),e}();(t=e.exports=s(u,{className:"DAGLink",symbolName:"@ipld/js-ipld-dag-pb/daglink"})).create=r(541),t.util=r(542)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(n){var i=r(273);(t=e.exports=a).encode=function(e,t){var r=s(e) return a(r.name,n.from(r.encode(t)))},t.decode=function(e){n.isBuffer(e)&&(e=e.toString()) var t=e.substring(0,1) "string"==typeof(e=e.substring(1,e.length))&&(e=n.from(e)) var r=s(t) return n.from(r.decode(e.toString()))},t.isEncoded=function(e){if(n.isBuffer(e)&&(e=e.toString()),"[object String]"!==Object.prototype.toString.call(e))return!1 var t=e.substring(0,1) try{return s(t).name}catch(e){return!1}},t.names=Object.freeze(Object.keys(i.names)),t.codes=Object.freeze(Object.keys(i.codes)) var o=new Error("Unsupported encoding") function a(e,t){if(!t)throw new Error("requires an encoded buffer") var r=s(e),i=n.from(r.code) return function(e,t){s(e).decode(t.toString())}(r.name,t),n.concat([i,t])}function s(e){var t if(i.names[e])t=i.names[e] else{if(!i.codes[e])throw o t=i.codes[e]}if(!t.isImplemented())throw new Error("Base "+e+" is not implemented yet") return t}}).call(this,r(0).Buffer)},function(e,t,r){var n=r(8) e.exports=n.md=n.md||{},n.md.algorithms=n.md.algorithms||{}},function(e,t,r){var n=r(7).Buffer function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t)) for(var r=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0)) var r=8*this._len if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4) else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296 this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block) var o=this._hash() return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i={} function o(e,t,r){r||(r=Error) var n=function(e){var r,n function i(r,n,i){return e.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i))||this}return n=e,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r) n.prototype.name=r.name,n.prototype.code=e,i[e]=n}function a(e,t){if(Array.isArray(e)){var r=e.length return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(a(t,"type")) else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument" s='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return s+". Received type ".concat(n(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[] for(var r in e)t.push(r) return t} e.exports=l var i=r(170),o=r(174) r(2)(l,i) for(var a=n(o.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(a(t,"type")) else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument" s='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return s+". Received type ".concat(n(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[] for(var r in e)t.push(r) return t} e.exports=l var i=r(183),o=r(187) r(2)(l,i) for(var a=n(o.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(a(t,"type")) else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument" s='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return s+". Received type ".concat(n(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[] for(var r in e)t.push(r) return t} e.exports=l var i=r(194),o=r(198) r(2)(l,i) for(var a=n(o.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(a(t,"type")) else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument" s='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return s+". Received type ".concat(n(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[] for(var r in e)t.push(r) return t} e.exports=l var i=r(201),o=r(205) r(2)(l,i) for(var a=n(o.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(a(t,"type")) else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument" s='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return s+". Received type ".concat(n(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[] for(var r in e)t.push(r) return t} e.exports=l var i=r(210),o=r(214) r(2)(l,i) for(var a=n(o.prototype),s=0;s2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s if("string"==typeof t&&(o="not ",t.substr(0,o.length)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(a(t,"type")) else{var u=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+".".length>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument" s='The "'.concat(e,'" ').concat(u," ").concat(i," ").concat(a(t,"type"))}return s+". Received type ".concat(n(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[] for(var r in e)t.push(r) return t} e.exports=l var i=r(221),o=r(225) r(2)(l,i) for(var a=n(o.prototype),s=0;s0||e===t?t:t-1}function g(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nl^r?1:-1 for(s=(u=i.length)<(l=o.length)?u:l,a=0;ao[a]^r?1:-1 return u==l?0:u>l^r?1:-1}function b(e,t,r,n){if(er||e!==c(e))throw Error(f+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1 return y(e.e/14)==t&&e.c[t]%2!=0}function _(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,r){var n,i if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else tD?m.c=m.e=null:e.e=10;l/=10,u++);return void(u>D?m.c=m.e=null:(m.e=u,m.c=[e]))}p=String(e)}else{if(!s.test(p=String(e)))return o(m,p,f) m.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(u=p.indexOf("."))>-1&&(p=p.replace(".","")),(l=p.search(/e/i))>0?(u<0&&(u=l),u+=+p.slice(l+1),p=p.substring(0,l)):u<0&&(u=p.length)}else{if(b(t,2,F.length,"Base"),10==t)return q(m=new z(e),O+m.e+1,C) if(p=String(e),f="number"==typeof e){if(0*e!=0)return o(m,p,f,t) if(m.s=1/e<0?(p=p.slice(1),-1):1,z.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(h+e)}else m.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1 for(r=F.slice(0,t),u=l=0,d=p.length;lu){u=d continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,l=-1,u=0 continue}return o(m,String(e),f,t)}f=!1,(u=(p=n(p,t,10,m.s)).indexOf("."))>-1?p=p.replace(".",""):u=p.length}for(l=0;48===p.charCodeAt(l);l++);for(d=p.length;48===p.charCodeAt(--d););if(p=p.slice(l,++d)){if(d-=l,f&&z.DEBUG&&d>15&&(e>9007199254740991||e!==c(e)))throw Error(h+m.s*e) if((u=u-l-1)>D)m.c=m.e=null else if(u=P)?_(u,a):S(u,a,"0") else if(o=(e=q(new z(e),t,r)).e,s=(u=g(e.c)).length,1==n||2==n&&(t<=o||o<=R)){for(;ss){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-s)>0)for(o+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function V(e,t){for(var r,n=1,i=new z(e[0]);n=10;i/=10,n++);return(r=n+14*r-1)>D?e.c=e.e=null:r=10;s/=10,i++);if((o=t-i)<0)o+=14,a=t,h=(u=m[f=0])/y[i-a-1]%10|0 else if((f=l((o+1)/14))>=m.length){if(!n)break e for(;m.length<=f;m.push(0));u=h=0,i=1,a=(o%=14)-14+1}else{for(u=s=m[f],i=1;s>=10;s/=10,i++);h=(a=(o%=14)-14+i)<0?0:u/y[i-a-1]%10|0}if(n=n||t<0||null!=m[f+1]||(a<0?u:u%y[i-a-1]),n=r<4?(h||n)&&(0==r||r==(e.s<0?3:2)):h>5||5==h&&(4==r||n||6==r&&(o>0?a>0?u/y[i-a]:0:m[f-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=y[(14-t%14)%14],e.e=-t||0):m[0]=e.e=0,e if(0==o?(m.length=f,s=1,f--):(m.length=f+1,s=y[14-o],m[f]=a>0?c(u/y[i-a]%y[a])*s:0),n)for(;;){if(0==f){for(o=1,a=m[0];a>=10;a/=10,o++);for(a=m[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(e.e++,m[0]==d&&(m[0]=1)) break}if(m[f]+=s,m[f]!=d)break m[f--]=0,s=1}for(o=m.length;0===m[--o];m.pop());}e.e>D?e.c=e.e=null:e.e=P?_(t,r):S(t,r,"0"),e.s<0?"-"+t:t)}return z.clone=e,z.ROUND_UP=0,z.ROUND_DOWN=1,z.ROUND_CEIL=2,z.ROUND_FLOOR=3,z.ROUND_HALF_UP=4,z.ROUND_HALF_DOWN=5,z.ROUND_HALF_EVEN=6,z.ROUND_HALF_CEIL=7,z.ROUND_HALF_FLOOR=8,z.EUCLID=9,z.config=z.set=function(e){var t,r if(null!=e){if("object"!=i(e))throw Error(f+"Object expected: "+e) if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(b(r=e[t],0,m,t),O=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(b(r=e[t],0,8,t),C=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(b(r[0],-m,0,t),b(r[1],0,m,t),R=r[0],P=r[1]):(b(r,-m,m,t),R=-(P=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)b(r[0],-m,-1,t),b(r[1],1,m,t),N=r[0],D=r[1] else{if(b(r,-m,m,t),!r)throw Error(f+t+" cannot be zero: "+r) N=-(D=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(f+t+" not true or false: "+r) if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw B=!r,Error(f+"crypto unavailable") B=r}else B=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(b(r=e[t],0,9,t),L=r),e.hasOwnProperty(t="POW_PRECISION")&&(b(r=e[t],0,m,t),j=r),e.hasOwnProperty(t="FORMAT")){if("object"!=i(r=e[t]))throw Error(f+t+" not an object: "+r) U=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(f+t+" invalid: "+r) F=r}}return{DECIMAL_PLACES:O,ROUNDING_MODE:C,EXPONENTIAL_AT:[R,P],RANGE:[N,D],CRYPTO:B,MODULO_MODE:L,POW_PRECISION:j,FORMAT:U,ALPHABET:F}},z.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1 if(!z.DEBUG)return!0 var t,r,n=e.c,i=e.e,o=e.s e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-m&&i<=m&&i===c(i)){if(0===n[0]){if(0===i&&1===n.length)return!0 break e}if((t=(i+1)%14)<1&&(t+=14),String(n[0]).length==t){for(t=0;t=d||r!==c(r))break e if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0 throw Error(f+"Invalid BigNumber: "+e)},z.maximum=z.max=function(){return V(arguments,T.lt)},z.minimum=z.min=function(){return V(arguments,T.gt)},z.random=(a=9007199254740992*Math.random()&2097151?function(){return c(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,s=0,u=[],h=new z(I) if(null==e?e=O:b(e,0,m),i=l(e/14),B)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(u.push(o%1e14),s+=2) s=i/2}else{if(!crypto.randomBytes)throw B=!1,Error(f+"crypto unavailable") for(t=crypto.randomBytes(i*=7);s=9e15?crypto.randomBytes(7).copy(t,s):(u.push(o%1e14),s+=7) s=i/7}if(!B)for(;s=10;o/=10,s++);s<14&&(n-=14-s)}return h.e=n,h.c=u,h}),z.sum=function(){for(var e=1,t=arguments,r=new z(t[0]);er-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(t,n,i,o,a){var s,u,l,c,f,h,d,p,m=t.indexOf("."),y=O,v=C for(m>=0&&(c=j,j=0,t=t.replace(".",""),h=(p=new z(n)).pow(t.length-m),j=c,p.c=e(S(g(h.c),h.e,"0"),10,i,"0123456789"),p.e=p.c.length),l=c=(d=e(t,n,i,a?(s=F,"0123456789"):(s="0123456789",F))).length;0==d[--c];d.pop());if(!d[0])return s.charAt(0) if(m<0?--l:(h.c=d,h.e=l,h.s=o,d=(h=r(h,p,y,v,i)).c,f=h.r,l=h.e),m=d[u=l+y+1],c=i/2,f=f||u<0||null!=d[u+1],f=v<4?(null!=m||f)&&(0==v||v==(h.s<0?3:2)):m>c||m==c&&(4==v||f||6==v&&1&d[u-1]||v==(h.s<0?8:7)),u<1||!d[0])t=f?S(s.charAt(1),-y,s.charAt(0)):s.charAt(0) else{if(d.length=u,f)for(--i;++d[--u]>i;)d[u]=0,u||(++l,d=[1].concat(d)) for(c=d.length;!d[--c];);for(m=0,t="";m<=c;t+=s.charAt(d[m++]));t=S(t,l,s.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,i,o,a,s=0,u=e.length,l=t%1e7,c=t/1e7|0 for(e=e.slice();u--;)s=((i=l*(o=e[u]%1e7)+(n=c*o+(a=e[u]/1e7|0)*l)%1e7*1e7+s)/r|0)+(n/1e7|0)+c*a,e[u]=i%r return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o if(r!=n)o=r>n?1:-1 else for(i=o=0;it[i]?1:-1 break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,o,a,s){var u,l,f,h,p,m,g,v,b,w,_,S,E,k,M,x,A,T=n.s==i.s?1:-1,I=n.c,O=i.c if(!(I&&I[0]&&O&&O[0]))return new z(n.s&&i.s&&(I?!O||I[0]!=O[0]:O)?I&&0==I[0]||!O?0*T:T/0:NaN) for(b=(v=new z(T)).c=[],T=o+(l=n.e-i.e)+1,s||(s=d,l=y(n.e/14)-y(i.e/14),T=T/14|0),f=0;O[f]==(I[f]||0);f++);if(O[f]>(I[f]||0)&&l--,T<0)b.push(1),h=!0 else{for(k=I.length,x=O.length,f=0,T+=2,(p=c(s/(O[0]+1)))>1&&(O=e(O,p,s),I=e(I,p,s),x=O.length,k=I.length),E=x,_=(w=I.slice(0,x)).length;_=s/2&&M++ do{if(p=0,(u=t(O,w,x,_))<0){if(S=w[0],x!=_&&(S=S*s+(w[1]||0)),(p=c(S/M))>1)for(p>=s&&(p=s-1),g=(m=e(O,p,s)).length,_=w.length;1==t(m,w,g,_);)p--,r(m,x=10;T/=10,f++);q(v,o+(v.e=f+14*l-1)+1,a,h)}else v.e=l,v.r=+h return v}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,k=/^([^.]+)\.$/,M=/^\.([^.]+)$/,x=/^-?(Infinity|NaN)$/,A=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var i,o=r?t:t.replace(A,"") if(x.test(o))e.s=isNaN(o)?null:o<0?-1:1 else{if(!r&&(o=o.replace(E,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(k,"$1").replace(M,"0.$1")),t!=o))return new z(o,i) if(z.DEBUG)throw Error(f+"Not a"+(n?" base "+n:"")+" number: "+t) e.s=null}e.c=e.e=null},T.absoluteValue=T.abs=function(){var e=new z(this) return e.s<0&&(e.s=1),e},T.comparedTo=function(e,t){return v(this,new z(e,t))},T.decimalPlaces=T.dp=function(e,t){var r,n,i,o=this if(null!=e)return b(e,0,m),null==t?t=C:b(t,0,8),q(new z(o),e+o.e+1,t) if(!(r=o.c))return null if(n=14*((i=r.length-1)-y(this.e/14)),i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},T.dividedBy=T.div=function(e,t){return r(this,new z(e,t),O,C)},T.dividedToIntegerBy=T.idiv=function(e,t){return r(this,new z(e,t),0,1)},T.exponentiatedBy=T.pow=function(e,t){var r,n,i,o,a,s,u,h,d=this if((e=new z(e)).c&&!e.isInteger())throw Error(f+"Exponent not an integer: "+G(e)) if(null!=t&&(t=new z(t)),a=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return h=new z(Math.pow(+G(d),a?2-w(e):+G(e))),t?h.mod(t):h if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new z(NaN);(n=!s&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||a&&d.c[1]>=24e7:d.c[0]<8e13||a&&d.c[0]<=9999975e7)))return o=d.s<0&&w(e)?-0:0,d.e>-1&&(o=1/o),new z(s?1/o:o) j&&(o=l(j/14+2))}for(a?(r=new z(.5),s&&(e.s=1),u=w(e)):u=(i=Math.abs(+G(e)))%2,h=new z(I);;){if(u){if(!(h=h.times(d)).c)break o?h.c.length>o&&(h.c.length=o):n&&(h=h.mod(t))}if(i){if(0===(i=c(i/2)))break u=i%2}else if(q(e=e.times(r),e.e+1,1),e.e>14)u=w(e) else{if(0==(i=+G(e)))break u=i%2}d=d.times(d),o?d.c&&d.c.length>o&&(d.c.length=o):n&&(d=d.mod(t))}return n?h:(s&&(h=I.div(h)),t?h.mod(t):o?q(h,j,C,void 0):h)},T.integerValue=function(e){var t=new z(this) return null==e?e=C:b(e,0,8),q(t,t.e+1,e)},T.isEqualTo=T.eq=function(e,t){return 0===v(this,new z(e,t))},T.isFinite=function(){return!!this.c},T.isGreaterThan=T.gt=function(e,t){return v(this,new z(e,t))>0},T.isGreaterThanOrEqualTo=T.gte=function(e,t){return 1===(t=v(this,new z(e,t)))||0===t},T.isInteger=function(){return!!this.c&&y(this.e/14)>this.c.length-2},T.isLessThan=T.lt=function(e,t){return v(this,new z(e,t))<0},T.isLessThanOrEqualTo=T.lte=function(e,t){return-1===(t=v(this,new z(e,t)))||0===t},T.isNaN=function(){return!this.s},T.isNegative=function(){return this.s<0},T.isPositive=function(){return this.s>0},T.isZero=function(){return!!this.c&&0==this.c[0]},T.minus=function(e,t){var r,n,i,o,a=this,s=a.s if(t=(e=new z(e,t)).s,!s||!t)return new z(NaN) if(s!=t)return e.s=-t,a.plus(e) var u=a.e/14,l=e.e/14,c=a.c,f=e.c if(!u||!l){if(!c||!f)return c?(e.s=-t,e):new z(f?a:NaN) if(!c[0]||!f[0])return f[0]?(e.s=-t,e):new z(c[0]?a:3==C?-0:0)}if(u=y(u),l=y(l),c=c.slice(),s=u-l){for((o=s<0)?(s=-s,i=c):(l=u,i=f),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=c.length)<(t=f.length))?s:t,s=t=0;t0)for(;t--;c[r++]=0);for(t=d-1;n>s;){if(c[--n]=0;){for(r=0,h=w[i]%1e7,p=w[i]/1e7|0,o=i+(a=u);o>i;)r=((l=h*(l=b[--a]%1e7)+(s=p*l+(c=b[a]/1e7|0)*h)%1e7*1e7+m[o]+r)/g|0)+(s/1e7|0)+p*c,m[o--]=l%g m[o]=r}return r?++n:m.splice(0,1),K(e,m,n)},T.negated=function(){var e=new z(this) return e.s=-e.s||null,e},T.plus=function(e,t){var r,n=this,i=n.s if(t=(e=new z(e,t)).s,!i||!t)return new z(NaN) if(i!=t)return e.s=-t,n.minus(e) var o=n.e/14,a=e.e/14,s=n.c,u=e.c if(!o||!a){if(!s||!u)return new z(i/0) if(!s[0]||!u[0])return u[0]?e:new z(s[0]?n:0*i)}if(o=y(o),a=y(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+u[t]+i)/d|0,s[t]=d===s[t]?0:s[t]%d return i&&(s=[i].concat(s),++a),K(e,s,a)},T.precision=T.sd=function(e,t){var r,n,i,o=this if(null!=e&&e!==!!e)return b(e,1,m),null==t?t=C:b(t,0,8),q(new z(o),e,t) if(!(r=o.c))return null if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},T.shiftedBy=function(e){return b(e,-9007199254740991,9007199254740991),this.times("1e"+e)},T.squareRoot=T.sqrt=function(){var e,t,n,i,o,a=this,s=a.c,u=a.s,l=a.e,c=O+4,f=new z("0.5") if(1!==u||!s||!s[0])return new z(!u||u<0&&(!s||s[0])?NaN:s?a:1/0) if(0==(u=Math.sqrt(+G(a)))||u==1/0?(((t=g(s)).length+l)%2==0&&(t+="0"),u=Math.sqrt(+t),l=y((l+1)/2)-(l<0||l%2),n=new z(t=u==1/0?"1e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new z(u+""),n.c[0])for((u=(l=n.e)+c)<3&&(u=0);;)if(o=n,n=f.times(o.plus(r(a,o,c,1))),g(o.c).slice(0,u)===(t=g(n.c)).slice(0,u)){if(n.e0&&y>0){for(a=y%u||u,h=m.substr(0,a);a0&&(h+=c+m.slice(a)),p&&(h="-"+h)}n=d?h+(r.decimalSeparator||"")+((l=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):h}return(r.prefix||"")+n+(r.suffix||"")},T.toFraction=function(e){var t,n,i,o,a,s,u,l,c,h,d,m,y=this,v=y.c if(null!=e&&(!(u=new z(e)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(f+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+G(u)) if(!v)return new z(y) for(t=new z(I),c=n=new z(I),i=l=new z(I),m=g(v),a=t.e=m.length-y.e-1,t.c[0]=p[(s=a%14)<0?14+s:s],e=!e||u.comparedTo(t)>0?a>0?t:c:u,s=D,D=1/0,u=new z(m),l.c[0]=0;h=r(u,t,0,1),1!=(o=n.plus(h.times(i))).comparedTo(e);)n=i,i=o,c=l.plus(h.times(o=c)),l=o,t=u.minus(h.times(o=t)),u=o return o=r(e.minus(n),i,0,1),l=l.plus(o.times(c)),n=n.plus(o.times(i)),l.s=c.s=y.s,d=r(c,i,a*=2,C).minus(y).abs().comparedTo(r(l,n,a,C).minus(y).abs())<1?[c,i]:[l,n],D=s,d},T.toNumber=function(){return+G(this)},T.toPrecision=function(e,t){return null!=e&&b(e,1,m),H(this,e,t,2)},T.toString=function(e){var t,r=this,i=r.s,o=r.e return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=R||o>=P?_(g(r.c),o):S(g(r.c),o,"0"):10===e?t=S(g((r=q(new z(r),O+o+1,C)).c),r.e,"0"):(b(e,2,F.length,"Base"),t=n(S(g(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},T.valueOf=T.toJSON=function(){return G(this)},T._isBigNumber=!0,u&&(T[Symbol.toStringTag]="BigNumber",T[Symbol.for("nodejs.util.inspect.custom")]=T.valueOf),null!=t&&z.set(t),z}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict" t.DAGNode=r(72),t.DAGLink=r(29),t.resolver=r(231),t.util=r(74)},function(e,t,r){(function(r){var n,i,o,a function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a=function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){if(o)return o(a,!0) var u=new Error("Cannot find module '"+a+"'") throw u.code="MODULE_NOT_FOUND",u}var l=r[a]={exports:{}} t[a][0].call(l.exports,(function(e){return i(t[a][1][e]||e)}),l,l.exports,e,t,r,n)}return r[a].exports}for(var o=!1,a=0;as[e]||console.log.apply(console,t)}function c(){for(var e=[],t=0;t>4]+u[15&n])}return t.join("")}}),f={16:10,24:12,32:14},h=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],p=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],m=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],y=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],v=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],b=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],w=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],_=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],S=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],E=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],k=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],M=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],x=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925] function A(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t] for(var a,s=0,u=i;u>16&255]<<24^d[a>>8&255]<<16^d[255&a]<<8^d[a>>24&255]^h[s]<<24,s+=1,8!=i)for(t=1;t>8&255]<<8^d[a>>16&255]<<16^d[a>>24&255]<<24,t=i/2+1;t>2,c=u%4,this._Ke[l][c]=o[t],this._Kd[e-l][c]=o[t++],u++}for(var l=1;l>24&255]^k[a>>16&255]^M[a>>8&255]^x[255&a]},T.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)") for(var t=this._Ke.length-1,r=[0,0,0,0],n=A(e),i=0;i<4;i++)n[i]^=this._Ke[0][i] for(var o=1;o>24&255]^y[n[(i+1)%4]>>16&255]^g[n[(i+2)%4]>>8&255]^v[255&n[(i+3)%4]]^this._Ke[o][i] n=r.slice()}var s,u=a(16) for(i=0;i<4;i++)s=this._Ke[t][i],u[4*i]=255&(d[n[i]>>24&255]^s>>24),u[4*i+1]=255&(d[n[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(d[255&n[(i+3)%4]]^s) return u},T.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)") for(var t=this._Kd.length-1,r=[0,0,0,0],n=A(e),i=0;i<4;i++)n[i]^=this._Kd[0][i] for(var o=1;o>24&255]^w[n[(i+3)%4]>>16&255]^_[n[(i+2)%4]>>8&255]^S[255&n[(i+1)%4]]^this._Kd[o][i] n=r.slice()}var s,u=a(16) for(i=0;i<4;i++)s=this._Kd[t][i],u[4*i]=255&(p[n[i]>>24&255]^s>>24),u[4*i+1]=255&(p[n[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(p[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(p[255&n[(i+1)%4]]^s) return u} var I=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`") this.description="Electronic Code Block",this.name="ecb",this._aes=new T(t)} I.prototype.encrypt=function(e){if((e=o(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)") for(var t=a(e.length),r=a(16),n=0;n>=8},P.prototype.setBytes=function(e){if(16!=(e=o(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)") this._counter=e},P.prototype.increment=function(){for(var e=15;0<=e;e--){if(255!==this._counter[e]){this._counter[e]++ break}this._counter[e]=0}} var N=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`") this.description="Counter",this.name="ctr",r instanceof P||(r=new P(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new T(t)} N.prototype.encrypt=function(e){for(var t=o(e,!0),r=0;r>>26-s&67108863,26<=(s+=24)&&(s-=26,o++) else if("le"===r)for(o=i=0;i>>26-s&67108863,26<=(s+=24)&&(s-=26,o++) return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length) for(var r=0;r>>26-o&4194303,26<=(o+=24)&&(o-=26,n++) r+6!==t&&(i=u(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0] for(var n=0,i=this.length=1;i<=67108863;i*=t)n++ n--,i=i/t|0 for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c"} 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],h=[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(e,t,r){r.negative=t.negative^e.negative var n=e.length+t.length|0 n=(r.length=n)-1|0 var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0 r.words[0]=s for(var l=1;l>>26,f=67108863&u,h=Math.min(l,t.length-1),d=Math.max(0,l-e.length+1);d<=h;d++){var p=l-d|0 c+=(a=(i=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r if(t=0|t||1,16===(e=e||10)||"hex"===e){r="" for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,26<=(i+=2)&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&2<=e&&e<=36){var l=f[e],d=h[e] r="" var p=this.clone() for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e) r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0] return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2>>=13),64<=t&&(r+=7,t>>>=7),8<=t&&(r+=4,t>>>=4),2<=t&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26 var t=e,r=0 return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e) return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0 for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t t=this.length>e.length?e:this for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r r=this.length>e.length?(t=this,e):(t=e,this) for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&0<=e) var t=0|Math.ceil(e/26),r=e%26 this._expand(t),0>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&0<=e) var r=e/26|0,i=e%26 return this._expand(1+r),this.words[r]=t?this.words[r]|1<e.length?(r=this,e):(r=e,this) for(var i=0,o=0;o>>26 for(;0!==i&&o>>26 if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++ else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0 var t=this.iadd(e) return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign() var r,n,i=this.cmp(e) if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this n=0>26,this.words[a]=67108863&t for(;0!==o&&a>26,this.words[a]=67108863&t if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],E=8191&S,k=S>>>13,M=0|a[5],x=8191&M,A=M>>>13,T=0|a[6],I=8191&T,O=T>>>13,C=0|a[7],R=8191&C,P=C>>>13,N=0|a[8],D=8191&N,B=N>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],z=8191&F,H=F>>>13,V=0|s[1],K=8191&V,q=V>>>13,G=0|s[2],W=8191&G,Y=G>>>13,Z=0|s[3],J=8191&Z,$=Z>>>13,Q=0|s[4],X=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,he=ce>>>13,de=0|s[9],pe=8191&de,me=de>>>13 r.negative=e.negative^t.negative,r.length=19 var ye=(l+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,z)|0))<<13)|0 l=((o=Math.imul(h,H))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(m,z)|0,o=Math.imul(m,H) var ge=(l+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,K)|0))<<13)|0 l=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(v,z)|0,o=Math.imul(v,H),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,q)|0 var ve=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(h,W)|0))<<13)|0 l=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(_,z)|0,o=Math.imul(_,H),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,q)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0 var be=(l+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(h,J)|0))<<13)|0 l=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,H))+Math.imul(k,z)|0,o=Math.imul(k,H),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,q)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,$)|0 var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,X)|0))<<13)|0 l=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,H))+Math.imul(A,z)|0,o=Math.imul(A,H),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,$)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0 var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0 l=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0 var Se=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(h,oe)|0))<<13)|0 l=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,H))+Math.imul(P,z)|0,o=Math.imul(P,H),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,q)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0 var Ee=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(h,ue)|0))<<13)|0 l=((o=o+Math.imul(h,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,H))+Math.imul(B,z)|0,o=Math.imul(B,H),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,q)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0 var ke=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0 l=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,z),i=(i=Math.imul(j,H))+Math.imul(U,z)|0,o=Math.imul(U,H),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,le)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,he)|0 var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(h,pe)|0))<<13)|0 l=((o=o+Math.imul(h,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,q))+Math.imul(U,K)|0,o=Math.imul(U,q),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(v,fe)|0,o=o+Math.imul(v,he)|0 var xe=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0 l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,W),i=(i=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,he)|0 var Ae=(l+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(v,pe)|0))<<13)|0 l=((o=o+Math.imul(v,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,$))+Math.imul(U,J)|0,o=Math.imul(U,$),n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,he)|0 var Te=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0 l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(U,X)|0,o=Math.imul(U,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,he)|0 var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0 l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,he)|0 var Oe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0 l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,le)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,he)|0 var Ce=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(O,pe)|0))<<13)|0 l=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(U,ue)|0,o=Math.imul(U,le),n=n+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,he)|0 var Re=(l+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0 l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,he))+Math.imul(U,fe)|0,o=Math.imul(U,he) var Pe=(l+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(B,pe)|0))<<13)|0 l=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863 var Ne=(l+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(U,pe)|0))<<13)|0 return l=((o=Math.imul(U,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ye,u[1]=ge,u[2]=ve,u[3]=be,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Te,u[13]=Ie,u[14]=Oe,u[15]=Ce,u[16]=Re,u[17]=Pe,u[18]=Ne,0!==l&&(u[19]=l,r.length++),r} function m(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1 return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++ return 1<>>=13,r[2*a+1]=8191&o,o>>>=13 for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e) if(0===t.length)return new o(1) for(var r=this,n=0;n>>26-r<<26-r if(0!=r){var a=0 for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!=i){for(t=this.length-1;0<=t;t--)this.words[t+i]=this.words[t] for(t=0;t>>o<a)for(this.length-=a,l=0;l>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&0<=e) var t=e%26,r=(e-t)/26,i=1<>>t<>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o if(0===s)return this.strip() for(n(-1===s),i=s=0;i>26,this.words[i]=67108863&o return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1] 0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]) var s,u=n.length-i.length if("mod"!==t){(s=new o(null)).length=1+u,s.words=new Array(s.length) for(var l=0;lthis.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t) var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e) if(t.mod.isZero())return t.div var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n) return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863) for(var t=(1<<26)%e,r=0,i=this.length-1;0<=i;i--)r=(t*r+(0|this.words[i]))%e return r},o.prototype.idivn=function(e){n(e<=67108863) for(var t=0,r=this.length-1;0<=r;r--){var i=(0|this.words[r])+67108864*t this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero()) var t=this,r=e.clone() t=0!==t.negative?t.umod(e):t.clone() for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l for(var c=r.clone(),f=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(0>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0 if(0!==this.negative&&!r)return-1 if(0===this.negative&&r)return 1 if(this.strip(),1e.length)return 1 if(this.lengththis.n;);var n=t>>22,i=o}i>>>=22,0===(e.words[n-10]=i)&&10>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e] var t if("k256"===e)t=new b else if("p224"===e)t=new w else if("p192"===e)t=new _ else{if("p25519"!==e)throw new Error("Unknown prime "+e) t=new S}return g[e]=t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t) var r=e.add(t) return 0<=r.cmp(this.m)&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t) var r=e.iadd(t) return 0<=r.cmp(this.m)&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t) var r=e.sub(t) return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t) var r=e.isub(t) return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone() var t=this.m.andln(3) if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2) return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1) n(!i.isZero()) var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength() for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u) for(var f=this.pow(c,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var m=d,y=0;0!==m.cmp(s);y++)m=m.redSqr() n(y>c&1 i!==r[0]&&(i=this.sqr(i)),0!=f||0!==a?(a<<=1,a|=f,(4==++s||0===n&&0===c)&&(i=this.mul(i,r[a]),a=s=0)):s=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m) return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone() return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv)) return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i return 0<=i.cmp(this.m)?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this) var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i return 0<=i.cmp(this.m)?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:11}],10:[function(e,t,n){(function(e){t.exports=function(t){var r=new Uint8Array(t) return(e.crypto||e.msCrypto).getRandomValues(r),r}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t,r){},{}],12:[function(e,t,r){"use strict" var n=r n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.hmacDRBG=e("./elliptic/hmac-drbg"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":26,"./elliptic/curve":15,"./elliptic/curves":18,"./elliptic/ec":19,"./elliptic/eddsa":22,"./elliptic/hmac-drbg":23,"./elliptic/utils":25,brorand:10}],13:[function(e,t,r){"use strict" var n=e("bn.js"),i=e("../../elliptic").utils,o=i.getNAF,a=i.getJSF,s=i.assert function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4) var r=this.n&&this.p.div(this.n) !r||0>1]):u.mixedAdd(i[-c-1>>1].neg()):0>1]):u.add(i[-c-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,l=this._wnafT3,c=0,f=0;f>1]:x<0&&(M=u[v][-x-1>>1].neg()),_="affine"===M.type?_.mixedAdd(M):_.add(M))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step)},l.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles for(var r=[this],n=this,i=0;i":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e if(e.inf)return this if(this.eq(e))return this.dbl() if(this.neg().eq(e))return this.curve.point(null,null) if(0===this.x.cmp(e.x))return this.curve.point(null,null) var t=this.y.redSub(e.y) 0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm())) var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y) return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this var e=this.y.redAdd(this.y) if(0===e.cmpn(0))return this.curve.point(null,null) var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y) return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new o(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r] return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r] return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this var t=this.curve.point(this.x,this.y.redNeg()) if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()} t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(f,s.BasePoint),l.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null) var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e) return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e if(e.isInfinity())return this var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a) if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl() var l=s.redSqr(),c=l.redMul(s),f=n.redMul(l),h=u.redSqr().redIAdd(c).redISub(f).redISub(f),d=u.redMul(f.redISub(h)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s) return this.curve.jpoint(h,d,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ() if(e.isInfinity())return this var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o) if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl() var u=a.redSqr(),l=u.redMul(a),c=r.redMul(u),f=s.redSqr().redIAdd(l).redISub(c).redISub(c),h=s.redMul(c.redISub(f)).redISub(i.redMul(l)),d=this.z.redMul(a) return this.curve.jpoint(f,h,d)},f.prototype.dblp=function(e){if(0===e)return this if(this.isInfinity())return this if(!e)return this.dbl() if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":12,"../curve":15,"bn.js":9,inherits:39}],18:[function(e,t,r){"use strict" var n,i=r,o=e("hash.js"),a=e("../elliptic"),s=a.utils.assert function u(e){"short"===e.type?this.curve=new a.curve.short(e):"edwards"===e.type?this.curve=new a.curve.edwards(e):this.curve=new a.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t) return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,l("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"]}),l("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"]}),l("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"]}),l("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"]}),l("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"]}),l("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"]}),l("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{n=e("./precomputed/secp256k1")}catch(e){n=void 0}l("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",n]})},{"../elliptic":12,"./precomputed/secp256k1":24,"hash.js":27}],19:[function(e,t,r){"use strict" var n=e("bn.js"),i=e("../../elliptic"),o=i.utils.assert,a=e("./key"),u=e("./signature") function l(e){if(!(this instanceof l))return new l(e) "string"==typeof e&&(o(i.curves.hasOwnProperty(e),"Unknown curve "+e),e=i.curves[e]),e instanceof i.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}(t.exports=l).prototype.keyPair=function(e){return new a(this,e)},l.prototype.keyFromPrivate=function(e,t){return a.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return a.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){e=e||{} for(var t=new i.hmacDRBG({hash:this.hash,pers:e.pers,entropy:e.entropy||i.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r)) if(!(0>1 if(0<=l.cmp(this.curve.p.umod(this.curve.n))&&h)throw new Error("Unable to find sencond key candinate") l=h?this.curve.pointFromX(l.add(this.curve.n),f):this.curve.pointFromX(l,f) var d=t.r.invm(a),p=a.sub(s).mul(d).umod(a),m=c.mul(d).umod(a) return this.g.mulAdd(p,l,m)},l.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new u(t,n)).recoveryParam)return t.recoveryParam for(var i=0;i<4;i++){var o try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":12,"./key":20,"./signature":21,"bn.js":9}],20:[function(e,t,r){"use strict" var n=e("bn.js"),i=e("../../elliptic").utils.assert function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}(t.exports=o).fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic() return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y)) this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},{"../../elliptic":12,"bn.js":9}],21:[function(e,t,r){"use strict" var n=e("bn.js"),i=e("../../elliptic").utils,o=i.assert function a(e,t){if(e instanceof a)return e this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++] if(!(128&r))return r for(var n=15&r,i=0,o=0,a=t.place;o>>3) for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255) e.push(t)}}(t.exports=a).prototype._importDER=function(e,t){e=i.toArray(e,t) var r=new s if(48!==e[r.place++])return!1 if(u(e,r)+r.place!==e.length)return!1 if(2!==e[r.place++])return!1 var o=u(e,r),a=e.slice(r.place,o+r.place) if(r.place+=o,2!==e[r.place++])return!1 var l=u(e,r) if(e.length!==l+r.place)return!1 var c=e.slice(r.place,l+r.place) return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(a),this.s=new n(c),!(this.recoveryParam=null)},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray() for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=l(t),r=l(r);!(r[0]||128&r[1]);)r=r.slice(1) var n=[2] c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length) var o=n.concat(r),a=[48] return c(a,o.length),a=a.concat(o),i.encode(a,e)}},{"../../elliptic":12,"bn.js":9}],22:[function(e,t,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],23:[function(e,t,r){"use strict" var n=e("hash.js"),i=e("../elliptic").utils,o=i.assert function a(e){if(!(this instanceof a))return new a(e) this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null var t=i.toArray(e.entropy,e.entropyEnc),r=i.toArray(e.nonce,e.nonceEnc),n=i.toArray(e.pers,e.persEnc) o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}(t.exports=a).prototype._init=function(e,t,r){var n=e.concat(t).concat(r) 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(e.concat(r||[])),this.reseed=1},a.prototype.generate=function(e,t,r,n){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required") "string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n),this._update(r)) for(var o=[];o.length>8,a=255&i o?r.push(o,a):r.push(a)}return r},n.zero2=o,n.toHex=a,n.encode=function(e,t){return"hex"===t?a(e):e},n.getNAF=function(e,t){for(var r=[],n=1<>1)-1>1)-a:a,i.isubn(o)}else o=0 r.push(o) for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,u=1;u=this._delta8){var r=(e=this.pending).length%this._delta8 this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian) for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize) for(var t=e.length;t>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":38}],38:[function(e,t,r){"use strict" var n=e("minimalistic-assert"),i=e("inherits") function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice() if(!e)return[] var r=[] if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,a=255&i o?r.push(o,a):r.push(a)}else for(n=0;n>>0}return a},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},r.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,l=t return u+=(l=l+n>>>0)>>0)>>0)>>0},r.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},r.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,l){var c=0,f=t return c+=(f=f+n>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,l){return t+n+o+s+l>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:39,"minimalistic-assert":41}],39:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){function r(){}e.super_=t,r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],40:[function(e,t,n){(function(e,r){!function(){"use strict" var n="object"==("undefined"==typeof window?"undefined":s(window))?window:{} !n.JS_SHA3_NO_NODE_JS&&"object"==s(e)&&e.versions&&e.versions.node&&(n=r) for(var i=!n.JS_SHA3_NO_COMMON_JS&&"object"==s(t)&&t.exports,o="0123456789abcdef".split(""),a=[0,8,16,24],u=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],l=[224,256,384,512],c=["hex","buffer","arrayBuffer","array"],f=function(e,t,r){return function(n){return new S(e,t,e).update(n)[r]()}},h=function(e,t,r){return function(n,i){return new S(e,t,i).update(n)[r]()}},d=function(e,t){var r=f(e,t,"hex") r.create=function(){return new S(e,t,e)},r.update=function(e){return r.create().update(e)} for(var n=0;n>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3 for(var n=0;n<50;++n)this.s[n]=0}S.prototype.update=function(e){var t="string"!=typeof e t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)) for(var r,n,i=e.length,o=this.blocks,s=this.byteCount,u=this.blockCount,l=0,c=this.s;l>2]|=e[l]<>2]|=n<>2]|=(192|n>>6)<>2]|=(224|n>>12)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+o[15&e]+o[e>>12&15]+o[e>>8&15]+o[e>>20&15]+o[e>>16&15]+o[e>>28&15]+o[e>>24&15] s%t==0&&(E(r),a=0)}return i&&(e=r[a],0>4&15]+o[15&e]),1>12&15]+o[e>>8&15]),2>20&15]+o[e>>16&15])),u},S.prototype.buffer=S.prototype.arrayBuffer=function(){this.finalize() var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3 e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s) for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255 s%r==0&&E(n)}return o&&(e=s<<2,t=n[a],0>8&255),2>16&255)),u} var E=function(e){var t,r,n,i,o,a,s,l,c,f,h,d,p,m,y,g,v,b,w,_,S,E,k,M,x,A,T,I,O,C,R,P,N,D,B,L,j,U,F,z,H,V,K,q,G,W,Y,Z,J,$,Q,X,ee,te,re,ne,ie,oe,ae,se,ue,le,ce for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(l<<1|c>>>31),r=o^(c<<1|l>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(f<<1|h>>>31),r=s^(h<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=l^(d<<1|p>>>31),r=c^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=h^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,$=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,M=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=m^~g&b,e[1]=y^~v&w,e[10]=M^~A&I,e[11]=x^~T&O,e[20]=D^~L&U,e[21]=B^~j&F,e[30]=q^~W&Z,e[31]=G^~Y&J,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~b&_,e[3]=v^~w&S,e[12]=A^~I&C,e[13]=T^~O&R,e[22]=L^~U&z,e[23]=j^~F&H,e[32]=W^~Z&$,e[33]=Y^~J&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=b^~_&E,e[5]=w^~S&k,e[14]=I^~C&P,e[15]=O^~R&N,e[24]=U^~z&V,e[25]=F^~H&K,e[34]=Z^~$&X,e[35]=J^~Q&ee,e[44]=oe^~se&le,e[45]=ae^~ue&ce,e[6]=_^~E&m,e[7]=S^~k&y,e[16]=C^~P&M,e[17]=R^~N&x,e[26]=z^~V&D,e[27]=H^~K&B,e[36]=$^~X&q,e[37]=Q^~ee&G,e[46]=se^~le&te,e[47]=ue^~ce&re,e[8]=E^~m&g,e[9]=k^~y&v,e[18]=P^~M&A,e[19]=N^~x&T,e[28]=V^~D&L,e[29]=K^~B&j,e[38]=X^~q&W,e[39]=ee^~G&Y,e[48]=le^~te&ne,e[49]=ce^~re&ie,e[0]^=u[n],e[1]^=u[n+1]} if(i)t.exports=m else for(g=0;g>>17|d<<15)^(d>>>19|d<<13)^d>>>10,g=((d=c[p-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,c[p]=(y+c[p-7]|0)+(g+c[p-16]|0)|0 for(p=0;p<64;p++)y=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&E^~S&k)|0)+(M+(t[p]+c[p]|0)|0)|0,g=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&b^v&w^b&w)|0,M=k,k=E,E=S,S=_+y|0,_=w,w=b,b=v,v=y+g|0 r=r+v|0,n=n+b|0,i=i+w|0,o=o+_|0,a=a+S|0,s=s+E|0,u=u+k|0,l=l+M|0,f+=64,h-=64}}f(e) var h,d=e.length%64,p=e.length/536870912|0,m=e.length<<3,y=d<56?56:120,g=e.slice(e.length-d,e.length) for(g.push(128),h=1+d;h>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(m>>>24&255),g.push(m>>>16&255),g.push(m>>>8&255),g.push(m>>>0&255),f(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,l>>>24&255,l>>>16&255,l>>>8&255,l>>>0&255]}function i(e,t,r){var i e=e.length<=64?e:n(e) var o=64+t.length+4,a=new Array(o),s=new Array(64),u=[] for(i=0;i<64;i++)a[i]=54 for(i=0;i>>32-t}function s(e,t){l(e,0,t,0,16) for(var r=8;0>0&255),m.push(y[r]>>8&255),m.push(y[r]>>16&255),m.push(y[r]>>24&255) var g=i(t,m,h) return d(null,1,g)}P(e)}()}var d,p d=this,p=2147483647,void 0!==r?t.exports=h:d&&(d.scrypt&&(d._scrypt=d.scrypt),d.scrypt=h)}).call(this,e("timers").setImmediate)},{timers:45}],44:[function(e,t,n){(function(e,t,r){!function(t,r){"use strict" if(!t.setImmediate){var n,i,o,a,s=1,u={},l=!1,c=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t) f=f&&f.setTimeout?f:t,n="[object process]"==={}.toString.call(t.process)?function(){var t=h(arguments) return e.nextTick(d(p,t)),t}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?(a="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",y,!1):t.attachEvent("onmessage",y),function(){var e=h(arguments) return t.postMessage(a+e,"*"),e}):t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},function(){var e=h(arguments) return o.port2.postMessage(e),e}):c&&"onreadystatechange"in c.createElement("script")?(i=c.documentElement,function(){var e=h(arguments),t=c.createElement("script") return t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t),e}):function(){var e=h(arguments) return setTimeout(d(p,e),0),e},f.setImmediate=n,f.clearImmediate=m}function h(e){return u[s]=d.apply(r,e),s++}function d(e){var t=[].slice.call(arguments,1) return function(){"function"==typeof e?e.apply(r,t):new Function(""+e)()}}function p(e){if(l)setTimeout(d(p,e),0) else{var t=u[e] if(t){l=!0 try{t()}finally{m(e),l=!1}}}}function m(e){delete u[e]}function y(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,e("_process"),void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").clearImmediate)},{_process:42,timers:45}],45:[function(e,t,n){(function(e){t.exports={setImmediate:e.setImmediate}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],46:[function(e,t,n){(function(e){var r if(e.crypto&&crypto.getRandomValues){var n=new Uint8Array(16) r=function(){return crypto.getRandomValues(n),n}}if(!r){var i=new Array(16) r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255 return i}}t.exports=r}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(e,t,r){for(var n=e("./rng"),i=[],o={},a=0;a<256;a++)i[a]=(a+256).toString(16).substr(1),o[i[a]]=a function s(e,t){var r=t||0,n=i return n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]}var u=n(),l=[1|u[0],u[1],u[2],u[3],u[4],u[5]],c=16383&(u[6]<<8|u[7]),f=0,h=0 function d(e,t,r){var i=t&&r||0 "string"==typeof e&&(t="binary"==e?new Array(16):null,e=null) var o=(e=e||{}).random||(e.rng||n)() if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;a<16;a++)t[i+a]=o[a] return t||s(o)}var p=d p.v1=function(e,t,r){var n=t&&r||0,i=t||[],o=void 0!==(e=e||{}).clockseq?e.clockseq:c,a=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:h+1,d=a-f+(u-h)/1e4 if(d<0&&void 0===e.clockseq&&(o=o+1&16383),(d<0||f>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p var m=a/4294967296*1e4&268435455 i[n++]=m>>>8&255,i[n++]=255&m,i[n++]=m>>>24&15|16,i[n++]=m>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o for(var y=e.node||l,g=0;g<6;g++)i[n+g]=y[g] return t||s(i)},p.v4=d,p.parse=function(e,t,r){var n=t&&r||0,i=0 for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,(function(e){i<16&&(t[n+i++]=o[e])}));i<16;)t[n+i++]=0 return t},p.unparse=s,t.exports=p},{"./rng":46}],48:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) try{t.exports.XMLHttpRequest=XMLHttpRequest}catch(e){console.log("Warning: XMLHttpRequest is not defined"),t.exports.XMLHttpRequest=null}},{}],49:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("../utils/properties"),i=(o.isProvider=function(e){return n.isType(e,"Provider")},o) function o(){n.setType(this,"Provider")}r.Provider=i},{"../utils/properties":73}],50:[function(e,t,r){"use strict" var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var a=e("../utils/address"),u=e("../utils/bignumber"),l=e("../utils/bytes"),c=e("../constants"),f=e("../utils/hash"),h=e("../utils/networks"),d=e("../utils/properties"),p=e("../utils/rlp"),m=e("../utils/transaction"),y=e("../utils/utf8"),g=e("../utils/web"),v=o(e("../errors")),b=e("./abstract-provider") function w(e,t){var r={} for(var n in e)try{var i=e[n](t[n]) void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}function _(e,t){return function(r){return null==r?t:e(r)}}function S(e){return function(t){if(!Array.isArray(t))throw new Error("not an array") var r=[] return t.forEach((function(t){r.push(e(t))})),r}}function E(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),32===l.hexDataLength(e))?e.toLowerCase():(v.throwError("invalid hash",v.INVALID_ARGUMENT,{arg:"hash",value:e}),null)}function k(e){return u.bigNumberify(e).toNumber()}function M(e){if(!l.isHexString(e))throw new Error("invalid uint256") for(;e.length<66;)e="0x0"+e.substring(2) return e}function x(e){if(null==e)return"latest" if("earliest"===e)return"0x0" if("latest"===e||"pending"===e)return e if("number"==typeof e)return l.hexStripZeros(l.hexlify(e)) if(l.isHexString(e))return l.hexStripZeros(e) throw new Error("invalid blockTag")}var A={hash:E,blockHash:_(E,null),blockNumber:_(k,null),transactionIndex:_(k,null),confirmations:_(k,null),from:a.getAddress,gasPrice:u.bigNumberify,gasLimit:u.bigNumberify,to:_(a.getAddress,null),value:u.bigNumberify,nonce:k,data:l.hexlify,r:_(M),s:_(M),v:_(k),creates:_(a.getAddress,null),raw:_(l.hexlify)} function T(e){if(null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&u.bigNumberify(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=a.getContractAddress(e)),!e.raw&&e.v&&e.r&&e.s){var t=[l.stripZeros(l.hexlify(e.nonce)),l.stripZeros(l.hexlify(e.gasPrice)),l.stripZeros(l.hexlify(e.gasLimit)),e.to||"0x",l.stripZeros(l.hexlify(e.value||"0x")),l.hexlify(e.data||"0x"),l.stripZeros(l.hexlify(e.v||"0x")),l.stripZeros(l.hexlify(e.r)),l.stripZeros(l.hexlify(e.s))] e.raw=p.encode(t)}var r=w(A,e),n=e.networkId return null!=e.chainId&&null==n&&null==r.v&&(n=e.chainId),l.isHexString(n)&&(n=u.bigNumberify(n).toNumber()),"number"!=typeof n&&null!=r.v&&((n=(r.v-35)/2)<0&&(n=0),n=parseInt(n)),"number"!=typeof n&&(n=0),r.networkId=n,r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}var I={hash:E,parentHash:E,number:k,timestamp:k,nonce:_(l.hexlify),difficulty:function(e){var t=u.bigNumberify(e) try{return t.toNumber()}catch(e){}return null},gasLimit:u.bigNumberify,gasUsed:u.bigNumberify,miner:a.getAddress,extraData:l.hexlify,transactions:_(S(E))},O=d.shallowCopy(I) function C(e,t){return null!=e.author&&null==e.miner&&(e.miner=e.author),w(t?O:I,e)}O.transactions=_(S(T)) var R={from:_(a.getAddress),nonce:_(k),gasLimit:_(u.bigNumberify),gasPrice:_(u.bigNumberify),to:_(a.getAddress),value:_(u.bigNumberify),data:_(l.hexlify)} function P(e){return w(R,e)}var N={transactionLogIndex:_(k),transactionIndex:k,blockNumber:k,transactionHash:E,address:a.getAddress,topics:S(E),data:l.hexlify,logIndex:k,blockHash:E},D={to:_(a.getAddress,null),from:_(a.getAddress,null),contractAddress:_(a.getAddress,null),transactionIndex:k,root:_(E),gasUsed:u.bigNumberify,logsBloom:_(l.hexlify),blockHash:E,transactionHash:E,logs:S((function(e){return w(N,e)})),blockNumber:k,confirmations:_(k,null),cumulativeGasUsed:u.bigNumberify,status:_(k)} function B(e){return Array.isArray(e)?e.forEach((function(e){B(e)})):null!=e&&E(e),e}var L,j={fromBlock:_(x,void 0),toBlock:_(x,void 0),address:_(a.getAddress,void 0),topics:_(B,void 0)},U={blockHash:_(E,void 0),address:_(a.getAddress,void 0),topics:_(B,void 0)},F={blockNumber:_(k),blockHash:_(E),transactionIndex:k,removed:_((function(e){if("boolean"==typeof e)return e if("string"==typeof e){if("true"===e)return!0 if("false"===e)return!1}throw new Error("invaid boolean - "+e)})),address:a.getAddress,data:(L=l.hexlify,function(e){return e?L(e):"0x"}),topics:S(E),transactionHash:E,logIndex:k} function z(e){return w(F,e)}function H(e){return e.map((function(e){return"string"==typeof e?e:Array.isArray(e)?(e.forEach((function(e){null!==e&&32!==l.hexDataLength(e)&&v.throwError("invalid topic",v.INVALID_ARGUMENT,{argument:"topic",value:e})})),e.join(",")):null===e?"":v.throwError("invalid topic value",v.INVALID_ARGUMENT,{argument:"topic",value:e})})).join("&")}function V(e){if("string"==typeof e){if(20===l.hexDataLength(e))return"address:"+a.getAddress(e) if(e=e.toLowerCase(),32===l.hexDataLength(e))return"tx:"+e if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter::"+H(e) if(e&&"object"==s(e))return"filter:"+(e.address||"")+":"+H(e.topics||[])}throw new Error("invalid event - "+e)}function K(){return(new Date).getTime()}var q,G=(i(W,q=b.Provider),W.prototype._doPoll=function(){var e=this this.getBlockNumber().then((function(t){if(e._setFastBlockNumber(t),t!==e._lastBlockNumber){-2===e._emitted.block&&(e._emitted.block=t-1) for(var r=e._emitted.block+1;r<=t;r++)e.emit("block",r) e._emitted.block!==t&&(e._emitted.block=t,Object.keys(e._emitted).forEach((function(r){if("block"!==r){var n=e._emitted[r] "pending"!==n&&122*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise},W.prototype._setFastBlockNumber=function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))},W.prototype.waitForTransaction=function(e,t){var r=this return null==t&&(t=1),this.getTransactionReceipt(e).then((function(n){return 0===t||n&&n.confirmations>=t?n:new Promise((function(n){r.on(e,(function i(o){o.confirmations(t=t.substring(64)).length)return null var n=y.toUtf8String("0x"+t.substring(0,2*r)) return i.resolveName(n).then((function(t){return t!=e?null:n}))}))},W.checkTransactionResponse=function(e){return T(e)},W.prototype.doPoll=function(){},W.prototype.perform=function(e,t){return v.throwError(e+" not implemented",v.NOT_IMPLEMENTED,{operation:e}),null},W.prototype._startPending=function(){v.warn("WARNING: this provider does not support pending events")},W.prototype._stopPending=function(){},W.prototype._addEventListener=function(e,t,r){this._events.push({tag:V(e),listener:t,once:r}),"pending"===e&&this._startPending(),this.polling=!0},W.prototype.on=function(e,t){return this._addEventListener(e,t,!1),this},W.prototype.once=function(e,t){return this._addEventListener(e,t,!0),this},W.prototype.addEventListener=function(e,t){return this.on(e,t)},W.prototype.emit=function(e){for(var t=this,r=[],n=1;ne.length)throw new Error("invalid null") return{consumed:0,value:this.coerceFunc("null",void 0)}},T) function T(e,t){return x.call(this,e,"null","",t,!1)||this}var I,O=(i(C,I=S),C.prototype.encode=function(e){try{var t=c.bigNumberify(e) if(this.signed){var r=a.MaxUint256.maskn(8*this.size-1) if(t.gt(r))throw new Error("out-of-bounds") if(r=r.add(a.One).mul(a.NegativeOne),t.lt(r))throw new Error("out-of-bounds")}else if(t.lt(a.Zero)||t.gt(a.MaxUint256.maskn(8*this.size)))throw new Error("out-of-bounds") return t=t.toTwos(8*this.size).maskn(8*this.size),this.signed&&(t=t.fromTwos(8*this.size).toTwos(256)),f.padZeros(f.arrayify(t),32)}catch(t){u.throwError("invalid number value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e})}return null},C.prototype.decode=function(e,t){e.length>1]>>4&&(t[i]=t[i].toUpperCase()),8<=(15&r[i>>1])&&(t[i+1]=t[i+1].toUpperCase()) return"0x"+t.join("")}for(var c={},f=0;f<10;f++)c[String(f)]=String(f) for(f=0;f<26;f++)c[String.fromCharCode(65+f)]=String(10+f) var h,d=Math.floor((h=9007199254740991,Math.log10?Math.log10(h):Math.log(h)/Math.LN10)) function p(e){e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00" var t="" for(e.split("").forEach((function(e){t+=c[e]}));t.length>=d;){var r=t.substring(0,d) t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n return n}function m(e){var t=null if("string"!=typeof e&&u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:e}),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=l(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwError("bad address checksum",u.INVALID_ARGUMENT,{arg:"address",value:e}) else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==p(e)&&u.throwError("bad icap checksum",u.INVALID_ARGUMENT,{arg:"address",value:e}),t=new i.default.BN(e.substring(4),36).toString(16);t.length<40;)t="0"+t t=l("0x"+t)}else u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:e}) return t}r.getAddress=m,r.getIcapAddress=function(e){for(var t=new i.default.BN(m(e).substring(2),16).toString(36).toUpperCase();t.length<30;)t="0"+t return"XE"+p("XE00"+t)+t},r.getContractAddress=function(e){if(!e.from)throw new Error("missing from address") var t=e.nonce return m("0x"+a.keccak256(s.encode([m(e.from),o.stripZeros(o.hexlify(t))])).substring(26))}},{"../errors":5,"./bytes":63,"./keccak256":70,"./rlp":75,"bn.js":9}],60:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("../utils/bytes") t.exports={decode:function(e){e=atob(e) for(var t=[],r=0;r>=8 for(;0>=8}for(var s=0;e[s]===this._leader&&s>4]+h[15&s])}return"0x"+n.join("")}return i.throwError("invalid hexlify value",null,{arg:"value",value:e}),"never"}function p(e,t){for(f(e)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:e});e.length<2*t+2;)e="0x0"+e.substring(2) return e}function m(e){var t=0,r="0x",n="0x" if(function(e){return e&&null!=e.r&&null!=e.s}(e)){null==e.v&&null==e.recoveryParam&&i.throwError("at least on of recoveryParam or v must be specified",i.INVALID_ARGUMENT,{argument:"signature",value:e}),r=p(e.r,32),n=p(e.s,32),"string"==typeof(t=e.v)&&(t=parseInt(t,16)) var o=e.recoveryParam null==o&&null!=e.v&&(o=1-t%2),t=27+o}else{var a=l(e) if(65!==a.length)throw new Error("invalid signature") r=d(a.slice(0,32)),n=d(a.slice(32,64)),27!==(t=a[64])&&28!==t&&(t=27+t%2)}return{r:r,s:n,recoveryParam:t-27,v:t}}r.hexlify=d,r.hexDataLength=function(e){return f(e)&&e.length%2==0?(e.length-2)/2:null},r.hexDataSlice=function(e,t,r){return f(e)||i.throwError("invalid hex data",i.INVALID_ARGUMENT,{arg:"value",value:e}),e.length%2!=0&&i.throwError("hex data length must be even",i.INVALID_ARGUMENT,{arg:"value",value:e}),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)},r.hexStripZeros=function(e){for(f(e)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:e});3>3)]=e>>24-n&255 var i=f.computeHmac(f.SupportedAlgorithms.sha512,this.chainCode,r),o=i.slice(0,32),a=i.slice(32),l=null,c=null return this.privateKey?l=b(u.bigNumberify(o).add(this.privateKey).mod(m)):c=new d.KeyPair(s.hexlify(o))._addPoint(this.publicKey),new E(_,l,c,this.fingerprint,b(a),e,this.depth+1,this.mnemonic,t)},E.prototype.derivePath=function(e){var t=e.split("/") if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e) "m"===t[0]&&t.shift() for(var r=this,n=0;n>3]|=1<<7-a%8),a++}var f=32*r.length/3,h=v(r.length/3),d=s.arrayify(p.sha256(n.slice(0,f/8)))[0] if((d&=h)!=(n[n.length-1]&h))throw new Error("invalid checksum") return s.hexlify(n.slice(0,f/8))}function A(e,t){if((e=s.arrayify(e)).length%4!=0||e.length<16||32>8-n,r.push(e[i]&(1<<8-n)-1),n+=3) var a=s.arrayify(p.sha256(e))[0],u=e.length/4 return a&=v(u),r[r.length-1]<<=u,r[r.length-1]|=a>>8-u,(t=t||o.langEn).join(r.map((function(e){return t.getWord(e)})))}r.HDNode=S,r.fromExtendedKey=function(e){var t=a.Base58.decode(e) 82===t.length&&w(t.slice(0,78))===e||i.throwError("invalid extended key",i.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"}) var r=t[4],n=s.hexlify(t.slice(5,9)),o=parseInt(s.hexlify(t.slice(9,13)).substring(2),16),u=s.hexlify(t.slice(13,45)),l=t.slice(45,78) switch(s.hexlify(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new S(_,null,s.hexlify(l),n,u,o,r,null,null) case"0x0488ade4":case"0x04358394":if(0!==l[0])break return new S(_,s.hexlify(l.slice(1)),null,n,u,o,r,null,null)}return i.throwError("invalid extended key",i.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"})},r.fromMnemonic=function(e,t,r){return k(M(e=A(x(e,t),t),r),e)},r.fromSeed=function(e){return k(e,null)},r.mnemonicToSeed=M,r.mnemonicToEntropy=x,r.entropyToMnemonic=A,r.isValidMnemonic=function(e,t){try{return x(e,t),!0}catch(e){}return!1}},{"../errors":5,"../wordlists/lang-en":89,"./basex":61,"./bignumber":62,"./bytes":63,"./hmac":66,"./pbkdf2":72,"./properties":73,"./secp256k1":76,"./sha2":78,"./utf8":84}],66:[function(e,t,r){"use strict" var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var i,o,a=n(e("hash.js")),s=e("../utils/bytes"),u=n(e("../errors"));(o=i=r.SupportedAlgorithms||(r.SupportedAlgorithms={})).sha256="sha256",o.sha512="sha512",r.computeHmac=function(e,t,r){return i[e]||u.throwError("unsupported algorithm "+e,u.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),s.arrayify(a.hmac(a[e],s.arrayify(t)).update(s.arrayify(r)).digest())}},{"../errors":5,"../utils/bytes":63,"hash.js":27}],67:[function(e,t,r){"use strict" var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var i=e("./abi-coder") r.AbiCoder=i.AbiCoder,r.defaultAbiCoder=i.defaultAbiCoder,r.formatSignature=i.formatSignature,r.formatParamType=i.formatParamType,r.parseSignature=i.parseSignature,r.parseParamType=i.parseParamType var o=e("./address") r.getAddress=o.getAddress,r.getContractAddress=o.getContractAddress,r.getIcapAddress=o.getIcapAddress var a=n(e("./base64")) r.base64=a var s=e("./bignumber") r.BigNumber=s.BigNumber,r.bigNumberify=s.bigNumberify var u=e("./bytes") r.arrayify=u.arrayify,r.concat=u.concat,r.hexDataSlice=u.hexDataSlice,r.hexDataLength=u.hexDataLength,r.hexlify=u.hexlify,r.hexStripZeros=u.hexStripZeros,r.hexZeroPad=u.hexZeroPad,r.isHexString=u.isHexString,r.joinSignature=u.joinSignature,r.padZeros=u.padZeros,r.splitSignature=u.splitSignature,r.stripZeros=u.stripZeros var l=e("./hash") r.hashMessage=l.hashMessage,r.id=l.id,r.namehash=l.namehash var c=n(e("./hdnode")) r.HDNode=c var f=e("./interface") r.Interface=f.Interface var h=e("./json-wallet") r.getJsonWalletAddress=h.getJsonWalletAddress var d=e("./keccak256") r.keccak256=d.keccak256 var p=e("./sha2") r.sha256=p.sha256 var m=e("./solidity") r.solidityKeccak256=m.keccak256,r.solidityPack=m.pack,r.soliditySha256=m.sha256 var y=e("./random-bytes") r.randomBytes=y.randomBytes var g=e("./networks") r.getNetwork=g.getNetwork var v=e("./properties") r.checkProperties=v.checkProperties,r.deepCopy=v.deepCopy,r.defineReadOnly=v.defineReadOnly,r.resolveProperties=v.resolveProperties,r.shallowCopy=v.shallowCopy var b=n(e("./rlp")) r.RLP=b var w=e("./secp256k1") r.computeAddress=w.computeAddress,r.computePublicKey=w.computePublicKey,r.recoverAddress=w.recoverAddress,r.recoverPublicKey=w.recoverPublicKey,r.verifyMessage=w.verifyMessage var _=e("./signing-key") r.SigningKey=_.SigningKey var S=e("./transaction") r.populateTransaction=S.populateTransaction var E=e("./transaction") r.parseTransaction=E.parse,r.serializeTransaction=E.serialize var k=e("./utf8") r.formatBytes32String=k.formatBytes32String,r.parseBytes32String=k.parseBytes32String,r.toUtf8Bytes=k.toUtf8Bytes,r.toUtf8String=k.toUtf8String var M=e("./units") r.commify=M.commify,r.formatEther=M.formatEther,r.parseEther=M.parseEther,r.formatUnits=M.formatUnits,r.parseUnits=M.parseUnits var x=e("./web") r.fetchJson=x.fetchJson,r.poll=x.poll var A=e("./hmac") r.SupportedAlgorithms=A.SupportedAlgorithms var T=e("./utf8") r.UnicodeNormalizationForm=T.UnicodeNormalizationForm var I=e("./wordlist") r.Wordlist=I.Wordlist},{"./abi-coder":58,"./address":59,"./base64":60,"./bignumber":62,"./bytes":63,"./hash":64,"./hdnode":65,"./hmac":66,"./interface":68,"./json-wallet":69,"./keccak256":70,"./networks":71,"./properties":73,"./random-bytes":74,"./rlp":75,"./secp256k1":76,"./sha2":78,"./signing-key":80,"./solidity":81,"./transaction":82,"./units":83,"./utf8":84,"./web":85,"./wordlist":86}],68:[function(e,t,r){"use strict" var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} function a(e){for(var t in p.setType(this,"Description"),e)p.defineReadOnly(this,t,p.deepCopy(e[t],!0)) Object.freeze(this)}Object.defineProperty(r,"__esModule",{value:!0}) var s,u=e("./address"),l=e("./abi-coder"),c=e("./bignumber"),f=e("./bytes"),h=e("./hash"),d=e("./keccak256"),p=e("./properties"),m=o(e("../errors")),y=function(e){p.setType(this,"Indexed"),p.defineReadOnly(this,"hash",e)},g=(i(v,s=a),v.prototype.encode=function(e,t){f.isHexString(e)||m.throwError("invalid contract bytecode",m.INVALID_ARGUMENT,{arg:"bytecode",value:e}),m.checkArgumentCount(t.length,this.inputs.length," in Interface constructor") try{return e+l.defaultAbiCoder.encode(this.inputs,t).substring(2)}catch(e){m.throwError("invalid constructor argument",m.INVALID_ARGUMENT,{arg:e.arg,reason:e.reason,value:e.value})}return null},v) function v(){return null!==s&&s.apply(this,arguments)||this}var b,w=(i(_,b=a),_.prototype.encode=function(e){m.checkArgumentCount(e.length,this.inputs.length," in interface function "+this.name) try{return this.sighash+l.defaultAbiCoder.encode(this.inputs,e).substring(2)}catch(e){m.throwError("invalid input argument",m.INVALID_ARGUMENT,{arg:e.arg,reason:e.reason,value:e.value})}return null},_.prototype.decode=function(e){try{return l.defaultAbiCoder.decode(this.outputs,f.arrayify(e))}catch(t){m.throwError("invalid data for function output",m.INVALID_ARGUMENT,{arg:"data",errorArg:t.arg,errorValue:t.value,value:e,reason:t.reason})}},_) function _(){return null!==b&&b.apply(this,arguments)||this}var S,E=(i(k,S=a),k) function k(){return null!==S&&S.apply(this,arguments)||this}var M,x=(i(A,M=a),A.prototype.encodeTopics=function(e){var t=this e.length>this.inputs.length&&m.throwError("too many arguments for "+this.name,m.UNEXPECTED_ARGUMENT,{maxCount:e.length,expectedCount:this.inputs.length}) var r=[] for(this.anonymous||r.push(this.topic),e.forEach((function(e,n){var i=t.inputs[n] i.indexed?null==e?r.push(null):"string"===i.type?r.push(h.id(e)):"bytes"===i.type?r.push(d.keccak256(e)):-1!==i.type.indexOf("[")||"tuple"===i.type.substring(0,5)?m.throwError("filtering with tuples or arrays not implemented yet; bug us on GitHub",m.NOT_IMPLEMENTED,{operation:"filter(array|tuple)"}):("address"===i.type&&u.getAddress(e),r.push(f.hexZeroPad(f.hexlify(e),32).toLowerCase())):null!=e&&m.throwError("cannot filter non-indexed parameters; must be null",m.INVALID_ARGUMENT,{argument:i.name||n,value:e})}));r.length&&null===r[r.length-1];)r.pop() return r},A.prototype.decode=function(e,t){null==t||this.anonymous||(t=t.slice(1)) var r=[],n=[],i=[] if(this.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||0<=e.type.indexOf("[")||"tuple"===e.type.substring(0,5)?(r.push({type:"bytes32",name:e.name||""}),i.push(!0)):(r.push(e),i.push(!1)):(n.push(e),i.push(!1))})),null!=t)var o=l.defaultAbiCoder.decode(r,f.concat(t)) var a=l.defaultAbiCoder.decode(n,f.arrayify(e)),s={},u=0,c=0 return this.inputs.forEach((function(e,r){e.indexed?null==t?s[r]=new y(null):i[r]?s[r]=new y(o[c++]):s[r]=o[c++]:s[r]=a[u++],e.name&&(s[e.name]=s[r])})),s.length=this.inputs.length,new E(s)},A) function A(){return null!==M&&M.apply(this,arguments)||this}var T,I=(i(O,T=a),O) function O(){return null!==T&&T.apply(this,arguments)||this}var C,R=(i(P,C=a),P) function P(){return null!==C&&C.apply(this,arguments)||this}function N(e){switch(e.type){case"constructor":var t=new g({inputs:e.inputs,payable:null==e.payable||!!e.payable}) this.deployFunction||(this.deployFunction=t) break case"function":var r=l.formatSignature(e).replace(/tuple/g,""),n=h.id(r).substring(0,10) t=new w({inputs:e.inputs,outputs:e.outputs,gas:e.gas,payable:null==e.payable||!!e.payable,type:e.constant?"call":"transaction",name:e.name,signature:r,sighash:n}),e.name&&(null==this.functions[e.name]?p.defineReadOnly(this.functions,e.name,t):m.warn("WARNING: Multiple definitions for "+e.name)),null==this.functions[t.signature]&&p.defineReadOnly(this.functions,t.signature,t) break case"event":r=l.formatSignature(e).replace(/tuple/g,""),t=new x({name:e.name,signature:r,inputs:e.inputs,topic:h.id(r),anonymous:!!e.anonymous}),e.name&&null==this.events[e.name]&&p.defineReadOnly(this.events,e.name,t),null==this.events[t.signature]&&p.defineReadOnly(this.events,t.signature,t) break case"fallback":break default:m.warn("WARNING: unsupported ABI type - "+e.type)}}var D=(B.prototype.parseTransaction=function(e){var t=e.data.substring(0,10).toLowerCase() for(var r in this.functions)if(-1!==r.indexOf("(")){var n=this.functions[r] if(n.sighash===t){var i=l.defaultAbiCoder.decode(n.inputs,"0x"+e.data.substring(10)) return new I({args:i,decode:n.decode,name:n.name,signature:n.signature,sighash:n.sighash,value:c.bigNumberify(e.value||"0")})}}return null},B.prototype.parseLog=function(e){for(var t in this.events)if(-1!==t.indexOf("(")){var r=this.events[t] if(!r.anonymous&&r.topic===e.topics[0])return new R({decode:r.decode,name:r.name,signature:r.signature,topic:r.topic,values:r.decode(e.data,e.topics)})}return null},B.isInterface=function(e){return p.isType(e,"Interface")},B.isIndexed=function(e){return p.isType(e,"Indexed")},B) function B(e){if(m.checkNew(this,B),"string"==typeof e){try{e=JSON.parse(e)}catch(t){m.throwError("could not parse ABI JSON",m.INVALID_ARGUMENT,{arg:"abi",errorMessage:t.message,value:e})}if(!Array.isArray(e))return m.throwError("invalid abi",m.INVALID_ARGUMENT,{arg:"abi",value:e}),null}p.defineReadOnly(this,"functions",{}),p.defineReadOnly(this,"events",{}) var t=[] e.forEach((function(e){"string"==typeof e&&(e=l.parseSignature(e)),t.push(e)})),p.defineReadOnly(this,"abi",p.deepCopy(t,!0)),t.forEach(N,this),this.deployFunction||N.call(this,{type:"constructor",inputs:[]}),p.setType(this,"Interface")}r.Interface=D},{"../errors":5,"./abi-coder":58,"./address":59,"./bignumber":62,"./bytes":63,"./hash":64,"./keccak256":70,"./properties":73}],69:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("./address") function i(e){try{var t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}function o(e){try{var t=JSON.parse(e)}catch(e){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}r.isCrowdsaleWallet=i,r.isSecretStorageWallet=o,r.getJsonWalletAddress=function(e){if(i(e))try{return n.getAddress(JSON.parse(e).ethaddr)}catch(e){return null}if(o(e))try{return n.getAddress(JSON.parse(e).address)}catch(e){return null}return null}},{"./address":59}],70:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("js-sha3"),i=e("./bytes") r.keccak256=function(e){return"0x"+n.keccak_256(i.arrayify(e))}},{"./bytes":63,"js-sha3":40}],71:[function(e,t,r){"use strict" var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var i=n(e("../errors")) function o(e){return function(t){var r=[] return t.InfuraProvider&&r.push(new t.InfuraProvider(e)),t.EtherscanProvider&&r.push(new t.EtherscanProvider(e)),0===r.length?null:t.FallbackProvider?new t.FallbackProvider(r):r[0]}}function a(e,t){return function(r){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null}}var s={chainId:1,ensAddress:"0x314159265dd8dbb310642f98f50c066173c1259b",name:"homestead",_defaultProvider:o("homestead")},u={chainId:3,ensAddress:"0x112234455c3a32fd11230c42e7bccd4a84e02010",name:"ropsten",_defaultProvider:o("ropsten")},l={unspecified:{chainId:0,name:"unspecified"},homestead:s,mainnet:s,morden:{chainId:2,name:"morden"},ropsten:u,testnet:u,rinkeby:{chainId:4,ensAddress:"0xe7410170f87102DF0055eB195163A03B7F2Bff4A",name:"rinkeby",_defaultProvider:o("rinkeby")},goerli:{chainId:5,ensAddress:"0x112234455c3a32fd11230c42e7bccd4a84e02010",name:"goerli",_defaultProvider:o("goerli")},kovan:{chainId:42,name:"kovan",_defaultProvider:o("kovan")},classic:{chainId:61,name:"classic",_defaultProvider:a("https://web3.gastracker.io","classic")},classicTestnet:{chainId:62,name:"classicTestnet",_defaultProvider:a("https://web3.gastracker.io/morden","classicTestnet")}} r.getNetwork=function(e){if(null==e)return null if("number"==typeof e){for(var t in l){var r=l[t] if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){var n=l[e] return null==n?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}var o=l[e.name] return o?(0!==e.chainId&&e.chainId!==o.chainId&&i.throwError("network chainId mismatch",i.INVALID_ARGUMENT,{arg:"network",value:e}),{name:e.name,chainId:o.chainId,ensAddress:e.ensAddress||o.ensAddress||null,_defaultProvider:e._defaultProvider||o._defaultProvider||null}):("number"!=typeof e.chainId&&i.throwError("invalid network chainId",i.INVALID_ARGUMENT,{arg:"network",value:e}),e)}},{"../errors":5}],72:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("../utils/bytes"),i=e("./hmac") r.pbkdf2=function(e,t,r,o,a){var s e=n.arrayify(e),t=n.arrayify(t) var u,l,c=1,f=new Uint8Array(o),h=new Uint8Array(t.length+4) h.set(t) for(var d=1;d<=c;d++){h[t.length]=d>>24&255,h[t.length+1]=d>>16&255,h[t.length+2]=d>>8&255,h[t.length+3]=255&d var p=i.computeHmac(a,e,h) s||(s=p.length,l=new Uint8Array(s),u=o-((c=Math.ceil(o/s))-1)*s),l.set(p) for(var m=1;m>=8 return t}function o(e,t,r){for(var n=0,i=0;ie.length)throw new Error("too short") if(t+1+r+(i=o(e,t+1,r))>e.length)throw new Error("to short") return a(e,t,t+1+r,r+i)}if(192<=e[t]){if(t+1+(i=e[t]-192)>e.length)throw new Error("invalid rlp data") return a(e,t,t+1,i)}if(184<=e[t]){var r if(t+1+(r=e[t]-183)>e.length)throw new Error("invalid rlp data") if(t+1+r+(i=o(e,t+1,r))>e.length)throw new Error("invalid rlp data") return{consumed:1+r+i,result:n.hexlify(e.slice(t+1+r,t+1+r+i))}}if(128<=e[t]){var i if(t+1+(i=e[t]-128)>e.length)throw new Error("invalid rlp data") return{consumed:1+i,result:n.hexlify(e.slice(t+1,t+1+i))}}return{consumed:1,result:n.hexlify(e[t])}}r.encode=function(e){return n.hexlify(function e(t){if(Array.isArray(t)){var r=[] return t.forEach((function(t){r=r.concat(e(t))})),r.length<=55?(r.unshift(192+r.length),r):((o=i(r.length)).unshift(247+o.length),o.concat(r))}var o,a=Array.prototype.slice.call(n.arrayify(t)) return 1===a.length&&a[0]<=127?a:a.length<=55?(a.unshift(128+a.length),a):((o=i(a.length)).unshift(183+o.length),o.concat(a))}(e))},r.decode=function(e){var t=n.arrayify(e),r=s(t,0) if(r.consumed!==t.length)throw new Error("invalid rlp data") return r.result}},{"./bytes":63}],76:[function(e,t,r){"use strict" var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var i=e("elliptic"),o=e("./address"),a=e("./bytes"),s=e("./hash"),u=e("./keccak256"),l=e("./properties"),c=n(e("../errors")),f=null function h(){return f=f||new i.ec("secp256k1")}var d=(p.prototype.sign=function(e){var t=h().keyFromPrivate(a.arrayify(this.privateKey)).sign(a.arrayify(e),{canonical:!0}) return{recoveryParam:t.recoveryParam,r:a.hexZeroPad("0x"+t.r.toString(16),32),s:a.hexZeroPad("0x"+t.s.toString(16),32),v:27+t.recoveryParam}},p.prototype.computeSharedSecret=function(e){var t=h().keyFromPrivate(a.arrayify(this.privateKey)),r=h().keyFromPublic(a.arrayify(m(e))) return a.hexZeroPad("0x"+t.derive(r.getPublic()).toString(16),32)},p.prototype._addPoint=function(e){var t=h().keyFromPublic(a.arrayify(this.publicKey)),r=h().keyFromPublic(a.arrayify(e)) return"0x"+t.pub.add(r.pub).encodeCompressed("hex")},p) function p(e){var t=h().keyFromPrivate(a.arrayify(e)) l.defineReadOnly(this,"privateKey",a.hexlify(t.priv.toArray("be",32))),l.defineReadOnly(this,"publicKey","0x"+t.getPublic(!1,"hex")),l.defineReadOnly(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),l.defineReadOnly(this,"publicKeyBytes",t.getPublic().encode(null,!0))}function m(e,t){var r=a.arrayify(e) if(32!==r.length)return 33===r.length?t?a.hexlify(r):"0x"+h().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+h().keyFromPublic(r).getPublic(!0,"hex"):a.hexlify(r):(c.throwError("invalid public or private key",c.INVALID_ARGUMENT,{arg:"key",value:"[REDACTED]"}),null) var n=new d(r) return t?n.compressedPublicKey:n.publicKey}function y(e){var t="0x"+m(e).slice(4) return o.getAddress("0x"+u.keccak256(t).substring(26))}function g(e,t){var r=a.splitSignature(t),n={r:a.arrayify(r.r),s:a.arrayify(r.s)} return"0x"+h().recoverPubKey(a.arrayify(e),n,r.recoveryParam).encode("hex",!1)}function v(e,t){return y(g(a.arrayify(e),t))}r.KeyPair=d,r.computePublicKey=m,r.computeAddress=y,r.recoverPublicKey=g,r.recoverAddress=v,r.verifyMessage=function(e,t){return v(s.hashMessage(e),t)}},{"../errors":5,"./address":59,"./bytes":63,"./hash":64,"./keccak256":70,"./properties":73,elliptic:12}],77:[function(e,t,r){"use strict" var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var o=n(e("aes-js")),a=n(e("scrypt-js")),s=n(e("uuid")),u=e("./signing-key"),l=i(e("./hdnode")),c=e("./address"),f=e("./bytes"),h=e("./pbkdf2"),d=e("./keccak256"),p=e("./utf8"),m=e("./random-bytes") function y(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),f.arrayify(e)}function g(e,t){for(e=String(e);e.lengtht.maxLength&&o.throwError("invalid length for "+t.name,o.INVALID_ARGUMENT,{arg:"transaction"+t.name,value:n}),r.push(l.hexlify(n))})),null!=e.chainId&&0!==e.chainId&&(r.push(l.hexlify(e.chainId)),r.push("0x"),r.push("0x")) var n=h.encode(r) if(!t)return n var i=l.splitSignature(t),a=27+i.recoveryParam return 9===r.length&&(r.pop(),r.pop(),r.pop(),a+=2*e.chainId+8),r.push(l.hexlify(a)),r.push(l.stripZeros(l.arrayify(i.r))),r.push(l.stripZeros(l.arrayify(i.s))),h.encode(r)},r.parse=function(e){var t=h.decode(e) 9!==t.length&&6!==t.length&&o.throwError("invalid raw transaction",o.INVALID_ARGUMENT,{arg:"rawTransactin",value:e}) var r={nonce:p(t[0]).toNumber(),gasPrice:p(t[1]),gasLimit:p(t[2]),to:function(e){return"0x"===e?null:s.getAddress(e)}(t[3]),value:p(t[4]),data:t[5],chainId:0} if(6===t.length)return r try{r.v=u.bigNumberify(t[6]).toNumber()}catch(e){return o.info(e),r}if(r.r=l.hexZeroPad(t[7],32),r.s=l.hexZeroPad(t[8],32),u.bigNumberify(r.r).isZero()&&u.bigNumberify(r.s).isZero())r.chainId=r.v,r.v=0 else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0) var n=r.v-27,i=t.slice(0,6) 0!==r.chainId&&(i.push(l.hexlify(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8) var f=c.keccak256(h.encode(i)) try{r.from=a.recoverAddress(f,{r:l.hexlify(r.r),s:l.hexlify(r.s),recoveryParam:n})}catch(e){o.info(e)}r.hash=c.keccak256(e)}return r},r.populateTransaction=function(e,t,r){d.Provider.isProvider(t)||o.throwError("missing provider",o.INVALID_ARGUMENT,{argument:"provider",value:t}),f.checkProperties(e,y) var n=f.shallowCopy(e) if(null!=n.to&&(n.to=t.resolveName(n.to)),null==n.gasPrice&&(n.gasPrice=t.getGasPrice()),null==n.nonce&&(n.nonce=t.getTransactionCount(r)),null==n.gasLimit){var i=f.shallowCopy(n) i.from=r,n.gasLimit=t.estimateGas(i)}return null==n.chainId&&(n.chainId=t.getNetwork().then((function(e){return e.chainId}))),f.resolveProperties(n)}},{"../constants":3,"../errors":5,"../providers/abstract-provider":49,"./address":59,"./bignumber":62,"./bytes":63,"./keccak256":70,"./properties":73,"./rlp":75,"./secp256k1":76}],83:[function(e,t,r){"use strict" var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var i,o=e("../constants"),a=n(e("../errors")),s=e("./bignumber"),u={} function l(e){return{decimals:e.length-1,tenPower:s.bigNumberify(e)}}function c(e){var t=u[String(e).toLowerCase()] if(!t&&"number"==typeof e&&parseInt(String(e))==e&&0<=e&&e<=256){for(var r="1",n=0;nr.decimals&&a.throwError("underflow occurred",a.NUMERIC_FAULT,{operation:"division",fault:"underflow"});l.length>6|192),r.push(63&o|128) else if(55296==(64512&o)){i++ var u=e.charCodeAt(i) if(i>=e.length||56320!=(64512&u))throw new Error("invalid utf-8 string") o=65536+((1023&o)<<10)+(1023&u),r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(o>>12|224),r.push(o>>6&63|128),r.push(63&o|128)}return s.arrayify(r)}function l(e,t){e=s.arrayify(e) for(var r="",n=0;n>7!=0){var o=null,a=null if(192==(224&i))o=1,a=127 else if(224==(240&i))o=2,a=2047 else{if(240!=(248&i)){if(t)continue if(128==(192&i))throw new Error("invalid utf8 byte sequence; unexpected continuation byte") throw new Error("invalid utf8 byte sequence; invalid prefix")}o=3,a=65535}if(n+o>e.length){if(!t)throw new Error("invalid utf8 byte sequence; too short") for(;n>6==2;n++);}else{for(var u=i&(1<<8-o-1)-1,l=0;l>10&1023),56320+(1023&u))) else if(!t)throw new Error("invalid utf8 byte sequence; invalid continuation byte")}}else r+=String.fromCharCode(i)}return r}(i=n=r.UnicodeNormalizationForm||(r.UnicodeNormalizationForm={})).current="",i.NFC="NFC",i.NFD="NFD",i.NFKC="NFKC",i.NFKD="NFKD",r.toUtf8Bytes=u,r.toUtf8String=l,r.formatBytes32String=function(e){var t=u(e) if(31t.ceiling&&(n=t.ceiling),s&&(u--,n=s,s=null),setTimeout(i,n)}return null}),(function(e){a()&&n(e)}))}()}))}},{"../errors":5,"./base64":60,"./properties":73,"./utf8":84,xmlhttprequest:48}],86:[function(e,t,n){(function(t){"use strict" Object.defineProperty(n,"__esModule",{value:!0}) var r=e("../utils/hash"),i=e("../utils/properties") n.check=function(e){for(var t=[],n=0;n<2048;n++){var i=e.getWord(n) if(n!==e.getWordIndex(i))return"0x" t.push(i)}return r.id(t.join("\n")+"\n")} var o=(a.prototype.split=function(e){return e.toLowerCase().split(/ +/g)},a.prototype.join=function(e){return e.join(" ")},a) function a(e){i.defineReadOnly(this,"locale",e)}n.Wordlist=o,n.register=function(e,t){t=t||e.locale}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/hash":64,"../utils/properties":73}],87:[function(e,t,r){"use strict" var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var a,s=e("./utils/bytes"),u=e("./utils/hash"),l=e("./utils/hdnode"),c=e("./utils/json-wallet"),f=e("./utils/keccak256"),h=e("./utils/properties"),d=e("./utils/random-bytes"),p=o(e("./utils/secret-storage")),m=e("./utils/signing-key"),y=e("./utils/transaction"),g=e("./abstract-signer"),v=e("./providers/abstract-provider"),b=o(e("./errors")),w=(i(_,a=g.Signer),Object.defineProperty(_.prototype,"address",{get:function(){return this.signingKey.address},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"mnemonic",{get:function(){return this.signingKey.mnemonic},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"path",{get:function(){return this.signingKey.path},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"privateKey",{get:function(){return this.signingKey.privateKey},enumerable:!0,configurable:!0}),_.prototype.connect=function(e){return v.Provider.isProvider(e)||b.throwError("invalid provider",b.INVALID_ARGUMENT,{argument:"provider",value:e}),new _(this.signingKey,e)},_.prototype.getAddress=function(){return Promise.resolve(this.address)},_.prototype.sign=function(e){var t=this return h.resolveProperties(e).then((function(e){var r=y.serialize(e),n=t.signingKey.signDigest(f.keccak256(r)) return y.serialize(e,n)}))},_.prototype.signMessage=function(e){return Promise.resolve(s.joinSignature(this.signingKey.signDigest(u.hashMessage(e))))},_.prototype.getBalance=function(e){if(!this.provider)throw new Error("missing provider") return this.provider.getBalance(this.address,e)},_.prototype.getTransactionCount=function(e){if(!this.provider)throw new Error("missing provider") return this.provider.getTransactionCount(this.address,e)},_.prototype.sendTransaction=function(e){var t=this if(!this.provider)throw new Error("missing provider") return null==e.nonce&&((e=h.shallowCopy(e)).nonce=this.getTransactionCount("pending")),y.populateTransaction(e,this.provider,this.address).then((function(e){return t.sign(e).then((function(e){return t.provider.sendTransaction(e)}))}))},_.prototype.encrypt=function(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback") return t=t||{},this.mnemonic&&((t=h.shallowCopy(t)).mnemonic=this.mnemonic,t.path=this.path),p.encrypt(this.privateKey,e,t,r)},_.createRandom=function(e){var t=d.randomBytes(16);(e=e||{}).extraEntropy&&(t=s.arrayify(f.keccak256(s.concat([t,e.extraEntropy])).substring(0,34))) var r=l.entropyToMnemonic(t,e.locale) return _.fromMnemonic(r,e.path,e.locale)},_.fromEncryptedJson=function(e,t,r){if(c.isCrowdsaleWallet(e))try{r&&r(0) var n=p.decryptCrowdsale(e,t) return r&&r(1),Promise.resolve(new _(n))}catch(e){return Promise.reject(e)}else if(c.isSecretStorageWallet(e))return p.decrypt(e,t,r).then((function(e){return new _(e)})) return Promise.reject("invalid wallet JSON")},_.fromMnemonic=function(e,t,r){return t=t||l.defaultPath,new _(l.fromMnemonic(e,r).derivePath(t))},_) function _(e,t){var r=a.call(this)||this return b.checkNew(r,_),m.SigningKey.isSigningKey(e)?h.defineReadOnly(r,"signingKey",e):h.defineReadOnly(r,"signingKey",new m.SigningKey(e)),h.defineReadOnly(r,"provider",t),r}r.Wallet=w},{"./abstract-signer":2,"./errors":5,"./providers/abstract-provider":49,"./utils/bytes":63,"./utils/hash":64,"./utils/hdnode":65,"./utils/json-wallet":69,"./utils/keccak256":70,"./utils/properties":73,"./utils/random-bytes":74,"./utils/secret-storage":77,"./utils/signing-key":80,"./utils/transaction":82}],88:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("../wordlists/lang-en").langEn r.en=n},{"../wordlists/lang-en":89}],89:[function(e,t,r){"use strict" var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}) Object.defineProperty(r,"__esModule",{value:!0}) var o,a=e("../utils/wordlist"),s=null function u(e){if(null==s&&(s="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==a.check(e)))throw s=null,new Error("BIP39 Wordlist for en (English) FAILED")}function l(){return o.call(this,"en")||this}var c=new(i(l,o=a.Wordlist),l.prototype.getWord=function(e){return u(this),s[e]},l.prototype.getWordIndex=function(e){return u(this),s.indexOf(e)},l) r.langEn=c,a.register(c)},{"../utils/wordlist":86}]},{},[7])(7)},"object"==s(t)&&void 0!==e?e.exports=a():(i=[],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(4))},function(e,t){function r(e,t){for(var r=0;r=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===t(e)&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,r,n){if("number"==typeof e)return this._initNumber(e,r,n) if("object"===t(e))return this._initArray(e,r,n) "hex"===r&&(r=16),i(r===(0|r)&&r>=2&&r<=36) var o=0 "-"===(e=e.toString().replace(/\s+/g,""))[0]&&o++,16===r?this._parseHex(e,o):this._parseBase(e,r,o),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),r,n)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this this.length=Math.ceil(e.length/3),this.words=new Array(this.length) for(var n=0;n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++) else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++) return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length) for(var r=0;r=t;r-=6)i=u(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++) r+6!==t&&(i=u(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1 for(var n=0,i=1;i<=67108863;i*=t)n++ n--,i=i/t|0 for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length-- return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.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],h=[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(e,t,r){r.negative=t.negative^e.negative var n=e.length+t.length|0 r.length=n,n=n-1|0 var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0 r.words[0]=s for(var l=1;l>>26,f=67108863&u,h=Math.min(l,t.length-1),d=Math.max(0,l-e.length+1);d<=h;d++){var p=l-d|0 c+=(a=(i=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r if(t=0|t||1,16===(e=e||10)||"hex"===e){r="" for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e] r="" var p=this.clone() for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e) r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0] return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n) i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip() var a,s,u="le"===t,l=new e(o),c=this.clone() if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26 var t=e,r=0 return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e) return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0 for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t t=this.length>e.length?e:this for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r this.length>e.length?(t=this,r=e):(t=e,r=this) for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0) var t=0|Math.ceil(e/26),r=e%26 this._expand(t),r>0&&t-- for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0) var r=e/26|0,n=e%26 return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this) for(var i=0,o=0;o>>26 for(;0!==i&&o>>26 if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++ else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0 var t=this.iadd(e) return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign() var r,n,i=this.cmp(e) if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this i>0?(r=this,n=e):(r=e,n=this) for(var o=0,a=0;a>26,this.words[a]=67108863&t for(;0!==o&&a>26,this.words[a]=67108863&t if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],E=8191&S,k=S>>>13,M=0|a[5],x=8191&M,A=M>>>13,T=0|a[6],I=8191&T,O=T>>>13,C=0|a[7],R=8191&C,P=C>>>13,N=0|a[8],D=8191&N,B=N>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],z=8191&F,H=F>>>13,V=0|s[1],K=8191&V,q=V>>>13,G=0|s[2],W=8191&G,Y=G>>>13,Z=0|s[3],J=8191&Z,$=Z>>>13,Q=0|s[4],X=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,he=ce>>>13,de=0|s[9],pe=8191&de,me=de>>>13 r.negative=e.negative^t.negative,r.length=19 var ye=(l+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,z)|0))<<13)|0 l=((o=Math.imul(h,H))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(m,z)|0,o=Math.imul(m,H) var ge=(l+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,K)|0))<<13)|0 l=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(v,z)|0,o=Math.imul(v,H),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,q)|0 var ve=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(h,W)|0))<<13)|0 l=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(_,z)|0,o=Math.imul(_,H),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,q)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0 var be=(l+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(h,J)|0))<<13)|0 l=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,H))+Math.imul(k,z)|0,o=Math.imul(k,H),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,q)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,$)|0 var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,X)|0))<<13)|0 l=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,H))+Math.imul(A,z)|0,o=Math.imul(A,H),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,$)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0 var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0 l=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0 var Se=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(h,oe)|0))<<13)|0 l=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,H))+Math.imul(P,z)|0,o=Math.imul(P,H),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,q)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0 var Ee=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(h,ue)|0))<<13)|0 l=((o=o+Math.imul(h,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,H))+Math.imul(B,z)|0,o=Math.imul(B,H),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,q)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0 var ke=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0 l=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,z),i=(i=Math.imul(j,H))+Math.imul(U,z)|0,o=Math.imul(U,H),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,le)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,he)|0 var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(h,pe)|0))<<13)|0 l=((o=o+Math.imul(h,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,q))+Math.imul(U,K)|0,o=Math.imul(U,q),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(v,fe)|0,o=o+Math.imul(v,he)|0 var xe=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0 l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,W),i=(i=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,he)|0 var Ae=(l+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(v,pe)|0))<<13)|0 l=((o=o+Math.imul(v,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,$))+Math.imul(U,J)|0,o=Math.imul(U,$),n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,he)|0 var Te=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0 l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(U,X)|0,o=Math.imul(U,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,he)|0 var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0 l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,he)|0 var Oe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0 l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,le)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,he)|0 var Ce=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(O,pe)|0))<<13)|0 l=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(U,ue)|0,o=Math.imul(U,le),n=n+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,he)|0 var Re=(l+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0 l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,he))+Math.imul(U,fe)|0,o=Math.imul(U,he) var Pe=(l+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(B,pe)|0))<<13)|0 l=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863 var Ne=(l+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(U,pe)|0))<<13)|0 return l=((o=Math.imul(U,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ye,u[1]=ge,u[2]=ve,u[3]=be,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Te,u[13]=Ie,u[14]=Oe,u[15]=Ce,u[16]=Re,u[17]=Pe,u[18]=Ne,0!==l&&(u[19]=l,r.length++),r} function m(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r=this.length+e.length return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1 return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++ return 1<>>=13,r[2*a+1]=8191&o,o>>>=13 for(a=2*t;a>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e) if(0===t.length)return new a(1) for(var r=this,n=0;n=0) var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r if(0!==r){var a=0 for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t] for(t=0;t=0),n=t?(t-t%26)/26:0 var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==c||l>=n);l--){var f=0|this.words[l] this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0) var t=e%26,r=(e-t)/26,n=1<=0) var t=e%26,r=(e-t)/26 if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++ return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e) if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1 else for(var t=0;t>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o if(0===s)return this.strip() for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1] 0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]) var s,u=n.length-i.length if("mod"!==t){(s=new a(null)).length=u+1,s.words=new Array(s.length) for(var l=0;l=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]) for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1) s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t) var n,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e) if(t.mod.isZero())return t.div var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n) return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){i(e<=67108863) for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e return r},a.prototype.idivn=function(e){i(e<=67108863) for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t this.words[r]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero()) var t=this,r=e.clone() t=0!==t.negative?t.umod(e):t.clone() for(var n=new a(1),o=new a(0),s=new a(0),u=new a(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l for(var c=r.clone(),f=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(c),o.isub(f)),n.iushrn(1),o.iushrn(1) for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1) t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(u)):(r.isub(t),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(l)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero()) var t=this,r=e.clone() t=0!==t.negative?t.umod(e):t.clone() for(var n,o=new a(1),s=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1) for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1) t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(n=0===t.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs() if(e.isZero())return this.abs() var t=this.clone(),r=e.clone() t.negative=0,r.negative=0 for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1) for(;;){for(;t.isEven();)t.iushrn(1) for(;r.isEven();)r.iushrn(1) var i=t.cmp(r) if(i<0){var o=t t=r,r=o}else if(0===i||0===r.cmpn(1))break t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e) var t=e%26,r=(e-t)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0 if(0!==this.negative&&!r)return-1 if(0===this.negative&&r)return 1 if(this.strip(),this.length>1)t=1 else{r&&(e=-e),i(e<=67108863,"Number is too big") var n=0|this.words[0] t=n===e?0:ne.length)return 1 if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r] if(n!==i){ni&&(t=1) break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new E(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)} var g={k256:null,p224:null,p192:null,p25519:null} function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=a._prime(e) this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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 e=new a(null) return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n) var n=t0?r.isub(this.p):r.strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},o(b,v),b.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2 for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(g[e])return g[e] var t if("k256"===e)t=new b else if("p224"===e)t=new w else if("p192"===e)t=new _ else{if("p25519"!==e)throw new Error("Unknown prime "+e) t=new S}return g[e]=t,t},E.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t) var r=e.add(t) return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t) var r=e.iadd(t) return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t) var r=e.sub(t) return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t) var r=e.isub(t) return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone() var t=this.m.andln(3) if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2) return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1) i(!n.isZero()) var s=new a(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength() for(c=new a(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u) for(var f=this.pow(c,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),p=o;0!==d.cmp(s);){for(var m=d,y=0;0!==m.cmp(s);y++)m=m.redSqr() i(y=0;n--){for(var l=t.words[n],c=u-1;c>=0;c--){var f=l>>c&1 i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m) return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone() return t.red=null,t},a.mont=function(e){return new k(e)},o(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv)) return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this) var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(18)(e))},function(e,t,r){"use strict";(function(t){!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function') var o,a,s=arguments.length switch(s){case 0:case 1:return t.nextTick(e) case 2:return t.nextTick((function(){e.call(null,r)})) case 3:return t.nextTick((function(){e.call(null,r,n)})) case 4:return t.nextTick((function(){e.call(null,r,n,i)})) default:for(o=new Array(s-1),a=0;a>>2,t.words[2]=(63&e[22])<<20|e[23]<<12|e[24]<<4|e[25]>>>4,t.words[3]=(255&e[19])<<18|e[20]<<10|e[21]<<2|e[22]>>>6,t.words[4]=(3&e[15])<<24|e[16]<<16|e[17]<<8|e[18],t.words[5]=(15&e[12])<<22|e[13]<<14|e[14]<<6|e[15]>>>2,t.words[6]=(63&e[9])<<20|e[10]<<12|e[11]<<4|e[12]>>>4,t.words[7]=(255&e[6])<<18|e[7]<<10|e[8]<<2|e[9]>>>6,t.words[8]=(3&e[2])<<24|e[3]<<16|e[4]<<8|e[5],t.words[9]=e[0]<<14|e[1]<<6|e[2]>>>2,t.length=10,t.strip()},o.prototype.toBuffer=function(){for(var e=this.words,t=this.length;t<10;++t)e[t]=0 return n.from([e[9]>>>14&255,e[9]>>>6&255,(63&e[9])<<2|e[8]>>>24&3,e[8]>>>16&255,e[8]>>>8&255,255&e[8],e[7]>>>18&255,e[7]>>>10&255,e[7]>>>2&255,(3&e[7])<<6|e[6]>>>20&63,e[6]>>>12&255,e[6]>>>4&255,(15&e[6])<<4|e[5]>>>22&15,e[5]>>>14&255,e[5]>>>6&255,(63&e[5])<<2|e[4]>>>24&3,e[4]>>>16&255,e[4]>>>8&255,255&e[4],e[3]>>>18&255,e[3]>>>10&255,e[3]>>>2&255,(3&e[3])<<6|e[2]>>>20&63,e[2]>>>12&255,e[2]>>>4&255,(15&e[2])<<4|e[1]>>>22&15,e[1]>>>14&255,e[1]>>>6&255,(63&e[1])<<2|e[0]>>>24&3,e[0]>>>16&255,e[0]>>>8&255,255&e[0]])},o.prototype.clone=function(){var e=new o e.words=new Array(this.length) for(var t=0;t1&&0==(0|this.words[this.length-1]);)this.length-- return this},o.prototype.normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.ucmp=function(e){if(this.length!==e.length)return this.length>e.length?1:-1 for(var t=this.length-1;t>=0;--t)if(this.words[t]!==e.words[t])return this.words[t]>e.words[t]?1:-1 return 0},o.prototype.gtOne=function(){return this.length>1||this.words[0]>1},o.prototype.isOverflow=function(){return this.ucmp(o.n)>=0},o.prototype.isHigh=function(){return 1===this.ucmp(o.nh)},o.prototype.bitLengthGT256=function(){return this.length>10||10===this.length&&this.words[9]>4194303},o.prototype.iuaddn=function(e){this.words[0]+=e for(var t=0;this.words[t]>67108863&&te.length?(t=this,r=e):(t=e,r=this) for(var n=0,i=0;n>>26}for(;0!==i&&n>>26 if(this.length=t.length,0!==i)this.words[this.length++]=i else if(t!==this)for(;n0?(t=this,r=e):(t=e,r=this) for(var i=0,o=0;i>26,this.words[i]=67108863&a}for(;0!==o&&i>26,this.words[i]=67108863&a if(0===o&&i>>26,u=67108863&i,l=Math.max(0,o-e.length+1),c=Math.min(o,t.length-1);l<=c;l++){var f=o-l,h=e.words[f]*t.words[l]+u s+=h/67108864|0,u=67108863&h}r.words[o]=u,i=s}return 0!==i&&(r.words[r.length++]=i),r.strip()},o.umulTo10x10=Math.imul?i.umulTo10x10:o.umulTo,o.umulnTo=function(e,t,r){if(0===t)return r.words=[0],r.length=1,r for(var n=0,i=0;n0?(r.words[n]=i,r.length=e.length+1):r.length=e.length,r},o.prototype.umul=function(e){var t=new o return t.words=new Array(this.length+e.length),10===this.length&&10===e.length?o.umulTo10x10(this,e,t):1===this.length?o.umulnTo(e,this.words[0],t):1===e.length?o.umulnTo(this,e.words[0],t):o.umulTo(this,e,t)},o.prototype.isplit=function(e){e.length=Math.min(this.length,9) for(var t=0;t>>22,r=n}return r>>>=22,this.words[t-10]=r,0===r&&this.length>10?this.length-=10:this.length-=9,this},o.prototype.fireduce=function(){return this.isOverflow()&&this.isub(o.n),this},o.prototype.ureduce=function(){var e=this.clone().isplit(o.tmp).umul(o.nc).iadd(o.tmp) return e.bitLengthGT256()&&(e=e.isplit(o.tmp).umul(o.nc).iadd(o.tmp)).bitLengthGT256()&&(e=e.isplit(o.tmp).umul(o.nc).iadd(o.tmp)),e.fireduce()},o.prototype.ishrn=function(e){for(var t=(1<=0;--n){var o=this.words[n] this.words[n]=i<>>e,i=o&t}return this.length>1&&0===this.words[this.length-1]&&(this.length-=1),this},o.prototype.uinvm=function(){for(var e=this.clone(),t=o.n.clone(),r=o.fromNumber(1),n=o.fromNumber(0),i=o.fromNumber(0),a=o.fromNumber(1);e.isEven()&&t.isEven();){for(var s=1,u=1;0==(e.words[0]&u)&&0==(t.words[0]&u)&&s<26;++s,u<<=1);e.ishrn(s),t.ishrn(s)}for(var l=t.clone(),c=e.clone();!e.isZero();){for(var f=0,h=1;0==(e.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(e.ishrn(f);f-- >0;)(r.isOdd()||n.isOdd())&&(r.iadd(l),n.isub(c)),r.ishrn(1),n.ishrn(1) for(var d=0,p=1;0==(t.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(t.ishrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(l),a.isub(c)),i.ishrn(1),a.ishrn(1) e.ucmp(t)>=0?(e.isub(t),r.isub(i),n.isub(a)):(t.isub(e),i.isub(r),a.isub(n))}if(1===i.negative){i.negative=0 var m=i.ureduce() return m.negative^=1,m.normSign().iadd(o.n)}return i.ureduce()},o.prototype.imulK=function(){this.words[this.length]=0,this.words[this.length+1]=0,this.length+=2 for(var e=0,t=0;e0?this.isub(o.p):this.strip(),this},o.prototype.redNeg=function(){return this.isZero()?o.fromNumber(0):o.p.sub(this)},o.prototype.redAdd=function(e){return this.clone().redIAdd(e)},o.prototype.redIAdd=function(e){return this.iadd(e),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redIAdd7=function(){return this.iuaddn(7),this.ucmp(o.p)>=0&&this.isub(o.p),this},o.prototype.redSub=function(e){return this.clone().redISub(e)},o.prototype.redISub=function(e){return this.isub(e),0!==this.negative&&this.iadd(o.p),this},o.prototype.redMul=function(e){return this.umul(e).redIReduce()},o.prototype.redSqr=function(){return this.umul(this).redIReduce()},o.prototype.redSqrt=function(){if(this.isZero())return this.clone() for(var e=this.redSqr(),t=e.redSqr(),r=t.redSqr().redMul(t),n=r.redMul(e),i=n.redMul(this),o=i,a=0;a<54;++a)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i) for(o=o.redSqr().redSqr().redSqr().redSqr().redMul(n),a=0;a<5;++a)o=o.redSqr().redSqr().redSqr().redSqr().redMul(i) return 0===(o=(o=o.redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().redSqr().redSqr().redSqr().redSqr().redSqr().redMul(r)).redSqr().ucmp(this)?o:null},o.prototype.redInvm=function(){for(var e,t=this.clone(),r=o.p.clone(),n=o.fromNumber(1),i=o.fromNumber(0);t.gtOne()&&r.gtOne();){for(var a=0,s=1;0==(t.words[0]&s)&&a<26;++a,s<<=1);if(a>0)for(t.ishrn(a);a-- >0;)n.isOdd()&&n.iadd(o.p),n.ishrn(1) for(var u=0,l=1;0==(r.words[0]&l)&&u<26;++u,l<<=1);if(u>0)for(r.ishrn(u);u-- >0;)i.isOdd()&&i.iadd(o.p),i.ishrn(1) t.ucmp(r)>=0?(t.isub(r),n.isub(i)):(r.isub(t),i.isub(n))}return 0!==(e=1===t.length&&1===t.words[0]?n:i).negative&&e.iadd(o.p),0!==e.negative?(e.negative=0,e.redIReduce().redNeg()):e.redIReduce()},o.prototype.getNAF=function(e){for(var t=[],r=1<>1,o=this.clone();!o.isZero();){for(var a=0,s=1;0==(o.words[0]&s)&&a<26;++a,s<<=1)t.push(0) if(0!==a)o.ishrn(a) else{var u=o.words[0]&n if(u>=i)t.push(i-u),o.iuaddn(u-i).ishrn(1) else if(t.push(u),o.words[0]-=u,!o.isZero()){for(a=e-1;a>0;--a)t.push(0) o.ishrn(e)}}}return t},o.prototype.inspect=function(){if(this.isZero())return"0" for(var e=this.toBuffer().toString("hex"),t=0;"0"===e[t];++t);return e.slice(t)},o.n=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141","hex")),o.nh=o.n.clone().ishrn(1),o.nc=o.fromBuffer(n.from("000000000000000000000000000000014551231950B75FC4402DA1732FC9BEBF","hex")),o.p=o.fromBuffer(n.from("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F","hex")),o.psn=o.p.sub(o.n),o.tmp=new o,o.tmp.words=new Array(10),o.fromNumber(1).words[3]=0,e.exports=o},function(e,t){e.exports=function(){}},function(e,t,r){"use strict";(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(383) ;/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */function o(e,t){if(e===t)return 0 for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i=0;u--)if(c[u]!==f[u])return!1 for(u=c.length-1;u>=0;u--)if(!w(e[a=c[u]],t[a],r,n))return!1 return!0}(e,t,r,i))}return r?e===t:e==t}function _(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function S(e,t){if(!e||!t)return!1 if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e) try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,r,n){var i if("function"!=typeof t)throw new TypeError('"block" argument must be a function') "string"==typeof r&&(n=r,r=null),i=function(e){var t try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&v(i,r,"Missing expected exception"+n) var o="string"==typeof n,a=!e&&i&&!r if((!e&&s.isError(i)&&o&&S(i,r)||a)&&v(i,r,"Got unwanted exception"+n),e&&i&&r&&!S(i,r)||!e&&i)throw i}d.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return y(g(e.actual),128)+" "+e.operator+" "+y(g(e.expected),128)}(this),this.generatedMessage=!0) var t=e.stackStartFunction||v if(Error.captureStackTrace)Error.captureStackTrace(this,t) else{var r=new Error if(r.stack){var n=r.stack,i=m(t),o=n.indexOf("\n"+i) if(o>=0){var a=n.indexOf("\n",o+1) n=n.substring(a+1)}this.stack=n}}},s.inherits(d.AssertionError,Error),d.fail=v,d.ok=b,d.equal=function(e,t,r){e!=t&&v(e,t,r,"==",d.equal)},d.notEqual=function(e,t,r){e==t&&v(e,t,r,"!=",d.notEqual)},d.deepEqual=function(e,t,r){w(e,t,!1)||v(e,t,r,"deepEqual",d.deepEqual)},d.deepStrictEqual=function(e,t,r){w(e,t,!0)||v(e,t,r,"deepStrictEqual",d.deepStrictEqual)},d.notDeepEqual=function(e,t,r){w(e,t,!1)&&v(e,t,r,"notDeepEqual",d.notDeepEqual)},d.notDeepStrictEqual=function e(t,r,n){w(t,r,!0)&&v(t,r,n,"notDeepStrictEqual",e)},d.strictEqual=function(e,t,r){e!==t&&v(e,t,r,"===",d.strictEqual)},d.notStrictEqual=function(e,t,r){e===t&&v(e,t,r,"!==",d.notStrictEqual)},d.throws=function(e,t,r){E(!0,e,t,r)},d.doesNotThrow=function(e,t,r){E(!1,e,t,r)},d.ifError=function(e){if(e)throw e},d.strict=i((function e(t,r){t||v(t,!0,r,"==",e)}),d,{equal:d.strictEqual,deepEqual:d.deepStrictEqual,notEqual:d.notStrictEqual,notDeepEqual:d.notDeepStrictEqual}),d.strict.strict=d.strict var k=Object.keys||function(e){var t=[] for(var r in e)u.call(e,r)&&t.push(r) return t}}).call(this,r(4))},function(e,t,r){(function(e){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=i)return e switch(e){case"%s":return String(n[r++]) case"%d":return Number(n[r++]) case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(r)?n.showHidden=r:r&&t._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),f(n,e,n.depth)}function l(e,t){var r=u.styles[t] return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function c(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e) return v(i)||(i=f(e,i,n)),i}var o=function(e,t){if(b(t))return e.stylize("undefined","undefined") if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'" return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}(e,r) if(o)return o var a=Object.keys(r),s=function(e){var t={} return e.forEach((function(e,r){t[e]=!0})),t}(a) if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),E(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(r) if(0===a.length){if(k(r)){var u=r.name?": "+r.name:"" return e.stylize("[Function"+u+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp") if(S(r))return e.stylize(Date.prototype.toString.call(r),"date") if(E(r))return h(r)}var l,c="",_=!1,M=["{","}"] return p(r)&&(_=!0,M=["[","]"]),k(r)&&(c=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(c=" "+RegExp.prototype.toString.call(r)),S(r)&&(c=" "+Date.prototype.toUTCString.call(r)),E(r)&&(c=" "+h(r)),0!==a.length||_&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),l=_?function(e,t,r,n,i){for(var o=[],a=0,s=t.length;a60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(l,c,M)):M[0]+c+M[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,i,o){var a,s,u if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),I(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=y(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function g(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function w(e){return _(e)&&"[object RegExp]"===M(e)}function _(e){return"object"===n(e)&&null!==e}function S(e){return _(e)&&"[object Date]"===M(e)}function E(e){return _(e)&&("[object Error]"===M(e)||e instanceof Error)}function k(e){return"function"==typeof e}function M(e){return Object.prototype.toString.call(e)}function x(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(r){if(b(a)&&(a=e.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(a)){var n=e.pid s[r]=function(){var e=t.format.apply(t,arguments) console.error("%s %d: %s",r,n,e)}}else s[r]=function(){} return s[r]},t.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"},t.isArray=p,t.isBoolean=m,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=v,t.isSymbol=function(e){return"symbol"===n(e)},t.isUndefined=b,t.isRegExp=w,t.isObject=_,t.isDate=S,t.isError=E,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===n(e)||void 0===e},t.isBuffer=r(384) var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"] function T(){var e=new Date,t=[x(e.getHours()),x(e.getMinutes()),x(e.getSeconds())].join(":") return[e.getDate(),A[e.getMonth()],t].join(" ")}function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){console.log("%s - %s",T(),t.format.apply(t,arguments))},t.inherits=r(2),t._extend=function(e,t){if(!t||!_(t))return e for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]] return e} var O="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0 function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value") r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function') if(O&&e[O]){var t if("function"!=typeof(t=e[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function') return Object.defineProperty(t,O,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),i=[],o=0;o")}},{key:"data",get:function(){return this._data},set:function(e){throw new Error("Can't set property: 'data' is immutable")}},{key:"links",get:function(){return this._links},set:function(e){throw new Error("Can't set property: 'links' is immutable")}},{key:"size",get:function(){return void 0===this._size&&(this._size=this.links.reduce((function(e,t){return e+t.size}),this._serializedSize)),this._size},set:function(e){throw new Error("Can't set property: 'size' is immutable")}}])&&i(t.prototype,r),e}();(t=e.exports=a(s,{className:"DAGNode",symbolName:"@ipld/js-ipld-dag-pb/dagnode"})).create=r(73),t.clone=r(543),t.addLink=r(544),t.rmLink=r(545)}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(539),i=r(74).serialize,o=r(75).linkSort,a=r(72),s=r(29) e.exports=function(e,r,u){if("function"==typeof e?(u=e,e=void 0):"string"==typeof e&&(e=t.from(e)),"function"==typeof r&&(u=r,r=[]),!t.isBuffer(e))return u(new Error("Passed 'data' is not a buffer or a string!")) r=r.map((function(e){return s.isDAGLink(e)?e:s.util.createDagLinkFromB58EncodedHash(e)})),r=n(r,o),i({data:e,links:r},(function(t,n){return t?u(t):u(null,new a(e,r,n.length))}))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(n){var i=r(6),o=r(61)(r(540)),a=r(231),s=r(29),u=r(72),l=r(63),c=r(118),f=r(96) function h(e,t){var r,n=e.data,i=e.links,a=void 0===i?[]:i !u.isDAGNode(e)&&a&&(a=a.map((function(e){return s.isDAGLink(e)?e:s.util.createDagLinkFromB58EncodedHash(e)}))) try{r=o.PBNode.encode(function(e){var t={} return e.data&&e.data.length>0?t.Data=e.data:t.Data=null,e.links&&e.links.length>0?t.Links=e.links.map((function(e){return{Hash:e.cid.buffer,Name:e.name,Tsize:e.size}})):t.Links=null,t}({data:n,links:a}))}catch(e){return t(e)}t(null,r)}(t=e.exports).serialize=h,t.deserialize=function(e,t){var r=o.PBNode.decode(e),i=r.Links.map((function(e){return new s(e.Name,e.Tsize,e.Hash)})),a=null==r.Data?n.alloc(0):r.Data f((function(){return t(null,new u(a,i,e.length))}))},t.cid=function(e,t,r){"function"==typeof t&&(r=t,t={}) var o=(t=t||{}).hashAlg||a.defaultHashAlg,s=t.version void 0===s&&(s="sha2-256"===o?0:1),c([function(t){if(n.isBuffer(e))return t(null,e) h(e,t)},function(e,t){return l(e,o,t)},function(e,t){return t(null,new i(s,a.multicodec,e))}],r)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(n){var i=r(29),o=r(74).cid;(t=e.exports).cloneData=function(e){var t return e.data&&e.data.length>0?(t=n.alloc(e.data.length),e.data.copy(t)):t=n.alloc(0),t},t.cloneLinks=function(e){return e.links.slice()},t.linkSort=function(e,t){return n.compare(e.nameAsBuffer,t.nameAsBuffer)},t.toDAGLink=function(e,t,r){"function"==typeof t&&(r=t,t={}),o(e,t,(function(n,o){if(n)return r(n) r(null,new i(t.name||"",e.size,o))}))}}).call(this,r(0).Buffer)},function(e,t,r){var n function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(o){"use strict" var a,s=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,u=Math.ceil,l=Math.floor,c="[BigNumber Error] ",f=c+"Number primitive has more than 15 significant digits: ",h=1e14,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],p=1e9 function m(e){var t=0|e return e>0||e===t?t:t-1}function y(e){for(var t,r,n=1,i=e.length,o=e[0]+"";nl^r?1:-1 for(s=(u=i.length)<(l=o.length)?u:l,a=0;ao[a]^r?1:-1 return u==l?0:u>l^r?1:-1}function v(e,t,r,n){if(er||e!==l(e))throw Error(c+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function b(e){var t=e.c.length-1 return m(e.e/14)==t&&e.c[t]%2!=0}function w(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function _(e,t,r){var n,i if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else tN?m.c=m.e=null:e.e=10;c/=10,u++);return void(u>N?m.c=m.e=null:(m.e=u,m.c=[e]))}p=String(e)}else{if(!s.test(p=String(e)))return o(m,p,h) m.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(u=p.indexOf("."))>-1&&(p=p.replace(".","")),(c=p.search(/e/i))>0?(u<0&&(u=c),u+=+p.slice(c+1),p=p.substring(0,c)):u<0&&(u=p.length)}else{if(v(t,2,U.length,"Base"),10==t)return K(m=new F(e),I+m.e+1,O) if(p=String(e),h="number"==typeof e){if(0*e!=0)return o(m,p,h,t) if(m.s=1/e<0?(p=p.slice(1),-1):1,F.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(f+e)}else m.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1 for(r=U.slice(0,t),u=c=0,d=p.length;cu){u=d continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,c=-1,u=0 continue}return o(m,String(e),h,t)}h=!1,(u=(p=n(p,t,10,m.s)).indexOf("."))>-1?p=p.replace(".",""):u=p.length}for(c=0;48===p.charCodeAt(c);c++);for(d=p.length;48===p.charCodeAt(--d););if(p=p.slice(c,++d)){if(d-=c,h&&F.DEBUG&&d>15&&(e>9007199254740991||e!==l(e)))throw Error(f+m.s*e) if((u=u-c-1)>N)m.c=m.e=null else if(u=R)?w(u,a):_(u,a,"0") else if(o=(e=K(new F(e),t,r)).e,s=(u=y(e.c)).length,1==n||2==n&&(t<=o||o<=C)){for(;ss){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=o-s)>0)for(o+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function H(e,t){for(var r,n=1,i=new F(e[0]);n=10;i/=10,n++);return(r=n+14*r-1)>N?e.c=e.e=null:r=10;s/=10,i++);if((o=t-i)<0)o+=14,a=t,p=(c=m[f=0])/y[i-a-1]%10|0 else if((f=u((o+1)/14))>=m.length){if(!n)break e for(;m.length<=f;m.push(0));c=p=0,i=1,a=(o%=14)-14+1}else{for(c=s=m[f],i=1;s>=10;s/=10,i++);p=(a=(o%=14)-14+i)<0?0:c/y[i-a-1]%10|0}if(n=n||t<0||null!=m[f+1]||(a<0?c:c%y[i-a-1]),n=r<4?(p||n)&&(0==r||r==(e.s<0?3:2)):p>5||5==p&&(4==r||n||6==r&&(o>0?a>0?c/y[i-a]:0:m[f-1])%10&1||r==(e.s<0?8:7)),t<1||!m[0])return m.length=0,n?(t-=e.e+1,m[0]=y[(14-t%14)%14],e.e=-t||0):m[0]=e.e=0,e if(0==o?(m.length=f,s=1,f--):(m.length=f+1,s=y[14-o],m[f]=a>0?l(c/y[i-a]%y[a])*s:0),n)for(;;){if(0==f){for(o=1,a=m[0];a>=10;a/=10,o++);for(a=m[0]+=s,s=1;a>=10;a/=10,s++);o!=s&&(e.e++,m[0]==h&&(m[0]=1)) break}if(m[f]+=s,m[f]!=h)break m[f--]=0,s=1}for(o=m.length;0===m[--o];m.pop());}e.e>N?e.c=e.e=null:e.e=R?w(t,r):_(t,r,"0"),e.s<0?"-"+t:t)}return F.clone=e,F.ROUND_UP=0,F.ROUND_DOWN=1,F.ROUND_CEIL=2,F.ROUND_FLOOR=3,F.ROUND_HALF_UP=4,F.ROUND_HALF_DOWN=5,F.ROUND_HALF_EVEN=6,F.ROUND_HALF_CEIL=7,F.ROUND_HALF_FLOOR=8,F.EUCLID=9,F.config=F.set=function(e){var t,r if(null!=e){if("object"!=i(e))throw Error(c+"Object expected: "+e) if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(v(r=e[t],0,p,t),I=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(v(r=e[t],0,8,t),O=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(v(r[0],-p,0,t),v(r[1],0,p,t),C=r[0],R=r[1]):(v(r,-p,p,t),C=-(R=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)v(r[0],-p,-1,t),v(r[1],1,p,t),P=r[0],N=r[1] else{if(v(r,-p,p,t),!r)throw Error(c+t+" cannot be zero: "+r) P=-(N=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(c+t+" not true or false: "+r) if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw D=!r,Error(c+"crypto unavailable") D=r}else D=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(v(r=e[t],0,9,t),B=r),e.hasOwnProperty(t="POW_PRECISION")&&(v(r=e[t],0,p,t),L=r),e.hasOwnProperty(t="FORMAT")){if("object"!=i(r=e[t]))throw Error(c+t+" not an object: "+r) j=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.$|[+-.\s]|(.).*\1/.test(r))throw Error(c+t+" invalid: "+r) U=r}}return{DECIMAL_PLACES:I,ROUNDING_MODE:O,EXPONENTIAL_AT:[C,R],RANGE:[P,N],CRYPTO:D,MODULO_MODE:B,POW_PRECISION:L,FORMAT:j,ALPHABET:U}},F.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1 if(!F.DEBUG)return!0 var t,r,n=e.c,i=e.e,o=e.s e:if("[object Array]"=={}.toString.call(n)){if((1===o||-1===o)&&i>=-p&&i<=p&&i===l(i)){if(0===n[0]){if(0===i&&1===n.length)return!0 break e}if((t=(i+1)%14)<1&&(t+=14),String(n[0]).length==t){for(t=0;t=h||r!==l(r))break e if(0!==r)return!0}}}else if(null===n&&null===i&&(null===o||1===o||-1===o))return!0 throw Error(c+"Invalid BigNumber: "+e)},F.maximum=F.max=function(){return H(arguments,A.lt)},F.minimum=F.min=function(){return H(arguments,A.gt)},F.random=(a=9007199254740992*Math.random()&2097151?function(){return l(9007199254740992*Math.random())}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,o,s=0,f=[],h=new F(T) if(null==e?e=I:v(e,0,p),i=u(e/14),D)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(f.push(o%1e14),s+=2) s=i/2}else{if(!crypto.randomBytes)throw D=!1,Error(c+"crypto unavailable") for(t=crypto.randomBytes(i*=7);s=9e15?crypto.randomBytes(7).copy(t,s):(f.push(o%1e14),s+=7) s=i/7}if(!D)for(;s=10;o/=10,s++);s<14&&(n-=14-s)}return h.e=n,h.c=f,h}),F.sum=function(){for(var e=1,t=arguments,r=new F(t[0]);er-1&&(null==a[i+1]&&(a[i+1]=0),a[i+1]+=a[i]/r|0,a[i]%=r)}return a.reverse()}return function(t,n,i,o,a){var s,u,l,c,f,h,d,p,m=t.indexOf("."),g=I,v=O for(m>=0&&(c=L,L=0,t=t.replace(".",""),h=(p=new F(n)).pow(t.length-m),L=c,p.c=e(_(y(h.c),h.e,"0"),10,i,"0123456789"),p.e=p.c.length),l=c=(d=e(t,n,i,a?(s=U,"0123456789"):(s="0123456789",U))).length;0==d[--c];d.pop());if(!d[0])return s.charAt(0) if(m<0?--l:(h.c=d,h.e=l,h.s=o,d=(h=r(h,p,g,v,i)).c,f=h.r,l=h.e),m=d[u=l+g+1],c=i/2,f=f||u<0||null!=d[u+1],f=v<4?(null!=m||f)&&(0==v||v==(h.s<0?3:2)):m>c||m==c&&(4==v||f||6==v&&1&d[u-1]||v==(h.s<0?8:7)),u<1||!d[0])t=f?_(s.charAt(1),-g,s.charAt(0)):s.charAt(0) else{if(d.length=u,f)for(--i;++d[--u]>i;)d[u]=0,u||(++l,d=[1].concat(d)) for(c=d.length;!d[--c];);for(m=0,t="";m<=c;t+=s.charAt(d[m++]));t=_(t,l,s.charAt(0))}return t}}(),r=function(){function e(e,t,r){var n,i,o,a,s=0,u=e.length,l=t%1e7,c=t/1e7|0 for(e=e.slice();u--;)s=((i=l*(o=e[u]%1e7)+(n=c*o+(a=e[u]/1e7|0)*l)%1e7*1e7+s)/r|0)+(n/1e7|0)+c*a,e[u]=i%r return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,o if(r!=n)o=r>n?1:-1 else for(i=o=0;it[i]?1:-1 break}return o}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,o,a,s){var u,c,f,d,p,y,g,v,b,w,_,S,E,k,M,x,A,T=n.s==i.s?1:-1,I=n.c,O=i.c if(!(I&&I[0]&&O&&O[0]))return new F(n.s&&i.s&&(I?!O||I[0]!=O[0]:O)?I&&0==I[0]||!O?0*T:T/0:NaN) for(b=(v=new F(T)).c=[],T=o+(c=n.e-i.e)+1,s||(s=h,c=m(n.e/14)-m(i.e/14),T=T/14|0),f=0;O[f]==(I[f]||0);f++);if(O[f]>(I[f]||0)&&c--,T<0)b.push(1),d=!0 else{for(k=I.length,x=O.length,f=0,T+=2,(p=l(s/(O[0]+1)))>1&&(O=e(O,p,s),I=e(I,p,s),x=O.length,k=I.length),E=x,_=(w=I.slice(0,x)).length;_=s/2&&M++ do{if(p=0,(u=t(O,w,x,_))<0){if(S=w[0],x!=_&&(S=S*s+(w[1]||0)),(p=l(S/M))>1)for(p>=s&&(p=s-1),g=(y=e(O,p,s)).length,_=w.length;1==t(y,w,g,_);)p--,r(y,x=10;T/=10,f++);K(v,o+(v.e=f+14*c-1)+1,a,d)}else v.e=c,v.r=+d return v}}(),S=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,k=/^\.([^.]+)$/,M=/^-?(Infinity|NaN)$/,x=/^\s*\+(?=[\w.])|^\s+|\s+$/g,o=function(e,t,r,n){var i,o=r?t:t.replace(x,"") if(M.test(o))e.s=isNaN(o)?null:o<0?-1:1 else{if(!r&&(o=o.replace(S,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,o=o.replace(E,"$1").replace(k,"0.$1")),t!=o))return new F(o,i) if(F.DEBUG)throw Error(c+"Not a"+(n?" base "+n:"")+" number: "+t) e.s=null}e.c=e.e=null},A.absoluteValue=A.abs=function(){var e=new F(this) return e.s<0&&(e.s=1),e},A.comparedTo=function(e,t){return g(this,new F(e,t))},A.decimalPlaces=A.dp=function(e,t){var r,n,i,o=this if(null!=e)return v(e,0,p),null==t?t=O:v(t,0,8),K(new F(o),e+o.e+1,t) if(!(r=o.c))return null if(n=14*((i=r.length-1)-m(this.e/14)),i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},A.dividedBy=A.div=function(e,t){return r(this,new F(e,t),I,O)},A.dividedToIntegerBy=A.idiv=function(e,t){return r(this,new F(e,t),0,1)},A.exponentiatedBy=A.pow=function(e,t){var r,n,i,o,a,s,f,h,d=this if((e=new F(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+q(e)) if(null!=t&&(t=new F(t)),a=e.e>14,!d.c||!d.c[0]||1==d.c[0]&&!d.e&&1==d.c.length||!e.c||!e.c[0])return h=new F(Math.pow(+q(d),a?2-b(e):+q(e))),t?h.mod(t):h if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new F(NaN);(n=!s&&d.isInteger()&&t.isInteger())&&(d=d.mod(t))}else{if(e.e>9&&(d.e>0||d.e<-1||(0==d.e?d.c[0]>1||a&&d.c[1]>=24e7:d.c[0]<8e13||a&&d.c[0]<=9999975e7)))return o=d.s<0&&b(e)?-0:0,d.e>-1&&(o=1/o),new F(s?1/o:o) L&&(o=u(L/14+2))}for(a?(r=new F(.5),s&&(e.s=1),f=b(e)):f=(i=Math.abs(+q(e)))%2,h=new F(T);;){if(f){if(!(h=h.times(d)).c)break o?h.c.length>o&&(h.c.length=o):n&&(h=h.mod(t))}if(i){if(0===(i=l(i/2)))break f=i%2}else if(K(e=e.times(r),e.e+1,1),e.e>14)f=b(e) else{if(0==(i=+q(e)))break f=i%2}d=d.times(d),o?d.c&&d.c.length>o&&(d.c.length=o):n&&(d=d.mod(t))}return n?h:(s&&(h=T.div(h)),t?h.mod(t):o?K(h,L,O,void 0):h)},A.integerValue=function(e){var t=new F(this) return null==e?e=O:v(e,0,8),K(t,t.e+1,e)},A.isEqualTo=A.eq=function(e,t){return 0===g(this,new F(e,t))},A.isFinite=function(){return!!this.c},A.isGreaterThan=A.gt=function(e,t){return g(this,new F(e,t))>0},A.isGreaterThanOrEqualTo=A.gte=function(e,t){return 1===(t=g(this,new F(e,t)))||0===t},A.isInteger=function(){return!!this.c&&m(this.e/14)>this.c.length-2},A.isLessThan=A.lt=function(e,t){return g(this,new F(e,t))<0},A.isLessThanOrEqualTo=A.lte=function(e,t){return-1===(t=g(this,new F(e,t)))||0===t},A.isNaN=function(){return!this.s},A.isNegative=function(){return this.s<0},A.isPositive=function(){return this.s>0},A.isZero=function(){return!!this.c&&0==this.c[0]},A.minus=function(e,t){var r,n,i,o,a=this,s=a.s if(t=(e=new F(e,t)).s,!s||!t)return new F(NaN) if(s!=t)return e.s=-t,a.plus(e) var u=a.e/14,l=e.e/14,c=a.c,f=e.c if(!u||!l){if(!c||!f)return c?(e.s=-t,e):new F(f?a:NaN) if(!c[0]||!f[0])return f[0]?(e.s=-t,e):new F(c[0]?a:3==O?-0:0)}if(u=m(u),l=m(l),c=c.slice(),s=u-l){for((o=s<0)?(s=-s,i=c):(l=u,i=f),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(o=(s=c.length)<(t=f.length))?s:t,s=t=0;t0)for(;t--;c[r++]=0);for(t=h-1;n>s;){if(c[--n]=0;){for(r=0,d=w[i]%1e7,p=w[i]/1e7|0,o=i+(a=u);o>i;)r=((l=d*(l=b[--a]%1e7)+(s=p*l+(c=b[a]/1e7|0)*d)%1e7*1e7+y[o]+r)/g|0)+(s/1e7|0)+p*c,y[o--]=l%g y[o]=r}return r?++n:y.splice(0,1),V(e,y,n)},A.negated=function(){var e=new F(this) return e.s=-e.s||null,e},A.plus=function(e,t){var r,n=this,i=n.s if(t=(e=new F(e,t)).s,!i||!t)return new F(NaN) if(i!=t)return e.s=-t,n.minus(e) var o=n.e/14,a=e.e/14,s=n.c,u=e.c if(!o||!a){if(!s||!u)return new F(i/0) if(!s[0]||!u[0])return u[0]?e:new F(s[0]?n:0*i)}if(o=m(o),a=m(a),s=s.slice(),i=o-a){for(i>0?(a=o,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+u[t]+i)/h|0,s[t]=h===s[t]?0:s[t]%h return i&&(s=[i].concat(s),++a),V(e,s,a)},A.precision=A.sd=function(e,t){var r,n,i,o=this if(null!=e&&e!==!!e)return v(e,1,p),null==t?t=O:v(t,0,8),K(new F(o),e,t) if(!(r=o.c))return null if(n=14*(i=r.length-1)+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&o.e+1>n&&(n=o.e+1),n},A.shiftedBy=function(e){return v(e,-9007199254740991,9007199254740991),this.times("1e"+e)},A.squareRoot=A.sqrt=function(){var e,t,n,i,o,a=this,s=a.c,u=a.s,l=a.e,c=I+4,f=new F("0.5") if(1!==u||!s||!s[0])return new F(!u||u<0&&(!s||s[0])?NaN:s?a:1/0) if(0==(u=Math.sqrt(+q(a)))||u==1/0?(((t=y(s)).length+l)%2==0&&(t+="0"),u=Math.sqrt(+t),l=m((l+1)/2)-(l<0||l%2),n=new F(t=u==1/0?"1e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new F(u+""),n.c[0])for((u=(l=n.e)+c)<3&&(u=0);;)if(o=n,n=f.times(o.plus(r(a,o,c,1))),y(o.c).slice(0,u)===(t=y(n.c)).slice(0,u)){if(n.e0&&y>0){for(a=y%u||u,h=m.substr(0,a);a0&&(h+=f+m.slice(a)),p&&(h="-"+h)}n=d?h+(r.decimalSeparator||"")+((l=+r.fractionGroupSize)?d.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):d):h}return(r.prefix||"")+n+(r.suffix||"")},A.toFraction=function(e){var t,n,i,o,a,s,u,l,f,h,p,m,g=this,v=g.c if(null!=e&&(!(u=new F(e)).isInteger()&&(u.c||1!==u.s)||u.lt(T)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+q(u)) if(!v)return new F(g) for(t=new F(T),f=n=new F(T),i=l=new F(T),m=y(v),a=t.e=m.length-g.e-1,t.c[0]=d[(s=a%14)<0?14+s:s],e=!e||u.comparedTo(t)>0?a>0?t:f:u,s=N,N=1/0,u=new F(m),l.c[0]=0;h=r(u,t,0,1),1!=(o=n.plus(h.times(i))).comparedTo(e);)n=i,i=o,f=l.plus(h.times(o=f)),l=o,t=u.minus(h.times(o=t)),u=o return o=r(e.minus(n),i,0,1),l=l.plus(o.times(f)),n=n.plus(o.times(i)),l.s=f.s=g.s,p=r(f,i,a*=2,O).minus(g).abs().comparedTo(r(l,n,a,O).minus(g).abs())<1?[f,i]:[l,n],N=s,p},A.toNumber=function(){return+q(this)},A.toPrecision=function(e,t){return null!=e&&v(e,1,p),z(this,e,t,2)},A.toString=function(e){var t,r=this,i=r.s,o=r.e return null===o?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=o<=C||o>=R?w(y(r.c),o):_(y(r.c),o,"0"):10===e?t=_(y((r=K(new F(r),I+o+1,O)).c),r.e,"0"):(v(e,2,U.length,"Base"),t=n(_(y(r.c),o,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},A.valueOf=A.toJSON=function(){return q(this)},A._isBigNumber=!0,null!=t&&F.set(t),F}()).default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict" var n=r(76).BigNumber t.MT={POS_INT:0,NEG_INT:1,BYTE_STRING:2,UTF8_STRING:3,ARRAY:4,MAP:5,TAG:6,SIMPLE_FLOAT:7},t.TAG={DATE_STRING:0,DATE_EPOCH:1,POS_BIGINT:2,NEG_BIGINT:3,DECIMAL_FRAC:4,BIGFLOAT:5,BASE64URL_EXPECTED:21,BASE64_EXPECTED:22,BASE16_EXPECTED:23,CBOR:24,URI:32,BASE64URL:33,BASE64:34,REGEXP:35,MIME:36},t.NUMBYTES={ZERO:0,ONE:24,TWO:25,FOUR:26,EIGHT:27,INDEFINITE:31},t.SIMPLE={FALSE:20,TRUE:21,NULL:22,UNDEFINED:23},t.SYMS={NULL:Symbol("null"),UNDEFINED:Symbol("undef"),PARENT:Symbol("parent"),BREAK:Symbol("break"),STREAM:Symbol("stream")},t.SHIFT32=Math.pow(2,32),t.SHIFT16=Math.pow(2,16),t.MAX_SAFE_HIGH=2097151,t.NEG_ONE=new n(-1),t.TEN=new n(10),t.TWO=new n(2),t.PARENT={ARRAY:0,OBJECT:1,MAP:2,TAG:3,BYTE_STRING:4,UTF8_STRING:5}},,function(e,t){e.exports=function(e){console.warn(e)}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{} return this.count.then((function(r){var n=c(r,t).map((function(t){return e.getById(t)})) return Promise.all(n)}))}}])&&o(r.prototype,n),t}(l) e.exports=f},function(e,t,r){"use strict" function n(e){if("number"==typeof e){if(n.codes[e])return n.codes[e] throw new Error("no protocol with code: "+e)}if("string"==typeof e||e instanceof String){if(n.names[e])return n.names[e] throw new Error("no protocol with name: "+e)}throw new Error("invalid protocol id type: "+e)}var i=-1 function o(e,t,r,n,i){return{code:e,size:t,name:r,resolvable:Boolean(n),path:Boolean(i)}}n.lengthPrefixedVarSize=i,n.V=i,n.table=[[4,32,"ip4"],[6,16,"tcp"],[33,16,"dccp"],[41,128,"ip6"],[42,i,"ip6zone"],[53,i,"dns","resolvable"],[54,i,"dns4","resolvable"],[55,i,"dns6","resolvable"],[56,i,"dnsaddr","resolvable"],[132,16,"sctp"],[273,16,"udp"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[277,0,"p2p-stardust"],[290,0,"p2p-circuit"],[301,0,"udt"],[302,0,"utp"],[400,i,"unix",!1,"path"],[421,i,"p2p"],[421,i,"ipfs"],[443,0,"https"],[444,96,"onion"],[445,296,"onion3"],[446,i,"garlic64"],[460,0,"quic"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[480,0,"http"]],n.names={},n.codes={},n.table.map((function(e){var t=o.apply(null,e) n.codes[t.code]=t,n.names[t.name]=t})),n.object=o,e.exports=n},function(e,t,r){"use strict" t.defined=function(e){return null!=e&&("number"!=typeof e||!isNaN(e))}},function(e,t,r){"use strict" e.exports="enum KeyType {\n RSA = 0;\n Ed25519 = 1;\n Secp256k1 = 2;\n}\nmessage PublicKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}\nmessage PrivateKey {\n required KeyType Type = 1;\n required bytes Data = 2;\n}"},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(8) r(9),r(85) var o=e.exports=i.asn1=i.asn1||{} function a(e,t,r){if(r>t){var n=new Error("Too few bytes to parse DER.") throw n.available=e.length(),n.remaining=t,n.requested=r,n}}o.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192},o.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30},o.create=function(e,t,r,n,a){if(i.util.isArray(n)){for(var s=[],u=0;ur){if(i.strict){var p=new Error("Too few bytes to read ASN.1 value.") throw p.available=t.length(),p.remaining=r,p.requested=d,p}d=r}var m=32==(32&u) if(m)if(f=[],void 0===d)for(;;){if(a(t,r,2),t.bytes(2)===String.fromCharCode(0,0)){t.getBytes(2),r-=2 break}s=t.length(),f.push(e(t,r,n+1,i)),r-=s-t.length()}else for(;d>0;)s=t.length(),f.push(e(t,d,n+1,i)),r-=s-t.length(),d-=s-t.length() if(void 0===f&&l===o.Class.UNIVERSAL&&c===o.Type.BITSTRING&&(h=t.bytes(d)),void 0===f&&i.decodeBitStrings&&l===o.Class.UNIVERSAL&&c===o.Type.BITSTRING&&d>1){var y=t.read,g=r,v=0 if(c===o.Type.BITSTRING&&(a(t,r,1),v=t.getByte(),r--),0===v)try{s=t.length() var b=e(t,r,n+1,{verbose:i.verbose,strict:!0,decodeBitStrings:!0}),w=s-t.length() r-=w,c==o.Type.BITSTRING&&w++ var _=b.tagClass w!==d||_!==o.Class.UNIVERSAL&&_!==o.Class.CONTEXT_SPECIFIC||(f=[b])}catch(e){}void 0===f&&(t.read=y,r=g)}if(void 0===f){if(void 0===d){if(i.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.") d=r}if(c===o.Type.BMPSTRING)for(f="";d>0;d-=2)a(t,r,2),f+=String.fromCharCode(t.getInt16()),r-=2 else f=t.getBytes(d)}var S=void 0===h?null:{bitStringContents:h} return o.create(l,c,m,f,S)}(e,e.length(),0,t)},o.toDer=function(e){var t=i.util.createBuffer(),r=e.tagClass|e.type,n=i.util.createBuffer(),a=!1 if("bitStringContents"in e&&(a=!0,e.original&&(a=o.equals(e,e.original))),a)n.putBytes(e.bitStringContents) else if(e.composed){e.constructed?r|=32:n.putByte(0) for(var s=0;s1&&(0===e.value.charCodeAt(0)&&0==(128&e.value.charCodeAt(1))||255===e.value.charCodeAt(0)&&128==(128&e.value.charCodeAt(1)))?n.putBytes(e.value.substr(1)):n.putBytes(e.value) if(t.putByte(r),n.length()<=127)t.putByte(127&n.length()) else{var u=n.length(),l="" do{l+=String.fromCharCode(255&u),u>>>=8}while(u>0) for(t.putByte(128|l.length),s=l.length-1;s>=0;--s)t.putByte(l.charCodeAt(s))}return t.putBuffer(n),t},o.oidToDer=function(e){var t,r,n,o,a=e.split("."),s=i.util.createBuffer() s.putByte(40*parseInt(a[0],10)+parseInt(a[1],10)) for(var u=2;u>>=7,t||(o|=128),r.push(o),t=!1}while(n>0) for(var l=r.length-1;l>=0;--l)s.putByte(r[l])}return s},o.derToOid=function(e){var t "string"==typeof e&&(e=i.util.createBuffer(e)) var r=e.getByte() t=Math.floor(r/40)+"."+r%40 for(var n=0;e.length()>0;)n<<=7,128&(r=e.getByte())?n+=127&r:(t+="."+(n+r),n=0) return t},o.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10) r=r>=50?1900+r:2e3+r var n=parseInt(e.substr(2,2),10)-1,i=parseInt(e.substr(4,2),10),o=parseInt(e.substr(6,2),10),a=parseInt(e.substr(8,2),10),s=0 if(e.length>11){var u=e.charAt(10),l=10 "+"!==u&&"-"!==u&&(s=parseInt(e.substr(10,2),10),l+=2)}if(t.setUTCFullYear(r,n,i),t.setUTCHours(o,a,s,0),l&&("+"===(u=e.charAt(l))||"-"===u)){var c=60*parseInt(e.substr(l+1,2),10)+parseInt(e.substr(l+4,2),10) c*=6e4,"+"===u?t.setTime(+t-c):t.setTime(+t+c)}return t},o.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),n=parseInt(e.substr(4,2),10)-1,i=parseInt(e.substr(6,2),10),o=parseInt(e.substr(8,2),10),a=parseInt(e.substr(10,2),10),s=parseInt(e.substr(12,2),10),u=0,l=0,c=!1 "Z"===e.charAt(e.length-1)&&(c=!0) var f=e.length-5,h=e.charAt(f) return"+"!==h&&"-"!==h||(l=60*parseInt(e.substr(f+1,2),10)+parseInt(e.substr(f+4,2),10),l*=6e4,"+"===h&&(l*=-1),c=!0),"."===e.charAt(14)&&(u=1e3*parseFloat(e.substr(14),10)),c?(t.setUTCFullYear(r,n,i),t.setUTCHours(o,a,s,u),t.setTime(+t+l)):(t.setFullYear(r,n,i),t.setHours(o,a,s,u)),t},o.dateToUtcTime=function(e){if("string"==typeof e)return e var t="",r=[] r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds()) for(var n=0;n=-128&&e<128)return t.putSignedInt(e,8) if(e>=-32768&&e<32768)return t.putSignedInt(e,16) if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24) if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32) var r=new Error("Integer too large; max is 32-bits.") throw r.integer=e,r},o.derToInteger=function(e){"string"==typeof e&&(e=i.util.createBuffer(e)) var t=8*e.length() if(t>32)throw new Error("Integer too large; max is 32-bits.") return e.getSignedInt(t)},o.validate=function(e,t,r,n){var a=!1 if(e.tagClass!==t.tagClass&&void 0!==t.tagClass||e.type!==t.type&&void 0!==t.type)n&&(e.tagClass!==t.tagClass&&n.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&n.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"')) else if(e.constructed===t.constructed||void 0===t.constructed){if(a=!0,t.value&&i.util.isArray(t.value))for(var s=0,u=0;a&&u0&&(n+="\n") for(var a="",u=0;u1?n+="0x"+i.util.bytesToHex(e.value.slice(1)):n+="(none)",e.value.length>0){var h=e.value.charCodeAt(0) 1==h?n+=" (1 unused bit shown)":h>1&&(n+=" ("+h+" unused bits shown)")}}else e.type===o.Type.OCTETSTRING?(s.test(e.value)||(n+="("+e.value+") "),n+="0x"+i.util.bytesToHex(e.value)):e.type===o.Type.UTF8?n+=i.util.decodeUtf8(e.value):e.type===o.Type.PRINTABLESTRING||e.type===o.Type.IA5String?n+=e.value:s.test(e.value)?n+="0x"+i.util.bytesToHex(e.value):0===e.value.length?n+="[null]":n+=e.value}return n}},function(e,t,r){var n=r(8) n.pki=n.pki||{} var i=e.exports=n.pki.oids=n.oids=n.oids||{} function o(e,t){i[e]=t,i[t]=e}function a(e,t){i[e]=t}o("1.2.840.113549.1.1.1","rsaEncryption"),o("1.2.840.113549.1.1.4","md5WithRSAEncryption"),o("1.2.840.113549.1.1.5","sha1WithRSAEncryption"),o("1.2.840.113549.1.1.7","RSAES-OAEP"),o("1.2.840.113549.1.1.8","mgf1"),o("1.2.840.113549.1.1.9","pSpecified"),o("1.2.840.113549.1.1.10","RSASSA-PSS"),o("1.2.840.113549.1.1.11","sha256WithRSAEncryption"),o("1.2.840.113549.1.1.12","sha384WithRSAEncryption"),o("1.2.840.113549.1.1.13","sha512WithRSAEncryption"),o("1.2.840.10040.4.3","dsa-with-sha1"),o("1.3.14.3.2.7","desCBC"),o("1.3.14.3.2.26","sha1"),o("2.16.840.1.101.3.4.2.1","sha256"),o("2.16.840.1.101.3.4.2.2","sha384"),o("2.16.840.1.101.3.4.2.3","sha512"),o("1.2.840.113549.2.5","md5"),o("1.2.840.113549.1.7.1","data"),o("1.2.840.113549.1.7.2","signedData"),o("1.2.840.113549.1.7.3","envelopedData"),o("1.2.840.113549.1.7.4","signedAndEnvelopedData"),o("1.2.840.113549.1.7.5","digestedData"),o("1.2.840.113549.1.7.6","encryptedData"),o("1.2.840.113549.1.9.1","emailAddress"),o("1.2.840.113549.1.9.2","unstructuredName"),o("1.2.840.113549.1.9.3","contentType"),o("1.2.840.113549.1.9.4","messageDigest"),o("1.2.840.113549.1.9.5","signingTime"),o("1.2.840.113549.1.9.6","counterSignature"),o("1.2.840.113549.1.9.7","challengePassword"),o("1.2.840.113549.1.9.8","unstructuredAddress"),o("1.2.840.113549.1.9.14","extensionRequest"),o("1.2.840.113549.1.9.20","friendlyName"),o("1.2.840.113549.1.9.21","localKeyId"),o("1.2.840.113549.1.9.22.1","x509Certificate"),o("1.2.840.113549.1.12.10.1.1","keyBag"),o("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag"),o("1.2.840.113549.1.12.10.1.3","certBag"),o("1.2.840.113549.1.12.10.1.4","crlBag"),o("1.2.840.113549.1.12.10.1.5","secretBag"),o("1.2.840.113549.1.12.10.1.6","safeContentsBag"),o("1.2.840.113549.1.5.13","pkcs5PBES2"),o("1.2.840.113549.1.5.12","pkcs5PBKDF2"),o("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4"),o("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4"),o("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC"),o("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC"),o("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC"),o("1.2.840.113549.2.7","hmacWithSHA1"),o("1.2.840.113549.2.8","hmacWithSHA224"),o("1.2.840.113549.2.9","hmacWithSHA256"),o("1.2.840.113549.2.10","hmacWithSHA384"),o("1.2.840.113549.2.11","hmacWithSHA512"),o("1.2.840.113549.3.7","des-EDE3-CBC"),o("2.16.840.1.101.3.4.1.2","aes128-CBC"),o("2.16.840.1.101.3.4.1.22","aes192-CBC"),o("2.16.840.1.101.3.4.1.42","aes256-CBC"),o("2.5.4.3","commonName"),o("2.5.4.5","serialName"),o("2.5.4.6","countryName"),o("2.5.4.7","localityName"),o("2.5.4.8","stateOrProvinceName"),o("2.5.4.10","organizationName"),o("2.5.4.11","organizationalUnitName"),o("2.16.840.1.113730.1.1","nsCertType"),a("2.5.29.1","authorityKeyIdentifier"),a("2.5.29.2","keyAttributes"),a("2.5.29.3","certificatePolicies"),a("2.5.29.4","keyUsageRestriction"),a("2.5.29.5","policyMapping"),a("2.5.29.6","subtreesConstraint"),a("2.5.29.7","subjectAltName"),a("2.5.29.8","issuerAltName"),a("2.5.29.9","subjectDirectoryAttributes"),a("2.5.29.10","basicConstraints"),a("2.5.29.11","nameConstraints"),a("2.5.29.12","policyConstraints"),a("2.5.29.13","basicConstraints"),o("2.5.29.14","subjectKeyIdentifier"),o("2.5.29.15","keyUsage"),a("2.5.29.16","privateKeyUsagePeriod"),o("2.5.29.17","subjectAltName"),o("2.5.29.18","issuerAltName"),o("2.5.29.19","basicConstraints"),a("2.5.29.20","cRLNumber"),a("2.5.29.21","cRLReason"),a("2.5.29.22","expirationDate"),a("2.5.29.23","instructionCode"),a("2.5.29.24","invalidityDate"),a("2.5.29.25","cRLDistributionPoints"),a("2.5.29.26","issuingDistributionPoint"),a("2.5.29.27","deltaCRLIndicator"),a("2.5.29.28","issuingDistributionPoint"),a("2.5.29.29","certificateIssuer"),a("2.5.29.30","nameConstraints"),o("2.5.29.31","cRLDistributionPoints"),o("2.5.29.32","certificatePolicies"),a("2.5.29.33","policyMappings"),a("2.5.29.34","policyConstraints"),o("2.5.29.35","authorityKeyIdentifier"),a("2.5.29.36","policyConstraints"),o("2.5.29.37","extKeyUsage"),a("2.5.29.46","freshestCRL"),a("2.5.29.54","inhibitAnyPolicy"),o("1.3.6.1.4.1.11129.2.4.2","timestampList"),o("1.3.6.1.5.5.7.1.1","authorityInfoAccess"),o("1.3.6.1.5.5.7.3.1","serverAuth"),o("1.3.6.1.5.5.7.3.2","clientAuth"),o("1.3.6.1.5.5.7.3.3","codeSigning"),o("1.3.6.1.5.5.7.3.4","emailProtection"),o("1.3.6.1.5.5.7.3.8","timeStamping")},function(e,t,r){"use strict";(function(e,n){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.hasNextTick=t.hasSetImmediate=void 0,t.fallback=c,t.wrap=f var o,a,s=(o=r(64))&&o.__esModule?o:{default:o},u=t.hasSetImmediate="function"==typeof e&&e,l=t.hasNextTick="object"===(void 0===n?"undefined":i(n))&&"function"==typeof n.nextTick function c(e){setTimeout(e,0)}function f(e){return function(t){var r=(0,s.default)(arguments,1) e((function(){t.apply(null,r)}))}}a=u?e:l?n.nextTick:c,t.default=f(a)}).call(this,r(25).setImmediate,r(3))},function(e,t,r){"use strict" e.exports=function(e,t){return e.then((function(e){t(null,e)}),(function(e){t(e)}))}},function(e,t,r){"use strict" e.exports=self.crypto||self.msCrypto},function(e,t,r){"use strict" var n=t n.bignum=r(65),n.define=r(331).define,n.base=r(335),n.constants=r(336),n.decoders=r(149),n.encoders=r(147)},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(91).Reporter,o=r(49).EncoderBuffer,a=r(49).DecoderBuffer,s=r(332),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"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u) function c(e,t,r){var n={} this._baseState=n,n.name=r,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}e.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 e=this._baseState,t={} f.forEach((function(r){t[r]=e[r]})) var r=new this.constructor(t.parent) return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState l.forEach((function(t){this[t]=function(){var r=new this.constructor(this) return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this) e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==n(e)||e.constructor!==Object)return e var t={} return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0) var n=e[r] t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState throw new Error(e+" not implemented for encoding: "+t.enc)}})),u.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments) return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){s(e) var t=this._baseState return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments) return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t)) var n,i=r.default,o=!0,s=null if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var u=null if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(o=this._peekTag(e,u,r.any),e.isError(o))return o}else{var l=e.save() try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(l)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){var c=this._decodeTag(e,r.explicit) if(e.isError(c))return c e=c}var f=e.offset if(null===r.use&&null===r.choice){var h r.any&&(h=e.save()) var d=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any) if(e.isError(d))return d r.any?i=e.raw(h):e=d}if(t&&t.track&&null!==r.tag&&t.track(e.path(),f,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new a(i) i=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){var n=this._baseState return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var r=this._baseState return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1 return Object.keys(r.choice).some((function(o){var a=e.save(),s=r.choice[o] try{var u=s._decode(e,t) if(e.isError(u))return!1 n={type:o,value:u},i=!0}catch(t){return e.restore(a),!1}return!0}),this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},c.prototype._encode=function(e,t,r){var n=this._baseState if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r) if(void 0!==i&&!this._skipDefault(i,t,r))return i}},c.prototype._encodeValue=function(e,t,r){var o=this._baseState if(null===o.parent)return o.children[0]._encode(e,t||new i) var a=null if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return e=o.default}var s=null,u=!1 if(o.any)a=this._createEncoderBuffer(e) else if(o.choice)a=this._encodeChoice(e,t) else if(o.contains)s=this._getUse(o.contains,r)._encode(e,t),u=!0 else if(o.children)s=o.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e) if(null===r._baseState.key)return t.error("Child should have a key") var i=t.enterKey(r._baseState.key) if("object"!==n(e))return t.error("Child expected, but input is not object") var o=r._encode(e[r._baseState.key],t,e) return t.leaveKey(i),o}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s) else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag) if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array") var l=this.clone() l._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){var n=this._baseState return this._getUse(n.args[0],e)._encode(r,t)}),l))}else null!==o.use?a=this._getUse(o.use,r)._encode(e,t):(s=this._encodePrimitive(o.tag,e),u=!0) if(!o.any&&null===o.choice){var c=null!==o.implicit?o.implicit:o.tag,f=null===o.implicit?"universal":"context" null===c?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(a=this._encodeComposite(c,u,f,s))}return null!==o.explicit&&(a=this._encodeComposite(o.explicit,!1,"context",a)),a},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type] return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var r=this._baseState if(/str$/.test(e))return this._encodeStr(t,e) if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]) if("objid"===e)return this._encodeObjid(t,null,null) if("gentime"===e||"utctime"===e)return this._encodeTime(t,e) if("null_"===e)return this._encodeNull() if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]) if("bool"===e)return this._encodeBool(t) if("objDesc"===e)return this._encodeStr(t,e) throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,r){"use strict" var n=r(2) function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" 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(e,t,r){"use strict" function n(e){var t={} return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0) var n=e[r] t[n]=r})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n(t.tagClass),t.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"},t.tagByName=n(t.tag)},function(e,t,r){(t=e.exports=r(158)).Stream=t,t.Readable=t,t.Writable=r(94),t.Duplex=r(26),t.Transform=r(161),t.PassThrough=r(359)},function(e,t,r){"use strict";(function(t,n,i){var o=r(66) function a(e){var t=this this.next=null,this.entry=null,this.finish=function(){!function(e,t,r){var n=e.entry for(e.entry=null;n;){var i=n.callback t.pendingcb--,i(void 0),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=v var s,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?n:o.nextTick v.WritableState=g var l=r(50) l.inherits=r(2) var c,f={deprecate:r(27)},h=r(159),d=r(7).Buffer,p=i.Uint8Array||function(){},m=r(160) function y(){}function g(e,t){s=s||r(26),e=e||{} var n=t instanceof s this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode) var i=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384 this.highWaterMark=i||0===i?i:n&&(l||0===l)?l:c,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 f=!1===e.decodeStrings this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(o.nextTick(i,n),o.nextTick(k,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(i(n),e._writableState.errorEmitted=!0,e.emit("error",n),k(e,t))}(e,r,n,t,i) else{var a=S(r) a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(e,r),n?u(w,e,r,a,i):w(e,r,a,i)}}(t,e)},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(e){if(s=s||r(26),!(c.call(v,this)||this instanceof s))return new v(e) this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),h.call(this)}function b(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function w(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),k(e,t)}function _(e,t){t.bufferProcessing=!0 var r=t.bufferedRequest if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree o.entry=r for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1 i.allBuffers=u,b(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,f=r.callback if(b(e,t,!1,t.objectMode?1:l.length,l,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),k(e,t)}))}function k(e,t){var r=S(t) return r&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}l.inherits(v,h),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===v&&e&&e._writableState instanceof g}})):c=function(e){return e instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(e,t,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=e,d.isBuffer(n)||n instanceof p) return s&&!d.isBuffer(e)&&(e=function(e){return d.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=y),i.ended?function(e,t){var r=new Error("write after end") e.emit("error",r),o.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var i=!0,a=!1 return null===r?a=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(e.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,e,r))&&(i.pendingcb++,a=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=d.from(t,r)),t}(t,n,i) n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length t.length+=s var u=t.length-1))throw new TypeError("Unknown encoding: "+e) return this._writableState.defaultEncoding=e,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(e,t,r){var n=this._writableState "function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(e,t,r){t.ending=!0,k(e,t),r&&(t.finished?o.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),v.prototype.destroy=m.destroy,v.prototype._undestroy=m.undestroy,v.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r(3),r(25).setImmediate,r(4))},function(e,t,r){var n=r(7).Buffer,i=r(157).Transform,o=r(10).StringDecoder function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(2)(a,i),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t)) var i=this._update(e) return this.hashMode?this:(r&&(i=this._toString(i,r)),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(e,t,r){var n try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},a.prototype._flush=function(e){var t try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0) return e&&(t=this._toString(t,e,!0)),t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings") var n=this._decoder.write(e) return r&&(n+=this._decoder.end()),n},e.exports=a},function(e,t,r){"use strict" Object.defineProperty(t,"__esModule",{value:!0}) var n,i=(n=r(86))&&n.__esModule?n:{default:n} t.default=i.default,e.exports=t.default},function(e,t,r){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){if(null===e)throw new Error("Callback was already called.") var t=e e=null,t.apply(this,arguments)}},e.exports=t.default},function(e,t,r){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.isAsync=void 0 var n,i=(n=r(377))&&n.__esModule?n:{default:n},o="function"==typeof Symbol function a(e){return o&&"AsyncFunction"===e[Symbol.toStringTag]}t.default=function(e){return a(e)?(0,i.default)(e):e},t.isAsync=a},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){var t=r(e) return null!=e&&("object"==t||"function"==t)}},function(e,t){var r=Array.isArray e.exports=r},function(e,t,r){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t|=0 for(var r=Math.max(e.length-t,0),n=Array(r),i=0;i1;){var t=e.pop(),r=t.obj[t.prop] if(o(r)){for(var n=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?i+=n.charAt(o):s<128?i+=a[s]:s<2048?i+=a[192|s>>6]+a[128|63&s]:s<55296||s>=57344?i+=a[224|s>>12]+a[128|s>>6&63]+a[128|63&s]:(o+=1,s=65536+((1023&s)<<10|1023&n.charCodeAt(o)),i+=a[240|s>>18]+a[128|s>>12&63]+a[128|s>>6&63]+a[128|63&s])}return i},isBuffer:function(e){return!(!e||"object"!==n(e)||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,r,a){if(!r)return t if("object"!==n(r)){if(o(t))t.push(r) else{if(!t||"object"!==n(t))return[t,r];(a&&(a.plainObjects||a.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!==n(t))return[t].concat(r) var u=t return o(t)&&!o(r)&&(u=s(t,a)),o(t)&&o(r)?(r.forEach((function(r,o){if(i.call(t,o)){var s=t[o] s&&"object"===n(s)&&r&&"object"===n(r)?t[o]=e(s,r,a):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,n){var o=r[n] return i.call(t,n)?t[n]=e(t[n],o,a):t[n]=o,t}),u)}}},function(e,t,r){var n=r(216),i=r(495),o=r(131).EOL,a=r(504) function s(e){return(e=e||{}).strict=!1!==e.strict,i((function(t){try{if(t)return JSON.parse(t)}catch(r){e.strict&&this.emit("error",new Error("Could not parse row "+t.slice(0,50)+"..."))}}),e)}e.exports=s,e.exports.serialize=e.exports.stringify=function(e){return n.obj(e,(function(e,t,r){r(null,a(e)+o)}))},e.exports.parse=s},function(e,t,r){"use strict" var n=r(45).codes.ERR_STREAM_PREMATURE_CLOSE function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r) r||(r={}),o=function(e){var t=!1 return function(){if(!t){t=!0 for(var r=arguments.length,n=new Array(r),i=0;i>2,r=(3&e[0])<<8|e[1],t?31===t?n*(r?NaN:1/0):n*Math.pow(2,t-25)*(1024+r):5.960464477539063e-8*n*r},t.arrayBufferToBignumber=function(e){for(var t,r=e.byteLength,i="",o=0;o2097151?new n(s).times(o).plus(u):s*o+u},t.writeHalf=function(t,r){var n=e.allocUnsafe(4) n.writeFloatBE(r,0) var i=n.readUInt32BE(0) if(0!=(8191&i))return!1 var o=i>>16&32768,a=i>>23&255,s=8388607&i if(a>=113&&a<=142)o+=(a-112<<10)+(s>>13) else{if(!(a>=103&&a<113))return!1 if(s&(1<<126-a)-1)return!1 o+=s+8388608>>126-a}return t.writeUInt16BE(o,0),!0},t.keySorter=function(e,t){var r=e[0].byteLength,n=t[0].byteLength return r>n?1:n>r?-1:e[0].compare(t[0])},t.isNegativeZero=function(e){return 0===e&&1/e<0},t.nextPowerOf2=function(e){var t=0 if(e&&!(e&e-1))return e for(;0!==e;)e>>=1,t+=1 return 1<this[a])return _(this,this[p].get(e)),!1 var o=this[p].get(e).value return this[f]&&(this[h]||this[f](e,o.value)),o.now=n,o.maxAge=r,o.value=t,this[s]+=i-o.length,o.length=i,this.get(e),w(this),!0}var l=new S(e,t,i,n,r) return l.length>this[a]?(this[f]&&this[f](e,t),!1):(this[s]+=l.length,this[d].unshift(l),this[p].set(e,this[d].head),w(this),!0)}},{key:"has",value:function(e){if(!this[p].has(e))return!1 var t=this[p].get(e).value return!b(this,t)}},{key:"get",value:function(e){return v(this,e,!0)}},{key:"peek",value:function(e){return v(this,e,!1)}},{key:"pop",value:function(){var e=this[d].tail return e?(_(this,e),e.value):null}},{key:"del",value:function(e){_(this,this[p].get(e))}},{key:"load",value:function(e){this.reset() for(var t=Date.now(),r=e.length-1;r>=0;r--){var n=e[r],i=n.e||0 if(0===i)this.set(n.k,n.v) else{var o=i-t o>0&&this.set(n.k,n.v,o)}}}},{key:"prune",value:function(){var e=this this[p].forEach((function(t,r){return v(e,r,!1)}))}},{key:"max",set:function(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number") this[a]=e||1/0,w(this)},get:function(){return this[a]}},{key:"allowStale",set:function(e){this[l]=!!e},get:function(){return this[l]}},{key:"maxAge",set:function(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number") this[c]=e,w(this)},get:function(){return this[c]}},{key:"lengthCalculator",set:function(e){var t=this "function"!=typeof e&&(e=y),e!==this[u]&&(this[u]=e,this[s]=0,this[d].forEach((function(e){e.length=t[u](e.value,e.key),t[s]+=e.length}))),w(this)},get:function(){return this[u]}},{key:"length",get:function(){return this[s]}},{key:"itemCount",get:function(){return this[d].length}}])&&i(t.prototype,r),e}(),v=function(e,t,r){var n=e[p].get(t) if(n){var i=n.value if(b(e,i)){if(_(e,n),!e[l])return}else r&&(e[m]&&(n.value.now=Date.now()),e[d].unshiftNode(n)) return i.value}},b=function(e,t){if(!t||!t.maxAge&&!e[c])return!1 var r=Date.now()-t.now return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},w=function(e){if(e[s]>e[a])for(var t=e[d].tail;e[s]>e[a]&&null!==t;){var r=t.prev _(e,t),t=r}},_=function(e,t){if(t){var r=t.value e[f]&&e[f](r.key,r.value),e[s]-=r.length,e[p].delete(r.key),e[d].removeNode(t)}},S=function e(t,r,i,o,a){n(this,e),this.key=t,this.value=r,this.length=i,this.now=o,this.maxAge=a||0},E=function(e,t,r,n){var i=r.value b(e,i)&&(_(e,r),e[l]||(i=void 0)),i&&t.call(n,i.value,i.key,e)} e.exports=g},function(e,t,r){"use strict" var n=r(23) e.exports=function(e,t,r){"function"==typeof e.pipe?n(e,(function(e,n){if(e)return r(e) t(n,r)})):t(e,r)}},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r=0&&t<=A} v.each=v.forEach=function(e,t,r){var n,i if(t=w(t,r),I(e))for(n=0,i=e.length;n0?0:a-1 for(i||(n=t[o?o[s]:s],s+=e);s>=0&&s=3 return t(e,w(r,i,4),n,o)}} v.reduce=v.foldl=v.inject=O(1),v.reduceRight=v.foldr=O(-1),v.find=v.detect=function(e,t,r){var n=(I(e)?v.findIndex:v.findKey)(e,t,r) if(void 0!==n&&-1!==n)return e[n]},v.filter=v.select=function(e,t,r){var n=[] return t=_(t,r),v.each(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n},v.reject=function(e,t,r){return v.filter(e,v.negate(_(t)),r)},v.every=v.all=function(e,t,r){t=_(t,r) for(var n=!I(e)&&v.keys(e),i=(n||e).length,o=0;o=0},v.invoke=S((function(e,t,r){var n,i return v.isFunction(t)?i=t:v.isArray(t)&&(n=t.slice(0,-1),t=t[t.length-1]),v.map(e,(function(e){var o=i if(!o){if(n&&n.length&&(e=x(e,n)),null==e)return o=e[t]}return null==o?o:o.apply(e,r)}))})),v.pluck=function(e,t){return v.map(e,v.property(t))},v.where=function(e,t){return v.filter(e,v.matcher(t))},v.findWhere=function(e,t){return v.find(e,v.matcher(t))},v.max=function(e,t,r){var n,o,a=-1/0,s=-1/0 if(null==t||"number"==typeof t&&"object"!=i(e[0])&&null!=e)for(var u=0,l=(e=I(e)?e:v.values(e)).length;ua&&(a=n) else t=_(t,r),v.each(e,(function(e,r,n){((o=t(e,r,n))>s||o===-1/0&&a===-1/0)&&(a=e,s=o)})) return a},v.min=function(e,t,r){var n,o,a=1/0,s=1/0 if(null==t||"number"==typeof t&&"object"!=i(e[0])&&null!=e)for(var u=0,l=(e=I(e)?e:v.values(e)).length;un||void 0===r)return 1 if(r0?0:i-1;o>=0&&o0?a=o>=0?o:Math.max(o+s,a):s=o>=0?Math.min(o+1,s):o+s+1 else if(r&&o&&s)return n[o=r(n,i)]===i?o:-1 if(i!=i)return(o=t(f.call(n,a,s),v.isNaN))>=0?o+a:-1 for(o=e>0?a:s-1;o>=0&&ot?(n&&(clearTimeout(n),n=null),s=l,a=e.apply(i,o),n||(i=o=null)):n||!1===r.trailing||(n=setTimeout(u,c)),a} return l.cancel=function(){clearTimeout(n),s=0,n=i=o=null},l},v.debounce=function(e,t,r){var n,i,o=function(t,r){n=null,r&&(i=e.apply(t,r))},a=S((function(a){if(n&&clearTimeout(n),r){var s=!n n=setTimeout(o,t),s&&(i=e.apply(this,a))}else n=v.delay(o,t,this,a) return i})) return a.cancel=function(){clearTimeout(n),n=null},a},v.wrap=function(e,t){return v.partial(t,e)},v.negate=function(e){return function(){return!e.apply(this,arguments)}},v.compose=function(){var e=arguments,t=e.length-1 return function(){for(var r=t,n=e[t].apply(this,arguments);r--;)n=e[r].call(this,n) return n}},v.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},v.before=function(e,t){var r return function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=null),r}},v.once=v.partial(v.before,2),v.restArguments=S var L=!{toString:null}.propertyIsEnumerable("toString"),j=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],U=function(e,t){var r=j.length,n=e.constructor,i=v.isFunction(n)&&n.prototype||u,o="constructor" for(M(e,o)&&!v.contains(t,o)&&t.push(o);r--;)(o=j[r])in e&&e[o]!==i[o]&&!v.contains(t,o)&&t.push(o)} v.keys=function(e){if(!v.isObject(e))return[] if(m)return m(e) var t=[] for(var r in e)M(e,r)&&t.push(r) return L&&U(e,t),t},v.allKeys=function(e){if(!v.isObject(e))return[] var t=[] for(var r in e)t.push(r) return L&&U(e,t),t},v.values=function(e){for(var t=v.keys(e),r=t.length,n=Array(r),i=0;i1&&(n=w(n,t[1])),t=v.allKeys(e)):(n=V,t=P(t,!1,!1),e=Object(e)) for(var i=0,o=t.length;i1&&(r=t[1])):(t=v.map(P(t,!1,!1),String),n=function(e,r){return!v.contains(t,r)}),v.pick(e,n,r)})),v.defaults=F(v.allKeys,!0),v.create=function(e,t){var r=E(e) return t&&v.extendOwn(r,t),r},v.clone=function(e){return v.isObject(e)?v.isArray(e)?e.slice():v.extend({},e):e},v.tap=function(e,t){return t(e),e},v.isMatch=function(e,t){var r=v.keys(t),n=r.length if(null==e)return!n for(var i=Object(e),o=0;o":">",'"':""","'":"'","`":"`"},G=v.invert(q),W=function(e){var t=function(t){return e[t]},r="(?:"+v.keys(e).join("|")+")",n=RegExp(r),i=RegExp(r,"g") return function(e){return e=null==e?"":""+e,n.test(e)?e.replace(i,t):e}} v.escape=W(q),v.unescape=W(G),v.result=function(e,t,r){v.isArray(t)||(t=[t]) var n=t.length if(!n)return v.isFunction(r)?r.call(e):r for(var i=0;i/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g} var Z=/(.)^/,J={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},$=/\\|'|\r|\n|\u2028|\u2029/g,Q=function(e){return"\\"+J[e]} v.template=function(e,t,r){!t&&r&&(t=r),t=v.defaults({},t,v.templateSettings) var n,i=RegExp([(t.escape||Z).source,(t.interpolate||Z).source,(t.evaluate||Z).source].join("|")+"|$","g"),o=0,a="__p+='" e.replace(i,(function(t,r,n,i,s){return a+=e.slice(o,s).replace($,Q),o=s+t.length,r?a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":n?a+="'+\n((__t=("+n+"))==null?'':__t)+\n'":i&&(a+="';\n"+i+"\n__p+='"),t})),a+="';\n",t.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n" try{n=new Function(t.variable||"obj","_",a)}catch(e){throw e.source=a,e}var s=function(e){return n.call(this,e,v)},u=t.variable||"obj" return s.source="function("+u+"){\n"+a+"}",s},v.chain=function(e){var t=v(e) return t._chain=!0,t} var X=function(e,t){return e._chain?v(t).chain():t} v.mixin=function(e){return v.each(v.functions(e),(function(t){var r=v[t]=e[t] v.prototype[t]=function(){var e=[this._wrapped] return c.apply(e,arguments),X(this,r.apply(v,e))}})),v},v.mixin(v),v.each(["pop","push","reverse","shift","sort","splice","unshift"],(function(e){var t=s[e] v.prototype[e]=function(){var r=this._wrapped return t.apply(r,arguments),"shift"!==e&&"splice"!==e||0!==r.length||delete r[0],X(this,r)}})),v.each(["concat","join","slice"],(function(e){var t=s[e] v.prototype[e]=function(){return X(this,t.apply(this._wrapped,arguments))}})),v.prototype.value=function(){return this._wrapped},v.prototype.valueOf=v.prototype.toJSON=v.prototype.value,v.prototype.toString=function(){return String(this._wrapped)},void 0===(n=function(){return v}.apply(t,[]))||(r.exports=n)}()}).call(this,r(4),r(18)(e))},function(e,t,r){(function(t){r(128),e.exports={contribution:JSON.parse(t("ewogICIkc2NoZW1hIjogImh0dHBzOi8vanNvbi1zY2hlbWEub3JnL2RyYWZ0LTA3L3NjaGVtYSMiLAogICJpZCI6ICJodHRwczovL3NjaGVtYS5rb3Ntb3Mub3JnL0NvbnRyaWJ1dGlvbiIsCiAgInByb3BlcnRpZXMiOiB7CiAgICAiQGNvbnRleHQiOiB7CiAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICJlbnVtIjogWyAiaHR0cHM6Ly9zY2hlbWEua29zbW9zLm9yZyIgXSwKICAgICAgImRlZmF1bHQiOiAiaHR0cHM6Ly9zY2hlbWEua29zbW9zLm9yZyIKICAgIH0sCiAgICAiQHR5cGUiOiB7CiAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICJlbnVtIjogWyAiQ29udHJpYnV0aW9uIiBdLAogICAgICAiZGVmYXVsdCI6ICJDb250cmlidXRpb24iCiAgICB9LAogICAgImNvbnRyaWJ1dG9yIjogewogICAgICAicHJvcGVydGllcyI6IHsKICAgICAgICAiaXBmcyI6IHsKICAgICAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICAgICAiZm9ybWF0IjogInVyaSIsCiAgICAgICAgICAidGl0bGUiOiAiSVBGUyBVUkkiLAogICAgICAgICAgImRlc2NyaXB0aW9uIjogIkFuIElQRlMgb2JqZWN0IFVSSSBjb250YWluaW5nIHByb2ZpbGUgaW5mb3JtYXRpb24gb2YgdGhlIGNvbnRyaWJ1dG9yIgogICAgICAgIH0KICAgICAgfSwKICAgICAgInJlcXVpcmVkIjogWwogICAgICAgICJpcGZzIgogICAgICBdLAogICAgICAidHlwZSI6ICJvYmplY3QiCiAgICB9LAogICAgImRhdGUiOiB7CiAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICJmb3JtYXQiOiAiZGF0ZSIsCiAgICAgICJ0aXRsZSI6ICJEYXRlIiwKICAgICAgImRlc2NyaXB0aW9uIjogIkRhdGUgb2YgY29udHJpYnV0aW9uIChSRkMgMzMzOSBmdWxsLWRhdGUpIgogICAgfSwKICAgICJ0aW1lIjogewogICAgICAidHlwZSI6ICJzdHJpbmciLAogICAgICAiZm9ybWF0IjogInRpbWUiLAogICAgICAidGl0bGUiOiAiVGltZSIsCiAgICAgICJkZXNjcmlwdGlvbiI6ICJUaW1lIG9mIGNvbnRyaWJ1dGlvbiAoUkZDIDMzMzkgZnVsbC10aW1lKSIKICAgIH0sCiAgICAia2luZCI6IHsKICAgICAgInR5cGUiOiAic3RyaW5nIiwKICAgICAgInRpdGxlIjogIktpbmQiLAogICAgICAiZGVzY3JpcHRpb24iOiAiVHlwZS9jYXRlZ29yeSBvZiBjb250cmlidXRpb24iLAogICAgICAiZW51bSI6IFsKICAgICAgICAiZGV2IiwKICAgICAgICAiZGVzaWduIiwKICAgICAgICAib3BzIiwKICAgICAgICAiZG9jcyIsCiAgICAgICAgImNvbW11bml0eSIsCiAgICAgICAgInNwZWNpYWwiCiAgICAgIF0KICAgIH0sCiAgICAiZGVzY3JpcHRpb24iOiB7CiAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICJ0aXRsZSI6ICJEZXNjcmlwdGlvbiIsCiAgICAgICJkZXNjcmlwdGlvbiI6ICJBIHN1bW1hcnkgb2YgdGhlIGNvbnRyaWJ1dGlvbi4gQ2FuIGJlIG1hbnVhbGx5IGVudGVyZWQgb3IgYXV0b21hdGljYWxseSBnZW5lcmF0ZWQuIgogICAgfSwKICAgICJ1cmwiOiB7CiAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICJmb3JtYXQiOiAidXJpIiwKICAgICAgInRpdGxlIjogIlVSTCIsCiAgICAgICJkZXNjcmlwdGlvbiI6ICJBIFVSTCBwb2ludGluZyB0byBodW1hbi1yZWFkYWJsZSBkZXRhaWxzIG9mIHRoZSBjb250cmlidXRpb24iCiAgICB9LAogICAgImRldGFpbHMiOiB7CiAgICAgICJ0eXBlIjogIm9iamVjdCIsCiAgICAgICJwcm9wZXJ0aWVzIjoge30KICAgIH0KICB9LAogICJyZXF1aXJlZCI6IFsKICAgICJjb250cmlidXRvciIsCiAgICAiZGF0ZSIsCiAgICAia2luZCIsCiAgICAiZGVzY3JpcHRpb24iCiAgXSwKICAidHlwZSI6ICJvYmplY3QiCn0K","base64")),contributor:JSON.parse(t("ewogICIkc2NoZW1hIjogImh0dHBzOi8vanNvbi1zY2hlbWEub3JnL2RyYWZ0LTA3L3NjaGVtYSMiLAogICJpZCI6ICJodHRwczovL3NjaGVtYS5rb3Ntb3Mub3JnL0NvbnRyaWJ1dG9yIiwKICAicHJvcGVydGllcyI6IHsKICAgICJAY29udGV4dCI6IHsKICAgICAgInR5cGUiOiAic3RyaW5nIiwKICAgICAgImVudW0iOiBbICJodHRwczovL3NjaGVtYS5rb3Ntb3Mub3JnIiBdLAogICAgICAiZGVmYXVsdCI6ICJodHRwczovL3NjaGVtYS5rb3Ntb3Mub3JnIgogICAgfSwKICAgICJAdHlwZSI6IHsKICAgICAgInR5cGUiOiAic3RyaW5nIiwKICAgICAgImVudW0iOiBbICJDb250cmlidXRvciIgXSwKICAgICAgImRlZmF1bHQiOiAiQ29udHJpYnV0b3IiCiAgICB9LAogICAgImtpbmQiOiB7CiAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICJ0aXRsZSI6ICJLaW5kIiwKICAgICAgImRlc2NyaXB0aW9uIjogIkNhdGVnb3J5IG9mIGNvbnRyaWJ1dG9yIiwKICAgICAgImVudW0iOiBbCiAgICAgICAgInBlcnNvbiIsCiAgICAgICAgIm9yZ2FuaXphdGlvbiIsCiAgICAgICAgInJvYm90IgogICAgICBdCiAgICB9LAogICAgIm5hbWUiOiB7CiAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICJ0aXRsZSI6ICJOYW1lIiwKICAgICAgImRlc2NyaXB0aW9uIjogIkRpc3BsYXkgbmFtZSBvZiB0aGUgcGVyc29uLCBvcmdhbmlzYXRpb24sIHJvYm90LCBvciB3aGF0ZXZlciBlbnRpdHkgbWlnaHQgY29ucmlidXRlIGluIHRoZSBmdXR1cmUiCiAgICB9LAogICAgInVybCI6IHsKICAgICAgInR5cGUiOiAic3RyaW5nIiwKICAgICAgImZvcm1hdCI6ICJ1cmkiLAogICAgICAidGl0bGUiOiAiVVJMIiwKICAgICAgImRlc2NyaXB0aW9uIjogIkEgVVJMIHBvaW50aW5nIHRvIHRoZSBjb250cmlidXRvcidzIHdlYnNpdGUgb3IgcHJvZmlsZSBwYWdlIG9uIHRoZSBXZWIiCiAgICB9LAogICAgImFjY291bnRzIjogewogICAgICAiaXRlbXMiOiB7CiAgICAgICAgInByb3BlcnRpZXMiOiB7CiAgICAgICAgICAic2l0ZSI6IHsKICAgICAgICAgICAgInR5cGUiOiAic3RyaW5nIiwKICAgICAgICAgICAgInRpdGxlIjogIlNpdGUiLAogICAgICAgICAgICAiZGVzY3JpcHRpb24iOiAiU2l0ZSBuYW1lIG9yIGRvbWFpbiwgZS5nLiAnZ2l0aHViLmNvbSciCiAgICAgICAgICB9LAogICAgICAgICAgInVzZXJuYW1lIjogewogICAgICAgICAgICAidHlwZSI6ICJzdHJpbmciLAogICAgICAgICAgICAidGl0bGUiOiAiVXNlcm5hbWUiLAogICAgICAgICAgICAiZGVzY3JpcHRpb24iOiAiUHVibGljbHkgdmlzaWJsZSBuaWNrbmFtZS9oYW5kbGUgb2YgdGhlIHVzZXIiCiAgICAgICAgICB9LAogICAgICAgICAgInVpZCI6IHsKICAgICAgICAgICAgInR5cGUiOiAiaW50ZWdlciIsCiAgICAgICAgICAgICJ0aXRsZSI6ICJVc2VyIElEIiwKICAgICAgICAgICAgImRlc2NyaXB0aW9uIjogIkEgbnVtZXJpYyBhY2NvdW50IElEIgogICAgICAgICAgfSwKICAgICAgICAgICJ1cmwiOiB7CiAgICAgICAgICAgICJ0eXBlIjogInN0cmluZyIsCiAgICAgICAgICAgICJmb3JtYXQiOiAidXJpIiwKICAgICAgICAgICAgInRpdGxlIjogIlVSTCIsCiAgICAgICAgICAgICJkZXNjcmlwdGlvbiI6ICJBIFVSTCBwb2ludGluZyB0byB0aGUgYWNjb3VudCdzIHB1YmxpYyBwcm9maWxlIgogICAgICAgICAgfQogICAgICAgIH0sCiAgICAgICAgInJlcXVpcmVkIjogWwogICAgICAgICAgInNpdGUiLAogICAgICAgICAgInVzZXJuYW1lIgogICAgICAgIF0sCiAgICAgICAgInR5cGUiOiAib2JqZWN0IgogICAgICB9LAogICAgICAidHlwZSI6ICJhcnJheSIKICAgIH0KICB9LAogICJyZXF1aXJlZCI6IFsKICAgICJraW5kIiwKICAgICJuYW1lIgogIF0sCiAgInR5cGUiOiAib2JqZWN0Igp9Cg==","base64"))}}).call(this,r(0).Buffer)},function(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f] for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===o)o=1-l else{if(o===u)return a?NaN:1/0*(d?-1:1) a+=Math.pow(2,n),o-=l}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,l=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0 for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;e[r+d]=255&a,d+=p,a/=256,l-=8);e[r+d-p]|=128*m}},function(e,t){var r={}.toString e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t){},function(e,t,r){var n=r(259).freshApi() n.addFormat({date:function(e){return/^[0-9]{4,}-[0-9]{2}-[0-9]{2}$/.test(e)?null:"A valid ISO 8601 full-date string is expected"},time:function(e){return/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([+|-]([01][0-9]|2[0-3]):[0-5][0-9]))$/.test(e)?null:"A valid ISO 8601 full-time string is expected"}}),e.exports=n},function(e,t,r){function n(e,t){for(var r=0;r=0||!n.gcd(t.n).equals(o.ONE)) for(var a=(e=e.multiply(n.modPow(t.e,t.n)).mod(t.n)).mod(t.p).modPow(t.dP,t.p),s=e.mod(t.q).modPow(t.dQ,t.q);a.compareTo(s)<0;)a=a.add(t.p) var u=a.subtract(s).multiply(t.qInv).mod(t.p).multiply(t.q).add(s) return u.multiply(n.modInverse(t.n)).mod(t.n)} function m(e,t,r){var n=i.util.createBuffer(),o=Math.ceil(t.n.bitLength()/8) if(e.length>o-11){var a=new Error("Message is too long for PKCS#1 v1.5 padding.") throw a.length=e.length,a.max=o-11,a}n.putByte(0),n.putByte(r) var s,u=o-3-e.length if(0===r||1===r){s=0===r?0:255 for(var l=0;l0;){var c=0,f=i.random.getBytes(u) for(l=0;l1;){if(255!==a.getByte()){--a.read break}++l}else if(2===u)for(l=0;a.length()>1;){if(0===a.getByte()){--a.read break}++l}if(0!==a.getByte()||l!==o-3-a.length())throw new Error("Encryption block is invalid.") return a.getBytes()}function g(e,t,r){"function"==typeof t&&(r=t,t={}) var n={algorithm:{name:(t=t||{}).algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}} function a(){u(e.pBits,(function(t,n){return t?r(t):(e.p=n,null!==e.q?l(t,e.q):void u(e.qBits,l))}))}function u(e,t){i.prime.generateProbablePrime(e,n,t)}function l(t,n){if(t)return r(t) if(e.q=n,e.p.compareTo(e.q)<0){var i=e.p e.p=e.q,e.q=i}if(0!==e.p.subtract(o.ONE).gcd(e.e).compareTo(o.ONE))return e.p=null,void a() if(0!==e.q.subtract(o.ONE).gcd(e.e).compareTo(o.ONE))return e.q=null,void u(e.qBits,l) if(e.p1=e.p.subtract(o.ONE),e.q1=e.q.subtract(o.ONE),e.phi=e.p1.multiply(e.q1),0!==e.phi.gcd(e.e).compareTo(o.ONE))return e.p=e.q=null,void a() if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits)return e.q=null,void u(e.qBits,l) var c=e.e.modInverse(e.phi) e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,c,e.p,e.q,c.mod(e.p1),c.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}"prng"in t&&(n.prng=t.prng),a()}function v(e){var t=e.toString(16) t[0]>="8"&&(t="00"+t) var r=i.util.hexToBytes(t) return r.length>1&&(0===r.charCodeAt(0)&&0==(128&r.charCodeAt(1))||255===r.charCodeAt(0)&&128==(128&r.charCodeAt(1)))?r.substr(1):r}function b(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function w(e){return"undefined"!=typeof window&&"object"===n(window.crypto)&&"object"===n(window.crypto.subtle)&&"function"==typeof window.crypto.subtle[e]}function _(e){return"undefined"!=typeof window&&"object"===n(window.msCrypto)&&"object"===n(window.msCrypto.subtle)&&"function"==typeof window.msCrypto.subtle[e]}function S(e){for(var t=i.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),n=0;n0;)c.putByte(0),--f return c.putBytes(i.util.hexToBytes(l)),c.getBytes()},s.rsa.decrypt=function(e,t,r,n){var a=Math.ceil(t.n.bitLength()/8) if(e.length!==a){var s=new Error("Encrypted message length is invalid.") throw s.length=e.length,s.expected=a,s}var u=new o(i.util.createBuffer(e).toHex(),16) if(u.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.") for(var l=p(u,t,r).toString(16),c=i.util.createBuffer(),f=a-Math.ceil(l.length/2);f>0;)c.putByte(0),--f return c.putBytes(i.util.hexToBytes(l)),!1!==n?y(c.getBytes(),t,r):c.getBytes()},s.rsa.createKeyPairGenerationState=function(e,t,r){"string"==typeof e&&(e=parseInt(e,10)),e=e||2048 var n,a=(r=r||{}).prng||i.random,s={nextBytes:function(e){for(var t=a.getBytesSync(e.length),r=0;r>1,pBits:e-(e>>1),pqState:0,num:null,keys:null}).e.fromInt(n.eInt),n},s.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC") var r=new o(null) r.fromInt(30) for(var n,i=0,a=function(e,t){return e|t},l=+new Date,c=0;null===e.keys&&(t<=0||cf?e.pqState=0:e.num.isProbablePrime(b(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(u[i++%8],0):2===e.pqState?e.pqState=0===e.num.subtract(o.ONE).gcd(e.e).compareTo(o.ONE)?3:0:3===e.pqState&&(e.pqState=0,null===e.p?e.p=e.num:e.q=e.num,null!==e.p&&null!==e.q&&++e.state,e.num=null)}else if(1===e.state)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state else if(2===e.state)e.p1=e.p.subtract(o.ONE),e.q1=e.q.subtract(o.ONE),e.phi=e.p1.multiply(e.q1),++e.state else if(3===e.state)0===e.phi.gcd(e.e).compareTo(o.ONE)?++e.state:(e.p=null,e.q=null,e.state=0) else if(4===e.state)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0) else if(5===e.state){var d=e.e.modInverse(e.phi) e.keys={privateKey:s.rsa.setPrivateKey(e.n,e.e,d,e.p,e.q,d.mod(e.p1),d.mod(e.q1),e.q.modInverse(e.p)),publicKey:s.rsa.setPublicKey(e.n,e.e)}}c+=(n=+new Date)-l,l=n}return null!==e.keys},s.rsa.generateKeyPair=function(e,t,r,o){if(1===arguments.length?"object"===n(e)?(r=e,e=void 0):"function"==typeof e&&(o=e,e=void 0):2===arguments.length?"number"==typeof e?"function"==typeof t?(o=t,t=void 0):"number"!=typeof t&&(r=t,t=void 0):(r=e,o=t,e=void 0,t=void 0):3===arguments.length&&("number"==typeof t?"function"==typeof r&&(o=r,r=void 0):(o=r,r=t,t=void 0)),r=r||{},void 0===e&&(e=r.bits||2048),void 0===t&&(t=r.e||65537),!i.options.usePureJavaScript&&o&&e>=256&&e<=16384&&(65537===t||3===t)){if(w("generateKey")&&w("exportKey"))return window.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:S(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then((function(e){return window.crypto.subtle.exportKey("pkcs8",e.privateKey)})).then(void 0,(function(e){o(e)})).then((function(e){if(e){var t=s.privateKeyFromAsn1(a.fromDer(i.util.createBuffer(e))) o(null,{privateKey:t,publicKey:s.setRsaPublicKey(t.n,t.e)})}})) if(_("generateKey")&&_("exportKey")){var u=window.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:S(t),hash:{name:"SHA-256"}},!0,["sign","verify"]) return u.oncomplete=function(e){var t=e.target.result,r=window.msCrypto.subtle.exportKey("pkcs8",t.privateKey) r.oncomplete=function(e){var t=e.target.result,r=s.privateKeyFromAsn1(a.fromDer(i.util.createBuffer(t))) o(null,{privateKey:r,publicKey:s.setRsaPublicKey(r.n,r.e)})},r.onerror=function(e){o(e)}},void(u.onerror=function(e){o(e)})}}var l=s.rsa.createKeyPairGenerationState(e,t,r) if(!o)return s.rsa.stepKeyPairGenerationState(l,0),l.keys g(l,r,o)},s.setRsaPublicKey=s.rsa.setPublicKey=function(e,t){var r={n:e,e:t,encrypt:function(e,t,n){if("string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5"),"RSAES-PKCS1-V1_5"===t)t={encode:function(e,t,r){return m(e,t,2).getBytes()}} else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={encode:function(e,t){return i.pkcs1.encode_rsa_oaep(t,e,n)}} else if(-1!==["RAW","NONE","NULL",null].indexOf(t))t={encode:function(e){return e}} else if("string"==typeof t)throw new Error('Unsupported encryption scheme: "'+t+'".') var o=t.encode(e,r,!0) return s.rsa.encrypt(o,r,!0)},verify:function(e,t,n){"string"==typeof n?n=n.toUpperCase():void 0===n&&(n="RSASSA-PKCS1-V1_5"),"RSASSA-PKCS1-V1_5"===n?n={verify:function(e,t){return t=y(t,r,!0),e===a.fromDer(t).value[1].value}}:"NONE"!==n&&"NULL"!==n&&null!==n||(n={verify:function(e,t){return e===y(t,r,!0)}}) var i=s.rsa.decrypt(t,r,!0,!1) return n.verify(e,i,r.n.bitLength())}} return r},s.setRsaPrivateKey=s.rsa.setPrivateKey=function(e,t,r,n,o,a,u,l){var c={n:e,e:t,d:r,p:n,q:o,dP:a,dQ:u,qInv:l,decrypt:function(e,t,r){"string"==typeof t?t=t.toUpperCase():void 0===t&&(t="RSAES-PKCS1-V1_5") var n=s.rsa.decrypt(e,c,!1,!1) if("RSAES-PKCS1-V1_5"===t)t={decode:y} else if("RSA-OAEP"===t||"RSAES-OAEP"===t)t={decode:function(e,t){return i.pkcs1.decode_rsa_oaep(t,e,r)}} else{if(-1===["RAW","NONE","NULL",null].indexOf(t))throw new Error('Unsupported encryption scheme: "'+t+'".') t={decode:function(e){return e}}}return t.decode(n,c,!1)},sign:function(e,t){var r=!1 "string"==typeof t&&(t=t.toUpperCase()),void 0===t||"RSASSA-PKCS1-V1_5"===t?(t={encode:d},r=1):"NONE"!==t&&"NULL"!==t&&null!==t||(t={encode:function(){return e}},r=1) var n=t.encode(e,c.n.bitLength()) return s.rsa.encrypt(n,c,r)}} return c},s.wrapRsaPrivateKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(0).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.oids.rsaEncryption).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.OCTETSTRING,!1,a.toDer(e).getBytes())])},s.privateKeyFromAsn1=function(e){var t,r,n,u,f,h,d,p,m={},y=[] if(a.validate(e,l,m,y)&&(e=a.fromDer(i.util.createBuffer(m.privateKey))),m={},y=[],!a.validate(e,c,m,y)){var g=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.") throw g.errors=y,g}return t=i.util.createBuffer(m.privateKeyModulus).toHex(),r=i.util.createBuffer(m.privateKeyPublicExponent).toHex(),n=i.util.createBuffer(m.privateKeyPrivateExponent).toHex(),u=i.util.createBuffer(m.privateKeyPrime1).toHex(),f=i.util.createBuffer(m.privateKeyPrime2).toHex(),h=i.util.createBuffer(m.privateKeyExponent1).toHex(),d=i.util.createBuffer(m.privateKeyExponent2).toHex(),p=i.util.createBuffer(m.privateKeyCoefficient).toHex(),s.setRsaPrivateKey(new o(t,16),new o(r,16),new o(n,16),new o(u,16),new o(f,16),new o(h,16),new o(d,16),new o(p,16))},s.privateKeyToAsn1=s.privateKeyToRSAPrivateKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,a.integerToDer(0).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.n)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.e)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.d)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.p)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.q)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.dP)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.dQ)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.qInv))])},s.publicKeyFromAsn1=function(e){var t={},r=[] if(a.validate(e,h,t,r)){var n,u=a.derToOid(t.publicKeyOid) if(u!==s.oids.rsaEncryption)throw(n=new Error("Cannot read public key. Unknown OID.")).oid=u,n e=t.rsaPublicKey}if(r=[],!a.validate(e,f,t,r))throw(n=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.")).errors=r,n var l=i.util.createBuffer(t.publicKeyModulus).toHex(),c=i.util.createBuffer(t.publicKeyExponent).toHex() return s.setRsaPublicKey(new o(l,16),new o(c,16))},s.publicKeyToAsn1=s.publicKeyToSubjectPublicKeyInfo=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.OID,!1,a.oidToDer(s.oids.rsaEncryption).getBytes()),a.create(a.Class.UNIVERSAL,a.Type.NULL,!1,"")]),a.create(a.Class.UNIVERSAL,a.Type.BITSTRING,!1,[s.publicKeyToRSAPublicKey(e)])])},s.publicKeyToRSAPublicKey=function(e){return a.create(a.Class.UNIVERSAL,a.Type.SEQUENCE,!0,[a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.n)),a.create(a.Class.UNIVERSAL,a.Type.INTEGER,!1,v(e.e))])}},function(e,t,r){var n,i=r(8) function o(e,t,r){this.data=[],null!=e&&("number"==typeof e?this.fromNumber(e,t,r):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function a(){return new o(null)}function s(e,t,r,n,i,o){for(var a=16383&t,s=t>>14;--o>=0;){var u=16383&this.data[e],l=this.data[e++]>>14,c=s*u+l*a i=((u=a*u+((16383&c)<<14)+r.data[n]+i)>>28)+(c>>14)+s*l,r.data[n++]=268435455&u}return i}e.exports=i.jsbn=i.jsbn||{},i.jsbn.BigInteger=o,"undefined"==typeof navigator?(o.prototype.am=s,n=28):"Microsoft Internet Explorer"==navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(var a=32767&t,s=t>>15;--o>=0;){var u=32767&this.data[e],l=this.data[e++]>>15,c=s*u+l*a i=((u=a*u+((32767&c)<<15)+r.data[n]+(1073741823&i))>>>30)+(c>>>15)+s*l+(i>>>30),r.data[n++]=1073741823&u}return i},n=30):"Netscape"!=navigator.appName?(o.prototype.am=function(e,t,r,n,i,o){for(;--o>=0;){var a=t*this.data[e++]+r.data[n]+i i=Math.floor(a/67108864),r.data[n++]=67108863&a}return i},n=26):(o.prototype.am=s,n=28),o.prototype.DB=n,o.prototype.DM=(1<>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function m(e){this.m=e}function y(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function S(e){for(var t=0;0!=e;)e&=e-1,++t return t}function E(){}function k(e){return e}function M(e){this.r2=a(),this.q3=a(),o.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}m.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},m.prototype.revert=function(e){return e},m.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},m.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},m.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},y.prototype.convert=function(e){var t=a() return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(o.ZERO)>0&&this.m.subTo(t,t),t},y.prototype.revert=function(e){var t=a() return e.copyTo(t),this.reduce(t),t},y.prototype.reduce=function(e){for(;e.t<=this.mt2;)e.data[e.t++]=0 for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM for(r=t+this.m.t,e.data[r]+=this.m.am(0,n,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},y.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},y.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},o.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t] e.t=this.t,e.s=this.s},o.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0},o.prototype.fromString=function(e,t){var r if(16==t)r=4 else if(8==t)r=3 else if(256==t)r=8 else if(2==t)r=1 else if(32==t)r=5 else{if(4!=t)return void this.fromRadix(e,t) r=2}this.t=0,this.s=0 for(var n=e.length,i=!1,a=0;--n>=0;){var s=8==r?255&e[n]:h(e,n) s<0?"-"==e.charAt(n)&&(i=!0):(i=!1,0==a?this.data[this.t++]=s:a+r>this.DB?(this.data[this.t-1]|=(s&(1<>this.DB-a):this.data[this.t-1]|=s<=this.DB&&(a-=this.DB))}8==r&&0!=(128&e[0])&&(this.s=-1,a>0&&(this.data[this.t-1]|=(1<0&&this.data[this.t-1]==e;)--this.t},o.prototype.dlShiftTo=function(e,t){var r for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r] for(r=e-1;r>=0;--r)t.data[r]=0 t.t=this.t+e,t.s=this.s},o.prototype.drShiftTo=function(e,t){for(var r=e;r=0;--r)t.data[r+a+1]=this.data[r]>>i|s,s=(this.data[r]&o)<=0;--r)t.data[r]=0 t.data[a]=s,t.t=this.t+a+1,t.s=this.s,t.clamp()},o.prototype.rShiftTo=function(e,t){t.s=this.s var r=Math.floor(e/this.DB) if(r>=this.t)t.t=0 else{var n=e%this.DB,i=this.DB-n,o=(1<>n for(var a=r+1;a>n n>0&&(t.data[this.t-r-1]|=(this.s&o)<>=this.DB if(e.t>=this.DB n+=this.s}else{for(n+=this.s;r>=this.DB n-=e.s}t.s=n<0?-1:0,n<-1?t.data[r++]=this.DV+n:n>0&&(t.data[r++]=n),t.t=r,t.clamp()},o.prototype.multiplyTo=function(e,t){var r=this.abs(),n=e.abs(),i=r.t for(t.t=i+n.t;--i>=0;)t.data[i]=0 for(i=0;i=0;)e.data[r]=0 for(r=0;r=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()},o.prototype.divRemTo=function(e,t,r){var n=e.abs() if(!(n.t<=0)){var i=this.abs() if(i.t0?(n.lShiftTo(c,s),i.lShiftTo(c,r)):(n.copyTo(s),i.copyTo(r)) var f=s.t,h=s.data[f-1] if(0!=h){var d=h*(1<1?s.data[f-2]>>this.F2:0),m=this.FV/d,y=(1<=0&&(r.data[r.t++]=1,r.subTo(w,r)),o.ONE.dlShiftTo(f,w),w.subTo(s,s);s.t=0;){var _=r.data[--v]==h?this.DM:Math.floor(r.data[v]*m+(r.data[v-1]+g)*y) if((r.data[v]+=s.am(0,_,r,b,0,f))<_)for(s.dlShiftTo(b,w),r.subTo(w,r);r.data[v]<--_;)r.subTo(w,r)}null!=t&&(r.drShiftTo(f,t),u!=l&&o.ZERO.subTo(t,t)),r.t=f,r.clamp(),c>0&&r.rShiftTo(c,r),u<0&&o.ZERO.subTo(r,r)}}},o.prototype.invDigit=function(){if(this.t<1)return 0 var e=this.data[0] if(0==(1&e))return 0 var t=3&e return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},o.prototype.isEven=function(){return 0==(this.t>0?1&this.data[0]:this.s)},o.prototype.exp=function(e,t){if(e>4294967295||e<1)return o.ONE var r=a(),n=a(),i=t.convert(this),s=p(e)-1 for(i.copyTo(r);--s>=0;)if(t.sqrTo(r,n),(e&1<0)t.mulTo(n,i,r) else{var u=r r=n,n=u}return t.revert(r)},o.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e) var t if(16==e)t=4 else if(8==e)t=3 else if(2==e)t=1 else if(32==e)t=5 else{if(4!=e)return this.toRadix(e) t=2}var r,n=(1<0)for(s>s)>0&&(i=!0,o=f(r));a>=0;)s>(s+=this.DB-t)):(r=this.data[a]>>(s-=t)&n,s<=0&&(s+=this.DB,--a)),r>0&&(i=!0),i&&(o+=f(r)) return i?o:"0"},o.prototype.negate=function(){var e=a() return o.ZERO.subTo(this,e),e},o.prototype.abs=function(){return this.s<0?this.negate():this},o.prototype.compareTo=function(e){var t=this.s-e.s if(0!=t)return t var r=this.t if(0!=(t=r-e.t))return this.s<0?-t:t for(;--r>=0;)if(0!=(t=this.data[r]-e.data[r]))return t return 0},o.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this.data[this.t-1]^this.s&this.DM)},o.prototype.mod=function(e){var t=a() return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(o.ZERO)>0&&e.subTo(t,t),t},o.prototype.modPowInt=function(e,t){var r return r=e<256||t.isEven()?new m(t):new y(t),this.exp(e,r)},o.ZERO=d(0),o.ONE=d(1),E.prototype.convert=k,E.prototype.revert=k,E.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r)},E.prototype.sqrTo=function(e,t){e.squareTo(t)},M.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m) if(e.compareTo(this.m)<0)return e var t=a() return e.copyTo(t),this.reduce(t),t},M.prototype.revert=function(e){return e},M.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1) for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},M.prototype.mulTo=function(e,t,r){e.multiplyTo(t,r),this.reduce(r)},M.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)} var x=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509],A=(1<<26)/x[x.length-1] o.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},o.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0" var t=this.chunkSize(e),r=Math.pow(e,t),n=d(r),i=a(),o=a(),s="" for(this.divRemTo(n,i,o);i.signum()>0;)s=(r+o.intValue()).toString(e).substr(1)+s,i.divRemTo(n,i,o) return o.intValue().toString(e)+s},o.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10) for(var r=this.chunkSize(t),n=Math.pow(t,r),i=!1,a=0,s=0,u=0;u=r&&(this.dMultiply(n),this.dAddOffset(s,0),a=0,s=0))}a>0&&(this.dMultiply(Math.pow(t,a)),this.dAddOffset(s,0)),i&&o.ZERO.subTo(this,this)},o.prototype.fromNumber=function(e,t,r){if("number"==typeof t)if(e<2)this.fromInt(1) else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(o.ONE.shiftLeft(e-1),v,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(o.ONE.shiftLeft(e-1),this) else{var n=new Array,i=7&e n.length=1+(e>>3),t.nextBytes(n),i>0?n[0]&=(1<>=this.DB if(e.t>=this.DB n+=this.s}else{for(n+=this.s;r>=this.DB n+=e.s}t.s=n<0?-1:0,n>0?t.data[r++]=n:n<-1&&(t.data[r++]=this.DV+n),t.t=r,t.clamp()},o.prototype.dMultiply=function(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},o.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this.data[this.t++]=0 for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}},o.prototype.multiplyLowerTo=function(e,t,r){var n,i=Math.min(this.t+e.t,t) for(r.s=0,r.t=i;i>0;)r.data[--i]=0 for(n=r.t-this.t;i=0;)r.data[n]=0 for(n=Math.max(t-this.t,0);n0)if(0==t)r=this.data[0]%e else for(var n=this.t-1;n>=0;--n)r=(t*r+this.data[n])%e return r},o.prototype.millerRabin=function(e){var t=this.subtract(o.ONE),r=t.getLowestSetBit() if(r<=0)return!1 for(var n,i=t.shiftRight(r),a={nextBytes:function(e){for(var t=0;t=0) var u=n.modPow(i,this) if(0!=u.compareTo(o.ONE)&&0!=u.compareTo(t)){for(var l=1;l++>24},o.prototype.shortValue=function(){return 0==this.t?this.s:this.data[0]<<16>>16},o.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this.data[0]<=0?0:1},o.prototype.toByteArray=function(){var e=this.t,t=new Array t[0]=this.s var r,n=this.DB-e*this.DB%8,i=0 if(e-- >0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this.data[e]&(1<>(n+=this.DB-8)):(r=this.data[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r) return t},o.prototype.equals=function(e){return 0==this.compareTo(e)},o.prototype.min=function(e){return this.compareTo(e)<0?this:e},o.prototype.max=function(e){return this.compareTo(e)>0?this:e},o.prototype.and=function(e){var t=a() return this.bitwiseTo(e,g,t),t},o.prototype.or=function(e){var t=a() return this.bitwiseTo(e,v,t),t},o.prototype.xor=function(e){var t=a() return this.bitwiseTo(e,b,t),t},o.prototype.andNot=function(e){var t=a() return this.bitwiseTo(e,w,t),t},o.prototype.not=function(){for(var e=a(),t=0;t=this.t?0!=this.s:0!=(this.data[t]&1<1){var f=a() for(n.sqrTo(s[1],f);u<=c;)s[u]=a(),n.mulTo(f,s[u-2],s[u]),u+=2}var h,g,v=e.t-1,b=!0,w=a() for(i=p(e.data[v])-1;v>=0;){for(i>=l?h=e.data[v]>>i-l&c:(h=(e.data[v]&(1<0&&(h|=e.data[v-1]>>this.DB+i-l)),u=r;0==(1&h);)h>>=1,--u if((i-=u)<0&&(i+=this.DB,--v),b)s[h].copyTo(o),b=!1 else{for(;u>1;)n.sqrTo(o,w),n.sqrTo(w,o),u-=2 u>0?n.sqrTo(o,w):(g=o,o=w,w=g),n.mulTo(w,s[h],o)}for(;v>=0&&0==(e.data[v]&1<=0?(r.subTo(n,r),t&&i.subTo(s,i),a.subTo(u,a)):(n.subTo(r,n),t&&s.subTo(i,s),u.subTo(a,u))}return 0!=n.compareTo(o.ONE)?o.ZERO:u.compareTo(e)>=0?u.subtract(e):u.signum()<0?(u.addTo(e,u),u.signum()<0?u.add(e):u):u},o.prototype.pow=function(e){return this.exp(e,new E)},o.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone() if(t.compareTo(r)<0){var n=t t=r,r=n}var i=t.getLowestSetBit(),o=r.getLowestSetBit() if(o<0)return t for(i0&&(t.rShiftTo(o,t),r.rShiftTo(o,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r)) return o>0&&r.lShiftTo(o,r),r},o.prototype.isProbablePrime=function(e){var t,r=this.abs() if(1==r.t&&r.data[0]<=x[x.length-1]){for(t=0;t>>=2,i=0;i>8^255&f^99,o[m]=f,a[f]=m,d=(h=e[f])<<24^f<<16^f<<8^f^h,p=((r=e[m])^(n=e[r])^(i=e[n]))<<24^(m^i)<<16^(m^n^i)<<8^m^r^i for(var g=0;g<4;++g)u[g][m]=d,l[g][f]=p,d=d<<24|d>>>8,p=p<<24|p>>>8 0===m?m=y=1:(m=r^e[e[e[r^i]]],y^=e[e[y]])}}function h(e,t){for(var r,n=e.slice(0),i=1,a=n.length,u=4*(a+6+1),c=a;c>>16&255]<<24^o[r>>>8&255]<<16^o[255&r]<<8^o[r>>>24]^s[i]<<24,i++):a>6&&c%a==4&&(r=o[r>>>24]<<24^o[r>>>16&255]<<16^o[r>>>8&255]<<8^o[255&r]),n[c]=n[c-a]^r if(t){for(var f,h=l[0],d=l[1],p=l[2],m=l[3],y=n.slice(0),g=(c=0,(u=n.length)-4);c>>24]]^d[o[f>>>16&255]]^p[o[f>>>8&255]]^m[o[255&f]] n=y}return n}function d(e,t,r,n){var i,s,c,f,h,d,p,m,y,g,v,b,w=e.length/4-1 n?(i=l[0],s=l[1],c=l[2],f=l[3],h=a):(i=u[0],s=u[1],c=u[2],f=u[3],h=o),d=t[0]^e[0],p=t[n?3:1]^e[1],m=t[2]^e[2],y=t[n?1:3]^e[3] for(var _=3,S=1;S>>24]^s[p>>>16&255]^c[m>>>8&255]^f[255&y]^e[++_],v=i[p>>>24]^s[m>>>16&255]^c[y>>>8&255]^f[255&d]^e[++_],b=i[m>>>24]^s[y>>>16&255]^c[d>>>8&255]^f[255&p]^e[++_],y=i[y>>>24]^s[d>>>16&255]^c[p>>>8&255]^f[255&m]^e[++_],d=g,p=v,m=b r[0]=h[d>>>24]<<24^h[p>>>16&255]<<16^h[m>>>8&255]<<8^h[255&y]^e[++_],r[n?3:1]=h[p>>>24]<<24^h[m>>>16&255]<<16^h[y>>>8&255]<<8^h[255&d]^e[++_],r[2]=h[m>>>24]<<24^h[y>>>16&255]<<16^h[d>>>8&255]<<8^h[255&p]^e[++_],r[n?1:3]=h[y>>>24]<<24^h[d>>>16&255]<<16^h[p>>>8&255]<<8^h[255&m]^e[++_]}function p(e){var t,r="AES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start return t.start=function(e,r){var o=null r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},function(e,t,r){var n=r(8) r(9),e.exports=n.cipher=n.cipher||{},n.cipher.algorithms=n.cipher.algorithms||{},n.cipher.createCipher=function(e,t){var r=e if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e) return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})},n.cipher.createDecipher=function(e,t){var r=e if("string"==typeof r&&(r=n.cipher.getAlgorithm(r))&&(r=r()),!r)throw new Error("Unsupported algorithm: "+e) return new n.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})},n.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),n.cipher.algorithms[e]=t},n.cipher.getAlgorithm=function(e){return(e=e.toUpperCase())in n.cipher.algorithms?n.cipher.algorithms[e]:null} var i=n.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)} i.prototype.start=function(e){e=e||{} var t={} for(var r in e)t[r]=e[r] t.decrypt=this._decrypt,this._finish=!1,this._input=n.util.createBuffer(),this.output=e.output||n.util.createBuffer(),this.mode.start(t)},i.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()},i.prototype.finish=function(e){!e||"ECB"!==this.mode.name&&"CBC"!==this.mode.name||(this.mode.pad=function(t){return e(this.blockSize,t,!1)},this.mode.unpad=function(t){return e(this.blockSize,t,!0)}) var t={} return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t)||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t)))}},function(e,t,r){var n=r(8) r(9),n.cipher=n.cipher||{} var i=e.exports=n.cipher.modes=n.cipher.modes||{} function o(e){if("string"==typeof e&&(e=n.util.createBuffer(e)),n.util.isArray(e)&&e.length>4){var t=e e=n.util.createBuffer() for(var r=0;r0))return!0 for(var n=0;n0))return!0 for(var n=0;n0)return!1 var r=e.length(),n=e.at(r-1) return!(n>this.blockSize<<2||(e.truncate(n),0))},i.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)},i.cbc.prototype.start=function(e){if(null===e.iv){if(!this._prev)throw new Error("Invalid IV parameter.") this._iv=this._prev.slice(0)}else{if(!("iv"in e))throw new Error("Invalid IV parameter.") this._iv=o(e.iv),this._prev=this._iv.slice(0)}},i.cbc.prototype.encrypt=function(e,t,r){if(e.length()0))return!0 for(var n=0;n0))return!0 for(var n=0;n0)return!1 var r=e.length(),n=e.at(r-1) return!(n>this.blockSize<<2||(e.truncate(n),0))},i.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.") this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.cfb.prototype.encrypt=function(e,t,r){var n=e.length() if(0===n)return!0 if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0)e.read-=this.blockSize else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0 t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.cfb.prototype.decrypt=function(e,t,r){var n=e.length() if(0===n)return!0 if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0)e.read-=this.blockSize else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0 t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.") this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ofb.prototype.encrypt=function(e,t,r){var n=e.length() if(0===e.length())return!0 if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0)e.read-=this.blockSize else for(i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0 t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}},i.ofb.prototype.decrypt=i.ofb.prototype.encrypt,i.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0},i.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.") this._iv=o(e.iv),this._inBlock=this._iv.slice(0),this._partialBytes=0},i.ctr.prototype.encrypt=function(e,t,r){var n=e.length() if(0===n)return!0 if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize)for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0 t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}a(this._inBlock)},i.ctr.prototype.decrypt=i.ctr.prototype.encrypt,i.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=n.util.createBuffer(),this._partialBytes=0,this._R=3774873600},i.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.") var t,r=n.util.createBuffer(e.iv) if(this._cipherLength=0,t="additionalData"in e?n.util.createBuffer(e.additionalData):n.util.createBuffer(),this._tagLength="tagLength"in e?e.tagLength:128,this._tag=null,e.decrypt&&(this._tag=n.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.") this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits) var i=r.length() if(12===i)this._j0=[r.getInt32(),r.getInt32(),r.getInt32(),1] else{for(this._j0=[0,0,0,0];r.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()]) this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(s(8*i)))}this._inBlock=this._j0.slice(0),a(this._inBlock),this._partialBytes=0,t=n.util.createBuffer(t),this._aDataLength=s(8*t.length()) var o=t.length()%this.blockSize for(o&&t.fillWithByte(0,this.blockSize-o),this._s=[0,0,0,0];t.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()])},i.gcm.prototype.encrypt=function(e,t,r){var n=e.length() if(0===n)return!0 if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&n>=this.blockSize){for(var i=0;i0&&(o=this.blockSize-o),this._partialOutput.clear(),i=0;i0&&this._partialOutput.getBytes(this._partialBytes),o>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(o-this._partialBytes)),this._partialBytes=o,!0 t.putBytes(this._partialOutput.getBytes(n-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),a(this._inBlock)},i.gcm.prototype.decrypt=function(e,t,r){var n=e.length() if(n0))return!0 this.cipher.encrypt(this._inBlock,this._outBlock),a(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock) for(var i=0;i0;--n)t[n]=e[n]>>>1|(1&e[n-1])<<31 t[0]=e[0]>>>1,r&&(t[0]^=this._R)},i.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var n=e[r/8|0]>>>4*(7-r%8)&15,i=this._m[r][n] t[0]^=i[0],t[1]^=i[1],t[2]^=i[2],t[3]^=i[3]}return t},i.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)},i.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,n=4*r,i=16*r,o=new Array(i),a=0;a>>1,i=new Array(r) i[n]=e.slice(0) for(var o=n>>>1;o>0;)this.pow(i[2*o],i[o]=[]),o>>=1 for(o=2;o=0;u--)I>>=8,I+=M.at(u)+T.at(u),T.setAt(u,255&I) A.putBuffer(T)}w=A,f.putBuffer(E)}return f.truncate(f.length()-o),f},a.pbe.getCipher=function(e,t,r){switch(e){case a.oids.pkcs5PBES2:return a.pbe.getCipherForPBES2(e,t,r) case a.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case a.oids["pbewithSHAAnd40BitRC2-CBC"]:return a.pbe.getCipherForPKCS12PBE(e,t,r) default:var n=new Error("Cannot read encrypted PBE data block. Unsupported OID.") throw n.oid=e,n.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],n}},a.pbe.getCipherForPBES2=function(e,t,r){var i,s={},u=[] if(!o.validate(t,l,s,u))throw(i=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=u,i if((e=o.derToOid(s.kdfOid))!==a.oids.pkcs5PBKDF2)throw(i=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.")).oid=e,i.supportedOids=["pkcs5PBKDF2"],i if((e=o.derToOid(s.encOid))!==a.oids["aes128-CBC"]&&e!==a.oids["aes192-CBC"]&&e!==a.oids["aes256-CBC"]&&e!==a.oids["des-EDE3-CBC"]&&e!==a.oids.desCBC)throw(i=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.")).oid=e,i.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],i var c,f,d=s.kdfSalt,p=n.util.createBuffer(s.kdfIterationCount) switch(p=p.getInt(p.length()<<3),a.oids[e]){case"aes128-CBC":c=16,f=n.aes.createDecryptionCipher break case"aes192-CBC":c=24,f=n.aes.createDecryptionCipher break case"aes256-CBC":c=32,f=n.aes.createDecryptionCipher break case"des-EDE3-CBC":c=24,f=n.des.createDecryptionCipher break case"desCBC":c=8,f=n.des.createDecryptionCipher}var m=h(s.prfOid),y=n.pkcs5.pbkdf2(r,d,p,c,m),g=s.encIv,v=f(y) return v.start(g),v},a.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},s=[] if(!o.validate(t,c,i,s))throw(m=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.")).errors=s,m var u,l,f,d=n.util.createBuffer(i.salt),p=n.util.createBuffer(i.iterations) switch(p=p.getInt(p.length()<<3),e){case a.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:u=24,l=8,f=n.des.startDecrypting break case a.oids["pbewithSHAAnd40BitRC2-CBC"]:u=5,l=8,f=function(e,t){var r=n.rc2.createDecryptionCipher(e,40) return r.start(t,null),r} break default:var m throw(m=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.")).oid=e,m}var y=h(i.prfOid),g=a.pbe.generatePkcs12Key(r,d,1,p,u,y) return y.start(),f(g,a.pbe.generatePkcs12Key(r,d,2,p,l,y))},a.pbe.opensslDeriveBytes=function(e,t,r,i){if(null==i){if(!("md5"in n.md))throw new Error('"md5" hash algorithm unavailable.') i=n.md.md5.create()}null===t&&(t="") for(var o=[f(i,e+t)],a=16,s=1;a>=8 return r.from(o)}}}).call(this,r(3),r(0).Buffer)},function(e,t,r){(function(t,n){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o,a=r(321),s=r(323) function u(e,t){return"function"!=typeof t?e:e.then((function(e){o((function(){t(null,e)}))}),(function(e){o((function(){t(e)}))}))}function l(e){return u(this,e)}function c(e){if(e&&s(e)){e.nodeify=l var t=e.then return e.then=function(){return c(t.apply(this,arguments))},e}"function"==typeof e?e.prototype.nodeify=l:a.prototype.nodeify=l}function f(e){if(!(this instanceof f))return new f(e) a.call(this,e),c(this)}o="function"==typeof t?t:"object"===(void 0===n?"undefined":i(n))&&n&&n.nextTick?n.nextTick:function(e){setTimeout(e,0)},e.exports=u,u.extend=c,u.Promise=f,f.prototype=Object.create(a.prototype),f.prototype.constructor=f}).call(this,r(25).setImmediate,r(3))},function(e,t,r){var n=r(325),i=r(326) e.exports={blake2b:n.blake2b,blake2bHex:n.blake2bHex,blake2bInit:n.blake2bInit,blake2bUpdate:n.blake2bUpdate,blake2bFinal:n.blake2bFinal,blake2s:i.blake2s,blake2sHex:i.blake2sHex,blake2sInit:i.blake2sInit,blake2sUpdate:i.blake2sUpdate,blake2sFinal:i.blake2sFinal}},function(e,t,r){(function(t){function r(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){var r if(e instanceof Uint8Array)r=e else if(e instanceof t)r=new Uint8Array(e) else{if("string"!=typeof e)throw new Error("Input must be an string, Buffer or Uint8Array") r=new Uint8Array(t.from(e,"utf8"))}return r},toHex:function(e){return Array.prototype.map.call(e,(function(e){return(e<16?"0":"")+e.toString(16)})).join("")},debugPrint:function(e,t,n){for(var i="\n"+e+" = ",o=0;o=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|a.tagClassByName[r||"universal"]<<6)}(e,t,r,this.reporter) if(n.length<128){var s=new i(2) return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var u=1,l=n.length;l>=256;l>>=8)u++ var c=new i(2+u) c[0]=o,c[1]=128|u for(var f=1+u,h=n.length;h>0;f--,h>>=8)c[f]=255&h return this._createEncoderBuffer([c,n])},u.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]) if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB") e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s=128;u>>=7)a++}for(var l=new i(a),c=l.length-1,f=e.length-1;f>=0;f--){var h=e[f] for(l[c--]=127&h;(h>>=7)>0;)l[c--]=128|127&h}return this._createEncoderBuffer(l)},u.prototype._encodeTime=function(e,t){var r,n=new Date(e) return"gentime"===t?r=[l(n.getUTCFullYear()),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[l(n.getUTCFullYear()%100),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map") if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e)) e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray() !e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length 0===e.length&&n++ var o=new i(n) return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e) if(e<256)return this._createEncoderBuffer([0,e]) for(var a=1,s=e;s>=256;s>>=8)a++ for(var u=new Array(a),l=u.length-1;l>=0;l--)u[l]=255&e,e>>=8 return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(new i(u))},u.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},u.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},u.prototype._skipDefault=function(e,t,r){var n,i=this._baseState if(null===i.default)return!1 var o=e.join() if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1 for(n=0;n>6],i=0==(32&r) if(31==(31&r)){var o=r for(r=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o r<<=7,r|=127&o}}else r&=31 return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function f(e,t,r){var n=e.readUInt8(r) if(e.isError(n))return n if(!t&&128===n)return null if(0==(128&n))return n var i=127&n if(i>4)return e.error("length octect is too long") n=0 for(var o=0;o>=8 return r.from(o)}}}).call(this,r(3),r(0).Buffer)},function(e){e.exports={COMPRESSED_TYPE_INVALID:"compressed should be a boolean",EC_PRIVATE_KEY_TYPE_INVALID:"private key should be a Buffer",EC_PRIVATE_KEY_LENGTH_INVALID:"private key length is invalid",EC_PRIVATE_KEY_RANGE_INVALID:"private key range is invalid",EC_PRIVATE_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting private key is invalid",EC_PRIVATE_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PRIVATE_KEY_EXPORT_DER_FAIL:"couldn't export to DER format",EC_PRIVATE_KEY_IMPORT_DER_FAIL:"couldn't import from DER format",EC_PUBLIC_KEYS_TYPE_INVALID:"public keys should be an Array",EC_PUBLIC_KEYS_LENGTH_INVALID:"public keys Array should have at least 1 element",EC_PUBLIC_KEY_TYPE_INVALID:"public key should be a Buffer",EC_PUBLIC_KEY_LENGTH_INVALID:"public key length is invalid",EC_PUBLIC_KEY_PARSE_FAIL:"the public key could not be parsed or is invalid",EC_PUBLIC_KEY_CREATE_FAIL:"private was invalid, try again",EC_PUBLIC_KEY_TWEAK_ADD_FAIL:"tweak out of range or resulting public key is invalid",EC_PUBLIC_KEY_TWEAK_MUL_FAIL:"tweak out of range",EC_PUBLIC_KEY_COMBINE_FAIL:"the sum of the public keys is not valid",ECDH_FAIL:"scalar was invalid (zero or overflow)",ECDSA_SIGNATURE_TYPE_INVALID:"signature should be a Buffer",ECDSA_SIGNATURE_LENGTH_INVALID:"signature length is invalid",ECDSA_SIGNATURE_PARSE_FAIL:"couldn't parse signature",ECDSA_SIGNATURE_PARSE_DER_FAIL:"couldn't parse DER signature",ECDSA_SIGNATURE_SERIALIZE_DER_FAIL:"couldn't serialize signature to DER format",ECDSA_SIGN_FAIL:"nonce generation function failed or private key is invalid",ECDSA_RECOVER_FAIL:"couldn't recover public key from signature",MSG32_TYPE_INVALID:"message should be a Buffer",MSG32_LENGTH_INVALID:"message length is invalid",OPTIONS_TYPE_INVALID:"options should be an Object",OPTIONS_DATA_TYPE_INVALID:"options.data should be a Buffer",OPTIONS_DATA_LENGTH_INVALID:"options.data length is invalid",OPTIONS_NONCEFN_TYPE_INVALID:"options.noncefn should be a Function",RECOVERY_ID_TYPE_INVALID:"recovery should be a Number",RECOVERY_ID_VALUE_INVALID:"recovery should have value between -1 and 4",TWEAK_TYPE_INVALID:"tweak should be a Buffer",TWEAK_LENGTH_INVALID:"tweak length is invalid"}},function(e,t,r){"use strict" var n=r(2),i=r(156),o=r(7).Buffer,a=new Array(16) function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<>>32-t}function l(e,t,r,n,i,o,a){return u(e+(t&r|~t&n)+i+o|0,a)+t|0}function c(e,t,r,n,i,o,a){return u(e+(t&n|r&~n)+i+o|0,a)+t|0}function f(e,t,r,n,i,o,a){return u(e+(t^r^n)+i+o|0,a)+t|0}function h(e,t,r,n,i,o,a){return u(e+(r^(t|~n))+i+o|0,a)+t|0}n(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t) var r=this._a,n=this._b,i=this._c,o=this._d r=l(r,n,i,o,e[0],3614090360,7),o=l(o,r,n,i,e[1],3905402710,12),i=l(i,o,r,n,e[2],606105819,17),n=l(n,i,o,r,e[3],3250441966,22),r=l(r,n,i,o,e[4],4118548399,7),o=l(o,r,n,i,e[5],1200080426,12),i=l(i,o,r,n,e[6],2821735955,17),n=l(n,i,o,r,e[7],4249261313,22),r=l(r,n,i,o,e[8],1770035416,7),o=l(o,r,n,i,e[9],2336552879,12),i=l(i,o,r,n,e[10],4294925233,17),n=l(n,i,o,r,e[11],2304563134,22),r=l(r,n,i,o,e[12],1804603682,7),o=l(o,r,n,i,e[13],4254626195,12),i=l(i,o,r,n,e[14],2792965006,17),r=c(r,n=l(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=c(o,r,n,i,e[6],3225465664,9),i=c(i,o,r,n,e[11],643717713,14),n=c(n,i,o,r,e[0],3921069994,20),r=c(r,n,i,o,e[5],3593408605,5),o=c(o,r,n,i,e[10],38016083,9),i=c(i,o,r,n,e[15],3634488961,14),n=c(n,i,o,r,e[4],3889429448,20),r=c(r,n,i,o,e[9],568446438,5),o=c(o,r,n,i,e[14],3275163606,9),i=c(i,o,r,n,e[3],4107603335,14),n=c(n,i,o,r,e[8],1163531501,20),r=c(r,n,i,o,e[13],2850285829,5),o=c(o,r,n,i,e[2],4243563512,9),i=c(i,o,r,n,e[7],1735328473,14),r=f(r,n=c(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=h(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=h(o,r,n,i,e[7],1126891415,10),i=h(i,o,r,n,e[14],2878612391,15),n=h(n,i,o,r,e[5],4237533241,21),r=h(r,n,i,o,e[12],1700485571,6),o=h(o,r,n,i,e[3],2399980690,10),i=h(i,o,r,n,e[10],4293915773,15),n=h(n,i,o,r,e[1],2240044497,21),r=h(r,n,i,o,e[8],1873313359,6),o=h(o,r,n,i,e[15],4264355552,10),i=h(i,o,r,n,e[6],2734768916,15),n=h(n,i,o,r,e[13],1309151649,21),r=h(r,n,i,o,e[4],4149444226,6),o=h(o,r,n,i,e[11],3174756917,10),i=h(i,o,r,n,e[2],718787259,15),n=h(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update() var e=o.allocUnsafe(16) return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},function(e,t,r){"use strict" var n=r(7).Buffer,i=r(157).Transform function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(2)(o,i),o.prototype._transform=function(e,t,r){var n=null try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called") n.isBuffer(e)||(e=n.from(e,t)) for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s) return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called") this._finalized=!0 var t=this._digest() void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0 for(var r=0;r<4;++r)this._length[r]=0 return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},function(e,t,r){e.exports=i var n=r(11).EventEmitter function i(){n.call(this)}r(2)(i,n),i.Readable=r(93),i.Writable=r(360),i.Duplex=r(361),i.Transform=r(362),i.PassThrough=r(363),i.Stream=i,i.prototype.pipe=function(e,t){var r=this function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u)) var a=!1 function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",l),e.on("error",l),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},function(e,t,r){"use strict";(function(t,n){var i=r(66) e.exports=b var o,a=r(127) b.ReadableState=v,r(11).EventEmitter var s=function(e,t){return e.listeners(t).length},u=r(159),l=r(7).Buffer,c=t.Uint8Array||function(){},f=r(50) f.inherits=r(2) var h=r(355),d=void 0 d=h&&h.debuglog?h.debuglog("stream"):function(){} var p,m=r(356),y=r(160) f.inherits(b,u) var g=["error","close","destroy","pause","resume"] function v(e,t){e=e||{} var n=t instanceof(o=o||r(26)) this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode) var i=e.highWaterMark,a=e.readableHighWaterMark,s=this.objectMode?16:16384 this.highWaterMark=i||0===i?i:n&&(a||0===a)?a:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(10).StringDecoder),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function b(e){if(o=o||r(26),!(this instanceof b))return new b(e) this._readableState=new v(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function w(e,t,r,n,i){var o,a=e._readableState return null===t?(a.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end() r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,E(e)}}(e,a)):(i||(o=function(e,t){var r,n return n=t,l.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(a,t)),o?e.emit("error",o):a.objectMode||t&&t.length>0?("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),n?a.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):_(e,a,t,!0):a.ended?e.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?_(e,a,t,!1):M(e,a)):_(e,a,t,!1))):n||(a.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(k,e):k(e))}function k(e){d("emit readable"),e.emit("readable"),I(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(x,e,t))}function x(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n return eo.length?o.length:e if(a===o.length?i+=o:i+=o.slice(0,e),0==(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a)) break}++n}return t.length-=n,i}(e,t):function(e,t){var r=l.allocUnsafe(e),n=t.head,i=1 for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e if(o.copy(r,r.length-e,0,a),0==(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a)) break}++i}return t.length-=i,r}(e,t),n}(e,t.buffer,t.decoder),r) var r}function C(e){var t=e._readableState if(t.length>0)throw new Error('"endReadable()" called on non-empty stream') t.endEmitted||(t.ended=!0,i.nextTick(R,t,e))}function R(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function P(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?C(this):E(this),null if(0===(e=S(e,t))&&t.ended)return 0===t.length&&C(this),null var n,i=t.needReadable return d("need readable",i),(0===t.length||t.length-e0?O(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&C(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(e,t){var r=this,o=this._readableState switch(o.pipesCount){case 0:o.pipes=e break case 1:o.pipes=[o.pipes,e] break default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t) var u=t&&!1===t.end||e===n.stdout||e===n.stderr?v:l function l(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",(function t(n,i){d("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",y),e.removeListener("finish",g),e.removeListener("drain",c),e.removeListener("error",m),e.removeListener("unpipe",t),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",p),f=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||c())})) var c=function(e){return function(){var t=e._readableState d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,I(e))}}(r) e.on("drain",c) var f=!1,h=!1 function p(t){d("ondata"),h=!1,!1!==e.write(t)||h||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==P(o.pipes,e))&&!f&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,h=!0),r.pause())}function m(t){d("onerror",t),v(),e.removeListener("error",m),0===s(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",g),v()}function g(){d("onfinish"),e.removeListener("close",y),v()}function v(){d("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r) e._events&&e._events[t]?a(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",m),e.once("close",y),e.once("finish",g),e.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),e},b.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1} if(0===t.pipesCount)return this if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this if(!e){var n=t.pipes,i=t.pipesCount t.pipes=null,t.pipesCount=0,t.flowing=!1 for(var o=0;o>>32-t}function m(e,t,r,n,i,o,a,s){return p(e+(t^r^n)+o+a|0,s)+i|0}function y(e,t,r,n,i,o,a,s){return p(e+(t&r|~t&n)+o+a|0,s)+i|0}function g(e,t,r,n,i,o,a,s){return p(e+((t|~r)^n)+o+a|0,s)+i|0}function v(e,t,r,n,i,o,a,s){return p(e+(t&n|r&~n)+o+a|0,s)+i|0}function b(e,t,r,n,i,o,a,s){return p(e+(t^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t) for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,_=0|this._b,S=0|this._c,E=0|this._d,k=0|this._e,M=0;M<80;M+=1){var x,A M<16?(x=m(r,n,i,o,d,e[s[M]],f[0],l[M]),A=b(w,_,S,E,k,e[u[M]],h[0],c[M])):M<32?(x=y(r,n,i,o,d,e[s[M]],f[1],l[M]),A=v(w,_,S,E,k,e[u[M]],h[1],c[M])):M<48?(x=g(r,n,i,o,d,e[s[M]],f[2],l[M]),A=g(w,_,S,E,k,e[u[M]],h[2],c[M])):M<64?(x=v(r,n,i,o,d,e[s[M]],f[3],l[M]),A=y(w,_,S,E,k,e[u[M]],h[3],c[M])):(x=b(r,n,i,o,d,e[s[M]],f[4],l[M]),A=m(w,_,S,E,k,e[u[M]],h[4],c[M])),r=d,d=o,o=p(i,10),i=n,n=x,w=k,k=E,E=p(S,10),S=_,_=A}var T=this._b+i+E|0 this._b=this._c+o+k|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+S|0,this._a=T},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update() var e=n.alloc?n.alloc(20):new n(20) return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=d},function(e,t,r){(t=e.exports=function(e){e=e.toLowerCase() var r=t[e] if(!r)throw new Error(e+" is not supported (we accept pull requests)") return new r}).sha=r(364),t.sha1=r(365),t.sha224=r(366),t.sha256=r(164),t.sha384=r(367),t.sha512=r(165)},function(e,t,r){var n=r(2),i=r(32),o=r(7).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64) function u(){this.init(),this._w=s,i.call(this,64,56)}function l(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,p=0|this._f,m=0|this._g,y=0|this._h,g=0;g<16;++g)r[g]=e.readInt32BE(4*g) for(;g<64;++g)r[g]=0|(((t=r[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[g-7]+d(r[g-15])+r[g-16] for(var v=0;v<64;++v){var b=y+h(u)+l(u,p,m)+a[v]+r[v]|0,w=f(n)+c(n,i,o)|0 y=m,m=p,p=u,u=s+b|0,s=o,o=i,i=n,n=b+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32) return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},function(e,t,r){var n=r(2),i=r(32),o=r(7).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160) function u(){this.init(),this._w=s,i.call(this,128,112)}function l(e,t,r){return r^e&(t^r)}function c(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function y(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function g(e,t){return e>>>0>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,v=0|this._gh,b=0|this._hh,w=0|this._al,_=0|this._bl,S=0|this._cl,E=0|this._dl,k=0|this._el,M=0|this._fl,x=0|this._gl,A=0|this._hl,T=0;T<32;T+=2)t[T]=e.readInt32BE(4*T),t[T+1]=e.readInt32BE(4*T+4) for(;T<160;T+=2){var I=t[T-30],O=t[T-30+1],C=d(I,O),R=p(O,I),P=m(I=t[T-4],O=t[T-4+1]),N=y(O,I),D=t[T-14],B=t[T-14+1],L=t[T-32],j=t[T-32+1],U=R+B|0,F=C+D+g(U,R)|0 F=(F=F+P+g(U=U+N|0,N)|0)+L+g(U=U+j|0,j)|0,t[T]=F,t[T+1]=U}for(var z=0;z<160;z+=2){F=t[z],U=t[z+1] var H=c(r,n,i),V=c(w,_,S),K=f(r,w),q=f(w,r),G=h(s,k),W=h(k,s),Y=a[z],Z=a[z+1],J=l(s,u,v),$=l(k,M,x),Q=A+W|0,X=b+G+g(Q,A)|0 X=(X=(X=X+J+g(Q=Q+$|0,$)|0)+Y+g(Q=Q+Z|0,Z)|0)+F+g(Q=Q+U|0,U)|0 var ee=q+V|0,te=K+H+g(ee,q)|0 b=v,A=x,v=u,x=M,u=s,M=k,s=o+X+g(k=E+Q|0,E)|0,o=i,E=S,i=n,S=_,n=r,_=w,r=X+te+g(w=Q+ee|0,Q)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+S|0,this._dl=this._dl+E|0,this._el=this._el+k|0,this._fl=this._fl+M|0,this._gl=this._gl+x|0,this._hl=this._hl+A|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,_)|0,this._ch=this._ch+i+g(this._cl,S)|0,this._dh=this._dh+o+g(this._dl,E)|0,this._eh=this._eh+s+g(this._el,k)|0,this._fh=this._fh+u+g(this._fl,M)|0,this._gh=this._gh+v+g(this._gl,x)|0,this._hh=this._hh+b+g(this._hl,A)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64) function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},function(e,t,r){"use strict" var n=r(7).Buffer,i=r(67),o=r(167) function a(e,t){null===e&&null===t?(this.x=this.y=null,this.inf=!0):(this.x=e,this.y=t,this.inf=!1)}a.fromPublicKey=function(e){var t,r,n=e[0] return 33!==e.length||2!==n&&3!==n?65!==e.length||4!==n&&6!==n&&7!==n?null:(t=i.fromBuffer(e.slice(1,33)),r=i.fromBuffer(e.slice(33,65)),t.ucmp(i.p)>=0||r.ucmp(i.p)>=0?null:6!==n&&7!==n||r.isOdd()===(7===n)?0!==t.redSqr().redMul(t).redIAdd7().ucmp(r.redSqr())?null:new a(t,r):null):(t=i.fromBuffer(e.slice(1,33))).ucmp(i.p)>=0||null===(r=t.redSqr().redMul(t).redIAdd7().redSqrt())?null:(3===n!==r.isOdd()&&(r=r.redNeg()),new a(t,r))},a.prototype.toPublicKey=function(e){var t,r=this.x,i=this.y return e?((t=n.alloc(33))[0]=i.isOdd()?3:2,r.toBuffer().copy(t,1)):((t=n.alloc(65))[0]=4,r.toBuffer().copy(t,1),i.toBuffer().copy(t,33)),t},a.fromECJPoint=function(e){if(e.inf)return new a(null,null) var t=e.z.redInvm(),r=t.redSqr() return new a(e.x.redMul(r),e.y.redMul(r).redMul(t))},a.prototype.toECJPoint=function(){return this.inf?new o(null,null,null):new o(this.x,this.y,o.one)},a.prototype.neg=function(){return this.inf?this:new a(this.x,this.y.redNeg())},a.prototype.add=function(e){if(this.inf)return e if(e.inf)return this if(0===this.x.ucmp(e.x))return 0===this.y.ucmp(e.y)?this.dbl():new a(null,null) var t=this.y.redSub(e.y) t.isZero()||(t=t.redMul(this.x.redSub(e.x).redInvm())) var r=t.redSqr().redISub(this.x).redISub(e.x) return new a(r,t.redMul(this.x.redSub(r)).redISub(this.y))},a.prototype.dbl=function(){if(this.inf)return this var e=this.y.redAdd(this.y) if(e.isZero())return new a(null,null) var t=this.x.redSqr(),r=t.redAdd(t).redIAdd(t).redMul(e.redInvm()),n=r.redSqr().redISub(this.x.redAdd(this.x)) return new a(n,r.redMul(this.x.redSub(n)).redISub(this.y))},a.prototype.mul=function(e){for(var t=this._getNAFPoints(4),r=t.points,n=e.getNAF(t.wnd),i=new o(null,null,null),s=n.length-1;s>=0;s--){for(var u=0;s>=0&&0===n[s];s--,++u);if(s>=0&&(u+=1),i=i.dblp(u),s<0)break var l=n[s] i=l>0?i.mixedAdd(r[l-1>>1]):i.mixedAdd(r[-l-1>>1].neg())}return a.fromECJPoint(i)},a.prototype._getNAFPoints1=function(){return{wnd:1,points:[this]}},a.prototype._getNAFPoints=function(e){var t=new Array((1<0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?e.emit("error",new w):x(e,s,t,!0) else if(s.ended)e.emit("error",new v) else{if(s.destroyed)return!1 s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?x(e,s,t,!1):O(e,s)):x(e,s,t,!1)}else n||(s.reading=!1,O(e,s)) return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(I,e))}function I(e){var t=e._readableState o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){o("readable nexttick read 0"),e.read(0)}function N(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r) var r}function L(e){var t=e._readableState o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(j,t,e))}function j(e,t){o("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function U(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):T(this),null if(0===(e=A(e,t))&&t.ended)return 0===t.length&&L(this),null var n,i=t.needReadable return o("need readable",i),(0===t.length||t.length-e0?B(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){this.emit("error",new b("_read()"))},k.prototype.pipe=function(e,t){var r=this,i=this._readableState switch(i.pipesCount){case 0:i.pipes=e break case 1:i.pipes=[i.pipes,e] break default:i.pipes.push(e)}i.pipesCount+=1,o("pipe count=%d opts=%j",i.pipesCount,t) var s=t&&!1===t.end||e===n.stdout||e===n.stderr?m:u function u(){o("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",(function t(n,a){o("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",f),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())})) var l=function(e){return function(){var t=e._readableState o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,D(e))}}(r) e.on("drain",l) var c=!1 function f(t){o("ondata") var n=e.write(t) o("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!c&&(o("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){o("onerror",t),m(),e.removeListener("error",h),0===a(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",p),m()}function p(){o("onfinish"),e.removeListener("close",d),m()}function m(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r) e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),i.flowing||(o("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1} if(0===t.pipesCount)return this if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this if(!e){var n=t.pipes,i=t.pipesCount t.pipes=null,t.pipesCount=0,t.flowing=!1 for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(P,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t) return"readable"===e&&n.nextTick(R,this),r},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments) return"readable"!==e&&void 0!==e||n.nextTick(R,this),t},k.prototype.resume=function(){var e=this._readableState return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1 for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end() e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i)) for(var a=0;a-1))throw new _(e) return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new m("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var i=this._writableState return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,r(4),r(3))},function(e,t,r){"use strict" e.exports=c var n=r(33).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(34) function l(e,t){var r=this._transformState r.transforming=!1 var n=r.writecb if(null===n)return this.emit("error",new o) r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e) var i=this._readableState i.reading=!1,(i.needReadable||i.length-1&&e%1==0&&e<=9007199254740991}},function(e,t,r){"use strict";(function(t,n){var i e.exports=k,k.ReadableState=E,r(11).EventEmitter var o,a=function(e,t){return e.listeners(t).length},s=r(184),u=r(0).Buffer,l=t.Uint8Array||function(){},c=r(437) o=c&&c.debuglog?c.debuglog("stream"):function(){} var f,h,d=r(438),p=r(185),m=r(186).getHighWaterMark,y=r(36).codes,g=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,b=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,_=r(440).emitExperimentalWarning r(2)(k,s) var S=["error","close","destroy","pause","resume"] function E(e,t,n){i=i||r(37),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",n),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(10).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function k(e){if(i=i||r(37),!(this instanceof k))return new k(e) var t=this instanceof i this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function M(e,t,r,n,i){o("readableAddChunk",t) var a,s=e._readableState if(null===t)s.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end() r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,I(e)))}}(e,s) else if(i||(a=function(e,t){var r,n return n=t,u.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),a)e.emit("error",a) else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?e.emit("error",new w):x(e,s,t,!0) else if(s.ended)e.emit("error",new v) else{if(s.destroyed)return!1 s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?x(e,s,t,!1):O(e,s)):x(e,s,t,!1)}else n||(s.reading=!1,O(e,s)) return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(I,e))}function I(e){var t=e._readableState o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){o("readable nexttick read 0"),e.read(0)}function N(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r) var r}function L(e){var t=e._readableState o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(j,t,e))}function j(e,t){o("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function U(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):T(this),null if(0===(e=A(e,t))&&t.ended)return 0===t.length&&L(this),null var n,i=t.needReadable return o("need readable",i),(0===t.length||t.length-e0?B(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){this.emit("error",new b("_read()"))},k.prototype.pipe=function(e,t){var r=this,i=this._readableState switch(i.pipesCount){case 0:i.pipes=e break case 1:i.pipes=[i.pipes,e] break default:i.pipes.push(e)}i.pipesCount+=1,o("pipe count=%d opts=%j",i.pipesCount,t) var s=t&&!1===t.end||e===n.stdout||e===n.stderr?m:u function u(){o("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",(function t(n,a){o("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",f),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())})) var l=function(e){return function(){var t=e._readableState o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,D(e))}}(r) e.on("drain",l) var c=!1 function f(t){o("ondata") var n=e.write(t) o("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!c&&(o("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){o("onerror",t),m(),e.removeListener("error",h),0===a(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",p),m()}function p(){o("onfinish"),e.removeListener("close",d),m()}function m(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r) e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),i.flowing||(o("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1} if(0===t.pipesCount)return this if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this if(!e){var n=t.pipes,i=t.pipesCount t.pipes=null,t.pipesCount=0,t.flowing=!1 for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(P,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t) return"readable"===e&&n.nextTick(R,this),r},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments) return"readable"!==e&&void 0!==e||n.nextTick(R,this),t},k.prototype.resume=function(){var e=this._readableState return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1 for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end() e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i)) for(var a=0;a-1))throw new _(e) return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new m("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var i=this._writableState return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,r(4),r(3))},function(e,t,r){"use strict" e.exports=c var n=r(36).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(37) function l(e,t){var r=this._transformState r.transforming=!1 var n=r.writecb if(null===n)return this.emit("error",new o) r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e) var i=this._readableState i.reading=!1,(i.needReadable||i.length1&&void 0!==arguments[1]?arguments[1]:o n(this,e),this.super=new a(t,r),this.path=this.pathname+this.search,this.auth=this.username&&this.password?this.username+":"+this.password:null,this.query=this.search&&this.search.startsWith("?")?this.search.slice(1):null}var t,r return t=e,(r=[{key:"createObjectURL",value:function(e){return this.super.createObjectURL(e)}},{key:"revokeObjectURL",value:function(e){this.super.revokeObjectURL(e)}},{key:"toJSON",value:function(){return this.super.toJSON()}},{key:"toString",value:function(){return this.super.toString()}},{key:"format",value:function(){return this.toString()}},{key:"hash",get:function(){return this.super.hash},set:function(e){this.super.hash=e}},{key:"host",get:function(){return this.super.host},set:function(e){this.super.host=e}},{key:"hostname",get:function(){return this.super.hostname},set:function(e){this.super.hostname=e}},{key:"href",get:function(){return this.super.href},set:function(e){this.super.href=e}},{key:"origin",get:function(){return this.super.origin},set:function(e){this.super.origin=e}},{key:"password",get:function(){return this.super.password},set:function(e){this.super.password=e}},{key:"pathname",get:function(){return this.super.pathname},set:function(e){this.super.pathname=e}},{key:"port",get:function(){return this.super.port},set:function(e){this.super.port=e}},{key:"protocol",get:function(){return this.super.protocol},set:function(e){this.super.protocol=e}},{key:"search",get:function(){return this.super.search},set:function(e){this.super.search=e}},{key:"searchParams",get:function(){return this.super.searchParams},set:function(e){this.super.searchParams=e}},{key:"username",get:function(){return this.super.username},set:function(e){this.super.username=e}}])&&i(t.prototype,r),e}() e.exports={URLWithLegacySupport:s,URLSearchParams:self.URLSearchParams,defaultBase:o,format:function(e){if("string"==typeof e)return new a(e).toString() if(!(e instanceof a)){var t=e.username&&e.password?"".concat(e.username,":").concat(e.password,"@"):"",r=e.auth?e.auth+"@":"",n=e.port?":"+e.port:"",i=e.protocol?e.protocol+"//":"",o=e.host||"",s=e.hostname||"",u=e.search||(e.query?"?"+e.query:""),l=e.hash||"",c=e.pathname||"",f=e.path||c+u return"".concat(i).concat(t||r).concat(o||s+n).concat(f).concat(l)}}}},function(e,t,r){var n=r(450),i=n,o=self.URL e.exports={http:n,https:i,getRequest:function(e,t){var r="http:" return"string"==typeof e?r=new o(e).protocol:e.protocol&&(r=e.protocol),"http:"===r?n.request(e,t):i.request(e,t)}}},function(e,t){function r(e){return"function"==typeof e}e.exports={fetch:"fetch"in self&&r(self.fecth),writableStream:"WritableStream"in self&&r(self.WritableStream),abortController:"AbortController"in self&&r(self.AbortController),arrayBuffer:"ArrayBuffer"in self}},function(e,t,r){(function(t,n){var i=r(191),o=r(2),a=r(193),s=function(e,r,o){var s=this if(a.Readable.call(this),this._mode=r,this.headers={},this.rawHeaders=[],this.trailers={},this.rawTrailers=[],this.on("end",(function(){t.nextTick((function(){return s.emit("close")}))})),this._fetchResponse=e,this.url=e.url,this.statusCode=e.status,this.statusMessage=e.statusText,e.headers.forEach((function(e,t){s.headers[t.toLowerCase()]=e,s.rawHeaders.push(t,e)})),i.writableStream){var u=new WritableStream({write:function(e){return new Promise((function(t,r){s._destroyed?r():s.push(n.from(e))?t():s._resumeFetch=t}))},close:function(){clearTimeout(o),s._destroyed||s.push(null)},abort:function(e){s._destroyed||s.emit("error",e)}}) try{return void e.body.pipeTo(u).catch((function(e){console.log(e),self.clearTimeout(o),s._destroyed||s.emit("error",e)}))}catch(e){}}var l=e.body.getReader() !function e(t){l.read().then((function(r){if(!t._destroyed){if(r.done)return clearTimeout(o),void t.push(null) t.push(n.from(r.value)),e(t)}})).catch((function(e){clearTimeout(o),t._destroyed||t.emit("error",e)}))}(this)} o(s,a.Readable),s.prototype._read=function(){var e=this._resumeFetch e&&(this._resumeFetch=null,e())},e.exports=s}).call(this,r(3),r(0).Buffer)},function(e,t,r){(t=e.exports=r(194)).Stream=t,t.Readable=t,t.Writable=r(198),t.Duplex=r(39),t.Transform=r(199),t.PassThrough=r(457),t.finished=r(110),t.pipeline=r(458)},function(e,t,r){"use strict";(function(t,n){var i e.exports=k,k.ReadableState=E,r(11).EventEmitter var o,a=function(e,t){return e.listeners(t).length},s=r(195),u=r(0).Buffer,l=t.Uint8Array||function(){},c=r(452) o=c&&c.debuglog?c.debuglog("stream"):function(){} var f,h,d=r(453),p=r(196),m=r(197).getHighWaterMark,y=r(38).codes,g=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,b=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,_=r(455).emitExperimentalWarning r(2)(k,s) var S=["error","close","destroy","pause","resume"] function E(e,t,n){i=i||r(39),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",n),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(10).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function k(e){if(i=i||r(39),!(this instanceof k))return new k(e) var t=this instanceof i this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function M(e,t,r,n,i){o("readableAddChunk",t) var a,s=e._readableState if(null===t)s.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end() r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,I(e)))}}(e,s) else if(i||(a=function(e,t){var r,n return n=t,u.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),a)e.emit("error",a) else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?e.emit("error",new w):x(e,s,t,!0) else if(s.ended)e.emit("error",new v) else{if(s.destroyed)return!1 s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?x(e,s,t,!1):O(e,s)):x(e,s,t,!1)}else n||(s.reading=!1,O(e,s)) return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(I,e))}function I(e){var t=e._readableState o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){o("readable nexttick read 0"),e.read(0)}function N(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r) var r}function L(e){var t=e._readableState o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(j,t,e))}function j(e,t){o("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function U(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):T(this),null if(0===(e=A(e,t))&&t.ended)return 0===t.length&&L(this),null var n,i=t.needReadable return o("need readable",i),(0===t.length||t.length-e0?B(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){this.emit("error",new b("_read()"))},k.prototype.pipe=function(e,t){var r=this,i=this._readableState switch(i.pipesCount){case 0:i.pipes=e break case 1:i.pipes=[i.pipes,e] break default:i.pipes.push(e)}i.pipesCount+=1,o("pipe count=%d opts=%j",i.pipesCount,t) var s=t&&!1===t.end||e===n.stdout||e===n.stderr?m:u function u(){o("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",(function t(n,a){o("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",f),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())})) var l=function(e){return function(){var t=e._readableState o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,D(e))}}(r) e.on("drain",l) var c=!1 function f(t){o("ondata") var n=e.write(t) o("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!c&&(o("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){o("onerror",t),m(),e.removeListener("error",h),0===a(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",p),m()}function p(){o("onfinish"),e.removeListener("close",d),m()}function m(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r) e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),i.flowing||(o("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1} if(0===t.pipesCount)return this if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this if(!e){var n=t.pipes,i=t.pipesCount t.pipes=null,t.pipesCount=0,t.flowing=!1 for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(P,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t) return"readable"===e&&n.nextTick(R,this),r},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments) return"readable"!==e&&void 0!==e||n.nextTick(R,this),t},k.prototype.resume=function(){var e=this._readableState return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1 for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end() e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i)) for(var a=0;a-1))throw new _(e) return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new m("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var i=this._writableState return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,r(4),r(3))},function(e,t,r){"use strict" e.exports=c var n=r(38).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(39) function l(e,t){var r=this._transformState r.transforming=!1 var n=r.writecb if(null===n)return this.emit("error",new o) r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e) var i=this._readableState i.reading=!1,(i.needReadable||i.lengththis.length||e<0)){var t=this._offset(e) return this._bufs[t[0]][t[1]]}},i.prototype.slice=function(e,t){return"number"==typeof e&&e<0&&(e+=this.length),"number"==typeof t&&t<0&&(t+=this.length),this.copy(null,0,e,t)},i.prototype.copy=function(e,r,n,i){if(("number"!=typeof n||n<0)&&(n=0),("number"!=typeof i||i>this.length)&&(i=this.length),n>=this.length)return e||t.alloc(0) if(i<=0)return e||t.alloc(0) var o,a,s=!!e,u=this._offset(n),l=i-n,c=l,f=s&&r||0,h=u[1] if(0===n&&i==this.length){if(!s)return 1===this._bufs.length?this._bufs[0]:t.concat(this._bufs,this.length) for(a=0;a(o=this._bufs[a].length-h))){this._bufs[a].copy(e,f,h,h+c) break}this._bufs[a].copy(e,f,h),f+=o,c-=o,h&&(h=0)}return e},i.prototype.shallowSlice=function(e,t){if(e=e||0,t="number"!=typeof t?this.length:t,e<0&&(e+=this.length),t<0&&(t+=this.length),e===t)return new i var r=this._offset(e),n=this._offset(t),o=this._bufs.slice(r[0],n[0]+1) return 0==n[1]?o.pop():o[o.length-1]=o[o.length-1].slice(0,n[1]),0!=r[1]&&(o[0]=o[0].slice(r[1])),new i(o)},i.prototype.toString=function(e,t,r){return this.slice(t,r).toString(e)},i.prototype.consume=function(e){for(;this._bufs.length;){if(!(e>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(e),this.length-=e break}e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},i.prototype.duplicate=function(){for(var e=0,t=new i;ethis.length?this.length:r for(var o=this._offset(r),a=o[0],s=o[1];a=e.length){var l=u.indexOf(e,s) if(-1!==l)return this._reverseOffset([a,l]) s=u.length-e.length+1}else{var c=this._reverseOffset([a,s]) if(this._match(c,e))return c s++}s=0}return-1},i.prototype._match=function(e,t){if(this.length-e0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?e.emit("error",new w):x(e,s,t,!0) else if(s.ended)e.emit("error",new v) else{if(s.destroyed)return!1 s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?x(e,s,t,!1):O(e,s)):x(e,s,t,!1)}else n||(s.reading=!1,O(e,s)) return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(I,e))}function I(e){var t=e._readableState o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){o("readable nexttick read 0"),e.read(0)}function N(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r) var r}function L(e){var t=e._readableState o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(j,t,e))}function j(e,t){o("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function U(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):T(this),null if(0===(e=A(e,t))&&t.ended)return 0===t.length&&L(this),null var n,i=t.needReadable return o("need readable",i),(0===t.length||t.length-e0?B(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){this.emit("error",new b("_read()"))},k.prototype.pipe=function(e,t){var r=this,i=this._readableState switch(i.pipesCount){case 0:i.pipes=e break case 1:i.pipes=[i.pipes,e] break default:i.pipes.push(e)}i.pipesCount+=1,o("pipe count=%d opts=%j",i.pipesCount,t) var s=t&&!1===t.end||e===n.stdout||e===n.stderr?m:u function u(){o("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",(function t(n,a){o("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",f),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())})) var l=function(e){return function(){var t=e._readableState o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,D(e))}}(r) e.on("drain",l) var c=!1 function f(t){o("ondata") var n=e.write(t) o("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!c&&(o("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){o("onerror",t),m(),e.removeListener("error",h),0===a(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",p),m()}function p(){o("onfinish"),e.removeListener("close",d),m()}function m(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r) e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),i.flowing||(o("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1} if(0===t.pipesCount)return this if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this if(!e){var n=t.pipes,i=t.pipesCount t.pipes=null,t.pipesCount=0,t.flowing=!1 for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(P,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t) return"readable"===e&&n.nextTick(R,this),r},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments) return"readable"!==e&&void 0!==e||n.nextTick(R,this),t},k.prototype.resume=function(){var e=this._readableState return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1 for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end() e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i)) for(var a=0;a-1))throw new _(e) return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new m("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var i=this._writableState return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,r(4),r(3))},function(e,t,r){"use strict" e.exports=c var n=r(40).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(41) function l(e,t){var r=this._transformState r.transforming=!1 var n=r.writecb if(null===n)return this.emit("error",new o) r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e) var i=this._readableState i.reading=!1,(i.needReadable||i.lengtht?"7777777777777777777".slice(0,t)+" ":"0000000000000000000".slice(0,t-e.length)+e+" "},h=function(e,t,r){if(128&(e=e.slice(t,t+r))[t=0])return function(e){var t if(128===e[0])t=!0 else{if(255!==e[0])return null t=!1}for(var r=!1,n=[],i=e.length-1;i>0;i--){var o=e[i] t?n.push(o):r&&0===o?n.push(0):r?(r=!1,n.push(256-o)):n.push(255-o)}var a=0,s=n.length for(i=0;i=o?o:i>=0||(i+=o)>=0?i:0);t=Math.pow(10,n)&&n++,r+n+t} t.decodeLongPath=function(e,t){return d(e,0,e.length,t)},t.encodePax=function(t){var r="" t.name&&(r+=p(" path="+t.name+"\n")),t.linkname&&(r+=p(" linkpath="+t.linkname+"\n")) var n=t.pax if(n)for(var i in n)r+=p(" "+i+"="+n[i]+"\n") return e.from(r)},t.decodePax=function(e){for(var t={};e.length;){for(var r=0;r100;){var h=s.indexOf("/") if(-1===h)return null l+=l?"/"+s.slice(0,h):s.slice(0,h),s=s.slice(h+1)}return e.byteLength(s)>100||e.byteLength(l)>155||t.linkname&&e.byteLength(t.linkname)>100?null:(a.write(s),a.write(f(t.mode&u,6),100),a.write(f(t.uid,6),108),a.write(f(t.gid,6),116),a.write(f(t.size,11),124),a.write(f(t.mtime.getTime()/1e3|0,11),136),a[156]=n+function(e){switch(e){case"file":return 0 case"link":return 1 case"symlink":return 2 case"character-device":return 3 case"block-device":return 4 case"directory":return 5 case"fifo":return 6 case"contiguous-file":return 7 case"pax-header":return 72}return 0}(t.type),t.linkname&&a.write(t.linkname,157),i.copy(a,257),o.copy(a,263),t.uname&&a.write(t.uname,265),t.gname&&a.write(t.gname,297),a.write(f(t.devmajor||0,6),329),a.write(f(t.devminor||0,6),337),l&&a.write(l,345),a.write(f(c(a),6),148),a)},t.decode=function(e,t){var r=0===e[156]?0:e[156]-n,o=d(e,0,100,t),u=h(e,100,8),l=h(e,108,8),f=h(e,116,8),p=h(e,124,12),m=h(e,136,12),y=function(e){switch(e){case 0:return"file" case 1:return"link" case 2:return"symlink" case 3:return"character-device" case 4:return"block-device" case 5:return"directory" case 6:return"fifo" case 7:return"contiguous-file" case 72:return"pax-header" case 55:return"pax-global-header" case 27:return"gnu-long-link-path" case 28:case 30:return"gnu-long-path"}return null}(r),g=0===e[157]?null:d(e,157,100,t),v=d(e,265,32),b=d(e,297,32),w=h(e,329,8),_=h(e,337,8),S=c(e) if(256===S)return null if(S!==h(e,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?") if(0===i.compare(e,257,263))e[345]&&(o=d(e,345,155,t)+"/"+o) else if(0!==a.compare(e,257,263)||0!==s.compare(e,263,265))throw new Error("Invalid tar header: unknown format.") return 0===r&&o&&"/"===o[o.length-1]&&(r=5),{name:o,mode:u,uid:l,gid:f,size:p,mtime:new Date(1e3*m),type:y,linkname:g,uname:v,gname:b,devmajor:w,devminor:_}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t,n){var i e.exports=k,k.ReadableState=E,r(11).EventEmitter var o,a=function(e,t){return e.listeners(t).length},s=r(211),u=r(0).Buffer,l=t.Uint8Array||function(){},c=r(477) o=c&&c.debuglog?c.debuglog("stream"):function(){} var f,h,d=r(478),p=r(212),m=r(213).getHighWaterMark,y=r(43).codes,g=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,b=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,_=r(480).emitExperimentalWarning r(2)(k,s) var S=["error","close","destroy","pause","resume"] function E(e,t,n){i=i||r(44),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=m(this,e,"readableHighWaterMark",n),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(10).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function k(e){if(i=i||r(44),!(this instanceof k))return new k(e) var t=this instanceof i this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function M(e,t,r,n,i){o("readableAddChunk",t) var a,s=e._readableState if(null===t)s.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end() r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?T(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,I(e)))}}(e,s) else if(i||(a=function(e,t){var r,n return n=t,u.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),a)e.emit("error",a) else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?e.emit("error",new w):x(e,s,t,!0) else if(s.ended)e.emit("error",new v) else{if(s.destroyed)return!1 s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?x(e,s,t,!1):O(e,s)):x(e,s,t,!1)}else n||(s.reading=!1,O(e,s)) return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=8388608?e=8388608:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function T(e){var t=e._readableState t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(I,e))}function I(e){var t=e._readableState o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||e.emit("readable"),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function O(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function P(e){o("readable nexttick read 0"),e.read(0)}function N(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r) var r}function L(e){var t=e._readableState o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(j,t,e))}function j(e,t){o("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function U(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?L(this):T(this),null if(0===(e=A(e,t))&&t.ended)return 0===t.length&&L(this),null var n,i=t.needReadable return o("need readable",i),(0===t.length||t.length-e0?B(e,t):null)?(t.needReadable=!0,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&L(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){this.emit("error",new b("_read()"))},k.prototype.pipe=function(e,t){var r=this,i=this._readableState switch(i.pipesCount){case 0:i.pipes=e break case 1:i.pipes=[i.pipes,e] break default:i.pipes.push(e)}i.pipesCount+=1,o("pipe count=%d opts=%j",i.pipesCount,t) var s=t&&!1===t.end||e===n.stdout||e===n.stderr?m:u function u(){o("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",(function t(n,a){o("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",f),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())})) var l=function(e){return function(){var t=e._readableState o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,D(e))}}(r) e.on("drain",l) var c=!1 function f(t){o("ondata") var n=e.write(t) o("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==U(i.pipes,e))&&!c&&(o("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){o("onerror",t),m(),e.removeListener("error",h),0===a(e,"error")&&e.emit("error",t)}function d(){e.removeListener("finish",p),m()}function p(){o("onfinish"),e.removeListener("close",d),m()}function m(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r) e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),i.flowing||(o("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1} if(0===t.pipesCount)return this if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this if(!e){var n=t.pipes,i=t.pipesCount t.pipes=null,t.pipesCount=0,t.flowing=!1 for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?T(this):i.reading||n.nextTick(P,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t) return"readable"===e&&n.nextTick(R,this),r},k.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments) return"readable"!==e&&void 0!==e||n.nextTick(R,this),t},k.prototype.resume=function(){var e=this._readableState return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(N,e,t))}(this,e)),e.paused=!1,this},k.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1 for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end() e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i)) for(var a=0;a-1))throw new _(e) return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new m("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var i=this._writableState return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,O(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,r(4),r(3))},function(e,t,r){"use strict" e.exports=c var n=r(43).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(44) function l(e,t){var r=this._transformState r.transforming=!1 var n=r.writecb if(null===n)return this.emit("error",new o) r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e) var i=this._readableState i.reading=!1,(i.needReadable||i.length=400||!r.statusCode)return function(e,t){var r=new Error("Server responded with ".concat(e.statusCode)) h(e,(function(e,n){if(e)return t(e) n&&(r.code=n.Code,r.message=n.Message||n.toString(),r.type=n.Type),t(r)}))}(r,t) if(n&&!e)return t(null,r) if(i&&o){var a=s.parse() return u(r,a),r.on("end",(function(){var e=r.trailers["x-stream-error"] if(e){try{e=JSON.parse(e)}catch(t){e={Message:e}}a.emit("error",new Error(e.Message))}})),t(null,a)}return o?h(r,t):f(r,t)}}e.exports=function(e){var r=function(r,s){return"object"!==n(r)?s(new Error("no options were passed")):function(e,r,n){n=l(n),r.qs=r.qs||{},Array.isArray(r.path)&&(r.path=r.path.join("/")),r.args&&!Array.isArray(r.args)&&(r.args=[r.args]),r.args&&(r.qs.arg=r.args),r.progress&&(r.qs.progress=!0),r.qs.r&&(r.qs.recursive=r.qs.r,delete r.qs.r),r.qs["stream-channels"]=!0,r.stream&&(r.buffer=!1),delete r.qs.followSymlinks var s=Object.assign({},e.headers) if(a&&(s["User-Agent"]=e["user-agent"]),r.multipart){if(!r.multipartBoundary)return n(new Error("No multipartBoundary")) s["Content-Type"]="multipart/form-data; boundary=".concat(r.multipartBoundary)}var u=i.stringify(r.qs,{arrayFormat:"repeat",encoder:function(e){if(t.isBuffer(e)){var r="",n=!0,i=!1,a=void 0 try{for(var s,u=e[Symbol.iterator]();!(n=(s=u.next()).done);n=!0){var l=s.value if(l>=65&&l<=90||l>=97&&l<=122||l>=48&&l<=57||45===l||46===l||95===l||126===l)r+=String.fromCharCode(l) else{var c=l.toString(16),f=1===c.length?"0".concat(c):c r+="%".concat(f)}}}catch(e){i=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(i)throw a}}return r}return o(e)}}),f={hostname:e.host,path:"".concat(e["api-path"]).concat(r.path,"?").concat(u),port:e.port,method:"POST",headers:s,protocol:"".concat(e.protocol,":")},h=c(f,p(r.buffer,n)) return h.on("error",(function(e){n(e)})),r.stream||h.end(),h}(e,r,s)} return r.andTransform=function(e,t,n){return r(e,(function(e,r){if(e)return n(e) t(r,n)}))},r}}).call(this,r(0).Buffer)},function(e,t,r){"use strict" var n=String.prototype.replace,i=/%20/g e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,r){"use strict";(function(t,n){var i e.exports=M,M.ReadableState=k,r(11).EventEmitter var o,a=function(e,t){return e.listeners(t).length},s=r(222),u=r(0).Buffer,l=t.Uint8Array||function(){},c=r(497) o=c&&c.debuglog?c.debuglog("stream"):function(){} var f,h,d,p=r(498),m=r(223),y=r(224).getHighWaterMark,g=r(45).codes,v=g.ERR_INVALID_ARG_TYPE,b=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,_=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT r(2)(M,s) var S=m.errorOrDestroy,E=["error","close","destroy","pause","resume"] function k(e,t,n){i=i||r(46),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=y(this,e,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(10).StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function M(e){if(i=i||r(46),!(this instanceof M))return new M(e) var t=this instanceof i this._readableState=new k(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function x(e,t,r,n,i){o("readableAddChunk",t) var a,s=e._readableState if(null===t)s.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end() r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?I(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,O(e)))}}(e,s) else if(i||(a=function(e,t){var r,n return n=t,u.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new v("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),a)S(e,a) else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?S(e,new _):A(e,s,t,!0) else if(s.ended)S(e,new b) else{if(s.destroyed)return!1 s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):C(e,s)):A(e,s,t,!1)}else n||(s.reading=!1,C(e,s)) return!s.ended&&(s.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=1073741824?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function I(e){var t=e._readableState o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(O,e))}function O(e){var t=e._readableState o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,B(e)}function C(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function D(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r) var r}function j(e){var t=e._readableState o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(U,t,e))}function U(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function F(e,t){for(var r=0,n=e.length;r=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?j(this):I(this),null if(0===(e=T(e,t))&&t.ended)return 0===t.length&&j(this),null var n,i=t.needReadable return o("need readable",i),(0===t.length||t.length-e0?L(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&j(this)),null!==n&&this.emit("data",n),n},M.prototype._read=function(e){S(this,new w("_read()"))},M.prototype.pipe=function(e,t){var r=this,i=this._readableState switch(i.pipesCount){case 0:i.pipes=e break case 1:i.pipes=[i.pipes,e] break default:i.pipes.push(e)}i.pipesCount+=1,o("pipe count=%d opts=%j",i.pipesCount,t) var s=t&&!1===t.end||e===n.stdout||e===n.stderr?m:u function u(){o("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",(function t(n,a){o("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",f),c=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||l())})) var l=function(e){return function(){var t=e._readableState o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,B(e))}}(r) e.on("drain",l) var c=!1 function f(t){o("ondata") var n=e.write(t) o("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==F(i.pipes,e))&&!c&&(o("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function h(t){o("onerror",t),m(),e.removeListener("error",h),0===a(e,"error")&&S(e,t)}function d(){e.removeListener("finish",p),m()}function p(){o("onfinish"),e.removeListener("close",d),m()}function m(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r) e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),i.flowing||(o("pipe resume"),r.resume()),e},M.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1} if(0===t.pipesCount)return this if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this if(!e){var n=t.pipes,i=t.pipesCount t.pipes=null,t.pipesCount=0,t.flowing=!1 for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,o("on readable",i.length,i.reading),i.length?I(this):i.reading||n.nextTick(N,this))),r},M.prototype.addListener=M.prototype.on,M.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t) return"readable"===e&&n.nextTick(P,this),r},M.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments) return"readable"!==e&&void 0!==e||n.nextTick(P,this),t},M.prototype.resume=function(){var e=this._readableState return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(D,e,t))}(this,e)),e.paused=!1,this},M.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},M.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1 for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end() e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i)) for(var a=0;a-1))throw new _(e) return this._writableState.defaultEncoding=e,this},Object.defineProperty(M.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(M.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),M.prototype._write=function(e,t,r){r(new m("_write()"))},M.prototype._writev=null,M.prototype.end=function(e,t,r){var i=this._writableState return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||function(e,t,r){t.ending=!0,C(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,i,r),this},Object.defineProperty(M.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(M.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),M.prototype.destroy=f.destroy,M.prototype._undestroy=f.undestroy,M.prototype._destroy=function(e,t){t(e)}}).call(this,r(4),r(3))},function(e,t,r){"use strict" e.exports=c var n=r(45).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(46) function l(e,t){var r=this._transformState r.transforming=!1 var n=r.writecb if(null===n)return this.emit("error",new o) r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e) var i=this._readableState i.reading=!1,(i.needReadable||i.length0)return i(new Error("path out of scope")) if("object"===n(t.value)&&t.value["/"]){var r try{r=o.isCID(new o(t.value["/"]))}catch(e){r=!1}if(r)return i(null,t.value)}i(null,!1)}))}},function(e,t,r){"use strict" t.util=r(233),t.resolver=r(237)},function(e,t,r){"use strict";(function(n,i){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var a=r(546),s=r(63),u=r(6),l=r(550),c=r(237) function f(e){return"string"==typeof e?e=new u(e).buffer:u.isCID(e)&&(e=e.buffer),new a.Tagged(42,n.concat([n.from("00","hex"),e]))}var h,d,p=new a.Decoder({tags:(h={},42,d=function(e){return e=e.slice(1),new u(e)},42 in h?Object.defineProperty(h,42,{value:d,enumerable:!0,configurable:!0,writable:!0}):h[42]=d,h)});(t=e.exports).serialize=function(e,t){var r try{var s=function(e){var t try{t=l(e)}catch(e){t=!1}if(t)throw new Error("The object passed has circular references") return function e(t){if(!t||n.isBuffer(t)||"string"==typeof t)return t if(Array.isArray(t))return t.map(e) if(u.isCID(t))return f(t) var r=Object.keys(t) if(1===r.length&&"/"===r[0])return f(t["/"]) if(r.length>0){var i={} return r.forEach((function(r){"object"===o(t[r])?i[r]=e(t[r]):i[r]=t[r]})),i}return t}(e)}(e) r=a.encode(s)}catch(e){return i((function(){return t(e)}))}i((function(){return t(null,r)}))},t.deserialize=function(e,t){var r try{r=p.decodeFirst(e)}catch(e){return i((function(){return t(e)}))}i((function(){return t(null,r)}))},t.cid=function(e,r,n){"function"==typeof r&&(n=r,r={}) var i=(r=r||{}).hashAlg||c.defaultHashAlg,o=r.hashLen,a=void 0===r.version?1:r.version t.serialize(e,(function(e,t){if(e)return n(e) s(t,i,o,(function(e,t){if(e)return n(e) n(null,new u(a,c.multicodec,t))}))}))}}).call(this,r(0).Buffer,r(25).setImmediate)},function(e,t,r){"use strict";(function(t,n){function i(e,t){for(var r=0;r0)throw new Error("Missing ".concat(e.length," elements")) switch(e.type){case l.PARENT.TAG:this._push(this.createTag(e.ref[0],e.ref[1])) break case l.PARENT.BYTE_STRING:this._push(this.createByteString(e.ref,e.length)) break case l.PARENT.UTF8_STRING:this._push(this.createUtf8String(e.ref,e.length)) break case l.PARENT.MAP:if(e.values%2>0)throw new Error("Odd number of elements in the map") this._push(this.createMap(e.ref,e.length)) break case l.PARENT.OBJECT:if(e.values%2>0)throw new Error("Odd number of elements in the map") this._push(this.createObject(e.ref,e.length)) break case l.PARENT.ARRAY:this._push(this.createArray(e.ref,e.length))}this._currentParent&&this._currentParent.type===l.PARENT.TAG&&this._dec()}},{key:"_dec",value:function(){var e=this._currentParent e.length<0||(e.length--,0===e.length&&this._closeParent())}},{key:"_push",value:function(e,t){var r=this._currentParent switch(r.values++,r.type){case l.PARENT.ARRAY:case l.PARENT.BYTE_STRING:case l.PARENT.UTF8_STRING:r.length>-1?this._ref[this._ref.length-r.length]=e:this._ref.push(e),this._dec() break case l.PARENT.OBJECT:null!=r.tmpKey?(this._ref[r.tmpKey]=e,r.tmpKey=null,this._dec()):(r.tmpKey=e,"string"!=typeof r.tmpKey&&(r.type=l.PARENT.MAP,r.ref=u.buildMap(r.ref))) break case l.PARENT.MAP:null!=r.tmpKey?(this._ref.set(r.tmpKey,e),r.tmpKey=null,this._dec()):r.tmpKey=e break case l.PARENT.TAG:this._ref.push(e),t||this._dec() break default:throw new Error("Unknown parent type")}}},{key:"_createParent",value:function(e,t,r){this._parents[this._depth]={type:t,length:r,ref:e,values:0,tmpKey:null}}},{key:"_reset",value:function(){this._res=[],this._parents=[{type:l.PARENT.ARRAY,length:-1,ref:this._res,values:0,tmpKey:null}]}},{key:"createTag",value:function(e,t){var r=this._knownTags[e] return r?r(t):new f(e,t)}},{key:"createMap",value:function(e,t){return e}},{key:"createObject",value:function(e,t){return e}},{key:"createArray",value:function(e,t){return e}},{key:"createByteString",value:function(e,r){return t.concat(e)}},{key:"createByteStringFromHeap",value:function(e,r){return e===r?t.alloc(0):t.from(this._heap.slice(e,r))}},{key:"createInt",value:function(e){return e}},{key:"createInt32",value:function(e,t){return u.buildInt32(e,t)}},{key:"createInt64",value:function(e,t,r,n){return u.buildInt64(e,t,r,n)}},{key:"createFloat",value:function(e){return e}},{key:"createFloatSingle",value:function(e,t,r,n){return o.read([e,t,r,n],0,!1,23,4)}},{key:"createFloatDouble",value:function(e,t,r,n,i,a,s,u){return o.read([e,t,r,n,i,a,s,u],0,!1,52,8)}},{key:"createInt32Neg",value:function(e,t){return-1-u.buildInt32(e,t)}},{key:"createInt64Neg",value:function(e,t,r,n){var i=u.buildInt32(e,t),o=u.buildInt32(r,n) return i>l.MAX_SAFE_HIGH?l.NEG_ONE.minus(new a(i).times(l.SHIFT32).plus(o)):-1-(i*l.SHIFT32+o)}},{key:"createTrue",value:function(){return!0}},{key:"createFalse",value:function(){return!1}},{key:"createNull",value:function(){return null}},{key:"createUndefined",value:function(){}},{key:"createInfinity",value:function(){return 1/0}},{key:"createInfinityNeg",value:function(){return-1/0}},{key:"createNaN",value:function(){return NaN}},{key:"createNaNNeg",value:function(){return NaN}},{key:"createUtf8String",value:function(e,t){return e.join("")}},{key:"createUtf8StringFromHeap",value:function(e,t){return e===t?"":this._buffer.toString("utf8",e,t)}},{key:"createSimpleUnassigned",value:function(e){return new c(e)}},{key:"pushInt",value:function(e){this._push(this.createInt(e))}},{key:"pushInt32",value:function(e,t){this._push(this.createInt32(e,t))}},{key:"pushInt64",value:function(e,t,r,n){this._push(this.createInt64(e,t,r,n))}},{key:"pushFloat",value:function(e){this._push(this.createFloat(e))}},{key:"pushFloatSingle",value:function(e,t,r,n){this._push(this.createFloatSingle(e,t,r,n))}},{key:"pushFloatDouble",value:function(e,t,r,n,i,o,a,s){this._push(this.createFloatDouble(e,t,r,n,i,o,a,s))}},{key:"pushInt32Neg",value:function(e,t){this._push(this.createInt32Neg(e,t))}},{key:"pushInt64Neg",value:function(e,t,r,n){this._push(this.createInt64Neg(e,t,r,n))}},{key:"pushTrue",value:function(){this._push(this.createTrue())}},{key:"pushFalse",value:function(){this._push(this.createFalse())}},{key:"pushNull",value:function(){this._push(this.createNull())}},{key:"pushUndefined",value:function(){this._push(this.createUndefined())}},{key:"pushInfinity",value:function(){this._push(this.createInfinity())}},{key:"pushInfinityNeg",value:function(){this._push(this.createInfinityNeg())}},{key:"pushNaN",value:function(){this._push(this.createNaN())}},{key:"pushNaNNeg",value:function(){this._push(this.createNaNNeg())}},{key:"pushArrayStart",value:function(){this._createParent([],l.PARENT.ARRAY,-1)}},{key:"pushArrayStartFixed",value:function(e){this._createArrayStartFixed(e)}},{key:"pushArrayStartFixed32",value:function(e,t){var r=u.buildInt32(e,t) this._createArrayStartFixed(r)}},{key:"pushArrayStartFixed64",value:function(e,t,r,n){var i=u.buildInt64(e,t,r,n) this._createArrayStartFixed(i)}},{key:"pushObjectStart",value:function(){this._createObjectStartFixed(-1)}},{key:"pushObjectStartFixed",value:function(e){this._createObjectStartFixed(e)}},{key:"pushObjectStartFixed32",value:function(e,t){var r=u.buildInt32(e,t) this._createObjectStartFixed(r)}},{key:"pushObjectStartFixed64",value:function(e,t,r,n){var i=u.buildInt64(e,t,r,n) this._createObjectStartFixed(i)}},{key:"pushByteStringStart",value:function(){this._parents[this._depth]={type:l.PARENT.BYTE_STRING,length:-1,ref:[],values:0,tmpKey:null}}},{key:"pushByteString",value:function(e,t){this._push(this.createByteStringFromHeap(e,t))}},{key:"pushUtf8StringStart",value:function(){this._parents[this._depth]={type:l.PARENT.UTF8_STRING,length:-1,ref:[],values:0,tmpKey:null}}},{key:"pushUtf8String",value:function(e,t){this._push(this.createUtf8StringFromHeap(e,t))}},{key:"pushSimpleUnassigned",value:function(e){this._push(this.createSimpleUnassigned(e))}},{key:"pushTagStart",value:function(e){this._parents[this._depth]={type:l.PARENT.TAG,length:1,ref:[e]}}},{key:"pushTagStart4",value:function(e,t){this.pushTagStart(u.buildInt32(e,t))}},{key:"pushTagStart8",value:function(e,t,r,n){this.pushTagStart(u.buildInt64(e,t,r,n))}},{key:"pushTagUnassigned",value:function(e){this._push(this.createTag(e))}},{key:"pushBreak",value:function(){if(this._currentParent.length>-1)throw new Error("Unexpected break") this._closeParent()}},{key:"_createObjectStartFixed",value:function(e){0!==e?this._createParent({},l.PARENT.OBJECT,e):this._push(this.createObject({}))}},{key:"_createArrayStartFixed",value:function(e){0!==e?this._createParent(new Array(e),l.PARENT.ARRAY,e):this._push(this.createArray([]))}},{key:"_decode",value:function(e){if(0===e.byteLength)throw new Error("Input too short") this._reset(),this._heap8.set(e) var t=this.parser.parse(e.byteLength) if(this._depth>1){for(;0===this._currentParent.length;)this._closeParent() if(this._depth>1)throw new Error("Undeterminated nesting")}if(t>0)throw new Error("Failed to parse") if(0===this._res.length)throw new Error("No valid result")}},{key:"decodeFirst",value:function(e){return this._decode(e),this._res[0]}},{key:"decodeAll",value:function(e){return this._decode(e),this._res}},{key:"_depth",get:function(){return this._parents.length}},{key:"_currentParent",get:function(){return this._parents[this._depth-1]}},{key:"_ref",get:function(){return this._currentParent.ref}}])&&i(r.prototype,d),p&&i(r,p),e}() d.decodeFirst=d.decode,e.exports=d}).call(this,r(0).Buffer,r(4))},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r255||(0|t)!==t)throw new Error("value must be a small positive integer: "+t) this.value=t}var t,r,o return t=e,o=[{key:"isSimple",value:function(t){return t instanceof e}},{key:"decode",value:function(t,r){switch(null==r&&(r=!0),t){case s.FALSE:return!1 case s.TRUE:return!0 case s.NULL:return r?null:u.NULL case s.UNDEFINED:return r?void 0:u.UNDEFINED case-1:if(!r)throw new Error("Invalid BREAK") return u.BREAK default:return new e(t)}}}],(r=[{key:"toString",value:function(){return"simple("+this.value+")"}},{key:"inspect",value:function(){return"simple("+this.value+")"}},{key:"encodeCBOR",value:function(e){return e._pushInt(this.value,a.SIMPLE_FLOAT)}}])&&i(t.prototype,r),o&&i(t,o),e}() e.exports=l},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r0?n(new Error("path out of scope")):void(a.isCID(t.value)?n(null,t.value):n(null,!1))}))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e,t,r){var i,o=e instanceof Error?e:new Error(e) if("object"===n(t)?r=t:null!=t&&(o.code=t),r)for(i in r)o[i]=r[i] return o}},function(e,t,r){"use strict" var n=r(1),i=r(5) e.exports=function(e){var t=i(e) return n((function(e){t({path:"shutdown"},e)}))}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(645),o=r(646) e.exports=function(e){if("string"==typeof e||"number"==typeof e){var t=new i(1),r=String(e).toLowerCase().trim(),a="0x"===r.substr(0,2)||"-0x"===r.substr(0,3),s=o(r) if("-"===s.substr(0,1)&&(s=o(s.slice(1)),t=new i(-1,10)),!(s=""===s?"0":s).match(/^-?[0-9]+$/)&&s.match(/^[0-9A-Fa-f]+$/)||s.match(/^[a-fA-F]+$/)||!0===a&&s.match(/^[0-9A-Fa-f]+$/))return new i(s,16).mul(t) if((s.match(/^-?[0-9]+$/)||""===s)&&!1===a)return new i(s,10).mul(t)}else if("object"===n(e)&&e.toString&&!e.pop&&!e.push&&e.toString(10).match(/^-?[0-9]+$/)&&(e.mul||e.dividedToIntegerBy))return new i(e.toString(10),10) throw new Error("[number-to-bn] while converting number "+JSON.stringify(e)+" to BN.js instance, error: invalid number value. Value must be an integer, hex string, BN or BigNumber instance. Note, decimals are not supported.")}},function(e,t,r){(function(t){var n=r(124),i=r(65),o=r(240),a=r(648),s=r(649),u=r(650),l=function(e){return i.isBN(e)},c=function(e){return e&&e.constructor&&"BigNumber"===e.constructor.name},f=function(e){try{return o.apply(null,arguments)}catch(t){throw new Error(t+' Given value: "'+e+'"')}},h=function(e){return!!/^(0x)?[0-9a-f]{40}$/i.test(e)&&(!(!/^(0x|0X)?[0-9a-f]{40}$/.test(e)&&!/^(0x|0X)?[0-9A-F]{40}$/.test(e))||d(e))},d=function(e){e=e.replace(/^0x/i,"") for(var t=b(e.toLowerCase()).replace(/^0x/i,""),r=0;r<40;r++)if(parseInt(t[r],16)>7&&e[r].toUpperCase()!==e[r]||parseInt(t[r],16)<=7&&e[r].toLowerCase()!==e[r])return!1 return!0},p=function(e){var t="" e=(e=(e=(e=(e=a.encode(e)).replace(/^(?:\u0000)*/,"")).split("").reverse().join("")).replace(/^(?:\u0000)*/,"")).split("").reverse().join("") for(var r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16)) return"0x"+t.join("")},isHex:function(e){return(n.isString(e)||n.isNumber(e))&&/^(-0x|0x)?[0-9a-f]*$/i.test(e)},isHexStrict:g,leftPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0 return(n?"0x":"")+new Array(i).join(r||"0")+e},rightPad:function(e,t,r){var n=/^0x/i.test(e)||"number"==typeof e,i=t-(e=e.toString(16).replace(/^0x/i,"")).length+1>=0?t-e.length+1:0 return(n?"0x":"")+e+new Array(i).join(r||"0")},toTwosComplement:function(e){return"0x"+f(e).toTwos(256).toString(16,64)},sha3:b,sha3Raw:function(e){return null===(e=b(e))?v:e}}}).call(this,r(0).Buffer)},,,function(e,t,r){(function(r){var n,i,o,a function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}a=function(){return function e(t,r,n){function i(a,s){if(!r[a]){if(!t[a]){if(o)return o(a,!0) var u=new Error("Cannot find module '"+a+"'") throw u.code="MODULE_NOT_FOUND",u}var l=r[a]={exports:{}} t[a][0].call(l.exports,(function(e){return i(t[a][1][e]||e)}),l,l.exports,e,t,r,n)}return r[a].exports}for(var o=!1,a=0;as[e]||console.log.apply(console,t)}function c(){for(var e=[],t=0;t>4]+u[15&n])}return t.join("")}}),f={16:10,24:12,32:14},h=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],d=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],p=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],m=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],y=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],v=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],b=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],w=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],_=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],S=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],E=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],k=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],M=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],x=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925] function A(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=o[t],this._Kd[e-r][t%4]=o[t] for(var a,s=0,u=i;u>16&255]<<24^d[a>>8&255]<<16^d[255&a]<<8^d[a>>24&255]^h[s]<<24,s+=1,8!=i)for(t=1;t>8&255]<<8^d[a>>16&255]<<16^d[a>>24&255]<<24,t=i/2+1;t>2,c=u%4,this._Ke[l][c]=o[t],this._Kd[e-l][c]=o[t++],u++}for(var l=1;l>24&255]^k[a>>16&255]^M[a>>8&255]^x[255&a]},T.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)") for(var t=this._Ke.length-1,r=[0,0,0,0],n=A(e),i=0;i<4;i++)n[i]^=this._Ke[0][i] for(var o=1;o>24&255]^y[n[(i+1)%4]>>16&255]^g[n[(i+2)%4]>>8&255]^v[255&n[(i+3)%4]]^this._Ke[o][i] n=r.slice()}var s,u=a(16) for(i=0;i<4;i++)s=this._Ke[t][i],u[4*i]=255&(d[n[i]>>24&255]^s>>24),u[4*i+1]=255&(d[n[(i+1)%4]>>16&255]^s>>16),u[4*i+2]=255&(d[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(d[255&n[(i+3)%4]]^s) return u},T.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)") for(var t=this._Kd.length-1,r=[0,0,0,0],n=A(e),i=0;i<4;i++)n[i]^=this._Kd[0][i] for(var o=1;o>24&255]^w[n[(i+3)%4]>>16&255]^_[n[(i+2)%4]>>8&255]^S[255&n[(i+1)%4]]^this._Kd[o][i] n=r.slice()}var s,u=a(16) for(i=0;i<4;i++)s=this._Kd[t][i],u[4*i]=255&(p[n[i]>>24&255]^s>>24),u[4*i+1]=255&(p[n[(i+3)%4]>>16&255]^s>>16),u[4*i+2]=255&(p[n[(i+2)%4]>>8&255]^s>>8),u[4*i+3]=255&(p[255&n[(i+1)%4]]^s) return u} var I=function e(t){if(!(this instanceof e))throw Error("AES must be instanitated with `new`") this.description="Electronic Code Block",this.name="ecb",this._aes=new T(t)} I.prototype.encrypt=function(e){if((e=o(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)") for(var t=a(e.length),r=a(16),n=0;n>=8},P.prototype.setBytes=function(e){if(16!=(e=o(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)") this._counter=e},P.prototype.increment=function(){for(var e=15;0<=e;e--){if(255!==this._counter[e]){this._counter[e]++ break}this._counter[e]=0}} var N=function e(t,r){if(!(this instanceof e))throw Error("AES must be instanitated with `new`") this.description="Counter",this.name="ctr",r instanceof P||(r=new P(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new T(t)} N.prototype.encrypt=function(e){for(var t=o(e,!0),r=0;r>>26-s&67108863,26<=(s+=24)&&(s-=26,o++) else if("le"===r)for(o=i=0;i>>26-s&67108863,26<=(s+=24)&&(s-=26,o++) return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length) for(var r=0;r>>26-o&4194303,26<=(o+=24)&&(o-=26,n++) r+6!==t&&(i=u(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0] for(var n=0,i=this.length=1;i<=67108863;i*=t)n++ n--,i=i/t|0 for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c"} 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],h=[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(e,t,r){r.negative=t.negative^e.negative var n=e.length+t.length|0 n=(r.length=n)-1|0 var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0 r.words[0]=s for(var l=1;l>>26,f=67108863&u,h=Math.min(l,t.length-1),d=Math.max(0,l-e.length+1);d<=h;d++){var p=l-d|0 c+=(a=(i=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r if(t=0|t||1,16===(e=e||10)||"hex"===e){r="" for(var i=0,o=0,a=0;a>>24-i&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,26<=(i+=2)&&(i-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&2<=e&&e<=36){var l=f[e],d=h[e] r="" var p=this.clone() for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e) r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0] return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2>>=13),64<=t&&(r+=7,t>>>=7),8<=t&&(r+=4,t>>>=4),2<=t&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26 var t=e,r=0 return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e) return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0 for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t t=this.length>e.length?e:this for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r r=this.length>e.length?(t=this,e):(t=e,this) for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&0<=e) var t=0|Math.ceil(e/26),r=e%26 this._expand(t),0>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&0<=e) var r=e/26|0,i=e%26 return this._expand(1+r),this.words[r]=t?this.words[r]|1<e.length?(r=this,e):(r=e,this) for(var i=0,o=0;o>>26 for(;0!==i&&o>>26 if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++ else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0 var t=this.iadd(e) return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign() var r,n,i=this.cmp(e) if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this n=0>26,this.words[a]=67108863&t for(;0!==o&&a>26,this.words[a]=67108863&t if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],E=8191&S,k=S>>>13,M=0|a[5],x=8191&M,A=M>>>13,T=0|a[6],I=8191&T,O=T>>>13,C=0|a[7],R=8191&C,P=C>>>13,N=0|a[8],D=8191&N,B=N>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],z=8191&F,H=F>>>13,V=0|s[1],K=8191&V,q=V>>>13,G=0|s[2],W=8191&G,Y=G>>>13,Z=0|s[3],J=8191&Z,$=Z>>>13,Q=0|s[4],X=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,he=ce>>>13,de=0|s[9],pe=8191&de,me=de>>>13 r.negative=e.negative^t.negative,r.length=19 var ye=(l+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,z)|0))<<13)|0 l=((o=Math.imul(h,H))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(m,z)|0,o=Math.imul(m,H) var ge=(l+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,K)|0))<<13)|0 l=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(v,z)|0,o=Math.imul(v,H),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,q)|0 var ve=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(h,W)|0))<<13)|0 l=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(_,z)|0,o=Math.imul(_,H),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,q)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0 var be=(l+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(h,J)|0))<<13)|0 l=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,H))+Math.imul(k,z)|0,o=Math.imul(k,H),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,q)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,$)|0 var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,X)|0))<<13)|0 l=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,H))+Math.imul(A,z)|0,o=Math.imul(A,H),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,$)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0 var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0 l=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0 var Se=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(h,oe)|0))<<13)|0 l=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,H))+Math.imul(P,z)|0,o=Math.imul(P,H),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,q)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0 var Ee=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(h,ue)|0))<<13)|0 l=((o=o+Math.imul(h,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,H))+Math.imul(B,z)|0,o=Math.imul(B,H),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,q)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0 var ke=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0 l=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,z),i=(i=Math.imul(j,H))+Math.imul(U,z)|0,o=Math.imul(U,H),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,le)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,he)|0 var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(h,pe)|0))<<13)|0 l=((o=o+Math.imul(h,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,q))+Math.imul(U,K)|0,o=Math.imul(U,q),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(v,fe)|0,o=o+Math.imul(v,he)|0 var xe=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0 l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,W),i=(i=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,he)|0 var Ae=(l+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(v,pe)|0))<<13)|0 l=((o=o+Math.imul(v,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,$))+Math.imul(U,J)|0,o=Math.imul(U,$),n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,he)|0 var Te=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0 l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(U,X)|0,o=Math.imul(U,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,he)|0 var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0 l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,he)|0 var Oe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0 l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,le)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,he)|0 var Ce=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(O,pe)|0))<<13)|0 l=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(U,ue)|0,o=Math.imul(U,le),n=n+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,he)|0 var Re=(l+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0 l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,he))+Math.imul(U,fe)|0,o=Math.imul(U,he) var Pe=(l+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(B,pe)|0))<<13)|0 l=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863 var Ne=(l+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(U,pe)|0))<<13)|0 return l=((o=Math.imul(U,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ye,u[1]=ge,u[2]=ve,u[3]=be,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Te,u[13]=Ie,u[14]=Oe,u[15]=Ce,u[16]=Re,u[17]=Pe,u[18]=Ne,0!==l&&(u[19]=l,r.length++),r} function m(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=d),o.prototype.mulTo=function(e,t){var r=this.length+e.length return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n>=1 return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++ return 1<>>=13,r[2*a+1]=8191&o,o>>>=13 for(a=2*t;a>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e) if(0===t.length)return new o(1) for(var r=this,n=0;n>>26-r<<26-r if(0!=r){var a=0 for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!=i){for(t=this.length-1;0<=t;t--)this.words[t+i]=this.words[t] for(t=0;t>>o<a)for(this.length-=a,l=0;l>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&0<=e) var t=e%26,r=(e-t)/26,i=1<>>t<>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o if(0===s)return this.strip() for(n(-1===s),i=s=0;i>26,this.words[i]=67108863&o return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,a=0|i.words[i.length-1] 0!=(r=26-this._countBits(a))&&(i=i.ushln(r),n.iushln(r),a=0|i.words[i.length-1]) var s,u=n.length-i.length if("mod"!==t){(s=new o(null)).length=1+u,s.words=new Array(s.length) for(var l=0;lthis.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t) var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e) if(t.mod.isZero())return t.div var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n) return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863) for(var t=(1<<26)%e,r=0,i=this.length-1;0<=i;i--)r=(t*r+(0|this.words[i]))%e return r},o.prototype.idivn=function(e){n(e<=67108863) for(var t=0,r=this.length-1;0<=r;r--){var i=(0|this.words[r])+67108864*t this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero()) var t=this,r=e.clone() t=0!==t.negative?t.umod(e):t.clone() for(var i=new o(1),a=new o(0),s=new o(0),u=new o(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l for(var c=r.clone(),f=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(0>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0 if(0!==this.negative&&!r)return-1 if(0===this.negative&&r)return 1 if(this.strip(),1e.length)return 1 if(this.lengththis.n;);var n=t>>22,i=o}i>>>=22,0===(e.words[n-10]=i)&&10>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e] var t if("k256"===e)t=new b else if("p224"===e)t=new w else if("p192"===e)t=new _ else{if("p25519"!==e)throw new Error("Unknown prime "+e) t=new S}return g[e]=t},E.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t) var r=e.add(t) return 0<=r.cmp(this.m)&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t) var r=e.iadd(t) return 0<=r.cmp(this.m)&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t) var r=e.sub(t) return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t) var r=e.isub(t) return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone() var t=this.m.andln(3) if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2) return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1) n(!i.isZero()) var s=new o(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength() for(c=new o(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u) for(var f=this.pow(c,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=a;0!==d.cmp(s);){for(var m=d,y=0;0!==m.cmp(s);y++)m=m.redSqr() n(y>c&1 i!==r[0]&&(i=this.sqr(i)),0!=f||0!==a?(a<<=1,a|=f,(4==++s||0===n&&0===c)&&(i=this.mul(i,r[a]),a=s=0)):s=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m) return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone() return t.red=null,t},o.mont=function(e){return new k(e)},i(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv)) return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i return 0<=i.cmp(this.m)?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this) var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i return 0<=i.cmp(this.m)?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===t||t,this)},{buffer:11}],10:[function(e,t,n){(function(e){t.exports=function(t){var r=new Uint8Array(t) return(e.crypto||e.msCrypto).getRandomValues(r),r}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(e,t,r){},{}],12:[function(e,t,r){"use strict" var n=r n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":25,"./elliptic/curve":15,"./elliptic/curves":18,"./elliptic/ec":19,"./elliptic/eddsa":22,"./elliptic/utils":24,brorand:10}],13:[function(e,t,r){"use strict" var n=e("bn.js"),i=e("../utils"),o=i.getNAF,a=i.getJSF,s=i.assert function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.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 r=this.n&&this.p.div(this.n) !r||0>1]):u.mixedAdd(i[-c-1>>1].neg()):0>1]):u.add(i[-c-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,l=this._wnafT3,c=0,f=0;f>1]:x<0&&(M=u[v][-x-1>>1].neg()),_="affine"===M.type?_.mixedAdd(M):_.add(M))}}for(f=0;f=Math.ceil((e.bitLength()+1)/t.step)},l.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles for(var r=[this],n=this,i=0;i":""},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(e){if(this.inf)return e if(e.inf)return this if(this.eq(e))return this.dbl() if(this.neg().eq(e))return this.curve.point(null,null) if(0===this.x.cmp(e.x))return this.curve.point(null,null) var t=this.y.redSub(e.y) 0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm())) var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y) return this.curve.point(r,n)},l.prototype.dbl=function(){if(this.inf)return this var e=this.y.redAdd(this.y) if(0===e.cmpn(0))return this.curve.point(null,null) var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y) return this.curve.point(o,a)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r] return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},l.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r] return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},l.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},l.prototype.neg=function(e){if(this.inf)return this var t=this.curve.point(this.x,this.y.redNeg()) if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()} t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(c,a.BasePoint),u.prototype.jpoint=function(e,t,r){return new c(this,e,t,r)},c.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null) var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e) return this.curve.point(r,n)},c.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},c.prototype.add=function(e){if(this.isInfinity())return e if(e.isInfinity())return this var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=o.redSub(a) if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl() var l=s.redSqr(),c=l.redMul(s),f=n.redMul(l),h=u.redSqr().redIAdd(c).redISub(f).redISub(f),d=u.redMul(f.redISub(h)).redISub(o.redMul(c)),p=this.z.redMul(e.z).redMul(s) return this.curve.jpoint(h,d,p)},c.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ() if(e.isInfinity())return this var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o) if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl() var u=a.redSqr(),l=u.redMul(a),c=r.redMul(u),f=s.redSqr().redIAdd(l).redISub(c).redISub(c),h=s.redMul(c.redISub(f)).redISub(i.redMul(l)),d=this.z.redMul(a) return this.curve.jpoint(f,h,d)},c.prototype.dblp=function(e){if(0===e)return this if(this.isInfinity())return this if(!e)return this.dbl() if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r":""},c.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":24,"./base":13,"bn.js":9,inherits:39}],18:[function(e,t,r){"use strict" var n,i=r,o=e("hash.js"),a=e("./curve"),s=e("./utils").assert function u(e){"short"===e.type?this.curve=new a.short(e):"edwards"===e.type?this.curve=new a.edwards(e):this.curve=new a.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t) return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,l("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"]}),l("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"]}),l("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"]}),l("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"]}),l("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"]}),l("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"]}),l("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{n=e("./precomputed/secp256k1")}catch(e){n=void 0}l("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",n]})},{"./curve":15,"./precomputed/secp256k1":23,"./utils":24,"hash.js":26}],19:[function(e,t,r){"use strict" var n=e("bn.js"),i=e("hmac-drbg"),o=e("../utils"),a=e("../curves"),u=e("brorand"),l=o.assert,c=e("./key"),f=e("./signature") function h(e){if(!(this instanceof h))return new h(e) "string"==typeof e&&(l(a.hasOwnProperty(e),"Unknown curve "+e),e=a[e]),e instanceof a.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}(t.exports=h).prototype.keyPair=function(e){return new c(this,e)},h.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e=e||{} for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||u(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var a=new n(t.generate(r)) if(!(0>1 if(0<=s.cmp(this.curve.p.umod(this.curve.n))&&h)throw new Error("Unable to find sencond key candinate") s=h?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c) var d=t.r.invm(o),p=o.sub(a).mul(d).umod(o),m=u.mul(d).umod(o) return this.g.mulAdd(p,s,m)},h.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new f(t,n)).recoveryParam)return t.recoveryParam for(var i=0;i<4;i++){var o try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../curves":18,"../utils":24,"./key":20,"./signature":21,"bn.js":9,brorand:10,"hmac-drbg":38}],20:[function(e,t,r){"use strict" var n=e("bn.js"),i=e("../utils").assert function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}(t.exports=o).fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic() return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y)) this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},{"../utils":24,"bn.js":9}],21:[function(e,t,r){"use strict" var n=e("bn.js"),i=e("../utils"),o=i.assert function a(e,t){if(e instanceof a)return e this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++] if(!(128&r))return r for(var n=15&r,i=0,o=0,a=t.place;o>>3) for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255) e.push(t)}}(t.exports=a).prototype._importDER=function(e,t){e=i.toArray(e,t) var r=new s if(48!==e[r.place++])return!1 if(u(e,r)+r.place!==e.length)return!1 if(2!==e[r.place++])return!1 var o=u(e,r),a=e.slice(r.place,o+r.place) if(r.place+=o,2!==e[r.place++])return!1 var l=u(e,r) if(e.length!==l+r.place)return!1 var c=e.slice(r.place,l+r.place) return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===c[0]&&128&c[1]&&(c=c.slice(1)),this.r=new n(a),this.s=new n(c),!(this.recoveryParam=null)},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray() for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=l(t),r=l(r);!(r[0]||128&r[1]);)r=r.slice(1) var n=[2] c(n,t.length),(n=n.concat(t)).push(2),c(n,r.length) var o=n.concat(r),a=[48] return c(a,o.length),a=a.concat(o),i.encode(a,e)}},{"../utils":24,"bn.js":9}],22:[function(e,t,r){arguments[4][14][0].apply(r,arguments)},{dup:14}],23:[function(e,t,r){t.exports=void 0},{}],24:[function(e,t,r){"use strict" var n=r,i=e("bn.js"),o=e("minimalistic-assert"),a=e("minimalistic-crypto-utils") n.assert=o,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1) n.fill(0) for(var i=1<>1)-1>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]] e=e.clone(),t=t.clone() for(var n=0,i=0;0=this._delta8){var r=(e=this.pending).length%this._delta8 this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian) for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize) for(var t=e.length;t>>3},r.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},{"../utils":37}],37:[function(e,t,r){"use strict" var n=e("minimalistic-assert"),i=e("inherits") function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function s(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=i,r.toArray=function(e,t){if(Array.isArray(e))return e.slice() if(!e)return[] var r=[] if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n>8,a=255&i o?r.push(o,a):r.push(a)}else for(n=0;n>>0}return a},r.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},r.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},r.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},r.sum64_lo=function(e,t,r,n){return t+n>>>0},r.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,l=t return u+=(l=l+n>>>0)>>0)>>0)>>0},r.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},r.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,l){var c=0,f=t return c+=(f=f+n>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,l){return t+n+o+s+l>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:39,"minimalistic-assert":41}],38:[function(e,t,r){"use strict" var n=e("hash.js"),i=e("minimalistic-crypto-utils"),o=e("minimalistic-assert") function a(e){if(!(this instanceof a))return new a(e) this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex") o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}(t.exports=a).prototype._init=function(e,t,r){var n=e.concat(t).concat(r) 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(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required") "string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r)) for(var o=[];o.length>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3 for(var n=0;n<50;++n)this.s[n]=0}S.prototype.update=function(e){var t="string"!=typeof e t&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)) for(var r,n,i=e.length,o=this.blocks,s=this.byteCount,u=this.blockCount,l=0,c=this.s;l>2]|=e[l]<>2]|=n<>2]|=(192|n>>6)<>2]|=(224|n>>12)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+o[15&e]+o[e>>12&15]+o[e>>8&15]+o[e>>20&15]+o[e>>16&15]+o[e>>28&15]+o[e>>24&15] s%t==0&&(E(r),a=0)}return i&&(e=r[a],0>4&15]+o[15&e]),1>12&15]+o[e>>8&15]),2>20&15]+o[e>>16&15])),u},S.prototype.buffer=S.prototype.arrayBuffer=function(){this.finalize() var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3 e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s) for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255 s%r==0&&E(n)}return o&&(e=s<<2,t=n[a],0>8&255),2>16&255)),u} var E=function(e){var t,r,n,i,o,a,s,l,c,f,h,d,p,m,y,g,v,b,w,_,S,E,k,M,x,A,T,I,O,C,R,P,N,D,B,L,j,U,F,z,H,V,K,q,G,W,Y,Z,J,$,Q,X,ee,te,re,ne,ie,oe,ae,se,ue,le,ce for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(l<<1|c>>>31),r=o^(c<<1|l>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(f<<1|h>>>31),r=s^(h<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=l^(d<<1|p>>>31),r=c^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|o>>>31),r=h^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,$=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,M=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=m^~g&b,e[1]=y^~v&w,e[10]=M^~A&I,e[11]=x^~T&O,e[20]=D^~L&U,e[21]=B^~j&F,e[30]=q^~W&Z,e[31]=G^~Y&J,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~b&_,e[3]=v^~w&S,e[12]=A^~I&C,e[13]=T^~O&R,e[22]=L^~U&z,e[23]=j^~F&H,e[32]=W^~Z&$,e[33]=Y^~J&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=b^~_&E,e[5]=w^~S&k,e[14]=I^~C&P,e[15]=O^~R&N,e[24]=U^~z&V,e[25]=F^~H&K,e[34]=Z^~$&X,e[35]=J^~Q&ee,e[44]=oe^~se&le,e[45]=ae^~ue&ce,e[6]=_^~E&m,e[7]=S^~k&y,e[16]=C^~P&M,e[17]=R^~N&x,e[26]=z^~V&D,e[27]=H^~K&B,e[36]=$^~X&q,e[37]=Q^~ee&G,e[46]=se^~le&te,e[47]=ue^~ce&re,e[8]=E^~m&g,e[9]=k^~y&v,e[18]=P^~M&A,e[19]=N^~x&T,e[28]=V^~D&L,e[29]=K^~B&j,e[38]=X^~q&W,e[39]=ee^~G&Y,e[48]=le^~te&ne,e[49]=ce^~re&ie,e[0]^=u[n],e[1]^=u[n+1]} if(i)t.exports=m else for(g=0;g>8,a=255&i o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},{}],43:[function(e,t,r){t.exports={browser:!0}},{}],44:[function(e,t,r){(function(e){"use strict" function n(e){var t=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],r=1779033703,n=3144134277,i=1013904242,o=2773480762,a=1359893119,s=2600822924,u=528734635,l=1541459225,c=new Array(64) function f(e){for(var f=0,h=e.length;64<=h;){var d,p,m,y,g,v=r,b=n,w=i,_=o,S=a,E=s,k=u,M=l for(p=0;p<16;p++)m=f+4*p,c[p]=(255&e[m])<<24|(255&e[m+1])<<16|(255&e[m+2])<<8|255&e[m+3] for(p=16;p<64;p++)y=((d=c[p-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,g=((d=c[p-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,c[p]=(y+c[p-7]|0)+(g+c[p-16]|0)|0 for(p=0;p<64;p++)y=(((S>>>6|S<<26)^(S>>>11|S<<21)^(S>>>25|S<<7))+(S&E^~S&k)|0)+(M+(t[p]+c[p]|0)|0)|0,g=((v>>>2|v<<30)^(v>>>13|v<<19)^(v>>>22|v<<10))+(v&b^v&w^b&w)|0,M=k,k=E,E=S,S=_+y|0,_=w,w=b,b=v,v=y+g|0 r=r+v|0,n=n+b|0,i=i+w|0,o=o+_|0,a=a+S|0,s=s+E|0,u=u+k|0,l=l+M|0,f+=64,h-=64}}f(e) var h,d=e.length%64,p=e.length/536870912|0,m=e.length<<3,y=d<56?56:120,g=e.slice(e.length-d,e.length) for(g.push(128),h=1+d;h>>24&255),g.push(p>>>16&255),g.push(p>>>8&255),g.push(p>>>0&255),g.push(m>>>24&255),g.push(m>>>16&255),g.push(m>>>8&255),g.push(m>>>0&255),f(g),[r>>>24&255,r>>>16&255,r>>>8&255,r>>>0&255,n>>>24&255,n>>>16&255,n>>>8&255,n>>>0&255,i>>>24&255,i>>>16&255,i>>>8&255,i>>>0&255,o>>>24&255,o>>>16&255,o>>>8&255,o>>>0&255,a>>>24&255,a>>>16&255,a>>>8&255,a>>>0&255,s>>>24&255,s>>>16&255,s>>>8&255,s>>>0&255,u>>>24&255,u>>>16&255,u>>>8&255,u>>>0&255,l>>>24&255,l>>>16&255,l>>>8&255,l>>>0&255]}function i(e,t,r){var i e=e.length<=64?e:n(e) var o=64+t.length+4,a=new Array(o),s=new Array(64),u=[] for(i=0;i<64;i++)a[i]=54 for(i=0;i>>32-t}function s(e,t){l(e,0,t,0,16) for(var r=8;0>0&255),m.push(y[r]>>8&255),m.push(y[r]>>16&255),m.push(y[r]>>24&255) var g=i(t,m,h) return d(null,1,g)}P(e)}()}var d,p d=this,p=2147483647,void 0!==r?t.exports=h:d&&(d.scrypt&&(d._scrypt=d.scrypt),d.scrypt=h)}).call(this,e("timers").setImmediate)},{timers:46}],45:[function(e,t,n){(function(e,t,r){!function(t,r){"use strict" if(!t.setImmediate){var n,i,o,a,s=1,u={},l=!1,c=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t) f=f&&f.setTimeout?f:t,n="[object process]"==={}.toString.call(t.process)?function(){var t=h(arguments) return e.nextTick(d(p,t)),t}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?(a="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",y,!1):t.attachEvent("onmessage",y),function(){var e=h(arguments) return t.postMessage(a+e,"*"),e}):t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},function(){var e=h(arguments) return o.port2.postMessage(e),e}):c&&"onreadystatechange"in c.createElement("script")?(i=c.documentElement,function(){var e=h(arguments),t=c.createElement("script") return t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t),e}):function(){var e=h(arguments) return setTimeout(d(p,e),0),e},f.setImmediate=n,f.clearImmediate=m}function h(e){return u[s]=d.apply(r,e),s++}function d(e){var t=[].slice.call(arguments,1) return function(){"function"==typeof e?e.apply(r,t):new Function(""+e)()}}function p(e){if(l)setTimeout(d(p,e),0) else{var t=u[e] if(t){l=!0 try{t()}finally{m(e),l=!1}}}}function m(e){delete u[e]}function y(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,e("_process"),void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").clearImmediate)},{_process:43,timers:46}],46:[function(e,t,n){(function(e){t.exports={setImmediate:e.setImmediate}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],47:[function(e,t,n){(function(e){var r if(e.crypto&&crypto.getRandomValues){var n=new Uint8Array(16) r=function(){return crypto.getRandomValues(n),n}}if(!r){var i=new Array(16) r=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255 return i}}t.exports=r}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],48:[function(e,t,r){for(var n=e("./rng"),i=[],o={},a=0;a<256;a++)i[a]=(a+256).toString(16).substr(1),o[i[a]]=a function s(e,t){var r=t||0,n=i return n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+"-"+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]+n[e[r++]]}var u=n(),l=[1|u[0],u[1],u[2],u[3],u[4],u[5]],c=16383&(u[6]<<8|u[7]),f=0,h=0 function d(e,t,r){var i=t&&r||0 "string"==typeof e&&(t="binary"==e?new Array(16):null,e=null) var o=(e=e||{}).random||(e.rng||n)() if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var a=0;a<16;a++)t[i+a]=o[a] return t||s(o)}var p=d p.v1=function(e,t,r){var n=t&&r||0,i=t||[],o=void 0!==(e=e||{}).clockseq?e.clockseq:c,a=void 0!==e.msecs?e.msecs:(new Date).getTime(),u=void 0!==e.nsecs?e.nsecs:h+1,d=a-f+(u-h)/1e4 if(d<0&&void 0===e.clockseq&&(o=o+1&16383),(d<0||f>>24&255,i[n++]=p>>>16&255,i[n++]=p>>>8&255,i[n++]=255&p var m=a/4294967296*1e4&268435455 i[n++]=m>>>8&255,i[n++]=255&m,i[n++]=m>>>24&15|16,i[n++]=m>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o for(var y=e.node||l,g=0;g<6;g++)i[n+g]=y[g] return t||s(i)},p.v4=d,p.parse=function(e,t,r){var n=t&&r||0,i=0 for(t=t||[],e.toLowerCase().replace(/[0-9a-f]{2}/g,(function(e){i<16&&(t[n+i++]=o[e])}));i<16;)t[n+i++]=0 return t},p.unparse=s,t.exports=p},{"./rng":47}],49:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) try{t.exports.XMLHttpRequest=XMLHttpRequest}catch(e){console.log("Warning: XMLHttpRequest is not defined"),t.exports.XMLHttpRequest=null}},{}],50:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("../utils/properties"),i=(o.isProvider=function(e){return n.isType(e,"Provider")},o) function o(){n.setType(this,"Provider")}r.Provider=i},{"../utils/properties":74}],51:[function(e,t,r){"use strict" var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var a=e("../utils/address"),u=e("../utils/bignumber"),l=e("../utils/bytes"),c=e("../constants"),f=e("../utils/hash"),h=e("../utils/networks"),d=e("../utils/properties"),p=e("../utils/rlp"),m=e("../utils/transaction"),y=e("../utils/utf8"),g=e("../utils/web"),v=o(e("../errors")),b=e("./abstract-provider") function w(e,t){var r={} for(var n in e)try{var i=e[n](t[n]) void 0!==i&&(r[n]=i)}catch(e){throw e.checkKey=n,e.checkValue=t[n],e}return r}function _(e,t){return function(r){return null==r?t:e(r)}}function S(e){return function(t){if(!Array.isArray(t))throw new Error("not an array") var r=[] return t.forEach((function(t){r.push(e(t))})),r}}function E(e,t){return"string"==typeof e&&(t||"0x"===e.substring(0,2)||(e="0x"+e),32===l.hexDataLength(e))?e.toLowerCase():(v.throwError("invalid hash",v.INVALID_ARGUMENT,{arg:"hash",value:e}),null)}function k(e){return u.bigNumberify(e).toNumber()}function M(e){if(!l.isHexString(e))throw new Error("invalid uint256") for(;e.length<66;)e="0x0"+e.substring(2) return e}function x(e){if(null==e)return"latest" if("earliest"===e)return"0x0" if("latest"===e||"pending"===e)return e if("number"==typeof e)return l.hexStripZeros(l.hexlify(e)) if(l.isHexString(e))return l.hexStripZeros(e) throw new Error("invalid blockTag")}var A={hash:E,blockHash:_(E,null),blockNumber:_(k,null),transactionIndex:_(k,null),confirmations:_(k,null),from:a.getAddress,gasPrice:u.bigNumberify,gasLimit:u.bigNumberify,to:_(a.getAddress,null),value:u.bigNumberify,nonce:k,data:l.hexlify,r:_(M),s:_(M),v:_(k),creates:_(a.getAddress,null),raw:_(l.hexlify)} function T(e){if(null!=e.gas&&null==e.gasLimit&&(e.gasLimit=e.gas),e.to&&u.bigNumberify(e.to).isZero()&&(e.to="0x0000000000000000000000000000000000000000"),null!=e.input&&null==e.data&&(e.data=e.input),null==e.to&&null==e.creates&&(e.creates=a.getContractAddress(e)),!e.raw&&e.v&&e.r&&e.s){var t=[l.stripZeros(l.hexlify(e.nonce)),l.stripZeros(l.hexlify(e.gasPrice)),l.stripZeros(l.hexlify(e.gasLimit)),e.to||"0x",l.stripZeros(l.hexlify(e.value||"0x")),l.hexlify(e.data||"0x"),l.stripZeros(l.hexlify(e.v||"0x")),l.stripZeros(l.hexlify(e.r)),l.stripZeros(l.hexlify(e.s))] e.raw=p.encode(t)}var r=w(A,e),n=e.networkId return null!=e.chainId&&null==n&&null==r.v&&(n=e.chainId),l.isHexString(n)&&(n=u.bigNumberify(n).toNumber()),"number"!=typeof n&&null!=r.v&&((n=(r.v-35)/2)<0&&(n=0),n=parseInt(n)),"number"!=typeof n&&(n=0),r.networkId=n,null==r.chainId&&null!=n&&(r.chainId=n),r.blockHash&&"x"===r.blockHash.replace(/0/g,"")&&(r.blockHash=null),r}var I={hash:E,parentHash:E,number:k,timestamp:k,nonce:_(l.hexlify),difficulty:function(e){var t=u.bigNumberify(e) try{return t.toNumber()}catch(e){}return null},gasLimit:u.bigNumberify,gasUsed:u.bigNumberify,miner:a.getAddress,extraData:l.hexlify,transactions:_(S(E))},O=d.shallowCopy(I) function C(e,t){return null!=e.author&&null==e.miner&&(e.miner=e.author),w(t?O:I,e)}O.transactions=_(S(T)) var R={from:_(a.getAddress),nonce:_(k),gasLimit:_(u.bigNumberify),gasPrice:_(u.bigNumberify),to:_(a.getAddress),value:_(u.bigNumberify),data:_(l.hexlify)} function P(e){return w(R,e)}var N={transactionLogIndex:_(k),transactionIndex:k,blockNumber:k,transactionHash:E,address:a.getAddress,topics:S(E),data:l.hexlify,logIndex:k,blockHash:E},D={to:_(a.getAddress,null),from:_(a.getAddress,null),contractAddress:_(a.getAddress,null),transactionIndex:k,root:_(E),gasUsed:u.bigNumberify,logsBloom:_(l.hexlify),blockHash:E,transactionHash:E,logs:S((function(e){return w(N,e)})),blockNumber:k,confirmations:_(k,null),cumulativeGasUsed:u.bigNumberify,status:_(k)} function B(e){return Array.isArray(e)?e.forEach((function(e){B(e)})):null!=e&&E(e),e}var L,j={fromBlock:_(x,void 0),toBlock:_(x,void 0),address:_(a.getAddress,void 0),topics:_(B,void 0)},U={blockHash:_(E,void 0),address:_(a.getAddress,void 0),topics:_(B,void 0)},F={blockNumber:_(k),blockHash:_(E),transactionIndex:k,removed:_((function(e){if("boolean"==typeof e)return e if("string"==typeof e){if("true"===e)return!0 if("false"===e)return!1}throw new Error("invaid boolean - "+e)})),address:a.getAddress,data:(L=l.hexlify,function(e){return e?L(e):"0x"}),topics:S(E),transactionHash:E,logIndex:k} function z(e){return w(F,e)}function H(e){return e.map((function(e){return"string"==typeof e?e:Array.isArray(e)?(e.forEach((function(e){null!==e&&32!==l.hexDataLength(e)&&v.throwError("invalid topic",v.INVALID_ARGUMENT,{argument:"topic",value:e})})),e.join(",")):null===e?"":v.throwError("invalid topic value",v.INVALID_ARGUMENT,{argument:"topic",value:e})})).join("&")}function V(e){if("string"==typeof e){if(20===l.hexDataLength(e))return"address:"+a.getAddress(e) if(e=e.toLowerCase(),32===l.hexDataLength(e))return"tx:"+e if(-1===e.indexOf(":"))return e}else{if(Array.isArray(e))return"filter::"+H(e) if(e&&"object"==s(e))return"filter:"+(e.address||"")+":"+H(e.topics||[])}throw new Error("invalid event - "+e)}function K(){return(new Date).getTime()}var q,G=(i(W,q=b.Provider),W.prototype._doPoll=function(){var e=this this.getBlockNumber().then((function(t){if(e.polling&&(e._setFastBlockNumber(t),t!==e._lastBlockNumber)){-2===e._emitted.block&&(e._emitted.block=t-1) for(var r=e._emitted.block+1;r<=t;r++)e.emit("block",r) e._emitted.block!==t&&(e._emitted.block=t,Object.keys(e._emitted).forEach((function(r){if("block"!==r){var n=e._emitted[r] "pending"!==n&&122*this._pollingInterval&&(this._fastQueryDate=t,this._fastBlockNumberPromise=this.getBlockNumber().then((function(t){return(null==e._fastBlockNumber||t>e._fastBlockNumber)&&(e._fastBlockNumber=t),e._fastBlockNumber}))),this._fastBlockNumberPromise},W.prototype._setFastBlockNumber=function(e){null!=this._fastBlockNumber&&ethis._fastBlockNumber)&&(this._fastBlockNumber=e,this._fastBlockNumberPromise=Promise.resolve(e)))},W.prototype.waitForTransaction=function(e,t){var r=this return null==t&&(t=1),this.getTransactionReceipt(e).then((function(n){return 0===t||n&&n.confirmations>=t?n:new Promise((function(n){r.on(e,(function i(o){o.confirmations(t=t.substring(64)).length)return null var n=y.toUtf8String("0x"+t.substring(0,2*r)) return i.resolveName(n).then((function(t){return t!=e?null:n}))}))},W.checkTransactionResponse=function(e){return T(e)},W.prototype.doPoll=function(){},W.prototype.perform=function(e,t){return v.throwError(e+" not implemented",v.NOT_IMPLEMENTED,{operation:e}),null},W.prototype._startPending=function(){v.warn("WARNING: this provider does not support pending events")},W.prototype._stopPending=function(){},W.prototype._addEventListener=function(e,t,r){this._events.push({tag:V(e),listener:t,once:r}),"pending"===e&&this._startPending(),this.polling=!0},W.prototype.on=function(e,t){return this._addEventListener(e,t,!1),this},W.prototype.once=function(e,t){return this._addEventListener(e,t,!0),this},W.prototype.addEventListener=function(e,t){return this.on(e,t)},W.prototype.emit=function(e){for(var t=this,r=[],n=1;ne.length)throw new Error("invalid null") return{consumed:0,value:this.coerceFunc("null",void 0)}},T) function T(e,t){return x.call(this,e,"null","",t,!1)||this}var I,O=(i(C,I=S),C.prototype.encode=function(e){try{var t=c.bigNumberify(e) if(this.signed){var r=a.MaxUint256.maskn(8*this.size-1) if(t.gt(r))throw new Error("out-of-bounds") if(r=r.add(a.One).mul(a.NegativeOne),t.lt(r))throw new Error("out-of-bounds")}else if(t.lt(a.Zero)||t.gt(a.MaxUint256.maskn(8*this.size)))throw new Error("out-of-bounds") return t=t.toTwos(8*this.size).maskn(8*this.size),this.signed&&(t=t.fromTwos(8*this.size).toTwos(256)),f.padZeros(f.arrayify(t),32)}catch(t){u.throwError("invalid number value",u.INVALID_ARGUMENT,{arg:this.localName,coderType:this.name,value:e})}return null},C.prototype.decode=function(e,t){e.length>1]>>4&&(t[i]=t[i].toUpperCase()),8<=(15&r[i>>1])&&(t[i+1]=t[i+1].toUpperCase()) return"0x"+t.join("")}for(var c={},f=0;f<10;f++)c[String(f)]=String(f) for(f=0;f<26;f++)c[String.fromCharCode(65+f)]=String(10+f) var h,d=Math.floor((h=9007199254740991,Math.log10?Math.log10(h):Math.log(h)/Math.LN10)) function p(e){e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00" var t="" for(e.split("").forEach((function(e){t+=c[e]}));t.length>=d;){var r=t.substring(0,d) t=parseInt(r,10)%97+t.substring(r.length)}for(var n=String(98-parseInt(t,10)%97);n.length<2;)n="0"+n return n}function m(e){var t=null if("string"!=typeof e&&u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:e}),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=l(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&u.throwError("bad address checksum",u.INVALID_ARGUMENT,{arg:"address",value:e}) else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==p(e)&&u.throwError("bad icap checksum",u.INVALID_ARGUMENT,{arg:"address",value:e}),t=new i.default.BN(e.substring(4),36).toString(16);t.length<40;)t="0"+t t=l("0x"+t)}else u.throwError("invalid address",u.INVALID_ARGUMENT,{arg:"address",value:e}) return t}r.getAddress=m,r.getIcapAddress=function(e){for(var t=new i.default.BN(m(e).substring(2),16).toString(36).toUpperCase();t.length<30;)t="0"+t return"XE"+p("XE00"+t)+t},r.getContractAddress=function(e){if(!e.from)throw new Error("missing from address") var t=e.nonce return m("0x"+a.keccak256(s.encode([m(e.from),o.stripZeros(o.hexlify(t))])).substring(26))},r.getCreate2Address=function(e){var t=e.initCodeHash e.initCode&&(t?a.keccak256(e.initCode)!==t&&u.throwError("initCode/initCodeHash mismatch",u.INVALID_ARGUMENT,{arg:"options",value:e}):t=a.keccak256(e.initCode)),t||u.throwError("missing initCode or initCodeHash",u.INVALID_ARGUMENT,{arg:"options",value:e}) var r=m(e.from),n=o.arrayify(e.salt) return 32!==n.length&&u.throwError("invalid salt",u.INVALID_ARGUMENT,{arg:"options",value:e}),m("0x"+a.keccak256(o.concat(["0xff",r,n,t])).substring(26))}},{"../errors":5,"./bytes":64,"./keccak256":71,"./rlp":76,"bn.js":9}],61:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("../utils/bytes") t.exports={decode:function(e){e=atob(e) for(var t=[],r=0;r>=8 for(;0>=8}for(var s=0;e[s]===this._leader&&s>4]+h[15&s])}return"0x"+n.join("")}return i.throwError("invalid hexlify value",null,{arg:"value",value:e}),"never"}function p(e,t){for(f(e)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:e});e.length<2*t+2;)e="0x0"+e.substring(2) return e}function m(e){var t=0,r="0x",n="0x" if(function(e){return e&&null!=e.r&&null!=e.s}(e)){null==e.v&&null==e.recoveryParam&&i.throwError("at least on of recoveryParam or v must be specified",i.INVALID_ARGUMENT,{argument:"signature",value:e}),r=p(e.r,32),n=p(e.s,32),"string"==typeof(t=e.v)&&(t=parseInt(t,16)) var o=e.recoveryParam null==o&&null!=e.v&&(o=1-t%2),t=27+o}else{var a=l(e) if(65!==a.length)throw new Error("invalid signature") r=d(a.slice(0,32)),n=d(a.slice(32,64)),27!==(t=a[64])&&28!==t&&(t=27+t%2)}return{r:r,s:n,recoveryParam:t-27,v:t}}r.hexlify=d,r.hexDataLength=function(e){return f(e)&&e.length%2==0?(e.length-2)/2:null},r.hexDataSlice=function(e,t,r){return f(e)||i.throwError("invalid hex data",i.INVALID_ARGUMENT,{arg:"value",value:e}),e.length%2!=0&&i.throwError("hex data length must be even",i.INVALID_ARGUMENT,{arg:"value",value:e}),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)},r.hexStripZeros=function(e){for(f(e)||i.throwError("invalid hex string",i.INVALID_ARGUMENT,{arg:"value",value:e});3>3)]=e>>24-n&255 var i=f.computeHmac(f.SupportedAlgorithms.sha512,this.chainCode,r),o=i.slice(0,32),a=i.slice(32),l=null,c=null return this.privateKey?l=b(u.bigNumberify(o).add(this.privateKey).mod(m)):c=new d.KeyPair(s.hexlify(o))._addPoint(this.publicKey),new E(_,l,c,this.fingerprint,b(a),e,this.depth+1,this.mnemonic,t)},E.prototype.derivePath=function(e){var t=e.split("/") if(0===t.length||"m"===t[0]&&0!==this.depth)throw new Error("invalid path - "+e) "m"===t[0]&&t.shift() for(var r=this,n=0;n>3]|=1<<7-a%8),a++}var f=32*r.length/3,h=v(r.length/3),d=s.arrayify(p.sha256(n.slice(0,f/8)))[0] if((d&=h)!=(n[n.length-1]&h))throw new Error("invalid checksum") return s.hexlify(n.slice(0,f/8))}function A(e,t){if((e=s.arrayify(e)).length%4!=0||e.length<16||32>8-n,r.push(e[i]&(1<<8-n)-1),n+=3) var a=s.arrayify(p.sha256(e))[0],u=e.length/4 return a&=v(u),r[r.length-1]<<=u,r[r.length-1]|=a>>8-u,(t=t||o.langEn).join(r.map((function(e){return t.getWord(e)})))}r.HDNode=S,r.fromExtendedKey=function(e){var t=a.Base58.decode(e) 82===t.length&&w(t.slice(0,78))===e||i.throwError("invalid extended key",i.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"}) var r=t[4],n=s.hexlify(t.slice(5,9)),o=parseInt(s.hexlify(t.slice(9,13)).substring(2),16),u=s.hexlify(t.slice(13,45)),l=t.slice(45,78) switch(s.hexlify(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":return new S(_,null,s.hexlify(l),n,u,o,r,null,null) case"0x0488ade4":case"0x04358394":if(0!==l[0])break return new S(_,s.hexlify(l.slice(1)),null,n,u,o,r,null,null)}return i.throwError("invalid extended key",i.INVALID_ARGUMENT,{argument:"extendedKey",value:"[REDACTED]"})},r.fromMnemonic=function(e,t,r){return k(M(e=A(x(e,t),t),r),e)},r.fromSeed=function(e){return k(e,null)},r.mnemonicToSeed=M,r.mnemonicToEntropy=x,r.entropyToMnemonic=A,r.isValidMnemonic=function(e,t){try{return x(e,t),!0}catch(e){}return!1}},{"../errors":5,"../wordlists/lang-en":90,"./basex":62,"./bignumber":63,"./bytes":64,"./hmac":67,"./pbkdf2":73,"./properties":74,"./secp256k1":77,"./sha2":79,"./utf8":85}],67:[function(e,t,r){"use strict" var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var i,o,a=n(e("hash.js")),s=e("../utils/bytes"),u=n(e("../errors"));(o=i=r.SupportedAlgorithms||(r.SupportedAlgorithms={})).sha256="sha256",o.sha512="sha512",r.computeHmac=function(e,t,r){return i[e]||u.throwError("unsupported algorithm "+e,u.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),s.arrayify(a.hmac(a[e],s.arrayify(t)).update(s.arrayify(r)).digest())}},{"../errors":5,"../utils/bytes":64,"hash.js":26}],68:[function(e,t,r){"use strict" var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var i=e("./abi-coder") r.AbiCoder=i.AbiCoder,r.defaultAbiCoder=i.defaultAbiCoder,r.formatSignature=i.formatSignature,r.formatParamType=i.formatParamType,r.parseSignature=i.parseSignature,r.parseParamType=i.parseParamType var o=e("./address") r.getAddress=o.getAddress,r.getContractAddress=o.getContractAddress,r.getCreate2Address=o.getCreate2Address,r.getIcapAddress=o.getIcapAddress var a=n(e("./base64")) r.base64=a var s=e("./bignumber") r.BigNumber=s.BigNumber,r.bigNumberify=s.bigNumberify var u=e("./bytes") r.arrayify=u.arrayify,r.concat=u.concat,r.hexDataSlice=u.hexDataSlice,r.hexDataLength=u.hexDataLength,r.hexlify=u.hexlify,r.hexStripZeros=u.hexStripZeros,r.hexZeroPad=u.hexZeroPad,r.isHexString=u.isHexString,r.joinSignature=u.joinSignature,r.padZeros=u.padZeros,r.splitSignature=u.splitSignature,r.stripZeros=u.stripZeros var l=e("./hash") r.hashMessage=l.hashMessage,r.id=l.id,r.namehash=l.namehash var c=n(e("./hdnode")) r.HDNode=c var f=e("./interface") r.Interface=f.Interface var h=e("./json-wallet") r.getJsonWalletAddress=h.getJsonWalletAddress var d=e("./keccak256") r.keccak256=d.keccak256 var p=e("./sha2") r.sha256=p.sha256 var m=e("./solidity") r.solidityKeccak256=m.keccak256,r.solidityPack=m.pack,r.soliditySha256=m.sha256 var y=e("./random-bytes") r.randomBytes=y.randomBytes var g=e("./networks") r.getNetwork=g.getNetwork var v=e("./properties") r.checkProperties=v.checkProperties,r.deepCopy=v.deepCopy,r.defineReadOnly=v.defineReadOnly,r.resolveProperties=v.resolveProperties,r.shallowCopy=v.shallowCopy var b=n(e("./rlp")) r.RLP=b var w=e("./secp256k1") r.computeAddress=w.computeAddress,r.computePublicKey=w.computePublicKey,r.recoverAddress=w.recoverAddress,r.recoverPublicKey=w.recoverPublicKey,r.verifyMessage=w.verifyMessage var _=e("./signing-key") r.SigningKey=_.SigningKey var S=e("./transaction") r.populateTransaction=S.populateTransaction var E=e("./transaction") r.parseTransaction=E.parse,r.serializeTransaction=E.serialize var k=e("./utf8") r.formatBytes32String=k.formatBytes32String,r.parseBytes32String=k.parseBytes32String,r.toUtf8Bytes=k.toUtf8Bytes,r.toUtf8String=k.toUtf8String var M=e("./units") r.commify=M.commify,r.formatEther=M.formatEther,r.parseEther=M.parseEther,r.formatUnits=M.formatUnits,r.parseUnits=M.parseUnits var x=e("./web") r.fetchJson=x.fetchJson,r.poll=x.poll var A=e("./hmac") r.SupportedAlgorithms=A.SupportedAlgorithms var T=e("./utf8") r.UnicodeNormalizationForm=T.UnicodeNormalizationForm var I=e("./wordlist") r.Wordlist=I.Wordlist},{"./abi-coder":59,"./address":60,"./base64":61,"./bignumber":63,"./bytes":64,"./hash":65,"./hdnode":66,"./hmac":67,"./interface":69,"./json-wallet":70,"./keccak256":71,"./networks":72,"./properties":74,"./random-bytes":75,"./rlp":76,"./secp256k1":77,"./sha2":79,"./signing-key":81,"./solidity":82,"./transaction":83,"./units":84,"./utf8":85,"./web":86,"./wordlist":87}],69:[function(e,t,r){"use strict" var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} function a(e){for(var t in p.setType(this,"Description"),e)p.defineReadOnly(this,t,p.deepCopy(e[t],!0)) Object.freeze(this)}Object.defineProperty(r,"__esModule",{value:!0}) var s,u=e("./address"),l=e("./abi-coder"),c=e("./bignumber"),f=e("./bytes"),h=e("./hash"),d=e("./keccak256"),p=e("./properties"),m=o(e("../errors")),y=function(e){p.setType(this,"Indexed"),p.defineReadOnly(this,"hash",e)},g=(i(v,s=a),v.prototype.encode=function(e,t){f.isHexString(e)||m.throwError("invalid contract bytecode",m.INVALID_ARGUMENT,{arg:"bytecode",value:e}),m.checkArgumentCount(t.length,this.inputs.length," in Interface constructor") try{return e+l.defaultAbiCoder.encode(this.inputs,t).substring(2)}catch(e){m.throwError("invalid constructor argument",m.INVALID_ARGUMENT,{arg:e.arg,reason:e.reason,value:e.value})}return null},v) function v(){return null!==s&&s.apply(this,arguments)||this}var b,w=(i(_,b=a),_.prototype.encode=function(e){m.checkArgumentCount(e.length,this.inputs.length," in interface function "+this.name) try{return this.sighash+l.defaultAbiCoder.encode(this.inputs,e).substring(2)}catch(e){m.throwError("invalid input argument",m.INVALID_ARGUMENT,{arg:e.arg,reason:e.reason,value:e.value})}return null},_.prototype.decode=function(e){try{return l.defaultAbiCoder.decode(this.outputs,f.arrayify(e))}catch(t){m.throwError("invalid data for function output",m.INVALID_ARGUMENT,{arg:"data",errorArg:t.arg,errorValue:t.value,value:e,reason:t.reason})}},_) function _(){return null!==b&&b.apply(this,arguments)||this}var S,E=(i(k,S=a),k) function k(){return null!==S&&S.apply(this,arguments)||this}var M,x=(i(A,M=a),A.prototype.encodeTopics=function(e){var t=this e.length>this.inputs.length&&m.throwError("too many arguments for "+this.name,m.UNEXPECTED_ARGUMENT,{maxCount:e.length,expectedCount:this.inputs.length}) var r=[] for(this.anonymous||r.push(this.topic),e.forEach((function(e,n){var i=t.inputs[n] i.indexed?null==e?r.push(null):"string"===i.type?r.push(h.id(e)):"bytes"===i.type?r.push(d.keccak256(e)):-1!==i.type.indexOf("[")||"tuple"===i.type.substring(0,5)?m.throwError("filtering with tuples or arrays not implemented yet; bug us on GitHub",m.NOT_IMPLEMENTED,{operation:"filter(array|tuple)"}):("address"===i.type&&u.getAddress(e),r.push(f.hexZeroPad(f.hexlify(e),32).toLowerCase())):null!=e&&m.throwError("cannot filter non-indexed parameters; must be null",m.INVALID_ARGUMENT,{argument:i.name||n,value:e})}));r.length&&null===r[r.length-1];)r.pop() return r},A.prototype.decode=function(e,t){null==t||this.anonymous||(t=t.slice(1)) var r=[],n=[],i=[] if(this.inputs.forEach((function(e,t){e.indexed?"string"===e.type||"bytes"===e.type||0<=e.type.indexOf("[")||"tuple"===e.type.substring(0,5)?(r.push({type:"bytes32",name:e.name||""}),i.push(!0)):(r.push(e),i.push(!1)):(n.push(e),i.push(!1))})),null!=t)var o=l.defaultAbiCoder.decode(r,f.concat(t)) var a=l.defaultAbiCoder.decode(n,f.arrayify(e)),s={},u=0,c=0 return this.inputs.forEach((function(e,r){e.indexed?null==t?s[r]=new y(null):i[r]?s[r]=new y(o[c++]):s[r]=o[c++]:s[r]=a[u++],e.name&&(s[e.name]=s[r])})),s.length=this.inputs.length,new E(s)},A) function A(){return null!==M&&M.apply(this,arguments)||this}var T,I=(i(O,T=a),O) function O(){return null!==T&&T.apply(this,arguments)||this}var C,R=(i(P,C=a),P) function P(){return null!==C&&C.apply(this,arguments)||this}function N(e){switch(e.type){case"constructor":var t=new g({inputs:e.inputs,payable:null==e.payable||!!e.payable}) this.deployFunction||(this.deployFunction=t) break case"function":var r=l.formatSignature(e).replace(/tuple/g,""),n=h.id(r).substring(0,10),i=!1 null!=e.constant?i=e.constant:null!=e.stateMutability&&(i="view"==e.stateMutability||"pure"==e.stateMutability),t=new w({inputs:e.inputs,outputs:e.outputs,gas:e.gas,payable:null==e.payable||!!e.payable,type:i?"call":"transaction",name:e.name,signature:r,sighash:n}),e.name&&(null==this.functions[e.name]?p.defineReadOnly(this.functions,e.name,t):m.warn("WARNING: Multiple definitions for "+e.name)),null==this.functions[t.signature]&&p.defineReadOnly(this.functions,t.signature,t) break case"event":r=l.formatSignature(e).replace(/tuple/g,""),t=new x({name:e.name,signature:r,inputs:e.inputs,topic:h.id(r),anonymous:!!e.anonymous}),e.name&&null==this.events[e.name]&&p.defineReadOnly(this.events,e.name,t),null==this.events[t.signature]&&p.defineReadOnly(this.events,t.signature,t) break case"receive":case"fallback":break default:m.warn("WARNING: unsupported ABI type - "+e.type)}}var D=(B.prototype.parseTransaction=function(e){var t=e.data.substring(0,10).toLowerCase() for(var r in this.functions)if(-1!==r.indexOf("(")){var n=this.functions[r] if(n.sighash===t){var i=l.defaultAbiCoder.decode(n.inputs,"0x"+e.data.substring(10)) return new I({args:i,decode:n.decode,name:n.name,signature:n.signature,sighash:n.sighash,value:c.bigNumberify(e.value||"0")})}}return null},B.prototype.parseLog=function(e){for(var t in this.events)if(-1!==t.indexOf("(")){var r=this.events[t] if(!r.anonymous&&r.topic===e.topics[0])return new R({decode:r.decode,name:r.name,signature:r.signature,topic:r.topic,values:r.decode(e.data,e.topics)})}return null},B.isInterface=function(e){return p.isType(e,"Interface")},B.isIndexed=function(e){return p.isType(e,"Indexed")},B) function B(e){if(m.checkNew(this,B),"string"==typeof e){try{e=JSON.parse(e)}catch(t){m.throwError("could not parse ABI JSON",m.INVALID_ARGUMENT,{arg:"abi",errorMessage:t.message,value:e})}if(!Array.isArray(e))return m.throwError("invalid abi",m.INVALID_ARGUMENT,{arg:"abi",value:e}),null}p.defineReadOnly(this,"functions",{}),p.defineReadOnly(this,"events",{}) var t=[] e.forEach((function(e){"string"==typeof e&&(e=l.parseSignature(e)),t.push(e)})),p.defineReadOnly(this,"abi",p.deepCopy(t,!0)),t.forEach(N,this),this.deployFunction||N.call(this,{type:"constructor",inputs:[]}),p.setType(this,"Interface")}r.Interface=D},{"../errors":5,"./abi-coder":59,"./address":60,"./bignumber":63,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74}],70:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("./address") function i(e){try{var t=JSON.parse(e)}catch(e){return!1}return t.encseed&&t.ethaddr}function o(e){try{var t=JSON.parse(e)}catch(e){return!1}return!(!t.version||parseInt(t.version)!==t.version||3!==parseInt(t.version))}r.isCrowdsaleWallet=i,r.isSecretStorageWallet=o,r.getJsonWalletAddress=function(e){if(i(e))try{return n.getAddress(JSON.parse(e).ethaddr)}catch(e){return null}if(o(e))try{return n.getAddress(JSON.parse(e).address)}catch(e){return null}return null}},{"./address":60}],71:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("js-sha3"),i=e("./bytes") r.keccak256=function(e){return"0x"+n.keccak_256(i.arrayify(e))}},{"./bytes":64,"js-sha3":40}],72:[function(e,t,r){"use strict" var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var i=n(e("../errors")) function o(e){return function(t){var r=[] return t.InfuraProvider&&r.push(new t.InfuraProvider(e)),t.EtherscanProvider&&r.push(new t.EtherscanProvider(e)),0===r.length?null:t.FallbackProvider?new t.FallbackProvider(r):r[0]}}function a(e,t){return function(r){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null}}var s={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:o("homestead")},u={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:o("ropsten")},l={unspecified:{chainId:0,name:"unspecified"},homestead:s,mainnet:s,morden:{chainId:2,name:"morden"},ropsten:u,testnet:u,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:o("rinkeby")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:o("goerli")},kovan:{chainId:42,name:"kovan",_defaultProvider:o("kovan")},classic:{chainId:61,name:"classic",_defaultProvider:a("https://web3.gastracker.io","classic")},classicTestnet:{chainId:62,name:"classicTestnet",_defaultProvider:a("https://web3.gastracker.io/morden","classicTestnet")}} r.getNetwork=function(e){if(null==e)return null if("number"==typeof e){for(var t in l){var r=l[t] if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){var n=l[e] return null==n?null:{name:n.name,chainId:n.chainId,ensAddress:n.ensAddress,_defaultProvider:n._defaultProvider||null}}var o=l[e.name] return o?(0!==e.chainId&&e.chainId!==o.chainId&&i.throwError("network chainId mismatch",i.INVALID_ARGUMENT,{arg:"network",value:e}),{name:e.name,chainId:o.chainId,ensAddress:e.ensAddress||o.ensAddress||null,_defaultProvider:e._defaultProvider||o._defaultProvider||null}):("number"!=typeof e.chainId&&i.throwError("invalid network chainId",i.INVALID_ARGUMENT,{arg:"network",value:e}),e)}},{"../errors":5}],73:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("../utils/bytes"),i=e("./hmac") r.pbkdf2=function(e,t,r,o,a){var s e=n.arrayify(e),t=n.arrayify(t) var u,l,c=1,f=new Uint8Array(o),h=new Uint8Array(t.length+4) h.set(t) for(var d=1;d<=c;d++){h[t.length]=d>>24&255,h[t.length+1]=d>>16&255,h[t.length+2]=d>>8&255,h[t.length+3]=255&d var p=i.computeHmac(a,e,h) s||(s=p.length,l=new Uint8Array(s),u=o-((c=Math.ceil(o/s))-1)*s),l.set(p) for(var m=1;m>=8 return t}function o(e,t,r){for(var n=0,i=0;ie.length)throw new Error("too short") if(t+1+r+(i=o(e,t+1,r))>e.length)throw new Error("to short") return a(e,t,t+1+r,r+i)}if(192<=e[t]){if(t+1+(i=e[t]-192)>e.length)throw new Error("invalid rlp data") return a(e,t,t+1,i)}if(184<=e[t]){var r if(t+1+(r=e[t]-183)>e.length)throw new Error("invalid rlp data") if(t+1+r+(i=o(e,t+1,r))>e.length)throw new Error("invalid rlp data") return{consumed:1+r+i,result:n.hexlify(e.slice(t+1+r,t+1+r+i))}}if(128<=e[t]){var i if(t+1+(i=e[t]-128)>e.length)throw new Error("invalid rlp data") return{consumed:1+i,result:n.hexlify(e.slice(t+1,t+1+i))}}return{consumed:1,result:n.hexlify(e[t])}}r.encode=function(e){return n.hexlify(function e(t){if(Array.isArray(t)){var r=[] return t.forEach((function(t){r=r.concat(e(t))})),r.length<=55?(r.unshift(192+r.length),r):((o=i(r.length)).unshift(247+o.length),o.concat(r))}var o,a=Array.prototype.slice.call(n.arrayify(t)) return 1===a.length&&a[0]<=127?a:a.length<=55?(a.unshift(128+a.length),a):((o=i(a.length)).unshift(183+o.length),o.concat(a))}(e))},r.decode=function(e){var t=n.arrayify(e),r=s(t,0) if(r.consumed!==t.length)throw new Error("invalid rlp data") return r.result}},{"./bytes":64}],77:[function(e,t,r){"use strict" var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var i=e("elliptic"),o=e("./address"),a=e("./bytes"),s=e("./hash"),u=e("./keccak256"),l=e("./properties"),c=n(e("../errors")),f=null function h(){return f=f||new i.ec("secp256k1")}var d=(p.prototype.sign=function(e){var t=h().keyFromPrivate(a.arrayify(this.privateKey)).sign(a.arrayify(e),{canonical:!0}) return{recoveryParam:t.recoveryParam,r:a.hexZeroPad("0x"+t.r.toString(16),32),s:a.hexZeroPad("0x"+t.s.toString(16),32),v:27+t.recoveryParam}},p.prototype.computeSharedSecret=function(e){var t=h().keyFromPrivate(a.arrayify(this.privateKey)),r=h().keyFromPublic(a.arrayify(m(e))) return a.hexZeroPad("0x"+t.derive(r.getPublic()).toString(16),32)},p.prototype._addPoint=function(e){var t=h().keyFromPublic(a.arrayify(this.publicKey)),r=h().keyFromPublic(a.arrayify(e)) return"0x"+t.pub.add(r.pub).encodeCompressed("hex")},p) function p(e){var t=h().keyFromPrivate(a.arrayify(e)) l.defineReadOnly(this,"privateKey",a.hexlify(t.priv.toArray("be",32))),l.defineReadOnly(this,"publicKey","0x"+t.getPublic(!1,"hex")),l.defineReadOnly(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),l.defineReadOnly(this,"publicKeyBytes",t.getPublic().encode(null,!0))}function m(e,t){var r=a.arrayify(e) if(32!==r.length)return 33===r.length?t?a.hexlify(r):"0x"+h().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+h().keyFromPublic(r).getPublic(!0,"hex"):a.hexlify(r):(c.throwError("invalid public or private key",c.INVALID_ARGUMENT,{arg:"key",value:"[REDACTED]"}),null) var n=new d(r) return t?n.compressedPublicKey:n.publicKey}function y(e){var t="0x"+m(e).slice(4) return o.getAddress("0x"+u.keccak256(t).substring(26))}function g(e,t){var r=a.splitSignature(t),n={r:a.arrayify(r.r),s:a.arrayify(r.s)} return"0x"+h().recoverPubKey(a.arrayify(e),n,r.recoveryParam).encode("hex",!1)}function v(e,t){return y(g(a.arrayify(e),t))}r.KeyPair=d,r.computePublicKey=m,r.computeAddress=y,r.recoverPublicKey=g,r.recoverAddress=v,r.verifyMessage=function(e,t){return v(s.hashMessage(e),t)}},{"../errors":5,"./address":60,"./bytes":64,"./hash":65,"./keccak256":71,"./properties":74,elliptic:12}],78:[function(e,t,r){"use strict" var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var o=n(e("aes-js")),a=n(e("scrypt-js")),s=n(e("uuid")),u=e("./signing-key"),l=i(e("./hdnode")),c=e("./address"),f=e("./bytes"),h=e("./pbkdf2"),d=e("./keccak256"),p=e("./utf8"),m=e("./random-bytes") function y(e){return"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),f.arrayify(e)}function g(e,t){for(e=String(e);e.lengtht.maxLength&&o.throwError("invalid length for "+t.name,o.INVALID_ARGUMENT,{arg:"transaction"+t.name,value:n}),r.push(l.hexlify(n))})),null!=e.chainId&&0!==e.chainId&&(r.push(l.hexlify(e.chainId)),r.push("0x"),r.push("0x")) var n=h.encode(r) if(!t)return n var i=l.splitSignature(t),a=27+i.recoveryParam return 9===r.length&&(r.pop(),r.pop(),r.pop(),a+=2*e.chainId+8),r.push(l.hexlify(a)),r.push(l.stripZeros(l.arrayify(i.r))),r.push(l.stripZeros(l.arrayify(i.s))),h.encode(r)},r.parse=function(e){var t=h.decode(e) 9!==t.length&&6!==t.length&&o.throwError("invalid raw transaction",o.INVALID_ARGUMENT,{arg:"rawTransactin",value:e}) var r={nonce:p(t[0]).toNumber(),gasPrice:p(t[1]),gasLimit:p(t[2]),to:function(e){return"0x"===e?null:s.getAddress(e)}(t[3]),value:p(t[4]),data:t[5],chainId:0} if(6===t.length)return r try{r.v=u.bigNumberify(t[6]).toNumber()}catch(e){return o.info(e),r}if(r.r=l.hexZeroPad(t[7],32),r.s=l.hexZeroPad(t[8],32),u.bigNumberify(r.r).isZero()&&u.bigNumberify(r.s).isZero())r.chainId=r.v,r.v=0 else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0) var n=r.v-27,i=t.slice(0,6) 0!==r.chainId&&(i.push(l.hexlify(r.chainId)),i.push("0x"),i.push("0x"),n-=2*r.chainId+8) var f=c.keccak256(h.encode(i)) try{r.from=a.recoverAddress(f,{r:l.hexlify(r.r),s:l.hexlify(r.s),recoveryParam:n})}catch(e){o.info(e)}r.hash=c.keccak256(e)}return r},r.populateTransaction=function(e,t,r){d.Provider.isProvider(t)||o.throwError("missing provider",o.INVALID_ARGUMENT,{argument:"provider",value:t}),f.checkProperties(e,y) var n=f.shallowCopy(e) if(null!=n.to&&(n.to=t.resolveName(n.to)),null==n.gasPrice&&(n.gasPrice=t.getGasPrice()),null==n.nonce&&(n.nonce=t.getTransactionCount(r)),null==n.gasLimit){var i=f.shallowCopy(n) i.from=r,n.gasLimit=t.estimateGas(i)}return null==n.chainId&&(n.chainId=t.getNetwork().then((function(e){return e.chainId}))),f.resolveProperties(n)}},{"../constants":3,"../errors":5,"../providers/abstract-provider":50,"./address":60,"./bignumber":63,"./bytes":64,"./keccak256":71,"./properties":74,"./rlp":76,"./secp256k1":77}],84:[function(e,t,r){"use strict" var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var i,o=e("../constants"),a=n(e("../errors")),s=e("./bignumber"),u={} function l(e){return{decimals:e.length-1,tenPower:s.bigNumberify(e)}}function c(e){var t=u[String(e).toLowerCase()] if(!t&&"number"==typeof e&&parseInt(String(e))==e&&0<=e&&e<=256){for(var r="1",n=0;nr.decimals&&a.throwError("underflow occurred",a.NUMERIC_FAULT,{operation:"division",fault:"underflow"});l.length>6|192),r.push(63&o|128) else if(55296==(64512&o)){i++ var u=e.charCodeAt(i) if(i>=e.length||56320!=(64512&u))throw new Error("invalid utf-8 string") o=65536+((1023&o)<<10)+(1023&u),r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(63&o|128)}else r.push(o>>12|224),r.push(o>>6&63|128),r.push(63&o|128)}return s.arrayify(r)}function l(e,t){e=s.arrayify(e) for(var r="",n=0;n>7!=0){var o=null,a=null if(192==(224&i))o=1,a=127 else if(224==(240&i))o=2,a=2047 else{if(240!=(248&i)){if(t)continue if(128==(192&i))throw new Error("invalid utf8 byte sequence; unexpected continuation byte") throw new Error("invalid utf8 byte sequence; invalid prefix")}o=3,a=65535}if(n+o>e.length){if(!t)throw new Error("invalid utf8 byte sequence; too short") for(;n>6==2;n++);}else{for(var u=i&(1<<8-o-1)-1,l=0;l>10&1023),56320+(1023&u))) else if(!t)throw new Error("invalid utf8 byte sequence; invalid continuation byte")}}else r+=String.fromCharCode(i)}return r}(i=n=r.UnicodeNormalizationForm||(r.UnicodeNormalizationForm={})).current="",i.NFC="NFC",i.NFD="NFD",i.NFKC="NFKC",i.NFKD="NFKD",r.toUtf8Bytes=u,r.toUtf8String=l,r.formatBytes32String=function(e){var t=u(e) if(31t.ceiling&&(n=t.ceiling),s&&(u--,n=s,s=null),setTimeout(i,n)}return null}),(function(e){a()&&n(e)}))}()}))}},{"../errors":5,"./base64":61,"./properties":74,"./utf8":85,xmlhttprequest:49}],87:[function(e,t,n){(function(t){"use strict" Object.defineProperty(n,"__esModule",{value:!0}) var r=e("../utils/hash"),i=e("../utils/properties") n.check=function(e){for(var t=[],n=0;n<2048;n++){var i=e.getWord(n) if(n!==e.getWordIndex(i))return"0x" t.push(i)}return r.id(t.join("\n")+"\n")} var o=(a.prototype.split=function(e){return e.toLowerCase().split(/ +/g)},a.prototype.join=function(e){return e.join(" ")},a) function a(e){i.defineReadOnly(this,"locale",e)}n.Wordlist=o,n.register=function(e,t){t=t||e.locale}}).call(this,void 0!==r?r:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils/hash":65,"../utils/properties":74}],88:[function(e,t,r){"use strict" var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e var t={} if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]) return t.default=e,t} Object.defineProperty(r,"__esModule",{value:!0}) var a,s=e("./utils/bytes"),u=e("./utils/hash"),l=e("./utils/hdnode"),c=e("./utils/json-wallet"),f=e("./utils/keccak256"),h=e("./utils/properties"),d=e("./utils/random-bytes"),p=o(e("./utils/secret-storage")),m=e("./utils/signing-key"),y=e("./utils/transaction"),g=e("./abstract-signer"),v=e("./providers/abstract-provider"),b=o(e("./errors")),w=(i(_,a=g.Signer),Object.defineProperty(_.prototype,"address",{get:function(){return this.signingKey.address},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"mnemonic",{get:function(){return this.signingKey.mnemonic},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"path",{get:function(){return this.signingKey.path},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"privateKey",{get:function(){return this.signingKey.privateKey},enumerable:!0,configurable:!0}),_.prototype.connect=function(e){return v.Provider.isProvider(e)||b.throwError("invalid provider",b.INVALID_ARGUMENT,{argument:"provider",value:e}),new _(this.signingKey,e)},_.prototype.getAddress=function(){return Promise.resolve(this.address)},_.prototype.sign=function(e){var t=this return h.resolveProperties(e).then((function(e){var r=y.serialize(e),n=t.signingKey.signDigest(f.keccak256(r)) return y.serialize(e,n)}))},_.prototype.signMessage=function(e){return Promise.resolve(s.joinSignature(this.signingKey.signDigest(u.hashMessage(e))))},_.prototype.getBalance=function(e){if(!this.provider)throw new Error("missing provider") return this.provider.getBalance(this.address,e)},_.prototype.getTransactionCount=function(e){if(!this.provider)throw new Error("missing provider") return this.provider.getTransactionCount(this.address,e)},_.prototype.sendTransaction=function(e){var t=this if(!this.provider)throw new Error("missing provider") return null==e.nonce&&((e=h.shallowCopy(e)).nonce=this.getTransactionCount("pending")),y.populateTransaction(e,this.provider,this.address).then((function(e){return t.sign(e).then((function(e){return t.provider.sendTransaction(e)}))}))},_.prototype.encrypt=function(e,t,r){if("function"!=typeof t||r||(r=t,t={}),r&&"function"!=typeof r)throw new Error("invalid callback") return t=t||{},this.mnemonic&&((t=h.shallowCopy(t)).mnemonic=this.mnemonic,t.path=this.path),p.encrypt(this.privateKey,e,t,r)},_.createRandom=function(e){var t=d.randomBytes(16);(e=e||{}).extraEntropy&&(t=s.arrayify(f.keccak256(s.concat([t,e.extraEntropy])).substring(0,34))) var r=l.entropyToMnemonic(t,e.locale) return _.fromMnemonic(r,e.path,e.locale)},_.fromEncryptedJson=function(e,t,r){if(c.isCrowdsaleWallet(e))try{r&&r(0) var n=p.decryptCrowdsale(e,t) return r&&r(1),Promise.resolve(new _(n))}catch(e){return Promise.reject(e)}else if(c.isSecretStorageWallet(e))return p.decrypt(e,t,r).then((function(e){return new _(e)})) return Promise.reject("invalid wallet JSON")},_.fromMnemonic=function(e,t,r){return t=t||l.defaultPath,new _(l.fromMnemonic(e,r).derivePath(t))},_) function _(e,t){var r=a.call(this)||this return b.checkNew(r,_),m.SigningKey.isSigningKey(e)?h.defineReadOnly(r,"signingKey",e):h.defineReadOnly(r,"signingKey",new m.SigningKey(e)),h.defineReadOnly(r,"provider",t),r}r.Wallet=w},{"./abstract-signer":2,"./errors":5,"./providers/abstract-provider":50,"./utils/bytes":64,"./utils/hash":65,"./utils/hdnode":66,"./utils/json-wallet":70,"./utils/keccak256":71,"./utils/properties":74,"./utils/random-bytes":75,"./utils/secret-storage":78,"./utils/signing-key":81,"./utils/transaction":83}],89:[function(e,t,r){"use strict" Object.defineProperty(r,"__esModule",{value:!0}) var n=e("../wordlists/lang-en").langEn r.en=n},{"../wordlists/lang-en":90}],90:[function(e,t,r){"use strict" var n,i=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}) Object.defineProperty(r,"__esModule",{value:!0}) var o,a=e("../utils/wordlist"),s=null function u(e){if(null==s&&(s="AbandonAbilityAbleAboutAboveAbsentAbsorbAbstractAbsurdAbuseAccessAccidentAccountAccuseAchieveAcidAcousticAcquireAcrossActActionActorActressActualAdaptAddAddictAddressAdjustAdmitAdultAdvanceAdviceAerobicAffairAffordAfraidAgainAgeAgentAgreeAheadAimAirAirportAisleAlarmAlbumAlcoholAlertAlienAllAlleyAllowAlmostAloneAlphaAlreadyAlsoAlterAlwaysAmateurAmazingAmongAmountAmusedAnalystAnchorAncientAngerAngleAngryAnimalAnkleAnnounceAnnualAnotherAnswerAntennaAntiqueAnxietyAnyApartApologyAppearAppleApproveAprilArchArcticAreaArenaArgueArmArmedArmorArmyAroundArrangeArrestArriveArrowArtArtefactArtistArtworkAskAspectAssaultAssetAssistAssumeAsthmaAthleteAtomAttackAttendAttitudeAttractAuctionAuditAugustAuntAuthorAutoAutumnAverageAvocadoAvoidAwakeAwareAwayAwesomeAwfulAwkwardAxisBabyBachelorBaconBadgeBagBalanceBalconyBallBambooBananaBannerBarBarelyBargainBarrelBaseBasicBasketBattleBeachBeanBeautyBecauseBecomeBeefBeforeBeginBehaveBehindBelieveBelowBeltBenchBenefitBestBetrayBetterBetweenBeyondBicycleBidBikeBindBiologyBirdBirthBitterBlackBladeBlameBlanketBlastBleakBlessBlindBloodBlossomBlouseBlueBlurBlushBoardBoatBodyBoilBombBoneBonusBookBoostBorderBoringBorrowBossBottomBounceBoxBoyBracketBrainBrandBrassBraveBreadBreezeBrickBridgeBriefBrightBringBriskBroccoliBrokenBronzeBroomBrotherBrownBrushBubbleBuddyBudgetBuffaloBuildBulbBulkBulletBundleBunkerBurdenBurgerBurstBusBusinessBusyButterBuyerBuzzCabbageCabinCableCactusCageCakeCallCalmCameraCampCanCanalCancelCandyCannonCanoeCanvasCanyonCapableCapitalCaptainCarCarbonCardCargoCarpetCarryCartCaseCashCasinoCastleCasualCatCatalogCatchCategoryCattleCaughtCauseCautionCaveCeilingCeleryCementCensusCenturyCerealCertainChairChalkChampionChangeChaosChapterChargeChaseChatCheapCheckCheeseChefCherryChestChickenChiefChildChimneyChoiceChooseChronicChuckleChunkChurnCigarCinnamonCircleCitizenCityCivilClaimClapClarifyClawClayCleanClerkCleverClickClientCliffClimbClinicClipClockClogCloseClothCloudClownClubClumpClusterClutchCoachCoastCoconutCodeCoffeeCoilCoinCollectColorColumnCombineComeComfortComicCommonCompanyConcertConductConfirmCongressConnectConsiderControlConvinceCookCoolCopperCopyCoralCoreCornCorrectCostCottonCouchCountryCoupleCourseCousinCoverCoyoteCrackCradleCraftCramCraneCrashCraterCrawlCrazyCreamCreditCreekCrewCricketCrimeCrispCriticCropCrossCrouchCrowdCrucialCruelCruiseCrumbleCrunchCrushCryCrystalCubeCultureCupCupboardCuriousCurrentCurtainCurveCushionCustomCuteCycleDadDamageDampDanceDangerDaringDashDaughterDawnDayDealDebateDebrisDecadeDecemberDecideDeclineDecorateDecreaseDeerDefenseDefineDefyDegreeDelayDeliverDemandDemiseDenialDentistDenyDepartDependDepositDepthDeputyDeriveDescribeDesertDesignDeskDespairDestroyDetailDetectDevelopDeviceDevoteDiagramDialDiamondDiaryDiceDieselDietDifferDigitalDignityDilemmaDinnerDinosaurDirectDirtDisagreeDiscoverDiseaseDishDismissDisorderDisplayDistanceDivertDivideDivorceDizzyDoctorDocumentDogDollDolphinDomainDonateDonkeyDonorDoorDoseDoubleDoveDraftDragonDramaDrasticDrawDreamDressDriftDrillDrinkDripDriveDropDrumDryDuckDumbDuneDuringDustDutchDutyDwarfDynamicEagerEagleEarlyEarnEarthEasilyEastEasyEchoEcologyEconomyEdgeEditEducateEffortEggEightEitherElbowElderElectricElegantElementElephantElevatorEliteElseEmbarkEmbodyEmbraceEmergeEmotionEmployEmpowerEmptyEnableEnactEndEndlessEndorseEnemyEnergyEnforceEngageEngineEnhanceEnjoyEnlistEnoughEnrichEnrollEnsureEnterEntireEntryEnvelopeEpisodeEqualEquipEraEraseErodeErosionErrorEruptEscapeEssayEssenceEstateEternalEthicsEvidenceEvilEvokeEvolveExactExampleExcessExchangeExciteExcludeExcuseExecuteExerciseExhaustExhibitExileExistExitExoticExpandExpectExpireExplainExposeExpressExtendExtraEyeEyebrowFabricFaceFacultyFadeFaintFaithFallFalseFameFamilyFamousFanFancyFantasyFarmFashionFatFatalFatherFatigueFaultFavoriteFeatureFebruaryFederalFeeFeedFeelFemaleFenceFestivalFetchFeverFewFiberFictionFieldFigureFileFilmFilterFinalFindFineFingerFinishFireFirmFirstFiscalFishFitFitnessFixFlagFlameFlashFlatFlavorFleeFlightFlipFloatFlockFloorFlowerFluidFlushFlyFoamFocusFogFoilFoldFollowFoodFootForceForestForgetForkFortuneForumForwardFossilFosterFoundFoxFragileFrameFrequentFreshFriendFringeFrogFrontFrostFrownFrozenFruitFuelFunFunnyFurnaceFuryFutureGadgetGainGalaxyGalleryGameGapGarageGarbageGardenGarlicGarmentGasGaspGateGatherGaugeGazeGeneralGeniusGenreGentleGenuineGestureGhostGiantGiftGiggleGingerGiraffeGirlGiveGladGlanceGlareGlassGlideGlimpseGlobeGloomGloryGloveGlowGlueGoatGoddessGoldGoodGooseGorillaGospelGossipGovernGownGrabGraceGrainGrantGrapeGrassGravityGreatGreenGridGriefGritGroceryGroupGrowGruntGuardGuessGuideGuiltGuitarGunGymHabitHairHalfHammerHamsterHandHappyHarborHardHarshHarvestHatHaveHawkHazardHeadHealthHeartHeavyHedgehogHeightHelloHelmetHelpHenHeroHiddenHighHillHintHipHireHistoryHobbyHockeyHoldHoleHolidayHollowHomeHoneyHoodHopeHornHorrorHorseHospitalHostHotelHourHoverHubHugeHumanHumbleHumorHundredHungryHuntHurdleHurryHurtHusbandHybridIceIconIdeaIdentifyIdleIgnoreIllIllegalIllnessImageImitateImmenseImmuneImpactImposeImproveImpulseInchIncludeIncomeIncreaseIndexIndicateIndoorIndustryInfantInflictInformInhaleInheritInitialInjectInjuryInmateInnerInnocentInputInquiryInsaneInsectInsideInspireInstallIntactInterestIntoInvestInviteInvolveIronIslandIsolateIssueItemIvoryJacketJaguarJarJazzJealousJeansJellyJewelJobJoinJokeJourneyJoyJudgeJuiceJumpJungleJuniorJunkJustKangarooKeenKeepKetchupKeyKickKidKidneyKindKingdomKissKitKitchenKiteKittenKiwiKneeKnifeKnockKnowLabLabelLaborLadderLadyLakeLampLanguageLaptopLargeLaterLatinLaughLaundryLavaLawLawnLawsuitLayerLazyLeaderLeafLearnLeaveLectureLeftLegLegalLegendLeisureLemonLendLengthLensLeopardLessonLetterLevelLiarLibertyLibraryLicenseLifeLiftLightLikeLimbLimitLinkLionLiquidListLittleLiveLizardLoadLoanLobsterLocalLockLogicLonelyLongLoopLotteryLoudLoungeLoveLoyalLuckyLuggageLumberLunarLunchLuxuryLyricsMachineMadMagicMagnetMaidMailMainMajorMakeMammalManManageMandateMangoMansionManualMapleMarbleMarchMarginMarineMarketMarriageMaskMassMasterMatchMaterialMathMatrixMatterMaximumMazeMeadowMeanMeasureMeatMechanicMedalMediaMelodyMeltMemberMemoryMentionMenuMercyMergeMeritMerryMeshMessageMetalMethodMiddleMidnightMilkMillionMimicMindMinimumMinorMinuteMiracleMirrorMiseryMissMistakeMixMixedMixtureMobileModelModifyMomMomentMonitorMonkeyMonsterMonthMoonMoralMoreMorningMosquitoMotherMotionMotorMountainMouseMoveMovieMuchMuffinMuleMultiplyMuscleMuseumMushroomMusicMustMutualMyselfMysteryMythNaiveNameNapkinNarrowNastyNationNatureNearNeckNeedNegativeNeglectNeitherNephewNerveNestNetNetworkNeutralNeverNewsNextNiceNightNobleNoiseNomineeNoodleNormalNorthNoseNotableNoteNothingNoticeNovelNowNuclearNumberNurseNutOakObeyObjectObligeObscureObserveObtainObviousOccurOceanOctoberOdorOffOfferOfficeOftenOilOkayOldOliveOlympicOmitOnceOneOnionOnlineOnlyOpenOperaOpinionOpposeOptionOrangeOrbitOrchardOrderOrdinaryOrganOrientOriginalOrphanOstrichOtherOutdoorOuterOutputOutsideOvalOvenOverOwnOwnerOxygenOysterOzonePactPaddlePagePairPalacePalmPandaPanelPanicPantherPaperParadeParentParkParrotPartyPassPatchPathPatientPatrolPatternPausePavePaymentPeacePeanutPearPeasantPelicanPenPenaltyPencilPeoplePepperPerfectPermitPersonPetPhonePhotoPhrasePhysicalPianoPicnicPicturePiecePigPigeonPillPilotPinkPioneerPipePistolPitchPizzaPlacePlanetPlasticPlatePlayPleasePledgePluckPlugPlungePoemPoetPointPolarPolePolicePondPonyPoolPopularPortionPositionPossiblePostPotatoPotteryPovertyPowderPowerPracticePraisePredictPreferPreparePresentPrettyPreventPricePridePrimaryPrintPriorityPrisonPrivatePrizeProblemProcessProduceProfitProgramProjectPromoteProofPropertyProsperProtectProudProvidePublicPuddingPullPulpPulsePumpkinPunchPupilPuppyPurchasePurityPurposePursePushPutPuzzlePyramidQualityQuantumQuarterQuestionQuickQuitQuizQuoteRabbitRaccoonRaceRackRadarRadioRailRainRaiseRallyRampRanchRandomRangeRapidRareRateRatherRavenRawRazorReadyRealReasonRebelRebuildRecallReceiveRecipeRecordRecycleReduceReflectReformRefuseRegionRegretRegularRejectRelaxReleaseReliefRelyRemainRememberRemindRemoveRenderRenewRentReopenRepairRepeatReplaceReportRequireRescueResembleResistResourceResponseResultRetireRetreatReturnReunionRevealReviewRewardRhythmRibRibbonRiceRichRideRidgeRifleRightRigidRingRiotRippleRiskRitualRivalRiverRoadRoastRobotRobustRocketRomanceRoofRookieRoomRoseRotateRoughRoundRouteRoyalRubberRudeRugRuleRunRunwayRuralSadSaddleSadnessSafeSailSaladSalmonSalonSaltSaluteSameSampleSandSatisfySatoshiSauceSausageSaveSayScaleScanScareScatterSceneSchemeSchoolScienceScissorsScorpionScoutScrapScreenScriptScrubSeaSearchSeasonSeatSecondSecretSectionSecuritySeedSeekSegmentSelectSellSeminarSeniorSenseSentenceSeriesServiceSessionSettleSetupSevenShadowShaftShallowShareShedShellSheriffShieldShiftShineShipShiverShockShoeShootShopShortShoulderShoveShrimpShrugShuffleShySiblingSickSideSiegeSightSignSilentSilkSillySilverSimilarSimpleSinceSingSirenSisterSituateSixSizeSkateSketchSkiSkillSkinSkirtSkullSlabSlamSleepSlenderSliceSlideSlightSlimSloganSlotSlowSlushSmallSmartSmileSmokeSmoothSnackSnakeSnapSniffSnowSoapSoccerSocialSockSodaSoftSolarSoldierSolidSolutionSolveSomeoneSongSoonSorrySortSoulSoundSoupSourceSouthSpaceSpareSpatialSpawnSpeakSpecialSpeedSpellSpendSphereSpiceSpiderSpikeSpinSpiritSplitSpoilSponsorSpoonSportSpotSpraySpreadSpringSpySquareSqueezeSquirrelStableStadiumStaffStageStairsStampStandStartStateStaySteakSteelStemStepStereoStickStillStingStockStomachStoneStoolStoryStoveStrategyStreetStrikeStrongStruggleStudentStuffStumbleStyleSubjectSubmitSubwaySuccessSuchSuddenSufferSugarSuggestSuitSummerSunSunnySunsetSuperSupplySupremeSureSurfaceSurgeSurpriseSurroundSurveySuspectSustainSwallowSwampSwapSwarmSwearSweetSwiftSwimSwingSwitchSwordSymbolSymptomSyrupSystemTableTackleTagTailTalentTalkTankTapeTargetTaskTasteTattooTaxiTeachTeamTellTenTenantTennisTentTermTestTextThankThatThemeThenTheoryThereTheyThingThisThoughtThreeThriveThrowThumbThunderTicketTideTigerTiltTimberTimeTinyTipTiredTissueTitleToastTobaccoTodayToddlerToeTogetherToiletTokenTomatoTomorrowToneTongueTonightToolToothTopTopicToppleTorchTornadoTortoiseTossTotalTouristTowardTowerTownToyTrackTradeTrafficTragicTrainTransferTrapTrashTravelTrayTreatTreeTrendTrialTribeTrickTriggerTrimTripTrophyTroubleTruckTrueTrulyTrumpetTrustTruthTryTubeTuitionTumbleTunaTunnelTurkeyTurnTurtleTwelveTwentyTwiceTwinTwistTwoTypeTypicalUglyUmbrellaUnableUnawareUncleUncoverUnderUndoUnfairUnfoldUnhappyUniformUniqueUnitUniverseUnknownUnlockUntilUnusualUnveilUpdateUpgradeUpholdUponUpperUpsetUrbanUrgeUsageUseUsedUsefulUselessUsualUtilityVacantVacuumVagueValidValleyValveVanVanishVaporVariousVastVaultVehicleVelvetVendorVentureVenueVerbVerifyVersionVeryVesselVeteranViableVibrantViciousVictoryVideoViewVillageVintageViolinVirtualVirusVisaVisitVisualVitalVividVocalVoiceVoidVolcanoVolumeVoteVoyageWageWagonWaitWalkWallWalnutWantWarfareWarmWarriorWashWaspWasteWaterWaveWayWealthWeaponWearWeaselWeatherWebWeddingWeekendWeirdWelcomeWestWetWhaleWhatWheatWheelWhenWhereWhipWhisperWideWidthWifeWildWillWinWindowWineWingWinkWinnerWinterWireWisdomWiseWishWitnessWolfWomanWonderWoodWoolWordWorkWorldWorryWorthWrapWreckWrestleWristWriteWrongYardYearYellowYouYoungYouthZebraZeroZoneZoo".replace(/([A-Z])/g," $1").toLowerCase().substring(1).split(" "),"0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60"!==a.check(e)))throw s=null,new Error("BIP39 Wordlist for en (English) FAILED")}function l(){return o.call(this,"en")||this}var c=new(i(l,o=a.Wordlist),l.prototype.getWord=function(e){return u(this),s[e]},l.prototype.getWordIndex=function(e){return u(this),s.indexOf(e)},l) r.langEn=c,a.register(c)},{"../utils/wordlist":87}]},{},[7])(7)},"object"==s(t)&&void 0!==e?e.exports=a():(i=[],void 0===(o="function"==typeof(n=a)?n.apply(t,i):n)||(e.exports=o))}).call(this,r(4))},function(e,t,r){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:{} n(this,e) var o=i.addresses,a=i.abis,s=i.ipfsConfig this.provider=t,this.signer=r,this.options=i,this.addresses=o||{},this.abis=a||u,this.ipfs=new h(s),this.contracts={}}var t,r,d return t=e,d=[{key:"setup",value:function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null return s("Kredits.setup() is deprecated use new Kredits().init() instead"),new e(t,r,{ipfsConfig:n}).init()}},{key:"for",value:function(t,r){var n,i,a=t.network,s=t.rpcUrl,u=t.wallet return s||"local"!==a||(s="http://localhost:8545"),n=s?new o.providers.JsonRpcProvider(s):new o.getDefaultProvider(a),u?i=u.connect(n):n.getSigner&&(i=n.getSigner()),new e(n,i,r)}},{key:"availableNetworks",value:function(){return Object.keys(c)}}],(r=[{key:"init",value:function(e){var t=this,r=e||l return this.provider.getNetwork().then((function(e){t.addresses.Kernel=t.addresses.Kernel||c[e.chainId.toString()] var n=r.map((function(e){return t.Kernel.getApp(e).then((function(r){t.addresses[e]=r})).catch((function(r){throw new Error("Failed to get address for ".concat(e," from DAO at ").concat(t.Kernel.contract.address,"\n - ").concat(r.message))}))})) return Promise.all(n).then((function(){return t}))}))}},{key:"contractFor",value:function(e){if(this.contracts[e])return this.contracts[e] var t,r,n,i=(r=(t=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(e))[0],n=t.slice(1),"".concat(r.toUpperCase()).concat(n.join(""))),a=this.addresses[i],s=this.abis[i] if(!a||!s)throw new Error("Address or ABI not found for ".concat(i)) var u=this.signer||this.provider,l=new o.Contract(a,s,u) return this.contracts[e]=new f[i](l),this.contracts[e].ipfs=this.ipfs,this.contracts[e]}},{key:"preflightChecks",value:function(){return new a(this).check()}},{key:"Kernel",get:function(){var e=this.contractFor("Kernel") return this.options.apm&&(e.apm=this.options.apm),e}},{key:"Contributor",get:function(){return this.contractFor("Contributor")}},{key:"Contributors",get:function(){return s("Contributors is deprecated use Contributor instead"),this.Contributor}},{key:"Proposal",get:function(){return this.contractFor("Proposal")}},{key:"Operator",get:function(){return this.Proposal}},{key:"Token",get:function(){return this.contractFor("Token")}},{key:"Contribution",get:function(){return this.contractFor("Contribution")}},{key:"Acl",get:function(){return this.contractFor("Acl")}}])&&i(t.prototype,r),d&&i(t,d),e}() e.exports=d},function(e,t){function r(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"filter" return this.all().then((function(r){var n=Object.entries(e) return r[t]((function(e){return!!e.accounts&&e.accounts.find((function(e){return n.every((function(t){var r=a(t,2),n=r[0],i=r[1] return e[n]===i}))}))}))}))}},{key:"add",value:(i=o(regeneratorRuntime.mark((function e(t){var r,n,i,o=this,a=arguments return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},n=new d(t),e.prev=2,e.next=5,n.validate() case 5:e.next=10 break case 7:return e.prev=7,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0)) case 10:return i=n.serialize(),e.abrupt("return",this.ipfs.add(i).then((function(e){var n,i=[t.account,e.hashDigest,e.hashFunction,e.hashSize] return(n=o.functions).addContributor.apply(n,i.concat([r]))}))) case 12:case"end":return e.stop()}}),e,this,[[2,7]])}))),function(e){return i.apply(this,arguments)})},{key:"updateProfile",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{} return this.getById(e).then(function(){var i=o(regeneratorRuntime.mark((function i(o){var a,s,u return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return a=Object.assign(o,t),s=new d(a),i.prev=2,i.next=5,s.validate() case 5:i.next=10 break case 7:return i.prev=7,i.t0=i.catch(2),i.abrupt("return",Promise.reject(i.t0)) case 10:return u=s.serialize(),i.abrupt("return",r.ipfs.add(u).then((function(t){return r.functions.updateContributorProfileHash(e,t.hashDigest,t.hashFunction,t.hashSize,n)}))) case 12:case"end":return i.stop()}}),i,null,[[2,7]])}))) return function(e){return i.apply(this,arguments)}}())}},{key:"count",get:function(){return this.functions.contributorsCount()}}])&&u(r.prototype,n),t}(h) e.exports=m},function(e,t){function r(e,t,r){var n=Math.ceil(r/t) return(e=(e=parseInt(e)||1)>n?n:e)<1?1:e}function n(e,t,r,n){var i,o,a=r*(t-1) "asc"===e?(i=1+a,o=function(e,t){return i+t}):(i=n-a,o=function(e,t){return i-t}) var s=a+r return s>n&&(r-=s-n),Array.from({length:r},o)}e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.order,o=t.page i=i||"desc",o=o||{} var a=parseInt(o.size)||25,s=r(o.number,a,e) return n(i,s,a,e)}},function(e,t,r){function n(e,t){for(var r=0;r0?n-4:n,f=0;f>16&255,s[u++]=t>>8&255,s[u++]=255&t return 2===a&&(t=i[e.charCodeAt(f)]<<2|i[e.charCodeAt(f+1)]>>4,s[u++]=255&t),1===a&&(t=i[e.charCodeAt(f)]<<10|i[e.charCodeAt(f+1)]<<4|i[e.charCodeAt(f+2)]>>2,s[u++]=t>>8&255,s[u++]=255&t),s},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=0,s=r-i;as?s:a+16383)) return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")} for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4") var r=e.indexOf("=") return-1===r&&(r=t),[r,r===t?0:4-r%4]}function c(e,t,r){for(var i,o,a=[],s=t;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]) return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t,r){var n,i function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}void 0===(i="function"==typeof(n=function(){var e,t,r,n Object.keys||(Object.keys=(e=Object.prototype.hasOwnProperty,t=!{toString:null}.propertyIsEnumerable("toString"),n=(r=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]).length,function(i){if("object"!==o(i)&&"function"!=typeof i||null===i)throw new TypeError("Object.keys called on non-object") var a=[] for(var s in i)e.call(i,s)&&a.push(s) if(t)for(var u=0;u>>0 if(0===r)return-1 var n=0 if(arguments.length>1&&((n=Number(arguments[1]))!=n?n=0:0!==n&&n!==1/0&&n!==-1/0&&(n=(n>0||-1)*Math.floor(Math.abs(n)))),n>=r)return-1 for(var i=n>=0?n:Math.max(r-Math.abs(n),0);i0&&(t+=f.suffices["*"]&&r||",",f.suffices["*"]&&l&&(t+=f.name+"=")),t+=u?encodeURIComponent(h[p]).replace(/!/g,"%21"):s(h[p])}else if("object"===o(h)){l&&!f.suffices["*"]&&(t+=f.name+"=") var m=!0 for(var y in h)m||(t+=f.suffices["*"]&&r||","),m=!1,t+=u?encodeURIComponent(y).replace(/!/g,"%21"):s(y),t+=f.suffices["*"]?"=":",",t+=u?encodeURIComponent(h[y]).replace(/!/g,"%21"):s(h[y])}else l&&(t+=f.name,c&&""===h||(t+="=")),null!=f.truncate&&(h=h.substring(0,f.truncate)),t+=u?encodeURIComponent(h).replace(/!/g,"%21"):s(h)}return t} return _.varNames=f,{prefix:n,substitution:_}}function l(e){if(!(this instanceof l))return new l(e) for(var t=e.split("{"),r=[t.shift()],n=[],i=[],o=[];t.length>0;){var a=t.shift(),s=a.split("}")[0],c=a.substring(s.length+1),f=u(s) i.push(f.substitution),n.push(f.prefix),r.push(c),o=o.concat(f.substitution.varNames)}this.fill=function(e){for(var t=r[0],n=0;n0&&"/"===t.charAt(e.length-1)||"#"===r.charAt(0)||"?"===r.charAt(0))return!0}return!1}(t,e.id)&&void 0===this.schemas[e.id]&&(this.schemas[e.id]=e),e)if("enum"!==n)if("object"===o(e[n]))this.searchSchemas(e[n],t) else if("$ref"===n){var i=y(e[n]) i&&void 0===this.schemas[i]&&void 0===this.missingMap[i]&&(this.missingMap[i]=i)}},c.prototype.addSchema=function(e,t){if("string"!=typeof e||void 0===t){if("object"!==o(e)||"string"!=typeof e.id)return e=(t=e).id}e===y(e)+"#"&&(e=y(e)),this.schemas[e]=t,delete this.missingMap[e],g(t,e),this.searchSchemas(t,e)},c.prototype.getSchemaMap=function(){var e={} for(var t in this.schemas)e[t]=this.schemas[t] return e},c.prototype.getSchemaUris=function(e){var t=[] for(var r in this.schemas)e&&!e.test(r)||t.push(r) return t},c.prototype.getMissingUris=function(e){var t=[] for(var r in this.missingMap)e&&!e.test(r)||t.push(r) return t},c.prototype.dropSchemas=function(){this.schemas={},this.reset()},c.prototype.reset=function(){this.missing=[],this.missingMap={},this.errors=[]},c.prototype.validateAll=function(e,t,r,n,i){var a if(!(t=this.resolveRefs(t)))return null if(t instanceof E)return this.errors.push(t),t var s,u=this.errors.length,l=null,c=null if(this.checkRecursive&&e&&"object"===o(e)){if(a=!this.scanned.length,e[this.validatedSchemasKey]){var f=e[this.validatedSchemasKey].indexOf(t) if(-1!==f)return this.errors=this.errors.concat(e[this.validationErrorsKey][f]),null}if(Object.isFrozen(e)&&-1!==(s=this.scannedFrozen.indexOf(e))){var h=this.scannedFrozenSchemas[s].indexOf(t) if(-1!==h)return this.errors=this.errors.concat(this.scannedFrozenValidationErrors[s][h]),null}if(this.scanned.push(e),Object.isFrozen(e))-1===s&&(s=this.scannedFrozen.length,this.scannedFrozen.push(e),this.scannedFrozenSchemas.push([])),l=this.scannedFrozenSchemas[s].length,this.scannedFrozenSchemas[s][l]=t,this.scannedFrozenValidationErrors[s][l]=[] else{if(!e[this.validatedSchemasKey])try{Object.defineProperty(e,this.validatedSchemasKey,{value:[],configurable:!0}),Object.defineProperty(e,this.validationErrorsKey,{value:[],configurable:!0})}catch(t){e[this.validatedSchemasKey]=[],e[this.validationErrorsKey]=[]}c=e[this.validatedSchemasKey].length,e[this.validatedSchemasKey][c]=t,e[this.validationErrorsKey][c]=[]}}var d=this.errors.length,p=this.validateBasic(e,t,i)||this.validateNumeric(e,t,i)||this.validateString(e,t,i)||this.validateArray(e,t,i)||this.validateObject(e,t,i)||this.validateCombinations(e,t,i)||this.validateHypermedia(e,t,i)||this.validateFormat(e,t,i)||this.validateDefinedKeywords(e,t,i)||null if(a){for(;this.scanned.length;)delete this.scanned.pop()[this.validatedSchemasKey] this.scannedFrozen=[],this.scannedFrozenSchemas=[]}if(p||d!==this.errors.length)for(;r&&r.length||n&&n.length;){var m=r&&r.length?""+r.pop():null,y=n&&n.length?""+n.pop():null p&&(p=p.prefixWith(m,y)),this.prefixErrors(d,m,y)}return null!==l?this.scannedFrozenValidationErrors[s][l]=this.errors.slice(u):null!==c&&(e[this.validationErrorsKey][c]=this.errors.slice(u)),this.handleError(p)},c.prototype.validateFormat=function(e,t){if("string"!=typeof t.format||!this.formatValidators[t.format])return null var r=this.formatValidators[t.format].call(null,e,t) return"string"==typeof r||"number"==typeof r?this.createError(b.FORMAT_CUSTOM,{message:r},"","/format",null,e,t):r&&"object"===o(r)?this.createError(b.FORMAT_CUSTOM,{message:r.message||"?"},r.dataPath||"",r.schemaPath||"/format",null,e,t):null},c.prototype.validateDefinedKeywords=function(e,t,r){for(var n in this.definedKeywords)if(void 0!==t[n])for(var i=this.definedKeywords[n],a=0;a=h&&nt.maximum)return this.createError(b.NUMBER_MAXIMUM,{value:e,maximum:t.maximum},"","/maximum",null,e,t) if(t.exclusiveMaximum&&e===t.maximum)return this.createError(b.NUMBER_MAXIMUM_EXCLUSIVE,{value:e,maximum:t.maximum},"","/exclusiveMaximum",null,e,t)}return null},c.prototype.validateNaN=function(e,t){return"number"!=typeof e?null:!0===isNaN(e)||e===1/0||e===-1/0?this.createError(b.NUMBER_NOT_A_NUMBER,{value:e},"","/type",null,e,t):null},c.prototype.validateString=function(e,t,r){return this.validateStringLength(e,t,r)||this.validateStringPattern(e,t,r)||null},c.prototype.validateStringLength=function(e,t){return"string"!=typeof e?null:void 0!==t.minLength&&e.lengtht.maxLength?this.createError(b.STRING_LENGTH_LONG,{length:e.length,maximum:t.maxLength},"","/maxLength",null,e,t):null},c.prototype.validateStringPattern=function(e,t){if("string"!=typeof e||"string"!=typeof t.pattern&&!(t.pattern instanceof RegExp))return null var r if(t.pattern instanceof RegExp)r=t.pattern else{var n,i="",o=t.pattern.match(/^\/(.+)\/([img]*)$/) o?(n=o[1],i=o[2]):n=t.pattern,r=new RegExp(n,i)}return r.test(e)?null:this.createError(b.STRING_PATTERN,{pattern:t.pattern},"","/pattern",null,e,t)},c.prototype.validateArray=function(e,t,r){return Array.isArray(e)&&(this.validateArrayLength(e,t,r)||this.validateArrayUniqueItems(e,t,r)||this.validateArrayItems(e,t,r))||null},c.prototype.validateArrayLength=function(e,t){var r return void 0!==t.minItems&&e.lengtht.maxItems&&(r=this.createError(b.ARRAY_LENGTH_LONG,{length:e.length,maximum:t.maxItems},"","/maxItems",null,e,t),this.handleError(r))?r:null},c.prototype.validateArrayUniqueItems=function(e,t){if(t.uniqueItems)for(var r=0;rt.maxProperties&&(r=this.createError(b.OBJECT_PROPERTIES_MAXIMUM,{propertyCount:n.length,maximum:t.maxProperties},"","/maxProperties",null,e,t),this.handleError(r))?r:null},c.prototype.validateObjectRequiredProperties=function(e,t){if(void 0!==t.required)for(var r=0;r 10000") if(void 0!==b[e])throw new Error("Error already defined: "+e+" as "+b[e]) if(void 0!==w[t])throw new Error("Error code already used: "+w[t]+" as "+t) for(var n in b[e]=t,w[t]=e,S[e]=S[t]=r,k){var i=k[n] i[e]&&(i[t]=i[t]||i[e])}},reset:function(){i.reset(),this.error=null,this.missing=[],this.valid=!0},missing:[],error:null,valid:!0,normSchema:g,resolveUrl:m,getDocumentUri:y,errorCodes:b} return o.language(t||"en"),o}() return M.addLanguage("en-gb",S),M.tv4=M,M})?n.apply(t,[]):n)||(e.exports=i)},function(e,t,r){var n=r(57).utils e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.formatEther(e) return t.asFloat?parseFloat(r):parseInt(r)}},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function o(e){return function(){var t=this,r=arguments return new Promise((function(n,o){var a=e.apply(t,r) function s(e){i(a,n,o,s,u,"next",e)}function u(e){i(a,n,o,s,u,"throw",e)}s(void 0)}))}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r1&&void 0!==a[1]?a[1]:{},n=new h(t),e.prev=2,e.next=5,n.validate() case 5:e.next=10 break case 7:return e.prev=7,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0)) case 10:return i=n.serialize(),e.abrupt("return",this.ipfs.add(i).then((function(e){var n,i=[t.amount,t.contributorId,e.hashDigest,e.hashFunction,e.hashSize] return(n=o.functions).add.apply(n,i.concat([r]))}))) case 12:case"end":return e.stop()}}),e,this,[[2,7]])}))),function(e){return i.apply(this,arguments)})},{key:"addContribution",value:function(){return d("The function `addContribution()` is deprecated and will be removed in the next major version. Use `add()` instead"),this.add.apply(this,arguments)}},{key:"count",get:function(){return this.functions.contributionsCount()}}])&&s(r.prototype,n),t}(f) e.exports=p},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r1&&void 0!==a[1]?a[1]:{},n=new f(t),e.prev=2,e.next=5,n.validate() case 5:e.next=10 break case 7:return e.prev=7,e.t0=e.catch(2),e.abrupt("return",Promise.reject(e.t0)) case 10:return i=n.serialize(),e.abrupt("return",this.ipfs.add(i).then((function(e){var n,i=[t.contributorId,t.amount,e.hashDigest,e.hashFunction,e.hashSize] return(n=o.functions).addProposal.apply(n,i.concat([r]))}))) case 12:case"end":return e.stop()}}),e,this,[[2,7]])})),d=function(){var e=this,t=arguments return new Promise((function(r,n){var o=c.apply(e,t) function a(e){i(o,r,n,a,s,"next",e)}function s(e){i(o,r,n,a,s,"throw",e)}a(void 0)}))},function(e){return d.apply(this,arguments)})},{key:"addProposal",value:function(){return h("The function `addProposal()` is deprecated and will be removed in the next major version. Use `add()` instead"),this.add.apply(this,arguments)}},{key:"count",get:function(){return this.functions.proposalsCount()}}])&&a(r.prototype,n),t}(c) e.exports=d},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called") return e}(e):t}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var u=function(e){function t(){return i(this,t),o(this,a(t).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function") e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(t,e),t}(r(58)) e.exports=u},function(e,t,r){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:null,i=c.keccak256(c.toUtf8Bytes(r)) return this.functions.hasPermission(e,t,i,n)}}])&&o(r.prototype,n),t}(l) e.exports=f},function(e,t,r){function n(e,t){for(var r=0;r=255)throw new TypeError("Alphabet too long") var t=new Uint8Array(256) t.fill(255) for(var r=0;r>>0,c=new Uint8Array(l);e[r];){var f=t[e.charCodeAt(r)] if(255===f)return for(var h=0,d=l-1;(0!==f||h>>0,c[d]=f%256>>>0,f=f/256>>>0 if(0!==f)throw new Error("Non-zero carry") o=h,r++}if(" "!==e[r]){for(var p=l-o;p!==l&&0===c[p];)p++ var m=n.allocUnsafe(i+(l-p)) m.fill(0,0,i) for(var y=i;p!==l;)m[y++]=c[p++] return m}}}return{encode:function(t){if(!n.isBuffer(t))throw new TypeError("Expected Buffer") if(0===t.length)return"" for(var r=0,i=0,o=0,u=t.length;o!==u&&0===t[o];)o++,r++ for(var c=(u-o)*l+1>>>0,f=new Uint8Array(c);o!==u;){for(var h=t[o],d=0,p=c-1;(0!==h||d>>0,f[p]=h%a>>>0,h=h/a>>>0 if(0!==h)throw new Error("Non-zero carry") i=d,o++}for(var m=c-i;m!==c&&0===f[m];)m++ for(var y=s.repeat(r);m=r;)n[i++]=255&t|128,t/=128 for(;-128&t;)n[i++]=255&t|128,t>>>=7 return n[i]=0|t,e.bytes=i-o+1,n} var r=Math.pow(2,31)},function(e,t){e.exports=function e(t,r){var n,i=0,o=0,a=r=r||0,s=t.length do{if(a>=s)throw e.bytes=0,new RangeError("Could not decode varint") n=t[a++],i+=o<28?(127&n)<=128) return e.bytes=a-r,i}},function(e,t){var r=Math.pow(2,7),n=Math.pow(2,14),i=Math.pow(2,21),o=Math.pow(2,28),a=Math.pow(2,35),s=Math.pow(2,42),u=Math.pow(2,49),l=Math.pow(2,56),c=Math.pow(2,63) e.exports=function(e){return e>=8 for(;l>0;)o.push(255&l),l>>=8}for(var c=0;e[c]===i&&c0;)n.push(s%r),s=s/r|0}for(var u="",l=0;0===t[l]&&l=0;--c)u+=e[n[c]] return u},decodeUnsafe:s,decode:function(e){var t=s(e) if(t)return t throw new Error("Non-base"+r+" character")}}}},function(e,t,r){"use strict";(function(t){e.exports=function(e){return{encode:function(e){return"string"==typeof e?t.from(e).toString("hex"):e.toString("hex")},decode:function(r){var n=!0,i=!1,o=void 0 try{for(var a,s=r[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value if(e.indexOf(u)<0)throw new Error("invalid base16 character")}}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return t.from(r,"hex")}}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){e.exports=function(e){return{encode:function(r){return function(e,t){var r=e.byteLength,n=new Uint8Array(e),i=t.indexOf("=")===t.length-1 i&&(t=t.substring(0,t.length-2)) for(var o=0,a=0,s="",u=0;u=5;)s+=t[a>>>o-5&31],o-=5 if(o>0&&(s+=t[a<<5-o&31]),i)for(;s.length%8!=0;)s+="=" return s}("string"==typeof r?t.from(r):r,e)},decode:function(t){var r=!0,n=!1,i=void 0 try{for(var o,a=t[Symbol.iterator]();!(r=(o=a.next()).done);r=!0){var s=o.value if(e.indexOf(s)<0)throw new Error("invalid base32 character")}}catch(e){n=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(n)throw i}}return function(e,t){for(var r=(e=e.replace(new RegExp("=","g"),"")).length,n=0,i=0,o=0,a=new Uint8Array(5*r/8|0),s=0;s=8&&(a[o++]=i>>>n-8&255,n-=8) return a.buffer}(t,e)}}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){e.exports=function(e){var r=e.indexOf("=")>-1,n=e.indexOf("-")>-1&&e.indexOf("_")>-1 return{encode:function(e){var i="" i="string"==typeof e?t.from(e).toString("base64"):e.toString("base64"),n&&(i=i.replace(/\+/g,"-").replace(/\//g,"_")) var o=i.indexOf("=") return o>0&&!r&&(i=i.substring(0,o)),i},decode:function(r){var n=!0,i=!1,o=void 0 try{for(var a,s=r[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var u=a.value if(e.indexOf(u)<0)throw new Error("invalid base64 character")}}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return t.from(r,"base64")}}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(280),i=r(81),o=r(14) function a(e){var t=[],r=e.split("/").slice(1) if(1===r.length&&""===r[0])return[] for(var n=0;n=r.length)throw g("invalid address: "+e) if(a.path){t.push([o,y(r.slice(n).join("/"))]) break}t.push([o,r[n]])}else t.push([o])}return t}function s(e){var t=[] return e.map((function(e){var r=v(e) t.push(r.name),e.length>1&&t.push(e[1])})),y(t.join("/"))}function u(e){return e.map((function(e){Array.isArray(e)||(e=[e]) var t=v(e) return e.length>1?[t.code,n.toBuffer(t.code,e[1])]:[t.code]}))}function l(e){return e.map((function(e){var t=v(e) return e.length>1?[t.code,n.toString(t.code,e[1])]:[t.code]}))}function c(e){return p(t.concat(e.map((function(e){var r=v(e),n=t.from(o.encode(r.code)) return e.length>1&&(n=t.concat([n,e[1]])),n}))))}function f(e,t){return e.size>0?e.size/8:0===e.size?0:o.decode(t)+o.decode.bytes}function h(e){for(var t=[],r=0;re.length)throw g("Invalid address buffer: "+e.toString("hex")) t.push([n,u])}else t.push([n]),r+=a}return t}function d(e){return c(u(a(e=y(e))))}function p(e){var r=m(e) if(r)throw r return t.from(e)}function m(e){try{h(e)}catch(e){return e}}function y(e){return"/"+e.trim().split("/").filter((function(e){return e})).join("/")}function g(e){return new Error("Error parsing address: "+e)}function v(e){return i(e[0])}e.exports={stringToStringTuples:a,stringTuplesToString:s,tuplesToStringTuples:l,stringTuplesToTuples:u,bufferToTuples:h,tuplesToBuffer:c,bufferToString:function(e){return s(l(h(e)))},stringToBuffer:d,fromString:function(e){return d(e)},fromBuffer:p,validateBuffer:m,isValidBuffer:function(e){return void 0===m(e)},cleanPath:y,ParseError:g,protoFromTuple:v,sizeForAddr:f}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(281),i=r(282),o=r(81),a=r(21),s=r(284),u=r(14) function l(e,r){return r instanceof t?l.toString(e,r):l.toBuffer(e,r)}function c(e){if(!i(e))throw new Error("invalid ip address") return n.toBuffer(e)}function f(e){var r=t.alloc(2) return r.writeUInt16BE(e,0),r}function h(e){return e.readUInt16BE(0)}e.exports=l,l.toString=function(e,t){switch((e=o(e)).code){case 4:case 41:return function(e){var t=n.toString(e) if(!i(t))throw new Error("invalid ip address") return t}(t) case 6:case 273:case 33:case 132:return h(t) case 53:case 54:case 55:case 56:case 400:return function(e){var t=u.decode(e) if((e=e.slice(u.decode.bytes)).length!==t)throw new Error("inconsistent lengths") return e.toString()}(t) case 421:return function(e){var t=u.decode(e),r=e.slice(u.decode.bytes) if(r.length!==t)throw new Error("inconsistent lengths") return a.encode(r)}(t) case 444:case 445:return function(e){var t=e.slice(0,e.length-2),r=e.slice(e.length-2) return s.encode(t).toString("ascii").toLowerCase()+":"+h(r)}(t) default:return t.toString("hex")}},l.toBuffer=function(e,r){switch((e=o(e)).code){case 4:case 41:return c(r) case 6:case 273:case 33:case 132:return f(parseInt(r,10)) case 53:case 54:case 55:case 56:case 400:return function(e){var r=t.from(e),n=t.from(u.encode(r.length)) return t.concat([n,r])}(r) case 421:return n=r,i=t.from(a.decode(n)),l=t.from(u.encode(i.length)),t.concat([l,i]) case 444:return function(e){var r=e.split(":") if(2!==r.length)throw new Error("failed to parse onion addr: "+r+" does not contain a port number") if(16!==r[0].length)throw new Error("failed to parse onion addr: "+r[0]+" not a Tor onion address.") var n=t.from(s.decode.asBytes(r[0].toUpperCase())),i=parseInt(r[1],10) if(i<1||i>65536)throw new Error("Port number is not in range(1, 65536)") var o=f(i) return t.concat([n,o])}(r) case 445:return function(e){var r=e.split(":") if(2!==r.length)throw new Error("failed to parse onion addr: "+r+" does not contain a port number") if(56!==r[0].length)throw new Error("failed to parse onion addr: "+r[0]+" not a Tor onion3 address.") var n=t.from(s.decode.asBytes(r[0].toUpperCase())),i=parseInt(r[1],10) if(i<1||i>65536)throw new Error("Port number is not in range(1, 65536)") var o=f(i) return t.concat([n,o])}(r) default:return t.from(r,"hex")}var n,i,l}}).call(this,r(0).Buffer)},function(e,t,r){"use strict" var n=t,i=r(0).Buffer,o=r(131) n.toBuffer=function(e,t,r){var n if(r=~~r,this.isV4Format(e))n=t||new i(r+4),e.split(/\./g).map((function(e){n[r++]=255&parseInt(e,10)})) else if(this.isV6Format(e)){var o,a=e.split(":",8) for(o=0;o0;o--)u.push("0") a.splice.apply(a,u)}for(n=t||new i(r+16),o=0;o>8&255,n[r++]=255&l}}if(!n)throw Error("Invalid ip address: "+e) return n},n.toString=function(e,t,r){t=~~t var n=[] if(4===(r=r||e.length-t)){for(var i=0;i32?"ipv6":u(t))&&(r=16) for(var o=new i(r),a=0,s=o.length;a>l)}return n.toString(o)},n.mask=function(e,t){e=n.toBuffer(e),t=n.toBuffer(t) var r=new i(Math.max(e.length,t.length)),o=0 if(e.length===t.length)for(o=0;oe.length&&(i=t,o=e) var a=i.length-o.length for(r=a;r>>0},n.fromLong=function(e){return(e>>>24)+"."+(e>>16&255)+"."+(e>>8&255)+"."+(255&e)}},function(e,t,r){"use strict" var n=r(283),i=e.exports=function(e){return n({exact:!0}).test(e)} i.v4=function(e){return n.v4({exact:!0}).test(e)},i.v6=function(e){return n.v6({exact:!0}).test(e)}},function(e,t,r){"use strict" var n="(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])(?:\\.(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])){3}",i="[0-9a-fA-F]{1,4}",o="\n(\n(?:".concat(i,":){7}(?:").concat(i,"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:").concat(i,":){6}(?:").concat(n,"|:").concat(i,"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:").concat(i,":){5}(?::").concat(n,"|(:").concat(i,"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:").concat(i,":){4}(?:(:").concat(i,"){0,1}:").concat(n,"|(:").concat(i,"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:").concat(i,":){3}(?:(:").concat(i,"){0,2}:").concat(n,"|(:").concat(i,"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:").concat(i,":){2}(?:(:").concat(i,"){0,3}:").concat(n,"|(:").concat(i,"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:").concat(i,":){1}(?:(:").concat(i,"){0,4}:").concat(n,"|(:").concat(i,"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::((?::").concat(i,"){0,5}:").concat(n,"|(?::").concat(i,"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=e.exports=function(e){return e&&e.exact?new RegExp("(?:^".concat(n,"$)|(?:^").concat(o,"$)")):new RegExp("(?:".concat(n,")|(?:").concat(o,")"),"g")} a.v4=function(e){return e&&e.exact?new RegExp("^".concat(n,"$")):new RegExp(n,"g")},a.v6=function(e){return e&&e.exact?new RegExp("^".concat(o,"$")):new RegExp(o,"g")}},function(e,t,r){(function(e,t,n){var i function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)} /* * [hi-base32]{@link https://github.com/emn178/hi-base32} * * @version 0.5.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT */!function(){"use strict" var a="object"===("undefined"==typeof window?"undefined":o(window))?window:{} !a.HI_BASE32_NO_NODE_JS&&"object"===(void 0===e?"undefined":o(e))&&e.versions&&e.versions.node&&(a=t) var s=!a.HI_BASE32_NO_COMMON_JS&&"object"===o(n)&&n.exports,u=r(59),l="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),c={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},f=[0,0,0,0,0,0,0,0],h=function(e,t){t.length>10&&(t="..."+t.substr(-10)) var r=new Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+e+" bytes: "+t+" <-") throw r.position=e,r},d=function(e){if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters") for(var t,r,n,i,o,a,s,u,l=[],f=0,h=(e=e.replace(/=/g,"")).length,d=0,p=h>>3<<3;d>>2),l[f++]=255&(r<<6|n<<1|i>>>4),l[f++]=255&(i<<4|o>>>1),l[f++]=255&(o<<7|a<<2|s>>>3),l[f++]=255&(s<<5|u) var m=h-p return 2===m?(t=c[e.charAt(d++)],r=c[e.charAt(d++)],l[f++]=255&(t<<3|r>>>2)):4===m?(t=c[e.charAt(d++)],r=c[e.charAt(d++)],n=c[e.charAt(d++)],i=c[e.charAt(d++)],l[f++]=255&(t<<3|r>>>2),l[f++]=255&(r<<6|n<<1|i>>>4)):5===m?(t=c[e.charAt(d++)],r=c[e.charAt(d++)],n=c[e.charAt(d++)],i=c[e.charAt(d++)],o=c[e.charAt(d++)],l[f++]=255&(t<<3|r>>>2),l[f++]=255&(r<<6|n<<1|i>>>4),l[f++]=255&(i<<4|o>>>1)):7===m&&(t=c[e.charAt(d++)],r=c[e.charAt(d++)],n=c[e.charAt(d++)],i=c[e.charAt(d++)],o=c[e.charAt(d++)],a=c[e.charAt(d++)],s=c[e.charAt(d++)],l[f++]=255&(t<<3|r>>>2),l[f++]=255&(r<<6|n<<1|i>>>4),l[f++]=255&(i<<4|o>>>1),l[f++]=255&(o<<7|a<<2|s>>>3)),l},p=function(e,t){if(!t)return function(e){for(var t,r,n="",i=e.length,o=0,a=0;o191&&t<=223?(r=31&t,a=1):t<=239?(r=15&t,a=2):t<=247?(r=7&t,a=3):h(o,n) for(var s=0;s191)&&h(o,n),r<<=6,r+=63&t r>=55296&&r<=57343&&h(o,n),r>1114111&&h(o,n),r<=65535?n+=String.fromCharCode(r):(r-=65536,n+=String.fromCharCode(55296+(r>>10)),n+=String.fromCharCode(56320+(1023&r)))}return n}(d(e)) if(!/^[A-Z2-7=]+$/.test(e))throw new Error("Invalid base32 characters") var r,n,i,o,a,s,u,l,f="",p=e.indexOf("=");-1===p&&(p=e.length) for(var m=0,y=p>>3<<3;m>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|a>>>1))+String.fromCharCode(255&(a<<7|s<<2|u>>>3))+String.fromCharCode(255&(u<<5|l)) var g=p-y return 2===g?(r=c[e.charAt(m++)],n=c[e.charAt(m++)],f+=String.fromCharCode(255&(r<<3|n>>>2))):4===g?(r=c[e.charAt(m++)],n=c[e.charAt(m++)],i=c[e.charAt(m++)],o=c[e.charAt(m++)],f+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))):5===g?(r=c[e.charAt(m++)],n=c[e.charAt(m++)],i=c[e.charAt(m++)],o=c[e.charAt(m++)],a=c[e.charAt(m++)],f+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|a>>>1))):7===g&&(r=c[e.charAt(m++)],n=c[e.charAt(m++)],i=c[e.charAt(m++)],o=c[e.charAt(m++)],a=c[e.charAt(m++)],s=c[e.charAt(m++)],u=c[e.charAt(m++)],f+=String.fromCharCode(255&(r<<3|n>>>2))+String.fromCharCode(255&(n<<6|i<<1|o>>>4))+String.fromCharCode(255&(o<<4|a>>>1))+String.fromCharCode(255&(a<<7|s<<2|u>>>3))),f},m={encode:function(e,t){var r="string"!=typeof e return r&&e.constructor===ArrayBuffer&&(e=new Uint8Array(e)),r?function(e){for(var t,r,n,i,o,a="",s=e.length,u=0,c=5*parseInt(s/5);u>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[31&(r<<4|n>>>4)]+l[31&(n<<1|i>>>7)]+l[i>>>2&31]+l[31&(i<<3|o>>>5)]+l[31&o] var f=s-c return 1===f?(t=e[u],a+=l[t>>>3]+l[t<<2&31]+"======"):2===f?(t=e[u++],r=e[u],a+=l[t>>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[r<<4&31]+"===="):3===f?(t=e[u++],r=e[u++],n=e[u],a+=l[t>>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[31&(r<<4|n>>>4)]+l[n<<1&31]+"==="):4===f&&(t=e[u++],r=e[u++],n=e[u++],i=e[u],a+=l[t>>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[31&(r<<4|n>>>4)]+l[31&(n<<1|i>>>7)]+l[i>>>2&31]+l[i<<3&31]+"="),a}(e):t?function(e){for(var t,r,n,i,o,a="",s=e.length,u=0,c=5*parseInt(s/5);u>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[31&(r<<4|n>>>4)]+l[31&(n<<1|i>>>7)]+l[i>>>2&31]+l[31&(i<<3|o>>>5)]+l[31&o] var f=s-c return 1===f?(t=e.charCodeAt(u),a+=l[t>>>3]+l[t<<2&31]+"======"):2===f?(t=e.charCodeAt(u++),r=e.charCodeAt(u),a+=l[t>>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[r<<4&31]+"===="):3===f?(t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u),a+=l[t>>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[31&(r<<4|n>>>4)]+l[n<<1&31]+"==="):4===f&&(t=e.charCodeAt(u++),r=e.charCodeAt(u++),n=e.charCodeAt(u++),i=e.charCodeAt(u),a+=l[t>>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[31&(r<<4|n>>>4)]+l[31&(n<<1|i>>>7)]+l[i>>>2&31]+l[i<<3&31]+"="),a}(e):function(e){var t,r,n,i,o,a,s,u=!1,c="",h=0,d=0,p=e.length do{for(f[0]=f[5],f[1]=f[6],f[2]=f[7],s=d;h>6,f[s++]=128|63&a):a<55296||a>=57344?(f[s++]=224|a>>12,f[s++]=128|a>>6&63,f[s++]=128|63&a):(a=65536+((1023&a)<<10|1023&e.charCodeAt(++h)),f[s++]=240|a>>18,f[s++]=128|a>>12&63,f[s++]=128|a>>6&63,f[s++]=128|63&a) d=s-5,h===p&&++h,h>p&&s<6&&(u=!0),t=f[0],s>4?(r=f[1],n=f[2],i=f[3],o=f[4],c+=l[t>>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[31&(r<<4|n>>>4)]+l[31&(n<<1|i>>>7)]+l[i>>>2&31]+l[31&(i<<3|o>>>5)]+l[31&o]):1===s?c+=l[t>>>3]+l[t<<2&31]+"======":2===s?(r=f[1],c+=l[t>>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[r<<4&31]+"===="):3===s?(r=f[1],n=f[2],c+=l[t>>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[31&(r<<4|n>>>4)]+l[n<<1&31]+"==="):(r=f[1],n=f[2],i=f[3],c+=l[t>>>3]+l[31&(t<<2|r>>>6)]+l[r>>>1&31]+l[31&(r<<4|n>>>4)]+l[31&(n<<1|i>>>7)]+l[i>>>2&31]+l[i<<3&31]+"=")}while(!u) return c}(e)},decode:p} p.asBytes=d,s?n.exports=m:(a.base32=m,u&&(void 0===(i=function(){return m}.call(m,r,m,n))||(n.exports=i)))}()}).call(this,r(3),r(4),r(18)(e))},function(e,t,r){"use strict" var n=r(17),i=A("dns4"),o=A("dns6"),a=x(A("dns"),A("dnsaddr"),i,o),s=x(A("ip4"),A("ip6")),u=x(M(s,A("tcp")),M(a,A("tcp"))),l=M(s,A("udp")),c=M(l,A("utp")),f=x(M(u,A("ws")),M(a,A("ws"))),h=x(M(u,A("wss")),M(a,A("wss"))),d=x(M(u,A("http")),M(s,A("http")),M(a,A("http"))),p=x(M(u,A("https")),M(s,A("https")),M(a,A("https"))),m=x(M(f,A("p2p-webrtc-star"),A("ipfs")),M(h,A("p2p-webrtc-star"),A("ipfs")),M(f,A("p2p-webrtc-star"),A("p2p")),M(h,A("p2p-webrtc-star"),A("p2p"))),y=x(M(f,A("p2p-websocket-star"),A("ipfs")),M(h,A("p2p-websocket-star"),A("ipfs")),M(f,A("p2p-websocket-star"),A("p2p")),M(h,A("p2p-websocket-star"),A("p2p")),M(f,A("p2p-websocket-star")),M(h,A("p2p-websocket-star"))),g=x(M(d,A("p2p-webrtc-direct")),M(p,A("p2p-webrtc-direct"))),v=x(f,h,d,p,m,g,u,c),b=x(M(v,A("p2p-stardust"),A("ipfs")),M(v,A("p2p-stardust"))),w=x(M(v,A("ipfs")),M(v,A("p2p")),m,A("ipfs"),A("p2p")),_=x(M(w,A("p2p-circuit"),w),M(w,A("p2p-circuit")),M(A("p2p-circuit"),w),M(v,A("p2p-circuit")),M(A("p2p-circuit"),v),A("p2p-circuit")),S=function e(){return x(M(_,e),_)}(),E=x(M(S,w,S),M(w,S),M(S,w),S,w) function k(e){return function(t){if(!n.isMultiaddr(t))try{t=n(t)}catch(e){return!1}var r=e(t.protoNames()) return null!==r&&0===r.length}}function M(){var e=Array.from(arguments) function t(t){return t.length0&&void 0!==arguments[0]?arguments[0]:this.multibaseName if(this.string&&e===this.multibaseName)return this.string var t=null if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()") t=i.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version") t=o.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}},{key:"buffer",get:function(){var e=this._buffer if(!e){if(0===this.version)e=this.multihash else{if(1!==this.version)throw new Error("unsupported version") e=t.concat([t.from("01","hex"),a.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}},{key:"prefix",get:function(){return t.concat([t.from("0".concat(this.version),"hex"),a.getCodeVarint(this.codec),i.prefix(this.multihash)])}}])&&n(r.prototype,s),c&&n(r,c),e}(),{className:"CID",symbolName:"@ipld/js-cid/CID"}) l.codecs=s,e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict" var n=r(48),i=r(132).varintBufferEncode,o={} for(var a in e.exports=o,n){var s=n[a] o[a]=i(s)}},function(e,t,r){"use strict" var n=r(48),i={} for(var o in e.exports=i,n)i[n[o].toString("hex")]=o},function(e,t,r){"use strict" e.exports=Object.freeze({PROTOBUF:80,CBOR:81,RLP:96,BENCODE:99,JSON:512,MESSAGEPACK:513,MULTICODEC:48,MULTIHASH:49,MULTIADDR:50,MULTIBASE:51,IDENTITY:0,SHA1:17,SHA2_256:18,SHA2_512:19,SHA3_512:20,SHA3_384:21,SHA3_256:22,SHA3_224:23,SHAKE_128:24,SHAKE_256:25,KECCAK_224:26,KECCAK_256:27,KECCAK_384:28,KECCAK_512:29,MURMUR3_128:34,MURMUR3_32:35,DBL_SHA2_256:86,MD4:212,MD5:213,BMT:214,X11:4352,BLAKE2B_8:45569,BLAKE2B_16:45570,BLAKE2B_24:45571,BLAKE2B_32:45572,BLAKE2B_40:45573,BLAKE2B_48:45574,BLAKE2B_56:45575,BLAKE2B_64:45576,BLAKE2B_72:45577,BLAKE2B_80:45578,BLAKE2B_88:45579,BLAKE2B_96:45580,BLAKE2B_104:45581,BLAKE2B_112:45582,BLAKE2B_120:45583,BLAKE2B_128:45584,BLAKE2B_136:45585,BLAKE2B_144:45586,BLAKE2B_152:45587,BLAKE2B_160:45588,BLAKE2B_168:45589,BLAKE2B_176:45590,BLAKE2B_184:45591,BLAKE2B_192:45592,BLAKE2B_200:45593,BLAKE2B_208:45594,BLAKE2B_216:45595,BLAKE2B_224:45596,BLAKE2B_232:45597,BLAKE2B_240:45598,BLAKE2B_248:45599,BLAKE2B_256:45600,BLAKE2B_264:45601,BLAKE2B_272:45602,BLAKE2B_280:45603,BLAKE2B_288:45604,BLAKE2B_296:45605,BLAKE2B_304:45606,BLAKE2B_312:45607,BLAKE2B_320:45608,BLAKE2B_328:45609,BLAKE2B_336:45610,BLAKE2B_344:45611,BLAKE2B_352:45612,BLAKE2B_360:45613,BLAKE2B_368:45614,BLAKE2B_376:45615,BLAKE2B_384:45616,BLAKE2B_392:45617,BLAKE2B_400:45618,BLAKE2B_408:45619,BLAKE2B_416:45620,BLAKE2B_424:45621,BLAKE2B_432:45622,BLAKE2B_440:45623,BLAKE2B_448:45624,BLAKE2B_456:45625,BLAKE2B_464:45626,BLAKE2B_472:45627,BLAKE2B_480:45628,BLAKE2B_488:45629,BLAKE2B_496:45630,BLAKE2B_504:45631,BLAKE2B_512:45632,BLAKE2S_8:45633,BLAKE2S_16:45634,BLAKE2S_24:45635,BLAKE2S_32:45636,BLAKE2S_40:45637,BLAKE2S_48:45638,BLAKE2S_56:45639,BLAKE2S_64:45640,BLAKE2S_72:45641,BLAKE2S_80:45642,BLAKE2S_88:45643,BLAKE2S_96:45644,BLAKE2S_104:45645,BLAKE2S_112:45646,BLAKE2S_120:45647,BLAKE2S_128:45648,BLAKE2S_136:45649,BLAKE2S_144:45650,BLAKE2S_152:45651,BLAKE2S_160:45652,BLAKE2S_168:45653,BLAKE2S_176:45654,BLAKE2S_184:45655,BLAKE2S_192:45656,BLAKE2S_200:45657,BLAKE2S_208:45658,BLAKE2S_216:45659,BLAKE2S_224:45660,BLAKE2S_232:45661,BLAKE2S_240:45662,BLAKE2S_248:45663,BLAKE2S_256:45664,SKEIN256_8:45825,SKEIN256_16:45826,SKEIN256_24:45827,SKEIN256_32:45828,SKEIN256_40:45829,SKEIN256_48:45830,SKEIN256_56:45831,SKEIN256_64:45832,SKEIN256_72:45833,SKEIN256_80:45834,SKEIN256_88:45835,SKEIN256_96:45836,SKEIN256_104:45837,SKEIN256_112:45838,SKEIN256_120:45839,SKEIN256_128:45840,SKEIN256_136:45841,SKEIN256_144:45842,SKEIN256_152:45843,SKEIN256_160:45844,SKEIN256_168:45845,SKEIN256_176:45846,SKEIN256_184:45847,SKEIN256_192:45848,SKEIN256_200:45849,SKEIN256_208:45850,SKEIN256_216:45851,SKEIN256_224:45852,SKEIN256_232:45853,SKEIN256_240:45854,SKEIN256_248:45855,SKEIN256_256:45856,SKEIN512_8:45857,SKEIN512_16:45858,SKEIN512_24:45859,SKEIN512_32:45860,SKEIN512_40:45861,SKEIN512_48:45862,SKEIN512_56:45863,SKEIN512_64:45864,SKEIN512_72:45865,SKEIN512_80:45866,SKEIN512_88:45867,SKEIN512_96:45868,SKEIN512_104:45869,SKEIN512_112:45870,SKEIN512_120:45871,SKEIN512_128:45872,SKEIN512_136:45873,SKEIN512_144:45874,SKEIN512_152:45875,SKEIN512_160:45876,SKEIN512_168:45877,SKEIN512_176:45878,SKEIN512_184:45879,SKEIN512_192:45880,SKEIN512_200:45881,SKEIN512_208:45882,SKEIN512_216:45883,SKEIN512_224:45884,SKEIN512_232:45885,SKEIN512_240:45886,SKEIN512_248:45887,SKEIN512_256:45888,SKEIN512_264:45889,SKEIN512_272:45890,SKEIN512_280:45891,SKEIN512_288:45892,SKEIN512_296:45893,SKEIN512_304:45894,SKEIN512_312:45895,SKEIN512_320:45896,SKEIN512_328:45897,SKEIN512_336:45898,SKEIN512_344:45899,SKEIN512_352:45900,SKEIN512_360:45901,SKEIN512_368:45902,SKEIN512_376:45903,SKEIN512_384:45904,SKEIN512_392:45905,SKEIN512_400:45906,SKEIN512_408:45907,SKEIN512_416:45908,SKEIN512_424:45909,SKEIN512_432:45910,SKEIN512_440:45911,SKEIN512_448:45912,SKEIN512_456:45913,SKEIN512_464:45914,SKEIN512_472:45915,SKEIN512_480:45916,SKEIN512_488:45917,SKEIN512_496:45918,SKEIN512_504:45919,SKEIN512_512:45920,SKEIN1024_8:45921,SKEIN1024_16:45922,SKEIN1024_24:45923,SKEIN1024_32:45924,SKEIN1024_40:45925,SKEIN1024_48:45926,SKEIN1024_56:45927,SKEIN1024_64:45928,SKEIN1024_72:45929,SKEIN1024_80:45930,SKEIN1024_88:45931,SKEIN1024_96:45932,SKEIN1024_104:45933,SKEIN1024_112:45934,SKEIN1024_120:45935,SKEIN1024_128:45936,SKEIN1024_136:45937,SKEIN1024_144:45938,SKEIN1024_152:45939,SKEIN1024_160:45940,SKEIN1024_168:45941,SKEIN1024_176:45942,SKEIN1024_184:45943,SKEIN1024_192:45944,SKEIN1024_200:45945,SKEIN1024_208:45946,SKEIN1024_216:45947,SKEIN1024_224:45948,SKEIN1024_232:45949,SKEIN1024_240:45950,SKEIN1024_248:45951,SKEIN1024_256:45952,SKEIN1024_264:45953,SKEIN1024_272:45954,SKEIN1024_280:45955,SKEIN1024_288:45956,SKEIN1024_296:45957,SKEIN1024_304:45958,SKEIN1024_312:45959,SKEIN1024_320:45960,SKEIN1024_328:45961,SKEIN1024_336:45962,SKEIN1024_344:45963,SKEIN1024_352:45964,SKEIN1024_360:45965,SKEIN1024_368:45966,SKEIN1024_376:45967,SKEIN1024_384:45968,SKEIN1024_392:45969,SKEIN1024_400:45970,SKEIN1024_408:45971,SKEIN1024_416:45972,SKEIN1024_424:45973,SKEIN1024_432:45974,SKEIN1024_440:45975,SKEIN1024_448:45976,SKEIN1024_456:45977,SKEIN1024_464:45978,SKEIN1024_472:45979,SKEIN1024_480:45980,SKEIN1024_488:45981,SKEIN1024_496:45982,SKEIN1024_504:45983,SKEIN1024_512:45984,SKEIN1024_520:45985,SKEIN1024_528:45986,SKEIN1024_536:45987,SKEIN1024_544:45988,SKEIN1024_552:45989,SKEIN1024_560:45990,SKEIN1024_568:45991,SKEIN1024_576:45992,SKEIN1024_584:45993,SKEIN1024_592:45994,SKEIN1024_600:45995,SKEIN1024_608:45996,SKEIN1024_616:45997,SKEIN1024_624:45998,SKEIN1024_632:45999,SKEIN1024_640:46e3,SKEIN1024_648:46001,SKEIN1024_656:46002,SKEIN1024_664:46003,SKEIN1024_672:46004,SKEIN1024_680:46005,SKEIN1024_688:46006,SKEIN1024_696:46007,SKEIN1024_704:46008,SKEIN1024_712:46009,SKEIN1024_720:46010,SKEIN1024_728:46011,SKEIN1024_736:46012,SKEIN1024_744:46013,SKEIN1024_752:46014,SKEIN1024_760:46015,SKEIN1024_768:46016,SKEIN1024_776:46017,SKEIN1024_784:46018,SKEIN1024_792:46019,SKEIN1024_800:46020,SKEIN1024_808:46021,SKEIN1024_816:46022,SKEIN1024_824:46023,SKEIN1024_832:46024,SKEIN1024_840:46025,SKEIN1024_848:46026,SKEIN1024_856:46027,SKEIN1024_864:46028,SKEIN1024_872:46029,SKEIN1024_880:46030,SKEIN1024_888:46031,SKEIN1024_896:46032,SKEIN1024_904:46033,SKEIN1024_912:46034,SKEIN1024_920:46035,SKEIN1024_928:46036,SKEIN1024_936:46037,SKEIN1024_944:46038,SKEIN1024_952:46039,SKEIN1024_960:46040,SKEIN1024_968:46041,SKEIN1024_976:46042,SKEIN1024_984:46043,SKEIN1024_992:46044,SKEIN1024_1000:46045,SKEIN1024_1008:46046,SKEIN1024_1016:46047,SKEIN1024_1024:46048,IP4:4,TCP:6,DCCP:33,IP6:41,IP6ZONE:42,DNS:53,DNS4:54,DNS6:55,DNSADDR:56,SCTP:132,UDP:273,P2P_WEBRTC_STAR:275,P2P_WEBRTC_DIRECT:276,P2P_STARDUST:277,P2P_CIRCUIT:290,UDT:301,UTP:302,UNIX:400,P2P:421,IPFS:421,HTTPS:443,ONION:444,ONION3:445,GARLIC64:446,GARLIC32:447,QUIC:460,WS:477,WSS:478,P2P_WEBSOCKET_STAR:479,HTTP:480,RAW:85,DAG_PB:112,DAG_CBOR:113,LIBP2P_KEY:114,GIT_RAW:120,TORRENT_INFO:123,TORRENT_FILE:124,LEOFCOIN_BLOCK:129,LEOFCOIN_TX:130,LEOFCOIN_PR:131,ETH_BLOCK:144,ETH_BLOCK_LIST:145,ETH_TX_TRIE:146,ETH_TX:147,ETH_TX_RECEIPT_TRIE:148,ETH_TX_RECEIPT:149,ETH_STATE_TRIE:150,ETH_ACCOUNT_SNAPSHOT:151,ETH_STORAGE_TRIE:152,BITCOIN_BLOCK:176,BITCOIN_TX:177,ZCASH_BLOCK:192,ZCASH_TX:193,STELLAR_BLOCK:208,STELLAR_TX:209,DECRED_BLOCK:224,DECRED_TX:225,DASH_BLOCK:240,DASH_TX:241,SWARM_MANIFEST:250,SWARM_FEED:251,DAG_JSON:297,PATH:47,IPLD_NS:226,IPFS_NS:227,SWARM_NS:228,IPNS_NS:229,ZERONET:230,ED25519_PUB:237,HOLOCHAIN_ADR_V0:8417572,HOLOCHAIN_ADR_V1:8483108,HOLOCHAIN_KEY_V0:9728292,HOLOCHAIN_KEY_V1:9793828,HOLOCHAIN_SIG_V0:10645796,HOLOCHAIN_SIG_V1:10711332})},function(e,t,r){"use strict" e.exports=Object.freeze({80:"protobuf",81:"cbor",96:"rlp",99:"bencode",512:"json",513:"messagepack",48:"multicodec",49:"multihash",50:"multiaddr",51:"multibase",0:"identity",17:"sha1",18:"sha2-256",19:"sha2-512",20:"sha3-512",21:"sha3-384",22:"sha3-256",23:"sha3-224",24:"shake-128",25:"shake-256",26:"keccak-224",27:"keccak-256",28:"keccak-384",29:"keccak-512",34:"murmur3-128",35:"murmur3-32",86:"dbl-sha2-256",212:"md4",213:"md5",214:"bmt",4352:"x11",45569:"blake2b-8",45570:"blake2b-16",45571:"blake2b-24",45572:"blake2b-32",45573:"blake2b-40",45574:"blake2b-48",45575:"blake2b-56",45576:"blake2b-64",45577:"blake2b-72",45578:"blake2b-80",45579:"blake2b-88",45580:"blake2b-96",45581:"blake2b-104",45582:"blake2b-112",45583:"blake2b-120",45584:"blake2b-128",45585:"blake2b-136",45586:"blake2b-144",45587:"blake2b-152",45588:"blake2b-160",45589:"blake2b-168",45590:"blake2b-176",45591:"blake2b-184",45592:"blake2b-192",45593:"blake2b-200",45594:"blake2b-208",45595:"blake2b-216",45596:"blake2b-224",45597:"blake2b-232",45598:"blake2b-240",45599:"blake2b-248",45600:"blake2b-256",45601:"blake2b-264",45602:"blake2b-272",45603:"blake2b-280",45604:"blake2b-288",45605:"blake2b-296",45606:"blake2b-304",45607:"blake2b-312",45608:"blake2b-320",45609:"blake2b-328",45610:"blake2b-336",45611:"blake2b-344",45612:"blake2b-352",45613:"blake2b-360",45614:"blake2b-368",45615:"blake2b-376",45616:"blake2b-384",45617:"blake2b-392",45618:"blake2b-400",45619:"blake2b-408",45620:"blake2b-416",45621:"blake2b-424",45622:"blake2b-432",45623:"blake2b-440",45624:"blake2b-448",45625:"blake2b-456",45626:"blake2b-464",45627:"blake2b-472",45628:"blake2b-480",45629:"blake2b-488",45630:"blake2b-496",45631:"blake2b-504",45632:"blake2b-512",45633:"blake2s-8",45634:"blake2s-16",45635:"blake2s-24",45636:"blake2s-32",45637:"blake2s-40",45638:"blake2s-48",45639:"blake2s-56",45640:"blake2s-64",45641:"blake2s-72",45642:"blake2s-80",45643:"blake2s-88",45644:"blake2s-96",45645:"blake2s-104",45646:"blake2s-112",45647:"blake2s-120",45648:"blake2s-128",45649:"blake2s-136",45650:"blake2s-144",45651:"blake2s-152",45652:"blake2s-160",45653:"blake2s-168",45654:"blake2s-176",45655:"blake2s-184",45656:"blake2s-192",45657:"blake2s-200",45658:"blake2s-208",45659:"blake2s-216",45660:"blake2s-224",45661:"blake2s-232",45662:"blake2s-240",45663:"blake2s-248",45664:"blake2s-256",45825:"skein256-8",45826:"skein256-16",45827:"skein256-24",45828:"skein256-32",45829:"skein256-40",45830:"skein256-48",45831:"skein256-56",45832:"skein256-64",45833:"skein256-72",45834:"skein256-80",45835:"skein256-88",45836:"skein256-96",45837:"skein256-104",45838:"skein256-112",45839:"skein256-120",45840:"skein256-128",45841:"skein256-136",45842:"skein256-144",45843:"skein256-152",45844:"skein256-160",45845:"skein256-168",45846:"skein256-176",45847:"skein256-184",45848:"skein256-192",45849:"skein256-200",45850:"skein256-208",45851:"skein256-216",45852:"skein256-224",45853:"skein256-232",45854:"skein256-240",45855:"skein256-248",45856:"skein256-256",45857:"skein512-8",45858:"skein512-16",45859:"skein512-24",45860:"skein512-32",45861:"skein512-40",45862:"skein512-48",45863:"skein512-56",45864:"skein512-64",45865:"skein512-72",45866:"skein512-80",45867:"skein512-88",45868:"skein512-96",45869:"skein512-104",45870:"skein512-112",45871:"skein512-120",45872:"skein512-128",45873:"skein512-136",45874:"skein512-144",45875:"skein512-152",45876:"skein512-160",45877:"skein512-168",45878:"skein512-176",45879:"skein512-184",45880:"skein512-192",45881:"skein512-200",45882:"skein512-208",45883:"skein512-216",45884:"skein512-224",45885:"skein512-232",45886:"skein512-240",45887:"skein512-248",45888:"skein512-256",45889:"skein512-264",45890:"skein512-272",45891:"skein512-280",45892:"skein512-288",45893:"skein512-296",45894:"skein512-304",45895:"skein512-312",45896:"skein512-320",45897:"skein512-328",45898:"skein512-336",45899:"skein512-344",45900:"skein512-352",45901:"skein512-360",45902:"skein512-368",45903:"skein512-376",45904:"skein512-384",45905:"skein512-392",45906:"skein512-400",45907:"skein512-408",45908:"skein512-416",45909:"skein512-424",45910:"skein512-432",45911:"skein512-440",45912:"skein512-448",45913:"skein512-456",45914:"skein512-464",45915:"skein512-472",45916:"skein512-480",45917:"skein512-488",45918:"skein512-496",45919:"skein512-504",45920:"skein512-512",45921:"skein1024-8",45922:"skein1024-16",45923:"skein1024-24",45924:"skein1024-32",45925:"skein1024-40",45926:"skein1024-48",45927:"skein1024-56",45928:"skein1024-64",45929:"skein1024-72",45930:"skein1024-80",45931:"skein1024-88",45932:"skein1024-96",45933:"skein1024-104",45934:"skein1024-112",45935:"skein1024-120",45936:"skein1024-128",45937:"skein1024-136",45938:"skein1024-144",45939:"skein1024-152",45940:"skein1024-160",45941:"skein1024-168",45942:"skein1024-176",45943:"skein1024-184",45944:"skein1024-192",45945:"skein1024-200",45946:"skein1024-208",45947:"skein1024-216",45948:"skein1024-224",45949:"skein1024-232",45950:"skein1024-240",45951:"skein1024-248",45952:"skein1024-256",45953:"skein1024-264",45954:"skein1024-272",45955:"skein1024-280",45956:"skein1024-288",45957:"skein1024-296",45958:"skein1024-304",45959:"skein1024-312",45960:"skein1024-320",45961:"skein1024-328",45962:"skein1024-336",45963:"skein1024-344",45964:"skein1024-352",45965:"skein1024-360",45966:"skein1024-368",45967:"skein1024-376",45968:"skein1024-384",45969:"skein1024-392",45970:"skein1024-400",45971:"skein1024-408",45972:"skein1024-416",45973:"skein1024-424",45974:"skein1024-432",45975:"skein1024-440",45976:"skein1024-448",45977:"skein1024-456",45978:"skein1024-464",45979:"skein1024-472",45980:"skein1024-480",45981:"skein1024-488",45982:"skein1024-496",45983:"skein1024-504",45984:"skein1024-512",45985:"skein1024-520",45986:"skein1024-528",45987:"skein1024-536",45988:"skein1024-544",45989:"skein1024-552",45990:"skein1024-560",45991:"skein1024-568",45992:"skein1024-576",45993:"skein1024-584",45994:"skein1024-592",45995:"skein1024-600",45996:"skein1024-608",45997:"skein1024-616",45998:"skein1024-624",45999:"skein1024-632",46e3:"skein1024-640",46001:"skein1024-648",46002:"skein1024-656",46003:"skein1024-664",46004:"skein1024-672",46005:"skein1024-680",46006:"skein1024-688",46007:"skein1024-696",46008:"skein1024-704",46009:"skein1024-712",46010:"skein1024-720",46011:"skein1024-728",46012:"skein1024-736",46013:"skein1024-744",46014:"skein1024-752",46015:"skein1024-760",46016:"skein1024-768",46017:"skein1024-776",46018:"skein1024-784",46019:"skein1024-792",46020:"skein1024-800",46021:"skein1024-808",46022:"skein1024-816",46023:"skein1024-824",46024:"skein1024-832",46025:"skein1024-840",46026:"skein1024-848",46027:"skein1024-856",46028:"skein1024-864",46029:"skein1024-872",46030:"skein1024-880",46031:"skein1024-888",46032:"skein1024-896",46033:"skein1024-904",46034:"skein1024-912",46035:"skein1024-920",46036:"skein1024-928",46037:"skein1024-936",46038:"skein1024-944",46039:"skein1024-952",46040:"skein1024-960",46041:"skein1024-968",46042:"skein1024-976",46043:"skein1024-984",46044:"skein1024-992",46045:"skein1024-1000",46046:"skein1024-1008",46047:"skein1024-1016",46048:"skein1024-1024",4:"ip4",6:"tcp",33:"dccp",41:"ip6",42:"ip6zone",53:"dns",54:"dns4",55:"dns6",56:"dnsaddr",132:"sctp",273:"udp",275:"p2p-webrtc-star",276:"p2p-webrtc-direct",277:"p2p-stardust",290:"p2p-circuit",301:"udt",302:"utp",400:"unix",421:"p2p",443:"https",444:"onion",445:"onion3",446:"garlic64",447:"garlic32",460:"quic",477:"ws",478:"wss",479:"p2p-websocket-star",480:"http",85:"raw",112:"dag-pb",113:"dag-cbor",114:"libp2p-key",120:"git-raw",123:"torrent-info",124:"torrent-file",129:"leofcoin-block",130:"leofcoin-tx",131:"leofcoin-pr",144:"eth-block",145:"eth-block-list",146:"eth-tx-trie",147:"eth-tx",148:"eth-tx-receipt-trie",149:"eth-tx-receipt",150:"eth-state-trie",151:"eth-account-snapshot",152:"eth-storage-trie",176:"bitcoin-block",177:"bitcoin-tx",192:"zcash-block",193:"zcash-tx",208:"stellar-block",209:"stellar-tx",224:"decred-block",225:"decred-tx",240:"dash-block",241:"dash-tx",250:"swarm-manifest",251:"swarm-feed",297:"dag-json",47:"path",226:"ipld-ns",227:"ipfs-ns",228:"swarm-ns",229:"ipns-ns",230:"zeronet",237:"ed25519-pub",8417572:"holochain-adr-v0",8483108:"holochain-adr-v1",9728292:"holochain-key-v0",9793828:"holochain-key-v1",10645796:"holochain-sig-v0",10711332:"holochain-sig-v1"})},function(e,t,r){"use strict";(function(t){var n=r(13),i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs" if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0" if("string"!=typeof e.codec)return"codec must be string" if(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0" if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!t.isBuffer(e.multihash))return"multihash must be a Buffer" try{n.validate(e.multihash)}catch(e){var r=e.message return r||(r="Multihash validation failed"),r}}} e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(13),i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs" if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0" if("string"!=typeof e.codec)return"codec must be string" if(!t.isBuffer(e.multihash))return"multihash must be a Buffer" try{n.validate(e.multihash)}catch(e){var r=e.message return r||(r="Multihash validation failed"),r}}} e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(n){var i=r(61)(r(83)) r(84),r(133),r(139) var o=r(8) t=e.exports var a={rsa:r(316),ed25519:r(338),secp256k1:r(342)(i,r(146))} function s(e){return void 0!==a[e.toLowerCase()]}t.supportedKeys=a,t.keysPBM=i,t.keyStretcher=r(375),t.generateEphemeralKeyPair=r(381),t.generateKeyPair=function(e,t,r){var n=a[e.toLowerCase()] if(!n)return r(new Error("invalid or unsupported key type")) n.generateKeyPair(t,r)},t.generateKeyPairFromSeed=function(e,t,r,n){var i=a[e.toLowerCase()] return i?"ed25519"!==e.toLowerCase()?n(new Error("Seed key derivation is unimplemented for RSA or secp256k1")):void i.generateKeyPairFromSeed(t,r,n):n(new Error("invalid or unsupported key type"))},t.unmarshalPublicKey=function(e){var t=i.PublicKey.decode(e),r=t.Data switch(t.Type){case i.KeyType.RSA:return a.rsa.unmarshalRsaPublicKey(r) case i.KeyType.Ed25519:return a.ed25519.unmarshalEd25519PublicKey(r) case i.KeyType.Secp256k1:if(a.secp256k1)return a.secp256k1.unmarshalSecp256k1PublicKey(r) throw new Error("secp256k1 support requires libp2p-crypto-secp256k1 package") default:throw new Error("invalid or unsupported key type")}},t.marshalPublicKey=function(e,t){if(!s(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type") return e.bytes},t.unmarshalPrivateKey=function(e,t){var r try{r=i.PrivateKey.decode(e)}catch(e){return t(e)}var n=r.Data switch(r.Type){case i.KeyType.RSA:return a.rsa.unmarshalRsaPrivateKey(n,t) case i.KeyType.Ed25519:return a.ed25519.unmarshalEd25519PrivateKey(n,t) case i.KeyType.Secp256k1:return a.secp256k1?a.secp256k1.unmarshalSecp256k1PrivateKey(n,t):t(new Error("secp256k1 support requires libp2p-crypto-secp256k1 package")) default:t(new Error("invalid or unsupported key type"))}},t.marshalPrivateKey=function(e,t){if(!s(t=(t||"rsa").toLowerCase()))throw new Error("invalid or unsupported key type") return e.bytes},t.import=function(e,t,r){try{var i=o.pki.decryptRsaPrivateKey(e,t) if(null===i)throw new Error("Cannot read the key, most likely the password is wrong or not a RSA key") var s=o.asn1.toDer(o.pki.privateKeyToAsn1(i)) return s=n.from(s.getBytes(),"binary"),a.rsa.unmarshalRsaPrivateKey(s,r)}catch(e){r(e)}}}).call(this,r(0).Buffer)},function(e,t,r){var n=r(295),i=r(297) e.exports=n,e.exports.parse=n,e.exports.stringify=i},function(e,t,r){var n=r(296),i=["int32","int64","uint32","uint64","sint32","sint64","bool","fixed64","sfixed64","double","fixed32","sfixed32","float"],o=function(e){for(var t={};e.length;)switch(e[0]){case"[":case",":e.shift() var r=e.shift() if("("===r&&(r=e.shift(),e.shift()),"="!==e[0])throw new Error("Unexpected token in field options: "+e[0]) if(e.shift(),"]"===e[0])throw new Error("Unexpected ] in field option") t[r]=e.shift() break case"]":return e.shift(),t default:throw new Error("Unexpected token in field options: "+e[0])}throw new Error("No closing tag for field options")},a=function(e){for(var t={name:null,type:null,tag:-1,map:null,oneof:null,required:!1,repeated:!1,options:{}};e.length;)switch(e[0]){case"=":e.shift(),t.tag=Number(e.shift()) break case"map":if(t.type="map",t.map={from:null,to:null},e.shift(),"<"!==e[0])throw new Error("Unexpected token in map type: "+e[0]) if(e.shift(),t.map.from=e.shift(),","!==e[0])throw new Error("Unexpected token in map type: "+e[0]) if(e.shift(),t.map.to=e.shift(),">"!==e[0])throw new Error("Unexpected token in map type: "+e[0]) e.shift(),t.name=e.shift() break case"repeated":case"required":case"optional":var r=e.shift() t.required="required"===r,t.repeated="repeated"===r,t.type=e.shift(),t.name=e.shift() break case"[":t.options=o(e) break case";":if(null===t.name)throw new Error("Missing field name") if(null===t.type)throw new Error("Missing type in message field: "+t.name) if(-1===t.tag)throw new Error("Missing tag number in message field: "+t.name) return e.shift(),t default:throw new Error("Unexpected token in message field: "+e[0])}throw new Error("No ; found for message field")},s=function(e){for(var t={enums:[],messages:[],fields:[],extends:[],extensions:null};e.length;)switch(e[0]){case"map":case"repeated":case"optional":case"required":t.fields.push(a(e)) break case"enum":t.enums.push(p(e)) break case"message":t.messages.push(c(e)) break case"extensions":t.extensions=l(e) break case"oneof":e.shift() var r=e.shift() if("{"!==e[0])throw new Error("Unexpected token in oneof: "+e[0]) for(e.shift();"}"!==e[0];){e.unshift("optional") var n=a(e) n.oneof=r,t.fields.push(n)}e.shift() break case"extend":t.extends.push(u(e)) break case";":e.shift() break case"reserved":case"option":for(e.shift();";"!==e[0];)e.shift() break default:e.unshift("optional"),t.fields.push(a(e))}return t},u=function(e){return{name:e[1],message:c(e)}},l=function(e){e.shift() var t=Number(e.shift()) if(isNaN(t))throw new Error("Invalid from in extensions definition") if("to"!==e.shift())throw new Error("Expected keyword 'to' in extensions definition") var r=e.shift() if("max"===r&&(r=536870911),r=Number(r),isNaN(r))throw new Error("Invalid to in extensions definition") if(";"!==e.shift())throw new Error("Missing ; in extensions definition") return{from:t,to:r}},c=function(e){e.shift() var t=1,r=[],n={name:e.shift(),enums:[],extends:[],messages:[],fields:[]} if("{"!==e[0])throw new Error("Expected { but found "+e[0]) for(e.shift();e.length;){if("{"===e[0]?t++:"}"===e[0]&&t--,!t)return e.shift(),r=s(r),n.enums=r.enums,n.messages=r.messages,n.fields=r.fields,n.extends=r.extends,n.extensions=r.extensions,n r.push(e.shift())}if(t)throw new Error("No closing tag for message")},f=function(e){e.shift() var t=e.shift() if(";"!==e[0])throw new Error("Expected ; but found "+e[0]) return e.shift(),t},h=function(e){if(e.shift(),"="!==e[0])throw new Error("Expected = but found "+e[0]) e.shift() var t=e.shift() switch(t){case'"proto2"':t=2 break case'"proto3"':t=3 break default:throw new Error("Expected protobuf syntax version but found "+t)}if(";"!==e[0])throw new Error("Expected ; but found "+e[0]) return e.shift(),t},d=function(e){if(e.length<4)throw new Error("Invalid enum value: "+e.slice(0,3).join(" ")) if("="!==e[1])throw new Error("Expected = but found "+e[1]) if(";"!==e[3]&&"["!==e[3])throw new Error("Expected ; or [ but found "+e[1]) var t=e.shift() e.shift() var r={value:null,options:{}} return r.value=Number(e.shift()),"["===e[0]&&(r.options=o(e)),e.shift(),{name:t,val:r}},p=function(e){e.shift() var t={},r={name:e.shift(),values:{},options:{}} if("{"!==e[0])throw new Error("Expected { but found "+e[0]) for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),r if("option"!==e[0]){var n=d(e) r.values[n.name]=n.val}else t=m(e),r.options[t.name]=t.value}throw new Error("No closing tag for enum")},m=function(e){for(var t=null,r=null,n=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")};e.length;){if(";"===e[0])return e.shift(),{name:t,value:r} switch(e[0]){case"option":e.shift() var i="("===e[0] if(i&&e.shift(),t=e.shift(),i){if(")"!==e[0])throw new Error("Expected ) but found "+e[0]) e.shift()}"."===e[0][0]&&(t+=e.shift()) break case"=":if(e.shift(),null===t)throw new Error("Expected key for option with value: "+e[0]) if(r=n(e.shift()),"optimize_for"===t&&!/^(SPEED|CODE_SIZE|LITE_RUNTIME)$/.test(r))throw new Error("Unexpected value for option optimize_for: "+r) "{"===r&&(r=y(e)) break default:throw new Error("Unexpected token in option: "+e[0])}}},y=function e(t){for(var r=function(e){return"true"===e||"false"!==e&&e.replace(/^"+|"+$/gm,"")},n={};t.length;){if("}"===t[0])return t.shift(),n var i="("===t[0] i&&t.shift() var o=t.shift() if(i){if(")"!==t[0])throw new Error("Expected ) but found "+t[0]) t.shift()}var a=null switch(t[0]){case":":if(void 0!==n[o])throw new Error("Duplicate option map key "+o) t.shift(),"{"===(a=r(t.shift()))&&(a=e(t)),n[o]=a,";"===t[0]&&t.shift() break case"{":if(t.shift(),a=e(t),void 0===n[o]&&(n[o]=[]),!Array.isArray(n[o]))throw new Error("Duplicate option map key "+o) n[o].push(a) break default:throw new Error("Unexpected token in option map: "+t[0])}}throw new Error("No closing tag for option map")},g=function(e){e.shift() var t=e.shift().replace(/^"+|"+$/gm,"") if(";"!==e[0])throw new Error("Unexpected token: "+e[0]+'. Expected ";"') return e.shift(),t},v=function(e){e.shift() var t={name:e.shift(),methods:[],options:{}} if("{"!==e[0])throw new Error("Expected { but found "+e[0]) for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t switch(e[0]){case"option":var r=m(e) if(void 0!==t.options[r.name])throw new Error("Duplicate option "+r.name) t.options[r.name]=r.value break case"rpc":t.methods.push(b(e)) break default:throw new Error("Unexpected token in service: "+e[0])}}throw new Error("No closing tag for service")},b=function(e){e.shift() var t={name:e.shift(),input_type:null,output_type:null,client_streaming:!1,server_streaming:!1,options:{}} if("("!==e[0])throw new Error("Expected ( but found "+e[0]) if(e.shift(),"stream"===e[0]&&(e.shift(),t.client_streaming=!0),t.input_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]) if(e.shift(),"returns"!==e[0])throw new Error("Expected returns but found "+e[0]) if(e.shift(),"("!==e[0])throw new Error("Expected ( but found "+e[0]) if(e.shift(),"stream"===e[0]&&(e.shift(),t.server_streaming=!0),t.output_type=e.shift(),")"!==e[0])throw new Error("Expected ) but found "+e[0]) if(e.shift(),";"===e[0])return e.shift(),t if("{"!==e[0])throw new Error("Expected { but found "+e[0]) for(e.shift();e.length;){if("}"===e[0])return e.shift(),";"===e[0]&&e.shift(),t if("option"!==e[0])throw new Error("Unexpected token in rpc options: "+e[0]) var r=m(e) if(void 0!==t.options[r.name])throw new Error("Duplicate option "+r.name) t.options[r.name]=r.value}throw new Error("No closing tag for rpc")} e.exports=function(e){for(var t=n(e.toString()),r=0;rt.extensions.to)throw new Error(t.name+" does not declare "+e.tag+" as an extension number") t.fields.push(e)}))}))})),a.messages.forEach((function(e){e.fields.forEach((function(t){var r,n,o,s if(t.options&&"true"===t.options.packed&&-1===i.indexOf(t.type)){if(-1===t.type.indexOf(".")){if(e.enums&&e.enums.some((function(e){return e.name===t.type})))return}else{if((r=t.type.split(".")).length>2)throw new Error("what is this?") if(n=r[0],o=r[1],a.messages.some((function(e){if(e.name===n)return s=e,e})),s&&s.enums&&s.enums.some((function(e){return e.name===o})))return}throw new Error("Fields of type "+t.type+' cannot be declared [packed=true]. Only repeated fields of primitive numeric types (types which use the varint, 32-bit, or 64-bit wire types) can be declared "packed". See https://developers.google.com/protocol-buffers/docs/encoding#optional')}}))})),a}},function(e,t){e.exports=function(e){var t,r=function(e){return e.trim()} return e.replace(/([;,{}()=:[\]<>]|\/\*|\*\/)/g," $1 ").split(/\n/).map(r).filter(Boolean).map((function(e){var t=e.indexOf("//") return t>-1?e.slice(0,t):e})).map(r).filter(Boolean).join("\n").split(/\s+|\n+/gm).filter((t=!1,function(e){return"/*"===e?(t=!0,!1):"*/"===e?(t=!1,!1):!t}))}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n=function(e,t){var r=e.repeated?"repeated":e.required?"required":"optional" "map"===e.type&&(r="map<"+e.map.from+","+e.map.to+">"),e.oneof&&(r="") var n=Object.keys(e.options||{}).map((function(t){return t+" = "+e.options[t]})).join(",") return n&&(n=" ["+n+"]"),t.push((r?r+" ":"")+("map"===e.map?"":e.type+" ")+e.name+" = "+e.tag+n+";"),t},i=function(e,t){t.push("enum "+e.name+" {"),e.options||(e.options={}) var r=a(e.options,[]) return r.length>1&&t.push(r.slice(0,-1)),Object.keys(e.values).map((function(r){var n=o(e.values[r]) t.push([r+" = "+n+";"])})),t.push("}",""),t},o=function(e,t){var r=Object.keys(e.options||{}).map((function(t){return t+" = "+e.options[t]})).join(",") return r&&(r=" ["+r+"]"),e.value+r},a=function(e,t){var n=Object.keys(e) return n.forEach((function(n){var i=e[n] ~n.indexOf(".")&&(n="("+n+")") var o=r(i) "object"===o?(i=s(i,[])).length&&t.push("option "+n+" = {",i,"};"):("string"===o&&"optimize_for"!==n&&(i='"'+i+'"'),t.push("option "+n+" = "+i+";"))})),n.length>0&&t.push(""),t},s=function e(t,n){return Object.keys(t).forEach((function(i){var o=t[i],a=r(o) "object"===a?Array.isArray(o)?o.forEach((function(t){(t=e(t,[])).length&&n.push(i+" {",t,"}")})):(o=e(o,[])).length&&n.push(i+" {",o,"}"):("string"===a&&(o='"'+o+'"'),n.push(i+": "+o))})),n} e.exports=function(e){var t=[] return t.push('syntax = "proto'+e.syntax+'";',""),e.package&&t.push("package "+e.package+";",""),e.options||(e.options={}),a(e.options,t),e.enums||(e.enums=[]),e.enums.forEach((function(e){i(e,t)})),e.messages||(e.messages=[]),e.messages.forEach((function(e){!function e(t,r){r.push("message "+t.name+" {"),t.enums||(t.enums=[]),t.enums.forEach((function(e){r.push(i(e,[]))})),t.messages||(t.messages=[]),t.messages.forEach((function(t){r.push(e(t,[]))})) var o={} return t.fields||(t.fields=[]),t.fields.forEach((function(e){e.oneof?(o[e.oneof]||(o[e.oneof]=[]),o[e.oneof].push(n(e,[]))):r.push(n(e,[]))})),Object.keys(o).forEach((function(e){o[e].unshift("oneof "+e+" {"),o[e].push("}"),r.push(o[e])})),r.push("}",""),r}(e,t)})),e.services&&e.services.forEach((function(e){!function(e,t){t.push("service "+e.name+" {"),e.options||(e.options={}),a(e.options,t),e.methods||(e.methods=[]),e.methods.forEach((function(e){t.push(function(e,t){var r="rpc "+e.name+"(" e.client_streaming&&(r+="stream "),r+=e.input_type+") returns (",e.server_streaming&&(r+="stream "),r+=e.output_type+")",e.options||(e.options={}) var n=a(e.options,[]) return n.length>1?t.push(r+" {",n.slice(0,-1),"}"):t.push(r+";"),t}(e,[]))})),t.push("}","")}(e,t)})),t.map(function e(t){return function(r){return Array.isArray(r)?r.map(e(t+" ")).join("\n"):t+r}}("")).join("\n")}},function(e,t,r){"use strict" var n=r(299),i=r(301),o=r(302),a=r(303),s=r(14) e.exports=function(e,t){var r={},u={},l={} !function e(t,n){t.enums&&t.enums.forEach((function(t){t.id=n+(n?".":"")+t.name,u[t.id]=t,e(t,t.id)})),t.messages&&t.messages.forEach((function(i){i.id=n+(n?".":"")+i.name,r[i.id]=i,i.fields.forEach((function(e){if(e.map){var i="Map_"+e.map.from+"_"+e.map.to,o={name:i,enums:[],messages:[],fields:[{name:"key",type:e.map.from,tag:1,repeated:!1,required:!0},{name:"value",type:e.map.to,tag:2,repeated:!1,required:!1}],extensions:null,id:n+(n?".":"")+i} r[o.id]||(r[o.id]=o,t.messages.push(o)),e.type=i,e.repeated=!0}})),e(i,i.id)}))}(e,"") var c=function(e,t){e.messages.forEach((function(r){t[r.name]=f(r.name,e.id)})),e.enums.forEach((function(e){t[e.name]=function(e){if(!e)return null var t={} return Object.keys(e).forEach((function(r){t[r]=e[r].value})),t}(e.values)})),t.type=2,t.message=!0,t.name=e.name var r={} e.fields.forEach((function(e){e.oneof&&(r[e.oneof]||(r[e.oneof]=[]),r[e.oneof].push(e.name))})) var n=e.fields.map((function(t){return f(t.type,e.id)})),s=a(e,n,r),u=o(e,f,n,r,s),l=i(e,f,n) return u.bytes=l.bytes=0,t.buffer=!0,t.encode=u,t.decode=l,t.encodingLength=s,t},f=function(e,i,o){if(t&&t[e])return t[e] if(n[e])return n[e] var a,f,h=(i?i+"."+e:e).split(".").map((function(t,r,n){return n.slice(0,r).concat(e).join(".")})).reverse().reduce((function(e,t){return e||r[t]||u[t]}),null) if(!1===o)return h if(!h)throw new Error("Could not resolve "+e) return h.values?(a=h,f=Object.keys(a.values||[]).map((function(e){return parseInt(a.values[e].value,10)})),n.make(0,(function e(t,r,n){if(!f.length||-1===f.indexOf(t))throw new Error("Invalid enum value: "+t) return s.encode(t,r,n),e.bytes=s.encode.bytes,r}),(function e(t,r){var n=s.decode(t,r) if(!f.length||-1===f.indexOf(n))throw new Error("Invalid enum value: "+n) return e.bytes=s.decode.bytes,n}),s.encodingLength)):l[h.id]||c(h,l[h.id]={})} return(e.enums||[]).concat((e.messages||[]).map((function(e){return f(e.id)})))}},function(e,t,r){"use strict" var n,i=r(14),o=r(300),a=r(7).Buffer,s=function(e,t,r,n){return t.bytes=r.bytes=0,{type:e,encode:t,decode:r,encodingLength:n}} t.make=s,t.bytes=(n=function(e){return a.isBuffer(e)?e.length:a.byteLength(e)},s(2,(function e(t,r,o){var s=o,u=n(t) return i.encode(u,r,o),o+=i.encode.bytes,a.isBuffer(t)?t.copy(r,o):r.write(t,o,u),e.bytes=(o+=u)-s,r}),(function e(t,r){var n=r,o=i.decode(t,r) r+=i.decode.bytes var a=t.slice(r,r+o) return r+=a.length,e.bytes=r-n,a}),(function(e){var t=n(e) return i.encodingLength(t)+t}))),t.string=s(2,(function e(t,r,n){var o=n,s=a.byteLength(t) return i.encode(s,r,n,"utf-8"),n+=i.encode.bytes,r.write(t,n,s),e.bytes=(n+=s)-o,r}),(function e(t,r){var n=r,o=i.decode(t,r) r+=i.decode.bytes var a=t.toString("utf-8",r,r+o) return e.bytes=(r+=o)-n,a}),(function(e){var t=a.byteLength(e) return i.encodingLength(t)+t})),t.bool=s(0,(function e(t,r,n){return r[n]=t?1:0,e.bytes=1,r}),(function e(t,r){var n=t[r]>0 return e.bytes=1,n}),(function(e){return 1})),t.int32=s(0,i.encode,(function e(t,r){var n=i.decode(t,r) return e.bytes=i.decode.bytes,n>2147483647?n-4294967296:n}),(function(e){return i.encodingLength(e<0?e+4294967296:e)})),t.int64=s(0,(function e(t,r,n){if(t<0){var o=n+9 for(i.encode(-1*t,r,n),r[n+=i.encode.bytes-1]=128|r[n];n=Math.pow(2,63)){for(var o=9;255===t[r+o-1];)o-- o=o||9 var s=a.allocUnsafe(o) t.copy(s,0,r,r+o),s[o-1]=127&s[o-1],n=-1*i.decode(s,0),e.bytes=10}else e.bytes=i.decode.bytes return n}),(function(e){return e<0?10:i.encodingLength(e)})),t.sint32=t.sint64=s(0,o.encode,o.decode,o.encodingLength),t.uint32=t.uint64=t.enum=t.varint=s(0,i.encode,i.decode,i.encodingLength),t.fixed64=t.sfixed64=s(1,(function e(t,r,n){return t.copy(r,n),e.bytes=8,r}),(function e(t,r){var n=t.slice(r,r+8) return e.bytes=8,n}),(function(e){return 8})),t.double=s(1,(function e(t,r,n){return r.writeDoubleLE(t,n),e.bytes=8,r}),(function e(t,r){var n=t.readDoubleLE(r) return e.bytes=8,n}),(function(e){return 8})),t.fixed32=s(5,(function e(t,r,n){return r.writeUInt32LE(t,n),e.bytes=4,r}),(function e(t,r){var n=t.readUInt32LE(r) return e.bytes=4,n}),(function(e){return 4})),t.sfixed32=s(5,(function e(t,r,n){return r.writeInt32LE(t,n),e.bytes=4,r}),(function e(t,r){var n=t.readInt32LE(r) return e.bytes=4,n}),(function(e){return 4})),t.float=s(5,(function e(t,r,n){return r.writeFloatLE(t,n),e.bytes=4,r}),(function e(t,r){var n=t.readFloatLE(r) return e.bytes=4,n}),(function(e){return 4}))},function(e,t,r){var n=r(14) t.encode=function e(t,r,i){t=t>=0?2*t:-2*t-1 var o=n.encode(t,r,i) return e.bytes=n.encode.bytes,o},t.decode=function e(t,r){var i=n.decode(t,r) return e.bytes=n.decode.bytes,1&i?(i+1)/-2:i/2},t.encodingLength=function(e){return n.encodingLength(e>=0?2*e:-2*e-1)}},function(e,t,r){"use strict" var n=r(14),i=r(82).defined,o=function(e,t,r){switch(e){case 0:return n.decode(t,r),r+n.decode.bytes case 1:return r+8 case 2:var i=n.decode(t,r) return r+n.decode.bytes+i case 3:case 4:throw new Error("Groups are not supported") case 5:return r+4 default:throw new Error("Unknown wire type: "+e)}},a=function(e,t){if(e.map)return{} if(e.repeated)return[] switch(e.type){case"string":return null!=t?t:"" case"bool":return"true"===t case"float":case"double":case"sfixed32":case"fixed32":case"varint":case"enum":case"uint64":case"uint32":case"int64":case"int32":case"sint64":case"sint32":return parseInt(t||0,10) default:return null}} e.exports=function(e,t,r){for(var s=[],u={},l=[],c=[],f=0;f-1&&delete r[u[c]] if(e.message){var f=n.decode(i,o) o+=n.decode.bytes var h=e.decode(i,o,o+f) t.map?(r[s]=r[s]||{},r[s][h.key]=h.value):t.repeated?(r[s]=r[s]||[],r[s].push(h)):r[s]=h}else t.repeated?(r[s]=r[s]||[],r[s].push(e.decode(i,o))):r[s]=e.decode(i,o) return o+e.decode.bytes}return function t(f,h,d){if(null==h&&(h=0),null==d&&(d=f.length),!(d<=f.length&&h<=f.length))throw new Error("Decoded message is not valid") for(var p,y=h,g={};;){if(d<=h){var v,b,w="",_=0 for(_=0;_-1){S=!0 break}S||(v?p.repeated?g[w]=[]:(b=b&&v[b]?v[b].value:v[Object.keys(v)[0]].value,g[w]=parseInt(b||0,10)):g[w]=a(p,b))}return t.bytes=h-y,g}var M=n.decode(f,h) h+=n.decode.bytes var x=u[M>>3] if(null!=x){var A=r[x] if((p=e.fields[x]).packed){var T=n.decode(f,h) for(T+=h+=n.decode.bytes;h-1){if(v)throw new Error("only one of the properties defined in oneof "+b+" can be set") v=!0}}for(g=0;g0;)s.push(l%o),l=l/o|0}for(i=0;0===e[i]&&i=0;--i)n+=t[s[i]]}else n=function(e,t){var r=0,n=t.length,i=t.charAt(0),o=[0] for(r=0;r0;)o.push(s%n),s=s/n|0}var u="" for(r=0;0===e.at(r)&&r=0;--r)u+=t[o[r]] return u}(e,t) if(r){var c=new RegExp(".{1,"+r+"}","g") n=n.match(c).join("\r\n")}return n},r.decode=function(e,r){if("string"!=typeof e)throw new TypeError('"input" must be a string.') if("string"!=typeof r)throw new TypeError('"alphabet" must be a string.') var i=n[r] if(!i){i=n[r]=[] for(var o=0;o>=8 for(;f>0;)u.push(255&f),f>>=8}for(var h=0;e[h]===s&&h>24&255,a>>16&255,a>>8&255,255&a) r.start(),r.update(e+s),i+=r.digest().getBytes()}return i.substring(0,t)}i.encode_rsa_oaep=function(e,t,r){var i,a,s,u "string"==typeof r?(i=r,a=arguments[3]||void 0,s=arguments[4]||void 0):r&&(i=r.label||void 0,a=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(u=r.mgf1.md)),s?s.start():s=n.md.sha1.create(),u||(u=s) var l=Math.ceil(e.n.bitLength()/8),c=l-2*s.digestLength-2 if(t.length>c)throw(m=new Error("RSAES-OAEP input message length is too long.")).length=t.length,m.maxLength=c,m i||(i=""),s.update(i,"raw") for(var f=s.digest(),h="",d=c-t.length,p=0;p>>0,s>>>0] for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=s[1],s[1]=s[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,s[0]=s[1]/4294967296>>>0 return t.putBytes(o),u(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var a=n.util.createBuffer() a.putBytes(t.bytes()) var s,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1 a.putBytes(o.substr(0,i.blockLength-l)) for(var c=8*i.fullMessageLength[0],f=0;f>>0,a.putInt32(c>>>0),c=s>>>0 a.putInt32(c) var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7} u(h,r,a) var d=n.util.createBuffer() return d.putInt32(h.h0),d.putInt32(h.h1),d.putInt32(h.h2),d.putInt32(h.h3),d.putInt32(h.h4),d.putInt32(h.h5),d.putInt32(h.h6),d.putInt32(h.h7),d},i} var o=null,a=!1,s=null function u(e,t,r){for(var n,i,o,a,u,l,c,f,h,d,p,m,y,g=r.length();g>=64;){for(u=0;u<16;++u)t[u]=r.getInt32() for(;u<64;++u)n=((n=t[u-2])>>>17|n<<15)^(n>>>19|n<<13)^n>>>10,i=((i=t[u-15])>>>7|i<<25)^(i>>>18|i<<14)^i>>>3,t[u]=n+t[u-7]+i+t[u-16]|0 for(l=e.h0,c=e.h1,f=e.h2,h=e.h3,d=e.h4,p=e.h5,m=e.h6,y=e.h7,u=0;u<64;++u)o=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),a=l&c|f&(l^c),n=y+((d>>>6|d<<26)^(d>>>11|d<<21)^(d>>>25|d<<7))+(m^d&(p^m))+s[u]+t[u],y=m,m=p,p=d,d=h+n>>>0,h=f,f=c,c=l,l=n+(i=o+a)>>>0 e.h0=e.h0+l|0,e.h1=e.h1+c|0,e.h2=e.h2+f|0,e.h3=e.h3+h|0,e.h4=e.h4+d|0,e.h5=e.h5+p|0,e.h6=e.h6+m|0,e.h7=e.h7+y|0,g-=64}}},function(e,t,r){(function(t){var n=r(8) r(9) var i=null !n.util.isNodejs||n.options.usePureJavaScript||t.versions["node-webkit"]||(i=r(138)),(e.exports=n.prng=n.prng||{}).create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,o=new Array(32),a=0;a<32;++a)o[a]=r.create() function s(){if(t.pools[0].messageLength>=32)return u() var e=32-t.pools[0].messageLength<<5 t.collect(t.seedFileSync(e)),u()}function u(){t.reseeds=4294967295===t.reseeds?0:t.reseeds+1 var e=t.plugin.md.create() e.update(t.keyBytes) for(var r=1,n=0;n<32;++n)t.reseeds%r==0&&(e.update(t.pools[n].digest().getBytes()),t.pools[n].start()),r<<=1 t.keyBytes=e.digest().getBytes(),e.start(),e.update(t.keyBytes) var i=e.digest().getBytes() t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(i),t.generated=0}function l(e){var t=null if("undefined"!=typeof window){var r=window.crypto||window.msCrypto r&&r.getRandomValues&&(t=function(e){return r.getRandomValues(e)})}var i=n.util.createBuffer() if(t)for(;i.length()>16)))<<16,f=4294967295&(l=(2147483647&(l+=u>>15))+(l>>31)),s=0;s<3;++s)c=f>>>(s<<3),c^=Math.floor(256*Math.random()),i.putByte(String.fromCharCode(255&c)) return i.getBytes(e)}return t.pools=o,t.pool=0,t.generate=function(e,r){if(!r)return t.generateSync(e) var i=t.plugin.cipher,o=t.plugin.increment,a=t.plugin.formatKey,s=t.plugin.formatSeed,l=n.util.createBuffer() t.key=null,function c(f){if(f)return r(f) if(l.length()>=e)return r(null,l.getBytes(e)) if(t.generated>1048575&&(t.key=null),null===t.key)return n.util.nextTick((function(){!function(e){if(t.pools[0].messageLength>=32)return u(),e() var r=32-t.pools[0].messageLength<<5 t.seedFile(r,(function(r,n){if(r)return e(r) t.collect(n),u(),e()}))}(c)})) var h=i(t.key,t.seed) t.generated+=h.length,l.putBytes(h),t.key=a(i(t.key,o(t.seed))),t.seed=s(i(t.key,t.seed)),n.util.setImmediate(c)}()},t.generateSync=function(e){var r=t.plugin.cipher,i=t.plugin.increment,o=t.plugin.formatKey,a=t.plugin.formatSeed t.key=null for(var u=n.util.createBuffer();u.length()1048575&&(t.key=null),null===t.key&&s() var l=r(t.key,t.seed) t.generated+=l.length,u.putBytes(l),t.key=o(r(t.key,i(t.seed))),t.seed=a(r(t.key,t.seed))}return u.getBytes(e)},i?(t.seedFile=function(e,t){i.randomBytes(e,(function(e,r){if(e)return t(e) t(null,r.toString())}))},t.seedFileSync=function(e){return i.randomBytes(e).toString()}):(t.seedFile=function(e,t){try{t(null,l(e))}catch(e){t(e)}},t.seedFileSync=l),t.collect=function(e){for(var r=e.length,n=0;n>i&255) t.collect(n)},t.registerWorker=function(e){e===self?t.seedFile=function(e,t){self.addEventListener("message",(function e(r){var n=r.data n.forge&&n.forge.prng&&(self.removeEventListener("message",e),t(n.forge.prng.err,n.forge.prng.bytes))})),self.postMessage({forge:{prng:{needed:e}}})}:e.addEventListener("message",(function(r){var n=r.data n.forge&&n.forge.prng&&t.seedFile(n.forge.prng.needed,(function(t,r){e.postMessage({forge:{prng:{err:t,bytes:r}}})}))}))},t}}).call(this,r(3))},function(e,t,r){var n=r(8) r(31),r(9) var i=e.exports=n.sha1=n.sha1||{} n.md.sha1=n.md.algorithms.sha1=i,i.create=function(){a||(o=String.fromCharCode(128),o+=n.util.fillString(String.fromCharCode(0),64),a=!0) var e=null,t=n.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8,start:function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[] for(var r=i.messageLengthSize/4,o=0;o>>0,u>>>0] for(var l=i.fullMessageLength.length-1;l>=0;--l)i.fullMessageLength[l]+=u[1],u[1]=u[0]+(i.fullMessageLength[l]/4294967296>>>0),i.fullMessageLength[l]=i.fullMessageLength[l]>>>0,u[0]=u[1]/4294967296>>>0 return t.putBytes(o),s(e,r,t),(t.read>2048||0===t.length())&&t.compact(),i},i.digest=function(){var a=n.util.createBuffer() a.putBytes(t.bytes()) var u,l=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize&i.blockLength-1 a.putBytes(o.substr(0,i.blockLength-l)) for(var c=8*i.fullMessageLength[0],f=0;f>>0,a.putInt32(c>>>0),c=u>>>0 a.putInt32(c) var h={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4} s(h,r,a) var d=n.util.createBuffer() return d.putInt32(h.h0),d.putInt32(h.h1),d.putInt32(h.h2),d.putInt32(h.h3),d.putInt32(h.h4),d},i} var o=null,a=!1 function s(e,t,r){for(var n,i,o,a,s,u,l,c=r.length();c>=64;){for(i=e.h0,o=e.h1,a=e.h2,s=e.h3,u=e.h4,l=0;l<16;++l)n=r.getInt32(),t[l]=n,n=(i<<5|i>>>27)+(s^o&(a^s))+u+1518500249+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n for(;l<20;++l)n=(n=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|n>>>31,t[l]=n,n=(i<<5|i>>>27)+(s^o&(a^s))+u+1518500249+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n for(;l<32;++l)n=(n=t[l-3]^t[l-8]^t[l-14]^t[l-16])<<1|n>>>31,t[l]=n,n=(i<<5|i>>>27)+(o^a^s)+u+1859775393+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n for(;l<40;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o^a^s)+u+1859775393+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n for(;l<60;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o&a|s&(o^a))+u+2400959708+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n for(;l<80;++l)n=(n=t[l-6]^t[l-16]^t[l-28]^t[l-32])<<2|n>>>30,t[l]=n,n=(i<<5|i>>>27)+(o^a^s)+u+3395469782+n,u=s,s=a,a=(o<<30|o>>>2)>>>0,o=i,i=n e.h0=e.h0+i|0,e.h1=e.h1+o|0,e.h2=e.h2+a|0,e.h3=e.h3+s|0,e.h4=e.h4+u|0,c-=64}}},function(e,t,r){var n=r(8) r(9),r(134),r(62),function(){if(n.prime)e.exports=n.prime else{var t=e.exports=n.prime=n.prime||{},r=n.jsbn.BigInteger,i=[6,4,2,4,2,4,6,2],o=new r(null) o.fromInt(30) var a=function(e,t){return e|t} t.generateProbablePrime=function(e,t,i){"function"==typeof t&&(i=t,t={}) var o=(t=t||{}).algorithm||"PRIMEINC" "string"==typeof o&&(o={name:o}),o.options=o.options||{} var a=t.prng||n.random,l={nextBytes:function(e){for(var t=a.getBytesSync(e.length),r=0;re&&(a=u(e,t)) var d=a.toString(16) i.target.postMessage({hex:d,workLoad:c}),a.dAddOffset(f,0)}}}d()}(e,t,i,o):s(e,t,i,o)}(e,l,o.options,i) throw new Error("Invalid prime generation algorithm: "+o.name)}}function s(e,t,r,o){var a=u(e,t),s=function(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}(a.bitLength()) "millerRabinTests"in r&&(s=r.millerRabinTests) var l=10 "maxBlockTime"in r&&(l=r.maxBlockTime),function e(t,r,o,a,s,l,c){var f=+new Date do{if(t.bitLength()>r&&(t=u(r,o)),t.isProbablePrime(s))return c(null,t) t.dAddOffset(i[a++%8],0)}while(l<0||+new Date-f8?3:1,g=[],v=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],b=0,w=0;w>>4^S))<<4,_^=t=65535&((S^=t)>>>-16^_),_^=(t=858993459&(_>>>2^(S^=t<<-16)))<<2,_^=t=65535&((S^=t)>>>-16^_),_^=(t=1431655765&(_>>>1^(S^=t<<-16)))<<1,_^=t=16711935&((S^=t)>>>8^_),t=(_^=(t=1431655765&(_>>>1^(S^=t<<8)))<<1)<<8|(S^=t)>>>20&240,_=S<<24|S<<8&16711680|S>>>8&65280|S>>>24&240,S=t for(var E=0;E>>26,S=S<<2|S>>>26):(_=_<<1|_>>>27,S=S<<1|S>>>27) var k=r[(_&=-15)>>>28]|n[_>>>24&15]|i[_>>>20&15]|o[_>>>16&15]|a[_>>>12&15]|s[_>>>8&15]|u[_>>>4&15],M=l[(S&=-15)>>>28]|c[S>>>24&15]|f[S>>>20&15]|h[S>>>16&15]|d[S>>>12&15]|p[S>>>8&15]|m[S>>>4&15] t=65535&(M>>>16^k),g[b++]=k^t,g[b++]=M^t<<16}}return g}(t),this._init=!0}},i("DES-ECB",n.cipher.modes.ecb),i("DES-CBC",n.cipher.modes.cbc),i("DES-CFB",n.cipher.modes.cfb),i("DES-OFB",n.cipher.modes.ofb),i("DES-CTR",n.cipher.modes.ctr),i("3DES-ECB",n.cipher.modes.ecb),i("3DES-CBC",n.cipher.modes.cbc),i("3DES-CFB",n.cipher.modes.cfb),i("3DES-OFB",n.cipher.modes.ofb),i("3DES-CTR",n.cipher.modes.ctr) var o=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],a=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],s=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],u=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],l=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],c=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],f=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],h=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696] function d(e,t,r,n){var i,d,p=32===e.length?3:9 i=3===p?n?[30,-2,-2]:[0,32,2]:n?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2] var m=t[0],y=t[1] m^=(d=252645135&(m>>>4^y))<<4,m^=(d=65535&(m>>>16^(y^=d)))<<16,m^=d=858993459&((y^=d)>>>2^m),m^=d=16711935&((y^=d<<2)>>>8^m),m=(m^=(d=1431655765&(m>>>1^(y^=d<<8)))<<1)<<1|m>>>31,y=(y^=d)<<1|y>>>31 for(var g=0;g>>4|y<<28)^e[w+1] d=m,m=y,y=d^(a[_>>>24&63]|u[_>>>16&63]|c[_>>>8&63]|h[63&_]|o[S>>>24&63]|s[S>>>16&63]|l[S>>>8&63]|f[63&S])}d=m,m=y,y=d}y=y>>>1|y<<31,y^=d=1431655765&((m=m>>>1|m<<31)>>>1^y),y^=(d=16711935&(y>>>8^(m^=d<<1)))<<8,y^=(d=858993459&(y>>>2^(m^=d)))<<2,y^=d=65535&((m^=d)>>>16^y),y^=d=252645135&((m^=d<<16)>>>4^y),m^=d<<4,r[0]=m,r[1]=y}function p(e){var t,r="DES-"+((e=e||{}).mode||"CBC").toUpperCase(),i=(t=e.decrypt?n.cipher.createDecipher(r,e.key):n.cipher.createCipher(r,e.key)).start return t.start=function(e,r){var o=null r instanceof n.util.ByteBuffer&&(o=r,r={}),(r=r||{}).output=o,r.iv=e,i.call(t,r)},t}},function(e,t,r){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(8) r(313),r(31),r(9) var o,a=i.pkcs5=i.pkcs5||{} i.util.isNodejs&&!i.options.usePureJavaScript&&(o=r(138)),e.exports=i.pbkdf2=a.pbkdf2=function(e,r,a,s,u,l){if("function"==typeof u&&(l=u,u=null),i.util.isNodejs&&!i.options.usePureJavaScript&&o.pbkdf2&&(null===u||"object"!==n(u))&&(o.pbkdf2Sync.length>4||!u||"sha1"===u))return"string"!=typeof u&&(u="sha1"),e=new t(e,"binary"),r=new t(r,"binary"),l?4===o.pbkdf2Sync.length?o.pbkdf2(e,r,a,s,(function(e,t){if(e)return l(e) l(null,t.toString("binary"))})):o.pbkdf2(e,r,a,s,u,(function(e,t){if(e)return l(e) l(null,t.toString("binary"))})):4===o.pbkdf2Sync.length?o.pbkdf2Sync(e,r,a,s).toString("binary"):o.pbkdf2Sync(e,r,a,s,u).toString("binary") if(null==u&&(u="sha1"),"string"==typeof u){if(!(u in i.md.algorithms))throw new Error("Unknown hash algorithm: "+u) u=i.md[u].create()}var c=u.digestLength if(s>4294967295*c){var f=new Error("Derived key is too long.") if(l)return l(f) throw f}var h=Math.ceil(s/c),d=s-(h-1)*c,p=i.hmac.create() p.start(u,e) var m,y,g,v="" if(!l){for(var b=1;b<=h;++b){p.start(null,null),p.update(r),p.update(i.util.int32ToBytes(b)),m=g=p.digest().getBytes() for(var w=2;w<=a;++w)p.start(null,null),p.update(g),y=p.digest().getBytes(),m=i.util.xorBytes(m,y,c),g=y v+=bh)return l(null,v) p.start(null,null),p.update(r),p.update(i.util.int32ToBytes(b)),m=g=p.digest().getBytes(),w=2,S()}function S(){if(w<=a)return p.start(null,null),p.update(g),y=p.digest().getBytes(),m=i.util.xorBytes(m,y,c),g=y,++w,i.util.setImmediate(S) v+=bt.blockLength&&(t.start(),t.update(a.bytes()),a=t.digest()),r=n.util.createBuffer(),i=n.util.createBuffer(),l=a.length(),u=0;u65&&-1!==a){var s=t[a] ","===s?(++a,t=t.substr(0,a)+"\r\n "+t.substr(a)):t=t.substr(0,a)+"\r\n"+s+t.substr(a+1),o=i-a-1,a=-1,++i}else" "!==t[i]&&"\t"!==t[i]&&","!==t[i]||(a=i) return t}function a(e){return e.replace(/^\s+/,"")}i.encode=function(e,t){t=t||{} var r,i="-----BEGIN "+e.type+"-----\r\n" if(e.procType&&(i+=o(r={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]})),e.contentDomain&&(i+=o(r={name:"Content-Domain",values:[e.contentDomain]})),e.dekInfo&&(r={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&r.values.push(e.dekInfo.parameters),i+=o(r)),e.headers)for(var a=0;a>16-t},s=function(e,t){return(65535&e)>>t|e<<16-t&65535} e.exports=n.rc2=n.rc2||{},n.rc2.expandKey=function(e,t){"string"==typeof e&&(e=n.util.createBuffer(e)),t=t||128 var r,o=e,a=e.length(),s=t,u=Math.ceil(s/8),l=255>>(7&s) for(r=a;r<128;r++)o.putByte(i[o.at(r-1)+o.at(r-a)&255]) for(o.setAt(128-u,i[o.at(128-u)&l]),r=127-u;r>=0;r--)o.setAt(r,i[o.at(r+1)^o.at(r+u)]) return o} var u=function(e,t,r){var i,u,l,c,f=!1,h=null,d=null,p=null,m=[] for(e=n.rc2.expandKey(e,t),l=0;l<64;l++)m.push(e.getInt16Le()) r?(i=function(e){for(l=0;l<4;l++)e[l]+=m[c]+(e[(l+3)%4]&e[(l+2)%4])+(~e[(l+3)%4]&e[(l+1)%4]),e[l]=a(e[l],o[l]),c++},u=function(e){for(l=0;l<4;l++)e[l]+=m[63&e[(l+3)%4]]}):(i=function(e){for(l=3;l>=0;l--)e[l]=s(e[l],o[l]),e[l]-=m[c]+(e[(l+3)%4]&e[(l+2)%4])+(~e[(l+3)%4]&e[(l+1)%4]),c--},u=function(e){for(l=3;l>=0;l--)e[l]-=m[63&e[(l+3)%4]]}) var y=function(e){var t=[] for(l=0;l<4;l++){var n=h.getInt16Le() null!==p&&(r?n^=p.getInt16Le():p.putInt16Le(n)),t.push(65535&n)}c=r?0:63 for(var i=0;i=8;)y([[5,i],[1,u],[6,i],[1,u],[5,i]])},finish:function(e){var t=!0 if(r)if(e)t=e(8,h,!r) else{var n=8===h.length()?8:8-h.length() h.fillWithByte(n,n)}if(t&&(f=!0,g.update()),!r&&(t=0===h.length()))if(e)t=e(8,d,!r) else{var i=d.length(),o=d.at(i-1) o>i?t=!1:d.truncate(o)}return t}}} n.rc2.startEncrypting=function(e,t,r){var i=n.rc2.createEncryptionCipher(e,128) return i.start(t,r),i},n.rc2.createEncryptionCipher=function(e,t){return u(e,t,!0)},n.rc2.startDecrypting=function(e,t,r){var i=n.rc2.createDecryptionCipher(e,128) return i.start(t,r),i},n.rc2.createDecryptionCipher=function(e,t){return u(e,t,!1)}},function(e,t,r){"use strict" function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3 for(var n=0;n<50;++n)this.s[n]=0}function j(e,t,r){L.call(this,e,t,r)}L.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called") var t,r=a(e) if("string"!==r){if("object"!==r)throw new Error(s) if(null===e)throw new Error(s) if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e) else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(s) t=!0}for(var n,i,o=this.blocks,u=this.byteCount,l=e.length,c=this.blockCount,f=0,h=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=u){for(this.start=n-u,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n return t?i.push(n):i.unshift(n),this.update(i),i.length},L.prototype.encodeString=function(e){var t,r=a(e) if("string"!==r){if("object"!==r)throw new Error(s) if(null===e)throw new Error(s) if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e) else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(s) t=!0}var n=0,i=e.length if(t)n=i else for(var o=0;o=57344?n+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},L.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15] a%t==0&&(U(r),o=0)}return i&&(e=r[o],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},L.prototype.arrayBuffer=function(){this.finalize() var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3 e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s) for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255 s%r==0&&U(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},j.prototype=new L,j.prototype.finalize=function(){return this.encode(this.outputBits,!0),L.prototype.finalize.call(this)} var U=function(e){var t,r,n,i,o,a,s,u,l,c,f,h,d,p,m,y,v,b,w,_,S,E,k,M,x,A,T,I,O,C,R,P,N,D,B,L,j,U,F,z,H,V,K,q,G,W,Y,Z,J,$,Q,X,ee,te,re,ne,ie,oe,ae,se,ue,le,ce for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|l>>>31),r=o^(l<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(c<<1|f>>>31),r=s^(f<<1|c>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|d>>>31),r=l^(d<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=c^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],m=e[1],W=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,$=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,M=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~y&b,e[1]=m^~v&w,e[10]=M^~A&I,e[11]=x^~T&O,e[20]=D^~L&U,e[21]=B^~j&F,e[30]=q^~W&Z,e[31]=G^~Y&J,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~b&_,e[3]=v^~w&S,e[12]=A^~I&C,e[13]=T^~O&R,e[22]=L^~U&z,e[23]=j^~F&H,e[32]=W^~Z&$,e[33]=Y^~J&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=b^~_&E,e[5]=w^~S&k,e[14]=I^~C&P,e[15]=O^~R&N,e[24]=U^~z&V,e[25]=F^~H&K,e[34]=Z^~$&X,e[35]=J^~Q&ee,e[44]=oe^~se&le,e[45]=ae^~ue&ce,e[6]=_^~E&p,e[7]=S^~k&m,e[16]=C^~P&M,e[17]=R^~N&x,e[26]=z^~V&D,e[27]=H^~K&B,e[36]=$^~X&q,e[37]=Q^~ee&G,e[46]=se^~le&te,e[47]=ue^~ce&re,e[8]=E^~p&y,e[9]=k^~m&v,e[18]=P^~M&A,e[19]=N^~x&T,e[28]=V^~D&L,e[29]=K^~B&j,e[38]=X^~q&W,e[39]=ee^~G&Y,e[48]=le^~te&ne,e[49]=ce^~re&ie,e[0]^=g[n],e[1]^=g[n+1]} if(f)i.exports=I else{for(C=0;C>>16)*t&65535)<<16)}function a(e,t){return e<>>32-t}function s(e){return e=o(e^=e>>>16,2246822507),(e=o(e^=e>>>13,3266489909))^e>>>16}function u(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]] var r=[0,0,0,0] return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function l(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]] var r=[0,0,0,0] return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function c(e,t){return 32==(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function f(e,t){return 0==(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=h(e=l(e,[4283543511,3981806797]),[0,e[0]>>>1]),h(e=l(e,[3301882366,444984403]),[0,e[0]>>>1])}i.x86.hash32=function(e,t){t=t||0 for(var r=(e=e||"").length%4,n=e.length-r,i=t,u=0,l=3432918353,c=461845907,f=0;f>>0},i.x86.hash128=function(e,t){t=t||0 for(var r=(e=e||"").length%16,n=e.length-r,i=t,u=t,l=t,c=t,f=0,h=0,d=0,p=0,m=597399067,y=2869860233,g=951274213,v=2716044179,b=0;b>>0).toString(16)).slice(-8)+("00000000"+(u>>>0).toString(16)).slice(-8)+("00000000"+(l>>>0).toString(16)).slice(-8)+("00000000"+(c>>>0).toString(16)).slice(-8)},i.x64.hash128=function(e,t){t=t||0 for(var r=(e=e||"").length%16,n=e.length-r,i=[0,t],o=[0,t],a=[0,0],s=[0,0],p=[2277735313,289559509],m=[1291169091,658871167],y=0;y>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)+("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)},e.exports&&(t=e.exports=i),t.murmurHash3=i}()},function(e,t,r){"use strict";(function(t){var n=r(142),i=self.crypto?self.crypto.subtle||self.crypto.webkitSubtle:self.msCrypto?self.msCrypto.subtle:void 0 function o(e){if(!i)throw new Error("Please use a browser with webcrypto support and ensure the code has been delivered securely via HTTPS/TLS and run within a Secure Context") return function(r,o){var a=i.digest({name:e},r) if("function"!=typeof a.then)return a.onerror=function(){o(new Error("hashing data using ".concat(e)))},void(a.oncomplete=function(e){o(null,e.target.result)}) n(a.then((function(e){return t.from(new Uint8Array(e))})),o)}}e.exports={sha1:function(e,t){o("SHA-1")(e,t)},sha2256:function(e,t){o("SHA-256")(e,t)},sha2512:function(e,t){o("SHA-512")(e,t)}}}).call(this,r(0).Buffer)},function(e,t,r){(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o=r(322) i="function"==typeof setImediate?setImediate:"object"===(void 0===t?"undefined":n(t))&&t&&t.nextTick?t.nextTick:function(e){setTimeout(e,0)} var a=[] function s(e){if(!(this instanceof s))return"function"==typeof e?new s(e):(r=new s((function(e){t=e})),{resolver:t,promise:r}) var t,r,n,u=!1,l=!1,c=[],f=!1 function h(e){c.length?(f=!0,c.shift()(e||!1)):f=!1}this.then=function(e,t){return new s((function(r){c.push((function(o){var a=l?e:t if("function"==typeof a){function s(){var e try{e=a(n)}catch(e){return r.reject(e),h()}r.fulfill(e),h(!0)}o?s():i(s)}else l?(r.fulfill(n),h(o)):(r.reject(n),h(o))})),u&&!f&&h()}))},function(){function t(e){u||(u=!0,l=!1,n=e,h())}for(var r={fulfill:function e(r){u||(o(r)?r.then(e,t):(u=l=!0,n=r,h()))},reject:t},i=0;i=4294967296&&i++,e[t]=n,e[t+1]=i}function o(e,t,r,n){var i=e[t]+r r<0&&(i+=4294967296) var o=e[t+1]+n i>=4294967296&&o++,e[t]=i,e[t+1]=o}function a(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function s(e,t,r,n,a,s){var u=f[a],l=f[a+1],h=f[s],d=f[s+1] i(c,e,t),o(c,e,u,l) var p=c[n]^c[e],m=c[n+1]^c[e+1] c[n]=m,c[n+1]=p,i(c,r,n),p=c[t]^c[r],m=c[t+1]^c[r+1],c[t]=p>>>24^m<<8,c[t+1]=m>>>24^p<<8,i(c,e,t),o(c,e,h,d),p=c[n]^c[e],m=c[n+1]^c[e+1],c[n]=p>>>16^m<<16,c[n+1]=m>>>16^p<<16,i(c,r,n),p=c[t]^c[r],m=c[t+1]^c[r+1],c[t]=m>>>31^p<<1,c[t+1]=p>>>31^m<<1}var u=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),l=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(e){return 2*e}))),c=new Uint32Array(32),f=new Uint32Array(32) function h(e,t){var r=0 for(r=0;r<16;r++)c[r]=e.h[r],c[r+16]=u[r] for(c[24]=c[24]^e.t,c[25]=c[25]^e.t/4294967296,t&&(c[28]=~c[28],c[29]=~c[29]),r=0;r<32;r++)f[r]=a(e.b,4*r) for(r=0;r<12;r++)s(0,8,16,24,l[16*r+0],l[16*r+1]),s(2,10,18,26,l[16*r+2],l[16*r+3]),s(4,12,20,28,l[16*r+4],l[16*r+5]),s(6,14,22,30,l[16*r+6],l[16*r+7]),s(0,10,20,30,l[16*r+8],l[16*r+9]),s(2,12,22,24,l[16*r+10],l[16*r+11]),s(4,14,16,26,l[16*r+12],l[16*r+13]),s(6,8,18,28,l[16*r+14],l[16*r+15]) for(r=0;r<16;r++)e.h[r]=e.h[r]^c[r]^c[r+16]}function d(e,t){if(0===e||e>64)throw new Error("Illegal output length, expected 0 < length <= 64") if(t&&t.length>64)throw new Error("Illegal key, expected Uint8Array with 0 < length <= 64") for(var r={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e},n=0;n<16;n++)r.h[n]=u[n] var i=t?t.length:0 return r.h[0]^=16842752^i<<8^e,t&&(p(r,t),r.c=128),r}function p(e,t){for(var r=0;r>2]>>8*(3&r) return t}function y(e,t,r){r=r||64,e=n.normalizeInput(e) var i=d(r,t) return p(i,e),m(i)}e.exports={blake2b:y,blake2bHex:function(e,t,r){var i=y(e,t,r) return n.toHex(i)},blake2bInit:d,blake2bUpdate:p,blake2bFinal:m}},function(e,t,r){var n=r(144) function i(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,r,n,i,o){l[e]=l[e]+l[t]+i,l[n]=a(l[n]^l[e],16),l[r]=l[r]+l[n],l[t]=a(l[t]^l[r],12),l[e]=l[e]+l[t]+o,l[n]=a(l[n]^l[e],8),l[r]=l[r]+l[n],l[t]=a(l[t]^l[r],7)}function a(e,t){return e>>>t^e<<32-t}var s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),l=new Uint32Array(16),c=new Uint32Array(16) function f(e,t){var r=0 for(r=0;r<8;r++)l[r]=e.h[r],l[r+8]=s[r] for(l[12]^=e.t,l[13]^=e.t/4294967296,t&&(l[14]=~l[14]),r=0;r<16;r++)c[r]=i(e.b,4*r) for(r=0;r<10;r++)o(0,4,8,12,c[u[16*r+0]],c[u[16*r+1]]),o(1,5,9,13,c[u[16*r+2]],c[u[16*r+3]]),o(2,6,10,14,c[u[16*r+4]],c[u[16*r+5]]),o(3,7,11,15,c[u[16*r+6]],c[u[16*r+7]]),o(0,5,10,15,c[u[16*r+8]],c[u[16*r+9]]),o(1,6,11,12,c[u[16*r+10]],c[u[16*r+11]]),o(2,7,8,13,c[u[16*r+12]],c[u[16*r+13]]),o(3,4,9,14,c[u[16*r+14]],c[u[16*r+15]]) for(r=0;r<8;r++)e.h[r]^=l[r]^l[r+8]}function h(e,t){if(!(e>0&&e<=32))throw new Error("Incorrect output length, should be in [1, 32]") var r=t?t.length:0 if(t&&!(r>0&&r<=32))throw new Error("Incorrect key length, should be in [1, 32]") var n={h:new Uint32Array(s),b:new Uint32Array(64),c:0,t:0,outlen:e} return n.h[0]^=16842752^r<<8^e,r>0&&(d(n,t),n.c=64),n}function d(e,t){for(var r=0;r>2]>>8*(3&r)&255 return t}function m(e,t,r){r=r||32,e=n.normalizeInput(e) var i=h(r,t) return d(i,e),p(i)}e.exports={blake2s:m,blake2sHex:function(e,t,r){var i=m(e,t,r) return n.toHex(i)},blake2sInit:h,blake2sUpdate:d,blake2sFinal:p}},function(e,t,r){"use strict";(function(e){var n=r(87),i=r(88),o=r(146) function a(e){return Promise.all([i.subtle.exportKey("jwk",e.privateKey),i.subtle.exportKey("jwk",e.publicKey)])}t.utils=r(329),t.generateKey=function(e,t){n(i.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(a).then((function(e){return{privateKey:e[0],publicKey:e[1]}})),t)},t.unmarshalPrivateKey=function(e,t){var r,o=i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]) n(Promise.all([o,(r=e,i.subtle.importKey("jwk",{kty:r.kty,n:r.n,e:r.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"]))]).then((function(e){return a({privateKey:e[0],publicKey:e[1]})})).then((function(e){return{privateKey:e[0],publicKey:e[1]}})),t)},t.getRandomValues=o,t.hashAndSign=function(t,r,o){n(i.subtle.importKey("jwk",t,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]).then((function(e){return i.subtle.sign({name:"RSASSA-PKCS1-v1_5"},e,Uint8Array.from(r))})).then((function(t){return e.from(t)})),o)},t.hashAndVerify=function(e,t,r,o){n(i.subtle.importKey("jwk",e,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]).then((function(e){return i.subtle.verify({name:"RSASSA-PKCS1-v1_5"},e,t,r)})),o)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t,r){var n=t.crypto||t.msCrypto n&&n.getRandomValues?e.exports=function(e){var t=new Uint8Array(e),i=0 if(e>0)if(e>65536)for(;it?n.getRandomValues(t.subarray(i,t-i)):(n.getRandomValues(t.subarray(i,i+65536)),i+=65536) else n.getRandomValues(t) return r.from(t)}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,r(4),r(0).Buffer)},function(e,t,r){"use strict" var n=r(89),i=r(151),o=i.toBase64,a=i.toBn,s=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())})),u=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid({"1.2.840.113549.1.1.1":"rsa"}),this.key("none").optional().null_(),this.key("curve").optional().objid(),this.key("params").optional().seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()))})),l=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("algorithm").use(u),this.key("subjectPublicKey").bitstr())})),c=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())})) t.pkcs1ToJwk=function(e){var t=s.decode(e,"der") return{kty:"RSA",n:o(t.modulus),e:o(t.publicExponent),d:o(t.privateExponent),p:o(t.prime1),q:o(t.prime2),dp:o(t.exponent1),dq:o(t.exponent2),qi:o(t.coefficient),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkcs1=function(e){return s.encode({version:0,modulus:a(e.n),publicExponent:a(e.e),privateExponent:a(e.d),prime1:a(e.p),prime2:a(e.q),exponent1:a(e.dp),exponent2:a(e.dq),coefficient:a(e.qi)},"der")},t.pkixToJwk=function(e){var t=l.decode(e,"der"),r=c.decode(t.subjectPublicKey.data,"der") return{kty:"RSA",n:o(r.modulus),e:o(r.publicExponent),alg:"RS256",kid:"2011-04-29"}},t.jwkToPkix=function(e){return l.encode({algorithm:{algorithm:"rsa",none:null},subjectPublicKey:{data:c.encode({modulus:a(e.n),publicExponent:a(e.e)},"der")}},"der")}},,function(e,t,r){"use strict" var n=r(147),i=r(149),o=r(2) function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){var t=this.name function r(e){this._initNamed(e,t)}return o(r,e),r.prototype._initNamed=function(t,r){e.call(this,t,r)},new r(this)},a.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},a.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},a.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){"use strict" var n=r(2),i=r(148) function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],o=0;o>>0,a>>>0] for(var s=d.fullMessageLength.length-1;s>=0;--s)d.fullMessageLength[s]+=a[1],a[1]=a[0]+(d.fullMessageLength[s]/4294967296>>>0),d.fullMessageLength[s]=d.fullMessageLength[s]>>>0,a[0]=a[1]/4294967296>>>0 return i.putBytes(e),c(r,o,i),(i.read>2048||0===i.length())&&i.compact(),d},d.digest=function(){var t=n.util.createBuffer() t.putBytes(i.bytes()) var s,u=d.fullMessageLength[d.fullMessageLength.length-1]+d.messageLengthSize&d.blockLength-1 t.putBytes(a.substr(0,d.blockLength-u)) for(var l=8*d.fullMessageLength[0],f=0;f>>0,t.putInt32(l>>>0),l=s>>>0 t.putInt32(l) var h=new Array(r.length) for(f=0;f=128;){for(O=0;O<16;++O)t[O][0]=r.getInt32()>>>0,t[O][1]=r.getInt32()>>>0 for(;O<80;++O)n=(((C=(P=t[O-2])[0])>>>19|(R=P[1])<<13)^(R>>>29|C<<3)^C>>>6)>>>0,i=((C<<13|R>>>19)^(R<<3|C>>>29)^(C<<26|R>>>6))>>>0,o=(((C=(D=t[O-15])[0])>>>1|(R=D[1])<<31)^(C>>>8|R<<24)^C>>>7)>>>0,a=((C<<31|R>>>1)^(C<<24|R>>>8)^(C<<25|R>>>7))>>>0,N=t[O-7],B=t[O-16],R=i+N[1]+a+B[1],t[O][0]=n+N[0]+o+B[0]+(R/4294967296>>>0)>>>0,t[O][1]=R>>>0 for(p=e[0][0],m=e[0][1],y=e[1][0],g=e[1][1],v=e[2][0],b=e[2][1],w=e[3][0],_=e[3][1],S=e[4][0],E=e[4][1],k=e[5][0],M=e[5][1],x=e[6][0],A=e[6][1],T=e[7][0],I=e[7][1],O=0;O<80;++O)c=((S>>>14|E<<18)^(S>>>18|E<<14)^(E>>>9|S<<23))>>>0,f=(x^S&(k^x))>>>0,s=((p>>>28|m<<4)^(m>>>2|p<<30)^(m>>>7|p<<25))>>>0,l=((p<<4|m>>>28)^(m<<30|p>>>2)^(m<<25|p>>>7))>>>0,h=(p&y|v&(p^y))>>>0,d=(m&g|b&(m^g))>>>0,R=I+(((S<<18|E>>>14)^(S<<14|E>>>18)^(E<<23|S>>>9))>>>0)+((A^E&(M^A))>>>0)+u[O][1]+t[O][1],n=T+c+f+u[O][0]+t[O][0]+(R/4294967296>>>0)>>>0,i=R>>>0,o=s+h+((R=l+d)/4294967296>>>0)>>>0,a=R>>>0,T=x,I=A,x=k,A=M,k=S,M=E,S=w+n+((R=_+i)/4294967296>>>0)>>>0,E=R>>>0,w=v,_=b,v=y,b=g,y=p,g=m,p=n+o+((R=i+a)/4294967296>>>0)>>>0,m=R>>>0 R=e[0][1]+m,e[0][0]=e[0][0]+p+(R/4294967296>>>0)>>>0,e[0][1]=R>>>0,R=e[1][1]+g,e[1][0]=e[1][0]+y+(R/4294967296>>>0)>>>0,e[1][1]=R>>>0,R=e[2][1]+b,e[2][0]=e[2][0]+v+(R/4294967296>>>0)>>>0,e[2][1]=R>>>0,R=e[3][1]+_,e[3][0]=e[3][0]+w+(R/4294967296>>>0)>>>0,e[3][1]=R>>>0,R=e[4][1]+E,e[4][0]=e[4][0]+S+(R/4294967296>>>0)>>>0,e[4][1]=R>>>0,R=e[5][1]+M,e[5][0]=e[5][0]+k+(R/4294967296>>>0)>>>0,e[5][1]=R>>>0,R=e[6][1]+A,e[6][0]=e[6][0]+x+(R/4294967296>>>0)>>>0,e[6][1]=R>>>0,R=e[7][1]+I,e[7][0]=e[7][0]+T+(R/4294967296>>>0)>>>0,e[7][1]=R>>>0,L-=128}}},function(e,t,r){"use strict";(function(t){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var r=0;r>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function m(e,t,r,n,i){var o,a=0 for(o=0;o>>8)-1}function y(e,t,r,n){return m(e,t,r,n,16)}function g(e,t,r,n){return m(e,t,r,n,32)}function v(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,l=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=o,S=a,E=s,k=u,M=l,x=c,A=f,T=h,I=d,O=p,C=m,R=y,P=g,N=v,D=b,B=w,L=0;L<20;L+=2)_^=(i=(P^=(i=(I^=(i=(M^=(i=_+P|0)<<7|i>>>25)+_|0)<<9|i>>>23)+M|0)<<13|i>>>19)+I|0)<<18|i>>>14,x^=(i=(S^=(i=(N^=(i=(O^=(i=x+S|0)<<7|i>>>25)+x|0)<<9|i>>>23)+O|0)<<13|i>>>19)+N|0)<<18|i>>>14,C^=(i=(A^=(i=(E^=(i=(D^=(i=C+A|0)<<7|i>>>25)+C|0)<<9|i>>>23)+D|0)<<13|i>>>19)+E|0)<<18|i>>>14,B^=(i=(R^=(i=(T^=(i=(k^=(i=B+R|0)<<7|i>>>25)+B|0)<<9|i>>>23)+k|0)<<13|i>>>19)+T|0)<<18|i>>>14,_^=(i=(k^=(i=(E^=(i=(S^=(i=_+k|0)<<7|i>>>25)+_|0)<<9|i>>>23)+S|0)<<13|i>>>19)+E|0)<<18|i>>>14,x^=(i=(M^=(i=(T^=(i=(A^=(i=x+M|0)<<7|i>>>25)+x|0)<<9|i>>>23)+A|0)<<13|i>>>19)+T|0)<<18|i>>>14,C^=(i=(O^=(i=(I^=(i=(R^=(i=C+O|0)<<7|i>>>25)+C|0)<<9|i>>>23)+R|0)<<13|i>>>19)+I|0)<<18|i>>>14,B^=(i=(D^=(i=(N^=(i=(P^=(i=B+D|0)<<7|i>>>25)+B|0)<<9|i>>>23)+P|0)<<13|i>>>19)+N|0)<<18|i>>>14 _=_+o|0,S=S+a|0,E=E+s|0,k=k+u|0,M=M+l|0,x=x+c|0,A=A+f|0,T=T+h|0,I=I+d|0,O=O+p|0,C=C+m|0,R=R+y|0,P=P+g|0,N=N+v|0,D=D+b|0,B=B+w|0,e[0]=_>>>0&255,e[1]=_>>>8&255,e[2]=_>>>16&255,e[3]=_>>>24&255,e[4]=S>>>0&255,e[5]=S>>>8&255,e[6]=S>>>16&255,e[7]=S>>>24&255,e[8]=E>>>0&255,e[9]=E>>>8&255,e[10]=E>>>16&255,e[11]=E>>>24&255,e[12]=k>>>0&255,e[13]=k>>>8&255,e[14]=k>>>16&255,e[15]=k>>>24&255,e[16]=M>>>0&255,e[17]=M>>>8&255,e[18]=M>>>16&255,e[19]=M>>>24&255,e[20]=x>>>0&255,e[21]=x>>>8&255,e[22]=x>>>16&255,e[23]=x>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=I>>>0&255,e[33]=I>>>8&255,e[34]=I>>>16&255,e[35]=I>>>24&255,e[36]=O>>>0&255,e[37]=O>>>8&255,e[38]=O>>>16&255,e[39]=O>>>24&255,e[40]=C>>>0&255,e[41]=C>>>8&255,e[42]=C>>>16&255,e[43]=C>>>24&255,e[44]=R>>>0&255,e[45]=R>>>8&255,e[46]=R>>>16&255,e[47]=R>>>24&255,e[48]=P>>>0&255,e[49]=P>>>8&255,e[50]=P>>>16&255,e[51]=P>>>24&255,e[52]=N>>>0&255,e[53]=N>>>8&255,e[54]=N>>>16&255,e[55]=N>>>24&255,e[56]=D>>>0&255,e[57]=D>>>8&255,e[58]=D>>>16&255,e[59]=D>>>24&255,e[60]=B>>>0&255,e[61]=B>>>8&255,e[62]=B>>>16&255,e[63]=B>>>24&255}(e,t,r,n)}function b(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,l=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,f=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,h=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,v=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,b=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=0;_<20;_+=2)o^=(i=(g^=(i=(d^=(i=(l^=(i=o+g|0)<<7|i>>>25)+o|0)<<9|i>>>23)+l|0)<<13|i>>>19)+d|0)<<18|i>>>14,c^=(i=(a^=(i=(v^=(i=(p^=(i=c+a|0)<<7|i>>>25)+c|0)<<9|i>>>23)+p|0)<<13|i>>>19)+v|0)<<18|i>>>14,m^=(i=(f^=(i=(s^=(i=(b^=(i=m+f|0)<<7|i>>>25)+m|0)<<9|i>>>23)+b|0)<<13|i>>>19)+s|0)<<18|i>>>14,w^=(i=(y^=(i=(h^=(i=(u^=(i=w+y|0)<<7|i>>>25)+w|0)<<9|i>>>23)+u|0)<<13|i>>>19)+h|0)<<18|i>>>14,o^=(i=(u^=(i=(s^=(i=(a^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,c^=(i=(l^=(i=(h^=(i=(f^=(i=c+l|0)<<7|i>>>25)+c|0)<<9|i>>>23)+f|0)<<13|i>>>19)+h|0)<<18|i>>>14,m^=(i=(p^=(i=(d^=(i=(y^=(i=m+p|0)<<7|i>>>25)+m|0)<<9|i>>>23)+y|0)<<13|i>>>19)+d|0)<<18|i>>>14,w^=(i=(b^=(i=(v^=(i=(g^=(i=w+b|0)<<7|i>>>25)+w|0)<<9|i>>>23)+g|0)<<13|i>>>19)+v|0)<<18|i>>>14 e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=c>>>0&255,e[5]=c>>>8&255,e[6]=c>>>16&255,e[7]=c>>>24&255,e[8]=m>>>0&255,e[9]=m>>>8&255,e[10]=m>>>16&255,e[11]=m>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=f>>>0&255,e[17]=f>>>8&255,e[18]=f>>>16&255,e[19]=f>>>24&255,e[20]=h>>>0&255,e[21]=h>>>8&255,e[22]=h>>>16&255,e[23]=h>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]) function _(e,t,r,n,i,o,a){var s,u,l=new Uint8Array(16),c=new Uint8Array(64) for(u=0;u<16;u++)l[u]=0 for(u=0;u<8;u++)l[u]=o[u] for(;i>=64;){for(v(c,l,a,w),u=0;u<64;u++)e[t+u]=r[n+u]^c[u] for(s=1,u=8;u<16;u++)s=s+(255&l[u])|0,l[u]=255&s,s>>>=8 i-=64,t+=64,n+=64}if(i>0)for(v(c,l,a,w),u=0;u=64;){for(v(u,s,i,w),a=0;a<64;a++)e[t+a]=u[a] for(o=1,a=8;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8 r-=64,t+=64}if(r>0)for(v(u,s,i,w),a=0;a>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8} function x(e,t,r,n,i,o){var a=new M(o) return a.update(r,n,i),a.finish(e,t),0}function A(e,t,r,n,i,o){var a=new Uint8Array(16) return x(a,0,r,n,i,o),y(e,t,a,0)}function T(e,t,r,n,i){var o if(r<32)return-1 for(k(e,0,t,0,r,n,i),x(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0 return 0}function I(e,t,r,n,i){var o,a=new Uint8Array(32) if(r<32)return-1 if(E(a,0,32,n,i),0!==A(t,16,t,32,r-32,a))return-1 for(k(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0 return 0}function O(e,t){var r for(r=0;r<16;r++)e[r]=0|t[r]}function C(e){var t,r,n=1 for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n e[0]+=n-1+37*(n-1)}function R(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function P(e,r){var n,i,o,a=t(),s=t() for(n=0;n<16;n++)s[n]=r[n] for(C(s),C(s),C(s),i=0;i<2;i++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535 a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,R(s,a,1-o)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function N(e,t){var r=new Uint8Array(32),n=new Uint8Array(32) return P(r,e),P(n,t),g(r,0,n,0)}function D(e){var t=new Uint8Array(32) return P(t,e),1&t[0]}function B(e,t){var r for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8) e[15]&=32767}function L(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function j(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function U(e,t,r){var n,i,o=0,a=0,s=0,u=0,l=0,c=0,f=0,h=0,d=0,p=0,m=0,y=0,g=0,v=0,b=0,w=0,_=0,S=0,E=0,k=0,M=0,x=0,A=0,T=0,I=0,O=0,C=0,R=0,P=0,N=0,D=0,B=r[0],L=r[1],j=r[2],U=r[3],F=r[4],z=r[5],H=r[6],V=r[7],K=r[8],q=r[9],G=r[10],W=r[11],Y=r[12],Z=r[13],J=r[14],$=r[15] o+=(n=t[0])*B,a+=n*L,s+=n*j,u+=n*U,l+=n*F,c+=n*z,f+=n*H,h+=n*V,d+=n*K,p+=n*q,m+=n*G,y+=n*W,g+=n*Y,v+=n*Z,b+=n*J,w+=n*$,a+=(n=t[1])*B,s+=n*L,u+=n*j,l+=n*U,c+=n*F,f+=n*z,h+=n*H,d+=n*V,p+=n*K,m+=n*q,y+=n*G,g+=n*W,v+=n*Y,b+=n*Z,w+=n*J,_+=n*$,s+=(n=t[2])*B,u+=n*L,l+=n*j,c+=n*U,f+=n*F,h+=n*z,d+=n*H,p+=n*V,m+=n*K,y+=n*q,g+=n*G,v+=n*W,b+=n*Y,w+=n*Z,_+=n*J,S+=n*$,u+=(n=t[3])*B,l+=n*L,c+=n*j,f+=n*U,h+=n*F,d+=n*z,p+=n*H,m+=n*V,y+=n*K,g+=n*q,v+=n*G,b+=n*W,w+=n*Y,_+=n*Z,S+=n*J,E+=n*$,l+=(n=t[4])*B,c+=n*L,f+=n*j,h+=n*U,d+=n*F,p+=n*z,m+=n*H,y+=n*V,g+=n*K,v+=n*q,b+=n*G,w+=n*W,_+=n*Y,S+=n*Z,E+=n*J,k+=n*$,c+=(n=t[5])*B,f+=n*L,h+=n*j,d+=n*U,p+=n*F,m+=n*z,y+=n*H,g+=n*V,v+=n*K,b+=n*q,w+=n*G,_+=n*W,S+=n*Y,E+=n*Z,k+=n*J,M+=n*$,f+=(n=t[6])*B,h+=n*L,d+=n*j,p+=n*U,m+=n*F,y+=n*z,g+=n*H,v+=n*V,b+=n*K,w+=n*q,_+=n*G,S+=n*W,E+=n*Y,k+=n*Z,M+=n*J,x+=n*$,h+=(n=t[7])*B,d+=n*L,p+=n*j,m+=n*U,y+=n*F,g+=n*z,v+=n*H,b+=n*V,w+=n*K,_+=n*q,S+=n*G,E+=n*W,k+=n*Y,M+=n*Z,x+=n*J,A+=n*$,d+=(n=t[8])*B,p+=n*L,m+=n*j,y+=n*U,g+=n*F,v+=n*z,b+=n*H,w+=n*V,_+=n*K,S+=n*q,E+=n*G,k+=n*W,M+=n*Y,x+=n*Z,A+=n*J,T+=n*$,p+=(n=t[9])*B,m+=n*L,y+=n*j,g+=n*U,v+=n*F,b+=n*z,w+=n*H,_+=n*V,S+=n*K,E+=n*q,k+=n*G,M+=n*W,x+=n*Y,A+=n*Z,T+=n*J,I+=n*$,m+=(n=t[10])*B,y+=n*L,g+=n*j,v+=n*U,b+=n*F,w+=n*z,_+=n*H,S+=n*V,E+=n*K,k+=n*q,M+=n*G,x+=n*W,A+=n*Y,T+=n*Z,I+=n*J,O+=n*$,y+=(n=t[11])*B,g+=n*L,v+=n*j,b+=n*U,w+=n*F,_+=n*z,S+=n*H,E+=n*V,k+=n*K,M+=n*q,x+=n*G,A+=n*W,T+=n*Y,I+=n*Z,O+=n*J,C+=n*$,g+=(n=t[12])*B,v+=n*L,b+=n*j,w+=n*U,_+=n*F,S+=n*z,E+=n*H,k+=n*V,M+=n*K,x+=n*q,A+=n*G,T+=n*W,I+=n*Y,O+=n*Z,C+=n*J,R+=n*$,v+=(n=t[13])*B,b+=n*L,w+=n*j,_+=n*U,S+=n*F,E+=n*z,k+=n*H,M+=n*V,x+=n*K,A+=n*q,T+=n*G,I+=n*W,O+=n*Y,C+=n*Z,R+=n*J,P+=n*$,b+=(n=t[14])*B,w+=n*L,_+=n*j,S+=n*U,E+=n*F,k+=n*z,M+=n*H,x+=n*V,A+=n*K,T+=n*q,I+=n*G,O+=n*W,C+=n*Y,R+=n*Z,P+=n*J,N+=n*$,w+=(n=t[15])*B,a+=38*(S+=n*j),s+=38*(E+=n*U),u+=38*(k+=n*F),l+=38*(M+=n*z),c+=38*(x+=n*H),f+=38*(A+=n*V),h+=38*(T+=n*K),d+=38*(I+=n*q),p+=38*(O+=n*G),m+=38*(C+=n*W),y+=38*(R+=n*Y),g+=38*(P+=n*Z),v+=38*(N+=n*J),b+=38*(D+=n*$),o=(n=(o+=38*(_+=n*L))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=u,e[4]=l,e[5]=c,e[6]=f,e[7]=h,e[8]=d,e[9]=p,e[10]=m,e[11]=y,e[12]=g,e[13]=v,e[14]=b,e[15]=w}function F(e,t){U(e,t,t)}function z(e,r){var n,i=t() for(n=0;n<16;n++)i[n]=r[n] for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&U(i,i,r) for(n=0;n<16;n++)e[n]=i[n]}function H(e,r,n){var i,o,a=new Uint8Array(32),s=new Float64Array(80),l=t(),c=t(),f=t(),h=t(),d=t(),p=t() for(o=0;o<31;o++)a[o]=r[o] for(a[31]=127&r[31]|64,a[0]&=248,B(s,n),o=0;o<16;o++)c[o]=s[o],h[o]=l[o]=f[o]=0 for(l[0]=h[0]=1,o=254;o>=0;--o)R(l,c,i=a[o>>>3]>>>(7&o)&1),R(f,h,i),L(d,l,f),j(l,l,f),L(f,c,h),j(c,c,h),F(h,d),F(p,l),U(l,f,l),U(f,c,d),L(d,l,f),j(l,l,f),F(c,l),j(f,h,p),U(l,f,u),L(l,l,h),U(f,f,l),U(l,h,p),U(h,c,s),F(c,d),R(l,c,i),R(f,h,i) for(o=0;o<16;o++)s[o+16]=l[o],s[o+32]=f[o],s[o+48]=c[o],s[o+64]=h[o] var m=s.subarray(32),y=s.subarray(16) return z(m,m),U(y,y,m),P(e,y),0}function V(e,t){return H(e,t,o)}function K(e,t){return n(t,32),V(e,t)}function q(e,t,r){var n=new Uint8Array(32) return H(n,r,t),b(e,i,n,w)}M.prototype.blocks=function(e,t,r){for(var n,i,o,a,s,u,l,c,f,h,d,p,m,y,g,v,b,w,_,S=this.fin?0:2048,E=this.h[0],k=this.h[1],M=this.h[2],x=this.h[3],A=this.h[4],T=this.h[5],I=this.h[6],O=this.h[7],C=this.h[8],R=this.h[9],P=this.r[0],N=this.r[1],D=this.r[2],B=this.r[3],L=this.r[4],j=this.r[5],U=this.r[6],F=this.r[7],z=this.r[8],H=this.r[9];r>=16;)h=f=0,h+=(E+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*P,h+=(k+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*H),h+=(M+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*z),h+=(x+=8191&(o>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*F),f=(h+=(A+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,h&=8191,h+=(T+=s>>>1&8191)*(5*j),h+=(I+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*L),h+=(O+=8191&(u>>>11|(l=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*B),h+=(C+=8191&(l>>>8|(c=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*D),d=f+=(h+=(R+=c>>>5|S)*(5*N))>>>13,d+=E*N,d+=k*P,d+=M*(5*H),d+=x*(5*z),f=(d+=A*(5*F))>>>13,d&=8191,d+=T*(5*U),d+=I*(5*j),d+=O*(5*L),d+=C*(5*B),f+=(d+=R*(5*D))>>>13,d&=8191,p=f,p+=E*D,p+=k*N,p+=M*P,p+=x*(5*H),f=(p+=A*(5*z))>>>13,p&=8191,p+=T*(5*F),p+=I*(5*U),p+=O*(5*j),p+=C*(5*L),m=f+=(p+=R*(5*B))>>>13,m+=E*B,m+=k*D,m+=M*N,m+=x*P,f=(m+=A*(5*H))>>>13,m&=8191,m+=T*(5*z),m+=I*(5*F),m+=O*(5*U),m+=C*(5*j),y=f+=(m+=R*(5*L))>>>13,y+=E*L,y+=k*B,y+=M*D,y+=x*N,f=(y+=A*P)>>>13,y&=8191,y+=T*(5*H),y+=I*(5*z),y+=O*(5*F),y+=C*(5*U),g=f+=(y+=R*(5*j))>>>13,g+=E*j,g+=k*L,g+=M*B,g+=x*D,f=(g+=A*N)>>>13,g&=8191,g+=T*P,g+=I*(5*H),g+=O*(5*z),g+=C*(5*F),v=f+=(g+=R*(5*U))>>>13,v+=E*U,v+=k*j,v+=M*L,v+=x*B,f=(v+=A*D)>>>13,v&=8191,v+=T*N,v+=I*P,v+=O*(5*H),v+=C*(5*z),b=f+=(v+=R*(5*F))>>>13,b+=E*F,b+=k*U,b+=M*j,b+=x*L,f=(b+=A*B)>>>13,b&=8191,b+=T*D,b+=I*N,b+=O*P,b+=C*(5*H),w=f+=(b+=R*(5*z))>>>13,w+=E*z,w+=k*F,w+=M*U,w+=x*j,f=(w+=A*L)>>>13,w&=8191,w+=T*B,w+=I*D,w+=O*N,w+=C*P,_=f+=(w+=R*(5*H))>>>13,_+=E*H,_+=k*z,_+=M*F,_+=x*U,f=(_+=A*j)>>>13,_&=8191,_+=T*L,_+=I*B,_+=O*D,_+=C*N,E=h=8191&(f=(f=((f+=(_+=R*P)>>>13)<<2)+f|0)+(h&=8191)|0),k=d+=f>>>=13,M=p&=8191,x=m&=8191,A=y&=8191,T=g&=8191,I=v&=8191,O=b&=8191,C=w&=8191,R=_&=8191,t+=16,r-=16 this.h[0]=E,this.h[1]=k,this.h[2]=M,this.h[3]=x,this.h[4]=A,this.h[5]=T,this.h[6]=I,this.h[7]=O,this.h[8]=C,this.h[9]=R},M.prototype.finish=function(e,t){var r,n,i,o,a=new Uint16Array(10) if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0 this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191 for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191 for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|a[o] for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},M.prototype.update=function(e,t,r){var n,i if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n=128;){for(S=0;S<16;S++)E=8*S+Z,O[S]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],C[S]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7] for(S=0;S<80;S++)if(i=R,o=P,a=N,s=D,u=B,l=L,c=j,h=F,d=z,p=H,m=V,y=K,g=q,v=G,x=65535&(M=W),A=M>>>16,T=65535&(k=U),I=k>>>16,x+=65535&(M=(K>>>14|B<<18)^(K>>>18|B<<14)^(B>>>9|K<<23)),A+=M>>>16,T+=65535&(k=(B>>>14|K<<18)^(B>>>18|K<<14)^(K>>>9|B<<23)),I+=k>>>16,x+=65535&(M=K&q^~K&G),A+=M>>>16,T+=65535&(k=B&L^~B&j),I+=k>>>16,x+=65535&(M=Y[2*S+1]),A+=M>>>16,T+=65535&(k=Y[2*S]),I+=k>>>16,k=O[S%16],A+=(M=C[S%16])>>>16,T+=65535&k,I+=k>>>16,T+=(A+=(x+=65535&M)>>>16)>>>16,x=65535&(M=_=65535&x|A<<16),A=M>>>16,T=65535&(k=w=65535&T|(I+=T>>>16)<<16),I=k>>>16,x+=65535&(M=(F>>>28|R<<4)^(R>>>2|F<<30)^(R>>>7|F<<25)),A+=M>>>16,T+=65535&(k=(R>>>28|F<<4)^(F>>>2|R<<30)^(F>>>7|R<<25)),I+=k>>>16,A+=(M=F&z^F&H^z&H)>>>16,T+=65535&(k=R&P^R&N^P&N),I+=k>>>16,f=65535&(T+=(A+=(x+=65535&M)>>>16)>>>16)|(I+=T>>>16)<<16,b=65535&x|A<<16,x=65535&(M=m),A=M>>>16,T=65535&(k=s),I=k>>>16,A+=(M=_)>>>16,T+=65535&(k=w),I+=k>>>16,P=i,N=o,D=a,B=s=65535&(T+=(A+=(x+=65535&M)>>>16)>>>16)|(I+=T>>>16)<<16,L=u,j=l,U=c,R=f,z=h,H=d,V=p,K=m=65535&x|A<<16,q=y,G=g,W=v,F=b,S%16==15)for(E=0;E<16;E++)k=O[E],x=65535&(M=C[E]),A=M>>>16,T=65535&k,I=k>>>16,k=O[(E+9)%16],x+=65535&(M=C[(E+9)%16]),A+=M>>>16,T+=65535&k,I+=k>>>16,w=O[(E+1)%16],x+=65535&(M=((_=C[(E+1)%16])>>>1|w<<31)^(_>>>8|w<<24)^(_>>>7|w<<25)),A+=M>>>16,T+=65535&(k=(w>>>1|_<<31)^(w>>>8|_<<24)^w>>>7),I+=k>>>16,w=O[(E+14)%16],A+=(M=((_=C[(E+14)%16])>>>19|w<<13)^(w>>>29|_<<3)^(_>>>6|w<<26))>>>16,T+=65535&(k=(w>>>19|_<<13)^(_>>>29|w<<3)^w>>>6),I+=k>>>16,I+=(T+=(A+=(x+=65535&M)>>>16)>>>16)>>>16,O[E]=65535&T|I<<16,C[E]=65535&x|A<<16 x=65535&(M=F),A=M>>>16,T=65535&(k=R),I=k>>>16,k=e[0],A+=(M=t[0])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(x+=65535&M)>>>16)>>>16)>>>16,e[0]=R=65535&T|I<<16,t[0]=F=65535&x|A<<16,x=65535&(M=z),A=M>>>16,T=65535&(k=P),I=k>>>16,k=e[1],A+=(M=t[1])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(x+=65535&M)>>>16)>>>16)>>>16,e[1]=P=65535&T|I<<16,t[1]=z=65535&x|A<<16,x=65535&(M=H),A=M>>>16,T=65535&(k=N),I=k>>>16,k=e[2],A+=(M=t[2])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(x+=65535&M)>>>16)>>>16)>>>16,e[2]=N=65535&T|I<<16,t[2]=H=65535&x|A<<16,x=65535&(M=V),A=M>>>16,T=65535&(k=D),I=k>>>16,k=e[3],A+=(M=t[3])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(x+=65535&M)>>>16)>>>16)>>>16,e[3]=D=65535&T|I<<16,t[3]=V=65535&x|A<<16,x=65535&(M=K),A=M>>>16,T=65535&(k=B),I=k>>>16,k=e[4],A+=(M=t[4])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(x+=65535&M)>>>16)>>>16)>>>16,e[4]=B=65535&T|I<<16,t[4]=K=65535&x|A<<16,x=65535&(M=q),A=M>>>16,T=65535&(k=L),I=k>>>16,k=e[5],A+=(M=t[5])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(x+=65535&M)>>>16)>>>16)>>>16,e[5]=L=65535&T|I<<16,t[5]=q=65535&x|A<<16,x=65535&(M=G),A=M>>>16,T=65535&(k=j),I=k>>>16,k=e[6],A+=(M=t[6])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(x+=65535&M)>>>16)>>>16)>>>16,e[6]=j=65535&T|I<<16,t[6]=G=65535&x|A<<16,x=65535&(M=W),A=M>>>16,T=65535&(k=U),I=k>>>16,k=e[7],A+=(M=t[7])>>>16,T+=65535&k,I+=k>>>16,I+=(T+=(A+=(x+=65535&M)>>>16)>>>16)>>>16,e[7]=U=65535&T|I<<16,t[7]=W=65535&x|A<<16,Z+=128,n-=128}return n}function J(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),a=new Uint8Array(256),s=r for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,Z(i,o,t,r),r%=128,n=0;n=0;--i)Q(e,t,n=r[i/8|0]>>(7&i)&1),$(t,e),$(e,e),Q(e,t,n)}function te(e,r){var n=[t(),t(),t(),t()] O(n[0],f),O(n[1],h),O(n[2],s),U(n[3],f,h),ee(e,n,r)}function re(e,r,i){var o,a=new Uint8Array(64),s=[t(),t(),t(),t()] for(i||n(r,32),J(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,te(s,a),X(e,s),o=0;o<32;o++)r[o+32]=e[o] return 0}var ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]) function ie(e,t){var r,n,i,o for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i>8,t[i]-=256*r t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ne[i],r=t[i]>>8,t[i]&=255 for(i=0;i<32;i++)t[i]-=r*ne[i] for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function oe(e){var t,r=new Float64Array(64) for(t=0;t<64;t++)r[t]=e[t] for(t=0;t<64;t++)e[t]=0 ie(e,r)}function ae(e,r,n,i){var o,a,s=new Uint8Array(64),u=new Uint8Array(64),l=new Uint8Array(64),c=new Float64Array(64),f=[t(),t(),t(),t()] J(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64 var h=n+64 for(o=0;o=0;n--)F(i,i),1!==n&&U(i,i,r) for(n=0;n<16;n++)e[n]=i[n]}(n,n),U(n,n,o),U(n,n,u),U(n,n,u),U(e[0],n,u),F(i,e[0]),U(i,i,u),N(i,o)&&U(e[0],e[0],d),F(i,e[0]),U(i,i,u),N(i,o)?-1:(D(e[0])===r[31]>>7&&j(e[0],a,e[0]),U(e[3],e[0],e[1]),0)}function ue(e,r,n,i){var o,a=new Uint8Array(32),s=new Uint8Array(64),u=[t(),t(),t(),t()],l=[t(),t(),t(),t()] if(n<64)return-1 if(se(l,i))return-1 for(o=0;o=0},e.sign.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(64) return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(ce(e),64!==e.length)throw new Error("bad secret key size") for(var t=new Uint8Array(32),r=0;r>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3 for(var n=0;n<50;++n)this.s[n]=0}function j(e,t,r){L.call(this,e,t,r)}L.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called") var t,r=a(e) if("string"!==r){if("object"!==r)throw new Error(s) if(null===e)throw new Error(s) if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e) else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(s) t=!0}for(var n,i,o=this.blocks,u=this.byteCount,l=e.length,c=this.blockCount,f=0,h=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=u){for(this.start=n-u,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n return t?i.push(n):i.unshift(n),this.update(i),i.length},L.prototype.encodeString=function(e){var t,r=a(e) if("string"!==r){if("object"!==r)throw new Error(s) if(null===e)throw new Error(s) if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e) else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(s) t=!0}var n=0,i=e.length if(t)n=i else for(var o=0;o=57344?n+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},L.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15] a%t==0&&(U(r),o=0)}return i&&(e=r[o],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},L.prototype.arrayBuffer=function(){this.finalize() var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3 e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s) for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255 s%r==0&&U(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},j.prototype=new L,j.prototype.finalize=function(){return this.encode(this.outputBits,!0),L.prototype.finalize.call(this)} var U=function(e){var t,r,n,i,o,a,s,u,l,c,f,h,d,p,m,y,v,b,w,_,S,E,k,M,x,A,T,I,O,C,R,P,N,D,B,L,j,U,F,z,H,V,K,q,G,W,Y,Z,J,$,Q,X,ee,te,re,ne,ie,oe,ae,se,ue,le,ce for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|l>>>31),r=o^(l<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(c<<1|f>>>31),r=s^(f<<1|c>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|d>>>31),r=l^(d<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=c^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],m=e[1],W=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,$=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,M=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~y&b,e[1]=m^~v&w,e[10]=M^~A&I,e[11]=x^~T&O,e[20]=D^~L&U,e[21]=B^~j&F,e[30]=q^~W&Z,e[31]=G^~Y&J,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~b&_,e[3]=v^~w&S,e[12]=A^~I&C,e[13]=T^~O&R,e[22]=L^~U&z,e[23]=j^~F&H,e[32]=W^~Z&$,e[33]=Y^~J&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=b^~_&E,e[5]=w^~S&k,e[14]=I^~C&P,e[15]=O^~R&N,e[24]=U^~z&V,e[25]=F^~H&K,e[34]=Z^~$&X,e[35]=J^~Q&ee,e[44]=oe^~se&le,e[45]=ae^~ue&ce,e[6]=_^~E&p,e[7]=S^~k&m,e[16]=C^~P&M,e[17]=R^~N&x,e[26]=z^~V&D,e[27]=H^~K&B,e[36]=$^~X&q,e[37]=Q^~ee&G,e[46]=se^~le&te,e[47]=ue^~ce&re,e[8]=E^~p&y,e[9]=k^~m&v,e[18]=P^~M&A,e[19]=N^~x&T,e[28]=V^~D&L,e[29]=K^~B&j,e[38]=X^~q&W,e[39]=ee^~G&Y,e[48]=le^~te&ne,e[49]=ce^~re&ie,e[0]^=g[n],e[1]^=g[n+1]} if(f)i.exports=I else{for(C=0;C=r)throw RangeError(n)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict" var n=r(7).Buffer,i=r(352),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),a=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]) t.privateKeyExport=function(e,t,r){var i=n.from(r?o:a) return e.copy(i,r?8:9),t.copy(i,r?181:214),i},t.privateKeyImport=function(e){var t=e.length,r=0 if(!(t2||t1?e[r+n-2]<<8:0) if(!(t<(r+=n)+i||t32||t1&&0===t[o]&&!(128&t[o+1]);--r,++o);for(var a=n.concat([n.from([0]),e.s]),s=33,u=0;s>1&&0===a[u]&&!(128&a[u+1]);--s,++u);return i.encode(t.slice(o),a.slice(u))},t.signatureImport=function(e){var t=n.alloc(32,0),r=n.alloc(32,0) try{var o=i.decode(e) if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long") if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(e){return}return o.r.copy(t,32-o.r.length),o.s.copy(r,32-o.s.length),{r:t,s:r}},t.signatureImportLax=function(e){var t=n.alloc(32,0),r=n.alloc(32,0),i=e.length,o=0 if(48===e[o++]){var a=e[o++] if(!(128&a&&(o+=a-128)>i)&&2===e[o++]){var s=e[o++] if(128&s){if(o+(a=s-128)>i)return for(;a>0&&0===e[o];o+=1,a-=1);for(s=0;a>0;o+=1,a-=1)s=(s<<8)+e[o]}if(!(s>i-o)){var u=o if(o+=s,2===e[o++]){var l=e[o++] if(128&l){if(o+(a=l-128)>i)return for(;a>0&&0===e[o];o+=1,a-=1);for(l=0;a>0;o+=1,a-=1)l=(l<<8)+e[o]}if(!(l>i-o)){var c=o for(o+=l;s>0&&0===e[u];s-=1,u+=1);if(!(s>32)){var f=e.slice(u,u+s) for(f.copy(t,32-f.length);l>0&&0===e[c];l-=1,c+=1);if(!(l>32)){var h=e.slice(c,c+l) return h.copy(r,32-h.length),{r:t,s:r}}}}}}}}}},function(e,t,r){var n=r(7).Buffer e.exports={check:function(e){if(e.length<8)return!1 if(e.length>72)return!1 if(48!==e[0])return!1 if(e[1]!==e.length-2)return!1 if(2!==e[2])return!1 var t=e[3] if(0===t)return!1 if(5+t>=e.length)return!1 if(2!==e[4+t])return!1 var r=e[5+t] return!(0===r||6+t+r!==e.length||128&e[4]||t>1&&0===e[4]&&!(128&e[5])||128&e[t+6]||r>1&&0===e[t+6]&&!(128&e[t+7]))},decode:function(e){if(e.length<8)throw new Error("DER sequence length is too short") if(e.length>72)throw new Error("DER sequence length is too long") if(48!==e[0])throw new Error("Expected DER sequence") if(e[1]!==e.length-2)throw new Error("DER sequence length is invalid") if(2!==e[2])throw new Error("Expected DER integer") var t=e[3] if(0===t)throw new Error("R length is zero") if(5+t>=e.length)throw new Error("R length is too long") if(2!==e[4+t])throw new Error("Expected DER integer (2)") var r=e[5+t] if(0===r)throw new Error("S length is zero") if(6+t+r!==e.length)throw new Error("S length is invalid") if(128&e[4])throw new Error("R value is negative") if(t>1&&0===e[4]&&!(128&e[5]))throw new Error("R value excessively padded") if(128&e[t+6])throw new Error("S value is negative") if(r>1&&0===e[t+6]&&!(128&e[t+7]))throw new Error("S value excessively padded") return{r:e.slice(4,4+t),s:e.slice(6+t)}},encode:function(e,t){var r=e.length,i=t.length if(0===r)throw new Error("R length is zero") if(0===i)throw new Error("S length is zero") if(r>33)throw new Error("R length is too long") if(i>33)throw new Error("S length is too long") if(128&e[0])throw new Error("R value is negative") if(128&t[0])throw new Error("S value is negative") if(r>1&&0===e[0]&&!(128&e[1]))throw new Error("R value excessively padded") if(i>1&&0===t[0]&&!(128&t[1]))throw new Error("S value excessively padded") var o=n.allocUnsafe(6+r+i) return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=e.length,e.copy(o,4),o[4+r]=2,o[5+r]=t.length,t.copy(o,6+r),o}}},function(e,t,r){"use strict" var n=r(7).Buffer,i=r(354),o=r(368),a=r(154),s=r(67),u=r(166),l=r(374) t.privateKeyVerify=function(e){var t=s.fromBuffer(e) return!(t.isOverflow()||t.isZero())},t.privateKeyExport=function(e,t){var r=s.fromBuffer(e) if(r.isOverflow()||r.isZero())throw new Error(a.EC_PRIVATE_KEY_EXPORT_DER_FAIL) return l.mul(r).toPublicKey(t)},t.privateKeyNegate=function(e){var t=s.fromBuffer(e) return t.isZero()?n.alloc(32):(t.ucmp(s.n)>0&&t.isub(s.n),s.n.sub(t).toBuffer())},t.privateKeyModInverse=function(e){var t=s.fromBuffer(e) if(t.isOverflow()||t.isZero())throw new Error(a.EC_PRIVATE_KEY_RANGE_INVALID) return t.uinvm().toBuffer()},t.privateKeyTweakAdd=function(e,t){var r=s.fromBuffer(t) if(r.isOverflow())throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL) if(r.iadd(s.fromBuffer(e)),r.isOverflow()&&r.isub(s.n),r.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL) return r.toBuffer()},t.privateKeyTweakMul=function(e,t){var r=s.fromBuffer(t) if(r.isOverflow()||r.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_MUL_FAIL) var n=s.fromBuffer(e) return r.umul(n).ureduce().toBuffer()},t.publicKeyCreate=function(e,t){var r=s.fromBuffer(e) if(r.isOverflow()||r.isZero())throw new Error(a.EC_PUBLIC_KEY_CREATE_FAIL) return l.mul(r).toPublicKey(t)},t.publicKeyConvert=function(e,t){var r=u.fromPublicKey(e) if(null===r)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL) return r.toPublicKey(t)},t.publicKeyVerify=function(e){return null!==u.fromPublicKey(e)},t.publicKeyTweakAdd=function(e,t,r){var n=u.fromPublicKey(e) if(null===n)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL) if((t=s.fromBuffer(t)).isOverflow())throw new Error(a.EC_PUBLIC_KEY_TWEAK_ADD_FAIL) var i=l.mul(t).add(n) if(i.inf)throw new Error(a.EC_PUBLIC_KEY_TWEAK_ADD_FAIL) return i.toPublicKey(r)},t.publicKeyTweakMul=function(e,t,r){var n=u.fromPublicKey(e) if(null===n)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL) if((t=s.fromBuffer(t)).isOverflow()||t.isZero())throw new Error(a.EC_PUBLIC_KEY_TWEAK_MUL_FAIL) return n.mul(t).toPublicKey(r)},t.publicKeyCombine=function(e,t){for(var r=new Array(e.length),n=0;n=0)&&0===n.iadd(s.psn).redMul(p).ucmp(d.x)},t.recover=function(e,t,r,i){var o=s.fromBuffer(t.slice(0,32)),c=s.fromBuffer(t.slice(32,64)) if(o.isOverflow()||c.isOverflow())throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL) do{if(o.isZero()||c.isZero())break var f=o if(r>>1){if(f.ucmp(s.psn)>=0)break f=o.add(s.n)}var h=n.concat([n.from([2+(1&r)]),f.toBuffer()]),d=u.fromPublicKey(h) if(null===d)break var p=o.uinvm(),m=s.n.sub(s.fromBuffer(e)).umul(p).ureduce(),y=c.umul(p).ureduce() return u.fromECJPoint(l.mulAdd(m,d,y)).toPublicKey(i)}while(0) throw new Error(a.ECDSA_RECOVER_FAIL)},t.ecdh=function(e,r){var n=t.ecdhUnsafe(e,r,!0) return i("sha256").update(n).digest()},t.ecdhUnsafe=function(e,t,r){var n=u.fromPublicKey(e) if(null===n)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL) var i=s.fromBuffer(t) if(i.isOverflow()||i.isZero())throw new Error(a.ECDH_FAIL) return n.mul(i).toPublicKey(r)}},function(e,t,r){"use strict" var n=r(2),i=r(155),o=r(162),a=r(163),s=r(95) function u(e){s.call(this,"digest"),this._hash=e}n(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(a(e))}},,function(e,t,r){"use strict" var n=r(7).Buffer,i=r(357) e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null} this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head} 0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"" for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0) if(1===this.length)return this.head.data for(var t,r,i=n.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=i,r=a,o.data.copy(t,r),a+=o.data.length,o=o.next return i},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length}) return this.constructor.name+" "+e})},,function(e,t,r){var n=r(0),i=n.Buffer function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number") return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number") var n=i(e) return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number") return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number") return n.SlowBuffer(e)}},function(e,t,r){"use strict" e.exports=o var n=r(161),i=r(50) function o(e){if(!(this instanceof o))return new o(e) n.call(this,e)}i.inherits=r(2),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},function(e,t,r){e.exports=r(94)},function(e,t,r){e.exports=r(26)},function(e,t,r){e.exports=r(93).Transform},function(e,t,r){e.exports=r(93).PassThrough},function(e,t,r){var n=r(2),i=r(32),o=r(7).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80) function u(){this.init(),this._w=s,i.call(this,64,56)}function l(e){return e<<30|e>>>2}function c(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f) for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16] for(var h=0;h<80;++h){var d=~~(h/20),p=0|((t=n)<<5|t>>>27)+c(d,i,o,s)+u+r[h]+a[d] u=s,s=o,o=l(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20) return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var n=r(2),i=r(32),o=r(7).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80) function u(){this.init(),this._w=s,i.call(this,64,56)}function l(e){return e<<5|e>>>27}function c(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h) for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31 for(var d=0;d<80;++d){var p=~~(d/20),m=l(n)+f(p,i,o,s)+u+r[d]+a[p]|0 u=s,s=o,o=c(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20) return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},function(e,t,r){var n=r(2),i=r(164),o=r(32),a=r(7).Buffer,s=new Array(64) function u(){this.init(),this._w=s,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28) return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},function(e,t,r){var n=r(2),i=r(165),o=r(32),a=r(7).Buffer,s=new Array(160) function u(){this.init(),this._w=s,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48) function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},function(e,t,r){"use strict";(function(t){var n=r(369),i=r(372),o=new t(0),a=new t([0]),s=new t([1]) function u(e,t,r,n){var o=i[e] if(void 0===o)throw new Error("hash "+e+" is not supported") this._algo=e,this._securityStrength=o.securityStrength/8,this._outlen=o.outlen/8,this._reseedInterval=281474976710656,this._init(t,r,n)}u.prototype._update=function(e){var t=n(this._algo,this._K).update(this._V).update(a) e&&t.update(e),this._K=t.digest(),this._V=n(this._algo,this._K).update(this._V).digest(),e&&(this._K=n(this._algo,this._K).update(this._V).update(s).update(e).digest(),this._V=n(this._algo,this._K).update(this._V).digest())},u.prototype._init=function(e,r,n){if(e.lengththis._reseedInterval)throw new Error("Reseed is required") r&&0===r.length&&(r=void 0),r&&this._update(r) for(var i=new t(0);i.lengthr?t=("rmd160"===e?new u:l(e)).update(t).digest():t.length64?t=e(t):t.length<64&&(t=i.concat([t,a],64)) for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),s=0;s<64;s++)r[s]=54^t[s],n[s]=92^t[s] this._hash=[r]}n(s,o),s.prototype._update=function(e){this._hash.push(e)},s.prototype._final=function(){var e=this._alg(i.concat(this._hash)) return this._alg(i.concat([this._opad,e]))},e.exports=s},function(e,t,r){var n=r(155) e.exports=function(e){return(new n).update(e).digest()}},function(e){e.exports={sha1:{securityStrength:128,outlen:160,seedlen:440},sha224:{securityStrength:192,outlen:224,seedlen:440},sha256:{securityStrength:256,outlen:256,seedlen:440},sha384:{securityStrength:256,outlen:384,seedlen:888},sha512:{securityStrength:256,outlen:512,seedlen:888}}},function(e,t,r){"use strict" t.umulTo10x10=function(e,t,r){var n,i,o,a=e.words,s=t.words,u=r.words,l=0,c=0|a[0],f=8191&c,h=c>>>13,d=0|a[1],p=8191&d,m=d>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],E=8191&S,k=S>>>13,M=0|a[5],x=8191&M,A=M>>>13,T=0|a[6],I=8191&T,O=T>>>13,C=0|a[7],R=8191&C,P=C>>>13,N=0|a[8],D=8191&N,B=N>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],z=8191&F,H=F>>>13,V=0|s[1],K=8191&V,q=V>>>13,G=0|s[2],W=8191&G,Y=G>>>13,Z=0|s[3],J=8191&Z,$=Z>>>13,Q=0|s[4],X=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,he=ce>>>13,de=0|s[9],pe=8191&de,me=de>>>13 r.length=19,n=Math.imul(f,z),i=Math.imul(f,H) var ye=l+n+((8191&(i+=Math.imul(h,z)))<<13) l=(o=Math.imul(h,H))+(i>>>13)+(ye>>>26),ye&=67108863,n=Math.imul(p,z),i=Math.imul(p,H),i+=Math.imul(m,z),o=Math.imul(m,H),n+=Math.imul(f,K),i+=Math.imul(f,q) var ge=l+n+((8191&(i+=Math.imul(h,K)))<<13) l=(o+=Math.imul(h,q))+(i>>>13)+(ge>>>26),ge&=67108863,n=Math.imul(g,z),i=Math.imul(g,H),i+=Math.imul(v,z),o=Math.imul(v,H),n+=Math.imul(p,K),i+=Math.imul(p,q),i+=Math.imul(m,K),o+=Math.imul(m,q),n+=Math.imul(f,W),i+=Math.imul(f,Y) var ve=l+n+((8191&(i+=Math.imul(h,W)))<<13) l=(o+=Math.imul(h,Y))+(i>>>13)+(ve>>>26),ve&=67108863,n=Math.imul(w,z),i=Math.imul(w,H),i+=Math.imul(_,z),o=Math.imul(_,H),n+=Math.imul(g,K),i+=Math.imul(g,q),i+=Math.imul(v,K),o+=Math.imul(v,q),n+=Math.imul(p,W),i+=Math.imul(p,Y),i+=Math.imul(m,W),o+=Math.imul(m,Y),n+=Math.imul(f,J),i+=Math.imul(f,$) var be=l+n+((8191&(i+=Math.imul(h,J)))<<13) l=(o+=Math.imul(h,$))+(i>>>13)+(be>>>26),be&=67108863,n=Math.imul(E,z),i=Math.imul(E,H),i+=Math.imul(k,z),o=Math.imul(k,H),n+=Math.imul(w,K),i+=Math.imul(w,q),i+=Math.imul(_,K),o+=Math.imul(_,q),n+=Math.imul(g,W),i+=Math.imul(g,Y),i+=Math.imul(v,W),o+=Math.imul(v,Y),n+=Math.imul(p,J),i+=Math.imul(p,$),i+=Math.imul(m,J),o+=Math.imul(m,$),n+=Math.imul(f,X),i+=Math.imul(f,ee) var we=l+n+((8191&(i+=Math.imul(h,X)))<<13) l=(o+=Math.imul(h,ee))+(i>>>13)+(we>>>26),we&=67108863,n=Math.imul(x,z),i=Math.imul(x,H),i+=Math.imul(A,z),o=Math.imul(A,H),n+=Math.imul(E,K),i+=Math.imul(E,q),i+=Math.imul(k,K),o+=Math.imul(k,q),n+=Math.imul(w,W),i+=Math.imul(w,Y),i+=Math.imul(_,W),o+=Math.imul(_,Y),n+=Math.imul(g,J),i+=Math.imul(g,$),i+=Math.imul(v,J),o+=Math.imul(v,$),n+=Math.imul(p,X),i+=Math.imul(p,ee),i+=Math.imul(m,X),o+=Math.imul(m,ee),n+=Math.imul(f,re),i+=Math.imul(f,ne) var _e=l+n+((8191&(i+=Math.imul(h,re)))<<13) l=(o+=Math.imul(h,ne))+(i>>>13)+(_e>>>26),_e&=67108863,n=Math.imul(I,z),i=Math.imul(I,H),i+=Math.imul(O,z),o=Math.imul(O,H),n+=Math.imul(x,K),i+=Math.imul(x,q),i+=Math.imul(A,K),o+=Math.imul(A,q),n+=Math.imul(E,W),i+=Math.imul(E,Y),i+=Math.imul(k,W),o+=Math.imul(k,Y),n+=Math.imul(w,J),i+=Math.imul(w,$),i+=Math.imul(_,J),o+=Math.imul(_,$),n+=Math.imul(g,X),i+=Math.imul(g,ee),i+=Math.imul(v,X),o+=Math.imul(v,ee),n+=Math.imul(p,re),i+=Math.imul(p,ne),i+=Math.imul(m,re),o+=Math.imul(m,ne),n+=Math.imul(f,oe),i+=Math.imul(f,ae) var Se=l+n+((8191&(i+=Math.imul(h,oe)))<<13) l=(o+=Math.imul(h,ae))+(i>>>13)+(Se>>>26),Se&=67108863,n=Math.imul(R,z),i=Math.imul(R,H),i+=Math.imul(P,z),o=Math.imul(P,H),n+=Math.imul(I,K),i+=Math.imul(I,q),i+=Math.imul(O,K),o+=Math.imul(O,q),n+=Math.imul(x,W),i+=Math.imul(x,Y),i+=Math.imul(A,W),o+=Math.imul(A,Y),n+=Math.imul(E,J),i+=Math.imul(E,$),i+=Math.imul(k,J),o+=Math.imul(k,$),n+=Math.imul(w,X),i+=Math.imul(w,ee),i+=Math.imul(_,X),o+=Math.imul(_,ee),n+=Math.imul(g,re),i+=Math.imul(g,ne),i+=Math.imul(v,re),o+=Math.imul(v,ne),n+=Math.imul(p,oe),i+=Math.imul(p,ae),i+=Math.imul(m,oe),o+=Math.imul(m,ae),n+=Math.imul(f,ue),i+=Math.imul(f,le) var Ee=l+n+((8191&(i+=Math.imul(h,ue)))<<13) l=(o+=Math.imul(h,le))+(i>>>13)+(Ee>>>26),Ee&=67108863,n=Math.imul(D,z),i=Math.imul(D,H),i+=Math.imul(B,z),o=Math.imul(B,H),n+=Math.imul(R,K),i+=Math.imul(R,q),i+=Math.imul(P,K),o+=Math.imul(P,q),n+=Math.imul(I,W),i+=Math.imul(I,Y),i+=Math.imul(O,W),o+=Math.imul(O,Y),n+=Math.imul(x,J),i+=Math.imul(x,$),i+=Math.imul(A,J),o+=Math.imul(A,$),n+=Math.imul(E,X),i+=Math.imul(E,ee),i+=Math.imul(k,X),o+=Math.imul(k,ee),n+=Math.imul(w,re),i+=Math.imul(w,ne),i+=Math.imul(_,re),o+=Math.imul(_,ne),n+=Math.imul(g,oe),i+=Math.imul(g,ae),i+=Math.imul(v,oe),o+=Math.imul(v,ae),n+=Math.imul(p,ue),i+=Math.imul(p,le),i+=Math.imul(m,ue),o+=Math.imul(m,le),n+=Math.imul(f,fe),i+=Math.imul(f,he) var ke=l+n+((8191&(i+=Math.imul(h,fe)))<<13) l=(o+=Math.imul(h,he))+(i>>>13)+(ke>>>26),ke&=67108863,n=Math.imul(j,z),i=Math.imul(j,H),i+=Math.imul(U,z),o=Math.imul(U,H),n+=Math.imul(D,K),i+=Math.imul(D,q),i+=Math.imul(B,K),o+=Math.imul(B,q),n+=Math.imul(R,W),i+=Math.imul(R,Y),i+=Math.imul(P,W),o+=Math.imul(P,Y),n+=Math.imul(I,J),i+=Math.imul(I,$),i+=Math.imul(O,J),o+=Math.imul(O,$),n+=Math.imul(x,X),i+=Math.imul(x,ee),i+=Math.imul(A,X),o+=Math.imul(A,ee),n+=Math.imul(E,re),i+=Math.imul(E,ne),i+=Math.imul(k,re),o+=Math.imul(k,ne),n+=Math.imul(w,oe),i+=Math.imul(w,ae),i+=Math.imul(_,oe),o+=Math.imul(_,ae),n+=Math.imul(g,ue),i+=Math.imul(g,le),i+=Math.imul(v,ue),o+=Math.imul(v,le),n+=Math.imul(p,fe),i+=Math.imul(p,he),i+=Math.imul(m,fe),o+=Math.imul(m,he),n+=Math.imul(f,pe),i+=Math.imul(f,me) var Me=l+n+((8191&(i+=Math.imul(h,pe)))<<13) l=(o+=Math.imul(h,me))+(i>>>13)+(Me>>>26),Me&=67108863,n=Math.imul(j,K),i=Math.imul(j,q),i+=Math.imul(U,K),o=Math.imul(U,q),n+=Math.imul(D,W),i+=Math.imul(D,Y),i+=Math.imul(B,W),o+=Math.imul(B,Y),n+=Math.imul(R,J),i+=Math.imul(R,$),i+=Math.imul(P,J),o+=Math.imul(P,$),n+=Math.imul(I,X),i+=Math.imul(I,ee),i+=Math.imul(O,X),o+=Math.imul(O,ee),n+=Math.imul(x,re),i+=Math.imul(x,ne),i+=Math.imul(A,re),o+=Math.imul(A,ne),n+=Math.imul(E,oe),i+=Math.imul(E,ae),i+=Math.imul(k,oe),o+=Math.imul(k,ae),n+=Math.imul(w,ue),i+=Math.imul(w,le),i+=Math.imul(_,ue),o+=Math.imul(_,le),n+=Math.imul(g,fe),i+=Math.imul(g,he),i+=Math.imul(v,fe),o+=Math.imul(v,he),n+=Math.imul(p,pe),i+=Math.imul(p,me) var xe=l+n+((8191&(i+=Math.imul(m,pe)))<<13) l=(o+=Math.imul(m,me))+(i>>>13)+(xe>>>26),xe&=67108863,n=Math.imul(j,W),i=Math.imul(j,Y),i+=Math.imul(U,W),o=Math.imul(U,Y),n+=Math.imul(D,J),i+=Math.imul(D,$),i+=Math.imul(B,J),o+=Math.imul(B,$),n+=Math.imul(R,X),i+=Math.imul(R,ee),i+=Math.imul(P,X),o+=Math.imul(P,ee),n+=Math.imul(I,re),i+=Math.imul(I,ne),i+=Math.imul(O,re),o+=Math.imul(O,ne),n+=Math.imul(x,oe),i+=Math.imul(x,ae),i+=Math.imul(A,oe),o+=Math.imul(A,ae),n+=Math.imul(E,ue),i+=Math.imul(E,le),i+=Math.imul(k,ue),o+=Math.imul(k,le),n+=Math.imul(w,fe),i+=Math.imul(w,he),i+=Math.imul(_,fe),o+=Math.imul(_,he),n+=Math.imul(g,pe),i+=Math.imul(g,me) var Ae=l+n+((8191&(i+=Math.imul(v,pe)))<<13) l=(o+=Math.imul(v,me))+(i>>>13)+(Ae>>>26),Ae&=67108863,n=Math.imul(j,J),i=Math.imul(j,$),i+=Math.imul(U,J),o=Math.imul(U,$),n+=Math.imul(D,X),i+=Math.imul(D,ee),i+=Math.imul(B,X),o+=Math.imul(B,ee),n+=Math.imul(R,re),i+=Math.imul(R,ne),i+=Math.imul(P,re),o+=Math.imul(P,ne),n+=Math.imul(I,oe),i+=Math.imul(I,ae),i+=Math.imul(O,oe),o+=Math.imul(O,ae),n+=Math.imul(x,ue),i+=Math.imul(x,le),i+=Math.imul(A,ue),o+=Math.imul(A,le),n+=Math.imul(E,fe),i+=Math.imul(E,he),i+=Math.imul(k,fe),o+=Math.imul(k,he),n+=Math.imul(w,pe),i+=Math.imul(w,me) var Te=l+n+((8191&(i+=Math.imul(_,pe)))<<13) l=(o+=Math.imul(_,me))+(i>>>13)+(Te>>>26),Te&=67108863,n=Math.imul(j,X),i=Math.imul(j,ee),i+=Math.imul(U,X),o=Math.imul(U,ee),n+=Math.imul(D,re),i+=Math.imul(D,ne),i+=Math.imul(B,re),o+=Math.imul(B,ne),n+=Math.imul(R,oe),i+=Math.imul(R,ae),i+=Math.imul(P,oe),o+=Math.imul(P,ae),n+=Math.imul(I,ue),i+=Math.imul(I,le),i+=Math.imul(O,ue),o+=Math.imul(O,le),n+=Math.imul(x,fe),i+=Math.imul(x,he),i+=Math.imul(A,fe),o+=Math.imul(A,he),n+=Math.imul(E,pe),i+=Math.imul(E,me) var Ie=l+n+((8191&(i+=Math.imul(k,pe)))<<13) l=(o+=Math.imul(k,me))+(i>>>13)+(Ie>>>26),Ie&=67108863,n=Math.imul(j,re),i=Math.imul(j,ne),i+=Math.imul(U,re),o=Math.imul(U,ne),n+=Math.imul(D,oe),i+=Math.imul(D,ae),i+=Math.imul(B,oe),o+=Math.imul(B,ae),n+=Math.imul(R,ue),i+=Math.imul(R,le),i+=Math.imul(P,ue),o+=Math.imul(P,le),n+=Math.imul(I,fe),i+=Math.imul(I,he),i+=Math.imul(O,fe),o+=Math.imul(O,he),n+=Math.imul(x,pe),i+=Math.imul(x,me) var Oe=l+n+((8191&(i+=Math.imul(A,pe)))<<13) l=(o+=Math.imul(A,me))+(i>>>13)+(Oe>>>26),Oe&=67108863,n=Math.imul(j,oe),i=Math.imul(j,ae),i+=Math.imul(U,oe),o=Math.imul(U,ae),n+=Math.imul(D,ue),i+=Math.imul(D,le),i+=Math.imul(B,ue),o+=Math.imul(B,le),n+=Math.imul(R,fe),i+=Math.imul(R,he),i+=Math.imul(P,fe),o+=Math.imul(P,he),n+=Math.imul(I,pe),i+=Math.imul(I,me) var Ce=l+n+((8191&(i+=Math.imul(O,pe)))<<13) l=(o+=Math.imul(O,me))+(i>>>13)+(Ce>>>26),Ce&=67108863,n=Math.imul(j,ue),i=Math.imul(j,le),i+=Math.imul(U,ue),o=Math.imul(U,le),n+=Math.imul(D,fe),i+=Math.imul(D,he),i+=Math.imul(B,fe),o+=Math.imul(B,he),n+=Math.imul(R,pe),i+=Math.imul(R,me) var Re=l+n+((8191&(i+=Math.imul(P,pe)))<<13) l=(o+=Math.imul(P,me))+(i>>>13)+(Re>>>26),Re&=67108863,n=Math.imul(j,fe),i=Math.imul(j,he),i+=Math.imul(U,fe),o=Math.imul(U,he),n+=Math.imul(D,pe),i+=Math.imul(D,me) var Pe=l+n+((8191&(i+=Math.imul(B,pe)))<<13) l=(o+=Math.imul(B,me))+(i>>>13)+(Pe>>>26),Pe&=67108863,n=Math.imul(j,pe),i=Math.imul(j,me) var Ne=l+n+((8191&(i+=Math.imul(U,pe)))<<13) return l=(o=Math.imul(U,me))+(i>>>13)+(Ne>>>26),Ne&=67108863,u[0]=ye,u[1]=ge,u[2]=ve,u[3]=be,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Te,u[13]=Ie,u[14]=Oe,u[15]=Ce,u[16]=Re,u[17]=Pe,u[18]=Ne,0!==l&&(u[19]=l,r.length++),r}},function(e,t,r){"use strict" var n=r(7).Buffer,i=r(67),o=r(166),a=r(167) function s(){this.x=i.fromBuffer(n.from("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798","hex")),this.y=i.fromBuffer(n.from("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8","hex")),this.inf=!1,this._precompute()}s.prototype._precompute=function(){for(var e=new o(this.x,this.y),t=new Array(1+Math.ceil(64.25)),r=t[0]=e,n=1;n=l;f--)c=(c<<1)+i[f] u.push(c)}for(var h=new a(null,null,null),d=new a(null,null,null),p=s;p>0;p--){for(var m=0;m=0;c--){for(var f=0;c>=0&&(l[0]=0|s[0][c],l[1]=0|s[1][c],0===l[0]&&0===l[1]);++f,--c);if(c>=0&&(f+=1),u=u.dblp(f),c<0)break for(var h=0;h<2;h++){var d,p=l[h] 0!==p&&(p>0?d=o[h][p>>1]:p<0&&(d=o[h][-p>>1].neg()),u=void 0===d.z?u.mixedAdd(d):u.add(d))}}return u},e.exports=new s},function(e,t,r){"use strict";(function(t){var n=r(376),i=r(379),o={"AES-128":{ivSize:16,keySize:16},"AES-256":{ivSize:16,keySize:32},Blowfish:{ivSize:8,cipherKeySize:32}} e.exports=function(e,r,a,s){var u=o[e] if(!u)return s(new Error("unkown cipherType passed")) if(!r)return s(new Error("unkown hashType passed")) var l=u.keySize,c=u.ivSize,f=t.from("key expansion"),h=2*(c+l+20) i.create(r,a,(function(e,r){if(e)return s(e) r.digest(f,(function(e,i){if(e)return s(e) var o=[],a=0 n((function(){return ah&&(s=h-a),o.push(n),a+=s,r.digest(i,(function(t,r){if(t)return e(t) i=r,e()}))}))}),(function(e){if(e)return s(e) var r=h/2,n=t.concat(o),i=n.slice(0,r),a=n.slice(r,h),u=function(e){return{iv:e.slice(0,c),cipherKey:e.slice(c,c+l),macKey:e.slice(c+l)}} s(null,{k1:u(i),k2:u(a)})}))}))}))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,r){r=(0,o.default)(r||n.default) var s=(0,a.default)(t) if(!e())return r(null) s((function t(n){if(n)return r(n) if(e())return s(t) var o=(0,i.default)(arguments,1) r.apply(null,[null].concat(o))}))} var n=s(r(68)),i=s(r(64)),o=s(r(97)),a=s(r(98)) function s(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},function(e,t,r){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)((function(t,r){var i try{i=e.apply(this,t)}catch(e){return r(e)}(0,n.default)(i)&&"function"==typeof i.then?i.then((function(e){s(r,null,e)}),(function(e){s(r,e.message?e:new Error(e))})):r(null,i)}))} var n=a(r(99)),i=a(r(378)),o=a(r(86)) function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t,r){try{e(t,r)}catch(e){(0,o.default)(u,e)}}function u(e){throw e}e.exports=t.default},function(e,t,r){"use strict" Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=(0,i.default)(arguments),r=t.pop() e.call(this,t,r)}} var n,i=(n=r(64))&&n.__esModule?n:{default:n} e.exports=t.default},function(e,t,r){"use strict";(function(e){var n=r(87),i=r(88),o=r(380),a={SHA1:"SHA-1",SHA256:"SHA-256",SHA512:"SHA-512"} t.create=function(t,r,s){var u=a[t] n(i.subtle.importKey("raw",r,{name:"HMAC",hash:{name:u}},!1,["sign"]).then((function(r){return{digest:function(t,o){!function(t,r,o){n(i.subtle.sign({name:"HMAC"},t,r).then((function(t){return e.from(t)})),o)}(r,t,o)},length:o[t]}})),s)}}).call(this,r(0).Buffer)},function(e,t,r){"use strict" e.exports={SHA1:20,SHA256:32,SHA512:64}},function(e,t,r){"use strict" var n=r(382) e.exports=function(e,t){n.generateEphmeralKeyPair(e,t)}},function(e,t,r){"use strict";(function(e){var n=r(88),i=r(87),o=r(89).bignum,a=r(151),s=a.toBase64,u=a.toBn,l={"P-256":256,"P-384":384,"P-521":521} t.generateEphmeralKeyPair=function(t,r){i(n.subtle.generateKey({name:"ECDH",namedCurve:t},!0,["deriveBits"]).then((function(r){var a=function(a,u,c){var h "function"==typeof u&&(c=u,u=void 0),h=u?n.subtle.importKey("jwk",function(e,t){var r=f(e,t.public) return r.d=s(new o(t.private)),r}(t,u),{name:"ECDH",namedCurve:t},!1,["deriveBits"]):Promise.resolve(r.privateKey) var d=Promise.all([n.subtle.importKey("jwk",f(t,a),{name:"ECDH",namedCurve:t},!1,[]),h]) i(d.then((function(e){return n.subtle.deriveBits({name:"ECDH",namedCurve:t,public:e[0]},e[1],l[t])})).then((function(t){return e.from(t)})),c)} return n.subtle.exportKey("jwk",r.publicKey).then((function(t){return{key:(r=t,n=c[r.crv],e.concat([e.from([4]),u(r.x).toArrayLike(e,"be",n),u(r.y).toArrayLike(e,"be",n)],1+2*n)),genSharedKey:a} var r,n}))})),r)} var c={"P-256":32,"P-384":48,"P-521":66} function f(t,r){var n=c[t] if(!r.slice(0,1).equals(e.from([4])))throw new Error("Invalid key format") var i=new o(r.slice(1,n+1)),a=new o(r.slice(1+n)) return{kty:"EC",crv:t,x:s(i,n),y:s(a,n),ext:!0}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict" ;/* object-assign (c) Sindre Sorhus @license MIT */var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined") return Object(e)}e.exports=function(){try{if(!Object.assign)return!1 var e=new String("abc") if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1 for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1 var n={} return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,s,u=a(e),l=1;l0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head} 0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"" for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data return r},t.concat=function(e){if(0===this.length)return i.alloc(0) for(var t,r,n,o=i.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,n=s,i.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next return o},t.consume=function(e,t){var r return ei.length?i.length:e if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o)) break}++r}return this.length-=r,n},t._getBuffer=function(e){var t=i.allocUnsafe(e),r=this.head,n=1 for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(a)) break}++n}return this.length-=n,t},t[a]=function(e,t){return o(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(l),o||(a.forEach(l),i(n))}))})) return t.reduce(c)}},function(e,t){e.exports=function e(t,r){if(t&&r)return e(t)(r) if("function"!=typeof t)throw new TypeError("need wrapper function") return Object.keys(t).forEach((function(e){n[e]=t[e]})),n function n(){for(var e=new Array(arguments.length),r=0;r-1&&e%1==0&&e0?(this.internalSourceCallbacks.shift()(null,e),r()):(this.input.push(e),this.writeCallbacks.push(r))}},{key:"_internalSource",value:function(e,t){if(e)return this.writeCallbacks.length>0&&this.writeCallbacks.shift()(e instanceof Error?e:new Error("Aborted")),t(e) this.input.length>0?(t(null,this.input.shift()),this.writeCallbacks.shift()()):this.internalSourceCallbacks.push(t)}},{key:"_final",value:function(e){this.internalSourceCallbacks.length>0&&this.internalSourceCallbacks.shift()(!0),e()}},{key:"_destroy",value:function(e,t){!this._readableState.ended&&this.source&&this.source(!0,(function(){})),this.internalSourceCallbacks.length>0&&this.internalSourceCallbacks.shift()(e),t(e)}}])&&i(r.prototype,u),t}(r(436).Duplex) function l(e,t,r){return e&&"object"===n(e)&&(t=(e=e.source).sink),new u(e,t,Object.assign({readableObjectMode:!0,writableObjectMode:!0},r))}e.exports={duplex:l,readable:function(e,t){return l(e,null,t)},writeable:function(e,t){return l(null,e,t)}}},function(e,t,r){(t=e.exports=r(183)).Stream=t,t.Readable=t,t.Writable=r(187),t.Duplex=r(37),t.Transform=r(188),t.PassThrough=r(442),t.finished=r(106),t.pipeline=r(443)},,function(e,t,r){"use strict" function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=r(0).Buffer,o=r(439).inspect,a=o&&o.custom||"inspect" e.exports=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype return t.push=function(e){var t={data:e,next:null} this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head} 0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"" for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data return r},t.concat=function(e){if(0===this.length)return i.alloc(0) for(var t,r,n,o=i.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,n=s,i.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next return o},t.consume=function(e,t){var r return ei.length?i.length:e if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o)) break}++r}return this.length-=r,n},t._getBuffer=function(e){var t=i.allocUnsafe(e),r=this.head,n=1 for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(a)) break}++n}return this.length-=n,t},t[a]=function(e,t){return o(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(l),o||(a.forEach(l),i(n))}))})) return t.reduce(c)}},function(e,t,r){"use strict" var n=r(53),i=r(35) e.exports=function(e){return function(t){return(t=t||{}).converter=i,n(e,"add")(t)}}},function(e,t,r){"use strict" var n=r(53),i=r(35),o=r(28) e.exports=function(e){return function(t){return(t=t||{}).converter=i,o(n(e,"add")({qs:t}))}}},function(e,t){e.exports=function(e){!function t(){var r=!0,n=!1 do{n=!0,r=!1,e.call(this,(function(){n?r=!0:t()})),n=!1}while(r)}()}},function(e,t,r){"use strict" var n=r(54),i=r(1),o=r(108),a=r(35) e.exports=function(e){var t=o(e,"add") return i((function(e,r,i){return"function"==typeof r&&void 0===i&&(i=r,r={}),"function"==typeof r&&"function"==typeof i&&(i=r,r={}),n?"string"!=typeof e?i(new Error('"path" must be a string')):void t(e,{qs:r,converter:a},i):i(new Error("fsAdd does not work in the browser"))}))}},function(e,t,r){"use strict" var n=r(1),i=r(109).URL,o=r(190).getRequest,a=r(108),s=r(35) e.exports=function(e){var t=a(e,"add") return n((function(e,r,n){if("function"==typeof r&&void 0===n&&(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),!u(e))return n(new Error('"url" param must be an http(s) url')) l(e,r,t,n)}))} var u=function(e){return"string"==typeof e&&e.startsWith("http")},l=function e(t,r,n,a){var l=new i(t),c=o(l,(function(t){if(t.statusCode>=400)return a(new Error("Failed to download with ".concat(t.statusCode))) var i=t.headers.location if(t.statusCode>=300&&t.statusCode<400&&i){if(!u(i))return a(new Error("redirection url must be an http(s) url")) e(i,r,n,a)}else{var o={qs:r,converter:s},c=decodeURIComponent(l.pathname.split("/").pop()) n({content:t,path:c},o,a)}})) c.once("error",a),c.end()}},function(e,t,r){"use strict" var n=r(189),i=n.URLWithLegacySupport,o=n.format e.exports=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0,s=r.protocol?r.protocol.replace(":",""):"http" s=(n[s]||a||s)+":" try{t=new i(e)}catch(e){t={}}var u=Object.assign({},r,{protocol:s||t.protocol,host:r.host||t.host}) return new i(e,o(u)).toString()}},function(e,t,r){(function(t){var n=r(451),i=r(192),o=r(459),a=self.URL,s=function(e,r){"string"==typeof e?((e=new a(e,self.location.protocol+"//"+self.location.host)).path=e.pathname+e.search,e.auth=e.username&&e.password?e.username+":"+e.password:null):e=Object.assign({},e) var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||i,s=e.hostname||e.host,u=e.port,l=e.path||"/" s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?o+"//"+s:"")+(u?":"+u:"")+l,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{} var c=new n(e) return r&&c.on("response",r),c},u=function(){} u.defaultMaxSockets=4,e.exports={Agent:u,ClientRequest:n,IncomingMessage:i,METHODS:["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"],STATUS_CODES:o,get:function(e,t){var r=s(e,t) return r.end(),r},globalAgent:new u,request:s,maxHeaderSize:"8KB"}}).call(this,r(4))},function(e,t,r){(function(t){var n=r(191),i=r(2),o=r(192),a=r(193),s=self.fetch,u=e.exports=function(e){var r=this a.Writable.call(this),this._opts=e,this._body=[],this._headers={},e.auth&&this.setHeader("Authorization","Basic "+t.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){r.setHeader(t,e.headers[t])})),this._mode="fetch",this._fetchTimer=null,this.on("finish",(function(){return r._onFinish()}))} i(u,a.Writable),u.prototype.setHeader=function(e,t){var r=e.toLowerCase();-1===l.indexOf(r)&&(this._headers[r]=t)},u.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()] return t?t.value:null},u.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},u.prototype._onFinish=function(){var e=this if(!this._destroyed){var t=this._opts,r=this._headers,i=null "GET"!==t.method&&"HEAD"!==t.method&&(i=new Blob(this._body,{type:(r["content-type"]||{}).value||""})) var o=null if(n.abortController){var a=new AbortController o=a.signal,this._fetchAbortController=a,"requestTimeout"in t&&0!==t.requestTimeout&&(this._fetchTimer=setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),t.requestTimeout))}s(this._opts.url,{method:this._opts.method,headers:this._headers,body:i||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:o}).then((function(t){e._fetchResponse=t,e._connect()}),(function(t){clearTimeout(e._fetchTimer),e._destroyed||e.emit("error",t)}))}},u.prototype._connect=function(){var e=this this._destroyed||(this._response=new o(this._fetchResponse,this._mode,this._fetchTimer),this._response.on("error",(function(t){return e.emit("error",t)})),this.emit("response",this._response))},u.prototype._write=function(e,t,r){this._body.push(e),r()},u.prototype.abort=u.prototype.destroy=function(){this._destroyed=!0,clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},u.prototype.end=function(e,t,r){"function"==typeof e&&(r=e,e=void 0),a.Writable.prototype.end.call(this,e,t,r)},u.prototype.flushHeaders=function(){},u.prototype.setTimeout=function(){},u.prototype.setNoDelay=function(){},u.prototype.setSocketKeepAlive=function(){} var l=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(0).Buffer)},,function(e,t,r){"use strict" function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=r(0).Buffer,o=r(454).inspect,a=o&&o.custom||"inspect" e.exports=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype return t.push=function(e){var t={data:e,next:null} this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head} 0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"" for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data return r},t.concat=function(e){if(0===this.length)return i.alloc(0) for(var t,r,n,o=i.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,n=s,i.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next return o},t.consume=function(e,t){var r return ei.length?i.length:e if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o)) break}++r}return this.length-=r,n},t._getBuffer=function(e){var t=i.allocUnsafe(e),r=this.head,n=1 for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(a)) break}++n}return this.length-=n,t},t[a]=function(e,t){return o(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(l),o||(a.forEach(l),i(n))}))})) return t.reduce(c)}},function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(e,t,r){"use strict" var n=r(1),i=r(20),o=r(16),a=r(200) e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}) try{t=i(t)}catch(e){if(!o.ipfsPath(t))return n(e)}var s={offset:r.offset,length:r.length} e({path:"cat",args:t,buffer:r.buffer,qs:s},(function(e,t){if(e)return n(e) t.pipe(a((function(e,t){if(e)return n(e) n(null,t)})))}))}))}},function(e,t,r){(t=e.exports=r(201)).Stream=t,t.Readable=t,t.Writable=r(205),t.Duplex=r(41),t.Transform=r(206),t.PassThrough=r(467),t.finished=r(111),t.pipeline=r(468)},,function(e,t,r){"use strict" function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=r(0).Buffer,o=r(464).inspect,a=o&&o.custom||"inspect" e.exports=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype return t.push=function(e){var t={data:e,next:null} this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head} 0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"" for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data return r},t.concat=function(e){if(0===this.length)return i.alloc(0) for(var t,r,n,o=i.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,n=s,i.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next return o},t.consume=function(e,t){var r return ei.length?i.length:e if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o)) break}++r}return this.length-=r,n},t._getBuffer=function(e){var t=i.allocUnsafe(e),r=this.head,n=1 for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(a)) break}++n}return this.length-=n,t},t[a]=function(e,t){return o(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(l),o||(a.forEach(l),i(n))}))})) return t.reduce(c)}},function(e,t,r){"use strict" var n=r(20),i=r(16),o=r(12),a=r(15) e.exports=function(e){return function(t,r){r=r||{} var s=new o.PassThrough try{t=n(t)}catch(e){if(!i.ipfsPath(t))return s.destroy(e)}var u={offset:r.offset,length:r.length} return e({path:"cat",args:t,buffer:r.buffer,qs:u},(function(e,t){if(e)return s.destroy(e) a(t,s)})),s}}},,function(e,t,r){"use strict" var n=r(20),i=r(16),o=r(28),a=r(42) e.exports=function(e){return function(t,r){r=r||{} var s=a.source() try{t=n(t)}catch(e){if(!i.ipfsPath(t))return s.end(e)}var u={offset:r.offset,length:r.length} return e({path:"cat",args:t,buffer:r.buffer,qs:u},(function(e,t){if(e)return s.end(e) s.resolve(o(t))})),s}}},function(e,t){e.exports=function(){var e,t,r,n,i function o(o){return i?i(o):(e=o,function(e,i){t?t(e,i):(n=e,r=i)})}return o.resolve=function(o){if(i)throw new Error("already resolved") if(!(i=o))throw new Error("resolve *must* be passed a transform stream") e&&(t=i(e),r&&t(n,r))},o}},function(e,t,r){var n=r(207),i=r(208) e.exports=function(){var e=n(),t=i() return{source:e,sink:t,resolve:function(r){e.resolve(r.source),t.resolve(r.sink)}}}},function(e,t,r){"use strict" var n=r(1),i=r(20),o=r(113),a=r(52),s=r(216),u=r(16) e.exports=function(e){return n((function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}) try{t=i(t)}catch(e){if(!u.ipfsPath(t))return n(e)}var l={path:"get",args:t,qs:r} e.andTransform(l,o,(function(e,t){if(e)return n(e) var r=[] t.pipe(s.obj((function(e,t,n){e.content?e.content.pipe(a((function(t){r.push({path:e.path,content:t})}))):r.push(e),n()}),(function(){return n(null,r)})))}))}))}},function(e,t,r){t.extract=r(476),t.pack=r(484)},function(e,t,r){var n=r(70),i=r(200),o=r(209),a=r(71).Writable,s=r(71).PassThrough,u=function(){},l=function(e){return(e&=511)&&512-e},c=function(e,t){this._parent=e,this.offset=t,s.call(this)} n.inherits(c,s),c.prototype.destroy=function(e){this._parent.destroy(e)} var f=function e(t){if(!(this instanceof e))return new e(t) a.call(this,t),t=t||{},this._offset=0,this._buffer=i(),this._missing=0,this._partial=!1,this._onparse=u,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null var r=this,n=r._buffer,s=function(){r._continue()},f=function(e){if(r._locked=!1,e)return r.destroy(e) r._stream||s()},h=function(){r._stream=null var e=l(r._header.size) e?r._parse(e,d):r._parse(512,v),r._locked||s()},d=function(){r._buffer.consume(l(r._header.size)),r._parse(512,v),s()},p=function(){var e=r._header.size r._paxGlobal=o.decodePax(n.slice(0,e)),n.consume(e),h()},m=function(){var e=r._header.size r._pax=o.decodePax(n.slice(0,e)),r._paxGlobal&&(r._pax=Object.assign({},r._paxGlobal,r._pax)),n.consume(e),h()},y=function(){var e=r._header.size this._gnuLongPath=o.decodeLongPath(n.slice(0,e),t.filenameEncoding),n.consume(e),h()},g=function(){var e=r._header.size this._gnuLongLinkPath=o.decodeLongPath(n.slice(0,e),t.filenameEncoding),n.consume(e),h()},v=function e(){var i,a=r._offset try{i=r._header=o.decode(n.slice(0,512),t.filenameEncoding)}catch(e){r.emit("error",e)}return n.consume(512),i?"gnu-long-path"===i.type?(r._parse(i.size,y),void s()):"gnu-long-link-path"===i.type?(r._parse(i.size,g),void s()):"pax-global-header"===i.type?(r._parse(i.size,p),void s()):"pax-header"===i.type?(r._parse(i.size,m),void s()):(r._gnuLongPath&&(i.name=r._gnuLongPath,r._gnuLongPath=null),r._gnuLongLinkPath&&(i.linkname=r._gnuLongLinkPath,r._gnuLongLinkPath=null),r._pax&&(r._header=i=function(e,t){return t.path&&(e.name=t.path),t.linkpath&&(e.linkname=t.linkpath),t.size&&(e.size=parseInt(t.size,10)),e.pax=t,e}(i,r._pax),r._pax=null),r._locked=!0,i.size&&"directory"!==i.type?(r._stream=new c(r,a),r.emit("entry",i,r._stream,f),r._parse(i.size,h),void s()):(r._parse(512,e),void r.emit("entry",i,function(e,t){var r=new c(e,t) return r.end(),r}(r,a),f))):(r._parse(512,e),void s())} this._onheader=v,this._parse(512,v)} n.inherits(f,a),f.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.emit("close"))},f.prototype._parse=function(e,t){this._destroyed||(this._offset+=e,this._missing=e,t===this._onheader&&(this._partial=!1),this._onparse=t)},f.prototype._continue=function(){if(!this._destroyed){var e=this._cb this._cb=u,this._overflow?this._write(this._overflow,void 0,e):e()}},f.prototype._write=function(e,t,r){if(!this._destroyed){var n=this._stream,i=this._buffer,o=this._missing if(e.length&&(this._partial=!0),e.lengtho&&(a=e.slice(o),e=e.slice(0,o)),n?n.end(e):i.append(e),this._overflow=a,this._onparse()}},f.prototype._final=function(e){if(this._partial)return this.destroy(new Error("Unexpected end of data")) e()},e.exports=f},,function(e,t,r){"use strict" function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var i=r(0).Buffer,o=r(479).inspect,a=o&&o.custom||"inspect" e.exports=function(){function e(){this.head=null,this.tail=null,this.length=0}var t=e.prototype return t.push=function(e){var t={data:e,next:null} this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},t.unshift=function(e){var t={data:e,next:this.head} 0===this.length&&(this.tail=t),this.head=t,++this.length},t.shift=function(){if(0!==this.length){var e=this.head.data return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},t.clear=function(){this.head=this.tail=null,this.length=0},t.join=function(e){if(0===this.length)return"" for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data return r},t.concat=function(e){if(0===this.length)return i.alloc(0) for(var t,r,n,o=i.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,r=o,n=s,i.prototype.copy.call(t,r,n),s+=a.data.length,a=a.next return o},t.consume=function(e,t){var r return ei.length?i.length:e if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o)) break}++r}return this.length-=r,n},t._getBuffer=function(e){var t=i.allocUnsafe(e),r=this.head,n=1 for(r.data.copy(t),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=o.slice(a)) break}++n}return this.length-=n,t},t[a]=function(e,t){return o(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(l),o||(a.forEach(l),i(n))}))})) return t.reduce(c)}},function(e,t,r){(function(t,n){var i=r(485),o=r(112),a=r(2),s=t.alloc,u=r(71).Readable,l=r(71).Writable,c=r(10).StringDecoder,f=r(209),h=parseInt("755",8),d=parseInt("644",8),p=s(1024),m=function(){},y=function(e,t){(t&=511)&&e.push(p.slice(0,512-t))},g=function(e){l.call(this),this.written=0,this._to=e,this._destroyed=!1} a(g,l),g.prototype._write=function(e,t,r){if(this.written+=e.length,this._to.push(e))return r() this._to._drain=r},g.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))} var v=function(){l.call(this),this.linkname="",this._decoder=new c("utf-8"),this._destroyed=!1} a(v,l),v.prototype._write=function(e,t,r){this.linkname+=this._decoder.write(e),r()},v.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))} var b=function(){l.call(this),this._destroyed=!1} a(b,l),b.prototype._write=function(e,t,r){r(new Error("No body allowed for this entry"))},b.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))} var w=function e(t){if(!(this instanceof e))return new e(t) u.call(this,t),this._drain=m,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null} a(w,u),w.prototype.entry=function(e,r,a){if(this._stream)throw new Error("already piping an entry") if(!this._finalized&&!this._destroyed){"function"==typeof r&&(a=r,r=null),a||(a=m) var s=this if(e.size&&"symlink"!==e.type||(e.size=0),e.type||(e.type=function(e){switch(e&i.S_IFMT){case i.S_IFBLK:return"block-device" case i.S_IFCHR:return"character-device" case i.S_IFDIR:return"directory" case i.S_IFIFO:return"fifo" case i.S_IFLNK:return"symlink"}return"file"}(e.mode)),e.mode||(e.mode="directory"===e.type?h:d),e.uid||(e.uid=0),e.gid||(e.gid=0),e.mtime||(e.mtime=new Date),"string"==typeof r&&(r=t.from(r)),t.isBuffer(r))return e.size=r.length,this._encode(e),this.push(r),y(s,e.size),n.nextTick(a),new b if("symlink"===e.type&&!e.linkname){var u=new v return o(u,(function(t){if(t)return s.destroy(),a(t) e.linkname=u.linkname,s._encode(e),a()})),u}if(this._encode(e),"file"!==e.type&&"contiguous-file"!==e.type)return n.nextTick(a),new b var l=new g(this) return this._stream=l,o(l,(function(t){return s._stream=null,t?(s.destroy(),a(t)):l.written!==e.size?(s.destroy(),a(new Error("size mismatch"))):(y(s,e.size),s._finalizing&&s.finalize(),void a())})),l}},w.prototype.finalize=function(){this._stream?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(p),this.push(null))},w.prototype.destroy=function(e){this._destroyed||(this._destroyed=!0,e&&this.emit("error",e),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())},w.prototype._encode=function(e){if(!e.pax){var t=f.encode(e) if(t)return void this.push(t)}this._encodePax(e)},w.prototype._encodePax=function(e){var t=f.encodePax({name:e.name,linkname:e.linkname,pax:e.pax}),r={name:"PaxHeader",mode:e.mode,uid:e.uid,gid:e.gid,size:t.length,mtime:e.mtime,type:"pax-header",linkname:e.linkname&&"PaxHeader",uname:e.uname,gname:e.gname,devmajor:e.devmajor,devminor:e.devminor} this.push(f.encode(r)),this.push(t),y(this,t.length),r.size=e.size,r.type=e.type,this.push(f.encode(r))},w.prototype._read=function(e){var t=this._drain this._drain=m,t()},e.exports=w}).call(this,r(0).Buffer,r(3))},function(e,t,r){e.exports=r(486)},function(e){e.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},function(e,t,r){"use strict" var n=r(20),i=r(113),o=r(16),a=r(12),s=r(15) e.exports=function(e){return function(t,r){r=r||{} var u=new a.PassThrough({objectMode:!0}) try{t=n(t)}catch(e){if(!o.ipfsPath(t))return u.destroy(e)}var l={path:"get",args:t,qs:r} return e.andTransform(l,i,(function(e,t){if(e)return u.destroy(e) s(t,u)})),u}}},function(e,t,r){"use strict" var n=r(20),i=r(113),o=r(16),a=r(107),s=r(217),u=r(28),l=r(42) e.exports=function(e){return function(t,r){r=r||{} var c=l.source() try{t=n(t)}catch(e){if(!o.ipfsPath(t))return c.end(e)}var f={path:"get",args:t,qs:r} return e.andTransform(f,i,(function(e,t){if(e)return c.end(e) c.resolve(a(u.source(t),s((function(e){var t=e.path,r=e.content return r?{path:t,content:u.source(r)}:e}))))})),c}}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){return e&&("string"==typeof e?function(t){return t[e]}:"object"===r(e)&&"function"==typeof e.exec?function(t){var r=e.exec(t) return r&&r[0]}:e)}},function(e,t,r){"use strict" var n=r(1),i=r(16),o=r(5),a=r(20) function s(e){switch(e.Type){case 1:case 5:return"dir" case 2:return"file" default:return"unknown"}}e.exports=function(e){var t=o(e) return n((function(e,r,n){"function"==typeof r&&(n=r,r={}) try{e=a(e)}catch(t){if(!i.ipfsPath(e))return n(t)}t({path:"ls",args:e,qs:r},(function(t,r){if(t)return n(t) var i=r.Objects return i?(i=i[0])?(i=i.Links,Array.isArray(i)?(i=i.map((function(t){return{name:t.Name,path:e+"/"+t.Name,size:t.Size,hash:t.Hash,type:s(t),depth:t.Depth||1}})),void n(null,i)):n(new Error("expected one array in results.Objects[0].Links"))):n(new Error("expected one array in results.Objects")):n(new Error("expected .Objects in results"))}))}))}},function(e){e.exports={_args:[["ipfs-http-client@30.1.4","/home/basti/src/kosmos/kredits/kredits-web"]],_development:!0,_from:"ipfs-http-client@30.1.4",_id:"ipfs-http-client@30.1.4",_inBundle:!1,_integrity:"sha512-ordvoPT3lAFL5qsvdYBeDGRP03gtbL6Jl+qJ9dztyhE7NJf2yhtnU3ZNqN1JMCcUK0qpGsDzX89t8dKQvI80Pw==",_location:"/ipfs-http-client",_phantomChildren:{"base64-js":"1.3.0",ieee754:"1.1.13",inherits:"2.0.3","json-stringify-safe":"5.0.1",split2:"3.1.1","util-deprecate":"1.0.2",yallist:"3.0.3"},_requested:{type:"version",registry:!0,raw:"ipfs-http-client@30.1.4",name:"ipfs-http-client",escapedName:"ipfs-http-client",rawSpec:"30.1.4",saveSpec:null,fetchSpec:"30.1.4"},_requiredBy:["/kredits-contracts"],_resolved:"https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-30.1.4.tgz",_spec:"30.1.4",_where:"/home/basti/src/kosmos/kredits/kredits-web",browser:{glob:!1,fs:!1,stream:"readable-stream"},bugs:{url:"https://github.com/ipfs/js-ipfs-http-client/issues"},contributors:[{name:"Alan Shaw",email:"alan.shaw@protocol.ai"},{name:"Alan Shaw",email:"alan@tableflip.io"},{name:"Alex Mingoia",email:"talk@alexmingoia.com"},{name:"Alex Potsides",email:"alex@achingbrain.net"},{name:"Antonio Tenorio-Fornés",email:"antoniotenorio@ucm.es"},{name:"Bruno Barbieri",email:"bbarbieri@delivery.com"},{name:"Clemo",email:"flipflopsimsommer@users.noreply.github.com"},{name:"Connor Keenan",email:"ckeenan89@gmail.com"},{name:"Danny",email:"dannyid@protonmail.com"},{name:"David Braun",email:"David.Braun@Toptal.com"},{name:"David Dias",email:"daviddias.p@gmail.com"},{name:"Dietrich Ayala",email:"autonome@gmail.com"},{name:"Diogo Silva",email:"fsdiogo@gmail.com"},{name:"Dmitriy Ryajov",email:"dryajov@gmail.com"},{name:"Dmitry Nikulin",email:"dmitr-nikulin@mail.ru"},{name:"Donatas Stundys",email:"donatas.stundys@necolt.com"},{name:"Fil",email:"fil@rezo.net"},{name:"Filip Š",email:"filip.stamcar@hotmail.com"},{name:"Francisco Baio Dias",email:"xicombd@gmail.com"},{name:"Friedel Ziegelmayer",email:"dignifiedquire@gmail.com"},{name:"Gar",email:"gar+gh@danger.computer"},{name:"Gavin McDermott",email:"gavinmcdermott@gmail.com"},{name:"Greenkeeper",email:"support@greenkeeper.io"},{name:"Haad",email:"haadcode@users.noreply.github.com"},{name:"Harlan T Wood",email:"harlantwood@users.noreply.github.com"},{name:"Harlan T Wood",email:"code@harlantwood.net"},{name:"Henrique Dias",email:"hacdias@gmail.com"},{name:"Holodisc",email:"holodiscent@gmail.com"},{name:"Hugo Dias",email:"mail@hugodias.me"},{name:"JGAntunes",email:"j.goncalo.antunes@gmail.com"},{name:"Jacob Heun",email:"jacobheun@gmail.com"},{name:"James Halliday",email:"substack@gmail.com"},{name:"Jason Carver",email:"jacarver@linkedin.com"},{name:"Jason Papakostas",email:"vith@users.noreply.github.com"},{name:"Jeff Downie",email:"JeffDownie@users.noreply.github.com"},{name:"Jeromy",email:"why@ipfs.io"},{name:"Jeromy",email:"jeromyj@gmail.com"},{name:"Joe Turgeon",email:"arithmetric@gmail.com"},{name:"Jonathan",email:"jkrone@vt.edu"},{name:"Juan Batiz-Benet",email:"juan@benet.ai"},{name:"Kevin Wang",email:"kevin@fossa.io"},{name:"Kristoffer Ström",email:"kristoffer@rymdkoloni.se"},{name:"Marcin Rataj",email:"lidel@lidel.org"},{name:"Matt Bell",email:"mappum@gmail.com"},{name:"Maxime Lathuilière",email:"k@maxlath.eu"},{name:"Michael Muré",email:"batolettre@gmail.com"},{name:"Mikeal Rogers",email:"mikeal.rogers@gmail.com"},{name:"Mitar",email:"mitar.git@tnode.com"},{name:"Mithgol",email:"getgit@mithgol.ru"},{name:"Mohamed Abdulaziz",email:"mohamed@mohamedabdulaziz.com"},{name:"Nitin Patel",email:"31539366+niinpatel@users.noreply.github.com"},{name:"Nuno Nogueira",email:"nunofmn@gmail.com"},{name:"Níckolas Goline",email:"nickolas.goline@gmail.com"},{name:"Oli Evans",email:"oli@tableflip.io"},{name:"Orie Steele",email:"orie@ohs.io"},{name:"Pedro Teixeira",email:"i@pgte.me"},{name:"Pete Thomas",email:"pete@xminusone.net"},{name:"Richard Littauer",email:"richard.littauer@gmail.com"},{name:"Richard Schneider",email:"makaretu@gmail.com"},{name:"Roman Khafizianov",email:"requilence@gmail.com"},{name:"SeungWon",email:"ksw3894@gmail.com"},{name:"Stephen Whitmore",email:"stephen.whitmore@gmail.com"},{name:"Tara Vancil",email:"tbvanc@gmail.com"},{name:"Travis Person",email:"travis@protocol.ai"},{name:"Travis Person",email:"travis.person@gmail.com"},{name:"Vasco Santos",email:"vasco.santos@ua.pt"},{name:"Vasco Santos",email:"vasco.santos@moxy.studio"},{name:"Victor Bjelkholm",email:"victor@typeform.com"},{name:"Volker Mische",email:"volker.mische@gmail.com"},{name:"Zhiyuan Lin",email:"edsgerlin@gmail.com"},{name:"dmitriy ryajov",email:"dryajov@dmitriys-MacBook-Pro.local"},{name:"elsehow",email:"yes@cosmopol.is"},{name:"ethers",email:"ethereum@outlook.com"},{name:"haad",email:"haad@headbanggames.com"},{name:"kumavis",email:"kumavis@users.noreply.github.com"},{name:"leekt216",email:"leekt216@gmail.com"},{name:"nginnever",email:"ginneversource@gmail.com"},{name:"noah the goodra",email:"peterpan0413@live.com"},{name:"priecint",email:"tp-dev@seznam.cz"},{name:"samuli",email:"samuli@nugg.ad"},{name:"shunkin",email:"hiyoko.san.ipod@gmail.com"},{name:"victorbjelkholm",email:"victorbjelkholm@gmail.com"},{name:"Łukasz Magiera",email:"magik6k@users.noreply.github.com"},{name:"Łukasz Magiera",email:"magik6k@gmail.com"}],dependencies:{async:"^2.6.1","bignumber.js":"^8.0.2",bl:"^3.0.0",bs58:"^4.0.1",buffer:"^5.2.1",cids:"~0.5.5","concat-stream":"github:hugomrdias/concat-stream#feat/smaller",debug:"^4.1.0","detect-node":"^2.0.4","end-of-stream":"^1.4.1","err-code":"^1.1.2",flatmap:"0.0.3",glob:"^7.1.3","ipfs-block":"~0.8.0","ipld-dag-cbor":"~0.13.1","ipld-dag-pb":"~0.15.3","is-ipfs":"~0.6.0","is-pull-stream":"0.0.0","is-stream":"^1.1.0","iso-stream-http":"~0.1.2","iso-url":"~0.4.6","just-kebab-case":"^1.1.0","just-map-keys":"^1.1.0","lru-cache":"^5.1.1",multiaddr:"^6.0.6",multibase:"~0.6.0",multicodec:"~0.5.0",multihashes:"~0.4.14",ndjson:"github:hugomrdias/ndjson#feat/readable-stream3",once:"^1.4.0","peer-id":"~0.12.2","peer-info":"~0.15.1","promisify-es6":"^1.0.3","pull-defer":"~0.2.3","pull-stream":"^3.6.9","pull-to-stream":"~0.1.1",pump:"^3.0.0",qs:"^6.5.2","readable-stream":"^3.1.1","stream-to-pull-stream":"^1.7.2","tar-stream":"^2.0.1",through2:"^3.0.1"},description:"A client library for the IPFS HTTP API",devDependencies:{aegir:"^18.2.2","browser-process-platform":"~0.1.1",chai:"^4.2.0","cross-env":"^5.2.0","dirty-chai":"^2.0.1","eslint-plugin-react":"^7.11.1","go-ipfs-dep":"0.4.19","interface-ipfs-core":"~0.99.0","ipfsd-ctl":"~0.42.0",nock:"^10.0.2","stream-equal":"^1.1.1"},engines:{node:">=10.0.0",npm:">=3.0.0"},homepage:"https://github.com/ipfs/js-ipfs-http-client",keywords:["ipfs"],leadMaintainer:"Alan Shaw ",license:"MIT",main:"src/index.js",name:"ipfs-http-client",repository:{type:"git",url:"git+https://github.com/ipfs/js-ipfs-http-client.git"},scripts:{build:"aegir build",coverage:"npx nyc -r html npm run test:node -- --bail",lint:"aegir lint",release:"aegir release ","release-major":"aegir release --type major ","release-minor":"aegir release --type minor ",test:"aegir test","test:browser":"aegir test -t browser","test:node":"aegir test -t node","test:webworker":"aegir test -t webworker"},version:"30.1.4"}},function(e,t,r){"use strict" var n=r(493),i=r(494),o=r(220) e.exports={formats:o,parse:i,stringify:n}},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(115),o=r(220),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,l=Array.prototype.push,c=function(e,t){l.apply(e,u(t)?t:[t])},f=Date.prototype.toISOString,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,formatter:o.formatters[o.default],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,r,n,o,a,s,l,f,d,p,m,y,g){var v=t if("function"==typeof l?v=l(r,v):v instanceof Date?v=p(v):"comma"===n&&u(v)&&(v=v.join(",")),null===v){if(o)return s&&!y?s(r,h.encoder,g):r v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||i.isBuffer(v))return s?[m(y?r:s(r,h.encoder,g))+"="+m(s(v,h.encoder,g))]:[m(r)+"="+m(String(v))] var b,w=[] if(void 0===v)return w if(u(l))b=l else{var _=Object.keys(v) b=f?_.sort(f):_}for(var S=0;S0?b+v:""}},function(e,t,r){"use strict" var n=r(115),i=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},s=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=/(\[[^[\]]*])/.exec(n),s=a?n.slice(0,a.index):n,u=[] if(s){if(!r.plainObjects&&i.call(Object.prototype,s)&&!r.allowPrototypes)return u.push(s)}for(var l=0;null!==(a=o.exec(n))&&l=0;--i){var o,a=e[i] if("[]"===a&&r.parseArrays)o=[].concat(n) else{o=r.plainObjects?Object.create(null):{} var s="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(s,10) r.parseArrays||""!==s?!isNaN(u)&&a!==s&&String(u)===s&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(o=[])[u]=n:o[s]=n:o={0:n}}n=o}return n}(u,t,r)}} e.exports=function(e,t){var r=function(e){if(!e)return o if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.") if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined") var t=void 0===e.charset?o.charset:e.charset return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth?e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t) if(""===e||null==e)return r.plainObjects?Object.create(null):{} for(var u="string"==typeof e?function(e,t){var r,s={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,c=u.split(t.delimiter,l),f=-1,h=t.charset if(t.charsetSentinel)for(r=0;r-1&&(p=p.split(",")),i.call(s,d)?s[d]=n.combine(s[d],p):s[d]=p}return s}(e,r):e,l=r.plainObjects?Object.create(null):{},c=Object.keys(u),f=0;fthis.maxLength,this.overflow&&!this.skipOverflow)return r(new Error("maximum buffer reached")) r()}function l(e){this[a]+=this[s].end(),this[a]&&c(this,this.mapper(this[a])),e()}function c(e,t){void 0!==t&&e.push(t)}function f(e){return e}e.exports=function(e,t,r){switch(e=e||/\r?\n/,t=t||f,r=r||{},arguments.length){case 1:"function"==typeof e?(t=e,e=/\r?\n/):"object"!==n(e)||e instanceof RegExp||(r=e,e=/\r?\n/) break case 2:"function"==typeof e?(r=t,t=e,e=/\r?\n/):"object"===n(t)&&(r=t,t=f)}(r=Object.assign({},r)).transform=u,r.flush=l,r.readableObjectMode=!0 var c=new i(r) return c[a]="",c[s]=new o("utf8"),c.matcher=e,c.mapper=t,c.maxLength=r.maxLength,c.skipOverflow=r.skipOverflow,c.overflow=!1,c}},function(e,t,r){(t=e.exports=r(221)).Stream=t,t.Readable=t,t.Writable=r(225),t.Duplex=r(46),t.Transform=r(226),t.PassThrough=r(502),t.finished=r(117),t.pipeline=r(503)},,function(e,t,r){"use strict" function n(e,t){var r=Object.keys(e) if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e) t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head} 0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"" for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0) for(var t,r,n,i=a.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,a.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next return i}},{key:"consume",value:function(e,t){var r return ei.length?i.length:e if(o===i.length?n+=i:n+=i.slice(0,e),0==(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o)) break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1 for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e if(i.copy(t,t.length-e,0,o),0==(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o)) break}++n}return this.length-=n,t}},{key:u,value:function(e,t){return s(this,function(e){for(var t=1;t0,(function(e){n||(n=e),e&&a.forEach(l),o||(a.forEach(l),i(n))}))})) return t.reduce(c)}},function(e,t){function r(e,t){var r=[],n=[] return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]"}),function(i,o){if(r.length>0){var a=r.indexOf(this) ~a?r.splice(a+1):r.push(this),~a?n.splice(a,1/0,i):n.push(i),~r.indexOf(o)&&(o=t.call(this,i,o))}else r.push(o) return null==e?o:e.call(this,i,o)}}(e.exports=function(e,t,n,i){return JSON.stringify(e,r(t,i),n)}).getSerialize=r},function(e,t,r){"use strict";(function(t){var n=r(23) e.exports=function(e,r){n(e,(function(e,n){if(e)return r(e) if(!n||0===n.length)return r() var i t.isBuffer(n)&&(n=n.toString()) try{i=JSON.parse(n)}catch(e){return r(e)}r(null,i)}))}}).call(this,r(0).Buffer)},function(e,t,r){(function(n){function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.log=function(){var e return"object"===("undefined"==typeof console?"undefined":i(console))&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var r="color: "+this.color t.splice(1,0,r,"color: inherit") var n=0,i=0 t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(i=n))})),t.splice(i,0,r)}},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=r(507)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,r(3))},function(e,t,r){function n(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t=1.5*r return Math.round(e/r)+" "+n+(i?"s":"")}e.exports=function(e,t){t=t||{} var u=r(e) if("string"===u&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e) if(t){var r=parseFloat(t[1]) switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r case"weeks":case"week":case"w":return 6048e5*r case"days":case"day":case"d":return r*a case"hours":case"hour":case"hrs":case"hr":case"h":return r*o case"minutes":case"minute":case"mins":case"min":case"m":return r*i case"seconds":case"second":case"secs":case"sec":case"s":return r*n case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r default:return}}}}(e) if("number"===u&&isFinite(e))return t.long?function(e){var t=Math.abs(e) return t>=a?s(e,t,a,"day"):t>=o?s(e,t,o,"hour"):t>=i?s(e,t,i,"minute"):t>=n?s(e,t,n,"second"):e+" ms"}(e):function(e){var t=Math.abs(e) return t>=a?Math.round(e/a)+"d":t>=o?Math.round(e/o)+"h":t>=i?Math.round(e/i)+"m":t>=n?Math.round(e/n)+"s":e+"ms"}(e) throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){"use strict" var n=r(5),i=r(12),o=r(16),a=r(20) function s(e){switch(e.Type){case 1:case 5:return"dir" case 2:return"file" default:return"unknown"}}e.exports=function(e){var t=n(e) return function(e,r,n){"function"==typeof r&&(n=r,r={}) try{e=a(e)}catch(t){if(!o.ipfsPath(e))return n(t)}var u=new i.PassThrough({objectMode:!0}) return t({path:"ls",args:e,qs:r},(function(t,r){if(t)return n(t) var i=r.Objects return i?(i=i[0])?(i=i.Links,Array.isArray(i)?((i=i.map((function(t){return{depth:1,name:t.Name,path:e+"/"+t.Name,size:t.Size,hash:t.Hash,type:s(t)}}))).forEach((function(e){return u.write(e)})),void u.end()):n(new Error("expected one array in results.Objects[0].Links"))):n(new Error("expected one array in results.Objects")):n(new Error("expected .Objects in results"))})),u}}},function(e,t,r){"use strict" var n=r(5),i=r(511),o=r(42),a=r(16),s=r(20) function u(e){switch(e.Type){case 1:case 5:return"dir" case 2:return"file" default:return"unknown"}}e.exports=function(e){var t=n(e) return function(e,r,n){"function"==typeof r&&(n=r,r={}) try{e=s(e)}catch(t){if(!a.ipfsPath(e))return n(t)}var l=o.source() return t({path:"ls",args:e,qs:r},(function(t,r){if(t)return n(t) var o=r.Objects return o?(o=o[0])?(o=o.Links,Array.isArray(o)?(o=o.map((function(t){return{depth:1,name:t.Name,path:e+"/"+t.Name,size:t.Size,hash:t.Hash,type:u(t)}})),void l.resolve(i(o))):n(new Error("expected one array in results.Objects[0].Links"))):n(new Error("expected one array in results.Objects")):n(new Error("expected .Objects in results"))})),l}}},function(e,t,r){"use strict" var n=r(512) e.exports=function(e,t){if(!e)return function(e,r){return e?n(r,e,t):r(!0)} Array.isArray(e)||(e=Object.keys(e).map((function(t){return e[t]}))) var r=0 return function(i,o){if(i)return n(o,i,t) r>=e.length?o(!0):o(null,e[r++])}}},function(e,t){e.exports=function(e,t,r){e(t),r&&r(!0===t?null:t)}},function(e,t,r){"use strict" var n=r(5) e.exports=function(e){var t=n(e) return{cp:r(514)(t),mkdir:r(515)(t),flush:r(516)(t),stat:r(517)(t),rm:r(520)(t),ls:r(521)(t),lsReadableStream:r(228)(t),lsPullStream:r(522)(t),read:r(523)(t),readReadableStream:r(524)(t),readPullStream:r(525)(t),write:r(526)(t),mv:r(527)(t)}}},function(e,t,r){"use strict" var n=r(1),i=r(227) e.exports=function(e){return n((function(){var t=i(Array.prototype.slice.call(arguments)),r=t.callback,n=t.sources,o=t.opts e({path:"files/cp",args:n,qs:o},(function(e){return r(e)}))}))}},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}),e({path:"files/mkdir",args:t,qs:r},(function(e){return n(e)}))}))}},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r){return"function"==typeof t&&(r=t,t="/"),e({path:"files/flush",args:t},(function(e){return r(e)}))}))}},function(e,t,r){"use strict" var n=r(1),i=r(518),o=r(519),a=function(e,t){t(null,{type:e.Type,blocks:e.Blocks,size:e.Size,hash:e.Hash,cumulativeSize:e.CumulativeSize,withLocality:e.WithLocality||!1,local:e.Local||void 0,sizeLocal:e.SizeLocal||void 0})} e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}),r=i(r,(function(e,t){return o(t)})),e.andTransform({path:"files/stat",args:t,qs:r},a,n)}))}},function(e,t){e.exports=function(e,t){for(var r={},n=Object.keys(e),i=n.length,o=0;o?@\[\]^_`{|}~]+/,n=/[A-Z\u00C0-\u00D6\u00D9-\u00DD]/g},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),e({path:"files/rm",args:t,qs:r},(function(e){return n(e)}))}))}},function(e,t,r){"use strict" var n=r(1),i=function(e,t){t(null,(e.Entries||[]).map((function(e){return{name:e.Name,type:e.Type,size:e.Size,hash:e.Hash}})))} e.exports=function(e){return n((function(t,r,n){return"function"==typeof r&&(n=r,r={}),"function"==typeof t&&(n=t,r={},t=null),e.andTransform({path:"files/ls",args:t,qs:r},i,n)}))}},function(e,t,r){"use strict" var n=r(28),i=r(228) e.exports=function(e){return function(t,r){return r=r||{},n.source(i(e)(t,r))}}},function(e,t,r){"use strict" var n=r(1),i=r(23) e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}),e.andTransform({path:"files/read",args:t,qs:r},i,n)}))}},function(e,t,r){"use strict" var n=r(12),i=r(15) e.exports=function(e){return function(t,r){r=r||{} var o=new n.PassThrough return e({path:"files/read",args:t,qs:r},(function(e,t){if(e)return o.destroy(e) i(t,o)})),o}}},function(e,t,r){"use strict" var n=r(28),i=r(42) e.exports=function(e){return function(t,r){r=r||{} var o=i.source() return e({path:"files/read",args:t,qs:r},(function(e,t){if(e)return o.abort(e) o.resolve(n(t))})),o}}},function(e,t,r){"use strict" var n=r(1),i=r(52),o=r(19),a=r(35),s=r(53) e.exports=function(e){var t=s(e,"files/write") return n((function(e,r,n,s){"function"!=typeof n||s||(s=n,n={}),"function"==typeof n&&"function"==typeof s&&(s=n,n={}) var u=[].concat(r),l=o(s),c=t({qs:{args:e,qs:n,converter:a}}),f=i((function(e){return l(null,e)})) c.once("error",l),c.pipe(f),u.forEach((function(e){return c.write(e)})),c.end()}))}},function(e,t,r){"use strict" var n=r(1),i=r(227) e.exports=function(e){return n((function(){var t=i(Array.prototype.slice.call(arguments)),r=t.callback,n=t.sources,o=t.opts e({path:"files/mv",args:n,qs:o},(function(e){return r(e)}))}))}},function(e,t,r){"use strict";(function(t){var n=r(1),i=r(230),o=r(6),a=r(23) e.exports=function(e){return n((function(r,n,s){var u "function"==typeof n&&(s=n,n={}) try{if(o.isCID(r))r=(u=r).toBaseEncodedString() else if(t.isBuffer(r))r=(u=new o(r)).toBaseEncodedString() else{if("string"!=typeof r)return s(new Error("invalid argument")) u=new o(r)}}catch(e){return s(e)}var l={path:"block/get",args:r,qs:n} e.andTransform(l,(function(e,r){t.isBuffer(e)?r(null,new i(e,u)):Array.isArray(e)&&0===e.length?r(null,new i(t.alloc(0),u)):a(e,(function(e,n){if(e)return r(e) n.length||(n=t.alloc(0)),r(null,new i(n,u))}))}),s)}))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){function n(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:this.multibaseName if(this.string&&e===this.multibaseName)return this.string var t=null if(0===this.version){if("base58btc"!==e)throw new Error("not supported with CIDv0, to support different bases, please migrate the instance do CIDv1, you can do that through cid.toV1()") t=i.toB58String(this.multihash)}else{if(1!==this.version)throw new Error("unsupported version") t=o.encode(e,this.buffer).toString()}return e===this.multibaseName&&Object.defineProperty(this,"string",{value:t}),t}},{key:"toString",value:function(e){return this.toBaseEncodedString(e)}},{key:"toJSON",value:function(){return{codec:this.codec,version:this.version,hash:this.multihash}}},{key:"equals",value:function(e){return this.codec===e.codec&&this.version===e.version&&this.multihash.equals(e.multihash)}},{key:"buffer",get:function(){var e=this._buffer if(!e){if(0===this.version)e=this.multihash else{if(1!==this.version)throw new Error("unsupported version") e=t.concat([t.from("01","hex"),a.getCodeVarint(this.codec),this.multihash])}Object.defineProperty(this,"_buffer",{value:e})}return e}},{key:"prefix",get:function(){return t.concat([t.from("0".concat(this.version),"hex"),a.getCodeVarint(this.codec),i.prefix(this.multihash)])}}])&&n(r.prototype,s),c&&n(r,c),e}(),{className:"CID",symbolName:"@ipld/js-cid/CID"}) l.codecs=s,e.exports=l}).call(this,r(0).Buffer)},function(e,t,r){"use strict";(function(t){var n=r(13),i={checkCIDComponents:function(e){if(null==e)return"null values are not valid CIDs" if(0!==e.version&&1!==e.version)return"Invalid version, must be a number equal to 1 or 0" if("string"!=typeof e.codec)return"codec must be string" if(0===e.version){if("dag-pb"!==e.codec)return"codec must be 'dag-pb' for CIDv0" if("base58btc"!==e.multibaseName)return"multibaseName must be 'base58btc' for CIDv0"}if(!t.isBuffer(e.multihash))return"multihash must be a Buffer" try{n.validate(e.multihash)}catch(e){var r=e.message return r||(r="Multihash validation failed"),r}}} e.exports=i}).call(this,r(0).Buffer)},function(e,t,r){"use strict" var n=r(1),i=r(6),o=r(13) e.exports=function(e){return n((function(t,r,n){t&&i.isCID(t)&&(t=o.toB58String(t.multihash)),"function"==typeof r&&(n=r,r={}) var a={path:"block/stat",args:t,qs:r} e.andTransform(a,(function(e,t){t(null,{key:e.Key,size:e.Size})}),n)}))}},function(e,t,r){"use strict";(function(t){var n=r(1),i=r(230),o=r(6),a=r(13),s=r(47) e.exports=function(e){var r=s(e,"block/put") return n((function(e,n,s){if("function"==typeof n&&(s=n,n={}),n=n||{},Array.isArray(e))return s(new Error("block.put accepts only one block")) if(t.isBuffer(e)&&(e={data:e}),!e||!e.data)return s(new Error("invalid block arg")) var u={} if(e.cid||n.cid){var l try{l=new o(e.cid||n.cid)}catch(e){return s(e)}var c=a.decode(l.multihash),f=c.name,h=c.length u.format=l.codec,u.mhtype=f,u.mhlen=h,u.version=l.version}else n.format&&(u.format=n.format),n.mhtype&&(u.mhtype=n.mhtype),n.mhlen&&(u.mhlen=n.mhlen),null!=n.version&&(u.version=n.version) r(e.data,{qs:u},(function(t,n){if(t)return"dag-pb"===u.format||"dag-cbor"===u.format?(u.format="dag-pb"===u.format?"protobuf":"cbor",r(e.data,{qs:u},(function(t,r){if(t)return s(t) s(null,new i(e.data,new o(r.Key)))}))):s(t) s(null,new i(e.data,new o(n.Key)))}))}))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict" var n=r(5) e.exports=function(e){var t=n(e) return{wantlist:r(534)(t),stat:r(535)(t),unwant:r(536)(t)}}},function(e,t,r){"use strict" var n=r(1),i=r(6) e.exports=function(e){return n((function(t,r,n){if("function"==typeof t?(n=t,r={},t=null):"function"==typeof r&&(n=r,r={}),t)try{r.peer=new i(t).toBaseEncodedString()}catch(e){return n(e)}e({path:"bitswap/wantlist",qs:r},n)}))}},function(e,t,r){"use strict" var n=r(1),i=r(55),o=function(e,t){t(null,{provideBufLen:e.ProvideBufLen,wantlist:e.Wantlist||[],peers:e.Peers||[],blocksReceived:new i(e.BlocksReceived),dataReceived:new i(e.DataReceived),blocksSent:new i(e.BlocksSent),dataSent:new i(e.DataSent),dupBlksReceived:new i(e.DupBlksReceived),dupDataReceived:new i(e.DupDataReceived)})} e.exports=function(e){return n((function(t){e.andTransform({path:"bitswap/stat"},o,t)}))}},function(e,t,r){"use strict" var n=r(1),i=r(6) e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}) try{t=new i(t)}catch(e){return n(e)}e({path:"bitswap/unwant",args:t.toBaseEncodedString(),qs:r},n)}))}},function(e,t,r){"use strict" var n=r(5) e.exports=function(e){var t=n(e) return{get:r(538)(t),put:r(553)(t)}}},function(e,t,r){"use strict" var n=r(56),i=r(232),o=r(1),a=r(6),s=r(118),u=r(229),l={"dag-cbor":i.resolver,"dag-pb":n.resolver} e.exports=function(e){return o((function(t,r,n,i){"function"==typeof r&&(i=r,r=void 0),"function"==typeof n&&(i=n,n={}),n=n||{},r=r||"",a.isCID(t)&&(t=t.toBaseEncodedString()),s([function(i){e({path:"dag/resolve",args:t+"/"+r,qs:n},i)},function(t,r){u(e).get(new a(t.Cid["/"]),(function(e,n){r(e,n,t.RemPath)}))},function(e,t,r){var n=l[e.cid.codec] if(!n){var i=new Error('ipfs-http-client is missing DAG resolver for "'+e.cid.codec+'" multicodec') return i.missingMulticodec=e.cid.codec,void r(i)}n.resolve(e.data,t,r)}],i)}))}},function(e,t,r){var n,i,o function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)} //! stable.js 0.1.8, https://github.com/Two-Screen/stable //! © 2018 Angry Bytes and contributors. MIT licensed. o=function(){"use strict" var e=function(e,r){return t(e.slice(),r)} function t(e,t){"function"!=typeof t&&(t=function(e,t){return String(e).localeCompare(t)}) var n=e.length if(n<=1)return e for(var i=new Array(n),o=1;ol&&(o=l),a>l&&(a=l),s=i,u=o;;)if(s0){break}}return z|0}function V(e){e=e|0 if(((U|0)+(e|0)|0)<(F|0)){return 0}return 1}function K(e){e=e|0 return n[e|0]<<8|n[e+1|0]|0}function q(e){e=e|0 return n[e|0]<<24|n[e+1|0]<<16|n[e+2|0]<<8|n[e+3|0]|0}function G(e){e=e|0 i(e|0) U=U+1|0 return 0}function W(e){e=e|0 if(V(1)|0){return 1}i(n[U+1|0]|0) U=U+2|0 return 0}function Y(e){e=e|0 if(V(2)|0){return 1}i(K(U+1|0)|0) U=U+3|0 return 0}function Z(e){e=e|0 if(V(4)|0){return 1}o(K(U+1|0)|0,K(U+3|0)|0) U=U+5|0 return 0}function J(e){e=e|0 if(V(8)|0){return 1}s(K(U+1|0)|0,K(U+3|0)|0,K(U+5|0)|0,K(U+7|0)|0) U=U+9|0 return 0}function $(e){e=e|0 i(-1-(e-32|0)|0) U=U+1|0 return 0}function Q(e){e=e|0 if(V(1)|0){return 1}i(-1-(n[U+1|0]|0)|0) U=U+2|0 return 0}function X(e){e=e|0 var t=0 if(V(2)|0){return 1}t=K(U+1|0)|0 i(-1-(t|0)|0) U=U+3|0 return 0}function ee(e){e=e|0 if(V(4)|0){return 1}a(K(U+1|0)|0,K(U+3|0)|0) U=U+5|0 return 0}function te(e){e=e|0 if(V(8)|0){return 1}u(K(U+1|0)|0,K(U+3|0)|0,K(U+5|0)|0,K(U+7|0)|0) U=U+9|0 return 0}function re(e){e=e|0 var t=0 var r=0 var n=0 n=e-64|0 if(V(n|0)|0){return 1}t=U+1|0 r=(U+1|0)+(n|0)|0 T(t|0,r|0) U=r|0 return 0}function ne(e){e=e|0 var t=0 var r=0 var i=0 if(V(1)|0){return 1}i=n[U+1|0]|0 t=U+2|0 r=(U+2|0)+(i|0)|0 if(V(i+1|0)|0){return 1}T(t|0,r|0) U=r|0 return 0}function ie(e){e=e|0 var t=0 var r=0 var n=0 if(V(2)|0){return 1}n=K(U+1|0)|0 t=U+3|0 r=(U+3|0)+(n|0)|0 if(V(n+2|0)|0){return 1}T(t|0,r|0) U=r|0 return 0}function oe(e){e=e|0 var t=0 var r=0 var n=0 if(V(4)|0){return 1}n=q(U+1|0)|0 t=U+5|0 r=(U+5|0)+(n|0)|0 if(V(n+4|0)|0){return 1}T(t|0,r|0) U=r|0 return 0}function ae(e){e=e|0 return 1}function se(e){e=e|0 I() U=U+1|0 return 0}function ue(e){e=e|0 var t=0 var r=0 var n=0 n=e-96|0 if(V(n|0)|0){return 1}t=U+1|0 r=(U+1|0)+(n|0)|0 O(t|0,r|0) U=r|0 return 0}function le(e){e=e|0 var t=0 var r=0 var i=0 if(V(1)|0){return 1}i=n[U+1|0]|0 t=U+2|0 r=(U+2|0)+(i|0)|0 if(V(i+1|0)|0){return 1}O(t|0,r|0) U=r|0 return 0}function ce(e){e=e|0 var t=0 var r=0 var n=0 if(V(2)|0){return 1}n=K(U+1|0)|0 t=U+3|0 r=(U+3|0)+(n|0)|0 if(V(n+2|0)|0){return 1}O(t|0,r|0) U=r|0 return 0}function fe(e){e=e|0 var t=0 var r=0 var n=0 if(V(4)|0){return 1}n=q(U+1|0)|0 t=U+5|0 r=(U+5|0)+(n|0)|0 if(V(n+4|0)|0){return 1}O(t|0,r|0) U=r|0 return 0}function he(e){e=e|0 return 1}function de(e){e=e|0 C() U=U+1|0 return 0}function pe(e){e=e|0 _(e-128|0) U=U+1|0 return 0}function me(e){e=e|0 if(V(1)|0){return 1}_(n[U+1|0]|0) U=U+2|0 return 0}function ye(e){e=e|0 if(V(2)|0){return 1}_(K(U+1|0)|0) U=U+3|0 return 0}function ge(e){e=e|0 if(V(4)|0){return 1}S(K(U+1|0)|0,K(U+3|0)|0) U=U+5|0 return 0}function ve(e){e=e|0 if(V(8)|0){return 1}E(K(U+1|0)|0,K(U+3|0)|0,K(U+5|0)|0,K(U+7|0)|0) U=U+9|0 return 0}function be(e){e=e|0 w() U=U+1|0 return 0}function we(e){e=e|0 var t=0 t=e-160|0 if(V(t|0)|0){return 1}M(t|0) U=U+1|0 return 0}function _e(e){e=e|0 if(V(1)|0){return 1}M(n[U+1|0]|0) U=U+2|0 return 0}function Se(e){e=e|0 if(V(2)|0){return 1}M(K(U+1|0)|0) U=U+3|0 return 0}function Ee(e){e=e|0 if(V(4)|0){return 1}x(K(U+1|0)|0,K(U+3|0)|0) U=U+5|0 return 0}function ke(e){e=e|0 if(V(8)|0){return 1}A(K(U+1|0)|0,K(U+3|0)|0,K(U+5|0)|0,K(U+7|0)|0) U=U+9|0 return 0}function Me(e){e=e|0 k() U=U+1|0 return 0}function xe(e){e=e|0 P(e-192|0|0) U=U+1|0 return 0}function Ae(e){e|0 P(e|0) U=U+1|0 return 0}function Te(e){e|0 P(e|0) U=U+1|0 return 0}function Ie(e){e|0 P(e|0) U=U+1|0 return 0}function Oe(e){e|0 P(e|0) U=U+1|0 return 0}function Ce(e){e=e|0 P(e-192|0|0) U=U+1|0 return 0}function Re(e){e|0 P(e|0) U=U+1|0 return 0}function Pe(e){e|0 P(e|0) U=U+1|0 return 0}function Ne(e){e|0 P(e|0) U=U+1|0 return 0}function De(e){e=e|0 if(V(1)|0){return 1}P(n[U+1|0]|0) U=U+2|0 return 0}function Be(e){e=e|0 if(V(2)|0){return 1}P(K(U+1|0)|0) U=U+3|0 return 0}function Le(e){e=e|0 if(V(4)|0){return 1}N(K(U+1|0)|0,K(U+3|0)|0) U=U+5|0 return 0}function je(e){e=e|0 if(V(8)|0){return 1}D(K(U+1|0)|0,K(U+3|0)|0,K(U+5|0)|0,K(U+7|0)|0) U=U+9|0 return 0}function Ue(e){e=e|0 R((e|0)-224|0) U=U+1|0 return 0}function Fe(e){e=e|0 d() U=U+1|0 return 0}function ze(e){e=e|0 h() U=U+1|0 return 0}function He(e){e=e|0 m() U=U+1|0 return 0}function Ve(e){e=e|0 p() U=U+1|0 return 0}function Ke(e){e=e|0 if(V(1)|0){return 1}R(n[U+1|0]|0) U=U+2|0 return 0}function qe(e){e=e|0 var t=0 var r=0 var i=1.0 var o=0.0 var a=0.0 var s=0.0 if(V(2)|0){return 1}t=n[U+1|0]|0 r=n[U+2|0]|0 if((t|0)&0x80){i=-1.0}o=+(((t|0)&0x7C)>>2) a=+(((t|0)&0x03)<<8|r) if(+o==0.0){l(+(+i*+5.9604644775390625e-8*+a))}else if(+o==31.0){if(+i==1.0){if(+a>0.0){v()}else{y()}}else{if(+a>0.0){b()}else{g()}}}else{l(+(+i*j(+2,+(+o-25.0))*+(1024.0+a)))}U=U+3|0 return 0}function Ge(e){e=e|0 if(V(4)|0){return 1}c(n[U+1|0]|0,n[U+2|0]|0,n[U+3|0]|0,n[U+4|0]|0) U=U+5|0 return 0}function We(e){e=e|0 if(V(8)|0){return 1}f(n[U+1|0]|0,n[U+2|0]|0,n[U+3|0]|0,n[U+4|0]|0,n[U+5|0]|0,n[U+6|0]|0,n[U+7|0]|0,n[U+8|0]|0) U=U+9|0 return 0}function Ye(e){e=e|0 return 1}function Ze(e){e=e|0 L() U=U+1|0 return 0}var Je=[G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,G,W,Y,Z,J,Ye,Ye,Ye,Ye,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,$,Q,X,ee,te,Ye,Ye,Ye,Ye,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,re,ne,ie,oe,ae,Ye,Ye,Ye,se,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,ue,le,ce,fe,he,Ye,Ye,Ye,de,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,pe,me,ye,ge,ve,Ye,Ye,Ye,be,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,we,_e,Se,Ee,ke,Ye,Ye,Ye,Me,xe,xe,xe,xe,xe,xe,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,Ce,De,Be,Le,je,Ye,Ye,Ye,Ye,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Ue,Fe,ze,He,Ve,Ke,qe,Ge,We,Ye,Ye,Ye,Ze] return{parse:H}}},function(e,t,r){"use strict";(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r0)for(var r=0,i=arguments.length;r1)r=t else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value") n=this.head.next,r=this.head.value}for(var i=0;null!==n;i++)r=e(r,n.value,i),n=n.next return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail if(arguments.length>1)r=t else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value") n=this.tail.prev,r=this.tail.value}for(var i=this.length-1;null!==n;i--)r=e(r,n.value,i),n=n.prev return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length) var r=new n if(tthis.length&&(t=this.length) for(var i=0,o=this.head;null!==o&&ithis.length&&(t=this.length) for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev for(;null!==o&&i>e;i--,o=o.prev)r.push(o.value) return r},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this} try{r(557)(n)}catch(e){}},function(e,t,r){"use strict" e.exports=function(e){e.prototype[Symbol.iterator]=regeneratorRuntime.mark((function e(){var t return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.head case 1:if(!t){e.next=7 break}return e.next=4,t.value case 4:t=t.next,e.next=1 break case 7:case"end":return e.stop()}}),e,this)}))}},function(e,t,r){"use strict";(function(t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(1),o=r(6),a=r(56).DAGNode,s=r(47),u=r(19) e.exports=function(e){var r=s(e,"object/put") return i((function(e,i,s){"function"==typeof i&&(s=i,i={}) var l=u(s) i||(i={}) var c,f={Data:null,Links:[]} if(t.isBuffer(e))i.enc||(f={Data:e.toString(),Links:[]}) else if(a.isDAGNode(e))f={Data:e.data.toString(),Links:e.links.map((function(e){var t=e.toJSON() return t.hash=t.cid,t}))} else{if("object"!==n(e))return l(new Error("obj not recognized")) f.Data=e.Data.toString(),f.Links=e.Links}c=t.isBuffer(e)&&i.enc?e:t.from(JSON.stringify(f)) var h=i.enc||"json" r(c,{qs:{inputenc:h}},(function(e,t){if(e)return l(e) l(null,new o(t.Hash))}))}))}}).call(this,r(0).Buffer)},function(e,t,r){"use strict" var n=r(1),i=r(23),o=r(6),a=new(r(120))({max:128}) e.exports=function(e){return n((function(t,r,n){var s "function"==typeof r&&(n=r,r={}),r||(r={}) try{s=(t=new o(t)).toBaseEncodedString()}catch(e){return n(e)}var u=a.get(s) if(u)return n(null,u.data) e({path:"object/data",args:s},(function(e,t){if(e)return n(e) "function"==typeof t.pipe?i(t,n):n(null,t)}))}))}},function(e,t,r){"use strict" var n=r(1),i=r(56).DAGLink,o=r(6),a=new(r(120))({max:128}) e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}),r||(r={}) try{t=new o(t)}catch(e){return n(e)}var s=a.get(t.toString()) if(s)return n(null,s.links) e({path:"object/links",args:t.toString()},(function(e,t){if(e)return n(e) var r=[] t.Links&&(r=t.Links.map((function(e){return new i(e.Name,e.Size,e.Hash)}))),n(null,r)}))}))}},function(e,t,r){"use strict" var n=r(1),i=r(6) e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}),r||(r={}) try{t=new i(t)}catch(e){return n(e)}e({path:"object/stat",args:t.toString()},n)}))}},function(e,t,r){"use strict" var n=r(1),i=r(6) e.exports=function(e){return n((function(t,r){"function"==typeof t&&(r=t,t=void 0),e({path:"object/new",args:t},(function(e,t){if(e)return r(e) r(null,new i(t.Hash))}))}))}},function(e,t,r){"use strict" var n=r(1),i=r(6) e.exports=function(e){return n((function(t,r,n,o){"function"==typeof n&&(o=n,n={}),n||(n={}) try{t=new i(t)}catch(e){return o(e)}e({path:"object/patch/add-link",args:[t.toString(),r.name,r.cid.toString()]},(function(e,t){if(e)return o(e) o(null,new i(t.Hash))}))}))}},function(e,t,r){"use strict" var n=r(1),i=r(6) e.exports=function(e){return n((function(t,r,n,o){"function"==typeof n&&(o=n,n={}),n||(n={}) try{t=new i(t)}catch(e){return o(e)}e({path:"object/patch/rm-link",args:[t.toString(),r.name]},(function(e,t){if(e)return o(e) o(null,new i(t.Hash))}))}))}},function(e,t,r){"use strict" var n=r(1),i=r(19),o=r(6),a=r(47) e.exports=function(e){var t=a(e,"object/patch/set-data") return n((function(e,r,n,a){"function"==typeof n&&(a=n,n={}) var s=i(a) n||(n={}) try{e=new o(e)}catch(e){return s(e)}t(r,{args:[e.toString()]},(function(e,t){if(e)return s(e) s(null,new o(t.Hash))}))}))}},function(e,t,r){"use strict" var n=r(1),i=r(19),o=r(6),a=r(47) e.exports=function(e){var t=a(e,"object/patch/append-data") return n((function(e,r,n,a){"function"==typeof n&&(a=n,n={}) var s=i(a) n||(n={}) try{e=new o(e)}catch(e){return s(e)}t(r,{args:[e.toString()]},(function(e,t){if(e)return s(e) s(null,new o(t.Hash))}))}))}},function(e,t,r){"use strict" var n=r(5) e.exports=function(e){var t=n(e) return{add:r(568)(t),rm:r(569)(t),ls:r(570)(t)}}},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r=null),e({path:"pin/add",args:t,qs:r},(function(e,t){if(e)return n(e) n(null,t.Pins.map((function(e){return{hash:e}})))}))}))}},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r=null),e({path:"pin/rm",args:t,qs:r},(function(e,t){if(e)return n(e) n(null,t.Pins.map((function(e){return{hash:e}})))}))}))}},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r,n){"function"==typeof t&&(n=t,r=null,t=null),"function"==typeof r&&(n=r,r=null),t&&t.type&&(r=t,t=null),e({path:"pin/ls",args:t,qs:r},(function(e,t){if(e)return n(e) n(null,Object.keys(t.Keys).map((function(e){return{hash:e,type:t.Keys[e].Type}})))}))}))}},function(e,t,r){"use strict" var n=r(5) e.exports=function(e){var t=n(e) return{add:r(572)(t),rm:r(573)(t),list:r(574)(t)}}},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(1) e.exports=function(e){return i((function(t,r,i){"function"!=typeof r||i||(i=r,r={}),"function"==typeof r&&"function"==typeof i&&(i=r,r={}),t&&"object"===n(t)&&(r=t,t=void 0),e({path:"bootstrap/add",args:t,qs:r},i)}))}},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(1) e.exports=function(e){return i((function(t,r,i){"function"!=typeof r||i||(i=r,r={}),"function"==typeof r&&"function"==typeof i&&(i=r,r={}),t&&"object"===n(t)&&(r=t,t=void 0),e({path:"bootstrap/rm",args:t,qs:r},i)}))}},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r){"function"==typeof t&&(r=t,t={}),e({path:"bootstrap/list",qs:t},r)}))}},function(e,t,r){"use strict" var n=r(5) e.exports=function(e){var t=n(e) return{get:r(576)(t),put:r(577)(t),findProvs:r(578)(t),findPeer:r(579)(t),provide:r(580)(t),query:r(581)(t)}}},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),e({path:"dht/get",args:t,qs:r},function(e,t,r){return t?e(t):r?0===r.length?e(new Error("no value returned for key")):(Array.isArray(r)&&(r=r[0]),void(5===r.Type?e(null,r.Extra):e(new Error("key was not found (type 6)")))):e(new Error("empty response"))}.bind(null,n))}))}},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r,n,i){"function"!=typeof n||i||(i=n,n={}),"function"==typeof n&&"function"==typeof i&&(i=n,n={}),e({path:"dht/put",args:[t,r],qs:n},i)}))}},function(e,t,r){"use strict" var n=r(1),i=r(121),o=r(17),a=r(24),s=r(51),u=r(238) e.exports=function(e){return n((function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}) var l=function(e,t){return e?(Array.isArray(e)&&(e=e[0]),4!==e.Type?t(u(new Error("key was not found (type 4)"),"ERR_KEY_TYPE_4_NOT_FOUND")):void t(null,e.Responses.map((function(e){var t=new s(a.createFromB58String(e.ID)) return e.Addrs.forEach((function(e){var r=o(e) t.multiaddrs.add(r)})),t})))):t(null,[])} e({path:"dht/findprovs",args:t,qs:r},(function(e,t){if(e)return n(e) i(t,l,n)}))}))}},function(e,t,r){"use strict" var n=r(1),i=r(121),o=r(17),a=r(24),s=r(51),u=r(238) e.exports=function(e){return n((function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}) var l=function(e,t){if(Array.isArray(e)&&(e=e[0]),2!==e.Type)return t(u(new Error("key was not found (type 2)"),"ERR_KEY_TYPE_2_NOT_FOUND")) var r=e.Responses[0],n=new s(a.createFromB58String(r.ID)) r.Addrs.forEach((function(e){var t=o(e) n.multiaddrs.add(t)})),t(null,n)} e({path:"dht/findpeer",args:t,qs:r},(function(e,t){if(e)return n(e) i(t,l,n)}))}))}},function(e,t,r){"use strict" var n=r(1),i=r(6) e.exports=function(e){return n((function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}),Array.isArray(t)||(t=[t]) try{t=t.map((function(e){return new i(e).toBaseEncodedString("base58btc")}))}catch(e){return n(e)}e({path:"dht/provide",args:t,qs:r},n)}))}},function(e,t,r){"use strict" var n=r(1),i=r(121),o=r(24),a=r(51) e.exports=function(e){return n((function(t,r,n){"function"!=typeof r||n||(n=r,r={}),"function"==typeof r&&"function"==typeof n&&(n=r,r={}) var s=function(e,t){t(null,e.map((function(e){return new a(o.createFromB58String(e.ID))})))} e({path:"dht/query",args:t,qs:r},(function(e,t){if(e)return n(e) i(t,s,n)}))}))}},function(e,t,r){"use strict" var n=r(5) e.exports=function(e){var t=n(e) return{publish:r(583)(t),resolve:r(584)(t),pubsub:r(585)(t)}}},function(e,t,r){"use strict" var n=r(1),i=function(e,t){t(null,{name:e.Name,value:e.Value})} e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}),e.andTransform({path:"name/publish",args:t,qs:r},i,n)}))}},function(e,t,r){"use strict" var n=r(1),i=function(e,t){t(null,e.Path)} e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}),e.andTransform({path:"name/resolve",args:t,qs:r},i,n)}))}},function(e,t,r){"use strict" e.exports=function(e){return{cancel:r(586)(e),state:r(587)(e),subs:r(588)(e)}}},function(e,t,r){"use strict" var n=r(1),i=function(e,t){t(null,{canceled:void 0===e.Canceled||!0===e.Canceled})} e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}),e.andTransform({path:"name/pubsub/cancel",args:t,qs:r},i,n)}))}},function(e,t,r){"use strict" var n=r(1),i=function(e,t){t(null,{enabled:e.Enabled})} e.exports=function(e){return n((function(t,r){"function"==typeof t&&(r=t,t={}),e.andTransform({path:"name/pubsub/state",qs:t},i,r)}))}},function(e,t,r){"use strict" var n=r(1),i=function(e,t){t(null,e.Strings||[])} e.exports=function(e){return n((function(t,r){"function"==typeof t&&(r=t,t={}),e.andTransform({path:"name/pubsub/subs",qs:t},i,r)}))}},function(e,t,r){"use strict" var n=r(1),i=r(15),o=r(12).Writable,a=r(5),s=r(122) e.exports=function(e){var t=a(e) return n((function(e,r,n){if("function"==typeof r&&(n=r,r={}),r.n&&r.count)return n(new Error("Use either n or count, not both")) r.n||r.count||(r.n=1) var a={path:"ping",args:e,qs:r} t.andTransform(a,(function(e,t){var r=new s,n=[] i(e,r,new o({objectMode:!0,write:function(e,t,r){n.push(e),r()}}),(function(e){if(e)return t(e) t(null,n)}))}),n)}))}},function(e,t,r){"use strict" e.exports=function(e){if(!function(e){return e&&"boolean"==typeof e.Success}(e))throw new Error("Invalid ping message received") return{success:e.Success,time:e.Time,text:e.Text}}},function(e,t,r){"use strict" var n=r(15),i=r(5),o=r(122) e.exports=function(e){var t=i(e) return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} r.n||r.count||(r.n=1) var i={path:"ping",args:e,qs:r},a=new o return t(i,(function(e,t){if(e)return a.emit("error",e) n(t,a)})),a}}},function(e,t,r){"use strict" var n=r(28),i=r(42),o=r(15),a=r(5),s=r(122) e.exports=function(e){var t=a(e) return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{} r.n||r.count||(r.n=1) var a={path:"ping",args:e,qs:r},u=i.source(),l=new s return t(a,(function(e,t){if(e)return u.abort(e) o(t,l),u.resolve(n.source(l))})),u}}},function(e,t,r){"use strict" var n=r(5) e.exports=function(e){var t=n(e) return{peers:r(594)(t),connect:r(595)(t),disconnect:r(596)(t),addrs:r(597)(t),localAddrs:r(598)(t)}}},function(e,t,r){"use strict" var n=r(1),i=r(17),o=r(24) function a(e,t){var r={} try{if(e){var n=t.split(" ") r.addr=i(n[0]),r.latency=n[1]}else r.addr=i(t) r.peer=o.createFromB58String(r.addr.getPeerId())}catch(e){r.error=e,r.rawPeerInfo=t}return r}function s(e,t){var r={} try{r.addr=i(t.Addr),r.peer=o.createFromB58String(t.Peer),r.muxer=t.Muxer}catch(e){r.error=e,r.rawPeerInfo=t}return t.Latency&&(r.latency=t.Latency),t.Streams&&(r.streams=t.Streams),r}e.exports=function(e){return n((function(t,r){"function"==typeof t&&(r=t,t={}) var n=t.v||t.verbose e({path:"swarm/peers",qs:t},(function(e,t){if(e)return r(e) var i=function(e,t){return Array.isArray(t.Strings)?t.Strings.map(a.bind(null,e)):Array.isArray(t.Peers)?t.Peers.map(s.bind(null,e)):[]}(n,t) r(null,i)}))}))}},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}),e({path:"swarm/connect",args:t,qs:r},n)}))}},function(e,t,r){"use strict" var n=r(1) e.exports=function(e){return n((function(t,r,n){"function"==typeof r&&(n=r,r={}),e({path:"swarm/disconnect",args:t,qs:r},n)}))}},function(e,t,r){"use strict" var n=r(1),i=r(51),o=r(24),a=r(17) e.exports=function(e){return n((function(t,r){"function"==typeof t&&(r=t,t={}),e({path:"swarm/addrs",qs:t},(function(e,t){if(e)return r(e) var n=Object.keys(t.Addrs).map((function(e){var r=new i(o.createFromB58String(e)) return t.Addrs[e].forEach((function(e){r.multiaddrs.add(a(e))})),r})) r(null,n)}))}))}},function(e,t,r){"use strict" var n=r(1),i=r(17) e.exports=function(e){return n((function(t,r){"function"==typeof t&&(r=t,t={}),e({path:"swarm/addrs/local",qs:t},(function(e,t){if(e)return r(e) r(null,t.Strings.map((function(e){return i(e)})))}))}))}},function(e,t,r){"use strict";(function(t){var n=r(1),i=r(11),o=r(112),a=r(54),s=r(96),u=r(600),l=r(602),c=r(5),f=function(){return new Error("pubsub is currently not supported when run in the browser")} e.exports=function(e){var r=c(e),h=new i,d={} return h.id=Math.random(),{subscribe:function(e,t,r,n){var i={discover:!1} return"function"==typeof r&&(n=r,r=i),r||(r=i),a?n?void p(e,t,r,n):new Promise((function(n,i){p(e,t,r,(function(e){if(e)return i(e) n()}))})):n?s((function(){return n(f())})):Promise.reject(f())},unsubscribe:function(e,t,r){if(!a)return r?s((function(){return r(f())})):Promise.reject(f()) if(0===h.listenerCount(e)||!d[e]){var n=new Error("Not subscribed to '".concat(e,"'")) return r?s((function(){return r(n)})):Promise.reject(n)}return t||r?h.removeListener(e,t):h.removeAllListeners(e),0===h.listenerCount(e)?r?(o(d[e].res,(function(e){setTimeout((function(){return r(e)}))})),d[e].req.abort(),void(d[e]=null)):new Promise((function(t,r){o(d[e].res,(function(e){setTimeout((function(){if(e)return r(e) t()}))})),d[e].req.abort(),d[e]=null})):r?void s((function(){return r()})):Promise.resolve()},publish:n((function(e,n,i){return a?t.isBuffer(n)?void r({path:"pubsub/pub",args:[e,n]},i):i(new Error("data must be a Buffer")):i(f())})),ls:n((function(e){if(!a)return e(f()) r.andTransform({path:"pubsub/ls"},l,e)})),peers:n((function(e,t){if(!a)return t(f()) var n={path:"pubsub/peers",args:[e]} r.andTransform(n,l,t)})),setMaxListeners:function(e){return h.setMaxListeners(e)}} function p(e,t,n,i){if(h.on(e,t),d[e])return i() var a={path:"pubsub/sub",args:[e],qs:{discover:n.discover}} d[e]={},d[e].req=r.andTransform(a,u.from,(function(r,n){if(r)return d[e]=null,h.removeListener(e,t),i(r) d[e].res=n,n.on("data",(function(t){h.emit(e,t)})),n.on("error",(function(e){h.emit("error",e)})),o(n,(function(r){r&&h.emit("error",r),d[e]=null,h.removeListener(e,t)})),i()}))}}}).call(this,r(0).Buffer)},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var r=0;r=0&&(a=r.type.substring(s)) var u=e(t,r.components) i.isArray(u)&&t?o.push("tuple("+u.join(",")+")"+a):t?o.push("("+u+")"):o.push("("+u.join(",")+")"+a)}else o.push(r.type)})),o},c=function(e){if(!a.isHexStrict(e))throw new Error("The parameter must be a valid HEX string.") var t="",r=0,n=e.length for("0x"===e.substring(0,2)&&(r=2);r7?r+=e[n].toUpperCase():r+=e[n] return r},toHex:a.toHex,toBN:a.toBN,bytesToHex:a.bytesToHex,hexToBytes:a.hexToBytes,hexToNumberString:a.hexToNumberString,hexToNumber:a.hexToNumber,toDecimal:a.hexToNumber,numberToHex:a.numberToHex,fromDecimal:a.numberToHex,hexToUtf8:a.hexToUtf8,hexToString:a.hexToUtf8,toUtf8:a.hexToUtf8,utf8ToHex:a.utf8ToHex,stringToHex:a.utf8ToHex,fromUtf8:a.utf8ToHex,hexToAscii:c,toAscii:c,asciiToHex:f,fromAscii:f,unitMap:o.unitMap,toWei:function(e,t){if(t=h(t),!a.isBN(e)&&!i.isString(e))throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.") return a.isBN(e)?o.toWei(e,t):o.toWei(e,t).toString(10)},fromWei:function(e,t){if(t=h(t),!a.isBN(e)&&!i.isString(e))throw new Error("Please pass numbers as strings or BN objects to avoid precision errors.") return a.isBN(e)?o.fromWei(e,t):o.fromWei(e,t).toString(10)},padLeft:a.leftPad,leftPad:a.leftPad,padRight:a.rightPad,rightPad:a.rightPad,toTwosComplement:a.toTwosComplement,isBloom:a.isBloom,isUserEthereumAddressInBloom:a.isUserEthereumAddressInBloom,isContractAddressInBloom:a.isContractAddressInBloom,isTopic:a.isTopic,isTopicInBloom:a.isTopicInBloom,isInBloom:a.isInBloom}},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=r(644),o=r(240),a=new i(0),s=new i(-1),u={noether:"0",wei:"1",kwei:"1000",Kwei:"1000",babbage:"1000",femtoether:"1000",mwei:"1000000",Mwei:"1000000",lovelace:"1000000",picoether:"1000000",gwei:"1000000000",Gwei:"1000000000",shannon:"1000000000",nanoether:"1000000000",nano:"1000000000",szabo:"1000000000000",microether:"1000000000000",micro:"1000000000000",finney:"1000000000000000",milliether:"1000000000000000",milli:"1000000000000000",ether:"1000000000000000000",kether:"1000000000000000000000",grand:"1000000000000000000000",mether:"1000000000000000000000000",gether:"1000000000000000000000000000",tether:"1000000000000000000000000000000"} function l(e){var t=e?e.toLowerCase():"ether",r=u[t] if("string"!=typeof r)throw new Error("[ethjs-unit] the unit provided "+e+" doesn't exists, please use the one of the following units "+JSON.stringify(u,null,2)) return new i(r,10)}function c(e){if("string"==typeof e){if(!e.match(/^-?[0-9.]+$/))throw new Error("while converting number to string, invalid number value '"+e+"', should be a number matching (^-?[0-9.]+).") return e}if("number"==typeof e)return String(e) if("object"===n(e)&&e.toString&&(e.toTwos||e.dividedToIntegerBy))return e.toPrecision?String(e.toPrecision()):e.toString(10) throw new Error("while converting number to string, invalid number value '"+e+"' type "+n(e)+".")}e.exports={unitMap:u,numberToString:c,getValueOfUnit:l,fromWei:function(e,t,r){var n=o(e),i=n.lt(a),c=l(t),f=u[t].length-1||1,h=r||{} i&&(n=n.mul(s)) for(var d=n.mod(c).toString(10);d.length2)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal points") var h=f[0],d=f[1] if(h||(h="0"),d||(d="0"),d.length>o)throw new Error("[ethjs-unit] while converting number "+e+" to wei, too many decimal places") for(;d.length=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===t(e)&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,r,n){if("number"==typeof e)return this._initNumber(e,r,n) if("object"===t(e))return this._initArray(e,r,n) "hex"===r&&(r=16),i(r===(0|r)&&r>=2&&r<=36) var o=0 "-"===(e=e.toString().replace(/\s+/g,""))[0]&&o++,16===r?this._parseHex(e,o):this._parseBase(e,r,o),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),r,n)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this this.length=Math.ceil(e.length/3),this.words=new Array(this.length) for(var n=0;n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++) else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++) return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length) for(var r=0;r=t;r-=6)i=u(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++) r+6!==t&&(i=u(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1 for(var n=0,i=1;i<=67108863;i*=t)n++ n--,i=i/t|0 for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length-- return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.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],h=[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(e,t,r){r.negative=t.negative^e.negative var n=e.length+t.length|0 r.length=n,n=n-1|0 var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0 r.words[0]=s for(var l=1;l>>26,f=67108863&u,h=Math.min(l,t.length-1),d=Math.max(0,l-e.length+1);d<=h;d++){var p=l-d|0 c+=(a=(i=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r if(t=0|t||1,16===(e=e||10)||"hex"===e){r="" for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e] r="" var p=this.clone() for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e) r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0] return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n) i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip() var a,s,u="le"===t,l=new e(o),c=this.clone() if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26 var t=e,r=0 return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e) return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0 for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t t=this.length>e.length?e:this for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r this.length>e.length?(t=this,r=e):(t=e,r=this) for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0) var t=0|Math.ceil(e/26),r=e%26 this._expand(t),r>0&&t-- for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0) var r=e/26|0,n=e%26 return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this) for(var i=0,o=0;o>>26 for(;0!==i&&o>>26 if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++ else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0 var t=this.iadd(e) return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign() var r,n,i=this.cmp(e) if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this i>0?(r=this,n=e):(r=e,n=this) for(var o=0,a=0;a>26,this.words[a]=67108863&t for(;0!==o&&a>26,this.words[a]=67108863&t if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],E=8191&S,k=S>>>13,M=0|a[5],x=8191&M,A=M>>>13,T=0|a[6],I=8191&T,O=T>>>13,C=0|a[7],R=8191&C,P=C>>>13,N=0|a[8],D=8191&N,B=N>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],z=8191&F,H=F>>>13,V=0|s[1],K=8191&V,q=V>>>13,G=0|s[2],W=8191&G,Y=G>>>13,Z=0|s[3],J=8191&Z,$=Z>>>13,Q=0|s[4],X=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,he=ce>>>13,de=0|s[9],pe=8191&de,me=de>>>13 r.negative=e.negative^t.negative,r.length=19 var ye=(l+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,z)|0))<<13)|0 l=((o=Math.imul(h,H))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(m,z)|0,o=Math.imul(m,H) var ge=(l+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,K)|0))<<13)|0 l=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(v,z)|0,o=Math.imul(v,H),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,q)|0 var ve=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(h,W)|0))<<13)|0 l=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(_,z)|0,o=Math.imul(_,H),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,q)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0 var be=(l+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(h,J)|0))<<13)|0 l=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,H))+Math.imul(k,z)|0,o=Math.imul(k,H),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,q)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,$)|0 var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,X)|0))<<13)|0 l=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,H))+Math.imul(A,z)|0,o=Math.imul(A,H),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,$)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0 var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0 l=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0 var Se=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(h,oe)|0))<<13)|0 l=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,H))+Math.imul(P,z)|0,o=Math.imul(P,H),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,q)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0 var Ee=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(h,ue)|0))<<13)|0 l=((o=o+Math.imul(h,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,H))+Math.imul(B,z)|0,o=Math.imul(B,H),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,q)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0 var ke=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0 l=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,z),i=(i=Math.imul(j,H))+Math.imul(U,z)|0,o=Math.imul(U,H),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,le)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,he)|0 var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(h,pe)|0))<<13)|0 l=((o=o+Math.imul(h,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,q))+Math.imul(U,K)|0,o=Math.imul(U,q),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(v,fe)|0,o=o+Math.imul(v,he)|0 var xe=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0 l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,W),i=(i=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,he)|0 var Ae=(l+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(v,pe)|0))<<13)|0 l=((o=o+Math.imul(v,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,$))+Math.imul(U,J)|0,o=Math.imul(U,$),n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,he)|0 var Te=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0 l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(U,X)|0,o=Math.imul(U,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,he)|0 var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0 l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,he)|0 var Oe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0 l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,le)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,he)|0 var Ce=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(O,pe)|0))<<13)|0 l=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(U,ue)|0,o=Math.imul(U,le),n=n+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,he)|0 var Re=(l+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0 l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,he))+Math.imul(U,fe)|0,o=Math.imul(U,he) var Pe=(l+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(B,pe)|0))<<13)|0 l=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863 var Ne=(l+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(U,pe)|0))<<13)|0 return l=((o=Math.imul(U,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ye,u[1]=ge,u[2]=ve,u[3]=be,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Te,u[13]=Ie,u[14]=Oe,u[15]=Ce,u[16]=Re,u[17]=Pe,u[18]=Ne,0!==l&&(u[19]=l,r.length++),r} function m(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r=this.length+e.length return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1 return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++ return 1<>>=13,r[2*a+1]=8191&o,o>>>=13 for(a=2*t;a>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e) if(0===t.length)return new a(1) for(var r=this,n=0;n=0) var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r if(0!==r){var a=0 for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t] for(t=0;t=0),n=t?(t-t%26)/26:0 var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==c||l>=n);l--){var f=0|this.words[l] this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0) var t=e%26,r=(e-t)/26,n=1<=0) var t=e%26,r=(e-t)/26 if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++ return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e) if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1 else for(var t=0;t>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o if(0===s)return this.strip() for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1] 0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]) var s,u=n.length-i.length if("mod"!==t){(s=new a(null)).length=u+1,s.words=new Array(s.length) for(var l=0;l=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]) for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1) s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t) var n,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e) if(t.mod.isZero())return t.div var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n) return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){i(e<=67108863) for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e return r},a.prototype.idivn=function(e){i(e<=67108863) for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t this.words[r]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero()) var t=this,r=e.clone() t=0!==t.negative?t.umod(e):t.clone() for(var n=new a(1),o=new a(0),s=new a(0),u=new a(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l for(var c=r.clone(),f=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(c),o.isub(f)),n.iushrn(1),o.iushrn(1) for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1) t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(u)):(r.isub(t),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(l)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero()) var t=this,r=e.clone() t=0!==t.negative?t.umod(e):t.clone() for(var n,o=new a(1),s=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1) for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1) t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(n=0===t.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs() if(e.isZero())return this.abs() var t=this.clone(),r=e.clone() t.negative=0,r.negative=0 for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1) for(;;){for(;t.isEven();)t.iushrn(1) for(;r.isEven();)r.iushrn(1) var i=t.cmp(r) if(i<0){var o=t t=r,r=o}else if(0===i||0===r.cmpn(1))break t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e) var t=e%26,r=(e-t)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0 if(0!==this.negative&&!r)return-1 if(0===this.negative&&r)return 1 if(this.strip(),this.length>1)t=1 else{r&&(e=-e),i(e<=67108863,"Number is too big") var n=0|this.words[0] t=n===e?0:ne.length)return 1 if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r] if(n!==i){ni&&(t=1) break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new E(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)} var g={k256:null,p224:null,p192:null,p25519:null} function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=a._prime(e) this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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 e=new a(null) return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n) var n=t0?r.isub(this.p):r.strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},o(b,v),b.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2 for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(g[e])return g[e] var t if("k256"===e)t=new b else if("p224"===e)t=new w else if("p192"===e)t=new _ else{if("p25519"!==e)throw new Error("Unknown prime "+e) t=new S}return g[e]=t,t},E.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t) var r=e.add(t) return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t) var r=e.iadd(t) return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t) var r=e.sub(t) return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t) var r=e.isub(t) return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone() var t=this.m.andln(3) if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2) return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1) i(!n.isZero()) var s=new a(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength() for(c=new a(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u) for(var f=this.pow(c,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),p=o;0!==d.cmp(s);){for(var m=d,y=0;0!==m.cmp(s);y++)m=m.redSqr() i(y=0;n--){for(var l=t.words[n],c=u-1;c>=0;c--){var f=l>>c&1 i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m) return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone() return t.red=null,t},a.mont=function(e){return new k(e)},o(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv)) return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this) var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(18)(e))},function(e,t,r){(function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e,n){"use strict" function i(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t var r=function(){} r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s "object"===t(e)?e.exports=a:n.BN=a,a.BN=a,a.wordSize=26 try{s=r(0).Buffer}catch(e){}function u(e,t,r){for(var n=0,i=Math.min(e.length,r),o=t;o=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function l(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===t(e)&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,r,n){if("number"==typeof e)return this._initNumber(e,r,n) if("object"===t(e))return this._initArray(e,r,n) "hex"===r&&(r=16),i(r===(0|r)&&r>=2&&r<=36) var o=0 "-"===(e=e.toString().replace(/\s+/g,""))[0]&&o++,16===r?this._parseHex(e,o):this._parseBase(e,r,o),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),r,n)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this this.length=Math.ceil(e.length/3),this.words=new Array(this.length) for(var n=0;n=0;n-=3)a=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,o++) else if("le"===r)for(n=0,o=0;n>>26-s&67108863,(s+=24)>=26&&(s-=26,o++) return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length) for(var r=0;r=t;r-=6)i=u(e,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++) r+6!==t&&(i=u(e,t,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1 for(var n=0,i=1;i<=67108863;i*=t)n++ n--,i=i/t|0 for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,c=r;c1&&0===this.words[this.length-1];)this.length-- return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.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],h=[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(e,t,r){r.negative=t.negative^e.negative var n=e.length+t.length|0 r.length=n,n=n-1|0 var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,u=a/67108864|0 r.words[0]=s for(var l=1;l>>26,f=67108863&u,h=Math.min(l,t.length-1),d=Math.max(0,l-e.length+1);d<=h;d++){var p=l-d|0 c+=(a=(i=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&a}r.words[l]=0|f,u=0|c}return 0!==u?r.words[l]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r if(t=0|t||1,16===(e=e||10)||"hex"===e){r="" for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?c[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%t!=0;)r="0"+r return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e] r="" var p=this.clone() for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e) r=(p=p.idivn(d)).isZero()?m+r:c[l-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0] return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i(void 0!==s),this.toArrayLike(s,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),o=r||Math.max(1,n) i(n<=o,"byte array longer than desired length"),i(o>0,"Requested array length <= 0"),this.strip() var a,s,u="le"===t,l=new e(o),c=this.clone() if(u){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),l[s]=a for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26 var t=e,r=0 return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e) return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0 for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t t=this.length>e.length?e:this for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r this.length>e.length?(t=this,r=e):(t=e,r=this) for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0) var t=0|Math.ceil(e/26),r=e%26 this._expand(t),r>0&&t-- for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0) var r=e/26|0,n=e%26 return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this) for(var i=0,o=0;o>>26 for(;0!==i&&o>>26 if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++ else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0 var t=this.iadd(e) return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign() var r,n,i=this.cmp(e) if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this i>0?(r=this,n=e):(r=e,n=this) for(var o=0,a=0;a>26,this.words[a]=67108863&t for(;0!==o&&a>26,this.words[a]=67108863&t if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,y=0|a[2],g=8191&y,v=y>>>13,b=0|a[3],w=8191&b,_=b>>>13,S=0|a[4],E=8191&S,k=S>>>13,M=0|a[5],x=8191&M,A=M>>>13,T=0|a[6],I=8191&T,O=T>>>13,C=0|a[7],R=8191&C,P=C>>>13,N=0|a[8],D=8191&N,B=N>>>13,L=0|a[9],j=8191&L,U=L>>>13,F=0|s[0],z=8191&F,H=F>>>13,V=0|s[1],K=8191&V,q=V>>>13,G=0|s[2],W=8191&G,Y=G>>>13,Z=0|s[3],J=8191&Z,$=Z>>>13,Q=0|s[4],X=8191&Q,ee=Q>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ue=8191&se,le=se>>>13,ce=0|s[8],fe=8191&ce,he=ce>>>13,de=0|s[9],pe=8191&de,me=de>>>13 r.negative=e.negative^t.negative,r.length=19 var ye=(l+(n=Math.imul(f,z))|0)+((8191&(i=(i=Math.imul(f,H))+Math.imul(h,z)|0))<<13)|0 l=((o=Math.imul(h,H))+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(m,z)|0,o=Math.imul(m,H) var ge=(l+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,q)|0)+Math.imul(h,K)|0))<<13)|0 l=((o=o+Math.imul(h,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(g,z),i=(i=Math.imul(g,H))+Math.imul(v,z)|0,o=Math.imul(v,H),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,q)|0 var ve=(l+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,Y)|0)+Math.imul(h,W)|0))<<13)|0 l=((o=o+Math.imul(h,Y)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),i=(i=Math.imul(w,H))+Math.imul(_,z)|0,o=Math.imul(_,H),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(v,K)|0,o=o+Math.imul(v,q)|0,n=n+Math.imul(p,W)|0,i=(i=i+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0 var be=(l+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(h,J)|0))<<13)|0 l=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,H))+Math.imul(k,z)|0,o=Math.imul(k,H),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,q)|0,n=n+Math.imul(g,W)|0,i=(i=i+Math.imul(g,Y)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,Y)|0,n=n+Math.imul(p,J)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,$)|0 var we=(l+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,X)|0))<<13)|0 l=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(x,z),i=(i=Math.imul(x,H))+Math.imul(A,z)|0,o=Math.imul(A,H),n=n+Math.imul(E,K)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(k,K)|0,o=o+Math.imul(k,q)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,n=n+Math.imul(g,J)|0,i=(i=i+Math.imul(g,$)|0)+Math.imul(v,J)|0,o=o+Math.imul(v,$)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0 var _e=(l+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0 l=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(x,K)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(A,K)|0,o=o+Math.imul(A,q)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Y)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,Y)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(g,X)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0 var Se=(l+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ae)|0)+Math.imul(h,oe)|0))<<13)|0 l=((o=o+Math.imul(h,ae)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(R,z),i=(i=Math.imul(R,H))+Math.imul(P,z)|0,o=Math.imul(P,H),n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,q)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,q)|0,n=n+Math.imul(x,W)|0,i=(i=i+Math.imul(x,Y)|0)+Math.imul(A,W)|0,o=o+Math.imul(A,Y)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(k,J)|0,o=o+Math.imul(k,$)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,ee)|0,n=n+Math.imul(g,re)|0,i=(i=i+Math.imul(g,ne)|0)+Math.imul(v,re)|0,o=o+Math.imul(v,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0 var Ee=(l+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,le)|0)+Math.imul(h,ue)|0))<<13)|0 l=((o=o+Math.imul(h,le)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(D,z),i=(i=Math.imul(D,H))+Math.imul(B,z)|0,o=Math.imul(B,H),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,q)|0)+Math.imul(P,K)|0,o=o+Math.imul(P,q)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,n=n+Math.imul(x,J)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(A,J)|0,o=o+Math.imul(A,$)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(k,X)|0,o=o+Math.imul(k,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(_,re)|0,o=o+Math.imul(_,ne)|0,n=n+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(v,oe)|0,o=o+Math.imul(v,ae)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,le)|0 var ke=(l+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0 l=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,z),i=(i=Math.imul(j,H))+Math.imul(U,z)|0,o=Math.imul(U,H),n=n+Math.imul(D,K)|0,i=(i=i+Math.imul(D,q)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,q)|0,n=n+Math.imul(R,W)|0,i=(i=i+Math.imul(R,Y)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,Y)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(O,J)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(k,re)|0,o=o+Math.imul(k,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,n=n+Math.imul(g,ue)|0,i=(i=i+Math.imul(g,le)|0)+Math.imul(v,ue)|0,o=o+Math.imul(v,le)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,he)|0 var Me=(l+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,me)|0)+Math.imul(h,pe)|0))<<13)|0 l=((o=o+Math.imul(h,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(j,K),i=(i=Math.imul(j,q))+Math.imul(U,K)|0,o=Math.imul(U,q),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Y)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Y)|0,n=n+Math.imul(R,J)|0,i=(i=i+Math.imul(R,$)|0)+Math.imul(P,J)|0,o=o+Math.imul(P,$)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(x,re)|0,i=(i=i+Math.imul(x,ne)|0)+Math.imul(A,re)|0,o=o+Math.imul(A,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,ae)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,le)|0)+Math.imul(_,ue)|0,o=o+Math.imul(_,le)|0,n=n+Math.imul(g,fe)|0,i=(i=i+Math.imul(g,he)|0)+Math.imul(v,fe)|0,o=o+Math.imul(v,he)|0 var xe=(l+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0 l=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(j,W),i=(i=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,$)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,ee)|0)+Math.imul(P,X)|0,o=o+Math.imul(P,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(A,oe)|0,o=o+Math.imul(A,ae)|0,n=n+Math.imul(E,ue)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,le)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(_,fe)|0,o=o+Math.imul(_,he)|0 var Ae=(l+(n=n+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,me)|0)+Math.imul(v,pe)|0))<<13)|0 l=((o=o+Math.imul(v,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=(i=Math.imul(j,$))+Math.imul(U,J)|0,o=Math.imul(U,$),n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(R,re)|0,i=(i=i+Math.imul(R,ne)|0)+Math.imul(P,re)|0,o=o+Math.imul(P,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(x,ue)|0,i=(i=i+Math.imul(x,le)|0)+Math.imul(A,ue)|0,o=o+Math.imul(A,le)|0,n=n+Math.imul(E,fe)|0,i=(i=i+Math.imul(E,he)|0)+Math.imul(k,fe)|0,o=o+Math.imul(k,he)|0 var Te=(l+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,me)|0)+Math.imul(_,pe)|0))<<13)|0 l=((o=o+Math.imul(_,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,X),i=(i=Math.imul(j,ee))+Math.imul(U,X)|0,o=Math.imul(U,ee),n=n+Math.imul(D,re)|0,i=(i=i+Math.imul(D,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(R,oe)|0,i=(i=i+Math.imul(R,ae)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,ae)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,le)|0,n=n+Math.imul(x,fe)|0,i=(i=i+Math.imul(x,he)|0)+Math.imul(A,fe)|0,o=o+Math.imul(A,he)|0 var Ie=(l+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(k,pe)|0))<<13)|0 l=((o=o+Math.imul(k,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(j,re),i=(i=Math.imul(j,ne))+Math.imul(U,re)|0,o=Math.imul(U,ne),n=n+Math.imul(D,oe)|0,i=(i=i+Math.imul(D,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(R,ue)|0,i=(i=i+Math.imul(R,le)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,le)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,he)|0 var Oe=(l+(n=n+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,me)|0)+Math.imul(A,pe)|0))<<13)|0 l=((o=o+Math.imul(A,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,oe),i=(i=Math.imul(j,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),n=n+Math.imul(D,ue)|0,i=(i=i+Math.imul(D,le)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,le)|0,n=n+Math.imul(R,fe)|0,i=(i=i+Math.imul(R,he)|0)+Math.imul(P,fe)|0,o=o+Math.imul(P,he)|0 var Ce=(l+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(O,pe)|0))<<13)|0 l=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=(i=Math.imul(j,le))+Math.imul(U,ue)|0,o=Math.imul(U,le),n=n+Math.imul(D,fe)|0,i=(i=i+Math.imul(D,he)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,he)|0 var Re=(l+(n=n+Math.imul(R,pe)|0)|0)+((8191&(i=(i=i+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0 l=((o=o+Math.imul(P,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,fe),i=(i=Math.imul(j,he))+Math.imul(U,fe)|0,o=Math.imul(U,he) var Pe=(l+(n=n+Math.imul(D,pe)|0)|0)+((8191&(i=(i=i+Math.imul(D,me)|0)+Math.imul(B,pe)|0))<<13)|0 l=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863 var Ne=(l+(n=Math.imul(j,pe))|0)+((8191&(i=(i=Math.imul(j,me))+Math.imul(U,pe)|0))<<13)|0 return l=((o=Math.imul(U,me))+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,u[0]=ye,u[1]=ge,u[2]=ve,u[3]=be,u[4]=we,u[5]=_e,u[6]=Se,u[7]=Ee,u[8]=ke,u[9]=Me,u[10]=xe,u[11]=Ae,u[12]=Te,u[13]=Ie,u[14]=Oe,u[15]=Ce,u[16]=Re,u[17]=Pe,u[18]=Ne,0!==l&&(u[19]=l,r.length++),r} function m(e,t,r){return(new y).mulp(e,t,r)}function y(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r=this.length+e.length return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length for(var n=0,i=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):m(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1 return n},y.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a>>=1)i++ return 1<>>=13,r[2*a+1]=8191&o,o>>>=13 for(a=2*t;a>=26,t+=n/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e) if(0===t.length)return new a(1) for(var r=this,n=0;n=0) var t,r=e%26,n=(e-r)/26,o=67108863>>>26-r<<26-r if(0!==r){var a=0 for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t] for(t=0;t=0),n=t?(t-t%26)/26:0 var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,l=0;l=0&&(0!==c||l>=n);l--){var f=0|this.words[l] this.words[l]=c<<26-o|f>>>o,c=f&s}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0) var t=e%26,r=(e-t)/26,n=1<=0) var t=e%26,r=(e-t)/26 if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var n=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++ return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e) if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1 else for(var t=0;t>26)-(u/67108864|0),this.words[n+r]=67108863&o}for(;n>26,this.words[n+r]=67108863&o if(0===s)return this.strip() for(i(-1===s),s=0,n=0;n>26,this.words[n]=67108863&o return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,o=0|i.words[i.length-1] 0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]) var s,u=n.length-i.length if("mod"!==t){(s=new a(null)).length=u+1,s.words=new Array(s.length) for(var l=0;l=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]) for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1) s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){return i(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t) var n,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e) if(t.mod.isZero())return t.div var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n) return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){i(e<=67108863) for(var t=(1<<26)%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e return r},a.prototype.idivn=function(e){i(e<=67108863) for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*t this.words[r]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero()) var t=this,r=e.clone() t=0!==t.negative?t.umod(e):t.clone() for(var n=new a(1),o=new a(0),s=new a(0),u=new a(1),l=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++l for(var c=r.clone(),f=t.clone();!t.isZero();){for(var h=0,d=1;0==(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(c),o.isub(f)),n.iushrn(1),o.iushrn(1) for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||u.isOdd())&&(s.iadd(c),u.isub(f)),s.iushrn(1),u.iushrn(1) t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(u)):(r.isub(t),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(l)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero()) var t=this,r=e.clone() t=0!==t.negative?t.umod(e):t.clone() for(var n,o=new a(1),s=new a(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var l=0,c=1;0==(t.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(t.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1) for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1) t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return(n=0===t.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(e),n},a.prototype.gcd=function(e){if(this.isZero())return e.abs() if(e.isZero())return this.abs() var t=this.clone(),r=e.clone() t.negative=0,r.negative=0 for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1) for(;;){for(;t.isEven();)t.iushrn(1) for(;r.isEven();)r.iushrn(1) var i=t.cmp(r) if(i<0){var o=t t=r,r=o}else if(0===i||0===r.cmpn(1))break t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e) var t=e%26,r=(e-t)/26,n=1<>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0 if(0!==this.negative&&!r)return-1 if(0===this.negative&&r)return 1 if(this.strip(),this.length>1)t=1 else{r&&(e=-e),i(e<=67108863,"Number is too big") var n=0|this.words[0] t=n===e?0:ne.length)return 1 if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r] if(n!==i){ni&&(t=1) break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new E(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)} var g={k256:null,p224:null,p192:null,p25519:null} function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=a._prime(e) this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function k(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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 e=new a(null) return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n) var n=t0?r.isub(this.p):r.strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},o(b,v),b.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=o}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2 for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(g[e])return g[e] var t if("k256"===e)t=new b else if("p224"===e)t=new w else if("p192"===e)t=new _ else{if("p25519"!==e)throw new Error("Unknown prime "+e) t=new S}return g[e]=t,t},E.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){i(0==(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t) var r=e.add(t) return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t) var r=e.iadd(t) return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(e,t){this._verify2(e,t) var r=e.sub(t) return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t) var r=e.isub(t) return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone() var t=this.m.andln(3) if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2) return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1) i(!n.isZero()) var s=new a(1).toRed(this),u=s.redNeg(),l=this.m.subn(1).iushrn(1),c=this.m.bitLength() for(c=new a(2*c*c).toRed(this);0!==this.pow(c,l).cmp(u);)c.redIAdd(u) for(var f=this.pow(c,n),h=this.pow(e,n.addn(1).iushrn(1)),d=this.pow(e,n),p=o;0!==d.cmp(s);){for(var m=d,y=0;0!==m.cmp(s);y++)m=m.redSqr() i(y=0;n--){for(var l=t.words[n],c=u-1;c>=0;c--){var f=l>>c&1 i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m) return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone() return t.red=null,t},a.mont=function(e){return new k(e)},o(k,E),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv)) return t.red=null,t},k.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},k.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this) var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).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)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(18)(e))},function(e,t,r){var n=r(647) e.exports=function(e){return"string"!=typeof e?e:n(e)?e.slice(2):e}},function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=function(e){if("string"!=typeof e)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+r(e)+", while checking isHexPrefixed.") return"0x"===e.slice(0,2)}},function(e,t,r){!function(e){var t,r,n,i=String.fromCharCode function o(e){for(var t,r,n=[],i=0,o=e.length;i=55296&&t<=56319&&i=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return i(e>>t&63|128)}function u(e){if(0==(4294967168&e))return i(e) var t="" return 0==(4294965248&e)?t=i(e>>6&31|192):0==(4294901760&e)?(a(e),t=i(e>>12&15|224),t+=s(e,6)):0==(4292870144&e)&&(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)),t+i(63&e|128)}function l(){if(n>=r)throw Error("Invalid byte index") var e=255&t[n] if(n++,128==(192&e))return 63&e throw Error("Invalid continuation byte")}function c(){var e,i if(n>r)throw Error("Invalid byte index") if(n==r)return!1 if(e=255&t[n],n++,0==(128&e))return e if(192==(224&e)){if((i=(31&e)<<6|l())>=128)return i throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|l()<<6|l())>=2048)return a(i),i throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|l()<<12|l()<<6|l())>=65536&&i<=1114111)return i throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=o(e),r=t.length,n=-1,i="";++n65535&&(o+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),o+=i(t) return o}(s)}}(t)},function(e,t){var r="0123456789abcdef".split(""),n=[1,256,65536,16777216],i=[0,8,16,24],o=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],a=function(e){var t,r,n,i,a,s,u,l,c,f,h,d,p,m,y,g,v,b,w,_,S,E,k,M,x,A,T,I,O,C,R,P,N,D,B,L,j,U,F,z,H,V,K,q,G,W,Y,Z,J,$,Q,X,ee,te,re,ne,ie,oe,ae,se,ue,le,ce for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],a=e[1]^e[11]^e[21]^e[31]^e[41],s=e[2]^e[12]^e[22]^e[32]^e[42],u=e[3]^e[13]^e[23]^e[33]^e[43],l=e[4]^e[14]^e[24]^e[34]^e[44],c=e[5]^e[15]^e[25]^e[35]^e[45],f=e[6]^e[16]^e[26]^e[36]^e[46],h=e[7]^e[17]^e[27]^e[37]^e[47],t=(d=e[8]^e[18]^e[28]^e[38]^e[48])^(s<<1|u>>>31),r=(p=e[9]^e[19]^e[29]^e[39]^e[49])^(u<<1|s>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(l<<1|c>>>31),r=a^(c<<1|l>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=s^(f<<1|h>>>31),r=u^(h<<1|f>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=l^(d<<1|p>>>31),r=c^(p<<1|d>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=f^(i<<1|a>>>31),r=h^(a<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,m=e[0],y=e[1],W=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,g=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,$=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,M=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=m^~g&b,e[1]=y^~v&w,e[10]=M^~A&I,e[11]=x^~T&O,e[20]=D^~L&U,e[21]=B^~j&F,e[30]=q^~W&Z,e[31]=G^~Y&J,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=g^~b&_,e[3]=v^~w&S,e[12]=A^~I&C,e[13]=T^~O&R,e[22]=L^~U&z,e[23]=j^~F&H,e[32]=W^~Z&$,e[33]=Y^~J&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=b^~_&E,e[5]=w^~S&k,e[14]=I^~C&P,e[15]=O^~R&N,e[24]=U^~z&V,e[25]=F^~H&K,e[34]=Z^~$&X,e[35]=J^~Q&ee,e[44]=oe^~se&le,e[45]=ae^~ue&ce,e[6]=_^~E&m,e[7]=S^~k&y,e[16]=C^~P&M,e[17]=R^~N&x,e[26]=z^~V&D,e[27]=H^~K&B,e[36]=$^~X&q,e[37]=Q^~ee&G,e[46]=se^~le&te,e[47]=ue^~ce&re,e[8]=E^~m&g,e[9]=k^~y&v,e[18]=P^~M&A,e[19]=N^~x&T,e[28]=V^~D&L,e[29]=K^~B&j,e[38]=X^~q&W,e[39]=ee^~G&Y,e[48]=le^~te&ne,e[49]=ce^~re&ie,e[0]^=o[n],e[1]^=o[n+1]},s=function(e){return function(t){var o if("0x"===t.slice(0,2)){o=[] for(var s=2,u=t.length;s>2]|=t[d]<>2]|=o<>2]|=(192|o>>6)<>2]|=(128|63&o)<=57344?(u[y>>2]|=(224|o>>12)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<>2]|=(240|o>>18)<>2]|=(128|o>>12&63)<>2]|=(128|o>>6&63)<>2]|=(128|63&o)<=l){for(e.start=y-l,e.block=u[c],y=0;y>2]|=n[3&y],e.lastByteIndex===l)for(u[0]=u[c],y=1;y>4&15]+r[15&p]+r[p>>12&15]+r[p>>8&15]+r[p>>20&15]+r[p>>16&15]+r[p>>28&15]+r[p>>24&15] g%c==0&&(a(h),y=0)}return"0x"+m}(function(e){return{blocks:[],reset:!0,block:0,start:0,blockCount:1600-(e<<1)>>5,outputBlocks:e>>5,s:(t=[0,0,0,0,0,0,0,0,0,0],[].concat(t,t,t,t,t))} var t}(e),o)}} e.exports={keccak256:s(256),keccak512:s(512),keccak256s:s(256),keccak512s:s(512)}},function(e,t,r){"use strict" function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}) var i=r(651) function o(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{512}$/i.test(e)||!/^(0x)?[0-9a-f]{512}$/.test(e)&&!/^(0x)?[0-9A-F]{512}$/.test(e))}function a(e,t){"object"===n(t)&&t.constructor===Uint8Array&&(t=i.bytesToHex(t)) for(var r=i.keccak256(t).replace("0x",""),o=0;o<12;o+=4){var a=(parseInt(r.substr(o,2),16)<<8)+parseInt(r.substr(o+2,2),16)&2047,u=1<=48&&e<=57)return e-48 if(e>=65&&e<=70)return e-55 if(e>=97&&e<=102)return e-87 throw new Error("invalid bloom")}function u(e){return!("string"!=typeof e||!/^(0x)?[0-9a-f]{64}$/i.test(e)||!/^(0x)?[0-9a-f]{64}$/.test(e)&&!/^(0x)?[0-9A-F]{64}$/.test(e))}function l(e){return!("string"!=typeof e||!e.match(/^(0x)?[0-9a-fA-F]{40}$/)&&!e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/))}t.isBloom=o,t.isInBloom=a,t.isUserEthereumAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given") if(!l(t))throw new Error('Invalid ethereum address given: "'.concat(t,'"')) return a(e,i.padLeft(t,64))},t.isContractAddressInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given") if(!l(t))throw new Error('Invalid contract address given: "'.concat(t,'"')) return a(e,t)},t.isTopicInBloom=function(e,t){if(!o(e))throw new Error("Invalid bloom given") if(!u(t))throw new Error("Invalid topic") return a(e,t)},t.isTopic=u,t.isAddress=l},function(e,t,r){"use strict" Object.defineProperty(t,"__esModule",{value:!0}) var n=r(652) function i(e){if(null==e)throw new Error("cannot convert null value to array") if("string"==typeof e){var t=e.match(/^(0x)?[0-9a-fA-F]*$/) if(!t)throw new Error("invalid hexidecimal string") if("0x"!==t[1])throw new Error("hex string must have 0x prefix");(e=e.substring(2)).length%2&&(e="0"+e) for(var r=[],n=0;n=256||parseInt(String(r))!=r)return!1}return!0}(e))return o(new Uint8Array(e)) throw new Error("invalid arrayify value")}function o(e){var t=arguments return void 0!==e.slice||(e.slice=function(){var r=Array.prototype.slice.call(t) return o(new Uint8Array(Array.prototype.slice.apply(e,r)))}),e}t.keccak256=function(e){return"0x"+n.keccak_256(i(e))},t.padLeft=function(e,t){var r=/^0x/i.test(e)||"number"==typeof e,n=t-(e=e.toString().replace(/^0x/i,"")).length+1>=0?t-e.length+1:0 return(r?"0x":"")+new Array(n).join("0")+e},t.bytesToHex=function(e){for(var t=[],r=0;r>>4).toString(16)),t.push((15&e[r]).toString(16)) return"0x".concat(t.join("").replace(/^0+/,""))},t.toByteArray=i},function(e,t,r){(function(e,n,i){var o function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)} /** * [js-sha3]{@link https://github.com/emn178/js-sha3} * * @version 0.8.0 * @author Chen, Yi-Cyuan [emn178@gmail.com] * @copyright Chen, Yi-Cyuan 2015-2018 * @license MIT */!function(){"use strict" var s="input is invalid type",u="object"===("undefined"==typeof window?"undefined":a(window)),l=u?window:{} l.JS_SHA3_NO_WINDOW&&(u=!1) var c=!u&&"object"===("undefined"==typeof self?"undefined":a(self)) !l.JS_SHA3_NO_NODE_JS&&"object"===(void 0===e?"undefined":a(e))&&e.versions&&e.versions.node?l=n:c&&(l=self) var f=!l.JS_SHA3_NO_COMMON_JS&&"object"===a(i)&&i.exports,h=r(59),d=!l.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,p="0123456789abcdef".split(""),m=[4,1024,262144,67108864],y=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],v=[224,256,384,512],b=[128,256],w=["hex","buffer","arrayBuffer","array","digest"],_={128:168,256:136} !l.JS_SHA3_NO_NODE_JS&&Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),!d||!l.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(e){return"object"===a(e)&&e.buffer&&e.buffer.constructor===ArrayBuffer}) for(var S=function(e,t,r){return function(n){return new L(e,t,e).update(n)[r]()}},E=function(e,t,r){return function(n,i){return new L(e,t,i).update(n)[r]()}},k=function(e,t,r){return function(t,n,i,o){return I["cshake"+e].update(t,n,i,o)[r]()}},M=function(e,t,r){return function(t,n,i,o){return I["kmac"+e].update(t,n,i,o)[r]()}},x=function(e,t,r,n){for(var i=0;i>5,this.byteCount=this.blockCount<<2,this.outputBlocks=r>>5,this.extraBytes=(31&r)>>3 for(var n=0;n<50;++n)this.s[n]=0}function j(e,t,r){L.call(this,e,t,r)}L.prototype.update=function(e){if(this.finalized)throw new Error("finalize already called") var t,r=a(e) if("string"!==r){if("object"!==r)throw new Error(s) if(null===e)throw new Error(s) if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e) else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(s) t=!0}for(var n,i,o=this.blocks,u=this.byteCount,l=e.length,c=this.blockCount,f=0,h=this.s;f>2]|=e[f]<>2]|=i<>2]|=(192|i>>6)<>2]|=(128|63&i)<=57344?(o[n>>2]|=(224|i>>12)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<>2]|=(240|i>>18)<>2]|=(128|i>>12&63)<>2]|=(128|i>>6&63)<>2]|=(128|63&i)<=u){for(this.start=n-u,this.block=o[c],n=0;n>=8);r>0;)i.unshift(r),r=255&(e>>=8),++n return t?i.push(n):i.unshift(n),this.update(i),i.length},L.prototype.encodeString=function(e){var t,r=a(e) if("string"!==r){if("object"!==r)throw new Error(s) if(null===e)throw new Error(s) if(d&&e.constructor===ArrayBuffer)e=new Uint8Array(e) else if(!(Array.isArray(e)||d&&ArrayBuffer.isView(e)))throw new Error(s) t=!0}var n=0,i=e.length if(t)n=i else for(var o=0;o=57344?n+=3:(u=65536+((1023&u)<<10|1023&e.charCodeAt(++o)),n+=4)}return n+=this.encode(8*n),this.update(e),n},L.prototype.bytepad=function(e,t){for(var r=this.encode(t),n=0;n>2]|=this.padding[3&t],this.lastByteIndex===this.byteCount)for(e[0]=e[r],t=1;t>4&15]+p[15&e]+p[e>>12&15]+p[e>>8&15]+p[e>>20&15]+p[e>>16&15]+p[e>>28&15]+p[e>>24&15] a%t==0&&(U(r),o=0)}return i&&(e=r[o],s+=p[e>>4&15]+p[15&e],i>1&&(s+=p[e>>12&15]+p[e>>8&15]),i>2&&(s+=p[e>>20&15]+p[e>>16&15])),s},L.prototype.arrayBuffer=function(){this.finalize() var e,t=this.blockCount,r=this.s,n=this.outputBlocks,i=this.extraBytes,o=0,a=0,s=this.outputBits>>3 e=i?new ArrayBuffer(n+1<<2):new ArrayBuffer(s) for(var u=new Uint32Array(e);a>8&255,u[e+2]=t>>16&255,u[e+3]=t>>24&255 s%r==0&&U(n)}return o&&(e=s<<2,t=n[a],u[e]=255&t,o>1&&(u[e+1]=t>>8&255),o>2&&(u[e+2]=t>>16&255)),u},j.prototype=new L,j.prototype.finalize=function(){return this.encode(this.outputBits,!0),L.prototype.finalize.call(this)} var U=function(e){var t,r,n,i,o,a,s,u,l,c,f,h,d,p,m,y,v,b,w,_,S,E,k,M,x,A,T,I,O,C,R,P,N,D,B,L,j,U,F,z,H,V,K,q,G,W,Y,Z,J,$,Q,X,ee,te,re,ne,ie,oe,ae,se,ue,le,ce for(n=0;n<48;n+=2)i=e[0]^e[10]^e[20]^e[30]^e[40],o=e[1]^e[11]^e[21]^e[31]^e[41],a=e[2]^e[12]^e[22]^e[32]^e[42],s=e[3]^e[13]^e[23]^e[33]^e[43],u=e[4]^e[14]^e[24]^e[34]^e[44],l=e[5]^e[15]^e[25]^e[35]^e[45],c=e[6]^e[16]^e[26]^e[36]^e[46],f=e[7]^e[17]^e[27]^e[37]^e[47],t=(h=e[8]^e[18]^e[28]^e[38]^e[48])^(a<<1|s>>>31),r=(d=e[9]^e[19]^e[29]^e[39]^e[49])^(s<<1|a>>>31),e[0]^=t,e[1]^=r,e[10]^=t,e[11]^=r,e[20]^=t,e[21]^=r,e[30]^=t,e[31]^=r,e[40]^=t,e[41]^=r,t=i^(u<<1|l>>>31),r=o^(l<<1|u>>>31),e[2]^=t,e[3]^=r,e[12]^=t,e[13]^=r,e[22]^=t,e[23]^=r,e[32]^=t,e[33]^=r,e[42]^=t,e[43]^=r,t=a^(c<<1|f>>>31),r=s^(f<<1|c>>>31),e[4]^=t,e[5]^=r,e[14]^=t,e[15]^=r,e[24]^=t,e[25]^=r,e[34]^=t,e[35]^=r,e[44]^=t,e[45]^=r,t=u^(h<<1|d>>>31),r=l^(d<<1|h>>>31),e[6]^=t,e[7]^=r,e[16]^=t,e[17]^=r,e[26]^=t,e[27]^=r,e[36]^=t,e[37]^=r,e[46]^=t,e[47]^=r,t=c^(i<<1|o>>>31),r=f^(o<<1|i>>>31),e[8]^=t,e[9]^=r,e[18]^=t,e[19]^=r,e[28]^=t,e[29]^=r,e[38]^=t,e[39]^=r,e[48]^=t,e[49]^=r,p=e[0],m=e[1],W=e[11]<<4|e[10]>>>28,Y=e[10]<<4|e[11]>>>28,I=e[20]<<3|e[21]>>>29,O=e[21]<<3|e[20]>>>29,se=e[31]<<9|e[30]>>>23,ue=e[30]<<9|e[31]>>>23,V=e[40]<<18|e[41]>>>14,K=e[41]<<18|e[40]>>>14,D=e[2]<<1|e[3]>>>31,B=e[3]<<1|e[2]>>>31,y=e[13]<<12|e[12]>>>20,v=e[12]<<12|e[13]>>>20,Z=e[22]<<10|e[23]>>>22,J=e[23]<<10|e[22]>>>22,C=e[33]<<13|e[32]>>>19,R=e[32]<<13|e[33]>>>19,le=e[42]<<2|e[43]>>>30,ce=e[43]<<2|e[42]>>>30,te=e[5]<<30|e[4]>>>2,re=e[4]<<30|e[5]>>>2,L=e[14]<<6|e[15]>>>26,j=e[15]<<6|e[14]>>>26,b=e[25]<<11|e[24]>>>21,w=e[24]<<11|e[25]>>>21,$=e[34]<<15|e[35]>>>17,Q=e[35]<<15|e[34]>>>17,P=e[45]<<29|e[44]>>>3,N=e[44]<<29|e[45]>>>3,M=e[6]<<28|e[7]>>>4,x=e[7]<<28|e[6]>>>4,ne=e[17]<<23|e[16]>>>9,ie=e[16]<<23|e[17]>>>9,U=e[26]<<25|e[27]>>>7,F=e[27]<<25|e[26]>>>7,_=e[36]<<21|e[37]>>>11,S=e[37]<<21|e[36]>>>11,X=e[47]<<24|e[46]>>>8,ee=e[46]<<24|e[47]>>>8,q=e[8]<<27|e[9]>>>5,G=e[9]<<27|e[8]>>>5,A=e[18]<<20|e[19]>>>12,T=e[19]<<20|e[18]>>>12,oe=e[29]<<7|e[28]>>>25,ae=e[28]<<7|e[29]>>>25,z=e[38]<<8|e[39]>>>24,H=e[39]<<8|e[38]>>>24,E=e[48]<<14|e[49]>>>18,k=e[49]<<14|e[48]>>>18,e[0]=p^~y&b,e[1]=m^~v&w,e[10]=M^~A&I,e[11]=x^~T&O,e[20]=D^~L&U,e[21]=B^~j&F,e[30]=q^~W&Z,e[31]=G^~Y&J,e[40]=te^~ne&oe,e[41]=re^~ie&ae,e[2]=y^~b&_,e[3]=v^~w&S,e[12]=A^~I&C,e[13]=T^~O&R,e[22]=L^~U&z,e[23]=j^~F&H,e[32]=W^~Z&$,e[33]=Y^~J&Q,e[42]=ne^~oe&se,e[43]=ie^~ae&ue,e[4]=b^~_&E,e[5]=w^~S&k,e[14]=I^~C&P,e[15]=O^~R&N,e[24]=U^~z&V,e[25]=F^~H&K,e[34]=Z^~$&X,e[35]=J^~Q&ee,e[44]=oe^~se&le,e[45]=ae^~ue&ce,e[6]=_^~E&p,e[7]=S^~k&m,e[16]=C^~P&M,e[17]=R^~N&x,e[26]=z^~V&D,e[27]=H^~K&B,e[36]=$^~X&q,e[37]=Q^~ee&G,e[46]=se^~le&te,e[47]=ue^~ce&re,e[8]=E^~p&y,e[9]=k^~m&v,e[18]=P^~M&A,e[19]=N^~x&T,e[28]=V^~D&L,e[29]=K^~B&j,e[38]=X^~q&W,e[39]=ee^~G&Y,e[48]=le^~te&ne,e[49]=ce^~re&ie,e[0]^=g[n],e[1]^=g[n+1]} if(f)i.exports=I else{for(C=0;C32||n256)throw new Error("Invalid uint"+n+" size") if((i=s(t)).bitLength()>n)throw new Error("Supplied uint exceeds width: "+n+" vs "+i.bitLength()) if(i.lt(new o(0)))throw new Error("Supplied uint "+i.toString()+" is negative") return n?a.leftPad(i.toString("hex"),n/8*2):i}if(e.startsWith("int")){if(n%8||n<8||n>256)throw new Error("Invalid int"+n+" size") if((i=s(t)).bitLength()>n)throw new Error("Supplied int exceeds width: "+n+" vs "+i.bitLength()) return i.lt(new o(0))?i.toTwos(n).toString("hex"):n?a.leftPad(i.toString("hex"),n/8*2):i}throw new Error("Unsupported or invalid type: "+e)},l=function(e){if(i.isArray(e))throw new Error("Autodetection of array types is not supported.") var t,r,n="" if(i.isObject(e)&&(e.hasOwnProperty("v")||e.hasOwnProperty("t")||e.hasOwnProperty("value")||e.hasOwnProperty("type"))?(t=e.hasOwnProperty("t")?e.t:e.type,n=e.hasOwnProperty("v")?e.v:e.value):(t=a.toHex(e,!0),n=a.toHex(e),t.startsWith("int")||t.startsWith("uint")||(t="bytes")),!t.startsWith("int")&&!t.startsWith("uint")||"string"!=typeof n||/^(-)?0x/i.test(n)||(n=new o(n)),i.isArray(n)){if((r=function(e){var t=/^\D+\d*\[(\d+)\]$/.exec(e) return t?parseInt(t[1],10):null}(t))&&n.length!==r)throw new Error(t+" is not matching the given array "+JSON.stringify(n)) r=n.length}return i.isArray(n)?n.map((function(e){return u(t,e,r).toString("hex").replace("0x","")})).join(""):u(t,n,r).toString("hex").replace("0x","")} e.exports={soliditySha3:function(){var e=Array.prototype.slice.call(arguments),t=i.map(e,l) return a.sha3("0x"+t.join(""))},soliditySha3Raw:function(){return a.sha3Raw("0x"+i.map(Array.prototype.slice.call(arguments),l).join(""))}}},function(e,t,r){"use strict";(function(t,n){var i=r(7).Buffer,o=t.crypto||t.msCrypto o&&o.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes") var r=i.allocUnsafe(e) if(e>0)if(e>65536)for(var a=0;a