/*! ExcelJS 21-08-2021 */ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).ExcelJS=t()}}((function(){return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[a]={exports:{}};e[a][0].call(f.exports,(function(t){return i(e[a][1][t]||t)}),f,f.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a2&&void 0!==arguments[2]?arguments[2]:0;if(n(this,t),r)if("string"==typeof r){var a=o.decodeAddress(r);this.nativeCol=a.col+i,this.nativeColOff=0,this.nativeRow=a.row+i,this.nativeRowOff=0}else void 0!==r.nativeCol?(this.nativeCol=r.nativeCol||0,this.nativeColOff=r.nativeColOff||0,this.nativeRow=r.nativeRow||0,this.nativeRowOff=r.nativeRowOff||0):void 0!==r.col?(this.col=r.col+i,this.row=r.row+i):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0);else this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0;this.worksheet=e}var e,r,a;return e=t,a=[{key:"asInstance",value:function(e){return e instanceof t||null==e?e:new t(e)}}],(r=[{key:"col",get:function(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set:function(t){this.nativeCol=Math.floor(t),this.nativeColOff=Math.floor((t-this.nativeCol)*this.colWidth)}},{key:"row",get:function(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set:function(t){this.nativeRow=Math.floor(t),this.nativeRowOff=Math.floor((t-this.nativeRow)*this.rowHeight)}},{key:"colWidth",get:function(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}},{key:"rowHeight",get:function(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}},{key:"model",get:function(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}},set:function(t){this.nativeCol=t.nativeCol,this.nativeColOff=t.nativeColOff,this.nativeRow=t.nativeRow,this.nativeRowOff=t.nativeRowOff}}])&&i(e.prototype,r),a&&i(e,a),t}();e.exports=a},{"../utils/col-cache":19}],3:[function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r0||this.type===t.Types.Merge}},{key:"master",get:function(){return this.type===t.Types.Merge?this._value.master:this}},{key:"isHyperlink",get:function(){return this._value.type===t.Types.Hyperlink}},{key:"hyperlink",get:function(){return this._value.hyperlink}},{key:"value",get:function(){return this._value.value},set:function(e){this.type!==t.Types.Merge?(this._value.release(),this._value=S.create(S.getType(e),this,e)):this._value.master.value=e}},{key:"note",get:function(){return this._comment&&this._comment.note},set:function(t){this._comment=new f(t)}},{key:"text",get:function(){return this._value.toString()}},{key:"html",get:function(){return s.escapeHtml(this.text)}},{key:"formula",get:function(){return this._value.formula}},{key:"result",get:function(){return this._value.result}},{key:"formulaType",get:function(){return this._value.formulaType}},{key:"fullAddress",get:function(){return{sheetName:this._row.worksheet.name,address:this.address,row:this.row,col:this.col}}},{key:"name",get:function(){return this.names[0]},set:function(t){this.names=[t]}},{key:"names",get:function(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set:function(t){var e=this,r=this.workbook.definedNames;r.removeAllNames(this.fullAddress),t.forEach((function(t){r.addEx(e.fullAddress,t)}))}},{key:"_dataValidations",get:function(){return this.worksheet.dataValidations}},{key:"dataValidation",get:function(){return this._dataValidations.find(this.address)},set:function(t){this._dataValidations.add(this.address,t)}},{key:"model",get:function(){var t=this._value.model;return t.style=this.style,this._comment&&(t.comment=this._comment.model),t},set:function(t){if(this._value.release(),this._value=S.create(t.type,this),this._value.model=t,t.comment)switch(t.comment.type){case"note":this._comment=f.fromModel(t.comment)}t.style?this.style=t.style:this.style={}}}]),t}();l.Types=u.ValueType;var h=function(){function t(e){n(this,t),this.model={address:e.address,type:l.Types.Null}}return o(t,[{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){}},{key:"toString",value:function(){return""}},{key:"value",get:function(){return null},set:function(t){}},{key:"type",get:function(){return l.Types.Null}},{key:"effectiveType",get:function(){return l.Types.Null}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),d=function(){function t(e,r){n(this,t),this.model={address:e.address,type:l.Types.Number,value:r}}return o(t,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(t){this.model.value=t}},{key:"type",get:function(){return l.Types.Number}},{key:"effectiveType",get:function(){return l.Types.Number}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),p=function(){function t(e,r){n(this,t),this.model={address:e.address,type:l.Types.String,value:r}}return o(t,[{key:"toCsvString",value:function(){return'"'.concat(this.model.value.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.value},set:function(t){this.model.value=t}},{key:"type",get:function(){return l.Types.String}},{key:"effectiveType",get:function(){return l.Types.String}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),m=function(){function t(e,r){n(this,t),this.model={address:e.address,type:l.Types.String,value:r}}return o(t,[{key:"toString",value:function(){return this.model.value.richText.map((function(t){return t.text})).join("")}},{key:"toCsvString",value:function(){return'"'.concat(this.text.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"value",get:function(){return this.model.value},set:function(t){this.model.value=t}},{key:"type",get:function(){return l.Types.RichText}},{key:"effectiveType",get:function(){return l.Types.RichText}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),y=function(){function t(e,r){n(this,t),this.model={address:e.address,type:l.Types.Date,value:r}}return o(t,[{key:"toCsvString",value:function(){return this.model.value.toISOString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(t){this.model.value=t}},{key:"type",get:function(){return l.Types.Date}},{key:"effectiveType",get:function(){return l.Types.Date}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),b=function(){function t(e,r){n(this,t),this.model={address:e.address,type:l.Types.Hyperlink,text:r?r.text:void 0,hyperlink:r?r.hyperlink:void 0},r&&r.tooltip&&(this.model.tooltip=r.tooltip)}return o(t,[{key:"toCsvString",value:function(){return this.model.hyperlink}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.text}},{key:"value",get:function(){var t={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(t.tooltip=this.model.tooltip),t},set:function(t){this.model={text:t.text,hyperlink:t.hyperlink},t.tooltip&&(this.model.tooltip=t.tooltip)}},{key:"text",get:function(){return this.model.text},set:function(t){this.model.text=t}},{key:"hyperlink",get:function(){return this.model.hyperlink},set:function(t){this.model.hyperlink=t}},{key:"type",get:function(){return l.Types.Hyperlink}},{key:"effectiveType",get:function(){return l.Types.Hyperlink}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),v=function(){function t(e,r){n(this,t),this.model={address:e.address,type:l.Types.Merge,master:r?r.address:void 0},this._master=r,r&&r.addMergeRef()}return o(t,[{key:"isMergedTo",value:function(t){return t===this._master}},{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){this._master.releaseMergeRef()}},{key:"toString",value:function(){return this.value.toString()}},{key:"value",get:function(){return this._master.value},set:function(t){t instanceof l?(this._master&&this._master.releaseMergeRef(),t.addMergeRef(),this._master=t):this._master.value=t}},{key:"master",get:function(){return this._master}},{key:"type",get:function(){return l.Types.Merge}},{key:"effectiveType",get:function(){return this._master.effectiveType}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),g=function(){function t(e,r){n(this,t),this.cell=e,this.model={address:e.address,type:l.Types.Formula,shareType:r?r.shareType:void 0,ref:r?r.ref:void 0,formula:r?r.formula:void 0,sharedFormula:r?r.sharedFormula:void 0,result:r?r.result:void 0}}return o(t,[{key:"_copyModel",value:function(t){var e={},r=function(r){var n=t[r];n&&(e[r]=n)};return r("formula"),r("result"),r("ref"),r("shareType"),r("sharedFormula"),e}},{key:"validate",value:function(t){switch(S.getType(t)){case l.Types.Null:case l.Types.String:case l.Types.Number:case l.Types.Date:break;case l.Types.Hyperlink:case l.Types.Formula:default:throw new Error("Cannot process that type of result value")}}},{key:"_getTranslatedFormula",value:function(){if(!this._translatedFormula&&this.model.sharedFormula){var t=this.cell.worksheet.findCell(this.model.sharedFormula);this._translatedFormula=t&&c(t.formula,t.address,this.model.address)}return this._translatedFormula}},{key:"toCsvString",value:function(){return"".concat(this.model.result||"")}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.result?this.model.result.toString():""}},{key:"value",get:function(){return this._copyModel(this.model)},set:function(t){this.model=this._copyModel(t)}},{key:"dependencies",get:function(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}},{key:"formula",get:function(){return this.model.formula||this._getTranslatedFormula()},set:function(t){this.model.formula=t}},{key:"formulaType",get:function(){return this.model.formula?u.FormulaType.Master:this.model.sharedFormula?u.FormulaType.Shared:u.FormulaType.None}},{key:"result",get:function(){return this.model.result},set:function(t){this.model.result=t}},{key:"type",get:function(){return l.Types.Formula}},{key:"effectiveType",get:function(){var t=this.model.result;return null==t?u.ValueType.Null:t instanceof String||"string"==typeof t?u.ValueType.String:"number"==typeof t?u.ValueType.Number:t instanceof Date?u.ValueType.Date:t.text&&t.hyperlink?u.ValueType.Hyperlink:t.formula?u.ValueType.Formula:u.ValueType.Null}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),w=function(){function t(e,r){n(this,t),this.model={address:e.address,type:l.Types.SharedString,value:r}}return o(t,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(t){this.model.value=t}},{key:"type",get:function(){return l.Types.SharedString}},{key:"effectiveType",get:function(){return l.Types.SharedString}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),_=function(){function t(e,r){n(this,t),this.model={address:e.address,type:l.Types.Boolean,value:r}}return o(t,[{key:"toCsvString",value:function(){return this.model.value?1:0}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(t){this.model.value=t}},{key:"type",get:function(){return l.Types.Boolean}},{key:"effectiveType",get:function(){return l.Types.Boolean}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),k=function(){function t(e,r){n(this,t),this.model={address:e.address,type:l.Types.Error,value:r}}return o(t,[{key:"toCsvString",value:function(){return this.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.error.toString()}},{key:"value",get:function(){return this.model.value},set:function(t){this.model.value=t}},{key:"type",get:function(){return l.Types.Error}},{key:"effectiveType",get:function(){return l.Types.Error}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),x=function(){function t(e,r){n(this,t),this.model={address:e.address,type:l.Types.String,value:JSON.stringify(r),rawValue:r}}return o(t,[{key:"toCsvString",value:function(){return this.model.value}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.rawValue},set:function(t){this.model.rawValue=t,this.model.value=JSON.stringify(t)}},{key:"type",get:function(){return l.Types.String}},{key:"effectiveType",get:function(){return l.Types.String}},{key:"address",get:function(){return this.model.address},set:function(t){this.model.address=t}}]),t}(),S={getType:function(t){return null==t?l.Types.Null:t instanceof String||"string"==typeof t?l.Types.String:"number"==typeof t?l.Types.Number:"boolean"==typeof t?l.Types.Boolean:t instanceof Date?l.Types.Date:t.text&&t.hyperlink?l.Types.Hyperlink:t.formula||t.sharedFormula?l.Types.Formula:t.richText?l.Types.RichText:t.sharedString?l.Types.SharedString:t.error?l.Types.Error:l.Types.JSON},types:[{t:l.Types.Null,f:h},{t:l.Types.Number,f:d},{t:l.Types.String,f:p},{t:l.Types.Date,f:y},{t:l.Types.Hyperlink,f:b},{t:l.Types.Formula,f:g},{t:l.Types.Merge,f:v},{t:l.Types.JSON,f:x},{t:l.Types.SharedString,f:w},{t:l.Types.RichText,f:m},{t:l.Types.Boolean,f:_},{t:l.Types.Error,f:k}].reduce((function(t,e){return t[e.t]=e.f,t}),[]),create:function(t,e,r){var n=this.types[t];if(!n)throw new Error("Could not create Value of type ".concat(t));return new n(e,r)}};e.exports=l},{"../utils/col-cache":19,"../utils/shared-formula":22,"../utils/under-dash":25,"./enums":7,"./note":9}],4:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r=this._worksheet.properties.outlineLevelCol)}},{key:"isDefault",get:function(){if(this.isCustomWidth)return!1;if(this.hidden)return!1;if(this.outlineLevel)return!1;var t=this.style;return!t||!(t.font||t.numFmt||t.alignment||t.border||t.fill||t.protection)}},{key:"headerCount",get:function(){return this.headers.length}},{key:"values",get:function(){var t=[];return this.eachCell((function(e,r){e&&e.type!==o.ValueType.Null&&(t[r]=e.value)})),t},set:function(t){var e=this;if(t){var r=this.number,n=0;t.hasOwnProperty("0")&&(n=1),t.forEach((function(t,i){e._worksheet.getCell(i+n,r).value=t}))}}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(t){this._applyStyle("numFmt",t)}},{key:"font",get:function(){return this.style.font},set:function(t){this._applyStyle("font",t)}},{key:"alignment",get:function(){return this.style.alignment},set:function(t){this._applyStyle("alignment",t)}},{key:"protection",get:function(){return this.style.protection},set:function(t){this._applyStyle("protection",t)}},{key:"border",get:function(){return this.style.border},set:function(t){this._applyStyle("border",t)}},{key:"fill",get:function(){return this.style.fill},set:function(t){this._applyStyle("fill",t)}}])&&n(e.prototype,r),s&&n(e,s),t}();e.exports=s},{"../utils/col-cache":19,"../utils/under-dash":25,"./enums":7}],5:[function(t,e,r){"use strict";function n(t,e){for(var r=0;rthis.bottom)&&(this.bottom=r),(!this.model.right||n>this.right)&&(this.right=n)}},{key:"expandRow",value:function(t){if(t){var e=t.dimensions,r=t.number;e&&this.expand(r,e.min,r,e.max)}}},{key:"expandToAddress",value:function(t){var e=o.decodeEx(t);this.expand(e.row,e.col,e.row,e.col)}},{key:"toString",value:function(){return this.range}},{key:"intersects",value:function(t){return!(t.sheetName&&this.sheetName&&t.sheetName!==this.sheetName||t.bottomthis.bottom||t.rightthis.right)}},{key:"contains",value:function(t){var e=o.decodeEx(t);return this.containsEx(e)}},{key:"containsEx",value:function(t){return(!t.sheetName||!this.sheetName||t.sheetName===this.sheetName)&&t.row>=this.top&&t.row<=this.bottom&&t.col>=this.left&&t.col<=this.right}},{key:"forEachAddress",value:function(t){for(var e=this.left;e<=this.right;e++)for(var r=this.top;r<=this.bottom;r++)t(o.encodeAddress(r,e),r,e)}},{key:"top",get:function(){return this.model.top||1},set:function(t){this.model.top=t}},{key:"left",get:function(){return this.model.left||1},set:function(t){this.model.left=t}},{key:"bottom",get:function(){return this.model.bottom||1},set:function(t){this.model.bottom=t}},{key:"right",get:function(){return this.model.right||1},set:function(t){this.model.right=t}},{key:"sheetName",get:function(){return this.model.sheetName},set:function(t){this.model.sheetName=t}},{key:"_serialisedSheetName",get:function(){var t=this.model.sheetName;return t?/^[a-zA-Z0-9]*$/.test(t)?"".concat(t,"!"):"'".concat(t,"'!"):""}},{key:"tl",get:function(){return o.n2l(this.left)+this.top}},{key:"$t$l",get:function(){return"$".concat(o.n2l(this.left),"$").concat(this.top)}},{key:"br",get:function(){return o.n2l(this.right)+this.bottom}},{key:"$b$r",get:function(){return"$".concat(o.n2l(this.right),"$").concat(this.bottom)}},{key:"range",get:function(){return"".concat(this._serialisedSheetName+this.tl,":").concat(this.br)}},{key:"$range",get:function(){return"".concat(this._serialisedSheetName+this.$t$l,":").concat(this.$b$r)}},{key:"shortRange",get:function(){return this.count>1?this.range:this._serialisedSheetName+this.tl}},{key:"$shortRange",get:function(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}},{key:"count",get:function(){return(1+this.bottom-this.top)*(1+this.right-this.left)}}])&&i(e.prototype,r),a&&i(e,a),t}();e.exports=a},{"../utils/col-cache":19}],11:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r2?n-2:0),o=2;o0)for(a=f;a>=r;a--)(s=this._cells[a-1])?((u=this.getCell(a+c)).value=s.value,u.style=s.style,u._comment=s._comment):this._cells[a+c-1]=void 0;for(a=0;ar.col)&&(t=r.col),e0?{min:t,max:e}:null}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(t){this._applyStyle("numFmt",t)}},{key:"font",get:function(){return this.style.font},set:function(t){this._applyStyle("font",t)}},{key:"alignment",get:function(){return this.style.alignment},set:function(t){this._applyStyle("alignment",t)}},{key:"protection",get:function(){return this.style.protection},set:function(t){this._applyStyle("protection",t)}},{key:"border",get:function(){return this.style.border},set:function(t){this._applyStyle("border",t)}},{key:"fill",get:function(){return this.style.fill},set:function(t){this._applyStyle("fill",t)}},{key:"hidden",get:function(){return!!this._hidden},set:function(t){this._hidden=t}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(t){this._outlineLevel=t}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}},{key:"model",get:function(){var t=[],e=0,r=0;return this._cells.forEach((function(n){if(n){var i=n.model;i&&((!e||e>n.col)&&(e=n.col),r0,"Table must be on valid row"),n(s>0,"Table must be on valid col");var u=this.width,c=this.filterHeight,f=this.tableHeight;e.autoFilterRef=a.encode(o,s,o+c-1,s+u-1),e.tableRef=a.encode(o,s,o+f-1,s+u-1),e.columns.forEach((function(e,i){n(e.name,"Column ".concat(i," must have a name")),0===i?r(e,"totalsRowLabel","Total"):(r(e,"totalsRowFunction","none"),e.totalsRowFormula=t.getFormula(e))}))}},{key:"store",value:function(){var t=this,e=function(t,e){e&&Object.keys(e).forEach((function(r){t[r]=e[r]}))},r=this.worksheet,n=this.table,i=n.tl,o=i.row,a=i.col,s=0;if(n.headerRow){var u=r.getRow(o+s++);n.columns.forEach((function(t,r){var n=t.style,i=t.name,o=u.getCell(a+r);o.value=i,e(o,n)}))}if(n.rows.forEach((function(t){var i=r.getRow(o+s++);t.forEach((function(t,r){var o=i.getCell(a+r);o.value=t,e(o,n.columns[r].style)}))})),n.totalsRow){var c=r.getRow(o+s++);n.columns.forEach((function(r,n){var i=c.getCell(a+n);if(0===n)i.value=r.totalsRowLabel;else{var o=t.getFormula(r);i.value=o?{formula:r.totalsRowFormula,result:r.totalsRowResult}:null}e(i,r.style)}))}}},{key:"load",value:function(t){var e=this,r=this.table,n=r.tl,i=n.row,o=n.col,a=0;if(r.headerRow){var s=t.getRow(i+a++);r.columns.forEach((function(t,e){s.getCell(o+e).value=t.name}))}if(r.rows.forEach((function(e){var r=t.getRow(i+a++);e.forEach((function(t,e){r.getCell(o+e).value=t}))})),r.totalsRow){var u=t.getRow(i+a++);r.columns.forEach((function(t,r){var n=u.getCell(o+r);0===r?n.value=t.totalsRowLabel:e.getFormula(t)&&(n.value={formula:t.totalsRowFormula,result:t.totalsRowResult})}))}}},{key:"cacheState",value:function(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}},{key:"commit",value:function(){if(this._cache){this.validate();var t=a.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.rows.splice(t,e)}},{key:"getColumn",value:function(t){var e=this.table.columns[t];return new s(this,e,t)}},{key:"addColumn",value:function(t,e,r){this.cacheState(),void 0===r?(this.table.columns.push(t),this.table.rows.forEach((function(t,r){t.push(e[r])}))):(this.table.columns.splice(r,0,t),this.table.rows.forEach((function(t,n){t.splice(r,0,e[n])})))}},{key:"removeColumns",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.columns.splice(t,e),this.table.rows.forEach((function(r){r.splice(t,e)}))}},{key:"_assign",value:function(t,e,r){this.cacheState(),t[e]=r}},{key:"width",get:function(){return this.table.columns.length}},{key:"height",get:function(){return this.table.rows.length}},{key:"filterHeight",get:function(){return this.height+(this.table.headerRow?1:0)}},{key:"tableHeight",get:function(){return this.filterHeight+(this.table.totalsRow?1:0)}},{key:"model",get:function(){return this.table},set:function(t){this.table=t}},{key:"ref",get:function(){return this.table.ref},set:function(t){this._assign(this.table,"ref",t)}},{key:"name",get:function(){return this.table.name},set:function(t){this.table.name=t}},{key:"displayName",get:function(){return this.table.displyName||this.table.name}},{key:"displayNamename",set:function(t){this.table.displayName=t}},{key:"headerRow",get:function(){return this.table.headerRow},set:function(t){this._assign(this.table,"headerRow",t)}},{key:"totalsRow",get:function(){return this.table.totalsRow},set:function(t){this._assign(this.table,"totalsRow",t)}},{key:"theme",get:function(){return this.table.style.name},set:function(t){this.table.style.name=t}},{key:"showFirstColumn",get:function(){return this.table.style.showFirstColumn},set:function(t){this.table.style.showFirstColumn=t}},{key:"showLastColumn",get:function(){return this.table.style.showLastColumn},set:function(t){this.table.style.showLastColumn=t}},{key:"showRowStripes",get:function(){return this.table.style.showRowStripes},set:function(t){this.table.style.showRowStripes=t}},{key:"showColumnStripes",get:function(){return this.table.style.showColumnStripes},set:function(t){this.table.style.showColumnStripes=t}}]),t}();e.exports=u},{"../utils/col-cache":19}],13:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r31&&console.warn("Worksheet name ".concat(t," exceeds 31 chars. This will be truncated")),/[*?:/\\[\]]/.test(t))throw new Error("Worksheet name ".concat(t," cannot include any of the following characters: * ? : \\ / [ ]"));if(/(^')|('$)/.test(t))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(t));if(t=(t||"sheet".concat(r)).substring(0,31),this._worksheets.find((function(e){return e&&e.name.toLowerCase()===t.toLowerCase()})))throw new Error("Worksheet name already exists: ".concat(t));e&&("string"==typeof e?(console.trace('tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }'),e={properties:{tabColor:{argb:e}}}):(e.argb||e.theme||e.indexed)&&(console.trace("tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }"),e={properties:{tabColor:e}}));var n=this._worksheets.reduce((function(t,e){return(e&&e.orderNo)>t?e.orderNo:t}),0),o=Object.assign({},e,{id:r,name:t,orderNo:n+1,workbook:this}),a=new i(o);return this._worksheets[r]=a,a}},{key:"removeWorksheetEx",value:function(t){delete this._worksheets[t.id]}},{key:"removeWorksheet",value:function(t){var e=this.getWorksheet(t);e&&e.destroy()}},{key:"getWorksheet",value:function(t){return void 0===t?this._worksheets.find(Boolean):"number"==typeof t?this._worksheets[t]:"string"==typeof t?this._worksheets.find((function(e){return e&&e.name===t})):void 0}},{key:"eachSheet",value:function(t){this.worksheets.forEach((function(e){t(e,e.id)}))}},{key:"clearThemes",value:function(){this._themes=void 0}},{key:"addImage",value:function(t){var e=this.media.length;return this.media.push(Object.assign({},t,{type:"image"})),e}},{key:"getImage",value:function(t){return this.media[t]}},{key:"xlsx",get:function(){return this._xlsx||(this._xlsx=new a(this)),this._xlsx}},{key:"csv",get:function(){return this._csv||(this._csv=new s(this)),this._csv}},{key:"nextId",get:function(){for(var t=1;tt.length)&&(e=t.length);for(var r=0,n=new Array(e);rthis._columns.length)for(var r=this._columns.length+1;r<=t;)this._columns.push(new d(this,r++));return this._columns[t-1]}},{key:"spliceColumns",value:function(t,e){for(var r=this,n=this._rows,i=n.length,o=arguments.length,a=new Array(o>2?o-2:0),s=2;s0)for(var u=function(n){var i=[t,e];a.forEach((function(t){i.push(t[n]||null)}));var o=r.getRow(n+1);o.splice.apply(o,i)},c=0;c0)for(var p=h;p>=l;p--)this.getColumn(p+f).defn=this.getColumn(p).defn;for(var m=t;m1&&void 0!==arguments[1]?arguments[1]:"n",r=this._nextRow,n=this.getRow(r);return n.values=t,this._setStyleOption(r,"i"===e[0]?e:"n"),n}},{key:"addRows",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"n",n=[];return t.forEach((function(t){n.push(e.addRow(t,r))})),n}},{key:"insertRow",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"n";return this.spliceRows(t,0,e),this._setStyleOption(t,r),this.getRow(t)}},{key:"insertRows",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"n";if(this.spliceRows.apply(this,[t,0].concat(a(e))),"n"!==r)for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"n";"o"===e[0]&&void 0!==this.findRow(t+1)?this._copyStyle(t+1,t,"+"===e[1]):"i"===e[0]&&void 0!==this.findRow(t-1)&&this._copyStyle(t-1,t,"+"===e[1])}},{key:"_copyStyle",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=this.getRow(t),o=this.getRow(e);o.style=Object.freeze(i({},n.style)),n.eachCell({includeEmpty:r},(function(t,e){o.getCell(e).style=Object.freeze(i({},t.style))})),o.height=n.height}},{key:"duplicateRow",value:function(t,e){var r=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=this._rows[t-1],o=new Array(e).fill(i.values);this.spliceRows.apply(this,[t+1,n?0:e].concat(a(o)));for(var s=function(e){var n=r._rows[t+e];n.style=i.style,n.height=i.height,i.eachCell({includeEmpty:!0},(function(t,e){n.getCell(e).style=t.style}))},u=0;u2?i-2:0),a=2;a0)for(s=l;s>=n;s--)(u=this._rows[s-1])?function(){var t=r.getRow(s+f);t.values=u.values,t.style=u.style,t.height=u.height,u.eachCell({includeEmpty:!0},(function(e,n){if(t.getCell(n).style=e.style,"MergeValue"===e._value.constructor.name){var i=r.getRow(e._row._number+c).getCell(n),o=e._value._master,a=r.getRow(o._row._number+c).getCell(o._column._number);i.merge(a)}}))}():this._rows[s+f-1]=void 0;for(s=0;st.top||i>t.left)&&this.getCell(n,i).merge(r,e);this._merges[r.address]=t}},{key:"_unMergeMaster",value:function(t){var e=this._merges[t.address];if(e){for(var r=e.top;r<=e.bottom;r++)for(var n=e.left;n<=e.right;n++)this.getCell(r,n).unmerge();delete this._merges[t.address]}}},{key:"unMergeCells",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r3&&void 0!==arguments[3]?arguments[3]:"shared",o=f.decode(t),a=o.top,s=o.left,u=o.bottom,c=o.right,l=c-s+1,h=f.encodeAddress(a,s),d="shared"===i;n="function"==typeof r?r:Array.isArray(r)?Array.isArray(r[0])?function(t,e){return r[t-a][e-s]}:function(t,e){return r[(t-a)*l+(e-s)]}:function(){};for(var p=!0,m=a;m<=u;m++)for(var y=s;y<=c;y++)p?(this.getCell(m,y).value={shareType:i,formula:e,ref:t,result:n(m,y)},p=!1):this.getCell(m,y).value=d?{sharedFormula:h,result:n(m,y)}:n(m,y)}},{key:"addImage",value:function(t,e){var r={type:"image",imageId:t,range:e};this._media.push(new m(this,r))}},{key:"getImages",value:function(){return this._media.filter((function(t){return"image"===t.type}))}},{key:"addBackgroundImage",value:function(t){var e={type:"background",imageId:t};this._media.push(new m(this,e))}},{key:"getBackgroundImageId",value:function(){var t=this._media.find((function(t){return"background"===t.type}));return t&&t.imageId}},{key:"protect",value:function(t,e){var r=this;return new Promise((function(n){r.sheetProtection={sheet:!0},e&&"spinCount"in e&&(e.spinCount=Number.isFinite(e.spinCount)?Math.round(Math.max(0,e.spinCount)):1e5),t&&(r.sheetProtection.algorithmName="SHA-512",r.sheetProtection.saltValue=v.randomBytes(16).toString("base64"),r.sheetProtection.spinCount=e&&"spinCount"in e?e.spinCount:1e5,r.sheetProtection.hashValue=v.convertPasswordToHash(t,"SHA512",r.sheetProtection.saltValue,r.sheetProtection.spinCount)),e&&(r.sheetProtection=Object.assign(r.sheetProtection,e),!t&&"spinCount"in e&&delete r.sheetProtection.spinCount),n()}))}},{key:"unprotect",value:function(){this.sheetProtection=null}},{key:"addTable",value:function(t){var e=new y(this,t);return this.tables[t.name]=e,e}},{key:"getTable",value:function(t){return this.tables[t]}},{key:"removeTable",value:function(t){delete this.tables[t]}},{key:"getTables",value:function(){return Object.values(this.tables)}},{key:"addConditionalFormatting",value:function(t){this.conditionalFormattings.push(t)}},{key:"removeConditionalFormatting",value:function(t){"number"==typeof t?this.conditionalFormattings.splice(t,1):this.conditionalFormattings=t instanceof Function?this.conditionalFormattings.filter(t):[]}},{key:"_parseRows",value:function(t){var e=this;this._rows=[],t.rows.forEach((function(t){var r=new h(e,t.number);e._rows[r.number-1]=r,r.model=t}))}},{key:"_parseMergeCells",value:function(t){var e=this;c.each(t.mergeCells,(function(t){e.mergeCellsWithoutStyle(t)}))}},{key:"workbook",get:function(){return this._workbook}},{key:"dimensions",get:function(){var t=new l;return this._rows.forEach((function(e){if(e){var r=e.dimensions;r&&t.expand(e.number,r.min,e.number,r.max)}})),t}},{key:"columns",get:function(){return this._columns},set:function(t){var e=this;this._headerRowCount=t.reduce((function(t,e){var r=(e.header?1:e.headers&&e.headers.length)||0;return Math.max(t,r)}),0);var r=1,n=this._columns=[];t.forEach((function(t){var i=new d(e,r++,!1);n.push(i),i.defn=t}))}},{key:"lastColumn",get:function(){return this.getColumn(this.columnCount)}},{key:"columnCount",get:function(){var t=0;return this.eachRow((function(e){t=Math.max(t,e.cellCount)})),t}},{key:"actualColumnCount",get:function(){var t=[],e=0;return this.eachRow((function(r){r.eachCell((function(r){var n=r.col;t[n]||(t[n]=!0,e++)}))})),e}},{key:"_lastRowNumber",get:function(){for(var t=this._rows,e=t.length;e>0&&void 0===t[e-1];)e--;return e}},{key:"_nextRow",get:function(){return this._lastRowNumber+1}},{key:"lastRow",get:function(){if(this._rows.length)return this._rows[this._rows.length-1]}},{key:"rowCount",get:function(){return this._lastRowNumber}},{key:"actualRowCount",get:function(){var t=0;return this.eachRow((function(){t++})),t}},{key:"hasMerges",get:function(){return c.some(this._merges,Boolean)}},{key:"tabColor",get:function(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor},set:function(t){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=t}},{key:"model",get:function(){var t={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map((function(t){return t.model})),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map((function(t){return t.model})),conditionalFormattings:this.conditionalFormattings};t.cols=d.toModel(this.columns);var e=t.rows=[],r=t.dimensions=new l;return this._rows.forEach((function(t){var n=t&&t.model;n&&(r.expand(n.number,n.min,n.number,n.max),e.push(n))})),t.merges=[],c.each(this._merges,(function(e){t.merges.push(e.range)})),t},set:function(t){var e=this;this.name=t.name,this._columns=d.fromModel(this,t.cols),this._parseRows(t),this._parseMergeCells(t),this.dataValidations=new b(t.dataValidations),this.properties=t.properties,this.pageSetup=t.pageSetup,this.headerFooter=t.headerFooter,this.views=t.views,this.autoFilter=t.autoFilter,this._media=t.media.map((function(t){return new m(e,t)})),this.sheetProtection=t.sheetProtection,this.tables=t.tables.reduce((function(t,e){var r=new y;return r.model=e,t[e.name]=r,t}),{}),this.conditionalFormattings=t.conditionalFormattings}}])&&u(e.prototype,r),n&&u(e,n),t}();e.exports=g},{"../utils/col-cache":19,"../utils/encryptor":20,"../utils/under-dash":25,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(t,e,r){"use strict";var n={Workbook:t("./doc/workbook")},i=t("./doc/enums");Object.keys(i).forEach((function(t){n[t]=i[t]})),e.exports=n},{"./doc/enums":7,"./doc/workbook":13}],16:[function(t,e,r){"use strict";var n="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");r.bufferToString=function(t){return"string"==typeof t?t:n?n.decode(t):t.toString()}},{}],17:[function(t,e,r){"use strict";var n="undefined"==typeof TextEncoder?null:new TextEncoder("utf-8"),i=t("buffer").Buffer;r.stringToBuffer=function(t){return"string"!=typeof t?t:n?i.from(n.encode(t).buffer):i.from(t)}},{buffer:216}],18:[function(t,e,r){"use strict";function n(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&t>=1){for(;a<=26;)e=this._dictionary[a-1],this._n2l[a]=e,this._l2n[e]=a,a++;this._l2nFill=1}if(this._l2nFill<2&&t>=2){for(a=27;a<=702;)n=(r=a-27)%26,i=Math.floor(r/26),e=this._dictionary[i]+this._dictionary[n],this._n2l[a]=e,this._l2n[e]=a,a++;this._l2nFill=2}if(this._l2nFill<3&&t>=3){for(a=703;a<=16384;)n=(r=a-703)%26,i=Math.floor(r/26)%26,o=Math.floor(r/676),e=this._dictionary[o]+this._dictionary[i]+this._dictionary[n],this._n2l[a]=e,this._l2n[e]=a,a++;this._l2nFill=3}},l2n:function(t){if(this._l2n[t]||this._fill(t.length),!this._l2n[t])throw new Error("Out of bounds. Invalid column letter: ".concat(t));return this._l2n[t]},n2l:function(t){if(t<1||t>16384)throw new Error("".concat(t," is out of bounds. Excel supports columns from 1 to 16384"));return this._n2l[t]||this._fill(this._level(t)),this._n2l[t]},_hash:{},validateAddress:function(t){if(!s.test(t))throw new Error("Invalid Address: ".concat(t));return!0},decodeAddress:function(t){var e=t.length<5&&this._hash[t];if(e)return e;for(var r,n=!1,i="",o=0,a=!1,s="",u=0,c=0;c=65&&r<=90)n=!0,i+=t[c],o=26*o+r-64;else if(r>=48&&r<=57)a=!0,s+=t[c],u=10*u+r-48;else if(a&&n&&36!==r)break;if(n){if(o>16384)throw new Error("Out of bounds. Invalid column letter: ".concat(i))}else o=void 0;a||(u=void 0);var f={address:t=i+s,col:o,row:u,$col$row:"$".concat(i,"$").concat(s)};return o<=100&&u<=100&&(this._hash[t]=f,this._hash[f.$col$row]=f),f},getAddress:function(t,e){if(e){var r=this.n2l(e)+t;return this.decodeAddress(r)}return this.decodeAddress(t)},decode:function(t){var e=t.split(":");if(2===e.length){var r=this.decodeAddress(e[0]),n=this.decodeAddress(e[1]),i={top:Math.min(r.row,n.row),left:Math.min(r.col,n.col),bottom:Math.max(r.row,n.row),right:Math.max(r.col,n.col)};return i.tl=this.n2l(i.left)+i.top,i.br=this.n2l(i.right)+i.bottom,i.dimensions="".concat(i.tl,":").concat(i.br),i}return this.decodeAddress(t)},decodeEx:function(t){var e=t.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),r=e[1]||e[2],n=e[3],i=n.split(":");if(i.length>1){var s=this.decodeAddress(i[0]),u=this.decodeAddress(i[1]),c=Math.min(s.row,u.row),f=Math.min(s.col,u.col),l=Math.max(s.row,u.row),h=Math.max(s.col,u.col);return s=this.n2l(f)+c,u=this.n2l(h)+l,{top:c,left:f,bottom:l,right:h,sheetName:r,tl:{address:s,col:f,row:c,$col$row:"$".concat(this.n2l(f),"$").concat(c),sheetName:r},br:{address:u,col:h,row:l,$col$row:"$".concat(this.n2l(h),"$").concat(l),sheetName:r},dimensions:"".concat(s,":").concat(u)}}if(n.startsWith("#"))return r?{sheetName:r,error:n}:{error:n};var d=this.decodeAddress(n);return r?function(t){for(var e=1;e=i&&c<=a&&f>=o&&f<=s}};e.exports=u},{}],20:[function(t,e,r){(function(r){"use strict";var n=t("crypto"),i={hash:function(t){for(var e=n.createHash(t),i=arguments.length,o=new Array(i>1?i-1:0),a=1;a3||3===l.length&&l>"XFD")return t;var p=n.l2n(l),m=parseInt(d,10);return f||(p+=s.col-a.col),h||(m+=s.row-a.row),(e||"")+(f||"")+n.n2l(p)+(h||"")+m}return t}))}}},{"./col-cache":19}],23:[function(t,e,r){(function(r,n){"use strict";function i(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function s(t){i(a,n,o,s,u,"next",t)}function u(t){i(a,n,o,s,u,"throw",t)}s(void 0)}))}}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r=this.length?(e=this.toBuffer(),this.iRead=this.iWrite,e):(e=n.alloc(t),this.buffer.copy(e,0,this.iRead,t),this.iRead+=t,e)}},{key:"write",value:function(t,e,r){var n=Math.min(r,this.size-this.iWrite);return t.copy(this.buffer,this.iWrite,e,e+n),this.iWrite+=n,n}},{key:"length",get:function(){return this.iWrite-this.iRead}},{key:"eod",get:function(){return this.iRead===this.iWrite}},{key:"full",get:function(){return this.iWrite===this.size}}]),t}(),y=function(t){t=t||{},this.bufSize=t.bufSize||1048576,this.buffers=[],this.batch=t.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};f.inherits(y,c.Duplex,{toBuffer:function(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return n.concat(this.buffers.map((function(t){return t.toBuffer()})))}},_getWritableBuffer:function(){if(this.buffers.length){var t=this.buffers[this.buffers.length-1];if(!t.full)return t}var e=new m(this.bufSize);return this.buffers.push(e),e},_pipe:function(t){var e=this;return o(regeneratorRuntime.mark((function r(){var n;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=function(e){return new Promise((function(r){e.write(t.toBuffer(),(function(){r()}))}))},r.next=3,Promise.all(e.pipes.map(n));case 3:case"end":return r.stop()}}),r)})))()},_writeToBuffers:function(t){for(var e=0,r=t.length;e1;)a._pipe(a.buffers.shift());o.next=29;break;case 21:if(a.corked){o.next=27;break}return o.next=24,a._pipe(s);case 24:i(),o.next=29;break;case 27:a._writeToBuffers(s),r.nextTick(i);case 29:o.next=34;break;case 31:a.paused||a.emit("data",s.toBuffer()),a._writeToBuffers(s),a.emit("readable");case 34:return o.abrupt("return",!0);case 35:case"end":return o.stop()}}),o)})))()},cork:function(){this.corked=!0},_flush:function(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork:function(){this.corked=!1,this._flush()},end:function(t,e,r){var n=this,i=function(t){t?r(t):(n._flush(),n.pipes.forEach((function(t){t.end()})),n.emit("finish"))};t?this.write(t,e,i):i()},read:function(t){var e;if(t){for(e=[];t&&this.buffers.length&&!this.buffers[0].eod;){var r=this.buffers[0],i=r.read(t);t-=i.length,e.push(i),r.eod&&r.full&&this.buffers.shift()}return n.concat(e)}return e=this.buffers.map((function(t){return t.toBuffer()})).filter(Boolean),this.buffers=[],n.concat(e)},setEncoding:function(t){this.encoding=t},pause:function(){this.paused=!0},resume:function(){this.paused=!1},isPaused:function(){return!!this.paused},pipe:function(t){this.pipes.push(t),!this.paused&&this.buffers.length&&this.end()},unpipe:function(t){this.pipes=this.pipes.filter((function(e){return e!==t}))},unshift:function(){throw new Error("Not Implemented")},wrap:function(){throw new Error("Not Implemented")}}),e.exports=y}).call(this,t("_process"),t("buffer").Buffer)},{"./string-buf":24,"./utils":26,_process:358,buffer:216,"readable-stream":382}],24:[function(t,e,r){(function(t){"use strict";function r(t,e){for(var r=0;r=this._buf.length-4;)this._grow(this._inPos+t.length),e=this._inPos+this._buf.write(t,this._inPos,this._encoding);this._inPos=e}},{key:"addStringBuf",value:function(t){t.length&&(this._buffer=void 0,this.length+t.length>this.capacity&&this._grow(this.length+t.length),t._buf.copy(this._buf,this._inPos,0,t.length),this._inPos+=t.length)}},{key:"length",get:function(){return this._inPos}},{key:"capacity",get:function(){return this._buf.length}},{key:"buffer",get:function(){return this._buf}}])&&r(n.prototype,i),o&&r(n,o),e}();e.exports=n}).call(this,t("buffer").Buffer)},{buffer:216}],25:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=Object.prototype.toString,o=/["&<>]/,a={each:function(t,e){t&&(Array.isArray(t)?t.forEach(e):Object.keys(t).forEach((function(r){e(t[r],r)})))},some:function(t,e){return!!t&&(Array.isArray(t)?t.some(e):Object.keys(t).some((function(r){return e(t[r],r)})))},every:function(t,e){return!t||(Array.isArray(t)?t.every(e):Object.keys(t).every((function(r){return e(t[r],r)})))},map:function(t,e){return t?Array.isArray(t)?t.map(e):Object.keys(t).map((function(r){return e(t[r],r)})):[]},keyBy:function(t,e){return t.reduce((function(t,r){return t[r[e]]=r,t}),{})},isEqual:function(t,e){var r=n(t),i=n(e),o=Array.isArray(t),s=Array.isArray(e);if(r!==i)return!1;switch(n(t)){case"object":return o||s?!(!o||!s)&&(t.length===e.length&&t.every((function(t,r){var n=e[r];return a.isEqual(t,n)}))):a.every(t,(function(t,r){var n=e[r];return a.isEqual(t,n)}));default:return t===e}},escapeHtml:function(t){var e=o.exec(t);if(!e)return t;for(var r="",n="",i=0,a=e.index;a":n=">";break;default:continue}i!==a&&(r+=t.substring(i,a)),i=a+1,r+=n}return i!==a?r+t.substring(i,a):r},strcmp:function(t,e){return te?1:0},isUndefined:function(t){return"[object Undefined]"===i.call(t)},isObject:function(t){return"[object Object]"===i.call(t)},deepMerge:function(){var t,e,r,n=arguments[0]||{},i=arguments.length;function o(i,o){t=n[o],r=Array.isArray(i),a.isObject(i)||r?(r?(r=!1,e=t&&Array.isArray(t)?t:[]):e=t&&a.isObject(t)?t:{},n[o]=a.deepMerge(e,i)):a.isUndefined(i)||(n[o]=i)}for(var s=0;s&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,a={nop:function(){},promiseImmediate:function(t){return new Promise((function(e){r.setImmediate?n((function(){e(t)})):setTimeout((function(){e(t)}),1)}))},inherits:function(t,e,r,n){t.super_=e,n||(n=r,r=null),r&&Object.keys(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}));var i={constructor:{value:t,enumerable:!1,writable:!1,configurable:!0}};n&&Object.keys(n).forEach((function(t){i[t]=Object.getOwnPropertyDescriptor(n,t)})),t.prototype=Object.create(e.prototype,i)},dateToExcel:function(t,e){return 25569+t.getTime()/864e5-(e?1462:0)},excelToDate:function(t,e){var r=Math.round(24*(t-25569+(e?1462:0))*3600*1e3);return new Date(r)},parsePath:function(t){var e=t.lastIndexOf("/");return{path:t.substring(0,e),name:t.substring(e+1)}},getRelsPath:function(t){var e=a.parsePath(t);return"".concat(e.path,"/_rels/").concat(e.name,".rels")},xmlEncode:function(t){var e=o.exec(t);if(!e)return t;for(var r="",n="",i=0,a=e.index;a=11&&13!==s)){n="";break}continue}i!==a&&(r+=t.substring(i,a)),i=a+1,n&&(r+=n)}return i!==a?r+t.substring(i,a):r},xmlDecode:function(t){return t.replace(/&([a-z]*);/g,(function(t){switch(t){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case""":return'"';default:return t}}))},validInt:function(t){var e=parseInt(t,10);return Number.isNaN(e)?0:e},isDateFmt:function(t){return!!t&&null!==(t=(t=t.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)},fs:{exists:function(t){return new Promise((function(e){i.access(t,i.constants.F_OK,(function(t){e(!t)}))}))}},toIsoDateString:function(t){return t.toIsoString().subsstr(0,10)}};e.exports=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").setImmediate)},{fs:215,timers:411}],27:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r\n")}},{key:"openNode",value:function(t,e){var r=this.tos,n=this._xml;r&&this.open&&n.push(">"),this._stack.push(t),n.push("<"),n.push(t),s(n,e),this.leaf=!0,this.open=!0}},{key:"addAttribute",value:function(t,e){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");void 0!==e&&a(this._xml,t,e)}},{key:"addAttributes",value:function(t){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");s(this._xml,t)}},{key:"writeText",value:function(t){var e=this._xml;this.open&&(e.push(">"),this.open=!1),this.leaf=!1,e.push(o.xmlEncode(t.toString()))}},{key:"writeXml",value:function(t){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(t)}},{key:"closeNode",value:function(){var t=this._stack.pop(),e=this._xml;this.leaf?e.push("/>"):(e.push("")),this.open=!1,this.leaf=!1}},{key:"leafNode",value:function(t,e,r){this.openNode(t,e),void 0!==r&&this.writeText(r),this.closeNode()}},{key:"closeAll",value:function(){for(;this._stack.length;)this.closeNode()}},{key:"addRollback",value:function(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}},{key:"commit",value:function(){this._rollbacks.pop()}},{key:"rollback",value:function(){var t=this._rollbacks.pop();this._xml.length>t.xml&&this._xml.splice(t.xml,this._xml.length-t.xml),this._stack.length>t.stack&&this._stack.splice(t.stack,this._stack.length-t.stack),this.leaf=t.leaf,this.open=t.open}},{key:"tos",get:function(){return this._stack.length?this._stack[this._stack.length-1]:void 0}},{key:"cursor",get:function(){return this._xml.length}},{key:"xml",get:function(){return this.closeAll(),this._xml.join("")}}])&&n(e.prototype,r),i&&n(e,i),t}();u.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},e.exports=u},{"./under-dash":25,"./utils":26}],28:[function(t,e,r){(function(r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e,r,n,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,i)}function o(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){u=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]&&arguments[2];if(void 0===t){if(r)return e}else if(r||t!==e)return t.toString()}},{key:"toStringAttribute",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.toAttribute(e,r,n)}},{key:"toStringValue",value:function(t,e){return void 0===t?e:t}},{key:"toBoolAttribute",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(void 0===t){if(r)return e}else if(r||t!==e)return t?"1":"0"}},{key:"toBoolValue",value:function(t,e){return void 0===t?e:"1"===t}},{key:"toIntAttribute",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.toAttribute(e,r,n)}},{key:"toIntValue",value:function(t,e){return void 0===t?e:parseInt(t,10)}},{key:"toFloatAttribute",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.toAttribute(e,r,n)}},{key:"toFloatValue",value:function(t,e){return void 0===t?e:parseFloat(t)}}],r&&s(e.prototype,r),i&&s(e,i),t}();e.exports=l},{"../../utils/parse-sax":21,"../../utils/xml-stream":27}],32:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;rthis.maxItems))throw new Error("Max ".concat(this.childXform.tag," count (").concat(this.maxItems,") exceeded"));return!0}return!1}},{key:"reconcile",value:function(t,e){if(t){var r=this.childXform;t.forEach((function(t){r.reconcile(t,e)}))}}}])&&i(e.prototype,r),n&&i(e,n),u}(t("./base-xform"));e.exports=c},{"./base-xform":31}],71:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r0");case"containsErrors":return"ISERROR(".concat(e,")");case"notContainsErrors":return"NOT(ISERROR(".concat(e,"))");default:return}}(e);r&&this.formulaXform.render(t,r),t.closeNode()}},{key:"renderTimePeriod",value:function(t,e){t.openNode(this.tag,{type:"timePeriod",dxfId:e.dxfId,priority:e.priority,timePeriod:e.timePeriod});var r=function(t){if(t.formulae&&t.formulae[0])return t.formulae[0];var e=new p(t.ref).tl;switch(t.timePeriod){case"thisWeek":return"AND(TODAY()-ROUNDDOWN(".concat(e,",0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(").concat(e,",0)-TODAY()<=7-WEEKDAY(TODAY()))");case"lastWeek":return"AND(TODAY()-ROUNDDOWN(".concat(e,",0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(").concat(e,",0)<(WEEKDAY(TODAY())+7))");case"nextWeek":return"AND(ROUNDDOWN(".concat(e,",0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(").concat(e,",0)-TODAY()<(15-WEEKDAY(TODAY())))");case"yesterday":return"FLOOR(".concat(e,",1)=TODAY()-1");case"today":return"FLOOR(".concat(e,",1)=TODAY()");case"tomorrow":return"FLOOR(".concat(e,",1)=TODAY()+1");case"last7Days":return"AND(TODAY()-FLOOR(".concat(e,",1)<=6,FLOOR(").concat(e,",1)<=TODAY())");case"lastMonth":return"AND(MONTH(".concat(e,")=MONTH(EDATE(TODAY(),0-1)),YEAR(").concat(e,")=YEAR(EDATE(TODAY(),0-1)))");case"thisMonth":return"AND(MONTH(".concat(e,")=MONTH(TODAY()),YEAR(").concat(e,")=YEAR(TODAY()))");case"nextMonth":return"AND(MONTH(".concat(e,")=MONTH(EDATE(TODAY(),0+1)),YEAR(").concat(e,")=YEAR(EDATE(TODAY(),0+1)))");default:return}}(e);r&&this.formulaXform.render(t,r),t.closeNode()}},{key:"createNewModel",value:function(t){var e=t.attributes;return o(o({},function(t){var e=t.type,r=t.operator;switch(e){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:e};default:return{type:e,operator:r}}}(e)),{},{dxfId:h.toIntValue(e.dxfId),priority:h.toIntValue(e.priority),timePeriod:e.timePeriod,percent:h.toBoolValue(e.percent),bottom:h.toBoolValue(e.bottom),rank:h.toIntValue(e.rank),aboveAverage:h.toBoolValue(e.aboveAverage)})}},{key:"onParserClose",value:function(t,e){switch(t){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,e.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(e.model)}}},{key:"tag",get:function(){return"cfRule"}}])&&s(e.prototype,r),n&&s(e,n),a}(d);e.exports=_},{"../../../../doc/range":10,"../../base-xform":31,"../../composite-xform":47,"./color-scale-xform":84,"./databar-xform":87,"./ext-lst-ref-xform":88,"./formula-xform":89,"./icon-set-xform":90}],83:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r1||s>1){var f=i.row+(o-1),h=i.col+(s-1);return l(l({},e.dataValidation),{},{sqref:"".concat(e.address,":").concat(m.encodeAddress(f,h))})}return l(l({},e.dataValidation),{},{sqref:e.address})}return null})).filter(Boolean)}(e);r.length&&(t.openNode("dataValidations",{count:r.length}),r.forEach((function(e){t.openNode("dataValidation"),"any"!==e.type&&(t.addAttribute("type",e.type),e.operator&&"list"!==e.type&&"between"!==e.operator&&t.addAttribute("operator",e.operator),e.allowBlank&&t.addAttribute("allowBlank","1")),e.showInputMessage&&t.addAttribute("showInputMessage","1"),e.promptTitle&&t.addAttribute("promptTitle",e.promptTitle),e.prompt&&t.addAttribute("prompt",e.prompt),e.showErrorMessage&&t.addAttribute("showErrorMessage","1"),e.errorStyle&&t.addAttribute("errorStyle",e.errorStyle),e.errorTitle&&t.addAttribute("errorTitle",e.errorTitle),e.error&&t.addAttribute("error",e.error),t.addAttribute("sqref",e.sqref),(e.formulae||[]).forEach((function(r,n){t.openNode("formula".concat(n+1)),"date"===e.type?t.writeText(p.dateToExcel(new Date(r))):t.writeText(r),t.closeNode()})),t.closeNode()})),t.closeNode())}},{key:"parseOpen",value:function(t){switch(t.name){case"dataValidations":return this.model={},!0;case"dataValidation":this._address=t.attributes.sqref;var e={type:t.attributes.type||"any",formulae:[]};switch(t.attributes.type&&g(e,t.attributes,"allowBlank"),g(e,t.attributes,"showInputMessage"),g(e,t.attributes,"showErrorMessage"),e.type){case"any":case"list":case"custom":break;default:v(e,t.attributes,"operator","between")}return v(e,t.attributes,"promptTitle"),v(e,t.attributes,"prompt"),v(e,t.attributes,"errorStyle"),v(e,t.attributes,"errorTitle"),v(e,t.attributes,"error"),this._dataValidation=e,!0;case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}},{key:"parseText",value:function(t){this._formula&&this._formula.push(t)}},{key:"parseClose",value:function(t){var e=this;switch(t){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach((function(t){t.includes(":")?new b(t).forEachAddress((function(t){e.model[t]=e._dataValidation})):e.model[t]=e._dataValidation})),!0;case"formula1":case"formula2":var r=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":r=parseInt(r,10);break;case"decimal":r=parseFloat(r);break;case"date":r=p.excelToDate(parseFloat(r))}return this._dataValidation.formulae.push(r),this._formula=void 0,!0;default:return!0}}},{key:"tag",get:function(){return"dataValidations"}}])&&o(e.prototype,r),n&&o(e,n),c}(y);e.exports=w},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/utils":26,"../base-xform":31}],93:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r0&&e.max>0&&e.min<=e.max&&t.addAttribute("spans","".concat(e.min,":").concat(e.max)),e.styleId&&(t.addAttribute("s",e.styleId),t.addAttribute("customFormat","1")),t.addAttribute("x14ac:dyDescent","0.25"),e.outlineLevel&&t.addAttribute("outlineLevel",e.outlineLevel),e.collapsed&&t.addAttribute("collapsed","1");var n=this.map.c;e.cells.forEach((function(e){n.render(t,e,r)})),t.closeNode()}},{key:"parseOpen",value:function(t){if(this.parser)return this.parser.parseOpen(t),!0;if("row"===t.name){this.numRowsSeen+=1;var e=t.attributes.spans?t.attributes.spans.split(":").map((function(t){return parseInt(t,10)})):[void 0,void 0],r=this.model={number:parseInt(t.attributes.r,10),min:e[0],max:e[1],cells:[]};return t.attributes.s&&(r.styleId=parseInt(t.attributes.s,10)),!0!==t.attributes.hidden&&"true"!==t.attributes.hidden&&1!==t.attributes.hidden&&"1"!==t.attributes.hidden||(r.hidden=!0),t.attributes.bestFit&&(r.bestFit=!0),t.attributes.ht&&(r.height=parseFloat(t.attributes.ht)),t.attributes.outlineLevel&&(r.outlineLevel=parseInt(t.attributes.outlineLevel,10)),t.attributes.collapsed&&(r.collapsed=!0),!0}return this.parser=this.map[t.name],!!this.parser&&(this.parser.parseOpen(t),!0)}},{key:"parseText",value:function(t){this.parser&&this.parser.parseText(t)}},{key:"parseClose",value:function(t){if(this.parser){if(!this.parser.parseClose(t)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error("Max column count (".concat(this.maxItems,") exceeded"));this.parser=void 0}return!0}return!1}},{key:"reconcile",value:function(t,e){t.style=t.styleId?e.styles.getStyleModel(t.styleId):{},void 0!==t.styleId&&(t.styleId=void 0);var r=this.map.c;t.cells.forEach((function(t){r.reconcile(t,e)}))}},{key:"tag",get:function(){return"row"}}])&&i(e.prototype,r),n&&i(e,n),u}(c);e.exports=l},{"../base-xform":31,"./cell-xform":72}],109:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var r=0;r0){var o={Id:i(n),Type:h.Comments,Target:"../comments".concat(t.id,".xml")};n.push(o);var a={Id:i(n),Type:h.VmlDrawing,Target:"../drawings/vmlDrawing".concat(t.id,".vml")};n.push(a),t.comments.forEach((function(t){t.refAddress=f.decodeAddress(t.ref)})),e.commentRefs.push({commentName:"comments".concat(t.id),vmlDrawing:"vmlDrawing".concat(t.id)})}var s,u=[];t.media.forEach((function(o){if("background"===o.type){var a=i(n);s=e.media[o.imageId],n.push({Id:a,Type:h.Image,Target:"../media/".concat(s.name,".").concat(s.extension)}),t.background={rId:a},t.image=e.media[o.imageId]}else if("image"===o.type){var c=t.drawing;s=e.media[o.imageId],c||(c=t.drawing={rId:i(n),name:"drawing".concat(++e.drawingsCount),anchors:[],rels:[]},e.drawings.push(c),n.push({Id:c.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/".concat(c.name,".xml")}));var f=r.preImageId===o.imageId?u[o.imageId]:u[c.rels.length];f||(f=i(c.rels),u[c.rels.length]=f,c.rels.push({Id:f,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/".concat(s.name,".").concat(s.extension)}));var l={picture:{rId:f},range:o.range};if(o.hyperlinks&&o.hyperlinks.hyperlink){var d=i(c.rels);u[c.rels.length]=d,l.picture.hyperlinks={tooltip:o.hyperlinks.tooltip,rId:d},c.rels.push({Id:d,Type:h.Hyperlink,Target:o.hyperlinks.hyperlink,TargetMode:"External"})}r.preImageId=o.imageId,c.anchors.push(l)}})),t.tables.forEach((function(t){var r=i(n);t.rId=r,n.push({Id:r,Type:h.Table,Target:"../tables/".concat(t.target)}),t.columns.forEach((function(t){var r=t.style;r&&(t.dxfId=e.styles.addDxfStyle(r))}))})),this.map.extLst.prepare(t,e)}},{key:"render",value:function(t,e){t.openXml(l.StdDocAttributes),t.openNode("worksheet",u.WORKSHEET_ATTRIBUTES);var r=e.properties?{defaultRowHeight:e.properties.defaultRowHeight,dyDescent:e.properties.dyDescent,outlineLevelCol:e.properties.outlineLevelCol,outlineLevelRow:e.properties.outlineLevelRow}:void 0;e.properties&&e.properties.defaultColWidth&&(r.defaultColWidth=e.properties.defaultColWidth);var n={outlineProperties:e.properties&&e.properties.outlineProperties,tabColor:e.properties&&e.properties.tabColor,pageSetup:e.pageSetup&&e.pageSetup.fitToPage?{fitToPage:e.pageSetup.fitToPage}:void 0},i=e.pageSetup&&e.pageSetup.margins,o={showRowColHeaders:e.pageSetup&&e.pageSetup.showRowColHeaders,showGridLines:e.pageSetup&&e.pageSetup.showGridLines,horizontalCentered:e.pageSetup&&e.pageSetup.horizontalCentered,verticalCentered:e.pageSetup&&e.pageSetup.verticalCentered},a=e.sheetProtection;this.map.sheetPr.render(t,n),this.map.dimension.render(t,e.dimensions),this.map.sheetViews.render(t,e.views),this.map.sheetFormatPr.render(t,r),this.map.cols.render(t,e.cols),this.map.sheetData.render(t,e.rows),this.map.sheetProtection.render(t,a),this.map.autoFilter.render(t,e.autoFilter),this.map.mergeCells.render(t,e.mergeCells),this.map.conditionalFormatting.render(t,e.conditionalFormattings),this.map.dataValidations.render(t,e.dataValidations),this.map.hyperlinks.render(t,e.hyperlinks),this.map.printOptions.render(t,o),this.map.pageMargins.render(t,i),this.map.pageSetup.render(t,e.pageSetup),this.map.headerFooter.render(t,e.headerFooter),this.map.rowBreaks.render(t,e.rowBreaks),this.map.drawing.render(t,e.drawing),this.map.picture.render(t,e.background),this.map.tableParts.render(t,e.tables),this.map.extLst.render(t,e),e.rels&&e.rels.forEach((function(e){e.Type===h.VmlDrawing&&t.leafNode("legacyDrawing",{"r:id":e.Id})})),t.closeNode()}},{key:"parseOpen",value:function(t){return this.parser?(this.parser.parseOpen(t),!0):"worksheet"===t.name?(c.each(this.map,(function(t){t.reset()})),!0):(this.parser=this.map[t.name],this.parser&&this.parser.parseOpen(t),!0)}},{key:"parseText",value:function(t){this.parser&&this.parser.parseText(t)}},{key:"parseClose",value:function(t){if(this.parser)return this.parser.parseClose(t)||(this.parser=void 0),!0;switch(t){case"worksheet":var e=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(e.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(e.outlineProperties=this.map.sheetPr.model.outlineProperties);var r={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},n=Object.assign(r,this.map.pageSetup.model,this.map.printOptions.model),i=B(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]);return this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:e,views:this.map.sheetViews.model,pageSetup:n,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:i},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1;default:return!0}}},{key:"reconcile",value:function(t,e){var r=(t.relationships||[]).reduce((function(r,n){if(r[n.Id]=n,n.Type===h.Comments&&(t.comments=e.comments[n.Target].comments),n.Type===h.VmlDrawing&&t.comments&&t.comments.length){var i=e.vmlDrawings[n.Target].comments;t.comments.forEach((function(t,e){t.note=Object.assign({},t.note,i[e])}))}return r}),{});if(e.commentsMap=(t.comments||[]).reduce((function(t,e){return e.ref&&(t[e.ref]=e),t}),{}),e.hyperlinkMap=(t.hyperlinks||[]).reduce((function(t,e){return e.rId&&(t[e.address]=r[e.rId].Target),t}),{}),e.formulae={},t.rows=t.rows&&t.rows.filter(Boolean)||[],t.rows.forEach((function(t){t.cells=t.cells&&t.cells.filter(Boolean)||[]})),this.map.cols.reconcile(t.cols,e),this.map.sheetData.reconcile(t.rows,e),this.map.conditionalFormatting.reconcile(t.conditionalFormattings,e),t.media=[],t.drawing){var n=r[t.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if(n){var i=n[1];e.drawings[i].anchors.forEach((function(e){if(e.medium){var r={type:"image",imageId:e.medium.index,range:e.range,hyperlinks:e.picture.hyperlinks};t.media.push(r)}}))}}var o=t.background&&r[t.background.rId];if(o){var a=o.Target.split("/media/")[1],s=e.mediaIndex&&e.mediaIndex[a];void 0!==s&&t.media.push({type:"background",imageId:s})}t.tables=(t.tables||[]).map((function(t){var n=r[t.rId];return e.tables[n.Target]})),delete t.relationships,delete t.hyperlinks,delete t.comments}}])&&i(e.prototype,r),n&&i(e,n),u}(p);F.WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},e.exports=F},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../../rel-type":30,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":71,"./cf/conditional-formattings-xform":86,"./col-xform":91,"./data-validations-xform":92,"./dimension-xform":93,"./drawing-xform":94,"./ext-lst-xform":95,"./header-footer-xform":96,"./hyperlink-xform":97,"./merge-cell-xform":98,"./merges":99,"./page-margins-xform":102,"./page-setup-xform":104,"./picture-xform":105,"./print-options-xform":106,"./row-breaks-xform":107,"./row-xform":108,"./sheet-format-properties-xform":109,"./sheet-properties-xform":110,"./sheet-protection-xform":111,"./sheet-view-xform":112,"./table-part-xform":113}],115:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r=-90&&t<=90?t:void 0}},indent:function(t){return t=l.validInt(t),Math.max(0,t)},readingOrder:function(t){switch(t){case"ltr":return f.ReadingOrder.LeftToRight;case"rtl":return f.ReadingOrder.RightToLeft;default:return}}},p=function(t){if(t=d.textRotation(t)){if("vertical"===t)return 255;var e=Math.round(t);if(e>=0&&e<=90)return e;if(e<0&&e>=-90)return 90-e}},m=function(t){var e=l.validInt(t);if(void 0!==e){if(255===e)return"vertical";if(e>=0&&e<=90)return e;if(e>90&&e<=180)return 90-e}},y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(c,t);var e,r,n,u=s(c);function c(){return i(this,c),u.apply(this,arguments)}return e=c,(r=[{key:"render",value:function(t,e){t.addRollback(),t.openNode("alignment");var r=!1;function n(e,n){n&&(t.addAttribute(e,n),r=!0)}n("horizontal",d.horizontal(e.horizontal)),n("vertical",d.vertical(e.vertical)),n("wrapText",!!d.wrapText(e.wrapText)&&"1"),n("shrinkToFit",!!d.shrinkToFit(e.shrinkToFit)&&"1"),n("indent",d.indent(e.indent)),n("textRotation",p(e.textRotation)),n("readingOrder",d.readingOrder(e.readingOrder)),t.closeNode(),r?t.commit():t.rollback()}},{key:"parseOpen",value:function(t){var e={},r=!1;function n(t,n,i){t&&(e[n]=i,r=!0)}n(t.attributes.horizontal,"horizontal",t.attributes.horizontal),n(t.attributes.vertical,"vertical","center"===t.attributes.vertical?"middle":t.attributes.vertical),n(t.attributes.wrapText,"wrapText",!!t.attributes.wrapText),n(t.attributes.shrinkToFit,"shrinkToFit",!!t.attributes.shrinkToFit),n(t.attributes.indent,"indent",parseInt(t.attributes.indent,10)),n(t.attributes.textRotation,"textRotation",m(t.attributes.textRotation)),n(t.attributes.readingOrder,"readingOrder","2"===t.attributes.readingOrder?"rtl":"ltr"),this.model=r?e:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"alignment"}}])&&o(e.prototype,r),n&&o(e,n),c}(h);e.exports=y},{"../../../doc/enums":7,"../../../utils/utils":26,"../base-xform":31}],126:[function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){for(var e=1;e=1)){t.next=6;break}return o=n.substr(i+1),a=n.substr(0,i),t.next=6,new Promise((function(t,i){var s=new h;s.on("finish",(function(){r.mediaIndex[n]=r.media.length,r.mediaIndex[a]=r.media.length;var e={type:"image",name:a,extension:o,buffer:s.toBuffer()};r.media.push(e),t()})),e.on("error",(function(t){i(t)})),e.pipe(s)}));case 6:case"end":return t.stop()}}),t)}))),function(t,e,r){return Y.apply(this,arguments)})},{key:"_processDrawingEntry",value:(Z=o(regeneratorRuntime.mark((function t(e,r,n){var i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=new S,t.next=3,i.parseStream(e);case 3:o=t.sent,r.drawings[n]=o;case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return Z.apply(this,arguments)})},{key:"_processDrawingRelsEntry",value:(K=o(regeneratorRuntime.mark((function t(e,r,n){var i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=new g,t.next=3,i.parseStream(e);case 3:o=t.sent,r.drawingRels[n]=o;case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return K.apply(this,arguments)})},{key:"_processVmlDrawingEntry",value:(X=o(regeneratorRuntime.mark((function t(e,r,n){var i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=new E,t.next=3,i.parseStream(e);case 3:o=t.sent,r.vmlDrawings["../drawings/".concat(n,".vml")]=o;case 5:case"end":return t.stop()}}),t)}))),function(t,e,r){return X.apply(this,arguments)})},{key:"_processThemeEntry",value:($=o(regeneratorRuntime.mark((function t(e,r,n){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,new Promise((function(t,i){var o=new h;e.on("error",i),o.on("error",i),o.on("finish",(function(){r.themes[n]=o.read().toString(),t()})),e.pipe(o)}));case 2:case"end":return t.stop()}}),t)}))),function(t,e,r){return $.apply(this,arguments)})},{key:"createInputStream",value:function(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}},{key:"read",value:(W=o(regeneratorRuntime.mark((function t(e,r){var i,o,a,u,c,l,h,d;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:!e[Symbol.asyncIterator]&&e.pipe&&(e=e.pipe(new f)),i=[],o=!0,a=!1,t.prev=4,c=s(e);case 6:return t.next=8,c.next();case 8:return l=t.sent,o=l.done,t.next=12,l.value;case 12:if(h=t.sent,o){t.next=19;break}d=h,i.push(d);case 16:o=!0,t.next=6;break;case 19:t.next=25;break;case 21:t.prev=21,t.t0=t.catch(4),a=!0,u=t.t0;case 25:if(t.prev=25,t.prev=26,o||null==c.return){t.next=30;break}return t.next=30,c.return();case 30:if(t.prev=30,!a){t.next=33;break}throw u;case 33:return t.finish(30);case 34:return t.finish(25);case 35:return t.abrupt("return",this.load(n.concat(i),r));case 36:case"end":return t.stop()}}),t,this,[[4,21,25,35],[26,,30,34]])}))),function(t,e){return W.apply(this,arguments)})},{key:"load",value:(q=o(regeneratorRuntime.mark((function t(e,i){var o,a,s,u,l,h,d,p,g,w,k,x,S,O,R,E;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=i&&i.base64?n.from(e.toString(),"base64"):e,a={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},t.next=4,c.loadAsync(o);case 4:s=t.sent,u=0,l=Object.values(s.files);case 6:if(!(u0&&(r=new p,o.render(r,t),e.append(r.xml,{name:"xl/comments".concat(t.id,".xml")}),r=new p,a.render(r,t),e.append(r.xml,{name:"xl/drawings/vmlDrawing".concat(t.id,".vml")}))}));case 5:case"end":return t.stop()}}),t)}))),function(t,e){return A.apply(this,arguments)})},{key:"_finalize",value:function(t){var e=this;return new Promise((function(r,n){t.on("finish",(function(){r(e)})),t.on("error",n),t.finalize()}))}},{key:"prepareModel",value:function(t,e){t.creator=t.creator||"ExcelJS",t.lastModifiedBy=t.lastModifiedBy||"ExcelJS",t.created=t.created||new Date,t.modified=t.modified||new Date,t.useSharedStrings=void 0===e.useSharedStrings||e.useSharedStrings,t.useStyles=void 0===e.useStyles||e.useStyles,t.sharedStrings=new v,t.styles=t.useStyles?new y(!0):new y.Mock;var r=new k,n=new x;r.prepare(t);var i={sharedStrings:t.sharedStrings,styles:t.styles,date1904:t.properties.date1904,drawingsCount:0,media:t.media};i.drawings=t.drawings=[],i.commentRefs=t.commentRefs=[];var o=0;t.tables=[],t.worksheets.forEach((function(e){e.tables.forEach((function(e){o++,e.target="table".concat(o,".xml"),e.id=o,t.tables.push(e)})),n.prepare(e,i)}))}},{key:"write",value:(P=o(regeneratorRuntime.mark((function t(e,r){var n,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=r||{},n=this.workbook.model,(i=new l.ZipWriter(r.zip)).pipe(e),this.prepareModel(n,r),t.next=7,this.addContentTypes(i,n);case 7:return t.next=9,this.addOfficeRels(i,n);case 9:return t.next=11,this.addWorkbookRels(i,n);case 11:return t.next=13,this.addWorksheets(i,n);case 13:return t.next=15,this.addSharedStrings(i,n);case 15:return t.next=17,this.addDrawings(i,n);case 17:return t.next=19,this.addTables(i,n);case 19:return t.next=21,Promise.all([this.addThemes(i,n),this.addStyles(i,n)]);case 21:return t.next=23,this.addMedia(i,n);case 23:return t.next=25,Promise.all([this.addApp(i,n),this.addCore(i,n)]);case 25:return t.next=27,this.addWorkbook(i,n);case 27:return t.abrupt("return",this._finalize(i));case 28:case"end":return t.stop()}}),t,this)}))),function(t,e){return P.apply(this,arguments)})},{key:"writeFile",value:function(t,e){var r=this,n=u.createWriteStream(t);return new Promise((function(t,i){n.on("finish",(function(){t()})),n.on("error",(function(t){i(t)})),r.write(n,e).then((function(){n.end()}))}))}},{key:"writeBuffer",value:(M=o(regeneratorRuntime.mark((function t(e){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new h,t.next=3,this.write(r,e);case 3:return t.abrupt("return",r.read());case 4:case"end":return t.stop()}}),t,this)}))),function(t){return M.apply(this,arguments)})}])&&a(e.prototype,i),C&&a(e,C),t}();C.RelType=t("./rel-type"),e.exports=C}).call(this,t("_process"),t("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":23,"../utils/utils":26,"../utils/xml-stream":27,"../utils/zip-stream":28,"./rel-type":30,"./xform/book/workbook-xform":37,"./xform/comment/comments-xform":39,"./xform/comment/vml-notes-xform":44,"./xform/core/app-xform":50,"./xform/core/content-types-xform":51,"./xform/core/core-xform":52,"./xform/core/relationships-xform":54,"./xform/drawing/drawing-xform":61,"./xform/sheet/worksheet-xform":114,"./xform/strings/shared-strings-xform":123,"./xform/style/styles-xform":134,"./xform/table/table-xform":140,"./xml/theme1.js":142,_process:358,buffer:216,fs:215,jszip:290,"readable-stream":382}],142:[function(t,e,r){"use strict";e.exports='\n '},{}],143:[function(t,e,r){(function(e){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),this.objectMode=!0,this.delimiter=",",this.rowDelimiter="\n",this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\ufeff",this.alwaysWriteHeaders=!1,Object.assign(this,r||{}),void 0===(null==r?void 0:r.quoteHeaders)&&(this.quoteHeaders=this.quoteColumns),!0===(null==r?void 0:r.quote)?this.quote='"':!1===(null==r?void 0:r.quote)&&(this.quote=""),"string"!=typeof(null==r?void 0:r.escape)&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&(null===(e=r.writeHeaders)||void 0===e||e),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote="".concat(this.escape).concat(this.quote)}},{}],145:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},i=[],o=new u.Writable({write:function(t,e,r){i.push(t),r()}});return new Promise((function(a,s){o.on("error",s).on("finish",(function(){return a(e.concat(i))})),r.write(t,n).pipe(o)}))},r.writeToString=function(t,e){return r.writeToBuffer(t,e).then((function(t){return t.toString()}))},r.writeToPath=function(t,e,n){var i=c.createWriteStream(t,{encoding:"utf8"});return r.write(e,n).pipe(i)}}).call(this,t("buffer").Buffer)},{"./CsvFormatterStream":143,"./FormatterOptions":144,"./types":149,buffer:216,fs:215,stream:396,util:415}],149:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isSyncTransform=void 0,r.isSyncTransform=function(t){return 1===t.length}},{}],150:[function(t,e,r){(function(e){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r1?r-1:0),i=1;i=i||n.hasHitRowLimit)return r();if(n.parsedLineCount+=1,n.shouldSkipLine)return s();var u=t[a];n.rowCount+=1,n.parsedRowCount+=1;var c=n.rowCount;return n.transformRow(u,(function(t,e){if(t)return n.rowCount-=1,s(t);if(!e)return s(new Error("expected transform result"));if(e.isValid){if(e.row)return n.pushRow(e.row,s)}else n.emit("data-invalid",e.row,c,e.reason);return s()}))}(0)}},{key:"transformRow",value:function(t,e){var r=this;try{this.headerTransformer.transform(t,(function(n,i){return n?e(n):i?i.isValid?i.row?r.shouldEmitRows?r.rowTransformerValidator.transformAndValidate(i.row,e):r.skipRow(e):(r.rowCount-=1,r.parsedRowCount-=1,e(null,{row:null,isValid:!0})):r.shouldEmitRows?e(null,{isValid:!1,row:t}):r.skipRow(e):e(new Error("Expected result from header transform"))}))}catch(t){e(t)}}},{key:"checkAndEmitHeaders",value:function(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}},{key:"skipRow",value:function(t){return this.rowCount-=1,t(null,{row:null,isValid:!0})}},{key:"pushRow",value:function(t,e){try{this.parserOptions.objectMode?this.push(t):this.push(JSON.stringify(t)),e()}catch(t){e(t)}}},{key:"hasHitRowLimit",get:function(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}},{key:"shouldEmitRows",get:function(){return this.parsedRowCount>this.parserOptions.skipRows}},{key:"shouldSkipLine",get:function(){return this.parsedLineCount<=this.parserOptions.skipLines}}])&&i(r.prototype,n),u&&i(r,u),p}(l.Transform);r.CsvParserStream=p}).call(this,t("timers").setImmediate)},{"./parser":162,"./transforms":165,stream:396,string_decoder:410,timers:411}],151:[function(t,e,r){"use strict";var n=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.ParserOptions=void 0;var i=n(t("lodash.escaperegexp")),o=n(t("lodash.isnil"));r.ParserOptions=function t(e){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,e||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=null!==(r=this.escape)&&void 0!==r?r:this.quote,this.supportsComments=!o.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp("([^\\s]|\\r\\n|\\n|\\r|".concat(this.escapedDelimiter,")")),this.maxRows>0&&(this.limitRows=!0)}},{"lodash.escaperegexp":317,"lodash.isnil":322}],152:[function(t,e,r){"use strict";var n=Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]},i=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},a=function(t,e){for(var r in t)"default"===r||e.hasOwnProperty(r)||n(e,t,r)};Object.defineProperty(r,"__esModule",{value:!0}),r.parseString=r.parseFile=r.parseStream=r.parse=void 0;var s=o(t("fs")),u=t("stream"),c=t("./ParserOptions"),f=t("./CsvParserStream");a(t("./types"),r);var l=t("./CsvParserStream");Object.defineProperty(r,"CsvParserStream",{enumerable:!0,get:function(){return l.CsvParserStream}});var h=t("./ParserOptions");Object.defineProperty(r,"ParserOptions",{enumerable:!0,get:function(){return h.ParserOptions}}),r.parse=function(t){return new f.CsvParserStream(new c.ParserOptions(t))},r.parseStream=function(t,e){return t.pipe(new f.CsvParserStream(new c.ParserOptions(e)))},r.parseFile=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s.createReadStream(t).pipe(new f.CsvParserStream(new c.ParserOptions(e)))},r.parseString=function(t,e){var r=new u.Readable;return r.push(t),r.push(null),r.pipe(new f.CsvParserStream(new c.ParserOptions(e)))}},{"./CsvParserStream":150,"./ParserOptions":151,"./types":166,fs:215,stream:396}],153:[function(t,e,r){"use strict";function n(t,e){for(var r=0;rthis.cursor}},{key:"nextNonSpaceToken",get:function(){var t=this.lineFromCursor,e=this.parserOptions.NEXT_TOKEN_REGEXP;if(-1===t.search(e))return null;var r=e.exec(t);if(null==r)return null;var n=r[1],o=this.cursor+(r.index||0);return new i.Token({token:n,startCursor:o,endCursor:o+n.length-1})}},{key:"nextCharacterToken",get:function(){var t=this.cursor;return this.lineLength<=t?null:new i.Token({token:this.line[t],startCursor:t,endCursor:t})}},{key:"lineFromCursor",get:function(){return this.line.substr(this.cursor)}}])&&n(e.prototype,r),a&&n(e,a),t}();r.Scanner=a},{"./Token":156}],156:[function(t,e,r){"use strict";function n(t,e){for(var r=0;rthis.headersLength){if(!e.strictColumnHandling)throw new Error("Unexpected Error: column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(t.length));return{row:t,isValid:!1,reason:"Column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(t.length)}}return e.strictColumnHandling&&t.length1}));throw new Error("Duplicate headers found ".concat(JSON.stringify(i)))}this.headers=t,this.receivedHeaders=!0,this.headersLength=(null===(e=this.headers)||void 0===e?void 0:e.length)||0}}])&&n(e.prototype,r),i&&n(e,i),t}();r.HeaderTransformer=c},{"lodash.groupby":318,"lodash.isfunction":321,"lodash.isundefined":323,"lodash.uniq":324}],164:[function(t,e,r){"use strict";function n(t,e){for(var r=0;r>6],i=0==(32&r);if(31==(31&r)){var o=r;for(r=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:s.tag[r]}}function l(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o=31)return n.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6}(t,e,r,this.reporter);if(n.length<128){var s=i.alloc(2);return s[0]=o,s[1]=n.length,this._createEncoderBuffer([s,n])}for(var u=1,c=n.length;c>=256;c>>=8)u++;var f=i.alloc(2+u);f[0]=o,f[1]=128|u;for(var l=1+u,h=n.length;h>0;l--,h>>=8)f[l]=255&h;return this._createEncoderBuffer([f,n])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=i.alloc(2*t.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}for(var a=0,s=0;s=128;u>>=7)a++}for(var c=i.alloc(a),f=c.length-1,l=t.length-1;l>=0;l--){var h=t[l];for(c[f--]=127&h;(h>>=7)>0;)c[f--]=128|127&h}return this._createEncoderBuffer(c)},u.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=i.from(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=i.alloc(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);for(var a=1,s=t;s>=256;s>>=8)a++;for(var u=new Array(a),c=u.length-1;c>=0;c--)u[c]=255&t,t>>=8;return 128&u[0]&&u.unshift(0),this._createEncoderBuffer(i.from(u))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),a=e;a=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"===n(t)&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"===n(t))return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var o=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&o++,16===e?this._parseHex(t,o):this._parseBase(t,e,o),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[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(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=u(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=u(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f1&&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 f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],l=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],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(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?f[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=l[t],d=h[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=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 t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return i(void 0!==s),this.toArrayLike(s,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,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"===e,c=new t(o),f=this.clone();if(u){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,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(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,y=0|a[2],b=8191&y,v=y>>>13,g=0|a[3],w=8191&g,_=g>>>13,k=0|a[4],x=8191&k,S=k>>>13,O=0|a[5],R=8191&O,E=O>>>13,T=0|a[6],j=8191&T,C=T>>>13,M=0|a[7],P=8191&M,A=M>>>13,I=0|a[8],D=8191&I,N=I>>>13,B=0|a[9],F=8191&B,L=B>>>13,z=0|s[0],U=8191&z,H=z>>>13,V=0|s[1],q=8191&V,W=V>>>13,$=0|s[2],X=8191&$,K=$>>>13,Z=0|s[3],Y=8191&Z,G=Z>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(h,U)|0))<<13)|0;c=((o=Math.imul(h,H))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,H))+Math.imul(m,U)|0,o=Math.imul(m,H);var bt=(c+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,q)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,H))+Math.imul(v,U)|0,o=Math.imul(v,H),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,W)|0;var vt=(c+(n=n+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,K)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,H))+Math.imul(_,U)|0,o=Math.imul(_,H),n=n+Math.imul(b,q)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,W)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,K)|0;var gt=(c+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(x,U),i=(i=Math.imul(x,H))+Math.imul(S,U)|0,o=Math.imul(S,H),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(b,X)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,G)|0;var wt=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(R,U),i=(i=Math.imul(R,H))+Math.imul(E,U)|0,o=Math.imul(E,H),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,H))+Math.imul(C,U)|0,o=Math.imul(C,H),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(c+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,H))+Math.imul(A,U)|0,o=Math.imul(A,H),n=n+Math.imul(j,q)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,H))+Math.imul(N,U)|0,o=Math.imul(N,H),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(j,X)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var St=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,H))+Math.imul(L,U)|0,o=Math.imul(L,H),n=n+Math.imul(D,q)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(N,q)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var Ot=(c+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,W))+Math.imul(L,q)|0,o=Math.imul(L,W),n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,K)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ht)|0;var Rt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,X),i=(i=Math.imul(F,K))+Math.imul(L,X)|0,o=Math.imul(L,K),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(j,rt)|0,i=(i=i+Math.imul(j,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var Et=(c+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,G))+Math.imul(L,Y)|0,o=Math.imul(L,G),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ht)|0;var Tt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ht)|0;var jt=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(L,rt)|0,o=Math.imul(L,nt),n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(j,lt)|0,i=(i=i+Math.imul(j,ht)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ht)|0;var Ct=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,at))+Math.imul(L,ot)|0,o=Math.imul(L,at),n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ct)|0,n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Mt=(c+(n=n+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,ut),i=(i=Math.imul(F,ct))+Math.imul(L,ut)|0,o=Math.imul(L,ct),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ht)|0;var Pt=(c+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(F,lt),i=(i=Math.imul(F,ht))+Math.imul(L,lt)|0,o=Math.imul(L,ht);var At=(c+(n=n+Math.imul(D,pt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(N,pt)|0))<<13)|0;c=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863;var It=(c+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(L,pt)|0))<<13)|0;return c=((o=Math.imul(L,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,u[0]=yt,u[1]=bt,u[2]=vt,u[3]=gt,u[4]=wt,u[5]=_t,u[6]=kt,u[7]=xt,u[8]=St,u[9]=Ot,u[10]=Rt,u[11]=Et,u[12]=Tt,u[13]=jt,u[14]=Ct,u[15]=Mt,u[16]=Pt,u[17]=At,u[18]=It,0!==c&&(u[19]=c,r.length++),r};function m(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(p=d),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.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,t,e):m(this,t,e)},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},y.prototype.permute=function(t,e,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*e;a>=26,e+=n/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=n);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[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(t,e){var r=(this.length,t.length),n=this.clone(),i=t,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"!==e){(s=new a(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:n,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var n,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){i(t<=67108863);for(var e=(1<<26)%t,r=0,n=this.length-1;n>=0;n--)r=(e*r+(0|this.words[n]))%t;return r},a.prototype.idivn=function(t){i(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+67108864*e;this.words[r]=n/t|0,e=n%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(f),o.isub(l)),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(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),o.isub(u)):(r.isub(e),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,o=new a(1),s=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(n=0===e.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/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(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new x(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function g(){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 k(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){x.call(this,t),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 t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},o(g,v),g.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},g.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new g;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return b[t]=e,e},x.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},x.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,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(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,n),h=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,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 c=e.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==o?(o<<=1,o|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}u=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new S(t)},o(S,x),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),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)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),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)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e)},{buffer:185}],182:[function(t,e,r){"use strict";r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=c(t),a=n[0],s=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[f++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,s=r-i;as?s:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return 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=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var i,o,a=[],s=e;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},{}],183:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(e,r){function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function o(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"===n(e)?e.exports=a:(void 0).BN=a,a.BN=a,a.wordSize=26;try{s=t("buffer").Buffer}catch(t){}function u(t,e,r){for(var n=0,o=Math.min(t.length,r),a=0,s=e;s=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:c,a|=u}return i(!(240&a),"Invalid character in "+t),n}function c(t,e,r,n){for(var o=0,a=0,s=Math.min(t.length,r),u=e;u=49?c-49+10:c>=17?c-17+10:c,i(c>=0&&a0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"===n(t))return this._initArray(t,e,r);"hex"===e&&(e=16),i(e===(0|e)&&e>=2&&e<=36);var o=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&o++,16===e?this._parseHex(t,o):this._parseBase(t,e,o),"-"===t[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(i("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var n=0;n=0;n-=3)a=t[n]|t[n-1]<<8|t[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(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=u(t,r,r+6),this.words[n]|=i<>>26-o&4194303,(o+=24)>=26&&(o-=26,n++);r+6!==e&&(i=u(t,e,r+6),this.words[n]|=i<>>26-o&4194303),this._strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f1&&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},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{a.prototype[Symbol.for("nodejs.util.inspect.custom")]=l}catch(t){a.prototype.inspect=l}else a.prototype.inspect=l;function l(){return(this.red?""}var h=["","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"],d=[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],p=[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];a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var n=0,o=0,a=0;a>>24-n&16777215)||a!==this.length-1?h[6-u.length]+u+r:u+r,(n+=2)>=26&&(n-=26,a--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],f=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var m=l.modrn(f).toString(t);r=(l=l.idivn(f)).isZero()?m+r:h[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=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 t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16,2)},s&&(a.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,s=67108863&a,u=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,l=67108863&u,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}r.words[c]=0|l,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}a.prototype.toArrayLike=function(t,e,r){this._strip();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");var a=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](a,n),a},a.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i>8&255),r>16&255),6===o?(r>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r=0&&(t[r--]=a>>8&255),r>=0&&(t[r--]=a>>16&255),6===o?(r>=0&&(t[r--]=a>>24&255),n=0,o=0):(n=a>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?a.prototype._countBits=function(t){return 32-Math.clz32(t)}:a.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){i("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-r),this._strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){i("number"==typeof t&&t>=0);var r=t/26|0,n=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,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(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,a=0;a>26,this.words[a]=67108863&e;for(;0!==o&&a>26,this.words[a]=67108863&e;if(0===o&&a>>13,d=0|a[1],p=8191&d,m=d>>>13,y=0|a[2],b=8191&y,v=y>>>13,g=0|a[3],w=8191&g,_=g>>>13,k=0|a[4],x=8191&k,S=k>>>13,O=0|a[5],R=8191&O,E=O>>>13,T=0|a[6],j=8191&T,C=T>>>13,M=0|a[7],P=8191&M,A=M>>>13,I=0|a[8],D=8191&I,N=I>>>13,B=0|a[9],F=8191&B,L=B>>>13,z=0|s[0],U=8191&z,H=z>>>13,V=0|s[1],q=8191&V,W=V>>>13,$=0|s[2],X=8191&$,K=$>>>13,Z=0|s[3],Y=8191&Z,G=Z>>>13,J=0|s[4],Q=8191&J,tt=J>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],ot=8191&it,at=it>>>13,st=0|s[7],ut=8191&st,ct=st>>>13,ft=0|s[8],lt=8191&ft,ht=ft>>>13,dt=0|s[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(h,U)|0))<<13)|0;c=((o=Math.imul(h,H))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,U),i=(i=Math.imul(p,H))+Math.imul(m,U)|0,o=Math.imul(m,H);var bt=(c+(n=n+Math.imul(l,q)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(h,q)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,H))+Math.imul(v,U)|0,o=Math.imul(v,H),n=n+Math.imul(p,q)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,q)|0,o=o+Math.imul(m,W)|0;var vt=(c+(n=n+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,K)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,K)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(w,U),i=(i=Math.imul(w,H))+Math.imul(_,U)|0,o=Math.imul(_,H),n=n+Math.imul(b,q)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(v,q)|0,o=o+Math.imul(v,W)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,K)|0;var gt=(c+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(h,Y)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(x,U),i=(i=Math.imul(x,H))+Math.imul(S,U)|0,o=Math.imul(S,H),n=n+Math.imul(w,q)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,q)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(b,X)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(v,X)|0,o=o+Math.imul(v,K)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,G)|0;var wt=(c+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(R,U),i=(i=Math.imul(R,H))+Math.imul(E,U)|0,o=Math.imul(E,H),n=n+Math.imul(x,q)|0,i=(i=i+Math.imul(x,W)|0)+Math.imul(S,q)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,K)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,K)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(v,Y)|0,o=o+Math.imul(v,G)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((o=o+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(j,U),i=(i=Math.imul(j,H))+Math.imul(C,U)|0,o=Math.imul(C,H),n=n+Math.imul(R,q)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(E,q)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(x,X)|0,i=(i=i+Math.imul(x,K)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,K)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var kt=(c+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,H))+Math.imul(A,U)|0,o=Math.imul(A,H),n=n+Math.imul(j,q)|0,i=(i=i+Math.imul(j,W)|0)+Math.imul(C,q)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(R,X)|0,i=(i=i+Math.imul(R,K)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,K)|0,n=n+Math.imul(x,Y)|0,i=(i=i+Math.imul(x,G)|0)+Math.imul(S,Y)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(v,rt)|0,o=o+Math.imul(v,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,at)|0;var xt=(c+(n=n+Math.imul(l,ut)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,ut)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,H))+Math.imul(N,U)|0,o=Math.imul(N,H),n=n+Math.imul(P,q)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(A,q)|0,o=o+Math.imul(A,W)|0,n=n+Math.imul(j,X)|0,i=(i=i+Math.imul(j,K)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,K)|0,n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,G)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,G)|0,n=n+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,tt)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,n=n+Math.imul(p,ut)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0;var St=(c+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(F,U),i=(i=Math.imul(F,H))+Math.imul(L,U)|0,o=Math.imul(L,H),n=n+Math.imul(D,q)|0,i=(i=i+Math.imul(D,W)|0)+Math.imul(N,q)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(A,X)|0,o=o+Math.imul(A,K)|0,n=n+Math.imul(j,Y)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,G)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(x,rt)|0,i=(i=i+Math.imul(x,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,at)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,at)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,ut)|0,o=o+Math.imul(v,ct)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ht)|0;var Ot=(c+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(F,q),i=(i=Math.imul(F,W))+Math.imul(L,q)|0,o=Math.imul(L,W),n=n+Math.imul(D,X)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,K)|0,n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(A,Y)|0,o=o+Math.imul(A,G)|0,n=n+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(x,ot)|0,i=(i=i+Math.imul(x,at)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,at)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ht)|0;var Rt=(c+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;c=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(F,X),i=(i=Math.imul(F,K))+Math.imul(L,X)|0,o=Math.imul(L,K),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,G)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(A,Q)|0,o=o+Math.imul(A,tt)|0,n=n+Math.imul(j,rt)|0,i=(i=i+Math.imul(j,nt)|0)+Math.imul(C,rt)|0,o=o+Math.imul(C,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,n=n+Math.imul(x,ut)|0,i=(i=i+Math.imul(x,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ht)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ht)|0;var Et=(c+(n=n+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(F,Y),i=(i=Math.imul(F,G))+Math.imul(L,Y)|0,o=Math.imul(L,G),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(A,rt)|0,o=o+Math.imul(A,nt)|0,n=n+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(C,ot)|0,o=o+Math.imul(C,at)|0,n=n+Math.imul(R,ut)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(E,ut)|0,o=o+Math.imul(E,ct)|0,n=n+Math.imul(x,lt)|0,i=(i=i+Math.imul(x,ht)|0)+Math.imul(S,lt)|0,o=o+Math.imul(S,ht)|0;var Tt=(c+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;c=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(L,Q)|0,o=Math.imul(L,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(N,rt)|0,o=o+Math.imul(N,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,at)|0)+Math.imul(A,ot)|0,o=o+Math.imul(A,at)|0,n=n+Math.imul(j,ut)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(C,ut)|0,o=o+Math.imul(C,ct)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ht)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ht)|0;var jt=(c+(n=n+Math.imul(x,pt)|0)|0)+((8191&(i=(i=i+Math.imul(x,mt)|0)+Math.imul(S,pt)|0))<<13)|0;c=((o=o+Math.imul(S,mt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863,n=Math.imul(F,rt),i=(i=Math.imul(F,nt))+Math.imul(L,rt)|0,o=Math.imul(L,nt),n=n+Math.imul(D,ot)|0,i=(i=i+Math.imul(D,at)|0)+Math.imul(N,ot)|0,o=o+Math.imul(N,at)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(A,ut)|0,o=o+Math.imul(A,ct)|0,n=n+Math.imul(j,lt)|0,i=(i=i+Math.imul(j,ht)|0)+Math.imul(C,lt)|0,o=o+Math.imul(C,ht)|0;var Ct=(c+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(F,ot),i=(i=Math.imul(F,at))+Math.imul(L,ot)|0,o=Math.imul(L,at),n=n+Math.imul(D,ut)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(N,ut)|0,o=o+Math.imul(N,ct)|0,n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(A,lt)|0,o=o+Math.imul(A,ht)|0;var Mt=(c+(n=n+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,mt)|0)+Math.imul(C,pt)|0))<<13)|0;c=((o=o+Math.imul(C,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(F,ut),i=(i=Math.imul(F,ct))+Math.imul(L,ut)|0,o=Math.imul(L,ct),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(N,lt)|0,o=o+Math.imul(N,ht)|0;var Pt=(c+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(A,pt)|0))<<13)|0;c=((o=o+Math.imul(A,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(F,lt),i=(i=Math.imul(F,ht))+Math.imul(L,lt)|0,o=Math.imul(L,ht);var At=(c+(n=n+Math.imul(D,pt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(N,pt)|0))<<13)|0;c=((o=o+Math.imul(N,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863;var It=(c+(n=Math.imul(F,pt))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(L,pt)|0))<<13)|0;return c=((o=Math.imul(L,mt))+(i>>>13)|0)+(It>>>26)|0,It&=67108863,u[0]=yt,u[1]=bt,u[2]=vt,u[3]=gt,u[4]=wt,u[5]=_t,u[6]=kt,u[7]=xt,u[8]=St,u[9]=Ot,u[10]=Rt,u[11]=Et,u[12]=Tt,u[13]=jt,u[14]=Ct,u[15]=Mt,u[16]=Pt,u[17]=At,u[18]=It,0!==c&&(u[19]=c,r.length++),r};function b(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.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()}function v(t,e,r){return b(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(y=m),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):r<63?m(this,t,e):r<1024?b(this,t,e):v(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,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*e;a>=26,r+=o/67108864|0,r+=a>>>26,this.words[n]=67108863&a}return 0!==r&&(this.words[n]=r,this.length++),e?this.ineg():this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i&1}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,n=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(e=0;e>>26-r}a&&(this.words[e]=a,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),s=67108863^67108863>>>o<a)for(this.length-=a,c=0;c=0&&(0!==f||c>=n);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(t,e,r){return i(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){i("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,n=1<=0);var e=t%26,r=(t-e)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(i("number"==typeof t),i(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(u/67108864|0),this.words[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(t,e){var r=(this.length,t.length),n=this.clone(),i=t,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"!==e){(s=new a(null)).length=u+1,s.words=new Array(s.length);for(var c=0;c=0;l--){var h=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);s&&(s.words[l]=h)}return s&&s._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return i(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(n=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:n,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(n=s.div.neg()),{div:n,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modrn(t.words[0]))}:this._wordDiv(t,e);var n,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modrn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%t;return e?-n:n},a.prototype.modn=function(t){return this.modrn(t)},a.prototype.idivn=function(t){var e=t<0;e&&(t=-t),i(t<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(f),o.isub(l)),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(f),u.isub(l)),s.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),n.isub(s),o.isub(u)):(r.isub(e),s.isub(n),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(t){i(0===t.negative),i(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var n,o=new a(1),s=new a(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(u),o.iushrn(1);for(var l=0,h=1;0==(r.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(r.iushrn(l);l-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(n=0===e.cmpn(1)?o:s).cmpn(0)<0&&n.iadd(t),n},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){i("number"==typeof t);var e=t%26,r=(t-e)/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(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),i(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new R(t)},a.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function k(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function O(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function R(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){R.call(this,t),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)}_.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},o(k,_),k.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=o}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},k.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new k;else if("p224"===t)e=new x;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new O}return w[t]=e,e},R.prototype._verify1=function(t){i(0===t.negative,"red works only with positives"),i(t.red,"red works only with red numbers")},R.prototype._verify2=function(t,e){i(0==(t.negative|e.negative),"red works only with positives"),i(t.red&&t.red===e.red,"red works only with red numbers")},R.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},R.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},R.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},R.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},R.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},R.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},R.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},R.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},R.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},R.prototype.isqr=function(t){return this.imul(t,t.clone())},R.prototype.sqr=function(t){return this.mul(t,t)},R.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(i(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,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(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new a(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var l=this.pow(f,n),h=this.pow(t,n.addn(1).iushrn(1)),d=this.pow(t,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 c=e.words[n],f=u-1;f>=0;f--){var l=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==o?(o<<=1,o|=l,(4===++s||0===n&&0===f)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}u=26}return i},R.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},R.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new E(t)},o(E,R),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),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)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),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)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e)},{buffer:185}],184:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i;function o(t){this.rand=t}if(e.exports=function(t){return i||(i=new o(null)),i.generate(t)},e.exports.Rand=o,o.prototype.generate=function(t){return this._rand(t)},o.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r>>24]^f[p>>>16&255]^l[m>>>8&255]^h[255&y]^e[b++],a=c[p>>>24]^f[m>>>16&255]^l[y>>>8&255]^h[255&d]^e[b++],s=c[m>>>24]^f[y>>>16&255]^l[d>>>8&255]^h[255&p]^e[b++],u=c[y>>>24]^f[d>>>16&255]^l[p>>>8&255]^h[255&m]^e[b++],d=o,p=a,m=s,y=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&y])^e[b++],a=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[y>>>8&255]<<8|n[255&d])^e[b++],s=(n[m>>>24]<<24|n[y>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[b++],u=(n[y>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^e[b++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[a]=c,n[c]=a;var f=t[a],l=t[f],h=t[l],d=257*t[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*h^65537*l^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=f^t[t[t[h^f]]],s^=t[t[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/e|0]<<24):e>6&&o%e==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-e]^a}for(var c=[],f=0;f>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=a(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},{"safe-buffer":384}],187:[function(t,e,r){"use strict";var n=t("./aes"),i=t("safe-buffer").Buffer,o=t("cipher-base"),a=t("inherits"),s=t("./ghash"),u=t("buffer-xor"),c=t("./incr32");function f(t,e,r,a){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var f=this._cipher.encryptBlock(u);this._ghash=new s(f),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new s(r),o=e.length,a=o%16;n.update(e),a&&(a=16-a,n.update(i.alloc(a,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),t._finID=n.state;var l=i.from(t._finID);return c(l),l}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},r.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(e,!1,r.key,r.iv);return h(t,n.key,n.iv)},r.createDecipheriv=h},{"./aes":186,"./authCipher":187,"./modes":199,"./streamCipher":202,"cipher-base":218,evp_bytestokey:259,inherits:278,"safe-buffer":384}],190:[function(t,e,r){"use strict";var n=t("./modes"),i=t("./authCipher"),o=t("safe-buffer").Buffer,a=t("./streamCipher"),s=t("cipher-base"),u=t("./aes"),c=t("evp_bytestokey");function f(t,e,r){s.call(this),this._cache=new h,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}t("inherits")(f,s),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function d(t,e,r){var s=n[t.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==s.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new a(s.module,e,r):"auth"===s.type?new i(s.module,e,r):new f(s.module,e,r)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=o.concat([this.cache,t])},h.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},h.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},a.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},e.exports=a},{"safe-buffer":384}],192:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},{}],193:[function(t,e,r){"use strict";var n=t("buffer-xor");r.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},r.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},{"buffer-xor":217}],194:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=t("buffer-xor");function o(t,e,r){var o=e.length,a=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:a]),a}r.encrypt=function(t,e,r){for(var i,a=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){a=n.concat([a,o(t,e,r)]);break}i=t._cache.length,a=n.concat([a,o(t,e.slice(0,i),r)]),e=e.slice(i)}return a}},{"buffer-xor":217,"safe-buffer":384}],195:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer;function i(t,e,r){for(var n,i,a=-1,s=0;++a<8;)n=e&1<<7-a?128:0,s+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>a%8,t._prev=o(t._prev,r?n:i);return s}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i>7;return o}r.encrypt=function(t,e,r){for(var o=e.length,a=n.allocUnsafe(o),s=-1;++s=0||!r.umod(t.prime1)||!r.umod(t.prime2);)r=new n(i(e));return r}e.exports=o,o.getr=a}).call(this,t("buffer").Buffer)},{"bn.js":207,buffer:216,randombytes:366}],207:[function(t,e,r){arguments[4][181][0].apply(r,arguments)},{buffer:185,dup:181}],208:[function(t,e,r){"use strict";e.exports=t("./browser/algorithms.json")},{"./browser/algorithms.json":209}],209:[function(t,e,r){e.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],210:[function(t,e,r){e.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],211:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=t("create-hash"),o=t("readable-stream"),a=t("inherits"),s=t("./sign"),u=t("./verify"),c=t("./algorithms.json");function f(t){o.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){o.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){return new f(t)}function d(t){return new l(t)}Object.keys(c).forEach((function(t){c[t].id=n.from(c[t].id,"hex"),c[t.toLowerCase()]=c[t]})),a(f,o.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return"string"==typeof t&&(t=n.from(t,e)),this._hash.update(t),this},f.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=s(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},a(l,o.Writable),l.prototype._write=function(t,e,r){this._hash.update(t),r()},l.prototype.update=function(t,e){return"string"==typeof t&&(t=n.from(t,e)),this._hash.update(t),this},l.prototype.verify=function(t,e,r){"string"==typeof e&&(e=n.from(e,r)),this.end();var i=this._hash.digest();return u(e,i,t,this._signType,this._tag)},e.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},{"./algorithms.json":209,"./sign":212,"./verify":213,"create-hash":222,inherits:278,"readable-stream":382,"safe-buffer":214}],212:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=t("create-hmac"),o=t("browserify-rsa"),a=t("elliptic").ec,s=t("bn.js"),u=t("parse-asn1"),c=t("./curves.json");function f(t,e,r,o){if((t=n.from(t.toArray())).length0&&r.ishrn(n),r}function h(t,e,r){var o,a;do{for(o=n.alloc(0);8*o.length=e)throw new Error("invalid sig")}e.exports=function(t,e,r,c,f){var l=a(r);if("ec"===l.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),a=r.data.subjectPrivateKey.data;return i.verify(e,t,a)}(t,e,l)}if("dsa"===l.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,o=r.data.q,s=r.data.g,c=r.data.pub_key,f=a.signature.decode(t,"der"),l=f.s,h=f.r;u(l,o),u(h,o);var d=i.mont(n),p=l.invm(o);return 0===s.toRed(d).redPow(new i(e).mul(p).mod(o)).fromRed().mul(c.toRed(d).redPow(h.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(h)}(t,e,l)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");e=n.concat([f,e]);for(var h=l.modulus.byteLength(),d=[1],p=0;e.length+d.length+2 */var n=t("buffer"),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,r),r.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},{buffer:216}],215:[function(t,e,r){arguments[4][185][0].apply(r,arguments)},{dup:185}],216:[function(t,e,r){(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ "use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=t("base64-js"),o=t("ieee754");r.Buffer=e,r.SlowBuffer=function(t){+t!=t&&(t=0);return e.alloc(+t)},r.INSPECT_MAX_BYTES=50;function a(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=e.prototype,r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return s(t,e,r)}function s(t,r,i){if("string"==typeof t)return function(t,r){"string"==typeof r&&""!==r||(r="utf8");if(!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|h(t,r),i=a(n),o=i.write(t,r);o!==n&&(i=i.slice(0,o));return i}(t,r);if(ArrayBuffer.isView(t))return f(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(t));if(L(t,ArrayBuffer)||t&&L(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|t}function h(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||L(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+n(t));var i=t.length,o=arguments.length>2&&!0===arguments[2];if(!o&&0===i)return 0;for(var a=!1;;)switch(r){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return N(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return B(t).length;default:if(a)return o?-1:N(t).length;r=(""+r).toLowerCase(),a=!0}}function d(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return E(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return x(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,r,n,i,o){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),z(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=e.from(r,i)),e.isBuffer(r))return 0===r.length?-1:y(t,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):y(t,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function x(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;ne&&(t+=" ... "),""},e.prototype.compare=function(t,r,i,o,a){if(L(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+n(t));if(void 0===r&&(r=0),void 0===i&&(i=t?t.length:0),void 0===o&&(o=0),void 0===a&&(a=this.length),r<0||i>t.length||o<0||a>this.length)throw new RangeError("out of range index");if(o>=a&&r>=i)return 0;if(o>=a)return-1;if(r>=i)return 1;if(this===t)return 0;for(var s=(a>>>=0)-(o>>>=0),u=(i>>>=0)-(r>>>=0),c=Math.min(s,u),f=this.slice(o,a),l=t.slice(r,i),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>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,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return g(this,t,e,r);case"latin1":case"binary":return w(this,t,e,r);case"base64":return _(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function C(t,r,n,i,o,a){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||rt.length)throw new RangeError("Index out of range")}function M(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(t,e,r,n,i){return e=+e,r>>>=0,i||M(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function A(t,e,r,n,i){return e=+e,r>>>=0,i||M(t,0,r,8),o.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||j(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},e.prototype.readInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||j(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||j(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||j(t,4,this.length),o.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||j(t,4,this.length),o.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||j(t,8,this.length),o.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||j(t,8,this.length),o.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return A(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return A(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,i){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r=0;--a)t[a+r]=this[a+n];else Uint8Array.prototype.set.call(t,this.subarray(n,i),r);return o},e.prototype.fill=function(t,r,n,i){if("string"==typeof t){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var o=t.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(t=o)}}else"number"==typeof t&&(t&=255);if(r<0||this.length>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=r;a55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=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((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function B(t){return i.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(I,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function L(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function z(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":182,buffer:216,ieee754:276}],217:[function(t,e,r){(function(t){"use strict";e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),o=0;or)?e=("rmd160"===t?new u:c(t)).update(e).digest():e.length64?e=t(e):e.length<64&&(e=i.concat([e,a],64));for(var r=this._ipad=i.allocUnsafe(64),n=this._opad=i.allocUnsafe(64),s=0;s<64;s++)r[s]=54^e[s],n[s]=92^e[s];this._hash=[r]}n(s,o),s.prototype._update=function(t){this._hash.push(t)},s.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},e.exports=s},{"cipher-base":218,inherits:278,"safe-buffer":384}],226:[function(t,e,r){"use strict";r.randomBytes=r.rng=r.pseudoRandomBytes=r.prng=t("randombytes"),r.createHash=r.Hash=t("create-hash"),r.createHmac=r.Hmac=t("create-hmac");var n=t("browserify-sign/algos"),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);r.getHashes=function(){return o};var a=t("pbkdf2");r.pbkdf2=a.pbkdf2,r.pbkdf2Sync=a.pbkdf2Sync;var s=t("browserify-cipher");r.Cipher=s.Cipher,r.createCipher=s.createCipher,r.Cipheriv=s.Cipheriv,r.createCipheriv=s.createCipheriv,r.Decipher=s.Decipher,r.createDecipher=s.createDecipher,r.Decipheriv=s.Decipheriv,r.createDecipheriv=s.createDecipheriv,r.getCiphers=s.getCiphers,r.listCiphers=s.listCiphers;var u=t("diffie-hellman");r.DiffieHellmanGroup=u.DiffieHellmanGroup,r.createDiffieHellmanGroup=u.createDiffieHellmanGroup,r.getDiffieHellman=u.getDiffieHellman,r.createDiffieHellman=u.createDiffieHellman,r.DiffieHellman=u.DiffieHellman;var c=t("browserify-sign");r.createSign=c.createSign,r.Sign=c.Sign,r.createVerify=c.createVerify,r.Verify=c.Verify,r.createECDH=t("create-ecdh");var f=t("public-encrypt");r.publicEncrypt=f.publicEncrypt,r.privateEncrypt=f.privateEncrypt,r.publicDecrypt=f.publicDecrypt,r.privateDecrypt=f.privateDecrypt;var l=t("randomfill");r.randomFill=l.randomFill,r.randomFillSync=l.randomFillSync,r.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},r.constants={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,ALPN_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}},{"browserify-cipher":203,"browserify-sign":211,"browserify-sign/algos":208,"create-ecdh":220,"create-hash":222,"create-hmac":224,"diffie-hellman":236,pbkdf2:351,"public-encrypt":359,randombytes:366,randomfill:367}],227:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,i){"object"==(void 0===r?"undefined":n(r))&&void 0!==e?e.exports=i():(void 0).dayjs=i()}(0,(function(){var t="millisecond",e="second",r="minute",i="hour",o="day",a="week",s="month",u="quarter",c="year",f="date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d+)?$/,h=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},p={s:d,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),i=r%60;return(e<=0?"+":"-")+d(n,2,"0")+":"+d(i,2,"0")},m:function t(e,r){if(e.date()68?1900:2e3)}],YYYY:[/\d{4}/,o("year")],Z:a,ZZ:a},c=function(t,r,n){try{var i=function(t){for(var r=t.match(e),n=r.length,i=0;i0?a-1:p.getMonth());var v=c||0,g=f||0,w=l||0,_=h||0;return d?new Date(Date.UTC(y,b,m,v,g,w,_+60*d.offset*1e3)):n?new Date(Date.UTC(y,b,m,v,g,w,_)):new Date(y,b,m,v,g,w,_)}catch(t){return new Date("")}};return function(e,r,n){var i=r.prototype,o=i.parse;i.parse=function(e){var r=e.date,i=e.utc,a=e.args;this.$u=i;var s=a[1];if("string"==typeof s){var u=!0===a[2],f=!0===a[3],l=u||f,h=a[2];f&&(h=a[2]),u||(t=h?n.Ls[h]:this.$locale()),this.$d=c(r,s,i),this.init(),h&&!0!==h&&(this.$L=this.locale(h).$L),l&&r!==this.format(s)&&(this.$d=new Date(""))}else if(s instanceof Array)for(var d=s.length,p=1;p<=d;p+=1){a[1]=s[p-1];var m=n.apply(this,a);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}p===d&&(this.$d=new Date(""))}else o.call(this,e)}}}))},{}],229:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i;i=function(){return function(t,e,r){var n=(new Date).getTimezoneOffset(),i=e.prototype;r.utc=function(t){return new e({date:t,utc:!0,args:arguments})},i.utc=function(){return r(this.toDate(),{locale:this.$L,utc:!0})},i.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var o=i.parse;i.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var a=i.init;i.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else a.call(this)};var s=i.utcOffset;i.utcOffset=function(t,e){var r=this.$utils().u;if(r(t))return this.$u?0:r(this.$offset)?s.call(this):this.$offset;var i=Math.abs(t)<=16?60*t:t,o=this;return e?(o.$offset=i,o.$u=0===t,o):(0!==t?(o=this.local().add(i+n,"minute")).$offset=i:o=this.utc(),o)};var u=i.format;i.format=function(t){var e=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return u.call(this,e)},i.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+n;return this.$d.valueOf()-6e4*t},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var c=i.toDate;i.toDate=function(t){return"s"===t&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)};var f=i.diff;i.diff=function(t,e,n){var i=this.local(),o=r(t).local();return f.call(i,o,e,n)}}},"object"==(void 0===r?"undefined":n(r))&&void 0!==e?e.exports=i():(void 0).dayjs_plugin_utc=i()},{}],230:[function(t,e,r){"use strict";r.utils=t("./des/utils"),r.Cipher=t("./des/cipher"),r.DES=t("./des/des"),r.CBC=t("./des/cbc"),r.EDE=t("./des/ede")},{"./des/cbc":231,"./des/cipher":232,"./des/des":233,"./des/ede":234,"./des/utils":235}],231:[function(t,e,r){"use strict";var n=t("minimalistic-assert"),i=t("inherits"),o={};function a(t){n.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,t.keys,a)}},u.prototype._update=function(t,e,r,n){var i=this._desState,a=o.readUInt32BE(t,e),s=o.readUInt32BE(t,e+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(r,a,n),o.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n>>0,a=h}o.rip(s,a,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var a=r,s=e,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],f=t.keys[u+1];o.expand(a,t.tmp,0),c^=t.tmp[0],f^=t.tmp[1];var l=o.substitute(c,f),h=a;a=(s^o.permute(l))>>>0,s=h}o.rip(a,s,n,i)}},{"./cipher":232,"./utils":235,inherits:278,"minimalistic-assert":328}],234:[function(t,e,r){"use strict";var n=t("minimalistic-assert"),i=t("inherits"),o=t("./cipher"),a=t("./des");function s(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function u(t){o.call(this,t);var e=new s(this.type,this.options.key);this._edeState=e}i(u,o),e.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},{"./cipher":232,"./des":233,inherits:278,"minimalistic-assert":328}],235:[function(t,e,r){"use strict";r.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},r.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},r.ip=function(t,e,r,n){for(var i=0,o=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1}r[n+0]=i>>>0,r[n+1]=o>>>0},r.rip=function(t,e,r,n){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)i<<=1,i|=e>>>s+a&1,i<<=1,i|=t>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)o<<=1,o|=e>>>s+a&1,o<<=1,o|=t>>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.pc1=function(t,e,r,n){for(var i=0,o=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;r[n+0]=i>>>0,r[n+1]=o>>>0},r.r28shl=function(t,e){return t<>>28-e};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(t,e,r,i){for(var o=0,a=0,s=n.length>>>1,u=0;u>>n[u]&1;for(u=s;u>>n[u]&1;r[i+0]=o>>>0,r[i+1]=a>>>0},r.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(t,e){for(var r=0,n=0;n<4;n++){r<<=4,r|=i[64*n+(t>>>18-6*n&63)]}for(n=0;n<4;n++){r<<=4,r|=i[256+64*n+(e>>>18-6*n&63)]}return r>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(t){for(var e=0,r=0;r>>o[r]&1;return e>>>0},r.padSplit=function(t,e,r){for(var n=t.toString(2);n.lengtht;)r.ishrn(1);if(r.isEven()&&r.iadd(s),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(c))for(;r.mod(f).cmp(l);)r.iadd(d)}else for(;r.mod(o).cmp(h);)r.iadd(d);if(y(p=r.shrn(1))&&y(r)&&b(p)&&b(r)&&a.test(p)&&a.test(r))return r}}},{"bn.js":240,"miller-rabin":326,randombytes:366}],239:[function(t,e,r){e.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],240:[function(t,e,r){arguments[4][181][0].apply(r,arguments)},{buffer:185,dup:181}],241:[function(t,e,r){"use strict";var n=r;n.version=t("../package.json").version,n.utils=t("./elliptic/utils"),n.rand=t("brorand"),n.curve=t("./elliptic/curve"),n.curves=t("./elliptic/curves"),n.ec=t("./elliptic/ec"),n.eddsa=t("./elliptic/eddsa")},{"../package.json":257,"./elliptic/curve":244,"./elliptic/curves":247,"./elliptic/ec":248,"./elliptic/eddsa":251,"./elliptic/utils":255,brorand:184}],242:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("../utils"),o=i.getNAF,a=i.getJSF,s=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.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=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){s(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<=u;e--)c=(c<<1)+n[e];a.push(c)}for(var f=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(u=0;u=0;c--){for(e=0;c>=0&&0===a[c];c--)e++;if(c>=0&&e++,u=u.dblp(e),c<0)break;var f=a[c];s(0!==f),u="affine"===t.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,f=0,l=0;l=1;l-=2){var d=l-1,p=l;if(1===s[d]&&1===s[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=a(r[d],r[p]);f=Math.max(b[0].length,f),c[d]=new Array(f),c[p]=new Array(f);for(var v=0;v=0;l--){for(var x=0;l>=0;){var S=!0;for(v=0;v=0&&x++,_=_.dblp(x),l<0)break;for(v=0;v0?O=u[v][R-1>>1]:R<0&&(O=u[v][-R-1>>1].neg()),_="affine"===O.type?_.mixedAdd(O):_.add(O))}}for(l=0;l=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),a=o.redSub(r),s=n.redSub(e),u=i.redMul(a),c=o.redMul(s),f=i.redMul(s),l=a.redMul(o);return this.curve.point(u,c,l,f)},c.prototype._projDbl=function(){var t,e,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)t=n.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),e=a.redMul(c.redSub(o)),r=a.redSqr().redSub(a).redSub(a);else{var s=this.z.redSqr(),u=a.redSub(s).redISub(s);t=n.redSub(i).redISub(o).redMul(u),e=a.redMul(c.redSub(o)),r=a.redMul(u)}}else{var c=i.redAdd(o);s=this.curve._mulC(this.z).redSqr(),u=c.redSub(s).redSub(s);t=this.curve._mulC(n.redISub(c)).redMul(u),e=this.curve._mulC(c).redMul(i.redISub(o)),r=c.redMul(u)}return this.curve.point(t,e,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),a=i.redSub(n),s=i.redAdd(n),u=r.redAdd(e),c=o.redMul(a),f=s.redMul(u),l=o.redMul(u),h=a.redMul(s);return this.curve.point(c,f,h,l)},c.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),s=this.curve.d.redMul(o).redMul(a),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),l=n.redMul(u).redMul(f);return this.curve.twisted?(e=n.redMul(c).redMul(a.redSub(this.curve._mulA(o))),r=u.redMul(c)):(e=n.redMul(c).redMul(a.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(l,e,r)},c.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},c.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},{"../utils":255,"./base":242,"bn.js":256,inherits:278}],244:[function(t,e,r){"use strict";var n=r;n.base=t("./base"),n.short=t("./short"),n.mont=t("./mont"),n.edwards=t("./edwards")},{"./base":242,"./edwards":243,"./mont":245,"./short":246}],245:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("inherits"),o=t("./base"),a=t("../utils");function s(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),e.exports=s,s.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),s.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},s.prototype.point=function(t,e){return new u(this,t,e)},s.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),a=i.redMul(n),s=e.z.redMul(o.redAdd(a).redSqr()),u=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":255,"./base":242,"bn.js":256,inherits:278}],246:[function(t,e,r){"use strict";var n=t("../utils"),i=t("bn.js"),o=t("inherits"),a=t("./base"),s=n.assert;function u(t){a.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,r,n){a.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,r,n){a.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),e.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,a,s,u,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,d=this.n.clone(),p=new i(1),m=new i(0),y=new i(0),b=new i(1),v=0;0!==h.cmpn(0);){var g=d.div(h);c=d.sub(g.mul(h)),f=y.sub(g.mul(p));var w=b.sub(g.mul(m));if(!n&&c.cmp(l)<0)e=u.neg(),r=p,n=c.neg(),o=f;else if(n&&2==++v)break;u=c,d=h,h=c,y=p,p=f,b=m,m=w}a=c.neg(),s=f;var _=n.sqr().add(o.sqr());return a.sqr().add(s.sqr()).cmp(_)>=0&&(a=e,s=r),n.negative&&(n=n.neg(),o=o.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:o},{a:a,b:s}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:t.sub(a).sub(s),k2:u.add(c).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o":""},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).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(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.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 e},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),u.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);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(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),a=t.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 c=s.redSqr(),f=c.redMul(s),l=n.redMul(c),h=u.redSqr().redIAdd(f).redISub(l).redISub(l),d=u.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(s);return this.curve.jpoint(h,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).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(),c=u.redMul(a),f=r.redMul(u),l=s.redSqr().redIAdd(c).redISub(f).redISub(f),h=s.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"":""},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":255,"./base":242,"bn.js":256,inherits:278}],247:[function(t,e,r){"use strict";var n,i=r,o=t("hash.js"),a=t("./curve"),s=t("./utils").assert;function u(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=t("./precomputed/secp256k1")}catch(t){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},{"./curve":244,"./precomputed/secp256k1":254,"./utils":255,"hash.js":263}],248:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=t("bn.js"),o=t("hmac-drbg"),a=t("../utils"),s=t("../curves"),u=t("brorand"),c=a.assert,f=t("./key"),l=t("./signature");function h(t){if(!(this instanceof h))return new h(t);"string"==typeof t&&(c(s.hasOwnProperty(t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}e.exports=h,h.prototype.keyPair=function(t){return new f(this,t)},h.prototype.keyFromPrivate=function(t,e){return f.fromPrivate(this,t,e)},h.prototype.keyFromPublic=function(t,e){return f.fromPublic(this,t,e)},h.prototype.genKeyPair=function(t){t||(t={});for(var e=new o({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||u(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var a=new i(e.generate(r));if(!(a.cmp(n)>0))return a.iaddn(1),this.keyFromPrivate(a)}},h.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},h.prototype.sign=function(t,e,r,a){"object"===n(r)&&(a=r,r=null),a||(a={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new i(t,16));for(var s=this.n.byteLength(),u=e.getPrivate().toArray("be",s),c=t.toArray("be",s),f=new o({hash:this.hash,entropy:u,nonce:c,pers:a.pers,persEnc:a.persEnc||"utf8"}),h=this.n.sub(new i(1)),d=0;;d++){var p=a.k?a.k(d):new i(f.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(h)>=0)){var m=this.g.mul(p);if(!m.isInfinity()){var y=m.getX(),b=y.umod(this.n);if(0!==b.cmpn(0)){var v=p.invm(this.n).mul(b.mul(e.getPrivate()).iadd(t));if(0!==(v=v.umod(this.n)).cmpn(0)){var g=(m.getY().isOdd()?1:0)|(0!==y.cmp(b)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),g^=1),new l({r:b,s:v,recoveryParam:g})}}}}}},h.prototype.verify=function(t,e,r,n){t=this._truncateToN(new i(t,16)),r=this.keyFromPublic(r,n);var o=(e=new l(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,u=a.invm(this.n),c=u.mul(t).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&s.eqXToP(o):!(s=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===s.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(t,e,r,n){c((3&r)===r,"The recovery param is more than two bits"),e=new l(e,n);var o=this.n,a=new i(t),s=e.r,u=e.s,f=1&r,h=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");s=h?this.curve.pointFromX(s.add(this.curve.n),f):this.curve.pointFromX(s,f);var d=e.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(t,e,r,n){if(null!==(e=new l(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../curves":247,"../utils":255,"./key":249,"./signature":250,"bn.js":256,brorand:184,"hmac-drbg":275}],249:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("../utils").assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}e.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.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(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return""}},{"../utils":255,"bn.js":256}],250:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("../utils"),o=i.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function s(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=e.place;o>>=0;return!(i<=127)&&(e.place=a,i)}function c(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}e.exports=a,a.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new s;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var a=u(t,r);if(!1===a)return!1;var c=t.slice(r.place,a+r.place);if(r.place+=a,2!==t[r.place++])return!1;var f=u(t,r);if(!1===f)return!1;if(t.length!==f+r.place)return!1;var l=t.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new n(c),this.s=new n(l),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=c(e),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,e.length),(n=n.concat(e)).push(2),f(n,r.length);var o=n.concat(r),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,t)}},{"../utils":255,"bn.js":256}],251:[function(t,e,r){"use strict";var n=t("hash.js"),i=t("../curves"),o=t("../utils"),a=o.assert,s=o.parseBytes,u=t("./key"),c=t("./signature");function f(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=i[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}e.exports=f,f.prototype.sign=function(t,e){t=s(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(t,e,r){t=s(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e(i>>1)-1?(i>>1)-u:u,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n=0,i=0;t.cmpn(-n)>0||e.cmpn(-i)>0;){var o,a,s,u=t.andln(3)+n&3,c=e.andln(3)+i&3;if(3===u&&(u=-1),3===c&&(c=-1),0==(1&u))o=0;else o=3!==(s=t.andln(7)+n&7)&&5!==s||2!==c?u:-u;if(r[0].push(o),0==(1&c))a=0;else a=3!==(s=e.andln(7)+i&7)&&5!==s||2!==u?c:-c;r[1].push(a),2*n===o+1&&(n=1-n),2*i===a+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},{"bn.js":256,"minimalistic-assert":328,"minimalistic-crypto-utils":329}],256:[function(t,e,r){arguments[4][181][0].apply(r,arguments)},{buffer:185,dup:181}],257:[function(t,e,r){e.exports={_from:"elliptic@^6.5.3",_id:"elliptic@6.5.3",_inBundle:!1,_integrity:"sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.5.3",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.5.3",saveSpec:null,fetchSpec:"^6.5.3"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",_shasum:"cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6",_spec:"elliptic@^6.5.3",_where:"/mnt/d/dev/git/exceljs/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.5.3"}},{}],258:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=Object.create||function(t){var e=function(){};return e.prototype=t,new e},o=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return r},a=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var u,c=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),u=0===f.x}catch(t){u=!1}function l(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function h(t,e,r){if(e)t.call(r);else for(var n=t.length,i=k(t,n),o=0;o0&&u.length>a){u.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+u.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=u.length,"object"===("undefined"==typeof console?"undefined":n(console))&&console.warn&&console.warn("%s: %s",c.name,c.message)}}else u=s[e]=r,++t._eventsCount;return t}function v(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e1&&(e=arguments[1]),e instanceof Error)throw e;var u=new Error('Unhandled "error" event. ('+e+")");throw u.context=e,u}if(!(r=a[t]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:h(r,c,this);break;case 2:d(r,c,this,arguments[1]);break;case 3:p(r,c,this,arguments[1],arguments[2]);break;case 4:m(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),o=1;o=0;a--)if(r[a]===e||r[a].listener===e){s=r[a].listener,o=a;break}if(o<0)return this;0===o?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return w(this,t,!0)},s.prototype.rawListeners=function(t){return w(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):_.call(t,e)},s.prototype.listenerCount=_,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],259:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=t("md5.js");e.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,s=n.alloc(a),u=n.alloc(o||0),c=n.alloc(0);a>0||o>0;){var f=new i;f.update(c),f.update(t),e&&f.update(e),c=f.digest();var l=0;if(a>0){var h=s.length-a;l=Math.min(a,c.length),c.copy(s,h,0,l),a-=l}if(l0){var d=u.length-o,p=Math.min(o,c.length-l);c.copy(u,d,l,l+p),o-=p}}return c.fill(0),{key:s,iv:u}}},{"md5.js":325,"safe-buffer":384}],260:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@fast-csv/format");Object.defineProperty(r,"format",{enumerable:!0,get:function(){return n.format}}),Object.defineProperty(r,"write",{enumerable:!0,get:function(){return n.write}}),Object.defineProperty(r,"writeToStream",{enumerable:!0,get:function(){return n.writeToStream}}),Object.defineProperty(r,"writeToBuffer",{enumerable:!0,get:function(){return n.writeToBuffer}}),Object.defineProperty(r,"writeToString",{enumerable:!0,get:function(){return n.writeToString}}),Object.defineProperty(r,"writeToPath",{enumerable:!0,get:function(){return n.writeToPath}}),Object.defineProperty(r,"CsvFormatterStream",{enumerable:!0,get:function(){return n.CsvFormatterStream}}),Object.defineProperty(r,"FormatterOptions",{enumerable:!0,get:function(){return n.FormatterOptions}});var i=t("@fast-csv/parse");Object.defineProperty(r,"parse",{enumerable:!0,get:function(){return i.parse}}),Object.defineProperty(r,"parseString",{enumerable:!0,get:function(){return i.parseString}}),Object.defineProperty(r,"parseStream",{enumerable:!0,get:function(){return i.parseStream}}),Object.defineProperty(r,"parseFile",{enumerable:!0,get:function(){return i.parseFile}}),Object.defineProperty(r,"ParserOptions",{enumerable:!0,get:function(){return i.ParserOptions}}),Object.defineProperty(r,"CsvParserStream",{enumerable:!0,get:function(){return i.CsvParserStream}})},{"@fast-csv/format":148,"@fast-csv/parse":152}],261:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=t("readable-stream").Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}t("inherits")(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},{inherits:278,"readable-stream":382,"safe-buffer":262}],262:[function(t,e,r){arguments[4][214][0].apply(r,arguments)},{buffer:216,dup:214}],263:[function(t,e,r){"use strict";var n=r;n.utils=t("./hash/utils"),n.common=t("./hash/common"),n.sha=t("./hash/sha"),n.ripemd=t("./hash/ripemd"),n.hmac=t("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":264,"./hash/hmac":265,"./hash/ripemd":266,"./hash/sha":267,"./hash/utils":274}],264:[function(t,e,r){"use strict";var n=t("./utils"),i=t("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;othis.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e>>3},r.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},{"../utils":274}],274:[function(t,e,r){"use strict";var n=t("minimalistic-assert"),i=t("inherits");function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}r.inherits=i,r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i>6|192,r[n++]=63&a|128):o(t,i)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i>>0}return a},r.split32=function(t,e){for(var r=new Array(4*t.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(t,e){return t>>>e|t<<32-e},r.rotl32=function(t,e){return t<>>32-e},r.sum32=function(t,e){return t+e>>>0},r.sum32_3=function(t,e,r){return t+e+r>>>0},r.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},r.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},r.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,a=(o>>0,t[e+1]=o},r.sum64_hi=function(t,e,r,n){return(e+n>>>0>>0},r.sum64_lo=function(t,e,r,n){return e+n>>>0},r.sum64_4_hi=function(t,e,r,n,i,o,a,s){var u=0,c=e;return u+=(c=c+n>>>0)>>0)>>0)>>0},r.sum64_4_lo=function(t,e,r,n,i,o,a,s){return e+n+o+s>>>0},r.sum64_5_hi=function(t,e,r,n,i,o,a,s,u,c){var f=0,l=e;return f+=(l=l+n>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function(t,e,r,n,i,o,a,s,u,c){return e+n+o+s+c>>>0},r.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},r.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},r.shr64_hi=function(t,e,r){return t>>>r},r.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},{inherits:278,"minimalistic-assert":328}],275:[function(t,e,r){"use strict";var n=t("hash.js"),i=t("minimalistic-crypto-utils"),o=t("minimalistic-assert");function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}e.exports=a,a.prototype._init=function(t,e,r){var n=t.concat(e).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(t.concat(r||[])),this._reseed=1},a.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length>1,f=-7,l=r?i-1:0,h=r?-1:1,d=t[e+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+t[e+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var a,s,u,c=8*o-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,c-=8);t[r+d-p]|=128*m}},{}],277:[function(t,e,r){(function(t){"use strict";var r,n,i=t.MutationObserver||t.WebKitMutationObserver;if(i){var o=0,a=new i(f),s=t.document.createTextNode("");a.observe(s,{characterData:!0}),r=function(){s.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){f(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(f,0)};else{var u=new t.MessageChannel;u.port1.onmessage=f,r=function(){u.port2.postMessage(0)}}var c=[];function f(){var t,e;n=!0;for(var r=c.length;r;){for(e=c,c=[],t=-1;++t * @license MIT */function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],280:[function(t,e,r){"use strict";var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],281:[function(t,e,r){"use strict";var n=t("./utils"),i=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,a,s,u,c,f=[],l=0,h=t.length,d=h,p="string"!==n.getTypeOf(t);l>2,s=(3&e)<<4|r>>4,u=d>1?(15&r)<<2|i>>6:64,c=d>2?63&i:64,f.push(o.charAt(a)+o.charAt(s)+o.charAt(u)+o.charAt(c));return f.join("")},r.decode=function(t){var e,r,n,a,s,u,c=0,f=0;if("data:"===t.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var l,h=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&h--,t.charAt(t.length-2)===o.charAt(64)&&h--,h%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=i.uint8array?new Uint8Array(0|h):new Array(0|h);c>4,r=(15&a)<<4|(s=o.indexOf(t.charAt(c++)))>>2,n=(3&s)<<6|(u=o.indexOf(t.charAt(c++))),l[f++]=e,64!==s&&(l[f++]=r),64!==u&&(l[f++]=n);return l}},{"./support":310,"./utils":312}],282:[function(t,e,r){"use strict";var n=t("./external"),i=t("./stream/DataWorker"),o=t("./stream/DataLengthProbe"),a=t("./stream/Crc32Probe");o=t("./stream/DataLengthProbe");function s(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}s.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,r){return t.pipe(new a).pipe(new o("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new o("compressedSize")).withStreamInfo("compression",e)},e.exports=s},{"./external":286,"./stream/Crc32Probe":305,"./stream/DataLengthProbe":306,"./stream/DataWorker":307}],283:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":287,"./stream/GenericWorker":308}],284:[function(t,e,r){"use strict";var n=t("./utils");var i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r,n){var o=i,a=n+r;t^=-1;for(var s=n;s>>8^o[255&(t^e[s])];return-1^t}(0|e,t,t.length,0):function(t,e,r,n){var o=i,a=n+r;t^=-1;for(var s=n;s>>8^o[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length,0):0}},{"./utils":312}],285:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],286:[function(t,e,r){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:316}],287:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),s=n?"uint8array":"array";function u(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",o.inherits(u,a),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,t.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new u("Deflate",t)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":308,"./utils":312,pako:330}],288:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../stream/GenericWorker"),o=t("../utf8"),a=t("../crc32"),s=t("../signature"),u=function(t,e){var r,n="";for(r=0;r>>=8;return n},c=function(t,e,r,i,c,f){var l,h,d=t.file,p=t.compression,m=f!==o.utf8encode,y=n.transformTo("string",f(d.name)),b=n.transformTo("string",o.utf8encode(d.name)),v=d.comment,g=n.transformTo("string",f(v)),w=n.transformTo("string",o.utf8encode(v)),_=b.length!==d.name.length,k=w.length!==v.length,x="",S="",O="",R=d.dir,E=d.date,T={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(T.crc32=t.crc32,T.compressedSize=t.compressedSize,T.uncompressedSize=t.uncompressedSize);var j=0;e&&(j|=8),m||!_&&!k||(j|=2048);var C,M,P,A=0,I=0;R&&(A|=16),"UNIX"===c?(I=798,A|=(C=d.unixPermissions,M=R,P=C,C||(P=M?16893:33204),(65535&P)<<16)):(I=20,A|=63&(d.dosPermissions||0)),l=E.getUTCHours(),l<<=6,l|=E.getUTCMinutes(),l<<=5,l|=E.getUTCSeconds()/2,h=E.getUTCFullYear()-1980,h<<=4,h|=E.getUTCMonth()+1,h<<=5,h|=E.getUTCDate(),_&&(S=u(1,1)+u(a(y),4)+b,x+="up"+u(S.length,2)+S),k&&(O=u(1,1)+u(a(g),4)+w,x+="uc"+u(O.length,2)+O);var D="";return D+="\n\0",D+=u(j,2),D+=p.magic,D+=u(l,2),D+=u(h,2),D+=u(T.crc32,4),D+=u(T.compressedSize,4),D+=u(T.uncompressedSize,4),D+=u(y.length,2),D+=u(x.length,2),{fileRecord:s.LOCAL_FILE_HEADER+D+y+x,dirRecord:s.CENTRAL_FILE_HEADER+u(I,2)+D+u(g.length,2)+"\0\0\0\0"+u(A,4)+u(i,4)+y+x+g}},f=function(t){return s.DATA_DESCRIPTOR+u(t.crc32,4)+u(t.compressedSize,4)+u(t.uncompressedSize,4)};function l(t,e,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(l,i),l.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,i.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=c(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=c(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:f(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e0?t.substring(0,e):""},m=function(t){return"/"!==t.slice(-1)&&(t+="/"),t},y=function(t,e){return e=void 0!==e?e:s.createFolders,t=m(t),this.files[t]||d.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function b(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,n;for(e in this.files)this.files.hasOwnProperty(e)&&(n=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,n))},filter:function(t){var e=[];return this.forEach((function(r,n){t(r,n)&&e.push(n)})),e},file:function(t,e,r){if(1===arguments.length){if(b(t)){var n=t;return this.filter((function(t,e){return!e.dir&&n.test(t)}))}var i=this.files[this.root+t];return i&&!i.dir?i:null}return t=this.root+t,d.call(this,t,e,r),this},folder:function(t){if(!t)return this;if(b(t))return this.filter((function(e,r){return r.dir&&t.test(e)}));var e=this.root+t,r=y.call(this,e),n=this.clone();return n.root=r.name,n},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter((function(e,r){return r.name.slice(0,t.length)===t})),n=0;n=0;--o)if(this.data[o]===e&&this.data[o+1]===r&&this.data[o+2]===n&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),o=this.readData(4);return e===o[0]&&r===o[1]&&n===o[2]&&i===o[3]},i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":312,"./DataReader":298}],298:[function(t,e,r){"use strict";var n=t("../utils");function i(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":312}],299:[function(t,e,r){"use strict";var n=t("./Uint8ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":312,"./Uint8ArrayReader":301}],300:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":312,"./DataReader":298}],301:[function(t,e,r){"use strict";var n=t("./ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":312,"./ArrayReader":297}],302:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),s=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new s(t):i.uint8array?new u(n.transformTo("uint8array",t)):new o(n.transformTo("array",t)):new a(t)}},{"../support":310,"../utils":312,"./ArrayReader":297,"./NodeBufferReader":299,"./StringReader":300,"./Uint8ArrayReader":301}],303:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK\x03\x04",r.CENTRAL_FILE_HEADER="PK\x01\x02",r.CENTRAL_DIRECTORY_END="PK\x05\x06",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",r.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",r.DATA_DESCRIPTOR="PK\x07\b"},{}],304:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../utils");function o(t){n.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(o,n),o.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":312,"./GenericWorker":308}],305:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":284,"../utils":312,"./GenericWorker":308}],306:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(o,i),o.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":312,"./GenericWorker":308}],307:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":312,"./GenericWorker":308}],308:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r "+t:t}},e.exports=n},{}],309:[function(t,e,r){(function(r){"use strict";var n=t("../utils"),i=t("./ConvertWorker"),o=t("./GenericWorker"),a=t("../base64"),s=t("../support"),u=t("../external"),c=null;if(s.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function f(t,e){return new u.Promise((function(i,o){var s=[],u=t._internalType,c=t._outputType,f=t._mimeType;t.on("data",(function(t,r){s.push(t),e&&e(r)})).on("error",(function(t){s=[],o(t)})).on("end",(function(){try{var t=function(t,e,r){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),r);case"base64":return a.encode(e);default:return n.transformTo(t,e)}}(c,function(t,e){var n,i=0,o=null,a=0;for(n=0;n=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;s[254]=s[254]=1;function c(){a.call(this,"utf-8 decode"),this.leftOver=null}function f(){a.call(this,"utf-8 encode")}r.utf8encode=function(t){return i.nodebuffer?o.newBufferFrom(t,"utf-8"):function(t){var e,r,n,o,a,s=t.length,u=0;for(o=0;o>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e}(t)},r.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,o,a=t.length,u=new Array(2*a);for(r=0,e=0;e4)u[r++]=65533,e+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&e1?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(c,a),c.prototype.processChunk=function(t){var e=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var a=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}(e),u=e;a!==e.length&&(i.uint8array?(u=e.subarray(0,a),this.leftOver=e.subarray(a,e.length)):(u=e.slice(0,a),this.leftOver=e.slice(a,e.length))),this.push({data:r.utf8decode(u),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(f,a),f.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=f},{"./nodejsUtils":294,"./stream/GenericWorker":308,"./support":310,"./utils":312}],312:[function(t,e,r){"use strict";var n=t("./support"),i=t("./base64"),o=t("./nodejsUtils"),a=t("set-immediate-shim"),s=t("./external");function u(t){return t}function c(t,e){for(var r=0;r1;)try{return f.stringifyByChunk(t,n,e)}catch(t){e=Math.floor(e/2)}return f.stringifyByChar(t)}function h(t,e){for(var r=0;r1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t0)this.isSignature(e,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){this.reader=n(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=u},{"./reader/readerFor":302,"./signature":303,"./support":310,"./utf8":311,"./utils":312,"./zipEntry":314}],314:[function(t,e,r){"use strict";var n=t("./reader/readerFor"),i=t("./utils"),o=t("./compressedObject"),a=t("./crc32"),s=t("./utf8"),u=t("./compressions"),c=t("./support");function f(t,e){this.options=t,this.loadOptions=e}f.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in u)if(u.hasOwnProperty(e)&&u[e].magic===t)return u[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0===t&&(this.dosPermissions=63&this.externalFileAttributes),3===t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4-1},st.prototype.set=function(t,e){var r=this.__data__,n=ht(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},ut.prototype.clear=function(){this.__data__={hash:new at,map:new(X||st),string:new at}},ut.prototype.delete=function(t){return Rt(this,t).delete(t)},ut.prototype.get=function(t){return Rt(this,t).get(t)},ut.prototype.has=function(t){return Rt(this,t).has(t)},ut.prototype.set=function(t,e){return Rt(this,t).set(t,e),this},ct.prototype.add=ct.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ct.prototype.has=function(t){return this.__data__.has(t)},ft.prototype.clear=function(){this.__data__=new st},ft.prototype.delete=function(t){return this.__data__.delete(t)},ft.prototype.get=function(t){return this.__data__.get(t)},ft.prototype.has=function(t){return this.__data__.has(t)},ft.prototype.set=function(t,e){var r=this.__data__;if(r instanceof st){var n=r.__data__;if(!X||n.length<199)return n.push([t,e]),this;r=this.__data__=new ut(n)}return r.set(t,e),this};var pt,mt,yt=(pt=function(t,e){return t&&bt(t,e,Yt)},function(t,e){if(null==t)return t;if(!Vt(t))return pt(t,e);for(var r=t.length,n=mt?r:-1,i=Object(t);(mt?n--:++ns))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var f=-1,l=!0,h=1&i?new ct:void 0;for(o.set(t,e),o.set(e,t);++f-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}function $t(t){var e=n(t);return!!t&&("object"==e||"function"==e)}function Xt(t){return!!t&&"object"==n(t)}function Kt(t){return"symbol"==n(t)||Xt(t)&&"[object Symbol]"==L.call(t)}var Zt=x?function(t){return function(e){return t(e)}}(x):function(t){return Xt(t)&&Wt(t.length)&&!!m[L.call(t)]};function Yt(t){return Vt(t)?lt(t):xt(t)}function Gt(t){return t}e.exports=Ft}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],319:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=Object.prototype.toString;e.exports=function(t){return!0===t||!1===t||function(t){return!!t&&"object"==n(t)}(t)&&"[object Boolean]"==i.call(t)}},{}],320:[function(t,e,r){(function(t){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i="[object Arguments]",o="[object Map]",a="[object Object]",s="[object Set]",u=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[i]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f["[object Function]"]=f[o]=f["[object Number]"]=f[a]=f["[object RegExp]"]=f[s]=f["[object String]"]=f["[object WeakMap]"]=!1;var l="object"==(void 0===t?"undefined":n(t))&&t&&t.Object===Object&&t,h="object"==("undefined"==typeof self?"undefined":n(self))&&self&&self.Object===Object&&self,d=l||h||Function("return this")(),p="object"==(void 0===r?"undefined":n(r))&&r&&!r.nodeType&&r,m=p&&"object"==(void 0===e?"undefined":n(e))&&e&&!e.nodeType&&e,y=m&&m.exports===p,b=y&&l.process,v=function(){try{return b&&b.binding&&b.binding("util")}catch(t){}}(),g=v&&v.isTypedArray;function w(t,e){for(var r=-1,n=null==t?0:t.length;++rs))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var f=-1,l=!0,h=2&r?new at:void 0;for(o.set(t,e),o.set(e,t);++f-1},it.prototype.set=function(t,e){var r=this.__data__,n=ct(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},ot.prototype.clear=function(){this.size=0,this.__data__={hash:new nt,map:new(W||it),string:new nt}},ot.prototype.delete=function(t){var e=bt(this,t).delete(t);return this.size-=e?1:0,e},ot.prototype.get=function(t){return bt(this,t).get(t)},ot.prototype.has=function(t){return bt(this,t).has(t)},ot.prototype.set=function(t,e){var r=bt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},at.prototype.add=at.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},at.prototype.has=function(t){return this.__data__.has(t)},st.prototype.clear=function(){this.__data__=new it,this.size=0},st.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},st.prototype.get=function(t){return this.__data__.get(t)},st.prototype.has=function(t){return this.__data__.has(t)},st.prototype.set=function(t,e){var r=this.__data__;if(r instanceof it){var n=r.__data__;if(!W||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ot(n)}return r.set(t,e),this.size=r.size,this};var gt=U?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}function jt(t){var e=n(t);return null!=t&&("object"==e||"function"==e)}function Ct(t){return null!=t&&"object"==n(t)}var Mt=g?function(t){return function(e){return t(e)}}(g):function(t){return Ct(t)&&Tt(t.length)&&!!f[ft(t)]};function Pt(t){return null!=(e=t)&&Tt(e.length)&&!Et(e)?ut(t):pt(t);var e}e.exports=function(t,e){return ht(t,e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],321:[function(t,e,r){(function(t){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n="object"==(void 0===t?"undefined":r(t))&&t&&t.Object===Object&&t,i="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,o=n||i||Function("return this")(),a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=o.Symbol,f=c?c.toStringTag:void 0;function l(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":f&&f in Object(t)?function(t){var e=s.call(t,f),r=t[f];try{t[f]=void 0;var n=!0}catch(t){}var i=u.call(t);n&&(e?t[f]=r:delete t[f]);return i}(t):function(t){return u.call(t)}(t)}e.exports=function(t){if(!function(t){var e=r(t);return null!=t&&("object"==e||"function"==e)}(t))return!1;var e=l(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],322:[function(t,e,r){"use strict";e.exports=function(t){return null==t}},{}],323:[function(t,e,r){"use strict";e.exports=function(t){return void 0===t}},{}],324:[function(t,e,r){(function(t){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=/^\[object .+?Constructor\]$/,i="object"==(void 0===t?"undefined":r(t))&&t&&t.Object===Object&&t,o="object"==("undefined"==typeof self?"undefined":r(self))&&self&&self.Object===Object&&self,a=i||o||Function("return this")();function s(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var i=t.length,o=r+(n?1:-1);for(;n?o--:++o-1}function u(t,e,r){for(var n=-1,i=t?t.length:0;++n-1},E.prototype.set=function(t,e){var r=this.__data__,n=C(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},T.prototype.clear=function(){this.__data__={hash:new R,map:new(x||E),string:new R}},T.prototype.delete=function(t){return A(this,t).delete(t)},T.prototype.get=function(t){return A(this,t).get(t)},T.prototype.has=function(t){return A(this,t).has(t)},T.prototype.set=function(t,e){return A(this,t).set(t,e),this},j.prototype.add=j.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},j.prototype.has=function(t){return this.__data__.has(t)};var P=S&&1/l(new S([,-0]))[1]==1/0?function(t){return new S(t)}:function(){};function A(t,e){var n,i,o=t.__data__;return("string"==(i=r(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function I(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return M(r)?r:void 0}function D(t){var e=r(t);return!!t&&("object"==e||"function"==e)}e.exports=function(t){return t&&t.length?function(t,e,r){var n=-1,i=s,o=t.length,a=!0,c=[],h=c;if(r)a=!1,i=u;else if(o>=200){var d=e?null:P(t);if(d)return l(d);a=!1,i=f,h=new j}else h=e?[]:c;t:for(;++n>>32-e}function c(t,e,r,n,i,o,a){return u(t+(e&r|~e&n)+i+o|0,a)+e|0}function f(t,e,r,n,i,o,a){return u(t+(e&n|r&~n)+i+o|0,a)+e|0}function l(t,e,r,n,i,o,a){return u(t+(e^r^n)+i+o|0,a)+e|0}function h(t,e,r,n,i,o,a){return u(t+(r^(e|~n))+i+o|0,a)+e|0}n(s,i),s.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,t[0],3614090360,7),o=c(o,r,n,i,t[1],3905402710,12),i=c(i,o,r,n,t[2],606105819,17),n=c(n,i,o,r,t[3],3250441966,22),r=c(r,n,i,o,t[4],4118548399,7),o=c(o,r,n,i,t[5],1200080426,12),i=c(i,o,r,n,t[6],2821735955,17),n=c(n,i,o,r,t[7],4249261313,22),r=c(r,n,i,o,t[8],1770035416,7),o=c(o,r,n,i,t[9],2336552879,12),i=c(i,o,r,n,t[10],4294925233,17),n=c(n,i,o,r,t[11],2304563134,22),r=c(r,n,i,o,t[12],1804603682,7),o=c(o,r,n,i,t[13],4254626195,12),i=c(i,o,r,n,t[14],2792965006,17),r=f(r,n=c(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=f(o,r,n,i,t[6],3225465664,9),i=f(i,o,r,n,t[11],643717713,14),n=f(n,i,o,r,t[0],3921069994,20),r=f(r,n,i,o,t[5],3593408605,5),o=f(o,r,n,i,t[10],38016083,9),i=f(i,o,r,n,t[15],3634488961,14),n=f(n,i,o,r,t[4],3889429448,20),r=f(r,n,i,o,t[9],568446438,5),o=f(o,r,n,i,t[14],3275163606,9),i=f(i,o,r,n,t[3],4107603335,14),n=f(n,i,o,r,t[8],1163531501,20),r=f(r,n,i,o,t[13],2850285829,5),o=f(o,r,n,i,t[2],4243563512,9),i=f(i,o,r,n,t[7],1735328473,14),r=l(r,n=f(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=l(o,r,n,i,t[8],2272392833,11),i=l(i,o,r,n,t[11],1839030562,16),n=l(n,i,o,r,t[14],4259657740,23),r=l(r,n,i,o,t[1],2763975236,4),o=l(o,r,n,i,t[4],1272893353,11),i=l(i,o,r,n,t[7],4139469664,16),n=l(n,i,o,r,t[10],3200236656,23),r=l(r,n,i,o,t[13],681279174,4),o=l(o,r,n,i,t[0],3936430074,11),i=l(i,o,r,n,t[3],3572445317,16),n=l(n,i,o,r,t[6],76029189,23),r=l(r,n,i,o,t[9],3654602809,4),o=l(o,r,n,i,t[12],3873151461,11),i=l(i,o,r,n,t[15],530742520,16),r=h(r,n=l(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=h(o,r,n,i,t[7],1126891415,10),i=h(i,o,r,n,t[14],2878612391,15),n=h(n,i,o,r,t[5],4237533241,21),r=h(r,n,i,o,t[12],1700485571,6),o=h(o,r,n,i,t[3],2399980690,10),i=h(i,o,r,n,t[10],4293915773,15),n=h(n,i,o,r,t[1],2240044497,21),r=h(r,n,i,o,t[8],1873313359,6),o=h(o,r,n,i,t[15],4264355552,10),i=h(i,o,r,n,t[6],2734768916,15),n=h(n,i,o,r,t[13],1309151649,21),r=h(r,n,i,o,t[4],4149444226,6),o=h(o,r,n,i,t[11],3174756917,10),i=h(i,o,r,n,t[2],718787259,15),n=h(n,i,o,r,t[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 t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},e.exports=s},{"hash-base":261,inherits:278,"safe-buffer":384}],326:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("brorand");function o(t){this.rand=t||new i.Rand}e.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),a=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var s=t.subn(1),u=0;!s.testn(u);u++);for(var c=t.shrn(u),f=s.toRed(o);e>0;e--){var l=this._randrange(new n(2),s);r&&r(l);var h=l.toRed(o).redPow(c);if(0!==h.cmp(a)&&0!==h.cmp(f)){for(var d=1;d0;e--){var f=this._randrange(new n(2),a),l=t.gcd(f);if(0!==l.cmpn(1))return l;var h=f.toRed(i).redPow(u);if(0!==h.cmp(o)&&0!==h.cmp(c)){for(var d=1;d>8,a=255&i;o?r.push(o,a):r.push(a)}return r},n.zero2=i,n.toHex=o,n.encode=function(t,e){return"hex"===e?o(t):t}},{}],330:[function(t,e,r){"use strict";var n={};(0,t("./lib/utils/common").assign)(n,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=n},{"./lib/deflate":331,"./lib/inflate":332,"./lib/utils/common":333,"./lib/zlib/constants":336}],331:[function(t,e,r){"use strict";var n=t("./zlib/deflate"),i=t("./utils/common"),o=t("./utils/strings"),a=t("./zlib/messages"),s=t("./zlib/zstream"),u=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(a[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var f;if(f="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=n.deflateSetDictionary(this.strm,f)))throw new Error(a[r]);this._dict_set=!0}}function f(t,e){var r=new c(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}c.prototype.push=function(t,e){var r,a,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;a=e===~~e?e:!0===e?4:0,"string"==typeof t?s.input=o.string2buf(t):"[object ArrayBuffer]"===u.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(c),s.next_out=0,s.avail_out=c),1!==(r=n.deflate(s,a))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out)))}while((s.avail_in>0||0===s.avail_out)&&1!==r);return 4===a?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==a||(this.onEnd(0),s.avail_out=0,!0)},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=c,r.deflate=f,r.deflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},r.gzip=function(t,e){return(e=e||{}).gzip=!0,f(t,e)}},{"./utils/common":333,"./utils/strings":334,"./zlib/deflate":338,"./zlib/messages":343,"./zlib/zstream":345}],332:[function(t,e,r){"use strict";var n=t("./zlib/inflate"),i=t("./utils/common"),o=t("./utils/strings"),a=t("./zlib/constants"),s=t("./zlib/messages"),u=t("./zlib/zstream"),c=t("./zlib/gzheader"),f=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==a.Z_OK)throw new Error(s[r]);if(this.header=new c,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):"[object ArrayBuffer]"===f.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==a.Z_OK))throw new Error(s[r])}function h(t,e){var r=new l(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}l.prototype.push=function(t,e){var r,s,u,c,l,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=e===~~e?e:!0===e?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof t?h.input=o.binstring2buf(t):"[object ArrayBuffer]"===f.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(d),h.next_out=0,h.avail_out=d),(r=n.inflate(h,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===a.Z_BUF_ERROR&&!0===m&&(r=a.Z_OK,m=!1),r!==a.Z_STREAM_END&&r!==a.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==a.Z_STREAM_END&&(0!==h.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(h.output,h.next_out),c=h.next_out-u,l=o.buf2string(h.output,u),h.next_out=c,h.avail_out=d-c,c&&i.arraySet(h.output,h.output,u,c,0),this.onData(l)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==a.Z_STREAM_END);return r===a.Z_STREAM_END&&(s=a.Z_FINISH),s===a.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),h.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){t===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=l,r.inflate=h,r.inflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},r.ungzip=h},{"./utils/common":333,"./utils/strings":334,"./zlib/constants":336,"./zlib/gzheader":339,"./zlib/inflate":341,"./zlib/messages":343,"./zlib/zstream":345}],333:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function o(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!==n(r))throw new TypeError(r+"must be non-object");for(var i in r)o(r,i)&&(t[i]=r[i])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var a={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o=252?6:s>=248?5:s>=240?4:s>=224?3:s>=192?2:1;function u(t,e){if(e<65534&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",a=0;a>>6,e[a++]=128|63&r):r<65536?(e[a++]=224|r>>>12,e[a++]=128|r>>>6&63,e[a++]=128|63&r):(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63,e[a++]=128|r>>>6&63,e[a++]=128|63&r);return e},r.buf2binstring=function(t){return u(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r4)c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return u(c,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},{"./common":333}],335:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==r;){r-=a=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0}},{}],336:[function(t,e,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],337:[function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var o=n,a=i+r;t^=-1;for(var s=i;s>>8^o[255&(t^e[s])];return-1^t}},{}],338:[function(t,e,r){"use strict";var n,i=t("../utils/common"),o=t("./trees"),a=t("./adler32"),s=t("./crc32"),u=t("./messages");function c(t,e){return t.msg=u[e],e}function f(t){return(t<<1)-(t>4?9:0)}function l(t){for(var e=t.length;--e>=0;)t[e]=0}function h(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function d(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,h(t.strm)}function p(t,e){t.pending_buf[t.pending++]=e}function m(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function y(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,c=t.window,f=t.w_mask,l=t.prev,h=t.strstart+258,d=c[o+a-1],p=c[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(c[(r=e)+a]===p&&c[r+a-1]===d&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&oa){if(t.match_start=e,a=n,n>=s)break;d=c[o+a-1],p=c[o+a]}}}while((e=l[e&f])>u&&0!=--i);return a<=t.lookahead?a:t.lookahead}function b(t){var e,r,n,o,u,c,f,l,h,d,p=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-262)){i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=p?n-p:0}while(--r);e=r=p;do{n=t.prev[--e],t.prev[e]=n>=p?n-p:0}while(--r);o+=p}if(0===t.strm.avail_in)break;if(c=t.strm,f=t.window,l=t.strstart+t.lookahead,h=o,d=void 0,(d=c.avail_in)>h&&(d=h),r=0===d?0:(c.avail_in-=d,i.arraySet(f,c.input,c.next_in,d,l),1===c.state.wrap?c.adler=a(c.adler,f,d,l):2===c.state.wrap&&(c.adler=s(c.adler,f,d,l)),c.next_in+=d,c.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<15&&(s=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||a<0||a>4)return c(t,-2);8===n&&(n=9);var u=new _;return t.state=u,u.strm=t,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(b(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,d(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(d(t,!1),t.strm.avail_out),1)})),new w(4,4,8,4,v),new w(4,5,16,8,v),new w(4,6,32,32,v),new w(4,4,16,16,g),new w(8,16,32,32,g),new w(8,16,128,128,g),new w(8,32,128,256,g),new w(32,128,258,1024,g),new w(32,258,258,4096,g)],r.deflateInit=function(t,e){return S(t,e,8,15,8,0)},r.deflateInit2=S,r.deflateReset=x,r.deflateResetKeep=k,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},r.deflate=function(t,e){var r,i,a,u;if(!t||!t.state||e>5||e<0)return t?c(t,-2):-2;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return c(t,0===t.avail_out?-5:-2);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,3),i.status=113);else{var y=8+(i.w_bits-8<<4)<<8;y|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(y|=32),y+=31-y%31,i.status=113,m(i,y),0!==i.strstart&&(m(i,t.adler>>>16),m(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),h(t),a=i.pending,i.pending!==i.pending_buf_size));)p(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),h(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),h(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&h(t),i.pending+2<=i.pending_buf_size&&(p(i,255&t.adler),p(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(h(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&f(e)<=f(r)&&4!==e)return c(t,-5);if(666===i.status&&0!==t.avail_in)return c(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var v=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(b(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=258){if(b(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){a=t.strstart+258;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==v&&4!==v||(i.status=666),1===v||3===v)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===v&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(l(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),h(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(p(i,255&t.adler),p(i,t.adler>>8&255),p(i,t.adler>>16&255),p(i,t.adler>>24&255),p(i,255&t.total_in),p(i,t.total_in>>8&255),p(i,t.total_in>>16&255),p(i,t.total_in>>24&255)):(m(i,t.adler>>>16),m(i,65535&t.adler)),h(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},r.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?c(t,-2):(t.state=null,113===e?c(t,-3):0):-2},r.deflateSetDictionary=function(t,e){var r,n,o,s,u,c,f,h,d=e.length;if(!t||!t.state)return-2;if(2===(s=(r=t.state).wrap)||1===s&&42!==r.status||r.lookahead)return-2;for(1===s&&(t.adler=a(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(l(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,e,d-r.w_size,r.w_size,0),e=h,d=r.w_size),u=t.avail_in,c=t.next_in,f=t.input,t.avail_in=d,t.next_in=0,t.input=e,b(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<>>=w=g>>>24,p-=w,0===(w=g>>>16&255))R[o++]=65535&g;else{if(!(16&w)){if(0==(64&w)){g=m[(65535&g)+(d&(1<>>=w,p-=w),p<15&&(d+=O[n++]<>>=w=g>>>24,p-=w,!(16&(w=g>>>16&255))){if(0==(64&w)){g=y[(65535&g)+(d&(1<u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,k>(w=o-a)){if((w=k-w)>f&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(x=0,S=h,0===l){if(x+=c-w,w<_){_-=w;do{R[o++]=h[x++]}while(--w);x=o-k,S=R}}else if(l2;)R[o++]=S[x++],R[o++]=S[x++],R[o++]=S[x++],_-=3;_&&(R[o++]=S[x++],_>1&&(R[o++]=S[x++]))}else{x=o-k;do{R[o++]=R[x++],R[o++]=R[x++],R[o++]=R[x++],_-=3}while(_>2);_&&(R[o++]=R[x++],_>1&&(R[o++]=R[x++]))}break}}break}}while(n>3,d&=(1<<(p-=_<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function l(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,f(t)):-2}function h(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,l(t))):-2}function d(t,e){var r,n;return t?(n=new c,t.state=n,n.window=null,0!==(r=h(t,e))&&(t.state=null),r):-2}var p,m,y=!0;function b(t){if(y){var e;for(p=new n.Buf32(512),m=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(1,t.lens,0,288,p,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,m,0,t.work,{bits:5}),y=!1}t.lencode=p,t.lenbits=9,t.distcode=m,t.distbits=5}function v(t,e,r,i){var o,a=t.state;return null===a.window&&(a.wsize=1<=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):((o=a.wsize-a.wnext)>i&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,D,2,0),m=0,y=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",r.mode=30;break}if(y-=4,C=8+(15&(m>>>=4)),0===r.wbits)r.wbits=C;else if(C>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=o(r.check,D,2,0)),m=0,y=0,r.mode=3;case 3:for(;y<32;){if(0===d)break t;d--,m+=c[l++]<>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,r.check=o(r.check,D,4,0)),m=0,y=0,r.mode=4;case 4:for(;y<16;){if(0===d)break t;d--,m+=c[l++]<>8),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=o(r.check,D,2,0)),m=0,y=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===d)break t;d--,m+=c[l++]<>>8&255,r.check=o(r.check,D,2,0)),m=0,y=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((_=r.length)>d&&(_=d),_&&(r.head&&(C=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,l,_,C)),512&r.flags&&(r.check=o(r.check,c,_,l)),d-=_,l+=_,r.length-=_),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===d)break t;_=0;do{C=c[l+_++],r.head&&C&&r.length<65536&&(r.head.name+=String.fromCharCode(C))}while(C&&_>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===d)break t;d--,m+=c[l++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===d)break t;d--,m+=c[l++]<>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6===e){m>>>=2,y-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}m>>>=2,y-=2;break;case 14:for(m>>>=7&y,y-=7&y;y<32;){if(0===d)break t;d--,m+=c[l++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,m=0,y=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(_=r.length){if(_>d&&(_=d),_>p&&(_=p),0===_)break t;n.arraySet(f,c,l,_,h),d-=_,l+=_,p-=_,h+=_,r.length-=_;break}r.mode=12;break;case 17:for(;y<14;){if(0===d)break t;d--,m+=c[l++]<>>=5,y-=5,r.ndist=1+(31&m),m>>>=5,y-=5,r.ncode=4+(15&m),m>>>=4,y-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,y-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,P={bits:r.lenbits},M=s(0,r.lens,0,19,r.lencode,0,r.work,P),r.lenbits=P.bits,M){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,R=65535&I,!((S=I>>>24)<=y);){if(0===d)break t;d--,m+=c[l++]<>>=S,y-=S,r.lens[r.have++]=R;else{if(16===R){for(A=S+2;y>>=S,y-=S,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}C=r.lens[r.have-1],_=3+(3&m),m>>>=2,y-=2}else if(17===R){for(A=S+3;y>>=S)),m>>>=3,y-=3}else{for(A=S+7;y>>=S)),m>>>=7,y-=7}if(r.have+_>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;_--;)r.lens[r.have++]=C}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,P={bits:r.lenbits},M=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,P),r.lenbits=P.bits,M){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,P={bits:r.distbits},M=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,P),r.distbits=P.bits,M){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(d>=6&&p>=258){t.next_out=h,t.avail_out=p,t.next_in=l,t.avail_in=d,r.hold=m,r.bits=y,a(t,w),h=t.next_out,f=t.output,p=t.avail_out,l=t.next_in,c=t.input,d=t.avail_in,m=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;O=(I=r.lencode[m&(1<>>16&255,R=65535&I,!((S=I>>>24)<=y);){if(0===d)break t;d--,m+=c[l++]<>E)])>>>16&255,R=65535&I,!(E+(S=I>>>24)<=y);){if(0===d)break t;d--,m+=c[l++]<>>=E,y-=E,r.back+=E}if(m>>>=S,y-=S,r.back+=S,r.length=R,0===O){r.mode=26;break}if(32&O){r.back=-1,r.mode=12;break}if(64&O){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&O,r.mode=22;case 22:if(r.extra){for(A=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;O=(I=r.distcode[m&(1<>>16&255,R=65535&I,!((S=I>>>24)<=y);){if(0===d)break t;d--,m+=c[l++]<>E)])>>>16&255,R=65535&I,!(E+(S=I>>>24)<=y);){if(0===d)break t;d--,m+=c[l++]<>>=E,y-=E,r.back+=E}if(m>>>=S,y-=S,r.back+=S,64&O){t.msg="invalid distance code",r.mode=30;break}r.offset=R,r.extra=15&O,r.mode=24;case 24:if(r.extra){for(A=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===p)break t;if(_=w-p,r.offset>_){if((_=r.offset-_)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}_>r.wnext?(_-=r.wnext,k=r.wsize-_):k=r.wnext-_,_>r.length&&(_=r.length),x=r.window}else x=f,k=h-r.offset,_=r.length;_>p&&(_=p),p-=_,r.length-=_;do{f[h++]=x[k++]}while(--_);0===r.length&&(r.mode=21);break;case 26:if(0===p)break t;f[h++]=r.length,p--,r.mode=21;break;case 27:if(r.wrap){for(;y<32;){if(0===d)break t;d--,m|=c[l++]<=1&&0===D[R];R--);if(E>R&&(E=R),0===R)return c[f++]=20971520,c[f++]=20971520,h.bits=1,0;for(O=1;O0&&(0===t||1!==R))return-1;for(N[1]=0,x=1;x<15;x++)N[x+1]=N[x]+D[x];for(S=0;S852||2===t&&M>592)return 1;for(;;){g=x-j,l[S]v?(w=B[F+l[S]],_=A[I+l[S]]):(w=96,_=0),d=1<>j)+(p-=d)]=g<<24|w<<16|_|0}while(0!==p);for(d=1<>=1;if(0!==d?(P&=d-1,P+=d):P=0,S++,0==--D[x]){if(x===R)break;x=e[r+l[S]]}if(x>E&&(P&y)!==m){for(0===j&&(j=E),b+=O,C=1<<(T=x-j);T+j852||2===t&&M>592)return 1;c[m=P&y]=E<<24|T<<16|b-f|0}}return 0!==P&&(c[b+P]=x-j<<24|64<<16|0),h.bits=E,0}},{"../utils/common":333}],343:[function(t,e,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],344:[function(t,e,r){"use strict";var n=t("../utils/common");function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var f=new Array(60);i(f);var l=new Array(512);i(l);var h=new Array(256);i(h);var d=new Array(29);i(d);var p,m,y,b=new Array(30);function v(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?l[t]:l[256+(t>>>7)]}function _(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function k(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function O(t,e,r){var n,i,o=new Array(16),a=0;for(n=1;n<=15;n++)o[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=S(o[s]++,s))}}function R(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function E(t){t.bi_valid>8?_(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function T(t,e,r,n){var i=2*e,o=2*r;return t[i]>1;r>=1;r--)j(t,o,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],j(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,j(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,a,s,u=e.dyn_tree,c=e.max_code,f=e.stat_desc.static_tree,l=e.stat_desc.has_stree,h=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=u[2*u[2*(n=t.heap[r])+1]+1]+1)>p&&(o=p,m++),u[2*n+1]=o,n>c||(t.bl_count[o]++,a=0,n>=d&&(a=h[n-d]),s=u[2*n],t.opt_len+=s*(o+a),l&&(t.static_len+=s*(f[2*n+1]+a)));if(0!==m){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(o=p;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>c||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(t,e),O(o,c,t.bl_count)}function P(t,e,r){var n,i,o=-1,a=e[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=e[2*(n+1)+1],++s>=7;n<30;n++)for(b[n]=i<<7,t=0;t<1<0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),M(t,t.l_desc),M(t,t.d_desc),a=function(t){var e;for(P(t,t.dyn_ltree,t.l_desc.max_code),P(t,t.dyn_dtree,t.d_desc.max_code),M(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*u[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?D(t,e,r,n):4===t.strategy||o===i?(k(t,2+(n?1:0),3),C(t,c,f)):(k(t,4+(n?1:0),3),function(t,e,r,n){var i;for(k(t,e-257,5),k(t,r-1,5),k(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(h[r]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){k(t,2,3),x(t,256,c),function(t){16===t.bi_valid?(_(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":333}],345:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],346:[function(t,e,r){e.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],347:[function(t,e,r){"use strict";var n=t("asn1.js");r.certificate=t("./certificate");var i=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())}));r.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));r.RSAPublicKey=o;var a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));r.PublicKey=a;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));r.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));r.EncryptedPrivateKey=c;var f=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));r.DSAPrivateKey=f,r.DSAparam=n.define("DSAparam",(function(){this.int()}));var l=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));r.ECPrivateKey=l;var h=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));r.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":348,"asn1.js":167}],348:[function(t,e,r){"use strict";var n=t("asn1.js"),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),l=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),h=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));e.exports=p},{"asn1.js":167}],349:[function(t,e,r){"use strict";var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=t("evp_bytestokey"),s=t("browserify-aes"),u=t("safe-buffer").Buffer;e.exports=function(t,e){var r,c=t.toString(),f=c.match(n);if(f){var l="aes"+f[1],h=u.from(f[2],"hex"),d=u.from(f[3].replace(/[\r\n]/g,""),"base64"),p=a(e,h.slice(0,8),parseInt(f[1],10)).key,m=[],y=s.createDecipheriv(l,p,h);m.push(y.update(d)),m.push(y.final()),r=u.concat(m)}else{var b=c.match(o);r=u.from(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},{"browserify-aes":188,evp_bytestokey:259,"safe-buffer":384}],350:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=t("./asn1"),o=t("./aesid.json"),a=t("./fixProc"),s=t("browserify-aes"),u=t("pbkdf2"),c=t("safe-buffer").Buffer;function f(t){var e;"object"!==n(t)||c.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=c.from(t));var r,f,l=a(t,e),h=l.tag,d=l.data;switch(h){case"CERTIFICATE":f=i.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=i.PublicKey.decode(d,"der")),r=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=i.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":d=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),i=o[t.algorithm.decrypt.cipher.algo.join(".")],a=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,l=parseInt(i.split("-")[1],10)/8,h=u.pbkdf2Sync(e,r,n,l,"sha1"),d=s.createDecipheriv(i,h,a),p=[];return p.push(d.update(f)),p.push(d.final()),c.concat(p)}(d=i.EncryptedPrivateKey.decode(d,"der"),e);case"PRIVATE KEY":switch(r=(f=i.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:i.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=i.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=i.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+h)}}e.exports=f,f.signature=i.signature},{"./aesid.json":346,"./asn1":347,"./fixProc":349,"browserify-aes":188,pbkdf2:351,"safe-buffer":384}],351:[function(t,e,r){"use strict";r.pbkdf2=t("./lib/async"),r.pbkdf2Sync=t("./lib/sync")},{"./lib/async":352,"./lib/sync":355}],352:[function(t,e,r){(function(r,n){"use strict";var i,o=t("safe-buffer").Buffer,a=t("./precondition"),s=t("./default-encoding"),u=t("./sync"),c=t("./to-buffer"),f=n.crypto&&n.crypto.subtle,l={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function d(t,e,r,n,i){return f.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return f.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return o.from(t)}))}e.exports=function(t,e,p,m,y,b){"function"==typeof y&&(b=y,y=void 0);var v=l[(y=y||"sha1").toLowerCase()];if(!v||"function"!=typeof n.Promise)return r.nextTick((function(){var r;try{r=u(t,e,p,m,y)}catch(t){return b(t)}b(null,r)}));if(a(p,m),t=c(t,s,"Password"),e=c(e,s,"Salt"),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){r.nextTick((function(){e(null,t)}))}),(function(t){r.nextTick((function(){e(t)}))}))}(function(t){if(n.process&&!n.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==h[t])return h[t];var e=d(i=i||o.alloc(8),i,10,128,t).then((function(){return!0})).catch((function(){return!1}));return h[t]=e,e}(v).then((function(r){return r?d(t,e,p,m,v):u(t,e,p,m,y)})),b)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":353,"./precondition":354,"./sync":355,"./to-buffer":356,_process:358,"safe-buffer":384}],353:[function(t,e,r){(function(t){"use strict";var r;if(t.browser)r="utf-8";else if(t.version){r=parseInt(t.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r}).call(this,t("_process"))},{_process:358}],354:[function(t,e,r){"use strict";var n=Math.pow(2,30)-1;e.exports=function(t,e){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof e)throw new TypeError("Key length not a number");if(e<0||e>n||e!=e)throw new TypeError("Bad key length")}},{}],355:[function(t,e,r){"use strict";var n=t("create-hash/md5"),i=t("ripemd160"),o=t("sha.js"),a=t("safe-buffer").Buffer,s=t("./precondition"),u=t("./default-encoding"),c=t("./to-buffer"),f=a.alloc(128),l={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(t,e,r){var s=function(t){function e(e){return o(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?n:e}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=s(e):e.length1)for(var r=1;rp||new a(e).cmp(d.modulus)>=0)throw new Error("decryption error");h=r?c(new a(e),d):s(e,d);var m=f.alloc(p-h.length);if(h=f.concat([m,h],p),4===l)return function(t,e){var r=t.modulus.byteLength(),n=u("sha1").update(f.alloc(0)).digest(),a=n.length;if(0!==e[0])throw new Error("decryption error");var s=e.slice(1,a+1),c=e.slice(a+1),l=o(s,i(c,a)),h=o(c,i(l,r-a-1));if(function(t,e){t=f.from(t),e=f.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));var i=-1;for(;++i=e.length){o++;break}var a=e.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,h,r);if(3===l)return h;throw new Error("unknown padding")}},{"./mgf":360,"./withPublic":364,"./xor":365,"bn.js":361,"browserify-rsa":206,"create-hash":222,"parse-asn1":350,"safe-buffer":384}],363:[function(t,e,r){"use strict";var n=t("parse-asn1"),i=t("randombytes"),o=t("create-hash"),a=t("./mgf"),s=t("./xor"),u=t("bn.js"),c=t("./withPublic"),f=t("browserify-rsa"),l=t("safe-buffer").Buffer;e.exports=function(t,e,r){var h;h=t.padding?t.padding:r?1:4;var d,p=n(t);if(4===h)d=function(t,e){var r=t.modulus.byteLength(),n=e.length,c=o("sha1").update(l.alloc(0)).digest(),f=c.length,h=2*f;if(n>r-h-2)throw new Error("message too long");var d=l.alloc(r-n-h-2),p=r-f-1,m=i(f),y=s(l.concat([c,d,l.alloc(1,1),e],p),a(m,p)),b=s(m,a(y,f));return new u(l.concat([l.alloc(1),b,y],r))}(p,e);else if(1===h)d=function(t,e,r){var n,o=e.length,a=t.modulus.byteLength();if(o>a-11)throw new Error("message too long");n=r?l.alloc(a-o-3,255):function(t){var e,r=l.allocUnsafe(t),n=0,o=i(2*t),a=0;for(;n=0)throw new Error("data too long for modulus")}return r?f(d,p):c(d,p)}},{"./mgf":360,"./withPublic":364,"./xor":365,"bn.js":361,"browserify-rsa":206,"create-hash":222,"parse-asn1":350,randombytes:366,"safe-buffer":384}],364:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("safe-buffer").Buffer;e.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},{"bn.js":361,"safe-buffer":384}],365:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=t.length,n=-1;++n4294967295)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(t);if(t>0)if(t>65536)for(var a=0;af||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function h(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>u)throw new RangeError("buffer too small")}function d(t,r,n,i){if(e.browser){var o=t.buffer,s=new Uint8Array(o,r,n);return c.getRandomValues(s),i?void e.nextTick((function(){i(null,t)})):t}if(!i)return a(n).copy(t,r),t;a(n,(function(e,n){if(e)return i(e);n.copy(t,r),i(null,t)}))}c&&c.getRandomValues||!e.browser?(r.randomFill=function(t,e,r,i){if(!(s.isBuffer(t)||t instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)i=e,e=0,r=t.length;else if("function"==typeof r)i=r,r=t.length-e;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return l(e,t.length),h(r,e,t.length),d(t,e,r,i)},r.randomFillSync=function(t,e,r){void 0===e&&(e=0);if(!(s.isBuffer(t)||t instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(e,t.length),void 0===r&&(r=t.length-e);return h(r,e,t.length),d(t,e,r)}):(r.randomFill=i,r.randomFillSync=i)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:358,randombytes:366,"safe-buffer":384}],368:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i={};function o(t,e,r){r||(r=Error);var n=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);n.prototype.name=r.name,n.prototype.code=t,i[t]=n}function a(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}o("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,s,u;if("string"==typeof e&&(o="not ",e.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))u="The ".concat(t," ").concat(i," ").concat(a(e,"type"));else{var c=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";u='The "'.concat(t,'" ').concat(c," ").concat(i," ").concat(a(e,"type"))}return u+=". Received type ".concat(n(r))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" 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(t){return"Unknown encoding: "+t}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},{}],369:[function(t,e,r){(function(r){"use strict";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=c;var i=t("./_stream_readable"),o=t("./_stream_writable");t("inherits")(c,i);for(var a=n(o.prototype),s=0;s0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)a.endEmitted?k(t,new _):E(t,a,e,!0);else if(a.ended)k(t,new g);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?E(t,a,e,!1):M(t,a)):E(t,a,e,!1)}else n||(a.reading=!1,M(t,a));return!a.ended&&(a.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function j(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(C,t))}function C(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,N(t)}function M(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(P,t,e))}function P(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function I(t){c("readable nexttick read 0"),t.read(0)}function D(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),N(t),e.flowing&&!e.reading&&t.read(0)}function N(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function B(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function F(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(L,e,t))}function L(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function z(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?F(this):j(this),null;if(0===(t=T(t,e))&&e.ended)return 0===e.length&&F(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t0?B(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&F(this)),null!==n&&this.emit("data",n),n},O.prototype._read=function(t){k(this,new w("_read()"))},O.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var a=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?u:y;function s(e,r){c("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",f),t.removeListener("error",d),t.removeListener("unpipe",s),n.removeListener("end",u),n.removeListener("end",y),n.removeListener("data",h),l=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function u(){c("onend"),t.end()}i.endEmitted?r.nextTick(a):n.once("end",a),t.on("unpipe",s);var f=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,N(t))}}(n);t.on("drain",f);var l=!1;function h(e){c("ondata");var r=t.write(e);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==z(i.pipes,t))&&!l&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function d(e){c("onerror",e),y(),t.removeListener("error",d),0===o(t,"error")&&k(t,e)}function p(){t.removeListener("finish",m),y()}function m(){c("onfinish"),t.removeListener("close",p),y()}function y(){c("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),t},O.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?j(this):i.reading||r.nextTick(I,this))),n},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(t,e){var n=a.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(A,this),n},O.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(A,this),e},O.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(D,t,e))}(this,t)),t.paused=!1,this},O.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(t,e,r){r(new m("_write()"))},O.prototype._writev=null,O.prototype.end=function(t,e,n){var i=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,M(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),O.prototype.destroy=l.destroy,O.prototype._undestroy=l.undestroy,O.prototype._destroy=function(t,e){e(t)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":368,"./_stream_duplex":369,"./internal/streams/destroy":376,"./internal/streams/state":380,"./internal/streams/stream":381,_process:358,buffer:216,inherits:278,"util-deprecate":412}],374:[function(t,e,r){(function(r){"use strict";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=t("./end-of-stream"),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),h=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[a];if(null!==e){var r=t[h].read();null!==r&&(t[f]=null,t[a]=null,t[s]=null,e(d(r,!1)))}}function m(t){r.nextTick(p,t)}var y=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise((function(e,n){r.nextTick((function(){t[u]?n(t[u]):e(d(void 0,!0))}))}));var n,i=this[f];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[l](r,n)}),n)}}(i,this));else{var o=this[h].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[l])}return this[f]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),y);e.exports=function(t){var e,r=Object.create(b,(i(e={},h,{value:t,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,l,{value:function(t,e){var n=r[h].read();n?(r[f]=null,r[a]=null,r[s]=null,t(d(n,!1))):(r[a]=t,r[s]=e)},writable:!0}),e));return r[f]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[s];return null!==e&&(r[f]=null,r[a]=null,r[s]=null,e(t)),void(r[u]=t)}var n=r[a];null!==n&&(r[f]=null,r[a]=null,r[s]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",m.bind(null,r)),r}}).call(this,t("_process"))},{"./end-of-stream":377,_process:358}],375:[function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return a.alloc(0);for(var e,r,n,i=a.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=i,n=s,a.prototype.copy.call(e,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=a.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=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,e}},{key:u,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&a.forEach(c),o||(a.forEach(c),i(n))}))}));return e.reduce(f)}},{"../../../errors":368,"./end-of-stream":377}],380:[function(t,e,r){"use strict";var n=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},{"../../../errors":368}],381:[function(t,e,r){"use strict";e.exports=t("events").EventEmitter},{events:258}],382:[function(t,e,r){"use strict";(r=e.exports=t("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js"),r.finished=t("./lib/internal/streams/end-of-stream.js"),r.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":369,"./lib/_stream_passthrough.js":370,"./lib/_stream_readable.js":371,"./lib/_stream_transform.js":372,"./lib/_stream_writable.js":373,"./lib/internal/streams/end-of-stream.js":377,"./lib/internal/streams/pipeline.js":379}],383:[function(t,e,r){"use strict";var n=t("buffer").Buffer,i=t("inherits"),o=t("hash-base"),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<>>32-e}function m(t,e,r,n,i,o,a,s){return p(t+(e^r^n)+o+a|0,s)+i|0}function y(t,e,r,n,i,o,a,s){return p(t+(e&r|~e&n)+o+a|0,s)+i|0}function b(t,e,r,n,i,o,a,s){return p(t+((e|~r)^n)+o+a|0,s)+i|0}function v(t,e,r,n,i,o,a,s){return p(t+(e&n|r&~n)+o+a|0,s)+i|0}function g(t,e,r,n,i,o,a,s){return p(t+(e^(r|~n))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var 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,k=0|this._c,x=0|this._d,S=0|this._e,O=0;O<80;O+=1){var R,E;O<16?(R=m(r,n,i,o,d,t[s[O]],l[0],c[O]),E=g(w,_,k,x,S,t[u[O]],h[0],f[O])):O<32?(R=y(r,n,i,o,d,t[s[O]],l[1],c[O]),E=v(w,_,k,x,S,t[u[O]],h[1],f[O])):O<48?(R=b(r,n,i,o,d,t[s[O]],l[2],c[O]),E=b(w,_,k,x,S,t[u[O]],h[2],f[O])):O<64?(R=v(r,n,i,o,d,t[s[O]],l[3],c[O]),E=y(w,_,k,x,S,t[u[O]],h[3],f[O])):(R=g(r,n,i,o,d,t[s[O]],l[4],c[O]),E=m(w,_,k,x,S,t[u[O]],h[4],f[O])),r=d,d=o,o=p(i,10),i=n,n=R,w=S,S=x,x=p(k,10),k=_,_=E}var T=this._b+i+x|0;this._b=this._c+o+S|0,this._c=this._d+d+w|0,this._d=this._e+r+_|0,this._e=this._a+n+k|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 t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},e.exports=d},{buffer:216,"hash-base":261,inherits:278}],384:[function(t,e,r){"use strict";var n=t("buffer"),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function a(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,r),r.Buffer=a),o(i,a),a.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},a.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},{buffer:216}],385:[function(t,e,r){(function(r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i,o=t("buffer"),a=o.Buffer,s={};for(i in o)o.hasOwnProperty(i)&&"SlowBuffer"!==i&&"Buffer"!==i&&(s[i]=o[i]);var u=s.Buffer={};for(i in a)a.hasOwnProperty(i)&&"allocUnsafe"!==i&&"allocUnsafeSlow"!==i&&(u[i]=a[i]);if(s.Buffer.prototype=a.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(t,e,r){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+n(t));if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(t));return a(t,e,r)}),u.alloc||(u.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+n(t));if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=a(t);return e&&0!==e.length?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i}),!s.kStringMaxLength)try{s.kStringMaxLength=r.binding("buffer").kStringMaxLength}catch(t){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s}).call(this,t("_process"))},{_process:358,buffer:216}],386:[function(t,e,r){"use strict";function n(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=s(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r",lt:"<",quot:'"',apos:"'"},R=61,E=63,T=function(t){return 34===t||39===t},j=[34,39],C=[].concat(j,[91,62]),M=[].concat(j,[60,93]),P=[R,E].concat(a(y)),A=[].concat(a(y),[62,38,60]);function I(t,e,r){switch(e){case"xml":r!==k&&t.fail("xml prefix must be bound to ".concat(k,"."));break;case"xmlns":r!==x&&t.fail("xmlns prefix must be bound to ".concat(x,"."))}switch(r){case x:t.fail(""===e?"the default namespace may not be set to ".concat(r,"."):'may not assign a prefix (even "xmlns") to the URI '.concat(x,"."));break;case k:switch(e){case"xml":break;case"":t.fail("the default namespace may not be set to ".concat(r,"."));break;default:t.fail("may not assign the xml namespace to another prefix.")}}}var D=function(t){return _.test(t)},N=function(t){return b.test(t)};r.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];var B={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"},F=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opt=null!=e?e:{},this.fragmentOpt=!!this.opt.fragment;var r=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,r){this.nameStartCheck=g,this.nameCheck=w,this.isName=D,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},S);var n=this.opt.additionalNamespaces;null!=n&&(!function(t,e){for(var r=0,n=Object.keys(e);r0&&(r+=":"),r+="".concat(this.line,":").concat(this.column)),r.length>0&&(r+=": "),new Error(r+t)}},{key:"fail",value:function(t){var e=this.makeError(t),r=this.errorHandler;if(void 0===r)throw e;return r(e),this}},{key:"write",value:function(t){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");var e=!1;null===t?(e=!0,t=""):"object"===i(t)&&(t=t.toString()),void 0!==this.carriedFromPrevious&&(t="".concat(this.carriedFromPrevious).concat(t),this.carriedFromPrevious=void 0);var r=t.length,n=t.charCodeAt(r-1);!e&&(13===n||n>=55296&&n<=56319)&&(this.carriedFromPrevious=t[r-1],r--,t=t.slice(0,r));var o=this.stateTable;for(this.chunk=t,this.i=0;this.i=t.length)return-1;var r=t.charCodeAt(e);if(this.column++,r<55296){if(r>=32||9===r)return r;switch(r){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return 10===t.charCodeAt(e+1)&&(this.i=e+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;var n=65536+1024*(r-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,n>1114111&&this.fail("disallowed character."),n}},{key:"getCode11",value:function(){var t=this.chunk,e=this.i;if(this.prevI=e,this.i=e+1,e>=t.length)return-1;var r=t.charCodeAt(e);if(this.column++,r<55296){if(r>31&&r<127||r>159&&8232!==r||9===r)return r;switch(r){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:var n=t.charCodeAt(e+1);10!==n&&133!==n||(this.i=e+2);case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;var i=65536+1024*(r-55296)+(t.charCodeAt(e+1)-56320);return this.i=e+2,i>1114111&&this.fail("disallowed character."),i}},{key:"getCodeNorm",value:function(){var t=this.getCode();return-2===t?10:t}},{key:"unget",value:function(){this.i=this.prevI,this.column--}},{key:"captureTo",value:function(t){for(var e=this.i,r=this.chunk;;){var n=this.getCode(),i=-2===n,o=i?10:n;if(-1===o||t.includes(o))return this.text+=r.slice(e,this.prevI),o;i&&(this.text+="".concat(r.slice(e,this.prevI),"\n"),e=this.i)}}},{key:"captureToChar",value:function(t){for(var e=this.i,r=this.chunk;;){var n=this.getCode();switch(n){case-2:this.text+="".concat(r.slice(e,this.prevI),"\n"),e=this.i,n=10;break;case-1:return this.text+=r.slice(e),!1}if(n===t)return this.text+=r.slice(e,this.prevI),!0}}},{key:"captureNameChars",value:function(){for(var t=this.chunk,e=this.i;;){var r=this.getCode();if(-1===r)return this.name+=t.slice(e),-1;if(!m(r))return this.name+=t.slice(e,this.prevI),-2===r?10:r}}},{key:"skipSpaces",value:function(){for(;;){var t=this.getCodeNorm();if(-1===t||!h(t))return t}}},{key:"setXMLVersion",value:function(t){this.currentXMLVersion=t,"1.0"===t?(this.isChar=d,this.getCode=this.getCode10):(this.isChar=v,this.getCode=this.getCode11)}},{key:"sBegin",value:function(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}},{key:"sBeginWhitespace",value:function(){var t=this.i,e=this.skipSpaces();switch(this.prevI!==t&&(this.xmlDeclPossible=!1),e){case 60:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case-1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=!1}}},{key:"sDoctype",value:function(){var t,e=this.captureTo(C);switch(e){case 62:null===(t=this.doctypeHandler)||void 0===t||t.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(e),91===e?this.state=4:T(e)&&(this.state=3,this.q=e)}}},{key:"sDoctypeQuote",value:function(){var t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.q=null,this.state=2)}},{key:"sDTD",value:function(){var t=this.captureTo(M);-1!==t&&(this.text+=String.fromCodePoint(t),93===t?this.state=2:60===t?this.state=6:T(t)&&(this.state=5,this.q=t))}},{key:"sDTDQuoted",value:function(){var t=this.q;this.captureToChar(t)&&(this.text+=String.fromCodePoint(t),this.state=4,this.q=null)}},{key:"sDTDOpenWaka",value:function(){var t=this.getCodeNorm();switch(this.text+=String.fromCodePoint(t),t){case 33:this.state=7,this.openWakaBang="";break;case E:this.state=11;break;default:this.state=4}}},{key:"sDTDOpenWakaBang",value:function(){var t=String.fromCodePoint(this.getCodeNorm()),e=this.openWakaBang+=t;this.text+=t,"-"!==e&&(this.state="--"===e?8:4,this.openWakaBang="")}},{key:"sDTDComment",value:function(){this.captureToChar(45)&&(this.text+="-",this.state=9)}},{key:"sDTDCommentEnding",value:function(){var t=this.getCodeNorm();this.text+=String.fromCodePoint(t),this.state=45===t?10:8}},{key:"sDTDCommentEnded",value:function(){var t=this.getCodeNorm();this.text+=String.fromCodePoint(t),62===t?this.state=4:(this.fail("malformed comment."),this.state=8)}},{key:"sDTDPI",value:function(){this.captureToChar(E)&&(this.text+="?",this.state=12)}},{key:"sDTDPIEnding",value:function(){var t=this.getCodeNorm();this.text+=String.fromCodePoint(t),62===t&&(this.state=4)}},{key:"sText",value:function(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}},{key:"sEntity",value:function(){var t=this.i,e=this.chunk;t:for(;;)switch(this.getCode()){case-2:this.entity+="".concat(e.slice(t,this.prevI),"\n"),t=this.i;break;case 59:var r=this.entityReturnState,n=this.entity+e.slice(t,this.prevI);this.state=r;var i=void 0;""===n?(this.fail("empty entity name."),i="&;"):(i=this.parseEntity(n),this.entity=""),13===r&&void 0===this.textHandler||(this.text+=i);break t;case-1:this.entity+=e.slice(t);break t}}},{key:"sOpenWaka",value:function(){var t=this.getCode();if(p(t))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(t){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case E:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=13,this.xmlDeclPossible=!1}}},{key:"sOpenWakaBang",value:function(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}},{key:"sComment",value:function(){this.captureToChar(45)&&(this.state=18)}},{key:"sCommentEnding",value:function(){var t,e=this.getCodeNorm();45===e?(this.state=19,null===(t=this.commentHandler)||void 0===t||t.call(this,this.text),this.text=""):(this.text+="-".concat(String.fromCodePoint(e)),this.state=17)}},{key:"sCommentEnded",value:function(){var t=this.getCodeNorm();62!==t?(this.fail("malformed comment."),this.text+="--".concat(String.fromCodePoint(t)),this.state=17):this.state=13}},{key:"sCData",value:function(){this.captureToChar(93)&&(this.state=21)}},{key:"sCDataEnding",value:function(){var t=this.getCodeNorm();93===t?this.state=22:(this.text+="]".concat(String.fromCodePoint(t)),this.state=20)}},{key:"sCDataEnding2",value:function(){var t,e=this.getCodeNorm();switch(e){case 62:null===(t=this.cdataHandler)||void 0===t||t.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]".concat(String.fromCodePoint(e)),this.state=20}}},{key:"sPIFirstChar",value:function(){var t=this.getCodeNorm();this.nameStartCheck(t)?(this.piTarget+=String.fromCodePoint(t),this.state=24):t===E||h(t)?(this.fail("processing instruction without a target."),this.state=t===E?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(t),this.state=24)}},{key:"sPIRest",value:function(){for(var t=this.chunk,e=this.i;;){var r=this.getCodeNorm();if(-1===r)return void(this.piTarget+=t.slice(e));if(!this.nameCheck(r)){this.piTarget+=t.slice(e,this.prevI);var n=r===E;n||h(r)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?33:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(r));break}}}},{key:"sPIBody",value:function(){if(0===this.text.length){var t=this.getCodeNorm();t===E?this.state=26:h(t)||(this.text=String.fromCodePoint(t))}else this.captureToChar(E)&&(this.state=26)}},{key:"sPIEnding",value:function(){var t,e=this.getCodeNorm();if(62===e){var r=this.piTarget;"xml"===r.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),null===(t=this.piHandler)||void 0===t||t.call(this,{target:r,body:this.text}),this.piTarget=this.text="",this.state=13}else e===E?this.text+="?":(this.text+="?".concat(String.fromCodePoint(e)),this.state=25);this.xmlDeclPossible=!1}},{key:"sXMLDeclNameStart",value:function(){var t=this.skipSpaces();t!==E?-1!==t&&(this.state=28,this.name=String.fromCodePoint(t)):this.state=33}},{key:"sXMLDeclName",value:function(){var t=this.captureTo(P);if(t===E)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(h(t)||t===R){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail("expected the name ".concat(this.xmlDeclExpects[0],"."));break;default:this.fail("expected one of ".concat(this.xmlDeclExpects.join(", ")))}this.state=t===R?30:29}}},{key:"sXMLDeclEq",value:function(){var t=this.getCodeNorm();if(t===E)return this.state=33,void this.fail("XML declaration is incomplete.");h(t)||(t!==R&&this.fail("value required."),this.state=30)}},{key:"sXMLDeclValueStart",value:function(){var t=this.getCodeNorm();if(t===E)return this.state=33,void this.fail("XML declaration is incomplete.");h(t)||(T(t)?this.q=t:(this.fail("value must be quoted."),this.q=32),this.state=31)}},{key:"sXMLDeclValue",value:function(){var t=this.captureTo([this.q,E]);if(t===E)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(-1!==t){var e=this.text;switch(this.text="",this.name){case"version":this.xmlDeclExpects=["encoding","standalone"];var r=e;this.xmlDecl.version=r,/^1\.[0-9]+$/.test(r)?this.opt.forceXMLVersion||this.setXMLVersion(r):this.fail("version number must match /^1\\.[0-9]+$/.");break;case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(e)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=e;break;case"standalone":"yes"!==e&&"no"!==e&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=e}this.name="",this.state=32}}},{key:"sXMLDeclSeparator",value:function(){var t=this.getCodeNorm();t!==E?(h(t)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}},{key:"sXMLDeclEnding",value:function(){var t;62===this.getCodeNorm()?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),null===(t=this.xmldeclHandler)||void 0===t||t.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=13):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}},{key:"sOpenTag",value:function(){var t,e=this.captureNameChars();if(-1!==e){var r=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=r.ns=Object.create(null)),null===(t=this.openTagStartHandler)||void 0===t||t.call(this,r),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),e){case 62:this.openTag();break;case 47:this.state=35;break;default:h(e)||this.fail("disallowed character in tag name."),this.state=36}}}},{key:"sOpenTagSlash",value:function(){62===this.getCode()?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}},{key:"sAttrib",value:function(){var t=this.skipSpaces();-1!==t&&(p(t)?(this.unget(),this.state=37):62===t?this.openTag():47===t?this.state=35:this.fail("disallowed character in attribute name."))}},{key:"sAttribName",value:function(){var t=this.captureNameChars();t===R?this.state=39:h(t)?this.state=38:62===t?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):-1!==t&&this.fail("disallowed character in attribute name.")}},{key:"sAttribNameSawWhite",value:function(){var t=this.skipSpaces();switch(t){case-1:return;case R:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",62===t?this.openTag():p(t)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}},{key:"sAttribValue",value:function(){var t=this.getCodeNorm();T(t)?(this.q=t,this.state=40):h(t)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}},{key:"sAttribValueQuoted",value:function(){for(var t=this.q,e=this.chunk,r=this.i;;)switch(this.getCode()){case t:return this.pushAttrib(this.name,this.text+e.slice(r,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=e.slice(r,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+="".concat(e.slice(r,this.prevI)," "),r=this.i;break;case 60:return this.text+=e.slice(r,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=e.slice(r))}}},{key:"sAttribValueClosed",value:function(){var t=this.getCodeNorm();h(t)?this.state=36:62===t?this.openTag():47===t?this.state=35:p(t)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}},{key:"sAttribValueUnquoted",value:function(){var t=this.captureTo(A);switch(t){case 38:this.state=14,this.entityReturnState=42;break;case 60:this.fail("disallowed character.");break;case-1:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",62===t?this.openTag():this.state=36}}},{key:"sCloseTag",value:function(){var t=this.captureNameChars();62===t?this.closeTag():h(t)?this.state=44:-1!==t&&this.fail("disallowed character in closing tag.")}},{key:"sCloseTagSawWhite",value:function(){switch(this.skipSpaces()){case 62:this.closeTag();break;case-1:break;default:this.fail("disallowed character in closing tag.")}}},{key:"handleTextInRoot",value:function(){var t=this.i,e=this.forbiddenState,r=this.chunk,n=this.textHandler;t:for(;;)switch(this.getCode()){case 60:if(this.state=15,void 0!==n){var i=this.text,o=r.slice(t,this.prevI);0!==i.length?(n(i+o),this.text=""):0!==o.length&&n(o)}e=0;break t;case 38:this.state=14,this.entityReturnState=13,void 0!==n&&(this.text+=r.slice(t,this.prevI)),e=0;break t;case 93:switch(e){case 0:e=1;break;case 1:e=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:2===e&&this.fail('the string "]]>" is disallowed in char data.'),e=0;break;case-2:void 0!==n&&(this.text+="".concat(r.slice(t,this.prevI),"\n")),t=this.i,e=0;break;case-1:void 0!==n&&(this.text+=r.slice(t));break t;default:e=0}this.forbiddenState=e}},{key:"handleTextOutsideRoot",value:function(){var t=this.i,e=this.chunk,r=this.textHandler,n=!1;t:for(;;){var i=this.getCode();switch(i){case 60:if(this.state=15,void 0!==r){var o=this.text,a=e.slice(t,this.prevI);0!==o.length?(r(o+a),this.text=""):0!==a.length&&r(a)}break t;case 38:this.state=14,this.entityReturnState=13,void 0!==r&&(this.text+=e.slice(t,this.prevI)),n=!0;break t;case-2:void 0!==r&&(this.text+="".concat(e.slice(t,this.prevI),"\n")),t=this.i;break;case-1:void 0!==r&&(this.text+=e.slice(t));break t;default:h(i)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}},{key:"pushAttribNS",value:function(t,e){var r,n=this.qname(t),i=n.prefix,o=n.local,a={name:t,prefix:i,local:o,value:e};if(this.attribList.push(a),null===(r=this.attributeHandler)||void 0===r||r.call(this,a),"xmlns"===i){var s=e.trim();"1.0"===this.currentXMLVersion&&""===s&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[o]=s,I(this,o,s)}else if("xmlns"===t){var u=e.trim();this.topNS[""]=u,I(this,"",u)}}},{key:"pushAttribPlain",value:function(t,e){var r,n={name:t,value:e};this.attribList.push(n),null===(r=this.attributeHandler)||void 0===r||r.call(this,n)}},{key:"end",value:function(){var t,e;this.sawRoot||this.fail("document must contain a root element.");for(var r=this.tags;r.length>0;){var n=r.pop();this.fail("unclosed tag: ".concat(n.name))}0!==this.state&&13!==this.state&&this.fail("unexpected end.");var i=this.text;return 0!==i.length&&(null===(t=this.textHandler)||void 0===t||t.call(this,i),this.text=""),this._closed=!0,null===(e=this.endHandler)||void 0===e||e.call(this),this._init(),this}},{key:"resolve",value:function(t){var e,r,n=this.topNS[t];if(void 0!==n)return n;for(var i=this.tags,o=i.length-1;o>=0;o--)if(void 0!==(n=i[o].ns[t]))return n;return void 0!==(n=this.ns[t])?n:null===(r=(e=this.opt).resolvePrefix)||void 0===r?void 0:r.call(e,t)}},{key:"qname",value:function(t){var e=t.indexOf(":");if(-1===e)return{prefix:"",local:t};var r=t.slice(e+1),n=t.slice(0,e);return(""===n||""===r||r.includes(":"))&&this.fail("malformed name: ".concat(t,".")),{prefix:n,local:r}}},{key:"processAttribsNS",value:function(){var t,e=this.attribList,r=this.tag,i=this.qname(r.name),o=i.prefix,a=i.local;r.prefix=o,r.local=a;var s=r.uri=null!==(t=this.resolve(o))&&void 0!==t?t:"";if(""!==o&&("xmlns"===o&&this.fail('tags may not have "xmlns" as prefix.'),""===s&&(this.fail("unbound namespace prefix: ".concat(JSON.stringify(o),".")),r.uri=o)),0!==e.length){var u,c=r.attributes,f=new Set,l=n(e);try{for(l.s();!(u=l.n()).done;){var h=u.value,d=h.name,p=h.prefix,m=h.local,y=void 0,b=void 0;""===p?(y="xmlns"===d?x:"",b=d):(void 0===(y=this.resolve(p))&&(this.fail("unbound namespace prefix: ".concat(JSON.stringify(p),".")),y=p),b="{".concat(y,"}").concat(m)),f.has(b)&&this.fail("duplicate attribute: ".concat(b,".")),f.add(b),h.uri=y,c[d]=h}}catch(t){l.e(t)}finally{l.f()}this.attribList=[]}}},{key:"processAttribsPlain",value:function(){var t,e=this.attribList,r=this.tag.attributes,i=n(e);try{for(i.s();!(t=i.n()).done;){var o=t.value,a=o.name,s=o.value;void 0!==r[a]&&this.fail("duplicate attribute: ".concat(a,".")),r[a]=s}}catch(t){i.e(t)}finally{i.f()}this.attribList=[]}},{key:"openTag",value:function(){var t;this.processAttribs();var e=this.tags,r=this.tag;r.isSelfClosing=!1,null===(t=this.openTagHandler)||void 0===t||t.call(this,r),e.push(r),this.state=13,this.name=""}},{key:"openSelfClosingTag",value:function(){var t,e,r;this.processAttribs();var n=this.tags,i=this.tag;i.isSelfClosing=!0,null===(t=this.openTagHandler)||void 0===t||t.call(this,i),null===(e=this.closeTagHandler)||void 0===e||e.call(this,i),null===(this.tag=null!==(r=n[n.length-1])&&void 0!==r?r:null)&&(this.closedRoot=!0),this.state=13,this.name=""}},{key:"closeTag",value:function(){var t=this.tags,e=this.name;if(this.state=13,this.name="",""===e)return this.fail("weird empty close tag."),void(this.text+="");for(var r=this.closeTagHandler,n=t.length;n-- >0;){var i=this.tag=t.pop();if(this.topNS=i.ns,null==r||r(i),i.name===e)break;this.fail("unexpected close tag.")}0===n?this.closedRoot=!0:n<0&&(this.fail("unmatched closing tag: ".concat(e,".")),this.text+=""))}},{key:"parseEntity",value:function(t){if("#"!==t[0]){var e=this.ENTITIES[t];return void 0!==e?e:(this.fail(this.isName(t)?"undefined entity.":"disallowed character in entity name."),"&".concat(t,";"))}var r=NaN;return"x"===t[1]&&/^#x[0-9a-f]+$/i.test(t)?r=parseInt(t.slice(2),16):/^#[0-9]+$/.test(t)&&(r=parseInt(t.slice(1),10)),this.isChar(r)?String.fromCodePoint(r):(this.fail("malformed character entity."),"&".concat(t,";"))}},{key:"closed",get:function(){return this._closed}},{key:"position",get:function(){return this.chunkPosition+this.i}},{key:"columnIndex",get:function(){return this.position-this.positionAtNewLine}}])&&o(e.prototype,r),a&&o(e,a),t}();r.SaxesParser=F},{"xmlchars/xml/1.0/ed5":431,"xmlchars/xml/1.1/ed2":432,"xmlchars/xmlns/1.0/ed3":433}],387:[function(t,e,r){(function(t){"use strict";e.exports="function"==typeof t?t:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}}).call(this,t("timers").setImmediate)},{timers:411}],388:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.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 t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},{"safe-buffer":384}],389:[function(t,e,r){"use strict";var n=e.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=t("./sha"),n.sha1=t("./sha1"),n.sha224=t("./sha224"),n.sha256=t("./sha256"),n.sha384=t("./sha384"),n.sha512=t("./sha512")},{"./sha":390,"./sha1":391,"./sha224":392,"./sha256":393,"./sha384":394,"./sha512":395}],390:[function(t,e,r){"use strict";var n=t("inherits"),i=t("./hash"),o=t("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^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(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=r[l-3]^r[l-8]^r[l-14]^r[l-16];for(var h=0;h<80;++h){var d=~~(h/20),p=0|((e=n)<<5|e>>>27)+f(d,i,o,s)+u+r[h]+a[d];u=s,s=o,o=c(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 t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},e.exports=u},{"./hash":388,inherits:278,"safe-buffer":384}],391:[function(t,e,r){"use strict";var n=t("inherits"),i=t("./hash"),o=t("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^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(t){for(var e,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]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=(e=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),m=c(n)+l(p,i,o,s)+u+r[d]+a[p]|0;u=s,s=o,o=f(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 t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},e.exports=u},{"./hash":388,inherits:278,"safe-buffer":384}],392:[function(t,e,r){"use strict";var n=t("inherits"),i=t("./sha256"),o=t("./hash"),a=t("safe-buffer").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 t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},e.exports=u},{"./hash":388,"./sha256":393,inherits:278,"safe-buffer":384}],393:[function(t,e,r){"use strict";var n=t("inherits"),i=t("./hash"),o=t("safe-buffer").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 c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function h(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}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(t){for(var e,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,b=0;b<16;++b)r[b]=t.readInt32BE(4*b);for(;b<64;++b)r[b]=0|(((e=r[b-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[b-7]+d(r[b-15])+r[b-16];for(var v=0;v<64;++v){var g=y+h(u)+c(u,p,m)+a[v]+r[v]|0,w=l(n)+f(n,i,o)|0;y=m,m=p,p=u,u=s+g|0,s=o,o=i,i=n,n=g+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 t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},e.exports=u},{"./hash":388,inherits:278,"safe-buffer":384}],394:[function(t,e,r){"use strict";var n=t("inherits"),i=t("./sha512"),o=t("./hash"),a=t("safe-buffer").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 t=a.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},e.exports=u},{"./hash":388,"./sha512":395,inherits:278,"safe-buffer":384}],395:[function(t,e,r){"use strict";var n=t("inherits"),i=t("./hash"),o=t("safe-buffer").Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function b(t,e){return t>>>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(t){for(var e=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,g=0|this._hh,w=0|this._al,_=0|this._bl,k=0|this._cl,x=0|this._dl,S=0|this._el,O=0|this._fl,R=0|this._gl,E=0|this._hl,T=0;T<32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T<160;T+=2){var j=e[T-30],C=e[T-30+1],M=d(j,C),P=p(C,j),A=m(j=e[T-4],C=e[T-4+1]),I=y(C,j),D=e[T-14],N=e[T-14+1],B=e[T-32],F=e[T-32+1],L=P+N|0,z=M+D+b(L,P)|0;z=(z=z+A+b(L=L+I|0,I)|0)+B+b(L=L+F|0,F)|0,e[T]=z,e[T+1]=L}for(var U=0;U<160;U+=2){z=e[U],L=e[U+1];var H=f(r,n,i),V=f(w,_,k),q=l(r,w),W=l(w,r),$=h(s,S),X=h(S,s),K=a[U],Z=a[U+1],Y=c(s,u,v),G=c(S,O,R),J=E+X|0,Q=g+$+b(J,E)|0;Q=(Q=(Q=Q+Y+b(J=J+G|0,G)|0)+K+b(J=J+Z|0,Z)|0)+z+b(J=J+L|0,L)|0;var tt=W+V|0,et=q+H+b(tt,W)|0;g=v,E=R,v=u,R=O,u=s,O=S,s=o+Q+b(S=x+J|0,x)|0,o=i,x=k,i=n,k=_,n=r,_=w,r=Q+et+b(w=J+tt|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+k|0,this._dl=this._dl+x|0,this._el=this._el+S|0,this._fl=this._fl+O|0,this._gl=this._gl+R|0,this._hl=this._hl+E|0,this._ah=this._ah+r+b(this._al,w)|0,this._bh=this._bh+n+b(this._bl,_)|0,this._ch=this._ch+i+b(this._cl,k)|0,this._dh=this._dh+o+b(this._dl,x)|0,this._eh=this._eh+s+b(this._el,S)|0,this._fh=this._fh+u+b(this._fl,O)|0,this._gh=this._gh+v+b(this._gl,R)|0,this._hh=this._hh+g+b(this._hl,E)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},e.exports=u},{"./hash":388,inherits:278,"safe-buffer":384}],396:[function(t,e,r){"use strict";e.exports=i;var n=t("events").EventEmitter;function i(){n.call(this)}t("inherits")(i,n),i.Readable=t("readable-stream/readable.js"),i.Writable=t("readable-stream/writable.js"),i.Duplex=t("readable-stream/duplex.js"),i.Transform=t("readable-stream/transform.js"),i.PassThrough=t("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,t.end())}function u(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(f(),0===n.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",c),t.on("error",c),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},{events:258,inherits:278,"readable-stream/duplex.js":397,"readable-stream/passthrough.js":406,"readable-stream/readable.js":407,"readable-stream/transform.js":408,"readable-stream/writable.js":409}],397:[function(t,e,r){"use strict";e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":398}],398:[function(t,e,r){"use strict";var n=t("process-nextick-args"),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=l;var o=Object.create(t("core-util-is"));o.inherits=t("inherits");var a=t("./_stream_readable"),s=t("./_stream_writable");o.inherits(l,a);for(var u=i(s.prototype),c=0;c0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?_(t,a,e,!1):O(t,a)):_(t,a,e,!1))):n||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function x(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(S,t):S(t))}function S(t){d("emit readable"),t.emit("readable"),j(t)}function O(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(R,t,e))}function R(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;to.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,a),0===(t-=a)){a===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function M(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(P,e,t))}function P(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function A(t,e){for(var r=0,n=t.length;r=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?M(this):x(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&M(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t0?C(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&M(this)),null!==n&&this.emit("data",n),n},g.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},g.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?f:g;function c(e,r){d("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),t.removeListener("close",b),t.removeListener("finish",v),t.removeListener("drain",l),t.removeListener("error",y),t.removeListener("unpipe",c),n.removeListener("end",f),n.removeListener("end",g),n.removeListener("data",m),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function f(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):n.once("end",u),t.on("unpipe",c);var l=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,j(t))}}(n);t.on("drain",l);var h=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==A(o.pipes,t))&&!h&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function y(e){d("onerror",e),g(),t.removeListener("error",y),0===s(t,"error")&&t.emit("error",e)}function b(){t.removeListener("finish",v),g()}function v(){d("onfinish"),t.removeListener("close",b),g()}function g(){d("unpipe"),n.unpipe(t)}return n.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",y),t.once("close",b),t.once("finish",v),t.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),t},g.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o-1?i:o.nextTick;v.WritableState=b;var c=Object.create(t("core-util-is"));c.inherits=t("inherits");var f={deprecate:t("util-deprecate")},l=t("./internal/streams/stream"),h=t("safe-buffer").Buffer,d=n.Uint8Array||function(){};var p,m=t("./internal/streams/destroy");function y(){}function b(e,r){s=s||t("./_stream_duplex"),e=e||{};var n=r instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,c=e.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===e.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),S(t,e))}(t,r,n,e,i);else{var a=k(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||_(t,r),n?u(w,t,r,a,i):w(t,r,a,i)}}(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(e){if(s=s||t("./_stream_duplex"),!(p.call(v,this)||this instanceof s))return new v(e);this._writableState=new b(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)),l.call(this)}function g(t,e,r,n,i,o,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),S(t,e)}function _(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.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,g(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,l=r.callback;if(g(t,e,!1,e.objectMode?1:c.length,c,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)}))}function S(t,e){var r=k(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(x,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(v,l),b.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(b.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===v&&(t&&t._writableState instanceof b)}})):p=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,r){var n,i=this._writableState,a=!1,s=!i.objectMode&&(n=t,h.isBuffer(n)||n instanceof d);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=y),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(s||function(t,e,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||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(n,a),i=!1),i}(this,i,t,r))&&(i.pendingcb++,a=function(t,e,r,n,i,o){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=e.objectMode?1:n.length;e.length+=s;var u=e.length-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=m.destroy,v.prototype._undestroy=m.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").setImmediate)},{"./_stream_duplex":398,"./internal/streams/destroy":404,"./internal/streams/stream":405,_process:358,"core-util-is":219,inherits:278,"process-nextick-args":357,"safe-buffer":384,timers:411,"util-deprecate":412}],403:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=t("util");e.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=o,i=s,e.copy(r,i),s+=a.data.length,a=a.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},{"safe-buffer":384,util:185}],404:[function(t,e,r){"use strict";var n=t("process-nextick-args");function i(t,e){t.emit("error",e)}e.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":357}],405:[function(t,e,r){arguments[4][381][0].apply(r,arguments)},{dup:381,events:258}],406:[function(t,e,r){"use strict";e.exports=t("./readable").PassThrough},{"./readable":407}],407:[function(t,e,r){"use strict";(r=e.exports=t("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":398,"./lib/_stream_passthrough.js":399,"./lib/_stream_readable.js":400,"./lib/_stream_transform.js":401,"./lib/_stream_writable.js":402}],408:[function(t,e,r){"use strict";e.exports=t("./readable").Transform},{"./readable":407}],409:[function(t,e,r){"use strict";e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":402}],410:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}r.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":384}],411:[function(t,e,r){(function(e,n){"use strict";var i=t("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},u=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=u++,n=!(arguments.length<2)&&a.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete s[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":358,timers:411}],412:[function(t,e,r){(function(t){"use strict";function r(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],413:[function(t,e,r){"use strict";"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],414:[function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.exports=function(t){return t&&"object"===n(t)&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],415:[function(t,e,r){(function(e,n){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(e)?n.showHidden=e:e&&r._extend(n,e),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),l(n,t,n.depth)}function c(t,e){var r=u.styles[e];return r?"\x1b["+u.colors[r][0]+"m"+t+"\x1b["+u.colors[r][1]+"m":t}function f(t,e){return t}function l(t,e,n){if(t.customInspect&&e&&S(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=l(t,i,n)),i}var o=function(t,e){if(g(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(b(e))return t.stylize(""+e,"number");if(m(e))return t.stylize(""+e,"boolean");if(y(e))return t.stylize("null","null")}(t,e);if(o)return o;var a=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),x(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return h(e);if(0===a.length){if(S(e)){var u=e.name?": "+e.name:"";return t.stylize("[Function"+u+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(k(e))return t.stylize(Date.prototype.toString.call(e),"date");if(x(e))return h(e)}var c,f="",_=!1,O=["{","}"];(p(e)&&(_=!0,O=["[","]"]),S(e))&&(f=" [Function"+(e.name?": "+e.name:"")+"]");return w(e)&&(f=" "+RegExp.prototype.toString.call(e)),k(e)&&(f=" "+Date.prototype.toUTCString.call(e)),x(e)&&(f=" "+h(e)),0!==a.length||_&&0!=e.length?n<0?w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=_?function(t,e,r,n,i){for(var o=[],a=0,s=e.length;a=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,f,O)):O[0]+f+O[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,r,n,i,o){var a,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),j(n,i)||(a="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=y(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(s=o?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),g(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=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function p(t){return Array.isArray(t)}function m(t){return"boolean"==typeof t}function y(t){return null===t}function b(t){return"number"==typeof t}function v(t){return"string"==typeof t}function g(t){return void 0===t}function w(t){return _(t)&&"[object RegExp]"===O(t)}function _(t){return"object"===i(t)&&null!==t}function k(t){return _(t)&&"[object Date]"===O(t)}function x(t){return _(t)&&("[object Error]"===O(t)||t instanceof Error)}function S(t){return"function"==typeof t}function O(t){return Object.prototype.toString.call(t)}function R(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(g(a)&&(a=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var n=e.pid;s[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else s[t]=function(){};return s[t]},r.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"},r.isArray=p,r.isBoolean=m,r.isNull=y,r.isNullOrUndefined=function(t){return null==t},r.isNumber=b,r.isString=v,r.isSymbol=function(t){return"symbol"===i(t)},r.isUndefined=g,r.isRegExp=w,r.isObject=_,r.isDate=k,r.isError=x,r.isFunction=S,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"===i(t)||void 0===t},r.isBuffer=t("./support/isBuffer");var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var t=new Date,e=[R(t.getHours()),R(t.getMinutes()),R(t.getSeconds())].join(":");return[t.getDate(),E[t.getMonth()],e].join(" ")}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){console.log("%s - %s",T(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!_(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":414,_process:358,inherits:413}],416:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(r,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(r,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(r,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(r,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(r,"version",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(r,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(r,"stringify",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(r,"parse",{enumerable:!0,get:function(){return l.default}});var n=h(t("./v1.js")),i=h(t("./v3.js")),o=h(t("./v4.js")),a=h(t("./v5.js")),s=h(t("./nil.js")),u=h(t("./version.js")),c=h(t("./validate.js")),f=h(t("./stringify.js")),l=h(t("./parse.js"));function h(t){return t&&t.__esModule?t:{default:t}}},{"./nil.js":418,"./parse.js":419,"./stringify.js":423,"./v1.js":424,"./v3.js":425,"./v4.js":427,"./v5.js":428,"./validate.js":429,"./version.js":430}],417:[function(t,e,r){"use strict";function n(t){return 14+(t+64>>>9<<4)+1}function i(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function o(t,e,r,n,o,a){return i((s=i(i(e,t),i(n,a)))<<(u=o)|s>>>32-u,r);var s,u}function a(t,e,r,n,i,a,s){return o(e&r|~e&n,t,e,i,a,s)}function s(t,e,r,n,i,a,s){return o(e&n|r&~n,t,e,i,a,s)}function u(t,e,r,n,i,a,s){return o(e^r^n,t,e,i,a,s)}function c(t,e,r,n,i,a,s){return o(r^(e|~n),t,e,i,a,s)}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var f=function(t){if("string"==typeof t){var e=unescape(encodeURIComponent(t));t=new Uint8Array(e.length);for(var r=0;r>5]>>>n%32&255,o=parseInt("0123456789abcdef".charAt(i>>>4&15)+"0123456789abcdef".charAt(15&i),16);e.push(o)}return e}(function(t,e){t[e>>5]|=128<>5]|=(255&t[i/8])<>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r};r.default=o},{"./validate.js":429}],420:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},{}],421:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(){if(!n)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)};var n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16)},{}],422:[function(t,e,r){"use strict";function n(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function i(t,e){return t<>>32-e}Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var o=function(t){var e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof t){var o=unescape(encodeURIComponent(t));t=[];for(var a=0;a>>0;_=w,w=g,g=i(v,30)>>>0,v=b,b=S}r[0]=r[0]+b>>>0,r[1]=r[1]+v>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+w>>>0,r[4]=r[4]+_>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]};r.default=o},{}],423:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i=(n=t("./validate.js"))&&n.__esModule?n:{default:n};for(var o=[],a=0;a<256;++a)o.push((a+256).toString(16).substr(1));var s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]).toLowerCase();if(!(0,i.default)(r))throw TypeError("Stringified UUID is invalid");return r};r.default=s},{"./validate.js":429}],424:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,i,o=s(t("./rng.js")),a=s(t("./stringify.js"));function s(t){return t&&t.__esModule?t:{default:t}}var u=0,c=0;var f=function(t,e,r){var s=e&&r||0,f=e||new Array(16),l=(t=t||{}).node||n,h=void 0!==t.clockseq?t.clockseq:i;if(null==l||null==h){var d=t.random||(t.rng||o.default)();null==l&&(l=n=[1|d[0],d[1],d[2],d[3],d[4],d[5]]),null==h&&(h=i=16383&(d[6]<<8|d[7]))}var p=void 0!==t.msecs?t.msecs:Date.now(),m=void 0!==t.nsecs?t.nsecs:c+1,y=p-u+(m-c)/1e4;if(y<0&&void 0===t.clockseq&&(h=h+1&16383),(y<0||p>u)&&void 0===t.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=p,c=m,i=h;var b=(1e4*(268435455&(p+=122192928e5))+m)%4294967296;f[s++]=b>>>24&255,f[s++]=b>>>16&255,f[s++]=b>>>8&255,f[s++]=255&b;var v=p/4294967296*1e4&268435455;f[s++]=v>>>8&255,f[s++]=255&v,f[s++]=v>>>24&15|16,f[s++]=v>>>16&255,f[s++]=h>>>8|128,f[s++]=255&h;for(var g=0;g<6;++g)f[s+g]=l[g];return e||(0,a.default)(f)};r.default=f},{"./rng.js":421,"./stringify.js":423}],425:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=o(t("./v35.js")),i=o(t("./md5.js"));function o(t){return t&&t.__esModule?t:{default:t}}var a=(0,n.default)("v3",48,i.default);r.default=a},{"./md5.js":417,"./v35.js":426}],426:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(t,e,r){function o(t,o,a,s){if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));for(var e=[],r=0;r=65&&t<=90||t>=97&&t<=122||58===t||95===t||8204===t||8205===t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}r.S_LIST=[32,10,13,9],r.isChar=function(t){return t>=32&&t<=55295||10===t||13===t||9===t||t>=57344&&t<=65533||t>=65536&&t<=1114111},r.isS=function(t){return 32===t||10===t||13===t||9===t},r.isNameStartChar=n,r.isNameChar=function(t){return n(t)||t>=48&&t<=57||45===t||46===t||183===t||t>=768&&t<=879||t>=8255&&t<=8256}},{}],432:[function(t,e,r){"use strict"; /** * Character classes and associated utilities for the 2nd edition of XML 1.1. * * @author Louis-Dominique Dubeau * @license MIT * @copyright Louis-Dominique Dubeau */Object.defineProperty(r,"__esModule",{value:!0}),r.CHAR="\x01-\ud7ff\ue000-\ufffd\ud800\udc00-\udbff\udfff",r.RESTRICTED_CHAR="\x01-\b\v\f\x0e-\x1f\x7f-\x84\x86-\x9f",r.S=" \t\r\n",r.NAME_START_CHAR=":A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd\ud800\udc00-\udb7f\udfff",r.NAME_CHAR="-"+r.NAME_START_CHAR+".0-9\xb7\u0300-\u036f\u203f-\u2040",r.CHAR_RE=new RegExp("^["+r.CHAR+"]$","u"),r.RESTRICTED_CHAR_RE=new RegExp("^["+r.RESTRICTED_CHAR+"]$","u"),r.S_RE=new RegExp("^["+r.S+"]+$","u"),r.NAME_START_CHAR_RE=new RegExp("^["+r.NAME_START_CHAR+"]$","u"),r.NAME_CHAR_RE=new RegExp("^["+r.NAME_CHAR+"]$","u"),r.NAME_RE=new RegExp("^["+r.NAME_START_CHAR+"]["+r.NAME_CHAR+"]*$","u"),r.NMTOKEN_RE=new RegExp("^["+r.NAME_CHAR+"]+$","u");function n(t){return t>=65&&t<=90||t>=97&&t<=122||58===t||95===t||8204===t||8205===t||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}r.S_LIST=[32,10,13,9],r.isChar=function(t){return t>=1&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111},r.isRestrictedChar=function(t){return t>=1&&t<=8||11===t||12===t||t>=14&&t<=31||t>=127&&t<=132||t>=134&&t<=159},r.isCharAndNotRestricted=function(t){return 9===t||10===t||13===t||t>31&&t<127||133===t||t>159&&t<=55295||t>=57344&&t<=65533||t>=65536&&t<=1114111},r.isS=function(t){return 32===t||10===t||13===t||9===t},r.isNameStartChar=n,r.isNameChar=function(t){return n(t)||t>=48&&t<=57||45===t||46===t||183===t||t>=768&&t<=879||t>=8255&&t<=8256}},{}],433:[function(t,e,r){"use strict"; /** * Character class utilities for XML NS 1.0 edition 3. * * @author Louis-Dominique Dubeau * @license MIT * @copyright Louis-Dominique Dubeau */function n(t){return t>=65&&t<=90||95===t||t>=97&&t<=122||t>=192&&t<=214||t>=216&&t<=246||t>=248&&t<=767||t>=880&&t<=893||t>=895&&t<=8191||t>=8204&&t<=8205||t>=8304&&t<=8591||t>=11264&&t<=12271||t>=12289&&t<=55295||t>=63744&&t<=64975||t>=65008&&t<=65533||t>=65536&&t<=983039}Object.defineProperty(r,"__esModule",{value:!0}),r.NC_NAME_START_CHAR="A-Z_a-z\xc0-\xd6\xd8-\xf6\xf8-\u02ff\u0370-\u037d\u037f-\u1fff\u200c-\u200d\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd\ud800\udc00-\udb7f\udfff",r.NC_NAME_CHAR="-"+r.NC_NAME_START_CHAR+".0-9\xb7\u0300-\u036f\u203f-\u2040",r.NC_NAME_START_CHAR_RE=new RegExp("^["+r.NC_NAME_START_CHAR+"]$","u"),r.NC_NAME_CHAR_RE=new RegExp("^["+r.NC_NAME_CHAR+"]$","u"),r.NC_NAME_RE=new RegExp("^["+r.NC_NAME_START_CHAR+"]["+r.NC_NAME_CHAR+"]*$","u"),r.isNCNameStartChar=n,r.isNCNameChar=function(t){return n(t)||45===t||46===t||t>=48&&t<=57||183===t||t>=768&&t<=879||t>=8255&&t<=8256}},{}]},{},[15])(15)})); //# sourceMappingURL=exceljs.bare.min.js.map