@agile-team/mach-report 2.8.4 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/README.md +27 -9
  2. package/dist/ExcelBindingWizard-DiaxvWpQ.cjs +1 -0
  3. package/dist/ExcelBindingWizard-RLJIXKKG.js +816 -0
  4. package/dist/{ReportPreview-DTWiCH5a.js → ReportPreview-B5ZNEasW.js} +22 -21
  5. package/dist/ReportPreview-DRtVPUYo.cjs +6 -0
  6. package/dist/RuleEditor-N4qnMZ-Z.cjs +1 -0
  7. package/dist/RuleEditor-ynnUEK0s.js +1575 -0
  8. package/dist/TemplateReviewPanel-C_Lmzis6.cjs +1 -0
  9. package/dist/TemplateReviewPanel-Cn32OY4_.js +173 -0
  10. package/dist/analytics.cjs +1 -1
  11. package/dist/analytics.d.cts +188 -5
  12. package/dist/analytics.d.ts +188 -5
  13. package/dist/analytics.js +68 -202
  14. package/dist/{assets-B9qJku3V.js → assets-DDsfEi8R.js} +3 -3
  15. package/dist/{assets-RZan7EyL.cjs → assets-ahTRUXRk.cjs} +1 -1
  16. package/dist/binding-preview-B5834rml.cjs +2 -0
  17. package/dist/binding-preview-ChXjN5L5.js +649 -0
  18. package/dist/{capabilities-joSutDF8.js → capabilities-Cm9hZ3uV.js} +5 -5
  19. package/dist/{capabilities-xGTpnPjJ.cjs → capabilities-DYzWL7KS.cjs} +1 -1
  20. package/dist/dataset-BkRmwgeJ.cjs +1 -0
  21. package/dist/dataset-H5pFuQGU.js +121 -0
  22. package/dist/defaults-DXhiM1ZD.js +10 -0
  23. package/dist/defaults-xhmcLLrf.cjs +1 -0
  24. package/dist/designer.cjs +2 -1
  25. package/dist/designer.d.cts +1373 -6
  26. package/dist/designer.d.ts +1373 -6
  27. package/dist/designer.js +2495 -767
  28. package/dist/grid-geometry-BNptEcMm.js +65 -0
  29. package/dist/grid-geometry-CZ_cYB6O.cjs +1 -0
  30. package/dist/import-template-CNMLJSQw.js +23030 -0
  31. package/dist/import-template-CpxunKVp.cjs +29 -0
  32. package/dist/index.cjs +7 -7
  33. package/dist/index.d.cts +202 -3
  34. package/dist/index.d.ts +202 -3
  35. package/dist/index.js +554 -535
  36. package/dist/matrix-CNPDJxED.js +745 -0
  37. package/dist/matrix-Div9Ilh3.cjs +1 -0
  38. package/dist/pdf.cjs +46 -46
  39. package/dist/pdf.d.cts +2 -0
  40. package/dist/pdf.d.ts +2 -0
  41. package/dist/pdf.js +17 -16
  42. package/dist/{plugin-CQmJXNcA.js → plugin-BWwIgZXV.js} +1 -1
  43. package/dist/{plugin-DSFu51Ua.cjs → plugin-Dg-J1Rbm.cjs} +1 -1
  44. package/dist/progress-7OSZbFok.js +39 -0
  45. package/dist/progress-BnLiS5eH.cjs +1 -0
  46. package/dist/render-plan-7xpGrCEl.cjs +1 -0
  47. package/dist/render-plan-Ck6koX9L.js +13 -0
  48. package/dist/server/node.d.cts +62 -0
  49. package/dist/server/node.d.ts +62 -0
  50. package/dist/server-node.cjs +1 -1
  51. package/dist/server-node.js +373 -145
  52. package/dist/server.cjs +1 -1
  53. package/dist/server.d.cts +311 -0
  54. package/dist/server.d.ts +311 -0
  55. package/dist/server.js +590 -186
  56. package/dist/{style-Dv5o_x6b.js → style-CQ1PK8ZB.js} +5 -5
  57. package/dist/style-UgIJSA1F.cjs +1 -0
  58. package/dist/style.css +1 -1
  59. package/dist/template-registry-CHMYZ7SD.cjs +1 -0
  60. package/dist/template-registry-R61AMCr0.js +433 -0
  61. package/dist/template-review-hvWWQFsi.js +1027 -0
  62. package/dist/template-review-jEcOfmGr.cjs +1 -0
  63. package/dist/textwrap-CWHyzkBH.cjs +4 -0
  64. package/dist/{textwrap-DOl04hCQ.js → textwrap-DE1kgcJB.js} +1 -1
  65. package/dist/{validate-DfHPD8wX.cjs → validate-BDiMqkJC.cjs} +1 -1
  66. package/dist/{validate-S6CgIm5d.js → validate-DWPF7icl.js} +13 -13
  67. package/dist/vue/async.d.cts +186 -0
  68. package/dist/vue/async.d.ts +186 -0
  69. package/dist/vue/index.d.cts +271 -3
  70. package/dist/vue/index.d.ts +271 -3
  71. package/dist/vue-async.cjs +1 -1
  72. package/dist/vue-async.js +3 -3
  73. package/dist/vue.cjs +1 -1
  74. package/dist/vue.js +4 -4
  75. package/dist/worker.cjs +1 -1
  76. package/dist/worker.d.cts +2 -0
  77. package/dist/worker.d.ts +2 -0
  78. package/dist/worker.js +1 -1
  79. package/dist/xlsx.cjs +2 -30
  80. package/dist/xlsx.d.cts +268 -0
  81. package/dist/xlsx.d.ts +268 -0
  82. package/dist/xlsx.js +220 -23440
  83. package/package.json +1 -1
  84. package/dist/ReportPreview-DjGeWHY-.cjs +0 -6
  85. package/dist/progress-DD964VAB.js +0 -102
  86. package/dist/progress-KvhwXZ1Q.cjs +0 -1
  87. package/dist/render-plan-CckPEQyf.cjs +0 -1
  88. package/dist/render-plan-uzZYYSy1.js +0 -19
  89. package/dist/report-source-BXHNy_AD.js +0 -755
  90. package/dist/report-source-CCAvFE3t.cjs +0 -1
  91. package/dist/style-CpwiOPyB.cjs +0 -1
  92. package/dist/template-registry-DWExx0gU.cjs +0 -1
  93. package/dist/template-registry-NpOakidD.js +0 -354
  94. package/dist/textwrap-CnGsEum6.cjs +0 -4
package/dist/xlsx.cjs CHANGED
@@ -1,30 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ve=require("./progress-KvhwXZ1Q.cjs"),Gt=require("./_commonjsHelpers-DKOUU3wS.cjs"),dr=require("./style-CpwiOPyB.cjs"),vr=require("./capabilities-xGTpnPjJ.cjs"),wr=require("./render-plan-CckPEQyf.cjs"),_r=require("./number-format-CZ2T_5kF.cjs"),ir=require("./template-registry-DWExx0gU.cjs");function He(W){throw new Error('Could not dynamically require "'+W+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ke={exports:{}};var sr;function xr(){return sr||(sr=1,(function(W,X){(function(n){W.exports=n()})((function(){return(function n(x,_,c){function o(t,e){if(!_[t]){if(!x[t]){var l=typeof He=="function"&&He;if(!e&&l)return l(t,!0);if(a)return a(t,!0);var i=new Error("Cannot find module '"+t+"'");throw i.code="MODULE_NOT_FOUND",i}var s=_[t]={exports:{}};x[t][0].call(s.exports,(function(f){return o(x[t][1][f]||f)}),s,s.exports,n,x,_,c)}return _[t].exports}for(var a=typeof He=="function"&&He,r=0;r<c.length;r++)o(c[r]);return o})({1:[function(n,x,_){const c=n("fs"),o=n("fast-csv"),a=n("dayjs/plugin/customParseFormat"),r=n("dayjs/plugin/utc"),t=n("dayjs").extend(a).extend(r),e=n("../utils/stream-buf"),{fs:{exists:l}}=n("../utils/utils"),i={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};x.exports=class{constructor(s){this.workbook=s,this.worksheet=null}async readFile(s,f){if(f=f||{},!await l(s))throw new Error("File not found: "+s);const h=c.createReadStream(s),u=await this.read(h,f);return h.close(),u}read(s,f){return f=f||{},new Promise((h,u)=>{const p=this.workbook.addWorksheet(f.sheetName),d=f.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],w=f.map||function(A){if(A==="")return null;const N=Number(A);if(!Number.isNaN(N)&&N!==1/0)return N;const L=d.reduce((P,D)=>{if(P)return P;const U=t(A,D,!0);return U.isValid()?U:null},null);if(L)return new Date(L.valueOf());const I=i[A];return I!==void 0?I:A},S=o.parse(f.parserOptions).on("data",A=>{p.addRow(A.map(w))}).on("end",()=>{S.emit("worksheet",p)});S.on("worksheet",h).on("error",u),s.pipe(S)})}createInputStream(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#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")}write(s,f){return new Promise((h,u)=>{f=f||{};const p=this.workbook.getWorksheet(f.sheetName||f.sheetId),d=o.format(f.formatterOptions);s.on("finish",()=>{h()}),d.on("error",u),d.pipe(s);const{dateFormat:w,dateUTC:S}=f,A=f.map||(I=>{if(I){if(I.text||I.hyperlink)return I.hyperlink||I.text||"";if(I.formula||I.result)return I.result||"";if(I instanceof Date)return w?S?t.utc(I).format(w):t(I).format(w):S?t.utc(I).format():t(I).format();if(I.error)return I.error;if(typeof I=="object")return JSON.stringify(I)}return I}),N=f.includeEmptyRows===void 0||f.includeEmptyRows;let L=1;p&&p.eachRow((I,P)=>{if(N)for(;L++<P-1;)d.write([]);const{values:D}=I;D.shift(),d.write(D.map(A)),L=P}),d.end()})}writeFile(s,f){const h={encoding:(f=f||{}).encoding||"utf8"},u=c.createWriteStream(s,h);return this.write(u,f)}async writeBuffer(s){const f=new e;return await this.write(f,s),f.read()}}},{"../utils/stream-buf":24,"../utils/utils":27,dayjs:391,"dayjs/plugin/customParseFormat":392,"dayjs/plugin/utc":393,"fast-csv":424,fs:216}],2:[function(n,x,_){const c=n("../utils/col-cache");class o{constructor(r,t){let e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;if(this.worksheet=r,t)if(typeof t=="string"){const l=c.decodeAddress(t);this.nativeCol=l.col+e,this.nativeColOff=0,this.nativeRow=l.row+e,this.nativeRowOff=0}else t.nativeCol!==void 0?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):t.col!==void 0?(this.col=t.col+e,this.row=t.row+e):(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}static asInstance(r){return r instanceof o||r==null?r:new o(r)}get col(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth}set col(r){this.nativeCol=Math.floor(r),this.nativeColOff=Math.floor((r-this.nativeCol)*this.colWidth)}get row(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight}set row(r){this.nativeRow=Math.floor(r),this.nativeRowOff=Math.floor((r-this.nativeRow)*this.rowHeight)}get colWidth(){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}get rowHeight(){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}get model(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}}set model(r){this.nativeCol=r.nativeCol,this.nativeColOff=r.nativeColOff,this.nativeRow=r.nativeRow,this.nativeRowOff=r.nativeRowOff}}x.exports=o},{"../utils/col-cache":19}],3:[function(n,x,_){const c=n("../utils/col-cache"),o=n("../utils/under-dash"),a=n("./enums"),{slideFormula:r}=n("../utils/shared-formula"),t=n("./note");class e{constructor(s,f,h){if(!s||!f)throw new Error("A Cell needs a Row");this._row=s,this._column=f,c.validateAddress(h),this._address=h,this._value=l.create(e.Types.Null,this),this.style=this._mergeStyle(s.style,f.style,{}),this._mergeCount=0}get worksheet(){return this._row.worksheet}get workbook(){return this._row.worksheet.workbook}destroy(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}get numFmt(){return this.style.numFmt}set numFmt(s){this.style.numFmt=s}get font(){return this.style.font}set font(s){this.style.font=s}get alignment(){return this.style.alignment}set alignment(s){this.style.alignment=s}get border(){return this.style.border}set border(s){this.style.border=s}get fill(){return this.style.fill}set fill(s){this.style.fill=s}get protection(){return this.style.protection}set protection(s){this.style.protection=s}_mergeStyle(s,f,h){const u=s&&s.numFmt||f&&f.numFmt;u&&(h.numFmt=u);const p=s&&s.font||f&&f.font;p&&(h.font=p);const d=s&&s.alignment||f&&f.alignment;d&&(h.alignment=d);const w=s&&s.border||f&&f.border;w&&(h.border=w);const S=s&&s.fill||f&&f.fill;S&&(h.fill=S);const A=s&&s.protection||f&&f.protection;return A&&(h.protection=A),h}get address(){return this._address}get row(){return this._row.number}get col(){return this._column.number}get $col$row(){return`$${this._column.letter}$${this.row}`}get type(){return this._value.type}get effectiveType(){return this._value.effectiveType}toCsvString(){return this._value.toCsvString()}addMergeRef(){this._mergeCount++}releaseMergeRef(){this._mergeCount--}get isMerged(){return this._mergeCount>0||this.type===e.Types.Merge}merge(s,f){this._value.release(),this._value=l.create(e.Types.Merge,this,s),f||(this.style=s.style)}unmerge(){this.type===e.Types.Merge&&(this._value.release(),this._value=l.create(e.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}isMergedTo(s){return this._value.type===e.Types.Merge&&this._value.isMergedTo(s)}get master(){return this.type===e.Types.Merge?this._value.master:this}get isHyperlink(){return this._value.type===e.Types.Hyperlink}get hyperlink(){return this._value.hyperlink}get value(){return this._value.value}set value(s){this.type!==e.Types.Merge?(this._value.release(),this._value=l.create(l.getType(s),this,s)):this._value.master.value=s}get note(){return this._comment&&this._comment.note}set note(s){this._comment=new t(s)}get text(){return this._value.toString()}get html(){return o.escapeHtml(this.text)}toString(){return this.text}_upgradeToHyperlink(s){this.type===e.Types.String&&(this._value=l.create(e.Types.Hyperlink,this,{text:this._value.value,hyperlink:s}))}get formula(){return this._value.formula}get result(){return this._value.result}get formulaType(){return this._value.formulaType}get fullAddress(){const{worksheet:s}=this._row;return{sheetName:s.name,address:this.address,row:this.row,col:this.col}}get name(){return this.names[0]}set name(s){this.names=[s]}get names(){return this.workbook.definedNames.getNamesEx(this.fullAddress)}set names(s){const{definedNames:f}=this.workbook;f.removeAllNames(this.fullAddress),s.forEach(h=>{f.addEx(this.fullAddress,h)})}addName(s){this.workbook.definedNames.addEx(this.fullAddress,s)}removeName(s){this.workbook.definedNames.removeEx(this.fullAddress,s)}removeAllNames(){this.workbook.definedNames.removeAllNames(this.fullAddress)}get _dataValidations(){return this.worksheet.dataValidations}get dataValidation(){return this._dataValidations.find(this.address)}set dataValidation(s){this._dataValidations.add(this.address,s)}get model(){const{model:s}=this._value;return s.style=this.style,this._comment&&(s.comment=this._comment.model),s}set model(s){this._value.release(),this._value=l.create(s.type,this),this._value.model=s,s.comment&&s.comment.type==="note"&&(this._comment=t.fromModel(s.comment)),s.style?this.style=s.style:this.style={}}}e.Types=a.ValueType;const l={getType:i=>i==null?e.Types.Null:i instanceof String||typeof i=="string"?e.Types.String:typeof i=="number"?e.Types.Number:typeof i=="boolean"?e.Types.Boolean:i instanceof Date?e.Types.Date:i.text&&i.hyperlink?e.Types.Hyperlink:i.formula||i.sharedFormula?e.Types.Formula:i.richText?e.Types.RichText:i.sharedString?e.Types.SharedString:i.error?e.Types.Error:e.Types.JSON,types:[{t:e.Types.Null,f:class{constructor(i){this.model={address:i.address,type:e.Types.Null}}get value(){return null}set value(i){}get type(){return e.Types.Null}get effectiveType(){return e.Types.Null}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){}toString(){return""}}},{t:e.Types.Number,f:class{constructor(i,s){this.model={address:i.address,type:e.Types.Number,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return e.Types.Number}get effectiveType(){return e.Types.Number}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.String,f:class{constructor(i,s){this.model={address:i.address,type:e.Types.String,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return e.Types.String}get effectiveType(){return e.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.model.value.replace(/"/g,'""')}"`}release(){}toString(){return this.model.value}}},{t:e.Types.Date,f:class{constructor(i,s){this.model={address:i.address,type:e.Types.Date,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return e.Types.Date}get effectiveType(){return e.Types.Date}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toISOString()}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.Hyperlink,f:class{constructor(i,s){this.model={address:i.address,type:e.Types.Hyperlink,text:s?s.text:void 0,hyperlink:s?s.hyperlink:void 0},s&&s.tooltip&&(this.model.tooltip=s.tooltip)}get value(){const i={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(i.tooltip=this.model.tooltip),i}set value(i){this.model={text:i.text,hyperlink:i.hyperlink},i.tooltip&&(this.model.tooltip=i.tooltip)}get text(){return this.model.text}set text(i){this.model.text=i}get hyperlink(){return this.model.hyperlink}set hyperlink(i){this.model.hyperlink=i}get type(){return e.Types.Hyperlink}get effectiveType(){return e.Types.Hyperlink}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.hyperlink}release(){}toString(){return this.model.text}}},{t:e.Types.Formula,f:class{constructor(i,s){this.cell=i,this.model={address:i.address,type:e.Types.Formula,shareType:s?s.shareType:void 0,ref:s?s.ref:void 0,formula:s?s.formula:void 0,sharedFormula:s?s.sharedFormula:void 0,result:s?s.result:void 0}}_copyModel(i){const s={},f=h=>{const u=i[h];u&&(s[h]=u)};return f("formula"),f("result"),f("ref"),f("shareType"),f("sharedFormula"),s}get value(){return this._copyModel(this.model)}set value(i){this.model=this._copyModel(i)}validate(i){switch(l.getType(i)){case e.Types.Null:case e.Types.String:case e.Types.Number:case e.Types.Date:break;case e.Types.Hyperlink:case e.Types.Formula:default:throw new Error("Cannot process that type of result value")}}get dependencies(){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)}}get formula(){return this.model.formula||this._getTranslatedFormula()}set formula(i){this.model.formula=i}get formulaType(){return this.model.formula?a.FormulaType.Master:this.model.sharedFormula?a.FormulaType.Shared:a.FormulaType.None}get result(){return this.model.result}set result(i){this.model.result=i}get type(){return e.Types.Formula}get effectiveType(){const i=this.model.result;return i==null?a.ValueType.Null:i instanceof String||typeof i=="string"?a.ValueType.String:typeof i=="number"?a.ValueType.Number:i instanceof Date?a.ValueType.Date:i.text&&i.hyperlink?a.ValueType.Hyperlink:i.formula?a.ValueType.Formula:a.ValueType.Null}get address(){return this.model.address}set address(i){this.model.address=i}_getTranslatedFormula(){if(!this._translatedFormula&&this.model.sharedFormula){const{worksheet:i}=this.cell,s=i.findCell(this.model.sharedFormula);this._translatedFormula=s&&r(s.formula,s.address,this.model.address)}return this._translatedFormula}toCsvString(){return""+(this.model.result||"")}release(){}toString(){return this.model.result?this.model.result.toString():""}}},{t:e.Types.Merge,f:class{constructor(i,s){this.model={address:i.address,type:e.Types.Merge,master:s?s.address:void 0},this._master=s,s&&s.addMergeRef()}get value(){return this._master.value}set value(i){i instanceof e?(this._master&&this._master.releaseMergeRef(),i.addMergeRef(),this._master=i):this._master.value=i}isMergedTo(i){return i===this._master}get master(){return this._master}get type(){return e.Types.Merge}get effectiveType(){return this._master.effectiveType}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return""}release(){this._master.releaseMergeRef()}toString(){return this.value.toString()}}},{t:e.Types.JSON,f:class{constructor(i,s){this.model={address:i.address,type:e.Types.String,value:JSON.stringify(s),rawValue:s}}get value(){return this.model.rawValue}set value(i){this.model.rawValue=i,this.model.value=JSON.stringify(i)}get type(){return e.Types.String}get effectiveType(){return e.Types.String}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value}release(){}toString(){return this.model.value}}},{t:e.Types.SharedString,f:class{constructor(i,s){this.model={address:i.address,type:e.Types.SharedString,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return e.Types.SharedString}get effectiveType(){return e.Types.SharedString}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value.toString()}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.RichText,f:class{constructor(i,s){this.model={address:i.address,type:e.Types.String,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}toString(){return this.model.value.richText.map(i=>i.text).join("")}get type(){return e.Types.RichText}get effectiveType(){return e.Types.RichText}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return`"${this.text.replace(/"/g,'""')}"`}release(){}}},{t:e.Types.Boolean,f:class{constructor(i,s){this.model={address:i.address,type:e.Types.Boolean,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return e.Types.Boolean}get effectiveType(){return e.Types.Boolean}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.model.value?1:0}release(){}toString(){return this.model.value.toString()}}},{t:e.Types.Error,f:class{constructor(i,s){this.model={address:i.address,type:e.Types.Error,value:s}}get value(){return this.model.value}set value(i){this.model.value=i}get type(){return e.Types.Error}get effectiveType(){return e.Types.Error}get address(){return this.model.address}set address(i){this.model.address=i}toCsvString(){return this.toString()}release(){}toString(){return this.model.value.error.toString()}}}].reduce((i,s)=>(i[s.t]=s.f,i),[]),create(i,s,f){const h=this.types[i];if(!h)throw new Error("Could not create Value of type "+i);return new h(s,f)}};x.exports=e},{"../utils/col-cache":19,"../utils/shared-formula":23,"../utils/under-dash":26,"./enums":7,"./note":9}],4:[function(n,x,_){const c=n("../utils/under-dash"),o=n("./enums"),a=n("../utils/col-cache");class r{constructor(e,l,i){this._worksheet=e,this._number=l,i!==!1&&(this.defn=i)}get number(){return this._number}get worksheet(){return this._worksheet}get letter(){return a.n2l(this._number)}get isCustomWidth(){return this.width!==void 0&&this.width!==9}get defn(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}}set defn(e){e?(this.key=e.key,this.width=e.width!==void 0?e.width:9,this.outlineLevel=e.outlineLevel,e.style?this.style=e.style:this.style={},this.header=e.header,this._hidden=!!e.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}get headers(){return this._header&&this._header instanceof Array?this._header:[this._header]}get header(){return this._header}set header(e){e!==void 0?(this._header=e,this.headers.forEach((l,i)=>{this._worksheet.getCell(i+1,this.number).value=l})):this._header=void 0}get key(){return this._key}set key(e){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),this._key=e,e&&this._worksheet.setColumnKey(this._key,this)}get hidden(){return!!this._hidden}set hidden(e){this._hidden=e}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(e){this._outlineLevel=e}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}toString(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}equivalentTo(e){return this.width===e.width&&this.hidden===e.hidden&&this.outlineLevel===e.outlineLevel&&c.isEqual(this.style,e.style)}get isDefault(){if(this.isCustomWidth||this.hidden||this.outlineLevel)return!1;const e=this.style;return!e||!(e.font||e.numFmt||e.alignment||e.border||e.fill||e.protection)}get headerCount(){return this.headers.length}eachCell(e,l){const i=this.number;l||(l=e,e=null),this._worksheet.eachRow(e,(s,f)=>{l(s.getCell(i),f)})}get values(){const e=[];return this.eachCell((l,i)=>{l&&l.type!==o.ValueType.Null&&(e[i]=l.value)}),e}set values(e){if(!e)return;const l=this.number;let i=0;e.hasOwnProperty("0")&&(i=1),e.forEach((s,f)=>{this._worksheet.getCell(f+i,l).value=s})}_applyStyle(e,l){return this.style[e]=l,this.eachCell(i=>{i[e]=l}),l}get numFmt(){return this.style.numFmt}set numFmt(e){this._applyStyle("numFmt",e)}get font(){return this.style.font}set font(e){this._applyStyle("font",e)}get alignment(){return this.style.alignment}set alignment(e){this._applyStyle("alignment",e)}get protection(){return this.style.protection}set protection(e){this._applyStyle("protection",e)}get border(){return this.style.border}set border(e){this._applyStyle("border",e)}get fill(){return this.style.fill}set fill(e){this._applyStyle("fill",e)}static toModel(e){const l=[];let i=null;return e&&e.forEach((s,f)=>{s.isDefault?i&&(i=null):i&&s.equivalentTo(i)?i.max=f+1:(i={min:f+1,max:f+1,width:s.width!==void 0?s.width:9,style:s.style,isCustomWidth:s.isCustomWidth,hidden:s.hidden,outlineLevel:s.outlineLevel,collapsed:s.collapsed},l.push(i))}),l.length?l:void 0}static fromModel(e,l){const i=[];let s=1,f=0;for(l=(l=l||[]).sort((function(h,u){return h.min-u.min}));f<l.length;){const h=l[f++];for(;s<h.min;)i.push(new r(e,s++));for(;s<=h.max;)i.push(new r(e,s++,h))}return i.length?i:null}}x.exports=r},{"../utils/col-cache":19,"../utils/under-dash":26,"./enums":7}],5:[function(n,x,_){x.exports=class{constructor(c){this.model=c||{}}add(c,o){return this.model[c]=o}find(c){return this.model[c]}remove(c){this.model[c]=void 0}}},{}],6:[function(n,x,_){const c=n("../utils/under-dash"),o=n("../utils/col-cache"),a=n("../utils/cell-matrix"),r=n("./range"),t=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;x.exports=class{constructor(){this.matrixMap={}}getMatrix(e){return this.matrixMap[e]||(this.matrixMap[e]=new a)}add(e,l){const i=o.decodeEx(e);this.addEx(i,l)}addEx(e,l){const i=this.getMatrix(l);if(e.top)for(let s=e.left;s<=e.right;s++)for(let f=e.top;f<=e.bottom;f++){const h={sheetName:e.sheetName,address:o.n2l(s)+f,row:f,col:s};i.addCellEx(h)}else i.addCellEx(e)}remove(e,l){const i=o.decodeEx(e);this.removeEx(i,l)}removeEx(e,l){this.getMatrix(l).removeCellEx(e)}removeAllNames(e){c.each(this.matrixMap,l=>{l.removeCellEx(e)})}forEach(e){c.each(this.matrixMap,(l,i)=>{l.forEach(s=>{e(i,s)})})}getNames(e){return this.getNamesEx(o.decodeEx(e))}getNamesEx(e){return c.map(this.matrixMap,(l,i)=>l.findCellEx(e)&&i).filter(Boolean)}_explore(e,l){l.mark=!1;const{sheetName:i}=l,s=new r(l.row,l.col,l.row,l.col,i);let f,h;function u(d,w){const S=e.findCellAt(i,d,l.col);return!(!S||!S.mark)&&(s[w]=d,S.mark=!1,!0)}for(h=l.row-1;u(h,"top");h--);for(h=l.row+1;u(h,"bottom");h++);function p(d,w){const S=[];for(h=s.top;h<=s.bottom;h++){const A=e.findCellAt(i,h,d);if(!A||!A.mark)return!1;S.push(A)}s[w]=d;for(let A=0;A<S.length;A++)S[A].mark=!1;return!0}for(f=l.col-1;p(f,"left");f--);for(f=l.col+1;p(f,"right");f++);return s}getRanges(e,l){return(l=l||this.matrixMap[e])?(l.forEach(i=>{i.mark=!0}),{name:e,ranges:l.map(i=>i.mark&&this._explore(l,i)).filter(Boolean).map(i=>i.$shortRange)}):{name:e,ranges:[]}}normaliseMatrix(e,l){e.forEachInSheet(l,(i,s,f)=>{i&&(i.row===s&&i.col===f||(i.row=s,i.col=f,i.address=o.n2l(f)+s))})}spliceRows(e,l,i,s){c.each(this.matrixMap,f=>{f.spliceRows(e,l,i,s),this.normaliseMatrix(f,e)})}spliceColumns(e,l,i,s){c.each(this.matrixMap,f=>{f.spliceColumns(e,l,i,s),this.normaliseMatrix(f,e)})}get model(){return c.map(this.matrixMap,(e,l)=>this.getRanges(l,e)).filter(e=>e.ranges.length)}set model(e){const l=this.matrixMap={};e.forEach(i=>{const s=l[i.name]=new a;i.ranges.forEach(f=>{t.test(f.split("!").pop()||"")&&s.addCell(f)})})}}},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":26,"./range":10}],7:[function(n,x,_){x.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(n,x,_){const c=n("../utils/col-cache"),o=n("./anchor");x.exports=class{constructor(a,r){this.worksheet=a,this.model=r}get model(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}}set model(a){let{type:r,imageId:t,range:e,hyperlinks:l}=a;if(this.type=r,this.imageId=t,r==="image")if(typeof e=="string"){const i=c.decode(e);this.range={tl:new o(this.worksheet,{col:i.left,row:i.top},-1),br:new o(this.worksheet,{col:i.right,row:i.bottom},0),editAs:"oneCell"}}else this.range={tl:new o(this.worksheet,e.tl,0),br:e.br&&new o(this.worksheet,e.br,0),ext:e.ext,editAs:e.editAs,hyperlinks:l||e.hyperlinks}}}},{"../utils/col-cache":19,"./anchor":2}],9:[function(n,x,_){const c=n("../utils/under-dash");class o{constructor(r){this.note=r}get model(){let r=null;return typeof this.note==="string"?r={type:"note",note:{texts:[{text:this.note}]}}:r={type:"note",note:this.note},c.deepMerge({},o.DEFAULT_CONFIGS,r)}set model(r){const{note:t}=r,{texts:e}=t;e.length===1&&Object.keys(e[0]).length===1?this.note=e[0].text:this.note=t}static fromModel(r){const t=new o;return t.model=r,t}}o.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},x.exports=o},{"../utils/under-dash":26}],10:[function(n,x,_){const c=n("../utils/col-cache");class o{constructor(){this.decode(arguments)}setTLBR(r,t,e,l,i){if(arguments.length<4){const s=c.decodeAddress(r),f=c.decodeAddress(t);this.model={top:Math.min(s.row,f.row),left:Math.min(s.col,f.col),bottom:Math.max(s.row,f.row),right:Math.max(s.col,f.col),sheetName:e},this.setTLBR(s.row,s.col,f.row,f.col,i)}else this.model={top:Math.min(r,e),left:Math.min(t,l),bottom:Math.max(r,e),right:Math.max(t,l),sheetName:i}}decode(r){switch(r.length){case 5:this.setTLBR(r[0],r[1],r[2],r[3],r[4]);break;case 4:this.setTLBR(r[0],r[1],r[2],r[3]);break;case 3:this.setTLBR(r[0],r[1],r[2]);break;case 2:this.setTLBR(r[0],r[1]);break;case 1:{const t=r[0];if(t instanceof o)this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName};else if(t instanceof Array)this.decode(t);else if(t.top&&t.left&&t.bottom&&t.right)this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName};else{const e=c.decodeEx(t);e.top?this.model={top:e.top,left:e.left,bottom:e.bottom,right:e.right,sheetName:e.sheetName}:this.model={top:e.row,left:e.col,bottom:e.row,right:e.col,sheetName:e.sheetName}}break}case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - "+r.length)}}get top(){return this.model.top||1}set top(r){this.model.top=r}get left(){return this.model.left||1}set left(r){this.model.left=r}get bottom(){return this.model.bottom||1}set bottom(r){this.model.bottom=r}get right(){return this.model.right||1}set right(r){this.model.right=r}get sheetName(){return this.model.sheetName}set sheetName(r){this.model.sheetName=r}get _serialisedSheetName(){const{sheetName:r}=this.model;return r?/^[a-zA-Z0-9]*$/.test(r)?r+"!":`'${r}'!`:""}expand(r,t,e,l){(!this.model.top||r<this.top)&&(this.top=r),(!this.model.left||t<this.left)&&(this.left=t),(!this.model.bottom||e>this.bottom)&&(this.bottom=e),(!this.model.right||l>this.right)&&(this.right=l)}expandRow(r){if(r){const{dimensions:t,number:e}=r;t&&this.expand(e,t.min,e,t.max)}}expandToAddress(r){const t=c.decodeEx(r);this.expand(t.row,t.col,t.row,t.col)}get tl(){return c.n2l(this.left)+this.top}get $t$l(){return`$${c.n2l(this.left)}$${this.top}`}get br(){return c.n2l(this.right)+this.bottom}get $b$r(){return`$${c.n2l(this.right)}$${this.bottom}`}get range(){return`${this._serialisedSheetName+this.tl}:${this.br}`}get $range(){return`${this._serialisedSheetName+this.$t$l}:${this.$b$r}`}get shortRange(){return this.count>1?this.range:this._serialisedSheetName+this.tl}get $shortRange(){return this.count>1?this.$range:this._serialisedSheetName+this.$t$l}get count(){return(1+this.bottom-this.top)*(1+this.right-this.left)}toString(){return this.range}intersects(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&!(r.bottom<this.top)&&!(r.top>this.bottom)&&!(r.right<this.left)&&!(r.left>this.right)}contains(r){const t=c.decodeEx(r);return this.containsEx(t)}containsEx(r){return(!r.sheetName||!this.sheetName||r.sheetName===this.sheetName)&&r.row>=this.top&&r.row<=this.bottom&&r.col>=this.left&&r.col<=this.right}forEachAddress(r){for(let t=this.left;t<=this.right;t++)for(let e=this.top;e<=this.bottom;e++)r(c.encodeAddress(e,t),e,t)}}x.exports=o},{"../utils/col-cache":19}],11:[function(n,x,_){const c=n("../utils/under-dash"),o=n("./enums"),a=n("../utils/col-cache"),r=n("./cell");x.exports=class{constructor(t,e){this._worksheet=t,this._number=e,this._cells=[],this.style={},this.outlineLevel=0}get number(){return this._number}get worksheet(){return this._worksheet}commit(){this._worksheet._commitRow(this)}destroy(){delete this._worksheet,delete this._cells,delete this.style}findCell(t){return this._cells[t-1]}getCellEx(t){let e=this._cells[t.col-1];if(!e){const l=this._worksheet.getColumn(t.col);e=new r(this,l,t.address),this._cells[t.col-1]=e}return e}getCell(t){if(typeof t=="string"){const e=this._worksheet.getColumnKey(t);t=e?e.number:a.l2n(t)}return this._cells[t-1]||this.getCellEx({address:a.encodeAddress(this._number,t),row:this._number,col:t})}splice(t,e){const l=t+e;for(var i=arguments.length,s=new Array(i>2?i-2:0),f=2;f<i;f++)s[f-2]=arguments[f];const h=s.length-e,u=this._cells.length;let p,d,w;if(h<0)for(p=t+s.length;p<=u;p++)w=this._cells[p-1],d=this._cells[p-h-1],d?(w=this.getCell(p),w.value=d.value,w.style=d.style,w._comment=d._comment):w&&(w.value=null,w.style={},w._comment=void 0);else if(h>0)for(p=u;p>=l;p--)d=this._cells[p-1],d?(w=this.getCell(p+h),w.value=d.value,w.style=d.style,w._comment=d._comment):this._cells[p+h-1]=void 0;for(p=0;p<s.length;p++)w=this.getCell(t+p),w.value=s[p],w.style={},w._comment=void 0}eachCell(t,e){if(e||(e=t,t=null),t&&t.includeEmpty){const l=this._cells.length;for(let i=1;i<=l;i++)e(this.getCell(i),i)}else this._cells.forEach((l,i)=>{l&&l.type!==o.ValueType.Null&&e(l,i+1)})}addPageBreak(t,e){const l=this._worksheet,i=Math.max(0,t-1)||0,s=Math.max(0,e-1)||16838,f={id:this._number,max:s,man:1};i&&(f.min=i),l.rowBreaks.push(f)}get values(){const t=[];return this._cells.forEach(e=>{e&&e.type!==o.ValueType.Null&&(t[e.col]=e.value)}),t}set values(t){if(this._cells=[],t)if(t instanceof Array){let e=0;t.hasOwnProperty("0")&&(e=1),t.forEach((l,i)=>{l!==void 0&&(this.getCellEx({address:a.encodeAddress(this._number,i+e),row:this._number,col:i+e}).value=l)})}else this._worksheet.eachColumnKey((e,l)=>{t[l]!==void 0&&(this.getCellEx({address:a.encodeAddress(this._number,e.number),row:this._number,col:e.number}).value=t[l])})}get hasValues(){return c.some(this._cells,t=>t&&t.type!==o.ValueType.Null)}get cellCount(){return this._cells.length}get actualCellCount(){let t=0;return this.eachCell(()=>{t++}),t}get dimensions(){let t=0,e=0;return this._cells.forEach(l=>{l&&l.type!==o.ValueType.Null&&((!t||t>l.col)&&(t=l.col),e<l.col&&(e=l.col))}),t>0?{min:t,max:e}:null}_applyStyle(t,e){return this.style[t]=e,this._cells.forEach(l=>{l&&(l[t]=e)}),e}get numFmt(){return this.style.numFmt}set numFmt(t){this._applyStyle("numFmt",t)}get font(){return this.style.font}set font(t){this._applyStyle("font",t)}get alignment(){return this.style.alignment}set alignment(t){this._applyStyle("alignment",t)}get protection(){return this.style.protection}set protection(t){this._applyStyle("protection",t)}get border(){return this.style.border}set border(t){this._applyStyle("border",t)}get fill(){return this.style.fill}set fill(t){this._applyStyle("fill",t)}get hidden(){return!!this._hidden}set hidden(t){this._hidden=t}get outlineLevel(){return this._outlineLevel||0}set outlineLevel(t){this._outlineLevel=t}get collapsed(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}get model(){const t=[];let e=0,l=0;return this._cells.forEach(i=>{if(i){const s=i.model;s&&((!e||e>i.col)&&(e=i.col),l<i.col&&(l=i.col),t.push(s))}}),this.height||t.length?{cells:t,number:this.number,min:e,max:l,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null}set model(t){if(t.number!==this._number)throw new Error("Invalid row number in model");let e;this._cells=[],t.cells.forEach(l=>{switch(l.type){case r.Types.Merge:break;default:{let i;if(l.address)i=a.decodeAddress(l.address);else if(e){const{row:s}=e,f=e.col+1;i={row:s,col:f,address:a.encodeAddress(s,f),$col$row:`$${a.n2l(f)}$${s}`}}e=i,this.getCellEx(i).model=l;break}}}),t.height?this.height=t.height:delete this.height,this.hidden=t.hidden,this.outlineLevel=t.outlineLevel||0,this.style=t.style&&JSON.parse(JSON.stringify(t.style))||{}}}},{"../utils/col-cache":19,"../utils/under-dash":26,"./cell":3,"./enums":7}],12:[function(n,x,_){const c=n("../utils/col-cache");class o{constructor(r,t,e){this.table=r,this.column=t,this.index=e}_set(r,t){this.table.cacheState(),this.column[r]=t}get name(){return this.column.name}set name(r){this._set("name",r)}get filterButton(){return this.column.filterButton}set filterButton(r){this.column.filterButton=r}get style(){return this.column.style}set style(r){this.column.style=r}get totalsRowLabel(){return this.column.totalsRowLabel}set totalsRowLabel(r){this._set("totalsRowLabel",r)}get totalsRowFunction(){return this.column.totalsRowFunction}set totalsRowFunction(r){this._set("totalsRowFunction",r)}get totalsRowResult(){return this.column.totalsRowResult}set totalsRowResult(r){this._set("totalsRowResult",r)}get totalsRowFormula(){return this.column.totalsRowFormula}set totalsRowFormula(r){this._set("totalsRowFormula",r)}}x.exports=class{constructor(a,r){this.worksheet=a,r&&(this.table=r,this.validate(),this.store())}getFormula(a){switch(a.totalsRowFunction){case"none":return null;case"average":return`SUBTOTAL(101,${this.table.name}[${a.name}])`;case"countNums":return`SUBTOTAL(102,${this.table.name}[${a.name}])`;case"count":return`SUBTOTAL(103,${this.table.name}[${a.name}])`;case"max":return`SUBTOTAL(104,${this.table.name}[${a.name}])`;case"min":return`SUBTOTAL(105,${this.table.name}[${a.name}])`;case"stdDev":return`SUBTOTAL(106,${this.table.name}[${a.name}])`;case"var":return`SUBTOTAL(107,${this.table.name}[${a.name}])`;case"sum":return`SUBTOTAL(109,${this.table.name}[${a.name}])`;case"custom":return a.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: "+a.totalsRowFunction)}}get width(){return this.table.columns.length}get height(){return this.table.rows.length}get filterHeight(){return this.height+(this.table.headerRow?1:0)}get tableHeight(){return this.filterHeight+(this.table.totalsRow?1:0)}validate(){const{table:a}=this,r=(h,u,p)=>{h[u]===void 0&&(h[u]=p)};r(a,"headerRow",!0),r(a,"totalsRow",!1),r(a,"style",{}),r(a.style,"theme","TableStyleMedium2"),r(a.style,"showFirstColumn",!1),r(a.style,"showLastColumn",!1),r(a.style,"showRowStripes",!1),r(a.style,"showColumnStripes",!1);const t=(h,u)=>{if(!h)throw new Error(u)};t(a.ref,"Table must have ref"),t(a.columns,"Table must have column definitions"),t(a.rows,"Table must have row definitions"),a.tl=c.decodeAddress(a.ref);const{row:e,col:l}=a.tl;t(e>0,"Table must be on valid row"),t(l>0,"Table must be on valid col");const{width:i,filterHeight:s,tableHeight:f}=this;a.autoFilterRef=c.encode(e,l,e+s-1,l+i-1),a.tableRef=c.encode(e,l,e+f-1,l+i-1),a.columns.forEach((h,u)=>{t(h.name,`Column ${u} must have a name`),u===0?r(h,"totalsRowLabel","Total"):(r(h,"totalsRowFunction","none"),h.totalsRowFormula=this.getFormula(h))})}store(){const a=(s,f)=>{f&&Object.keys(f).forEach(h=>{s[h]=f[h]})},{worksheet:r,table:t}=this,{row:e,col:l}=t.tl;let i=0;if(t.headerRow){const s=r.getRow(e+i++);t.columns.forEach((f,h)=>{const{style:u,name:p}=f,d=s.getCell(l+h);d.value=p,a(d,u)})}if(t.rows.forEach(s=>{const f=r.getRow(e+i++);s.forEach((h,u)=>{const p=f.getCell(l+u);p.value=h,a(p,t.columns[u].style)})}),t.totalsRow){const s=r.getRow(e+i++);t.columns.forEach((f,h)=>{const u=s.getCell(l+h);if(h===0)u.value=f.totalsRowLabel;else{const p=this.getFormula(f);u.value=p?{formula:f.totalsRowFormula,result:f.totalsRowResult}:null}a(u,f.style)})}}load(a){const{table:r}=this,{row:t,col:e}=r.tl;let l=0;if(r.headerRow){const i=a.getRow(t+l++);r.columns.forEach((s,f)=>{i.getCell(e+f).value=s.name})}if(r.rows.forEach(i=>{const s=a.getRow(t+l++);i.forEach((f,h)=>{s.getCell(e+h).value=f})}),r.totalsRow){const i=a.getRow(t+l++);r.columns.forEach((s,f)=>{const h=i.getCell(e+f);f===0?h.value=s.totalsRowLabel:this.getFormula(s)&&(h.value={formula:s.totalsRowFormula,result:s.totalsRowResult})})}}get model(){return this.table}set model(a){this.table=a}cacheState(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}commit(){if(!this._cache)return;this.validate();const a=c.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(let r=0;r<this._cache.tableHeight;r++){const t=this.worksheet.getRow(a.row+r);for(let e=0;e<this._cache.width;e++)t.getCell(a.col+e).value=null}else{for(let r=this.tableHeight;r<this._cache.tableHeight;r++){const t=this.worksheet.getRow(a.row+r);for(let e=0;e<this._cache.width;e++)t.getCell(a.col+e).value=null}for(let r=0;r<this.tableHeight;r++){const t=this.worksheet.getRow(a.row+r);for(let e=this.width;e<this._cache.width;e++)t.getCell(a.col+e).value=null}}this.store()}addRow(a,r){this.cacheState(),r===void 0?this.table.rows.push(a):this.table.rows.splice(r,0,a)}removeRows(a){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.rows.splice(a,r)}getColumn(a){const r=this.table.columns[a];return new o(this,r,a)}addColumn(a,r,t){this.cacheState(),t===void 0?(this.table.columns.push(a),this.table.rows.forEach((e,l)=>{e.push(r[l])})):(this.table.columns.splice(t,0,a),this.table.rows.forEach((e,l)=>{e.splice(t,0,r[l])}))}removeColumns(a){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;this.cacheState(),this.table.columns.splice(a,r),this.table.rows.forEach(t=>{t.splice(a,r)})}_assign(a,r,t){this.cacheState(),a[r]=t}get ref(){return this.table.ref}set ref(a){this._assign(this.table,"ref",a)}get name(){return this.table.name}set name(a){this.table.name=a}get displayName(){return this.table.displyName||this.table.name}set displayNamename(a){this.table.displayName=a}get headerRow(){return this.table.headerRow}set headerRow(a){this._assign(this.table,"headerRow",a)}get totalsRow(){return this.table.totalsRow}set totalsRow(a){this._assign(this.table,"totalsRow",a)}get theme(){return this.table.style.name}set theme(a){this.table.style.name=a}get showFirstColumn(){return this.table.style.showFirstColumn}set showFirstColumn(a){this.table.style.showFirstColumn=a}get showLastColumn(){return this.table.style.showLastColumn}set showLastColumn(a){this.table.style.showLastColumn=a}get showRowStripes(){return this.table.style.showRowStripes}set showRowStripes(a){this.table.style.showRowStripes=a}get showColumnStripes(){return this.table.style.showColumnStripes}set showColumnStripes(a){this.table.style.showColumnStripes=a}}},{"../utils/col-cache":19}],13:[function(n,x,_){const c=n("./worksheet"),o=n("./defined-names"),a=n("../xlsx/xlsx"),r=n("../csv/csv");x.exports=class{constructor(){this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new o}get xlsx(){return this._xlsx||(this._xlsx=new a(this)),this._xlsx}get csv(){return this._csv||(this._csv=new r(this)),this._csv}get nextId(){for(let t=1;t<this._worksheets.length;t++)if(!this._worksheets[t])return t;return this._worksheets.length||1}addWorksheet(t,e){const l=this.nextId;e&&(typeof e=="string"?(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}}));const i=this._worksheets.reduce((h,u)=>(u&&u.orderNo)>h?u.orderNo:h,0),s=Object.assign({},e,{id:l,name:t,orderNo:i+1,workbook:this}),f=new c(s);return this._worksheets[l]=f,f}removeWorksheetEx(t){delete this._worksheets[t.id]}removeWorksheet(t){const e=this.getWorksheet(t);e&&e.destroy()}getWorksheet(t){return t===void 0?this._worksheets.find(Boolean):typeof t=="number"?this._worksheets[t]:typeof t=="string"?this._worksheets.find(e=>e&&e.name===t):void 0}get worksheets(){return this._worksheets.slice(1).sort((t,e)=>t.orderNo-e.orderNo).filter(Boolean)}eachSheet(t){this.worksheets.forEach(e=>{t(e,e.id)})}get definedNames(){return this._definedNames}clearThemes(){this._themes=void 0}addImage(t){const e=this.media.length;return this.media.push(Object.assign({},t,{type:"image"})),e}getImage(t){return this.media[t]}get model(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map(t=>t.model),sheets:this.worksheets.map(t=>t.model).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}}set model(t){this.creator=t.creator,this.lastModifiedBy=t.lastModifiedBy,this.lastPrinted=t.lastPrinted,this.created=t.created,this.modified=t.modified,this.company=t.company,this.manager=t.manager,this.title=t.title,this.subject=t.subject,this.keywords=t.keywords,this.category=t.category,this.description=t.description,this.language=t.language,this.revision=t.revision,this.contentStatus=t.contentStatus,this.properties=t.properties,this.calcProperties=t.calcProperties,this._worksheets=[],t.worksheets.forEach(e=>{const{id:l,name:i,state:s}=e,f=t.sheets&&t.sheets.findIndex(h=>h.id===l);(this._worksheets[l]=new c({id:l,name:i,orderNo:f,state:s,workbook:this})).model=e}),this._definedNames.model=t.definedNames,this.views=t.views,this._themes=t.themes,this.media=t.media||[]}}},{"../csv/csv":1,"../xlsx/xlsx":144,"./defined-names":6,"./worksheet":14}],14:[function(n,x,_){const c=n("../utils/under-dash"),o=n("../utils/col-cache"),a=n("./range"),r=n("./row"),t=n("./column"),e=n("./enums"),l=n("./image"),i=n("./table"),s=n("./data-validations"),f=n("../utils/encryptor"),{copyStyle:h}=n("../utils/copy-style");x.exports=class{constructor(u){u=u||{},this._workbook=u.workbook,this.id=u.id,this.orderNo=u.orderNo,this.name=u.name,this.state=u.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},u.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!u.pageSetup||!u.pageSetup.fitToWidth&&!u.pageSetup.fitToHeight||u.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},u.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},u.headerFooter),this.dataValidations=new s,this.views=u.views||[],this.autoFilter=u.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}get name(){return this._name}set name(u){if(u===void 0&&(u="sheet"+this.id),this._name!==u){if(typeof u!="string")throw new Error("The name has to be a string.");if(u==="")throw new Error("The name can't be empty.");if(u==="History")throw new Error('The name "History" is protected. Please use a different name.');if(/[*?:/\\[\]]/.test(u))throw new Error(`Worksheet name ${u} cannot include any of the following characters: * ? : \\ / [ ]`);if(/(^')|('$)/.test(u))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: "+u);if(u&&u.length>31&&(console.warn(`Worksheet name ${u} exceeds 31 chars. This will be truncated`),u=u.substring(0,31)),this._workbook._worksheets.find(p=>p&&p.name.toLowerCase()===u.toLowerCase()))throw new Error("Worksheet name already exists: "+u);this._name=u}}get workbook(){return this._workbook}destroy(){this._workbook.removeWorksheetEx(this)}get dimensions(){const u=new a;return this._rows.forEach(p=>{if(p){const d=p.dimensions;d&&u.expand(p.number,d.min,p.number,d.max)}}),u}get columns(){return this._columns}set columns(u){this._headerRowCount=u.reduce((w,S)=>{const A=(S.header?1:S.headers&&S.headers.length)||0;return Math.max(w,A)},0);let p=1;const d=this._columns=[];u.forEach(w=>{const S=new t(this,p++,!1);d.push(S),S.defn=w})}getColumnKey(u){return this._keys[u]}setColumnKey(u,p){this._keys[u]=p}deleteColumnKey(u){delete this._keys[u]}eachColumnKey(u){c.each(this._keys,u)}getColumn(u){if(typeof u=="string"){const p=this._keys[u];if(p)return p;u=o.l2n(u)}if(this._columns||(this._columns=[]),u>this._columns.length){let p=this._columns.length+1;for(;p<=u;)this._columns.push(new t(this,p++))}return this._columns[u-1]}spliceColumns(u,p){const d=this._rows.length;for(var w=arguments.length,S=new Array(w>2?w-2:0),A=2;A<w;A++)S[A-2]=arguments[A];if(S.length>0)for(let P=0;P<d;P++){const D=[u,p];S.forEach(B=>{D.push(B[P]||null)});const U=this.getRow(P+1);U.splice.apply(U,D)}else this._rows.forEach(P=>{P&&P.splice(u,p)});const N=S.length-p,L=u+p,I=this._columns.length;if(N<0)for(let P=u+S.length;P<=I;P++)this.getColumn(P).defn=this.getColumn(P-N).defn;else if(N>0)for(let P=I;P>=L;P--)this.getColumn(P+N).defn=this.getColumn(P).defn;for(let P=u;P<u+S.length;P++)this.getColumn(P).defn=null;this.workbook.definedNames.spliceColumns(this.name,u,p,S.length)}get lastColumn(){return this.getColumn(this.columnCount)}get columnCount(){let u=0;return this.eachRow(p=>{u=Math.max(u,p.cellCount)}),u}get actualColumnCount(){const u=[];let p=0;return this.eachRow(d=>{d.eachCell(w=>{let{col:S}=w;u[S]||(u[S]=!0,p++)})}),p}_commitRow(){}get _lastRowNumber(){const u=this._rows;let p=u.length;for(;p>0&&u[p-1]===void 0;)p--;return p}get _nextRow(){return this._lastRowNumber+1}get lastRow(){if(this._rows.length)return this._rows[this._rows.length-1]}findRow(u){return this._rows[u-1]}findRows(u,p){return this._rows.slice(u-1,u-1+p)}get rowCount(){return this._lastRowNumber}get actualRowCount(){let u=0;return this.eachRow(()=>{u++}),u}getRow(u){let p=this._rows[u-1];return p||(p=this._rows[u-1]=new r(this,u)),p}getRows(u,p){if(p<1)return;const d=[];for(let w=u;w<u+p;w++)d.push(this.getRow(w));return d}addRow(u){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const d=this._nextRow,w=this.getRow(d);return w.values=u,this._setStyleOption(d,p[0]==="i"?p:"n"),w}addRows(u){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";const d=[];return u.forEach(w=>{d.push(this.addRow(w,p))}),d}insertRow(u,p){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";return this.spliceRows(u,0,p),this._setStyleOption(u,d),this.getRow(u)}insertRows(u,p){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"n";if(this.spliceRows(u,0,...p),d!=="n")for(let w=0;w<p.length;w++)d[0]==="o"&&this.findRow(p.length+u+w)!==void 0?this._copyStyle(p.length+u+w,u+w,d[1]==="+"):d[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u+w,d[1]==="+");return this.getRows(u,p.length)}_setStyleOption(u){let p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"n";p[0]==="o"&&this.findRow(u+1)!==void 0?this._copyStyle(u+1,u,p[1]==="+"):p[0]==="i"&&this.findRow(u-1)!==void 0&&this._copyStyle(u-1,u,p[1]==="+")}_copyStyle(u,p){let d=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const w=this.getRow(u),S=this.getRow(p);S.style=h(w.style),w.eachCell({includeEmpty:d},(A,N)=>{S.getCell(N).style=h(A.style)}),S.height=w.height}duplicateRow(u,p){let d=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const w=this._rows[u-1],S=new Array(p).fill(w.values);this.spliceRows(u+1,d?0:p,...S);for(let A=0;A<p;A++){const N=this._rows[u+A];N.style=w.style,N.height=w.height,w.eachCell({includeEmpty:!0},(L,I)=>{N.getCell(I).style=L.style})}}spliceRows(u,p){const d=u+p;for(var w=arguments.length,S=new Array(w>2?w-2:0),A=2;A<w;A++)S[A-2]=arguments[A];const N=S.length,L=N-p,I=this._rows.length;let P,D;if(L<0)for(u===I&&(this._rows[I-1]=void 0),P=d;P<=I;P++)if(D=this._rows[P-1],D){const U=this.getRow(P+L);U.values=D.values,U.style=D.style,U.height=D.height,D.eachCell({includeEmpty:!0},(B,k)=>{U.getCell(k).style=B.style}),this._rows[P-1]=void 0}else this._rows[P+L-1]=void 0;else if(L>0)for(P=I;P>=d;P--)if(D=this._rows[P-1],D){const U=this.getRow(P+L);U.values=D.values,U.style=D.style,U.height=D.height,D.eachCell({includeEmpty:!0},(B,k)=>{if(U.getCell(k).style=B.style,B._value.constructor.name==="MergeValue"){const C=this.getRow(B._row._number+N).getCell(k),v=B._value._master,m=this.getRow(v._row._number+N).getCell(v._column._number);C.merge(m)}})}else this._rows[P+L-1]=void 0;for(P=0;P<N;P++){const U=this.getRow(u+P);U.style={},U.values=S[P]}this.workbook.definedNames.spliceRows(this.name,u,p,N)}eachRow(u,p){if(p||(p=u,u=void 0),u&&u.includeEmpty){const d=this._rows.length;for(let w=1;w<=d;w++)p(this.getRow(w),w)}else this._rows.forEach(d=>{d&&d.hasValues&&p(d,d.number)})}getSheetValues(){const u=[];return this._rows.forEach(p=>{p&&(u[p.number]=p.values)}),u}findCell(u,p){const d=o.getAddress(u,p),w=this._rows[d.row-1];return w?w.findCell(d.col):void 0}getCell(u,p){const d=o.getAddress(u,p);return this.getRow(d.row).getCellEx(d)}mergeCells(){for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];const w=new a(p);this._mergeCellsInternal(w)}mergeCellsWithoutStyle(){for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];const w=new a(p);this._mergeCellsInternal(w,!0)}_mergeCellsInternal(u,p){c.each(this._merges,w=>{if(w.intersects(u))throw new Error("Cannot merge already merged cells")});const d=this.getCell(u.top,u.left);for(let w=u.top;w<=u.bottom;w++)for(let S=u.left;S<=u.right;S++)(w>u.top||S>u.left)&&this.getCell(w,S).merge(d,p);this._merges[d.address]=u}_unMergeMaster(u){const p=this._merges[u.address];if(p){for(let d=p.top;d<=p.bottom;d++)for(let w=p.left;w<=p.right;w++)this.getCell(d,w).unmerge();delete this._merges[u.address]}}get hasMerges(){return c.some(this._merges,Boolean)}unMergeCells(){for(var u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];const w=new a(p);for(let S=w.top;S<=w.bottom;S++)for(let A=w.left;A<=w.right;A++){const N=this.findCell(S,A);N&&(N.type===e.ValueType.Merge?this._unMergeMaster(N.master):this._merges[N.address]&&this._unMergeMaster(N))}}fillFormula(u,p,d){let w=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"shared";const S=o.decode(u),{top:A,left:N,bottom:L,right:I}=S,P=I-N+1,D=o.encodeAddress(A,N),U=w==="shared";let B;B=typeof d=="function"?d:Array.isArray(d)?Array.isArray(d[0])?(C,v)=>d[C-A][v-N]:(C,v)=>d[(C-A)*P+(v-N)]:()=>{};let k=!0;for(let C=A;C<=L;C++)for(let v=N;v<=I;v++)k?(this.getCell(C,v).value={shareType:w,formula:p,ref:u,result:B(C,v)},k=!1):this.getCell(C,v).value=U?{sharedFormula:D,result:B(C,v)}:B(C,v)}addImage(u,p){const d={type:"image",imageId:u,range:p};this._media.push(new l(this,d))}getImages(){return this._media.filter(u=>u.type==="image")}addBackgroundImage(u){const p={type:"background",imageId:u};this._media.push(new l(this,p))}getBackgroundImageId(){const u=this._media.find(p=>p.type==="background");return u&&u.imageId}protect(u,p){return new Promise(d=>{this.sheetProtection={sheet:!0},p&&"spinCount"in p&&(p.spinCount=Number.isFinite(p.spinCount)?Math.round(Math.max(0,p.spinCount)):1e5),u&&(this.sheetProtection.algorithmName="SHA-512",this.sheetProtection.saltValue=f.randomBytes(16).toString("base64"),this.sheetProtection.spinCount=p&&"spinCount"in p?p.spinCount:1e5,this.sheetProtection.hashValue=f.convertPasswordToHash(u,"SHA512",this.sheetProtection.saltValue,this.sheetProtection.spinCount)),p&&(this.sheetProtection=Object.assign(this.sheetProtection,p),!u&&"spinCount"in p&&delete this.sheetProtection.spinCount),d()})}unprotect(){this.sheetProtection=null}addTable(u){const p=new i(this,u);return this.tables[u.name]=p,p}getTable(u){return this.tables[u]}removeTable(u){delete this.tables[u]}getTables(){return Object.values(this.tables)}addConditionalFormatting(u){this.conditionalFormattings.push(u)}removeConditionalFormatting(u){typeof u=="number"?this.conditionalFormattings.splice(u,1):this.conditionalFormattings=u instanceof Function?this.conditionalFormattings.filter(u):[]}get tabColor(){return console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor}set tabColor(u){console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"),this.properties.tabColor=u}get model(){const u={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(w=>w.model),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map(w=>w.model),conditionalFormattings:this.conditionalFormattings};u.cols=t.toModel(this.columns);const p=u.rows=[],d=u.dimensions=new a;return this._rows.forEach(w=>{const S=w&&w.model;S&&(d.expand(S.number,S.min,S.number,S.max),p.push(S))}),u.merges=[],c.each(this._merges,w=>{u.merges.push(w.range)}),u}_parseRows(u){this._rows=[],u.rows.forEach(p=>{const d=new r(this,p.number);this._rows[d.number-1]=d,d.model=p})}_parseMergeCells(u){c.each(u.mergeCells,p=>{this.mergeCellsWithoutStyle(p)})}set model(u){this.name=u.name,this._columns=t.fromModel(this,u.cols),this._parseRows(u),this._parseMergeCells(u),this.dataValidations=new s(u.dataValidations),this.properties=u.properties,this.pageSetup=u.pageSetup,this.headerFooter=u.headerFooter,this.views=u.views,this.autoFilter=u.autoFilter,this._media=u.media.map(p=>new l(this,p)),this.sheetProtection=u.sheetProtection,this.tables=u.tables.reduce((p,d)=>{const w=new i;return w.model=d,p[d.name]=w,p},{}),this.conditionalFormattings=u.conditionalFormattings}}},{"../utils/col-cache":19,"../utils/copy-style":20,"../utils/encryptor":21,"../utils/under-dash":26,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(n,x,_){n("core-js/modules/es.promise"),n("core-js/modules/es.promise.finally"),n("core-js/modules/es.object.assign"),n("core-js/modules/es.object.keys"),n("core-js/modules/es.object.values"),n("core-js/modules/es.symbol"),n("core-js/modules/es.symbol.async-iterator"),n("core-js/modules/es.array.iterator"),n("core-js/modules/es.array.includes"),n("core-js/modules/es.array.find-index"),n("core-js/modules/es.array.find"),n("core-js/modules/es.string.from-code-point"),n("core-js/modules/es.string.includes"),n("core-js/modules/es.number.is-nan"),n("regenerator-runtime/runtime");const c={Workbook:n("./doc/workbook")},o=n("./doc/enums");Object.keys(o).forEach(a=>{c[a]=o[a]}),x.exports=c},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":359,"core-js/modules/es.array.find-index":358,"core-js/modules/es.array.includes":360,"core-js/modules/es.array.iterator":361,"core-js/modules/es.number.is-nan":363,"core-js/modules/es.object.assign":364,"core-js/modules/es.object.keys":366,"core-js/modules/es.object.values":367,"core-js/modules/es.promise":372,"core-js/modules/es.promise.finally":371,"core-js/modules/es.string.from-code-point":376,"core-js/modules/es.string.includes":377,"core-js/modules/es.symbol":381,"core-js/modules/es.symbol.async-iterator":378,"regenerator-runtime/runtime":492}],16:[function(n,x,_){const c=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");_.bufferToString=function(o){return typeof o=="string"?o:c?c.decode(o):o.toString()}},{}],17:[function(n,x,_){const c=typeof TextEncoder>"u"?null:new TextEncoder("utf-8"),{Buffer:o}=n("buffer");_.stringToBuffer=function(a){return typeof a!="string"?a:c?o.from(c.encode(a).buffer):o.from(a)}},{buffer:220}],18:[function(n,x,_){const c=n("./under-dash"),o=n("./col-cache");x.exports=class{constructor(a){this.template=a,this.sheets={}}addCell(a){this.addCellEx(o.decodeEx(a))}getCell(a){return this.findCellEx(o.decodeEx(a),!0)}findCell(a){return this.findCellEx(o.decodeEx(a),!1)}findCellAt(a,r,t){const e=this.sheets[a],l=e&&e[r];return l&&l[t]}addCellEx(a){if(a.top)for(let r=a.top;r<=a.bottom;r++)for(let t=a.left;t<=a.right;t++)this.getCellAt(a.sheetName,r,t);else this.findCellEx(a,!0)}getCellEx(a){return this.findCellEx(a,!0)}findCellEx(a,r){const t=this.findSheet(a,r),e=this.findSheetRow(t,a,r);return this.findRowCell(e,a,r)}getCellAt(a,r,t){const e=this.sheets[a]||(this.sheets[a]=[]),l=e[r]||(e[r]=[]);return l[t]||(l[t]={sheetName:a,address:o.n2l(t)+r,row:r,col:t})}removeCellEx(a){const r=this.findSheet(a);if(!r)return;const t=this.findSheetRow(r,a);t&&delete t[a.col]}forEachInSheet(a,r){const t=this.sheets[a];t&&t.forEach((e,l)=>{e&&e.forEach((i,s)=>{i&&r(i,l,s)})})}forEach(a){c.each(this.sheets,(r,t)=>{this.forEachInSheet(t,a)})}map(a){const r=[];return this.forEach(t=>{r.push(a(t))}),r}findSheet(a,r){const t=a.sheetName;return this.sheets[t]?this.sheets[t]:r?this.sheets[t]=[]:void 0}findSheetRow(a,r,t){const{row:e}=r;return a&&a[e]?a[e]:t?a[e]=[]:void 0}findRowCell(a,r,t){const{col:e}=r;return a&&a[e]?a[e]:t?a[e]=this.template?Object.assign(r,JSON.parse(JSON.stringify(this.template))):r:void 0}spliceRows(a,r,t,e){const l=this.sheets[a];if(l){const i=[];for(let s=0;s<e;s++)i.push([]);l.splice(r,t,...i)}}spliceColumns(a,r,t,e){const l=this.sheets[a];if(l){const i=[];for(let s=0;s<e;s++)i.push(null);c.each(l,s=>{s.splice(r,t,...i)})}}}},{"./col-cache":19,"./under-dash":26}],19:[function(n,x,_){const c=/^[A-Z]+\d+$/,o={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:a=>a<=26?1:a<=676?2:3,_fill(a){let r,t,e,l,i,s=1;if(a>=4)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&a>=1){for(;s<=26;)r=this._dictionary[s-1],this._n2l[s]=r,this._l2n[r]=s,s++;this._l2nFill=1}if(this._l2nFill<2&&a>=2){for(s=27;s<=702;)t=s-27,e=t%26,l=Math.floor(t/26),r=this._dictionary[l]+this._dictionary[e],this._n2l[s]=r,this._l2n[r]=s,s++;this._l2nFill=2}if(this._l2nFill<3&&a>=3){for(s=703;s<=16384;)t=s-703,e=t%26,l=Math.floor(t/26)%26,i=Math.floor(t/676),r=this._dictionary[i]+this._dictionary[l]+this._dictionary[e],this._n2l[s]=r,this._l2n[r]=s,s++;this._l2nFill=3}},l2n(a){if(this._l2n[a]||this._fill(a.length),!this._l2n[a])throw new Error("Out of bounds. Invalid column letter: "+a);return this._l2n[a]},n2l(a){if(a<1||a>16384)throw new Error(a+" is out of bounds. Excel supports columns from 1 to 16384");return this._n2l[a]||this._fill(this._level(a)),this._n2l[a]},_hash:{},validateAddress(a){if(!c.test(a))throw new Error("Invalid Address: "+a);return!0},decodeAddress(a){const r=a.length<5&&this._hash[a];if(r)return r;let t=!1,e="",l=0,i=!1,s="",f=0;for(let u,p=0;p<a.length;p++)if(u=a.charCodeAt(p),!i&&u>=65&&u<=90)t=!0,e+=a[p],l=26*l+u-64;else if(u>=48&&u<=57)i=!0,s+=a[p],f=10*f+u-48;else if(i&&t&&u!==36)break;if(t){if(l>16384)throw new Error("Out of bounds. Invalid column letter: "+e)}else l=void 0;i||(f=void 0);const h={address:a=e+s,col:l,row:f,$col$row:`$${e}$${s}`};return l<=100&&f<=100&&(this._hash[a]=h,this._hash[h.$col$row]=h),h},getAddress(a,r){if(r){const t=this.n2l(r)+a;return this.decodeAddress(t)}return this.decodeAddress(a)},decode(a){const r=a.split(":");if(r.length===2){const t=this.decodeAddress(r[0]),e=this.decodeAddress(r[1]),l={top:Math.min(t.row,e.row),left:Math.min(t.col,e.col),bottom:Math.max(t.row,e.row),right:Math.max(t.col,e.col)};return l.tl=this.n2l(l.left)+l.top,l.br=this.n2l(l.right)+l.bottom,l.dimensions=`${l.tl}:${l.br}`,l}return this.decodeAddress(a)},decodeEx(a){const r=a.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/),t=r[1]||r[2],e=r[3],l=e.split(":");if(l.length>1){let s=this.decodeAddress(l[0]),f=this.decodeAddress(l[1]);const h=Math.min(s.row,f.row),u=Math.min(s.col,f.col),p=Math.max(s.row,f.row),d=Math.max(s.col,f.col);return s=this.n2l(u)+h,f=this.n2l(d)+p,{top:h,left:u,bottom:p,right:d,sheetName:t,tl:{address:s,col:u,row:h,$col$row:`$${this.n2l(u)}$${h}`,sheetName:t},br:{address:f,col:d,row:p,$col$row:`$${this.n2l(d)}$${p}`,sheetName:t},dimensions:`${s}:${f}`}}if(e.startsWith("#"))return t?{sheetName:t,error:e}:{error:e};const i=this.decodeAddress(e);return t?{sheetName:t,...i}:i},encodeAddress:(a,r)=>o.n2l(r)+a,encode(){switch(arguments.length){case 2:return o.encodeAddress(arguments[0],arguments[1]);case 4:return`${o.encodeAddress(arguments[0],arguments[1])}:${o.encodeAddress(arguments[2],arguments[3])}`;default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange(a,r){const[t,e,,l,i]=a,[s,f]=r;return s>=t&&s<=l&&f>=e&&f<=i}};x.exports=o},{}],20:[function(n,x,_){const c=(a,r)=>({...a,...r.reduce((t,e)=>(a[e]&&(t[e]={...a[e]}),t),{})}),o=function(a,r,t){let e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];a[t]&&(r[t]=c(a[t],e))};_.copyStyle=a=>{if(!a)return a;if(r=a,Object.keys(r).length===0)return{};var r;const t={...a};return o(a,t,"font",["color"]),o(a,t,"alignment"),o(a,t,"protection"),a.border&&(o(a,t,"border"),o(a.border,t.border,"top",["color"]),o(a.border,t.border,"left",["color"]),o(a.border,t.border,"bottom",["color"]),o(a.border,t.border,"right",["color"]),o(a.border,t.border,"diagonal",["color"])),a.fill&&(o(a,t,"fill",["fgColor","bgColor","center"]),a.fill.stops&&(t.fill.stops=a.fill.stops.map(e=>c(e,["color"])))),t}},{}],21:[function(n,x,_){(function(c){(function(){const o=n("crypto"),a={hash(r){const t=o.createHash(r);for(var e=arguments.length,l=new Array(e>1?e-1:0),i=1;i<e;i++)l[i-1]=arguments[i];return t.update(c.concat(l)),t.digest()},convertPasswordToHash(r,t,e,l){if(t=t.toLowerCase(),o.getHashes().indexOf(t)<0)throw new Error(`Hash algorithm '${t}' not supported!`);const i=c.from(r,"utf16le");let s=this.hash(t,c.from(e,"base64"),i);for(let f=0;f<l;f++){const h=c.alloc(4);h.writeUInt32LE(f,0),s=this.hash(t,s,h)}return s.toString("base64")},randomBytes:r=>o.randomBytes(r)};x.exports=a}).call(this)}).call(this,n("buffer").Buffer)},{buffer:220,crypto:390}],22:[function(n,x,_){const{SaxesParser:c}=n("saxes"),{PassThrough:o}=n("readable-stream"),{bufferToString:a}=n("./browser-buffer-decode");x.exports=async function*(r){r.pipe&&!r[Symbol.asyncIterator]&&(r=r.pipe(new o));const t=new c;let e;t.on("error",i=>{e=i});let l=[];t.on("opentag",i=>l.push({eventType:"opentag",value:i})),t.on("text",i=>l.push({eventType:"text",value:i})),t.on("closetag",i=>l.push({eventType:"closetag",value:i}));for await(const i of r){if(t.write(a(i)),e)throw e;yield l,l=[]}}},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],23:[function(n,x,_){const c=n("./col-cache"),o=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,a=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;x.exports={slideFormula:function(r,t,e){const l=c.decode(t),i=c.decode(e);return r.replace(o,(s,f,h,u,p)=>{if(p)return s;const d=a.exec(u);if(d){const w=d[1],S=d[2].toUpperCase(),A=d[3],N=d[4];if(S.length>3||S.length===3&&S>"XFD")return s;let L=c.l2n(S),I=parseInt(N,10);return w||(L+=i.col-l.col),A||(I+=i.row-l.row),(f||"")+(w||"")+c.n2l(L)+(A||"")+I}return s})}}},{"./col-cache":19}],24:[function(n,x,_){(function(c,o){(function(){const a=n("readable-stream"),r=n("./utils"),t=n("./string-buf");class e{constructor(u,p){this._data=u,this._encoding=p}get length(){return this.toBuffer().length}copy(u,p,d,w){return this.toBuffer().copy(u,p,d,w)}toBuffer(){return this._buffer||(this._buffer=o.from(this._data,this._encoding)),this._buffer}}class l{constructor(u){this._data=u}get length(){return this._data.length}copy(u,p,d,w){return this._data._buf.copy(u,p,d,w)}toBuffer(){return this._data.toBuffer()}}class i{constructor(u){this._data=u}get length(){return this._data.length}copy(u,p,d,w){this._data.copy(u,p,d,w)}toBuffer(){return this._data}}class s{constructor(u){this.size=u,this.buffer=o.alloc(u),this.iRead=0,this.iWrite=0}toBuffer(){if(this.iRead===0&&this.iWrite===this.size)return this.buffer;const u=o.alloc(this.iWrite-this.iRead);return this.buffer.copy(u,0,this.iRead,this.iWrite),u}get length(){return this.iWrite-this.iRead}get eod(){return this.iRead===this.iWrite}get full(){return this.iWrite===this.size}read(u){let p;return u===0?null:u===void 0||u>=this.length?(p=this.toBuffer(),this.iRead=this.iWrite,p):(p=o.alloc(u),this.buffer.copy(p,0,this.iRead,u),this.iRead+=u,p)}write(u,p,d){const w=Math.min(d,this.size-this.iWrite);return u.copy(this.buffer,this.iWrite,p,p+w),this.iWrite+=w,w}}const f=function(h){h=h||{},this.bufSize=h.bufSize||1048576,this.buffers=[],this.batch=h.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null};r.inherits(f,a.Duplex,{toBuffer(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return o.concat(this.buffers.map(h=>h.toBuffer()))}},_getWritableBuffer(){if(this.buffers.length){const u=this.buffers[this.buffers.length-1];if(!u.full)return u}const h=new s(this.bufSize);return this.buffers.push(h),h},async _pipe(h){await Promise.all(this.pipes.map((function(u){return new Promise(p=>{u.write(h.toBuffer(),()=>{p()})})})))},_writeToBuffers(h){let u=0;const p=h.length;for(;u<p;)u+=this._getWritableBuffer().write(h,u,p-u)},async write(h,u,p){let d;if(u instanceof Function&&(p=u,u="utf8"),p=p||r.nop,h instanceof t)d=new l(h);else if(h instanceof o)d=new i(h);else{if(!(typeof h=="string"||h instanceof String||h instanceof ArrayBuffer))throw new Error("Chunk must be one of type String, Buffer or StringBuf.");d=new e(h,u)}if(this.pipes.length)if(this.batch)for(this._writeToBuffers(d);!this.corked&&this.buffers.length>1;)this._pipe(this.buffers.shift());else this.corked?(this._writeToBuffers(d),c.nextTick(p)):(await this._pipe(d),p());else this.paused||this.emit("data",d.toBuffer()),this._writeToBuffers(d),this.emit("readable");return!0},cork(){this.corked=!0},_flush(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork(){this.corked=!1,this._flush()},end(h,u,p){const d=w=>{w?p(w):(this._flush(),this.pipes.forEach(S=>{S.end()}),this.emit("finish"))};h?this.write(h,u,d):d()},read(h){let u;if(h){for(u=[];h&&this.buffers.length&&!this.buffers[0].eod;){const p=this.buffers[0],d=p.read(h);h-=d.length,u.push(d),p.eod&&p.full&&this.buffers.shift()}return o.concat(u)}return u=this.buffers.map(p=>p.toBuffer()).filter(Boolean),this.buffers=[],o.concat(u)},setEncoding(h){this.encoding=h},pause(){this.paused=!0},resume(){this.paused=!1},isPaused(){return!!this.paused},pipe(h){this.pipes.push(h),!this.paused&&this.buffers.length&&this.end()},unpipe(h){this.pipes=this.pipes.filter(u=>u!==h)},unshift(){throw new Error("Not Implemented")},wrap(){throw new Error("Not Implemented")}}),x.exports=f}).call(this)}).call(this,n("_process"),n("buffer").Buffer)},{"./string-buf":25,"./utils":27,_process:467,buffer:220,"readable-stream":491}],25:[function(n,x,_){(function(c){(function(){x.exports=class{constructor(o){this._buf=c.alloc(o&&o.size||16384),this._encoding=o&&o.encoding||"utf8",this._inPos=0,this._buffer=void 0}get length(){return this._inPos}get capacity(){return this._buf.length}get buffer(){return this._buf}toBuffer(){return this._buffer||(this._buffer=c.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}reset(o){o=o||0,this._buffer=void 0,this._inPos=o}_grow(o){let a=2*this._buf.length;for(;a<o;)a*=2;const r=c.alloc(a);this._buf.copy(r,0),this._buf=r}addText(o){this._buffer=void 0;let a=this._inPos+this._buf.write(o,this._inPos,this._encoding);for(;a>=this._buf.length-4;)this._grow(this._inPos+o.length),a=this._inPos+this._buf.write(o,this._inPos,this._encoding);this._inPos=a}addStringBuf(o){o.length&&(this._buffer=void 0,this.length+o.length>this.capacity&&this._grow(this.length+o.length),o._buf.copy(this._buf,this._inPos,0,o.length),this._inPos+=o.length)}}}).call(this)}).call(this,n("buffer").Buffer)},{buffer:220}],26:[function(n,x,_){const{toString:c}=Object.prototype,o=/["&<>]/,a={each:function(r,t){r&&(Array.isArray(r)?r.forEach(t):Object.keys(r).forEach(e=>{t(r[e],e)}))},some:function(r,t){return!!r&&(Array.isArray(r)?r.some(t):Object.keys(r).some(e=>t(r[e],e)))},every:function(r,t){return!r||(Array.isArray(r)?r.every(t):Object.keys(r).every(e=>t(r[e],e)))},map:function(r,t){return r?Array.isArray(r)?r.map(t):Object.keys(r).map(e=>t(r[e],e)):[]},keyBy:(r,t)=>r.reduce((e,l)=>(e[l[t]]=l,e),{}),isEqual:function(r,t){const e=typeof r,l=typeof t,i=Array.isArray(r),s=Array.isArray(t);let f;if(e!==l)return!1;switch(typeof r){case"object":if(i||s)return!(!i||!s)&&r.length===t.length&&r.every((h,u)=>{const p=t[u];return a.isEqual(h,p)});if(r===null||t===null)return r===t;if(f=Object.keys(r),Object.keys(t).length!==f.length)return!1;for(const h of f)if(!t.hasOwnProperty(h))return!1;return a.every(r,(h,u)=>{const p=t[u];return a.isEqual(h,p)});default:return r===t}},escapeHtml(r){const t=o.exec(r);if(!t)return r;let e="",l="",i=0,s=t.index;for(;s<r.length;s++){switch(r.charAt(s)){case'"':l="&quot;";break;case"&":l="&amp;";break;case"'":l="&apos;";break;case"<":l="&lt;";break;case">":l="&gt;";break;default:continue}i!==s&&(e+=r.substring(i,s)),i=s+1,e+=l}return i!==s?e+r.substring(i,s):e},strcmp:(r,t)=>r<t?-1:r>t?1:0,isUndefined:r=>c.call(r)==="[object Undefined]",isObject:r=>c.call(r)==="[object Object]",deepMerge(){const r=arguments[0]||{},{length:t}=arguments;let e,l,i;function s(f,h){e=r[h],i=Array.isArray(f),a.isObject(f)||i?(i?(i=!1,l=e&&Array.isArray(e)?e:[]):l=e&&a.isObject(e)?e:{},r[h]=a.deepMerge(l,f)):a.isUndefined(f)||(r[h]=f)}for(let f=0;f<t;f++)a.each(arguments[f],s);return r}};x.exports=a},{}],27:[function(n,x,_){(function(c,o){(function(){const a=n("fs"),r=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,t={nop(){},promiseImmediate:e=>new Promise(l=>{c.setImmediate?o(()=>{l(e)}):setTimeout(()=>{l(e)},1)}),inherits:function(e,l,i,s){e.super_=l,s||(s=i,i=null),i&&Object.keys(i).forEach(h=>{Object.defineProperty(e,h,Object.getOwnPropertyDescriptor(i,h))});const f={constructor:{value:e,enumerable:!1,writable:!1,configurable:!0}};s&&Object.keys(s).forEach(h=>{f[h]=Object.getOwnPropertyDescriptor(s,h)}),e.prototype=Object.create(l.prototype,f)},dateToExcel:(e,l)=>25569+e.getTime()/864e5-(l?1462:0),excelToDate(e,l){const i=Math.round(24*(e-25569+(l?1462:0))*3600*1e3);return new Date(i)},parsePath(e){const l=e.lastIndexOf("/");return{path:e.substring(0,l),name:e.substring(l+1)}},getRelsPath(e){const l=t.parsePath(e);return`${l.path}/_rels/${l.name}.rels`},xmlEncode(e){const l=r.exec(e);if(!l)return e;let i="",s="",f=0,h=l.index;for(;h<e.length;h++){const u=e.charCodeAt(h);switch(u){case 34:s="&quot;";break;case 38:s="&amp;";break;case 39:s="&apos;";break;case 60:s="&lt;";break;case 62:s="&gt;";break;case 127:s="";break;default:if(u<=31&&(u<=8||u>=11&&u!==13)){s="";break}continue}f!==h&&(i+=e.substring(f,h)),f=h+1,s&&(i+=s)}return f!==h?i+e.substring(f,h):i},xmlDecode:e=>e.replace(/&([a-z]*);/g,l=>{switch(l){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return l}}),validInt(e){const l=parseInt(e,10);return Number.isNaN(l)?0:l},isDateFmt(e){return e?(e=(e=e.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)!==null:!1},fs:{exists:e=>new Promise(l=>{a.access(e,a.constants.F_OK,i=>{l(!i)})})},toIsoDateString:e=>e.toIsoString().subsstr(0,10),parseBoolean:e=>e===!0||e==="true"||e===1||e==="1"};x.exports=t}).call(this)}).call(this,typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{},n("timers").setImmediate)},{fs:216,timers:523}],28:[function(n,x,_){const c=n("./under-dash"),o=n("./utils");function a(e,l,i){e.push(` ${l}="${o.xmlEncode(i.toString())}"`)}function r(e,l){if(l){const i=[];c.each(l,(s,f)=>{s!==void 0&&a(i,f,s)}),e.push(i.join(""))}}class t{constructor(){this._xml=[],this._stack=[],this._rollbacks=[]}get tos(){return this._stack.length?this._stack[this._stack.length-1]:void 0}get cursor(){return this._xml.length}openXml(l){const i=this._xml;i.push("<?xml"),r(i,l),i.push(`?>
2
- `)}openNode(l,i){const s=this.tos,f=this._xml;s&&this.open&&f.push(">"),this._stack.push(l),f.push("<"),f.push(l),r(f,i),this.leaf=!0,this.open=!0}addAttribute(l,i){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");i!==void 0&&a(this._xml,l,i)}addAttributes(l){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");r(this._xml,l)}writeText(l){const i=this._xml;this.open&&(i.push(">"),this.open=!1),this.leaf=!1,i.push(o.xmlEncode(l.toString()))}writeXml(l){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(l)}closeNode(){const l=this._stack.pop(),i=this._xml;this.leaf?i.push("/>"):(i.push("</"),i.push(l),i.push(">")),this.open=!1,this.leaf=!1}leafNode(l,i,s){this.openNode(l,i),s!==void 0&&this.writeText(s),this.closeNode()}closeAll(){for(;this._stack.length;)this.closeNode()}addRollback(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}commit(){this._rollbacks.pop()}rollback(){const l=this._rollbacks.pop();this._xml.length>l.xml&&this._xml.splice(l.xml,this._xml.length-l.xml),this._stack.length>l.stack&&this._stack.splice(l.stack,this._stack.length-l.stack),this.leaf=l.leaf,this.open=l.open}get xml(){return this.closeAll(),this._xml.join("")}}t.StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},x.exports=t},{"./under-dash":26,"./utils":27}],29:[function(n,x,_){(function(c){(function(){const o=n("events"),a=n("jszip"),r=n("./stream-buf"),{stringToBuffer:t}=n("./browser-buffer-encode");class e extends o.EventEmitter{constructor(i){super(),this.options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},i),this.zip=new a,this.stream=new r}append(i,s){s.hasOwnProperty("base64")&&s.base64?this.zip.file(s.name,i,{base64:!0}):(c.browser&&typeof i=="string"&&(i=t(i)),this.zip.file(s.name,i))}async finalize(){const i=await this.zip.generateAsync(this.options);this.stream.end(i),this.emit("finish")}read(i){return this.stream.read(i)}setEncoding(i){return this.stream.setEncoding(i)}pause(){return this.stream.pause()}resume(){return this.stream.resume()}isPaused(){return this.stream.isPaused()}pipe(i,s){return this.stream.pipe(i,s)}unpipe(i){return this.stream.unpipe(i)}unshift(i){return this.stream.unshift(i)}wrap(i){return this.stream.wrap(i)}}x.exports={ZipWriter:e}}).call(this)}).call(this,n("_process"))},{"./browser-buffer-encode":17,"./stream-buf":24,_process:467,events:422,jszip:441}],30:[function(n,x,_){x.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],31:[function(n,x,_){x.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],32:[function(n,x,_){const c=n("../../utils/parse-sax"),o=n("../../utils/xml-stream");class a{prepare(){}render(){}parseOpen(t){}parseText(t){}parseClose(t){}reconcile(t,e){}reset(){this.model=null,this.map&&Object.values(this.map).forEach(t=>{t instanceof a?t.reset():t.xform&&t.xform.reset()})}mergeModel(t){this.model=Object.assign(this.model||{},t)}async parse(t){for await(const e of t)for(const{eventType:l,value:i}of e)if(l==="opentag")this.parseOpen(i);else if(l==="text")this.parseText(i);else if(l==="closetag"&&!this.parseClose(i.name))return this.model;return this.model}async parseStream(t){return this.parse(c(t))}get xml(){return this.toXml(this.model)}toXml(t){const e=new o;return this.render(e,t),e.xml}static toAttribute(t,e){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(t===void 0){if(l)return e}else if(l||t!==e)return t.toString()}static toStringAttribute(t,e){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(t,e,l)}static toStringValue(t,e){return t===void 0?e:t}static toBoolAttribute(t,e){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];if(t===void 0){if(l)return e}else if(l||t!==e)return t?"1":"0"}static toBoolValue(t,e){return t===void 0?e:t==="1"}static toIntAttribute(t,e){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(t,e,l)}static toIntValue(t,e){return t===void 0?e:parseInt(t,10)}static toFloatAttribute(t,e){let l=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return a.toAttribute(t,e,l)}static toFloatValue(t,e){return t===void 0?e:parseFloat(t)}}x.exports=a},{"../../utils/parse-sax":22,"../../utils/xml-stream":28}],33:[function(n,x,_){const c=n("../base-xform"),o=n("../../../utils/col-cache");function a(t){try{return o.decodeEx(t),!0}catch{return!1}}function r(t){const e=[];let l=!1,i="";return t.split(",").forEach(s=>{if(!s)return;const f=(s.match(/'/g)||[]).length;if(!f)return void(l?i+=s+",":a(s)&&e.push(s));const h=f%2==0;!l&&h&&a(s)?e.push(s):l&&!h?(l=!1,a(i+s)&&e.push(i+s),i=""):(l=!0,i+=s+",")}),e}x.exports=class extends c{render(t,e){t.openNode("definedName",{name:e.name,localSheetId:e.localSheetId}),t.writeText(e.ranges.join(",")),t.closeNode()}parseOpen(t){return t.name==="definedName"?(this._parsedName=t.attributes.name,this._parsedLocalSheetId=t.attributes.localSheetId,this._parsedText=[],!0):!1}parseText(t){this._parsedText.push(t)}parseClose(){return this.model={name:this._parsedName,ranges:r(this._parsedText.join(""))},this._parsedLocalSheetId!==void 0&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1}}},{"../../../utils/col-cache":19,"../base-xform":32}],34:[function(n,x,_){const c=n("../../../utils/utils"),o=n("../base-xform");x.exports=class extends o{render(a,r){a.leafNode("sheet",{sheetId:r.id,name:r.name,state:r.state,"r:id":r.rId})}parseOpen(a){return a.name==="sheet"&&(this.model={name:c.xmlDecode(a.attributes.name),id:parseInt(a.attributes.sheetId,10),state:a.attributes.state,rId:a.attributes["r:id"]},!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/utils":27,"../base-xform":32}],35:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{render(o,a){o.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:a.fullCalcOnLoad?1:void 0})}parseOpen(o){return o.name==="calcPr"&&(this.model={},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],36:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{render(o,a){o.leafNode("workbookPr",{date1904:a.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}parseOpen(o){return o.name==="workbookPr"&&(this.model={date1904:o.attributes.date1904==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],37:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{render(o,a){const r={xWindow:a.x||0,yWindow:a.y||0,windowWidth:a.width||12e3,windowHeight:a.height||24e3,firstSheet:a.firstSheet,activeTab:a.activeTab};a.visibility&&a.visibility!=="visible"&&(r.visibility=a.visibility),o.leafNode("workbookView",r)}parseOpen(o){if(o.name==="workbookView"){const a=this.model={},r=function(e,l,i){const s=l!==void 0?a[e]=l:i;s!==void 0&&(a[e]=s)},t=function(e,l,i){const s=l!==void 0?a[e]=parseInt(l,10):i;s!==void 0&&(a[e]=s)};return t("x",o.attributes.xWindow,0),t("y",o.attributes.yWindow,0),t("width",o.attributes.windowWidth,25e3),t("height",o.attributes.windowHeight,1e4),r("visibility",o.attributes.visibility,"visible"),t("activeTab",o.attributes.activeTab,void 0),t("firstSheet",o.attributes.firstSheet,void 0),!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],38:[function(n,x,_){const c=n("../../../utils/under-dash"),o=n("../../../utils/col-cache"),a=n("../../../utils/xml-stream"),r=n("../base-xform"),t=n("../static-xform"),e=n("../list-xform"),l=n("./defined-name-xform"),i=n("./sheet-xform"),s=n("./workbook-view-xform"),f=n("./workbook-properties-xform"),h=n("./workbook-calc-properties-xform");class u extends r{constructor(){super(),this.map={fileVersion:u.STATIC_XFORMS.fileVersion,workbookPr:new f,bookViews:new e({tag:"bookViews",count:!1,childXform:new s}),sheets:new e({tag:"sheets",count:!1,childXform:new i}),definedNames:new e({tag:"definedNames",count:!1,childXform:new l}),calcPr:new h}}prepare(d){d.sheets=d.worksheets;const w=[];let S=0;d.sheets.forEach(A=>{if(A.pageSetup&&A.pageSetup.printArea&&A.pageSetup.printArea.split("&&").forEach(N=>{const L=N.split(":"),I={name:"_xlnm.Print_Area",ranges:[`'${A.name}'!$${L[0]}:$${L[1]}`],localSheetId:S};w.push(I)}),A.pageSetup&&(A.pageSetup.printTitlesRow||A.pageSetup.printTitlesColumn)){const N=[];if(A.pageSetup.printTitlesColumn){const I=A.pageSetup.printTitlesColumn.split(":");N.push(`'${A.name}'!$${I[0]}:$${I[1]}`)}if(A.pageSetup.printTitlesRow){const I=A.pageSetup.printTitlesRow.split(":");N.push(`'${A.name}'!$${I[0]}:$${I[1]}`)}const L={name:"_xlnm.Print_Titles",ranges:N,localSheetId:S};w.push(L)}S++}),w.length&&(d.definedNames=d.definedNames.concat(w)),(d.media||[]).forEach((A,N)=>{A.name=A.type+(N+1)})}render(d,w){d.openXml(a.StdDocAttributes),d.openNode("workbook",u.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(d),this.map.workbookPr.render(d,w.properties),this.map.bookViews.render(d,w.views),this.map.sheets.render(d,w.sheets),this.map.definedNames.render(d,w.definedNames),this.map.calcPr.render(d,w.calcProperties),d.closeNode()}parseOpen(d){return this.parser?(this.parser.parseOpen(d),!0):(d.name==="workbook"||(this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d)),!0)}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){return this.parser?(this.parser.parseClose(d)||(this.parser=void 0),!0):d==="workbook"?(this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1):!0}reconcile(d){const w=(d.workbookRels||[]).reduce((I,P)=>(I[P.Id]=P,I),{}),S=[];let A,N=0;(d.sheets||[]).forEach(I=>{const P=w[I.rId];P&&(A=d.worksheetHash["xl/"+P.Target.replace(/^(\s|\/xl\/)+/,"")],A&&(A.name=I.name,A.id=I.id,A.state=I.state,S[N++]=A))});const L=[];c.each(d.definedNames,I=>{if(I.name==="_xlnm.Print_Area"){if(A=S[I.localSheetId],A){A.pageSetup||(A.pageSetup={});const P=o.decodeEx(I.ranges[0]);A.pageSetup.printArea=A.pageSetup.printArea?`${A.pageSetup.printArea}&&${P.dimensions}`:P.dimensions}}else if(I.name==="_xlnm.Print_Titles"){if(A=S[I.localSheetId],A){A.pageSetup||(A.pageSetup={});const P=I.ranges.join(","),D=/\$/g,U=/\$\d+:\$\d+/,B=P.match(U);if(B&&B.length){const v=B[0];A.pageSetup.printTitlesRow=v.replace(D,"")}const k=/\$[A-Z]+:\$[A-Z]+/,C=P.match(k);if(C&&C.length){const v=C[0];A.pageSetup.printTitlesColumn=v.replace(D,"")}}}else L.push(I)}),d.definedNames=L,d.media.forEach((I,P)=>{I.index=P})}}u.WORKBOOK_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":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},u.STATIC_XFORMS={fileVersion:new t({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},x.exports=u},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./defined-name-xform":33,"./sheet-xform":34,"./workbook-calc-properties-xform":35,"./workbook-properties-xform":36,"./workbook-view-xform":37}],39:[function(n,x,_){const c=n("../strings/rich-text-xform"),o=n("../../../utils/utils"),a=n("../base-xform"),r=x.exports=function(t){this.model=t};o.inherits(r,a,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new c),this._richTextXform},render(t,e){e=e||this.model,t.openNode("comment",{ref:e.ref,authorId:0}),t.openNode("text"),e&&e.note&&e.note.texts&&e.note.texts.forEach(l=>{this.richTextXform.render(t,l)}),t.closeNode(),t.closeNode()},parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;switch(t.name){case"comment":return this.model={type:"note",note:{texts:[]},...t.attributes},!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(t),!0;default:return!1}},parseText(t){this.parser&&this.parser.parseText(t)},parseClose(t){switch(t){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(t),!0}}})},{"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],40:[function(n,x,_){const c=n("../../../utils/xml-stream"),o=n("../../../utils/utils"),a=n("../base-xform"),r=n("./comment-xform"),t=x.exports=function(){this.map={comment:new r}};o.inherits(t,a,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render(e,l){l=l||this.model,e.openXml(c.StdDocAttributes),e.openNode("comments",t.COMMENTS_ATTRIBUTES),e.openNode("authors"),e.leafNode("author",null,"Author"),e.closeNode(),e.openNode("commentList"),l.comments.forEach(i=>{this.map.comment.render(e,i)}),e.closeNode(),e.closeNode()},parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(e),!0;default:return!1}},parseText(e){this.parser&&this.parser.parseText(e)},parseClose(e){switch(e){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}})},{"../../../utils/utils":27,"../../../utils/xml-stream":28,"../base-xform":32,"./comment-xform":39}],41:[function(n,x,_){const c=n("../../base-xform");x.exports=class extends c{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,a,r){(a===r[2]||this.tag==="x:SizeWithCells"&&a===r[1])&&o.leafNode(this.tag)}parseOpen(o){return o.name===this.tag?(this.model={},this.model[this.tag]=!0,!0):!1}parseText(){}parseClose(){return!1}}},{"../../base-xform":32}],42:[function(n,x,_){const c=n("../../base-xform");x.exports=class extends c{constructor(o){super(),this._model=o}get tag(){return this._model&&this._model.tag}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(o){return o.name===this.tag?(this.text="",!0):!1}parseText(o){this.text=o}parseClose(){return!1}}},{"../../base-xform":32}],43:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"x:Anchor"}getAnchorRect(o){const a=Math.floor(o.left),r=Math.floor(68*(o.left-a)),t=Math.floor(o.top),e=Math.floor(18*(o.top-t)),l=Math.floor(o.right),i=Math.floor(68*(o.right-l)),s=Math.floor(o.bottom);return[a,r,t,e,l,i,s,Math.floor(18*(o.bottom-s))]}getDefaultRect(o){const a=o.col,r=Math.max(o.row-2,0);return[a,6,r,14,a+2,2,r+4,16]}render(o,a){const r=a.anchor?this.getAnchorRect(a.anchor):this.getDefaultRect(a.refAddress);o.leafNode("x:Anchor",null,r.join(", "))}parseOpen(o){return o.name===this.tag?(this.text="",!0):!1}parseText(o){this.text=o}parseClose(){return!1}}},{"../base-xform":32}],44:[function(n,x,_){const c=n("../base-xform"),o=n("./vml-anchor-xform"),a=n("./style/vml-protection-xform"),r=n("./style/vml-position-xform"),t=["twoCells","oneCells","absolute"];x.exports=class extends c{constructor(){super(),this.map={"x:Anchor":new o,"x:Locked":new a({tag:"x:Locked"}),"x:LockText":new a({tag:"x:LockText"}),"x:SizeWithCells":new r({tag:"x:SizeWithCells"}),"x:MoveWithCells":new r({tag:"x:MoveWithCells"})}}get tag(){return"x:ClientData"}render(e,l){const{protection:i,editAs:s}=l.note;e.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(e,s,t),this.map["x:SizeWithCells"].render(e,s,t),this.map["x:Anchor"].render(e,l),this.map["x:Locked"].render(e,i.locked),e.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(e,i.lockText),e.leafNode("x:Row",null,l.refAddress.row-1),e.leafNode("x:Column",null,l.refAddress.col-1),e.closeNode()}parseOpen(e){return e.name===this.tag?(this.reset(),this.model={anchor:[],protection:{},editAs:""}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(this.normalizeModel(),!1):!0}normalizeModel(){const e=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model),l=Object.keys(e).length;this.model.editAs=t[l],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}}},{"../base-xform":32,"./style/vml-position-xform":41,"./style/vml-protection-xform":42,"./vml-anchor-xform":43}],45:[function(n,x,_){const c=n("../../../utils/xml-stream"),o=n("../base-xform"),a=n("./vml-shape-xform");class r extends o{constructor(){super(),this.map={"v:shape":new a}}get tag(){return"xml"}render(e,l){e.openXml(c.StdDocAttributes),e.openNode(this.tag,r.DRAWING_ATTRIBUTES),e.openNode("o:shapelayout",{"v:ext":"edit"}),e.leafNode("o:idmap",{"v:ext":"edit",data:1}),e.closeNode(),e.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),e.leafNode("v:stroke",{joinstyle:"miter"}),e.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),e.closeNode(),l.comments.forEach((i,s)=>{this.map["v:shape"].render(e,i,s)}),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?(this.reset(),this.model={comments:[]}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0):e!==this.tag}reconcile(e,l){e.anchors.forEach(i=>{i.br?this.map["xdr:twoCellAnchor"].reconcile(i,l):this.map["xdr:oneCellAnchor"].reconcile(i,l)})}}r.DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},x.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./vml-shape-xform":46}],46:[function(n,x,_){const c=n("../base-xform"),o=n("./vml-textbox-xform"),a=n("./vml-client-data-xform");class r extends c{constructor(){super(),this.map={"v:textbox":new o,"x:ClientData":new a}}get tag(){return"v:shape"}render(e,l,i){e.openNode("v:shape",r.V_SHAPE_ATTRIBUTES(l,i)),e.leafNode("v:fill",{color2:"infoBackground [80]"}),e.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),e.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(e,l),this.map["x:ClientData"].render(e,l),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?(this.reset(),this.model={margins:{insetmode:e.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1):!0}}r.V_SHAPE_ATTRIBUTES=(t,e)=>({id:"_x0000_s"+(1025+e),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":t.note.margins&&t.note.margins.insetmode}),x.exports=r},{"../base-xform":32,"./vml-client-data-xform":44,"./vml-textbox-xform":47}],47:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"v:textbox"}conversionUnit(o,a,r){return`${parseFloat(o)*a.toFixed(2)}${r}`}reverseConversionUnit(o){return(o||"").split(",").map(a=>Number(parseFloat(this.conversionUnit(parseFloat(a),.1,"")).toFixed(2)))}render(o,a){const r={style:"mso-direction-alt:auto"};if(a&&a.note){let{inset:t}=a.note&&a.note.margins;Array.isArray(t)&&(t=t.map(e=>this.conversionUnit(e,10,"mm")).join(",")),t&&(r.inset=t)}o.openNode("v:textbox",r),o.leafNode("div",{style:"text-align:left"}),o.closeNode()}parseOpen(o){return o.name===this.tag&&(this.model={inset:this.reverseConversionUnit(o.attributes.inset)}),!0}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],48:[function(n,x,_){const c=n("./base-xform");x.exports=class extends c{createNewModel(o){return{}}parseOpen(o){return this.parser=this.parser||this.map[o.name],this.parser?(this.parser.parseOpen(o),!0):o.name===this.tag&&(this.model=this.createNewModel(o),!0)}parseText(o){this.parser&&this.parser.parseText(o)}onParserClose(o,a){this.model[o]=a.model}parseClose(o){return this.parser?(this.parser.parseClose(o)||(this.onParserClose(o,this.parser),this.parser=void 0),!0):o!==this.tag}}},{"./base-xform":32}],49:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{render(o,a){o.openNode("HeadingPairs"),o.openNode("vt:vector",{size:2,baseType:"variant"}),o.openNode("vt:variant"),o.leafNode("vt:lpstr",void 0,"Worksheets"),o.closeNode(),o.openNode("vt:variant"),o.leafNode("vt:i4",void 0,a.length),o.closeNode(),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="HeadingPairs"}parseText(){}parseClose(o){return o!=="HeadingPairs"}}},{"../base-xform":32}],50:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{render(o,a){o.openNode("TitlesOfParts"),o.openNode("vt:vector",{size:a.length,baseType:"lpstr"}),a.forEach(r=>{o.leafNode("vt:lpstr",void 0,r.name)}),o.closeNode(),o.closeNode()}parseOpen(o){return o.name==="TitlesOfParts"}parseText(){}parseClose(o){return o!=="TitlesOfParts"}}},{"../base-xform":32}],51:[function(n,x,_){const c=n("../../../utils/xml-stream"),o=n("../base-xform"),a=n("../simple/string-xform"),r=n("./app-heading-pairs-xform"),t=n("./app-titles-of-parts-xform");class e extends o{constructor(){super(),this.map={Company:new a({tag:"Company"}),Manager:new a({tag:"Manager"}),HeadingPairs:new r,TitleOfParts:new t}}render(i,s){i.openXml(c.StdDocAttributes),i.openNode("Properties",e.PROPERTY_ATTRIBUTES),i.leafNode("Application",void 0,"Microsoft Excel"),i.leafNode("DocSecurity",void 0,"0"),i.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(i,s.worksheets),this.map.TitleOfParts.render(i,s.worksheets),this.map.Company.render(i,s.company||""),this.map.Manager.render(i,s.manager),i.leafNode("LinksUpToDate",void 0,"false"),i.leafNode("SharedDoc",void 0,"false"),i.leafNode("HyperlinksChanged",void 0,"false"),i.leafNode("AppVersion",void 0,"16.0300"),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name==="Properties"?!0:(this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0))}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.parser=void 0),!0):i==="Properties"?(this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model},!1):!0}}e.DateFormat=function(l){return l.toISOString().replace(/[.]\d{3,6}/,"")},e.DateAttrs={"xsi:type":"dcterms:W3CDTF"},e.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},x.exports=e},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/string-xform":119,"./app-heading-pairs-xform":49,"./app-titles-of-parts-xform":50}],52:[function(n,x,_){const c=n("../../../utils/xml-stream"),o=n("../base-xform");class a extends o{render(t,e){t.openXml(c.StdDocAttributes),t.openNode("Types",a.PROPERTY_ATTRIBUTES);const l={};(e.media||[]).forEach(i=>{if(i.type==="image"){const s=i.extension;l[s]||(l[s]=!0,t.leafNode("Default",{Extension:s,ContentType:"image/"+s}))}}),t.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),t.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),t.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),e.worksheets.forEach(i=>{const s=`/xl/worksheets/sheet${i.id}.xml`;t.leafNode("Override",{PartName:s,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})}),t.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),t.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),e.sharedStrings&&e.sharedStrings.count&&t.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),e.tables&&e.tables.forEach(i=>{t.leafNode("Override",{PartName:"/xl/tables/"+i.target,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})}),e.drawings&&e.drawings.forEach(i=>{t.leafNode("Override",{PartName:`/xl/drawings/${i.name}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})}),e.commentRefs&&(t.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),e.commentRefs.forEach(i=>{let{commentName:s}=i;t.leafNode("Override",{PartName:`/xl/${s}.xml`,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})})),t.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),t.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),t.closeNode()}parseOpen(){return!1}parseText(){}parseClose(){return!1}}a.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},x.exports=a},{"../../../utils/xml-stream":28,"../base-xform":32}],53:[function(n,x,_){const c=n("../../../utils/xml-stream"),o=n("../base-xform"),a=n("../simple/date-xform"),r=n("../simple/string-xform"),t=n("../simple/integer-xform");class e extends o{constructor(){super(),this.map={"dc:creator":new r({tag:"dc:creator"}),"dc:title":new r({tag:"dc:title"}),"dc:subject":new r({tag:"dc:subject"}),"dc:description":new r({tag:"dc:description"}),"dc:identifier":new r({tag:"dc:identifier"}),"dc:language":new r({tag:"dc:language"}),"cp:keywords":new r({tag:"cp:keywords"}),"cp:category":new r({tag:"cp:category"}),"cp:lastModifiedBy":new r({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new a({tag:"cp:lastPrinted",format:e.DateFormat}),"cp:revision":new t({tag:"cp:revision"}),"cp:version":new r({tag:"cp:version"}),"cp:contentStatus":new r({tag:"cp:contentStatus"}),"cp:contentType":new r({tag:"cp:contentType"}),"dcterms:created":new a({tag:"dcterms:created",attrs:e.DateAttrs,format:e.DateFormat}),"dcterms:modified":new a({tag:"dcterms:modified",attrs:e.DateAttrs,format:e.DateFormat})}}render(i,s){i.openXml(c.StdDocAttributes),i.openNode("cp:coreProperties",e.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(i,s.creator),this.map["dc:title"].render(i,s.title),this.map["dc:subject"].render(i,s.subject),this.map["dc:description"].render(i,s.description),this.map["dc:identifier"].render(i,s.identifier),this.map["dc:language"].render(i,s.language),this.map["cp:keywords"].render(i,s.keywords),this.map["cp:category"].render(i,s.category),this.map["cp:lastModifiedBy"].render(i,s.lastModifiedBy),this.map["cp:lastPrinted"].render(i,s.lastPrinted),this.map["cp:revision"].render(i,s.revision),this.map["cp:version"].render(i,s.version),this.map["cp:contentStatus"].render(i,s.contentStatus),this.map["cp:contentType"].render(i,s.contentType),this.map["dcterms:created"].render(i,s.created),this.map["dcterms:modified"].render(i,s.modified),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[i.name],this.parser)return this.parser.parseOpen(i),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(i))}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){if(this.parser)return this.parser.parseClose(i)||(this.parser=void 0),!0;switch(i){case"cp:coreProperties":case"coreProperties":return this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model},!1;default:throw new Error("Unexpected xml node in parseClose: "+i)}}}e.DateFormat=function(l){return l.toISOString().replace(/[.]\d{3}/,"")},e.DateAttrs={"xsi:type":"dcterms:W3CDTF"},e.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},x.exports=e},{"../../../utils/xml-stream":28,"../base-xform":32,"../simple/date-xform":117,"../simple/integer-xform":118,"../simple/string-xform":119}],54:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{render(o,a){o.leafNode("Relationship",a)}parseOpen(o){return o.name==="Relationship"?(this.model=o.attributes,!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],55:[function(n,x,_){const c=n("../../../utils/xml-stream"),o=n("../base-xform"),a=n("./relationship-xform");class r extends o{constructor(){super(),this.map={Relationship:new a}}render(e,l){l=l||this._values,e.openXml(c.StdDocAttributes),e.openNode("Relationships",r.RELATIONSHIPS_ATTRIBUTES),l.forEach(i=>{this.map.Relationship.render(e,i)}),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"Relationships":return this.model=[],!0;default:if(this.parser=this.map[e.name],this.parser)return this.parser.parseOpen(e),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(e))}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){if(this.parser)return this.parser.parseClose(e)||(this.model.push(this.parser.model),this.parser=void 0),!0;if(e==="Relationships")return!1;throw new Error("Unexpected xml node in parseClose: "+e)}}r.RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},x.exports=r},{"../../../utils/xml-stream":28,"../base-xform":32,"./relationship-xform":54}],56:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{parseOpen(o){return this.parser?(this.parser.parseOpen(o),!0):(o.name===this.tag?(this.reset(),this.model={range:{editAs:o.attributes.editAs||"oneCell"}}):(this.parser=this.map[o.name],this.parser&&this.parser.parseOpen(o)),!0)}parseText(o){this.parser&&this.parser.parseText(o)}reconcilePicture(o,a){if(o&&o.rId){const r=a.rels[o.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/);if(r){const t=r[1],e=a.mediaIndex[t];return a.media[e]}}}}},{"../base-xform":32}],57:[function(n,x,_){const c=n("../base-xform"),o=n("./blip-xform");x.exports=class extends c{constructor(){super(),this.map={"a:blip":new o}}get tag(){return"xdr:blipFill"}render(a,r){a.openNode(this.tag),this.map["a:blip"].render(a,r),a.openNode("a:stretch"),a.leafNode("a:fillRect"),a.closeNode(),a.closeNode()}parseOpen(a){return this.parser?(this.parser.parseOpen(a),!0):(a.name===this.tag?this.reset():(this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)),!0)}parseText(){}parseClose(a){return this.parser?(this.parser.parseClose(a)||(this.parser=void 0),!0):a===this.tag?(this.model=this.map["a:blip"].model,!1):!0}}},{"../base-xform":32,"./blip-xform":58}],58:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"a:blip"}render(o,a){o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":a.rId,cstate:"print"})}parseOpen(o){return o.name===this.tag&&(this.model={rId:o.attributes["r:embed"]}),!0}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],59:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"xdr:cNvPicPr"}render(o){o.openNode(this.tag),o.leafNode("a:picLocks",{noChangeAspect:"1"}),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],60:[function(n,x,_){const c=n("../base-xform"),o=n("./hlink-click-xform"),a=n("./ext-lst-xform");x.exports=class extends c{constructor(){super(),this.map={"a:hlinkClick":new o,"a:extLst":new a}}get tag(){return"xdr:cNvPr"}render(r,t){r.openNode(this.tag,{id:t.index,name:"Picture "+t.index}),this.map["a:hlinkClick"].render(r,t),this.map["a:extLst"].render(r,t),r.closeNode()}parseOpen(r){return this.parser?(this.parser.parseOpen(r),!0):(r.name===this.tag?this.reset():(this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)),!0)}parseText(){}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.parser=void 0),!0):r===this.tag?(this.model=this.map["a:hlinkClick"].model,!1):!0}}},{"../base-xform":32,"./ext-lst-xform":63,"./hlink-click-xform":65}],61:[function(n,x,_){const c=n("../base-xform"),o=n("../simple/integer-xform");x.exports=class extends c{constructor(a){super(),this.tag=a.tag,this.map={"xdr:col":new o({tag:"xdr:col",zero:!0}),"xdr:colOff":new o({tag:"xdr:colOff",zero:!0}),"xdr:row":new o({tag:"xdr:row",zero:!0}),"xdr:rowOff":new o({tag:"xdr:rowOff",zero:!0})}}render(a,r){a.openNode(this.tag),this.map["xdr:col"].render(a,r.nativeCol),this.map["xdr:colOff"].render(a,r.nativeColOff),this.map["xdr:row"].render(a,r.nativeRow),this.map["xdr:rowOff"].render(a,r.nativeRowOff),a.closeNode()}parseOpen(a){return this.parser?(this.parser.parseOpen(a),!0):(a.name===this.tag?this.reset():(this.parser=this.map[a.name],this.parser&&this.parser.parseOpen(a)),!0)}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return this.parser?(this.parser.parseClose(a)||(this.parser=void 0),!0):a===this.tag?(this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model},!1):!0}}},{"../base-xform":32,"../simple/integer-xform":118}],62:[function(n,x,_){const c=n("../../../utils/col-cache"),o=n("../../../utils/xml-stream"),a=n("../base-xform"),r=n("./two-cell-anchor-xform"),t=n("./one-cell-anchor-xform");class e extends a{constructor(){super(),this.map={"xdr:twoCellAnchor":new r,"xdr:oneCellAnchor":new t}}prepare(i){i.anchors.forEach((s,f)=>{s.anchorType=(function(h){return(typeof h.range=="string"?c.decode(h.range):h.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor"})(s),this.map[s.anchorType].prepare(s,{index:f})})}get tag(){return"xdr:wsDr"}render(i,s){i.openXml(o.StdDocAttributes),i.openNode(this.tag,e.DRAWING_ATTRIBUTES),s.anchors.forEach(f=>{this.map[f.anchorType].render(i,f)}),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):(i.name===this.tag?(this.reset(),this.model={anchors:[]}):(this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i)),!0)}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0):i!==this.tag}reconcile(i,s){i.anchors.forEach(f=>{f.br?this.map["xdr:twoCellAnchor"].reconcile(f,s):this.map["xdr:oneCellAnchor"].reconcile(f,s)})}}e.DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},x.exports=e},{"../../../utils/col-cache":19,"../../../utils/xml-stream":28,"../base-xform":32,"./one-cell-anchor-xform":67,"./two-cell-anchor-xform":70}],63:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"a:extLst"}render(o){o.openNode(this.tag),o.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),o.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),o.closeNode(),o.closeNode()}parseOpen(o){switch(o.name){case this.tag:default:return!0}}parseText(){}parseClose(o){return o!==this.tag}}},{"../base-xform":32}],64:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{constructor(o){super(),this.tag=o.tag,this.map={}}render(o,a){o.openNode(this.tag);const r=Math.floor(9525*a.width),t=Math.floor(9525*a.height);o.addAttribute("cx",r),o.addAttribute("cy",t),o.closeNode()}parseOpen(o){return o.name===this.tag&&(this.model={width:parseInt(o.attributes.cx||"0",10)/9525,height:parseInt(o.attributes.cy||"0",10)/9525},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],65:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"a:hlinkClick"}render(o,a){a.hyperlinks&&a.hyperlinks.rId&&o.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":a.hyperlinks.rId,tooltip:a.hyperlinks.tooltip})}parseOpen(o){return o.name===this.tag&&(this.model={hyperlinks:{rId:o.attributes["r:id"],tooltip:o.attributes.tooltip}}),!0}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],66:[function(n,x,_){const c=n("../base-xform"),o=n("./c-nv-pr-xform"),a=n("./c-nv-pic-pr-xform");x.exports=class extends c{constructor(){super(),this.map={"xdr:cNvPr":new o,"xdr:cNvPicPr":new a}}get tag(){return"xdr:nvPicPr"}render(r,t){r.openNode(this.tag),this.map["xdr:cNvPr"].render(r,t),this.map["xdr:cNvPicPr"].render(r,t),r.closeNode()}parseOpen(r){return this.parser?(this.parser.parseOpen(r),!0):(r.name===this.tag?this.reset():(this.parser=this.map[r.name],this.parser&&this.parser.parseOpen(r)),!0)}parseText(){}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.parser=void 0),!0):r===this.tag?(this.model=this.map["xdr:cNvPr"].model,!1):!0}}},{"../base-xform":32,"./c-nv-pic-pr-xform":59,"./c-nv-pr-xform":60}],67:[function(n,x,_){const c=n("./base-cell-anchor-xform"),o=n("../static-xform"),a=n("./cell-position-xform"),r=n("./ext-xform"),t=n("./pic-xform");x.exports=class extends c{constructor(){super(),this.map={"xdr:from":new a({tag:"xdr:from"}),"xdr:ext":new r({tag:"xdr:ext"}),"xdr:pic":new t,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:oneCellAnchor"}prepare(e,l){this.map["xdr:pic"].prepare(e.picture,l)}render(e,l){e.openNode(this.tag,{editAs:l.range.editAs||"oneCell"}),this.map["xdr:from"].render(e,l.range.tl),this.map["xdr:ext"].render(e,l.range.ext),this.map["xdr:pic"].render(e,l.picture),this.map["xdr:clientData"].render(e,{}),e.closeNode()}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e===this.tag?(this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1):!0}reconcile(e,l){e.medium=this.reconcilePicture(e.picture,l)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./ext-xform":64,"./pic-xform":68}],68:[function(n,x,_){const c=n("../base-xform"),o=n("../static-xform"),a=n("./blip-fill-xform"),r=n("./nv-pic-pr-xform"),t=n("./sp-pr");x.exports=class extends c{constructor(){super(),this.map={"xdr:nvPicPr":new r,"xdr:blipFill":new a,"xdr:spPr":new o(t)}}get tag(){return"xdr:pic"}prepare(e,l){e.index=l.index+1}render(e,l){e.openNode(this.tag),this.map["xdr:nvPicPr"].render(e,l),this.map["xdr:blipFill"].render(e,l),this.map["xdr:spPr"].render(e,l),e.closeNode()}parseOpen(e){return this.parser?(this.parser.parseOpen(e),!0):(e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0)}parseText(){}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.mergeModel(this.parser.model),this.parser=void 0),!0):e!==this.tag}}},{"../base-xform":32,"../static-xform":120,"./blip-fill-xform":57,"./nv-pic-pr-xform":66,"./sp-pr":69}],69:[function(n,x,_){x.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],70:[function(n,x,_){const c=n("./base-cell-anchor-xform"),o=n("../static-xform"),a=n("./cell-position-xform"),r=n("./pic-xform");x.exports=class extends c{constructor(){super(),this.map={"xdr:from":new a({tag:"xdr:from"}),"xdr:to":new a({tag:"xdr:to"}),"xdr:pic":new r,"xdr:clientData":new o({tag:"xdr:clientData"})}}get tag(){return"xdr:twoCellAnchor"}prepare(t,e){this.map["xdr:pic"].prepare(t.picture,e)}render(t,e){t.openNode(this.tag,{editAs:e.range.editAs||"oneCell"}),this.map["xdr:from"].render(t,e.range.tl),this.map["xdr:to"].render(t,e.range.br),this.map["xdr:pic"].render(t,e.picture),this.map["xdr:clientData"].render(t,{}),t.closeNode()}parseClose(t){return this.parser?(this.parser.parseClose(t)||(this.parser=void 0),!0):t===this.tag?(this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1):!0}reconcile(t,e){t.medium=this.reconcilePicture(t.picture,e)}}},{"../static-xform":120,"./base-cell-anchor-xform":56,"./cell-position-xform":61,"./pic-xform":68}],71:[function(n,x,_){const c=n("./base-xform");x.exports=class extends c{constructor(o){super(),this.tag=o.tag,this.always=!!o.always,this.count=o.count,this.empty=o.empty,this.$count=o.$count||"count",this.$=o.$,this.childXform=o.childXform,this.maxItems=o.maxItems}prepare(o,a){const{childXform:r}=this;o&&o.forEach((t,e)=>{a.index=e,r.prepare(t,a)})}render(o,a){if(this.always||a&&a.length){o.openNode(this.tag,this.$),this.count&&o.addAttribute(this.$count,a&&a.length||0);const{childXform:r}=this;(a||[]).forEach((t,e)=>{r.render(o,t,e)}),o.closeNode()}else this.empty&&o.leafNode(this.tag)}parseOpen(o){return this.parser?(this.parser.parseOpen(o),!0):o.name===this.tag?(this.model=[],!0):!!this.childXform.parseOpen(o)&&(this.parser=this.childXform,!0)}parseText(o){this.parser&&this.parser.parseText(o)}parseClose(o){if(this.parser){if(!this.parser.parseClose(o)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`);return!0}return!1}reconcile(o,a){if(o){const{childXform:r}=this;o.forEach(t=>{r.reconcile(t,a)})}}}},{"./base-xform":32}],72:[function(n,x,_){const c=n("../../../utils/col-cache"),o=n("../base-xform");x.exports=class extends o{get tag(){return"autoFilter"}render(a,r){if(r)if(typeof r=="string")a.leafNode("autoFilter",{ref:r});else{const t=function(i){return typeof i=="string"?i:c.getAddress(i.row,i.column).address},e=t(r.from),l=t(r.to);e&&l&&a.leafNode("autoFilter",{ref:`${e}:${l}`})}}parseOpen(a){a.name==="autoFilter"&&(this.model=a.attributes.ref)}}},{"../../../utils/col-cache":19,"../base-xform":32}],73:[function(n,x,_){const c=n("../../../utils/utils"),o=n("../base-xform"),a=n("../../../doc/range"),r=n("../../../doc/enums"),t=n("../strings/rich-text-xform");function e(l){if(l==null)return r.ValueType.Null;if(l instanceof String||typeof l=="string")return r.ValueType.String;if(typeof l=="number")return r.ValueType.Number;if(typeof l=="boolean")return r.ValueType.Boolean;if(l instanceof Date)return r.ValueType.Date;if(l.text&&l.hyperlink)return r.ValueType.Hyperlink;if(l.formula)return r.ValueType.Formula;if(l.error)return r.ValueType.Error;throw new Error("I could not understand type of value")}x.exports=class extends o{constructor(){super(),this.richTextXForm=new t}get tag(){return"c"}prepare(l,i){const s=i.styles.addStyleModel(l.style||{},(function(f){return f.type===r.ValueType.Formula?e(f.result):f.type})(l));switch(s&&(l.styleId=s),l.comment&&i.comments.push({...l.comment,ref:l.address}),l.type){case r.ValueType.String:case r.ValueType.RichText:i.sharedStrings&&(l.ssId=i.sharedStrings.add(l.value));break;case r.ValueType.Date:i.date1904&&(l.date1904=!0);break;case r.ValueType.Hyperlink:i.sharedStrings&&l.text!==void 0&&l.text!==null&&(l.ssId=i.sharedStrings.add(l.text)),i.hyperlinks.push({address:l.address,target:l.hyperlink,tooltip:l.tooltip});break;case r.ValueType.Merge:i.merges.add(l);break;case r.ValueType.Formula:if(i.date1904&&(l.date1904=!0),l.shareType==="shared"&&(l.si=i.siFormulae++),l.formula)i.formulae[l.address]=l;else if(l.sharedFormula){const f=i.formulae[l.sharedFormula];if(!f)throw new Error("Shared Formula master must exist above and or left of clone for cell "+l.address);f.si===void 0?(f.shareType="shared",f.si=i.siFormulae++,f.range=new a(f.address,l.address)):f.range&&f.range.expandToAddress(l.address),l.si=f.si}}}renderFormula(l,i){let s=null;switch(i.shareType){case"shared":s={t:"shared",ref:i.ref||i.range.range,si:i.si};break;case"array":s={t:"array",ref:i.ref};break;default:i.si!==void 0&&(s={t:"shared",si:i.si})}switch(e(i.result)){case r.ValueType.Null:l.leafNode("f",s,i.formula);break;case r.ValueType.String:l.addAttribute("t","str"),l.leafNode("f",s,i.formula),l.leafNode("v",null,i.result);break;case r.ValueType.Number:l.leafNode("f",s,i.formula),l.leafNode("v",null,i.result);break;case r.ValueType.Boolean:l.addAttribute("t","b"),l.leafNode("f",s,i.formula),l.leafNode("v",null,i.result?1:0);break;case r.ValueType.Error:l.addAttribute("t","e"),l.leafNode("f",s,i.formula),l.leafNode("v",null,i.result.error);break;case r.ValueType.Date:l.leafNode("f",s,i.formula),l.leafNode("v",null,c.dateToExcel(i.result,i.date1904));break;default:throw new Error("I could not understand type of value")}}render(l,i){if(i.type!==r.ValueType.Null||i.styleId){switch(l.openNode("c"),l.addAttribute("r",i.address),i.styleId&&l.addAttribute("s",i.styleId),i.type){case r.ValueType.Null:break;case r.ValueType.Number:l.leafNode("v",null,i.value);break;case r.ValueType.Boolean:l.addAttribute("t","b"),l.leafNode("v",null,i.value?"1":"0");break;case r.ValueType.Error:l.addAttribute("t","e"),l.leafNode("v",null,i.value.error);break;case r.ValueType.String:case r.ValueType.RichText:i.ssId!==void 0?(l.addAttribute("t","s"),l.leafNode("v",null,i.ssId)):i.value&&i.value.richText?(l.addAttribute("t","inlineStr"),l.openNode("is"),i.value.richText.forEach(s=>{this.richTextXForm.render(l,s)}),l.closeNode("is")):(l.addAttribute("t","str"),l.leafNode("v",null,i.value));break;case r.ValueType.Date:l.leafNode("v",null,c.dateToExcel(i.value,i.date1904));break;case r.ValueType.Hyperlink:i.ssId!==void 0?(l.addAttribute("t","s"),l.leafNode("v",null,i.ssId)):(l.addAttribute("t","str"),l.leafNode("v",null,i.text));break;case r.ValueType.Formula:this.renderFormula(l,i);break;case r.ValueType.Merge:}l.closeNode()}}parseOpen(l){if(this.parser)return this.parser.parseOpen(l),!0;switch(l.name){case"c":return this.model={address:l.attributes.r},this.t=l.attributes.t,l.attributes.s&&(this.model.styleId=parseInt(l.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=l.attributes.si,this.model.shareType=l.attributes.t,this.model.ref=l.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(l),!0;default:return!1}}parseText(l){if(this.parser)this.parser.parseText(l);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+l:l;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+l:l:this.model.value=this.model.value?this.model.value+l:l}}parseClose(l){switch(l){case"c":{const{model:i}=this;if(i.formula||i.shareType)i.type=r.ValueType.Formula,i.value&&(this.t==="str"?i.result=c.xmlDecode(i.value):this.t==="b"?i.result=parseInt(i.value,10)!==0:this.t==="e"?i.result={error:i.value}:i.result=parseFloat(i.value),i.value=void 0);else if(i.value!==void 0)switch(this.t){case"s":i.type=r.ValueType.String,i.value=parseInt(i.value,10);break;case"str":i.type=r.ValueType.String,i.value=c.xmlDecode(i.value);break;case"inlineStr":i.type=r.ValueType.String;break;case"b":i.type=r.ValueType.Boolean,i.value=parseInt(i.value,10)!==0;break;case"e":i.type=r.ValueType.Error,i.value={error:i.value};break;default:i.type=r.ValueType.Number,i.value=parseFloat(i.value)}else i.styleId?i.type=r.ValueType.Null:i.type=r.ValueType.Merge;return!1}case"f":case"v":case"is":return this.currentNode=void 0,!0;case"t":return this.parser?(this.parser.parseClose(l),!0):(this.currentNode=void 0,!0);case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,this.currentNode=void 0,!0;default:return!!this.parser&&(this.parser.parseClose(l),!0)}}reconcile(l,i){const s=l.styleId&&i.styles&&i.styles.getStyleModel(l.styleId);switch(s&&(l.style=s),l.styleId!==void 0&&(l.styleId=void 0),l.type){case r.ValueType.String:typeof l.value=="number"&&i.sharedStrings&&(l.value=i.sharedStrings.getString(l.value)),l.value.richText&&(l.type=r.ValueType.RichText);break;case r.ValueType.Number:s&&c.isDateFmt(s.numFmt)&&(l.type=r.ValueType.Date,l.value=c.excelToDate(l.value,i.date1904));break;case r.ValueType.Formula:l.result!==void 0&&s&&c.isDateFmt(s.numFmt)&&(l.result=c.excelToDate(l.result,i.date1904)),l.shareType==="shared"&&(l.ref?i.formulae[l.si]=l.address:(l.sharedFormula=i.formulae[l.si],delete l.shareType),delete l.si)}const f=i.hyperlinkMap[l.address];f&&(l.type===r.ValueType.Formula?(l.text=l.result,l.result=void 0):(l.text=l.value,l.value=void 0),l.type=r.ValueType.Hyperlink,l.hyperlink=f);const h=i.commentsMap&&i.commentsMap[l.address];h&&(l.comment=h)}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":27,"../base-xform":32,"../strings/rich-text-xform":122}],74:[function(n,x,_){const c=n("../../base-xform");x.exports=class extends c{get tag(){return"x14:cfIcon"}render(o,a){o.leafNode(this.tag,{iconSet:a.iconSet,iconId:a.iconId})}parseOpen(o){let{attributes:a}=o;this.model={iconSet:a.iconSet,iconId:c.toIntValue(a.iconId)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],75:[function(n,x,_){const{v4:c}=n("uuid"),o=n("../../base-xform"),a=n("../../composite-xform"),r=n("./databar-ext-xform"),t=n("./icon-set-ext-xform"),e={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};class l extends a{constructor(){super(),this.map={"x14:dataBar":this.databarXform=new r,"x14:iconSet":this.iconSetXform=new t}}get tag(){return"x14:cfRule"}static isExt(s){return s.type==="dataBar"?r.isExt(s):!(s.type!=="iconSet"||!s.custom&&!e[s.iconSet])}prepare(s){l.isExt(s)&&(s.x14Id=`{${c()}}`.toUpperCase())}render(s,f){if(l.isExt(f))switch(f.type){case"dataBar":this.renderDataBar(s,f);break;case"iconSet":this.renderIconSet(s,f)}}renderDataBar(s,f){s.openNode(this.tag,{type:"dataBar",id:f.x14Id}),this.databarXform.render(s,f),s.closeNode()}renderIconSet(s,f){s.openNode(this.tag,{type:"iconSet",priority:f.priority,id:f.x14Id||`{${c()}}`}),this.iconSetXform.render(s,f),s.closeNode()}createNewModel(s){let{attributes:f}=s;return{type:f.type,x14Id:f.id,priority:o.toIntValue(f.priority)}}onParserClose(s,f){Object.assign(this.model,f.model)}}x.exports=l},{"../../base-xform":32,"../../composite-xform":48,"./databar-ext-xform":79,"./icon-set-ext-xform":81,uuid:528}],76:[function(n,x,_){const c=n("../../composite-xform"),o=n("./f-ext-xform");x.exports=class extends c{constructor(){super(),this.map={"xm:f":this.fExtXform=new o}}get tag(){return"x14:cfvo"}render(a,r){a.openNode(this.tag,{type:r.type}),r.value!==void 0&&this.fExtXform.render(a,r.value),a.closeNode()}createNewModel(a){return{type:a.attributes.type}}onParserClose(a,r){a==="xm:f"&&(this.model.value=r.model?parseFloat(r.model):0)}}},{"../../composite-xform":48,"./f-ext-xform":80}],77:[function(n,x,_){const c=n("../../composite-xform"),o=n("./sqref-ext-xform"),a=n("./cf-rule-ext-xform");x.exports=class extends c{constructor(){super(),this.map={"xm:sqref":this.sqRef=new o,"x14:cfRule":this.cfRule=new a}}get tag(){return"x14:conditionalFormatting"}prepare(r,t){r.rules.forEach(e=>{this.cfRule.prepare(e,t)})}render(r,t){t.rules.some(a.isExt)&&(r.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),t.rules.filter(a.isExt).forEach(e=>this.cfRule.render(r,e)),this.sqRef.render(r,t.ref),r.closeNode())}createNewModel(){return{rules:[]}}onParserClose(r,t){switch(r){case"xm:sqref":this.model.ref=t.model;break;case"x14:cfRule":this.model.rules.push(t.model)}}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./sqref-ext-xform":82}],78:[function(n,x,_){const c=n("../../composite-xform"),o=n("./cf-rule-ext-xform"),a=n("./conditional-formatting-ext-xform");x.exports=class extends c{constructor(){super(),this.map={"x14:conditionalFormatting":this.cfXform=new a}}get tag(){return"x14:conditionalFormattings"}hasContent(r){return r.hasExtContent===void 0&&(r.hasExtContent=r.some(t=>t.rules.some(o.isExt))),r.hasExtContent}prepare(r,t){r.forEach(e=>{this.cfXform.prepare(e,t)})}render(r,t){this.hasContent(t)&&(r.openNode(this.tag),t.forEach(e=>this.cfXform.render(r,e)),r.closeNode())}createNewModel(){return[]}onParserClose(r,t){this.model.push(t.model)}}},{"../../composite-xform":48,"./cf-rule-ext-xform":75,"./conditional-formatting-ext-xform":77}],79:[function(n,x,_){const c=n("../../base-xform"),o=n("../../composite-xform"),a=n("../../style/color-xform"),r=n("./cfvo-ext-xform");x.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new r,"x14:borderColor":this.borderColorXform=new a("x14:borderColor"),"x14:negativeBorderColor":this.negativeBorderColorXform=new a("x14:negativeBorderColor"),"x14:negativeFillColor":this.negativeFillColorXform=new a("x14:negativeFillColor"),"x14:axisColor":this.axisColorXform=new a("x14:axisColor")}}static isExt(t){return!t.gradient}get tag(){return"x14:dataBar"}render(t,e){t.openNode(this.tag,{minLength:c.toIntAttribute(e.minLength,0,!0),maxLength:c.toIntAttribute(e.maxLength,100,!0),border:c.toBoolAttribute(e.border,!1),gradient:c.toBoolAttribute(e.gradient,!0),negativeBarColorSameAsPositive:c.toBoolAttribute(e.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:c.toBoolAttribute(e.negativeBarBorderColorSameAsPositive,!0),axisPosition:c.toAttribute(e.axisPosition,"auto"),direction:c.toAttribute(e.direction,"leftToRight")}),e.cfvo.forEach(l=>{this.cfvoXform.render(t,l)}),this.borderColorXform.render(t,e.borderColor),this.negativeBorderColorXform.render(t,e.negativeBorderColor),this.negativeFillColorXform.render(t,e.negativeFillColor),this.axisColorXform.render(t,e.axisColor),t.closeNode()}createNewModel(t){let{attributes:e}=t;return{cfvo:[],minLength:c.toIntValue(e.minLength,0),maxLength:c.toIntValue(e.maxLength,100),border:c.toBoolValue(e.border,!1),gradient:c.toBoolValue(e.gradient,!0),negativeBarColorSameAsPositive:c.toBoolValue(e.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:c.toBoolValue(e.negativeBarBorderColorSameAsPositive,!0),axisPosition:c.toStringValue(e.axisPosition,"auto"),direction:c.toStringValue(e.direction,"leftToRight")}}onParserClose(t,e){const[,l]=t.split(":");l==="cfvo"?this.model.cfvo.push(e.model):this.model[l]=e.model}}},{"../../base-xform":32,"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-ext-xform":76}],80:[function(n,x,_){const c=n("../../base-xform");x.exports=class extends c{get tag(){return"xm:f"}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],81:[function(n,x,_){const c=n("../../base-xform"),o=n("../../composite-xform"),a=n("./cfvo-ext-xform"),r=n("./cf-icon-ext-xform");x.exports=class extends o{constructor(){super(),this.map={"x14:cfvo":this.cfvoXform=new a,"x14:cfIcon":this.cfIconXform=new r}}get tag(){return"x14:iconSet"}render(t,e){t.openNode(this.tag,{iconSet:c.toStringAttribute(e.iconSet),reverse:c.toBoolAttribute(e.reverse,!1),showValue:c.toBoolAttribute(e.showValue,!0),custom:c.toBoolAttribute(e.icons,!1)}),e.cfvo.forEach(l=>{this.cfvoXform.render(t,l)}),e.icons&&e.icons.forEach((l,i)=>{l.iconId=i,this.cfIconXform.render(t,l)}),t.closeNode()}createNewModel(t){let{attributes:e}=t;return{cfvo:[],iconSet:c.toStringValue(e.iconSet,"3TrafficLights"),reverse:c.toBoolValue(e.reverse,!1),showValue:c.toBoolValue(e.showValue,!0)}}onParserClose(t,e){const[,l]=t.split(":");switch(l){case"cfvo":this.model.cfvo.push(e.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(e.model);break;default:this.model[l]=e.model}}}},{"../../base-xform":32,"../../composite-xform":48,"./cf-icon-ext-xform":74,"./cfvo-ext-xform":76}],82:[function(n,x,_){const c=n("../../base-xform");x.exports=class extends c{get tag(){return"xm:sqref"}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],83:[function(n,x,_){const c=n("../../base-xform"),o=n("../../composite-xform"),a=n("../../../../doc/range"),r=n("./databar-xform"),t=n("./ext-lst-ref-xform"),e=n("./formula-xform"),l=n("./color-scale-xform"),i=n("./icon-set-xform"),s={"3Triangles":!0,"3Stars":!0,"5Boxes":!0},f=u=>{const{type:p,operator:d}=u;switch(p){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:p};default:return{type:p,operator:d}}};class h extends o{constructor(){super(),this.map={dataBar:this.databarXform=new r,extLst:this.extLstRefXform=new t,formula:this.formulaXform=new e,colorScale:this.colorScaleXform=new l,iconSet:this.iconSetXform=new i}}get tag(){return"cfRule"}static isPrimitive(p){return p.type!=="iconSet"||!p.custom&&!s[p.iconSet]}render(p,d){switch(d.type){case"expression":this.renderExpression(p,d);break;case"cellIs":this.renderCellIs(p,d);break;case"top10":this.renderTop10(p,d);break;case"aboveAverage":this.renderAboveAverage(p,d);break;case"dataBar":this.renderDataBar(p,d);break;case"colorScale":this.renderColorScale(p,d);break;case"iconSet":this.renderIconSet(p,d);break;case"containsText":this.renderText(p,d);break;case"timePeriod":this.renderTimePeriod(p,d)}}renderExpression(p,d){p.openNode(this.tag,{type:"expression",dxfId:d.dxfId,priority:d.priority}),this.formulaXform.render(p,d.formulae[0]),p.closeNode()}renderCellIs(p,d){p.openNode(this.tag,{type:"cellIs",dxfId:d.dxfId,priority:d.priority,operator:d.operator}),d.formulae.forEach(w=>{this.formulaXform.render(p,w)}),p.closeNode()}renderTop10(p,d){p.leafNode(this.tag,{type:"top10",dxfId:d.dxfId,priority:d.priority,percent:c.toBoolAttribute(d.percent,!1),bottom:c.toBoolAttribute(d.bottom,!1),rank:c.toIntValue(d.rank,10,!0)})}renderAboveAverage(p,d){p.leafNode(this.tag,{type:"aboveAverage",dxfId:d.dxfId,priority:d.priority,aboveAverage:c.toBoolAttribute(d.aboveAverage,!0)})}renderDataBar(p,d){p.openNode(this.tag,{type:"dataBar",priority:d.priority}),this.databarXform.render(p,d),this.extLstRefXform.render(p,d),p.closeNode()}renderColorScale(p,d){p.openNode(this.tag,{type:"colorScale",priority:d.priority}),this.colorScaleXform.render(p,d),p.closeNode()}renderIconSet(p,d){h.isPrimitive(d)&&(p.openNode(this.tag,{type:"iconSet",priority:d.priority}),this.iconSetXform.render(p,d),p.closeNode())}renderText(p,d){p.openNode(this.tag,{type:d.operator,dxfId:d.dxfId,priority:d.priority,operator:c.toStringAttribute(d.operator,"containsText")});const w=(S=>{if(S.formulae&&S.formulae[0])return S.formulae[0];const A=new a(S.ref),{tl:N}=A;switch(S.operator){case"containsText":return`NOT(ISERROR(SEARCH("${S.text}",${N})))`;case"containsBlanks":return`LEN(TRIM(${N}))=0`;case"notContainsBlanks":return`LEN(TRIM(${N}))>0`;case"containsErrors":return`ISERROR(${N})`;case"notContainsErrors":return`NOT(ISERROR(${N}))`;default:return}})(d);w&&this.formulaXform.render(p,w),p.closeNode()}renderTimePeriod(p,d){p.openNode(this.tag,{type:"timePeriod",dxfId:d.dxfId,priority:d.priority,timePeriod:d.timePeriod});const w=(S=>{if(S.formulae&&S.formulae[0])return S.formulae[0];const A=new a(S.ref),{tl:N}=A;switch(S.timePeriod){case"thisWeek":return`AND(TODAY()-ROUNDDOWN(${N},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${N},0)-TODAY()<=7-WEEKDAY(TODAY()))`;case"lastWeek":return`AND(TODAY()-ROUNDDOWN(${N},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${N},0)<(WEEKDAY(TODAY())+7))`;case"nextWeek":return`AND(ROUNDDOWN(${N},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${N},0)-TODAY()<(15-WEEKDAY(TODAY())))`;case"yesterday":return`FLOOR(${N},1)=TODAY()-1`;case"today":return`FLOOR(${N},1)=TODAY()`;case"tomorrow":return`FLOOR(${N},1)=TODAY()+1`;case"last7Days":return`AND(TODAY()-FLOOR(${N},1)<=6,FLOOR(${N},1)<=TODAY())`;case"lastMonth":return`AND(MONTH(${N})=MONTH(EDATE(TODAY(),0-1)),YEAR(${N})=YEAR(EDATE(TODAY(),0-1)))`;case"thisMonth":return`AND(MONTH(${N})=MONTH(TODAY()),YEAR(${N})=YEAR(TODAY()))`;case"nextMonth":return`AND(MONTH(${N})=MONTH(EDATE(TODAY(),0+1)),YEAR(${N})=YEAR(EDATE(TODAY(),0+1)))`;default:return}})(d);w&&this.formulaXform.render(p,w),p.closeNode()}createNewModel(p){let{attributes:d}=p;return{...f(d),dxfId:c.toIntValue(d.dxfId),priority:c.toIntValue(d.priority),timePeriod:d.timePeriod,percent:c.toBoolValue(d.percent),bottom:c.toBoolValue(d.bottom),rank:c.toIntValue(d.rank),aboveAverage:c.toBoolValue(d.aboveAverage)}}onParserClose(p,d){switch(p){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,d.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(d.model)}}}x.exports=h},{"../../../../doc/range":10,"../../base-xform":32,"../../composite-xform":48,"./color-scale-xform":85,"./databar-xform":88,"./ext-lst-ref-xform":89,"./formula-xform":90,"./icon-set-xform":91}],84:[function(n,x,_){const c=n("../../base-xform");x.exports=class extends c{get tag(){return"cfvo"}render(o,a){o.leafNode(this.tag,{type:a.type,val:a.value})}parseOpen(o){this.model={type:o.attributes.type,value:c.toFloatValue(o.attributes.val)}}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],85:[function(n,x,_){const c=n("../../composite-xform"),o=n("../../style/color-xform"),a=n("./cfvo-xform");x.exports=class extends c{constructor(){super(),this.map={cfvo:this.cfvoXform=new a,color:this.colorXform=new o}}get tag(){return"colorScale"}render(r,t){r.openNode(this.tag),t.cfvo.forEach(e=>{this.cfvoXform.render(r,e)}),t.color.forEach(e=>{this.colorXform.render(r,e)}),r.closeNode()}createNewModel(r){return{cfvo:[],color:[]}}onParserClose(r,t){this.model[r].push(t.model)}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],86:[function(n,x,_){const c=n("../../composite-xform"),o=n("./cf-rule-xform");x.exports=class extends c{constructor(){super(),this.map={cfRule:new o}}get tag(){return"conditionalFormatting"}render(a,r){r.rules.some(o.isPrimitive)&&(a.openNode(this.tag,{sqref:r.ref}),r.rules.forEach(t=>{o.isPrimitive(t)&&(t.ref=r.ref,this.map.cfRule.render(a,t))}),a.closeNode())}createNewModel(a){let{attributes:r}=a;return{ref:r.sqref,rules:[]}}onParserClose(a,r){this.model.rules.push(r.model)}}},{"../../composite-xform":48,"./cf-rule-xform":83}],87:[function(n,x,_){const c=n("../../base-xform"),o=n("./conditional-formatting-xform");x.exports=class extends c{constructor(){super(),this.cfXform=new o}get tag(){return"conditionalFormatting"}reset(){this.model=[]}prepare(a,r){let t=a.reduce((e,l)=>Math.max(e,...l.rules.map(i=>i.priority||0)),1);a.forEach(e=>{e.rules.forEach(l=>{l.priority||(l.priority=t++),l.style&&(l.dxfId=r.styles.addDxfStyle(l.style))})})}render(a,r){r.forEach(t=>{this.cfXform.render(a,t)})}parseOpen(a){return this.parser?(this.parser.parseOpen(a),!0):a.name==="conditionalFormatting"?(this.parser=this.cfXform,this.parser.parseOpen(a),!0):!1}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){return!!this.parser&&(!!this.parser.parseClose(a)||(this.model.push(this.parser.model),this.parser=void 0,!1))}reconcile(a,r){a.forEach(t=>{t.rules.forEach(e=>{e.dxfId!==void 0&&(e.style=r.styles.getDxfStyle(e.dxfId),delete e.dxfId)})})}}},{"../../base-xform":32,"./conditional-formatting-xform":86}],88:[function(n,x,_){const c=n("../../composite-xform"),o=n("../../style/color-xform"),a=n("./cfvo-xform");x.exports=class extends c{constructor(){super(),this.map={cfvo:this.cfvoXform=new a,color:this.colorXform=new o}}get tag(){return"dataBar"}render(r,t){r.openNode(this.tag),t.cfvo.forEach(e=>{this.cfvoXform.render(r,e)}),this.colorXform.render(r,t.color),r.closeNode()}createNewModel(){return{cfvo:[]}}onParserClose(r,t){switch(r){case"cfvo":this.model.cfvo.push(t.model);break;case"color":this.model.color=t.model}}}},{"../../composite-xform":48,"../../style/color-xform":128,"./cfvo-xform":84}],89:[function(n,x,_){const c=n("../../base-xform"),o=n("../../composite-xform");class a extends c{get tag(){return"x14:id"}render(e,l){e.leafNode(this.tag,null,l)}parseOpen(){this.model=""}parseText(e){this.model+=e}parseClose(e){return e!==this.tag}}class r extends o{constructor(){super(),this.map={"x14:id":this.idXform=new a}}get tag(){return"ext"}render(e,l){e.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(e,l.x14Id),e.closeNode()}createNewModel(){return{}}onParserClose(e,l){this.model.x14Id=l.model}}x.exports=class extends o{constructor(){super(),this.map={ext:new r}}get tag(){return"extLst"}render(t,e){t.openNode(this.tag),this.map.ext.render(t,e),t.closeNode()}createNewModel(){return{}}onParserClose(t,e){Object.assign(this.model,e.model)}}},{"../../base-xform":32,"../../composite-xform":48}],90:[function(n,x,_){const c=n("../../base-xform");x.exports=class extends c{get tag(){return"formula"}render(o,a){o.leafNode(this.tag,null,a)}parseOpen(){this.model=""}parseText(o){this.model+=o}parseClose(o){return o!==this.tag}}},{"../../base-xform":32}],91:[function(n,x,_){const c=n("../../base-xform"),o=n("../../composite-xform"),a=n("./cfvo-xform");x.exports=class extends o{constructor(){super(),this.map={cfvo:this.cfvoXform=new a}}get tag(){return"iconSet"}render(r,t){r.openNode(this.tag,{iconSet:c.toStringAttribute(t.iconSet,"3TrafficLights"),reverse:c.toBoolAttribute(t.reverse,!1),showValue:c.toBoolAttribute(t.showValue,!0)}),t.cfvo.forEach(e=>{this.cfvoXform.render(r,e)}),r.closeNode()}createNewModel(r){let{attributes:t}=r;return{iconSet:c.toStringValue(t.iconSet,"3TrafficLights"),reverse:c.toBoolValue(t.reverse),showValue:c.toBoolValue(t.showValue),cfvo:[]}}onParserClose(r,t){this.model[r].push(t.model)}}},{"../../base-xform":32,"../../composite-xform":48,"./cfvo-xform":84}],92:[function(n,x,_){const c=n("../../../utils/utils"),o=n("../base-xform");x.exports=class extends o{get tag(){return"col"}prepare(a,r){const t=r.styles.addStyleModel(a.style||{});t&&(a.styleId=t)}render(a,r){a.openNode("col"),a.addAttribute("min",r.min),a.addAttribute("max",r.max),r.width&&a.addAttribute("width",r.width),r.styleId&&a.addAttribute("style",r.styleId),r.hidden&&a.addAttribute("hidden","1"),r.bestFit&&a.addAttribute("bestFit","1"),r.outlineLevel&&a.addAttribute("outlineLevel",r.outlineLevel),r.collapsed&&a.addAttribute("collapsed","1"),a.addAttribute("customWidth","1"),a.closeNode()}parseOpen(a){if(a.name==="col"){const r=this.model={min:parseInt(a.attributes.min||"0",10),max:parseInt(a.attributes.max||"0",10),width:a.attributes.width===void 0?void 0:parseFloat(a.attributes.width||"0")};return a.attributes.style&&(r.styleId=parseInt(a.attributes.style,10)),c.parseBoolean(a.attributes.hidden)&&(r.hidden=!0),c.parseBoolean(a.attributes.bestFit)&&(r.bestFit=!0),a.attributes.outlineLevel&&(r.outlineLevel=parseInt(a.attributes.outlineLevel,10)),c.parseBoolean(a.attributes.collapsed)&&(r.collapsed=!0),!0}return!1}parseText(){}parseClose(){return!1}reconcile(a,r){a.styleId&&(a.style=r.styles.getStyleModel(a.styleId))}}},{"../../../utils/utils":27,"../base-xform":32}],93:[function(n,x,_){const c=n("../../../utils/under-dash"),o=n("../../../utils/utils"),a=n("../../../utils/col-cache"),r=n("../base-xform"),t=n("../../../doc/range");function e(i,s,f,h){const u=s[f];u!==void 0?i[f]=u:h!==void 0&&(i[f]=h)}function l(i,s,f,h){const u=s[f];u!==void 0&&(i[f]=o.parseBoolean(u))}x.exports=class extends r{get tag(){return"dataValidations"}render(i,s){const f=(function(h){const u=c.map(h,(w,S)=>({address:S,dataValidation:w,marked:!1})).sort((w,S)=>c.strcmp(w.address,S.address)),p=c.keyBy(u,"address"),d=(w,S,A)=>{for(let N=0;N<S;N++){const L=a.encodeAddress(w.row+N,A);if(!h[L]||!c.isEqual(h[w.address],h[L]))return!1}return!0};return u.map(w=>{if(!w.marked){const S=a.decodeEx(w.address);if(S.dimensions)return p[S.dimensions].marked=!0,{...w.dataValidation,sqref:w.address};let A=1,N=a.encodeAddress(S.row+A,S.col);for(;h[N]&&c.isEqual(w.dataValidation,h[N]);)A++,N=a.encodeAddress(S.row+A,S.col);let L=1;for(;d(S,A,S.col+L);)L++;for(let I=0;I<A;I++)for(let P=0;P<L;P++)N=a.encodeAddress(S.row+I,S.col+P),p[N].marked=!0;if(A>1||L>1){const I=S.row+(A-1),P=S.col+(L-1);return{...w.dataValidation,sqref:`${w.address}:${a.encodeAddress(I,P)}`}}return{...w.dataValidation,sqref:w.address}}return null}).filter(Boolean)})(s);f.length&&(i.openNode("dataValidations",{count:f.length}),f.forEach(h=>{i.openNode("dataValidation"),h.type!=="any"&&(i.addAttribute("type",h.type),h.operator&&h.type!=="list"&&h.operator!=="between"&&i.addAttribute("operator",h.operator),h.allowBlank&&i.addAttribute("allowBlank","1")),h.showInputMessage&&i.addAttribute("showInputMessage","1"),h.promptTitle&&i.addAttribute("promptTitle",h.promptTitle),h.prompt&&i.addAttribute("prompt",h.prompt),h.showErrorMessage&&i.addAttribute("showErrorMessage","1"),h.errorStyle&&i.addAttribute("errorStyle",h.errorStyle),h.errorTitle&&i.addAttribute("errorTitle",h.errorTitle),h.error&&i.addAttribute("error",h.error),i.addAttribute("sqref",h.sqref),(h.formulae||[]).forEach((u,p)=>{i.openNode("formula"+(p+1)),h.type==="date"?i.writeText(o.dateToExcel(new Date(u))):i.writeText(u),i.closeNode()}),i.closeNode()}),i.closeNode())}parseOpen(i){switch(i.name){case"dataValidations":return this.model={},!0;case"dataValidation":{this._address=i.attributes.sqref;const s={type:i.attributes.type||"any",formulae:[]};switch(i.attributes.type&&l(s,i.attributes,"allowBlank"),l(s,i.attributes,"showInputMessage"),l(s,i.attributes,"showErrorMessage"),s.type){case"any":case"list":case"custom":break;default:e(s,i.attributes,"operator","between")}return e(s,i.attributes,"promptTitle"),e(s,i.attributes,"prompt"),e(s,i.attributes,"errorStyle"),e(s,i.attributes,"errorTitle"),e(s,i.attributes,"error"),this._dataValidation=s,!0}case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}parseText(i){this._formula&&this._formula.push(i)}parseClose(i){switch(i){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(s=>{s.includes(":")?new t(s).forEachAddress(f=>{this.model[f]=this._dataValidation}):this.model[s]=this._dataValidation}),!0;case"formula1":case"formula2":{let s=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":s=parseInt(s,10);break;case"decimal":s=parseFloat(s);break;case"date":s=o.excelToDate(parseFloat(s))}return this._dataValidation.formulae.push(s),this._formula=void 0,!0}default:return!0}}}},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/utils":27,"../base-xform":32}],94:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"dimension"}render(o,a){a&&o.leafNode("dimension",{ref:a})}parseOpen(o){return o.name==="dimension"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],95:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"drawing"}render(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}parseOpen(o){return o.name===this.tag?(this.model={rId:o.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],96:[function(n,x,_){const c=n("../composite-xform"),o=n("./cf-ext/conditional-formattings-ext-xform");class a extends c{constructor(){super(),this.map={"x14:conditionalFormattings":this.conditionalFormattings=new o}}get tag(){return"ext"}hasContent(t){return this.conditionalFormattings.hasContent(t.conditionalFormattings)}prepare(t,e){this.conditionalFormattings.prepare(t.conditionalFormattings,e)}render(t,e){t.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(t,e.conditionalFormattings),t.closeNode()}createNewModel(){return{}}onParserClose(t,e){this.model[t]=e.model}}x.exports=class extends c{constructor(){super(),this.map={ext:this.ext=new a}}get tag(){return"extLst"}prepare(r,t){this.ext.prepare(r,t)}hasContent(r){return this.ext.hasContent(r)}render(r,t){this.hasContent(t)&&(r.openNode("extLst"),this.ext.render(r,t),r.closeNode())}createNewModel(){return{}}onParserClose(r,t){Object.assign(this.model,t.model)}}},{"../composite-xform":48,"./cf-ext/conditional-formattings-ext-xform":78}],97:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"headerFooter"}render(o,a){if(a){o.addRollback();let r=!1;o.openNode("headerFooter"),a.differentFirst&&(o.addAttribute("differentFirst","1"),r=!0),a.differentOddEven&&(o.addAttribute("differentOddEven","1"),r=!0),a.oddHeader&&typeof a.oddHeader=="string"&&(o.leafNode("oddHeader",null,a.oddHeader),r=!0),a.oddFooter&&typeof a.oddFooter=="string"&&(o.leafNode("oddFooter",null,a.oddFooter),r=!0),a.evenHeader&&typeof a.evenHeader=="string"&&(o.leafNode("evenHeader",null,a.evenHeader),r=!0),a.evenFooter&&typeof a.evenFooter=="string"&&(o.leafNode("evenFooter",null,a.evenFooter),r=!0),a.firstHeader&&typeof a.firstHeader=="string"&&(o.leafNode("firstHeader",null,a.firstHeader),r=!0),a.firstFooter&&typeof a.firstFooter=="string"&&(o.leafNode("firstFooter",null,a.firstFooter),r=!0),r?(o.closeNode(),o.commit()):o.rollback()}}parseOpen(o){switch(o.name){case"headerFooter":return this.model={},o.attributes.differentFirst&&(this.model.differentFirst=parseInt(o.attributes.differentFirst,0)===1),o.attributes.differentOddEven&&(this.model.differentOddEven=parseInt(o.attributes.differentOddEven,0)===1),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}parseText(o){switch(this.currentNode){case"oddHeader":this.model.oddHeader=o;break;case"oddFooter":this.model.oddFooter=o;break;case"evenHeader":this.model.evenHeader=o;break;case"evenFooter":this.model.evenFooter=o;break;case"firstHeader":this.model.firstHeader=o;break;case"firstFooter":this.model.firstFooter=o}}parseClose(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return this.currentNode=void 0,!0;default:return!1}}}},{"../base-xform":32}],98:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"hyperlink"}render(o,a){this.isInternalLink(a)?o.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip,location:a.target}):o.leafNode("hyperlink",{ref:a.address,"r:id":a.rId,tooltip:a.tooltip})}parseOpen(o){return o.name==="hyperlink"&&(this.model={address:o.attributes.ref,rId:o.attributes["r:id"],tooltip:o.attributes.tooltip},o.attributes.location&&(this.model.target=o.attributes.location),!0)}parseText(){}parseClose(){return!1}isInternalLink(o){return o.target&&/^[^!]+![a-zA-Z]+[\d]+$/.test(o.target)}}},{"../base-xform":32}],99:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"mergeCell"}render(o,a){o.leafNode("mergeCell",{ref:a})}parseOpen(o){return o.name==="mergeCell"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],100:[function(n,x,_){const c=n("../../../utils/under-dash"),o=n("../../../doc/range"),a=n("../../../utils/col-cache"),r=n("../../../doc/enums");x.exports=class{constructor(){this.merges={}}add(t){if(this.merges[t.master])this.merges[t.master].expandToAddress(t.address);else{const e=`${t.master}:${t.address}`;this.merges[t.master]=new o(e)}}get mergeCells(){return c.map(this.merges,t=>t.range)}reconcile(t,e){c.each(t,l=>{const i=a.decode(l);for(let s=i.top;s<=i.bottom;s++){const f=e[s-1];for(let h=i.left;h<=i.right;h++){const u=f.cells[h-1];u?u.type===r.ValueType.Merge&&(u.master=i.tl):f.cells[h]={type:r.ValueType.Null,address:a.encodeAddress(s,h)}}}})}getMasterAddress(t){const e=this.hash[t];return e&&e.tl}}},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":26}],101:[function(n,x,_){const c=n("../base-xform"),o=a=>a!==void 0;x.exports=class extends c{get tag(){return"outlinePr"}render(a,r){return!(!r||!o(r.summaryBelow)&&!o(r.summaryRight))&&(a.leafNode(this.tag,{summaryBelow:o(r.summaryBelow)?Number(r.summaryBelow):void 0,summaryRight:o(r.summaryRight)?Number(r.summaryRight):void 0}),!0)}parseOpen(a){return a.name===this.tag&&(this.model={summaryBelow:o(a.attributes.summaryBelow)?!!Number(a.attributes.summaryBelow):void 0,summaryRight:o(a.attributes.summaryRight)?!!Number(a.attributes.summaryRight):void 0},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],102:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"brk"}render(o,a){o.leafNode("brk",a)}parseOpen(o){return o.name==="brk"&&(this.model=o.attributes.ref,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],103:[function(n,x,_){const c=n("../../../utils/under-dash"),o=n("../base-xform");x.exports=class extends o{get tag(){return"pageMargins"}render(a,r){if(r){const t={left:r.left,right:r.right,top:r.top,bottom:r.bottom,header:r.header,footer:r.footer};c.some(t,e=>e!==void 0)&&a.leafNode(this.tag,t)}}parseOpen(a){return a.name===this.tag?(this.model={left:parseFloat(a.attributes.left||.7),right:parseFloat(a.attributes.right||.7),top:parseFloat(a.attributes.top||.75),bottom:parseFloat(a.attributes.bottom||.75),header:parseFloat(a.attributes.header||.3),footer:parseFloat(a.attributes.footer||.3)},!0):!1}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],104:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"pageSetUpPr"}render(o,a){return!(!a||!a.fitToPage)&&(o.leafNode(this.tag,{fitToPage:a.fitToPage?"1":void 0}),!0)}parseOpen(o){return o.name===this.tag&&(this.model={fitToPage:o.attributes.fitToPage==="1"},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],105:[function(n,x,_){const c=n("../../../utils/under-dash"),o=n("../base-xform");function a(l){return l?"1":void 0}function r(l){if(l==="overThenDown")return l}function t(l){switch(l){case"atEnd":case"asDisplyed":return l;default:return}}function e(l){switch(l){case"dash":case"blank":case"NA":return l;default:return}}x.exports=class extends o{get tag(){return"pageSetup"}render(l,i){if(i){const s={paperSize:i.paperSize,orientation:i.orientation,horizontalDpi:i.horizontalDpi,verticalDpi:i.verticalDpi,pageOrder:r(i.pageOrder),blackAndWhite:a(i.blackAndWhite),draft:a(i.draft),cellComments:t(i.cellComments),errors:e(i.errors),scale:i.scale,fitToWidth:i.fitToWidth,fitToHeight:i.fitToHeight,firstPageNumber:i.firstPageNumber,useFirstPageNumber:a(i.firstPageNumber),usePrinterDefaults:a(i.usePrinterDefaults),copies:i.copies};c.some(s,f=>f!==void 0)&&l.leafNode(this.tag,s)}}parseOpen(l){if(l.name===this.tag)return this.model={paperSize:(i=l.attributes.paperSize,i!==void 0?parseInt(i,10):void 0),orientation:l.attributes.orientation||"portrait",horizontalDpi:parseInt(l.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(l.attributes.verticalDpi||"4294967295",10),pageOrder:l.attributes.pageOrder||"downThenOver",blackAndWhite:l.attributes.blackAndWhite==="1",draft:l.attributes.draft==="1",cellComments:l.attributes.cellComments||"None",errors:l.attributes.errors||"displayed",scale:parseInt(l.attributes.scale||"100",10),fitToWidth:parseInt(l.attributes.fitToWidth||"1",10),fitToHeight:parseInt(l.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(l.attributes.firstPageNumber||"1",10),useFirstPageNumber:l.attributes.useFirstPageNumber==="1",usePrinterDefaults:l.attributes.usePrinterDefaults==="1",copies:parseInt(l.attributes.copies||"1",10)},!0;return!1;var i}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],106:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"picture"}render(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}parseOpen(o){return o.name===this.tag?(this.model={rId:o.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],107:[function(n,x,_){const c=n("../../../utils/under-dash"),o=n("../base-xform");function a(r){return r?"1":void 0}x.exports=class extends o{get tag(){return"printOptions"}render(r,t){if(t){const e={headings:a(t.showRowColHeaders),gridLines:a(t.showGridLines),horizontalCentered:a(t.horizontalCentered),verticalCentered:a(t.verticalCentered)};c.some(e,l=>l!==void 0)&&r.leafNode(this.tag,e)}}parseOpen(r){return r.name===this.tag?(this.model={showRowColHeaders:r.attributes.headings==="1",showGridLines:r.attributes.gridLines==="1",horizontalCentered:r.attributes.horizontalCentered==="1",verticalCentered:r.attributes.verticalCentered==="1"},!0):!1}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],108:[function(n,x,_){const c=n("./page-breaks-xform"),o=n("../list-xform");x.exports=class extends o{constructor(){super({tag:"rowBreaks",count:!0,childXform:new c})}render(a,r){if(r&&r.length){a.openNode(this.tag,this.$),this.count&&(a.addAttribute(this.$count,r.length),a.addAttribute("manualBreakCount",r.length));const{childXform:t}=this;r.forEach(e=>{t.render(a,e)}),a.closeNode()}else this.empty&&a.leafNode(this.tag)}}},{"../list-xform":71,"./page-breaks-xform":102}],109:[function(n,x,_){const c=n("../base-xform"),o=n("../../../utils/utils"),a=n("./cell-xform");x.exports=class extends c{constructor(r){super(),this.maxItems=r&&r.maxItems,this.map={c:new a}}get tag(){return"row"}prepare(r,t){const e=t.styles.addStyleModel(r.style);e&&(r.styleId=e);const l=this.map.c;r.cells.forEach(i=>{l.prepare(i,t)})}render(r,t,e){r.openNode("row"),r.addAttribute("r",t.number),t.height&&(r.addAttribute("ht",t.height),r.addAttribute("customHeight","1")),t.hidden&&r.addAttribute("hidden","1"),t.min>0&&t.max>0&&t.min<=t.max&&r.addAttribute("spans",`${t.min}:${t.max}`),t.styleId&&(r.addAttribute("s",t.styleId),r.addAttribute("customFormat","1")),r.addAttribute("x14ac:dyDescent","0.25"),t.outlineLevel&&r.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&r.addAttribute("collapsed","1");const l=this.map.c;t.cells.forEach(i=>{l.render(r,i,e)}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;if(r.name==="row"){this.numRowsSeen+=1;const t=r.attributes.spans?r.attributes.spans.split(":").map(l=>parseInt(l,10)):[void 0,void 0],e=this.model={number:parseInt(r.attributes.r,10),min:t[0],max:t[1],cells:[]};return r.attributes.s&&(e.styleId=parseInt(r.attributes.s,10)),o.parseBoolean(r.attributes.hidden)&&(e.hidden=!0),o.parseBoolean(r.attributes.bestFit)&&(e.bestFit=!0),r.attributes.ht&&(e.height=parseFloat(r.attributes.ht)),r.attributes.outlineLevel&&(e.outlineLevel=parseInt(r.attributes.outlineLevel,10)),o.parseBoolean(r.attributes.collapsed)&&(e.collapsed=!0),!0}return this.parser=this.map[r.name],!!this.parser&&(this.parser.parseOpen(r),!0)}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error(`Max column count (${this.maxItems}) exceeded`);this.parser=void 0}return!0}return!1}reconcile(r,t){r.style=r.styleId?t.styles.getStyleModel(r.styleId):{},r.styleId!==void 0&&(r.styleId=void 0);const e=this.map.c;r.cells.forEach(l=>{e.reconcile(l,t)})}}},{"../../../utils/utils":27,"../base-xform":32,"./cell-xform":73}],110:[function(n,x,_){const c=n("../../../utils/under-dash"),o=n("../base-xform");x.exports=class extends o{get tag(){return"sheetFormatPr"}render(a,r){if(r){const t={defaultRowHeight:r.defaultRowHeight,outlineLevelRow:r.outlineLevelRow,outlineLevelCol:r.outlineLevelCol,"x14ac:dyDescent":r.dyDescent};r.defaultColWidth&&(t.defaultColWidth=r.defaultColWidth),r.defaultRowHeight&&r.defaultRowHeight===15||(t.customHeight="1"),c.some(t,e=>e!==void 0)&&a.leafNode("sheetFormatPr",t)}}parseOpen(a){return a.name==="sheetFormatPr"&&(this.model={defaultRowHeight:parseFloat(a.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(a.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(a.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(a.attributes.outlineLevelCol||"0",10)},a.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(a.attributes.defaultColWidth)),!0)}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],111:[function(n,x,_){const c=n("../base-xform"),o=n("../style/color-xform"),a=n("./page-setup-properties-xform"),r=n("./outline-properties-xform");x.exports=class extends c{constructor(){super(),this.map={tabColor:new o("tabColor"),pageSetUpPr:new a,outlinePr:new r}}get tag(){return"sheetPr"}render(t,e){if(e){t.addRollback(),t.openNode("sheetPr");let l=!1;l=this.map.tabColor.render(t,e.tabColor)||l,l=this.map.pageSetUpPr.render(t,e.pageSetup)||l,l=this.map.outlinePr.render(t,e.outlineProperties)||l,l?(t.closeNode(),t.commit()):t.rollback()}}parseOpen(t){return this.parser?(this.parser.parseOpen(t),!0):t.name===this.tag?(this.reset(),!0):!!this.map[t.name]&&(this.parser=this.map[t.name],this.parser.parseOpen(t),!0)}parseText(t){return!!this.parser&&(this.parser.parseText(t),!0)}parseClose(t){return this.parser?(this.parser.parseClose(t)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}}},{"../base-xform":32,"../style/color-xform":128,"./outline-properties-xform":101,"./page-setup-properties-xform":104}],112:[function(n,x,_){const c=n("../../../utils/under-dash"),o=n("../base-xform");function a(t,e){return t?e:void 0}function r(t,e){return t===e||void 0}x.exports=class extends o{get tag(){return"sheetProtection"}render(t,e){if(e){const l={sheet:a(e.sheet,"1"),selectLockedCells:e.selectLockedCells===!1?"1":void 0,selectUnlockedCells:e.selectUnlockedCells===!1?"1":void 0,formatCells:a(e.formatCells,"0"),formatColumns:a(e.formatColumns,"0"),formatRows:a(e.formatRows,"0"),insertColumns:a(e.insertColumns,"0"),insertRows:a(e.insertRows,"0"),insertHyperlinks:a(e.insertHyperlinks,"0"),deleteColumns:a(e.deleteColumns,"0"),deleteRows:a(e.deleteRows,"0"),sort:a(e.sort,"0"),autoFilter:a(e.autoFilter,"0"),pivotTables:a(e.pivotTables,"0")};e.sheet&&(l.algorithmName=e.algorithmName,l.hashValue=e.hashValue,l.saltValue=e.saltValue,l.spinCount=e.spinCount,l.objects=a(e.objects===!1,"1"),l.scenarios=a(e.scenarios===!1,"1")),c.some(l,i=>i!==void 0)&&t.leafNode(this.tag,l)}}parseOpen(t){return t.name===this.tag?(this.model={sheet:r(t.attributes.sheet,"1"),objects:t.attributes.objects!=="1"&&void 0,scenarios:t.attributes.scenarios!=="1"&&void 0,selectLockedCells:t.attributes.selectLockedCells!=="1"&&void 0,selectUnlockedCells:t.attributes.selectUnlockedCells!=="1"&&void 0,formatCells:r(t.attributes.formatCells,"0"),formatColumns:r(t.attributes.formatColumns,"0"),formatRows:r(t.attributes.formatRows,"0"),insertColumns:r(t.attributes.insertColumns,"0"),insertRows:r(t.attributes.insertRows,"0"),insertHyperlinks:r(t.attributes.insertHyperlinks,"0"),deleteColumns:r(t.attributes.deleteColumns,"0"),deleteRows:r(t.attributes.deleteRows,"0"),sort:r(t.attributes.sort,"0"),autoFilter:r(t.attributes.autoFilter,"0"),pivotTables:r(t.attributes.pivotTables,"0")},t.attributes.algorithmName&&(this.model.algorithmName=t.attributes.algorithmName,this.model.hashValue=t.attributes.hashValue,this.model.saltValue=t.attributes.saltValue,this.model.spinCount=parseInt(t.attributes.spinCount,10)),!0):!1}parseText(){}parseClose(){return!1}}},{"../../../utils/under-dash":26,"../base-xform":32}],113:[function(n,x,_){const c=n("../../../utils/col-cache"),o=n("../base-xform"),a={frozen:"frozen",frozenSplit:"frozen",split:"split"};x.exports=class extends o{get tag(){return"sheetView"}prepare(r){switch(r.state){case"frozen":case"split":break;default:r.state="normal"}}render(r,t){r.openNode("sheetView",{workbookViewId:t.workbookViewId||0});const e=function(h,u,p){p&&r.addAttribute(h,u)};let l,i,s,f;switch(e("rightToLeft","1",t.rightToLeft===!0),e("tabSelected","1",t.tabSelected),e("showRuler","0",t.showRuler===!1),e("showRowColHeaders","0",t.showRowColHeaders===!1),e("showGridLines","0",t.showGridLines===!1),e("zoomScale",t.zoomScale,t.zoomScale),e("zoomScaleNormal",t.zoomScaleNormal,t.zoomScaleNormal),e("view",t.style,t.style),t.state){case"frozen":i=t.xSplit||0,s=t.ySplit||0,l=t.topLeftCell||c.getAddress(s+1,i+1).address,f=(t.xSplit&&t.ySplit?"bottomRight":t.xSplit&&"topRight")||"bottomLeft",r.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:l,activePane:f,state:"frozen"}),r.leafNode("selection",{pane:f,activeCell:t.activeCell,sqref:t.activeCell});break;case"split":t.activePane==="topLeft"&&(t.activePane=void 0),r.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:t.topLeftCell,activePane:t.activePane}),r.leafNode("selection",{pane:t.activePane,activeCell:t.activeCell,sqref:t.activeCell});break;case"normal":t.activeCell&&r.leafNode("selection",{activeCell:t.activeCell,sqref:t.activeCell})}r.closeNode()}parseOpen(r){switch(r.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(r.attributes.workbookViewId,10),rightToLeft:r.attributes.rightToLeft==="1",tabSelected:r.attributes.tabSelected==="1",showRuler:r.attributes.showRuler!=="0",showRowColHeaders:r.attributes.showRowColHeaders!=="0",showGridLines:r.attributes.showGridLines!=="0",zoomScale:parseInt(r.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(r.attributes.zoomScaleNormal||"100",10),style:r.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(r.attributes.xSplit||"0",10),ySplit:parseInt(r.attributes.ySplit||"0",10),topLeftCell:r.attributes.topLeftCell,activePane:r.attributes.activePane||"topLeft",state:r.attributes.state},!0;case"selection":{const t=r.attributes.pane||"topLeft";return this.selections[t]={pane:t,activeCell:r.attributes.activeCell},!0}default:return!1}}parseText(){}parseClose(r){let t,e;return r==="sheetView"?(this.sheetView&&this.pane?(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:a[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},this.model.state==="split"&&(t.activePane=this.pane.activePane),e=this.selections[this.pane.activePane],e&&e.activeCell&&(t.activeCell=e.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)):(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},e=this.selections.topLeft,e&&e.activeCell&&(t.activeCell=e.activeCell),this.sheetView.style&&(t.style=this.sheetView.style)),!1):!0}reconcile(){}}},{"../../../utils/col-cache":19,"../base-xform":32}],114:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"tablePart"}render(o,a){a&&o.leafNode(this.tag,{"r:id":a.rId})}parseOpen(o){return o.name===this.tag?(this.model={rId:o.attributes["r:id"]},!0):!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],115:[function(n,x,_){const c=n("../../../utils/under-dash"),o=n("../../../utils/col-cache"),a=n("../../../utils/xml-stream"),r=n("../../rel-type"),t=n("./merges"),e=n("../base-xform"),l=n("../list-xform"),i=n("./row-xform"),s=n("./col-xform"),f=n("./dimension-xform"),h=n("./hyperlink-xform"),u=n("./merge-cell-xform"),p=n("./data-validations-xform"),d=n("./sheet-properties-xform"),w=n("./sheet-format-properties-xform"),S=n("./sheet-view-xform"),A=n("./sheet-protection-xform"),N=n("./page-margins-xform"),L=n("./page-setup-xform"),I=n("./print-options-xform"),P=n("./auto-filter-xform"),D=n("./picture-xform"),U=n("./drawing-xform"),B=n("./table-part-xform"),k=n("./row-breaks-xform"),C=n("./header-footer-xform"),v=n("./cf/conditional-formattings-xform"),m=n("./ext-lst-xform"),b=(y,E)=>{if(!E||!E.length)return y;if(!y||!y.length)return E;const R={},O={};return y.forEach(z=>{R[z.ref]=z,z.rules.forEach($=>{const{x14Id:Z}=$;Z&&(O[Z]=$)})}),E.forEach(z=>{z.rules.forEach($=>{const Z=O[$.x14Id];Z?((j,H)=>{Object.keys(H).forEach(T=>{const M=j[T],F=H[T];M===void 0&&F!==void 0&&(j[T]=F)})})(Z,$):R[z.ref]?R[z.ref].rules.push($):y.push({ref:z.ref,rules:[$]})})}),y};class g extends e{constructor(E){super();const{maxRows:R,maxCols:O,ignoreNodes:z}=E||{};this.ignoreNodes=z||[],this.map={sheetPr:new d,dimension:new f,sheetViews:new l({tag:"sheetViews",count:!1,childXform:new S}),sheetFormatPr:new w,cols:new l({tag:"cols",count:!1,childXform:new s}),sheetData:new l({tag:"sheetData",count:!1,empty:!0,childXform:new i({maxItems:O}),maxItems:R}),autoFilter:new P,mergeCells:new l({tag:"mergeCells",count:!0,childXform:new u}),rowBreaks:new k,hyperlinks:new l({tag:"hyperlinks",count:!1,childXform:new h}),pageMargins:new N,dataValidations:new p,pageSetup:new L,headerFooter:new C,printOptions:new I,picture:new D,drawing:new U,sheetProtection:new A,tableParts:new l({tag:"tableParts",count:!0,childXform:new B}),conditionalFormatting:new v,extLst:new m}}prepare(E,R){R.merges=new t,E.hyperlinks=R.hyperlinks=[],E.comments=R.comments=[],R.formulae={},R.siFormulae=0,this.map.cols.prepare(E.cols,R),this.map.sheetData.prepare(E.rows,R),this.map.conditionalFormatting.prepare(E.conditionalFormattings,R),E.mergeCells=R.merges.mergeCells;const O=E.rels=[];function z(j){return"rId"+(j.length+1)}if(E.hyperlinks.forEach(j=>{const H=z(O);j.rId=H,O.push({Id:H,Type:r.Hyperlink,Target:j.target,TargetMode:"External"})}),E.comments.length>0){const j={Id:z(O),Type:r.Comments,Target:`../comments${E.id}.xml`};O.push(j);const H={Id:z(O),Type:r.VmlDrawing,Target:`../drawings/vmlDrawing${E.id}.vml`};O.push(H),E.comments.forEach(T=>{T.refAddress=o.decodeAddress(T.ref)}),R.commentRefs.push({commentName:"comments"+E.id,vmlDrawing:"vmlDrawing"+E.id})}const $=[];let Z;E.media.forEach(j=>{if(j.type==="background"){const H=z(O);Z=R.media[j.imageId],O.push({Id:H,Type:r.Image,Target:`../media/${Z.name}.${Z.extension}`}),E.background={rId:H},E.image=R.media[j.imageId]}else if(j.type==="image"){let{drawing:H}=E;Z=R.media[j.imageId],H||(H=E.drawing={rId:z(O),name:"drawing"+ ++R.drawingsCount,anchors:[],rels:[]},R.drawings.push(H),O.push({Id:H.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:`../drawings/${H.name}.xml`}));let T=this.preImageId===j.imageId?$[j.imageId]:$[H.rels.length];T||(T=z(H.rels),$[H.rels.length]=T,H.rels.push({Id:T,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`../media/${Z.name}.${Z.extension}`}));const M={picture:{rId:T},range:j.range};if(j.hyperlinks&&j.hyperlinks.hyperlink){const F=z(H.rels);$[H.rels.length]=F,M.picture.hyperlinks={tooltip:j.hyperlinks.tooltip,rId:F},H.rels.push({Id:F,Type:r.Hyperlink,Target:j.hyperlinks.hyperlink,TargetMode:"External"})}this.preImageId=j.imageId,H.anchors.push(M)}}),E.tables.forEach(j=>{const H=z(O);j.rId=H,O.push({Id:H,Type:r.Table,Target:"../tables/"+j.target}),j.columns.forEach(T=>{const{style:M}=T;M&&(T.dxfId=R.styles.addDxfStyle(M))})}),this.map.extLst.prepare(E,R)}render(E,R){E.openXml(a.StdDocAttributes),E.openNode("worksheet",g.WORKSHEET_ATTRIBUTES);const O=R.properties?{defaultRowHeight:R.properties.defaultRowHeight,dyDescent:R.properties.dyDescent,outlineLevelCol:R.properties.outlineLevelCol,outlineLevelRow:R.properties.outlineLevelRow}:void 0;R.properties&&R.properties.defaultColWidth&&(O.defaultColWidth=R.properties.defaultColWidth);const z={outlineProperties:R.properties&&R.properties.outlineProperties,tabColor:R.properties&&R.properties.tabColor,pageSetup:R.pageSetup&&R.pageSetup.fitToPage?{fitToPage:R.pageSetup.fitToPage}:void 0},$=R.pageSetup&&R.pageSetup.margins,Z={showRowColHeaders:R.pageSetup&&R.pageSetup.showRowColHeaders,showGridLines:R.pageSetup&&R.pageSetup.showGridLines,horizontalCentered:R.pageSetup&&R.pageSetup.horizontalCentered,verticalCentered:R.pageSetup&&R.pageSetup.verticalCentered},j=R.sheetProtection;this.map.sheetPr.render(E,z),this.map.dimension.render(E,R.dimensions),this.map.sheetViews.render(E,R.views),this.map.sheetFormatPr.render(E,O),this.map.cols.render(E,R.cols),this.map.sheetData.render(E,R.rows),this.map.sheetProtection.render(E,j),this.map.autoFilter.render(E,R.autoFilter),this.map.mergeCells.render(E,R.mergeCells),this.map.conditionalFormatting.render(E,R.conditionalFormattings),this.map.dataValidations.render(E,R.dataValidations),this.map.hyperlinks.render(E,R.hyperlinks),this.map.printOptions.render(E,Z),this.map.pageMargins.render(E,$),this.map.pageSetup.render(E,R.pageSetup),this.map.headerFooter.render(E,R.headerFooter),this.map.rowBreaks.render(E,R.rowBreaks),this.map.drawing.render(E,R.drawing),this.map.picture.render(E,R.background),this.map.tableParts.render(E,R.tables),this.map.extLst.render(E,R),R.rels&&R.rels.forEach(H=>{H.Type===r.VmlDrawing&&E.leafNode("legacyDrawing",{"r:id":H.Id})}),E.closeNode()}parseOpen(E){return this.parser?(this.parser.parseOpen(E),!0):E.name==="worksheet"?(c.each(this.map,R=>{R.reset()}),!0):(this.map[E.name]&&!this.ignoreNodes.includes(E.name)&&(this.parser=this.map[E.name],this.parser.parseOpen(E)),!0)}parseText(E){this.parser&&this.parser.parseText(E)}parseClose(E){if(this.parser)return this.parser.parseClose(E)||(this.parser=void 0),!0;if(E==="worksheet"){const R=this.map.sheetFormatPr.model||{};this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(R.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(R.outlineProperties=this.map.sheetPr.model.outlineProperties);const O={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},z=Object.assign(O,this.map.pageSetup.model,this.map.printOptions.model),$=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:R,views:this.map.sheetViews.model,pageSetup:z,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:$},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1}else return!0}reconcile(E,R){const O=(E.relationships||[]).reduce(($,Z)=>{if($[Z.Id]=Z,Z.Type===r.Comments&&(E.comments=R.comments[Z.Target].comments),Z.Type===r.VmlDrawing&&E.comments&&E.comments.length){const j=R.vmlDrawings[Z.Target].comments;E.comments.forEach((H,T)=>{H.note=Object.assign({},H.note,j[T])})}return $},{});if(R.commentsMap=(E.comments||[]).reduce(($,Z)=>(Z.ref&&($[Z.ref]=Z),$),{}),R.hyperlinkMap=(E.hyperlinks||[]).reduce(($,Z)=>(Z.rId&&($[Z.address]=O[Z.rId].Target),$),{}),R.formulae={},E.rows=E.rows&&E.rows.filter(Boolean)||[],E.rows.forEach($=>{$.cells=$.cells&&$.cells.filter(Boolean)||[]}),this.map.cols.reconcile(E.cols,R),this.map.sheetData.reconcile(E.rows,R),this.map.conditionalFormatting.reconcile(E.conditionalFormattings,R),E.media=[],E.drawing){const $=O[E.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/);if($){const Z=$[1];R.drawings[Z].anchors.forEach(j=>{if(j.medium){const H={type:"image",imageId:j.medium.index,range:j.range,hyperlinks:j.picture.hyperlinks};E.media.push(H)}})}}const z=E.background&&O[E.background.rId];if(z){const $=z.Target.split("/media/")[1],Z=R.mediaIndex&&R.mediaIndex[$];Z!==void 0&&E.media.push({type:"background",imageId:Z})}E.tables=(E.tables||[]).map($=>{const Z=O[$.rId];return R.tables[Z.Target]}),delete E.relationships,delete E.hyperlinks,delete E.comments}}g.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"},x.exports=g},{"../../../utils/col-cache":19,"../../../utils/under-dash":26,"../../../utils/xml-stream":28,"../../rel-type":31,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":72,"./cf/conditional-formattings-xform":87,"./col-xform":92,"./data-validations-xform":93,"./dimension-xform":94,"./drawing-xform":95,"./ext-lst-xform":96,"./header-footer-xform":97,"./hyperlink-xform":98,"./merge-cell-xform":99,"./merges":100,"./page-margins-xform":103,"./page-setup-xform":105,"./picture-xform":106,"./print-options-xform":107,"./row-breaks-xform":108,"./row-xform":109,"./sheet-format-properties-xform":110,"./sheet-properties-xform":111,"./sheet-protection-xform":112,"./sheet-view-xform":113,"./table-part-xform":114}],116:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{constructor(o){super(),this.tag=o.tag,this.attr=o.attr}render(o,a){a&&(o.openNode(this.tag),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.model=!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],117:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this._format=o.format||function(a){try{return Number.isNaN(a.getTime())?"":a.toISOString()}catch{return""}},this._parse=o.parse||function(a){return new Date(a)}}render(o,a){a&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,this._format(a)):o.writeText(this._format(a)),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=this._parse(o.attributes[this.attr]):this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}},{"../base-xform":32}],118:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs,this.zero=o.zero}render(o,a){(a||this.zero)&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,a):o.writeText(a),o.closeNode())}parseOpen(o){return o.name===this.tag&&(this.attr?this.model=parseInt(o.attributes[this.attr],10):this.text=[],!0)}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}},{"../base-xform":32}],119:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{constructor(o){super(),this.tag=o.tag,this.attr=o.attr,this.attrs=o.attrs}render(o,a){a!==void 0&&(o.openNode(this.tag),this.attrs&&o.addAttributes(this.attrs),this.attr?o.addAttribute(this.attr,a):o.writeText(a),o.closeNode())}parseOpen(o){o.name===this.tag&&(this.attr?this.model=o.attributes[this.attr]:this.text=[])}parseText(o){this.attr||this.text.push(o)}parseClose(){return this.attr||(this.model=this.text.join("")),!1}}},{"../base-xform":32}],120:[function(n,x,_){const c=n("./base-xform"),o=n("../../utils/xml-stream");x.exports=class extends c{constructor(a){super(),this._model=a}render(a){if(!this._xml){const r=new o;(function t(e,l){e.openNode(l.tag,l.$),l.c&&l.c.forEach(i=>{t(e,i)}),l.t&&e.writeText(l.t),e.closeNode()})(r,this._model),this._xml=r.xml}a.writeXml(this._xml)}parseOpen(){return!0}parseText(){}parseClose(a){return a!==this._model.tag}}},{"../../utils/xml-stream":28,"./base-xform":32}],121:[function(n,x,_){const c=n("./text-xform"),o=n("./rich-text-xform"),a=n("../base-xform");x.exports=class extends a{constructor(){super(),this.map={r:new o,t:new c}}get tag(){return"rPh"}render(r,t){if(r.openNode(this.tag,{sb:t.sb||0,eb:t.eb||0}),t&&t.hasOwnProperty("richText")&&t.richText){const{r:e}=this.map;t.richText.forEach(l=>{e.render(r,l)})}else t&&this.map.t.render(r,t.text);r.closeNode()}parseOpen(r){const{name:t}=r;return this.parser?(this.parser.parseOpen(r),!0):t===this.tag?(this.model={sb:parseInt(r.attributes.sb,10),eb:parseInt(r.attributes.eb,10)},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(r),!0))}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser){if(!this.parser.parseClose(r)){switch(r){case"r":{let t=this.model.richText;t||(t=this.model.richText=[]),t.push(this.parser.model);break}case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}return r!==this.tag}}},{"../base-xform":32,"./rich-text-xform":122,"./text-xform":125}],122:[function(n,x,_){const c=n("./text-xform"),o=n("../style/font-xform"),a=n("../base-xform");class r extends a{constructor(e){super(),this.model=e}get tag(){return"r"}get textXform(){return this._textXform||(this._textXform=new c)}get fontXform(){return this._fontXform||(this._fontXform=new o(r.FONT_OPTIONS))}render(e,l){l=l||this.model,e.openNode("r"),l.font&&this.fontXform.render(e,l.font),this.textXform.render(e,l.text),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(e),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){switch(e){case"r":return!1;case"t":return this.model.text=this.parser.model,this.parser=void 0,!0;case"rPr":return this.model.font=this.parser.model,this.parser=void 0,!0;default:return this.parser&&this.parser.parseClose(e),!0}}}r.FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},x.exports=r},{"../base-xform":32,"../style/font-xform":131,"./text-xform":125}],123:[function(n,x,_){const c=n("./text-xform"),o=n("./rich-text-xform"),a=n("./phonetic-text-xform"),r=n("../base-xform");x.exports=class extends r{constructor(t){super(),this.model=t,this.map={r:new o,t:new c,rPh:new a}}get tag(){return"si"}render(t,e){t.openNode(this.tag),e&&e.hasOwnProperty("richText")&&e.richText?e.richText.length?e.richText.forEach(l=>{this.map.r.render(t,l)}):this.map.t.render(t,""):e!=null&&this.map.t.render(t,e),t.closeNode()}parseOpen(t){const{name:e}=t;return this.parser?(this.parser.parseOpen(t),!0):e===this.tag?(this.model={},!0):(this.parser=this.map[e],!!this.parser&&(this.parser.parseOpen(t),!0))}parseText(t){this.parser&&this.parser.parseText(t)}parseClose(t){if(this.parser){if(!this.parser.parseClose(t)){switch(t){case"r":{let e=this.model.richText;e||(e=this.model.richText=[]),e.push(this.parser.model);break}case"t":this.model=this.parser.model}this.parser=void 0}return!0}return t!==this.tag}}},{"../base-xform":32,"./phonetic-text-xform":121,"./rich-text-xform":122,"./text-xform":125}],124:[function(n,x,_){const c=n("../../../utils/xml-stream"),o=n("../base-xform"),a=n("./shared-string-xform");x.exports=class extends o{constructor(r){super(),this.model=r||{values:[],count:0},this.hash=Object.create(null),this.rich=Object.create(null)}get sharedStringXform(){return this._sharedStringXform||(this._sharedStringXform=new a)}get values(){return this.model.values}get uniqueCount(){return this.model.values.length}get count(){return this.model.count}getString(r){return this.model.values[r]}add(r){return r.richText?this.addRichText(r):this.addText(r)}addText(r){let t=this.hash[r];return t===void 0&&(t=this.hash[r]=this.model.values.length,this.model.values.push(r)),this.model.count++,t}addRichText(r){const t=this.sharedStringXform.toXml(r);let e=this.rich[t];return e===void 0&&(e=this.rich[t]=this.model.values.length,this.model.values.push(r)),this.model.count++,e}render(r,t){t=t||this._values,r.openXml(c.StdDocAttributes),r.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:t.count,uniqueCount:t.values.length});const e=this.sharedStringXform;t.values.forEach(l=>{e.render(r,l)}),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(r),!0;default:throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(r))}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){if(this.parser)return this.parser.parseClose(r)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;if(r==="sst")return!1;throw new Error("Unexpected xml node in parseClose: "+r)}}},{"../../../utils/xml-stream":28,"../base-xform":32,"./shared-string-xform":123}],125:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"t"}render(o,a){o.openNode("t"),/^\s|\n|\s$/.test(a)&&o.addAttribute("xml:space","preserve"),o.writeText(a),o.closeNode()}get model(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(o,a)=>String.fromCharCode(parseInt(a,16)))}parseOpen(o){return o.name==="t"?(this._text=[],!0):!1}parseText(o){this._text.push(o)}parseClose(){return!1}}},{"../base-xform":32}],126:[function(n,x,_){const c=n("../../../doc/enums"),o=n("../../../utils/utils"),a=n("../base-xform"),r={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((e,l)=>(e[l]=!0,e),{}),horizontal(e){return this.horizontalValues[e]?e:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((e,l)=>(e[l]=!0,e),{}),vertical(e){return e==="middle"?"center":this.verticalValues[e]?e:void 0},wrapText:e=>!!e||void 0,shrinkToFit:e=>!!e||void 0,textRotation(e){return e==="vertical"||(e=o.validInt(e))>=-90&&e<=90?e:void 0},indent:e=>(e=o.validInt(e),Math.max(0,e)),readingOrder(e){switch(e){case"ltr":return c.ReadingOrder.LeftToRight;case"rtl":return c.ReadingOrder.RightToLeft;default:return}}},t={toXml(e){if(e=r.textRotation(e)){if(e==="vertical")return 255;const l=Math.round(e);if(l>=0&&l<=90)return l;if(l<0&&l>=-90)return 90-l}},toModel(e){const l=o.validInt(e);if(l!==void 0){if(l===255)return"vertical";if(l>=0&&l<=90)return l;if(l>90&&l<=180)return 90-l}}};x.exports=class extends a{get tag(){return"alignment"}render(e,l){e.addRollback(),e.openNode("alignment");let i=!1;function s(f,h){h&&(e.addAttribute(f,h),i=!0)}s("horizontal",r.horizontal(l.horizontal)),s("vertical",r.vertical(l.vertical)),s("wrapText",!!r.wrapText(l.wrapText)&&"1"),s("shrinkToFit",!!r.shrinkToFit(l.shrinkToFit)&&"1"),s("indent",r.indent(l.indent)),s("textRotation",t.toXml(l.textRotation)),s("readingOrder",r.readingOrder(l.readingOrder)),e.closeNode(),i?e.commit():e.rollback()}parseOpen(e){const l={};let i=!1;function s(f,h,u){f&&(l[h]=u,i=!0)}s(e.attributes.horizontal,"horizontal",e.attributes.horizontal),s(e.attributes.vertical,"vertical",e.attributes.vertical==="center"?"middle":e.attributes.vertical),s(e.attributes.wrapText,"wrapText",o.parseBoolean(e.attributes.wrapText)),s(e.attributes.shrinkToFit,"shrinkToFit",o.parseBoolean(e.attributes.shrinkToFit)),s(e.attributes.indent,"indent",parseInt(e.attributes.indent,10)),s(e.attributes.textRotation,"textRotation",t.toModel(e.attributes.textRotation)),s(e.attributes.readingOrder,"readingOrder",e.attributes.readingOrder==="2"?"rtl":"ltr"),this.model=i?l:null}parseText(){}parseClose(){return!1}}},{"../../../doc/enums":7,"../../../utils/utils":27,"../base-xform":32}],127:[function(n,x,_){const c=n("../base-xform"),o=n("../../../utils/utils"),a=n("./color-xform");class r extends c{constructor(e){super(),this.name=e,this.map={color:new a}}get tag(){return this.name}render(e,l,i){const s=l&&l.color||i||this.defaultColor;e.openNode(this.name),l&&l.style&&(e.addAttribute("style",l.style),s&&this.map.color.render(e,s)),e.closeNode()}parseOpen(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.name:{const{style:l}=e.attributes;return this.model=l?{style:l}:void 0,!0}case"color":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}}parseText(e){this.parser&&this.parser.parseText(e)}parseClose(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(e===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}validStyle(e){return r.validStyleValues[e]}}r.validStyleValues=["thin","dashed","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((t,e)=>(t[e]=!0,t),{}),x.exports=class extends c{constructor(){super(),this.map={top:new r("top"),left:new r("left"),bottom:new r("bottom"),right:new r("right"),diagonal:new r("diagonal")}}render(t,e){const{color:l}=e;function i(s,f){s&&!s.color&&e.color&&(s={...s,color:e.color}),f.render(t,s,l)}t.openNode("border"),e.diagonal&&e.diagonal.style&&(e.diagonal.up&&t.addAttribute("diagonalUp","1"),e.diagonal.down&&t.addAttribute("diagonalDown","1")),i(e.left,this.map.left),i(e.right,this.map.right),i(e.top,this.map.top),i(e.bottom,this.map.bottom),i(e.diagonal,this.map.diagonal),t.closeNode()}parseOpen(t){return this.parser?(this.parser.parseOpen(t),!0):t.name==="border"?(this.reset(),this.diagonalUp=o.parseBoolean(t.attributes.diagonalUp),this.diagonalDown=o.parseBoolean(t.attributes.diagonalDown),!0):(this.parser=this.map[t.name],!!this.parser&&(this.parser.parseOpen(t),!0))}parseText(t){this.parser&&this.parser.parseText(t)}parseClose(t){if(this.parser)return this.parser.parseClose(t)||(this.parser=void 0),!0;if(t==="border"){const e=this.model={},l=function(i,s,f){s&&(f&&Object.assign(s,f),e[i]=s)};l("left",this.map.left.model),l("right",this.map.right.model),l("top",this.map.top.model),l("bottom",this.map.bottom.model),l("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})}return!1}}},{"../../../utils/utils":27,"../base-xform":32,"./color-xform":128}],128:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{constructor(o){super(),this.name=o||"color"}get tag(){return this.name}render(o,a){return!!a&&(o.openNode(this.name),a.argb?o.addAttribute("rgb",a.argb):a.theme!==void 0?(o.addAttribute("theme",a.theme),a.tint!==void 0&&o.addAttribute("tint",a.tint)):a.indexed!==void 0?o.addAttribute("indexed",a.indexed):o.addAttribute("auto","1"),o.closeNode(),!0)}parseOpen(o){return o.name===this.name&&(o.attributes.rgb?this.model={argb:o.attributes.rgb}:o.attributes.theme?(this.model={theme:parseInt(o.attributes.theme,10)},o.attributes.tint&&(this.model.tint=parseFloat(o.attributes.tint))):o.attributes.indexed?this.model={indexed:parseInt(o.attributes.indexed,10)}:this.model=void 0,!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],129:[function(n,x,_){const c=n("../base-xform"),o=n("./alignment-xform"),a=n("./border-xform"),r=n("./fill-xform"),t=n("./font-xform"),e=n("./numfmt-xform"),l=n("./protection-xform");x.exports=class extends c{constructor(){super(),this.map={alignment:new o,border:new a,fill:new r,font:new t,numFmt:new e,protection:new l}}get tag(){return"dxf"}render(i,s){if(i.openNode(this.tag),s.font&&this.map.font.render(i,s.font),s.numFmt&&s.numFmtId){const f={id:s.numFmtId,formatCode:s.numFmt};this.map.numFmt.render(i,f)}s.fill&&this.map.fill.render(i,s.fill),s.alignment&&this.map.alignment.render(i,s.alignment),s.border&&this.map.border.render(i,s.border),s.protection&&this.map.protection.render(i,s.protection),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name===this.tag?(this.reset(),!0):(this.parser=this.map[i.name],this.parser&&this.parser.parseOpen(i),!0)}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return this.parser?(this.parser.parseClose(i)||(this.parser=void 0),!0):i!==this.tag||(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model},!1)}}},{"../base-xform":32,"./alignment-xform":126,"./border-xform":127,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./protection-xform":133}],130:[function(n,x,_){const c=n("../base-xform"),o=n("./color-xform");class a extends c{constructor(){super(),this.map={color:new o}}get tag(){return"stop"}render(i,s){i.openNode("stop"),i.addAttribute("position",s.position),this.map.color.render(i,s.color),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"stop":return this.model={position:parseFloat(i.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(i),!0;default:return!1}}parseText(){}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model.color=this.parser.model,this.parser=void 0),!0)}}class r extends c{constructor(){super(),this.map={fgColor:new o("fgColor"),bgColor:new o("bgColor")}}get name(){return"pattern"}get tag(){return"patternFill"}render(i,s){i.openNode("patternFill"),i.addAttribute("patternType",s.pattern),s.fgColor&&this.map.fgColor.render(i,s.fgColor),s.bgColor&&this.map.bgColor.render(i,s.bgColor),i.closeNode()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name==="patternFill"?(this.model={type:"pattern",pattern:i.attributes.patternType},!0):(this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0))}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.parser.model&&(this.model[i]=this.parser.model),this.parser=void 0),!0)}}class t extends c{constructor(){super(),this.map={stop:new a}}get name(){return"gradient"}get tag(){return"gradientFill"}render(i,s){switch(i.openNode("gradientFill"),s.gradient){case"angle":i.addAttribute("degree",s.degree);break;case"path":i.addAttribute("type","path"),s.center.left&&(i.addAttribute("left",s.center.left),s.center.right===void 0&&i.addAttribute("right",s.center.left)),s.center.right&&i.addAttribute("right",s.center.right),s.center.top&&(i.addAttribute("top",s.center.top),s.center.bottom===void 0&&i.addAttribute("bottom",s.center.top)),s.center.bottom&&i.addAttribute("bottom",s.center.bottom)}const f=this.map.stop;s.stops.forEach(h=>{f.render(i,h)}),i.closeNode()}parseOpen(i){if(this.parser)return this.parser.parseOpen(i),!0;switch(i.name){case"gradientFill":{const s=this.model={stops:[]};return i.attributes.degree?(s.gradient="angle",s.degree=parseInt(i.attributes.degree,10)):i.attributes.type==="path"&&(s.gradient="path",s.center={left:i.attributes.left?parseFloat(i.attributes.left):0,top:i.attributes.top?parseFloat(i.attributes.top):0},i.attributes.right!==i.attributes.left&&(s.center.right=i.attributes.right?parseFloat(i.attributes.right):0),i.attributes.bottom!==i.attributes.top&&(s.center.bottom=i.attributes.bottom?parseFloat(i.attributes.bottom):0)),!0}case"stop":return this.parser=this.map.stop,this.parser.parseOpen(i),!0;default:return!1}}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}}class e extends c{constructor(){super(),this.map={patternFill:new r,gradientFill:new t}}get tag(){return"fill"}render(i,s){switch(i.addRollback(),i.openNode("fill"),s.type){case"pattern":this.map.patternFill.render(i,s);break;case"gradient":this.map.gradientFill.render(i,s);break;default:return void i.rollback()}i.closeNode(),i.commit()}parseOpen(i){return this.parser?(this.parser.parseOpen(i),!0):i.name==="fill"?(this.model={},!0):(this.parser=this.map[i.name],!!this.parser&&(this.parser.parseOpen(i),!0))}parseText(i){this.parser&&this.parser.parseText(i)}parseClose(i){return!!this.parser&&(this.parser.parseClose(i)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}validStyle(i){return e.validPatternValues[i]}}e.validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((l,i)=>(l[i]=!0,l),{}),e.StopXform=a,e.PatternFillXform=r,e.GradientFillXform=t,x.exports=e},{"../base-xform":32,"./color-xform":128}],131:[function(n,x,_){const c=n("./color-xform"),o=n("../simple/boolean-xform"),a=n("../simple/integer-xform"),r=n("../simple/string-xform"),t=n("./underline-xform"),e=n("../../../utils/under-dash"),l=n("../base-xform");class i extends l{constructor(f){super(),this.options=f||i.OPTIONS,this.map={b:{prop:"bold",xform:new o({tag:"b",attr:"val"})},i:{prop:"italic",xform:new o({tag:"i",attr:"val"})},u:{prop:"underline",xform:new t},charset:{prop:"charset",xform:new a({tag:"charset",attr:"val"})},color:{prop:"color",xform:new c},condense:{prop:"condense",xform:new o({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new o({tag:"extend",attr:"val"})},family:{prop:"family",xform:new a({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new o({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new r({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new r({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new o({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new o({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new a({tag:"sz",attr:"val"})}},this.map[this.options.fontNameTag]={prop:"name",xform:new r({tag:this.options.fontNameTag,attr:"val"})}}get tag(){return this.options.tagName}render(f,h){const{map:u}=this;f.openNode(this.options.tagName),e.each(this.map,(p,d)=>{u[d].xform.render(f,h[p.prop])}),f.closeNode()}parseOpen(f){return this.parser?(this.parser.parseOpen(f),!0):this.map[f.name]?(this.parser=this.map[f.name].xform,this.parser.parseOpen(f)):f.name===this.options.tagName?(this.model={},!0):!1}parseText(f){this.parser&&this.parser.parseText(f)}parseClose(f){if(this.parser&&!this.parser.parseClose(f)){const h=this.map[f];return this.parser.model&&(this.model[h.prop]=this.parser.model),this.parser=void 0,!0}return f!==this.options.tagName}}i.OPTIONS={tagName:"font",fontNameTag:"name"},x.exports=i},{"../../../utils/under-dash":26,"../base-xform":32,"../simple/boolean-xform":116,"../simple/integer-xform":118,"../simple/string-xform":119,"./color-xform":128,"./underline-xform":136}],132:[function(n,x,_){const c=n("../../../utils/under-dash"),o=n("../../defaultnumformats"),a=n("../base-xform"),r=(function(){const e={};return c.each(o,(l,i)=>{l.f&&(e[l.f]=parseInt(i,10))}),e})();class t extends a{constructor(l,i){super(),this.id=l,this.formatCode=i}get tag(){return"numFmt"}render(l,i){l.leafNode("numFmt",{numFmtId:i.id,formatCode:i.formatCode})}parseOpen(l){return l.name==="numFmt"?(this.model={id:parseInt(l.attributes.numFmtId,10),formatCode:l.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0):!1}parseText(){}parseClose(){return!1}}t.getDefaultFmtId=function(e){return r[e]},t.getDefaultFmtCode=function(e){return o[e]&&o[e].f},x.exports=t},{"../../../utils/under-dash":26,"../../defaultnumformats":30,"../base-xform":32}],133:[function(n,x,_){const c=n("../base-xform"),o={boolean:(a,r)=>a===void 0?r:a};x.exports=class extends c{get tag(){return"protection"}render(a,r){a.addRollback(),a.openNode("protection");let t=!1;function e(l,i){i!==void 0&&(a.addAttribute(l,i),t=!0)}e("locked",o.boolean(r.locked,!0)?void 0:"0"),e("hidden",o.boolean(r.hidden,!1)?"1":void 0),a.closeNode(),t?a.commit():a.rollback()}parseOpen(a){const r={locked:a.attributes.locked!=="0",hidden:a.attributes.hidden==="1"},t=!r.locked||r.hidden;this.model=t?r:null}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],134:[function(n,x,_){const c=n("../base-xform"),o=n("./alignment-xform"),a=n("./protection-xform");x.exports=class extends c{constructor(r){super(),this.xfId=!(!r||!r.xfId),this.map={alignment:new o,protection:new a}}get tag(){return"xf"}render(r,t){r.openNode("xf",{numFmtId:t.numFmtId||0,fontId:t.fontId||0,fillId:t.fillId||0,borderId:t.borderId||0}),this.xfId&&r.addAttribute("xfId",t.xfId||0),t.numFmtId&&r.addAttribute("applyNumberFormat","1"),t.fontId&&r.addAttribute("applyFont","1"),t.fillId&&r.addAttribute("applyFill","1"),t.borderId&&r.addAttribute("applyBorder","1"),t.alignment&&r.addAttribute("applyAlignment","1"),t.protection&&r.addAttribute("applyProtection","1"),t.alignment&&this.map.alignment.render(r,t.alignment),t.protection&&this.map.protection.render(r,t.protection),r.closeNode()}parseOpen(r){if(this.parser)return this.parser.parseOpen(r),!0;switch(r.name){case"xf":return this.model={numFmtId:parseInt(r.attributes.numFmtId,10),fontId:parseInt(r.attributes.fontId,10),fillId:parseInt(r.attributes.fillId,10),borderId:parseInt(r.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(r.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(r),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(r),!0;default:return!1}}parseText(r){this.parser&&this.parser.parseText(r)}parseClose(r){return this.parser?(this.parser.parseClose(r)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):r!=="xf"}}},{"../base-xform":32,"./alignment-xform":126,"./protection-xform":133}],135:[function(n,x,_){const c=n("../../../doc/enums"),o=n("../../../utils/xml-stream"),a=n("../base-xform"),r=n("../static-xform"),t=n("../list-xform"),e=n("./font-xform"),l=n("./fill-xform"),i=n("./border-xform"),s=n("./numfmt-xform"),f=n("./style-xform"),h=n("./dxf-xform");class u extends a{constructor(d){super(),this.map={numFmts:new t({tag:"numFmts",count:!0,childXform:new s}),fonts:new t({tag:"fonts",count:!0,childXform:new e,$:{"x14ac:knownFonts":1}}),fills:new t({tag:"fills",count:!0,childXform:new l}),borders:new t({tag:"borders",count:!0,childXform:new i}),cellStyleXfs:new t({tag:"cellStyleXfs",count:!0,childXform:new f}),cellXfs:new t({tag:"cellXfs",count:!0,childXform:new f({xfId:!0})}),dxfs:new t({tag:"dxfs",always:!0,count:!0,childXform:new h}),numFmt:new s,font:new e,fill:new l,border:new i,style:new f({xfId:!0}),cellStyles:u.STATIC_XFORMS.cellStyles,tableStyles:u.STATIC_XFORMS.tableStyles,extLst:u.STATIC_XFORMS.extLst},d&&this.init()}initIndex(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}init(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}render(d,w){w=w||this.model,d.openXml(o.StdDocAttributes),d.openNode("styleSheet",u.STYLESHEET_ATTRIBUTES),this.index?(w.numFmts&&w.numFmts.length&&(d.openNode("numFmts",{count:w.numFmts.length}),w.numFmts.forEach(S=>{d.writeXml(S)}),d.closeNode()),w.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),d.openNode("fonts",{count:w.fonts.length,"x14ac:knownFonts":1}),w.fonts.forEach(S=>{d.writeXml(S)}),d.closeNode(),d.openNode("fills",{count:w.fills.length}),w.fills.forEach(S=>{d.writeXml(S)}),d.closeNode(),d.openNode("borders",{count:w.borders.length}),w.borders.forEach(S=>{d.writeXml(S)}),d.closeNode(),this.map.cellStyleXfs.render(d,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),d.openNode("cellXfs",{count:w.styles.length}),w.styles.forEach(S=>{d.writeXml(S)}),d.closeNode()):(this.map.numFmts.render(d,w.numFmts),this.map.fonts.render(d,w.fonts),this.map.fills.render(d,w.fills),this.map.borders.render(d,w.borders),this.map.cellStyleXfs.render(d,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(d,w.styles)),u.STATIC_XFORMS.cellStyles.render(d),this.map.dxfs.render(d,w.dxfs),u.STATIC_XFORMS.tableStyles.render(d),u.STATIC_XFORMS.extLst.render(d),d.closeNode()}parseOpen(d){return this.parser?(this.parser.parseOpen(d),!0):d.name==="styleSheet"?(this.initIndex(),!0):(this.parser=this.map[d.name],this.parser&&this.parser.parseOpen(d),!0)}parseText(d){this.parser&&this.parser.parseText(d)}parseClose(d){if(this.parser)return this.parser.parseClose(d)||(this.parser=void 0),!0;switch(d){case"styleSheet":{this.model={};const w=(S,A)=>{A.model&&A.model.length&&(this.model[S]=A.model)};if(w("numFmts",this.map.numFmts),w("fonts",this.map.fonts),w("fills",this.map.fills),w("borders",this.map.borders),w("styles",this.map.cellXfs),w("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts){const S=this.index.numFmt;this.model.numFmts.forEach(A=>{S[A.id]=A.formatCode})}return!1}default:return!0}}addStyleModel(d,w){if(!d)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(d))return this.weakMap.get(d);const S={};if(w=w||c.ValueType.Number,d.numFmt)S.numFmtId=this._addNumFmtStr(d.numFmt);else switch(w){case c.ValueType.Number:S.numFmtId=this._addNumFmtStr("General");break;case c.ValueType.Date:S.numFmtId=this._addNumFmtStr("mm-dd-yy")}d.font&&(S.fontId=this._addFont(d.font)),d.border&&(S.borderId=this._addBorder(d.border)),d.fill&&(S.fillId=this._addFill(d.fill)),d.alignment&&(S.alignment=d.alignment),d.protection&&(S.protection=d.protection);const A=this._addStyle(S);return this.weakMap&&this.weakMap.set(d,A),A}getStyleModel(d){const w=this.model.styles[d];if(!w)return null;let S=this.index.model[d];if(S)return S;if(S=this.index.model[d]={},w.numFmtId){const N=this.index.numFmt[w.numFmtId]||s.getDefaultFmtCode(w.numFmtId);N&&(S.numFmt=N)}function A(N,L,I){if(I||I===0){const P=L[I];P&&(S[N]=P)}}return A("font",this.model.fonts,w.fontId),A("border",this.model.borders,w.borderId),A("fill",this.model.fills,w.fillId),w.alignment&&(S.alignment=w.alignment),w.protection&&(S.protection=w.protection),S}addDxfStyle(d){return d.numFmt&&(d.numFmtId=this._addNumFmtStr(d.numFmt)),this.model.dxfs.push(d),this.model.dxfs.length-1}getDxfStyle(d){return this.model.dxfs[d]}_addStyle(d){const w=this.map.style.toXml(d);let S=this.index.style[w];return S===void 0&&(S=this.index.style[w]=this.model.styles.length,this.model.styles.push(w)),S}_addNumFmtStr(d){let w=s.getDefaultFmtId(d);if(w!==void 0||(w=this.index.numFmt[d],w!==void 0))return w;w=this.index.numFmt[d]=164+this.model.numFmts.length;const S=this.map.numFmt.toXml({id:w,formatCode:d});return this.model.numFmts.push(S),w}_addFont(d){const w=this.map.font.toXml(d);let S=this.index.font[w];return S===void 0&&(S=this.index.font[w]=this.model.fonts.length,this.model.fonts.push(w)),S}_addBorder(d){const w=this.map.border.toXml(d);let S=this.index.border[w];return S===void 0&&(S=this.index.border[w]=this.model.borders.length,this.model.borders.push(w)),S}_addFill(d){const w=this.map.fill.toXml(d);let S=this.index.fill[w];return S===void 0&&(S=this.index.fill[w]=this.model.fills.length,this.model.fills.push(w)),S}}u.STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},u.STATIC_XFORMS={cellStyles:new r({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new r({tag:"dxfs",$:{count:0}}),tableStyles:new r({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new r({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},u.Mock=class extends u{constructor(){super(),this.model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]}}parseStream(p){return p.autodrain(),Promise.resolve()}addStyleModel(p,d){return d===c.ValueType.Date?this.dateStyleId:0}get dateStyleId(){if(!this._dateStyleId){const p={numFmtId:s.getDefaultFmtId("mm-dd-yy")};this._dateStyleId=this.model.styles.length,this.model.styles.push(p)}return this._dateStyleId}getStyleModel(){return{}}},x.exports=u},{"../../../doc/enums":7,"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"../static-xform":120,"./border-xform":127,"./dxf-xform":129,"./fill-xform":130,"./font-xform":131,"./numfmt-xform":132,"./style-xform":134}],136:[function(n,x,_){const c=n("../base-xform");class o extends c{constructor(r){super(),this.model=r}get tag(){return"u"}render(r,t){if((t=t||this.model)===!0)r.leafNode("u");else{const e=o.Attributes[t];e&&r.leafNode("u",e)}}parseOpen(r){r.name==="u"&&(this.model=r.attributes.val||!0)}parseText(){}parseClose(){return!1}}o.Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},x.exports=o},{"../base-xform":32}],137:[function(n,x,_){const c=n("../base-xform"),o=n("./filter-column-xform");x.exports=class extends c{constructor(){super(),this.map={filterColumn:new o}}get tag(){return"autoFilter"}prepare(a){a.columns.forEach((r,t)=>{this.map.filterColumn.prepare(r,{index:t})})}render(a,r){return a.openNode(this.tag,{ref:r.autoFilterRef}),r.columns.forEach(t=>{this.map.filterColumn.render(a,t)}),a.closeNode(),!0}parseOpen(a){if(this.parser)return this.parser.parseOpen(a),!0;switch(a.name){case this.tag:return this.model={autoFilterRef:a.attributes.ref,columns:[]},!0;default:if(this.parser=this.map[a.name],this.parser)return this.parseOpen(a),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(a))}}parseText(a){this.parser&&this.parser.parseText(a)}parseClose(a){if(this.parser)return this.parser.parseClose(a)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;if(a===this.tag)return!1;throw new Error("Unexpected xml node in parseClose: "+a)}}},{"../base-xform":32,"./filter-column-xform":139}],138:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"customFilter"}render(o,a){o.leafNode(this.tag,{val:a.val,operator:a.operator})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val,operator:o.attributes.operator},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],139:[function(n,x,_){const c=n("../base-xform"),o=n("../list-xform"),a=n("./custom-filter-xform"),r=n("./filter-xform");x.exports=class extends c{constructor(){super(),this.map={customFilters:new o({tag:"customFilters",count:!1,empty:!0,childXform:new a}),filters:new o({tag:"filters",count:!1,empty:!0,childXform:new r})}}get tag(){return"filterColumn"}prepare(t,e){t.colId=e.index.toString()}render(t,e){return e.customFilters?(t.openNode(this.tag,{colId:e.colId,hiddenButton:e.filterButton?"0":"1"}),this.map.customFilters.render(t,e.customFilters),t.closeNode(),!0):(t.leafNode(this.tag,{colId:e.colId,hiddenButton:e.filterButton?"0":"1"}),!0)}parseOpen(t){if(this.parser)return this.parser.parseOpen(t),!0;const{attributes:e}=t;switch(t.name){case this.tag:return this.model={filterButton:e.hiddenButton==="0"},!0;default:if(this.parser=this.map[t.name],this.parser)return this.parseOpen(t),!0;throw new Error("Unexpected xml node in parseOpen: "+JSON.stringify(t))}}parseText(){}parseClose(t){return this.parser?(this.parser.parseClose(t)||(this.parser=void 0),!0):t===this.tag?(this.model.customFilters=this.map.customFilters.model,!1):!0}}},{"../base-xform":32,"../list-xform":71,"./custom-filter-xform":138,"./filter-xform":140}],140:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"filter"}render(o,a){o.leafNode(this.tag,{val:a.val})}parseOpen(o){return o.name===this.tag&&(this.model={val:o.attributes.val},!0)}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],141:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"tableColumn"}prepare(o,a){o.id=a.index+1}render(o,a){return o.leafNode(this.tag,{id:a.id.toString(),name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId}),!0}parseOpen(o){if(o.name===this.tag){const{attributes:a}=o;return this.model={name:a.name,totalsRowLabel:a.totalsRowLabel,totalsRowFunction:a.totalsRowFunction,dxfId:a.dxfId},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],142:[function(n,x,_){const c=n("../base-xform");x.exports=class extends c{get tag(){return"tableStyleInfo"}render(o,a){return o.leafNode(this.tag,{name:a.theme?a.theme:void 0,showFirstColumn:a.showFirstColumn?"1":"0",showLastColumn:a.showLastColumn?"1":"0",showRowStripes:a.showRowStripes?"1":"0",showColumnStripes:a.showColumnStripes?"1":"0"}),!0}parseOpen(o){if(o.name===this.tag){const{attributes:a}=o;return this.model={theme:a.name?a.name:null,showFirstColumn:a.showFirstColumn==="1",showLastColumn:a.showLastColumn==="1",showRowStripes:a.showRowStripes==="1",showColumnStripes:a.showColumnStripes==="1"},!0}return!1}parseText(){}parseClose(){return!1}}},{"../base-xform":32}],143:[function(n,x,_){const c=n("../../../utils/xml-stream"),o=n("../base-xform"),a=n("../list-xform"),r=n("./auto-filter-xform"),t=n("./table-column-xform"),e=n("./table-style-info-xform");class l extends o{constructor(){super(),this.map={autoFilter:new r,tableColumns:new a({tag:"tableColumns",count:!0,empty:!0,childXform:new t}),tableStyleInfo:new e}}prepare(s,f){this.map.autoFilter.prepare(s),this.map.tableColumns.prepare(s.columns,f)}get tag(){return"table"}render(s,f){s.openXml(c.StdDocAttributes),s.openNode(this.tag,{...l.TABLE_ATTRIBUTES,id:f.id,name:f.name,displayName:f.displayName||f.name,ref:f.tableRef,totalsRowCount:f.totalsRow?"1":void 0,totalsRowShown:f.totalsRow?void 0:"1",headerRowCount:f.headerRow?"1":"0"}),this.map.autoFilter.render(s,f),this.map.tableColumns.render(s,f.columns),this.map.tableStyleInfo.render(s,f.style),s.closeNode()}parseOpen(s){if(this.parser)return this.parser.parseOpen(s),!0;const{name:f,attributes:h}=s;return f===this.tag?(this.reset(),this.model={name:h.name,displayName:h.displayName||h.name,tableRef:h.ref,totalsRow:h.totalsRowCount==="1",headerRow:h.headerRowCount==="1"}):(this.parser=this.map[s.name],this.parser&&this.parser.parseOpen(s)),!0}parseText(s){this.parser&&this.parser.parseText(s)}parseClose(s){return this.parser?(this.parser.parseClose(s)||(this.parser=void 0),!0):s===this.tag?(this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((f,h)=>{this.model.columns[h].filterButton=f.filterButton})),this.model.style=this.map.tableStyleInfo.model,!1):!0}reconcile(s,f){s.columns.forEach(h=>{h.dxfId!==void 0&&(h.style=f.styles.getDxfStyle(h.dxfId))})}}l.TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},x.exports=l},{"../../../utils/xml-stream":28,"../base-xform":32,"../list-xform":71,"./auto-filter-xform":137,"./table-column-xform":141,"./table-style-info-xform":142}],144:[function(n,x,_){(function(c,o){(function(){const a=n("fs"),r=n("jszip"),{PassThrough:t}=n("readable-stream"),e=n("../utils/zip-stream"),l=n("../utils/stream-buf"),i=n("../utils/utils"),s=n("../utils/xml-stream"),{bufferToString:f}=n("../utils/browser-buffer-decode"),h=n("./xform/style/styles-xform"),u=n("./xform/core/core-xform"),p=n("./xform/strings/shared-strings-xform"),d=n("./xform/core/relationships-xform"),w=n("./xform/core/content-types-xform"),S=n("./xform/core/app-xform"),A=n("./xform/book/workbook-xform"),N=n("./xform/sheet/worksheet-xform"),L=n("./xform/drawing/drawing-xform"),I=n("./xform/table/table-xform"),P=n("./xform/comment/comments-xform"),D=n("./xform/comment/vml-notes-xform"),U=n("./xml/theme1");class B{constructor(C){this.workbook=C}async readFile(C,v){if(!await i.fs.exists(C))throw new Error("File not found: "+C);const m=a.createReadStream(C);try{const b=await this.read(m,v);return m.close(),b}catch(b){throw m.close(),b}}parseRels(C){return new d().parseStream(C)}parseWorkbook(C){return new A().parseStream(C)}parseSharedStrings(C){return new p().parseStream(C)}reconcile(C,v){const m=new A,b=new N(v),g=new L,y=new I;m.reconcile(C);const E={media:C.media,mediaIndex:C.mediaIndex};Object.keys(C.drawings).forEach(z=>{const $=C.drawings[z],Z=C.drawingRels[z];Z&&(E.rels=Z.reduce((j,H)=>(j[H.Id]=H,j),{}),($.anchors||[]).forEach(j=>{const H=j.picture&&j.picture.hyperlinks;H&&E.rels[H.rId]&&(H.hyperlink=E.rels[H.rId].Target,delete H.rId)}),g.reconcile($,E))});const R={styles:C.styles};Object.values(C.tables).forEach(z=>{y.reconcile(z,R)});const O={styles:C.styles,sharedStrings:C.sharedStrings,media:C.media,mediaIndex:C.mediaIndex,date1904:C.properties&&C.properties.date1904,drawings:C.drawings,comments:C.comments,tables:C.tables,vmlDrawings:C.vmlDrawings};C.worksheets.forEach(z=>{z.relationships=C.worksheetRels[z.sheetNo],b.reconcile(z,O)}),delete C.worksheetHash,delete C.worksheetRels,delete C.globalRels,delete C.sharedStrings,delete C.workbookRels,delete C.sheetDefs,delete C.styles,delete C.mediaIndex,delete C.drawings,delete C.drawingRels,delete C.vmlDrawings}async _processWorksheetEntry(C,v,m,b,g){const y=new N(b),E=await y.parseStream(C);E.sheetNo=m,v.worksheetHash[g]=E,v.worksheets.push(E)}async _processCommentEntry(C,v,m){const b=new P,g=await b.parseStream(C);v.comments[`../${m}.xml`]=g}async _processTableEntry(C,v,m){const b=new I,g=await b.parseStream(C);v.tables[`../tables/${m}.xml`]=g}async _processWorksheetRelsEntry(C,v,m){const b=new d,g=await b.parseStream(C);v.worksheetRels[m]=g}async _processMediaEntry(C,v,m){const b=m.lastIndexOf(".");if(b>=1){const g=m.substr(b+1),y=m.substr(0,b);await new Promise((E,R)=>{const O=new l;O.on("finish",()=>{v.mediaIndex[m]=v.media.length,v.mediaIndex[y]=v.media.length;const z={type:"image",name:y,extension:g,buffer:O.toBuffer()};v.media.push(z),E()}),C.on("error",z=>{R(z)}),C.pipe(O)})}}async _processDrawingEntry(C,v,m){const b=new L,g=await b.parseStream(C);v.drawings[m]=g}async _processDrawingRelsEntry(C,v,m){const b=new d,g=await b.parseStream(C);v.drawingRels[m]=g}async _processVmlDrawingEntry(C,v,m){const b=new D,g=await b.parseStream(C);v.vmlDrawings[`../drawings/${m}.vml`]=g}async _processThemeEntry(C,v,m){await new Promise((b,g)=>{const y=new l;C.on("error",g),y.on("error",g),y.on("finish",()=>{v.themes[m]=y.read().toString(),b()}),C.pipe(y)})}createInputStream(){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")}async read(C,v){!C[Symbol.asyncIterator]&&C.pipe&&(C=C.pipe(new t));const m=[];for await(const b of C)m.push(b);return this.load(o.concat(m),v)}async load(C,v){let m;m=v&&v.base64?o.from(C.toString(),"base64"):C;const b={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},g=await r.loadAsync(m);for(const y of Object.values(g.files))if(!y.dir){let E,R=y.name;if(R[0]==="/"&&(R=R.substr(1)),R.match(/xl\/media\//)||R.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))E=new t,E.write(await y.async("nodebuffer"));else{let O;E=new t({writableObjectMode:!0,readableObjectMode:!0}),O=c.browser?f(await y.async("nodebuffer")):await y.async("string");const z=16384;for(let $=0;$<O.length;$+=z)E.write(O.substring($,$+z))}switch(E.end(),R){case"_rels/.rels":b.globalRels=await this.parseRels(E);break;case"xl/workbook.xml":{const O=await this.parseWorkbook(E);b.sheets=O.sheets,b.definedNames=O.definedNames,b.views=O.views,b.properties=O.properties,b.calcProperties=O.calcProperties;break}case"xl/_rels/workbook.xml.rels":b.workbookRels=await this.parseRels(E);break;case"xl/sharedStrings.xml":b.sharedStrings=new p,await b.sharedStrings.parseStream(E);break;case"xl/styles.xml":b.styles=new h,await b.styles.parseStream(E);break;case"docProps/app.xml":{const O=new S,z=await O.parseStream(E);b.company=z.company,b.manager=z.manager;break}case"docProps/core.xml":{const O=new u,z=await O.parseStream(E);Object.assign(b,z);break}default:{let O=R.match(/xl\/worksheets\/sheet(\d+)[.]xml/);if(O){await this._processWorksheetEntry(E,b,O[1],v,R);break}if(O=R.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/),O){await this._processWorksheetRelsEntry(E,b,O[1]);break}if(O=R.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/),O){await this._processThemeEntry(E,b,O[1]);break}if(O=R.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/),O){await this._processMediaEntry(E,b,O[1]);break}if(O=R.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/),O){await this._processDrawingEntry(E,b,O[1]);break}if(O=R.match(/xl\/(comments\d+)[.]xml/),O){await this._processCommentEntry(E,b,O[1]);break}if(O=R.match(/xl\/tables\/(table\d+)[.]xml/),O){await this._processTableEntry(E,b,O[1]);break}if(O=R.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/),O){await this._processDrawingRelsEntry(E,b,O[1]);break}if(O=R.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/),O){await this._processVmlDrawingEntry(E,b,O[1]);break}}}}return this.reconcile(b,v),this.workbook.model=b,this.workbook}async addMedia(C,v){await Promise.all(v.media.map(async m=>{if(m.type==="image"){const b=`xl/media/${m.name}.${m.extension}`;if(m.filename){const g=await(function(y,E){return new Promise((R,O)=>{a.readFile(y,E,(z,$)=>{z?O(z):R($)})})})(m.filename);return C.append(g,{name:b})}if(m.buffer)return C.append(m.buffer,{name:b});if(m.base64){const g=m.base64,y=g.substring(g.indexOf(",")+1);return C.append(y,{name:b,base64:!0})}}throw new Error("Unsupported media")}))}addDrawings(C,v){const m=new L,b=new d;v.worksheets.forEach(g=>{const{drawing:y}=g;if(y){m.prepare(y,{});let E=m.toXml(y);C.append(E,{name:`xl/drawings/${y.name}.xml`}),E=b.toXml(y.rels),C.append(E,{name:`xl/drawings/_rels/${y.name}.xml.rels`})}})}addTables(C,v){const m=new I;v.worksheets.forEach(b=>{const{tables:g}=b;g.forEach(y=>{m.prepare(y,{});const E=m.toXml(y);C.append(E,{name:"xl/tables/"+y.target})})})}async addContentTypes(C,v){const m=new w().toXml(v);C.append(m,{name:"[Content_Types].xml"})}async addApp(C,v){const m=new S().toXml(v);C.append(m,{name:"docProps/app.xml"})}async addCore(C,v){const m=new u;C.append(m.toXml(v),{name:"docProps/core.xml"})}async addThemes(C,v){const m=v.themes||{theme1:U};Object.keys(m).forEach(b=>{const g=m[b],y=`xl/theme/${b}.xml`;C.append(g,{name:y})})}async addOfficeRels(C){const v=new d().toXml([{Id:"rId1",Type:B.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:B.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:B.RelType.ExtenderProperties,Target:"docProps/app.xml"}]);C.append(v,{name:"_rels/.rels"})}async addWorkbookRels(C,v){let m=1;const b=[{Id:"rId"+m++,Type:B.RelType.Styles,Target:"styles.xml"},{Id:"rId"+m++,Type:B.RelType.Theme,Target:"theme/theme1.xml"}];v.sharedStrings.count&&b.push({Id:"rId"+m++,Type:B.RelType.SharedStrings,Target:"sharedStrings.xml"}),v.worksheets.forEach(y=>{y.rId="rId"+m++,b.push({Id:y.rId,Type:B.RelType.Worksheet,Target:`worksheets/sheet${y.id}.xml`})});const g=new d().toXml(b);C.append(g,{name:"xl/_rels/workbook.xml.rels"})}async addSharedStrings(C,v){v.sharedStrings&&v.sharedStrings.count&&C.append(v.sharedStrings.xml,{name:"xl/sharedStrings.xml"})}async addStyles(C,v){const{xml:m}=v.styles;m&&C.append(m,{name:"xl/styles.xml"})}async addWorkbook(C,v){const m=new A;C.append(m.toXml(v),{name:"xl/workbook.xml"})}async addWorksheets(C,v){const m=new N,b=new d,g=new P,y=new D;v.worksheets.forEach(E=>{let R=new s;m.render(R,E),C.append(R.xml,{name:`xl/worksheets/sheet${E.id}.xml`}),E.rels&&E.rels.length&&(R=new s,b.render(R,E.rels),C.append(R.xml,{name:`xl/worksheets/_rels/sheet${E.id}.xml.rels`})),E.comments.length>0&&(R=new s,g.render(R,E),C.append(R.xml,{name:`xl/comments${E.id}.xml`}),R=new s,y.render(R,E),C.append(R.xml,{name:`xl/drawings/vmlDrawing${E.id}.vml`}))})}_finalize(C){return new Promise((v,m)=>{C.on("finish",()=>{v(this)}),C.on("error",m),C.finalize()})}prepareModel(C,v){C.creator=C.creator||"ExcelJS",C.lastModifiedBy=C.lastModifiedBy||"ExcelJS",C.created=C.created||new Date,C.modified=C.modified||new Date,C.useSharedStrings=v.useSharedStrings===void 0||v.useSharedStrings,C.useStyles=v.useStyles===void 0||v.useStyles,C.sharedStrings=new p,C.styles=C.useStyles?new h(!0):new h.Mock;const m=new A,b=new N;m.prepare(C);const g={sharedStrings:C.sharedStrings,styles:C.styles,date1904:C.properties.date1904,drawingsCount:0,media:C.media};g.drawings=C.drawings=[],g.commentRefs=C.commentRefs=[];let y=0;C.tables=[],C.worksheets.forEach(E=>{E.tables.forEach(R=>{y++,R.target=`table${y}.xml`,R.id=y,C.tables.push(R)}),b.prepare(E,g)})}async write(C,v){v=v||{};const{model:m}=this.workbook,b=new e.ZipWriter(v.zip);return b.pipe(C),this.prepareModel(m,v),await this.addContentTypes(b,m),await this.addOfficeRels(b,m),await this.addWorkbookRels(b,m),await this.addWorksheets(b,m),await this.addSharedStrings(b,m),await this.addDrawings(b,m),await this.addTables(b,m),await Promise.all([this.addThemes(b,m),this.addStyles(b,m)]),await this.addMedia(b,m),await Promise.all([this.addApp(b,m),this.addCore(b,m)]),await this.addWorkbook(b,m),this._finalize(b)}writeFile(C,v){const m=a.createWriteStream(C);return new Promise((b,g)=>{m.on("finish",()=>{b()}),m.on("error",y=>{g(y)}),this.write(m,v).then(()=>{m.end()}).catch(y=>{g(y)})})}async writeBuffer(C){const v=new l;return await this.write(v,C),v.read()}}B.RelType=n("./rel-type"),x.exports=B}).call(this)}).call(this,n("_process"),n("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":24,"../utils/utils":27,"../utils/xml-stream":28,"../utils/zip-stream":29,"./rel-type":31,"./xform/book/workbook-xform":38,"./xform/comment/comments-xform":40,"./xform/comment/vml-notes-xform":45,"./xform/core/app-xform":51,"./xform/core/content-types-xform":52,"./xform/core/core-xform":53,"./xform/core/relationships-xform":55,"./xform/drawing/drawing-xform":62,"./xform/sheet/worksheet-xform":115,"./xform/strings/shared-strings-xform":124,"./xform/style/styles-xform":135,"./xform/table/table-xform":143,"./xml/theme1":145,_process:467,buffer:220,fs:216,jszip:441,"readable-stream":491}],145:[function(n,x,_){x.exports=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
3
- <a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="MS Pゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <a:scene3d> <a:camera prst="orthographicFront"> <a:rot lat="0" lon="0" rev="0"/> </a:camera> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="1200000"/> </a:lightRig> </a:scene3d> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="3"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="2"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="lt1"/> </a:fontRef> </a:style> </a:spDef> <a:lnDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="2"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="1"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </a:style> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>`},{}],146:[function(n,x,_){(function(c){(function(){Object.defineProperty(_,"__esModule",{value:!0}),_.CsvFormatterStream=void 0;const o=n("stream"),a=n("./formatter");class r extends o.Transform{constructor(e){super({writableObjectMode:e.objectMode}),this.hasWrittenBOM=!1,this.formatterOptions=e,this.rowFormatter=new a.RowFormatter(e),this.hasWrittenBOM=!e.writeBOM}transform(e){return this.rowFormatter.rowTransform=e,this}_transform(e,l,i){let s=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,(f,h)=>f?(s=!0,i(f)):(h&&h.forEach(u=>{this.push(c.from(u,"utf8"))}),s=!0,i()))}catch(f){if(s)throw f;i(f)}}_flush(e){this.rowFormatter.finish((l,i)=>l?e(l):(i&&i.forEach(s=>{this.push(c.from(s,"utf8"))}),e()))}}_.CsvFormatterStream=r}).call(this)}).call(this,n("buffer").Buffer)},{"./formatter":150,buffer:220,stream:505}],147:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.FormatterOptions=void 0,_.FormatterOptions=class{constructor(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var o;this.objectMode=!0,this.delimiter=",",this.rowDelimiter=`
4
- `,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,c||{}),c?.quoteHeaders===void 0&&(this.quoteHeaders=this.quoteColumns),c?.quote===!0?this.quote='"':c?.quote===!1&&(this.quote=""),typeof c?.escape!="string"&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&((o=c.writeHeaders)===null||o===void 0||o),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote=`${this.escape}${this.quote}`}}},{}],148:[function(n,x,_){var c=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_,"__esModule",{value:!0}),_.FieldFormatter=void 0;const o=c(n("lodash.isboolean")),a=c(n("lodash.isnil")),r=c(n("lodash.escaperegexp"));_.FieldFormatter=class{constructor(t){this._headers=null,this.formatterOptions=t,t.headers!==null&&(this.headers=t.headers),this.REPLACE_REGEXP=new RegExp(t.quote,"g");const e=`[${t.delimiter}${r.default(t.rowDelimiter)}|\r|
5
- ]`;this.ESCAPE_REGEXP=new RegExp(e)}set headers(t){this._headers=t}shouldQuote(t,e){const l=e?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns;return o.default(l)?l:Array.isArray(l)?l[t]:this._headers!==null&&l[this._headers[t]]}format(t,e,l){const i=(""+(a.default(t)?"":t)).replace(/\0/g,""),{formatterOptions:s}=this;return s.quote!==""&&i.indexOf(s.quote)!==-1?this.quoteField(i.replace(this.REPLACE_REGEXP,s.escapedQuote)):i.search(this.ESCAPE_REGEXP)!==-1||this.shouldQuote(e,l)?this.quoteField(i):i}quoteField(t){const{quote:e}=this.formatterOptions;return`${e}${t}${e}`}}},{"lodash.escaperegexp":442,"lodash.isboolean":444,"lodash.isnil":447}],149:[function(n,x,_){var c=function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(_,"__esModule",{value:!0}),_.RowFormatter=void 0;const o=c(n("lodash.isfunction")),a=c(n("lodash.isequal")),r=n("./FieldFormatter"),t=n("../types");class e{constructor(i){this.rowCount=0,this.formatterOptions=i,this.fieldFormatter=new r.FieldFormatter(i),this.headers=i.headers,this.shouldWriteHeaders=i.shouldWriteHeaders,this.hasWrittenHeaders=!1,this.headers!==null&&(this.fieldFormatter.headers=this.headers),i.transform&&(this.rowTransform=i.transform)}static isRowHashArray(i){return!!Array.isArray(i)&&Array.isArray(i[0])&&i[0].length===2}static isRowArray(i){return Array.isArray(i)&&!this.isRowHashArray(i)}static gatherHeaders(i){return e.isRowHashArray(i)?i.map(s=>s[0]):Array.isArray(i)?i:Object.keys(i)}static createTransform(i){return t.isSyncTransform(i)?(s,f)=>{let h=null;try{h=i(s)}catch(u){return f(u)}return f(null,h)}:(s,f)=>{i(s,f)}}set rowTransform(i){if(!o.default(i))throw new TypeError("The transform should be a function");this._rowTransform=e.createTransform(i)}format(i,s){this.callTransformer(i,(f,h)=>{if(f)return s(f);if(!i)return s(null);const u=[];if(h){const{shouldFormatColumns:p,headers:d}=this.checkHeaders(h);if(this.shouldWriteHeaders&&d&&!this.hasWrittenHeaders&&(u.push(this.formatColumns(d,!0)),this.hasWrittenHeaders=!0),p){const w=this.gatherColumns(h);u.push(this.formatColumns(w,!1))}}return s(null,u)})}finish(i){const s=[];if(this.formatterOptions.alwaysWriteHeaders&&this.rowCount===0){if(!this.headers)return i(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));s.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&s.push(this.formatterOptions.rowDelimiter),i(null,s)}checkHeaders(i){if(this.headers)return{shouldFormatColumns:!0,headers:this.headers};const s=e.gatherHeaders(i);return this.headers=s,this.fieldFormatter.headers=s,this.shouldWriteHeaders?{shouldFormatColumns:!a.default(s,i),headers:s}:{shouldFormatColumns:!0,headers:null}}gatherColumns(i){if(this.headers===null)throw new Error("Headers is currently null");return Array.isArray(i)?e.isRowHashArray(i)?this.headers.map((s,f)=>{const h=i[f];return h?h[1]:""}):e.isRowArray(i)&&!this.shouldWriteHeaders?i:this.headers.map((s,f)=>i[f]):this.headers.map(s=>i[s])}callTransformer(i,s){return this._rowTransform?this._rowTransform(i,s):s(null,i)}formatColumns(i,s){const f=i.map((u,p)=>this.fieldFormatter.format(u,p,s)).join(this.formatterOptions.delimiter),{rowCount:h}=this;return this.rowCount+=1,h?[this.formatterOptions.rowDelimiter,f].join(""):f}}_.RowFormatter=e},{"../types":152,"./FieldFormatter":148,"lodash.isequal":445,"lodash.isfunction":446}],150:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.FieldFormatter=_.RowFormatter=void 0;var c=n("./RowFormatter");Object.defineProperty(_,"RowFormatter",{enumerable:!0,get:function(){return c.RowFormatter}});var o=n("./FieldFormatter");Object.defineProperty(_,"FieldFormatter",{enumerable:!0,get:function(){return o.FieldFormatter}})},{"./FieldFormatter":148,"./RowFormatter":149}],151:[function(n,x,_){(function(c){(function(){var o=Object.create?function(p,d,w,S){S===void 0&&(S=w),Object.defineProperty(p,S,{enumerable:!0,get:function(){return d[w]}})}:function(p,d,w,S){S===void 0&&(S=w),p[S]=d[w]},a=Object.create?function(p,d){Object.defineProperty(p,"default",{enumerable:!0,value:d})}:function(p,d){p.default=d},r=function(p){if(p&&p.__esModule)return p;var d={};if(p!=null)for(var w in p)w!=="default"&&Object.prototype.hasOwnProperty.call(p,w)&&o(d,p,w);return a(d,p),d},t=function(p,d){for(var w in p)w==="default"||Object.prototype.hasOwnProperty.call(d,w)||o(d,p,w)};Object.defineProperty(_,"__esModule",{value:!0}),_.writeToPath=_.writeToString=_.writeToBuffer=_.writeToStream=_.write=_.format=_.FormatterOptions=_.CsvFormatterStream=void 0;const e=n("util"),l=n("stream"),i=r(n("fs")),s=n("./FormatterOptions"),f=n("./CsvFormatterStream");t(n("./types"),_);var h=n("./CsvFormatterStream");Object.defineProperty(_,"CsvFormatterStream",{enumerable:!0,get:function(){return h.CsvFormatterStream}});var u=n("./FormatterOptions");Object.defineProperty(_,"FormatterOptions",{enumerable:!0,get:function(){return u.FormatterOptions}}),_.format=p=>new f.CsvFormatterStream(new s.FormatterOptions(p)),_.write=(p,d)=>{const w=_.format(d),S=e.promisify((A,N)=>{w.write(A,void 0,N)});return p.reduce((A,N)=>A.then(()=>S(N)),Promise.resolve()).then(()=>w.end()).catch(A=>{w.emit("error",A)}),w},_.writeToStream=(p,d,w)=>_.write(d,w).pipe(p),_.writeToBuffer=function(p){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const w=[],S=new l.Writable({write(A,N,L){w.push(A),L()}});return new Promise((A,N)=>{S.on("error",N).on("finish",()=>A(c.concat(w))),_.write(p,d).pipe(S)})},_.writeToString=(p,d)=>_.writeToBuffer(p,d).then(w=>w.toString()),_.writeToPath=(p,d,w)=>{const S=i.createWriteStream(p,{encoding:"utf8"});return _.write(d,w).pipe(S)}}).call(this)}).call(this,n("buffer").Buffer)},{"./CsvFormatterStream":146,"./FormatterOptions":147,"./types":152,buffer:220,fs:216,stream:505,util:527}],152:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.isSyncTransform=void 0,_.isSyncTransform=c=>c.length===1},{}],153:[function(n,x,_){(function(c){(function(){Object.defineProperty(_,"__esModule",{value:!0}),_.CsvParserStream=void 0;const o=n("string_decoder"),a=n("stream"),r=n("./transforms"),t=n("./parser");class e extends a.Transform{constructor(i){super({objectMode:i.objectMode}),this.lines="",this.rowCount=0,this.parsedRowCount=0,this.parsedLineCount=0,this.endEmitted=!1,this.headersEmitted=!1,this.parserOptions=i,this.parser=new t.Parser(i),this.headerTransformer=new r.HeaderTransformer(i),this.decoder=new o.StringDecoder(i.encoding),this.rowTransformerValidator=new r.RowTransformerValidator}get hasHitRowLimit(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}get shouldEmitRows(){return this.parsedRowCount>this.parserOptions.skipRows}get shouldSkipLine(){return this.parsedLineCount<=this.parserOptions.skipLines}transform(i){return this.rowTransformerValidator.rowTransform=i,this}validate(i){return this.rowTransformerValidator.rowValidator=i,this}emit(i){if(i==="end")return this.endEmitted||(this.endEmitted=!0,super.emit("end",this.rowCount)),!1;for(var s=arguments.length,f=new Array(s>1?s-1:0),h=1;h<s;h++)f[h-1]=arguments[h];return super.emit(i,...f)}_transform(i,s,f){if(this.hasHitRowLimit)return f();const h=e.wrapDoneCallback(f);try{const{lines:u}=this,p=u+this.decoder.write(i),d=this.parse(p,!0);return this.processRows(d,h)}catch(u){return h(u)}}_flush(i){const s=e.wrapDoneCallback(i);if(this.hasHitRowLimit)return s();try{const f=this.lines+this.decoder.end(),h=this.parse(f,!1);return this.processRows(h,s)}catch(f){return s(f)}}parse(i,s){if(!i)return[];const{line:f,rows:h}=this.parser.parse(i,s);return this.lines=f,h}processRows(i,s){const f=i.length,h=u=>{const p=S=>S?s(S):u%100!=0?h(u+1):void c(()=>h(u+1));if(this.checkAndEmitHeaders(),u>=f||this.hasHitRowLimit)return s();if(this.parsedLineCount+=1,this.shouldSkipLine)return p();const d=i[u];this.rowCount+=1,this.parsedRowCount+=1;const w=this.rowCount;return this.transformRow(d,(S,A)=>{if(S)return this.rowCount-=1,p(S);if(!A)return p(new Error("expected transform result"));if(A.isValid){if(A.row)return this.pushRow(A.row,p)}else this.emit("data-invalid",A.row,w,A.reason);return p()})};h(0)}transformRow(i,s){try{this.headerTransformer.transform(i,(f,h)=>f?s(f):h?h.isValid?h.row?this.shouldEmitRows?this.rowTransformerValidator.transformAndValidate(h.row,s):this.skipRow(s):(this.rowCount-=1,this.parsedRowCount-=1,s(null,{row:null,isValid:!0})):this.shouldEmitRows?s(null,{isValid:!1,row:i}):this.skipRow(s):s(new Error("Expected result from header transform")))}catch(f){s(f)}}checkAndEmitHeaders(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}skipRow(i){return this.rowCount-=1,i(null,{row:null,isValid:!0})}pushRow(i,s){try{this.parserOptions.objectMode?this.push(i):this.push(JSON.stringify(i)),s()}catch(f){s(f)}}static wrapDoneCallback(i){let s=!1;return function(f){if(f){if(s)throw f;return s=!0,void i(f)}for(var h=arguments.length,u=new Array(h>1?h-1:0),p=1;p<h;p++)u[p-1]=arguments[p];i(...u)}}}_.CsvParserStream=e}).call(this)}).call(this,n("timers").setImmediate)},{"./parser":165,"./transforms":168,stream:505,string_decoder:218,timers:523}],154:[function(n,x,_){var c=function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(_,"__esModule",{value:!0}),_.ParserOptions=void 0;const o=c(n("lodash.escaperegexp")),a=c(n("lodash.isnil"));_.ParserOptions=class{constructor(r){var t;if(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,r||{}),this.delimiter.length>1)throw new Error("delimiter option must be one character long");this.escapedDelimiter=o.default(this.delimiter),this.escapeChar=(t=this.escape)!==null&&t!==void 0?t:this.quote,this.supportsComments=!a.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`),this.maxRows>0&&(this.limitRows=!0)}}},{"lodash.escaperegexp":442,"lodash.isnil":447}],155:[function(n,x,_){var c=Object.create?function(h,u,p,d){d===void 0&&(d=p),Object.defineProperty(h,d,{enumerable:!0,get:function(){return u[p]}})}:function(h,u,p,d){d===void 0&&(d=p),h[d]=u[p]},o=Object.create?function(h,u){Object.defineProperty(h,"default",{enumerable:!0,value:u})}:function(h,u){h.default=u},a=function(h){if(h&&h.__esModule)return h;var u={};if(h!=null)for(var p in h)p!=="default"&&Object.prototype.hasOwnProperty.call(h,p)&&c(u,h,p);return o(u,h),u},r=function(h,u){for(var p in h)p==="default"||Object.prototype.hasOwnProperty.call(u,p)||c(u,h,p)};Object.defineProperty(_,"__esModule",{value:!0}),_.parseString=_.parseFile=_.parseStream=_.parse=_.ParserOptions=_.CsvParserStream=void 0;const t=a(n("fs")),e=n("stream"),l=n("./ParserOptions"),i=n("./CsvParserStream");r(n("./types"),_);var s=n("./CsvParserStream");Object.defineProperty(_,"CsvParserStream",{enumerable:!0,get:function(){return s.CsvParserStream}});var f=n("./ParserOptions");Object.defineProperty(_,"ParserOptions",{enumerable:!0,get:function(){return f.ParserOptions}}),_.parse=h=>new i.CsvParserStream(new l.ParserOptions(h)),_.parseStream=(h,u)=>h.pipe(new i.CsvParserStream(new l.ParserOptions(u))),_.parseFile=function(h){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.createReadStream(h).pipe(new i.CsvParserStream(new l.ParserOptions(u)))},_.parseString=(h,u)=>{const p=new e.Readable;return p.push(h),p.push(null),p.pipe(new i.CsvParserStream(new l.ParserOptions(u)))}},{"./CsvParserStream":153,"./ParserOptions":154,"./types":169,fs:216,stream:505}],156:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.Parser=void 0;const c=n("./Scanner"),o=n("./RowParser"),a=n("./Token");class r{constructor(e){this.parserOptions=e,this.rowParser=new o.RowParser(this.parserOptions)}static removeBOM(e){return e&&e.charCodeAt(0)===65279?e.slice(1):e}parse(e,l){const i=new c.Scanner({line:r.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:l});return this.parserOptions.supportsComments?this.parseWithComments(i):this.parseWithoutComments(i)}parseWithoutComments(e){const l=[];let i=!0;for(;i;)i=this.parseRow(e,l);return{line:e.line,rows:l}}parseWithComments(e){const{parserOptions:l}=this,i=[];for(let s=e.nextCharacterToken;s!==null;s=e.nextCharacterToken)if(a.Token.isTokenComment(s,l)){if(e.advancePastLine()===null)return{line:e.lineFromCursor,rows:i};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:i};e.truncateToCursor()}else if(!this.parseRow(e,i))break;return{line:e.line,rows:i}}parseRow(e,l){if(!e.nextNonSpaceToken)return!1;const i=this.rowParser.parse(e);return i!==null&&(this.parserOptions.ignoreEmpty&&o.RowParser.isEmptyRow(i)||l.push(i),!0)}}_.Parser=r},{"./RowParser":157,"./Scanner":158,"./Token":159}],157:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.RowParser=void 0;const c=n("./column"),o=n("./Token");_.RowParser=class{constructor(a){this.parserOptions=a,this.columnParser=new c.ColumnParser(a)}static isEmptyRow(a){return a.join("").replace(/\s+/g,"")===""}parse(a){const{parserOptions:r}=this,{hasMoreData:t}=a,e=a,l=[];let i=this.getStartToken(e,l);for(;i;){if(o.Token.isTokenRowDelimiter(i))return e.advancePastToken(i),!e.hasMoreCharacters&&o.Token.isTokenCarriageReturn(i,r)&&t?null:(e.truncateToCursor(),l);if(!this.shouldSkipColumnParse(e,i,l)){const s=this.columnParser.parse(e);if(s===null)return null;l.push(s)}i=e.nextNonSpaceToken}return t?null:(e.truncateToCursor(),l)}getStartToken(a,r){const t=a.nextNonSpaceToken;return t!==null&&o.Token.isTokenDelimiter(t,this.parserOptions)?(r.push(""),a.nextNonSpaceToken):t}shouldSkipColumnParse(a,r,t){const{parserOptions:e}=this;if(o.Token.isTokenDelimiter(r,e)){a.advancePastToken(r);const l=a.nextCharacterToken;if(!a.hasMoreCharacters||l!==null&&o.Token.isTokenRowDelimiter(l)||l!==null&&o.Token.isTokenDelimiter(l,e))return t.push(""),!0}return!1}}},{"./Token":159,"./column":164}],158:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.Scanner=void 0;const c=n("./Token"),o=/((?:\r\n)|\n|\r)/;_.Scanner=class{constructor(a){this.cursor=0,this.line=a.line,this.lineLength=this.line.length,this.parserOptions=a.parserOptions,this.hasMoreData=a.hasMoreData,this.cursor=a.cursor||0}get hasMoreCharacters(){return this.lineLength>this.cursor}get nextNonSpaceToken(){const{lineFromCursor:a}=this,r=this.parserOptions.NEXT_TOKEN_REGEXP;if(a.search(r)===-1)return null;const t=r.exec(a);if(t==null)return null;const e=t[1],l=this.cursor+(t.index||0);return new c.Token({token:e,startCursor:l,endCursor:l+e.length-1})}get nextCharacterToken(){const{cursor:a,lineLength:r}=this;return r<=a?null:new c.Token({token:this.line[a],startCursor:a,endCursor:a})}get lineFromCursor(){return this.line.substr(this.cursor)}advancePastLine(){const a=o.exec(this.lineFromCursor);return a?(this.cursor+=(a.index||0)+a[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}advanceTo(a){return this.cursor=a,this}advanceToToken(a){return this.cursor=a.startCursor,this}advancePastToken(a){return this.cursor=a.endCursor+1,this}truncateToCursor(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}}},{"./Token":159}],159:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.Token=void 0,_.Token=class{constructor(c){this.token=c.token,this.startCursor=c.startCursor,this.endCursor=c.endCursor}static isTokenRowDelimiter(c){const o=c.token;return o==="\r"||o===`
6
- `||o===`\r
7
- `}static isTokenCarriageReturn(c,o){return c.token===o.carriageReturn}static isTokenComment(c,o){return o.supportsComments&&!!c&&c.token===o.comment}static isTokenEscapeCharacter(c,o){return c.token===o.escapeChar}static isTokenQuote(c,o){return c.token===o.quote}static isTokenDelimiter(c,o){return c.token===o.delimiter}}},{}],160:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.ColumnFormatter=void 0,_.ColumnFormatter=class{constructor(c){c.trim?this.format=o=>o.trim():c.ltrim?this.format=o=>o.trimLeft():c.rtrim?this.format=o=>o.trimRight():this.format=o=>o}}},{}],161:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.ColumnParser=void 0;const c=n("./NonQuotedColumnParser"),o=n("./QuotedColumnParser"),a=n("../Token");_.ColumnParser=class{constructor(r){this.parserOptions=r,this.quotedColumnParser=new o.QuotedColumnParser(r),this.nonQuotedColumnParser=new c.NonQuotedColumnParser(r)}parse(r){const{nextNonSpaceToken:t}=r;return t!==null&&a.Token.isTokenQuote(t,this.parserOptions)?(r.advanceToToken(t),this.quotedColumnParser.parse(r)):this.nonQuotedColumnParser.parse(r)}}},{"../Token":159,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],162:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.NonQuotedColumnParser=void 0;const c=n("./ColumnFormatter"),o=n("../Token");_.NonQuotedColumnParser=class{constructor(a){this.parserOptions=a,this.columnFormatter=new c.ColumnFormatter(a)}parse(a){if(!a.hasMoreCharacters)return null;const{parserOptions:r}=this,t=[];let e=a.nextCharacterToken;for(;e&&!o.Token.isTokenDelimiter(e,r)&&!o.Token.isTokenRowDelimiter(e);e=a.nextCharacterToken)t.push(e.token),a.advancePastToken(e);return this.columnFormatter.format(t.join(""))}}},{"../Token":159,"./ColumnFormatter":160}],163:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.QuotedColumnParser=void 0;const c=n("./ColumnFormatter"),o=n("../Token");_.QuotedColumnParser=class{constructor(a){this.parserOptions=a,this.columnFormatter=new c.ColumnFormatter(a)}parse(a){if(!a.hasMoreCharacters)return null;const r=a.cursor,{foundClosingQuote:t,col:e}=this.gatherDataBetweenQuotes(a);if(!t){if(a.advanceTo(r),!a.hasMoreData)throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote||""}' in line: at '${a.lineFromCursor.replace(/[\r\n]/g,"\\n'")}'`);return null}return this.checkForMalformedColumn(a),e}gatherDataBetweenQuotes(a){const{parserOptions:r}=this;let t=!1,e=!1;const l=[];let i=a.nextCharacterToken;for(;!e&&i!==null;i=a.nextCharacterToken){const s=o.Token.isTokenQuote(i,r);if(!t&&s)t=!0;else if(t)if(o.Token.isTokenEscapeCharacter(i,r)){a.advancePastToken(i);const f=a.nextCharacterToken;f!==null&&(o.Token.isTokenQuote(f,r)||o.Token.isTokenEscapeCharacter(f,r))?(l.push(f.token),i=f):s?e=!0:l.push(i.token)}else s?e=!0:l.push(i.token);a.advancePastToken(i)}return{col:this.columnFormatter.format(l.join("")),foundClosingQuote:e}}checkForMalformedColumn(a){const{parserOptions:r}=this,{nextNonSpaceToken:t}=a;if(t){const e=o.Token.isTokenDelimiter(t,r),l=o.Token.isTokenRowDelimiter(t);if(!e&&!l){const i=a.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'");throw new Error(`Parse Error: expected: '${r.escapedDelimiter}' OR new line got: '${t.token}'. at '${i}`)}a.advanceToToken(t)}else a.hasMoreData||a.advancePastLine()}}},{"../Token":159,"./ColumnFormatter":160}],164:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.ColumnFormatter=_.QuotedColumnParser=_.NonQuotedColumnParser=_.ColumnParser=void 0;var c=n("./ColumnParser");Object.defineProperty(_,"ColumnParser",{enumerable:!0,get:function(){return c.ColumnParser}});var o=n("./NonQuotedColumnParser");Object.defineProperty(_,"NonQuotedColumnParser",{enumerable:!0,get:function(){return o.NonQuotedColumnParser}});var a=n("./QuotedColumnParser");Object.defineProperty(_,"QuotedColumnParser",{enumerable:!0,get:function(){return a.QuotedColumnParser}});var r=n("./ColumnFormatter");Object.defineProperty(_,"ColumnFormatter",{enumerable:!0,get:function(){return r.ColumnFormatter}})},{"./ColumnFormatter":160,"./ColumnParser":161,"./NonQuotedColumnParser":162,"./QuotedColumnParser":163}],165:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.QuotedColumnParser=_.NonQuotedColumnParser=_.ColumnParser=_.Token=_.Scanner=_.RowParser=_.Parser=void 0;var c=n("./Parser");Object.defineProperty(_,"Parser",{enumerable:!0,get:function(){return c.Parser}});var o=n("./RowParser");Object.defineProperty(_,"RowParser",{enumerable:!0,get:function(){return o.RowParser}});var a=n("./Scanner");Object.defineProperty(_,"Scanner",{enumerable:!0,get:function(){return a.Scanner}});var r=n("./Token");Object.defineProperty(_,"Token",{enumerable:!0,get:function(){return r.Token}});var t=n("./column");Object.defineProperty(_,"ColumnParser",{enumerable:!0,get:function(){return t.ColumnParser}}),Object.defineProperty(_,"NonQuotedColumnParser",{enumerable:!0,get:function(){return t.NonQuotedColumnParser}}),Object.defineProperty(_,"QuotedColumnParser",{enumerable:!0,get:function(){return t.QuotedColumnParser}})},{"./Parser":156,"./RowParser":157,"./Scanner":158,"./Token":159,"./column":164}],166:[function(n,x,_){var c=function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_,"__esModule",{value:!0}),_.HeaderTransformer=void 0;const o=c(n("lodash.isundefined")),a=c(n("lodash.isfunction")),r=c(n("lodash.uniq")),t=c(n("lodash.groupby"));_.HeaderTransformer=class{constructor(e){this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,this.headersLength=0,this.parserOptions=e,e.headers===!0?this.shouldUseFirstRow=!0:Array.isArray(e.headers)?this.setHeaders(e.headers):a.default(e.headers)&&(this.headersTransform=e.headers)}transform(e,l){return this.shouldMapRow(e)?l(null,this.processRow(e)):l(null,{row:null,isValid:!0})}shouldMapRow(e){const{parserOptions:l}=this;if(!this.headersTransform&&l.renameHeaders&&!this.processedFirstRow){if(!this.receivedHeaders)throw new Error("Error renaming headers: new headers must be provided in an array");return this.processedFirstRow=!0,!1}if(!this.receivedHeaders&&Array.isArray(e)){if(this.headersTransform)this.setHeaders(this.headersTransform(e));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(e)}return!1}return!0}processRow(e){if(!this.headers)return{row:e,isValid:!0};const{parserOptions:l}=this;if(!l.discardUnmappedColumns&&e.length>this.headersLength){if(!l.strictColumnHandling)throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${e.length}`);return{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}}return l.strictColumnHandling&&e.length<this.headersLength?{row:e,isValid:!1,reason:`Column header mismatch expected: ${this.headersLength} columns got: ${e.length}`}:{row:this.mapHeaders(e),isValid:!0}}mapHeaders(e){const l={},{headers:i,headersLength:s}=this;for(let f=0;f<s;f+=1){const h=i[f];if(!o.default(h)){const u=e[f];o.default(u)?l[h]="":l[h]=u}}return l}setHeaders(e){var l;const i=e.filter(s=>!!s);if(r.default(i).length!==i.length){const s=t.default(i),f=Object.keys(s).filter(h=>s[h].length>1);throw new Error("Duplicate headers found "+JSON.stringify(f))}this.headers=e,this.receivedHeaders=!0,this.headersLength=((l=this.headers)===null||l===void 0?void 0:l.length)||0}}},{"lodash.groupby":443,"lodash.isfunction":446,"lodash.isundefined":448,"lodash.uniq":449}],167:[function(n,x,_){var c=function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_,"__esModule",{value:!0}),_.RowTransformerValidator=void 0;const o=c(n("lodash.isfunction")),a=n("../types");class r{constructor(){this._rowTransform=null,this._rowValidator=null}static createTransform(e){return a.isSyncTransform(e)?(l,i)=>{let s=null;try{s=e(l)}catch(f){return i(f)}return i(null,s)}:e}static createValidator(e){return a.isSyncValidate(e)?(l,i)=>{i(null,{row:l,isValid:e(l)})}:(l,i)=>{e(l,(s,f,h)=>s?i(s):i(null,f?{row:l,isValid:f,reason:h}:{row:l,isValid:!1,reason:h}))}}set rowTransform(e){if(!o.default(e))throw new TypeError("The transform should be a function");this._rowTransform=r.createTransform(e)}set rowValidator(e){if(!o.default(e))throw new TypeError("The validate should be a function");this._rowValidator=r.createValidator(e)}transformAndValidate(e,l){return this.callTransformer(e,(i,s)=>i?l(i):s?this.callValidator(s,(f,h)=>f?l(f):h&&!h.isValid?l(null,{row:s,isValid:!1,reason:h.reason}):l(null,{row:s,isValid:!0})):l(null,{row:null,isValid:!0}))}callTransformer(e,l){return this._rowTransform?this._rowTransform(e,l):l(null,e)}callValidator(e,l){return this._rowValidator?this._rowValidator(e,l):l(null,{row:e,isValid:!0})}}_.RowTransformerValidator=r},{"../types":169,"lodash.isfunction":446}],168:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.HeaderTransformer=_.RowTransformerValidator=void 0;var c=n("./RowTransformerValidator");Object.defineProperty(_,"RowTransformerValidator",{enumerable:!0,get:function(){return c.RowTransformerValidator}});var o=n("./HeaderTransformer");Object.defineProperty(_,"HeaderTransformer",{enumerable:!0,get:function(){return o.HeaderTransformer}})},{"./HeaderTransformer":166,"./RowTransformerValidator":167}],169:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.isSyncValidate=_.isSyncTransform=void 0,_.isSyncTransform=c=>c.length===1,_.isSyncValidate=c=>c.length===1},{}],170:[function(n,x,_){const c=_;c.bignum=n("bn.js"),c.define=n("./asn1/api").define,c.base=n("./asn1/base"),c.constants=n("./asn1/constants"),c.decoders=n("./asn1/decoders"),c.encoders=n("./asn1/encoders")},{"./asn1/api":171,"./asn1/base":173,"./asn1/constants":177,"./asn1/decoders":179,"./asn1/encoders":182,"bn.js":184}],171:[function(n,x,_){const c=n("./encoders"),o=n("./decoders"),a=n("inherits");function r(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}_.define=function(t,e){return new r(t,e)},r.prototype._createNamed=function(t){const e=this.name;function l(i){this._initNamed(i,e)}return a(l,t),l.prototype._initNamed=function(i,s){t.call(this,i,s)},new l(this)},r.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(o[t])),this.decoders[t]},r.prototype.decode=function(t,e,l){return this._getDecoder(e).decode(t,l)},r.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(c[t])),this.encoders[t]},r.prototype.encode=function(t,e,l){return this._getEncoder(e).encode(t,l)}},{"./decoders":179,"./encoders":182,inherits:440}],172:[function(n,x,_){const c=n("inherits"),o=n("../base/reporter").Reporter,a=n("safer-buffer").Buffer;function r(e,l){o.call(this,l),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function t(e,l){if(Array.isArray(e))this.length=0,this.value=e.map((function(i){return t.isEncoderBuffer(i)||(i=new t(i,l)),this.length+=i.length,i}),this);else if(typeof e=="number"){if(!(0<=e&&e<=255))return l.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if(typeof e=="string")this.value=e,this.length=a.byteLength(e);else{if(!a.isBuffer(e))return l.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}c(r,o),_.DecoderBuffer=r,r.isDecoderBuffer=function(e){return e instanceof r?!0:typeof e=="object"&&a.isBuffer(e.base)&&e.constructor.name==="DecoderBuffer"&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.save=="function"&&typeof e.restore=="function"&&typeof e.isEmpty=="function"&&typeof e.readUInt8=="function"&&typeof e.skip=="function"&&typeof e.raw=="function"},r.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},r.prototype.restore=function(e){const l=new r(this.base);return l.offset=e.offset,l.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),l},r.prototype.isEmpty=function(){return this.offset===this.length},r.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},r.prototype.skip=function(e,l){if(!(this.offset+e<=this.length))return this.error(l||"DecoderBuffer overrun");const i=new r(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i},r.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},_.EncoderBuffer=t,t.isEncoderBuffer=function(e){return e instanceof t?!0:typeof e=="object"&&e.constructor.name==="EncoderBuffer"&&typeof e.length=="number"&&typeof e.join=="function"},t.prototype.join=function(e,l){return e||(e=a.alloc(this.length)),l||(l=0),this.length===0||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(e,l),l+=i.length})):(typeof this.value=="number"?e[l]=this.value:typeof this.value=="string"?e.write(this.value,l):a.isBuffer(this.value)&&this.value.copy(e,l),l+=this.length)),e}},{"../base/reporter":175,inherits:440,"safer-buffer":495}],173:[function(n,x,_){const c=_;c.Reporter=n("./reporter").Reporter,c.DecoderBuffer=n("./buffer").DecoderBuffer,c.EncoderBuffer=n("./buffer").EncoderBuffer,c.Node=n("./node")},{"./buffer":172,"./node":174,"./reporter":175}],174:[function(n,x,_){const c=n("../base/reporter").Reporter,o=n("../base/buffer").EncoderBuffer,a=n("../base/buffer").DecoderBuffer,r=n("minimalistic-assert"),t=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],e=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(t);function l(s,f,h){const u={};this._baseState=u,u.name=h,u.enc=s,u.parent=f||null,u.children=null,u.tag=null,u.args=null,u.reverseArgs=null,u.choice=null,u.optional=!1,u.any=!1,u.obj=!1,u.use=null,u.useDecoder=null,u.key=null,u.default=null,u.explicit=null,u.implicit=null,u.contains=null,u.parent||(u.children=[],this._wrap())}x.exports=l;const i=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];l.prototype.clone=function(){const s=this._baseState,f={};i.forEach((function(u){f[u]=s[u]}));const h=new this.constructor(f.parent);return h._baseState=f,h},l.prototype._wrap=function(){const s=this._baseState;e.forEach((function(f){this[f]=function(){const h=new this.constructor(this);return s.children.push(h),h[f].apply(h,arguments)}}),this)},l.prototype._init=function(s){const f=this._baseState;r(f.parent===null),s.call(this),f.children=f.children.filter((function(h){return h._baseState.parent===this}),this),r.equal(f.children.length,1,"Root node can have only one child")},l.prototype._useArgs=function(s){const f=this._baseState,h=s.filter((function(u){return u instanceof this.constructor}),this);s=s.filter((function(u){return!(u instanceof this.constructor)}),this),h.length!==0&&(r(f.children===null),f.children=h,h.forEach((function(u){u._baseState.parent=this}),this)),s.length!==0&&(r(f.args===null),f.args=s,f.reverseArgs=s.map((function(u){if(typeof u!="object"||u.constructor!==Object)return u;const p={};return Object.keys(u).forEach((function(d){d==(0|d)&&(d|=0);const w=u[d];p[w]=d})),p})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(s){l.prototype[s]=function(){const f=this._baseState;throw new Error(s+" not implemented for encoding: "+f.enc)}})),t.forEach((function(s){l.prototype[s]=function(){const f=this._baseState,h=Array.prototype.slice.call(arguments);return r(f.tag===null),f.tag=s,this._useArgs(h),this}})),l.prototype.use=function(s){r(s);const f=this._baseState;return r(f.use===null),f.use=s,this},l.prototype.optional=function(){return this._baseState.optional=!0,this},l.prototype.def=function(s){const f=this._baseState;return r(f.default===null),f.default=s,f.optional=!0,this},l.prototype.explicit=function(s){const f=this._baseState;return r(f.explicit===null&&f.implicit===null),f.explicit=s,this},l.prototype.implicit=function(s){const f=this._baseState;return r(f.explicit===null&&f.implicit===null),f.implicit=s,this},l.prototype.obj=function(){const s=this._baseState,f=Array.prototype.slice.call(arguments);return s.obj=!0,f.length!==0&&this._useArgs(f),this},l.prototype.key=function(s){const f=this._baseState;return r(f.key===null),f.key=s,this},l.prototype.any=function(){return this._baseState.any=!0,this},l.prototype.choice=function(s){const f=this._baseState;return r(f.choice===null),f.choice=s,this._useArgs(Object.keys(s).map((function(h){return s[h]}))),this},l.prototype.contains=function(s){const f=this._baseState;return r(f.use===null),f.contains=s,this},l.prototype._decode=function(s,f){const h=this._baseState;if(h.parent===null)return s.wrapResult(h.children[0]._decode(s,f));let u,p=h.default,d=!0,w=null;if(h.key!==null&&(w=s.enterKey(h.key)),h.optional){let S=null;if(h.explicit!==null?S=h.explicit:h.implicit!==null?S=h.implicit:h.tag!==null&&(S=h.tag),S!==null||h.any){if(d=this._peekTag(s,S,h.any),s.isError(d))return d}else{const A=s.save();try{h.choice===null?this._decodeGeneric(h.tag,s,f):this._decodeChoice(s,f),d=!0}catch{d=!1}s.restore(A)}}if(h.obj&&d&&(u=s.enterObject()),d){if(h.explicit!==null){const A=this._decodeTag(s,h.explicit);if(s.isError(A))return A;s=A}const S=s.offset;if(h.use===null&&h.choice===null){let A;h.any&&(A=s.save());const N=this._decodeTag(s,h.implicit!==null?h.implicit:h.tag,h.any);if(s.isError(N))return N;h.any?p=s.raw(A):s=N}if(f&&f.track&&h.tag!==null&&f.track(s.path(),S,s.length,"tagged"),f&&f.track&&h.tag!==null&&f.track(s.path(),s.offset,s.length,"content"),h.any||(p=h.choice===null?this._decodeGeneric(h.tag,s,f):this._decodeChoice(s,f)),s.isError(p))return p;if(h.any||h.choice!==null||h.children===null||h.children.forEach((function(A){A._decode(s,f)})),h.contains&&(h.tag==="octstr"||h.tag==="bitstr")){const A=new a(p);p=this._getUse(h.contains,s._reporterState.obj)._decode(A,f)}}return h.obj&&d&&(p=s.leaveObject(u)),h.key===null||p===null&&d!==!0?w!==null&&s.exitKey(w):s.leaveKey(w,h.key,p),p},l.prototype._decodeGeneric=function(s,f,h){const u=this._baseState;return s==="seq"||s==="set"?null:s==="seqof"||s==="setof"?this._decodeList(f,s,u.args[0],h):/str$/.test(s)?this._decodeStr(f,s,h):s==="objid"&&u.args?this._decodeObjid(f,u.args[0],u.args[1],h):s==="objid"?this._decodeObjid(f,null,null,h):s==="gentime"||s==="utctime"?this._decodeTime(f,s,h):s==="null_"?this._decodeNull(f,h):s==="bool"?this._decodeBool(f,h):s==="objDesc"?this._decodeStr(f,s,h):s==="int"||s==="enum"?this._decodeInt(f,u.args&&u.args[0],h):u.use!==null?this._getUse(u.use,f._reporterState.obj)._decode(f,h):f.error("unknown tag: "+s)},l.prototype._getUse=function(s,f){const h=this._baseState;return h.useDecoder=this._use(s,f),r(h.useDecoder._baseState.parent===null),h.useDecoder=h.useDecoder._baseState.children[0],h.implicit!==h.useDecoder._baseState.implicit&&(h.useDecoder=h.useDecoder.clone(),h.useDecoder._baseState.implicit=h.implicit),h.useDecoder},l.prototype._decodeChoice=function(s,f){const h=this._baseState;let u=null,p=!1;return Object.keys(h.choice).some((function(d){const w=s.save(),S=h.choice[d];try{const A=S._decode(s,f);if(s.isError(A))return!1;u={type:d,value:A},p=!0}catch{return s.restore(w),!1}return!0}),this),p?u:s.error("Choice not matched")},l.prototype._createEncoderBuffer=function(s){return new o(s,this.reporter)},l.prototype._encode=function(s,f,h){const u=this._baseState;if(u.default!==null&&u.default===s)return;const p=this._encodeValue(s,f,h);return p===void 0||this._skipDefault(p,f,h)?void 0:p},l.prototype._encodeValue=function(s,f,h){const u=this._baseState;if(u.parent===null)return u.children[0]._encode(s,f||new c);let p=null;if(this.reporter=f,u.optional&&s===void 0){if(u.default===null)return;s=u.default}let d=null,w=!1;if(u.any)p=this._createEncoderBuffer(s);else if(u.choice)p=this._encodeChoice(s,f);else if(u.contains)d=this._getUse(u.contains,h)._encode(s,f),w=!0;else if(u.children)d=u.children.map((function(S){if(S._baseState.tag==="null_")return S._encode(null,f,s);if(S._baseState.key===null)return f.error("Child should have a key");const A=f.enterKey(S._baseState.key);if(typeof s!="object")return f.error("Child expected, but input is not object");const N=S._encode(s[S._baseState.key],f,s);return f.leaveKey(A),N}),this).filter((function(S){return S})),d=this._createEncoderBuffer(d);else if(u.tag==="seqof"||u.tag==="setof"){if(!u.args||u.args.length!==1)return f.error("Too many args for : "+u.tag);if(!Array.isArray(s))return f.error("seqof/setof, but data is not Array");const S=this.clone();S._baseState.implicit=null,d=this._createEncoderBuffer(s.map((function(A){const N=this._baseState;return this._getUse(N.args[0],s)._encode(A,f)}),S))}else u.use!==null?p=this._getUse(u.use,h)._encode(s,f):(d=this._encodePrimitive(u.tag,s),w=!0);if(!u.any&&u.choice===null){const S=u.implicit!==null?u.implicit:u.tag,A=u.implicit===null?"universal":"context";S===null?u.use===null&&f.error("Tag could be omitted only for .use()"):u.use===null&&(p=this._encodeComposite(S,w,A,d))}return u.explicit!==null&&(p=this._encodeComposite(u.explicit,!1,"context",p)),p},l.prototype._encodeChoice=function(s,f){const h=this._baseState,u=h.choice[s.type];return u||r(!1,s.type+" not found in "+JSON.stringify(Object.keys(h.choice))),u._encode(s.value,f)},l.prototype._encodePrimitive=function(s,f){const h=this._baseState;if(/str$/.test(s))return this._encodeStr(f,s);if(s==="objid"&&h.args)return this._encodeObjid(f,h.reverseArgs[0],h.args[1]);if(s==="objid")return this._encodeObjid(f,null,null);if(s==="gentime"||s==="utctime")return this._encodeTime(f,s);if(s==="null_")return this._encodeNull();if(s==="int"||s==="enum")return this._encodeInt(f,h.args&&h.reverseArgs[0]);if(s==="bool")return this._encodeBool(f);if(s==="objDesc")return this._encodeStr(f,s);throw new Error("Unsupported tag: "+s)},l.prototype._isNumstr=function(s){return/^[0-9 ]*$/.test(s)},l.prototype._isPrintstr=function(s){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(s)}},{"../base/buffer":172,"../base/reporter":175,"minimalistic-assert":453}],175:[function(n,x,_){const c=n("inherits");function o(r){this._reporterState={obj:null,path:[],options:r||{},errors:[]}}function a(r,t){this.path=r,this.rethrow(t)}_.Reporter=o,o.prototype.isError=function(r){return r instanceof a},o.prototype.save=function(){const r=this._reporterState;return{obj:r.obj,pathLen:r.path.length}},o.prototype.restore=function(r){const t=this._reporterState;t.obj=r.obj,t.path=t.path.slice(0,r.pathLen)},o.prototype.enterKey=function(r){return this._reporterState.path.push(r)},o.prototype.exitKey=function(r){const t=this._reporterState;t.path=t.path.slice(0,r-1)},o.prototype.leaveKey=function(r,t,e){const l=this._reporterState;this.exitKey(r),l.obj!==null&&(l.obj[t]=e)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){const r=this._reporterState,t=r.obj;return r.obj={},t},o.prototype.leaveObject=function(r){const t=this._reporterState,e=t.obj;return t.obj=r,e},o.prototype.error=function(r){let t;const e=this._reporterState,l=r instanceof a;if(t=l?r:new a(e.path.map((function(i){return"["+JSON.stringify(i)+"]"})).join(""),r.message||r,r.stack),!e.options.partial)throw t;return l||e.errors.push(t),t},o.prototype.wrapResult=function(r){const t=this._reporterState;return t.options.partial?{result:this.isError(r)?null:r,errors:t.errors}:r},c(a,Error),a.prototype.rethrow=function(r){if(this.message=r+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},{inherits:440}],176:[function(n,x,_){function c(o){const a={};return Object.keys(o).forEach((function(r){(0|r)==r&&(r|=0);const t=o[r];a[t]=r})),a}_.tagClass={0:"universal",1:"application",2:"context",3:"private"},_.tagClassByName=c(_.tagClass),_.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},_.tagByName=c(_.tag)},{}],177:[function(n,x,_){const c=_;c._reverse=function(o){const a={};return Object.keys(o).forEach((function(r){(0|r)==r&&(r|=0);const t=o[r];a[t]=r})),a},c.der=n("./der")},{"./der":176}],178:[function(n,x,_){const c=n("inherits"),o=n("bn.js"),a=n("../base/buffer").DecoderBuffer,r=n("../base/node"),t=n("../constants/der");function e(f){this.enc="der",this.name=f.name,this.entity=f,this.tree=new l,this.tree._init(f.body)}function l(f){r.call(this,"der",f)}function i(f,h){let u=f.readUInt8(h);if(f.isError(u))return u;const p=t.tagClass[u>>6],d=(32&u)==0;if((31&u)==31){let w=u;for(u=0;(128&w)==128;){if(w=f.readUInt8(h),f.isError(w))return w;u<<=7,u|=127&w}}else u&=31;return{cls:p,primitive:d,tag:u,tagStr:t.tag[u]}}function s(f,h,u){let p=f.readUInt8(u);if(f.isError(p))return p;if(!h&&p===128)return null;if((128&p)==0)return p;const d=127&p;if(d>4)return f.error("length octect is too long");p=0;for(let w=0;w<d;w++){p<<=8;const S=f.readUInt8(u);if(f.isError(S))return S;p|=S}return p}x.exports=e,e.prototype.decode=function(f,h){return a.isDecoderBuffer(f)||(f=new a(f,h)),this.tree._decode(f,h)},c(l,r),l.prototype._peekTag=function(f,h,u){if(f.isEmpty())return!1;const p=f.save(),d=i(f,'Failed to peek tag: "'+h+'"');return f.isError(d)?d:(f.restore(p),d.tag===h||d.tagStr===h||d.tagStr+"of"===h||u)},l.prototype._decodeTag=function(f,h,u){const p=i(f,'Failed to decode tag of "'+h+'"');if(f.isError(p))return p;let d=s(f,p.primitive,'Failed to get length of "'+h+'"');if(f.isError(d))return d;if(!u&&p.tag!==h&&p.tagStr!==h&&p.tagStr+"of"!==h)return f.error('Failed to match tag: "'+h+'"');if(p.primitive||d!==null)return f.skip(d,'Failed to match body of: "'+h+'"');const w=f.save(),S=this._skipUntilEnd(f,'Failed to skip indefinite length body: "'+this.tag+'"');return f.isError(S)?S:(d=f.offset-w.offset,f.restore(w),f.skip(d,'Failed to match body of: "'+h+'"'))},l.prototype._skipUntilEnd=function(f,h){for(;;){const u=i(f,h);if(f.isError(u))return u;const p=s(f,u.primitive,h);if(f.isError(p))return p;let d;if(d=u.primitive||p!==null?f.skip(p):this._skipUntilEnd(f,h),f.isError(d))return d;if(u.tagStr==="end")break}},l.prototype._decodeList=function(f,h,u,p){const d=[];for(;!f.isEmpty();){const w=this._peekTag(f,"end");if(f.isError(w))return w;const S=u.decode(f,"der",p);if(f.isError(S)&&w)break;d.push(S)}return d},l.prototype._decodeStr=function(f,h){if(h==="bitstr"){const u=f.readUInt8();return f.isError(u)?u:{unused:u,data:f.raw()}}if(h==="bmpstr"){const u=f.raw();if(u.length%2==1)return f.error("Decoding of string type: bmpstr length mismatch");let p="";for(let d=0;d<u.length/2;d++)p+=String.fromCharCode(u.readUInt16BE(2*d));return p}if(h==="numstr"){const u=f.raw().toString("ascii");return this._isNumstr(u)?u:f.error("Decoding of string type: numstr unsupported characters")}if(h==="octstr"||h==="objDesc")return f.raw();if(h==="printstr"){const u=f.raw().toString("ascii");return this._isPrintstr(u)?u:f.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(h)?f.raw().toString():f.error("Decoding of string type: "+h+" unsupported")},l.prototype._decodeObjid=function(f,h,u){let p;const d=[];let w=0,S=0;for(;!f.isEmpty();)S=f.readUInt8(),w<<=7,w|=127&S,(128&S)==0&&(d.push(w),w=0);128&S&&d.push(w);const A=d[0]/40|0,N=d[0]%40;if(p=u?d:[A,N].concat(d.slice(1)),h){let L=h[p.join(" ")];L===void 0&&(L=h[p.join(".")]),L!==void 0&&(p=L)}return p},l.prototype._decodeTime=function(f,h){const u=f.raw().toString();let p,d,w,S,A,N;if(h==="gentime")p=0|u.slice(0,4),d=0|u.slice(4,6),w=0|u.slice(6,8),S=0|u.slice(8,10),A=0|u.slice(10,12),N=0|u.slice(12,14);else{if(h!=="utctime")return f.error("Decoding "+h+" time is not supported yet");p=0|u.slice(0,2),d=0|u.slice(2,4),w=0|u.slice(4,6),S=0|u.slice(6,8),A=0|u.slice(8,10),N=0|u.slice(10,12),p=p<70?2e3+p:1900+p}return Date.UTC(p,d-1,w,S,A,N,0)},l.prototype._decodeNull=function(){return null},l.prototype._decodeBool=function(f){const h=f.readUInt8();return f.isError(h)?h:h!==0},l.prototype._decodeInt=function(f,h){const u=f.raw();let p=new o(u);return h&&(p=h[p.toString(10)]||p),p},l.prototype._use=function(f,h){return typeof f=="function"&&(f=f(h)),f._getDecoder("der").tree}},{"../base/buffer":172,"../base/node":174,"../constants/der":176,"bn.js":184,inherits:440}],179:[function(n,x,_){const c=_;c.der=n("./der"),c.pem=n("./pem")},{"./der":178,"./pem":180}],180:[function(n,x,_){const c=n("inherits"),o=n("safer-buffer").Buffer,a=n("./der");function r(t){a.call(this,t),this.enc="pem"}c(r,a),x.exports=r,r.prototype.decode=function(t,e){const l=t.toString().split(/[\r\n]+/g),i=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let f=-1,h=-1;for(let d=0;d<l.length;d++){const w=l[d].match(s);if(w!==null&&w[2]===i){if(f!==-1){if(w[1]!=="END")break;h=d;break}if(w[1]!=="BEGIN")break;f=d}}if(f===-1||h===-1)throw new Error("PEM section not found for: "+i);const u=l.slice(f+1,h).join("");u.replace(/[^a-z0-9+/=]+/gi,"");const p=o.from(u,"base64");return a.prototype.decode.call(this,p,e)}},{"./der":178,inherits:440,"safer-buffer":495}],181:[function(n,x,_){const c=n("inherits"),o=n("safer-buffer").Buffer,a=n("../base/node"),r=n("../constants/der");function t(i){this.enc="der",this.name=i.name,this.entity=i,this.tree=new e,this.tree._init(i.body)}function e(i){a.call(this,"der",i)}function l(i){return i<10?"0"+i:i}x.exports=t,t.prototype.encode=function(i,s){return this.tree._encode(i,s).join()},c(e,a),e.prototype._encodeComposite=function(i,s,f,h){const u=(function(w,S,A,N){let L;if(w==="seqof"?w="seq":w==="setof"&&(w="set"),r.tagByName.hasOwnProperty(w))L=r.tagByName[w];else{if(typeof w!="number"||(0|w)!==w)return N.error("Unknown tag: "+w);L=w}return L>=31?N.error("Multi-octet tag encoding unsupported"):(S||(L|=32),L|=r.tagClassByName[A||"universal"]<<6,L)})(i,s,f,this.reporter);if(h.length<128){const w=o.alloc(2);return w[0]=u,w[1]=h.length,this._createEncoderBuffer([w,h])}let p=1;for(let w=h.length;w>=256;w>>=8)p++;const d=o.alloc(2+p);d[0]=u,d[1]=128|p;for(let w=1+p,S=h.length;S>0;w--,S>>=8)d[w]=255&S;return this._createEncoderBuffer([d,h])},e.prototype._encodeStr=function(i,s){if(s==="bitstr")return this._createEncoderBuffer([0|i.unused,i.data]);if(s==="bmpstr"){const f=o.alloc(2*i.length);for(let h=0;h<i.length;h++)f.writeUInt16BE(i.charCodeAt(h),2*h);return this._createEncoderBuffer(f)}return s==="numstr"?this._isNumstr(i)?this._createEncoderBuffer(i):this.reporter.error("Encoding of string type: numstr supports only digits and space"):s==="printstr"?this._isPrintstr(i)?this._createEncoderBuffer(i):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(s)||s==="objDesc"?this._createEncoderBuffer(i):this.reporter.error("Encoding of string type: "+s+" unsupported")},e.prototype._encodeObjid=function(i,s,f){if(typeof i=="string"){if(!s)return this.reporter.error("string objid given, but no values map found");if(!s.hasOwnProperty(i))return this.reporter.error("objid not found in values map");i=s[i].split(/[\s.]+/g);for(let d=0;d<i.length;d++)i[d]|=0}else if(Array.isArray(i)){i=i.slice();for(let d=0;d<i.length;d++)i[d]|=0}if(!Array.isArray(i))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(i));if(!f){if(i[1]>=40)return this.reporter.error("Second objid identifier OOB");i.splice(0,2,40*i[0]+i[1])}let h=0;for(let d=0;d<i.length;d++){let w=i[d];for(h++;w>=128;w>>=7)h++}const u=o.alloc(h);let p=u.length-1;for(let d=i.length-1;d>=0;d--){let w=i[d];for(u[p--]=127&w;(w>>=7)>0;)u[p--]=128|127&w}return this._createEncoderBuffer(u)},e.prototype._encodeTime=function(i,s){let f;const h=new Date(i);return s==="gentime"?f=[l(h.getUTCFullYear()),l(h.getUTCMonth()+1),l(h.getUTCDate()),l(h.getUTCHours()),l(h.getUTCMinutes()),l(h.getUTCSeconds()),"Z"].join(""):s==="utctime"?f=[l(h.getUTCFullYear()%100),l(h.getUTCMonth()+1),l(h.getUTCDate()),l(h.getUTCHours()),l(h.getUTCMinutes()),l(h.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+s+" time is not supported yet"),this._encodeStr(f,"octstr")},e.prototype._encodeNull=function(){return this._createEncoderBuffer("")},e.prototype._encodeInt=function(i,s){if(typeof i=="string"){if(!s)return this.reporter.error("String int or enum given, but no values map");if(!s.hasOwnProperty(i))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(i));i=s[i]}if(typeof i!="number"&&!o.isBuffer(i)){const u=i.toArray();!i.sign&&128&u[0]&&u.unshift(0),i=o.from(u)}if(o.isBuffer(i)){let u=i.length;i.length===0&&u++;const p=o.alloc(u);return i.copy(p),i.length===0&&(p[0]=0),this._createEncoderBuffer(p)}if(i<128)return this._createEncoderBuffer(i);if(i<256)return this._createEncoderBuffer([0,i]);let f=1;for(let u=i;u>=256;u>>=8)f++;const h=new Array(f);for(let u=h.length-1;u>=0;u--)h[u]=255&i,i>>=8;return 128&h[0]&&h.unshift(0),this._createEncoderBuffer(o.from(h))},e.prototype._encodeBool=function(i){return this._createEncoderBuffer(i?255:0)},e.prototype._use=function(i,s){return typeof i=="function"&&(i=i(s)),i._getEncoder("der").tree},e.prototype._skipDefault=function(i,s,f){const h=this._baseState;let u;if(h.default===null)return!1;const p=i.join();if(h.defaultBuffer===void 0&&(h.defaultBuffer=this._encodeValue(h.default,s,f).join()),p.length!==h.defaultBuffer.length)return!1;for(u=0;u<p.length;u++)if(p[u]!==h.defaultBuffer[u])return!1;return!0}},{"../base/node":174,"../constants/der":176,inherits:440,"safer-buffer":495}],182:[function(n,x,_){const c=_;c.der=n("./der"),c.pem=n("./pem")},{"./der":181,"./pem":183}],183:[function(n,x,_){const c=n("inherits"),o=n("./der");function a(r){o.call(this,r),this.enc="pem"}c(a,o),x.exports=a,a.prototype.encode=function(r,t){const e=o.prototype.encode.call(this,r).toString("base64"),l=["-----BEGIN "+t.label+"-----"];for(let i=0;i<e.length;i+=64)l.push(e.slice(i,i+64));return l.push("-----END "+t.label+"-----"),l.join(`
8
- `)}},{"./der":181,inherits:440}],184:[function(n,x,_){(function(c,o){function a(k,C){if(!k)throw new Error(C||"Assertion failed")}function r(k,C){k.super_=C;var v=function(){};v.prototype=C.prototype,k.prototype=new v,k.prototype.constructor=k}function t(k,C,v){if(t.isBN(k))return k;this.negative=0,this.words=null,this.length=0,this.red=null,k!==null&&(C!=="le"&&C!=="be"||(v=C,C=10),this._init(k||0,C||10,v||"be"))}var e;typeof c=="object"?c.exports=t:(void 0).BN=t,t.BN=t,t.wordSize=26;try{e=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:n("buffer").Buffer}catch{}function l(k,C){var v=k.charCodeAt(C);return v>=65&&v<=70?v-55:v>=97&&v<=102?v-87:v-48&15}function i(k,C,v){var m=l(k,v);return v-1>=C&&(m|=l(k,v-1)<<4),m}function s(k,C,v,m){for(var b=0,g=Math.min(k.length,v),y=C;y<g;y++){var E=k.charCodeAt(y)-48;b*=m,b+=E>=49?E-49+10:E>=17?E-17+10:E}return b}t.isBN=function(k){return k instanceof t||k!==null&&typeof k=="object"&&k.constructor.wordSize===t.wordSize&&Array.isArray(k.words)},t.max=function(k,C){return k.cmp(C)>0?k:C},t.min=function(k,C){return k.cmp(C)<0?k:C},t.prototype._init=function(k,C,v){if(typeof k=="number")return this._initNumber(k,C,v);if(typeof k=="object")return this._initArray(k,C,v);C==="hex"&&(C=16),a(C===(0|C)&&C>=2&&C<=36);var m=0;(k=k.toString().replace(/\s+/g,""))[0]==="-"&&(m++,this.negative=1),m<k.length&&(C===16?this._parseHex(k,m,v):(this._parseBase(k,C,m),v==="le"&&this._initArray(this.toArray(),C,v)))},t.prototype._initNumber=function(k,C,v){k<0&&(this.negative=1,k=-k),k<67108864?(this.words=[67108863&k],this.length=1):k<4503599627370496?(this.words=[67108863&k,k/67108864&67108863],this.length=2):(a(k<9007199254740992),this.words=[67108863&k,k/67108864&67108863,1],this.length=3),v==="le"&&this._initArray(this.toArray(),C,v)},t.prototype._initArray=function(k,C,v){if(a(typeof k.length=="number"),k.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(k.length/3),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var b,g,y=0;if(v==="be")for(m=k.length-1,b=0;m>=0;m-=3)g=k[m]|k[m-1]<<8|k[m-2]<<16,this.words[b]|=g<<y&67108863,this.words[b+1]=g>>>26-y&67108863,(y+=24)>=26&&(y-=26,b++);else if(v==="le")for(m=0,b=0;m<k.length;m+=3)g=k[m]|k[m+1]<<8|k[m+2]<<16,this.words[b]|=g<<y&67108863,this.words[b+1]=g>>>26-y&67108863,(y+=24)>=26&&(y-=26,b++);return this.strip()},t.prototype._parseHex=function(k,C,v){this.length=Math.ceil((k.length-C)/6),this.words=new Array(this.length);for(var m=0;m<this.length;m++)this.words[m]=0;var b,g=0,y=0;if(v==="be")for(m=k.length-1;m>=C;m-=2)b=i(k,C,m)<<g,this.words[y]|=67108863&b,g>=18?(g-=18,y+=1,this.words[y]|=b>>>26):g+=8;else for(m=(k.length-C)%2==0?C+1:C;m<k.length;m+=2)b=i(k,C,m)<<g,this.words[y]|=67108863&b,g>=18?(g-=18,y+=1,this.words[y]|=b>>>26):g+=8;this.strip()},t.prototype._parseBase=function(k,C,v){this.words=[0],this.length=1;for(var m=0,b=1;b<=67108863;b*=C)m++;m--,b=b/C|0;for(var g=k.length-v,y=g%m,E=Math.min(g,g-y)+v,R=0,O=v;O<E;O+=m)R=s(k,O,O+m,C),this.imuln(b),this.words[0]+R<67108864?this.words[0]+=R:this._iaddn(R);if(y!==0){var z=1;for(R=s(k,O,k.length,C),O=0;O<y;O++)z*=C;this.imuln(z),this.words[0]+R<67108864?this.words[0]+=R:this._iaddn(R)}this.strip()},t.prototype.copy=function(k){k.words=new Array(this.length);for(var C=0;C<this.length;C++)k.words[C]=this.words[C];k.length=this.length,k.negative=this.negative,k.red=this.red},t.prototype.clone=function(){var k=new t(null);return this.copy(k),k},t.prototype._expand=function(k){for(;this.length<k;)this.words[this.length++]=0;return this},t.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},t.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},t.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};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"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],u=[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 p(k,C,v){v.negative=C.negative^k.negative;var m=k.length+C.length|0;v.length=m,m=m-1|0;var b=0|k.words[0],g=0|C.words[0],y=b*g,E=67108863&y,R=y/67108864|0;v.words[0]=E;for(var O=1;O<m;O++){for(var z=R>>>26,$=67108863&R,Z=Math.min(O,C.length-1),j=Math.max(0,O-k.length+1);j<=Z;j++){var H=O-j|0;z+=(y=(b=0|k.words[H])*(g=0|C.words[j])+$)/67108864|0,$=67108863&y}v.words[O]=0|$,R=0|z}return R!==0?v.words[O]=0|R:v.length--,v.strip()}t.prototype.toString=function(k,C){var v;if(C=0|C||1,(k=k||10)===16||k==="hex"){v="";for(var m=0,b=0,g=0;g<this.length;g++){var y=this.words[g],E=(16777215&(y<<m|b)).toString(16);v=(b=y>>>24-m&16777215)!==0||g!==this.length-1?f[6-E.length]+E+v:E+v,(m+=2)>=26&&(m-=26,g--)}for(b!==0&&(v=b.toString(16)+v);v.length%C!=0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}if(k===(0|k)&&k>=2&&k<=36){var R=h[k],O=u[k];v="";var z=this.clone();for(z.negative=0;!z.isZero();){var $=z.modn(O).toString(k);v=(z=z.idivn(O)).isZero()?$+v:f[R-$.length]+$+v}for(this.isZero()&&(v="0"+v);v.length%C!=0;)v="0"+v;return this.negative!==0&&(v="-"+v),v}a(!1,"Base should be between 2 and 36")},t.prototype.toNumber=function(){var k=this.words[0];return this.length===2?k+=67108864*this.words[1]:this.length===3&&this.words[2]===1?k+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-k:k},t.prototype.toJSON=function(){return this.toString(16)},t.prototype.toBuffer=function(k,C){return a(e!==void 0),this.toArrayLike(e,k,C)},t.prototype.toArray=function(k,C){return this.toArrayLike(Array,k,C)},t.prototype.toArrayLike=function(k,C,v){var m=this.byteLength(),b=v||Math.max(1,m);a(m<=b,"byte array longer than desired length"),a(b>0,"Requested array length <= 0"),this.strip();var g,y,E=C==="le",R=new k(b),O=this.clone();if(E){for(y=0;!O.isZero();y++)g=O.andln(255),O.iushrn(8),R[y]=g;for(;y<b;y++)R[y]=0}else{for(y=0;y<b-m;y++)R[y]=0;for(y=0;!O.isZero();y++)g=O.andln(255),O.iushrn(8),R[b-y-1]=g}return R},Math.clz32?t.prototype._countBits=function(k){return 32-Math.clz32(k)}:t.prototype._countBits=function(k){var C=k,v=0;return C>=4096&&(v+=13,C>>>=13),C>=64&&(v+=7,C>>>=7),C>=8&&(v+=4,C>>>=4),C>=2&&(v+=2,C>>>=2),v+C},t.prototype._zeroBits=function(k){if(k===0)return 26;var C=k,v=0;return(8191&C)==0&&(v+=13,C>>>=13),(127&C)==0&&(v+=7,C>>>=7),(15&C)==0&&(v+=4,C>>>=4),(3&C)==0&&(v+=2,C>>>=2),(1&C)==0&&v++,v},t.prototype.bitLength=function(){var k=this.words[this.length-1],C=this._countBits(k);return 26*(this.length-1)+C},t.prototype.zeroBits=function(){if(this.isZero())return 0;for(var k=0,C=0;C<this.length;C++){var v=this._zeroBits(this.words[C]);if(k+=v,v!==26)break}return k},t.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},t.prototype.toTwos=function(k){return this.negative!==0?this.abs().inotn(k).iaddn(1):this.clone()},t.prototype.fromTwos=function(k){return this.testn(k-1)?this.notn(k).iaddn(1).ineg():this.clone()},t.prototype.isNeg=function(){return this.negative!==0},t.prototype.neg=function(){return this.clone().ineg()},t.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},t.prototype.iuor=function(k){for(;this.length<k.length;)this.words[this.length++]=0;for(var C=0;C<k.length;C++)this.words[C]=this.words[C]|k.words[C];return this.strip()},t.prototype.ior=function(k){return a((this.negative|k.negative)==0),this.iuor(k)},t.prototype.or=function(k){return this.length>k.length?this.clone().ior(k):k.clone().ior(this)},t.prototype.uor=function(k){return this.length>k.length?this.clone().iuor(k):k.clone().iuor(this)},t.prototype.iuand=function(k){var C;C=this.length>k.length?k:this;for(var v=0;v<C.length;v++)this.words[v]=this.words[v]&k.words[v];return this.length=C.length,this.strip()},t.prototype.iand=function(k){return a((this.negative|k.negative)==0),this.iuand(k)},t.prototype.and=function(k){return this.length>k.length?this.clone().iand(k):k.clone().iand(this)},t.prototype.uand=function(k){return this.length>k.length?this.clone().iuand(k):k.clone().iuand(this)},t.prototype.iuxor=function(k){var C,v;this.length>k.length?(C=this,v=k):(C=k,v=this);for(var m=0;m<v.length;m++)this.words[m]=C.words[m]^v.words[m];if(this!==C)for(;m<C.length;m++)this.words[m]=C.words[m];return this.length=C.length,this.strip()},t.prototype.ixor=function(k){return a((this.negative|k.negative)==0),this.iuxor(k)},t.prototype.xor=function(k){return this.length>k.length?this.clone().ixor(k):k.clone().ixor(this)},t.prototype.uxor=function(k){return this.length>k.length?this.clone().iuxor(k):k.clone().iuxor(this)},t.prototype.inotn=function(k){a(typeof k=="number"&&k>=0);var C=0|Math.ceil(k/26),v=k%26;this._expand(C),v>0&&C--;for(var m=0;m<C;m++)this.words[m]=67108863&~this.words[m];return v>0&&(this.words[m]=~this.words[m]&67108863>>26-v),this.strip()},t.prototype.notn=function(k){return this.clone().inotn(k)},t.prototype.setn=function(k,C){a(typeof k=="number"&&k>=0);var v=k/26|0,m=k%26;return this._expand(v+1),this.words[v]=C?this.words[v]|1<<m:this.words[v]&~(1<<m),this.strip()},t.prototype.iadd=function(k){var C,v,m;if(this.negative!==0&&k.negative===0)return this.negative=0,C=this.isub(k),this.negative^=1,this._normSign();if(this.negative===0&&k.negative!==0)return k.negative=0,C=this.isub(k),k.negative=1,C._normSign();this.length>k.length?(v=this,m=k):(v=k,m=this);for(var b=0,g=0;g<m.length;g++)C=(0|v.words[g])+(0|m.words[g])+b,this.words[g]=67108863&C,b=C>>>26;for(;b!==0&&g<v.length;g++)C=(0|v.words[g])+b,this.words[g]=67108863&C,b=C>>>26;if(this.length=v.length,b!==0)this.words[this.length]=b,this.length++;else if(v!==this)for(;g<v.length;g++)this.words[g]=v.words[g];return this},t.prototype.add=function(k){var C;return k.negative!==0&&this.negative===0?(k.negative=0,C=this.sub(k),k.negative^=1,C):k.negative===0&&this.negative!==0?(this.negative=0,C=k.sub(this),this.negative=1,C):this.length>k.length?this.clone().iadd(k):k.clone().iadd(this)},t.prototype.isub=function(k){if(k.negative!==0){k.negative=0;var C=this.iadd(k);return k.negative=1,C._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(k),this.negative=1,this._normSign();var v,m,b=this.cmp(k);if(b===0)return this.negative=0,this.length=1,this.words[0]=0,this;b>0?(v=this,m=k):(v=k,m=this);for(var g=0,y=0;y<m.length;y++)g=(C=(0|v.words[y])-(0|m.words[y])+g)>>26,this.words[y]=67108863&C;for(;g!==0&&y<v.length;y++)g=(C=(0|v.words[y])+g)>>26,this.words[y]=67108863&C;if(g===0&&y<v.length&&v!==this)for(;y<v.length;y++)this.words[y]=v.words[y];return this.length=Math.max(this.length,y),v!==this&&(this.negative=1),this.strip()},t.prototype.sub=function(k){return this.clone().isub(k)};var d=function(k,C,v){var m,b,g,y=k.words,E=C.words,R=v.words,O=0,z=0|y[0],$=8191&z,Z=z>>>13,j=0|y[1],H=8191&j,T=j>>>13,M=0|y[2],F=8191&M,V=M>>>13,Y=0|y[3],q=8191&Y,K=Y>>>13,nt=0|y[4],rt=8191&nt,G=nt>>>13,tt=0|y[5],Q=8191&tt,st=tt>>>13,it=0|y[6],at=8191&it,ut=it>>>13,ft=0|y[7],dt=8191&ft,xt=ft>>>13,_t=0|y[8],gt=8191&_t,Rt=_t>>>13,Tt=0|y[9],At=8191&Tt,jt=Tt>>>13,St=0|E[0],mt=8191&St,kt=St>>>13,Ct=0|E[1],Et=8191&Ct,Zt=Ct>>>13,re=0|E[2],It=8191&re,Qt=re>>>13,Xt=0|E[3],Ut=8191&Xt,ue=Xt>>>13,te=0|E[4],Dt=8191&te,Yt=te>>>13,oe=0|E[5],Ft=8191&oe,ee=oe>>>13,ae=0|E[6],Ht=8191&ae,et=ae>>>13,ot=0|E[7],ct=8191&ot,yt=ot>>>13,Nt=0|E[8],wt=8191&Nt,Lt=Nt>>>13,Pt=0|E[9],Ot=8191&Pt,$t=Pt>>>13;v.negative=k.negative^C.negative,v.length=19;var zt=(O+(m=Math.imul($,mt))|0)+((8191&(b=(b=Math.imul($,kt))+Math.imul(Z,mt)|0))<<13)|0;O=((g=Math.imul(Z,kt))+(b>>>13)|0)+(zt>>>26)|0,zt&=67108863,m=Math.imul(H,mt),b=(b=Math.imul(H,kt))+Math.imul(T,mt)|0,g=Math.imul(T,kt);var Wt=(O+(m=m+Math.imul($,Et)|0)|0)+((8191&(b=(b=b+Math.imul($,Zt)|0)+Math.imul(Z,Et)|0))<<13)|0;O=((g=g+Math.imul(Z,Zt)|0)+(b>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,m=Math.imul(F,mt),b=(b=Math.imul(F,kt))+Math.imul(V,mt)|0,g=Math.imul(V,kt),m=m+Math.imul(H,Et)|0,b=(b=b+Math.imul(H,Zt)|0)+Math.imul(T,Et)|0,g=g+Math.imul(T,Zt)|0;var he=(O+(m=m+Math.imul($,It)|0)|0)+((8191&(b=(b=b+Math.imul($,Qt)|0)+Math.imul(Z,It)|0))<<13)|0;O=((g=g+Math.imul(Z,Qt)|0)+(b>>>13)|0)+(he>>>26)|0,he&=67108863,m=Math.imul(q,mt),b=(b=Math.imul(q,kt))+Math.imul(K,mt)|0,g=Math.imul(K,kt),m=m+Math.imul(F,Et)|0,b=(b=b+Math.imul(F,Zt)|0)+Math.imul(V,Et)|0,g=g+Math.imul(V,Zt)|0,m=m+Math.imul(H,It)|0,b=(b=b+Math.imul(H,Qt)|0)+Math.imul(T,It)|0,g=g+Math.imul(T,Qt)|0;var fe=(O+(m=m+Math.imul($,Ut)|0)|0)+((8191&(b=(b=b+Math.imul($,ue)|0)+Math.imul(Z,Ut)|0))<<13)|0;O=((g=g+Math.imul(Z,ue)|0)+(b>>>13)|0)+(fe>>>26)|0,fe&=67108863,m=Math.imul(rt,mt),b=(b=Math.imul(rt,kt))+Math.imul(G,mt)|0,g=Math.imul(G,kt),m=m+Math.imul(q,Et)|0,b=(b=b+Math.imul(q,Zt)|0)+Math.imul(K,Et)|0,g=g+Math.imul(K,Zt)|0,m=m+Math.imul(F,It)|0,b=(b=b+Math.imul(F,Qt)|0)+Math.imul(V,It)|0,g=g+Math.imul(V,Qt)|0,m=m+Math.imul(H,Ut)|0,b=(b=b+Math.imul(H,ue)|0)+Math.imul(T,Ut)|0,g=g+Math.imul(T,ue)|0;var de=(O+(m=m+Math.imul($,Dt)|0)|0)+((8191&(b=(b=b+Math.imul($,Yt)|0)+Math.imul(Z,Dt)|0))<<13)|0;O=((g=g+Math.imul(Z,Yt)|0)+(b>>>13)|0)+(de>>>26)|0,de&=67108863,m=Math.imul(Q,mt),b=(b=Math.imul(Q,kt))+Math.imul(st,mt)|0,g=Math.imul(st,kt),m=m+Math.imul(rt,Et)|0,b=(b=b+Math.imul(rt,Zt)|0)+Math.imul(G,Et)|0,g=g+Math.imul(G,Zt)|0,m=m+Math.imul(q,It)|0,b=(b=b+Math.imul(q,Qt)|0)+Math.imul(K,It)|0,g=g+Math.imul(K,Qt)|0,m=m+Math.imul(F,Ut)|0,b=(b=b+Math.imul(F,ue)|0)+Math.imul(V,Ut)|0,g=g+Math.imul(V,ue)|0,m=m+Math.imul(H,Dt)|0,b=(b=b+Math.imul(H,Yt)|0)+Math.imul(T,Dt)|0,g=g+Math.imul(T,Yt)|0;var pe=(O+(m=m+Math.imul($,Ft)|0)|0)+((8191&(b=(b=b+Math.imul($,ee)|0)+Math.imul(Z,Ft)|0))<<13)|0;O=((g=g+Math.imul(Z,ee)|0)+(b>>>13)|0)+(pe>>>26)|0,pe&=67108863,m=Math.imul(at,mt),b=(b=Math.imul(at,kt))+Math.imul(ut,mt)|0,g=Math.imul(ut,kt),m=m+Math.imul(Q,Et)|0,b=(b=b+Math.imul(Q,Zt)|0)+Math.imul(st,Et)|0,g=g+Math.imul(st,Zt)|0,m=m+Math.imul(rt,It)|0,b=(b=b+Math.imul(rt,Qt)|0)+Math.imul(G,It)|0,g=g+Math.imul(G,Qt)|0,m=m+Math.imul(q,Ut)|0,b=(b=b+Math.imul(q,ue)|0)+Math.imul(K,Ut)|0,g=g+Math.imul(K,ue)|0,m=m+Math.imul(F,Dt)|0,b=(b=b+Math.imul(F,Yt)|0)+Math.imul(V,Dt)|0,g=g+Math.imul(V,Yt)|0,m=m+Math.imul(H,Ft)|0,b=(b=b+Math.imul(H,ee)|0)+Math.imul(T,Ft)|0,g=g+Math.imul(T,ee)|0;var ge=(O+(m=m+Math.imul($,Ht)|0)|0)+((8191&(b=(b=b+Math.imul($,et)|0)+Math.imul(Z,Ht)|0))<<13)|0;O=((g=g+Math.imul(Z,et)|0)+(b>>>13)|0)+(ge>>>26)|0,ge&=67108863,m=Math.imul(dt,mt),b=(b=Math.imul(dt,kt))+Math.imul(xt,mt)|0,g=Math.imul(xt,kt),m=m+Math.imul(at,Et)|0,b=(b=b+Math.imul(at,Zt)|0)+Math.imul(ut,Et)|0,g=g+Math.imul(ut,Zt)|0,m=m+Math.imul(Q,It)|0,b=(b=b+Math.imul(Q,Qt)|0)+Math.imul(st,It)|0,g=g+Math.imul(st,Qt)|0,m=m+Math.imul(rt,Ut)|0,b=(b=b+Math.imul(rt,ue)|0)+Math.imul(G,Ut)|0,g=g+Math.imul(G,ue)|0,m=m+Math.imul(q,Dt)|0,b=(b=b+Math.imul(q,Yt)|0)+Math.imul(K,Dt)|0,g=g+Math.imul(K,Yt)|0,m=m+Math.imul(F,Ft)|0,b=(b=b+Math.imul(F,ee)|0)+Math.imul(V,Ft)|0,g=g+Math.imul(V,ee)|0,m=m+Math.imul(H,Ht)|0,b=(b=b+Math.imul(H,et)|0)+Math.imul(T,Ht)|0,g=g+Math.imul(T,et)|0;var J=(O+(m=m+Math.imul($,ct)|0)|0)+((8191&(b=(b=b+Math.imul($,yt)|0)+Math.imul(Z,ct)|0))<<13)|0;O=((g=g+Math.imul(Z,yt)|0)+(b>>>13)|0)+(J>>>26)|0,J&=67108863,m=Math.imul(gt,mt),b=(b=Math.imul(gt,kt))+Math.imul(Rt,mt)|0,g=Math.imul(Rt,kt),m=m+Math.imul(dt,Et)|0,b=(b=b+Math.imul(dt,Zt)|0)+Math.imul(xt,Et)|0,g=g+Math.imul(xt,Zt)|0,m=m+Math.imul(at,It)|0,b=(b=b+Math.imul(at,Qt)|0)+Math.imul(ut,It)|0,g=g+Math.imul(ut,Qt)|0,m=m+Math.imul(Q,Ut)|0,b=(b=b+Math.imul(Q,ue)|0)+Math.imul(st,Ut)|0,g=g+Math.imul(st,ue)|0,m=m+Math.imul(rt,Dt)|0,b=(b=b+Math.imul(rt,Yt)|0)+Math.imul(G,Dt)|0,g=g+Math.imul(G,Yt)|0,m=m+Math.imul(q,Ft)|0,b=(b=b+Math.imul(q,ee)|0)+Math.imul(K,Ft)|0,g=g+Math.imul(K,ee)|0,m=m+Math.imul(F,Ht)|0,b=(b=b+Math.imul(F,et)|0)+Math.imul(V,Ht)|0,g=g+Math.imul(V,et)|0,m=m+Math.imul(H,ct)|0,b=(b=b+Math.imul(H,yt)|0)+Math.imul(T,ct)|0,g=g+Math.imul(T,yt)|0;var lt=(O+(m=m+Math.imul($,wt)|0)|0)+((8191&(b=(b=b+Math.imul($,Lt)|0)+Math.imul(Z,wt)|0))<<13)|0;O=((g=g+Math.imul(Z,Lt)|0)+(b>>>13)|0)+(lt>>>26)|0,lt&=67108863,m=Math.imul(At,mt),b=(b=Math.imul(At,kt))+Math.imul(jt,mt)|0,g=Math.imul(jt,kt),m=m+Math.imul(gt,Et)|0,b=(b=b+Math.imul(gt,Zt)|0)+Math.imul(Rt,Et)|0,g=g+Math.imul(Rt,Zt)|0,m=m+Math.imul(dt,It)|0,b=(b=b+Math.imul(dt,Qt)|0)+Math.imul(xt,It)|0,g=g+Math.imul(xt,Qt)|0,m=m+Math.imul(at,Ut)|0,b=(b=b+Math.imul(at,ue)|0)+Math.imul(ut,Ut)|0,g=g+Math.imul(ut,ue)|0,m=m+Math.imul(Q,Dt)|0,b=(b=b+Math.imul(Q,Yt)|0)+Math.imul(st,Dt)|0,g=g+Math.imul(st,Yt)|0,m=m+Math.imul(rt,Ft)|0,b=(b=b+Math.imul(rt,ee)|0)+Math.imul(G,Ft)|0,g=g+Math.imul(G,ee)|0,m=m+Math.imul(q,Ht)|0,b=(b=b+Math.imul(q,et)|0)+Math.imul(K,Ht)|0,g=g+Math.imul(K,et)|0,m=m+Math.imul(F,ct)|0,b=(b=b+Math.imul(F,yt)|0)+Math.imul(V,ct)|0,g=g+Math.imul(V,yt)|0,m=m+Math.imul(H,wt)|0,b=(b=b+Math.imul(H,Lt)|0)+Math.imul(T,wt)|0,g=g+Math.imul(T,Lt)|0;var ht=(O+(m=m+Math.imul($,Ot)|0)|0)+((8191&(b=(b=b+Math.imul($,$t)|0)+Math.imul(Z,Ot)|0))<<13)|0;O=((g=g+Math.imul(Z,$t)|0)+(b>>>13)|0)+(ht>>>26)|0,ht&=67108863,m=Math.imul(At,Et),b=(b=Math.imul(At,Zt))+Math.imul(jt,Et)|0,g=Math.imul(jt,Zt),m=m+Math.imul(gt,It)|0,b=(b=b+Math.imul(gt,Qt)|0)+Math.imul(Rt,It)|0,g=g+Math.imul(Rt,Qt)|0,m=m+Math.imul(dt,Ut)|0,b=(b=b+Math.imul(dt,ue)|0)+Math.imul(xt,Ut)|0,g=g+Math.imul(xt,ue)|0,m=m+Math.imul(at,Dt)|0,b=(b=b+Math.imul(at,Yt)|0)+Math.imul(ut,Dt)|0,g=g+Math.imul(ut,Yt)|0,m=m+Math.imul(Q,Ft)|0,b=(b=b+Math.imul(Q,ee)|0)+Math.imul(st,Ft)|0,g=g+Math.imul(st,ee)|0,m=m+Math.imul(rt,Ht)|0,b=(b=b+Math.imul(rt,et)|0)+Math.imul(G,Ht)|0,g=g+Math.imul(G,et)|0,m=m+Math.imul(q,ct)|0,b=(b=b+Math.imul(q,yt)|0)+Math.imul(K,ct)|0,g=g+Math.imul(K,yt)|0,m=m+Math.imul(F,wt)|0,b=(b=b+Math.imul(F,Lt)|0)+Math.imul(V,wt)|0,g=g+Math.imul(V,Lt)|0;var pt=(O+(m=m+Math.imul(H,Ot)|0)|0)+((8191&(b=(b=b+Math.imul(H,$t)|0)+Math.imul(T,Ot)|0))<<13)|0;O=((g=g+Math.imul(T,$t)|0)+(b>>>13)|0)+(pt>>>26)|0,pt&=67108863,m=Math.imul(At,It),b=(b=Math.imul(At,Qt))+Math.imul(jt,It)|0,g=Math.imul(jt,Qt),m=m+Math.imul(gt,Ut)|0,b=(b=b+Math.imul(gt,ue)|0)+Math.imul(Rt,Ut)|0,g=g+Math.imul(Rt,ue)|0,m=m+Math.imul(dt,Dt)|0,b=(b=b+Math.imul(dt,Yt)|0)+Math.imul(xt,Dt)|0,g=g+Math.imul(xt,Yt)|0,m=m+Math.imul(at,Ft)|0,b=(b=b+Math.imul(at,ee)|0)+Math.imul(ut,Ft)|0,g=g+Math.imul(ut,ee)|0,m=m+Math.imul(Q,Ht)|0,b=(b=b+Math.imul(Q,et)|0)+Math.imul(st,Ht)|0,g=g+Math.imul(st,et)|0,m=m+Math.imul(rt,ct)|0,b=(b=b+Math.imul(rt,yt)|0)+Math.imul(G,ct)|0,g=g+Math.imul(G,yt)|0,m=m+Math.imul(q,wt)|0,b=(b=b+Math.imul(q,Lt)|0)+Math.imul(K,wt)|0,g=g+Math.imul(K,Lt)|0;var Mt=(O+(m=m+Math.imul(F,Ot)|0)|0)+((8191&(b=(b=b+Math.imul(F,$t)|0)+Math.imul(V,Ot)|0))<<13)|0;O=((g=g+Math.imul(V,$t)|0)+(b>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,m=Math.imul(At,Ut),b=(b=Math.imul(At,ue))+Math.imul(jt,Ut)|0,g=Math.imul(jt,ue),m=m+Math.imul(gt,Dt)|0,b=(b=b+Math.imul(gt,Yt)|0)+Math.imul(Rt,Dt)|0,g=g+Math.imul(Rt,Yt)|0,m=m+Math.imul(dt,Ft)|0,b=(b=b+Math.imul(dt,ee)|0)+Math.imul(xt,Ft)|0,g=g+Math.imul(xt,ee)|0,m=m+Math.imul(at,Ht)|0,b=(b=b+Math.imul(at,et)|0)+Math.imul(ut,Ht)|0,g=g+Math.imul(ut,et)|0,m=m+Math.imul(Q,ct)|0,b=(b=b+Math.imul(Q,yt)|0)+Math.imul(st,ct)|0,g=g+Math.imul(st,yt)|0,m=m+Math.imul(rt,wt)|0,b=(b=b+Math.imul(rt,Lt)|0)+Math.imul(G,wt)|0,g=g+Math.imul(G,Lt)|0;var bt=(O+(m=m+Math.imul(q,Ot)|0)|0)+((8191&(b=(b=b+Math.imul(q,$t)|0)+Math.imul(K,Ot)|0))<<13)|0;O=((g=g+Math.imul(K,$t)|0)+(b>>>13)|0)+(bt>>>26)|0,bt&=67108863,m=Math.imul(At,Dt),b=(b=Math.imul(At,Yt))+Math.imul(jt,Dt)|0,g=Math.imul(jt,Yt),m=m+Math.imul(gt,Ft)|0,b=(b=b+Math.imul(gt,ee)|0)+Math.imul(Rt,Ft)|0,g=g+Math.imul(Rt,ee)|0,m=m+Math.imul(dt,Ht)|0,b=(b=b+Math.imul(dt,et)|0)+Math.imul(xt,Ht)|0,g=g+Math.imul(xt,et)|0,m=m+Math.imul(at,ct)|0,b=(b=b+Math.imul(at,yt)|0)+Math.imul(ut,ct)|0,g=g+Math.imul(ut,yt)|0,m=m+Math.imul(Q,wt)|0,b=(b=b+Math.imul(Q,Lt)|0)+Math.imul(st,wt)|0,g=g+Math.imul(st,Lt)|0;var vt=(O+(m=m+Math.imul(rt,Ot)|0)|0)+((8191&(b=(b=b+Math.imul(rt,$t)|0)+Math.imul(G,Ot)|0))<<13)|0;O=((g=g+Math.imul(G,$t)|0)+(b>>>13)|0)+(vt>>>26)|0,vt&=67108863,m=Math.imul(At,Ft),b=(b=Math.imul(At,ee))+Math.imul(jt,Ft)|0,g=Math.imul(jt,ee),m=m+Math.imul(gt,Ht)|0,b=(b=b+Math.imul(gt,et)|0)+Math.imul(Rt,Ht)|0,g=g+Math.imul(Rt,et)|0,m=m+Math.imul(dt,ct)|0,b=(b=b+Math.imul(dt,yt)|0)+Math.imul(xt,ct)|0,g=g+Math.imul(xt,yt)|0,m=m+Math.imul(at,wt)|0,b=(b=b+Math.imul(at,Lt)|0)+Math.imul(ut,wt)|0,g=g+Math.imul(ut,Lt)|0;var Kt=(O+(m=m+Math.imul(Q,Ot)|0)|0)+((8191&(b=(b=b+Math.imul(Q,$t)|0)+Math.imul(st,Ot)|0))<<13)|0;O=((g=g+Math.imul(st,$t)|0)+(b>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,m=Math.imul(At,Ht),b=(b=Math.imul(At,et))+Math.imul(jt,Ht)|0,g=Math.imul(jt,et),m=m+Math.imul(gt,ct)|0,b=(b=b+Math.imul(gt,yt)|0)+Math.imul(Rt,ct)|0,g=g+Math.imul(Rt,yt)|0,m=m+Math.imul(dt,wt)|0,b=(b=b+Math.imul(dt,Lt)|0)+Math.imul(xt,wt)|0,g=g+Math.imul(xt,Lt)|0;var Vt=(O+(m=m+Math.imul(at,Ot)|0)|0)+((8191&(b=(b=b+Math.imul(at,$t)|0)+Math.imul(ut,Ot)|0))<<13)|0;O=((g=g+Math.imul(ut,$t)|0)+(b>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,m=Math.imul(At,ct),b=(b=Math.imul(At,yt))+Math.imul(jt,ct)|0,g=Math.imul(jt,yt),m=m+Math.imul(gt,wt)|0,b=(b=b+Math.imul(gt,Lt)|0)+Math.imul(Rt,wt)|0,g=g+Math.imul(Rt,Lt)|0;var qt=(O+(m=m+Math.imul(dt,Ot)|0)|0)+((8191&(b=(b=b+Math.imul(dt,$t)|0)+Math.imul(xt,Ot)|0))<<13)|0;O=((g=g+Math.imul(xt,$t)|0)+(b>>>13)|0)+(qt>>>26)|0,qt&=67108863,m=Math.imul(At,wt),b=(b=Math.imul(At,Lt))+Math.imul(jt,wt)|0,g=Math.imul(jt,Lt);var Bt=(O+(m=m+Math.imul(gt,Ot)|0)|0)+((8191&(b=(b=b+Math.imul(gt,$t)|0)+Math.imul(Rt,Ot)|0))<<13)|0;O=((g=g+Math.imul(Rt,$t)|0)+(b>>>13)|0)+(Bt>>>26)|0,Bt&=67108863;var ne=(O+(m=Math.imul(At,Ot))|0)+((8191&(b=(b=Math.imul(At,$t))+Math.imul(jt,Ot)|0))<<13)|0;return O=((g=Math.imul(jt,$t))+(b>>>13)|0)+(ne>>>26)|0,ne&=67108863,R[0]=zt,R[1]=Wt,R[2]=he,R[3]=fe,R[4]=de,R[5]=pe,R[6]=ge,R[7]=J,R[8]=lt,R[9]=ht,R[10]=pt,R[11]=Mt,R[12]=bt,R[13]=vt,R[14]=Kt,R[15]=Vt,R[16]=qt,R[17]=Bt,R[18]=ne,O!==0&&(R[19]=O,v.length++),v};function w(k,C,v){return new S().mulp(k,C,v)}function S(k,C){this.x=k,this.y=C}Math.imul||(d=p),t.prototype.mulTo=function(k,C){var v=this.length+k.length;return this.length===10&&k.length===10?d(this,k,C):v<63?p(this,k,C):v<1024?(function(m,b,g){g.negative=b.negative^m.negative,g.length=m.length+b.length;for(var y=0,E=0,R=0;R<g.length-1;R++){var O=E;E=0;for(var z=67108863&y,$=Math.min(R,b.length-1),Z=Math.max(0,R-m.length+1);Z<=$;Z++){var j=R-Z,H=(0|m.words[j])*(0|b.words[Z]),T=67108863&H;z=67108863&(T=T+z|0),E+=(O=(O=O+(H/67108864|0)|0)+(T>>>26)|0)>>>26,O&=67108863}g.words[R]=z,y=O,O=E}return y!==0?g.words[R]=y:g.length--,g.strip()})(this,k,C):w(this,k,C)},S.prototype.makeRBT=function(k){for(var C=new Array(k),v=t.prototype._countBits(k)-1,m=0;m<k;m++)C[m]=this.revBin(m,v,k);return C},S.prototype.revBin=function(k,C,v){if(k===0||k===v-1)return k;for(var m=0,b=0;b<C;b++)m|=(1&k)<<C-b-1,k>>=1;return m},S.prototype.permute=function(k,C,v,m,b,g){for(var y=0;y<g;y++)m[y]=C[k[y]],b[y]=v[k[y]]},S.prototype.transform=function(k,C,v,m,b,g){this.permute(g,k,C,v,m,b);for(var y=1;y<b;y<<=1)for(var E=y<<1,R=Math.cos(2*Math.PI/E),O=Math.sin(2*Math.PI/E),z=0;z<b;z+=E)for(var $=R,Z=O,j=0;j<y;j++){var H=v[z+j],T=m[z+j],M=v[z+j+y],F=m[z+j+y],V=$*M-Z*F;F=$*F+Z*M,M=V,v[z+j]=H+M,m[z+j]=T+F,v[z+j+y]=H-M,m[z+j+y]=T-F,j!==E&&(V=R*$-O*Z,Z=R*Z+O*$,$=V)}},S.prototype.guessLen13b=function(k,C){var v=1|Math.max(C,k),m=1&v,b=0;for(v=v/2|0;v;v>>>=1)b++;return 1<<b+1+m},S.prototype.conjugate=function(k,C,v){if(!(v<=1))for(var m=0;m<v/2;m++){var b=k[m];k[m]=k[v-m-1],k[v-m-1]=b,b=C[m],C[m]=-C[v-m-1],C[v-m-1]=-b}},S.prototype.normalize13b=function(k,C){for(var v=0,m=0;m<C/2;m++){var b=8192*Math.round(k[2*m+1]/C)+Math.round(k[2*m]/C)+v;k[m]=67108863&b,v=b<67108864?0:b/67108864|0}return k},S.prototype.convert13b=function(k,C,v,m){for(var b=0,g=0;g<C;g++)b+=0|k[g],v[2*g]=8191&b,b>>>=13,v[2*g+1]=8191&b,b>>>=13;for(g=2*C;g<m;++g)v[g]=0;a(b===0),a((-8192&b)==0)},S.prototype.stub=function(k){for(var C=new Array(k),v=0;v<k;v++)C[v]=0;return C},S.prototype.mulp=function(k,C,v){var m=2*this.guessLen13b(k.length,C.length),b=this.makeRBT(m),g=this.stub(m),y=new Array(m),E=new Array(m),R=new Array(m),O=new Array(m),z=new Array(m),$=new Array(m),Z=v.words;Z.length=m,this.convert13b(k.words,k.length,y,m),this.convert13b(C.words,C.length,O,m),this.transform(y,g,E,R,m,b),this.transform(O,g,z,$,m,b);for(var j=0;j<m;j++){var H=E[j]*z[j]-R[j]*$[j];R[j]=E[j]*$[j]+R[j]*z[j],E[j]=H}return this.conjugate(E,R,m),this.transform(E,R,Z,g,m,b),this.conjugate(Z,g,m),this.normalize13b(Z,m),v.negative=k.negative^C.negative,v.length=k.length+C.length,v.strip()},t.prototype.mul=function(k){var C=new t(null);return C.words=new Array(this.length+k.length),this.mulTo(k,C)},t.prototype.mulf=function(k){var C=new t(null);return C.words=new Array(this.length+k.length),w(this,k,C)},t.prototype.imul=function(k){return this.clone().mulTo(k,this)},t.prototype.imuln=function(k){a(typeof k=="number"),a(k<67108864);for(var C=0,v=0;v<this.length;v++){var m=(0|this.words[v])*k,b=(67108863&m)+(67108863&C);C>>=26,C+=m/67108864|0,C+=b>>>26,this.words[v]=67108863&b}return C!==0&&(this.words[v]=C,this.length++),this},t.prototype.muln=function(k){return this.clone().imuln(k)},t.prototype.sqr=function(){return this.mul(this)},t.prototype.isqr=function(){return this.imul(this.clone())},t.prototype.pow=function(k){var C=(function(g){for(var y=new Array(g.bitLength()),E=0;E<y.length;E++){var R=E/26|0,O=E%26;y[E]=(g.words[R]&1<<O)>>>O}return y})(k);if(C.length===0)return new t(1);for(var v=this,m=0;m<C.length&&C[m]===0;m++,v=v.sqr());if(++m<C.length)for(var b=v.sqr();m<C.length;m++,b=b.sqr())C[m]!==0&&(v=v.mul(b));return v},t.prototype.iushln=function(k){a(typeof k=="number"&&k>=0);var C,v=k%26,m=(k-v)/26,b=67108863>>>26-v<<26-v;if(v!==0){var g=0;for(C=0;C<this.length;C++){var y=this.words[C]&b,E=(0|this.words[C])-y<<v;this.words[C]=E|g,g=y>>>26-v}g&&(this.words[C]=g,this.length++)}if(m!==0){for(C=this.length-1;C>=0;C--)this.words[C+m]=this.words[C];for(C=0;C<m;C++)this.words[C]=0;this.length+=m}return this.strip()},t.prototype.ishln=function(k){return a(this.negative===0),this.iushln(k)},t.prototype.iushrn=function(k,C,v){var m;a(typeof k=="number"&&k>=0),m=C?(C-C%26)/26:0;var b=k%26,g=Math.min((k-b)/26,this.length),y=67108863^67108863>>>b<<b,E=v;if(m-=g,m=Math.max(0,m),E){for(var R=0;R<g;R++)E.words[R]=this.words[R];E.length=g}if(g!==0)if(this.length>g)for(this.length-=g,R=0;R<this.length;R++)this.words[R]=this.words[R+g];else this.words[0]=0,this.length=1;var O=0;for(R=this.length-1;R>=0&&(O!==0||R>=m);R--){var z=0|this.words[R];this.words[R]=O<<26-b|z>>>b,O=z&y}return E&&O!==0&&(E.words[E.length++]=O),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},t.prototype.ishrn=function(k,C,v){return a(this.negative===0),this.iushrn(k,C,v)},t.prototype.shln=function(k){return this.clone().ishln(k)},t.prototype.ushln=function(k){return this.clone().iushln(k)},t.prototype.shrn=function(k){return this.clone().ishrn(k)},t.prototype.ushrn=function(k){return this.clone().iushrn(k)},t.prototype.testn=function(k){a(typeof k=="number"&&k>=0);var C=k%26,v=(k-C)/26,m=1<<C;return!(this.length<=v)&&!!(this.words[v]&m)},t.prototype.imaskn=function(k){a(typeof k=="number"&&k>=0);var C=k%26,v=(k-C)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=v)return this;if(C!==0&&v++,this.length=Math.min(v,this.length),C!==0){var m=67108863^67108863>>>C<<C;this.words[this.length-1]&=m}return this.strip()},t.prototype.maskn=function(k){return this.clone().imaskn(k)},t.prototype.iaddn=function(k){return a(typeof k=="number"),a(k<67108864),k<0?this.isubn(-k):this.negative!==0?this.length===1&&(0|this.words[0])<k?(this.words[0]=k-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(k),this.negative=1,this):this._iaddn(k)},t.prototype._iaddn=function(k){this.words[0]+=k;for(var C=0;C<this.length&&this.words[C]>=67108864;C++)this.words[C]-=67108864,C===this.length-1?this.words[C+1]=1:this.words[C+1]++;return this.length=Math.max(this.length,C+1),this},t.prototype.isubn=function(k){if(a(typeof k=="number"),a(k<67108864),k<0)return this.iaddn(-k);if(this.negative!==0)return this.negative=0,this.iaddn(k),this.negative=1,this;if(this.words[0]-=k,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C<this.length&&this.words[C]<0;C++)this.words[C]+=67108864,this.words[C+1]-=1;return this.strip()},t.prototype.addn=function(k){return this.clone().iaddn(k)},t.prototype.subn=function(k){return this.clone().isubn(k)},t.prototype.iabs=function(){return this.negative=0,this},t.prototype.abs=function(){return this.clone().iabs()},t.prototype._ishlnsubmul=function(k,C,v){var m,b,g=k.length+v;this._expand(g);var y=0;for(m=0;m<k.length;m++){b=(0|this.words[m+v])+y;var E=(0|k.words[m])*C;y=((b-=67108863&E)>>26)-(E/67108864|0),this.words[m+v]=67108863&b}for(;m<this.length-v;m++)y=(b=(0|this.words[m+v])+y)>>26,this.words[m+v]=67108863&b;if(y===0)return this.strip();for(a(y===-1),y=0,m=0;m<this.length;m++)y=(b=-(0|this.words[m])+y)>>26,this.words[m]=67108863&b;return this.negative=1,this.strip()},t.prototype._wordDiv=function(k,C){var v=(this.length,k.length),m=this.clone(),b=k,g=0|b.words[b.length-1];(v=26-this._countBits(g))!==0&&(b=b.ushln(v),m.iushln(v),g=0|b.words[b.length-1]);var y,E=m.length-b.length;if(C!=="mod"){(y=new t(null)).length=E+1,y.words=new Array(y.length);for(var R=0;R<y.length;R++)y.words[R]=0}var O=m.clone()._ishlnsubmul(b,1,E);O.negative===0&&(m=O,y&&(y.words[E]=1));for(var z=E-1;z>=0;z--){var $=67108864*(0|m.words[b.length+z])+(0|m.words[b.length+z-1]);for($=Math.min($/g|0,67108863),m._ishlnsubmul(b,$,z);m.negative!==0;)$--,m.negative=0,m._ishlnsubmul(b,1,z),m.isZero()||(m.negative^=1);y&&(y.words[z]=$)}return y&&y.strip(),m.strip(),C!=="div"&&v!==0&&m.iushrn(v),{div:y||null,mod:m}},t.prototype.divmod=function(k,C,v){return a(!k.isZero()),this.isZero()?{div:new t(0),mod:new t(0)}:this.negative!==0&&k.negative===0?(g=this.neg().divmod(k,C),C!=="mod"&&(m=g.div.neg()),C!=="div"&&(b=g.mod.neg(),v&&b.negative!==0&&b.iadd(k)),{div:m,mod:b}):this.negative===0&&k.negative!==0?(g=this.divmod(k.neg(),C),C!=="mod"&&(m=g.div.neg()),{div:m,mod:g.mod}):(this.negative&k.negative)!=0?(g=this.neg().divmod(k.neg(),C),C!=="div"&&(b=g.mod.neg(),v&&b.negative!==0&&b.isub(k)),{div:g.div,mod:b}):k.length>this.length||this.cmp(k)<0?{div:new t(0),mod:this}:k.length===1?C==="div"?{div:this.divn(k.words[0]),mod:null}:C==="mod"?{div:null,mod:new t(this.modn(k.words[0]))}:{div:this.divn(k.words[0]),mod:new t(this.modn(k.words[0]))}:this._wordDiv(k,C);var m,b,g},t.prototype.div=function(k){return this.divmod(k,"div",!1).div},t.prototype.mod=function(k){return this.divmod(k,"mod",!1).mod},t.prototype.umod=function(k){return this.divmod(k,"mod",!0).mod},t.prototype.divRound=function(k){var C=this.divmod(k);if(C.mod.isZero())return C.div;var v=C.div.negative!==0?C.mod.isub(k):C.mod,m=k.ushrn(1),b=k.andln(1),g=v.cmp(m);return g<0||b===1&&g===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},t.prototype.modn=function(k){a(k<=67108863);for(var C=(1<<26)%k,v=0,m=this.length-1;m>=0;m--)v=(C*v+(0|this.words[m]))%k;return v},t.prototype.idivn=function(k){a(k<=67108863);for(var C=0,v=this.length-1;v>=0;v--){var m=(0|this.words[v])+67108864*C;this.words[v]=m/k|0,C=m%k}return this.strip()},t.prototype.divn=function(k){return this.clone().idivn(k)},t.prototype.egcd=function(k){a(k.negative===0),a(!k.isZero());var C=this,v=k.clone();C=C.negative!==0?C.umod(k):C.clone();for(var m=new t(1),b=new t(0),g=new t(0),y=new t(1),E=0;C.isEven()&&v.isEven();)C.iushrn(1),v.iushrn(1),++E;for(var R=v.clone(),O=C.clone();!C.isZero();){for(var z=0,$=1;(C.words[0]&$)==0&&z<26;++z,$<<=1);if(z>0)for(C.iushrn(z);z-- >0;)(m.isOdd()||b.isOdd())&&(m.iadd(R),b.isub(O)),m.iushrn(1),b.iushrn(1);for(var Z=0,j=1;(v.words[0]&j)==0&&Z<26;++Z,j<<=1);if(Z>0)for(v.iushrn(Z);Z-- >0;)(g.isOdd()||y.isOdd())&&(g.iadd(R),y.isub(O)),g.iushrn(1),y.iushrn(1);C.cmp(v)>=0?(C.isub(v),m.isub(g),b.isub(y)):(v.isub(C),g.isub(m),y.isub(b))}return{a:g,b:y,gcd:v.iushln(E)}},t.prototype._invmp=function(k){a(k.negative===0),a(!k.isZero());var C=this,v=k.clone();C=C.negative!==0?C.umod(k):C.clone();for(var m,b=new t(1),g=new t(0),y=v.clone();C.cmpn(1)>0&&v.cmpn(1)>0;){for(var E=0,R=1;(C.words[0]&R)==0&&E<26;++E,R<<=1);if(E>0)for(C.iushrn(E);E-- >0;)b.isOdd()&&b.iadd(y),b.iushrn(1);for(var O=0,z=1;(v.words[0]&z)==0&&O<26;++O,z<<=1);if(O>0)for(v.iushrn(O);O-- >0;)g.isOdd()&&g.iadd(y),g.iushrn(1);C.cmp(v)>=0?(C.isub(v),b.isub(g)):(v.isub(C),g.isub(b))}return(m=C.cmpn(1)===0?b:g).cmpn(0)<0&&m.iadd(k),m},t.prototype.gcd=function(k){if(this.isZero())return k.abs();if(k.isZero())return this.abs();var C=this.clone(),v=k.clone();C.negative=0,v.negative=0;for(var m=0;C.isEven()&&v.isEven();m++)C.iushrn(1),v.iushrn(1);for(;;){for(;C.isEven();)C.iushrn(1);for(;v.isEven();)v.iushrn(1);var b=C.cmp(v);if(b<0){var g=C;C=v,v=g}else if(b===0||v.cmpn(1)===0)break;C.isub(v)}return v.iushln(m)},t.prototype.invm=function(k){return this.egcd(k).a.umod(k)},t.prototype.isEven=function(){return(1&this.words[0])==0},t.prototype.isOdd=function(){return(1&this.words[0])==1},t.prototype.andln=function(k){return this.words[0]&k},t.prototype.bincn=function(k){a(typeof k=="number");var C=k%26,v=(k-C)/26,m=1<<C;if(this.length<=v)return this._expand(v+1),this.words[v]|=m,this;for(var b=m,g=v;b!==0&&g<this.length;g++){var y=0|this.words[g];b=(y+=b)>>>26,y&=67108863,this.words[g]=y}return b!==0&&(this.words[g]=b,this.length++),this},t.prototype.isZero=function(){return this.length===1&&this.words[0]===0},t.prototype.cmpn=function(k){var C,v=k<0;if(this.negative!==0&&!v)return-1;if(this.negative===0&&v)return 1;if(this.strip(),this.length>1)C=1;else{v&&(k=-k),a(k<=67108863,"Number is too big");var m=0|this.words[0];C=m===k?0:m<k?-1:1}return this.negative!==0?0|-C:C},t.prototype.cmp=function(k){if(this.negative!==0&&k.negative===0)return-1;if(this.negative===0&&k.negative!==0)return 1;var C=this.ucmp(k);return this.negative!==0?0|-C:C},t.prototype.ucmp=function(k){if(this.length>k.length)return 1;if(this.length<k.length)return-1;for(var C=0,v=this.length-1;v>=0;v--){var m=0|this.words[v],b=0|k.words[v];if(m!==b){m<b?C=-1:m>b&&(C=1);break}}return C},t.prototype.gtn=function(k){return this.cmpn(k)===1},t.prototype.gt=function(k){return this.cmp(k)===1},t.prototype.gten=function(k){return this.cmpn(k)>=0},t.prototype.gte=function(k){return this.cmp(k)>=0},t.prototype.ltn=function(k){return this.cmpn(k)===-1},t.prototype.lt=function(k){return this.cmp(k)===-1},t.prototype.lten=function(k){return this.cmpn(k)<=0},t.prototype.lte=function(k){return this.cmp(k)<=0},t.prototype.eqn=function(k){return this.cmpn(k)===0},t.prototype.eq=function(k){return this.cmp(k)===0},t.red=function(k){return new U(k)},t.prototype.toRed=function(k){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),k.convertTo(this)._forceRed(k)},t.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},t.prototype._forceRed=function(k){return this.red=k,this},t.prototype.forceRed=function(k){return a(!this.red,"Already a number in reduction context"),this._forceRed(k)},t.prototype.redAdd=function(k){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,k)},t.prototype.redIAdd=function(k){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,k)},t.prototype.redSub=function(k){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,k)},t.prototype.redISub=function(k){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,k)},t.prototype.redShl=function(k){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,k)},t.prototype.redMul=function(k){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,k),this.red.mul(this,k)},t.prototype.redIMul=function(k){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,k),this.red.imul(this,k)},t.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},t.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},t.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},t.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},t.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},t.prototype.redPow=function(k){return a(this.red&&!k.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,k)};var A={k256:null,p224:null,p192:null,p25519:null};function N(k,C){this.name=k,this.p=new t(C,16),this.n=this.p.bitLength(),this.k=new t(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function L(){N.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function I(){N.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P(){N.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function D(){N.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function U(k){if(typeof k=="string"){var C=t._prime(k);this.m=C.p,this.prime=C}else a(k.gtn(1),"modulus must be greater than 1"),this.m=k,this.prime=null}function B(k){U.call(this,k),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new t(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)}N.prototype._tmp=function(){var k=new t(null);return k.words=new Array(Math.ceil(this.n/13)),k},N.prototype.ireduce=function(k){var C,v=k;do this.split(v,this.tmp),C=(v=(v=this.imulK(v)).iadd(this.tmp)).bitLength();while(C>this.n);var m=C<this.n?-1:v.ucmp(this.p);return m===0?(v.words[0]=0,v.length=1):m>0?v.isub(this.p):v.strip!==void 0?v.strip():v._strip(),v},N.prototype.split=function(k,C){k.iushrn(this.n,0,C)},N.prototype.imulK=function(k){return k.imul(this.k)},r(L,N),L.prototype.split=function(k,C){for(var v=Math.min(k.length,9),m=0;m<v;m++)C.words[m]=k.words[m];if(C.length=v,k.length<=9)return k.words[0]=0,void(k.length=1);var b=k.words[9];for(C.words[C.length++]=4194303&b,m=10;m<k.length;m++){var g=0|k.words[m];k.words[m-10]=(4194303&g)<<4|b>>>22,b=g}b>>>=22,k.words[m-10]=b,b===0&&k.length>10?k.length-=10:k.length-=9},L.prototype.imulK=function(k){k.words[k.length]=0,k.words[k.length+1]=0,k.length+=2;for(var C=0,v=0;v<k.length;v++){var m=0|k.words[v];C+=977*m,k.words[v]=67108863&C,C=64*m+(C/67108864|0)}return k.words[k.length-1]===0&&(k.length--,k.words[k.length-1]===0&&k.length--),k},r(I,N),r(P,N),r(D,N),D.prototype.imulK=function(k){for(var C=0,v=0;v<k.length;v++){var m=19*(0|k.words[v])+C,b=67108863&m;m>>>=26,k.words[v]=b,C=m}return C!==0&&(k.words[k.length++]=C),k},t._prime=function(k){if(A[k])return A[k];var C;if(k==="k256")C=new L;else if(k==="p224")C=new I;else if(k==="p192")C=new P;else{if(k!=="p25519")throw new Error("Unknown prime "+k);C=new D}return A[k]=C,C},U.prototype._verify1=function(k){a(k.negative===0,"red works only with positives"),a(k.red,"red works only with red numbers")},U.prototype._verify2=function(k,C){a((k.negative|C.negative)==0,"red works only with positives"),a(k.red&&k.red===C.red,"red works only with red numbers")},U.prototype.imod=function(k){return this.prime?this.prime.ireduce(k)._forceRed(this):k.umod(this.m)._forceRed(this)},U.prototype.neg=function(k){return k.isZero()?k.clone():this.m.sub(k)._forceRed(this)},U.prototype.add=function(k,C){this._verify2(k,C);var v=k.add(C);return v.cmp(this.m)>=0&&v.isub(this.m),v._forceRed(this)},U.prototype.iadd=function(k,C){this._verify2(k,C);var v=k.iadd(C);return v.cmp(this.m)>=0&&v.isub(this.m),v},U.prototype.sub=function(k,C){this._verify2(k,C);var v=k.sub(C);return v.cmpn(0)<0&&v.iadd(this.m),v._forceRed(this)},U.prototype.isub=function(k,C){this._verify2(k,C);var v=k.isub(C);return v.cmpn(0)<0&&v.iadd(this.m),v},U.prototype.shl=function(k,C){return this._verify1(k),this.imod(k.ushln(C))},U.prototype.imul=function(k,C){return this._verify2(k,C),this.imod(k.imul(C))},U.prototype.mul=function(k,C){return this._verify2(k,C),this.imod(k.mul(C))},U.prototype.isqr=function(k){return this.imul(k,k.clone())},U.prototype.sqr=function(k){return this.mul(k,k)},U.prototype.sqrt=function(k){if(k.isZero())return k.clone();var C=this.m.andln(3);if(a(C%2==1),C===3){var v=this.m.add(new t(1)).iushrn(2);return this.pow(k,v)}for(var m=this.m.subn(1),b=0;!m.isZero()&&m.andln(1)===0;)b++,m.iushrn(1);a(!m.isZero());var g=new t(1).toRed(this),y=g.redNeg(),E=this.m.subn(1).iushrn(1),R=this.m.bitLength();for(R=new t(2*R*R).toRed(this);this.pow(R,E).cmp(y)!==0;)R.redIAdd(y);for(var O=this.pow(R,m),z=this.pow(k,m.addn(1).iushrn(1)),$=this.pow(k,m),Z=b;$.cmp(g)!==0;){for(var j=$,H=0;j.cmp(g)!==0;H++)j=j.redSqr();a(H<Z);var T=this.pow(O,new t(1).iushln(Z-H-1));z=z.redMul(T),O=T.redSqr(),$=$.redMul(O),Z=H}return z},U.prototype.invm=function(k){var C=k._invmp(this.m);return C.negative!==0?(C.negative=0,this.imod(C).redNeg()):this.imod(C)},U.prototype.pow=function(k,C){if(C.isZero())return new t(1).toRed(this);if(C.cmpn(1)===0)return k.clone();var v=new Array(16);v[0]=new t(1).toRed(this),v[1]=k;for(var m=2;m<v.length;m++)v[m]=this.mul(v[m-1],k);var b=v[0],g=0,y=0,E=C.bitLength()%26;for(E===0&&(E=26),m=C.length-1;m>=0;m--){for(var R=C.words[m],O=E-1;O>=0;O--){var z=R>>O&1;b!==v[0]&&(b=this.sqr(b)),z!==0||g!==0?(g<<=1,g|=z,(++y===4||m===0&&O===0)&&(b=this.mul(b,v[g]),y=0,g=0)):y=0}E=26}return b},U.prototype.convertTo=function(k){var C=k.umod(this.m);return C===k?C.clone():C},U.prototype.convertFrom=function(k){var C=k.clone();return C.red=null,C},t.mont=function(k){return new B(k)},r(B,U),B.prototype.convertTo=function(k){return this.imod(k.ushln(this.shift))},B.prototype.convertFrom=function(k){var C=this.imod(k.mul(this.rinv));return C.red=null,C},B.prototype.imul=function(k,C){if(k.isZero()||C.isZero())return k.words[0]=0,k.length=1,k;var v=k.imul(C),m=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=v.isub(m).iushrn(this.shift),g=b;return b.cmp(this.m)>=0?g=b.isub(this.m):b.cmpn(0)<0&&(g=b.iadd(this.m)),g._forceRed(this)},B.prototype.mul=function(k,C){if(k.isZero()||C.isZero())return new t(0)._forceRed(this);var v=k.mul(C),m=v.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=v.isub(m).iushrn(this.shift),g=b;return b.cmp(this.m)>=0?g=b.isub(this.m):b.cmpn(0)<0&&(g=b.iadd(this.m)),g._forceRed(this)},B.prototype.invm=function(k){return this.imod(k._invmp(this.m).mul(this.r2))._forceRed(this)}})(x===void 0||x)},{buffer:188}],185:[function(n,x,_){_.byteLength=function(s){var f=l(s),h=f[0],u=f[1];return 3*(h+u)/4-u},_.toByteArray=function(s){var f,h,u=l(s),p=u[0],d=u[1],w=new a((function(N,L,I){return 3*(L+I)/4-I})(0,p,d)),S=0,A=d>0?p-4:p;for(h=0;h<A;h+=4)f=o[s.charCodeAt(h)]<<18|o[s.charCodeAt(h+1)]<<12|o[s.charCodeAt(h+2)]<<6|o[s.charCodeAt(h+3)],w[S++]=f>>16&255,w[S++]=f>>8&255,w[S++]=255&f;return d===2&&(f=o[s.charCodeAt(h)]<<2|o[s.charCodeAt(h+1)]>>4,w[S++]=255&f),d===1&&(f=o[s.charCodeAt(h)]<<10|o[s.charCodeAt(h+1)]<<4|o[s.charCodeAt(h+2)]>>2,w[S++]=f>>8&255,w[S++]=255&f),w},_.fromByteArray=function(s){for(var f,h=s.length,u=h%3,p=[],d=0,w=h-u;d<w;d+=16383)p.push(i(s,d,d+16383>w?w:d+16383));return u===1?(f=s[h-1],p.push(c[f>>2]+c[f<<4&63]+"==")):u===2&&(f=(s[h-2]<<8)+s[h-1],p.push(c[f>>10]+c[f>>4&63]+c[f<<2&63]+"=")),p.join("")};for(var c=[],o=[],a=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)c[t]=r[t],o[r.charCodeAt(t)]=t;function l(s){var f=s.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=s.indexOf("=");return h===-1&&(h=f),[h,h===f?0:4-h%4]}function i(s,f,h){for(var u,p,d=[],w=f;w<h;w+=3)u=(s[w]<<16&16711680)+(s[w+1]<<8&65280)+(255&s[w+2]),d.push(c[(p=u)>>18&63]+c[p>>12&63]+c[p>>6&63]+c[63&p]);return d.join("")}o[45]=62,o[95]=63},{}],186:[function(n,x,_){(function(c,o){function a(v,m){if(!v)throw new Error(m||"Assertion failed")}function r(v,m){v.super_=m;var b=function(){};b.prototype=m.prototype,v.prototype=new b,v.prototype.constructor=v}function t(v,m,b){if(t.isBN(v))return v;this.negative=0,this.words=null,this.length=0,this.red=null,v!==null&&(m!=="le"&&m!=="be"||(b=m,m=10),this._init(v||0,m||10,b||"be"))}var e;typeof c=="object"?c.exports=t:(void 0).BN=t,t.BN=t,t.wordSize=26;try{e=typeof window<"u"&&window.Buffer!==void 0?window.Buffer:n("buffer").Buffer}catch{}function l(v,m){var b=v.charCodeAt(m);return b>=48&&b<=57?b-48:b>=65&&b<=70?b-55:b>=97&&b<=102?b-87:void a(!1,"Invalid character in "+v)}function i(v,m,b){var g=l(v,b);return b-1>=m&&(g|=l(v,b-1)<<4),g}function s(v,m,b,g){for(var y=0,E=0,R=Math.min(v.length,b),O=m;O<R;O++){var z=v.charCodeAt(O)-48;y*=g,E=z>=49?z-49+10:z>=17?z-17+10:z,a(z>=0&&E<g,"Invalid character"),y+=E}return y}function f(v,m){v.words=m.words,v.length=m.length,v.negative=m.negative,v.red=m.red}if(t.isBN=function(v){return v instanceof t||v!==null&&typeof v=="object"&&v.constructor.wordSize===t.wordSize&&Array.isArray(v.words)},t.max=function(v,m){return v.cmp(m)>0?v:m},t.min=function(v,m){return v.cmp(m)<0?v:m},t.prototype._init=function(v,m,b){if(typeof v=="number")return this._initNumber(v,m,b);if(typeof v=="object")return this._initArray(v,m,b);m==="hex"&&(m=16),a(m===(0|m)&&m>=2&&m<=36);var g=0;(v=v.toString().replace(/\s+/g,""))[0]==="-"&&(g++,this.negative=1),g<v.length&&(m===16?this._parseHex(v,g,b):(this._parseBase(v,m,g),b==="le"&&this._initArray(this.toArray(),m,b)))},t.prototype._initNumber=function(v,m,b){v<0&&(this.negative=1,v=-v),v<67108864?(this.words=[67108863&v],this.length=1):v<4503599627370496?(this.words=[67108863&v,v/67108864&67108863],this.length=2):(a(v<9007199254740992),this.words=[67108863&v,v/67108864&67108863,1],this.length=3),b==="le"&&this._initArray(this.toArray(),m,b)},t.prototype._initArray=function(v,m,b){if(a(typeof v.length=="number"),v.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(v.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var y,E,R=0;if(b==="be")for(g=v.length-1,y=0;g>=0;g-=3)E=v[g]|v[g-1]<<8|v[g-2]<<16,this.words[y]|=E<<R&67108863,this.words[y+1]=E>>>26-R&67108863,(R+=24)>=26&&(R-=26,y++);else if(b==="le")for(g=0,y=0;g<v.length;g+=3)E=v[g]|v[g+1]<<8|v[g+2]<<16,this.words[y]|=E<<R&67108863,this.words[y+1]=E>>>26-R&67108863,(R+=24)>=26&&(R-=26,y++);return this._strip()},t.prototype._parseHex=function(v,m,b){this.length=Math.ceil((v.length-m)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var y,E=0,R=0;if(b==="be")for(g=v.length-1;g>=m;g-=2)y=i(v,m,g)<<E,this.words[R]|=67108863&y,E>=18?(E-=18,R+=1,this.words[R]|=y>>>26):E+=8;else for(g=(v.length-m)%2==0?m+1:m;g<v.length;g+=2)y=i(v,m,g)<<E,this.words[R]|=67108863&y,E>=18?(E-=18,R+=1,this.words[R]|=y>>>26):E+=8;this._strip()},t.prototype._parseBase=function(v,m,b){this.words=[0],this.length=1;for(var g=0,y=1;y<=67108863;y*=m)g++;g--,y=y/m|0;for(var E=v.length-b,R=E%g,O=Math.min(E,E-R)+b,z=0,$=b;$<O;$+=g)z=s(v,$,$+g,m),this.imuln(y),this.words[0]+z<67108864?this.words[0]+=z:this._iaddn(z);if(R!==0){var Z=1;for(z=s(v,$,v.length,m),$=0;$<R;$++)Z*=m;this.imuln(Z),this.words[0]+z<67108864?this.words[0]+=z:this._iaddn(z)}this._strip()},t.prototype.copy=function(v){v.words=new Array(this.length);for(var m=0;m<this.length;m++)v.words[m]=this.words[m];v.length=this.length,v.negative=this.negative,v.red=this.red},t.prototype._move=function(v){f(v,this)},t.prototype.clone=function(){var v=new t(null);return this.copy(v),v},t.prototype._expand=function(v){for(;this.length<v;)this.words[this.length++]=0;return this},t.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},t.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{t.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch{t.prototype.inspect=h}else t.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var u=["","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"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];t.prototype.toString=function(v,m){var b;if(m=0|m||1,(v=v||10)===16||v==="hex"){b="";for(var g=0,y=0,E=0;E<this.length;E++){var R=this.words[E],O=(16777215&(R<<g|y)).toString(16);y=R>>>24-g&16777215,(g+=2)>=26&&(g-=26,E--),b=y!==0||E!==this.length-1?u[6-O.length]+O+b:O+b}for(y!==0&&(b=y.toString(16)+b);b.length%m!=0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}if(v===(0|v)&&v>=2&&v<=36){var z=p[v],$=d[v];b="";var Z=this.clone();for(Z.negative=0;!Z.isZero();){var j=Z.modrn($).toString(v);b=(Z=Z.idivn($)).isZero()?j+b:u[z-j.length]+j+b}for(this.isZero()&&(b="0"+b);b.length%m!=0;)b="0"+b;return this.negative!==0&&(b="-"+b),b}a(!1,"Base should be between 2 and 36")},t.prototype.toNumber=function(){var v=this.words[0];return this.length===2?v+=67108864*this.words[1]:this.length===3&&this.words[2]===1?v+=4503599627370496+67108864*this.words[1]:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-v:v},t.prototype.toJSON=function(){return this.toString(16,2)},e&&(t.prototype.toBuffer=function(v,m){return this.toArrayLike(e,v,m)}),t.prototype.toArray=function(v,m){return this.toArrayLike(Array,v,m)};function w(v,m,b){b.negative=m.negative^v.negative;var g=v.length+m.length|0;b.length=g,g=g-1|0;var y=0|v.words[0],E=0|m.words[0],R=y*E,O=67108863&R,z=R/67108864|0;b.words[0]=O;for(var $=1;$<g;$++){for(var Z=z>>>26,j=67108863&z,H=Math.min($,m.length-1),T=Math.max(0,$-v.length+1);T<=H;T++){var M=$-T|0;Z+=(R=(y=0|v.words[M])*(E=0|m.words[T])+j)/67108864|0,j=67108863&R}b.words[$]=0|j,z=0|Z}return z!==0?b.words[$]=0|z:b.length--,b._strip()}t.prototype.toArrayLike=function(v,m,b){this._strip();var g=this.byteLength(),y=b||Math.max(1,g);a(g<=y,"byte array longer than desired length"),a(y>0,"Requested array length <= 0");var E=(function(R,O){return R.allocUnsafe?R.allocUnsafe(O):new R(O)})(v,y);return this["_toArrayLike"+(m==="le"?"LE":"BE")](E,g),E},t.prototype._toArrayLikeLE=function(v,m){for(var b=0,g=0,y=0,E=0;y<this.length;y++){var R=this.words[y]<<E|g;v[b++]=255&R,b<v.length&&(v[b++]=R>>8&255),b<v.length&&(v[b++]=R>>16&255),E===6?(b<v.length&&(v[b++]=R>>24&255),g=0,E=0):(g=R>>>24,E+=2)}if(b<v.length)for(v[b++]=g;b<v.length;)v[b++]=0},t.prototype._toArrayLikeBE=function(v,m){for(var b=v.length-1,g=0,y=0,E=0;y<this.length;y++){var R=this.words[y]<<E|g;v[b--]=255&R,b>=0&&(v[b--]=R>>8&255),b>=0&&(v[b--]=R>>16&255),E===6?(b>=0&&(v[b--]=R>>24&255),g=0,E=0):(g=R>>>24,E+=2)}if(b>=0)for(v[b--]=g;b>=0;)v[b--]=0},Math.clz32?t.prototype._countBits=function(v){return 32-Math.clz32(v)}:t.prototype._countBits=function(v){var m=v,b=0;return m>=4096&&(b+=13,m>>>=13),m>=64&&(b+=7,m>>>=7),m>=8&&(b+=4,m>>>=4),m>=2&&(b+=2,m>>>=2),b+m},t.prototype._zeroBits=function(v){if(v===0)return 26;var m=v,b=0;return(8191&m)==0&&(b+=13,m>>>=13),(127&m)==0&&(b+=7,m>>>=7),(15&m)==0&&(b+=4,m>>>=4),(3&m)==0&&(b+=2,m>>>=2),(1&m)==0&&b++,b},t.prototype.bitLength=function(){var v=this.words[this.length-1],m=this._countBits(v);return 26*(this.length-1)+m},t.prototype.zeroBits=function(){if(this.isZero())return 0;for(var v=0,m=0;m<this.length;m++){var b=this._zeroBits(this.words[m]);if(v+=b,b!==26)break}return v},t.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},t.prototype.toTwos=function(v){return this.negative!==0?this.abs().inotn(v).iaddn(1):this.clone()},t.prototype.fromTwos=function(v){return this.testn(v-1)?this.notn(v).iaddn(1).ineg():this.clone()},t.prototype.isNeg=function(){return this.negative!==0},t.prototype.neg=function(){return this.clone().ineg()},t.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},t.prototype.iuor=function(v){for(;this.length<v.length;)this.words[this.length++]=0;for(var m=0;m<v.length;m++)this.words[m]=this.words[m]|v.words[m];return this._strip()},t.prototype.ior=function(v){return a((this.negative|v.negative)==0),this.iuor(v)},t.prototype.or=function(v){return this.length>v.length?this.clone().ior(v):v.clone().ior(this)},t.prototype.uor=function(v){return this.length>v.length?this.clone().iuor(v):v.clone().iuor(this)},t.prototype.iuand=function(v){var m;m=this.length>v.length?v:this;for(var b=0;b<m.length;b++)this.words[b]=this.words[b]&v.words[b];return this.length=m.length,this._strip()},t.prototype.iand=function(v){return a((this.negative|v.negative)==0),this.iuand(v)},t.prototype.and=function(v){return this.length>v.length?this.clone().iand(v):v.clone().iand(this)},t.prototype.uand=function(v){return this.length>v.length?this.clone().iuand(v):v.clone().iuand(this)},t.prototype.iuxor=function(v){var m,b;this.length>v.length?(m=this,b=v):(m=v,b=this);for(var g=0;g<b.length;g++)this.words[g]=m.words[g]^b.words[g];if(this!==m)for(;g<m.length;g++)this.words[g]=m.words[g];return this.length=m.length,this._strip()},t.prototype.ixor=function(v){return a((this.negative|v.negative)==0),this.iuxor(v)},t.prototype.xor=function(v){return this.length>v.length?this.clone().ixor(v):v.clone().ixor(this)},t.prototype.uxor=function(v){return this.length>v.length?this.clone().iuxor(v):v.clone().iuxor(this)},t.prototype.inotn=function(v){a(typeof v=="number"&&v>=0);var m=0|Math.ceil(v/26),b=v%26;this._expand(m),b>0&&m--;for(var g=0;g<m;g++)this.words[g]=67108863&~this.words[g];return b>0&&(this.words[g]=~this.words[g]&67108863>>26-b),this._strip()},t.prototype.notn=function(v){return this.clone().inotn(v)},t.prototype.setn=function(v,m){a(typeof v=="number"&&v>=0);var b=v/26|0,g=v%26;return this._expand(b+1),this.words[b]=m?this.words[b]|1<<g:this.words[b]&~(1<<g),this._strip()},t.prototype.iadd=function(v){var m,b,g;if(this.negative!==0&&v.negative===0)return this.negative=0,m=this.isub(v),this.negative^=1,this._normSign();if(this.negative===0&&v.negative!==0)return v.negative=0,m=this.isub(v),v.negative=1,m._normSign();this.length>v.length?(b=this,g=v):(b=v,g=this);for(var y=0,E=0;E<g.length;E++)m=(0|b.words[E])+(0|g.words[E])+y,this.words[E]=67108863&m,y=m>>>26;for(;y!==0&&E<b.length;E++)m=(0|b.words[E])+y,this.words[E]=67108863&m,y=m>>>26;if(this.length=b.length,y!==0)this.words[this.length]=y,this.length++;else if(b!==this)for(;E<b.length;E++)this.words[E]=b.words[E];return this},t.prototype.add=function(v){var m;return v.negative!==0&&this.negative===0?(v.negative=0,m=this.sub(v),v.negative^=1,m):v.negative===0&&this.negative!==0?(this.negative=0,m=v.sub(this),this.negative=1,m):this.length>v.length?this.clone().iadd(v):v.clone().iadd(this)},t.prototype.isub=function(v){if(v.negative!==0){v.negative=0;var m=this.iadd(v);return v.negative=1,m._normSign()}if(this.negative!==0)return this.negative=0,this.iadd(v),this.negative=1,this._normSign();var b,g,y=this.cmp(v);if(y===0)return this.negative=0,this.length=1,this.words[0]=0,this;y>0?(b=this,g=v):(b=v,g=this);for(var E=0,R=0;R<g.length;R++)E=(m=(0|b.words[R])-(0|g.words[R])+E)>>26,this.words[R]=67108863&m;for(;E!==0&&R<b.length;R++)E=(m=(0|b.words[R])+E)>>26,this.words[R]=67108863&m;if(E===0&&R<b.length&&b!==this)for(;R<b.length;R++)this.words[R]=b.words[R];return this.length=Math.max(this.length,R),b!==this&&(this.negative=1),this._strip()},t.prototype.sub=function(v){return this.clone().isub(v)};var S=function(v,m,b){var g,y,E,R=v.words,O=m.words,z=b.words,$=0,Z=0|R[0],j=8191&Z,H=Z>>>13,T=0|R[1],M=8191&T,F=T>>>13,V=0|R[2],Y=8191&V,q=V>>>13,K=0|R[3],nt=8191&K,rt=K>>>13,G=0|R[4],tt=8191&G,Q=G>>>13,st=0|R[5],it=8191&st,at=st>>>13,ut=0|R[6],ft=8191&ut,dt=ut>>>13,xt=0|R[7],_t=8191&xt,gt=xt>>>13,Rt=0|R[8],Tt=8191&Rt,At=Rt>>>13,jt=0|R[9],St=8191&jt,mt=jt>>>13,kt=0|O[0],Ct=8191&kt,Et=kt>>>13,Zt=0|O[1],re=8191&Zt,It=Zt>>>13,Qt=0|O[2],Xt=8191&Qt,Ut=Qt>>>13,ue=0|O[3],te=8191&ue,Dt=ue>>>13,Yt=0|O[4],oe=8191&Yt,Ft=Yt>>>13,ee=0|O[5],ae=8191&ee,Ht=ee>>>13,et=0|O[6],ot=8191&et,ct=et>>>13,yt=0|O[7],Nt=8191&yt,wt=yt>>>13,Lt=0|O[8],Pt=8191&Lt,Ot=Lt>>>13,$t=0|O[9],zt=8191&$t,Wt=$t>>>13;b.negative=v.negative^m.negative,b.length=19;var he=($+(g=Math.imul(j,Ct))|0)+((8191&(y=(y=Math.imul(j,Et))+Math.imul(H,Ct)|0))<<13)|0;$=((E=Math.imul(H,Et))+(y>>>13)|0)+(he>>>26)|0,he&=67108863,g=Math.imul(M,Ct),y=(y=Math.imul(M,Et))+Math.imul(F,Ct)|0,E=Math.imul(F,Et);var fe=($+(g=g+Math.imul(j,re)|0)|0)+((8191&(y=(y=y+Math.imul(j,It)|0)+Math.imul(H,re)|0))<<13)|0;$=((E=E+Math.imul(H,It)|0)+(y>>>13)|0)+(fe>>>26)|0,fe&=67108863,g=Math.imul(Y,Ct),y=(y=Math.imul(Y,Et))+Math.imul(q,Ct)|0,E=Math.imul(q,Et),g=g+Math.imul(M,re)|0,y=(y=y+Math.imul(M,It)|0)+Math.imul(F,re)|0,E=E+Math.imul(F,It)|0;var de=($+(g=g+Math.imul(j,Xt)|0)|0)+((8191&(y=(y=y+Math.imul(j,Ut)|0)+Math.imul(H,Xt)|0))<<13)|0;$=((E=E+Math.imul(H,Ut)|0)+(y>>>13)|0)+(de>>>26)|0,de&=67108863,g=Math.imul(nt,Ct),y=(y=Math.imul(nt,Et))+Math.imul(rt,Ct)|0,E=Math.imul(rt,Et),g=g+Math.imul(Y,re)|0,y=(y=y+Math.imul(Y,It)|0)+Math.imul(q,re)|0,E=E+Math.imul(q,It)|0,g=g+Math.imul(M,Xt)|0,y=(y=y+Math.imul(M,Ut)|0)+Math.imul(F,Xt)|0,E=E+Math.imul(F,Ut)|0;var pe=($+(g=g+Math.imul(j,te)|0)|0)+((8191&(y=(y=y+Math.imul(j,Dt)|0)+Math.imul(H,te)|0))<<13)|0;$=((E=E+Math.imul(H,Dt)|0)+(y>>>13)|0)+(pe>>>26)|0,pe&=67108863,g=Math.imul(tt,Ct),y=(y=Math.imul(tt,Et))+Math.imul(Q,Ct)|0,E=Math.imul(Q,Et),g=g+Math.imul(nt,re)|0,y=(y=y+Math.imul(nt,It)|0)+Math.imul(rt,re)|0,E=E+Math.imul(rt,It)|0,g=g+Math.imul(Y,Xt)|0,y=(y=y+Math.imul(Y,Ut)|0)+Math.imul(q,Xt)|0,E=E+Math.imul(q,Ut)|0,g=g+Math.imul(M,te)|0,y=(y=y+Math.imul(M,Dt)|0)+Math.imul(F,te)|0,E=E+Math.imul(F,Dt)|0;var ge=($+(g=g+Math.imul(j,oe)|0)|0)+((8191&(y=(y=y+Math.imul(j,Ft)|0)+Math.imul(H,oe)|0))<<13)|0;$=((E=E+Math.imul(H,Ft)|0)+(y>>>13)|0)+(ge>>>26)|0,ge&=67108863,g=Math.imul(it,Ct),y=(y=Math.imul(it,Et))+Math.imul(at,Ct)|0,E=Math.imul(at,Et),g=g+Math.imul(tt,re)|0,y=(y=y+Math.imul(tt,It)|0)+Math.imul(Q,re)|0,E=E+Math.imul(Q,It)|0,g=g+Math.imul(nt,Xt)|0,y=(y=y+Math.imul(nt,Ut)|0)+Math.imul(rt,Xt)|0,E=E+Math.imul(rt,Ut)|0,g=g+Math.imul(Y,te)|0,y=(y=y+Math.imul(Y,Dt)|0)+Math.imul(q,te)|0,E=E+Math.imul(q,Dt)|0,g=g+Math.imul(M,oe)|0,y=(y=y+Math.imul(M,Ft)|0)+Math.imul(F,oe)|0,E=E+Math.imul(F,Ft)|0;var J=($+(g=g+Math.imul(j,ae)|0)|0)+((8191&(y=(y=y+Math.imul(j,Ht)|0)+Math.imul(H,ae)|0))<<13)|0;$=((E=E+Math.imul(H,Ht)|0)+(y>>>13)|0)+(J>>>26)|0,J&=67108863,g=Math.imul(ft,Ct),y=(y=Math.imul(ft,Et))+Math.imul(dt,Ct)|0,E=Math.imul(dt,Et),g=g+Math.imul(it,re)|0,y=(y=y+Math.imul(it,It)|0)+Math.imul(at,re)|0,E=E+Math.imul(at,It)|0,g=g+Math.imul(tt,Xt)|0,y=(y=y+Math.imul(tt,Ut)|0)+Math.imul(Q,Xt)|0,E=E+Math.imul(Q,Ut)|0,g=g+Math.imul(nt,te)|0,y=(y=y+Math.imul(nt,Dt)|0)+Math.imul(rt,te)|0,E=E+Math.imul(rt,Dt)|0,g=g+Math.imul(Y,oe)|0,y=(y=y+Math.imul(Y,Ft)|0)+Math.imul(q,oe)|0,E=E+Math.imul(q,Ft)|0,g=g+Math.imul(M,ae)|0,y=(y=y+Math.imul(M,Ht)|0)+Math.imul(F,ae)|0,E=E+Math.imul(F,Ht)|0;var lt=($+(g=g+Math.imul(j,ot)|0)|0)+((8191&(y=(y=y+Math.imul(j,ct)|0)+Math.imul(H,ot)|0))<<13)|0;$=((E=E+Math.imul(H,ct)|0)+(y>>>13)|0)+(lt>>>26)|0,lt&=67108863,g=Math.imul(_t,Ct),y=(y=Math.imul(_t,Et))+Math.imul(gt,Ct)|0,E=Math.imul(gt,Et),g=g+Math.imul(ft,re)|0,y=(y=y+Math.imul(ft,It)|0)+Math.imul(dt,re)|0,E=E+Math.imul(dt,It)|0,g=g+Math.imul(it,Xt)|0,y=(y=y+Math.imul(it,Ut)|0)+Math.imul(at,Xt)|0,E=E+Math.imul(at,Ut)|0,g=g+Math.imul(tt,te)|0,y=(y=y+Math.imul(tt,Dt)|0)+Math.imul(Q,te)|0,E=E+Math.imul(Q,Dt)|0,g=g+Math.imul(nt,oe)|0,y=(y=y+Math.imul(nt,Ft)|0)+Math.imul(rt,oe)|0,E=E+Math.imul(rt,Ft)|0,g=g+Math.imul(Y,ae)|0,y=(y=y+Math.imul(Y,Ht)|0)+Math.imul(q,ae)|0,E=E+Math.imul(q,Ht)|0,g=g+Math.imul(M,ot)|0,y=(y=y+Math.imul(M,ct)|0)+Math.imul(F,ot)|0,E=E+Math.imul(F,ct)|0;var ht=($+(g=g+Math.imul(j,Nt)|0)|0)+((8191&(y=(y=y+Math.imul(j,wt)|0)+Math.imul(H,Nt)|0))<<13)|0;$=((E=E+Math.imul(H,wt)|0)+(y>>>13)|0)+(ht>>>26)|0,ht&=67108863,g=Math.imul(Tt,Ct),y=(y=Math.imul(Tt,Et))+Math.imul(At,Ct)|0,E=Math.imul(At,Et),g=g+Math.imul(_t,re)|0,y=(y=y+Math.imul(_t,It)|0)+Math.imul(gt,re)|0,E=E+Math.imul(gt,It)|0,g=g+Math.imul(ft,Xt)|0,y=(y=y+Math.imul(ft,Ut)|0)+Math.imul(dt,Xt)|0,E=E+Math.imul(dt,Ut)|0,g=g+Math.imul(it,te)|0,y=(y=y+Math.imul(it,Dt)|0)+Math.imul(at,te)|0,E=E+Math.imul(at,Dt)|0,g=g+Math.imul(tt,oe)|0,y=(y=y+Math.imul(tt,Ft)|0)+Math.imul(Q,oe)|0,E=E+Math.imul(Q,Ft)|0,g=g+Math.imul(nt,ae)|0,y=(y=y+Math.imul(nt,Ht)|0)+Math.imul(rt,ae)|0,E=E+Math.imul(rt,Ht)|0,g=g+Math.imul(Y,ot)|0,y=(y=y+Math.imul(Y,ct)|0)+Math.imul(q,ot)|0,E=E+Math.imul(q,ct)|0,g=g+Math.imul(M,Nt)|0,y=(y=y+Math.imul(M,wt)|0)+Math.imul(F,Nt)|0,E=E+Math.imul(F,wt)|0;var pt=($+(g=g+Math.imul(j,Pt)|0)|0)+((8191&(y=(y=y+Math.imul(j,Ot)|0)+Math.imul(H,Pt)|0))<<13)|0;$=((E=E+Math.imul(H,Ot)|0)+(y>>>13)|0)+(pt>>>26)|0,pt&=67108863,g=Math.imul(St,Ct),y=(y=Math.imul(St,Et))+Math.imul(mt,Ct)|0,E=Math.imul(mt,Et),g=g+Math.imul(Tt,re)|0,y=(y=y+Math.imul(Tt,It)|0)+Math.imul(At,re)|0,E=E+Math.imul(At,It)|0,g=g+Math.imul(_t,Xt)|0,y=(y=y+Math.imul(_t,Ut)|0)+Math.imul(gt,Xt)|0,E=E+Math.imul(gt,Ut)|0,g=g+Math.imul(ft,te)|0,y=(y=y+Math.imul(ft,Dt)|0)+Math.imul(dt,te)|0,E=E+Math.imul(dt,Dt)|0,g=g+Math.imul(it,oe)|0,y=(y=y+Math.imul(it,Ft)|0)+Math.imul(at,oe)|0,E=E+Math.imul(at,Ft)|0,g=g+Math.imul(tt,ae)|0,y=(y=y+Math.imul(tt,Ht)|0)+Math.imul(Q,ae)|0,E=E+Math.imul(Q,Ht)|0,g=g+Math.imul(nt,ot)|0,y=(y=y+Math.imul(nt,ct)|0)+Math.imul(rt,ot)|0,E=E+Math.imul(rt,ct)|0,g=g+Math.imul(Y,Nt)|0,y=(y=y+Math.imul(Y,wt)|0)+Math.imul(q,Nt)|0,E=E+Math.imul(q,wt)|0,g=g+Math.imul(M,Pt)|0,y=(y=y+Math.imul(M,Ot)|0)+Math.imul(F,Pt)|0,E=E+Math.imul(F,Ot)|0;var Mt=($+(g=g+Math.imul(j,zt)|0)|0)+((8191&(y=(y=y+Math.imul(j,Wt)|0)+Math.imul(H,zt)|0))<<13)|0;$=((E=E+Math.imul(H,Wt)|0)+(y>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,g=Math.imul(St,re),y=(y=Math.imul(St,It))+Math.imul(mt,re)|0,E=Math.imul(mt,It),g=g+Math.imul(Tt,Xt)|0,y=(y=y+Math.imul(Tt,Ut)|0)+Math.imul(At,Xt)|0,E=E+Math.imul(At,Ut)|0,g=g+Math.imul(_t,te)|0,y=(y=y+Math.imul(_t,Dt)|0)+Math.imul(gt,te)|0,E=E+Math.imul(gt,Dt)|0,g=g+Math.imul(ft,oe)|0,y=(y=y+Math.imul(ft,Ft)|0)+Math.imul(dt,oe)|0,E=E+Math.imul(dt,Ft)|0,g=g+Math.imul(it,ae)|0,y=(y=y+Math.imul(it,Ht)|0)+Math.imul(at,ae)|0,E=E+Math.imul(at,Ht)|0,g=g+Math.imul(tt,ot)|0,y=(y=y+Math.imul(tt,ct)|0)+Math.imul(Q,ot)|0,E=E+Math.imul(Q,ct)|0,g=g+Math.imul(nt,Nt)|0,y=(y=y+Math.imul(nt,wt)|0)+Math.imul(rt,Nt)|0,E=E+Math.imul(rt,wt)|0,g=g+Math.imul(Y,Pt)|0,y=(y=y+Math.imul(Y,Ot)|0)+Math.imul(q,Pt)|0,E=E+Math.imul(q,Ot)|0;var bt=($+(g=g+Math.imul(M,zt)|0)|0)+((8191&(y=(y=y+Math.imul(M,Wt)|0)+Math.imul(F,zt)|0))<<13)|0;$=((E=E+Math.imul(F,Wt)|0)+(y>>>13)|0)+(bt>>>26)|0,bt&=67108863,g=Math.imul(St,Xt),y=(y=Math.imul(St,Ut))+Math.imul(mt,Xt)|0,E=Math.imul(mt,Ut),g=g+Math.imul(Tt,te)|0,y=(y=y+Math.imul(Tt,Dt)|0)+Math.imul(At,te)|0,E=E+Math.imul(At,Dt)|0,g=g+Math.imul(_t,oe)|0,y=(y=y+Math.imul(_t,Ft)|0)+Math.imul(gt,oe)|0,E=E+Math.imul(gt,Ft)|0,g=g+Math.imul(ft,ae)|0,y=(y=y+Math.imul(ft,Ht)|0)+Math.imul(dt,ae)|0,E=E+Math.imul(dt,Ht)|0,g=g+Math.imul(it,ot)|0,y=(y=y+Math.imul(it,ct)|0)+Math.imul(at,ot)|0,E=E+Math.imul(at,ct)|0,g=g+Math.imul(tt,Nt)|0,y=(y=y+Math.imul(tt,wt)|0)+Math.imul(Q,Nt)|0,E=E+Math.imul(Q,wt)|0,g=g+Math.imul(nt,Pt)|0,y=(y=y+Math.imul(nt,Ot)|0)+Math.imul(rt,Pt)|0,E=E+Math.imul(rt,Ot)|0;var vt=($+(g=g+Math.imul(Y,zt)|0)|0)+((8191&(y=(y=y+Math.imul(Y,Wt)|0)+Math.imul(q,zt)|0))<<13)|0;$=((E=E+Math.imul(q,Wt)|0)+(y>>>13)|0)+(vt>>>26)|0,vt&=67108863,g=Math.imul(St,te),y=(y=Math.imul(St,Dt))+Math.imul(mt,te)|0,E=Math.imul(mt,Dt),g=g+Math.imul(Tt,oe)|0,y=(y=y+Math.imul(Tt,Ft)|0)+Math.imul(At,oe)|0,E=E+Math.imul(At,Ft)|0,g=g+Math.imul(_t,ae)|0,y=(y=y+Math.imul(_t,Ht)|0)+Math.imul(gt,ae)|0,E=E+Math.imul(gt,Ht)|0,g=g+Math.imul(ft,ot)|0,y=(y=y+Math.imul(ft,ct)|0)+Math.imul(dt,ot)|0,E=E+Math.imul(dt,ct)|0,g=g+Math.imul(it,Nt)|0,y=(y=y+Math.imul(it,wt)|0)+Math.imul(at,Nt)|0,E=E+Math.imul(at,wt)|0,g=g+Math.imul(tt,Pt)|0,y=(y=y+Math.imul(tt,Ot)|0)+Math.imul(Q,Pt)|0,E=E+Math.imul(Q,Ot)|0;var Kt=($+(g=g+Math.imul(nt,zt)|0)|0)+((8191&(y=(y=y+Math.imul(nt,Wt)|0)+Math.imul(rt,zt)|0))<<13)|0;$=((E=E+Math.imul(rt,Wt)|0)+(y>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,g=Math.imul(St,oe),y=(y=Math.imul(St,Ft))+Math.imul(mt,oe)|0,E=Math.imul(mt,Ft),g=g+Math.imul(Tt,ae)|0,y=(y=y+Math.imul(Tt,Ht)|0)+Math.imul(At,ae)|0,E=E+Math.imul(At,Ht)|0,g=g+Math.imul(_t,ot)|0,y=(y=y+Math.imul(_t,ct)|0)+Math.imul(gt,ot)|0,E=E+Math.imul(gt,ct)|0,g=g+Math.imul(ft,Nt)|0,y=(y=y+Math.imul(ft,wt)|0)+Math.imul(dt,Nt)|0,E=E+Math.imul(dt,wt)|0,g=g+Math.imul(it,Pt)|0,y=(y=y+Math.imul(it,Ot)|0)+Math.imul(at,Pt)|0,E=E+Math.imul(at,Ot)|0;var Vt=($+(g=g+Math.imul(tt,zt)|0)|0)+((8191&(y=(y=y+Math.imul(tt,Wt)|0)+Math.imul(Q,zt)|0))<<13)|0;$=((E=E+Math.imul(Q,Wt)|0)+(y>>>13)|0)+(Vt>>>26)|0,Vt&=67108863,g=Math.imul(St,ae),y=(y=Math.imul(St,Ht))+Math.imul(mt,ae)|0,E=Math.imul(mt,Ht),g=g+Math.imul(Tt,ot)|0,y=(y=y+Math.imul(Tt,ct)|0)+Math.imul(At,ot)|0,E=E+Math.imul(At,ct)|0,g=g+Math.imul(_t,Nt)|0,y=(y=y+Math.imul(_t,wt)|0)+Math.imul(gt,Nt)|0,E=E+Math.imul(gt,wt)|0,g=g+Math.imul(ft,Pt)|0,y=(y=y+Math.imul(ft,Ot)|0)+Math.imul(dt,Pt)|0,E=E+Math.imul(dt,Ot)|0;var qt=($+(g=g+Math.imul(it,zt)|0)|0)+((8191&(y=(y=y+Math.imul(it,Wt)|0)+Math.imul(at,zt)|0))<<13)|0;$=((E=E+Math.imul(at,Wt)|0)+(y>>>13)|0)+(qt>>>26)|0,qt&=67108863,g=Math.imul(St,ot),y=(y=Math.imul(St,ct))+Math.imul(mt,ot)|0,E=Math.imul(mt,ct),g=g+Math.imul(Tt,Nt)|0,y=(y=y+Math.imul(Tt,wt)|0)+Math.imul(At,Nt)|0,E=E+Math.imul(At,wt)|0,g=g+Math.imul(_t,Pt)|0,y=(y=y+Math.imul(_t,Ot)|0)+Math.imul(gt,Pt)|0,E=E+Math.imul(gt,Ot)|0;var Bt=($+(g=g+Math.imul(ft,zt)|0)|0)+((8191&(y=(y=y+Math.imul(ft,Wt)|0)+Math.imul(dt,zt)|0))<<13)|0;$=((E=E+Math.imul(dt,Wt)|0)+(y>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,g=Math.imul(St,Nt),y=(y=Math.imul(St,wt))+Math.imul(mt,Nt)|0,E=Math.imul(mt,wt),g=g+Math.imul(Tt,Pt)|0,y=(y=y+Math.imul(Tt,Ot)|0)+Math.imul(At,Pt)|0,E=E+Math.imul(At,Ot)|0;var ne=($+(g=g+Math.imul(_t,zt)|0)|0)+((8191&(y=(y=y+Math.imul(_t,Wt)|0)+Math.imul(gt,zt)|0))<<13)|0;$=((E=E+Math.imul(gt,Wt)|0)+(y>>>13)|0)+(ne>>>26)|0,ne&=67108863,g=Math.imul(St,Pt),y=(y=Math.imul(St,Ot))+Math.imul(mt,Pt)|0,E=Math.imul(mt,Ot);var ie=($+(g=g+Math.imul(Tt,zt)|0)|0)+((8191&(y=(y=y+Math.imul(Tt,Wt)|0)+Math.imul(At,zt)|0))<<13)|0;$=((E=E+Math.imul(At,Wt)|0)+(y>>>13)|0)+(ie>>>26)|0,ie&=67108863;var le=($+(g=Math.imul(St,zt))|0)+((8191&(y=(y=Math.imul(St,Wt))+Math.imul(mt,zt)|0))<<13)|0;return $=((E=Math.imul(mt,Wt))+(y>>>13)|0)+(le>>>26)|0,le&=67108863,z[0]=he,z[1]=fe,z[2]=de,z[3]=pe,z[4]=ge,z[5]=J,z[6]=lt,z[7]=ht,z[8]=pt,z[9]=Mt,z[10]=bt,z[11]=vt,z[12]=Kt,z[13]=Vt,z[14]=qt,z[15]=Bt,z[16]=ne,z[17]=ie,z[18]=le,$!==0&&(z[19]=$,b.length++),b};function A(v,m,b){b.negative=m.negative^v.negative,b.length=v.length+m.length;for(var g=0,y=0,E=0;E<b.length-1;E++){var R=y;y=0;for(var O=67108863&g,z=Math.min(E,m.length-1),$=Math.max(0,E-v.length+1);$<=z;$++){var Z=E-$,j=(0|v.words[Z])*(0|m.words[$]),H=67108863&j;O=67108863&(H=H+O|0),y+=(R=(R=R+(j/67108864|0)|0)+(H>>>26)|0)>>>26,R&=67108863}b.words[E]=O,g=R,R=y}return g!==0?b.words[E]=g:b.length--,b._strip()}function N(v,m,b){return A(v,m,b)}Math.imul||(S=w),t.prototype.mulTo=function(v,m){var b=this.length+v.length;return this.length===10&&v.length===10?S(this,v,m):b<63?w(this,v,m):b<1024?A(this,v,m):N(this,v,m)},t.prototype.mul=function(v){var m=new t(null);return m.words=new Array(this.length+v.length),this.mulTo(v,m)},t.prototype.mulf=function(v){var m=new t(null);return m.words=new Array(this.length+v.length),N(this,v,m)},t.prototype.imul=function(v){return this.clone().mulTo(v,this)},t.prototype.imuln=function(v){var m=v<0;m&&(v=-v),a(typeof v=="number"),a(v<67108864);for(var b=0,g=0;g<this.length;g++){var y=(0|this.words[g])*v,E=(67108863&y)+(67108863&b);b>>=26,b+=y/67108864|0,b+=E>>>26,this.words[g]=67108863&E}return b!==0&&(this.words[g]=b,this.length++),m?this.ineg():this},t.prototype.muln=function(v){return this.clone().imuln(v)},t.prototype.sqr=function(){return this.mul(this)},t.prototype.isqr=function(){return this.imul(this.clone())},t.prototype.pow=function(v){var m=(function(E){for(var R=new Array(E.bitLength()),O=0;O<R.length;O++){var z=O/26|0,$=O%26;R[O]=E.words[z]>>>$&1}return R})(v);if(m.length===0)return new t(1);for(var b=this,g=0;g<m.length&&m[g]===0;g++,b=b.sqr());if(++g<m.length)for(var y=b.sqr();g<m.length;g++,y=y.sqr())m[g]!==0&&(b=b.mul(y));return b},t.prototype.iushln=function(v){a(typeof v=="number"&&v>=0);var m,b=v%26,g=(v-b)/26,y=67108863>>>26-b<<26-b;if(b!==0){var E=0;for(m=0;m<this.length;m++){var R=this.words[m]&y,O=(0|this.words[m])-R<<b;this.words[m]=O|E,E=R>>>26-b}E&&(this.words[m]=E,this.length++)}if(g!==0){for(m=this.length-1;m>=0;m--)this.words[m+g]=this.words[m];for(m=0;m<g;m++)this.words[m]=0;this.length+=g}return this._strip()},t.prototype.ishln=function(v){return a(this.negative===0),this.iushln(v)},t.prototype.iushrn=function(v,m,b){var g;a(typeof v=="number"&&v>=0),g=m?(m-m%26)/26:0;var y=v%26,E=Math.min((v-y)/26,this.length),R=67108863^67108863>>>y<<y,O=b;if(g-=E,g=Math.max(0,g),O){for(var z=0;z<E;z++)O.words[z]=this.words[z];O.length=E}if(E!==0)if(this.length>E)for(this.length-=E,z=0;z<this.length;z++)this.words[z]=this.words[z+E];else this.words[0]=0,this.length=1;var $=0;for(z=this.length-1;z>=0&&($!==0||z>=g);z--){var Z=0|this.words[z];this.words[z]=$<<26-y|Z>>>y,$=Z&R}return O&&$!==0&&(O.words[O.length++]=$),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},t.prototype.ishrn=function(v,m,b){return a(this.negative===0),this.iushrn(v,m,b)},t.prototype.shln=function(v){return this.clone().ishln(v)},t.prototype.ushln=function(v){return this.clone().iushln(v)},t.prototype.shrn=function(v){return this.clone().ishrn(v)},t.prototype.ushrn=function(v){return this.clone().iushrn(v)},t.prototype.testn=function(v){a(typeof v=="number"&&v>=0);var m=v%26,b=(v-m)/26,g=1<<m;return!(this.length<=b)&&!!(this.words[b]&g)},t.prototype.imaskn=function(v){a(typeof v=="number"&&v>=0);var m=v%26,b=(v-m)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=b)return this;if(m!==0&&b++,this.length=Math.min(b,this.length),m!==0){var g=67108863^67108863>>>m<<m;this.words[this.length-1]&=g}return this._strip()},t.prototype.maskn=function(v){return this.clone().imaskn(v)},t.prototype.iaddn=function(v){return a(typeof v=="number"),a(v<67108864),v<0?this.isubn(-v):this.negative!==0?this.length===1&&(0|this.words[0])<=v?(this.words[0]=v-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(v),this.negative=1,this):this._iaddn(v)},t.prototype._iaddn=function(v){this.words[0]+=v;for(var m=0;m<this.length&&this.words[m]>=67108864;m++)this.words[m]-=67108864,m===this.length-1?this.words[m+1]=1:this.words[m+1]++;return this.length=Math.max(this.length,m+1),this},t.prototype.isubn=function(v){if(a(typeof v=="number"),a(v<67108864),v<0)return this.iaddn(-v);if(this.negative!==0)return this.negative=0,this.iaddn(v),this.negative=1,this;if(this.words[0]-=v,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var m=0;m<this.length&&this.words[m]<0;m++)this.words[m]+=67108864,this.words[m+1]-=1;return this._strip()},t.prototype.addn=function(v){return this.clone().iaddn(v)},t.prototype.subn=function(v){return this.clone().isubn(v)},t.prototype.iabs=function(){return this.negative=0,this},t.prototype.abs=function(){return this.clone().iabs()},t.prototype._ishlnsubmul=function(v,m,b){var g,y,E=v.length+b;this._expand(E);var R=0;for(g=0;g<v.length;g++){y=(0|this.words[g+b])+R;var O=(0|v.words[g])*m;R=((y-=67108863&O)>>26)-(O/67108864|0),this.words[g+b]=67108863&y}for(;g<this.length-b;g++)R=(y=(0|this.words[g+b])+R)>>26,this.words[g+b]=67108863&y;if(R===0)return this._strip();for(a(R===-1),R=0,g=0;g<this.length;g++)R=(y=-(0|this.words[g])+R)>>26,this.words[g]=67108863&y;return this.negative=1,this._strip()},t.prototype._wordDiv=function(v,m){var b=(this.length,v.length),g=this.clone(),y=v,E=0|y.words[y.length-1];(b=26-this._countBits(E))!==0&&(y=y.ushln(b),g.iushln(b),E=0|y.words[y.length-1]);var R,O=g.length-y.length;if(m!=="mod"){(R=new t(null)).length=O+1,R.words=new Array(R.length);for(var z=0;z<R.length;z++)R.words[z]=0}var $=g.clone()._ishlnsubmul(y,1,O);$.negative===0&&(g=$,R&&(R.words[O]=1));for(var Z=O-1;Z>=0;Z--){var j=67108864*(0|g.words[y.length+Z])+(0|g.words[y.length+Z-1]);for(j=Math.min(j/E|0,67108863),g._ishlnsubmul(y,j,Z);g.negative!==0;)j--,g.negative=0,g._ishlnsubmul(y,1,Z),g.isZero()||(g.negative^=1);R&&(R.words[Z]=j)}return R&&R._strip(),g._strip(),m!=="div"&&b!==0&&g.iushrn(b),{div:R||null,mod:g}},t.prototype.divmod=function(v,m,b){return a(!v.isZero()),this.isZero()?{div:new t(0),mod:new t(0)}:this.negative!==0&&v.negative===0?(E=this.neg().divmod(v,m),m!=="mod"&&(g=E.div.neg()),m!=="div"&&(y=E.mod.neg(),b&&y.negative!==0&&y.iadd(v)),{div:g,mod:y}):this.negative===0&&v.negative!==0?(E=this.divmod(v.neg(),m),m!=="mod"&&(g=E.div.neg()),{div:g,mod:E.mod}):(this.negative&v.negative)!=0?(E=this.neg().divmod(v.neg(),m),m!=="div"&&(y=E.mod.neg(),b&&y.negative!==0&&y.isub(v)),{div:E.div,mod:y}):v.length>this.length||this.cmp(v)<0?{div:new t(0),mod:this}:v.length===1?m==="div"?{div:this.divn(v.words[0]),mod:null}:m==="mod"?{div:null,mod:new t(this.modrn(v.words[0]))}:{div:this.divn(v.words[0]),mod:new t(this.modrn(v.words[0]))}:this._wordDiv(v,m);var g,y,E},t.prototype.div=function(v){return this.divmod(v,"div",!1).div},t.prototype.mod=function(v){return this.divmod(v,"mod",!1).mod},t.prototype.umod=function(v){return this.divmod(v,"mod",!0).mod},t.prototype.divRound=function(v){var m=this.divmod(v);if(m.mod.isZero())return m.div;var b=m.div.negative!==0?m.mod.isub(v):m.mod,g=v.ushrn(1),y=v.andln(1),E=b.cmp(g);return E<0||y===1&&E===0?m.div:m.div.negative!==0?m.div.isubn(1):m.div.iaddn(1)},t.prototype.modrn=function(v){var m=v<0;m&&(v=-v),a(v<=67108863);for(var b=(1<<26)%v,g=0,y=this.length-1;y>=0;y--)g=(b*g+(0|this.words[y]))%v;return m?-g:g},t.prototype.modn=function(v){return this.modrn(v)},t.prototype.idivn=function(v){var m=v<0;m&&(v=-v),a(v<=67108863);for(var b=0,g=this.length-1;g>=0;g--){var y=(0|this.words[g])+67108864*b;this.words[g]=y/v|0,b=y%v}return this._strip(),m?this.ineg():this},t.prototype.divn=function(v){return this.clone().idivn(v)},t.prototype.egcd=function(v){a(v.negative===0),a(!v.isZero());var m=this,b=v.clone();m=m.negative!==0?m.umod(v):m.clone();for(var g=new t(1),y=new t(0),E=new t(0),R=new t(1),O=0;m.isEven()&&b.isEven();)m.iushrn(1),b.iushrn(1),++O;for(var z=b.clone(),$=m.clone();!m.isZero();){for(var Z=0,j=1;(m.words[0]&j)==0&&Z<26;++Z,j<<=1);if(Z>0)for(m.iushrn(Z);Z-- >0;)(g.isOdd()||y.isOdd())&&(g.iadd(z),y.isub($)),g.iushrn(1),y.iushrn(1);for(var H=0,T=1;(b.words[0]&T)==0&&H<26;++H,T<<=1);if(H>0)for(b.iushrn(H);H-- >0;)(E.isOdd()||R.isOdd())&&(E.iadd(z),R.isub($)),E.iushrn(1),R.iushrn(1);m.cmp(b)>=0?(m.isub(b),g.isub(E),y.isub(R)):(b.isub(m),E.isub(g),R.isub(y))}return{a:E,b:R,gcd:b.iushln(O)}},t.prototype._invmp=function(v){a(v.negative===0),a(!v.isZero());var m=this,b=v.clone();m=m.negative!==0?m.umod(v):m.clone();for(var g,y=new t(1),E=new t(0),R=b.clone();m.cmpn(1)>0&&b.cmpn(1)>0;){for(var O=0,z=1;(m.words[0]&z)==0&&O<26;++O,z<<=1);if(O>0)for(m.iushrn(O);O-- >0;)y.isOdd()&&y.iadd(R),y.iushrn(1);for(var $=0,Z=1;(b.words[0]&Z)==0&&$<26;++$,Z<<=1);if($>0)for(b.iushrn($);$-- >0;)E.isOdd()&&E.iadd(R),E.iushrn(1);m.cmp(b)>=0?(m.isub(b),y.isub(E)):(b.isub(m),E.isub(y))}return(g=m.cmpn(1)===0?y:E).cmpn(0)<0&&g.iadd(v),g},t.prototype.gcd=function(v){if(this.isZero())return v.abs();if(v.isZero())return this.abs();var m=this.clone(),b=v.clone();m.negative=0,b.negative=0;for(var g=0;m.isEven()&&b.isEven();g++)m.iushrn(1),b.iushrn(1);for(;;){for(;m.isEven();)m.iushrn(1);for(;b.isEven();)b.iushrn(1);var y=m.cmp(b);if(y<0){var E=m;m=b,b=E}else if(y===0||b.cmpn(1)===0)break;m.isub(b)}return b.iushln(g)},t.prototype.invm=function(v){return this.egcd(v).a.umod(v)},t.prototype.isEven=function(){return(1&this.words[0])==0},t.prototype.isOdd=function(){return(1&this.words[0])==1},t.prototype.andln=function(v){return this.words[0]&v},t.prototype.bincn=function(v){a(typeof v=="number");var m=v%26,b=(v-m)/26,g=1<<m;if(this.length<=b)return this._expand(b+1),this.words[b]|=g,this;for(var y=g,E=b;y!==0&&E<this.length;E++){var R=0|this.words[E];y=(R+=y)>>>26,R&=67108863,this.words[E]=R}return y!==0&&(this.words[E]=y,this.length++),this},t.prototype.isZero=function(){return this.length===1&&this.words[0]===0},t.prototype.cmpn=function(v){var m,b=v<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;if(this._strip(),this.length>1)m=1;else{b&&(v=-v),a(v<=67108863,"Number is too big");var g=0|this.words[0];m=g===v?0:g<v?-1:1}return this.negative!==0?0|-m:m},t.prototype.cmp=function(v){if(this.negative!==0&&v.negative===0)return-1;if(this.negative===0&&v.negative!==0)return 1;var m=this.ucmp(v);return this.negative!==0?0|-m:m},t.prototype.ucmp=function(v){if(this.length>v.length)return 1;if(this.length<v.length)return-1;for(var m=0,b=this.length-1;b>=0;b--){var g=0|this.words[b],y=0|v.words[b];if(g!==y){g<y?m=-1:g>y&&(m=1);break}}return m},t.prototype.gtn=function(v){return this.cmpn(v)===1},t.prototype.gt=function(v){return this.cmp(v)===1},t.prototype.gten=function(v){return this.cmpn(v)>=0},t.prototype.gte=function(v){return this.cmp(v)>=0},t.prototype.ltn=function(v){return this.cmpn(v)===-1},t.prototype.lt=function(v){return this.cmp(v)===-1},t.prototype.lten=function(v){return this.cmpn(v)<=0},t.prototype.lte=function(v){return this.cmp(v)<=0},t.prototype.eqn=function(v){return this.cmpn(v)===0},t.prototype.eq=function(v){return this.cmp(v)===0},t.red=function(v){return new k(v)},t.prototype.toRed=function(v){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),v.convertTo(this)._forceRed(v)},t.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},t.prototype._forceRed=function(v){return this.red=v,this},t.prototype.forceRed=function(v){return a(!this.red,"Already a number in reduction context"),this._forceRed(v)},t.prototype.redAdd=function(v){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,v)},t.prototype.redIAdd=function(v){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,v)},t.prototype.redSub=function(v){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,v)},t.prototype.redISub=function(v){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,v)},t.prototype.redShl=function(v){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,v)},t.prototype.redMul=function(v){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.mul(this,v)},t.prototype.redIMul=function(v){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,v),this.red.imul(this,v)},t.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},t.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},t.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},t.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},t.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},t.prototype.redPow=function(v){return a(this.red&&!v.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,v)};var L={k256:null,p224:null,p192:null,p25519:null};function I(v,m){this.name=v,this.p=new t(m,16),this.n=this.p.bitLength(),this.k=new t(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function P(){I.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function D(){I.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function U(){I.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function B(){I.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(v){if(typeof v=="string"){var m=t._prime(v);this.m=m.p,this.prime=m}else a(v.gtn(1),"modulus must be greater than 1"),this.m=v,this.prime=null}function C(v){k.call(this,v),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new t(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)}I.prototype._tmp=function(){var v=new t(null);return v.words=new Array(Math.ceil(this.n/13)),v},I.prototype.ireduce=function(v){var m,b=v;do this.split(b,this.tmp),m=(b=(b=this.imulK(b)).iadd(this.tmp)).bitLength();while(m>this.n);var g=m<this.n?-1:b.ucmp(this.p);return g===0?(b.words[0]=0,b.length=1):g>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},I.prototype.split=function(v,m){v.iushrn(this.n,0,m)},I.prototype.imulK=function(v){return v.imul(this.k)},r(P,I),P.prototype.split=function(v,m){for(var b=Math.min(v.length,9),g=0;g<b;g++)m.words[g]=v.words[g];if(m.length=b,v.length<=9)return v.words[0]=0,void(v.length=1);var y=v.words[9];for(m.words[m.length++]=4194303&y,g=10;g<v.length;g++){var E=0|v.words[g];v.words[g-10]=(4194303&E)<<4|y>>>22,y=E}y>>>=22,v.words[g-10]=y,y===0&&v.length>10?v.length-=10:v.length-=9},P.prototype.imulK=function(v){v.words[v.length]=0,v.words[v.length+1]=0,v.length+=2;for(var m=0,b=0;b<v.length;b++){var g=0|v.words[b];m+=977*g,v.words[b]=67108863&m,m=64*g+(m/67108864|0)}return v.words[v.length-1]===0&&(v.length--,v.words[v.length-1]===0&&v.length--),v},r(D,I),r(U,I),r(B,I),B.prototype.imulK=function(v){for(var m=0,b=0;b<v.length;b++){var g=19*(0|v.words[b])+m,y=67108863&g;g>>>=26,v.words[b]=y,m=g}return m!==0&&(v.words[v.length++]=m),v},t._prime=function(v){if(L[v])return L[v];var m;if(v==="k256")m=new P;else if(v==="p224")m=new D;else if(v==="p192")m=new U;else{if(v!=="p25519")throw new Error("Unknown prime "+v);m=new B}return L[v]=m,m},k.prototype._verify1=function(v){a(v.negative===0,"red works only with positives"),a(v.red,"red works only with red numbers")},k.prototype._verify2=function(v,m){a((v.negative|m.negative)==0,"red works only with positives"),a(v.red&&v.red===m.red,"red works only with red numbers")},k.prototype.imod=function(v){return this.prime?this.prime.ireduce(v)._forceRed(this):(f(v,v.umod(this.m)._forceRed(this)),v)},k.prototype.neg=function(v){return v.isZero()?v.clone():this.m.sub(v)._forceRed(this)},k.prototype.add=function(v,m){this._verify2(v,m);var b=v.add(m);return b.cmp(this.m)>=0&&b.isub(this.m),b._forceRed(this)},k.prototype.iadd=function(v,m){this._verify2(v,m);var b=v.iadd(m);return b.cmp(this.m)>=0&&b.isub(this.m),b},k.prototype.sub=function(v,m){this._verify2(v,m);var b=v.sub(m);return b.cmpn(0)<0&&b.iadd(this.m),b._forceRed(this)},k.prototype.isub=function(v,m){this._verify2(v,m);var b=v.isub(m);return b.cmpn(0)<0&&b.iadd(this.m),b},k.prototype.shl=function(v,m){return this._verify1(v),this.imod(v.ushln(m))},k.prototype.imul=function(v,m){return this._verify2(v,m),this.imod(v.imul(m))},k.prototype.mul=function(v,m){return this._verify2(v,m),this.imod(v.mul(m))},k.prototype.isqr=function(v){return this.imul(v,v.clone())},k.prototype.sqr=function(v){return this.mul(v,v)},k.prototype.sqrt=function(v){if(v.isZero())return v.clone();var m=this.m.andln(3);if(a(m%2==1),m===3){var b=this.m.add(new t(1)).iushrn(2);return this.pow(v,b)}for(var g=this.m.subn(1),y=0;!g.isZero()&&g.andln(1)===0;)y++,g.iushrn(1);a(!g.isZero());var E=new t(1).toRed(this),R=E.redNeg(),O=this.m.subn(1).iushrn(1),z=this.m.bitLength();for(z=new t(2*z*z).toRed(this);this.pow(z,O).cmp(R)!==0;)z.redIAdd(R);for(var $=this.pow(z,g),Z=this.pow(v,g.addn(1).iushrn(1)),j=this.pow(v,g),H=y;j.cmp(E)!==0;){for(var T=j,M=0;T.cmp(E)!==0;M++)T=T.redSqr();a(M<H);var F=this.pow($,new t(1).iushln(H-M-1));Z=Z.redMul(F),$=F.redSqr(),j=j.redMul($),H=M}return Z},k.prototype.invm=function(v){var m=v._invmp(this.m);return m.negative!==0?(m.negative=0,this.imod(m).redNeg()):this.imod(m)},k.prototype.pow=function(v,m){if(m.isZero())return new t(1).toRed(this);if(m.cmpn(1)===0)return v.clone();var b=new Array(16);b[0]=new t(1).toRed(this),b[1]=v;for(var g=2;g<b.length;g++)b[g]=this.mul(b[g-1],v);var y=b[0],E=0,R=0,O=m.bitLength()%26;for(O===0&&(O=26),g=m.length-1;g>=0;g--){for(var z=m.words[g],$=O-1;$>=0;$--){var Z=z>>$&1;y!==b[0]&&(y=this.sqr(y)),Z!==0||E!==0?(E<<=1,E|=Z,(++R===4||g===0&&$===0)&&(y=this.mul(y,b[E]),R=0,E=0)):R=0}O=26}return y},k.prototype.convertTo=function(v){var m=v.umod(this.m);return m===v?m.clone():m},k.prototype.convertFrom=function(v){var m=v.clone();return m.red=null,m},t.mont=function(v){return new C(v)},r(C,k),C.prototype.convertTo=function(v){return this.imod(v.ushln(this.shift))},C.prototype.convertFrom=function(v){var m=this.imod(v.mul(this.rinv));return m.red=null,m},C.prototype.imul=function(v,m){if(v.isZero()||m.isZero())return v.words[0]=0,v.length=1,v;var b=v.imul(m),g=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=b.isub(g).iushrn(this.shift),E=y;return y.cmp(this.m)>=0?E=y.isub(this.m):y.cmpn(0)<0&&(E=y.iadd(this.m)),E._forceRed(this)},C.prototype.mul=function(v,m){if(v.isZero()||m.isZero())return new t(0)._forceRed(this);var b=v.mul(m),g=b.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),y=b.isub(g).iushrn(this.shift),E=y;return y.cmp(this.m)>=0?E=y.isub(this.m):y.cmpn(0)<0&&(E=y.iadd(this.m)),E._forceRed(this)},C.prototype.invm=function(v){return this.imod(v._invmp(this.m).mul(this.r2))._forceRed(this)}})(x===void 0||x)},{buffer:188}],187:[function(n,x,_){var c;function o(r){this.rand=r}if(x.exports=function(r){return c||(c=new o(null)),c.generate(r)},x.exports.Rand=o,o.prototype.generate=function(r){return this._rand(r)},o.prototype._rand=function(r){if(this.rand.getBytes)return this.rand.getBytes(r);for(var t=new Uint8Array(r),e=0;e<t.length;e++)t[e]=this.rand.getByte();return t},typeof self=="object")self.crypto&&self.crypto.getRandomValues?o.prototype._rand=function(r){var t=new Uint8Array(r);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?o.prototype._rand=function(r){var t=new Uint8Array(r);return self.msCrypto.getRandomValues(t),t}:typeof window=="object"&&(o.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=n("crypto");if(typeof a.randomBytes!="function")throw new Error("Not supported");o.prototype._rand=function(r){return a.randomBytes(r)}}catch{}},{crypto:188}],188:[function(n,x,_){},{}],189:[function(n,x,_){var c=n("safe-buffer").Buffer;function o(i){c.isBuffer(i)||(i=c.from(i));for(var s=i.length/4|0,f=new Array(s),h=0;h<s;h++)f[h]=i.readUInt32BE(4*h);return f}function a(i){for(;0<i.length;i++)i[0]=0}function r(i,s,f,h,u){for(var p,d,w,S,A=f[0],N=f[1],L=f[2],I=f[3],P=i[0]^s[0],D=i[1]^s[1],U=i[2]^s[2],B=i[3]^s[3],k=4,C=1;C<u;C++)p=A[P>>>24]^N[D>>>16&255]^L[U>>>8&255]^I[255&B]^s[k++],d=A[D>>>24]^N[U>>>16&255]^L[B>>>8&255]^I[255&P]^s[k++],w=A[U>>>24]^N[B>>>16&255]^L[P>>>8&255]^I[255&D]^s[k++],S=A[B>>>24]^N[P>>>16&255]^L[D>>>8&255]^I[255&U]^s[k++],P=p,D=d,U=w,B=S;return p=(h[P>>>24]<<24|h[D>>>16&255]<<16|h[U>>>8&255]<<8|h[255&B])^s[k++],d=(h[D>>>24]<<24|h[U>>>16&255]<<16|h[B>>>8&255]<<8|h[255&P])^s[k++],w=(h[U>>>24]<<24|h[B>>>16&255]<<16|h[P>>>8&255]<<8|h[255&D])^s[k++],S=(h[B>>>24]<<24|h[P>>>16&255]<<16|h[D>>>8&255]<<8|h[255&U])^s[k++],[p>>>=0,d>>>=0,w>>>=0,S>>>=0]}var t=[0,1,2,4,8,16,32,64,128,27,54],e=(function(){for(var i=new Array(256),s=0;s<256;s++)i[s]=s<128?s<<1:s<<1^283;for(var f=[],h=[],u=[[],[],[],[]],p=[[],[],[],[]],d=0,w=0,S=0;S<256;++S){var A=w^w<<1^w<<2^w<<3^w<<4;A=A>>>8^255&A^99,f[d]=A,h[A]=d;var N=i[d],L=i[N],I=i[L],P=257*i[A]^16843008*A;u[0][d]=P<<24|P>>>8,u[1][d]=P<<16|P>>>16,u[2][d]=P<<8|P>>>24,u[3][d]=P,P=16843009*I^65537*L^257*N^16843008*d,p[0][A]=P<<24|P>>>8,p[1][A]=P<<16|P>>>16,p[2][A]=P<<8|P>>>24,p[3][A]=P,d===0?d=w=1:(d=N^i[i[i[I^N]]],w^=i[i[w]])}return{SBOX:f,INV_SBOX:h,SUB_MIX:u,INV_SUB_MIX:p}})();function l(i){this._key=o(i),this._reset()}l.blockSize=16,l.keySize=32,l.prototype.blockSize=l.blockSize,l.prototype.keySize=l.keySize,l.prototype._reset=function(){for(var i=this._key,s=i.length,f=s+6,h=4*(f+1),u=[],p=0;p<s;p++)u[p]=i[p];for(p=s;p<h;p++){var d=u[p-1];p%s==0?(d=d<<8|d>>>24,d=e.SBOX[d>>>24]<<24|e.SBOX[d>>>16&255]<<16|e.SBOX[d>>>8&255]<<8|e.SBOX[255&d],d^=t[p/s|0]<<24):s>6&&p%s==4&&(d=e.SBOX[d>>>24]<<24|e.SBOX[d>>>16&255]<<16|e.SBOX[d>>>8&255]<<8|e.SBOX[255&d]),u[p]=u[p-s]^d}for(var w=[],S=0;S<h;S++){var A=h-S,N=u[A-(S%4?0:4)];w[S]=S<4||A<=4?N:e.INV_SUB_MIX[0][e.SBOX[N>>>24]]^e.INV_SUB_MIX[1][e.SBOX[N>>>16&255]]^e.INV_SUB_MIX[2][e.SBOX[N>>>8&255]]^e.INV_SUB_MIX[3][e.SBOX[255&N]]}this._nRounds=f,this._keySchedule=u,this._invKeySchedule=w},l.prototype.encryptBlockRaw=function(i){return r(i=o(i),this._keySchedule,e.SUB_MIX,e.SBOX,this._nRounds)},l.prototype.encryptBlock=function(i){var s=this.encryptBlockRaw(i),f=c.allocUnsafe(16);return f.writeUInt32BE(s[0],0),f.writeUInt32BE(s[1],4),f.writeUInt32BE(s[2],8),f.writeUInt32BE(s[3],12),f},l.prototype.decryptBlock=function(i){var s=(i=o(i))[1];i[1]=i[3],i[3]=s;var f=r(i,this._invKeySchedule,e.INV_SUB_MIX,e.INV_SBOX,this._nRounds),h=c.allocUnsafe(16);return h.writeUInt32BE(f[0],0),h.writeUInt32BE(f[3],4),h.writeUInt32BE(f[2],8),h.writeUInt32BE(f[1],12),h},l.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},x.exports.AES=l},{"safe-buffer":494}],190:[function(n,x,_){var c=n("./aes"),o=n("safe-buffer").Buffer,a=n("cipher-base"),r=n("inherits"),t=n("./ghash"),e=n("buffer-xor"),l=n("./incr32");function i(s,f,h,u){a.call(this);var p=o.alloc(4,0);this._cipher=new c.AES(f);var d=this._cipher.encryptBlock(p);this._ghash=new t(d),h=(function(w,S,A){if(S.length===12)return w._finID=o.concat([S,o.from([0,0,0,1])]),o.concat([S,o.from([0,0,0,2])]);var N=new t(A),L=S.length,I=L%16;N.update(S),I&&(I=16-I,N.update(o.alloc(I,0))),N.update(o.alloc(8,0));var P=8*L,D=o.alloc(8);D.writeUIntBE(P,0,8),N.update(D),w._finID=N.state;var U=o.from(w._finID);return l(U),U})(this,h,d),this._prev=o.from(h),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=u,this._alen=0,this._len=0,this._mode=s,this._authTag=null,this._called=!1}r(i,a),i.prototype._update=function(s){if(!this._called&&this._alen){var f=16-this._alen%16;f<16&&(f=o.alloc(f,0),this._ghash.update(f))}this._called=!0;var h=this._mode.encrypt(this,s);return this._decrypt?this._ghash.update(s):this._ghash.update(h),this._len+=s.length,h},i.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var s=e(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&(function(f,h){var u=0;f.length!==h.length&&u++;for(var p=Math.min(f.length,h.length),d=0;d<p;++d)u+=f[d]^h[d];return u})(s,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=s,this._cipher.scrub()},i.prototype.getAuthTag=function(){if(this._decrypt||!o.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},i.prototype.setAuthTag=function(s){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=s},i.prototype.setAAD=function(s){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(s),this._alen+=s.length},x.exports=i},{"./aes":189,"./ghash":194,"./incr32":195,"buffer-xor":219,"cipher-base":221,inherits:440,"safe-buffer":494}],191:[function(n,x,_){var c=n("./encrypter"),o=n("./decrypter"),a=n("./modes/list.json");_.createCipher=_.Cipher=c.createCipher,_.createCipheriv=_.Cipheriv=c.createCipheriv,_.createDecipher=_.Decipher=o.createDecipher,_.createDecipheriv=_.Decipheriv=o.createDecipheriv,_.listCiphers=_.getCiphers=function(){return Object.keys(a)}},{"./decrypter":192,"./encrypter":193,"./modes/list.json":203}],192:[function(n,x,_){var c=n("./authCipher"),o=n("safe-buffer").Buffer,a=n("./modes"),r=n("./streamCipher"),t=n("cipher-base"),e=n("./aes"),l=n("evp_bytestokey");function i(h,u,p){t.call(this),this._cache=new s,this._last=void 0,this._cipher=new e.AES(u),this._prev=o.from(p),this._mode=h,this._autopadding=!0}function s(){this.cache=o.allocUnsafe(0)}function f(h,u,p){var d=a[h.toLowerCase()];if(!d)throw new TypeError("invalid suite type");if(typeof p=="string"&&(p=o.from(p)),d.mode!=="GCM"&&p.length!==d.iv)throw new TypeError("invalid iv length "+p.length);if(typeof u=="string"&&(u=o.from(u)),u.length!==d.key/8)throw new TypeError("invalid key length "+u.length);return d.type==="stream"?new r(d.module,u,p,!0):d.type==="auth"?new c(d.module,u,p,!0):new i(d.module,u,p)}n("inherits")(i,t),i.prototype._update=function(h){var u,p;this._cache.add(h);for(var d=[];u=this._cache.get(this._autopadding);)p=this._mode.decrypt(this,u),d.push(p);return o.concat(d)},i.prototype._final=function(){var h=this._cache.flush();if(this._autopadding)return(function(u){var p=u[15];if(p<1||p>16)throw new Error("unable to decrypt data");for(var d=-1;++d<p;)if(u[d+(16-p)]!==p)throw new Error("unable to decrypt data");if(p!==16)return u.slice(0,16-p)})(this._mode.decrypt(this,h));if(h)throw new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(h){return this._autopadding=!!h,this},s.prototype.add=function(h){this.cache=o.concat([this.cache,h])},s.prototype.get=function(h){var u;if(h){if(this.cache.length>16)return u=this.cache.slice(0,16),this.cache=this.cache.slice(16),u}else if(this.cache.length>=16)return u=this.cache.slice(0,16),this.cache=this.cache.slice(16),u;return null},s.prototype.flush=function(){if(this.cache.length)return this.cache},_.createDecipher=function(h,u){var p=a[h.toLowerCase()];if(!p)throw new TypeError("invalid suite type");var d=l(u,!1,p.key,p.iv);return f(h,d.key,d.iv)},_.createDecipheriv=f},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],193:[function(n,x,_){var c=n("./modes"),o=n("./authCipher"),a=n("safe-buffer").Buffer,r=n("./streamCipher"),t=n("cipher-base"),e=n("./aes"),l=n("evp_bytestokey");function i(u,p,d){t.call(this),this._cache=new f,this._cipher=new e.AES(p),this._prev=a.from(d),this._mode=u,this._autopadding=!0}n("inherits")(i,t),i.prototype._update=function(u){var p,d;this._cache.add(u);for(var w=[];p=this._cache.get();)d=this._mode.encrypt(this,p),w.push(d);return a.concat(w)};var s=a.alloc(16,16);function f(){this.cache=a.allocUnsafe(0)}function h(u,p,d){var w=c[u.toLowerCase()];if(!w)throw new TypeError("invalid suite type");if(typeof p=="string"&&(p=a.from(p)),p.length!==w.key/8)throw new TypeError("invalid key length "+p.length);if(typeof d=="string"&&(d=a.from(d)),w.mode!=="GCM"&&d.length!==w.iv)throw new TypeError("invalid iv length "+d.length);return w.type==="stream"?new r(w.module,p,d):w.type==="auth"?new o(w.module,p,d):new i(w.module,p,d)}i.prototype._final=function(){var u=this._cache.flush();if(this._autopadding)return u=this._mode.encrypt(this,u),this._cipher.scrub(),u;if(!u.equals(s))throw this._cipher.scrub(),new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(u){return this._autopadding=!!u,this},f.prototype.add=function(u){this.cache=a.concat([this.cache,u])},f.prototype.get=function(){if(this.cache.length>15){var u=this.cache.slice(0,16);return this.cache=this.cache.slice(16),u}return null},f.prototype.flush=function(){for(var u=16-this.cache.length,p=a.allocUnsafe(u),d=-1;++d<u;)p.writeUInt8(u,d);return a.concat([this.cache,p])},_.createCipheriv=h,_.createCipher=function(u,p){var d=c[u.toLowerCase()];if(!d)throw new TypeError("invalid suite type");var w=l(p,!1,d.key,d.iv);return h(u,w.key,w.iv)}},{"./aes":189,"./authCipher":190,"./modes":202,"./streamCipher":205,"cipher-base":221,evp_bytestokey:423,inherits:440,"safe-buffer":494}],194:[function(n,x,_){var c=n("safe-buffer").Buffer,o=c.alloc(16,0);function a(t){var e=c.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function r(t){this.h=t,this.state=c.alloc(16,0),this.cache=c.allocUnsafe(0)}r.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},r.prototype._multiply=function(){for(var t,e,l,i=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],s=[0,0,0,0],f=-1;++f<128;){for((this.state[~~(f/8)]&1<<7-f%8)!=0&&(s[0]^=i[0],s[1]^=i[1],s[2]^=i[2],s[3]^=i[3]),l=(1&i[3])!=0,e=3;e>0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,l&&(i[0]=i[0]^225<<24)}this.state=a(s)},r.prototype.update=function(t){var e;for(this.cache=c.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},r.prototype.final=function(t,e){return this.cache.length&&this.ghash(c.concat([this.cache,o],16)),this.ghash(a([0,t,0,e])),this.state},x.exports=r},{"safe-buffer":494}],195:[function(n,x,_){x.exports=function(c){for(var o,a=c.length;a--;){if((o=c.readUInt8(a))!==255){o++,c.writeUInt8(o,a);break}c.writeUInt8(0,a)}}},{}],196:[function(n,x,_){var c=n("buffer-xor");_.encrypt=function(o,a){var r=c(a,o._prev);return o._prev=o._cipher.encryptBlock(r),o._prev},_.decrypt=function(o,a){var r=o._prev;o._prev=a;var t=o._cipher.decryptBlock(a);return c(t,r)}},{"buffer-xor":219}],197:[function(n,x,_){var c=n("safe-buffer").Buffer,o=n("buffer-xor");function a(r,t,e){var l=t.length,i=o(t,r._cache);return r._cache=r._cache.slice(l),r._prev=c.concat([r._prev,e?t:i]),i}_.encrypt=function(r,t,e){for(var l,i=c.allocUnsafe(0);t.length;){if(r._cache.length===0&&(r._cache=r._cipher.encryptBlock(r._prev),r._prev=c.allocUnsafe(0)),!(r._cache.length<=t.length)){i=c.concat([i,a(r,t,e)]);break}l=r._cache.length,i=c.concat([i,a(r,t.slice(0,l),e)]),t=t.slice(l)}return i}},{"buffer-xor":219,"safe-buffer":494}],198:[function(n,x,_){var c=n("safe-buffer").Buffer;function o(r,t,e){for(var l,i,s=-1,f=0;++s<8;)l=t&1<<7-s?128:0,f+=(128&(i=r._cipher.encryptBlock(r._prev)[0]^l))>>s%8,r._prev=a(r._prev,e?l:i);return f}function a(r,t){var e=r.length,l=-1,i=c.allocUnsafe(r.length);for(r=c.concat([r,c.from([t])]);++l<e;)i[l]=r[l]<<1|r[l+1]>>7;return i}_.encrypt=function(r,t,e){for(var l=t.length,i=c.allocUnsafe(l),s=-1;++s<l;)i[s]=o(r,t[s],e);return i}},{"safe-buffer":494}],199:[function(n,x,_){var c=n("safe-buffer").Buffer;function o(a,r,t){var e=a._cipher.encryptBlock(a._prev)[0]^r;return a._prev=c.concat([a._prev.slice(1),c.from([t?r:e])]),e}_.encrypt=function(a,r,t){for(var e=r.length,l=c.allocUnsafe(e),i=-1;++i<e;)l[i]=o(a,r[i],t);return l}},{"safe-buffer":494}],200:[function(n,x,_){var c=n("buffer-xor"),o=n("safe-buffer").Buffer,a=n("../incr32");function r(t){var e=t._cipher.encryptBlockRaw(t._prev);return a(t._prev),e}_.encrypt=function(t,e){var l=Math.ceil(e.length/16),i=t._cache.length;t._cache=o.concat([t._cache,o.allocUnsafe(16*l)]);for(var s=0;s<l;s++){var f=r(t),h=i+16*s;t._cache.writeUInt32BE(f[0],h+0),t._cache.writeUInt32BE(f[1],h+4),t._cache.writeUInt32BE(f[2],h+8),t._cache.writeUInt32BE(f[3],h+12)}var u=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),c(e,u)}},{"../incr32":195,"buffer-xor":219,"safe-buffer":494}],201:[function(n,x,_){_.encrypt=function(c,o){return c._cipher.encryptBlock(o)},_.decrypt=function(c,o){return c._cipher.decryptBlock(o)}},{}],202:[function(n,x,_){var c={ECB:n("./ecb"),CBC:n("./cbc"),CFB:n("./cfb"),CFB8:n("./cfb8"),CFB1:n("./cfb1"),OFB:n("./ofb"),CTR:n("./ctr"),GCM:n("./ctr")},o=n("./list.json");for(var a in o)o[a].module=c[o[a].mode];x.exports=o},{"./cbc":196,"./cfb":197,"./cfb1":198,"./cfb8":199,"./ctr":200,"./ecb":201,"./list.json":203,"./ofb":204}],203:[function(n,x,_){x.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],204:[function(n,x,_){(function(c){(function(){var o=n("buffer-xor");function a(r){return r._prev=r._cipher.encryptBlock(r._prev),r._prev}_.encrypt=function(r,t){for(;r._cache.length<t.length;)r._cache=c.concat([r._cache,a(r)]);var e=r._cache.slice(0,t.length);return r._cache=r._cache.slice(t.length),o(t,e)}}).call(this)}).call(this,n("buffer").Buffer)},{buffer:220,"buffer-xor":219}],205:[function(n,x,_){var c=n("./aes"),o=n("safe-buffer").Buffer,a=n("cipher-base");function r(t,e,l,i){a.call(this),this._cipher=new c.AES(e),this._prev=o.from(l),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=i,this._mode=t}n("inherits")(r,a),r.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},r.prototype._final=function(){this._cipher.scrub()},x.exports=r},{"./aes":189,"cipher-base":221,inherits:440,"safe-buffer":494}],206:[function(n,x,_){var c=n("browserify-des"),o=n("browserify-aes/browser"),a=n("browserify-aes/modes"),r=n("browserify-des/modes"),t=n("evp_bytestokey");function e(i,s,f){if(i=i.toLowerCase(),a[i])return o.createCipheriv(i,s,f);if(r[i])return new c({key:s,iv:f,mode:i});throw new TypeError("invalid suite type")}function l(i,s,f){if(i=i.toLowerCase(),a[i])return o.createDecipheriv(i,s,f);if(r[i])return new c({key:s,iv:f,mode:i,decrypt:!0});throw new TypeError("invalid suite type")}_.createCipher=_.Cipher=function(i,s){var f,h;if(i=i.toLowerCase(),a[i])f=a[i].key,h=a[i].iv;else{if(!r[i])throw new TypeError("invalid suite type");f=8*r[i].key,h=r[i].iv}var u=t(s,!1,f,h);return e(i,u.key,u.iv)},_.createCipheriv=_.Cipheriv=e,_.createDecipher=_.Decipher=function(i,s){var f,h;if(i=i.toLowerCase(),a[i])f=a[i].key,h=a[i].iv;else{if(!r[i])throw new TypeError("invalid suite type");f=8*r[i].key,h=r[i].iv}var u=t(s,!1,f,h);return l(i,u.key,u.iv)},_.createDecipheriv=_.Decipheriv=l,_.listCiphers=_.getCiphers=function(){return Object.keys(r).concat(o.getCiphers())}},{"browserify-aes/browser":191,"browserify-aes/modes":202,"browserify-des":207,"browserify-des/modes":208,evp_bytestokey:423}],207:[function(n,x,_){var c=n("cipher-base"),o=n("des.js"),a=n("inherits"),r=n("safe-buffer").Buffer,t={"des-ede3-cbc":o.CBC.instantiate(o.EDE),"des-ede3":o.EDE,"des-ede-cbc":o.CBC.instantiate(o.EDE),"des-ede":o.EDE,"des-cbc":o.CBC.instantiate(o.DES),"des-ecb":o.DES};function e(l){c.call(this);var i,s=l.mode.toLowerCase(),f=t[s];i=l.decrypt?"decrypt":"encrypt";var h=l.key;r.isBuffer(h)||(h=r.from(h)),s!=="des-ede"&&s!=="des-ede-cbc"||(h=r.concat([h,h.slice(0,8)]));var u=l.iv;r.isBuffer(u)||(u=r.from(u)),this._des=f.create({key:h,iv:u,type:i})}t.des=t["des-cbc"],t.des3=t["des-ede3-cbc"],x.exports=e,a(e,c),e.prototype._update=function(l){return r.from(this._des.update(l))},e.prototype._final=function(){return r.from(this._des.final())}},{"cipher-base":221,"des.js":394,inherits:440,"safe-buffer":494}],208:[function(n,x,_){_["des-ecb"]={key:8,iv:0},_["des-cbc"]=_.des={key:8,iv:8},_["des-ede3-cbc"]=_.des3={key:24,iv:8},_["des-ede3"]={key:24,iv:0},_["des-ede-cbc"]={key:16,iv:8},_["des-ede"]={key:16,iv:0}},{}],209:[function(n,x,_){(function(c){(function(){var o=n("bn.js"),a=n("randombytes");function r(e){var l,i=e.modulus.byteLength();do l=new o(a(i));while(l.cmp(e.modulus)>=0||!l.umod(e.prime1)||!l.umod(e.prime2));return l}function t(e,l){var i=(function(L){var I=r(L);return{blinder:I.toRed(o.mont(L.modulus)).redPow(new o(L.publicExponent)).fromRed(),unblinder:I.invm(L.modulus)}})(l),s=l.modulus.byteLength(),f=new o(e).mul(i.blinder).umod(l.modulus),h=f.toRed(o.mont(l.prime1)),u=f.toRed(o.mont(l.prime2)),p=l.coefficient,d=l.prime1,w=l.prime2,S=h.redPow(l.exponent1).fromRed(),A=u.redPow(l.exponent2).fromRed(),N=S.isub(A).imul(p).umod(d).imul(w);return A.iadd(N).imul(i.unblinder).umod(l.modulus).toArrayLike(c,"be",s)}t.getr=r,x.exports=t}).call(this)}).call(this,n("buffer").Buffer)},{"bn.js":186,buffer:220,randombytes:475}],210:[function(n,x,_){x.exports=n("./browser/algorithms.json")},{"./browser/algorithms.json":211}],211:[function(n,x,_){x.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"}}},{}],212:[function(n,x,_){x.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"}},{}],213:[function(n,x,_){var c=n("safe-buffer").Buffer,o=n("create-hash"),a=n("readable-stream"),r=n("inherits"),t=n("./sign"),e=n("./verify"),l=n("./algorithms.json");function i(u){a.Writable.call(this);var p=l[u];if(!p)throw new Error("Unknown message digest");this._hashType=p.hash,this._hash=o(p.hash),this._tag=p.id,this._signType=p.sign}function s(u){a.Writable.call(this);var p=l[u];if(!p)throw new Error("Unknown message digest");this._hash=o(p.hash),this._tag=p.id,this._signType=p.sign}function f(u){return new i(u)}function h(u){return new s(u)}Object.keys(l).forEach((function(u){l[u].id=c.from(l[u].id,"hex"),l[u.toLowerCase()]=l[u]})),r(i,a.Writable),i.prototype._write=function(u,p,d){this._hash.update(u),d()},i.prototype.update=function(u,p){return typeof u=="string"&&(u=c.from(u,p)),this._hash.update(u),this},i.prototype.sign=function(u,p){this.end();var d=this._hash.digest(),w=t(d,u,this._hashType,this._signType,this._tag);return p?w.toString(p):w},r(s,a.Writable),s.prototype._write=function(u,p,d){this._hash.update(u),d()},s.prototype.update=function(u,p){return typeof u=="string"&&(u=c.from(u,p)),this._hash.update(u),this},s.prototype.verify=function(u,p,d){typeof p=="string"&&(p=c.from(p,d)),this.end();var w=this._hash.digest();return e(p,w,u,this._signType,this._tag)},x.exports={Sign:f,Verify:h,createSign:f,createVerify:h}},{"./algorithms.json":211,"./sign":214,"./verify":215,"create-hash":386,inherits:440,"readable-stream":491,"safe-buffer":494}],214:[function(n,x,_){var c=n("safe-buffer").Buffer,o=n("create-hmac"),a=n("browserify-rsa"),r=n("elliptic").ec,t=n("bn.js"),e=n("parse-asn1"),l=n("./curves.json");function i(u,p,d,w){if((u=c.from(u.toArray())).length<p.byteLength()){var S=c.alloc(p.byteLength()-u.length);u=c.concat([S,u])}var A=d.length,N=(function(P,D){P=(P=s(P,D)).mod(D);var U=c.from(P.toArray());if(U.length<D.byteLength()){var B=c.alloc(D.byteLength()-U.length);U=c.concat([B,U])}return U})(d,p),L=c.alloc(A);L.fill(1);var I=c.alloc(A);return I=o(w,I).update(L).update(c.from([0])).update(u).update(N).digest(),L=o(w,I).update(L).digest(),{k:I=o(w,I).update(L).update(c.from([1])).update(u).update(N).digest(),v:L=o(w,I).update(L).digest()}}function s(u,p){var d=new t(u),w=(u.length<<3)-p.bitLength();return w>0&&d.ishrn(w),d}function f(u,p,d){var w,S;do{for(w=c.alloc(0);8*w.length<u.bitLength();)p.v=o(d,p.k).update(p.v).digest(),w=c.concat([w,p.v]);S=s(w,u),p.k=o(d,p.k).update(p.v).update(c.from([0])).digest(),p.v=o(d,p.k).update(p.v).digest()}while(S.cmp(u)!==-1);return S}function h(u,p,d,w){return u.toRed(t.mont(d)).redPow(p).fromRed().mod(w)}x.exports=function(u,p,d,w,S){var A=e(p);if(A.curve){if(w!=="ecdsa"&&w!=="ecdsa/rsa")throw new Error("wrong private key type");return(function(P,D){var U=l[D.curve.join(".")];if(!U)throw new Error("unknown curve "+D.curve.join("."));var B=new r(U).keyFromPrivate(D.privateKey).sign(P);return c.from(B.toDER())})(u,A)}if(A.type==="dsa"){if(w!=="dsa")throw new Error("wrong private key type");return(function(P,D,U){for(var B,k=D.params.priv_key,C=D.params.p,v=D.params.q,m=D.params.g,b=new t(0),g=s(P,v).mod(v),y=!1,E=i(k,v,P,U);y===!1;)B=f(v,E,U),b=h(m,B,C,v),(y=B.invm(v).imul(g.add(k.mul(b))).mod(v)).cmpn(0)===0&&(y=!1,b=new t(0));return(function(R,O){R=R.toArray(),O=O.toArray(),128&R[0]&&(R=[0].concat(R)),128&O[0]&&(O=[0].concat(O));var z=[48,R.length+O.length+4,2,R.length];return z=z.concat(R,[2,O.length],O),c.from(z)})(b,y)})(u,A,d)}if(w!=="rsa"&&w!=="ecdsa/rsa")throw new Error("wrong private key type");u=c.concat([S,u]);for(var N=A.modulus.byteLength(),L=[0,1];u.length+L.length+1<N;)L.push(255);L.push(0);for(var I=-1;++I<u.length;)L.push(u[I]);return a(L,A)},x.exports.getKey=i,x.exports.makeKey=f},{"./curves.json":212,"bn.js":186,"browserify-rsa":209,"create-hmac":388,elliptic:405,"parse-asn1":459,"safe-buffer":494}],215:[function(n,x,_){var c=n("safe-buffer").Buffer,o=n("bn.js"),a=n("elliptic").ec,r=n("parse-asn1"),t=n("./curves.json");function e(l,i){if(l.cmpn(0)<=0)throw new Error("invalid sig");if(l.cmp(i)>=i)throw new Error("invalid sig")}x.exports=function(l,i,s,f,h){var u=r(s);if(u.type==="ec"){if(f!=="ecdsa"&&f!=="ecdsa/rsa")throw new Error("wrong public key type");return(function(L,I,P){var D=t[P.data.algorithm.curve.join(".")];if(!D)throw new Error("unknown curve "+P.data.algorithm.curve.join("."));var U=new a(D),B=P.data.subjectPrivateKey.data;return U.verify(I,L,B)})(l,i,u)}if(u.type==="dsa"){if(f!=="dsa")throw new Error("wrong public key type");return(function(L,I,P){var D=P.data.p,U=P.data.q,B=P.data.g,k=P.data.pub_key,C=r.signature.decode(L,"der"),v=C.s,m=C.r;e(v,U),e(m,U);var b=o.mont(D),g=v.invm(U);return B.toRed(b).redPow(new o(I).mul(g).mod(U)).fromRed().mul(k.toRed(b).redPow(m.mul(g).mod(U)).fromRed()).mod(D).mod(U).cmp(m)===0})(l,i,u)}if(f!=="rsa"&&f!=="ecdsa/rsa")throw new Error("wrong public key type");i=c.concat([h,i]);for(var p=u.modulus.byteLength(),d=[1],w=0;i.length+d.length+2<p;)d.push(255),w++;d.push(0);for(var S=-1;++S<i.length;)d.push(i[S]);d=c.from(d);var A=o.mont(u.modulus);l=(l=new o(l).toRed(A)).redPow(new o(u.publicExponent)),l=c.from(l.fromRed().toArray());var N=w<8?1:0;for(p=Math.min(l.length,d.length),l.length!==d.length&&(N=1),S=-1;++S<p;)N|=l[S]^d[S];return N===0}},{"./curves.json":212,"bn.js":186,elliptic:405,"parse-asn1":459,"safe-buffer":494}],216:[function(n,x,_){},{}],217:[function(n,x,_){var c=n("buffer"),o=c.Buffer;function a(t,e){for(var l in t)e[l]=t[l]}function r(t,e,l){return o(t,e,l)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?x.exports=c:(a(c,_),_.Buffer=r),a(o,r),r.from=function(t,e,l){if(typeof t=="number")throw new TypeError("Argument must not be a number");return o(t,e,l)},r.alloc=function(t,e,l){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=o(t);return e!==void 0?typeof l=="string"?i.fill(e,l):i.fill(e):i.fill(0),i},r.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return o(t)},r.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(t)}},{buffer:220}],218:[function(n,x,_){var c=n("safe-buffer").Buffer,o=c.isEncoding||function(u){switch((u=""+u)&&u.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 a(u){var p;switch(this.encoding=(function(d){var w=(function(S){if(!S)return"utf8";for(var A;;)switch(S){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 S;default:if(A)return;S=(""+S).toLowerCase(),A=!0}})(d);if(typeof w!="string"&&(c.isEncoding===o||!o(d)))throw new Error("Unknown encoding: "+d);return w||d})(u),this.encoding){case"utf16le":this.text=e,this.end=l,p=4;break;case"utf8":this.fillLast=t,p=4;break;case"base64":this.text=i,this.end=s,p=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=c.allocUnsafe(p)}function r(u){return u<=127?0:u>>5==6?2:u>>4==14?3:u>>3==30?4:u>>6==2?-1:-2}function t(u){var p=this.lastTotal-this.lastNeed,d=(function(w,S,A){if((192&S[0])!=128)return w.lastNeed=0,"�";if(w.lastNeed>1&&S.length>1){if((192&S[1])!=128)return w.lastNeed=1,"�";if(w.lastNeed>2&&S.length>2&&(192&S[2])!=128)return w.lastNeed=2,"�"}})(this,u);return d!==void 0?d:this.lastNeed<=u.length?(u.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(u.copy(this.lastChar,p,0,u.length),void(this.lastNeed-=u.length))}function e(u,p){if((u.length-p)%2==0){var d=u.toString("utf16le",p);if(d){var w=d.charCodeAt(d.length-1);if(w>=55296&&w<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1],d.slice(0,-1)}return d}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=u[u.length-1],u.toString("utf16le",p,u.length-1)}function l(u){var p=u&&u.length?this.write(u):"";if(this.lastNeed){var d=this.lastTotal-this.lastNeed;return p+this.lastChar.toString("utf16le",0,d)}return p}function i(u,p){var d=(u.length-p)%3;return d===0?u.toString("base64",p):(this.lastNeed=3-d,this.lastTotal=3,d===1?this.lastChar[0]=u[u.length-1]:(this.lastChar[0]=u[u.length-2],this.lastChar[1]=u[u.length-1]),u.toString("base64",p,u.length-d))}function s(u){var p=u&&u.length?this.write(u):"";return this.lastNeed?p+this.lastChar.toString("base64",0,3-this.lastNeed):p}function f(u){return u.toString(this.encoding)}function h(u){return u&&u.length?this.write(u):""}_.StringDecoder=a,a.prototype.write=function(u){if(u.length===0)return"";var p,d;if(this.lastNeed){if((p=this.fillLast(u))===void 0)return"";d=this.lastNeed,this.lastNeed=0}else d=0;return d<u.length?p?p+this.text(u,d):this.text(u,d):p||""},a.prototype.end=function(u){var p=u&&u.length?this.write(u):"";return this.lastNeed?p+"�":p},a.prototype.text=function(u,p){var d=(function(S,A,N){var L=A.length-1;if(L<N)return 0;var I=r(A[L]);return I>=0?(I>0&&(S.lastNeed=I-1),I):--L<N||I===-2?0:(I=r(A[L]))>=0?(I>0&&(S.lastNeed=I-2),I):--L<N||I===-2?0:(I=r(A[L]))>=0?(I>0&&(I===2?I=0:S.lastNeed=I-3),I):0})(this,u,p);if(!this.lastNeed)return u.toString("utf8",p);this.lastTotal=d;var w=u.length-(d-this.lastNeed);return u.copy(this.lastChar,0,w),u.toString("utf8",p,w)},a.prototype.fillLast=function(u){if(this.lastNeed<=u.length)return u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);u.copy(this.lastChar,this.lastTotal-this.lastNeed,0,u.length),this.lastNeed-=u.length}},{"safe-buffer":217}],219:[function(n,x,_){(function(c){(function(){x.exports=function(o,a){for(var r=Math.min(o.length,a.length),t=new c(r),e=0;e<r;++e)t[e]=o[e]^a[e];return t}}).call(this)}).call(this,n("buffer").Buffer)},{buffer:220}],220:[function(n,x,_){(function(c){(function(){var o=n("base64-js"),a=n("ieee754");_.Buffer=t,_.SlowBuffer=function(T){return+T!=T&&(T=0),t.alloc(+T)},_.INSPECT_MAX_BYTES=50;function r(T){if(T>2147483647)throw new RangeError('The value "'+T+'" is invalid for option "size"');var M=new Uint8Array(T);return M.__proto__=t.prototype,M}function t(T,M,F){if(typeof T=="number"){if(typeof M=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return i(T)}return e(T,M,F)}function e(T,M,F){if(typeof T=="string")return(function(q,K){if(typeof K=="string"&&K!==""||(K="utf8"),!t.isEncoding(K))throw new TypeError("Unknown encoding: "+K);var nt=0|h(q,K),rt=r(nt),G=rt.write(q,K);return G!==nt&&(rt=rt.slice(0,G)),rt})(T,M);if(ArrayBuffer.isView(T))return s(T);if(T==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T);if(j(T,ArrayBuffer)||T&&j(T.buffer,ArrayBuffer))return(function(q,K,nt){if(K<0||q.byteLength<K)throw new RangeError('"offset" is outside of buffer bounds');if(q.byteLength<K+(nt||0))throw new RangeError('"length" is outside of buffer bounds');var rt;return rt=K===void 0&&nt===void 0?new Uint8Array(q):nt===void 0?new Uint8Array(q,K):new Uint8Array(q,K,nt),rt.__proto__=t.prototype,rt})(T,M,F);if(typeof T=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var V=T.valueOf&&T.valueOf();if(V!=null&&V!==T)return t.from(V,M,F);var Y=(function(q){if(t.isBuffer(q)){var K=0|f(q.length),nt=r(K);return nt.length===0||q.copy(nt,0,0,K),nt}if(q.length!==void 0)return typeof q.length!="number"||H(q.length)?r(0):s(q);if(q.type==="Buffer"&&Array.isArray(q.data))return s(q.data)})(T);if(Y)return Y;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof T[Symbol.toPrimitive]=="function")return t.from(T[Symbol.toPrimitive]("string"),M,F);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof T)}function l(T){if(typeof T!="number")throw new TypeError('"size" argument must be of type number');if(T<0)throw new RangeError('The value "'+T+'" is invalid for option "size"')}function i(T){return l(T),r(T<0?0:0|f(T))}function s(T){for(var M=T.length<0?0:0|f(T.length),F=r(M),V=0;V<M;V+=1)F[V]=255&T[V];return F}function f(T){if(T>=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|T}function h(T,M){if(t.isBuffer(T))return T.length;if(ArrayBuffer.isView(T)||j(T,ArrayBuffer))return T.byteLength;if(typeof T!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof T);var F=T.length,V=arguments.length>2&&arguments[2]===!0;if(!V&&F===0)return 0;for(var Y=!1;;)switch(M){case"ascii":case"latin1":case"binary":return F;case"utf8":case"utf-8":return z(T).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*F;case"hex":return F>>>1;case"base64":return $(T).length;default:if(Y)return V?-1:z(T).length;M=(""+M).toLowerCase(),Y=!0}}function u(T,M,F){var V=!1;if((M===void 0||M<0)&&(M=0),M>this.length||((F===void 0||F>this.length)&&(F=this.length),F<=0)||(F>>>=0)<=(M>>>=0))return"";for(T||(T="utf8");;)switch(T){case"hex":return C(this,M,F);case"utf8":case"utf-8":return U(this,M,F);case"ascii":return B(this,M,F);case"latin1":case"binary":return k(this,M,F);case"base64":return D(this,M,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,M,F);default:if(V)throw new TypeError("Unknown encoding: "+T);T=(T+"").toLowerCase(),V=!0}}function p(T,M,F){var V=T[M];T[M]=T[F],T[F]=V}function d(T,M,F,V,Y){if(T.length===0)return-1;if(typeof F=="string"?(V=F,F=0):F>2147483647?F=2147483647:F<-2147483648&&(F=-2147483648),H(F=+F)&&(F=Y?0:T.length-1),F<0&&(F=T.length+F),F>=T.length){if(Y)return-1;F=T.length-1}else if(F<0){if(!Y)return-1;F=0}if(typeof M=="string"&&(M=t.from(M,V)),t.isBuffer(M))return M.length===0?-1:w(T,M,F,V,Y);if(typeof M=="number")return M&=255,typeof Uint8Array.prototype.indexOf=="function"?Y?Uint8Array.prototype.indexOf.call(T,M,F):Uint8Array.prototype.lastIndexOf.call(T,M,F):w(T,[M],F,V,Y);throw new TypeError("val must be string, number or Buffer")}function w(T,M,F,V,Y){var q,K=1,nt=T.length,rt=M.length;if(V!==void 0&&((V=String(V).toLowerCase())==="ucs2"||V==="ucs-2"||V==="utf16le"||V==="utf-16le")){if(T.length<2||M.length<2)return-1;K=2,nt/=2,rt/=2,F/=2}function G(it,at){return K===1?it[at]:it.readUInt16BE(at*K)}if(Y){var tt=-1;for(q=F;q<nt;q++)if(G(T,q)===G(M,tt===-1?0:q-tt)){if(tt===-1&&(tt=q),q-tt+1===rt)return tt*K}else tt!==-1&&(q-=q-tt),tt=-1}else for(F+rt>nt&&(F=nt-rt),q=F;q>=0;q--){for(var Q=!0,st=0;st<rt;st++)if(G(T,q+st)!==G(M,st)){Q=!1;break}if(Q)return q}return-1}function S(T,M,F,V){F=Number(F)||0;var Y=T.length-F;V?(V=Number(V))>Y&&(V=Y):V=Y;var q=M.length;V>q/2&&(V=q/2);for(var K=0;K<V;++K){var nt=parseInt(M.substr(2*K,2),16);if(H(nt))return K;T[F+K]=nt}return K}function A(T,M,F,V){return Z(z(M,T.length-F),T,F,V)}function N(T,M,F,V){return Z((function(Y){for(var q=[],K=0;K<Y.length;++K)q.push(255&Y.charCodeAt(K));return q})(M),T,F,V)}function L(T,M,F,V){return N(T,M,F,V)}function I(T,M,F,V){return Z($(M),T,F,V)}function P(T,M,F,V){return Z((function(Y,q){for(var K,nt,rt,G=[],tt=0;tt<Y.length&&!((q-=2)<0);++tt)K=Y.charCodeAt(tt),nt=K>>8,rt=K%256,G.push(rt),G.push(nt);return G})(M,T.length-F),T,F,V)}function D(T,M,F){return M===0&&F===T.length?o.fromByteArray(T):o.fromByteArray(T.slice(M,F))}function U(T,M,F){F=Math.min(T.length,F);for(var V=[],Y=M;Y<F;){var q,K,nt,rt,G=T[Y],tt=null,Q=G>239?4:G>223?3:G>191?2:1;if(Y+Q<=F)switch(Q){case 1:G<128&&(tt=G);break;case 2:(192&(q=T[Y+1]))==128&&(rt=(31&G)<<6|63&q)>127&&(tt=rt);break;case 3:q=T[Y+1],K=T[Y+2],(192&q)==128&&(192&K)==128&&(rt=(15&G)<<12|(63&q)<<6|63&K)>2047&&(rt<55296||rt>57343)&&(tt=rt);break;case 4:q=T[Y+1],K=T[Y+2],nt=T[Y+3],(192&q)==128&&(192&K)==128&&(192&nt)==128&&(rt=(15&G)<<18|(63&q)<<12|(63&K)<<6|63&nt)>65535&&rt<1114112&&(tt=rt)}tt===null?(tt=65533,Q=1):tt>65535&&(tt-=65536,V.push(tt>>>10&1023|55296),tt=56320|1023&tt),V.push(tt),Y+=Q}return(function(st){var it=st.length;if(it<=4096)return String.fromCharCode.apply(String,st);for(var at="",ut=0;ut<it;)at+=String.fromCharCode.apply(String,st.slice(ut,ut+=4096));return at})(V)}_.kMaxLength=2147483647,t.TYPED_ARRAY_SUPPORT=(function(){try{var T=new Uint8Array(1);return T.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},T.foo()===42}catch{return!1}})(),t.TYPED_ARRAY_SUPPORT||typeof console>"u"||typeof console.error!="function"||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),typeof Symbol<"u"&&Symbol.species!=null&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),t.poolSize=8192,t.from=function(T,M,F){return e(T,M,F)},t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(T,M,F){return(function(V,Y,q){return l(V),V<=0?r(V):Y!==void 0?typeof q=="string"?r(V).fill(Y,q):r(V).fill(Y):r(V)})(T,M,F)},t.allocUnsafe=function(T){return i(T)},t.allocUnsafeSlow=function(T){return i(T)},t.isBuffer=function(T){return T!=null&&T._isBuffer===!0&&T!==t.prototype},t.compare=function(T,M){if(j(T,Uint8Array)&&(T=t.from(T,T.offset,T.byteLength)),j(M,Uint8Array)&&(M=t.from(M,M.offset,M.byteLength)),!t.isBuffer(T)||!t.isBuffer(M))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(T===M)return 0;for(var F=T.length,V=M.length,Y=0,q=Math.min(F,V);Y<q;++Y)if(T[Y]!==M[Y]){F=T[Y],V=M[Y];break}return F<V?-1:V<F?1:0},t.isEncoding=function(T){switch(String(T).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(T,M){if(!Array.isArray(T))throw new TypeError('"list" argument must be an Array of Buffers');if(T.length===0)return t.alloc(0);var F;if(M===void 0)for(M=0,F=0;F<T.length;++F)M+=T[F].length;var V=t.allocUnsafe(M),Y=0;for(F=0;F<T.length;++F){var q=T[F];if(j(q,Uint8Array)&&(q=t.from(q)),!t.isBuffer(q))throw new TypeError('"list" argument must be an Array of Buffers');q.copy(V,Y),Y+=q.length}return V},t.byteLength=h,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var T=this.length;if(T%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var M=0;M<T;M+=2)p(this,M,M+1);return this},t.prototype.swap32=function(){var T=this.length;if(T%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var M=0;M<T;M+=4)p(this,M,M+3),p(this,M+1,M+2);return this},t.prototype.swap64=function(){var T=this.length;if(T%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var M=0;M<T;M+=8)p(this,M,M+7),p(this,M+1,M+6),p(this,M+2,M+5),p(this,M+3,M+4);return this},t.prototype.toString=function(){var T=this.length;return T===0?"":arguments.length===0?U(this,0,T):u.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(T){if(!t.isBuffer(T))throw new TypeError("Argument must be a Buffer");return this===T||t.compare(this,T)===0},t.prototype.inspect=function(){var T="",M=_.INSPECT_MAX_BYTES;return T=this.toString("hex",0,M).replace(/(.{2})/g,"$1 ").trim(),this.length>M&&(T+=" ... "),"<Buffer "+T+">"},t.prototype.compare=function(T,M,F,V,Y){if(j(T,Uint8Array)&&(T=t.from(T,T.offset,T.byteLength)),!t.isBuffer(T))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof T);if(M===void 0&&(M=0),F===void 0&&(F=T?T.length:0),V===void 0&&(V=0),Y===void 0&&(Y=this.length),M<0||F>T.length||V<0||Y>this.length)throw new RangeError("out of range index");if(V>=Y&&M>=F)return 0;if(V>=Y)return-1;if(M>=F)return 1;if(this===T)return 0;for(var q=(Y>>>=0)-(V>>>=0),K=(F>>>=0)-(M>>>=0),nt=Math.min(q,K),rt=this.slice(V,Y),G=T.slice(M,F),tt=0;tt<nt;++tt)if(rt[tt]!==G[tt]){q=rt[tt],K=G[tt];break}return q<K?-1:K<q?1:0},t.prototype.includes=function(T,M,F){return this.indexOf(T,M,F)!==-1},t.prototype.indexOf=function(T,M,F){return d(this,T,M,F,!0)},t.prototype.lastIndexOf=function(T,M,F){return d(this,T,M,F,!1)},t.prototype.write=function(T,M,F,V){if(M===void 0)V="utf8",F=this.length,M=0;else if(F===void 0&&typeof M=="string")V=M,F=this.length,M=0;else{if(!isFinite(M))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");M>>>=0,isFinite(F)?(F>>>=0,V===void 0&&(V="utf8")):(V=F,F=void 0)}var Y=this.length-M;if((F===void 0||F>Y)&&(F=Y),T.length>0&&(F<0||M<0)||M>this.length)throw new RangeError("Attempt to write outside buffer bounds");V||(V="utf8");for(var q=!1;;)switch(V){case"hex":return S(this,T,M,F);case"utf8":case"utf-8":return A(this,T,M,F);case"ascii":return N(this,T,M,F);case"latin1":case"binary":return L(this,T,M,F);case"base64":return I(this,T,M,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,T,M,F);default:if(q)throw new TypeError("Unknown encoding: "+V);V=(""+V).toLowerCase(),q=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(T,M,F){var V="";F=Math.min(T.length,F);for(var Y=M;Y<F;++Y)V+=String.fromCharCode(127&T[Y]);return V}function k(T,M,F){var V="";F=Math.min(T.length,F);for(var Y=M;Y<F;++Y)V+=String.fromCharCode(T[Y]);return V}function C(T,M,F){var V=T.length;(!M||M<0)&&(M=0),(!F||F<0||F>V)&&(F=V);for(var Y="",q=M;q<F;++q)Y+=O(T[q]);return Y}function v(T,M,F){for(var V=T.slice(M,F),Y="",q=0;q<V.length;q+=2)Y+=String.fromCharCode(V[q]+256*V[q+1]);return Y}function m(T,M,F){if(T%1!=0||T<0)throw new RangeError("offset is not uint");if(T+M>F)throw new RangeError("Trying to access beyond buffer length")}function b(T,M,F,V,Y,q){if(!t.isBuffer(T))throw new TypeError('"buffer" argument must be a Buffer instance');if(M>Y||M<q)throw new RangeError('"value" argument is out of bounds');if(F+V>T.length)throw new RangeError("Index out of range")}function g(T,M,F,V,Y,q){if(F+V>T.length)throw new RangeError("Index out of range");if(F<0)throw new RangeError("Index out of range")}function y(T,M,F,V,Y){return M=+M,F>>>=0,Y||g(T,0,F,4),a.write(T,M,F,V,23,4),F+4}function E(T,M,F,V,Y){return M=+M,F>>>=0,Y||g(T,0,F,8),a.write(T,M,F,V,52,8),F+8}t.prototype.slice=function(T,M){var F=this.length;(T=~~T)<0?(T+=F)<0&&(T=0):T>F&&(T=F),(M=M===void 0?F:~~M)<0?(M+=F)<0&&(M=0):M>F&&(M=F),M<T&&(M=T);var V=this.subarray(T,M);return V.__proto__=t.prototype,V},t.prototype.readUIntLE=function(T,M,F){T>>>=0,M>>>=0,F||m(T,M,this.length);for(var V=this[T],Y=1,q=0;++q<M&&(Y*=256);)V+=this[T+q]*Y;return V},t.prototype.readUIntBE=function(T,M,F){T>>>=0,M>>>=0,F||m(T,M,this.length);for(var V=this[T+--M],Y=1;M>0&&(Y*=256);)V+=this[T+--M]*Y;return V},t.prototype.readUInt8=function(T,M){return T>>>=0,M||m(T,1,this.length),this[T]},t.prototype.readUInt16LE=function(T,M){return T>>>=0,M||m(T,2,this.length),this[T]|this[T+1]<<8},t.prototype.readUInt16BE=function(T,M){return T>>>=0,M||m(T,2,this.length),this[T]<<8|this[T+1]},t.prototype.readUInt32LE=function(T,M){return T>>>=0,M||m(T,4,this.length),(this[T]|this[T+1]<<8|this[T+2]<<16)+16777216*this[T+3]},t.prototype.readUInt32BE=function(T,M){return T>>>=0,M||m(T,4,this.length),16777216*this[T]+(this[T+1]<<16|this[T+2]<<8|this[T+3])},t.prototype.readIntLE=function(T,M,F){T>>>=0,M>>>=0,F||m(T,M,this.length);for(var V=this[T],Y=1,q=0;++q<M&&(Y*=256);)V+=this[T+q]*Y;return V>=(Y*=128)&&(V-=Math.pow(2,8*M)),V},t.prototype.readIntBE=function(T,M,F){T>>>=0,M>>>=0,F||m(T,M,this.length);for(var V=M,Y=1,q=this[T+--V];V>0&&(Y*=256);)q+=this[T+--V]*Y;return q>=(Y*=128)&&(q-=Math.pow(2,8*M)),q},t.prototype.readInt8=function(T,M){return T>>>=0,M||m(T,1,this.length),128&this[T]?-1*(255-this[T]+1):this[T]},t.prototype.readInt16LE=function(T,M){T>>>=0,M||m(T,2,this.length);var F=this[T]|this[T+1]<<8;return 32768&F?4294901760|F:F},t.prototype.readInt16BE=function(T,M){T>>>=0,M||m(T,2,this.length);var F=this[T+1]|this[T]<<8;return 32768&F?4294901760|F:F},t.prototype.readInt32LE=function(T,M){return T>>>=0,M||m(T,4,this.length),this[T]|this[T+1]<<8|this[T+2]<<16|this[T+3]<<24},t.prototype.readInt32BE=function(T,M){return T>>>=0,M||m(T,4,this.length),this[T]<<24|this[T+1]<<16|this[T+2]<<8|this[T+3]},t.prototype.readFloatLE=function(T,M){return T>>>=0,M||m(T,4,this.length),a.read(this,T,!0,23,4)},t.prototype.readFloatBE=function(T,M){return T>>>=0,M||m(T,4,this.length),a.read(this,T,!1,23,4)},t.prototype.readDoubleLE=function(T,M){return T>>>=0,M||m(T,8,this.length),a.read(this,T,!0,52,8)},t.prototype.readDoubleBE=function(T,M){return T>>>=0,M||m(T,8,this.length),a.read(this,T,!1,52,8)},t.prototype.writeUIntLE=function(T,M,F,V){T=+T,M>>>=0,F>>>=0,V||b(this,T,M,F,Math.pow(2,8*F)-1,0);var Y=1,q=0;for(this[M]=255&T;++q<F&&(Y*=256);)this[M+q]=T/Y&255;return M+F},t.prototype.writeUIntBE=function(T,M,F,V){T=+T,M>>>=0,F>>>=0,V||b(this,T,M,F,Math.pow(2,8*F)-1,0);var Y=F-1,q=1;for(this[M+Y]=255&T;--Y>=0&&(q*=256);)this[M+Y]=T/q&255;return M+F},t.prototype.writeUInt8=function(T,M,F){return T=+T,M>>>=0,F||b(this,T,M,1,255,0),this[M]=255&T,M+1},t.prototype.writeUInt16LE=function(T,M,F){return T=+T,M>>>=0,F||b(this,T,M,2,65535,0),this[M]=255&T,this[M+1]=T>>>8,M+2},t.prototype.writeUInt16BE=function(T,M,F){return T=+T,M>>>=0,F||b(this,T,M,2,65535,0),this[M]=T>>>8,this[M+1]=255&T,M+2},t.prototype.writeUInt32LE=function(T,M,F){return T=+T,M>>>=0,F||b(this,T,M,4,4294967295,0),this[M+3]=T>>>24,this[M+2]=T>>>16,this[M+1]=T>>>8,this[M]=255&T,M+4},t.prototype.writeUInt32BE=function(T,M,F){return T=+T,M>>>=0,F||b(this,T,M,4,4294967295,0),this[M]=T>>>24,this[M+1]=T>>>16,this[M+2]=T>>>8,this[M+3]=255&T,M+4},t.prototype.writeIntLE=function(T,M,F,V){if(T=+T,M>>>=0,!V){var Y=Math.pow(2,8*F-1);b(this,T,M,F,Y-1,-Y)}var q=0,K=1,nt=0;for(this[M]=255&T;++q<F&&(K*=256);)T<0&&nt===0&&this[M+q-1]!==0&&(nt=1),this[M+q]=(T/K>>0)-nt&255;return M+F},t.prototype.writeIntBE=function(T,M,F,V){if(T=+T,M>>>=0,!V){var Y=Math.pow(2,8*F-1);b(this,T,M,F,Y-1,-Y)}var q=F-1,K=1,nt=0;for(this[M+q]=255&T;--q>=0&&(K*=256);)T<0&&nt===0&&this[M+q+1]!==0&&(nt=1),this[M+q]=(T/K>>0)-nt&255;return M+F},t.prototype.writeInt8=function(T,M,F){return T=+T,M>>>=0,F||b(this,T,M,1,127,-128),T<0&&(T=255+T+1),this[M]=255&T,M+1},t.prototype.writeInt16LE=function(T,M,F){return T=+T,M>>>=0,F||b(this,T,M,2,32767,-32768),this[M]=255&T,this[M+1]=T>>>8,M+2},t.prototype.writeInt16BE=function(T,M,F){return T=+T,M>>>=0,F||b(this,T,M,2,32767,-32768),this[M]=T>>>8,this[M+1]=255&T,M+2},t.prototype.writeInt32LE=function(T,M,F){return T=+T,M>>>=0,F||b(this,T,M,4,2147483647,-2147483648),this[M]=255&T,this[M+1]=T>>>8,this[M+2]=T>>>16,this[M+3]=T>>>24,M+4},t.prototype.writeInt32BE=function(T,M,F){return T=+T,M>>>=0,F||b(this,T,M,4,2147483647,-2147483648),T<0&&(T=4294967295+T+1),this[M]=T>>>24,this[M+1]=T>>>16,this[M+2]=T>>>8,this[M+3]=255&T,M+4},t.prototype.writeFloatLE=function(T,M,F){return y(this,T,M,!0,F)},t.prototype.writeFloatBE=function(T,M,F){return y(this,T,M,!1,F)},t.prototype.writeDoubleLE=function(T,M,F){return E(this,T,M,!0,F)},t.prototype.writeDoubleBE=function(T,M,F){return E(this,T,M,!1,F)},t.prototype.copy=function(T,M,F,V){if(!t.isBuffer(T))throw new TypeError("argument should be a Buffer");if(F||(F=0),V||V===0||(V=this.length),M>=T.length&&(M=T.length),M||(M=0),V>0&&V<F&&(V=F),V===F||T.length===0||this.length===0)return 0;if(M<0)throw new RangeError("targetStart out of bounds");if(F<0||F>=this.length)throw new RangeError("Index out of range");if(V<0)throw new RangeError("sourceEnd out of bounds");V>this.length&&(V=this.length),T.length-M<V-F&&(V=T.length-M+F);var Y=V-F;if(this===T&&typeof Uint8Array.prototype.copyWithin=="function")this.copyWithin(M,F,V);else if(this===T&&F<M&&M<V)for(var q=Y-1;q>=0;--q)T[q+M]=this[q+F];else Uint8Array.prototype.set.call(T,this.subarray(F,V),M);return Y},t.prototype.fill=function(T,M,F,V){if(typeof T=="string"){if(typeof M=="string"?(V=M,M=0,F=this.length):typeof F=="string"&&(V=F,F=this.length),V!==void 0&&typeof V!="string")throw new TypeError("encoding must be a string");if(typeof V=="string"&&!t.isEncoding(V))throw new TypeError("Unknown encoding: "+V);if(T.length===1){var Y=T.charCodeAt(0);(V==="utf8"&&Y<128||V==="latin1")&&(T=Y)}}else typeof T=="number"&&(T&=255);if(M<0||this.length<M||this.length<F)throw new RangeError("Out of range index");if(F<=M)return this;var q;if(M>>>=0,F=F===void 0?this.length:F>>>0,T||(T=0),typeof T=="number")for(q=M;q<F;++q)this[q]=T;else{var K=t.isBuffer(T)?T:t.from(T,V),nt=K.length;if(nt===0)throw new TypeError('The value "'+T+'" is invalid for argument "value"');for(q=0;q<F-M;++q)this[q+M]=K[q%nt]}return this};var R=/[^+/0-9A-Za-z-_]/g;function O(T){return T<16?"0"+T.toString(16):T.toString(16)}function z(T,M){var F;M=M||1/0;for(var V=T.length,Y=null,q=[],K=0;K<V;++K){if((F=T.charCodeAt(K))>55295&&F<57344){if(!Y){if(F>56319){(M-=3)>-1&&q.push(239,191,189);continue}if(K+1===V){(M-=3)>-1&&q.push(239,191,189);continue}Y=F;continue}if(F<56320){(M-=3)>-1&&q.push(239,191,189),Y=F;continue}F=65536+(Y-55296<<10|F-56320)}else Y&&(M-=3)>-1&&q.push(239,191,189);if(Y=null,F<128){if((M-=1)<0)break;q.push(F)}else if(F<2048){if((M-=2)<0)break;q.push(F>>6|192,63&F|128)}else if(F<65536){if((M-=3)<0)break;q.push(F>>12|224,F>>6&63|128,63&F|128)}else{if(!(F<1114112))throw new Error("Invalid code point");if((M-=4)<0)break;q.push(F>>18|240,F>>12&63|128,F>>6&63|128,63&F|128)}}return q}function $(T){return o.toByteArray((function(M){if((M=(M=M.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;M.length%4!=0;)M+="=";return M})(T))}function Z(T,M,F,V){for(var Y=0;Y<V&&!(Y+F>=M.length||Y>=T.length);++Y)M[Y+F]=T[Y];return Y}function j(T,M){return T instanceof M||T!=null&&T.constructor!=null&&T.constructor.name!=null&&T.constructor.name===M.name}function H(T){return T!=T}}).call(this)}).call(this,n("buffer").Buffer)},{"base64-js":185,buffer:220,ieee754:439}],221:[function(n,x,_){var c=n("safe-buffer").Buffer,o=n("stream").Transform,a=n("string_decoder").StringDecoder;function r(t){o.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n("inherits")(r,o),r.prototype.update=function(t,e,l){typeof t=="string"&&(t=c.from(t,e));var i=this._update(t);return this.hashMode?this:(l&&(i=this._toString(i,l)),i)},r.prototype.setAutoPadding=function(){},r.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},r.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},r.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},r.prototype._transform=function(t,e,l){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(s){i=s}finally{l(i)}},r.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(l){e=l}t(e)},r.prototype._finalOrDigest=function(t){var e=this.__final()||c.alloc(0);return t&&(e=this._toString(e,t,!0)),e},r.prototype._toString=function(t,e,l){if(this._decoder||(this._decoder=new a(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var i=this._decoder.write(t);return l&&(i+=this._decoder.end()),i},x.exports=r},{inherits:440,"safe-buffer":494,stream:505,string_decoder:218}],222:[function(n,x,_){var c=n("../internals/is-callable"),o=n("../internals/try-to-string"),a=TypeError;x.exports=function(r){if(c(r))return r;throw new a(o(r)+" is not a function")}},{"../internals/is-callable":285,"../internals/try-to-string":349}],223:[function(n,x,_){var c=n("../internals/is-constructor"),o=n("../internals/try-to-string"),a=TypeError;x.exports=function(r){if(c(r))return r;throw new a(o(r)+" is not a constructor")}},{"../internals/is-constructor":286,"../internals/try-to-string":349}],224:[function(n,x,_){var c=n("../internals/is-callable"),o=String,a=TypeError;x.exports=function(r){if(typeof r=="object"||c(r))return r;throw new a("Can't set "+o(r)+" as a prototype")}},{"../internals/is-callable":285}],225:[function(n,x,_){var c=n("../internals/well-known-symbol"),o=n("../internals/object-create"),a=n("../internals/object-define-property").f,r=c("unscopables"),t=Array.prototype;t[r]===void 0&&a(t,r,{configurable:!0,value:o(null)}),x.exports=function(e){t[r][e]=!0}},{"../internals/object-create":306,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],226:[function(n,x,_){var c=n("../internals/object-is-prototype-of"),o=TypeError;x.exports=function(a,r){if(c(r,a))return a;throw new o("Incorrect invocation")}},{"../internals/object-is-prototype-of":314}],227:[function(n,x,_){var c=n("../internals/is-object"),o=String,a=TypeError;x.exports=function(r){if(c(r))return r;throw new a(o(r)+" is not an object")}},{"../internals/is-object":289}],228:[function(n,x,_){var c=n("../internals/to-indexed-object"),o=n("../internals/to-absolute-index"),a=n("../internals/length-of-array-like"),r=function(t){return function(e,l,i){var s,f=c(e),h=a(f),u=o(i,h);if(t&&l!=l){for(;h>u;)if((s=f[u++])!=s)return!0}else for(;h>u;u++)if((t||u in f)&&f[u]===l)return t||u||0;return!t&&-1}};x.exports={includes:r(!0),indexOf:r(!1)}},{"../internals/length-of-array-like":299,"../internals/to-absolute-index":340,"../internals/to-indexed-object":341}],229:[function(n,x,_){var c=n("../internals/function-bind-context"),o=n("../internals/function-uncurry-this"),a=n("../internals/indexed-object"),r=n("../internals/to-object"),t=n("../internals/length-of-array-like"),e=n("../internals/array-species-create"),l=o([].push),i=function(s){var f=s===1,h=s===2,u=s===3,p=s===4,d=s===6,w=s===7,S=s===5||d;return function(A,N,L,I){for(var P,D,U=r(A),B=a(U),k=c(N,L),C=t(B),v=0,m=I||e,b=f?m(A,C):h||w?m(A,0):void 0;C>v;v++)if((S||v in B)&&(D=k(P=B[v],v,U),s))if(f)b[v]=D;else if(D)switch(s){case 3:return!0;case 5:return P;case 6:return v;case 2:l(b,P)}else switch(s){case 4:return!1;case 7:l(b,P)}return d?-1:u||p?p:b}};x.exports={forEach:i(0),map:i(1),filter:i(2),some:i(3),every:i(4),find:i(5),findIndex:i(6),filterReject:i(7)}},{"../internals/array-species-create":233,"../internals/function-bind-context":262,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/length-of-array-like":299,"../internals/to-object":344}],230:[function(n,x,_){var c=n("../internals/to-absolute-index"),o=n("../internals/length-of-array-like"),a=n("../internals/create-property"),r=Array,t=Math.max;x.exports=function(e,l,i){for(var s=o(e),f=c(l,s),h=c(i===void 0?s:i,s),u=r(t(h-f,0)),p=0;f<h;f++,p++)a(u,p,e[f]);return u.length=p,u}},{"../internals/create-property":243,"../internals/length-of-array-like":299,"../internals/to-absolute-index":340}],231:[function(n,x,_){var c=n("../internals/function-uncurry-this");x.exports=c([].slice)},{"../internals/function-uncurry-this":268}],232:[function(n,x,_){var c=n("../internals/is-array"),o=n("../internals/is-constructor"),a=n("../internals/is-object"),r=n("../internals/well-known-symbol")("species"),t=Array;x.exports=function(e){var l;return c(e)&&(l=e.constructor,(o(l)&&(l===t||c(l.prototype))||a(l)&&(l=l[r])===null)&&(l=void 0)),l===void 0?t:l}},{"../internals/is-array":284,"../internals/is-constructor":286,"../internals/is-object":289,"../internals/well-known-symbol":357}],233:[function(n,x,_){var c=n("../internals/array-species-constructor");x.exports=function(o,a){return new(c(o))(a===0?0:a)}},{"../internals/array-species-constructor":232}],234:[function(n,x,_){var c=n("../internals/well-known-symbol")("iterator"),o=!1;try{var a=0,r={next:function(){return{done:!!a++}},return:function(){o=!0}};r[c]=function(){return this},Array.from(r,(function(){throw 2}))}catch{}x.exports=function(t,e){try{if(!e&&!o)return!1}catch{return!1}var l=!1;try{var i={};i[c]=function(){return{next:function(){return{done:l=!0}}}},t(i)}catch{}return l}},{"../internals/well-known-symbol":357}],235:[function(n,x,_){var c=n("../internals/function-uncurry-this"),o=c({}.toString),a=c("".slice);x.exports=function(r){return a(o(r),8,-1)}},{"../internals/function-uncurry-this":268}],236:[function(n,x,_){var c=n("../internals/to-string-tag-support"),o=n("../internals/is-callable"),a=n("../internals/classof-raw"),r=n("../internals/well-known-symbol")("toStringTag"),t=Object,e=a((function(){return arguments})())==="Arguments";x.exports=c?a:function(l){var i,s,f;return l===void 0?"Undefined":l===null?"Null":typeof(s=(function(h,u){try{return h[u]}catch{}})(i=t(l),r))=="string"?s:e?a(i):(f=a(i))==="Object"&&o(i.callee)?"Arguments":f}},{"../internals/classof-raw":235,"../internals/is-callable":285,"../internals/to-string-tag-support":347,"../internals/well-known-symbol":357}],237:[function(n,x,_){var c=n("../internals/has-own-property"),o=n("../internals/own-keys"),a=n("../internals/object-get-own-property-descriptor"),r=n("../internals/object-define-property");x.exports=function(t,e,l){for(var i=o(e),s=r.f,f=a.f,h=0;h<i.length;h++){var u=i[h];c(t,u)||l&&c(l,u)||s(t,u,f(e,u))}}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/own-keys":321}],238:[function(n,x,_){var c=n("../internals/well-known-symbol")("match");x.exports=function(o){var a=/./;try{"/./"[o](a)}catch{try{return a[c]=!1,"/./"[o](a)}catch{}}return!1}},{"../internals/well-known-symbol":357}],239:[function(n,x,_){var c=n("../internals/fails");x.exports=!c((function(){function o(){}return o.prototype.constructor=null,Object.getPrototypeOf(new o)!==o.prototype}))},{"../internals/fails":260}],240:[function(n,x,_){x.exports=function(c,o){return{value:c,done:o}}},{}],241:[function(n,x,_){var c=n("../internals/descriptors"),o=n("../internals/object-define-property"),a=n("../internals/create-property-descriptor");x.exports=c?function(r,t,e){return o.f(r,t,a(1,e))}:function(r,t,e){return r[t]=e,r}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/object-define-property":308}],242:[function(n,x,_){x.exports=function(c,o){return{enumerable:!(1&c),configurable:!(2&c),writable:!(4&c),value:o}}},{}],243:[function(n,x,_){var c=n("../internals/to-property-key"),o=n("../internals/object-define-property"),a=n("../internals/create-property-descriptor");x.exports=function(r,t,e){var l=c(t);l in r?o.f(r,l,a(0,e)):r[l]=e}},{"../internals/create-property-descriptor":242,"../internals/object-define-property":308,"../internals/to-property-key":346}],244:[function(n,x,_){var c=n("../internals/make-built-in"),o=n("../internals/object-define-property");x.exports=function(a,r,t){return t.get&&c(t.get,r,{getter:!0}),t.set&&c(t.set,r,{setter:!0}),o.f(a,r,t)}},{"../internals/make-built-in":300,"../internals/object-define-property":308}],245:[function(n,x,_){var c=n("../internals/is-callable"),o=n("../internals/object-define-property"),a=n("../internals/make-built-in"),r=n("../internals/define-global-property");x.exports=function(t,e,l,i){i||(i={});var s=i.enumerable,f=i.name!==void 0?i.name:e;if(c(l)&&a(l,f,i),i.global)s?t[e]=l:r(e,l);else{try{i.unsafe?t[e]&&(s=!0):delete t[e]}catch{}s?t[e]=l:o.f(t,e,{value:l,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return t}},{"../internals/define-global-property":246,"../internals/is-callable":285,"../internals/make-built-in":300,"../internals/object-define-property":308}],246:[function(n,x,_){var c=n("../internals/global"),o=Object.defineProperty;x.exports=function(a,r){try{o(c,a,{value:r,configurable:!0,writable:!0})}catch{c[a]=r}return r}},{"../internals/global":274}],247:[function(n,x,_){var c=n("../internals/fails");x.exports=!c((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},{"../internals/fails":260}],248:[function(n,x,_){var c=typeof document=="object"&&document.all,o=c===void 0&&c!==void 0;x.exports={all:c,IS_HTMLDDA:o}},{}],249:[function(n,x,_){var c=n("../internals/global"),o=n("../internals/is-object"),a=c.document,r=o(a)&&o(a.createElement);x.exports=function(t){return r?a.createElement(t):{}}},{"../internals/global":274,"../internals/is-object":289}],250:[function(n,x,_){var c=n("../internals/engine-is-deno"),o=n("../internals/engine-is-node");x.exports=!c&&!o&&typeof window=="object"&&typeof document=="object"},{"../internals/engine-is-deno":251,"../internals/engine-is-node":254}],251:[function(n,x,_){x.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},{}],252:[function(n,x,_){var c=n("../internals/engine-user-agent");x.exports=/ipad|iphone|ipod/i.test(c)&&typeof Pebble<"u"},{"../internals/engine-user-agent":256}],253:[function(n,x,_){var c=n("../internals/engine-user-agent");x.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(c)},{"../internals/engine-user-agent":256}],254:[function(n,x,_){var c=n("../internals/global"),o=n("../internals/classof-raw");x.exports=o(c.process)==="process"},{"../internals/classof-raw":235,"../internals/global":274}],255:[function(n,x,_){var c=n("../internals/engine-user-agent");x.exports=/web0s(?!.*chrome)/i.test(c)},{"../internals/engine-user-agent":256}],256:[function(n,x,_){x.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},{}],257:[function(n,x,_){var c,o,a=n("../internals/global"),r=n("../internals/engine-user-agent"),t=a.process,e=a.Deno,l=t&&t.versions||e&&e.version,i=l&&l.v8;i&&(o=(c=i.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1])),!o&&r&&(!(c=r.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=r.match(/Chrome\/(\d+)/))&&(o=+c[1]),x.exports=o},{"../internals/engine-user-agent":256,"../internals/global":274}],258:[function(n,x,_){x.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],259:[function(n,x,_){var c=n("../internals/global"),o=n("../internals/object-get-own-property-descriptor").f,a=n("../internals/create-non-enumerable-property"),r=n("../internals/define-built-in"),t=n("../internals/define-global-property"),e=n("../internals/copy-constructor-properties"),l=n("../internals/is-forced");x.exports=function(i,s){var f,h,u,p,d,w=i.target,S=i.global,A=i.stat;if(f=S?c:A?c[w]||t(w,{}):(c[w]||{}).prototype)for(h in s){if(p=s[h],u=i.dontCallGetSet?(d=o(f,h))&&d.value:f[h],!l(S?h:w+(A?".":"#")+h,i.forced)&&u!==void 0){if(typeof p==typeof u)continue;e(p,u)}(i.sham||u&&u.sham)&&a(p,"sham",!0),r(f,h,p,i)}}},{"../internals/copy-constructor-properties":237,"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/define-global-property":246,"../internals/global":274,"../internals/is-forced":287,"../internals/object-get-own-property-descriptor":309}],260:[function(n,x,_){x.exports=function(c){try{return!!c()}catch{return!0}}},{}],261:[function(n,x,_){var c=n("../internals/function-bind-native"),o=Function.prototype,a=o.apply,r=o.call;x.exports=typeof Reflect=="object"&&Reflect.apply||(c?r.bind(a):function(){return r.apply(a,arguments)})},{"../internals/function-bind-native":263}],262:[function(n,x,_){var c=n("../internals/function-uncurry-this-clause"),o=n("../internals/a-callable"),a=n("../internals/function-bind-native"),r=c(c.bind);x.exports=function(t,e){return o(t),e===void 0?t:a?r(t,e):function(){return t.apply(e,arguments)}}},{"../internals/a-callable":222,"../internals/function-bind-native":263,"../internals/function-uncurry-this-clause":267}],263:[function(n,x,_){var c=n("../internals/fails");x.exports=!c((function(){var o=(function(){}).bind();return typeof o!="function"||o.hasOwnProperty("prototype")}))},{"../internals/fails":260}],264:[function(n,x,_){var c=n("../internals/function-bind-native"),o=Function.prototype.call;x.exports=c?o.bind(o):function(){return o.apply(o,arguments)}},{"../internals/function-bind-native":263}],265:[function(n,x,_){var c=n("../internals/descriptors"),o=n("../internals/has-own-property"),a=Function.prototype,r=c&&Object.getOwnPropertyDescriptor,t=o(a,"name"),e=t&&(function(){}).name==="something",l=t&&(!c||c&&r(a,"name").configurable);x.exports={EXISTS:t,PROPER:e,CONFIGURABLE:l}},{"../internals/descriptors":247,"../internals/has-own-property":275}],266:[function(n,x,_){var c=n("../internals/function-uncurry-this"),o=n("../internals/a-callable");x.exports=function(a,r,t){try{return c(o(Object.getOwnPropertyDescriptor(a,r)[t]))}catch{}}},{"../internals/a-callable":222,"../internals/function-uncurry-this":268}],267:[function(n,x,_){var c=n("../internals/classof-raw"),o=n("../internals/function-uncurry-this");x.exports=function(a){if(c(a)==="Function")return o(a)}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268}],268:[function(n,x,_){var c=n("../internals/function-bind-native"),o=Function.prototype,a=o.call,r=c&&o.bind.bind(a,a);x.exports=c?r:function(t){return function(){return a.apply(t,arguments)}}},{"../internals/function-bind-native":263}],269:[function(n,x,_){var c=n("../internals/global"),o=n("../internals/is-callable"),a=function(r){return o(r)?r:void 0};x.exports=function(r,t){return arguments.length<2?a(c[r]):c[r]&&c[r][t]}},{"../internals/global":274,"../internals/is-callable":285}],270:[function(n,x,_){var c=n("../internals/classof"),o=n("../internals/get-method"),a=n("../internals/is-null-or-undefined"),r=n("../internals/iterators"),t=n("../internals/well-known-symbol")("iterator");x.exports=function(e){if(!a(e))return o(e,t)||o(e,"@@iterator")||r[c(e)]}},{"../internals/classof":236,"../internals/get-method":273,"../internals/is-null-or-undefined":288,"../internals/iterators":298,"../internals/well-known-symbol":357}],271:[function(n,x,_){var c=n("../internals/function-call"),o=n("../internals/a-callable"),a=n("../internals/an-object"),r=n("../internals/try-to-string"),t=n("../internals/get-iterator-method"),e=TypeError;x.exports=function(l,i){var s=arguments.length<2?t(l):i;if(o(s))return a(c(s,l));throw new e(r(l)+" is not iterable")}},{"../internals/a-callable":222,"../internals/an-object":227,"../internals/function-call":264,"../internals/get-iterator-method":270,"../internals/try-to-string":349}],272:[function(n,x,_){var c=n("../internals/function-uncurry-this"),o=n("../internals/is-array"),a=n("../internals/is-callable"),r=n("../internals/classof-raw"),t=n("../internals/to-string"),e=c([].push);x.exports=function(l){if(a(l))return l;if(o(l)){for(var i=l.length,s=[],f=0;f<i;f++){var h=l[f];typeof h=="string"?e(s,h):typeof h!="number"&&r(h)!=="Number"&&r(h)!=="String"||e(s,t(h))}var u=s.length,p=!0;return function(d,w){if(p)return p=!1,w;if(o(this))return w;for(var S=0;S<u;S++)if(s[S]===d)return w}}}},{"../internals/classof-raw":235,"../internals/function-uncurry-this":268,"../internals/is-array":284,"../internals/is-callable":285,"../internals/to-string":348}],273:[function(n,x,_){var c=n("../internals/a-callable"),o=n("../internals/is-null-or-undefined");x.exports=function(a,r){var t=a[r];return o(t)?void 0:c(t)}},{"../internals/a-callable":222,"../internals/is-null-or-undefined":288}],274:[function(n,x,_){(function(c){(function(){var o=function(a){return a&&a.Math===Math&&a};x.exports=o(typeof globalThis=="object"&&globalThis)||o(typeof window=="object"&&window)||o(typeof self=="object"&&self)||o(typeof c=="object"&&c)||(function(){return this})()||this||Function("return this")()}).call(this)}).call(this,typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],275:[function(n,x,_){var c=n("../internals/function-uncurry-this"),o=n("../internals/to-object"),a=c({}.hasOwnProperty);x.exports=Object.hasOwn||function(r,t){return a(o(r),t)}},{"../internals/function-uncurry-this":268,"../internals/to-object":344}],276:[function(n,x,_){x.exports={}},{}],277:[function(n,x,_){x.exports=function(c,o){try{arguments.length===1?console.error(c):console.error(c,o)}catch{}}},{}],278:[function(n,x,_){var c=n("../internals/get-built-in");x.exports=c("document","documentElement")},{"../internals/get-built-in":269}],279:[function(n,x,_){var c=n("../internals/descriptors"),o=n("../internals/fails"),a=n("../internals/document-create-element");x.exports=!c&&!o((function(){return Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a!==7}))},{"../internals/descriptors":247,"../internals/document-create-element":249,"../internals/fails":260}],280:[function(n,x,_){var c=n("../internals/function-uncurry-this"),o=n("../internals/fails"),a=n("../internals/classof-raw"),r=Object,t=c("".split);x.exports=o((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return a(e)==="String"?t(e,""):r(e)}:r},{"../internals/classof-raw":235,"../internals/fails":260,"../internals/function-uncurry-this":268}],281:[function(n,x,_){var c=n("../internals/function-uncurry-this"),o=n("../internals/is-callable"),a=n("../internals/shared-store"),r=c(Function.toString);o(a.inspectSource)||(a.inspectSource=function(t){return r(t)}),x.exports=a.inspectSource},{"../internals/function-uncurry-this":268,"../internals/is-callable":285,"../internals/shared-store":333}],282:[function(n,x,_){var c,o,a,r=n("../internals/weak-map-basic-detection"),t=n("../internals/global"),e=n("../internals/is-object"),l=n("../internals/create-non-enumerable-property"),i=n("../internals/has-own-property"),s=n("../internals/shared-store"),f=n("../internals/shared-key"),h=n("../internals/hidden-keys"),u=t.TypeError,p=t.WeakMap;if(r||s.state){var d=s.state||(s.state=new p);d.get=d.get,d.has=d.has,d.set=d.set,c=function(S,A){if(d.has(S))throw new u("Object already initialized");return A.facade=S,d.set(S,A),A},o=function(S){return d.get(S)||{}},a=function(S){return d.has(S)}}else{var w=f("state");h[w]=!0,c=function(S,A){if(i(S,w))throw new u("Object already initialized");return A.facade=S,l(S,w,A),A},o=function(S){return i(S,w)?S[w]:{}},a=function(S){return i(S,w)}}x.exports={set:c,get:o,has:a,enforce:function(S){return a(S)?o(S):c(S,{})},getterFor:function(S){return function(A){var N;if(!e(A)||(N=o(A)).type!==S)throw new u("Incompatible receiver, "+S+" required");return N}}}},{"../internals/create-non-enumerable-property":241,"../internals/global":274,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/is-object":289,"../internals/shared-key":332,"../internals/shared-store":333,"../internals/weak-map-basic-detection":354}],283:[function(n,x,_){var c=n("../internals/well-known-symbol"),o=n("../internals/iterators"),a=c("iterator"),r=Array.prototype;x.exports=function(t){return t!==void 0&&(o.Array===t||r[a]===t)}},{"../internals/iterators":298,"../internals/well-known-symbol":357}],284:[function(n,x,_){var c=n("../internals/classof-raw");x.exports=Array.isArray||function(o){return c(o)==="Array"}},{"../internals/classof-raw":235}],285:[function(n,x,_){var c=n("../internals/document-all"),o=c.all;x.exports=c.IS_HTMLDDA?function(a){return typeof a=="function"||a===o}:function(a){return typeof a=="function"}},{"../internals/document-all":248}],286:[function(n,x,_){var c=n("../internals/function-uncurry-this"),o=n("../internals/fails"),a=n("../internals/is-callable"),r=n("../internals/classof"),t=n("../internals/get-built-in"),e=n("../internals/inspect-source"),l=function(){},i=[],s=t("Reflect","construct"),f=/^\s*(?:class|function)\b/,h=c(f.exec),u=!f.test(l),p=function(w){if(!a(w))return!1;try{return s(l,i,w),!0}catch{return!1}},d=function(w){if(!a(w))return!1;switch(r(w)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return u||!!h(f,e(w))}catch{return!0}};d.sham=!0,x.exports=!s||o((function(){var w;return p(p.call)||!p(Object)||!p((function(){w=!0}))||w}))?d:p},{"../internals/classof":236,"../internals/fails":260,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/inspect-source":281,"../internals/is-callable":285}],287:[function(n,x,_){var c=n("../internals/fails"),o=n("../internals/is-callable"),a=/#|\.prototype\./,r=function(s,f){var h=e[t(s)];return h===i||h!==l&&(o(f)?c(f):!!f)},t=r.normalize=function(s){return String(s).replace(a,".").toLowerCase()},e=r.data={},l=r.NATIVE="N",i=r.POLYFILL="P";x.exports=r},{"../internals/fails":260,"../internals/is-callable":285}],288:[function(n,x,_){x.exports=function(c){return c==null}},{}],289:[function(n,x,_){var c=n("../internals/is-callable"),o=n("../internals/document-all"),a=o.all;x.exports=o.IS_HTMLDDA?function(r){return typeof r=="object"?r!==null:c(r)||r===a}:function(r){return typeof r=="object"?r!==null:c(r)}},{"../internals/document-all":248,"../internals/is-callable":285}],290:[function(n,x,_){x.exports=!1},{}],291:[function(n,x,_){var c=n("../internals/is-object"),o=n("../internals/classof-raw"),a=n("../internals/well-known-symbol")("match");x.exports=function(r){var t;return c(r)&&((t=r[a])!==void 0?!!t:o(r)==="RegExp")}},{"../internals/classof-raw":235,"../internals/is-object":289,"../internals/well-known-symbol":357}],292:[function(n,x,_){var c=n("../internals/get-built-in"),o=n("../internals/is-callable"),a=n("../internals/object-is-prototype-of"),r=n("../internals/use-symbol-as-uid"),t=Object;x.exports=r?function(e){return typeof e=="symbol"}:function(e){var l=c("Symbol");return o(l)&&a(l.prototype,t(e))}},{"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/object-is-prototype-of":314,"../internals/use-symbol-as-uid":351}],293:[function(n,x,_){var c=n("../internals/function-bind-context"),o=n("../internals/function-call"),a=n("../internals/an-object"),r=n("../internals/try-to-string"),t=n("../internals/is-array-iterator-method"),e=n("../internals/length-of-array-like"),l=n("../internals/object-is-prototype-of"),i=n("../internals/get-iterator"),s=n("../internals/get-iterator-method"),f=n("../internals/iterator-close"),h=TypeError,u=function(d,w){this.stopped=d,this.result=w},p=u.prototype;x.exports=function(d,w,S){var A,N,L,I,P,D,U,B=S&&S.that,k=!(!S||!S.AS_ENTRIES),C=!(!S||!S.IS_RECORD),v=!(!S||!S.IS_ITERATOR),m=!(!S||!S.INTERRUPTED),b=c(w,B),g=function(E){return A&&f(A,"normal",E),new u(!0,E)},y=function(E){return k?(a(E),m?b(E[0],E[1],g):b(E[0],E[1])):m?b(E,g):b(E)};if(C)A=d.iterator;else if(v)A=d;else{if(!(N=s(d)))throw new h(r(d)+" is not iterable");if(t(N)){for(L=0,I=e(d);I>L;L++)if((P=y(d[L]))&&l(p,P))return P;return new u(!1)}A=i(d,N)}for(D=C?d.next:A.next;!(U=o(D,A)).done;){try{P=y(U.value)}catch(E){f(A,"throw",E)}if(typeof P=="object"&&P&&l(p,P))return P}return new u(!1)}},{"../internals/an-object":227,"../internals/function-bind-context":262,"../internals/function-call":264,"../internals/get-iterator":271,"../internals/get-iterator-method":270,"../internals/is-array-iterator-method":283,"../internals/iterator-close":294,"../internals/length-of-array-like":299,"../internals/object-is-prototype-of":314,"../internals/try-to-string":349}],294:[function(n,x,_){var c=n("../internals/function-call"),o=n("../internals/an-object"),a=n("../internals/get-method");x.exports=function(r,t,e){var l,i;o(r);try{if(!(l=a(r,"return"))){if(t==="throw")throw e;return e}l=c(l,r)}catch(s){i=!0,l=s}if(t==="throw")throw e;if(i)throw l;return o(l),e}},{"../internals/an-object":227,"../internals/function-call":264,"../internals/get-method":273}],295:[function(n,x,_){var c=n("../internals/iterators-core").IteratorPrototype,o=n("../internals/object-create"),a=n("../internals/create-property-descriptor"),r=n("../internals/set-to-string-tag"),t=n("../internals/iterators"),e=function(){return this};x.exports=function(l,i,s,f){var h=i+" Iterator";return l.prototype=o(c,{next:a(+!f,s)}),r(l,h,!1,!0),t[h]=e,l}},{"../internals/create-property-descriptor":242,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-create":306,"../internals/set-to-string-tag":331}],296:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/function-call"),a=n("../internals/is-pure"),r=n("../internals/function-name"),t=n("../internals/is-callable"),e=n("../internals/iterator-create-constructor"),l=n("../internals/object-get-prototype-of"),i=n("../internals/object-set-prototype-of"),s=n("../internals/set-to-string-tag"),f=n("../internals/create-non-enumerable-property"),h=n("../internals/define-built-in"),u=n("../internals/well-known-symbol"),p=n("../internals/iterators"),d=n("../internals/iterators-core"),w=r.PROPER,S=r.CONFIGURABLE,A=d.IteratorPrototype,N=d.BUGGY_SAFARI_ITERATORS,L=u("iterator"),I=function(){return this};x.exports=function(P,D,U,B,k,C,v){e(U,D,B);var m,b,g,y=function(j){if(j===k&&$)return $;if(!N&&j&&j in O)return O[j];switch(j){case"keys":case"values":case"entries":return function(){return new U(this,j)}}return function(){return new U(this)}},E=D+" Iterator",R=!1,O=P.prototype,z=O[L]||O["@@iterator"]||k&&O[k],$=!N&&z||y(k),Z=D==="Array"&&O.entries||z;if(Z&&(m=l(Z.call(new P)))!==Object.prototype&&m.next&&(a||l(m)===A||(i?i(m,A):t(m[L])||h(m,L,I)),s(m,E,!0,!0),a&&(p[E]=I)),w&&k==="values"&&z&&z.name!=="values"&&(!a&&S?f(O,"name","values"):(R=!0,$=function(){return o(z,this)})),k)if(b={values:y("values"),keys:C?$:y("keys"),entries:y("entries")},v)for(g in b)(N||R||!(g in O))&&h(O,g,b[g]);else c({target:D,proto:!0,forced:N||R},b);return a&&!v||O[L]===$||h(O,L,$,{name:k}),p[D]=$,b}},{"../internals/create-non-enumerable-property":241,"../internals/define-built-in":245,"../internals/export":259,"../internals/function-call":264,"../internals/function-name":265,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/iterator-create-constructor":295,"../internals/iterators":298,"../internals/iterators-core":297,"../internals/object-get-prototype-of":313,"../internals/object-set-prototype-of":318,"../internals/set-to-string-tag":331,"../internals/well-known-symbol":357}],297:[function(n,x,_){var c,o,a,r=n("../internals/fails"),t=n("../internals/is-callable"),e=n("../internals/is-object"),l=n("../internals/object-create"),i=n("../internals/object-get-prototype-of"),s=n("../internals/define-built-in"),f=n("../internals/well-known-symbol"),h=n("../internals/is-pure"),u=f("iterator"),p=!1;[].keys&&("next"in(a=[].keys())?(o=i(i(a)))!==Object.prototype&&(c=o):p=!0),!e(c)||r((function(){var d={};return c[u].call(d)!==d}))?c={}:h&&(c=l(c)),t(c[u])||s(c,u,(function(){return this})),x.exports={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:p}},{"../internals/define-built-in":245,"../internals/fails":260,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-get-prototype-of":313,"../internals/well-known-symbol":357}],298:[function(n,x,_){arguments[4][276][0].apply(_,arguments)},{dup:276}],299:[function(n,x,_){var c=n("../internals/to-length");x.exports=function(o){return c(o.length)}},{"../internals/to-length":343}],300:[function(n,x,_){var c=n("../internals/function-uncurry-this"),o=n("../internals/fails"),a=n("../internals/is-callable"),r=n("../internals/has-own-property"),t=n("../internals/descriptors"),e=n("../internals/function-name").CONFIGURABLE,l=n("../internals/inspect-source"),i=n("../internals/internal-state"),s=i.enforce,f=i.get,h=String,u=Object.defineProperty,p=c("".slice),d=c("".replace),w=c([].join),S=t&&!o((function(){return u((function(){}),"length",{value:8}).length!==8})),A=String(String).split("String"),N=x.exports=function(L,I,P){p(h(I),0,7)==="Symbol("&&(I="["+d(h(I),/^Symbol\(([^)]*)\)/,"$1")+"]"),P&&P.getter&&(I="get "+I),P&&P.setter&&(I="set "+I),(!r(L,"name")||e&&L.name!==I)&&(t?u(L,"name",{value:I,configurable:!0}):L.name=I),S&&P&&r(P,"arity")&&L.length!==P.arity&&u(L,"length",{value:P.arity});try{P&&r(P,"constructor")&&P.constructor?t&&u(L,"prototype",{writable:!1}):L.prototype&&(L.prototype=void 0)}catch{}var D=s(L);return r(D,"source")||(D.source=w(A,typeof I=="string"?I:"")),L};Function.prototype.toString=N((function(){return a(this)&&f(this).source||l(this)}),"toString")},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-name":265,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/inspect-source":281,"../internals/internal-state":282,"../internals/is-callable":285}],301:[function(n,x,_){var c=Math.ceil,o=Math.floor;x.exports=Math.trunc||function(a){var r=+a;return(r>0?o:c)(r)}},{}],302:[function(n,x,_){var c,o,a,r,t,e=n("../internals/global"),l=n("../internals/function-bind-context"),i=n("../internals/object-get-own-property-descriptor").f,s=n("../internals/task").set,f=n("../internals/queue"),h=n("../internals/engine-is-ios"),u=n("../internals/engine-is-ios-pebble"),p=n("../internals/engine-is-webos-webkit"),d=n("../internals/engine-is-node"),w=e.MutationObserver||e.WebKitMutationObserver,S=e.document,A=e.process,N=e.Promise,L=i(e,"queueMicrotask"),I=L&&L.value;if(!I){var P=new f,D=function(){var U,B;for(d&&(U=A.domain)&&U.exit();B=P.get();)try{B()}catch(k){throw P.head&&c(),k}U&&U.enter()};h||d||p||!w||!S?!u&&N&&N.resolve?((r=N.resolve(void 0)).constructor=N,t=l(r.then,r),c=function(){t(D)}):d?c=function(){A.nextTick(D)}:(s=l(s,e),c=function(){s(D)}):(o=!0,a=S.createTextNode(""),new w(D).observe(a,{characterData:!0}),c=function(){a.data=o=!o}),I=function(U){P.head||c(),P.add(U)}}x.exports=I},{"../internals/engine-is-ios":253,"../internals/engine-is-ios-pebble":252,"../internals/engine-is-node":254,"../internals/engine-is-webos-webkit":255,"../internals/function-bind-context":262,"../internals/global":274,"../internals/object-get-own-property-descriptor":309,"../internals/queue":328,"../internals/task":339}],303:[function(n,x,_){var c=n("../internals/a-callable"),o=TypeError,a=function(r){var t,e;this.promise=new r((function(l,i){if(t!==void 0||e!==void 0)throw new o("Bad Promise constructor");t=l,e=i})),this.resolve=c(t),this.reject=c(e)};x.exports.f=function(r){return new a(r)}},{"../internals/a-callable":222}],304:[function(n,x,_){var c=n("../internals/is-regexp"),o=TypeError;x.exports=function(a){if(c(a))throw new o("The method doesn't accept regular expressions");return a}},{"../internals/is-regexp":291}],305:[function(n,x,_){var c=n("../internals/descriptors"),o=n("../internals/function-uncurry-this"),a=n("../internals/function-call"),r=n("../internals/fails"),t=n("../internals/object-keys"),e=n("../internals/object-get-own-property-symbols"),l=n("../internals/object-property-is-enumerable"),i=n("../internals/to-object"),s=n("../internals/indexed-object"),f=Object.assign,h=Object.defineProperty,u=o([].concat);x.exports=!f||r((function(){if(c&&f({b:1},f(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var p={},d={},w=Symbol("assign detection");return p[w]=7,"abcdefghijklmnopqrst".split("").forEach((function(S){d[S]=S})),f({},p)[w]!==7||t(f({},d)).join("")!=="abcdefghijklmnopqrst"}))?function(p,d){for(var w=i(p),S=arguments.length,A=1,N=e.f,L=l.f;S>A;)for(var I,P=s(arguments[A++]),D=N?u(t(P),N(P)):t(P),U=D.length,B=0;U>B;)I=D[B++],c&&!a(L,P,I)||(w[I]=P[I]);return w}:f},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/indexed-object":280,"../internals/object-get-own-property-symbols":312,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-object":344}],306:[function(n,x,_){var c,o=n("../internals/an-object"),a=n("../internals/object-define-properties"),r=n("../internals/enum-bug-keys"),t=n("../internals/hidden-keys"),e=n("../internals/html"),l=n("../internals/document-create-element"),i=n("../internals/shared-key"),s=i("IE_PROTO"),f=function(){},h=function(d){return"<script>"+d+"<\/script>"},u=function(d){d.write(h("")),d.close();var w=d.parentWindow.Object;return d=null,w},p=function(){try{c=new ActiveXObject("htmlfile")}catch{}var d,w;p=typeof document<"u"?document.domain&&c?u(c):((w=l("iframe")).style.display="none",e.appendChild(w),w.src="javascript:",(d=w.contentWindow.document).open(),d.write(h("document.F=Object")),d.close(),d.F):u(c);for(var S=r.length;S--;)delete p.prototype[r[S]];return p()};t[s]=!0,x.exports=Object.create||function(d,w){var S;return d!==null?(f.prototype=o(d),S=new f,f.prototype=null,S[s]=d):S=p(),w===void 0?S:a.f(S,w)}},{"../internals/an-object":227,"../internals/document-create-element":249,"../internals/enum-bug-keys":258,"../internals/hidden-keys":276,"../internals/html":278,"../internals/object-define-properties":307,"../internals/shared-key":332}],307:[function(n,x,_){var c=n("../internals/descriptors"),o=n("../internals/v8-prototype-define-bug"),a=n("../internals/object-define-property"),r=n("../internals/an-object"),t=n("../internals/to-indexed-object"),e=n("../internals/object-keys");_.f=c&&!o?Object.defineProperties:function(l,i){r(l);for(var s,f=t(i),h=e(i),u=h.length,p=0;u>p;)a.f(l,s=h[p++],f[s]);return l}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/object-define-property":308,"../internals/object-keys":316,"../internals/to-indexed-object":341,"../internals/v8-prototype-define-bug":352}],308:[function(n,x,_){var c=n("../internals/descriptors"),o=n("../internals/ie8-dom-define"),a=n("../internals/v8-prototype-define-bug"),r=n("../internals/an-object"),t=n("../internals/to-property-key"),e=TypeError,l=Object.defineProperty,i=Object.getOwnPropertyDescriptor;_.f=c?a?function(s,f,h){if(r(s),f=t(f),r(h),typeof s=="function"&&f==="prototype"&&"value"in h&&"writable"in h&&!h.writable){var u=i(s,f);u&&u.writable&&(s[f]=h.value,h={configurable:"configurable"in h?h.configurable:u.configurable,enumerable:"enumerable"in h?h.enumerable:u.enumerable,writable:!1})}return l(s,f,h)}:l:function(s,f,h){if(r(s),f=t(f),r(h),o)try{return l(s,f,h)}catch{}if("get"in h||"set"in h)throw new e("Accessors not supported");return"value"in h&&(s[f]=h.value),s}},{"../internals/an-object":227,"../internals/descriptors":247,"../internals/ie8-dom-define":279,"../internals/to-property-key":346,"../internals/v8-prototype-define-bug":352}],309:[function(n,x,_){var c=n("../internals/descriptors"),o=n("../internals/function-call"),a=n("../internals/object-property-is-enumerable"),r=n("../internals/create-property-descriptor"),t=n("../internals/to-indexed-object"),e=n("../internals/to-property-key"),l=n("../internals/has-own-property"),i=n("../internals/ie8-dom-define"),s=Object.getOwnPropertyDescriptor;_.f=c?s:function(f,h){if(f=t(f),h=e(h),i)try{return s(f,h)}catch{}if(l(f,h))return r(!o(a.f,f,h),f[h])}},{"../internals/create-property-descriptor":242,"../internals/descriptors":247,"../internals/function-call":264,"../internals/has-own-property":275,"../internals/ie8-dom-define":279,"../internals/object-property-is-enumerable":317,"../internals/to-indexed-object":341,"../internals/to-property-key":346}],310:[function(n,x,_){var c=n("../internals/classof-raw"),o=n("../internals/to-indexed-object"),a=n("../internals/object-get-own-property-names").f,r=n("../internals/array-slice-simple"),t=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];x.exports.f=function(e){return t&&c(e)==="Window"?(function(l){try{return a(l)}catch{return r(t)}})(e):a(o(e))}},{"../internals/array-slice-simple":230,"../internals/classof-raw":235,"../internals/object-get-own-property-names":311,"../internals/to-indexed-object":341}],311:[function(n,x,_){var c=n("../internals/object-keys-internal"),o=n("../internals/enum-bug-keys").concat("length","prototype");_.f=Object.getOwnPropertyNames||function(a){return c(a,o)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],312:[function(n,x,_){_.f=Object.getOwnPropertySymbols},{}],313:[function(n,x,_){var c=n("../internals/has-own-property"),o=n("../internals/is-callable"),a=n("../internals/to-object"),r=n("../internals/shared-key"),t=n("../internals/correct-prototype-getter"),e=r("IE_PROTO"),l=Object,i=l.prototype;x.exports=t?l.getPrototypeOf:function(s){var f=a(s);if(c(f,e))return f[e];var h=f.constructor;return o(h)&&f instanceof h?h.prototype:f instanceof l?i:null}},{"../internals/correct-prototype-getter":239,"../internals/has-own-property":275,"../internals/is-callable":285,"../internals/shared-key":332,"../internals/to-object":344}],314:[function(n,x,_){var c=n("../internals/function-uncurry-this");x.exports=c({}.isPrototypeOf)},{"../internals/function-uncurry-this":268}],315:[function(n,x,_){var c=n("../internals/function-uncurry-this"),o=n("../internals/has-own-property"),a=n("../internals/to-indexed-object"),r=n("../internals/array-includes").indexOf,t=n("../internals/hidden-keys"),e=c([].push);x.exports=function(l,i){var s,f=a(l),h=0,u=[];for(s in f)!o(t,s)&&o(f,s)&&e(u,s);for(;i.length>h;)o(f,s=i[h++])&&(~r(u,s)||e(u,s));return u}},{"../internals/array-includes":228,"../internals/function-uncurry-this":268,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/to-indexed-object":341}],316:[function(n,x,_){var c=n("../internals/object-keys-internal"),o=n("../internals/enum-bug-keys");x.exports=Object.keys||function(a){return c(a,o)}},{"../internals/enum-bug-keys":258,"../internals/object-keys-internal":315}],317:[function(n,x,_){var c={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!c.call({1:2},1);_.f=a?function(r){var t=o(this,r);return!!t&&t.enumerable}:c},{}],318:[function(n,x,_){var c=n("../internals/function-uncurry-this-accessor"),o=n("../internals/an-object"),a=n("../internals/a-possible-prototype");x.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var r,t=!1,e={};try{(r=c(Object.prototype,"__proto__","set"))(e,[]),t=e instanceof Array}catch{}return function(l,i){return o(l),a(i),t?r(l,i):l.__proto__=i,l}})():void 0)},{"../internals/a-possible-prototype":224,"../internals/an-object":227,"../internals/function-uncurry-this-accessor":266}],319:[function(n,x,_){var c=n("../internals/descriptors"),o=n("../internals/fails"),a=n("../internals/function-uncurry-this"),r=n("../internals/object-get-prototype-of"),t=n("../internals/object-keys"),e=n("../internals/to-indexed-object"),l=a(n("../internals/object-property-is-enumerable").f),i=a([].push),s=c&&o((function(){var h=Object.create(null);return h[2]=2,!l(h,2)})),f=function(h){return function(u){for(var p,d=e(u),w=t(d),S=s&&r(d)===null,A=w.length,N=0,L=[];A>N;)p=w[N++],c&&!(S?p in d:l(d,p))||i(L,h?[p,d[p]]:d[p]);return L}};x.exports={entries:f(!0),values:f(!1)}},{"../internals/descriptors":247,"../internals/fails":260,"../internals/function-uncurry-this":268,"../internals/object-get-prototype-of":313,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/to-indexed-object":341}],320:[function(n,x,_){var c=n("../internals/function-call"),o=n("../internals/is-callable"),a=n("../internals/is-object"),r=TypeError;x.exports=function(t,e){var l,i;if(e==="string"&&o(l=t.toString)&&!a(i=c(l,t))||o(l=t.valueOf)&&!a(i=c(l,t))||e!=="string"&&o(l=t.toString)&&!a(i=c(l,t)))return i;throw new r("Can't convert object to primitive value")}},{"../internals/function-call":264,"../internals/is-callable":285,"../internals/is-object":289}],321:[function(n,x,_){var c=n("../internals/get-built-in"),o=n("../internals/function-uncurry-this"),a=n("../internals/object-get-own-property-names"),r=n("../internals/object-get-own-property-symbols"),t=n("../internals/an-object"),e=o([].concat);x.exports=c("Reflect","ownKeys")||function(l){var i=a.f(t(l)),s=r.f;return s?e(i,s(l)):i}},{"../internals/an-object":227,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/object-get-own-property-names":311,"../internals/object-get-own-property-symbols":312}],322:[function(n,x,_){var c=n("../internals/global");x.exports=c},{"../internals/global":274}],323:[function(n,x,_){x.exports=function(c){try{return{error:!1,value:c()}}catch(o){return{error:!0,value:o}}}},{}],324:[function(n,x,_){var c=n("../internals/global"),o=n("../internals/promise-native-constructor"),a=n("../internals/is-callable"),r=n("../internals/is-forced"),t=n("../internals/inspect-source"),e=n("../internals/well-known-symbol"),l=n("../internals/engine-is-browser"),i=n("../internals/engine-is-deno"),s=n("../internals/is-pure"),f=n("../internals/engine-v8-version"),h=o&&o.prototype,u=e("species"),p=!1,d=a(c.PromiseRejectionEvent),w=r("Promise",(function(){var S=t(o),A=S!==String(o);if(!A&&f===66||s&&(!h.catch||!h.finally))return!0;if(!f||f<51||!/native code/.test(S)){var N=new o((function(I){I(1)})),L=function(I){I((function(){}),(function(){}))};if((N.constructor={})[u]=L,!(p=N.then((function(){}))instanceof L))return!0}return!A&&(l||i)&&!d}));x.exports={CONSTRUCTOR:w,REJECTION_EVENT:d,SUBCLASSING:p}},{"../internals/engine-is-browser":250,"../internals/engine-is-deno":251,"../internals/engine-v8-version":257,"../internals/global":274,"../internals/inspect-source":281,"../internals/is-callable":285,"../internals/is-forced":287,"../internals/is-pure":290,"../internals/promise-native-constructor":325,"../internals/well-known-symbol":357}],325:[function(n,x,_){var c=n("../internals/global");x.exports=c.Promise},{"../internals/global":274}],326:[function(n,x,_){var c=n("../internals/an-object"),o=n("../internals/is-object"),a=n("../internals/new-promise-capability");x.exports=function(r,t){if(c(r),o(t)&&t.constructor===r)return t;var e=a.f(r);return(0,e.resolve)(t),e.promise}},{"../internals/an-object":227,"../internals/is-object":289,"../internals/new-promise-capability":303}],327:[function(n,x,_){var c=n("../internals/promise-native-constructor"),o=n("../internals/check-correctness-of-iteration"),a=n("../internals/promise-constructor-detection").CONSTRUCTOR;x.exports=a||!o((function(r){c.all(r).then(void 0,(function(){}))}))},{"../internals/check-correctness-of-iteration":234,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],328:[function(n,x,_){var c=function(){this.head=null,this.tail=null};c.prototype={add:function(o){var a={item:o,next:null},r=this.tail;r?r.next=a:this.head=a,this.tail=a},get:function(){var o=this.head;if(o)return(this.head=o.next)===null&&(this.tail=null),o.item}},x.exports=c},{}],329:[function(n,x,_){var c=n("../internals/is-null-or-undefined"),o=TypeError;x.exports=function(a){if(c(a))throw new o("Can't call method on "+a);return a}},{"../internals/is-null-or-undefined":288}],330:[function(n,x,_){var c=n("../internals/get-built-in"),o=n("../internals/define-built-in-accessor"),a=n("../internals/well-known-symbol"),r=n("../internals/descriptors"),t=a("species");x.exports=function(e){var l=c(e);r&&l&&!l[t]&&o(l,t,{configurable:!0,get:function(){return this}})}},{"../internals/define-built-in-accessor":244,"../internals/descriptors":247,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],331:[function(n,x,_){var c=n("../internals/object-define-property").f,o=n("../internals/has-own-property"),a=n("../internals/well-known-symbol")("toStringTag");x.exports=function(r,t,e){r&&!e&&(r=r.prototype),r&&!o(r,a)&&c(r,a,{configurable:!0,value:t})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/well-known-symbol":357}],332:[function(n,x,_){var c=n("../internals/shared"),o=n("../internals/uid"),a=c("keys");x.exports=function(r){return a[r]||(a[r]=o(r))}},{"../internals/shared":334,"../internals/uid":350}],333:[function(n,x,_){var c=n("../internals/global"),o=n("../internals/define-global-property"),a=c["__core-js_shared__"]||o("__core-js_shared__",{});x.exports=a},{"../internals/define-global-property":246,"../internals/global":274}],334:[function(n,x,_){var c=n("../internals/is-pure"),o=n("../internals/shared-store");(x.exports=function(a,r){return o[a]||(o[a]=r!==void 0?r:{})})("versions",[]).push({version:"3.33.0",mode:c?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"})},{"../internals/is-pure":290,"../internals/shared-store":333}],335:[function(n,x,_){var c=n("../internals/an-object"),o=n("../internals/a-constructor"),a=n("../internals/is-null-or-undefined"),r=n("../internals/well-known-symbol")("species");x.exports=function(t,e){var l,i=c(t).constructor;return i===void 0||a(l=c(i)[r])?e:o(l)}},{"../internals/a-constructor":223,"../internals/an-object":227,"../internals/is-null-or-undefined":288,"../internals/well-known-symbol":357}],336:[function(n,x,_){var c=n("../internals/engine-v8-version"),o=n("../internals/fails"),a=n("../internals/global").String;x.exports=!!Object.getOwnPropertySymbols&&!o((function(){var r=Symbol("symbol detection");return!a(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&c&&c<41}))},{"../internals/engine-v8-version":257,"../internals/fails":260,"../internals/global":274}],337:[function(n,x,_){var c=n("../internals/function-call"),o=n("../internals/get-built-in"),a=n("../internals/well-known-symbol"),r=n("../internals/define-built-in");x.exports=function(){var t=o("Symbol"),e=t&&t.prototype,l=e&&e.valueOf,i=a("toPrimitive");e&&!e[i]&&r(e,i,(function(s){return c(l,this)}),{arity:1})}},{"../internals/define-built-in":245,"../internals/function-call":264,"../internals/get-built-in":269,"../internals/well-known-symbol":357}],338:[function(n,x,_){var c=n("../internals/symbol-constructor-detection");x.exports=c&&!!Symbol.for&&!!Symbol.keyFor},{"../internals/symbol-constructor-detection":336}],339:[function(n,x,_){var c,o,a,r,t=n("../internals/global"),e=n("../internals/function-apply"),l=n("../internals/function-bind-context"),i=n("../internals/is-callable"),s=n("../internals/has-own-property"),f=n("../internals/fails"),h=n("../internals/html"),u=n("../internals/array-slice"),p=n("../internals/document-create-element"),d=n("../internals/validate-arguments-length"),w=n("../internals/engine-is-ios"),S=n("../internals/engine-is-node"),A=t.setImmediate,N=t.clearImmediate,L=t.process,I=t.Dispatch,P=t.Function,D=t.MessageChannel,U=t.String,B=0,k={};f((function(){c=t.location}));var C=function(g){if(s(k,g)){var y=k[g];delete k[g],y()}},v=function(g){return function(){C(g)}},m=function(g){C(g.data)},b=function(g){t.postMessage(U(g),c.protocol+"//"+c.host)};A&&N||(A=function(g){d(arguments.length,1);var y=i(g)?g:P(g),E=u(arguments,1);return k[++B]=function(){e(y,void 0,E)},o(B),B},N=function(g){delete k[g]},S?o=function(g){L.nextTick(v(g))}:I&&I.now?o=function(g){I.now(v(g))}:D&&!w?(r=(a=new D).port2,a.port1.onmessage=m,o=l(r.postMessage,r)):t.addEventListener&&i(t.postMessage)&&!t.importScripts&&c&&c.protocol!=="file:"&&!f(b)?(o=b,t.addEventListener("message",m,!1)):o="onreadystatechange"in p("script")?function(g){h.appendChild(p("script")).onreadystatechange=function(){h.removeChild(this),C(g)}}:function(g){setTimeout(v(g),0)}),x.exports={set:A,clear:N}},{"../internals/array-slice":231,"../internals/document-create-element":249,"../internals/engine-is-ios":253,"../internals/engine-is-node":254,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-bind-context":262,"../internals/global":274,"../internals/has-own-property":275,"../internals/html":278,"../internals/is-callable":285,"../internals/validate-arguments-length":353}],340:[function(n,x,_){var c=n("../internals/to-integer-or-infinity"),o=Math.max,a=Math.min;x.exports=function(r,t){var e=c(r);return e<0?o(e+t,0):a(e,t)}},{"../internals/to-integer-or-infinity":342}],341:[function(n,x,_){var c=n("../internals/indexed-object"),o=n("../internals/require-object-coercible");x.exports=function(a){return c(o(a))}},{"../internals/indexed-object":280,"../internals/require-object-coercible":329}],342:[function(n,x,_){var c=n("../internals/math-trunc");x.exports=function(o){var a=+o;return a!=a||a===0?0:c(a)}},{"../internals/math-trunc":301}],343:[function(n,x,_){var c=n("../internals/to-integer-or-infinity"),o=Math.min;x.exports=function(a){return a>0?o(c(a),9007199254740991):0}},{"../internals/to-integer-or-infinity":342}],344:[function(n,x,_){var c=n("../internals/require-object-coercible"),o=Object;x.exports=function(a){return o(c(a))}},{"../internals/require-object-coercible":329}],345:[function(n,x,_){var c=n("../internals/function-call"),o=n("../internals/is-object"),a=n("../internals/is-symbol"),r=n("../internals/get-method"),t=n("../internals/ordinary-to-primitive"),e=n("../internals/well-known-symbol"),l=TypeError,i=e("toPrimitive");x.exports=function(s,f){if(!o(s)||a(s))return s;var h,u=r(s,i);if(u){if(f===void 0&&(f="default"),h=c(u,s,f),!o(h)||a(h))return h;throw new l("Can't convert object to primitive value")}return f===void 0&&(f="number"),t(s,f)}},{"../internals/function-call":264,"../internals/get-method":273,"../internals/is-object":289,"../internals/is-symbol":292,"../internals/ordinary-to-primitive":320,"../internals/well-known-symbol":357}],346:[function(n,x,_){var c=n("../internals/to-primitive"),o=n("../internals/is-symbol");x.exports=function(a){var r=c(a,"string");return o(r)?r:r+""}},{"../internals/is-symbol":292,"../internals/to-primitive":345}],347:[function(n,x,_){var c={};c[n("../internals/well-known-symbol")("toStringTag")]="z",x.exports=String(c)==="[object z]"},{"../internals/well-known-symbol":357}],348:[function(n,x,_){var c=n("../internals/classof"),o=String;x.exports=function(a){if(c(a)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return o(a)}},{"../internals/classof":236}],349:[function(n,x,_){var c=String;x.exports=function(o){try{return c(o)}catch{return"Object"}}},{}],350:[function(n,x,_){var c=n("../internals/function-uncurry-this"),o=0,a=Math.random(),r=c(1 .toString);x.exports=function(t){return"Symbol("+(t===void 0?"":t)+")_"+r(++o+a,36)}},{"../internals/function-uncurry-this":268}],351:[function(n,x,_){var c=n("../internals/symbol-constructor-detection");x.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},{"../internals/symbol-constructor-detection":336}],352:[function(n,x,_){var c=n("../internals/descriptors"),o=n("../internals/fails");x.exports=c&&o((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},{"../internals/descriptors":247,"../internals/fails":260}],353:[function(n,x,_){var c=TypeError;x.exports=function(o,a){if(o<a)throw new c("Not enough arguments");return o}},{}],354:[function(n,x,_){var c=n("../internals/global"),o=n("../internals/is-callable"),a=c.WeakMap;x.exports=o(a)&&/native code/.test(String(a))},{"../internals/global":274,"../internals/is-callable":285}],355:[function(n,x,_){var c=n("../internals/path"),o=n("../internals/has-own-property"),a=n("../internals/well-known-symbol-wrapped"),r=n("../internals/object-define-property").f;x.exports=function(t){var e=c.Symbol||(c.Symbol={});o(e,t)||r(e,t,{value:a.f(t)})}},{"../internals/has-own-property":275,"../internals/object-define-property":308,"../internals/path":322,"../internals/well-known-symbol-wrapped":356}],356:[function(n,x,_){var c=n("../internals/well-known-symbol");_.f=c},{"../internals/well-known-symbol":357}],357:[function(n,x,_){var c=n("../internals/global"),o=n("../internals/shared"),a=n("../internals/has-own-property"),r=n("../internals/uid"),t=n("../internals/symbol-constructor-detection"),e=n("../internals/use-symbol-as-uid"),l=c.Symbol,i=o("wks"),s=e?l.for||l:l&&l.withoutSetter||r;x.exports=function(f){return a(i,f)||(i[f]=t&&a(l,f)?l[f]:s("Symbol."+f)),i[f]}},{"../internals/global":274,"../internals/has-own-property":275,"../internals/shared":334,"../internals/symbol-constructor-detection":336,"../internals/uid":350,"../internals/use-symbol-as-uid":351}],358:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/array-iteration").findIndex,a=n("../internals/add-to-unscopables"),r=!0;"findIndex"in[]&&Array(1).findIndex((function(){r=!1})),c({target:"Array",proto:!0,forced:r},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),a("findIndex")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],359:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/array-iteration").find,a=n("../internals/add-to-unscopables"),r=!0;"find"in[]&&Array(1).find((function(){r=!1})),c({target:"Array",proto:!0,forced:r},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),a("find")},{"../internals/add-to-unscopables":225,"../internals/array-iteration":229,"../internals/export":259}],360:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/array-includes").includes,a=n("../internals/fails"),r=n("../internals/add-to-unscopables");c({target:"Array",proto:!0,forced:a((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),r("includes")},{"../internals/add-to-unscopables":225,"../internals/array-includes":228,"../internals/export":259,"../internals/fails":260}],361:[function(n,x,_){var c=n("../internals/to-indexed-object"),o=n("../internals/add-to-unscopables"),a=n("../internals/iterators"),r=n("../internals/internal-state"),t=n("../internals/object-define-property").f,e=n("../internals/iterator-define"),l=n("../internals/create-iter-result-object"),i=n("../internals/is-pure"),s=n("../internals/descriptors"),f=r.set,h=r.getterFor("Array Iterator");x.exports=e(Array,"Array",(function(p,d){f(this,{type:"Array Iterator",target:c(p),index:0,kind:d})}),(function(){var p=h(this),d=p.target,w=p.kind,S=p.index++;if(!d||S>=d.length)return p.target=void 0,l(void 0,!0);switch(w){case"keys":return l(S,!1);case"values":return l(d[S],!1)}return l([S,d[S]],!1)}),"values");var u=a.Arguments=a.Array;if(o("keys"),o("values"),o("entries"),!i&&s&&u.name!=="values")try{t(u,"name",{value:"values"})}catch{}},{"../internals/add-to-unscopables":225,"../internals/create-iter-result-object":240,"../internals/descriptors":247,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/iterator-define":296,"../internals/iterators":298,"../internals/object-define-property":308,"../internals/to-indexed-object":341}],362:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/get-built-in"),a=n("../internals/function-apply"),r=n("../internals/function-call"),t=n("../internals/function-uncurry-this"),e=n("../internals/fails"),l=n("../internals/is-callable"),i=n("../internals/is-symbol"),s=n("../internals/array-slice"),f=n("../internals/get-json-replacer-function"),h=n("../internals/symbol-constructor-detection"),u=String,p=o("JSON","stringify"),d=t(/./.exec),w=t("".charAt),S=t("".charCodeAt),A=t("".replace),N=t(1 .toString),L=/[\uD800-\uDFFF]/g,I=/^[\uD800-\uDBFF]$/,P=/^[\uDC00-\uDFFF]$/,D=!h||e((function(){var C=o("Symbol")("stringify detection");return p([C])!=="[null]"||p({a:C})!=="{}"||p(Object(C))!=="{}"})),U=e((function(){return p("\uDF06\uD834")!=='"\\udf06\\ud834"'||p("\uDEAD")!=='"\\udead"'})),B=function(C,v){var m=s(arguments),b=f(v);if(l(b)||C!==void 0&&!i(C))return m[1]=function(g,y){if(l(b)&&(y=r(b,this,u(g),y)),!i(y))return y},a(p,null,m)},k=function(C,v,m){var b=w(m,v-1),g=w(m,v+1);return d(I,C)&&!d(P,g)||d(P,C)&&!d(I,b)?"\\u"+N(S(C,0),16):C};p&&c({target:"JSON",stat:!0,arity:3,forced:D||U},{stringify:function(C,v,m){var b=s(arguments),g=a(D?B:p,null,b);return U&&typeof g=="string"?A(g,L,k):g}})},{"../internals/array-slice":231,"../internals/export":259,"../internals/fails":260,"../internals/function-apply":261,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/get-built-in":269,"../internals/get-json-replacer-function":272,"../internals/is-callable":285,"../internals/is-symbol":292,"../internals/symbol-constructor-detection":336}],363:[function(n,x,_){n("../internals/export")({target:"Number",stat:!0},{isNaN:function(c){return c!=c}})},{"../internals/export":259}],364:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/object-assign");c({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},{"../internals/export":259,"../internals/object-assign":305}],365:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/symbol-constructor-detection"),a=n("../internals/fails"),r=n("../internals/object-get-own-property-symbols"),t=n("../internals/to-object");c({target:"Object",stat:!0,forced:!o||a((function(){r.f(1)}))},{getOwnPropertySymbols:function(e){var l=r.f;return l?l(t(e)):[]}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-get-own-property-symbols":312,"../internals/symbol-constructor-detection":336,"../internals/to-object":344}],366:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/to-object"),a=n("../internals/object-keys");c({target:"Object",stat:!0,forced:n("../internals/fails")((function(){a(1)}))},{keys:function(r){return a(o(r))}})},{"../internals/export":259,"../internals/fails":260,"../internals/object-keys":316,"../internals/to-object":344}],367:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/object-to-array").values;c({target:"Object",stat:!0},{values:function(a){return o(a)}})},{"../internals/export":259,"../internals/object-to-array":319}],368:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/function-call"),a=n("../internals/a-callable"),r=n("../internals/new-promise-capability"),t=n("../internals/perform"),e=n("../internals/iterate");c({target:"Promise",stat:!0,forced:n("../internals/promise-statics-incorrect-iteration")},{all:function(l){var i=this,s=r.f(i),f=s.resolve,h=s.reject,u=t((function(){var p=a(i.resolve),d=[],w=0,S=1;e(l,(function(A){var N=w++,L=!1;S++,o(p,i,A).then((function(I){L||(L=!0,d[N]=I,--S||f(d))}),h)})),--S||f(d)}));return u.error&&h(u.value),s.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],369:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/is-pure"),a=n("../internals/promise-constructor-detection").CONSTRUCTOR,r=n("../internals/promise-native-constructor"),t=n("../internals/get-built-in"),e=n("../internals/is-callable"),l=n("../internals/define-built-in"),i=r&&r.prototype;if(c({target:"Promise",proto:!0,forced:a,real:!0},{catch:function(f){return this.then(void 0,f)}}),!o&&e(r)){var s=t("Promise").prototype.catch;i.catch!==s&&l(i,"catch",s,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325}],370:[function(n,x,_){var c,o,a,r=n("../internals/export"),t=n("../internals/is-pure"),e=n("../internals/engine-is-node"),l=n("../internals/global"),i=n("../internals/function-call"),s=n("../internals/define-built-in"),f=n("../internals/object-set-prototype-of"),h=n("../internals/set-to-string-tag"),u=n("../internals/set-species"),p=n("../internals/a-callable"),d=n("../internals/is-callable"),w=n("../internals/is-object"),S=n("../internals/an-instance"),A=n("../internals/species-constructor"),N=n("../internals/task").set,L=n("../internals/microtask"),I=n("../internals/host-report-errors"),P=n("../internals/perform"),D=n("../internals/queue"),U=n("../internals/internal-state"),B=n("../internals/promise-native-constructor"),k=n("../internals/promise-constructor-detection"),C=n("../internals/new-promise-capability"),v=k.CONSTRUCTOR,m=k.REJECTION_EVENT,b=k.SUBCLASSING,g=U.getterFor("Promise"),y=U.set,E=B&&B.prototype,R=B,O=E,z=l.TypeError,$=l.document,Z=l.process,j=C.f,H=j,T=!!($&&$.createEvent&&l.dispatchEvent),M=function(Q){var st;return!(!w(Q)||!d(st=Q.then))&&st},F=function(Q,st){var it,at,ut,ft=st.value,dt=st.state===1,xt=dt?Q.ok:Q.fail,_t=Q.resolve,gt=Q.reject,Rt=Q.domain;try{xt?(dt||(st.rejection===2&&nt(st),st.rejection=1),xt===!0?it=ft:(Rt&&Rt.enter(),it=xt(ft),Rt&&(Rt.exit(),ut=!0)),it===Q.promise?gt(new z("Promise-chain cycle")):(at=M(it))?i(at,it,_t,gt):_t(it)):gt(ft)}catch(Tt){Rt&&!ut&&Rt.exit(),gt(Tt)}},V=function(Q,st){Q.notified||(Q.notified=!0,L((function(){for(var it,at=Q.reactions;it=at.get();)F(it,Q);Q.notified=!1,st&&!Q.rejection&&q(Q)})))},Y=function(Q,st,it){var at,ut;T?((at=$.createEvent("Event")).promise=st,at.reason=it,at.initEvent(Q,!1,!0),l.dispatchEvent(at)):at={promise:st,reason:it},!m&&(ut=l["on"+Q])?ut(at):Q==="unhandledrejection"&&I("Unhandled promise rejection",it)},q=function(Q){i(N,l,(function(){var st,it=Q.facade,at=Q.value;if(K(Q)&&(st=P((function(){e?Z.emit("unhandledRejection",at,it):Y("unhandledrejection",it,at)})),Q.rejection=e||K(Q)?2:1,st.error))throw st.value}))},K=function(Q){return Q.rejection!==1&&!Q.parent},nt=function(Q){i(N,l,(function(){var st=Q.facade;e?Z.emit("rejectionHandled",st):Y("rejectionhandled",st,Q.value)}))},rt=function(Q,st,it){return function(at){Q(st,at,it)}},G=function(Q,st,it){Q.done||(Q.done=!0,it&&(Q=it),Q.value=st,Q.state=2,V(Q,!0))},tt=function(Q,st,it){if(!Q.done){Q.done=!0,it&&(Q=it);try{if(Q.facade===st)throw new z("Promise can't be resolved itself");var at=M(st);at?L((function(){var ut={done:!1};try{i(at,st,rt(tt,ut,Q),rt(G,ut,Q))}catch(ft){G(ut,ft,Q)}})):(Q.value=st,Q.state=1,V(Q,!1))}catch(ut){G({done:!1},ut,Q)}}};if(v&&(O=(R=function(Q){S(this,O),p(Q),i(c,this);var st=g(this);try{Q(rt(tt,st),rt(G,st))}catch(it){G(st,it)}}).prototype,(c=function(Q){y(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new D,rejection:!1,state:0,value:void 0})}).prototype=s(O,"then",(function(Q,st){var it=g(this),at=j(A(this,R));return it.parent=!0,at.ok=!d(Q)||Q,at.fail=d(st)&&st,at.domain=e?Z.domain:void 0,it.state===0?it.reactions.add(at):L((function(){F(at,it)})),at.promise})),o=function(){var Q=new c,st=g(Q);this.promise=Q,this.resolve=rt(tt,st),this.reject=rt(G,st)},C.f=j=function(Q){return Q===R||Q===void 0?new o(Q):H(Q)},!t&&d(B)&&E!==Object.prototype)){a=E.then,b||s(E,"then",(function(Q,st){var it=this;return new R((function(at,ut){i(a,it,at,ut)})).then(Q,st)}),{unsafe:!0});try{delete E.constructor}catch{}f&&f(E,O)}r({global:!0,constructor:!0,wrap:!0,forced:v},{Promise:R}),h(R,"Promise",!1,!0),u("Promise")},{"../internals/a-callable":222,"../internals/an-instance":226,"../internals/define-built-in":245,"../internals/engine-is-node":254,"../internals/export":259,"../internals/function-call":264,"../internals/global":274,"../internals/host-report-errors":277,"../internals/internal-state":282,"../internals/is-callable":285,"../internals/is-object":289,"../internals/is-pure":290,"../internals/microtask":302,"../internals/new-promise-capability":303,"../internals/object-set-prototype-of":318,"../internals/perform":323,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/queue":328,"../internals/set-species":330,"../internals/set-to-string-tag":331,"../internals/species-constructor":335,"../internals/task":339}],371:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/is-pure"),a=n("../internals/promise-native-constructor"),r=n("../internals/fails"),t=n("../internals/get-built-in"),e=n("../internals/is-callable"),l=n("../internals/species-constructor"),i=n("../internals/promise-resolve"),s=n("../internals/define-built-in"),f=a&&a.prototype;if(c({target:"Promise",proto:!0,real:!0,forced:!!a&&r((function(){f.finally.call({then:function(){}},(function(){}))}))},{finally:function(u){var p=l(this,t("Promise")),d=e(u);return this.then(d?function(w){return i(p,u()).then((function(){return w}))}:u,d?function(w){return i(p,u()).then((function(){throw w}))}:u)}}),!o&&e(a)){var h=t("Promise").prototype.finally;f.finally!==h&&s(f,"finally",h,{unsafe:!0})}},{"../internals/define-built-in":245,"../internals/export":259,"../internals/fails":260,"../internals/get-built-in":269,"../internals/is-callable":285,"../internals/is-pure":290,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326,"../internals/species-constructor":335}],372:[function(n,x,_){n("../modules/es.promise.constructor"),n("../modules/es.promise.all"),n("../modules/es.promise.catch"),n("../modules/es.promise.race"),n("../modules/es.promise.reject"),n("../modules/es.promise.resolve")},{"../modules/es.promise.all":368,"../modules/es.promise.catch":369,"../modules/es.promise.constructor":370,"../modules/es.promise.race":373,"../modules/es.promise.reject":374,"../modules/es.promise.resolve":375}],373:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/function-call"),a=n("../internals/a-callable"),r=n("../internals/new-promise-capability"),t=n("../internals/perform"),e=n("../internals/iterate");c({target:"Promise",stat:!0,forced:n("../internals/promise-statics-incorrect-iteration")},{race:function(l){var i=this,s=r.f(i),f=s.reject,h=t((function(){var u=a(i.resolve);e(l,(function(p){o(u,i,p).then(s.resolve,f)}))}));return h.error&&f(h.value),s.promise}})},{"../internals/a-callable":222,"../internals/export":259,"../internals/function-call":264,"../internals/iterate":293,"../internals/new-promise-capability":303,"../internals/perform":323,"../internals/promise-statics-incorrect-iteration":327}],374:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/function-call"),a=n("../internals/new-promise-capability");c({target:"Promise",stat:!0,forced:n("../internals/promise-constructor-detection").CONSTRUCTOR},{reject:function(r){var t=a.f(this);return o(t.reject,void 0,r),t.promise}})},{"../internals/export":259,"../internals/function-call":264,"../internals/new-promise-capability":303,"../internals/promise-constructor-detection":324}],375:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/get-built-in"),a=n("../internals/is-pure"),r=n("../internals/promise-native-constructor"),t=n("../internals/promise-constructor-detection").CONSTRUCTOR,e=n("../internals/promise-resolve"),l=o("Promise"),i=a&&!t;c({target:"Promise",stat:!0,forced:a||t},{resolve:function(s){return e(i&&this===l?r:this,s)}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/is-pure":290,"../internals/promise-constructor-detection":324,"../internals/promise-native-constructor":325,"../internals/promise-resolve":326}],376:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/function-uncurry-this"),a=n("../internals/to-absolute-index"),r=RangeError,t=String.fromCharCode,e=String.fromCodePoint,l=o([].join);c({target:"String",stat:!0,arity:1,forced:!!e&&e.length!==1},{fromCodePoint:function(i){for(var s,f=[],h=arguments.length,u=0;h>u;){if(s=+arguments[u++],a(s,1114111)!==s)throw new r(s+" is not a valid code point");f[u]=s<65536?t(s):t(55296+((s-=65536)>>10),s%1024+56320)}return l(f,"")}})},{"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/to-absolute-index":340}],377:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/function-uncurry-this"),a=n("../internals/not-a-regexp"),r=n("../internals/require-object-coercible"),t=n("../internals/to-string"),e=n("../internals/correct-is-regexp-logic"),l=o("".indexOf);c({target:"String",proto:!0,forced:!e("includes")},{includes:function(i){return!!~l(t(r(this)),t(a(i)),arguments.length>1?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":238,"../internals/export":259,"../internals/function-uncurry-this":268,"../internals/not-a-regexp":304,"../internals/require-object-coercible":329,"../internals/to-string":348}],378:[function(n,x,_){n("../internals/well-known-symbol-define")("asyncIterator")},{"../internals/well-known-symbol-define":355}],379:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/global"),a=n("../internals/function-call"),r=n("../internals/function-uncurry-this"),t=n("../internals/is-pure"),e=n("../internals/descriptors"),l=n("../internals/symbol-constructor-detection"),i=n("../internals/fails"),s=n("../internals/has-own-property"),f=n("../internals/object-is-prototype-of"),h=n("../internals/an-object"),u=n("../internals/to-indexed-object"),p=n("../internals/to-property-key"),d=n("../internals/to-string"),w=n("../internals/create-property-descriptor"),S=n("../internals/object-create"),A=n("../internals/object-keys"),N=n("../internals/object-get-own-property-names"),L=n("../internals/object-get-own-property-names-external"),I=n("../internals/object-get-own-property-symbols"),P=n("../internals/object-get-own-property-descriptor"),D=n("../internals/object-define-property"),U=n("../internals/object-define-properties"),B=n("../internals/object-property-is-enumerable"),k=n("../internals/define-built-in"),C=n("../internals/define-built-in-accessor"),v=n("../internals/shared"),m=n("../internals/shared-key"),b=n("../internals/hidden-keys"),g=n("../internals/uid"),y=n("../internals/well-known-symbol"),E=n("../internals/well-known-symbol-wrapped"),R=n("../internals/well-known-symbol-define"),O=n("../internals/symbol-define-to-primitive"),z=n("../internals/set-to-string-tag"),$=n("../internals/internal-state"),Z=n("../internals/array-iteration").forEach,j=m("hidden"),H=$.set,T=$.getterFor("Symbol"),M=Object.prototype,F=o.Symbol,V=F&&F.prototype,Y=o.RangeError,q=o.TypeError,K=o.QObject,nt=P.f,rt=D.f,G=L.f,tt=B.f,Q=r([].push),st=v("symbols"),it=v("op-symbols"),at=v("wks"),ut=!K||!K.prototype||!K.prototype.findChild,ft=function(St,mt,kt){var Ct=nt(M,mt);Ct&&delete M[mt],rt(St,mt,kt),Ct&&St!==M&&rt(M,mt,Ct)},dt=e&&i((function(){return S(rt({},"a",{get:function(){return rt(this,"a",{value:7}).a}})).a!==7}))?ft:rt,xt=function(St,mt){var kt=st[St]=S(V);return H(kt,{type:"Symbol",tag:St,description:mt}),e||(kt.description=mt),kt},_t=function(St,mt,kt){St===M&&_t(it,mt,kt),h(St);var Ct=p(mt);return h(kt),s(st,Ct)?(kt.enumerable?(s(St,j)&&St[j][Ct]&&(St[j][Ct]=!1),kt=S(kt,{enumerable:w(0,!1)})):(s(St,j)||rt(St,j,w(1,{})),St[j][Ct]=!0),dt(St,Ct,kt)):rt(St,Ct,kt)},gt=function(St,mt){h(St);var kt=u(mt),Ct=A(kt).concat(jt(kt));return Z(Ct,(function(Et){e&&!a(Rt,kt,Et)||_t(St,Et,kt[Et])})),St},Rt=function(St){var mt=p(St),kt=a(tt,this,mt);return!(this===M&&s(st,mt)&&!s(it,mt))&&(!(kt||!s(this,mt)||!s(st,mt)||s(this,j)&&this[j][mt])||kt)},Tt=function(St,mt){var kt=u(St),Ct=p(mt);if(kt!==M||!s(st,Ct)||s(it,Ct)){var Et=nt(kt,Ct);return!Et||!s(st,Ct)||s(kt,j)&&kt[j][Ct]||(Et.enumerable=!0),Et}},At=function(St){var mt=G(u(St)),kt=[];return Z(mt,(function(Ct){s(st,Ct)||s(b,Ct)||Q(kt,Ct)})),kt},jt=function(St){var mt=St===M,kt=G(mt?it:u(St)),Ct=[];return Z(kt,(function(Et){!s(st,Et)||mt&&!s(M,Et)||Q(Ct,st[Et])})),Ct};l||(k(V=(F=function(){if(f(V,this))throw new q("Symbol is not a constructor");var St=arguments.length&&arguments[0]!==void 0?d(arguments[0]):void 0,mt=g(St),kt=function(Ct){this===M&&a(kt,it,Ct),s(this,j)&&s(this[j],mt)&&(this[j][mt]=!1);var Et=w(1,Ct);try{dt(this,mt,Et)}catch(Zt){if(!(Zt instanceof Y))throw Zt;ft(this,mt,Et)}};return e&&ut&&dt(M,mt,{configurable:!0,set:kt}),xt(mt,St)}).prototype,"toString",(function(){return T(this).tag})),k(F,"withoutSetter",(function(St){return xt(g(St),St)})),B.f=Rt,D.f=_t,U.f=gt,P.f=Tt,N.f=L.f=At,I.f=jt,E.f=function(St){return xt(y(St),St)},e&&(C(V,"description",{configurable:!0,get:function(){return T(this).description}}),t||k(M,"propertyIsEnumerable",Rt,{unsafe:!0}))),c({global:!0,constructor:!0,wrap:!0,forced:!l,sham:!l},{Symbol:F}),Z(A(at),(function(St){R(St)})),c({target:"Symbol",stat:!0,forced:!l},{useSetter:function(){ut=!0},useSimple:function(){ut=!1}}),c({target:"Object",stat:!0,forced:!l,sham:!e},{create:function(St,mt){return mt===void 0?S(St):gt(S(St),mt)},defineProperty:_t,defineProperties:gt,getOwnPropertyDescriptor:Tt}),c({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:At}),O(),z(F,"Symbol"),b[j]=!0},{"../internals/an-object":227,"../internals/array-iteration":229,"../internals/create-property-descriptor":242,"../internals/define-built-in":245,"../internals/define-built-in-accessor":244,"../internals/descriptors":247,"../internals/export":259,"../internals/fails":260,"../internals/function-call":264,"../internals/function-uncurry-this":268,"../internals/global":274,"../internals/has-own-property":275,"../internals/hidden-keys":276,"../internals/internal-state":282,"../internals/is-pure":290,"../internals/object-create":306,"../internals/object-define-properties":307,"../internals/object-define-property":308,"../internals/object-get-own-property-descriptor":309,"../internals/object-get-own-property-names":311,"../internals/object-get-own-property-names-external":310,"../internals/object-get-own-property-symbols":312,"../internals/object-is-prototype-of":314,"../internals/object-keys":316,"../internals/object-property-is-enumerable":317,"../internals/set-to-string-tag":331,"../internals/shared":334,"../internals/shared-key":332,"../internals/symbol-constructor-detection":336,"../internals/symbol-define-to-primitive":337,"../internals/to-indexed-object":341,"../internals/to-property-key":346,"../internals/to-string":348,"../internals/uid":350,"../internals/well-known-symbol":357,"../internals/well-known-symbol-define":355,"../internals/well-known-symbol-wrapped":356}],380:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/get-built-in"),a=n("../internals/has-own-property"),r=n("../internals/to-string"),t=n("../internals/shared"),e=n("../internals/symbol-registry-detection"),l=t("string-to-symbol-registry"),i=t("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!e},{for:function(s){var f=r(s);if(a(l,f))return l[f];var h=o("Symbol")(f);return l[f]=h,i[h]=f,h}})},{"../internals/export":259,"../internals/get-built-in":269,"../internals/has-own-property":275,"../internals/shared":334,"../internals/symbol-registry-detection":338,"../internals/to-string":348}],381:[function(n,x,_){n("../modules/es.symbol.constructor"),n("../modules/es.symbol.for"),n("../modules/es.symbol.key-for"),n("../modules/es.json.stringify"),n("../modules/es.object.get-own-property-symbols")},{"../modules/es.json.stringify":362,"../modules/es.object.get-own-property-symbols":365,"../modules/es.symbol.constructor":379,"../modules/es.symbol.for":380,"../modules/es.symbol.key-for":382}],382:[function(n,x,_){var c=n("../internals/export"),o=n("../internals/has-own-property"),a=n("../internals/is-symbol"),r=n("../internals/try-to-string"),t=n("../internals/shared"),e=n("../internals/symbol-registry-detection"),l=t("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!e},{keyFor:function(i){if(!a(i))throw new TypeError(r(i)+" is not a symbol");if(o(l,i))return l[i]}})},{"../internals/export":259,"../internals/has-own-property":275,"../internals/is-symbol":292,"../internals/shared":334,"../internals/symbol-registry-detection":338,"../internals/try-to-string":349}],383:[function(n,x,_){function c(o){return Object.prototype.toString.call(o)}_.isArray=function(o){return Array.isArray?Array.isArray(o):c(o)==="[object Array]"},_.isBoolean=function(o){return typeof o=="boolean"},_.isNull=function(o){return o===null},_.isNullOrUndefined=function(o){return o==null},_.isNumber=function(o){return typeof o=="number"},_.isString=function(o){return typeof o=="string"},_.isSymbol=function(o){return typeof o=="symbol"},_.isUndefined=function(o){return o===void 0},_.isRegExp=function(o){return c(o)==="[object RegExp]"},_.isObject=function(o){return typeof o=="object"&&o!==null},_.isDate=function(o){return c(o)==="[object Date]"},_.isError=function(o){return c(o)==="[object Error]"||o instanceof Error},_.isFunction=function(o){return typeof o=="function"},_.isPrimitive=function(o){return o===null||typeof o=="boolean"||typeof o=="number"||typeof o=="string"||typeof o=="symbol"||o===void 0},_.isBuffer=n("buffer").Buffer.isBuffer},{buffer:220}],384:[function(n,x,_){(function(c){(function(){var o=n("elliptic"),a=n("bn.js");x.exports=function(l){return new t(l)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function t(l){this.curveType=r[l],this.curveType||(this.curveType={name:l}),this.curve=new o.ec(this.curveType.name),this.keys=void 0}function e(l,i,s){Array.isArray(l)||(l=l.toArray());var f=new c(l);if(s&&f.length<s){var h=new c(s-f.length);h.fill(0),f=c.concat([h,f])}return i?f.toString(i):f}r.p224=r.secp224r1,r.p256=r.secp256r1=r.prime256v1,r.p192=r.secp192r1=r.prime192v1,r.p384=r.secp384r1,r.p521=r.secp521r1,t.prototype.generateKeys=function(l,i){return this.keys=this.curve.genKeyPair(),this.getPublicKey(l,i)},t.prototype.computeSecret=function(l,i,s){return i=i||"utf8",c.isBuffer(l)||(l=new c(l,i)),e(this.curve.keyFromPublic(l).getPublic().mul(this.keys.getPrivate()).getX(),s,this.curveType.byteLength)},t.prototype.getPublicKey=function(l,i){var s=this.keys.getPublic(i==="compressed",!0);return i==="hybrid"&&(s[s.length-1]%2?s[0]=7:s[0]=6),e(s,l)},t.prototype.getPrivateKey=function(l){return e(this.keys.getPrivate(),l)},t.prototype.setPublicKey=function(l,i){return i=i||"utf8",c.isBuffer(l)||(l=new c(l,i)),this.keys._importPublic(l),this},t.prototype.setPrivateKey=function(l,i){i=i||"utf8",c.isBuffer(l)||(l=new c(l,i));var s=new a(l);return s=s.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(s),this}}).call(this)}).call(this,n("buffer").Buffer)},{"bn.js":385,buffer:220,elliptic:405}],385:[function(n,x,_){arguments[4][184][0].apply(_,arguments)},{buffer:188,dup:184}],386:[function(n,x,_){var c=n("inherits"),o=n("md5.js"),a=n("ripemd160"),r=n("sha.js"),t=n("cipher-base");function e(l){t.call(this,"digest"),this._hash=l}c(e,t),e.prototype._update=function(l){this._hash.update(l)},e.prototype._final=function(){return this._hash.digest()},x.exports=function(l){return(l=l.toLowerCase())==="md5"?new o:l==="rmd160"||l==="ripemd160"?new a:new e(r(l))}},{"cipher-base":221,inherits:440,"md5.js":450,ripemd160:493,"sha.js":498}],387:[function(n,x,_){var c=n("md5.js");x.exports=function(o){return new c().update(o).digest()}},{"md5.js":450}],388:[function(n,x,_){var c=n("inherits"),o=n("./legacy"),a=n("cipher-base"),r=n("safe-buffer").Buffer,t=n("create-hash/md5"),e=n("ripemd160"),l=n("sha.js"),i=r.alloc(128);function s(f,h){a.call(this,"digest"),typeof h=="string"&&(h=r.from(h));var u=f==="sha512"||f==="sha384"?128:64;this._alg=f,this._key=h,h.length>u?h=(f==="rmd160"?new e:l(f)).update(h).digest():h.length<u&&(h=r.concat([h,i],u));for(var p=this._ipad=r.allocUnsafe(u),d=this._opad=r.allocUnsafe(u),w=0;w<u;w++)p[w]=54^h[w],d[w]=92^h[w];this._hash=f==="rmd160"?new e:l(f),this._hash.update(p)}c(s,a),s.prototype._update=function(f){this._hash.update(f)},s.prototype._final=function(){var f=this._hash.digest();return(this._alg==="rmd160"?new e:l(this._alg)).update(this._opad).update(f).digest()},x.exports=function(f,h){return(f=f.toLowerCase())==="rmd160"||f==="ripemd160"?new s("rmd160",h):f==="md5"?new o(t,h):new s(f,h)}},{"./legacy":389,"cipher-base":221,"create-hash/md5":387,inherits:440,ripemd160:493,"safe-buffer":494,"sha.js":498}],389:[function(n,x,_){var c=n("inherits"),o=n("safe-buffer").Buffer,a=n("cipher-base"),r=o.alloc(128);function t(e,l){a.call(this,"digest"),typeof l=="string"&&(l=o.from(l)),this._alg=e,this._key=l,l.length>64?l=e(l):l.length<64&&(l=o.concat([l,r],64));for(var i=this._ipad=o.allocUnsafe(64),s=this._opad=o.allocUnsafe(64),f=0;f<64;f++)i[f]=54^l[f],s[f]=92^l[f];this._hash=[i]}c(t,a),t.prototype._update=function(e){this._hash.push(e)},t.prototype._final=function(){var e=this._alg(o.concat(this._hash));return this._alg(o.concat([this._opad,e]))},x.exports=t},{"cipher-base":221,inherits:440,"safe-buffer":494}],390:[function(n,x,_){_.randomBytes=_.rng=_.pseudoRandomBytes=_.prng=n("randombytes"),_.createHash=_.Hash=n("create-hash"),_.createHmac=_.Hmac=n("create-hmac");var c=n("browserify-sign/algos"),o=Object.keys(c),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(o);_.getHashes=function(){return a};var r=n("pbkdf2");_.pbkdf2=r.pbkdf2,_.pbkdf2Sync=r.pbkdf2Sync;var t=n("browserify-cipher");_.Cipher=t.Cipher,_.createCipher=t.createCipher,_.Cipheriv=t.Cipheriv,_.createCipheriv=t.createCipheriv,_.Decipher=t.Decipher,_.createDecipher=t.createDecipher,_.Decipheriv=t.Decipheriv,_.createDecipheriv=t.createDecipheriv,_.getCiphers=t.getCiphers,_.listCiphers=t.listCiphers;var e=n("diffie-hellman");_.DiffieHellmanGroup=e.DiffieHellmanGroup,_.createDiffieHellmanGroup=e.createDiffieHellmanGroup,_.getDiffieHellman=e.getDiffieHellman,_.createDiffieHellman=e.createDiffieHellman,_.DiffieHellman=e.DiffieHellman;var l=n("browserify-sign");_.createSign=l.createSign,_.Sign=l.Sign,_.createVerify=l.createVerify,_.Verify=l.Verify,_.createECDH=n("create-ecdh");var i=n("public-encrypt");_.publicEncrypt=i.publicEncrypt,_.privateEncrypt=i.privateEncrypt,_.publicDecrypt=i.publicDecrypt,_.privateDecrypt=i.privateDecrypt;var s=n("randomfill");_.randomFill=s.randomFill,_.randomFillSync=s.randomFillSync,_.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
9
- `))},_.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":206,"browserify-sign":213,"browserify-sign/algos":210,"create-ecdh":384,"create-hash":386,"create-hmac":388,"diffie-hellman":400,pbkdf2:460,"public-encrypt":468,randombytes:475,randomfill:476}],391:[function(n,x,_){(function(c,o){typeof _=="object"&&x!==void 0?x.exports=o():(c=typeof globalThis<"u"?globalThis:c||self).dayjs=o()})(void 0,(function(){var c=6e4,o=36e5,a="millisecond",r="second",t="minute",e="hour",l="day",i="week",s="month",f="quarter",h="year",u="date",p="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,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,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(m){var b=["th","st","nd","rd"],g=m%100;return"["+m+(b[(g-20)%10]||b[g]||b[0])+"]"}},A=function(m,b,g){var y=String(m);return!y||y.length>=b?m:""+Array(b+1-y.length).join(g)+m},N={s:A,z:function(m){var b=-m.utcOffset(),g=Math.abs(b),y=Math.floor(g/60),E=g%60;return(b<=0?"+":"-")+A(y,2,"0")+":"+A(E,2,"0")},m:function m(b,g){if(b.date()<g.date())return-m(g,b);var y=12*(g.year()-b.year())+(g.month()-b.month()),E=b.clone().add(y,s),R=g-E<0,O=b.clone().add(y+(R?-1:1),s);return+(-(y+(g-E)/(R?E-O:O-E))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:s,y:h,w:i,d:l,D:u,h:e,m:t,s:r,ms:a,Q:f}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return m===void 0}},L="en",I={};I[L]=S;var P="$isDayjsObject",D=function(m){return m instanceof C||!(!m||!m[P])},U=function m(b,g,y){var E;if(!b)return L;if(typeof b=="string"){var R=b.toLowerCase();I[R]&&(E=R),g&&(I[R]=g,E=R);var O=b.split("-");if(!E&&O.length>1)return m(O[0])}else{var z=b.name;I[z]=b,E=z}return!y&&E&&(L=E),E||!y&&L},B=function(m,b){if(D(m))return m.clone();var g=typeof b=="object"?b:{};return g.date=m,g.args=arguments,new C(g)},k=N;k.l=U,k.i=D,k.w=function(m,b){return B(m,{locale:b.$L,utc:b.$u,x:b.$x,$offset:b.$offset})};var C=(function(){function m(g){this.$L=U(g.locale,null,!0),this.parse(g),this.$x=this.$x||g.x||{},this[P]=!0}var b=m.prototype;return b.parse=function(g){this.$d=(function(y){var E=y.date,R=y.utc;if(E===null)return new Date(NaN);if(k.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var O=E.match(d);if(O){var z=O[2]-1||0,$=(O[7]||"0").substring(0,3);return R?new Date(Date.UTC(O[1],z,O[3]||1,O[4]||0,O[5]||0,O[6]||0,$)):new Date(O[1],z,O[3]||1,O[4]||0,O[5]||0,O[6]||0,$)}}return new Date(E)})(g),this.init()},b.init=function(){var g=this.$d;this.$y=g.getFullYear(),this.$M=g.getMonth(),this.$D=g.getDate(),this.$W=g.getDay(),this.$H=g.getHours(),this.$m=g.getMinutes(),this.$s=g.getSeconds(),this.$ms=g.getMilliseconds()},b.$utils=function(){return k},b.isValid=function(){return this.$d.toString()!==p},b.isSame=function(g,y){var E=B(g);return this.startOf(y)<=E&&E<=this.endOf(y)},b.isAfter=function(g,y){return B(g)<this.startOf(y)},b.isBefore=function(g,y){return this.endOf(y)<B(g)},b.$g=function(g,y,E){return k.u(g)?this[y]:this.set(E,g)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(g,y){var E=this,R=!!k.u(y)||y,O=k.p(g),z=function(V,Y){var q=k.w(E.$u?Date.UTC(E.$y,Y,V):new Date(E.$y,Y,V),E);return R?q:q.endOf(l)},$=function(V,Y){return k.w(E.toDate()[V].apply(E.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(Y)),E)},Z=this.$W,j=this.$M,H=this.$D,T="set"+(this.$u?"UTC":"");switch(O){case h:return R?z(1,0):z(31,11);case s:return R?z(1,j):z(0,j+1);case i:var M=this.$locale().weekStart||0,F=(Z<M?Z+7:Z)-M;return z(R?H-F:H+(6-F),j);case l:case u:return $(T+"Hours",0);case e:return $(T+"Minutes",1);case t:return $(T+"Seconds",2);case r:return $(T+"Milliseconds",3);default:return this.clone()}},b.endOf=function(g){return this.startOf(g,!1)},b.$set=function(g,y){var E,R=k.p(g),O="set"+(this.$u?"UTC":""),z=(E={},E[l]=O+"Date",E[u]=O+"Date",E[s]=O+"Month",E[h]=O+"FullYear",E[e]=O+"Hours",E[t]=O+"Minutes",E[r]=O+"Seconds",E[a]=O+"Milliseconds",E)[R],$=R===l?this.$D+(y-this.$W):y;if(R===s||R===h){var Z=this.clone().set(u,1);Z.$d[z]($),Z.init(),this.$d=Z.set(u,Math.min(this.$D,Z.daysInMonth())).$d}else z&&this.$d[z]($);return this.init(),this},b.set=function(g,y){return this.clone().$set(g,y)},b.get=function(g){return this[k.p(g)]()},b.add=function(g,y){var E,R=this;g=Number(g);var O=k.p(y),z=function(j){var H=B(R);return k.w(H.date(H.date()+Math.round(j*g)),R)};if(O===s)return this.set(s,this.$M+g);if(O===h)return this.set(h,this.$y+g);if(O===l)return z(1);if(O===i)return z(7);var $=(E={},E[t]=c,E[e]=o,E[r]=1e3,E)[O]||1,Z=this.$d.getTime()+g*$;return k.w(Z,this)},b.subtract=function(g,y){return this.add(-1*g,y)},b.format=function(g){var y=this,E=this.$locale();if(!this.isValid())return E.invalidDate||p;var R=g||"YYYY-MM-DDTHH:mm:ssZ",O=k.z(this),z=this.$H,$=this.$m,Z=this.$M,j=E.weekdays,H=E.months,T=E.meridiem,M=function(Y,q,K,nt){return Y&&(Y[q]||Y(y,R))||K[q].slice(0,nt)},F=function(Y){return k.s(z%12||12,Y,"0")},V=T||function(Y,q,K){var nt=Y<12?"AM":"PM";return K?nt.toLowerCase():nt};return R.replace(w,(function(Y,q){return q||(function(K){switch(K){case"YY":return String(y.$y).slice(-2);case"YYYY":return k.s(y.$y,4,"0");case"M":return Z+1;case"MM":return k.s(Z+1,2,"0");case"MMM":return M(E.monthsShort,Z,H,3);case"MMMM":return M(H,Z);case"D":return y.$D;case"DD":return k.s(y.$D,2,"0");case"d":return String(y.$W);case"dd":return M(E.weekdaysMin,y.$W,j,2);case"ddd":return M(E.weekdaysShort,y.$W,j,3);case"dddd":return j[y.$W];case"H":return String(z);case"HH":return k.s(z,2,"0");case"h":return F(1);case"hh":return F(2);case"a":return V(z,$,!0);case"A":return V(z,$,!1);case"m":return String($);case"mm":return k.s($,2,"0");case"s":return String(y.$s);case"ss":return k.s(y.$s,2,"0");case"SSS":return k.s(y.$ms,3,"0");case"Z":return O}return null})(Y)||O.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(g,y,E){var R,O=this,z=k.p(y),$=B(g),Z=($.utcOffset()-this.utcOffset())*c,j=this-$,H=function(){return k.m(O,$)};switch(z){case h:R=H()/12;break;case s:R=H();break;case f:R=H()/3;break;case i:R=(j-Z)/6048e5;break;case l:R=(j-Z)/864e5;break;case e:R=j/o;break;case t:R=j/c;break;case r:R=j/1e3;break;default:R=j}return E?R:k.a(R)},b.daysInMonth=function(){return this.endOf(s).$D},b.$locale=function(){return I[this.$L]},b.locale=function(g,y){if(!g)return this.$L;var E=this.clone(),R=U(g,y,!0);return R&&(E.$L=R),E},b.clone=function(){return k.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},m})(),v=C.prototype;return B.prototype=v,[["$ms",a],["$s",r],["$m",t],["$H",e],["$W",l],["$M",s],["$y",h],["$D",u]].forEach((function(m){v[m[1]]=function(b){return this.$g(b,m[0],m[1])}})),B.extend=function(m,b){return m.$i||(m(b,C,B),m.$i=!0),B},B.locale=U,B.isDayjs=D,B.unix=function(m){return B(1e3*m)},B.en=I[L],B.Ls=I,B.p={},B}))},{}],392:[function(n,x,_){(function(c,o){typeof _=="object"&&x!==void 0?x.exports=o():(c=typeof globalThis<"u"?globalThis:c||self).dayjs_plugin_customParseFormat=o()})(void 0,(function(){var c={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d\d/,r=/\d\d?/,t=/\d*[^-_:/,()\s\d]+/,e={},l=function(d){return(d=+d)+(d>68?1900:2e3)},i=function(d){return function(w){this[d]=+w}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(d){(this.zone||(this.zone={})).offset=(function(w){if(!w||w==="Z")return 0;var S=w.match(/([+-]|\d\d)/g),A=60*S[1]+(+S[2]||0);return A===0?0:S[0]==="+"?-A:A})(d)}],f=function(d){var w=e[d];return w&&(w.indexOf?w:w.s.concat(w.f))},h=function(d,w){var S,A=e.meridiem;if(A){for(var N=1;N<=24;N+=1)if(d.indexOf(A(N,0,w))>-1){S=N>12;break}}else S=d===(w?"pm":"PM");return S},u={A:[t,function(d){this.afternoon=h(d,!1)}],a:[t,function(d){this.afternoon=h(d,!0)}],S:[/\d/,function(d){this.milliseconds=100*+d}],SS:[a,function(d){this.milliseconds=10*+d}],SSS:[/\d{3}/,function(d){this.milliseconds=+d}],s:[r,i("seconds")],ss:[r,i("seconds")],m:[r,i("minutes")],mm:[r,i("minutes")],H:[r,i("hours")],h:[r,i("hours")],HH:[r,i("hours")],hh:[r,i("hours")],D:[r,i("day")],DD:[a,i("day")],Do:[t,function(d){var w=e.ordinal,S=d.match(/\d+/);if(this.day=S[0],w)for(var A=1;A<=31;A+=1)w(A).replace(/\[|\]/g,"")===d&&(this.day=A)}],M:[r,i("month")],MM:[a,i("month")],MMM:[t,function(d){var w=f("months"),S=(f("monthsShort")||w.map((function(A){return A.slice(0,3)}))).indexOf(d)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[t,function(d){var w=f("months").indexOf(d)+1;if(w<1)throw new Error;this.month=w%12||w}],Y:[/[+-]?\d+/,i("year")],YY:[a,function(d){this.year=l(d)}],YYYY:[/\d{4}/,i("year")],Z:s,ZZ:s};function p(d){var w,S;w=d,S=e&&e.formats;for(var A=(d=w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(B,k,C){var v=C&&C.toUpperCase();return k||S[C]||c[C]||S[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(m,b,g){return b||g.slice(1)}))}))).match(o),N=A.length,L=0;L<N;L+=1){var I=A[L],P=u[I],D=P&&P[0],U=P&&P[1];A[L]=U?{regex:D,parser:U}:I.replace(/^\[|\]$/g,"")}return function(B){for(var k={},C=0,v=0;C<N;C+=1){var m=A[C];if(typeof m=="string")v+=m.length;else{var b=m.regex,g=m.parser,y=B.slice(v),E=b.exec(y)[0];g.call(k,E),B=B.replace(E,"")}}return(function(R){var O=R.afternoon;if(O!==void 0){var z=R.hours;O?z<12&&(R.hours+=12):z===12&&(R.hours=0),delete R.afternoon}})(k),k}}return function(d,w,S){S.p.customParseFormat=!0,d&&d.parseTwoDigitYear&&(l=d.parseTwoDigitYear);var A=w.prototype,N=A.parse;A.parse=function(L){var I=L.date,P=L.utc,D=L.args;this.$u=P;var U=D[1];if(typeof U=="string"){var B=D[2]===!0,k=D[3]===!0,C=B||k,v=D[2];k&&(v=D[2]),e=this.$locale(),!B&&v&&(e=S.Ls[v]),this.$d=(function(y,E,R){try{if(["x","X"].indexOf(E)>-1)return new Date((E==="X"?1e3:1)*y);var O=p(E)(y),z=O.year,$=O.month,Z=O.day,j=O.hours,H=O.minutes,T=O.seconds,M=O.milliseconds,F=O.zone,V=new Date,Y=Z||(z||$?1:V.getDate()),q=z||V.getFullYear(),K=0;z&&!$||(K=$>0?$-1:V.getMonth());var nt=j||0,rt=H||0,G=T||0,tt=M||0;return F?new Date(Date.UTC(q,K,Y,nt,rt,G,tt+60*F.offset*1e3)):R?new Date(Date.UTC(q,K,Y,nt,rt,G,tt)):new Date(q,K,Y,nt,rt,G,tt)}catch{return new Date("")}})(I,U,P),this.init(),v&&v!==!0&&(this.$L=this.locale(v).$L),C&&I!=this.format(U)&&(this.$d=new Date("")),e={}}else if(U instanceof Array)for(var m=U.length,b=1;b<=m;b+=1){D[1]=U[b-1];var g=S.apply(this,D);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}b===m&&(this.$d=new Date(""))}else N.call(this,L)}}}))},{}],393:[function(n,x,_){(function(c,o){typeof _=="object"&&x!==void 0?x.exports=o():(c=typeof globalThis<"u"?globalThis:c||self).dayjs_plugin_utc=o()})(void 0,(function(){var c="minute",o=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(r,t,e){var l=t.prototype;e.utc=function(d){var w={date:d,utc:!0,args:arguments};return new t(w)},l.utc=function(d){var w=e(this.toDate(),{locale:this.$L,utc:!0});return d?w.add(this.utcOffset(),c):w},l.local=function(){return e(this.toDate(),{locale:this.$L,utc:!1})};var i=l.parse;l.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),i.call(this,d)};var s=l.init;l.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else s.call(this)};var f=l.utcOffset;l.utcOffset=function(d,w){var S=this.$utils().u;if(S(d))return this.$u?0:S(this.$offset)?f.call(this):this.$offset;if(typeof d=="string"&&(d=(function(I){I===void 0&&(I="");var P=I.match(o);if(!P)return null;var D=(""+P[0]).match(a)||["-",0,0],U=D[0],B=60*+D[1]+ +D[2];return B===0?0:U==="+"?B:-B})(d))===null)return this;var A=Math.abs(d)<=16?60*d:d,N=this;if(w)return N.$offset=A,N.$u=d===0,N;if(d!==0){var L=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(N=this.local().add(A+L,c)).$offset=A,N.$x.$localOffset=L}else N=this.utc();return N};var h=l.format;l.format=function(d){var w=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,w)},l.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var u=l.toDate;l.toDate=function(d){return d==="s"&&this.$offset?e(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():u.call(this)};var p=l.diff;l.diff=function(d,w,S){if(d&&this.$u===d.$u)return p.call(this,d,w,S);var A=this.local(),N=e(d).local();return p.call(A,N,w,S)}}}))},{}],394:[function(n,x,_){_.utils=n("./des/utils"),_.Cipher=n("./des/cipher"),_.DES=n("./des/des"),_.CBC=n("./des/cbc"),_.EDE=n("./des/ede")},{"./des/cbc":395,"./des/cipher":396,"./des/des":397,"./des/ede":398,"./des/utils":399}],395:[function(n,x,_){var c=n("minimalistic-assert"),o=n("inherits"),a={};function r(t){c.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}_.instantiate=function(t){function e(f){t.call(this,f),this._cbcInit()}o(e,t);for(var l=Object.keys(a),i=0;i<l.length;i++){var s=l[i];e.prototype[s]=a[s]}return e.create=function(f){return new e(f)},e},a._cbcInit=function(){var t=new r(this.options.iv);this._cbcState=t},a._update=function(t,e,l,i){var s=this._cbcState,f=this.constructor.super_.prototype,h=s.iv;if(this.type==="encrypt"){for(var u=0;u<this.blockSize;u++)h[u]^=t[e+u];for(f._update.call(this,h,0,l,i),u=0;u<this.blockSize;u++)h[u]=l[i+u]}else{for(f._update.call(this,t,e,l,i),u=0;u<this.blockSize;u++)l[i+u]^=h[u];for(u=0;u<this.blockSize;u++)h[u]=t[e+u]}}},{inherits:440,"minimalistic-assert":453}],396:[function(n,x,_){var c=n("minimalistic-assert");function o(a){this.options=a,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=a.padding!==!1}x.exports=o,o.prototype._init=function(){},o.prototype.update=function(a){return a.length===0?[]:this.type==="decrypt"?this._updateDecrypt(a):this._updateEncrypt(a)},o.prototype._buffer=function(a,r){for(var t=Math.min(this.buffer.length-this.bufferOff,a.length-r),e=0;e<t;e++)this.buffer[this.bufferOff+e]=a[r+e];return this.bufferOff+=t,t},o.prototype._flushBuffer=function(a,r){return this._update(this.buffer,0,a,r),this.bufferOff=0,this.blockSize},o.prototype._updateEncrypt=function(a){var r=0,t=0,e=(this.bufferOff+a.length)/this.blockSize|0,l=new Array(e*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(a,r),this.bufferOff===this.buffer.length&&(t+=this._flushBuffer(l,t)));for(var i=a.length-(a.length-r)%this.blockSize;r<i;r+=this.blockSize)this._update(a,r,l,t),t+=this.blockSize;for(;r<a.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=a[r];return l},o.prototype._updateDecrypt=function(a){for(var r=0,t=0,e=Math.ceil((this.bufferOff+a.length)/this.blockSize)-1,l=new Array(e*this.blockSize);e>0;e--)r+=this._buffer(a,r),t+=this._flushBuffer(l,t);return r+=this._buffer(a,r),l},o.prototype.final=function(a){var r,t;return a&&(r=this.update(a)),t=this.type==="encrypt"?this._finalEncrypt():this._finalDecrypt(),r?r.concat(t):t},o.prototype._pad=function(a,r){if(r===0)return!1;for(;r<a.length;)a[r++]=0;return!0},o.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var a=new Array(this.blockSize);return this._update(this.buffer,0,a,0),a},o.prototype._unpad=function(a){return a},o.prototype._finalDecrypt=function(){c.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var a=new Array(this.blockSize);return this._flushBuffer(a,0),this._unpad(a)}},{"minimalistic-assert":453}],397:[function(n,x,_){var c=n("minimalistic-assert"),o=n("inherits"),a=n("./utils"),r=n("./cipher");function t(){this.tmp=new Array(2),this.keys=null}function e(i){r.call(this,i);var s=new t;this._desState=s,this.deriveKeys(s,i.key)}o(e,r),x.exports=e,e.create=function(i){return new e(i)};var l=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];e.prototype.deriveKeys=function(i,s){i.keys=new Array(32),c.equal(s.length,this.blockSize,"Invalid key length");var f=a.readUInt32BE(s,0),h=a.readUInt32BE(s,4);a.pc1(f,h,i.tmp,0),f=i.tmp[0],h=i.tmp[1];for(var u=0;u<i.keys.length;u+=2){var p=l[u>>>1];f=a.r28shl(f,p),h=a.r28shl(h,p),a.pc2(f,h,i.keys,u)}},e.prototype._update=function(i,s,f,h){var u=this._desState,p=a.readUInt32BE(i,s),d=a.readUInt32BE(i,s+4);a.ip(p,d,u.tmp,0),p=u.tmp[0],d=u.tmp[1],this.type==="encrypt"?this._encrypt(u,p,d,u.tmp,0):this._decrypt(u,p,d,u.tmp,0),p=u.tmp[0],d=u.tmp[1],a.writeUInt32BE(f,p,h),a.writeUInt32BE(f,d,h+4)},e.prototype._pad=function(i,s){if(this.padding===!1)return!1;for(var f=i.length-s,h=s;h<i.length;h++)i[h]=f;return!0},e.prototype._unpad=function(i){if(this.padding===!1)return i;for(var s=i[i.length-1],f=i.length-s;f<i.length;f++)c.equal(i[f],s);return i.slice(0,i.length-s)},e.prototype._encrypt=function(i,s,f,h,u){for(var p=s,d=f,w=0;w<i.keys.length;w+=2){var S=i.keys[w],A=i.keys[w+1];a.expand(d,i.tmp,0),S^=i.tmp[0],A^=i.tmp[1];var N=a.substitute(S,A),L=d;d=(p^a.permute(N))>>>0,p=L}a.rip(d,p,h,u)},e.prototype._decrypt=function(i,s,f,h,u){for(var p=f,d=s,w=i.keys.length-2;w>=0;w-=2){var S=i.keys[w],A=i.keys[w+1];a.expand(p,i.tmp,0),S^=i.tmp[0],A^=i.tmp[1];var N=a.substitute(S,A),L=p;p=(d^a.permute(N))>>>0,d=L}a.rip(p,d,h,u)}},{"./cipher":396,"./utils":399,inherits:440,"minimalistic-assert":453}],398:[function(n,x,_){var c=n("minimalistic-assert"),o=n("inherits"),a=n("./cipher"),r=n("./des");function t(l,i){c.equal(i.length,24,"Invalid key length");var s=i.slice(0,8),f=i.slice(8,16),h=i.slice(16,24);this.ciphers=l==="encrypt"?[r.create({type:"encrypt",key:s}),r.create({type:"decrypt",key:f}),r.create({type:"encrypt",key:h})]:[r.create({type:"decrypt",key:h}),r.create({type:"encrypt",key:f}),r.create({type:"decrypt",key:s})]}function e(l){a.call(this,l);var i=new t(this.type,this.options.key);this._edeState=i}o(e,a),x.exports=e,e.create=function(l){return new e(l)},e.prototype._update=function(l,i,s,f){var h=this._edeState;h.ciphers[0]._update(l,i,s,f),h.ciphers[1]._update(s,f,s,f),h.ciphers[2]._update(s,f,s,f)},e.prototype._pad=r.prototype._pad,e.prototype._unpad=r.prototype._unpad},{"./cipher":396,"./des":397,inherits:440,"minimalistic-assert":453}],399:[function(n,x,_){_.readUInt32BE=function(r,t){return(r[0+t]<<24|r[1+t]<<16|r[2+t]<<8|r[3+t])>>>0},_.writeUInt32BE=function(r,t,e){r[0+e]=t>>>24,r[1+e]=t>>>16&255,r[2+e]=t>>>8&255,r[3+e]=255&t},_.ip=function(r,t,e,l){for(var i=0,s=0,f=6;f>=0;f-=2){for(var h=0;h<=24;h+=8)i<<=1,i|=t>>>h+f&1;for(h=0;h<=24;h+=8)i<<=1,i|=r>>>h+f&1}for(f=6;f>=0;f-=2){for(h=1;h<=25;h+=8)s<<=1,s|=t>>>h+f&1;for(h=1;h<=25;h+=8)s<<=1,s|=r>>>h+f&1}e[l+0]=i>>>0,e[l+1]=s>>>0},_.rip=function(r,t,e,l){for(var i=0,s=0,f=0;f<4;f++)for(var h=24;h>=0;h-=8)i<<=1,i|=t>>>h+f&1,i<<=1,i|=r>>>h+f&1;for(f=4;f<8;f++)for(h=24;h>=0;h-=8)s<<=1,s|=t>>>h+f&1,s<<=1,s|=r>>>h+f&1;e[l+0]=i>>>0,e[l+1]=s>>>0},_.pc1=function(r,t,e,l){for(var i=0,s=0,f=7;f>=5;f--){for(var h=0;h<=24;h+=8)i<<=1,i|=t>>h+f&1;for(h=0;h<=24;h+=8)i<<=1,i|=r>>h+f&1}for(h=0;h<=24;h+=8)i<<=1,i|=t>>h+f&1;for(f=1;f<=3;f++){for(h=0;h<=24;h+=8)s<<=1,s|=t>>h+f&1;for(h=0;h<=24;h+=8)s<<=1,s|=r>>h+f&1}for(h=0;h<=24;h+=8)s<<=1,s|=r>>h+f&1;e[l+0]=i>>>0,e[l+1]=s>>>0},_.r28shl=function(r,t){return r<<t&268435455|r>>>28-t};var c=[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];_.pc2=function(r,t,e,l){for(var i=0,s=0,f=c.length>>>1,h=0;h<f;h++)i<<=1,i|=r>>>c[h]&1;for(h=f;h<c.length;h++)s<<=1,s|=t>>>c[h]&1;e[l+0]=i>>>0,e[l+1]=s>>>0},_.expand=function(r,t,e){var l=0,i=0;l=(1&r)<<5|r>>>27;for(var s=23;s>=15;s-=4)l<<=6,l|=r>>>s&63;for(s=11;s>=3;s-=4)i|=r>>>s&63,i<<=6;i|=(31&r)<<1|r>>>31,t[e+0]=l>>>0,t[e+1]=i>>>0};var o=[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];_.substitute=function(r,t){for(var e=0,l=0;l<4;l++)e<<=4,e|=o[64*l+(r>>>18-6*l&63)];for(l=0;l<4;l++)e<<=4,e|=o[256+64*l+(t>>>18-6*l&63)];return e>>>0};var a=[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];_.permute=function(r){for(var t=0,e=0;e<a.length;e++)t<<=1,t|=r>>>a[e]&1;return t>>>0},_.padSplit=function(r,t,e){for(var l=r.toString(2);l.length<t;)l="0"+l;for(var i=[],s=0;s<t;s+=e)i.push(l.slice(s,s+e));return i.join(" ")}},{}],400:[function(n,x,_){(function(c){(function(){var o=n("./lib/generatePrime"),a=n("./lib/primes.json"),r=n("./lib/dh"),t={binary:!0,hex:!0,base64:!0};_.DiffieHellmanGroup=_.createDiffieHellmanGroup=_.getDiffieHellman=function(e){var l=new c(a[e].prime,"hex"),i=new c(a[e].gen,"hex");return new r(l,i)},_.createDiffieHellman=_.DiffieHellman=function e(l,i,s,f){return c.isBuffer(i)||t[i]===void 0?e(l,"binary",i,s):(i=i||"binary",f=f||"binary",s=s||new c([2]),c.isBuffer(s)||(s=new c(s,f)),typeof l=="number"?new r(o(l,s),s,!0):(c.isBuffer(l)||(l=new c(l,i)),new r(l,s,!0)))}}).call(this)}).call(this,n("buffer").Buffer)},{"./lib/dh":401,"./lib/generatePrime":402,"./lib/primes.json":403,buffer:220}],401:[function(n,x,_){(function(c){(function(){var o=n("bn.js"),a=new(n("miller-rabin")),r=new o(24),t=new o(11),e=new o(10),l=new o(3),i=new o(7),s=n("./generatePrime"),f=n("randombytes");function h(S,A){return A=A||"utf8",c.isBuffer(S)||(S=new c(S,A)),this._pub=new o(S),this}function u(S,A){return A=A||"utf8",c.isBuffer(S)||(S=new c(S,A)),this._priv=new o(S),this}x.exports=d;var p={};function d(S,A,N){this.setGenerator(A),this.__prime=new o(S),this._prime=o.mont(this.__prime),this._primeLen=S.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,N?(this.setPublicKey=h,this.setPrivateKey=u):this._primeCode=8}function w(S,A){var N=new c(S.toArray());return A?N.toString(A):N}Object.defineProperty(d.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=(function(S,A){var N=A.toString("hex"),L=[N,S.toString(16)].join("_");if(L in p)return p[L];var I,P=0;if(S.isEven()||!s.simpleSieve||!s.fermatTest(S)||!a.test(S))return P+=1,P+=N==="02"||N==="05"?8:4,p[L]=P,P;switch(a.test(S.shrn(1))||(P+=2),N){case"02":S.mod(r).cmp(t)&&(P+=8);break;case"05":(I=S.mod(e)).cmp(l)&&I.cmp(i)&&(P+=8);break;default:P+=4}return p[L]=P,P})(this.__prime,this.__gen)),this._primeCode}}),d.prototype.generateKeys=function(){return this._priv||(this._priv=new o(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},d.prototype.computeSecret=function(S){var A=(S=(S=new o(S)).toRed(this._prime)).redPow(this._priv).fromRed(),N=new c(A.toArray()),L=this.getPrime();if(N.length<L.length){var I=new c(L.length-N.length);I.fill(0),N=c.concat([I,N])}return N},d.prototype.getPublicKey=function(S){return w(this._pub,S)},d.prototype.getPrivateKey=function(S){return w(this._priv,S)},d.prototype.getPrime=function(S){return w(this.__prime,S)},d.prototype.getGenerator=function(S){return w(this._gen,S)},d.prototype.setGenerator=function(S,A){return A=A||"utf8",c.isBuffer(S)||(S=new c(S,A)),this.__gen=S,this._gen=new o(S),this}}).call(this)}).call(this,n("buffer").Buffer)},{"./generatePrime":402,"bn.js":404,buffer:220,"miller-rabin":451,randombytes:475}],402:[function(n,x,_){var c=n("randombytes");x.exports=S,S.simpleSieve=d,S.fermatTest=w;var o=n("bn.js"),a=new o(24),r=new(n("miller-rabin")),t=new o(1),e=new o(2),l=new o(5),i=(new o(16),new o(8),new o(10)),s=new o(3),f=(new o(7),new o(11)),h=new o(4),u=(new o(12),null);function p(){if(u!==null)return u;var A=[];A[0]=2;for(var N=1,L=3;L<1048576;L+=2){for(var I=Math.ceil(Math.sqrt(L)),P=0;P<N&&A[P]<=I&&L%A[P]!=0;P++);N!==P&&A[P]<=I||(A[N++]=L)}return u=A,A}function d(A){for(var N=p(),L=0;L<N.length;L++)if(A.modn(N[L])===0)return A.cmpn(N[L])===0;return!0}function w(A){var N=o.mont(A);return e.toRed(N).redPow(A.subn(1)).fromRed().cmpn(1)===0}function S(A,N){if(A<16)return new o(N===2||N===5?[140,123]:[140,39]);var L,I;for(N=new o(N);;){for(L=new o(c(Math.ceil(A/8)));L.bitLength()>A;)L.ishrn(1);if(L.isEven()&&L.iadd(t),L.testn(1)||L.iadd(e),N.cmp(e)){if(!N.cmp(l))for(;L.mod(i).cmp(s);)L.iadd(h)}else for(;L.mod(a).cmp(f);)L.iadd(h);if(d(I=L.shrn(1))&&d(L)&&w(I)&&w(L)&&r.test(I)&&r.test(L))return L}}},{"bn.js":404,"miller-rabin":451,randombytes:475}],403:[function(n,x,_){x.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"}}},{}],404:[function(n,x,_){arguments[4][184][0].apply(_,arguments)},{buffer:188,dup:184}],405:[function(n,x,_){var c=_;c.version=n("../package.json").version,c.utils=n("./elliptic/utils"),c.rand=n("brorand"),c.curve=n("./elliptic/curve"),c.curves=n("./elliptic/curves"),c.ec=n("./elliptic/ec"),c.eddsa=n("./elliptic/eddsa")},{"../package.json":421,"./elliptic/curve":408,"./elliptic/curves":411,"./elliptic/ec":412,"./elliptic/eddsa":415,"./elliptic/utils":419,brorand:187}],406:[function(n,x,_){var c=n("bn.js"),o=n("../utils"),a=o.getNAF,r=o.getJSF,t=o.assert;function e(i,s){this.type=i,this.p=new c(s.p,16),this.red=s.prime?c.red(s.prime):c.mont(this.p),this.zero=new c(0).toRed(this.red),this.one=new c(1).toRed(this.red),this.two=new c(2).toRed(this.red),this.n=s.n&&new c(s.n,16),this.g=s.g&&this.pointFromJSON(s.g,s.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 f=this.n&&this.p.div(this.n);!f||f.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function l(i,s){this.curve=i,this.type=s,this.precomputed=null}x.exports=e,e.prototype.point=function(){throw new Error("Not implemented")},e.prototype.validate=function(){throw new Error("Not implemented")},e.prototype._fixedNafMul=function(i,s){t(i.precomputed);var f=i._getDoubles(),h=a(s,1,this._bitLength),u=(1<<f.step+1)-(f.step%2==0?2:1);u/=3;var p,d,w=[];for(p=0;p<h.length;p+=f.step){d=0;for(var S=p+f.step-1;S>=p;S--)d=(d<<1)+h[S];w.push(d)}for(var A=this.jpoint(null,null,null),N=this.jpoint(null,null,null),L=u;L>0;L--){for(p=0;p<w.length;p++)(d=w[p])===L?N=N.mixedAdd(f.points[p]):d===-L&&(N=N.mixedAdd(f.points[p].neg()));A=A.add(N)}return A.toP()},e.prototype._wnafMul=function(i,s){var f=4,h=i._getNAFPoints(f);f=h.wnd;for(var u=h.points,p=a(s,f,this._bitLength),d=this.jpoint(null,null,null),w=p.length-1;w>=0;w--){for(var S=0;w>=0&&p[w]===0;w--)S++;if(w>=0&&S++,d=d.dblp(S),w<0)break;var A=p[w];t(A!==0),d=i.type==="affine"?A>0?d.mixedAdd(u[A-1>>1]):d.mixedAdd(u[-A-1>>1].neg()):A>0?d.add(u[A-1>>1]):d.add(u[-A-1>>1].neg())}return i.type==="affine"?d.toP():d},e.prototype._wnafMulAdd=function(i,s,f,h,u){var p,d,w,S=this._wnafT1,A=this._wnafT2,N=this._wnafT3,L=0;for(p=0;p<h;p++){var I=(w=s[p])._getNAFPoints(i);S[p]=I.wnd,A[p]=I.points}for(p=h-1;p>=1;p-=2){var P=p-1,D=p;if(S[P]===1&&S[D]===1){var U=[s[P],null,null,s[D]];s[P].y.cmp(s[D].y)===0?(U[1]=s[P].add(s[D]),U[2]=s[P].toJ().mixedAdd(s[D].neg())):s[P].y.cmp(s[D].y.redNeg())===0?(U[1]=s[P].toJ().mixedAdd(s[D]),U[2]=s[P].add(s[D].neg())):(U[1]=s[P].toJ().mixedAdd(s[D]),U[2]=s[P].toJ().mixedAdd(s[D].neg()));var B=[-3,-1,-5,-7,0,7,5,1,3],k=r(f[P],f[D]);for(L=Math.max(k[0].length,L),N[P]=new Array(L),N[D]=new Array(L),d=0;d<L;d++){var C=0|k[0][d],v=0|k[1][d];N[P][d]=B[3*(C+1)+(v+1)],N[D][d]=0,A[P]=U}}else N[P]=a(f[P],S[P],this._bitLength),N[D]=a(f[D],S[D],this._bitLength),L=Math.max(N[P].length,L),L=Math.max(N[D].length,L)}var m=this.jpoint(null,null,null),b=this._wnafT4;for(p=L;p>=0;p--){for(var g=0;p>=0;){var y=!0;for(d=0;d<h;d++)b[d]=0|N[d][p],b[d]!==0&&(y=!1);if(!y)break;g++,p--}if(p>=0&&g++,m=m.dblp(g),p<0)break;for(d=0;d<h;d++){var E=b[d];E!==0&&(E>0?w=A[d][E-1>>1]:E<0&&(w=A[d][-E-1>>1].neg()),m=w.type==="affine"?m.mixedAdd(w):m.add(w))}}for(p=0;p<h;p++)A[p]=null;return u?m:m.toP()},e.BasePoint=l,l.prototype.eq=function(){throw new Error("Not implemented")},l.prototype.validate=function(){return this.curve.validate(this)},e.prototype.decodePoint=function(i,s){i=o.toArray(i,s);var f=this.p.byteLength();if((i[0]===4||i[0]===6||i[0]===7)&&i.length-1==2*f)return i[0]===6?t(i[i.length-1]%2==0):i[0]===7&&t(i[i.length-1]%2==1),this.point(i.slice(1,1+f),i.slice(1+f,1+2*f));if((i[0]===2||i[0]===3)&&i.length-1===f)return this.pointFromX(i.slice(1,1+f),i[0]===3);throw new Error("Unknown point format")},l.prototype.encodeCompressed=function(i){return this.encode(i,!0)},l.prototype._encode=function(i){var s=this.curve.p.byteLength(),f=this.getX().toArray("be",s);return i?[this.getY().isEven()?2:3].concat(f):[4].concat(f,this.getY().toArray("be",s))},l.prototype.encode=function(i,s){return o.encode(this._encode(s),i)},l.prototype.precompute=function(i){if(this.precomputed)return this;var s={doubles:null,naf:null,beta:null};return s.naf=this._getNAFPoints(8),s.doubles=this._getDoubles(4,i),s.beta=this._getBeta(),this.precomputed=s,this},l.prototype._hasDoubles=function(i){if(!this.precomputed)return!1;var s=this.precomputed.doubles;return!!s&&s.points.length>=Math.ceil((i.bitLength()+1)/s.step)},l.prototype._getDoubles=function(i,s){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var f=[this],h=this,u=0;u<s;u+=i){for(var p=0;p<i;p++)h=h.dbl();f.push(h)}return{step:i,points:f}},l.prototype._getNAFPoints=function(i){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var s=[this],f=(1<<i)-1,h=f===1?null:this.dbl(),u=1;u<f;u++)s[u]=s[u-1].add(h);return{wnd:i,points:s}},l.prototype._getBeta=function(){return null},l.prototype.dblp=function(i){for(var s=this,f=0;f<i;f++)s=s.dbl();return s}},{"../utils":419,"bn.js":420}],407:[function(n,x,_){var c=n("../utils"),o=n("bn.js"),a=n("inherits"),r=n("./base"),t=c.assert;function e(i){this.twisted=(0|i.a)!=1,this.mOneA=this.twisted&&(0|i.a)==-1,this.extended=this.mOneA,r.call(this,"edwards",i),this.a=new o(i.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(i.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(i.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),t(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(0|i.c)==1}function l(i,s,f,h,u){r.BasePoint.call(this,i,"projective"),s===null&&f===null&&h===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(s,16),this.y=new o(f,16),this.z=h?new o(h,16):this.curve.one,this.t=u&&new o(u,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.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}a(e,r),x.exports=e,e.prototype._mulA=function(i){return this.mOneA?i.redNeg():this.a.redMul(i)},e.prototype._mulC=function(i){return this.oneC?i:this.c.redMul(i)},e.prototype.jpoint=function(i,s,f,h){return this.point(i,s,f,h)},e.prototype.pointFromX=function(i,s){(i=new o(i,16)).red||(i=i.toRed(this.red));var f=i.redSqr(),h=this.c2.redSub(this.a.redMul(f)),u=this.one.redSub(this.c2.redMul(this.d).redMul(f)),p=h.redMul(u.redInvm()),d=p.redSqrt();if(d.redSqr().redSub(p).cmp(this.zero)!==0)throw new Error("invalid point");var w=d.fromRed().isOdd();return(s&&!w||!s&&w)&&(d=d.redNeg()),this.point(i,d)},e.prototype.pointFromY=function(i,s){(i=new o(i,16)).red||(i=i.toRed(this.red));var f=i.redSqr(),h=f.redSub(this.c2),u=f.redMul(this.d).redMul(this.c2).redSub(this.a),p=h.redMul(u.redInvm());if(p.cmp(this.zero)===0){if(s)throw new Error("invalid point");return this.point(this.zero,i)}var d=p.redSqrt();if(d.redSqr().redSub(p).cmp(this.zero)!==0)throw new Error("invalid point");return d.fromRed().isOdd()!==s&&(d=d.redNeg()),this.point(d,i)},e.prototype.validate=function(i){if(i.isInfinity())return!0;i.normalize();var s=i.x.redSqr(),f=i.y.redSqr(),h=s.redMul(this.a).redAdd(f),u=this.c2.redMul(this.one.redAdd(this.d.redMul(s).redMul(f)));return h.cmp(u)===0},a(l,r.BasePoint),e.prototype.pointFromJSON=function(i){return l.fromJSON(this,i)},e.prototype.point=function(i,s,f,h){return new l(this,i,s,f,h)},l.fromJSON=function(i,s){return new l(i,s[0],s[1],s[2])},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},l.prototype._extDbl=function(){var i=this.x.redSqr(),s=this.y.redSqr(),f=this.z.redSqr();f=f.redIAdd(f);var h=this.curve._mulA(i),u=this.x.redAdd(this.y).redSqr().redISub(i).redISub(s),p=h.redAdd(s),d=p.redSub(f),w=h.redSub(s),S=u.redMul(d),A=p.redMul(w),N=u.redMul(w),L=d.redMul(p);return this.curve.point(S,A,L,N)},l.prototype._projDbl=function(){var i,s,f,h,u,p,d=this.x.redAdd(this.y).redSqr(),w=this.x.redSqr(),S=this.y.redSqr();if(this.curve.twisted){var A=(h=this.curve._mulA(w)).redAdd(S);this.zOne?(i=d.redSub(w).redSub(S).redMul(A.redSub(this.curve.two)),s=A.redMul(h.redSub(S)),f=A.redSqr().redSub(A).redSub(A)):(u=this.z.redSqr(),p=A.redSub(u).redISub(u),i=d.redSub(w).redISub(S).redMul(p),s=A.redMul(h.redSub(S)),f=A.redMul(p))}else h=w.redAdd(S),u=this.curve._mulC(this.z).redSqr(),p=h.redSub(u).redSub(u),i=this.curve._mulC(d.redISub(h)).redMul(p),s=this.curve._mulC(h).redMul(w.redISub(S)),f=h.redMul(p);return this.curve.point(i,s,f)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},l.prototype._extAdd=function(i){var s=this.y.redSub(this.x).redMul(i.y.redSub(i.x)),f=this.y.redAdd(this.x).redMul(i.y.redAdd(i.x)),h=this.t.redMul(this.curve.dd).redMul(i.t),u=this.z.redMul(i.z.redAdd(i.z)),p=f.redSub(s),d=u.redSub(h),w=u.redAdd(h),S=f.redAdd(s),A=p.redMul(d),N=w.redMul(S),L=p.redMul(S),I=d.redMul(w);return this.curve.point(A,N,I,L)},l.prototype._projAdd=function(i){var s,f,h=this.z.redMul(i.z),u=h.redSqr(),p=this.x.redMul(i.x),d=this.y.redMul(i.y),w=this.curve.d.redMul(p).redMul(d),S=u.redSub(w),A=u.redAdd(w),N=this.x.redAdd(this.y).redMul(i.x.redAdd(i.y)).redISub(p).redISub(d),L=h.redMul(S).redMul(N);return this.curve.twisted?(s=h.redMul(A).redMul(d.redSub(this.curve._mulA(p))),f=S.redMul(A)):(s=h.redMul(A).redMul(d.redSub(p)),f=this.curve._mulC(S).redMul(A)),this.curve.point(L,s,f)},l.prototype.add=function(i){return this.isInfinity()?i:i.isInfinity()?this:this.curve.extended?this._extAdd(i):this._projAdd(i)},l.prototype.mul=function(i){return this._hasDoubles(i)?this.curve._fixedNafMul(this,i):this.curve._wnafMul(this,i)},l.prototype.mulAdd=function(i,s,f){return this.curve._wnafMulAdd(1,[this,s],[i,f],2,!1)},l.prototype.jmulAdd=function(i,s,f){return this.curve._wnafMulAdd(1,[this,s],[i,f],2,!0)},l.prototype.normalize=function(){if(this.zOne)return this;var i=this.z.redInvm();return this.x=this.x.redMul(i),this.y=this.y.redMul(i),this.t&&(this.t=this.t.redMul(i)),this.z=this.curve.one,this.zOne=!0,this},l.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()},l.prototype.getY=function(){return this.normalize(),this.y.fromRed()},l.prototype.eq=function(i){return this===i||this.getX().cmp(i.getX())===0&&this.getY().cmp(i.getY())===0},l.prototype.eqXToP=function(i){var s=i.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(s)===0)return!0;for(var f=i.clone(),h=this.curve.redN.redMul(this.z);;){if(f.iadd(this.curve.n),f.cmp(this.curve.p)>=0)return!1;if(s.redIAdd(h),this.x.cmp(s)===0)return!0}},l.prototype.toP=l.prototype.normalize,l.prototype.mixedAdd=l.prototype.add},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],408:[function(n,x,_){var c=_;c.base=n("./base"),c.short=n("./short"),c.mont=n("./mont"),c.edwards=n("./edwards")},{"./base":406,"./edwards":407,"./mont":409,"./short":410}],409:[function(n,x,_){var c=n("bn.js"),o=n("inherits"),a=n("./base"),r=n("../utils");function t(l){a.call(this,"mont",l),this.a=new c(l.a,16).toRed(this.red),this.b=new c(l.b,16).toRed(this.red),this.i4=new c(4).toRed(this.red).redInvm(),this.two=new c(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function e(l,i,s){a.BasePoint.call(this,l,"projective"),i===null&&s===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new c(i,16),this.z=new c(s,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(t,a),x.exports=t,t.prototype.validate=function(l){var i=l.normalize().x,s=i.redSqr(),f=s.redMul(i).redAdd(s.redMul(this.a)).redAdd(i);return f.redSqrt().redSqr().cmp(f)===0},o(e,a.BasePoint),t.prototype.decodePoint=function(l,i){return this.point(r.toArray(l,i),1)},t.prototype.point=function(l,i){return new e(this,l,i)},t.prototype.pointFromJSON=function(l){return e.fromJSON(this,l)},e.prototype.precompute=function(){},e.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},e.fromJSON=function(l,i){return new e(l,i[0],i[1]||l.one)},e.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},e.prototype.isInfinity=function(){return this.z.cmpn(0)===0},e.prototype.dbl=function(){var l=this.x.redAdd(this.z).redSqr(),i=this.x.redSub(this.z).redSqr(),s=l.redSub(i),f=l.redMul(i),h=s.redMul(i.redAdd(this.curve.a24.redMul(s)));return this.curve.point(f,h)},e.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},e.prototype.diffAdd=function(l,i){var s=this.x.redAdd(this.z),f=this.x.redSub(this.z),h=l.x.redAdd(l.z),u=l.x.redSub(l.z).redMul(s),p=h.redMul(f),d=i.z.redMul(u.redAdd(p).redSqr()),w=i.x.redMul(u.redISub(p).redSqr());return this.curve.point(d,w)},e.prototype.mul=function(l){for(var i=l.clone(),s=this,f=this.curve.point(null,null),h=[];i.cmpn(0)!==0;i.iushrn(1))h.push(i.andln(1));for(var u=h.length-1;u>=0;u--)h[u]===0?(s=s.diffAdd(f,this),f=f.dbl()):(f=s.diffAdd(f,this),s=s.dbl());return f},e.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},e.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},e.prototype.eq=function(l){return this.getX().cmp(l.getX())===0},e.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},e.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],410:[function(n,x,_){var c=n("../utils"),o=n("bn.js"),a=n("inherits"),r=n("./base"),t=c.assert;function e(s){r.call(this,"short",s),this.a=new o(s.a,16).toRed(this.red),this.b=new o(s.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(s),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(s,f,h,u){r.BasePoint.call(this,s,"affine"),f===null&&h===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(f,16),this.y=new o(h,16),u&&(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 i(s,f,h,u){r.BasePoint.call(this,s,"jacobian"),f===null&&h===null&&u===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(f,16),this.y=new o(h,16),this.z=new o(u,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}a(e,r),x.exports=e,e.prototype._getEndomorphism=function(s){if(this.zeroA&&this.g&&this.n&&this.p.modn(3)===1){var f,h;if(s.beta)f=new o(s.beta,16).toRed(this.red);else{var u=this._getEndoRoots(this.p);f=(f=u[0].cmp(u[1])<0?u[0]:u[1]).toRed(this.red)}if(s.lambda)h=new o(s.lambda,16);else{var p=this._getEndoRoots(this.n);this.g.mul(p[0]).x.cmp(this.g.x.redMul(f))===0?h=p[0]:(h=p[1],t(this.g.mul(h).x.cmp(this.g.x.redMul(f))===0))}return{beta:f,lambda:h,basis:s.basis?s.basis.map((function(d){return{a:new o(d.a,16),b:new o(d.b,16)}})):this._getEndoBasis(h)}}},e.prototype._getEndoRoots=function(s){var f=s===this.p?this.red:o.mont(s),h=new o(2).toRed(f).redInvm(),u=h.redNeg(),p=new o(3).toRed(f).redNeg().redSqrt().redMul(h);return[u.redAdd(p).fromRed(),u.redSub(p).fromRed()]},e.prototype._getEndoBasis=function(s){for(var f,h,u,p,d,w,S,A,N,L=this.n.ushrn(Math.floor(this.n.bitLength()/2)),I=s,P=this.n.clone(),D=new o(1),U=new o(0),B=new o(0),k=new o(1),C=0;I.cmpn(0)!==0;){var v=P.div(I);A=P.sub(v.mul(I)),N=B.sub(v.mul(D));var m=k.sub(v.mul(U));if(!u&&A.cmp(L)<0)f=S.neg(),h=D,u=A.neg(),p=N;else if(u&&++C==2)break;S=A,P=I,I=A,B=D,D=N,k=U,U=m}d=A.neg(),w=N;var b=u.sqr().add(p.sqr());return d.sqr().add(w.sqr()).cmp(b)>=0&&(d=f,w=h),u.negative&&(u=u.neg(),p=p.neg()),d.negative&&(d=d.neg(),w=w.neg()),[{a:u,b:p},{a:d,b:w}]},e.prototype._endoSplit=function(s){var f=this.endo.basis,h=f[0],u=f[1],p=u.b.mul(s).divRound(this.n),d=h.b.neg().mul(s).divRound(this.n),w=p.mul(h.a),S=d.mul(u.a),A=p.mul(h.b),N=d.mul(u.b);return{k1:s.sub(w).sub(S),k2:A.add(N).neg()}},e.prototype.pointFromX=function(s,f){(s=new o(s,16)).red||(s=s.toRed(this.red));var h=s.redSqr().redMul(s).redIAdd(s.redMul(this.a)).redIAdd(this.b),u=h.redSqrt();if(u.redSqr().redSub(h).cmp(this.zero)!==0)throw new Error("invalid point");var p=u.fromRed().isOdd();return(f&&!p||!f&&p)&&(u=u.redNeg()),this.point(s,u)},e.prototype.validate=function(s){if(s.inf)return!0;var f=s.x,h=s.y,u=this.a.redMul(f),p=f.redSqr().redMul(f).redIAdd(u).redIAdd(this.b);return h.redSqr().redISub(p).cmpn(0)===0},e.prototype._endoWnafMulAdd=function(s,f,h){for(var u=this._endoWnafT1,p=this._endoWnafT2,d=0;d<s.length;d++){var w=this._endoSplit(f[d]),S=s[d],A=S._getBeta();w.k1.negative&&(w.k1.ineg(),S=S.neg(!0)),w.k2.negative&&(w.k2.ineg(),A=A.neg(!0)),u[2*d]=S,u[2*d+1]=A,p[2*d]=w.k1,p[2*d+1]=w.k2}for(var N=this._wnafMulAdd(1,u,p,2*d,h),L=0;L<2*d;L++)u[L]=null,p[L]=null;return N},a(l,r.BasePoint),e.prototype.point=function(s,f,h){return new l(this,s,f,h)},e.prototype.pointFromJSON=function(s,f){return l.fromJSON(this,s,f)},l.prototype._getBeta=function(){if(this.curve.endo){var s=this.precomputed;if(s&&s.beta)return s.beta;var f=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(s){var h=this.curve,u=function(p){return h.point(p.x.redMul(h.endo.beta),p.y)};s.beta=f,f.precomputed={beta:null,naf:s.naf&&{wnd:s.naf.wnd,points:s.naf.points.map(u)},doubles:s.doubles&&{step:s.doubles.step,points:s.doubles.points.map(u)}}}return f}},l.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},l.fromJSON=function(s,f,h){typeof f=="string"&&(f=JSON.parse(f));var u=s.point(f[0],f[1],h);if(!f[2])return u;function p(w){return s.point(w[0],w[1],h)}var d=f[2];return u.precomputed={beta:null,doubles:d.doubles&&{step:d.doubles.step,points:[u].concat(d.doubles.points.map(p))},naf:d.naf&&{wnd:d.naf.wnd,points:[u].concat(d.naf.points.map(p))}},u},l.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(s){if(this.inf)return s;if(s.inf)return this;if(this.eq(s))return this.dbl();if(this.neg().eq(s))return this.curve.point(null,null);if(this.x.cmp(s.x)===0)return this.curve.point(null,null);var f=this.y.redSub(s.y);f.cmpn(0)!==0&&(f=f.redMul(this.x.redSub(s.x).redInvm()));var h=f.redSqr().redISub(this.x).redISub(s.x),u=f.redMul(this.x.redSub(h)).redISub(this.y);return this.curve.point(h,u)},l.prototype.dbl=function(){if(this.inf)return this;var s=this.y.redAdd(this.y);if(s.cmpn(0)===0)return this.curve.point(null,null);var f=this.curve.a,h=this.x.redSqr(),u=s.redInvm(),p=h.redAdd(h).redIAdd(h).redIAdd(f).redMul(u),d=p.redSqr().redISub(this.x.redAdd(this.x)),w=p.redMul(this.x.redSub(d)).redISub(this.y);return this.curve.point(d,w)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(s){return s=new o(s,16),this.isInfinity()?this:this._hasDoubles(s)?this.curve._fixedNafMul(this,s):this.curve.endo?this.curve._endoWnafMulAdd([this],[s]):this.curve._wnafMul(this,s)},l.prototype.mulAdd=function(s,f,h){var u=[this,f],p=[s,h];return this.curve.endo?this.curve._endoWnafMulAdd(u,p):this.curve._wnafMulAdd(1,u,p,2)},l.prototype.jmulAdd=function(s,f,h){var u=[this,f],p=[s,h];return this.curve.endo?this.curve._endoWnafMulAdd(u,p,!0):this.curve._wnafMulAdd(1,u,p,2,!0)},l.prototype.eq=function(s){return this===s||this.inf===s.inf&&(this.inf||this.x.cmp(s.x)===0&&this.y.cmp(s.y)===0)},l.prototype.neg=function(s){if(this.inf)return this;var f=this.curve.point(this.x,this.y.redNeg());if(s&&this.precomputed){var h=this.precomputed,u=function(p){return p.neg()};f.precomputed={naf:h.naf&&{wnd:h.naf.wnd,points:h.naf.points.map(u)},doubles:h.doubles&&{step:h.doubles.step,points:h.doubles.points.map(u)}}}return f},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},a(i,r.BasePoint),e.prototype.jpoint=function(s,f,h){return new i(this,s,f,h)},i.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var s=this.z.redInvm(),f=s.redSqr(),h=this.x.redMul(f),u=this.y.redMul(f).redMul(s);return this.curve.point(h,u)},i.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},i.prototype.add=function(s){if(this.isInfinity())return s;if(s.isInfinity())return this;var f=s.z.redSqr(),h=this.z.redSqr(),u=this.x.redMul(f),p=s.x.redMul(h),d=this.y.redMul(f.redMul(s.z)),w=s.y.redMul(h.redMul(this.z)),S=u.redSub(p),A=d.redSub(w);if(S.cmpn(0)===0)return A.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var N=S.redSqr(),L=N.redMul(S),I=u.redMul(N),P=A.redSqr().redIAdd(L).redISub(I).redISub(I),D=A.redMul(I.redISub(P)).redISub(d.redMul(L)),U=this.z.redMul(s.z).redMul(S);return this.curve.jpoint(P,D,U)},i.prototype.mixedAdd=function(s){if(this.isInfinity())return s.toJ();if(s.isInfinity())return this;var f=this.z.redSqr(),h=this.x,u=s.x.redMul(f),p=this.y,d=s.y.redMul(f).redMul(this.z),w=h.redSub(u),S=p.redSub(d);if(w.cmpn(0)===0)return S.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var A=w.redSqr(),N=A.redMul(w),L=h.redMul(A),I=S.redSqr().redIAdd(N).redISub(L).redISub(L),P=S.redMul(L.redISub(I)).redISub(p.redMul(N)),D=this.z.redMul(w);return this.curve.jpoint(I,P,D)},i.prototype.dblp=function(s){if(s===0)return this;if(this.isInfinity())return this;if(!s)return this.dbl();var f;if(this.curve.zeroA||this.curve.threeA){var h=this;for(f=0;f<s;f++)h=h.dbl();return h}var u=this.curve.a,p=this.curve.tinv,d=this.x,w=this.y,S=this.z,A=S.redSqr().redSqr(),N=w.redAdd(w);for(f=0;f<s;f++){var L=d.redSqr(),I=N.redSqr(),P=I.redSqr(),D=L.redAdd(L).redIAdd(L).redIAdd(u.redMul(A)),U=d.redMul(I),B=D.redSqr().redISub(U.redAdd(U)),k=U.redISub(B),C=D.redMul(k);C=C.redIAdd(C).redISub(P);var v=N.redMul(S);f+1<s&&(A=A.redMul(P)),d=B,S=v,N=C}return this.curve.jpoint(d,N.redMul(p),S)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},i.prototype._zeroDbl=function(){var s,f,h;if(this.zOne){var u=this.x.redSqr(),p=this.y.redSqr(),d=p.redSqr(),w=this.x.redAdd(p).redSqr().redISub(u).redISub(d);w=w.redIAdd(w);var S=u.redAdd(u).redIAdd(u),A=S.redSqr().redISub(w).redISub(w),N=d.redIAdd(d);N=(N=N.redIAdd(N)).redIAdd(N),s=A,f=S.redMul(w.redISub(A)).redISub(N),h=this.y.redAdd(this.y)}else{var L=this.x.redSqr(),I=this.y.redSqr(),P=I.redSqr(),D=this.x.redAdd(I).redSqr().redISub(L).redISub(P);D=D.redIAdd(D);var U=L.redAdd(L).redIAdd(L),B=U.redSqr(),k=P.redIAdd(P);k=(k=k.redIAdd(k)).redIAdd(k),s=B.redISub(D).redISub(D),f=U.redMul(D.redISub(s)).redISub(k),h=(h=this.y.redMul(this.z)).redIAdd(h)}return this.curve.jpoint(s,f,h)},i.prototype._threeDbl=function(){var s,f,h;if(this.zOne){var u=this.x.redSqr(),p=this.y.redSqr(),d=p.redSqr(),w=this.x.redAdd(p).redSqr().redISub(u).redISub(d);w=w.redIAdd(w);var S=u.redAdd(u).redIAdd(u).redIAdd(this.curve.a),A=S.redSqr().redISub(w).redISub(w);s=A;var N=d.redIAdd(d);N=(N=N.redIAdd(N)).redIAdd(N),f=S.redMul(w.redISub(A)).redISub(N),h=this.y.redAdd(this.y)}else{var L=this.z.redSqr(),I=this.y.redSqr(),P=this.x.redMul(I),D=this.x.redSub(L).redMul(this.x.redAdd(L));D=D.redAdd(D).redIAdd(D);var U=P.redIAdd(P),B=(U=U.redIAdd(U)).redAdd(U);s=D.redSqr().redISub(B),h=this.y.redAdd(this.z).redSqr().redISub(I).redISub(L);var k=I.redSqr();k=(k=(k=k.redIAdd(k)).redIAdd(k)).redIAdd(k),f=D.redMul(U.redISub(s)).redISub(k)}return this.curve.jpoint(s,f,h)},i.prototype._dbl=function(){var s=this.curve.a,f=this.x,h=this.y,u=this.z,p=u.redSqr().redSqr(),d=f.redSqr(),w=h.redSqr(),S=d.redAdd(d).redIAdd(d).redIAdd(s.redMul(p)),A=f.redAdd(f),N=(A=A.redIAdd(A)).redMul(w),L=S.redSqr().redISub(N.redAdd(N)),I=N.redISub(L),P=w.redSqr();P=(P=(P=P.redIAdd(P)).redIAdd(P)).redIAdd(P);var D=S.redMul(I).redISub(P),U=h.redAdd(h).redMul(u);return this.curve.jpoint(L,D,U)},i.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var s=this.x.redSqr(),f=this.y.redSqr(),h=this.z.redSqr(),u=f.redSqr(),p=s.redAdd(s).redIAdd(s),d=p.redSqr(),w=this.x.redAdd(f).redSqr().redISub(s).redISub(u),S=(w=(w=(w=w.redIAdd(w)).redAdd(w).redIAdd(w)).redISub(d)).redSqr(),A=u.redIAdd(u);A=(A=(A=A.redIAdd(A)).redIAdd(A)).redIAdd(A);var N=p.redIAdd(w).redSqr().redISub(d).redISub(S).redISub(A),L=f.redMul(N);L=(L=L.redIAdd(L)).redIAdd(L);var I=this.x.redMul(S).redISub(L);I=(I=I.redIAdd(I)).redIAdd(I);var P=this.y.redMul(N.redMul(A.redISub(N)).redISub(w.redMul(S)));P=(P=(P=P.redIAdd(P)).redIAdd(P)).redIAdd(P);var D=this.z.redAdd(w).redSqr().redISub(h).redISub(S);return this.curve.jpoint(I,P,D)},i.prototype.mul=function(s,f){return s=new o(s,f),this.curve._wnafMul(this,s)},i.prototype.eq=function(s){if(s.type==="affine")return this.eq(s.toJ());if(this===s)return!0;var f=this.z.redSqr(),h=s.z.redSqr();if(this.x.redMul(h).redISub(s.x.redMul(f)).cmpn(0)!==0)return!1;var u=f.redMul(this.z),p=h.redMul(s.z);return this.y.redMul(p).redISub(s.y.redMul(u)).cmpn(0)===0},i.prototype.eqXToP=function(s){var f=this.z.redSqr(),h=s.toRed(this.curve.red).redMul(f);if(this.x.cmp(h)===0)return!0;for(var u=s.clone(),p=this.curve.redN.redMul(f);;){if(u.iadd(this.curve.n),u.cmp(this.curve.p)>=0)return!1;if(h.redIAdd(p),this.x.cmp(h)===0)return!0}},i.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},i.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},{"../utils":419,"./base":406,"bn.js":420,inherits:440}],411:[function(n,x,_){var c,o=_,a=n("hash.js"),r=n("./curve"),t=n("./utils").assert;function e(i){i.type==="short"?this.curve=new r.short(i):i.type==="edwards"?this.curve=new r.edwards(i):this.curve=new r.mont(i),this.g=this.curve.g,this.n=this.curve.n,this.hash=i.hash,t(this.g.validate(),"Invalid curve"),t(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(i,s){Object.defineProperty(o,i,{configurable:!0,enumerable:!0,get:function(){var f=new e(s);return Object.defineProperty(o,i,{configurable:!0,enumerable:!0,value:f}),f}})}o.PresetCurve=e,l("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),l("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),l("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{c=n("./precomputed/secp256k1")}catch{c=void 0}l("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",c]})},{"./curve":408,"./precomputed/secp256k1":418,"./utils":419,"hash.js":426}],412:[function(n,x,_){var c=n("bn.js"),o=n("hmac-drbg"),a=n("../utils"),r=n("../curves"),t=n("brorand"),e=a.assert,l=n("./key"),i=n("./signature");function s(f){if(!(this instanceof s))return new s(f);typeof f=="string"&&(e(Object.prototype.hasOwnProperty.call(r,f),"Unknown curve "+f),f=r[f]),f instanceof r.PresetCurve&&(f={curve:f}),this.curve=f.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=f.curve.g,this.g.precompute(f.curve.n.bitLength()+1),this.hash=f.hash||f.curve.hash}x.exports=s,s.prototype.keyPair=function(f){return new l(this,f)},s.prototype.keyFromPrivate=function(f,h){return l.fromPrivate(this,f,h)},s.prototype.keyFromPublic=function(f,h){return l.fromPublic(this,f,h)},s.prototype.genKeyPair=function(f){f||(f={});for(var h=new o({hash:this.hash,pers:f.pers,persEnc:f.persEnc||"utf8",entropy:f.entropy||t(this.hash.hmacStrength),entropyEnc:f.entropy&&f.entropyEnc||"utf8",nonce:this.n.toArray()}),u=this.n.byteLength(),p=this.n.sub(new c(2));;){var d=new c(h.generate(u));if(!(d.cmp(p)>0))return d.iaddn(1),this.keyFromPrivate(d)}},s.prototype._truncateToN=function(f,h){var u=8*f.byteLength()-this.n.bitLength();return u>0&&(f=f.ushrn(u)),!h&&f.cmp(this.n)>=0?f.sub(this.n):f},s.prototype.sign=function(f,h,u,p){typeof u=="object"&&(p=u,u=null),p||(p={}),h=this.keyFromPrivate(h,u),f=this._truncateToN(new c(f,16));for(var d=this.n.byteLength(),w=h.getPrivate().toArray("be",d),S=f.toArray("be",d),A=new o({hash:this.hash,entropy:w,nonce:S,pers:p.pers,persEnc:p.persEnc||"utf8"}),N=this.n.sub(new c(1)),L=0;;L++){var I=p.k?p.k(L):new c(A.generate(this.n.byteLength()));if(!((I=this._truncateToN(I,!0)).cmpn(1)<=0||I.cmp(N)>=0)){var P=this.g.mul(I);if(!P.isInfinity()){var D=P.getX(),U=D.umod(this.n);if(U.cmpn(0)!==0){var B=I.invm(this.n).mul(U.mul(h.getPrivate()).iadd(f));if((B=B.umod(this.n)).cmpn(0)!==0){var k=(P.getY().isOdd()?1:0)|(D.cmp(U)!==0?2:0);return p.canonical&&B.cmp(this.nh)>0&&(B=this.n.sub(B),k^=1),new i({r:U,s:B,recoveryParam:k})}}}}}},s.prototype.verify=function(f,h,u,p){f=this._truncateToN(new c(f,16)),u=this.keyFromPublic(u,p);var d=(h=new i(h,"hex")).r,w=h.s;if(d.cmpn(1)<0||d.cmp(this.n)>=0||w.cmpn(1)<0||w.cmp(this.n)>=0)return!1;var S,A=w.invm(this.n),N=A.mul(f).umod(this.n),L=A.mul(d).umod(this.n);return this.curve._maxwellTrick?!(S=this.g.jmulAdd(N,u.getPublic(),L)).isInfinity()&&S.eqXToP(d):!(S=this.g.mulAdd(N,u.getPublic(),L)).isInfinity()&&S.getX().umod(this.n).cmp(d)===0},s.prototype.recoverPubKey=function(f,h,u,p){e((3&u)===u,"The recovery param is more than two bits"),h=new i(h,p);var d=this.n,w=new c(f),S=h.r,A=h.s,N=1&u,L=u>>1;if(S.cmp(this.curve.p.umod(this.curve.n))>=0&&L)throw new Error("Unable to find sencond key candinate");S=L?this.curve.pointFromX(S.add(this.curve.n),N):this.curve.pointFromX(S,N);var I=h.r.invm(d),P=d.sub(w).mul(I).umod(d),D=A.mul(I).umod(d);return this.g.mulAdd(P,S,D)},s.prototype.getKeyRecoveryParam=function(f,h,u,p){if((h=new i(h,p)).recoveryParam!==null)return h.recoveryParam;for(var d=0;d<4;d++){var w;try{w=this.recoverPubKey(f,h,d)}catch{continue}if(w.eq(u))return d}throw new Error("Unable to find valid recovery factor")}},{"../curves":411,"../utils":419,"./key":413,"./signature":414,"bn.js":420,brorand:187,"hmac-drbg":438}],413:[function(n,x,_){var c=n("bn.js"),o=n("../utils").assert;function a(r,t){this.ec=r,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}x.exports=a,a.fromPublic=function(r,t,e){return t instanceof a?t:new a(r,{pub:t,pubEnc:e})},a.fromPrivate=function(r,t,e){return t instanceof a?t:new a(r,{priv:t,privEnc:e})},a.prototype.validate=function(){var r=this.getPublic();return r.isInfinity()?{result:!1,reason:"Invalid public key"}:r.validate()?r.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"}},a.prototype.getPublic=function(r,t){return typeof r=="string"&&(t=r,r=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,r):this.pub},a.prototype.getPrivate=function(r){return r==="hex"?this.priv.toString(16,2):this.priv},a.prototype._importPrivate=function(r,t){this.priv=new c(r,t||16),this.priv=this.priv.umod(this.ec.curve.n)},a.prototype._importPublic=function(r,t){if(r.x||r.y)return this.ec.curve.type==="mont"?o(r.x,"Need x coordinate"):this.ec.curve.type!=="short"&&this.ec.curve.type!=="edwards"||o(r.x&&r.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(r.x,r.y));this.pub=this.ec.curve.decodePoint(r,t)},a.prototype.derive=function(r){return r.validate()||o(r.validate(),"public point not validated"),r.mul(this.priv).getX()},a.prototype.sign=function(r,t,e){return this.ec.sign(r,this,t,e)},a.prototype.verify=function(r,t){return this.ec.verify(r,t,this)},a.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":419,"bn.js":420}],414:[function(n,x,_){var c=n("bn.js"),o=n("../utils"),a=o.assert;function r(s,f){if(s instanceof r)return s;this._importDER(s,f)||(a(s.r&&s.s,"Signature without r or s"),this.r=new c(s.r,16),this.s=new c(s.s,16),s.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=s.recoveryParam)}function t(){this.place=0}function e(s,f){var h=s[f.place++];if(!(128&h))return h;var u=15&h;if(u===0||u>4)return!1;for(var p=0,d=0,w=f.place;d<u;d++,w++)p<<=8,p|=s[w],p>>>=0;return!(p<=127)&&(f.place=w,p)}function l(s){for(var f=0,h=s.length-1;!s[f]&&!(128&s[f+1])&&f<h;)f++;return f===0?s:s.slice(f)}function i(s,f){if(f<128)s.push(f);else{var h=1+(Math.log(f)/Math.LN2>>>3);for(s.push(128|h);--h;)s.push(f>>>(h<<3)&255);s.push(f)}}x.exports=r,r.prototype._importDER=function(s,f){s=o.toArray(s,f);var h=new t;if(s[h.place++]!==48)return!1;var u=e(s,h);if(u===!1||u+h.place!==s.length||s[h.place++]!==2)return!1;var p=e(s,h);if(p===!1)return!1;var d=s.slice(h.place,p+h.place);if(h.place+=p,s[h.place++]!==2)return!1;var w=e(s,h);if(w===!1||s.length!==w+h.place)return!1;var S=s.slice(h.place,w+h.place);if(d[0]===0){if(!(128&d[1]))return!1;d=d.slice(1)}if(S[0]===0){if(!(128&S[1]))return!1;S=S.slice(1)}return this.r=new c(d),this.s=new c(S),this.recoveryParam=null,!0},r.prototype.toDER=function(s){var f=this.r.toArray(),h=this.s.toArray();for(128&f[0]&&(f=[0].concat(f)),128&h[0]&&(h=[0].concat(h)),f=l(f),h=l(h);!(h[0]||128&h[1]);)h=h.slice(1);var u=[2];i(u,f.length),(u=u.concat(f)).push(2),i(u,h.length);var p=u.concat(h),d=[48];return i(d,p.length),d=d.concat(p),o.encode(d,s)}},{"../utils":419,"bn.js":420}],415:[function(n,x,_){var c=n("hash.js"),o=n("../curves"),a=n("../utils"),r=a.assert,t=a.parseBytes,e=n("./key"),l=n("./signature");function i(s){if(r(s==="ed25519","only tested with ed25519 so far"),!(this instanceof i))return new i(s);s=o[s].curve,this.curve=s,this.g=s.g,this.g.precompute(s.n.bitLength()+1),this.pointClass=s.point().constructor,this.encodingLength=Math.ceil(s.n.bitLength()/8),this.hash=c.sha512}x.exports=i,i.prototype.sign=function(s,f){s=t(s);var h=this.keyFromSecret(f),u=this.hashInt(h.messagePrefix(),s),p=this.g.mul(u),d=this.encodePoint(p),w=this.hashInt(d,h.pubBytes(),s).mul(h.priv()),S=u.add(w).umod(this.curve.n);return this.makeSignature({R:p,S,Rencoded:d})},i.prototype.verify=function(s,f,h){s=t(s),f=this.makeSignature(f);var u=this.keyFromPublic(h),p=this.hashInt(f.Rencoded(),u.pubBytes(),s),d=this.g.mul(f.S());return f.R().add(u.pub().mul(p)).eq(d)},i.prototype.hashInt=function(){for(var s=this.hash(),f=0;f<arguments.length;f++)s.update(arguments[f]);return a.intFromLE(s.digest()).umod(this.curve.n)},i.prototype.keyFromPublic=function(s){return e.fromPublic(this,s)},i.prototype.keyFromSecret=function(s){return e.fromSecret(this,s)},i.prototype.makeSignature=function(s){return s instanceof l?s:new l(this,s)},i.prototype.encodePoint=function(s){var f=s.getY().toArray("le",this.encodingLength);return f[this.encodingLength-1]|=s.getX().isOdd()?128:0,f},i.prototype.decodePoint=function(s){var f=(s=a.parseBytes(s)).length-1,h=s.slice(0,f).concat(-129&s[f]),u=(128&s[f])!=0,p=a.intFromLE(h);return this.curve.pointFromY(p,u)},i.prototype.encodeInt=function(s){return s.toArray("le",this.encodingLength)},i.prototype.decodeInt=function(s){return a.intFromLE(s)},i.prototype.isPoint=function(s){return s instanceof this.pointClass}},{"../curves":411,"../utils":419,"./key":416,"./signature":417,"hash.js":426}],416:[function(n,x,_){var c=n("../utils"),o=c.assert,a=c.parseBytes,r=c.cachedProperty;function t(e,l){this.eddsa=e,this._secret=a(l.secret),e.isPoint(l.pub)?this._pub=l.pub:this._pubBytes=a(l.pub)}t.fromPublic=function(e,l){return l instanceof t?l:new t(e,{pub:l})},t.fromSecret=function(e,l){return l instanceof t?l:new t(e,{secret:l})},t.prototype.secret=function(){return this._secret},r(t,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),r(t,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),r(t,"privBytes",(function(){var e=this.eddsa,l=this.hash(),i=e.encodingLength-1,s=l.slice(0,e.encodingLength);return s[0]&=248,s[i]&=127,s[i]|=64,s})),r(t,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),r(t,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),r(t,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),t.prototype.sign=function(e){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},t.prototype.verify=function(e,l){return this.eddsa.verify(e,l,this)},t.prototype.getSecret=function(e){return o(this._secret,"KeyPair is public only"),c.encode(this.secret(),e)},t.prototype.getPublic=function(e){return c.encode(this.pubBytes(),e)},x.exports=t},{"../utils":419}],417:[function(n,x,_){var c=n("bn.js"),o=n("../utils"),a=o.assert,r=o.cachedProperty,t=o.parseBytes;function e(l,i){this.eddsa=l,typeof i!="object"&&(i=t(i)),Array.isArray(i)&&(i={R:i.slice(0,l.encodingLength),S:i.slice(l.encodingLength)}),a(i.R&&i.S,"Signature without R or S"),l.isPoint(i.R)&&(this._R=i.R),i.S instanceof c&&(this._S=i.S),this._Rencoded=Array.isArray(i.R)?i.R:i.Rencoded,this._Sencoded=Array.isArray(i.S)?i.S:i.Sencoded}r(e,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),r(e,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),r(e,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),r(e,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),e.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},e.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},x.exports=e},{"../utils":419,"bn.js":420}],418:[function(n,x,_){x.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],419:[function(n,x,_){var c=_,o=n("bn.js"),a=n("minimalistic-assert"),r=n("minimalistic-crypto-utils");c.assert=a,c.toArray=r.toArray,c.zero2=r.zero2,c.toHex=r.toHex,c.encode=r.encode,c.getNAF=function(t,e,l){var i=new Array(Math.max(t.bitLength(),l)+1);i.fill(0);for(var s=1<<e+1,f=t.clone(),h=0;h<i.length;h++){var u,p=f.andln(s-1);f.isOdd()?(u=p>(s>>1)-1?(s>>1)-p:p,f.isubn(u)):u=0,i[h]=u,f.iushrn(1)}return i},c.getJSF=function(t,e){var l=[[],[]];t=t.clone(),e=e.clone();for(var i,s=0,f=0;t.cmpn(-s)>0||e.cmpn(-f)>0;){var h,u,p=t.andln(3)+s&3,d=e.andln(3)+f&3;p===3&&(p=-1),d===3&&(d=-1),h=(1&p)==0?0:(i=t.andln(7)+s&7)!==3&&i!==5||d!==2?p:-p,l[0].push(h),u=(1&d)==0?0:(i=e.andln(7)+f&7)!==3&&i!==5||p!==2?d:-d,l[1].push(u),2*s===h+1&&(s=1-s),2*f===u+1&&(f=1-f),t.iushrn(1),e.iushrn(1)}return l},c.cachedProperty=function(t,e,l){var i="_"+e;t.prototype[e]=function(){return this[i]!==void 0?this[i]:this[i]=l.call(this)}},c.parseBytes=function(t){return typeof t=="string"?c.toArray(t,"hex"):t},c.intFromLE=function(t){return new o(t,"hex","le")}},{"bn.js":420,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],420:[function(n,x,_){arguments[4][184][0].apply(_,arguments)},{buffer:188,dup:184}],421:[function(n,x,_){x.exports={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}},{}],422:[function(n,x,_){var c=Object.create||function(I){var P=function(){};return P.prototype=I,new P},o=Object.keys||function(I){var P=[];for(var D in I)Object.prototype.hasOwnProperty.call(I,D)&&P.push(D);return D},a=Function.prototype.bind||function(I){var P=this;return function(){return P.apply(I,arguments)}};function r(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=c(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}x.exports=r,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._maxListeners=void 0;var t,e=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),t=l.x===0}catch{t=!1}function i(I){return I._maxListeners===void 0?r.defaultMaxListeners:I._maxListeners}function s(I,P,D){if(P)I.call(D);else for(var U=I.length,B=L(I,U),k=0;k<U;++k)B[k].call(D)}function f(I,P,D,U){if(P)I.call(D,U);else for(var B=I.length,k=L(I,B),C=0;C<B;++C)k[C].call(D,U)}function h(I,P,D,U,B){if(P)I.call(D,U,B);else for(var k=I.length,C=L(I,k),v=0;v<k;++v)C[v].call(D,U,B)}function u(I,P,D,U,B,k){if(P)I.call(D,U,B,k);else for(var C=I.length,v=L(I,C),m=0;m<C;++m)v[m].call(D,U,B,k)}function p(I,P,D,U){if(P)I.apply(D,U);else for(var B=I.length,k=L(I,B),C=0;C<B;++C)k[C].apply(D,U)}function d(I,P,D,U){var B,k,C;if(typeof D!="function")throw new TypeError('"listener" argument must be a function');if((k=I._events)?(k.newListener&&(I.emit("newListener",P,D.listener?D.listener:D),k=I._events),C=k[P]):(k=I._events=c(null),I._eventsCount=0),C){if(typeof C=="function"?C=k[P]=U?[D,C]:[C,D]:U?C.unshift(D):C.push(D),!C.warned&&(B=i(I))&&B>0&&C.length>B){C.warned=!0;var v=new Error("Possible EventEmitter memory leak detected. "+C.length+' "'+String(P)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');v.name="MaxListenersExceededWarning",v.emitter=I,v.type=P,v.count=C.length,typeof console=="object"&&console.warn&&console.warn("%s: %s",v.name,v.message)}}else C=k[P]=D,++I._eventsCount;return I}function w(){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 I=new Array(arguments.length),P=0;P<I.length;++P)I[P]=arguments[P];this.listener.apply(this.target,I)}}function S(I,P,D){var U={fired:!1,wrapFn:void 0,target:I,type:P,listener:D},B=a.call(w,U);return B.listener=D,U.wrapFn=B,B}function A(I,P,D){var U=I._events;if(!U)return[];var B=U[P];return B?typeof B=="function"?D?[B.listener||B]:[B]:D?(function(k){for(var C=new Array(k.length),v=0;v<C.length;++v)C[v]=k[v].listener||k[v];return C})(B):L(B,B.length):[]}function N(I){var P=this._events;if(P){var D=P[I];if(typeof D=="function")return 1;if(D)return D.length}return 0}function L(I,P){for(var D=new Array(P),U=0;U<P;++U)D[U]=I[U];return D}t?Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return e},set:function(I){if(typeof I!="number"||I<0||I!=I)throw new TypeError('"defaultMaxListeners" must be a positive number');e=I}}):r.defaultMaxListeners=e,r.prototype.setMaxListeners=function(I){if(typeof I!="number"||I<0||isNaN(I))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=I,this},r.prototype.getMaxListeners=function(){return i(this)},r.prototype.emit=function(I){var P,D,U,B,k,C,v=I==="error";if(C=this._events)v=v&&C.error==null;else if(!v)return!1;if(v){if(arguments.length>1&&(P=arguments[1]),P instanceof Error)throw P;var m=new Error('Unhandled "error" event. ('+P+")");throw m.context=P,m}if(!(D=C[I]))return!1;var b=typeof D=="function";switch(U=arguments.length){case 1:s(D,b,this);break;case 2:f(D,b,this,arguments[1]);break;case 3:h(D,b,this,arguments[1],arguments[2]);break;case 4:u(D,b,this,arguments[1],arguments[2],arguments[3]);break;default:for(B=new Array(U-1),k=1;k<U;k++)B[k-1]=arguments[k];p(D,b,this,B)}return!0},r.prototype.addListener=function(I,P){return d(this,I,P,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(I,P){return d(this,I,P,!0)},r.prototype.once=function(I,P){if(typeof P!="function")throw new TypeError('"listener" argument must be a function');return this.on(I,S(this,I,P)),this},r.prototype.prependOnceListener=function(I,P){if(typeof P!="function")throw new TypeError('"listener" argument must be a function');return this.prependListener(I,S(this,I,P)),this},r.prototype.removeListener=function(I,P){var D,U,B,k,C;if(typeof P!="function")throw new TypeError('"listener" argument must be a function');if(!(U=this._events))return this;if(!(D=U[I]))return this;if(D===P||D.listener===P)--this._eventsCount==0?this._events=c(null):(delete U[I],U.removeListener&&this.emit("removeListener",I,D.listener||P));else if(typeof D!="function"){for(B=-1,k=D.length-1;k>=0;k--)if(D[k]===P||D[k].listener===P){C=D[k].listener,B=k;break}if(B<0)return this;B===0?D.shift():(function(v,m){for(var b=m,g=b+1,y=v.length;g<y;b+=1,g+=1)v[b]=v[g];v.pop()})(D,B),D.length===1&&(U[I]=D[0]),U.removeListener&&this.emit("removeListener",I,C||P)}return this},r.prototype.removeAllListeners=function(I){var P,D,U;if(!(D=this._events))return this;if(!D.removeListener)return arguments.length===0?(this._events=c(null),this._eventsCount=0):D[I]&&(--this._eventsCount==0?this._events=c(null):delete D[I]),this;if(arguments.length===0){var B,k=o(D);for(U=0;U<k.length;++U)(B=k[U])!=="removeListener"&&this.removeAllListeners(B);return this.removeAllListeners("removeListener"),this._events=c(null),this._eventsCount=0,this}if(typeof(P=D[I])=="function")this.removeListener(I,P);else if(P)for(U=P.length-1;U>=0;U--)this.removeListener(I,P[U]);return this},r.prototype.listeners=function(I){return A(this,I,!0)},r.prototype.rawListeners=function(I){return A(this,I,!1)},r.listenerCount=function(I,P){return typeof I.listenerCount=="function"?I.listenerCount(P):N.call(I,P)},r.prototype.listenerCount=N,r.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],423:[function(n,x,_){var c=n("safe-buffer").Buffer,o=n("md5.js");x.exports=function(a,r,t,e){if(c.isBuffer(a)||(a=c.from(a,"binary")),r&&(c.isBuffer(r)||(r=c.from(r,"binary")),r.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var l=t/8,i=c.alloc(l),s=c.alloc(e||0),f=c.alloc(0);l>0||e>0;){var h=new o;h.update(f),h.update(a),r&&h.update(r),f=h.digest();var u=0;if(l>0){var p=i.length-l;u=Math.min(l,f.length),f.copy(i,p,0,u),l-=u}if(u<f.length&&e>0){var d=s.length-e,w=Math.min(e,f.length-u);f.copy(s,d,u,u+w),e-=w}}return f.fill(0),{key:i,iv:s}}},{"md5.js":450,"safe-buffer":494}],424:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.CsvParserStream=_.ParserOptions=_.parseFile=_.parseStream=_.parseString=_.parse=_.FormatterOptions=_.CsvFormatterStream=_.writeToPath=_.writeToString=_.writeToBuffer=_.writeToStream=_.write=_.format=void 0;var c=n("@fast-csv/format");Object.defineProperty(_,"format",{enumerable:!0,get:function(){return c.format}}),Object.defineProperty(_,"write",{enumerable:!0,get:function(){return c.write}}),Object.defineProperty(_,"writeToStream",{enumerable:!0,get:function(){return c.writeToStream}}),Object.defineProperty(_,"writeToBuffer",{enumerable:!0,get:function(){return c.writeToBuffer}}),Object.defineProperty(_,"writeToString",{enumerable:!0,get:function(){return c.writeToString}}),Object.defineProperty(_,"writeToPath",{enumerable:!0,get:function(){return c.writeToPath}}),Object.defineProperty(_,"CsvFormatterStream",{enumerable:!0,get:function(){return c.CsvFormatterStream}}),Object.defineProperty(_,"FormatterOptions",{enumerable:!0,get:function(){return c.FormatterOptions}});var o=n("@fast-csv/parse");Object.defineProperty(_,"parse",{enumerable:!0,get:function(){return o.parse}}),Object.defineProperty(_,"parseString",{enumerable:!0,get:function(){return o.parseString}}),Object.defineProperty(_,"parseStream",{enumerable:!0,get:function(){return o.parseStream}}),Object.defineProperty(_,"parseFile",{enumerable:!0,get:function(){return o.parseFile}}),Object.defineProperty(_,"ParserOptions",{enumerable:!0,get:function(){return o.ParserOptions}}),Object.defineProperty(_,"CsvParserStream",{enumerable:!0,get:function(){return o.CsvParserStream}})},{"@fast-csv/format":151,"@fast-csv/parse":155}],425:[function(n,x,_){var c=n("safe-buffer").Buffer,o=n("readable-stream").Transform;function a(r){o.call(this),this._block=c.allocUnsafe(r),this._blockSize=r,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n("inherits")(a,o),a.prototype._transform=function(r,t,e){var l=null;try{this.update(r,t)}catch(i){l=i}e(l)},a.prototype._flush=function(r){var t=null;try{this.push(this.digest())}catch(e){t=e}r(t)},a.prototype.update=function(r,t){if((function(h,u){if(!c.isBuffer(h)&&typeof h!="string")throw new TypeError(u+" must be a string or a buffer")})(r,"Data"),this._finalized)throw new Error("Digest already called");c.isBuffer(r)||(r=c.from(r,t));for(var e=this._block,l=0;this._blockOffset+r.length-l>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)e[i++]=r[l++];this._update(),this._blockOffset=0}for(;l<r.length;)e[this._blockOffset++]=r[l++];for(var s=0,f=8*r.length;f>0;++s)this._length[s]+=f,(f=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*f);return this},a.prototype._update=function(){throw new Error("_update is not implemented")},a.prototype.digest=function(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();r!==void 0&&(t=t.toString(r)),this._block.fill(0),this._blockOffset=0;for(var e=0;e<4;++e)this._length[e]=0;return t},a.prototype._digest=function(){throw new Error("_digest is not implemented")},x.exports=a},{inherits:440,"readable-stream":491,"safe-buffer":494}],426:[function(n,x,_){var c=_;c.utils=n("./hash/utils"),c.common=n("./hash/common"),c.sha=n("./hash/sha"),c.ripemd=n("./hash/ripemd"),c.hmac=n("./hash/hmac"),c.sha1=c.sha.sha1,c.sha256=c.sha.sha256,c.sha224=c.sha.sha224,c.sha384=c.sha.sha384,c.sha512=c.sha.sha512,c.ripemd160=c.ripemd.ripemd160},{"./hash/common":427,"./hash/hmac":428,"./hash/ripemd":429,"./hash/sha":430,"./hash/utils":437}],427:[function(n,x,_){var c=n("./utils"),o=n("minimalistic-assert");function a(){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}_.BlockHash=a,a.prototype.update=function(r,t){if(r=c.toArray(r,t),this.pending?this.pending=this.pending.concat(r):this.pending=r,this.pendingTotal+=r.length,this.pending.length>=this._delta8){var e=(r=this.pending).length%this._delta8;this.pending=r.slice(r.length-e,r.length),this.pending.length===0&&(this.pending=null),r=c.join32(r,0,r.length-e,this.endian);for(var l=0;l<r.length;l+=this._delta32)this._update(r,l,l+this._delta32)}return this},a.prototype.digest=function(r){return this.update(this._pad()),o(this.pending===null),this._digest(r)},a.prototype._pad=function(){var r=this.pendingTotal,t=this._delta8,e=t-(r+this.padLength)%t,l=new Array(e+this.padLength);l[0]=128;for(var i=1;i<e;i++)l[i]=0;if(r<<=3,this.endian==="big"){for(var s=8;s<this.padLength;s++)l[i++]=0;l[i++]=0,l[i++]=0,l[i++]=0,l[i++]=0,l[i++]=r>>>24&255,l[i++]=r>>>16&255,l[i++]=r>>>8&255,l[i++]=255&r}else for(l[i++]=255&r,l[i++]=r>>>8&255,l[i++]=r>>>16&255,l[i++]=r>>>24&255,l[i++]=0,l[i++]=0,l[i++]=0,l[i++]=0,s=8;s<this.padLength;s++)l[i++]=0;return l}},{"./utils":437,"minimalistic-assert":453}],428:[function(n,x,_){var c=n("./utils"),o=n("minimalistic-assert");function a(r,t,e){if(!(this instanceof a))return new a(r,t,e);this.Hash=r,this.blockSize=r.blockSize/8,this.outSize=r.outSize/8,this.inner=null,this.outer=null,this._init(c.toArray(t,e))}x.exports=a,a.prototype._init=function(r){r.length>this.blockSize&&(r=new this.Hash().update(r).digest()),o(r.length<=this.blockSize);for(var t=r.length;t<this.blockSize;t++)r.push(0);for(t=0;t<r.length;t++)r[t]^=54;for(this.inner=new this.Hash().update(r),t=0;t<r.length;t++)r[t]^=106;this.outer=new this.Hash().update(r)},a.prototype.update=function(r,t){return this.inner.update(r,t),this},a.prototype.digest=function(r){return this.outer.update(this.inner.digest()),this.outer.digest(r)}},{"./utils":437,"minimalistic-assert":453}],429:[function(n,x,_){var c=n("./utils"),o=n("./common"),a=c.rotl32,r=c.sum32,t=c.sum32_3,e=c.sum32_4,l=o.BlockHash;function i(){if(!(this instanceof i))return new i;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function s(S,A,N,L){return S<=15?A^N^L:S<=31?A&N|~A&L:S<=47?(A|~N)^L:S<=63?A&L|N&~L:A^(N|~L)}function f(S){return S<=15?0:S<=31?1518500249:S<=47?1859775393:S<=63?2400959708:2840853838}function h(S){return S<=15?1352829926:S<=31?1548603684:S<=47?1836072691:S<=63?2053994217:0}c.inherits(i,l),_.ripemd160=i,i.blockSize=512,i.outSize=160,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(S,A){for(var N=this.h[0],L=this.h[1],I=this.h[2],P=this.h[3],D=this.h[4],U=N,B=L,k=I,C=P,v=D,m=0;m<80;m++){var b=r(a(e(N,s(m,L,I,P),S[u[m]+A],f(m)),d[m]),D);N=D,D=P,P=a(I,10),I=L,L=b,b=r(a(e(U,s(79-m,B,k,C),S[p[m]+A],h(m)),w[m]),v),U=v,v=C,C=a(k,10),k=B,B=b}b=t(this.h[1],I,C),this.h[1]=t(this.h[2],P,v),this.h[2]=t(this.h[3],D,U),this.h[3]=t(this.h[4],N,B),this.h[4]=t(this.h[0],L,k),this.h[0]=b},i.prototype._digest=function(S){return S==="hex"?c.toHex32(this.h,"little"):c.split32(this.h,"little")};var u=[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],p=[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],d=[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],w=[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]},{"./common":427,"./utils":437}],430:[function(n,x,_){_.sha1=n("./sha/1"),_.sha224=n("./sha/224"),_.sha256=n("./sha/256"),_.sha384=n("./sha/384"),_.sha512=n("./sha/512")},{"./sha/1":431,"./sha/224":432,"./sha/256":433,"./sha/384":434,"./sha/512":435}],431:[function(n,x,_){var c=n("../utils"),o=n("../common"),a=n("./common"),r=c.rotl32,t=c.sum32,e=c.sum32_5,l=a.ft_1,i=o.BlockHash,s=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;i.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}c.inherits(f,i),x.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(h,u){for(var p=this.W,d=0;d<16;d++)p[d]=h[u+d];for(;d<p.length;d++)p[d]=r(p[d-3]^p[d-8]^p[d-14]^p[d-16],1);var w=this.h[0],S=this.h[1],A=this.h[2],N=this.h[3],L=this.h[4];for(d=0;d<p.length;d++){var I=~~(d/20),P=e(r(w,5),l(I,S,A,N),L,p[d],s[I]);L=N,N=A,A=r(S,30),S=w,w=P}this.h[0]=t(this.h[0],w),this.h[1]=t(this.h[1],S),this.h[2]=t(this.h[2],A),this.h[3]=t(this.h[3],N),this.h[4]=t(this.h[4],L)},f.prototype._digest=function(h){return h==="hex"?c.toHex32(this.h,"big"):c.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436}],432:[function(n,x,_){var c=n("../utils"),o=n("./256");function a(){if(!(this instanceof a))return new a;o.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}c.inherits(a,o),x.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(r){return r==="hex"?c.toHex32(this.h.slice(0,7),"big"):c.split32(this.h.slice(0,7),"big")}},{"../utils":437,"./256":433}],433:[function(n,x,_){var c=n("../utils"),o=n("../common"),a=n("./common"),r=n("minimalistic-assert"),t=c.sum32,e=c.sum32_4,l=c.sum32_5,i=a.ch32,s=a.maj32,f=a.s0_256,h=a.s1_256,u=a.g0_256,p=a.g1_256,d=o.BlockHash,w=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function S(){if(!(this instanceof S))return new S;d.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=w,this.W=new Array(64)}c.inherits(S,d),x.exports=S,S.blockSize=512,S.outSize=256,S.hmacStrength=192,S.padLength=64,S.prototype._update=function(A,N){for(var L=this.W,I=0;I<16;I++)L[I]=A[N+I];for(;I<L.length;I++)L[I]=e(p(L[I-2]),L[I-7],u(L[I-15]),L[I-16]);var P=this.h[0],D=this.h[1],U=this.h[2],B=this.h[3],k=this.h[4],C=this.h[5],v=this.h[6],m=this.h[7];for(r(this.k.length===L.length),I=0;I<L.length;I++){var b=l(m,h(k),i(k,C,v),this.k[I],L[I]),g=t(f(P),s(P,D,U));m=v,v=C,C=k,k=t(B,b),B=U,U=D,D=P,P=t(b,g)}this.h[0]=t(this.h[0],P),this.h[1]=t(this.h[1],D),this.h[2]=t(this.h[2],U),this.h[3]=t(this.h[3],B),this.h[4]=t(this.h[4],k),this.h[5]=t(this.h[5],C),this.h[6]=t(this.h[6],v),this.h[7]=t(this.h[7],m)},S.prototype._digest=function(A){return A==="hex"?c.toHex32(this.h,"big"):c.split32(this.h,"big")}},{"../common":427,"../utils":437,"./common":436,"minimalistic-assert":453}],434:[function(n,x,_){var c=n("../utils"),o=n("./512");function a(){if(!(this instanceof a))return new a;o.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}c.inherits(a,o),x.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(r){return r==="hex"?c.toHex32(this.h.slice(0,12),"big"):c.split32(this.h.slice(0,12),"big")}},{"../utils":437,"./512":435}],435:[function(n,x,_){var c=n("../utils"),o=n("../common"),a=n("minimalistic-assert"),r=c.rotr64_hi,t=c.rotr64_lo,e=c.shr64_hi,l=c.shr64_lo,i=c.sum64,s=c.sum64_hi,f=c.sum64_lo,h=c.sum64_4_hi,u=c.sum64_4_lo,p=c.sum64_5_hi,d=c.sum64_5_lo,w=o.BlockHash,S=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function A(){if(!(this instanceof A))return new A;w.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=S,this.W=new Array(160)}function N(g,y,E,R,O){var z=g&E^~g&O;return z<0&&(z+=4294967296),z}function L(g,y,E,R,O,z){var $=y&R^~y&z;return $<0&&($+=4294967296),$}function I(g,y,E,R,O){var z=g&E^g&O^E&O;return z<0&&(z+=4294967296),z}function P(g,y,E,R,O,z){var $=y&R^y&z^R&z;return $<0&&($+=4294967296),$}function D(g,y){var E=r(g,y,28)^r(y,g,2)^r(y,g,7);return E<0&&(E+=4294967296),E}function U(g,y){var E=t(g,y,28)^t(y,g,2)^t(y,g,7);return E<0&&(E+=4294967296),E}function B(g,y){var E=r(g,y,14)^r(g,y,18)^r(y,g,9);return E<0&&(E+=4294967296),E}function k(g,y){var E=t(g,y,14)^t(g,y,18)^t(y,g,9);return E<0&&(E+=4294967296),E}function C(g,y){var E=r(g,y,1)^r(g,y,8)^e(g,y,7);return E<0&&(E+=4294967296),E}function v(g,y){var E=t(g,y,1)^t(g,y,8)^l(g,y,7);return E<0&&(E+=4294967296),E}function m(g,y){var E=r(g,y,19)^r(y,g,29)^e(g,y,6);return E<0&&(E+=4294967296),E}function b(g,y){var E=t(g,y,19)^t(y,g,29)^l(g,y,6);return E<0&&(E+=4294967296),E}c.inherits(A,w),x.exports=A,A.blockSize=1024,A.outSize=512,A.hmacStrength=192,A.padLength=128,A.prototype._prepareBlock=function(g,y){for(var E=this.W,R=0;R<32;R++)E[R]=g[y+R];for(;R<E.length;R+=2){var O=m(E[R-4],E[R-3]),z=b(E[R-4],E[R-3]),$=E[R-14],Z=E[R-13],j=C(E[R-30],E[R-29]),H=v(E[R-30],E[R-29]),T=E[R-32],M=E[R-31];E[R]=h(O,z,$,Z,j,H,T,M),E[R+1]=u(O,z,$,Z,j,H,T,M)}},A.prototype._update=function(g,y){this._prepareBlock(g,y);var E=this.W,R=this.h[0],O=this.h[1],z=this.h[2],$=this.h[3],Z=this.h[4],j=this.h[5],H=this.h[6],T=this.h[7],M=this.h[8],F=this.h[9],V=this.h[10],Y=this.h[11],q=this.h[12],K=this.h[13],nt=this.h[14],rt=this.h[15];a(this.k.length===E.length);for(var G=0;G<E.length;G+=2){var tt=nt,Q=rt,st=B(M,F),it=k(M,F),at=N(M,F,V,Y,q),ut=L(M,F,V,Y,q,K),ft=this.k[G],dt=this.k[G+1],xt=E[G],_t=E[G+1],gt=p(tt,Q,st,it,at,ut,ft,dt,xt,_t),Rt=d(tt,Q,st,it,at,ut,ft,dt,xt,_t);tt=D(R,O),Q=U(R,O),st=I(R,O,z,$,Z),it=P(R,O,z,$,Z,j);var Tt=s(tt,Q,st,it),At=f(tt,Q,st,it);nt=q,rt=K,q=V,K=Y,V=M,Y=F,M=s(H,T,gt,Rt),F=f(T,T,gt,Rt),H=Z,T=j,Z=z,j=$,z=R,$=O,R=s(gt,Rt,Tt,At),O=f(gt,Rt,Tt,At)}i(this.h,0,R,O),i(this.h,2,z,$),i(this.h,4,Z,j),i(this.h,6,H,T),i(this.h,8,M,F),i(this.h,10,V,Y),i(this.h,12,q,K),i(this.h,14,nt,rt)},A.prototype._digest=function(g){return g==="hex"?c.toHex32(this.h,"big"):c.split32(this.h,"big")}},{"../common":427,"../utils":437,"minimalistic-assert":453}],436:[function(n,x,_){var c=n("../utils").rotr32;function o(t,e,l){return t&e^~t&l}function a(t,e,l){return t&e^t&l^e&l}function r(t,e,l){return t^e^l}_.ft_1=function(t,e,l,i){return t===0?o(e,l,i):t===1||t===3?r(e,l,i):t===2?a(e,l,i):void 0},_.ch32=o,_.maj32=a,_.p32=r,_.s0_256=function(t){return c(t,2)^c(t,13)^c(t,22)},_.s1_256=function(t){return c(t,6)^c(t,11)^c(t,25)},_.g0_256=function(t){return c(t,7)^c(t,18)^t>>>3},_.g1_256=function(t){return c(t,17)^c(t,19)^t>>>10}},{"../utils":437}],437:[function(n,x,_){var c=n("minimalistic-assert"),o=n("inherits");function a(l,i){return(64512&l.charCodeAt(i))==55296&&!(i<0||i+1>=l.length)&&(64512&l.charCodeAt(i+1))==56320}function r(l){return(l>>>24|l>>>8&65280|l<<8&16711680|(255&l)<<24)>>>0}function t(l){return l.length===1?"0"+l:l}function e(l){return l.length===7?"0"+l:l.length===6?"00"+l:l.length===5?"000"+l:l.length===4?"0000"+l:l.length===3?"00000"+l:l.length===2?"000000"+l:l.length===1?"0000000"+l:l}_.inherits=o,_.toArray=function(l,i){if(Array.isArray(l))return l.slice();if(!l)return[];var s=[];if(typeof l=="string")if(i){if(i==="hex")for((l=l.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(l="0"+l),h=0;h<l.length;h+=2)s.push(parseInt(l[h]+l[h+1],16))}else for(var f=0,h=0;h<l.length;h++){var u=l.charCodeAt(h);u<128?s[f++]=u:u<2048?(s[f++]=u>>6|192,s[f++]=63&u|128):a(l,h)?(u=65536+((1023&u)<<10)+(1023&l.charCodeAt(++h)),s[f++]=u>>18|240,s[f++]=u>>12&63|128,s[f++]=u>>6&63|128,s[f++]=63&u|128):(s[f++]=u>>12|224,s[f++]=u>>6&63|128,s[f++]=63&u|128)}else for(h=0;h<l.length;h++)s[h]=0|l[h];return s},_.toHex=function(l){for(var i="",s=0;s<l.length;s++)i+=t(l[s].toString(16));return i},_.htonl=r,_.toHex32=function(l,i){for(var s="",f=0;f<l.length;f++){var h=l[f];i==="little"&&(h=r(h)),s+=e(h.toString(16))}return s},_.zero2=t,_.zero8=e,_.join32=function(l,i,s,f){var h=s-i;c(h%4==0);for(var u=new Array(h/4),p=0,d=i;p<u.length;p++,d+=4){var w;w=f==="big"?l[d]<<24|l[d+1]<<16|l[d+2]<<8|l[d+3]:l[d+3]<<24|l[d+2]<<16|l[d+1]<<8|l[d],u[p]=w>>>0}return u},_.split32=function(l,i){for(var s=new Array(4*l.length),f=0,h=0;f<l.length;f++,h+=4){var u=l[f];i==="big"?(s[h]=u>>>24,s[h+1]=u>>>16&255,s[h+2]=u>>>8&255,s[h+3]=255&u):(s[h+3]=u>>>24,s[h+2]=u>>>16&255,s[h+1]=u>>>8&255,s[h]=255&u)}return s},_.rotr32=function(l,i){return l>>>i|l<<32-i},_.rotl32=function(l,i){return l<<i|l>>>32-i},_.sum32=function(l,i){return l+i>>>0},_.sum32_3=function(l,i,s){return l+i+s>>>0},_.sum32_4=function(l,i,s,f){return l+i+s+f>>>0},_.sum32_5=function(l,i,s,f,h){return l+i+s+f+h>>>0},_.sum64=function(l,i,s,f){var h=l[i],u=f+l[i+1]>>>0,p=(u<f?1:0)+s+h;l[i]=p>>>0,l[i+1]=u},_.sum64_hi=function(l,i,s,f){return(i+f>>>0<i?1:0)+l+s>>>0},_.sum64_lo=function(l,i,s,f){return i+f>>>0},_.sum64_4_hi=function(l,i,s,f,h,u,p,d){var w=0,S=i;return w+=(S=S+f>>>0)<i?1:0,w+=(S=S+u>>>0)<u?1:0,l+s+h+p+(w+=(S=S+d>>>0)<d?1:0)>>>0},_.sum64_4_lo=function(l,i,s,f,h,u,p,d){return i+f+u+d>>>0},_.sum64_5_hi=function(l,i,s,f,h,u,p,d,w,S){var A=0,N=i;return A+=(N=N+f>>>0)<i?1:0,A+=(N=N+u>>>0)<u?1:0,A+=(N=N+d>>>0)<d?1:0,l+s+h+p+w+(A+=(N=N+S>>>0)<S?1:0)>>>0},_.sum64_5_lo=function(l,i,s,f,h,u,p,d,w,S){return i+f+u+d+S>>>0},_.rotr64_hi=function(l,i,s){return(i<<32-s|l>>>s)>>>0},_.rotr64_lo=function(l,i,s){return(l<<32-s|i>>>s)>>>0},_.shr64_hi=function(l,i,s){return l>>>s},_.shr64_lo=function(l,i,s){return(l<<32-s|i>>>s)>>>0}},{inherits:440,"minimalistic-assert":453}],438:[function(n,x,_){var c=n("hash.js"),o=n("minimalistic-crypto-utils"),a=n("minimalistic-assert");function r(t){if(!(this instanceof r))return new r(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=o.toArray(t.entropy,t.entropyEnc||"hex"),l=o.toArray(t.nonce,t.nonceEnc||"hex"),i=o.toArray(t.pers,t.persEnc||"hex");a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,l,i)}x.exports=r,r.prototype._init=function(t,e,l){var i=t.concat(e).concat(l);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var s=0;s<this.V.length;s++)this.K[s]=0,this.V[s]=1;this._update(i),this._reseed=1,this.reseedInterval=281474976710656},r.prototype._hmac=function(){return new c.hmac(this.hash,this.K)},r.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},r.prototype.reseed=function(t,e,l,i){typeof e!="string"&&(i=l,l=e,e=null),t=o.toArray(t,e),l=o.toArray(l,i),a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(l||[])),this._reseed=1},r.prototype.generate=function(t,e,l,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof e!="string"&&(i=l,l=e,e=null),l&&(l=o.toArray(l,i||"hex"),this._update(l));for(var s=[];s.length<t;)this.V=this._hmac().update(this.V).digest(),s=s.concat(this.V);var f=s.slice(0,t);return this._update(l),this._reseed++,o.encode(f,e)}},{"hash.js":426,"minimalistic-assert":453,"minimalistic-crypto-utils":454}],439:[function(n,x,_){_.read=function(c,o,a,r,t){var e,l,i=8*t-r-1,s=(1<<i)-1,f=s>>1,h=-7,u=a?t-1:0,p=a?-1:1,d=c[o+u];for(u+=p,e=d&(1<<-h)-1,d>>=-h,h+=i;h>0;e=256*e+c[o+u],u+=p,h-=8);for(l=e&(1<<-h)-1,e>>=-h,h+=r;h>0;l=256*l+c[o+u],u+=p,h-=8);if(e===0)e=1-f;else{if(e===s)return l?NaN:1/0*(d?-1:1);l+=Math.pow(2,r),e-=f}return(d?-1:1)*l*Math.pow(2,e-r)},_.write=function(c,o,a,r,t,e){var l,i,s,f=8*e-t-1,h=(1<<f)-1,u=h>>1,p=t===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:e-1,w=r?1:-1,S=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(i=isNaN(o)?1:0,l=h):(l=Math.floor(Math.log(o)/Math.LN2),o*(s=Math.pow(2,-l))<1&&(l--,s*=2),(o+=l+u>=1?p/s:p*Math.pow(2,1-u))*s>=2&&(l++,s/=2),l+u>=h?(i=0,l=h):l+u>=1?(i=(o*s-1)*Math.pow(2,t),l+=u):(i=o*Math.pow(2,u-1)*Math.pow(2,t),l=0));t>=8;c[a+d]=255&i,d+=w,i/=256,t-=8);for(l=l<<t|i,f+=t;f>0;c[a+d]=255&l,d+=w,l/=256,f-=8);c[a+d-w]|=128*S}},{}],440:[function(n,x,_){typeof Object.create=="function"?x.exports=function(c,o){o&&(c.super_=o,c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}))}:x.exports=function(c,o){if(o){c.super_=o;var a=function(){};a.prototype=o.prototype,c.prototype=new a,c.prototype.constructor=c}}},{}],441:[function(n,x,_){(function(c,o,a,r,t,e,l,i){(function(){(function(s){typeof _=="object"&&x!==void 0?x.exports=s():(typeof window<"u"?window:o!==void 0?o:typeof self<"u"?self:this).JSZip=s()})((function(){return(function s(f,h,u){function p(S,A){if(!h[S]){if(!f[S]){var N=typeof n=="function"&&n;if(!A&&N)return N(S,!0);if(d)return d(S,!0);var L=new Error("Cannot find module '"+S+"'");throw L.code="MODULE_NOT_FOUND",L}var I=h[S]={exports:{}};f[S][0].call(I.exports,(function(P){return p(f[S][1][P]||P)}),I,I.exports,s,f,h,u)}return h[S].exports}for(var d=typeof n=="function"&&n,w=0;w<u.length;w++)p(u[w]);return p})({1:[function(s,f,h){var u=s("./utils"),p=s("./support"),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";h.encode=function(w){for(var S,A,N,L,I,P,D,U=[],B=0,k=w.length,C=k,v=u.getTypeOf(w)!=="string";B<w.length;)C=k-B,N=v?(S=w[B++],A=B<k?w[B++]:0,B<k?w[B++]:0):(S=w.charCodeAt(B++),A=B<k?w.charCodeAt(B++):0,B<k?w.charCodeAt(B++):0),L=S>>2,I=(3&S)<<4|A>>4,P=1<C?(15&A)<<2|N>>6:64,D=2<C?63&N:64,U.push(d.charAt(L)+d.charAt(I)+d.charAt(P)+d.charAt(D));return U.join("")},h.decode=function(w){var S,A,N,L,I,P,D=0,U=0,B="data:";if(w.substr(0,B.length)===B)throw new Error("Invalid base64 input, it looks like a data url.");var k,C=3*(w=w.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(w.charAt(w.length-1)===d.charAt(64)&&C--,w.charAt(w.length-2)===d.charAt(64)&&C--,C%1!=0)throw new Error("Invalid base64 input, bad content length.");for(k=p.uint8array?new Uint8Array(0|C):new Array(0|C);D<w.length;)S=d.indexOf(w.charAt(D++))<<2|(L=d.indexOf(w.charAt(D++)))>>4,A=(15&L)<<4|(I=d.indexOf(w.charAt(D++)))>>2,N=(3&I)<<6|(P=d.indexOf(w.charAt(D++))),k[U++]=S,I!==64&&(k[U++]=A),P!==64&&(k[U++]=N);return k}},{"./support":30,"./utils":32}],2:[function(s,f,h){var u=s("./external"),p=s("./stream/DataWorker"),d=s("./stream/Crc32Probe"),w=s("./stream/DataLengthProbe");function S(A,N,L,I,P){this.compressedSize=A,this.uncompressedSize=N,this.crc32=L,this.compression=I,this.compressedContent=P}S.prototype={getContentWorker:function(){var A=new p(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new w("data_length")),N=this;return A.on("end",(function(){if(this.streamInfo.data_length!==N.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),A},getCompressedWorker:function(){return new p(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},S.createWorkerFrom=function(A,N,L){return A.pipe(new d).pipe(new w("uncompressedSize")).pipe(N.compressWorker(L)).pipe(new w("compressedSize")).withStreamInfo("compression",N)},f.exports=S},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,f,h){var u=s("./stream/GenericWorker");h.STORE={magic:"\0\0",compressWorker:function(){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},h.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,f,h){var u=s("./utils"),p=(function(){for(var d,w=[],S=0;S<256;S++){d=S;for(var A=0;A<8;A++)d=1&d?3988292384^d>>>1:d>>>1;w[S]=d}return w})();f.exports=function(d,w){return d!==void 0&&d.length?u.getTypeOf(d)!=="string"?(function(S,A,N,L){var I=p,P=0+N;S^=-1;for(var D=0;D<P;D++)S=S>>>8^I[255&(S^A[D])];return-1^S})(0|w,d,d.length):(function(S,A,N,L){var I=p,P=0+N;S^=-1;for(var D=0;D<P;D++)S=S>>>8^I[255&(S^A.charCodeAt(D))];return-1^S})(0|w,d,d.length):0}},{"./utils":32}],5:[function(s,f,h){h.base64=!1,h.binary=!1,h.dir=!1,h.createFolders=!0,h.date=null,h.compression=null,h.compressionOptions=null,h.comment=null,h.unixPermissions=null,h.dosPermissions=null},{}],6:[function(s,f,h){var u;u=typeof Promise<"u"?Promise:s("lie"),f.exports={Promise:u}},{lie:37}],7:[function(s,f,h){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",p=s("pako"),d=s("./utils"),w=s("./stream/GenericWorker"),S=u?"uint8array":"array";function A(N,L){w.call(this,"FlateWorker/"+N),this._pako=null,this._pakoAction=N,this._pakoOptions=L,this.meta={}}h.magic="\b\0",d.inherits(A,w),A.prototype.processChunk=function(N){this.meta=N.meta,this._pako===null&&this._createPako(),this._pako.push(d.transformTo(S,N.data),!1)},A.prototype.flush=function(){w.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},A.prototype.cleanUp=function(){w.prototype.cleanUp.call(this),this._pako=null},A.prototype._createPako=function(){this._pako=new p[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var N=this;this._pako.onData=function(L){N.push({data:L,meta:N.meta})}},h.compressWorker=function(N){return new A("Deflate",N)},h.uncompressWorker=function(){return new A("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,f,h){function u(I,P){var D,U="";for(D=0;D<P;D++)U+=String.fromCharCode(255&I),I>>>=8;return U}function p(I,P,D,U,B,k){var C,v,m=I.file,b=I.compression,g=k!==S.utf8encode,y=d.transformTo("string",k(m.name)),E=d.transformTo("string",S.utf8encode(m.name)),R=m.comment,O=d.transformTo("string",k(R)),z=d.transformTo("string",S.utf8encode(R)),$=E.length!==m.name.length,Z=z.length!==R.length,j="",H="",T="",M=m.dir,F=m.date,V={crc32:0,compressedSize:0,uncompressedSize:0};P&&!D||(V.crc32=I.crc32,V.compressedSize=I.compressedSize,V.uncompressedSize=I.uncompressedSize);var Y=0;P&&(Y|=8),g||!$&&!Z||(Y|=2048);var q=0,K=0;M&&(q|=16),B==="UNIX"?(K=798,q|=(function(rt,G){var tt=rt;return rt||(tt=G?16893:33204),(65535&tt)<<16})(m.unixPermissions,M)):(K=20,q|=(function(rt){return 63&(rt||0)})(m.dosPermissions)),C=F.getUTCHours(),C<<=6,C|=F.getUTCMinutes(),C<<=5,C|=F.getUTCSeconds()/2,v=F.getUTCFullYear()-1980,v<<=4,v|=F.getUTCMonth()+1,v<<=5,v|=F.getUTCDate(),$&&(H=u(1,1)+u(A(y),4)+E,j+="up"+u(H.length,2)+H),Z&&(T=u(1,1)+u(A(O),4)+z,j+="uc"+u(T.length,2)+T);var nt="";return nt+=`
10
- \0`,nt+=u(Y,2),nt+=b.magic,nt+=u(C,2),nt+=u(v,2),nt+=u(V.crc32,4),nt+=u(V.compressedSize,4),nt+=u(V.uncompressedSize,4),nt+=u(y.length,2),nt+=u(j.length,2),{fileRecord:N.LOCAL_FILE_HEADER+nt+y+j,dirRecord:N.CENTRAL_FILE_HEADER+u(K,2)+nt+u(O.length,2)+"\0\0\0\0"+u(q,4)+u(U,4)+y+j+O}}var d=s("../utils"),w=s("../stream/GenericWorker"),S=s("../utf8"),A=s("../crc32"),N=s("../signature");function L(I,P,D,U){w.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=P,this.zipPlatform=D,this.encodeFileName=U,this.streamFiles=I,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}d.inherits(L,w),L.prototype.push=function(I){var P=I.meta.percent||0,D=this.entriesCount,U=this._sources.length;this.accumulate?this.contentBuffer.push(I):(this.bytesWritten+=I.data.length,w.prototype.push.call(this,{data:I.data,meta:{currentFile:this.currentFile,percent:D?(P+100*(D-U-1))/D:100}}))},L.prototype.openedSource=function(I){this.currentSourceOffset=this.bytesWritten,this.currentFile=I.file.name;var P=this.streamFiles&&!I.file.dir;if(P){var D=p(I,P,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:D.fileRecord,meta:{percent:0}})}else this.accumulate=!0},L.prototype.closedSource=function(I){this.accumulate=!1;var P=this.streamFiles&&!I.file.dir,D=p(I,P,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(D.dirRecord),P)this.push({data:(function(U){return N.DATA_DESCRIPTOR+u(U.crc32,4)+u(U.compressedSize,4)+u(U.uncompressedSize,4)})(I),meta:{percent:100}});else for(this.push({data:D.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},L.prototype.flush=function(){for(var I=this.bytesWritten,P=0;P<this.dirRecords.length;P++)this.push({data:this.dirRecords[P],meta:{percent:100}});var D=this.bytesWritten-I,U=(function(B,k,C,v,m){var b=d.transformTo("string",m(v));return N.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(B,2)+u(B,2)+u(k,4)+u(C,4)+u(b.length,2)+b})(this.dirRecords.length,D,I,this.zipComment,this.encodeFileName);this.push({data:U,meta:{percent:100}})},L.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},L.prototype.registerPrevious=function(I){this._sources.push(I);var P=this;return I.on("data",(function(D){P.processChunk(D)})),I.on("end",(function(){P.closedSource(P.previous.streamInfo),P._sources.length?P.prepareNextSource():P.end()})),I.on("error",(function(D){P.error(D)})),this},L.prototype.resume=function(){return!!w.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},L.prototype.error=function(I){var P=this._sources;if(!w.prototype.error.call(this,I))return!1;for(var D=0;D<P.length;D++)try{P[D].error(I)}catch{}return!0},L.prototype.lock=function(){w.prototype.lock.call(this);for(var I=this._sources,P=0;P<I.length;P++)I[P].lock()},f.exports=L},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,f,h){var u=s("../compressions"),p=s("./ZipFileWorker");h.generateWorker=function(d,w,S){var A=new p(w.streamFiles,S,w.platform,w.encodeFileName),N=0;try{d.forEach((function(L,I){N++;var P=(function(k,C){var v=k||C,m=u[v];if(!m)throw new Error(v+" is not a valid compression method !");return m})(I.options.compression,w.compression),D=I.options.compressionOptions||w.compressionOptions||{},U=I.dir,B=I.date;I._compressWorker(P,D).withStreamInfo("file",{name:L,dir:U,date:B,comment:I.comment||"",unixPermissions:I.unixPermissions,dosPermissions:I.dosPermissions}).pipe(A)})),A.entriesCount=N}catch(L){A.error(L)}return A}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,f,h){function u(){if(!(this instanceof u))return new u;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var p=new u;for(var d in this)typeof this[d]!="function"&&(p[d]=this[d]);return p}}(u.prototype=s("./object")).loadAsync=s("./load"),u.support=s("./support"),u.defaults=s("./defaults"),u.version="3.10.1",u.loadAsync=function(p,d){return new u().loadAsync(p,d)},u.external=s("./external"),f.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,f,h){var u=s("./utils"),p=s("./external"),d=s("./utf8"),w=s("./zipEntries"),S=s("./stream/Crc32Probe"),A=s("./nodejsUtils");function N(L){return new p.Promise((function(I,P){var D=L.decompressed.getContentWorker().pipe(new S);D.on("error",(function(U){P(U)})).on("end",(function(){D.streamInfo.crc32!==L.decompressed.crc32?P(new Error("Corrupted zip : CRC32 mismatch")):I()})).resume()}))}f.exports=function(L,I){var P=this;return I=u.extend(I||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:d.utf8decode}),A.isNode&&A.isStream(L)?p.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",L,!0,I.optimizedBinaryString,I.base64).then((function(D){var U=new w(I);return U.load(D),U})).then((function(D){var U=[p.Promise.resolve(D)],B=D.files;if(I.checkCRC32)for(var k=0;k<B.length;k++)U.push(N(B[k]));return p.Promise.all(U)})).then((function(D){for(var U=D.shift(),B=U.files,k=0;k<B.length;k++){var C=B[k],v=C.fileNameStr,m=u.resolve(C.fileNameStr);P.file(m,C.decompressed,{binary:!0,optimizedBinaryString:!0,date:C.date,dir:C.dir,comment:C.fileCommentStr.length?C.fileCommentStr:null,unixPermissions:C.unixPermissions,dosPermissions:C.dosPermissions,createFolders:I.createFolders}),C.dir||(P.file(m).unsafeOriginalName=v)}return U.zipComment.length&&(P.comment=U.zipComment),P}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,f,h){var u=s("../utils"),p=s("../stream/GenericWorker");function d(w,S){p.call(this,"Nodejs stream input adapter for "+w),this._upstreamEnded=!1,this._bindStream(S)}u.inherits(d,p),d.prototype._bindStream=function(w){var S=this;(this._stream=w).pause(),w.on("data",(function(A){S.push({data:A,meta:{percent:0}})})).on("error",(function(A){S.isPaused?this.generatedError=A:S.error(A)})).on("end",(function(){S.isPaused?S._upstreamEnded=!0:S.end()}))},d.prototype.pause=function(){return!!p.prototype.pause.call(this)&&(this._stream.pause(),!0)},d.prototype.resume=function(){return!!p.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},f.exports=d},{"../stream/GenericWorker":28,"../utils":32}],13:[function(s,f,h){var u=s("readable-stream").Readable;function p(d,w,S){u.call(this,w),this._helper=d;var A=this;d.on("data",(function(N,L){A.push(N)||A._helper.pause(),S&&S(L)})).on("error",(function(N){A.emit("error",N)})).on("end",(function(){A.push(null)}))}s("../utils").inherits(p,u),p.prototype._read=function(){this._helper.resume()},f.exports=p},{"../utils":32,"readable-stream":16}],14:[function(s,f,h){f.exports={isNode:a!==void 0,newBufferFrom:function(u,p){if(a.from&&a.from!==Uint8Array.from)return a.from(u,p);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new a(u,p)},allocBuffer:function(u){if(a.alloc)return a.alloc(u);var p=new a(u);return p.fill(0),p},isBuffer:function(u){return a.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(s,f,h){function u(m,b,g){var y,E=d.getTypeOf(b),R=d.extend(g||{},A);R.date=R.date||new Date,R.compression!==null&&(R.compression=R.compression.toUpperCase()),typeof R.unixPermissions=="string"&&(R.unixPermissions=parseInt(R.unixPermissions,8)),R.unixPermissions&&16384&R.unixPermissions&&(R.dir=!0),R.dosPermissions&&16&R.dosPermissions&&(R.dir=!0),R.dir&&(m=B(m)),R.createFolders&&(y=U(m))&&k.call(this,y,!0);var O=E==="string"&&R.binary===!1&&R.base64===!1;g&&g.binary!==void 0||(R.binary=!O),(b instanceof N&&b.uncompressedSize===0||R.dir||!b||b.length===0)&&(R.base64=!1,R.binary=!0,b="",R.compression="STORE",E="string");var z;z=b instanceof N||b instanceof w?b:P.isNode&&P.isStream(b)?new D(m,b):d.prepareContent(m,b,R.binary,R.optimizedBinaryString,R.base64);var $=new L(m,z,R);this.files[m]=$}var p=s("./utf8"),d=s("./utils"),w=s("./stream/GenericWorker"),S=s("./stream/StreamHelper"),A=s("./defaults"),N=s("./compressedObject"),L=s("./zipObject"),I=s("./generate"),P=s("./nodejsUtils"),D=s("./nodejs/NodejsStreamInputAdapter"),U=function(m){m.slice(-1)==="/"&&(m=m.substring(0,m.length-1));var b=m.lastIndexOf("/");return 0<b?m.substring(0,b):""},B=function(m){return m.slice(-1)!=="/"&&(m+="/"),m},k=function(m,b){return b=b!==void 0?b:A.createFolders,m=B(m),this.files[m]||u.call(this,m,null,{dir:!0,createFolders:b}),this.files[m]};function C(m){return Object.prototype.toString.call(m)==="[object RegExp]"}var v={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(m){var b,g,y;for(b in this.files)y=this.files[b],(g=b.slice(this.root.length,b.length))&&b.slice(0,this.root.length)===this.root&&m(g,y)},filter:function(m){var b=[];return this.forEach((function(g,y){m(g,y)&&b.push(y)})),b},file:function(m,b,g){if(arguments.length!==1)return m=this.root+m,u.call(this,m,b,g),this;if(C(m)){var y=m;return this.filter((function(R,O){return!O.dir&&y.test(R)}))}var E=this.files[this.root+m];return E&&!E.dir?E:null},folder:function(m){if(!m)return this;if(C(m))return this.filter((function(E,R){return R.dir&&m.test(E)}));var b=this.root+m,g=k.call(this,b),y=this.clone();return y.root=g.name,y},remove:function(m){m=this.root+m;var b=this.files[m];if(b||(m.slice(-1)!=="/"&&(m+="/"),b=this.files[m]),b&&!b.dir)delete this.files[m];else for(var g=this.filter((function(E,R){return R.name.slice(0,m.length)===m})),y=0;y<g.length;y++)delete this.files[g[y].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(m){var b,g={};try{if((g=d.extend(m||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:p.utf8encode})).type=g.type.toLowerCase(),g.compression=g.compression.toUpperCase(),g.type==="binarystring"&&(g.type="string"),!g.type)throw new Error("No output type specified.");d.checkSupport(g.type),g.platform!=="darwin"&&g.platform!=="freebsd"&&g.platform!=="linux"&&g.platform!=="sunos"||(g.platform="UNIX"),g.platform==="win32"&&(g.platform="DOS");var y=g.comment||this.comment||"";b=I.generateWorker(this,g,y)}catch(E){(b=new w("error")).error(E)}return new S(b,g.type||"string",g.mimeType)},generateAsync:function(m,b){return this.generateInternalStream(m).accumulate(b)},generateNodeStream:function(m,b){return(m=m||{}).type||(m.type="nodebuffer"),this.generateInternalStream(m).toNodejsStream(b)}};f.exports=v},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(s,f,h){f.exports=s("stream")},{stream:void 0}],17:[function(s,f,h){var u=s("./DataReader");function p(d){u.call(this,d);for(var w=0;w<this.data.length;w++)d[w]=255&d[w]}s("../utils").inherits(p,u),p.prototype.byteAt=function(d){return this.data[this.zero+d]},p.prototype.lastIndexOfSignature=function(d){for(var w=d.charCodeAt(0),S=d.charCodeAt(1),A=d.charCodeAt(2),N=d.charCodeAt(3),L=this.length-4;0<=L;--L)if(this.data[L]===w&&this.data[L+1]===S&&this.data[L+2]===A&&this.data[L+3]===N)return L-this.zero;return-1},p.prototype.readAndCheckSignature=function(d){var w=d.charCodeAt(0),S=d.charCodeAt(1),A=d.charCodeAt(2),N=d.charCodeAt(3),L=this.readData(4);return w===L[0]&&S===L[1]&&A===L[2]&&N===L[3]},p.prototype.readData=function(d){if(this.checkOffset(d),d===0)return[];var w=this.data.slice(this.zero+this.index,this.zero+this.index+d);return this.index+=d,w},f.exports=p},{"../utils":32,"./DataReader":18}],18:[function(s,f,h){var u=s("../utils");function p(d){this.data=d,this.length=d.length,this.index=0,this.zero=0}p.prototype={checkOffset:function(d){this.checkIndex(this.index+d)},checkIndex:function(d){if(this.length<this.zero+d||d<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+d+"). Corrupted zip ?")},setIndex:function(d){this.checkIndex(d),this.index=d},skip:function(d){this.setIndex(this.index+d)},byteAt:function(){},readInt:function(d){var w,S=0;for(this.checkOffset(d),w=this.index+d-1;w>=this.index;w--)S=(S<<8)+this.byteAt(w);return this.index+=d,S},readString:function(d){return u.transformTo("string",this.readData(d))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var d=this.readInt(4);return new Date(Date.UTC(1980+(d>>25&127),(d>>21&15)-1,d>>16&31,d>>11&31,d>>5&63,(31&d)<<1))}},f.exports=p},{"../utils":32}],19:[function(s,f,h){var u=s("./Uint8ArrayReader");function p(d){u.call(this,d)}s("../utils").inherits(p,u),p.prototype.readData=function(d){this.checkOffset(d);var w=this.data.slice(this.zero+this.index,this.zero+this.index+d);return this.index+=d,w},f.exports=p},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,f,h){var u=s("./DataReader");function p(d){u.call(this,d)}s("../utils").inherits(p,u),p.prototype.byteAt=function(d){return this.data.charCodeAt(this.zero+d)},p.prototype.lastIndexOfSignature=function(d){return this.data.lastIndexOf(d)-this.zero},p.prototype.readAndCheckSignature=function(d){return d===this.readData(4)},p.prototype.readData=function(d){this.checkOffset(d);var w=this.data.slice(this.zero+this.index,this.zero+this.index+d);return this.index+=d,w},f.exports=p},{"../utils":32,"./DataReader":18}],21:[function(s,f,h){var u=s("./ArrayReader");function p(d){u.call(this,d)}s("../utils").inherits(p,u),p.prototype.readData=function(d){if(this.checkOffset(d),d===0)return new Uint8Array(0);var w=this.data.subarray(this.zero+this.index,this.zero+this.index+d);return this.index+=d,w},f.exports=p},{"../utils":32,"./ArrayReader":17}],22:[function(s,f,h){var u=s("../utils"),p=s("../support"),d=s("./ArrayReader"),w=s("./StringReader"),S=s("./NodeBufferReader"),A=s("./Uint8ArrayReader");f.exports=function(N){var L=u.getTypeOf(N);return u.checkSupport(L),L!=="string"||p.uint8array?L==="nodebuffer"?new S(N):p.uint8array?new A(u.transformTo("uint8array",N)):new d(u.transformTo("array",N)):new w(N)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,f,h){h.LOCAL_FILE_HEADER="PK",h.CENTRAL_FILE_HEADER="PK",h.CENTRAL_DIRECTORY_END="PK",h.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",h.ZIP64_CENTRAL_DIRECTORY_END="PK",h.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,f,h){var u=s("./GenericWorker"),p=s("../utils");function d(w){u.call(this,"ConvertWorker to "+w),this.destType=w}p.inherits(d,u),d.prototype.processChunk=function(w){this.push({data:p.transformTo(this.destType,w.data),meta:w.meta})},f.exports=d},{"../utils":32,"./GenericWorker":28}],25:[function(s,f,h){var u=s("./GenericWorker"),p=s("../crc32");function d(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(d,u),d.prototype.processChunk=function(w){this.streamInfo.crc32=p(w.data,this.streamInfo.crc32||0),this.push(w)},f.exports=d},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,f,h){var u=s("../utils"),p=s("./GenericWorker");function d(w){p.call(this,"DataLengthProbe for "+w),this.propName=w,this.withStreamInfo(w,0)}u.inherits(d,p),d.prototype.processChunk=function(w){if(w){var S=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=S+w.data.length}p.prototype.processChunk.call(this,w)},f.exports=d},{"../utils":32,"./GenericWorker":28}],27:[function(s,f,h){var u=s("../utils"),p=s("./GenericWorker");function d(w){p.call(this,"DataWorker");var S=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,w.then((function(A){S.dataIsReady=!0,S.data=A,S.max=A&&A.length||0,S.type=u.getTypeOf(A),S.isPaused||S._tickAndRepeat()}),(function(A){S.error(A)}))}u.inherits(d,p),d.prototype.cleanUp=function(){p.prototype.cleanUp.call(this),this.data=null},d.prototype.resume=function(){return!!p.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},d.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},d.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var w=null,S=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":w=this.data.substring(this.index,S);break;case"uint8array":w=this.data.subarray(this.index,S);break;case"array":case"nodebuffer":w=this.data.slice(this.index,S)}return this.index=S,this.push({data:w,meta:{percent:this.max?this.index/this.max*100:0}})},f.exports=d},{"../utils":32,"./GenericWorker":28}],28:[function(s,f,h){function u(p){this.name=p||"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}u.prototype={push:function(p){this.emit("data",p)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(p){this.emit("error",p)}return!0},error:function(p){return!this.isFinished&&(this.isPaused?this.generatedError=p:(this.isFinished=!0,this.emit("error",p),this.previous&&this.previous.error(p),this.cleanUp()),!0)},on:function(p,d){return this._listeners[p].push(d),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(p,d){if(this._listeners[p])for(var w=0;w<this._listeners[p].length;w++)this._listeners[p][w].call(this,d)},pipe:function(p){return p.registerPrevious(this)},registerPrevious:function(p){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=p.streamInfo,this.mergeStreamInfo(),this.previous=p;var d=this;return p.on("data",(function(w){d.processChunk(w)})),p.on("end",(function(){d.end()})),p.on("error",(function(w){d.error(w)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var p=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),p=!0),this.previous&&this.previous.resume(),!p},flush:function(){},processChunk:function(p){this.push(p)},withStreamInfo:function(p,d){return this.extraStreamInfo[p]=d,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var p in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,p)&&(this.streamInfo[p]=this.extraStreamInfo[p])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var p="Worker "+this.name;return this.previous?this.previous+" -> "+p:p}},f.exports=u},{}],29:[function(s,f,h){var u=s("../utils"),p=s("./ConvertWorker"),d=s("./GenericWorker"),w=s("../base64"),S=s("../support"),A=s("../external"),N=null;if(S.nodestream)try{N=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function L(I,P,D){var U=P;switch(P){case"blob":case"arraybuffer":U="uint8array";break;case"base64":U="string"}try{this._internalType=U,this._outputType=P,this._mimeType=D,u.checkSupport(U),this._worker=I.pipe(new p(U)),I.lock()}catch(B){this._worker=new d("error"),this._worker.error(B)}}L.prototype={accumulate:function(I){return(function(P,D){return new A.Promise((function(U,B){var k=[],C=P._internalType,v=P._outputType,m=P._mimeType;P.on("data",(function(b,g){k.push(b),D&&D(g)})).on("error",(function(b){k=[],B(b)})).on("end",(function(){try{var b=(function(g,y,E){switch(g){case"blob":return u.newBlob(u.transformTo("arraybuffer",y),E);case"base64":return w.encode(y);default:return u.transformTo(g,y)}})(v,(function(g,y){var E,R=0,O=null,z=0;for(E=0;E<y.length;E++)z+=y[E].length;switch(g){case"string":return y.join("");case"array":return Array.prototype.concat.apply([],y);case"uint8array":for(O=new Uint8Array(z),E=0;E<y.length;E++)O.set(y[E],R),R+=y[E].length;return O;case"nodebuffer":return a.concat(y);default:throw new Error("concat : unsupported type '"+g+"'")}})(C,k),m);U(b)}catch(g){B(g)}k=[]})).resume()}))})(this,I)},on:function(I,P){var D=this;return I==="data"?this._worker.on(I,(function(U){P.call(D,U.data,U.meta)})):this._worker.on(I,(function(){u.delay(P,arguments,D)})),this},resume:function(){return u.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(I){if(u.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new N(this,{objectMode:this._outputType!=="nodebuffer"},I)}},f.exports=L},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,f,h){if(h.base64=!0,h.array=!0,h.string=!0,h.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",h.nodebuffer=a!==void 0,h.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")h.blob=!1;else{var u=new ArrayBuffer(0);try{h.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var p=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);p.append(u),h.blob=p.getBlob("application/zip").size===0}catch{h.blob=!1}}}try{h.nodestream=!!s("readable-stream").Readable}catch{h.nodestream=!1}},{"readable-stream":16}],31:[function(s,f,h){for(var u=s("./utils"),p=s("./support"),d=s("./nodejsUtils"),w=s("./stream/GenericWorker"),S=new Array(256),A=0;A<256;A++)S[A]=252<=A?6:248<=A?5:240<=A?4:224<=A?3:192<=A?2:1;function N(){w.call(this,"utf-8 decode"),this.leftOver=null}function L(){w.call(this,"utf-8 encode")}S[254]=S[254]=1,h.utf8encode=function(I){return p.nodebuffer?d.newBufferFrom(I,"utf-8"):(function(P){var D,U,B,k,C,v=P.length,m=0;for(k=0;k<v;k++)(64512&(U=P.charCodeAt(k)))==55296&&k+1<v&&(64512&(B=P.charCodeAt(k+1)))==56320&&(U=65536+(U-55296<<10)+(B-56320),k++),m+=U<128?1:U<2048?2:U<65536?3:4;for(D=p.uint8array?new Uint8Array(m):new Array(m),k=C=0;C<m;k++)(64512&(U=P.charCodeAt(k)))==55296&&k+1<v&&(64512&(B=P.charCodeAt(k+1)))==56320&&(U=65536+(U-55296<<10)+(B-56320),k++),U<128?D[C++]=U:(U<2048?D[C++]=192|U>>>6:(U<65536?D[C++]=224|U>>>12:(D[C++]=240|U>>>18,D[C++]=128|U>>>12&63),D[C++]=128|U>>>6&63),D[C++]=128|63&U);return D})(I)},h.utf8decode=function(I){return p.nodebuffer?u.transformTo("nodebuffer",I).toString("utf-8"):(function(P){var D,U,B,k,C=P.length,v=new Array(2*C);for(D=U=0;D<C;)if((B=P[D++])<128)v[U++]=B;else if(4<(k=S[B]))v[U++]=65533,D+=k-1;else{for(B&=k===2?31:k===3?15:7;1<k&&D<C;)B=B<<6|63&P[D++],k--;1<k?v[U++]=65533:B<65536?v[U++]=B:(B-=65536,v[U++]=55296|B>>10&1023,v[U++]=56320|1023&B)}return v.length!==U&&(v.subarray?v=v.subarray(0,U):v.length=U),u.applyFromCharCode(v)})(I=u.transformTo(p.uint8array?"uint8array":"array",I))},u.inherits(N,w),N.prototype.processChunk=function(I){var P=u.transformTo(p.uint8array?"uint8array":"array",I.data);if(this.leftOver&&this.leftOver.length){if(p.uint8array){var D=P;(P=new Uint8Array(D.length+this.leftOver.length)).set(this.leftOver,0),P.set(D,this.leftOver.length)}else P=this.leftOver.concat(P);this.leftOver=null}var U=(function(k,C){var v;for((C=C||k.length)>k.length&&(C=k.length),v=C-1;0<=v&&(192&k[v])==128;)v--;return v<0||v===0?C:v+S[k[v]]>C?v:C})(P),B=P;U!==P.length&&(p.uint8array?(B=P.subarray(0,U),this.leftOver=P.subarray(U,P.length)):(B=P.slice(0,U),this.leftOver=P.slice(U,P.length))),this.push({data:h.utf8decode(B),meta:I.meta})},N.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:h.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},h.Utf8DecodeWorker=N,u.inherits(L,w),L.prototype.processChunk=function(I){this.push({data:h.utf8encode(I.data),meta:I.meta})},h.Utf8EncodeWorker=L},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,f,h){var u=s("./support"),p=s("./base64"),d=s("./nodejsUtils"),w=s("./external");function S(D){return D}function A(D,U){for(var B=0;B<D.length;++B)U[B]=255&D.charCodeAt(B);return U}s("setimmediate"),h.newBlob=function(D,U){h.checkSupport("blob");try{return new Blob([D],{type:U})}catch{try{var B=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return B.append(D),B.getBlob(U)}catch{throw new Error("Bug : can't construct the Blob.")}}};var N={stringifyByChunk:function(D,U,B){var k=[],C=0,v=D.length;if(v<=B)return String.fromCharCode.apply(null,D);for(;C<v;)U==="array"||U==="nodebuffer"?k.push(String.fromCharCode.apply(null,D.slice(C,Math.min(C+B,v)))):k.push(String.fromCharCode.apply(null,D.subarray(C,Math.min(C+B,v)))),C+=B;return k.join("")},stringifyByChar:function(D){for(var U="",B=0;B<D.length;B++)U+=String.fromCharCode(D[B]);return U},applyCanBeUsed:{uint8array:(function(){try{return u.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return u.nodebuffer&&String.fromCharCode.apply(null,d.allocBuffer(1)).length===1}catch{return!1}})()}};function L(D){var U=65536,B=h.getTypeOf(D),k=!0;if(B==="uint8array"?k=N.applyCanBeUsed.uint8array:B==="nodebuffer"&&(k=N.applyCanBeUsed.nodebuffer),k)for(;1<U;)try{return N.stringifyByChunk(D,B,U)}catch{U=Math.floor(U/2)}return N.stringifyByChar(D)}function I(D,U){for(var B=0;B<D.length;B++)U[B]=D[B];return U}h.applyFromCharCode=L;var P={};P.string={string:S,array:function(D){return A(D,new Array(D.length))},arraybuffer:function(D){return P.string.uint8array(D).buffer},uint8array:function(D){return A(D,new Uint8Array(D.length))},nodebuffer:function(D){return A(D,d.allocBuffer(D.length))}},P.array={string:L,array:S,arraybuffer:function(D){return new Uint8Array(D).buffer},uint8array:function(D){return new Uint8Array(D)},nodebuffer:function(D){return d.newBufferFrom(D)}},P.arraybuffer={string:function(D){return L(new Uint8Array(D))},array:function(D){return I(new Uint8Array(D),new Array(D.byteLength))},arraybuffer:S,uint8array:function(D){return new Uint8Array(D)},nodebuffer:function(D){return d.newBufferFrom(new Uint8Array(D))}},P.uint8array={string:L,array:function(D){return I(D,new Array(D.length))},arraybuffer:function(D){return D.buffer},uint8array:S,nodebuffer:function(D){return d.newBufferFrom(D)}},P.nodebuffer={string:L,array:function(D){return I(D,new Array(D.length))},arraybuffer:function(D){return P.nodebuffer.uint8array(D).buffer},uint8array:function(D){return I(D,new Uint8Array(D.length))},nodebuffer:S},h.transformTo=function(D,U){if(U=U||"",!D)return U;h.checkSupport(D);var B=h.getTypeOf(U);return P[B][D](U)},h.resolve=function(D){for(var U=D.split("/"),B=[],k=0;k<U.length;k++){var C=U[k];C==="."||C===""&&k!==0&&k!==U.length-1||(C===".."?B.pop():B.push(C))}return B.join("/")},h.getTypeOf=function(D){return typeof D=="string"?"string":Object.prototype.toString.call(D)==="[object Array]"?"array":u.nodebuffer&&d.isBuffer(D)?"nodebuffer":u.uint8array&&D instanceof Uint8Array?"uint8array":u.arraybuffer&&D instanceof ArrayBuffer?"arraybuffer":void 0},h.checkSupport=function(D){if(!u[D.toLowerCase()])throw new Error(D+" is not supported by this platform")},h.MAX_VALUE_16BITS=65535,h.MAX_VALUE_32BITS=-1,h.pretty=function(D){var U,B,k="";for(B=0;B<(D||"").length;B++)k+="\\x"+((U=D.charCodeAt(B))<16?"0":"")+U.toString(16).toUpperCase();return k},h.delay=function(D,U,B){i((function(){D.apply(B||null,U||[])}))},h.inherits=function(D,U){function B(){}B.prototype=U.prototype,D.prototype=new B},h.extend=function(){var D,U,B={};for(D=0;D<arguments.length;D++)for(U in arguments[D])Object.prototype.hasOwnProperty.call(arguments[D],U)&&B[U]===void 0&&(B[U]=arguments[D][U]);return B},h.prepareContent=function(D,U,B,k,C){return w.Promise.resolve(U).then((function(v){return u.blob&&(v instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(v))!==-1)&&typeof FileReader<"u"?new w.Promise((function(m,b){var g=new FileReader;g.onload=function(y){m(y.target.result)},g.onerror=function(y){b(y.target.error)},g.readAsArrayBuffer(v)})):v})).then((function(v){var m=h.getTypeOf(v);return m?(m==="arraybuffer"?v=h.transformTo("uint8array",v):m==="string"&&(C?v=p.decode(v):B&&k!==!0&&(v=(function(b){return A(b,u.uint8array?new Uint8Array(b.length):new Array(b.length))})(v))),v):w.Promise.reject(new Error("Can't read the data of '"+D+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(s,f,h){var u=s("./reader/readerFor"),p=s("./utils"),d=s("./signature"),w=s("./zipEntry"),S=s("./support");function A(N){this.files=[],this.loadOptions=N}A.prototype={checkSignature:function(N){if(!this.reader.readAndCheckSignature(N)){this.reader.index-=4;var L=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+p.pretty(L)+", expected "+p.pretty(N)+")")}},isSignature:function(N,L){var I=this.reader.index;this.reader.setIndex(N);var P=this.reader.readString(4)===L;return this.reader.setIndex(I),P},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var N=this.reader.readData(this.zipCommentLength),L=S.uint8array?"uint8array":"array",I=p.transformTo(L,N);this.zipComment=this.loadOptions.decodeFileName(I)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var N,L,I,P=this.zip64EndOfCentralSize-44;0<P;)N=this.reader.readInt(2),L=this.reader.readInt(4),I=this.reader.readData(L),this.zip64ExtensibleData[N]={id:N,length:L,value:I}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var N,L;for(N=0;N<this.files.length;N++)L=this.files[N],this.reader.setIndex(L.localHeaderOffset),this.checkSignature(d.LOCAL_FILE_HEADER),L.readLocalPart(this.reader),L.handleUTF8(),L.processAttributes()},readCentralDir:function(){var N;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(d.CENTRAL_FILE_HEADER);)(N=new w({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(N);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var N=this.reader.lastIndexOfSignature(d.CENTRAL_DIRECTORY_END);if(N<0)throw this.isSignature(0,d.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(N);var L=N;if(this.checkSignature(d.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===p.MAX_VALUE_16BITS||this.diskWithCentralDirStart===p.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===p.MAX_VALUE_16BITS||this.centralDirRecords===p.MAX_VALUE_16BITS||this.centralDirSize===p.MAX_VALUE_32BITS||this.centralDirOffset===p.MAX_VALUE_32BITS){if(this.zip64=!0,(N=this.reader.lastIndexOfSignature(d.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(N),this.checkSignature(d.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,d.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(d.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(d.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var I=this.centralDirOffset+this.centralDirSize;this.zip64&&(I+=20,I+=12+this.zip64EndOfCentralSize);var P=L-I;if(0<P)this.isSignature(L,d.CENTRAL_FILE_HEADER)||(this.reader.zero=P);else if(P<0)throw new Error("Corrupted zip: missing "+Math.abs(P)+" bytes.")},prepareReader:function(N){this.reader=u(N)},load:function(N){this.prepareReader(N),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},f.exports=A},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,f,h){var u=s("./reader/readerFor"),p=s("./utils"),d=s("./compressedObject"),w=s("./crc32"),S=s("./utf8"),A=s("./compressions"),N=s("./support");function L(I,P){this.options=I,this.loadOptions=P}L.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(I){var P,D;if(I.skip(22),this.fileNameLength=I.readInt(2),D=I.readInt(2),this.fileName=I.readData(this.fileNameLength),I.skip(D),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((P=(function(U){for(var B in A)if(Object.prototype.hasOwnProperty.call(A,B)&&A[B].magic===U)return A[B];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+p.pretty(this.compressionMethod)+" unknown (inner file : "+p.transformTo("string",this.fileName)+")");this.decompressed=new d(this.compressedSize,this.uncompressedSize,this.crc32,P,I.readData(this.compressedSize))},readCentralPart:function(I){this.versionMadeBy=I.readInt(2),I.skip(2),this.bitFlag=I.readInt(2),this.compressionMethod=I.readString(2),this.date=I.readDate(),this.crc32=I.readInt(4),this.compressedSize=I.readInt(4),this.uncompressedSize=I.readInt(4);var P=I.readInt(2);if(this.extraFieldsLength=I.readInt(2),this.fileCommentLength=I.readInt(2),this.diskNumberStart=I.readInt(2),this.internalFileAttributes=I.readInt(2),this.externalFileAttributes=I.readInt(4),this.localHeaderOffset=I.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");I.skip(P),this.readExtraFields(I),this.parseZIP64ExtraField(I),this.fileComment=I.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var I=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),I==0&&(this.dosPermissions=63&this.externalFileAttributes),I==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var I=u(this.extraFields[1].value);this.uncompressedSize===p.MAX_VALUE_32BITS&&(this.uncompressedSize=I.readInt(8)),this.compressedSize===p.MAX_VALUE_32BITS&&(this.compressedSize=I.readInt(8)),this.localHeaderOffset===p.MAX_VALUE_32BITS&&(this.localHeaderOffset=I.readInt(8)),this.diskNumberStart===p.MAX_VALUE_32BITS&&(this.diskNumberStart=I.readInt(4))}},readExtraFields:function(I){var P,D,U,B=I.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});I.index+4<B;)P=I.readInt(2),D=I.readInt(2),U=I.readData(D),this.extraFields[P]={id:P,length:D,value:U};I.setIndex(B)},handleUTF8:function(){var I=N.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=S.utf8decode(this.fileName),this.fileCommentStr=S.utf8decode(this.fileComment);else{var P=this.findExtraFieldUnicodePath();if(P!==null)this.fileNameStr=P;else{var D=p.transformTo(I,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(D)}var U=this.findExtraFieldUnicodeComment();if(U!==null)this.fileCommentStr=U;else{var B=p.transformTo(I,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(B)}}},findExtraFieldUnicodePath:function(){var I=this.extraFields[28789];if(I){var P=u(I.value);return P.readInt(1)!==1||w(this.fileName)!==P.readInt(4)?null:S.utf8decode(P.readData(I.length-5))}return null},findExtraFieldUnicodeComment:function(){var I=this.extraFields[25461];if(I){var P=u(I.value);return P.readInt(1)!==1||w(this.fileComment)!==P.readInt(4)?null:S.utf8decode(P.readData(I.length-5))}return null}},f.exports=L},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,f,h){function u(P,D,U){this.name=P,this.dir=U.dir,this.date=U.date,this.comment=U.comment,this.unixPermissions=U.unixPermissions,this.dosPermissions=U.dosPermissions,this._data=D,this._dataBinary=U.binary,this.options={compression:U.compression,compressionOptions:U.compressionOptions}}var p=s("./stream/StreamHelper"),d=s("./stream/DataWorker"),w=s("./utf8"),S=s("./compressedObject"),A=s("./stream/GenericWorker");u.prototype={internalStream:function(P){var D=null,U="string";try{if(!P)throw new Error("No output type specified.");var B=(U=P.toLowerCase())==="string"||U==="text";U!=="binarystring"&&U!=="text"||(U="string"),D=this._decompressWorker();var k=!this._dataBinary;k&&!B&&(D=D.pipe(new w.Utf8EncodeWorker)),!k&&B&&(D=D.pipe(new w.Utf8DecodeWorker))}catch(C){(D=new A("error")).error(C)}return new p(D,U,"")},async:function(P,D){return this.internalStream(P).accumulate(D)},nodeStream:function(P,D){return this.internalStream(P||"nodebuffer").toNodejsStream(D)},_compressWorker:function(P,D){if(this._data instanceof S&&this._data.compression.magic===P.magic)return this._data.getCompressedWorker();var U=this._decompressWorker();return this._dataBinary||(U=U.pipe(new w.Utf8EncodeWorker)),S.createWorkerFrom(U,P,D)},_decompressWorker:function(){return this._data instanceof S?this._data.getContentWorker():this._data instanceof A?this._data:new d(this._data)}};for(var N=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],L=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},I=0;I<N.length;I++)u.prototype[N[I]]=L;f.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,f,h){(function(u){var p,d,w=u.MutationObserver||u.WebKitMutationObserver;if(w){var S=0,A=new w(P),N=u.document.createTextNode("");A.observe(N,{characterData:!0}),p=function(){N.data=S=++S%2}}else if(u.setImmediate||u.MessageChannel===void 0)p="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var D=u.document.createElement("script");D.onreadystatechange=function(){P(),D.onreadystatechange=null,D.parentNode.removeChild(D),D=null},u.document.documentElement.appendChild(D)}:function(){setTimeout(P,0)};else{var L=new u.MessageChannel;L.port1.onmessage=P,p=function(){L.port2.postMessage(0)}}var I=[];function P(){var D,U;d=!0;for(var B=I.length;B;){for(U=I,I=[],D=-1;++D<B;)U[D]();B=I.length}d=!1}f.exports=function(D){I.push(D)!==1||d||p()}}).call(this,o!==void 0?o:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,f,h){var u=s("immediate");function p(){}var d={},w=["REJECTED"],S=["FULFILLED"],A=["PENDING"];function N(B){if(typeof B!="function")throw new TypeError("resolver must be a function");this.state=A,this.queue=[],this.outcome=void 0,B!==p&&D(this,B)}function L(B,k,C){this.promise=B,typeof k=="function"&&(this.onFulfilled=k,this.callFulfilled=this.otherCallFulfilled),typeof C=="function"&&(this.onRejected=C,this.callRejected=this.otherCallRejected)}function I(B,k,C){u((function(){var v;try{v=k(C)}catch(m){return d.reject(B,m)}v===B?d.reject(B,new TypeError("Cannot resolve promise with itself")):d.resolve(B,v)}))}function P(B){var k=B&&B.then;if(B&&(typeof B=="object"||typeof B=="function")&&typeof k=="function")return function(){k.apply(B,arguments)}}function D(B,k){var C=!1;function v(g){C||(C=!0,d.reject(B,g))}function m(g){C||(C=!0,d.resolve(B,g))}var b=U((function(){k(m,v)}));b.status==="error"&&v(b.value)}function U(B,k){var C={};try{C.value=B(k),C.status="success"}catch(v){C.status="error",C.value=v}return C}(f.exports=N).prototype.finally=function(B){if(typeof B!="function")return this;var k=this.constructor;return this.then((function(C){return k.resolve(B()).then((function(){return C}))}),(function(C){return k.resolve(B()).then((function(){throw C}))}))},N.prototype.catch=function(B){return this.then(null,B)},N.prototype.then=function(B,k){if(typeof B!="function"&&this.state===S||typeof k!="function"&&this.state===w)return this;var C=new this.constructor(p);return this.state!==A?I(C,this.state===S?B:k,this.outcome):this.queue.push(new L(C,B,k)),C},L.prototype.callFulfilled=function(B){d.resolve(this.promise,B)},L.prototype.otherCallFulfilled=function(B){I(this.promise,this.onFulfilled,B)},L.prototype.callRejected=function(B){d.reject(this.promise,B)},L.prototype.otherCallRejected=function(B){I(this.promise,this.onRejected,B)},d.resolve=function(B,k){var C=U(P,k);if(C.status==="error")return d.reject(B,C.value);var v=C.value;if(v)D(B,v);else{B.state=S,B.outcome=k;for(var m=-1,b=B.queue.length;++m<b;)B.queue[m].callFulfilled(k)}return B},d.reject=function(B,k){B.state=w,B.outcome=k;for(var C=-1,v=B.queue.length;++C<v;)B.queue[C].callRejected(k);return B},N.resolve=function(B){return B instanceof this?B:d.resolve(new this(p),B)},N.reject=function(B){var k=new this(p);return d.reject(k,B)},N.all=function(B){var k=this;if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var C=B.length,v=!1;if(!C)return this.resolve([]);for(var m=new Array(C),b=0,g=-1,y=new this(p);++g<C;)E(B[g],g);return y;function E(R,O){k.resolve(R).then((function(z){m[O]=z,++b!==C||v||(v=!0,d.resolve(y,m))}),(function(z){v||(v=!0,d.reject(y,z))}))}},N.race=function(B){if(Object.prototype.toString.call(B)!=="[object Array]")return this.reject(new TypeError("must be an array"));var k=B.length,C=!1;if(!k)return this.resolve([]);for(var v,m=-1,b=new this(p);++m<k;)v=B[m],this.resolve(v).then((function(g){C||(C=!0,d.resolve(b,g))}),(function(g){C||(C=!0,d.reject(b,g))}));return b}},{immediate:36}],38:[function(s,f,h){var u={};(0,s("./lib/utils/common").assign)(u,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),f.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,f,h){var u=s("./zlib/deflate"),p=s("./utils/common"),d=s("./utils/strings"),w=s("./zlib/messages"),S=s("./zlib/zstream"),A=Object.prototype.toString;function N(I){if(!(this instanceof N))return new N(I);this.options=p.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},I||{});var P=this.options;P.raw&&0<P.windowBits?P.windowBits=-P.windowBits:P.gzip&&0<P.windowBits&&P.windowBits<16&&(P.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;var D=u.deflateInit2(this.strm,P.level,P.method,P.windowBits,P.memLevel,P.strategy);if(D!==0)throw new Error(w[D]);if(P.header&&u.deflateSetHeader(this.strm,P.header),P.dictionary){var U;if(U=typeof P.dictionary=="string"?d.string2buf(P.dictionary):A.call(P.dictionary)==="[object ArrayBuffer]"?new Uint8Array(P.dictionary):P.dictionary,(D=u.deflateSetDictionary(this.strm,U))!==0)throw new Error(w[D]);this._dict_set=!0}}function L(I,P){var D=new N(P);if(D.push(I,!0),D.err)throw D.msg||w[D.err];return D.result}N.prototype.push=function(I,P){var D,U,B=this.strm,k=this.options.chunkSize;if(this.ended)return!1;U=P===~~P?P:P===!0?4:0,typeof I=="string"?B.input=d.string2buf(I):A.call(I)==="[object ArrayBuffer]"?B.input=new Uint8Array(I):B.input=I,B.next_in=0,B.avail_in=B.input.length;do{if(B.avail_out===0&&(B.output=new p.Buf8(k),B.next_out=0,B.avail_out=k),(D=u.deflate(B,U))!==1&&D!==0)return this.onEnd(D),!(this.ended=!0);B.avail_out!==0&&(B.avail_in!==0||U!==4&&U!==2)||(this.options.to==="string"?this.onData(d.buf2binstring(p.shrinkBuf(B.output,B.next_out))):this.onData(p.shrinkBuf(B.output,B.next_out)))}while((0<B.avail_in||B.avail_out===0)&&D!==1);return U===4?(D=u.deflateEnd(this.strm),this.onEnd(D),this.ended=!0,D===0):U!==2||(this.onEnd(0),!(B.avail_out=0))},N.prototype.onData=function(I){this.chunks.push(I)},N.prototype.onEnd=function(I){I===0&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=p.flattenChunks(this.chunks)),this.chunks=[],this.err=I,this.msg=this.strm.msg},h.Deflate=N,h.deflate=L,h.deflateRaw=function(I,P){return(P=P||{}).raw=!0,L(I,P)},h.gzip=function(I,P){return(P=P||{}).gzip=!0,L(I,P)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,f,h){var u=s("./zlib/inflate"),p=s("./utils/common"),d=s("./utils/strings"),w=s("./zlib/constants"),S=s("./zlib/messages"),A=s("./zlib/zstream"),N=s("./zlib/gzheader"),L=Object.prototype.toString;function I(D){if(!(this instanceof I))return new I(D);this.options=p.assign({chunkSize:16384,windowBits:0,to:""},D||{});var U=this.options;U.raw&&0<=U.windowBits&&U.windowBits<16&&(U.windowBits=-U.windowBits,U.windowBits===0&&(U.windowBits=-15)),!(0<=U.windowBits&&U.windowBits<16)||D&&D.windowBits||(U.windowBits+=32),15<U.windowBits&&U.windowBits<48&&(15&U.windowBits)==0&&(U.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var B=u.inflateInit2(this.strm,U.windowBits);if(B!==w.Z_OK)throw new Error(S[B]);this.header=new N,u.inflateGetHeader(this.strm,this.header)}function P(D,U){var B=new I(U);if(B.push(D,!0),B.err)throw B.msg||S[B.err];return B.result}I.prototype.push=function(D,U){var B,k,C,v,m,b,g=this.strm,y=this.options.chunkSize,E=this.options.dictionary,R=!1;if(this.ended)return!1;k=U===~~U?U:U===!0?w.Z_FINISH:w.Z_NO_FLUSH,typeof D=="string"?g.input=d.binstring2buf(D):L.call(D)==="[object ArrayBuffer]"?g.input=new Uint8Array(D):g.input=D,g.next_in=0,g.avail_in=g.input.length;do{if(g.avail_out===0&&(g.output=new p.Buf8(y),g.next_out=0,g.avail_out=y),(B=u.inflate(g,w.Z_NO_FLUSH))===w.Z_NEED_DICT&&E&&(b=typeof E=="string"?d.string2buf(E):L.call(E)==="[object ArrayBuffer]"?new Uint8Array(E):E,B=u.inflateSetDictionary(this.strm,b)),B===w.Z_BUF_ERROR&&R===!0&&(B=w.Z_OK,R=!1),B!==w.Z_STREAM_END&&B!==w.Z_OK)return this.onEnd(B),!(this.ended=!0);g.next_out&&(g.avail_out!==0&&B!==w.Z_STREAM_END&&(g.avail_in!==0||k!==w.Z_FINISH&&k!==w.Z_SYNC_FLUSH)||(this.options.to==="string"?(C=d.utf8border(g.output,g.next_out),v=g.next_out-C,m=d.buf2string(g.output,C),g.next_out=v,g.avail_out=y-v,v&&p.arraySet(g.output,g.output,C,v,0),this.onData(m)):this.onData(p.shrinkBuf(g.output,g.next_out)))),g.avail_in===0&&g.avail_out===0&&(R=!0)}while((0<g.avail_in||g.avail_out===0)&&B!==w.Z_STREAM_END);return B===w.Z_STREAM_END&&(k=w.Z_FINISH),k===w.Z_FINISH?(B=u.inflateEnd(this.strm),this.onEnd(B),this.ended=!0,B===w.Z_OK):k!==w.Z_SYNC_FLUSH||(this.onEnd(w.Z_OK),!(g.avail_out=0))},I.prototype.onData=function(D){this.chunks.push(D)},I.prototype.onEnd=function(D){D===w.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=p.flattenChunks(this.chunks)),this.chunks=[],this.err=D,this.msg=this.strm.msg},h.Inflate=I,h.inflate=P,h.inflateRaw=function(D,U){return(U=U||{}).raw=!0,P(D,U)},h.ungzip=P},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(s,f,h){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";h.assign=function(w){for(var S=Array.prototype.slice.call(arguments,1);S.length;){var A=S.shift();if(A){if(typeof A!="object")throw new TypeError(A+"must be non-object");for(var N in A)A.hasOwnProperty(N)&&(w[N]=A[N])}}return w},h.shrinkBuf=function(w,S){return w.length===S?w:w.subarray?w.subarray(0,S):(w.length=S,w)};var p={arraySet:function(w,S,A,N,L){if(S.subarray&&w.subarray)w.set(S.subarray(A,A+N),L);else for(var I=0;I<N;I++)w[L+I]=S[A+I]},flattenChunks:function(w){var S,A,N,L,I,P;for(S=N=0,A=w.length;S<A;S++)N+=w[S].length;for(P=new Uint8Array(N),S=L=0,A=w.length;S<A;S++)I=w[S],P.set(I,L),L+=I.length;return P}},d={arraySet:function(w,S,A,N,L){for(var I=0;I<N;I++)w[L+I]=S[A+I]},flattenChunks:function(w){return[].concat.apply([],w)}};h.setTyped=function(w){w?(h.Buf8=Uint8Array,h.Buf16=Uint16Array,h.Buf32=Int32Array,h.assign(h,p)):(h.Buf8=Array,h.Buf16=Array,h.Buf32=Array,h.assign(h,d))},h.setTyped(u)},{}],42:[function(s,f,h){var u=s("./common"),p=!0,d=!0;try{String.fromCharCode.apply(null,[0])}catch{p=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{d=!1}for(var w=new u.Buf8(256),S=0;S<256;S++)w[S]=252<=S?6:248<=S?5:240<=S?4:224<=S?3:192<=S?2:1;function A(N,L){if(L<65537&&(N.subarray&&d||!N.subarray&&p))return String.fromCharCode.apply(null,u.shrinkBuf(N,L));for(var I="",P=0;P<L;P++)I+=String.fromCharCode(N[P]);return I}w[254]=w[254]=1,h.string2buf=function(N){var L,I,P,D,U,B=N.length,k=0;for(D=0;D<B;D++)(64512&(I=N.charCodeAt(D)))==55296&&D+1<B&&(64512&(P=N.charCodeAt(D+1)))==56320&&(I=65536+(I-55296<<10)+(P-56320),D++),k+=I<128?1:I<2048?2:I<65536?3:4;for(L=new u.Buf8(k),D=U=0;U<k;D++)(64512&(I=N.charCodeAt(D)))==55296&&D+1<B&&(64512&(P=N.charCodeAt(D+1)))==56320&&(I=65536+(I-55296<<10)+(P-56320),D++),I<128?L[U++]=I:(I<2048?L[U++]=192|I>>>6:(I<65536?L[U++]=224|I>>>12:(L[U++]=240|I>>>18,L[U++]=128|I>>>12&63),L[U++]=128|I>>>6&63),L[U++]=128|63&I);return L},h.buf2binstring=function(N){return A(N,N.length)},h.binstring2buf=function(N){for(var L=new u.Buf8(N.length),I=0,P=L.length;I<P;I++)L[I]=N.charCodeAt(I);return L},h.buf2string=function(N,L){var I,P,D,U,B=L||N.length,k=new Array(2*B);for(I=P=0;I<B;)if((D=N[I++])<128)k[P++]=D;else if(4<(U=w[D]))k[P++]=65533,I+=U-1;else{for(D&=U===2?31:U===3?15:7;1<U&&I<B;)D=D<<6|63&N[I++],U--;1<U?k[P++]=65533:D<65536?k[P++]=D:(D-=65536,k[P++]=55296|D>>10&1023,k[P++]=56320|1023&D)}return A(k,P)},h.utf8border=function(N,L){var I;for((L=L||N.length)>N.length&&(L=N.length),I=L-1;0<=I&&(192&N[I])==128;)I--;return I<0||I===0?L:I+w[N[I]]>L?I:L}},{"./common":41}],43:[function(s,f,h){f.exports=function(u,p,d,w){for(var S=65535&u|0,A=u>>>16&65535|0,N=0;d!==0;){for(d-=N=2e3<d?2e3:d;A=A+(S=S+p[w++]|0)|0,--N;);S%=65521,A%=65521}return S|A<<16|0}},{}],44:[function(s,f,h){f.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}},{}],45:[function(s,f,h){var u=(function(){for(var p,d=[],w=0;w<256;w++){p=w;for(var S=0;S<8;S++)p=1&p?3988292384^p>>>1:p>>>1;d[w]=p}return d})();f.exports=function(p,d,w,S){var A=u,N=S+w;p^=-1;for(var L=S;L<N;L++)p=p>>>8^A[255&(p^d[L])];return-1^p}},{}],46:[function(s,f,h){var u,p=s("../utils/common"),d=s("./trees"),w=s("./adler32"),S=s("./crc32"),A=s("./messages"),N=-2,L=258,I=262,P=113;function D(j,H){return j.msg=A[H],H}function U(j){return(j<<1)-(4<j?9:0)}function B(j){for(var H=j.length;0<=--H;)j[H]=0}function k(j){var H=j.state,T=H.pending;T>j.avail_out&&(T=j.avail_out),T!==0&&(p.arraySet(j.output,H.pending_buf,H.pending_out,T,j.next_out),j.next_out+=T,H.pending_out+=T,j.total_out+=T,j.avail_out-=T,H.pending-=T,H.pending===0&&(H.pending_out=0))}function C(j,H){d._tr_flush_block(j,0<=j.block_start?j.block_start:-1,j.strstart-j.block_start,H),j.block_start=j.strstart,k(j.strm)}function v(j,H){j.pending_buf[j.pending++]=H}function m(j,H){j.pending_buf[j.pending++]=H>>>8&255,j.pending_buf[j.pending++]=255&H}function b(j,H){var T,M,F=j.max_chain_length,V=j.strstart,Y=j.prev_length,q=j.nice_match,K=j.strstart>j.w_size-I?j.strstart-(j.w_size-I):0,nt=j.window,rt=j.w_mask,G=j.prev,tt=j.strstart+L,Q=nt[V+Y-1],st=nt[V+Y];j.prev_length>=j.good_match&&(F>>=2),q>j.lookahead&&(q=j.lookahead);do if(nt[(T=H)+Y]===st&&nt[T+Y-1]===Q&&nt[T]===nt[V]&&nt[++T]===nt[V+1]){V+=2,T++;do;while(nt[++V]===nt[++T]&&nt[++V]===nt[++T]&&nt[++V]===nt[++T]&&nt[++V]===nt[++T]&&nt[++V]===nt[++T]&&nt[++V]===nt[++T]&&nt[++V]===nt[++T]&&nt[++V]===nt[++T]&&V<tt);if(M=L-(tt-V),V=tt-L,Y<M){if(j.match_start=H,q<=(Y=M))break;Q=nt[V+Y-1],st=nt[V+Y]}}while((H=G[H&rt])>K&&--F!=0);return Y<=j.lookahead?Y:j.lookahead}function g(j){var H,T,M,F,V,Y,q,K,nt,rt,G=j.w_size;do{if(F=j.window_size-j.lookahead-j.strstart,j.strstart>=G+(G-I)){for(p.arraySet(j.window,j.window,G,G,0),j.match_start-=G,j.strstart-=G,j.block_start-=G,H=T=j.hash_size;M=j.head[--H],j.head[H]=G<=M?M-G:0,--T;);for(H=T=G;M=j.prev[--H],j.prev[H]=G<=M?M-G:0,--T;);F+=G}if(j.strm.avail_in===0)break;if(Y=j.strm,q=j.window,K=j.strstart+j.lookahead,rt=void 0,(nt=F)<(rt=Y.avail_in)&&(rt=nt),T=rt===0?0:(Y.avail_in-=rt,p.arraySet(q,Y.input,Y.next_in,rt,K),Y.state.wrap===1?Y.adler=w(Y.adler,q,rt,K):Y.state.wrap===2&&(Y.adler=S(Y.adler,q,rt,K)),Y.next_in+=rt,Y.total_in+=rt,rt),j.lookahead+=T,j.lookahead+j.insert>=3)for(V=j.strstart-j.insert,j.ins_h=j.window[V],j.ins_h=(j.ins_h<<j.hash_shift^j.window[V+1])&j.hash_mask;j.insert&&(j.ins_h=(j.ins_h<<j.hash_shift^j.window[V+3-1])&j.hash_mask,j.prev[V&j.w_mask]=j.head[j.ins_h],j.head[j.ins_h]=V,V++,j.insert--,!(j.lookahead+j.insert<3)););}while(j.lookahead<I&&j.strm.avail_in!==0)}function y(j,H){for(var T,M;;){if(j.lookahead<I){if(g(j),j.lookahead<I&&H===0)return 1;if(j.lookahead===0)break}if(T=0,j.lookahead>=3&&(j.ins_h=(j.ins_h<<j.hash_shift^j.window[j.strstart+3-1])&j.hash_mask,T=j.prev[j.strstart&j.w_mask]=j.head[j.ins_h],j.head[j.ins_h]=j.strstart),T!==0&&j.strstart-T<=j.w_size-I&&(j.match_length=b(j,T)),j.match_length>=3)if(M=d._tr_tally(j,j.strstart-j.match_start,j.match_length-3),j.lookahead-=j.match_length,j.match_length<=j.max_lazy_match&&j.lookahead>=3){for(j.match_length--;j.strstart++,j.ins_h=(j.ins_h<<j.hash_shift^j.window[j.strstart+3-1])&j.hash_mask,T=j.prev[j.strstart&j.w_mask]=j.head[j.ins_h],j.head[j.ins_h]=j.strstart,--j.match_length!=0;);j.strstart++}else j.strstart+=j.match_length,j.match_length=0,j.ins_h=j.window[j.strstart],j.ins_h=(j.ins_h<<j.hash_shift^j.window[j.strstart+1])&j.hash_mask;else M=d._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++;if(M&&(C(j,!1),j.strm.avail_out===0))return 1}return j.insert=j.strstart<2?j.strstart:2,H===4?(C(j,!0),j.strm.avail_out===0?3:4):j.last_lit&&(C(j,!1),j.strm.avail_out===0)?1:2}function E(j,H){for(var T,M,F;;){if(j.lookahead<I){if(g(j),j.lookahead<I&&H===0)return 1;if(j.lookahead===0)break}if(T=0,j.lookahead>=3&&(j.ins_h=(j.ins_h<<j.hash_shift^j.window[j.strstart+3-1])&j.hash_mask,T=j.prev[j.strstart&j.w_mask]=j.head[j.ins_h],j.head[j.ins_h]=j.strstart),j.prev_length=j.match_length,j.prev_match=j.match_start,j.match_length=2,T!==0&&j.prev_length<j.max_lazy_match&&j.strstart-T<=j.w_size-I&&(j.match_length=b(j,T),j.match_length<=5&&(j.strategy===1||j.match_length===3&&4096<j.strstart-j.match_start)&&(j.match_length=2)),j.prev_length>=3&&j.match_length<=j.prev_length){for(F=j.strstart+j.lookahead-3,M=d._tr_tally(j,j.strstart-1-j.prev_match,j.prev_length-3),j.lookahead-=j.prev_length-1,j.prev_length-=2;++j.strstart<=F&&(j.ins_h=(j.ins_h<<j.hash_shift^j.window[j.strstart+3-1])&j.hash_mask,T=j.prev[j.strstart&j.w_mask]=j.head[j.ins_h],j.head[j.ins_h]=j.strstart),--j.prev_length!=0;);if(j.match_available=0,j.match_length=2,j.strstart++,M&&(C(j,!1),j.strm.avail_out===0))return 1}else if(j.match_available){if((M=d._tr_tally(j,0,j.window[j.strstart-1]))&&C(j,!1),j.strstart++,j.lookahead--,j.strm.avail_out===0)return 1}else j.match_available=1,j.strstart++,j.lookahead--}return j.match_available&&(M=d._tr_tally(j,0,j.window[j.strstart-1]),j.match_available=0),j.insert=j.strstart<2?j.strstart:2,H===4?(C(j,!0),j.strm.avail_out===0?3:4):j.last_lit&&(C(j,!1),j.strm.avail_out===0)?1:2}function R(j,H,T,M,F){this.good_length=j,this.max_lazy=H,this.nice_length=T,this.max_chain=M,this.func=F}function O(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new p.Buf16(1146),this.dyn_dtree=new p.Buf16(122),this.bl_tree=new p.Buf16(78),B(this.dyn_ltree),B(this.dyn_dtree),B(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new p.Buf16(16),this.heap=new p.Buf16(573),B(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new p.Buf16(573),B(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function z(j){var H;return j&&j.state?(j.total_in=j.total_out=0,j.data_type=2,(H=j.state).pending=0,H.pending_out=0,H.wrap<0&&(H.wrap=-H.wrap),H.status=H.wrap?42:P,j.adler=H.wrap===2?0:1,H.last_flush=0,d._tr_init(H),0):D(j,N)}function $(j){var H=z(j);return H===0&&(function(T){T.window_size=2*T.w_size,B(T.head),T.max_lazy_match=u[T.level].max_lazy,T.good_match=u[T.level].good_length,T.nice_match=u[T.level].nice_length,T.max_chain_length=u[T.level].max_chain,T.strstart=0,T.block_start=0,T.lookahead=0,T.insert=0,T.match_length=T.prev_length=2,T.match_available=0,T.ins_h=0})(j.state),H}function Z(j,H,T,M,F,V){if(!j)return N;var Y=1;if(H===-1&&(H=6),M<0?(Y=0,M=-M):15<M&&(Y=2,M-=16),F<1||9<F||T!==8||M<8||15<M||H<0||9<H||V<0||4<V)return D(j,N);M===8&&(M=9);var q=new O;return(j.state=q).strm=j,q.wrap=Y,q.gzhead=null,q.w_bits=M,q.w_size=1<<q.w_bits,q.w_mask=q.w_size-1,q.hash_bits=F+7,q.hash_size=1<<q.hash_bits,q.hash_mask=q.hash_size-1,q.hash_shift=~~((q.hash_bits+3-1)/3),q.window=new p.Buf8(2*q.w_size),q.head=new p.Buf16(q.hash_size),q.prev=new p.Buf16(q.w_size),q.lit_bufsize=1<<F+6,q.pending_buf_size=4*q.lit_bufsize,q.pending_buf=new p.Buf8(q.pending_buf_size),q.d_buf=1*q.lit_bufsize,q.l_buf=3*q.lit_bufsize,q.level=H,q.strategy=V,q.method=T,$(j)}u=[new R(0,0,0,0,(function(j,H){var T=65535;for(T>j.pending_buf_size-5&&(T=j.pending_buf_size-5);;){if(j.lookahead<=1){if(g(j),j.lookahead===0&&H===0)return 1;if(j.lookahead===0)break}j.strstart+=j.lookahead,j.lookahead=0;var M=j.block_start+T;if((j.strstart===0||j.strstart>=M)&&(j.lookahead=j.strstart-M,j.strstart=M,C(j,!1),j.strm.avail_out===0)||j.strstart-j.block_start>=j.w_size-I&&(C(j,!1),j.strm.avail_out===0))return 1}return j.insert=0,H===4?(C(j,!0),j.strm.avail_out===0?3:4):(j.strstart>j.block_start&&(C(j,!1),j.strm.avail_out),1)})),new R(4,4,8,4,y),new R(4,5,16,8,y),new R(4,6,32,32,y),new R(4,4,16,16,E),new R(8,16,32,32,E),new R(8,16,128,128,E),new R(8,32,128,256,E),new R(32,128,258,1024,E),new R(32,258,258,4096,E)],h.deflateInit=function(j,H){return Z(j,H,8,15,8,0)},h.deflateInit2=Z,h.deflateReset=$,h.deflateResetKeep=z,h.deflateSetHeader=function(j,H){return j&&j.state?j.state.wrap!==2?N:(j.state.gzhead=H,0):N},h.deflate=function(j,H){var T,M,F,V;if(!j||!j.state||5<H||H<0)return j?D(j,N):N;if(M=j.state,!j.output||!j.input&&j.avail_in!==0||M.status===666&&H!==4)return D(j,j.avail_out===0?-5:N);if(M.strm=j,T=M.last_flush,M.last_flush=H,M.status===42)if(M.wrap===2)j.adler=0,v(M,31),v(M,139),v(M,8),M.gzhead?(v(M,(M.gzhead.text?1:0)+(M.gzhead.hcrc?2:0)+(M.gzhead.extra?4:0)+(M.gzhead.name?8:0)+(M.gzhead.comment?16:0)),v(M,255&M.gzhead.time),v(M,M.gzhead.time>>8&255),v(M,M.gzhead.time>>16&255),v(M,M.gzhead.time>>24&255),v(M,M.level===9?2:2<=M.strategy||M.level<2?4:0),v(M,255&M.gzhead.os),M.gzhead.extra&&M.gzhead.extra.length&&(v(M,255&M.gzhead.extra.length),v(M,M.gzhead.extra.length>>8&255)),M.gzhead.hcrc&&(j.adler=S(j.adler,M.pending_buf,M.pending,0)),M.gzindex=0,M.status=69):(v(M,0),v(M,0),v(M,0),v(M,0),v(M,0),v(M,M.level===9?2:2<=M.strategy||M.level<2?4:0),v(M,3),M.status=P);else{var Y=8+(M.w_bits-8<<4)<<8;Y|=(2<=M.strategy||M.level<2?0:M.level<6?1:M.level===6?2:3)<<6,M.strstart!==0&&(Y|=32),Y+=31-Y%31,M.status=P,m(M,Y),M.strstart!==0&&(m(M,j.adler>>>16),m(M,65535&j.adler)),j.adler=1}if(M.status===69)if(M.gzhead.extra){for(F=M.pending;M.gzindex<(65535&M.gzhead.extra.length)&&(M.pending!==M.pending_buf_size||(M.gzhead.hcrc&&M.pending>F&&(j.adler=S(j.adler,M.pending_buf,M.pending-F,F)),k(j),F=M.pending,M.pending!==M.pending_buf_size));)v(M,255&M.gzhead.extra[M.gzindex]),M.gzindex++;M.gzhead.hcrc&&M.pending>F&&(j.adler=S(j.adler,M.pending_buf,M.pending-F,F)),M.gzindex===M.gzhead.extra.length&&(M.gzindex=0,M.status=73)}else M.status=73;if(M.status===73)if(M.gzhead.name){F=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>F&&(j.adler=S(j.adler,M.pending_buf,M.pending-F,F)),k(j),F=M.pending,M.pending===M.pending_buf_size)){V=1;break}V=M.gzindex<M.gzhead.name.length?255&M.gzhead.name.charCodeAt(M.gzindex++):0,v(M,V)}while(V!==0);M.gzhead.hcrc&&M.pending>F&&(j.adler=S(j.adler,M.pending_buf,M.pending-F,F)),V===0&&(M.gzindex=0,M.status=91)}else M.status=91;if(M.status===91)if(M.gzhead.comment){F=M.pending;do{if(M.pending===M.pending_buf_size&&(M.gzhead.hcrc&&M.pending>F&&(j.adler=S(j.adler,M.pending_buf,M.pending-F,F)),k(j),F=M.pending,M.pending===M.pending_buf_size)){V=1;break}V=M.gzindex<M.gzhead.comment.length?255&M.gzhead.comment.charCodeAt(M.gzindex++):0,v(M,V)}while(V!==0);M.gzhead.hcrc&&M.pending>F&&(j.adler=S(j.adler,M.pending_buf,M.pending-F,F)),V===0&&(M.status=103)}else M.status=103;if(M.status===103&&(M.gzhead.hcrc?(M.pending+2>M.pending_buf_size&&k(j),M.pending+2<=M.pending_buf_size&&(v(M,255&j.adler),v(M,j.adler>>8&255),j.adler=0,M.status=P)):M.status=P),M.pending!==0){if(k(j),j.avail_out===0)return M.last_flush=-1,0}else if(j.avail_in===0&&U(H)<=U(T)&&H!==4)return D(j,-5);if(M.status===666&&j.avail_in!==0)return D(j,-5);if(j.avail_in!==0||M.lookahead!==0||H!==0&&M.status!==666){var q=M.strategy===2?(function(K,nt){for(var rt;;){if(K.lookahead===0&&(g(K),K.lookahead===0)){if(nt===0)return 1;break}if(K.match_length=0,rt=d._tr_tally(K,0,K.window[K.strstart]),K.lookahead--,K.strstart++,rt&&(C(K,!1),K.strm.avail_out===0))return 1}return K.insert=0,nt===4?(C(K,!0),K.strm.avail_out===0?3:4):K.last_lit&&(C(K,!1),K.strm.avail_out===0)?1:2})(M,H):M.strategy===3?(function(K,nt){for(var rt,G,tt,Q,st=K.window;;){if(K.lookahead<=L){if(g(K),K.lookahead<=L&&nt===0)return 1;if(K.lookahead===0)break}if(K.match_length=0,K.lookahead>=3&&0<K.strstart&&(G=st[tt=K.strstart-1])===st[++tt]&&G===st[++tt]&&G===st[++tt]){Q=K.strstart+L;do;while(G===st[++tt]&&G===st[++tt]&&G===st[++tt]&&G===st[++tt]&&G===st[++tt]&&G===st[++tt]&&G===st[++tt]&&G===st[++tt]&&tt<Q);K.match_length=L-(Q-tt),K.match_length>K.lookahead&&(K.match_length=K.lookahead)}if(K.match_length>=3?(rt=d._tr_tally(K,1,K.match_length-3),K.lookahead-=K.match_length,K.strstart+=K.match_length,K.match_length=0):(rt=d._tr_tally(K,0,K.window[K.strstart]),K.lookahead--,K.strstart++),rt&&(C(K,!1),K.strm.avail_out===0))return 1}return K.insert=0,nt===4?(C(K,!0),K.strm.avail_out===0?3:4):K.last_lit&&(C(K,!1),K.strm.avail_out===0)?1:2})(M,H):u[M.level].func(M,H);if(q!==3&&q!==4||(M.status=666),q===1||q===3)return j.avail_out===0&&(M.last_flush=-1),0;if(q===2&&(H===1?d._tr_align(M):H!==5&&(d._tr_stored_block(M,0,0,!1),H===3&&(B(M.head),M.lookahead===0&&(M.strstart=0,M.block_start=0,M.insert=0))),k(j),j.avail_out===0))return M.last_flush=-1,0}return H!==4?0:M.wrap<=0?1:(M.wrap===2?(v(M,255&j.adler),v(M,j.adler>>8&255),v(M,j.adler>>16&255),v(M,j.adler>>24&255),v(M,255&j.total_in),v(M,j.total_in>>8&255),v(M,j.total_in>>16&255),v(M,j.total_in>>24&255)):(m(M,j.adler>>>16),m(M,65535&j.adler)),k(j),0<M.wrap&&(M.wrap=-M.wrap),M.pending!==0?0:1)},h.deflateEnd=function(j){var H;return j&&j.state?(H=j.state.status)!==42&&H!==69&&H!==73&&H!==91&&H!==103&&H!==P&&H!==666?D(j,N):(j.state=null,H===P?D(j,-3):0):N},h.deflateSetDictionary=function(j,H){var T,M,F,V,Y,q,K,nt,rt=H.length;if(!j||!j.state||(V=(T=j.state).wrap)===2||V===1&&T.status!==42||T.lookahead)return N;for(V===1&&(j.adler=w(j.adler,H,rt,0)),T.wrap=0,rt>=T.w_size&&(V===0&&(B(T.head),T.strstart=0,T.block_start=0,T.insert=0),nt=new p.Buf8(T.w_size),p.arraySet(nt,H,rt-T.w_size,T.w_size,0),H=nt,rt=T.w_size),Y=j.avail_in,q=j.next_in,K=j.input,j.avail_in=rt,j.next_in=0,j.input=H,g(T);T.lookahead>=3;){for(M=T.strstart,F=T.lookahead-2;T.ins_h=(T.ins_h<<T.hash_shift^T.window[M+3-1])&T.hash_mask,T.prev[M&T.w_mask]=T.head[T.ins_h],T.head[T.ins_h]=M,M++,--F;);T.strstart=M,T.lookahead=2,g(T)}return T.strstart+=T.lookahead,T.block_start=T.strstart,T.insert=T.lookahead,T.lookahead=0,T.match_length=T.prev_length=2,T.match_available=0,j.next_in=q,j.input=K,j.avail_in=Y,T.wrap=V,0},h.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,f,h){f.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(s,f,h){f.exports=function(u,p){var d,w,S,A,N,L,I,P,D,U,B,k,C,v,m,b,g,y,E,R,O,z,$,Z,j;d=u.state,w=u.next_in,Z=u.input,S=w+(u.avail_in-5),A=u.next_out,j=u.output,N=A-(p-u.avail_out),L=A+(u.avail_out-257),I=d.dmax,P=d.wsize,D=d.whave,U=d.wnext,B=d.window,k=d.hold,C=d.bits,v=d.lencode,m=d.distcode,b=(1<<d.lenbits)-1,g=(1<<d.distbits)-1;t:do{C<15&&(k+=Z[w++]<<C,C+=8,k+=Z[w++]<<C,C+=8),y=v[k&b];e:for(;;){if(k>>>=E=y>>>24,C-=E,(E=y>>>16&255)==0)j[A++]=65535&y;else{if(!(16&E)){if((64&E)==0){y=v[(65535&y)+(k&(1<<E)-1)];continue e}if(32&E){d.mode=12;break t}u.msg="invalid literal/length code",d.mode=30;break t}R=65535&y,(E&=15)&&(C<E&&(k+=Z[w++]<<C,C+=8),R+=k&(1<<E)-1,k>>>=E,C-=E),C<15&&(k+=Z[w++]<<C,C+=8,k+=Z[w++]<<C,C+=8),y=m[k&g];r:for(;;){if(k>>>=E=y>>>24,C-=E,!(16&(E=y>>>16&255))){if((64&E)==0){y=m[(65535&y)+(k&(1<<E)-1)];continue r}u.msg="invalid distance code",d.mode=30;break t}if(O=65535&y,C<(E&=15)&&(k+=Z[w++]<<C,(C+=8)<E&&(k+=Z[w++]<<C,C+=8)),I<(O+=k&(1<<E)-1)){u.msg="invalid distance too far back",d.mode=30;break t}if(k>>>=E,C-=E,(E=A-N)<O){if(D<(E=O-E)&&d.sane){u.msg="invalid distance too far back",d.mode=30;break t}if($=B,(z=0)===U){if(z+=P-E,E<R){for(R-=E;j[A++]=B[z++],--E;);z=A-O,$=j}}else if(U<E){if(z+=P+U-E,(E-=U)<R){for(R-=E;j[A++]=B[z++],--E;);if(z=0,U<R){for(R-=E=U;j[A++]=B[z++],--E;);z=A-O,$=j}}}else if(z+=U-E,E<R){for(R-=E;j[A++]=B[z++],--E;);z=A-O,$=j}for(;2<R;)j[A++]=$[z++],j[A++]=$[z++],j[A++]=$[z++],R-=3;R&&(j[A++]=$[z++],1<R&&(j[A++]=$[z++]))}else{for(z=A-O;j[A++]=j[z++],j[A++]=j[z++],j[A++]=j[z++],2<(R-=3););R&&(j[A++]=j[z++],1<R&&(j[A++]=j[z++]))}break}}break}}while(w<S&&A<L);w-=R=C>>3,k&=(1<<(C-=R<<3))-1,u.next_in=w,u.next_out=A,u.avail_in=w<S?S-w+5:5-(w-S),u.avail_out=A<L?L-A+257:257-(A-L),d.hold=k,d.bits=C}},{}],49:[function(s,f,h){var u=s("../utils/common"),p=s("./adler32"),d=s("./crc32"),w=s("./inffast"),S=s("./inftrees"),A=-2;function N(b){return(b>>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function L(){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 u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function I(b){var g;return b&&b.state?(g=b.state,b.total_in=b.total_out=g.total=0,b.msg="",g.wrap&&(b.adler=1&g.wrap),g.mode=1,g.last=0,g.havedict=0,g.dmax=32768,g.head=null,g.hold=0,g.bits=0,g.lencode=g.lendyn=new u.Buf32(852),g.distcode=g.distdyn=new u.Buf32(592),g.sane=1,g.back=-1,0):A}function P(b){var g;return b&&b.state?((g=b.state).wsize=0,g.whave=0,g.wnext=0,I(b)):A}function D(b,g){var y,E;return b&&b.state?(E=b.state,g<0?(y=0,g=-g):(y=1+(g>>4),g<48&&(g&=15)),g&&(g<8||15<g)?A:(E.window!==null&&E.wbits!==g&&(E.window=null),E.wrap=y,E.wbits=g,P(b))):A}function U(b,g){var y,E;return b?(E=new L,(b.state=E).window=null,(y=D(b,g))!==0&&(b.state=null),y):A}var B,k,C=!0;function v(b){if(C){var g;for(B=new u.Buf32(512),k=new u.Buf32(32),g=0;g<144;)b.lens[g++]=8;for(;g<256;)b.lens[g++]=9;for(;g<280;)b.lens[g++]=7;for(;g<288;)b.lens[g++]=8;for(S(1,b.lens,0,288,B,0,b.work,{bits:9}),g=0;g<32;)b.lens[g++]=5;S(2,b.lens,0,32,k,0,b.work,{bits:5}),C=!1}b.lencode=B,b.lenbits=9,b.distcode=k,b.distbits=5}function m(b,g,y,E){var R,O=b.state;return O.window===null&&(O.wsize=1<<O.wbits,O.wnext=0,O.whave=0,O.window=new u.Buf8(O.wsize)),E>=O.wsize?(u.arraySet(O.window,g,y-O.wsize,O.wsize,0),O.wnext=0,O.whave=O.wsize):(E<(R=O.wsize-O.wnext)&&(R=E),u.arraySet(O.window,g,y-E,R,O.wnext),(E-=R)?(u.arraySet(O.window,g,y-E,E,0),O.wnext=E,O.whave=O.wsize):(O.wnext+=R,O.wnext===O.wsize&&(O.wnext=0),O.whave<O.wsize&&(O.whave+=R))),0}h.inflateReset=P,h.inflateReset2=D,h.inflateResetKeep=I,h.inflateInit=function(b){return U(b,15)},h.inflateInit2=U,h.inflate=function(b,g){var y,E,R,O,z,$,Z,j,H,T,M,F,V,Y,q,K,nt,rt,G,tt,Q,st,it,at,ut=0,ft=new u.Buf8(4),dt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||!b.output||!b.input&&b.avail_in!==0)return A;(y=b.state).mode===12&&(y.mode=13),z=b.next_out,R=b.output,Z=b.avail_out,O=b.next_in,E=b.input,$=b.avail_in,j=y.hold,H=y.bits,T=$,M=Z,st=0;t:for(;;)switch(y.mode){case 1:if(y.wrap===0){y.mode=13;break}for(;H<16;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}if(2&y.wrap&&j===35615){ft[y.check=0]=255&j,ft[1]=j>>>8&255,y.check=d(y.check,ft,2,0),H=j=0,y.mode=2;break}if(y.flags=0,y.head&&(y.head.done=!1),!(1&y.wrap)||(((255&j)<<8)+(j>>8))%31){b.msg="incorrect header check",y.mode=30;break}if((15&j)!=8){b.msg="unknown compression method",y.mode=30;break}if(H-=4,Q=8+(15&(j>>>=4)),y.wbits===0)y.wbits=Q;else if(Q>y.wbits){b.msg="invalid window size",y.mode=30;break}y.dmax=1<<Q,b.adler=y.check=1,y.mode=512&j?10:12,H=j=0;break;case 2:for(;H<16;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}if(y.flags=j,(255&y.flags)!=8){b.msg="unknown compression method",y.mode=30;break}if(57344&y.flags){b.msg="unknown header flags set",y.mode=30;break}y.head&&(y.head.text=j>>8&1),512&y.flags&&(ft[0]=255&j,ft[1]=j>>>8&255,y.check=d(y.check,ft,2,0)),H=j=0,y.mode=3;case 3:for(;H<32;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}y.head&&(y.head.time=j),512&y.flags&&(ft[0]=255&j,ft[1]=j>>>8&255,ft[2]=j>>>16&255,ft[3]=j>>>24&255,y.check=d(y.check,ft,4,0)),H=j=0,y.mode=4;case 4:for(;H<16;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}y.head&&(y.head.xflags=255&j,y.head.os=j>>8),512&y.flags&&(ft[0]=255&j,ft[1]=j>>>8&255,y.check=d(y.check,ft,2,0)),H=j=0,y.mode=5;case 5:if(1024&y.flags){for(;H<16;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}y.length=j,y.head&&(y.head.extra_len=j),512&y.flags&&(ft[0]=255&j,ft[1]=j>>>8&255,y.check=d(y.check,ft,2,0)),H=j=0}else y.head&&(y.head.extra=null);y.mode=6;case 6:if(1024&y.flags&&($<(F=y.length)&&(F=$),F&&(y.head&&(Q=y.head.extra_len-y.length,y.head.extra||(y.head.extra=new Array(y.head.extra_len)),u.arraySet(y.head.extra,E,O,F,Q)),512&y.flags&&(y.check=d(y.check,E,F,O)),$-=F,O+=F,y.length-=F),y.length))break t;y.length=0,y.mode=7;case 7:if(2048&y.flags){if($===0)break t;for(F=0;Q=E[O+F++],y.head&&Q&&y.length<65536&&(y.head.name+=String.fromCharCode(Q)),Q&&F<$;);if(512&y.flags&&(y.check=d(y.check,E,F,O)),$-=F,O+=F,Q)break t}else y.head&&(y.head.name=null);y.length=0,y.mode=8;case 8:if(4096&y.flags){if($===0)break t;for(F=0;Q=E[O+F++],y.head&&Q&&y.length<65536&&(y.head.comment+=String.fromCharCode(Q)),Q&&F<$;);if(512&y.flags&&(y.check=d(y.check,E,F,O)),$-=F,O+=F,Q)break t}else y.head&&(y.head.comment=null);y.mode=9;case 9:if(512&y.flags){for(;H<16;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}if(j!==(65535&y.check)){b.msg="header crc mismatch",y.mode=30;break}H=j=0}y.head&&(y.head.hcrc=y.flags>>9&1,y.head.done=!0),b.adler=y.check=0,y.mode=12;break;case 10:for(;H<32;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}b.adler=y.check=N(j),H=j=0,y.mode=11;case 11:if(y.havedict===0)return b.next_out=z,b.avail_out=Z,b.next_in=O,b.avail_in=$,y.hold=j,y.bits=H,2;b.adler=y.check=1,y.mode=12;case 12:if(g===5||g===6)break t;case 13:if(y.last){j>>>=7&H,H-=7&H,y.mode=27;break}for(;H<3;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}switch(y.last=1&j,H-=1,3&(j>>>=1)){case 0:y.mode=14;break;case 1:if(v(y),y.mode=20,g!==6)break;j>>>=2,H-=2;break t;case 2:y.mode=17;break;case 3:b.msg="invalid block type",y.mode=30}j>>>=2,H-=2;break;case 14:for(j>>>=7&H,H-=7&H;H<32;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}if((65535&j)!=(j>>>16^65535)){b.msg="invalid stored block lengths",y.mode=30;break}if(y.length=65535&j,H=j=0,y.mode=15,g===6)break t;case 15:y.mode=16;case 16:if(F=y.length){if($<F&&(F=$),Z<F&&(F=Z),F===0)break t;u.arraySet(R,E,O,F,z),$-=F,O+=F,Z-=F,z+=F,y.length-=F;break}y.mode=12;break;case 17:for(;H<14;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}if(y.nlen=257+(31&j),j>>>=5,H-=5,y.ndist=1+(31&j),j>>>=5,H-=5,y.ncode=4+(15&j),j>>>=4,H-=4,286<y.nlen||30<y.ndist){b.msg="too many length or distance symbols",y.mode=30;break}y.have=0,y.mode=18;case 18:for(;y.have<y.ncode;){for(;H<3;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}y.lens[dt[y.have++]]=7&j,j>>>=3,H-=3}for(;y.have<19;)y.lens[dt[y.have++]]=0;if(y.lencode=y.lendyn,y.lenbits=7,it={bits:y.lenbits},st=S(0,y.lens,0,19,y.lencode,0,y.work,it),y.lenbits=it.bits,st){b.msg="invalid code lengths set",y.mode=30;break}y.have=0,y.mode=19;case 19:for(;y.have<y.nlen+y.ndist;){for(;K=(ut=y.lencode[j&(1<<y.lenbits)-1])>>>16&255,nt=65535&ut,!((q=ut>>>24)<=H);){if($===0)break t;$--,j+=E[O++]<<H,H+=8}if(nt<16)j>>>=q,H-=q,y.lens[y.have++]=nt;else{if(nt===16){for(at=q+2;H<at;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}if(j>>>=q,H-=q,y.have===0){b.msg="invalid bit length repeat",y.mode=30;break}Q=y.lens[y.have-1],F=3+(3&j),j>>>=2,H-=2}else if(nt===17){for(at=q+3;H<at;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}H-=q,Q=0,F=3+(7&(j>>>=q)),j>>>=3,H-=3}else{for(at=q+7;H<at;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}H-=q,Q=0,F=11+(127&(j>>>=q)),j>>>=7,H-=7}if(y.have+F>y.nlen+y.ndist){b.msg="invalid bit length repeat",y.mode=30;break}for(;F--;)y.lens[y.have++]=Q}}if(y.mode===30)break;if(y.lens[256]===0){b.msg="invalid code -- missing end-of-block",y.mode=30;break}if(y.lenbits=9,it={bits:y.lenbits},st=S(1,y.lens,0,y.nlen,y.lencode,0,y.work,it),y.lenbits=it.bits,st){b.msg="invalid literal/lengths set",y.mode=30;break}if(y.distbits=6,y.distcode=y.distdyn,it={bits:y.distbits},st=S(2,y.lens,y.nlen,y.ndist,y.distcode,0,y.work,it),y.distbits=it.bits,st){b.msg="invalid distances set",y.mode=30;break}if(y.mode=20,g===6)break t;case 20:y.mode=21;case 21:if(6<=$&&258<=Z){b.next_out=z,b.avail_out=Z,b.next_in=O,b.avail_in=$,y.hold=j,y.bits=H,w(b,M),z=b.next_out,R=b.output,Z=b.avail_out,O=b.next_in,E=b.input,$=b.avail_in,j=y.hold,H=y.bits,y.mode===12&&(y.back=-1);break}for(y.back=0;K=(ut=y.lencode[j&(1<<y.lenbits)-1])>>>16&255,nt=65535&ut,!((q=ut>>>24)<=H);){if($===0)break t;$--,j+=E[O++]<<H,H+=8}if(K&&(240&K)==0){for(rt=q,G=K,tt=nt;K=(ut=y.lencode[tt+((j&(1<<rt+G)-1)>>rt)])>>>16&255,nt=65535&ut,!(rt+(q=ut>>>24)<=H);){if($===0)break t;$--,j+=E[O++]<<H,H+=8}j>>>=rt,H-=rt,y.back+=rt}if(j>>>=q,H-=q,y.back+=q,y.length=nt,K===0){y.mode=26;break}if(32&K){y.back=-1,y.mode=12;break}if(64&K){b.msg="invalid literal/length code",y.mode=30;break}y.extra=15&K,y.mode=22;case 22:if(y.extra){for(at=y.extra;H<at;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}y.length+=j&(1<<y.extra)-1,j>>>=y.extra,H-=y.extra,y.back+=y.extra}y.was=y.length,y.mode=23;case 23:for(;K=(ut=y.distcode[j&(1<<y.distbits)-1])>>>16&255,nt=65535&ut,!((q=ut>>>24)<=H);){if($===0)break t;$--,j+=E[O++]<<H,H+=8}if((240&K)==0){for(rt=q,G=K,tt=nt;K=(ut=y.distcode[tt+((j&(1<<rt+G)-1)>>rt)])>>>16&255,nt=65535&ut,!(rt+(q=ut>>>24)<=H);){if($===0)break t;$--,j+=E[O++]<<H,H+=8}j>>>=rt,H-=rt,y.back+=rt}if(j>>>=q,H-=q,y.back+=q,64&K){b.msg="invalid distance code",y.mode=30;break}y.offset=nt,y.extra=15&K,y.mode=24;case 24:if(y.extra){for(at=y.extra;H<at;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}y.offset+=j&(1<<y.extra)-1,j>>>=y.extra,H-=y.extra,y.back+=y.extra}if(y.offset>y.dmax){b.msg="invalid distance too far back",y.mode=30;break}y.mode=25;case 25:if(Z===0)break t;if(F=M-Z,y.offset>F){if((F=y.offset-F)>y.whave&&y.sane){b.msg="invalid distance too far back",y.mode=30;break}V=F>y.wnext?(F-=y.wnext,y.wsize-F):y.wnext-F,F>y.length&&(F=y.length),Y=y.window}else Y=R,V=z-y.offset,F=y.length;for(Z<F&&(F=Z),Z-=F,y.length-=F;R[z++]=Y[V++],--F;);y.length===0&&(y.mode=21);break;case 26:if(Z===0)break t;R[z++]=y.length,Z--,y.mode=21;break;case 27:if(y.wrap){for(;H<32;){if($===0)break t;$--,j|=E[O++]<<H,H+=8}if(M-=Z,b.total_out+=M,y.total+=M,M&&(b.adler=y.check=y.flags?d(y.check,R,M,z-M):p(y.check,R,M,z-M)),M=Z,(y.flags?j:N(j))!==y.check){b.msg="incorrect data check",y.mode=30;break}H=j=0}y.mode=28;case 28:if(y.wrap&&y.flags){for(;H<32;){if($===0)break t;$--,j+=E[O++]<<H,H+=8}if(j!==(4294967295&y.total)){b.msg="incorrect length check",y.mode=30;break}H=j=0}y.mode=29;case 29:st=1;break t;case 30:st=-3;break t;case 31:return-4;default:return A}return b.next_out=z,b.avail_out=Z,b.next_in=O,b.avail_in=$,y.hold=j,y.bits=H,(y.wsize||M!==b.avail_out&&y.mode<30&&(y.mode<27||g!==4))&&m(b,b.output,b.next_out,M-b.avail_out)?(y.mode=31,-4):(T-=b.avail_in,M-=b.avail_out,b.total_in+=T,b.total_out+=M,y.total+=M,y.wrap&&M&&(b.adler=y.check=y.flags?d(y.check,R,M,b.next_out-M):p(y.check,R,M,b.next_out-M)),b.data_type=y.bits+(y.last?64:0)+(y.mode===12?128:0)+(y.mode===20||y.mode===15?256:0),(T==0&&M===0||g===4)&&st===0&&(st=-5),st)},h.inflateEnd=function(b){if(!b||!b.state)return A;var g=b.state;return g.window&&(g.window=null),b.state=null,0},h.inflateGetHeader=function(b,g){var y;return b&&b.state?(2&(y=b.state).wrap)==0?A:((y.head=g).done=!1,0):A},h.inflateSetDictionary=function(b,g){var y,E=g.length;return b&&b.state?(y=b.state).wrap!==0&&y.mode!==11?A:y.mode===11&&p(1,g,E,0)!==y.check?-3:m(b,g,E,E)?(y.mode=31,-4):(y.havedict=1,0):A},h.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,f,h){var u=s("../utils/common"),p=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],d=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],w=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],S=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];f.exports=function(A,N,L,I,P,D,U,B){var k,C,v,m,b,g,y,E,R,O=B.bits,z=0,$=0,Z=0,j=0,H=0,T=0,M=0,F=0,V=0,Y=0,q=null,K=0,nt=new u.Buf16(16),rt=new u.Buf16(16),G=null,tt=0;for(z=0;z<=15;z++)nt[z]=0;for($=0;$<I;$++)nt[N[L+$]]++;for(H=O,j=15;1<=j&&nt[j]===0;j--);if(j<H&&(H=j),j===0)return P[D++]=20971520,P[D++]=20971520,B.bits=1,0;for(Z=1;Z<j&&nt[Z]===0;Z++);for(H<Z&&(H=Z),z=F=1;z<=15;z++)if(F<<=1,(F-=nt[z])<0)return-1;if(0<F&&(A===0||j!==1))return-1;for(rt[1]=0,z=1;z<15;z++)rt[z+1]=rt[z]+nt[z];for($=0;$<I;$++)N[L+$]!==0&&(U[rt[N[L+$]]++]=$);if(g=A===0?(q=G=U,19):A===1?(q=p,K-=257,G=d,tt-=257,256):(q=w,G=S,-1),z=Z,b=D,M=$=Y=0,v=-1,m=(V=1<<(T=H))-1,A===1&&852<V||A===2&&592<V)return 1;for(;;){for(y=z-M,R=U[$]<g?(E=0,U[$]):U[$]>g?(E=G[tt+U[$]],q[K+U[$]]):(E=96,0),k=1<<z-M,Z=C=1<<T;P[b+(Y>>M)+(C-=k)]=y<<24|E<<16|R|0,C!==0;);for(k=1<<z-1;Y&k;)k>>=1;if(k!==0?(Y&=k-1,Y+=k):Y=0,$++,--nt[z]==0){if(z===j)break;z=N[L+U[$]]}if(H<z&&(Y&m)!==v){for(M===0&&(M=H),b+=Z,F=1<<(T=z-M);T+M<j&&!((F-=nt[T+M])<=0);)T++,F<<=1;if(V+=1<<T,A===1&&852<V||A===2&&592<V)return 1;P[v=Y&m]=H<<24|T<<16|b-D|0}}return Y!==0&&(P[b+Y]=z-M<<24|64<<16|0),B.bits=H,0}},{"../utils/common":41}],51:[function(s,f,h){f.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"}},{}],52:[function(s,f,h){var u=s("../utils/common");function p(G){for(var tt=G.length;0<=--tt;)G[tt]=0}var d=256,w=286,S=30,A=15,N=[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],L=[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],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],D=new Array(576);p(D);var U=new Array(60);p(U);var B=new Array(512);p(B);var k=new Array(256);p(k);var C=new Array(29);p(C);var v,m,b,g=new Array(S);function y(G,tt,Q,st,it){this.static_tree=G,this.extra_bits=tt,this.extra_base=Q,this.elems=st,this.max_length=it,this.has_stree=G&&G.length}function E(G,tt){this.dyn_tree=G,this.max_code=0,this.stat_desc=tt}function R(G){return G<256?B[G]:B[256+(G>>>7)]}function O(G,tt){G.pending_buf[G.pending++]=255&tt,G.pending_buf[G.pending++]=tt>>>8&255}function z(G,tt,Q){G.bi_valid>16-Q?(G.bi_buf|=tt<<G.bi_valid&65535,O(G,G.bi_buf),G.bi_buf=tt>>16-G.bi_valid,G.bi_valid+=Q-16):(G.bi_buf|=tt<<G.bi_valid&65535,G.bi_valid+=Q)}function $(G,tt,Q){z(G,Q[2*tt],Q[2*tt+1])}function Z(G,tt){for(var Q=0;Q|=1&G,G>>>=1,Q<<=1,0<--tt;);return Q>>>1}function j(G,tt,Q){var st,it,at=new Array(16),ut=0;for(st=1;st<=A;st++)at[st]=ut=ut+Q[st-1]<<1;for(it=0;it<=tt;it++){var ft=G[2*it+1];ft!==0&&(G[2*it]=Z(at[ft]++,ft))}}function H(G){var tt;for(tt=0;tt<w;tt++)G.dyn_ltree[2*tt]=0;for(tt=0;tt<S;tt++)G.dyn_dtree[2*tt]=0;for(tt=0;tt<19;tt++)G.bl_tree[2*tt]=0;G.dyn_ltree[512]=1,G.opt_len=G.static_len=0,G.last_lit=G.matches=0}function T(G){8<G.bi_valid?O(G,G.bi_buf):0<G.bi_valid&&(G.pending_buf[G.pending++]=G.bi_buf),G.bi_buf=0,G.bi_valid=0}function M(G,tt,Q,st){var it=2*tt,at=2*Q;return G[it]<G[at]||G[it]===G[at]&&st[tt]<=st[Q]}function F(G,tt,Q){for(var st=G.heap[Q],it=Q<<1;it<=G.heap_len&&(it<G.heap_len&&M(tt,G.heap[it+1],G.heap[it],G.depth)&&it++,!M(tt,st,G.heap[it],G.depth));)G.heap[Q]=G.heap[it],Q=it,it<<=1;G.heap[Q]=st}function V(G,tt,Q){var st,it,at,ut,ft=0;if(G.last_lit!==0)for(;st=G.pending_buf[G.d_buf+2*ft]<<8|G.pending_buf[G.d_buf+2*ft+1],it=G.pending_buf[G.l_buf+ft],ft++,st===0?$(G,it,tt):($(G,(at=k[it])+d+1,tt),(ut=N[at])!==0&&z(G,it-=C[at],ut),$(G,at=R(--st),Q),(ut=L[at])!==0&&z(G,st-=g[at],ut)),ft<G.last_lit;);$(G,256,tt)}function Y(G,tt){var Q,st,it,at=tt.dyn_tree,ut=tt.stat_desc.static_tree,ft=tt.stat_desc.has_stree,dt=tt.stat_desc.elems,xt=-1;for(G.heap_len=0,G.heap_max=573,Q=0;Q<dt;Q++)at[2*Q]!==0?(G.heap[++G.heap_len]=xt=Q,G.depth[Q]=0):at[2*Q+1]=0;for(;G.heap_len<2;)at[2*(it=G.heap[++G.heap_len]=xt<2?++xt:0)]=1,G.depth[it]=0,G.opt_len--,ft&&(G.static_len-=ut[2*it+1]);for(tt.max_code=xt,Q=G.heap_len>>1;1<=Q;Q--)F(G,at,Q);for(it=dt;Q=G.heap[1],G.heap[1]=G.heap[G.heap_len--],F(G,at,1),st=G.heap[1],G.heap[--G.heap_max]=Q,G.heap[--G.heap_max]=st,at[2*it]=at[2*Q]+at[2*st],G.depth[it]=(G.depth[Q]>=G.depth[st]?G.depth[Q]:G.depth[st])+1,at[2*Q+1]=at[2*st+1]=it,G.heap[1]=it++,F(G,at,1),2<=G.heap_len;);G.heap[--G.heap_max]=G.heap[1],(function(_t,gt){var Rt,Tt,At,jt,St,mt,kt=gt.dyn_tree,Ct=gt.max_code,Et=gt.stat_desc.static_tree,Zt=gt.stat_desc.has_stree,re=gt.stat_desc.extra_bits,It=gt.stat_desc.extra_base,Qt=gt.stat_desc.max_length,Xt=0;for(jt=0;jt<=A;jt++)_t.bl_count[jt]=0;for(kt[2*_t.heap[_t.heap_max]+1]=0,Rt=_t.heap_max+1;Rt<573;Rt++)Qt<(jt=kt[2*kt[2*(Tt=_t.heap[Rt])+1]+1]+1)&&(jt=Qt,Xt++),kt[2*Tt+1]=jt,Ct<Tt||(_t.bl_count[jt]++,St=0,It<=Tt&&(St=re[Tt-It]),mt=kt[2*Tt],_t.opt_len+=mt*(jt+St),Zt&&(_t.static_len+=mt*(Et[2*Tt+1]+St)));if(Xt!==0){do{for(jt=Qt-1;_t.bl_count[jt]===0;)jt--;_t.bl_count[jt]--,_t.bl_count[jt+1]+=2,_t.bl_count[Qt]--,Xt-=2}while(0<Xt);for(jt=Qt;jt!==0;jt--)for(Tt=_t.bl_count[jt];Tt!==0;)Ct<(At=_t.heap[--Rt])||(kt[2*At+1]!==jt&&(_t.opt_len+=(jt-kt[2*At+1])*kt[2*At],kt[2*At+1]=jt),Tt--)}})(G,tt),j(at,xt,G.bl_count)}function q(G,tt,Q){var st,it,at=-1,ut=tt[1],ft=0,dt=7,xt=4;for(ut===0&&(dt=138,xt=3),tt[2*(Q+1)+1]=65535,st=0;st<=Q;st++)it=ut,ut=tt[2*(st+1)+1],++ft<dt&&it===ut||(ft<xt?G.bl_tree[2*it]+=ft:it!==0?(it!==at&&G.bl_tree[2*it]++,G.bl_tree[32]++):ft<=10?G.bl_tree[34]++:G.bl_tree[36]++,at=it,xt=(ft=0)===ut?(dt=138,3):it===ut?(dt=6,3):(dt=7,4))}function K(G,tt,Q){var st,it,at=-1,ut=tt[1],ft=0,dt=7,xt=4;for(ut===0&&(dt=138,xt=3),st=0;st<=Q;st++)if(it=ut,ut=tt[2*(st+1)+1],!(++ft<dt&&it===ut)){if(ft<xt)for(;$(G,it,G.bl_tree),--ft!=0;);else it!==0?(it!==at&&($(G,it,G.bl_tree),ft--),$(G,16,G.bl_tree),z(G,ft-3,2)):ft<=10?($(G,17,G.bl_tree),z(G,ft-3,3)):($(G,18,G.bl_tree),z(G,ft-11,7));at=it,xt=(ft=0)===ut?(dt=138,3):it===ut?(dt=6,3):(dt=7,4)}}p(g);var nt=!1;function rt(G,tt,Q,st){z(G,0+(st?1:0),3),(function(it,at,ut,ft){T(it),O(it,ut),O(it,~ut),u.arraySet(it.pending_buf,it.window,at,ut,it.pending),it.pending+=ut})(G,tt,Q)}h._tr_init=function(G){nt||((function(){var tt,Q,st,it,at,ut=new Array(16);for(it=st=0;it<28;it++)for(C[it]=st,tt=0;tt<1<<N[it];tt++)k[st++]=it;for(k[st-1]=it,it=at=0;it<16;it++)for(g[it]=at,tt=0;tt<1<<L[it];tt++)B[at++]=it;for(at>>=7;it<S;it++)for(g[it]=at<<7,tt=0;tt<1<<L[it]-7;tt++)B[256+at++]=it;for(Q=0;Q<=A;Q++)ut[Q]=0;for(tt=0;tt<=143;)D[2*tt+1]=8,tt++,ut[8]++;for(;tt<=255;)D[2*tt+1]=9,tt++,ut[9]++;for(;tt<=279;)D[2*tt+1]=7,tt++,ut[7]++;for(;tt<=287;)D[2*tt+1]=8,tt++,ut[8]++;for(j(D,287,ut),tt=0;tt<S;tt++)U[2*tt+1]=5,U[2*tt]=Z(tt,5);v=new y(D,N,257,w,A),m=new y(U,L,0,S,A),b=new y(new Array(0),I,0,19,7)})(),nt=!0),G.l_desc=new E(G.dyn_ltree,v),G.d_desc=new E(G.dyn_dtree,m),G.bl_desc=new E(G.bl_tree,b),G.bi_buf=0,G.bi_valid=0,H(G)},h._tr_stored_block=rt,h._tr_flush_block=function(G,tt,Q,st){var it,at,ut=0;0<G.level?(G.strm.data_type===2&&(G.strm.data_type=(function(ft){var dt,xt=4093624447;for(dt=0;dt<=31;dt++,xt>>>=1)if(1&xt&&ft.dyn_ltree[2*dt]!==0)return 0;if(ft.dyn_ltree[18]!==0||ft.dyn_ltree[20]!==0||ft.dyn_ltree[26]!==0)return 1;for(dt=32;dt<d;dt++)if(ft.dyn_ltree[2*dt]!==0)return 1;return 0})(G)),Y(G,G.l_desc),Y(G,G.d_desc),ut=(function(ft){var dt;for(q(ft,ft.dyn_ltree,ft.l_desc.max_code),q(ft,ft.dyn_dtree,ft.d_desc.max_code),Y(ft,ft.bl_desc),dt=18;3<=dt&&ft.bl_tree[2*P[dt]+1]===0;dt--);return ft.opt_len+=3*(dt+1)+5+5+4,dt})(G),it=G.opt_len+3+7>>>3,(at=G.static_len+3+7>>>3)<=it&&(it=at)):it=at=Q+5,Q+4<=it&&tt!==-1?rt(G,tt,Q,st):G.strategy===4||at===it?(z(G,2+(st?1:0),3),V(G,D,U)):(z(G,4+(st?1:0),3),(function(ft,dt,xt,_t){var gt;for(z(ft,dt-257,5),z(ft,xt-1,5),z(ft,_t-4,4),gt=0;gt<_t;gt++)z(ft,ft.bl_tree[2*P[gt]+1],3);K(ft,ft.dyn_ltree,dt-1),K(ft,ft.dyn_dtree,xt-1)})(G,G.l_desc.max_code+1,G.d_desc.max_code+1,ut+1),V(G,G.dyn_ltree,G.dyn_dtree)),H(G),st&&T(G)},h._tr_tally=function(G,tt,Q){return G.pending_buf[G.d_buf+2*G.last_lit]=tt>>>8&255,G.pending_buf[G.d_buf+2*G.last_lit+1]=255&tt,G.pending_buf[G.l_buf+G.last_lit]=255&Q,G.last_lit++,tt===0?G.dyn_ltree[2*Q]++:(G.matches++,tt--,G.dyn_ltree[2*(k[Q]+d+1)]++,G.dyn_dtree[2*R(tt)]++),G.last_lit===G.lit_bufsize-1},h._tr_align=function(G){z(G,2,3),$(G,256,D),(function(tt){tt.bi_valid===16?(O(tt,tt.bi_buf),tt.bi_buf=0,tt.bi_valid=0):8<=tt.bi_valid&&(tt.pending_buf[tt.pending++]=255&tt.bi_buf,tt.bi_buf>>=8,tt.bi_valid-=8)})(G)}},{"../utils/common":41}],53:[function(s,f,h){f.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(s,f,h){(function(u){(function(p,d){if(!p.setImmediate){var w,S,A,N,L=1,I={},P=!1,D=p.document,U=Object.getPrototypeOf&&Object.getPrototypeOf(p);U=U&&U.setTimeout?U:p,w={}.toString.call(p.process)==="[object process]"?function(v){c.nextTick((function(){k(v)}))}:(function(){if(p.postMessage&&!p.importScripts){var v=!0,m=p.onmessage;return p.onmessage=function(){v=!1},p.postMessage("","*"),p.onmessage=m,v}})()?(N="setImmediate$"+Math.random()+"$",p.addEventListener?p.addEventListener("message",C,!1):p.attachEvent("onmessage",C),function(v){p.postMessage(N+v,"*")}):p.MessageChannel?((A=new MessageChannel).port1.onmessage=function(v){k(v.data)},function(v){A.port2.postMessage(v)}):D&&"onreadystatechange"in D.createElement("script")?(S=D.documentElement,function(v){var m=D.createElement("script");m.onreadystatechange=function(){k(v),m.onreadystatechange=null,S.removeChild(m),m=null},S.appendChild(m)}):function(v){setTimeout(k,0,v)},U.setImmediate=function(v){typeof v!="function"&&(v=new Function(""+v));for(var m=new Array(arguments.length-1),b=0;b<m.length;b++)m[b]=arguments[b+1];var g={callback:v,args:m};return I[L]=g,w(L),L++},U.clearImmediate=B}function B(v){delete I[v]}function k(v){if(P)setTimeout(k,0,v);else{var m=I[v];if(m){P=!0;try{(function(b){var g=b.callback,y=b.args;switch(y.length){case 0:g();break;case 1:g(y[0]);break;case 2:g(y[0],y[1]);break;case 3:g(y[0],y[1],y[2]);break;default:g.apply(void 0,y)}})(m)}finally{B(v),P=!1}}}}function C(v){v.source===p&&typeof v.data=="string"&&v.data.indexOf(N)===0&&k(+v.data.slice(N.length))}})(typeof self>"u"?u===void 0?this:u:self)}).call(this,o!==void 0?o:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)}))}).call(this)}).call(this,n("_process"),typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{},n("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],n("timers").setImmediate)},{_process:467,buffer:220,timers:523}],442:[function(n,x,_){(function(c){(function(){var o=/[\\^$.*+?()[\]{}|]/g,a=RegExp(o.source),r=typeof c=="object"&&c&&c.Object===Object&&c,t=typeof self=="object"&&self&&self.Object===Object&&self,e=r||t||Function("return this")(),l=Object.prototype.toString,i=e.Symbol,s=i?i.prototype:void 0,f=s?s.toString:void 0;function h(u){if(typeof u=="string")return u;if((function(d){return typeof d=="symbol"||(function(w){return!!w&&typeof w=="object"})(d)&&l.call(d)=="[object Symbol]"})(u))return f?f.call(u):"";var p=u+"";return p=="0"&&1/u==-1/0?"-0":p}x.exports=function(u){var p;return(u=(p=u)==null?"":h(p))&&a.test(u)?u.replace(o,"\\$&"):u}}).call(this)}).call(this,typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],443:[function(n,x,_){(function(c){(function(){var o="[object Arguments]",a="[object Map]",r="[object Object]",t="[object Set]",e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l=/^\w*$/,i=/^\./,s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,h=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,p={};p["[object Float32Array]"]=p["[object Float64Array]"]=p["[object Int8Array]"]=p["[object Int16Array]"]=p["[object Int32Array]"]=p["[object Uint8Array]"]=p["[object Uint8ClampedArray]"]=p["[object Uint16Array]"]=p["[object Uint32Array]"]=!0,p[o]=p["[object Array]"]=p["[object ArrayBuffer]"]=p["[object Boolean]"]=p["[object DataView]"]=p["[object Date]"]=p["[object Error]"]=p["[object Function]"]=p[a]=p["[object Number]"]=p[r]=p["[object RegExp]"]=p[t]=p["[object String]"]=p["[object WeakMap]"]=!1;var d=typeof c=="object"&&c&&c.Object===Object&&c,w=typeof self=="object"&&self&&self.Object===Object&&self,S=d||w||Function("return this")(),A=typeof _=="object"&&_&&!_.nodeType&&_,N=A&&typeof x=="object"&&x&&!x.nodeType&&x,L=N&&N.exports===A&&d.process,I=(function(){try{return L&&L.binding("util")}catch{}})(),P=I&&I.isTypedArray;function D(J,lt,ht,pt){for(var Mt=-1,bt=J?J.length:0;++Mt<bt;){var vt=J[Mt];lt(pt,vt,ht(vt),J)}return pt}function U(J,lt){for(var ht=-1,pt=J?J.length:0;++ht<pt;)if(lt(J[ht],ht,J))return!0;return!1}function B(J){var lt=!1;if(J!=null&&typeof J.toString!="function")try{lt=!!(J+"")}catch{}return lt}function k(J){var lt=-1,ht=Array(J.size);return J.forEach((function(pt,Mt){ht[++lt]=[Mt,pt]})),ht}function C(J){var lt=-1,ht=Array(J.size);return J.forEach((function(pt){ht[++lt]=pt})),ht}var v,m,b,g=Array.prototype,y=Function.prototype,E=Object.prototype,R=S["__core-js_shared__"],O=(v=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",z=y.toString,$=E.hasOwnProperty,Z=E.toString,j=RegExp("^"+z.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=S.Symbol,T=S.Uint8Array,M=E.propertyIsEnumerable,F=g.splice,V=(m=Object.keys,b=Object,function(J){return m(b(J))}),Y=Dt(S,"DataView"),q=Dt(S,"Map"),K=Dt(S,"Promise"),nt=Dt(S,"Set"),rt=Dt(S,"WeakMap"),G=Dt(Object,"create"),tt=ot(Y),Q=ot(q),st=ot(K),it=ot(nt),at=ot(rt),ut=H?H.prototype:void 0,ft=ut?ut.valueOf:void 0,dt=ut?ut.toString:void 0;function xt(J){var lt=-1,ht=J?J.length:0;for(this.clear();++lt<ht;){var pt=J[lt];this.set(pt[0],pt[1])}}function _t(J){var lt=-1,ht=J?J.length:0;for(this.clear();++lt<ht;){var pt=J[lt];this.set(pt[0],pt[1])}}function gt(J){var lt=-1,ht=J?J.length:0;for(this.clear();++lt<ht;){var pt=J[lt];this.set(pt[0],pt[1])}}function Rt(J){var lt=-1,ht=J?J.length:0;for(this.__data__=new gt;++lt<ht;)this.add(J[lt])}function Tt(J){this.__data__=new _t(J)}function At(J,lt){var ht=Pt(J)||Lt(J)?(function(vt,Kt){for(var Vt=-1,qt=Array(vt);++Vt<vt;)qt[Vt]=Kt(Vt);return qt})(J.length,String):[],pt=ht.length,Mt=!!pt;for(var bt in J)!$.call(J,bt)||Mt&&(bt=="length"||oe(bt,pt))||ht.push(bt);return ht}function jt(J,lt){for(var ht=J.length;ht--;)if(wt(J[ht][0],lt))return ht;return-1}function St(J,lt,ht,pt){return kt(J,(function(Mt,bt,vt){lt(pt,Mt,ht(Mt),vt)})),pt}xt.prototype.clear=function(){this.__data__=G?G(null):{}},xt.prototype.delete=function(J){return this.has(J)&&delete this.__data__[J]},xt.prototype.get=function(J){var lt=this.__data__;if(G){var ht=lt[J];return ht==="__lodash_hash_undefined__"?void 0:ht}return $.call(lt,J)?lt[J]:void 0},xt.prototype.has=function(J){var lt=this.__data__;return G?lt[J]!==void 0:$.call(lt,J)},xt.prototype.set=function(J,lt){return this.__data__[J]=G&&lt===void 0?"__lodash_hash_undefined__":lt,this},_t.prototype.clear=function(){this.__data__=[]},_t.prototype.delete=function(J){var lt=this.__data__,ht=jt(lt,J);return!(ht<0)&&(ht==lt.length-1?lt.pop():F.call(lt,ht,1),!0)},_t.prototype.get=function(J){var lt=this.__data__,ht=jt(lt,J);return ht<0?void 0:lt[ht][1]},_t.prototype.has=function(J){return jt(this.__data__,J)>-1},_t.prototype.set=function(J,lt){var ht=this.__data__,pt=jt(ht,J);return pt<0?ht.push([J,lt]):ht[pt][1]=lt,this},gt.prototype.clear=function(){this.__data__={hash:new xt,map:new(q||_t),string:new xt}},gt.prototype.delete=function(J){return te(this,J).delete(J)},gt.prototype.get=function(J){return te(this,J).get(J)},gt.prototype.has=function(J){return te(this,J).has(J)},gt.prototype.set=function(J,lt){return te(this,J).set(J,lt),this},Rt.prototype.add=Rt.prototype.push=function(J){return this.__data__.set(J,"__lodash_hash_undefined__"),this},Rt.prototype.has=function(J){return this.__data__.has(J)},Tt.prototype.clear=function(){this.__data__=new _t},Tt.prototype.delete=function(J){return this.__data__.delete(J)},Tt.prototype.get=function(J){return this.__data__.get(J)},Tt.prototype.has=function(J){return this.__data__.has(J)},Tt.prototype.set=function(J,lt){var ht=this.__data__;if(ht instanceof _t){var pt=ht.__data__;if(!q||pt.length<199)return pt.push([J,lt]),this;ht=this.__data__=new gt(pt)}return ht.set(J,lt),this};var mt,kt=(mt=function(J,lt){return J&&Ct(J,lt,pe)},function(J,lt){if(J==null)return J;if(!Ot(J))return mt(J,lt);for(var ht=J.length,pt=-1,Mt=Object(J);++pt<ht&&lt(Mt[pt],pt,Mt)!==!1;);return J}),Ct=(function(J){return function(lt,ht,pt){for(var Mt=-1,bt=Object(lt),vt=pt(lt),Kt=vt.length;Kt--;){var Vt=vt[++Mt];if(ht(bt[Vt],Vt,bt)===!1)break}return lt}})();function Et(J,lt){for(var ht=0,pt=(lt=Ft(lt,J)?[lt]:Ut(lt)).length;J!=null&&ht<pt;)J=J[et(lt[ht++])];return ht&&ht==pt?J:void 0}function Zt(J,lt){return J!=null&&lt in Object(J)}function re(J,lt,ht,pt,Mt){return J===lt||(J==null||lt==null||!Wt(J)&&!he(lt)?J!=J&&lt!=lt:(function(bt,vt,Kt,Vt,qt,Bt){var ne=Pt(bt),ie=Pt(vt),le="[object Array]",ce="[object Array]";ne||(le=(le=Yt(bt))==o?r:le),ie||(ce=(ce=Yt(vt))==o?r:ce);var me=le==r&&!B(bt),be=ce==r&&!B(vt),we=le==ce;if(we&&!me)return Bt||(Bt=new Tt),ne||de(bt)?ue(bt,vt,Kt,Vt,qt,Bt):(function(se,Jt,Se,Ce,Be,ye,_e){switch(Se){case"[object DataView]":if(se.byteLength!=Jt.byteLength||se.byteOffset!=Jt.byteOffset)return!1;se=se.buffer,Jt=Jt.buffer;case"[object ArrayBuffer]":return!(se.byteLength!=Jt.byteLength||!Ce(new T(se),new T(Jt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return wt(+se,+Jt);case"[object Error]":return se.name==Jt.name&&se.message==Jt.message;case"[object RegExp]":case"[object String]":return se==Jt+"";case a:var ke=k;case t:var je=2&ye;if(ke||(ke=C),se.size!=Jt.size&&!je)return!1;var De=_e.get(se);if(De)return De==Jt;ye|=1,_e.set(se,Jt);var Oe=ue(ke(se),ke(Jt),Ce,Be,ye,_e);return _e.delete(se),Oe;case"[object Symbol]":if(ft)return ft.call(se)==ft.call(Jt)}return!1})(bt,vt,le,Kt,Vt,qt,Bt);if(!(2&qt)){var Me=me&&$.call(bt,"__wrapped__"),Te=be&&$.call(vt,"__wrapped__");if(Me||Te){var Ae=Me?bt.value():bt,Re=Te?vt.value():vt;return Bt||(Bt=new Tt),Kt(Ae,Re,Vt,qt,Bt)}}return we?(Bt||(Bt=new Tt),(function(se,Jt,Se,Ce,Be,ye){var _e=2&Be,ke=pe(se),je=ke.length,De=pe(Jt).length;if(je!=De&&!_e)return!1;for(var Oe=je;Oe--;){var Ee=ke[Oe];if(!(_e?Ee in Jt:$.call(Jt,Ee)))return!1}var rr=ye.get(se);if(rr&&ye.get(Jt))return rr==Jt;var Fe=!0;ye.set(se,Jt),ye.set(Jt,se);for(var Ge=_e;++Oe<je;){Ee=ke[Oe];var Le=se[Ee],ze=Jt[Ee];if(Ce)var nr=_e?Ce(ze,Le,Ee,Jt,se,ye):Ce(Le,ze,Ee,se,Jt,ye);if(!(nr===void 0?Le===ze||Se(Le,ze,Ce,Be,ye):nr)){Fe=!1;break}Ge||(Ge=Ee=="constructor")}if(Fe&&!Ge){var Ue=se.constructor,$e=Jt.constructor;Ue==$e||!("constructor"in se)||!("constructor"in Jt)||typeof Ue=="function"&&Ue instanceof Ue&&typeof $e=="function"&&$e instanceof $e||(Fe=!1)}return ye.delete(se),ye.delete(Jt),Fe})(bt,vt,Kt,Vt,qt,Bt)):!1})(J,lt,re,ht,pt,Mt))}function It(J){return!(!Wt(J)||(function(lt){return!!O&&O in lt})(J))&&($t(J)||B(J)?j:h).test(ot(J))}function Qt(J){return typeof J=="function"?J:J==null?ge:typeof J=="object"?Pt(J)?(function(pt,Mt){return Ft(pt)&&ee(Mt)?ae(et(pt),Mt):function(bt){var vt=(function(Kt,Vt,qt){var Bt=Kt==null?void 0:Et(Kt,Vt);return Bt===void 0?qt:Bt})(bt,pt);return vt===void 0&&vt===Mt?(function(Kt,Vt){return Kt!=null&&(function(qt,Bt,ne){Bt=Ft(Bt,qt)?[Bt]:Ut(Bt);for(var ie,le=-1,ce=Bt.length;++le<ce;){var me=et(Bt[le]);if(!(ie=qt!=null&&ne(qt,me)))break;qt=qt[me]}return ie||!!(ce=qt?qt.length:0)&&zt(ce)&&oe(me,ce)&&(Pt(qt)||Lt(qt))})(Kt,Vt,Zt)})(bt,pt):re(Mt,vt,void 0,3)}})(J[0],J[1]):(function(pt){var Mt=(function(bt){for(var vt=pe(bt),Kt=vt.length;Kt--;){var Vt=vt[Kt],qt=bt[Vt];vt[Kt]=[Vt,qt,ee(qt)]}return vt})(pt);return Mt.length==1&&Mt[0][2]?ae(Mt[0][0],Mt[0][1]):function(bt){return bt===pt||(function(vt,Kt,Vt,qt){var Bt=Vt.length,ne=Bt;if(vt==null)return!ne;for(vt=Object(vt);Bt--;){var ie=Vt[Bt];if(ie[2]?ie[1]!==vt[ie[0]]:!(ie[0]in vt))return!1}for(;++Bt<ne;){var le=(ie=Vt[Bt])[0],ce=vt[le],me=ie[1];if(ie[2]){if(ce===void 0&&!(le in vt))return!1}else{var be=new Tt,we;if(!(we===void 0?re(me,ce,qt,3,be):we))return!1}}return!0})(bt,pt,Mt)}})(J):Ft(lt=J)?(ht=et(lt),function(pt){return pt?.[ht]}):(function(pt){return function(Mt){return Et(Mt,pt)}})(lt);var lt,ht}function Xt(J){if(ht=(lt=J)&&lt.constructor,pt=typeof ht=="function"&&ht.prototype||E,lt!==pt)return V(J);var lt,ht,pt,Mt=[];for(var bt in Object(J))$.call(J,bt)&&bt!="constructor"&&Mt.push(bt);return Mt}function Ut(J){return Pt(J)?J:Ht(J)}function ue(J,lt,ht,pt,Mt,bt){var vt=2&Mt,Kt=J.length,Vt=lt.length;if(Kt!=Vt&&!(vt&&Vt>Kt))return!1;var qt=bt.get(J);if(qt&&bt.get(lt))return qt==lt;var Bt=-1,ne=!0,ie=1&Mt?new Rt:void 0;for(bt.set(J,lt),bt.set(lt,J);++Bt<Kt;){var le=J[Bt],ce=lt[Bt];if(pt)var me=vt?pt(ce,le,Bt,lt,J,bt):pt(le,ce,Bt,J,lt,bt);if(me!==void 0){if(me)continue;ne=!1;break}if(ie){if(!U(lt,(function(be,we){if(!ie.has(we)&&(le===be||ht(le,be,pt,Mt,bt)))return ie.add(we)}))){ne=!1;break}}else if(le!==ce&&!ht(le,ce,pt,Mt,bt)){ne=!1;break}}return bt.delete(J),bt.delete(lt),ne}function te(J,lt){var ht,pt,Mt=J.__data__;return((pt=typeof(ht=lt))=="string"||pt=="number"||pt=="symbol"||pt=="boolean"?ht!=="__proto__":ht===null)?Mt[typeof lt=="string"?"string":"hash"]:Mt.map}function Dt(J,lt){var ht=(function(pt,Mt){return pt?.[Mt]})(J,lt);return It(ht)?ht:void 0}var Yt=function(J){return Z.call(J)};function oe(J,lt){return!!(lt=lt??9007199254740991)&&(typeof J=="number"||u.test(J))&&J>-1&&J%1==0&&J<lt}function Ft(J,lt){if(Pt(J))return!1;var ht=typeof J;return!(ht!="number"&&ht!="symbol"&&ht!="boolean"&&J!=null&&!fe(J))||l.test(J)||!e.test(J)||lt!=null&&J in Object(lt)}function ee(J){return J==J&&!Wt(J)}function ae(J,lt){return function(ht){return ht!=null&&ht[J]===lt&&(lt!==void 0||J in Object(ht))}}(Y&&Yt(new Y(new ArrayBuffer(1)))!="[object DataView]"||q&&Yt(new q)!=a||K&&Yt(K.resolve())!="[object Promise]"||nt&&Yt(new nt)!=t||rt&&Yt(new rt)!="[object WeakMap]")&&(Yt=function(J){var lt=Z.call(J),ht=lt==r?J.constructor:void 0,pt=ht?ot(ht):void 0;if(pt)switch(pt){case tt:return"[object DataView]";case Q:return a;case st:return"[object Promise]";case it:return t;case at:return"[object WeakMap]"}return lt});var Ht=Nt((function(J){var lt;J=(lt=J)==null?"":(function(pt){if(typeof pt=="string")return pt;if(fe(pt))return dt?dt.call(pt):"";var Mt=pt+"";return Mt=="0"&&1/pt==-1/0?"-0":Mt})(lt);var ht=[];return i.test(J)&&ht.push(""),J.replace(s,(function(pt,Mt,bt,vt){ht.push(bt?vt.replace(f,"$1"):Mt||pt)})),ht}));function et(J){if(typeof J=="string"||fe(J))return J;var lt=J+"";return lt=="0"&&1/J==-1/0?"-0":lt}function ot(J){if(J!=null){try{return z.call(J)}catch{}try{return J+""}catch{}}return""}var ct,yt=(ct=function(J,lt,ht){$.call(J,ht)?J[ht].push(lt):J[ht]=[lt]},function(J,lt){var ht=Pt(J)?D:St,pt={};return ht(J,ct,Qt(lt),pt)});function Nt(J,lt){if(typeof J!="function"||lt&&typeof lt!="function")throw new TypeError("Expected a function");var ht=function(){var pt=arguments,Mt=lt?lt.apply(this,pt):pt[0],bt=ht.cache;if(bt.has(Mt))return bt.get(Mt);var vt=J.apply(this,pt);return ht.cache=bt.set(Mt,vt),vt};return ht.cache=new(Nt.Cache||gt),ht}function wt(J,lt){return J===lt||J!=J&&lt!=lt}function Lt(J){return(function(lt){return he(lt)&&Ot(lt)})(J)&&$.call(J,"callee")&&(!M.call(J,"callee")||Z.call(J)==o)}Nt.Cache=gt;var Pt=Array.isArray;function Ot(J){return J!=null&&zt(J.length)&&!$t(J)}function $t(J){var lt=Wt(J)?Z.call(J):"";return lt=="[object Function]"||lt=="[object GeneratorFunction]"}function zt(J){return typeof J=="number"&&J>-1&&J%1==0&&J<=9007199254740991}function Wt(J){var lt=typeof J;return!!J&&(lt=="object"||lt=="function")}function he(J){return!!J&&typeof J=="object"}function fe(J){return typeof J=="symbol"||he(J)&&Z.call(J)=="[object Symbol]"}var de=P?(function(J){return function(lt){return J(lt)}})(P):function(J){return he(J)&&zt(J.length)&&!!p[Z.call(J)]};function pe(J){return Ot(J)?At(J):Xt(J)}function ge(J){return J}x.exports=yt}).call(this)}).call(this,typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],444:[function(n,x,_){var c=Object.prototype.toString;x.exports=function(o){return o===!0||o===!1||(function(a){return!!a&&typeof a=="object"})(o)&&c.call(o)=="[object Boolean]"}},{}],445:[function(n,x,_){(function(c){(function(){var o="[object Arguments]",a="[object Map]",r="[object Object]",t="[object Set]",e=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i[o]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i[a]=i["[object Number]"]=i[r]=i["[object RegExp]"]=i[t]=i["[object String]"]=i["[object WeakMap]"]=!1;var s=typeof c=="object"&&c&&c.Object===Object&&c,f=typeof self=="object"&&self&&self.Object===Object&&self,h=s||f||Function("return this")(),u=typeof _=="object"&&_&&!_.nodeType&&_,p=u&&typeof x=="object"&&x&&!x.nodeType&&x,d=p&&p.exports===u,w=d&&s.process,S=(function(){try{return w&&w.binding&&w.binding("util")}catch{}})(),A=S&&S.isTypedArray;function N(et,ot){for(var ct=-1,yt=et==null?0:et.length;++ct<yt;)if(ot(et[ct],ct,et))return!0;return!1}function L(et){var ot=-1,ct=Array(et.size);return et.forEach((function(yt,Nt){ct[++ot]=[Nt,yt]})),ct}function I(et){var ot=-1,ct=Array(et.size);return et.forEach((function(yt){ct[++ot]=yt})),ct}var P,D,U,B=Array.prototype,k=Function.prototype,C=Object.prototype,v=h["__core-js_shared__"],m=k.toString,b=C.hasOwnProperty,g=(P=/[^.]+$/.exec(v&&v.keys&&v.keys.IE_PROTO||""))?"Symbol(src)_1."+P:"",y=C.toString,E=RegExp("^"+m.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=d?h.Buffer:void 0,O=h.Symbol,z=h.Uint8Array,$=C.propertyIsEnumerable,Z=B.splice,j=O?O.toStringTag:void 0,H=Object.getOwnPropertySymbols,T=R?R.isBuffer:void 0,M=(D=Object.keys,U=Object,function(et){return D(U(et))}),F=Zt(h,"DataView"),V=Zt(h,"Map"),Y=Zt(h,"Promise"),q=Zt(h,"Set"),K=Zt(h,"WeakMap"),nt=Zt(Object,"create"),rt=Xt(F),G=Xt(V),tt=Xt(Y),Q=Xt(q),st=Xt(K),it=O?O.prototype:void 0,at=it?it.valueOf:void 0;function ut(et){var ot=-1,ct=et==null?0:et.length;for(this.clear();++ot<ct;){var yt=et[ot];this.set(yt[0],yt[1])}}function ft(et){var ot=-1,ct=et==null?0:et.length;for(this.clear();++ot<ct;){var yt=et[ot];this.set(yt[0],yt[1])}}function dt(et){var ot=-1,ct=et==null?0:et.length;for(this.clear();++ot<ct;){var yt=et[ot];this.set(yt[0],yt[1])}}function xt(et){var ot=-1,ct=et==null?0:et.length;for(this.__data__=new dt;++ot<ct;)this.add(et[ot])}function _t(et){var ot=this.__data__=new ft(et);this.size=ot.size}function gt(et,ot){var ct=te(et),yt=!ct&&ue(et),Nt=!ct&&!yt&&Dt(et),wt=!ct&&!yt&&!Nt&&ae(et),Lt=ct||yt||Nt||wt,Pt=Lt?(function(zt,Wt){for(var he=-1,fe=Array(zt);++he<zt;)fe[he]=Wt(he);return fe})(et.length,String):[],Ot=Pt.length;for(var $t in et)!b.call(et,$t)||Lt&&($t=="length"||Nt&&($t=="offset"||$t=="parent")||wt&&($t=="buffer"||$t=="byteLength"||$t=="byteOffset")||Qt($t,Ot))||Pt.push($t);return Pt}function Rt(et,ot){for(var ct=et.length;ct--;)if(Ut(et[ct][0],ot))return ct;return-1}function Tt(et){return et==null?et===void 0?"[object Undefined]":"[object Null]":j&&j in Object(et)?(function(ot){var ct=b.call(ot,j),yt=ot[j];try{ot[j]=void 0;var Nt=!0}catch{}var wt=y.call(ot);return Nt&&(ct?ot[j]=yt:delete ot[j]),wt})(et):(function(ot){return y.call(ot)})(et)}function At(et){return ee(et)&&Tt(et)==o}function jt(et,ot,ct,yt,Nt){return et===ot||(et==null||ot==null||!ee(et)&&!ee(ot)?et!=et&&ot!=ot:(function(wt,Lt,Pt,Ot,$t,zt){var Wt=te(wt),he=te(Lt),fe=Wt?"[object Array]":It(wt),de=he?"[object Array]":It(Lt),pe=(fe=fe==o?r:fe)==r,ge=(de=de==o?r:de)==r,J=fe==de;if(J&&Dt(wt)){if(!Dt(Lt))return!1;Wt=!0,pe=!1}if(J&&!pe)return zt||(zt=new _t),Wt||ae(wt)?kt(wt,Lt,Pt,Ot,$t,zt):(function(bt,vt,Kt,Vt,qt,Bt,ne){switch(Kt){case"[object DataView]":if(bt.byteLength!=vt.byteLength||bt.byteOffset!=vt.byteOffset)return!1;bt=bt.buffer,vt=vt.buffer;case"[object ArrayBuffer]":return!(bt.byteLength!=vt.byteLength||!Bt(new z(bt),new z(vt)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ut(+bt,+vt);case"[object Error]":return bt.name==vt.name&&bt.message==vt.message;case"[object RegExp]":case"[object String]":return bt==vt+"";case a:var ie=L;case t:var le=1&Vt;if(ie||(ie=I),bt.size!=vt.size&&!le)return!1;var ce=ne.get(bt);if(ce)return ce==vt;Vt|=2,ne.set(bt,vt);var me=kt(ie(bt),ie(vt),Vt,qt,Bt,ne);return ne.delete(bt),me;case"[object Symbol]":if(at)return at.call(bt)==at.call(vt)}return!1})(wt,Lt,fe,Pt,Ot,$t,zt);if(!(1&Pt)){var lt=pe&&b.call(wt,"__wrapped__"),ht=ge&&b.call(Lt,"__wrapped__");if(lt||ht){var pt=lt?wt.value():wt,Mt=ht?Lt.value():Lt;return zt||(zt=new _t),$t(pt,Mt,Pt,Ot,zt)}}return J?(zt||(zt=new _t),(function(bt,vt,Kt,Vt,qt,Bt){var ne=1&Kt,ie=Ct(bt),le=ie.length,ce=Ct(vt).length;if(le!=ce&&!ne)return!1;for(var me=le;me--;){var be=ie[me];if(!(ne?be in vt:b.call(vt,be)))return!1}var we=Bt.get(bt);if(we&&Bt.get(vt))return we==vt;var Me=!0;Bt.set(bt,vt),Bt.set(vt,bt);for(var Te=ne;++me<le;){be=ie[me];var Ae=bt[be],Re=vt[be];if(Vt)var se=ne?Vt(Re,Ae,be,vt,bt,Bt):Vt(Ae,Re,be,bt,vt,Bt);if(!(se===void 0?Ae===Re||qt(Ae,Re,Kt,Vt,Bt):se)){Me=!1;break}Te||(Te=be=="constructor")}if(Me&&!Te){var Jt=bt.constructor,Se=vt.constructor;Jt==Se||!("constructor"in bt)||!("constructor"in vt)||typeof Jt=="function"&&Jt instanceof Jt&&typeof Se=="function"&&Se instanceof Se||(Me=!1)}return Bt.delete(bt),Bt.delete(vt),Me})(wt,Lt,Pt,Ot,$t,zt)):!1})(et,ot,ct,yt,jt,Nt))}function St(et){return!(!Ft(et)||(function(ot){return!!g&&g in ot})(et))&&(Yt(et)?E:e).test(Xt(et))}function mt(et){if(ct=(ot=et)&&ot.constructor,yt=typeof ct=="function"&&ct.prototype||C,ot!==yt)return M(et);var ot,ct,yt,Nt=[];for(var wt in Object(et))b.call(et,wt)&&wt!="constructor"&&Nt.push(wt);return Nt}function kt(et,ot,ct,yt,Nt,wt){var Lt=1&ct,Pt=et.length,Ot=ot.length;if(Pt!=Ot&&!(Lt&&Ot>Pt))return!1;var $t=wt.get(et);if($t&&wt.get(ot))return $t==ot;var zt=-1,Wt=!0,he=2&ct?new xt:void 0;for(wt.set(et,ot),wt.set(ot,et);++zt<Pt;){var fe=et[zt],de=ot[zt];if(yt)var pe=Lt?yt(de,fe,zt,ot,et,wt):yt(fe,de,zt,et,ot,wt);if(pe!==void 0){if(pe)continue;Wt=!1;break}if(he){if(!N(ot,(function(ge,J){if(lt=J,!he.has(lt)&&(fe===ge||Nt(fe,ge,ct,yt,wt)))return he.push(J);var lt}))){Wt=!1;break}}else if(fe!==de&&!Nt(fe,de,ct,yt,wt)){Wt=!1;break}}return wt.delete(et),wt.delete(ot),Wt}function Ct(et){return(function(ot,ct,yt){var Nt=ct(ot);return te(ot)?Nt:(function(wt,Lt){for(var Pt=-1,Ot=Lt.length,$t=wt.length;++Pt<Ot;)wt[$t+Pt]=Lt[Pt];return wt})(Nt,yt(ot))})(et,Ht,re)}function Et(et,ot){var ct,yt,Nt=et.__data__;return((yt=typeof(ct=ot))=="string"||yt=="number"||yt=="symbol"||yt=="boolean"?ct!=="__proto__":ct===null)?Nt[typeof ot=="string"?"string":"hash"]:Nt.map}function Zt(et,ot){var ct=(function(yt,Nt){return yt?.[Nt]})(et,ot);return St(ct)?ct:void 0}ut.prototype.clear=function(){this.__data__=nt?nt(null):{},this.size=0},ut.prototype.delete=function(et){var ot=this.has(et)&&delete this.__data__[et];return this.size-=ot?1:0,ot},ut.prototype.get=function(et){var ot=this.__data__;if(nt){var ct=ot[et];return ct==="__lodash_hash_undefined__"?void 0:ct}return b.call(ot,et)?ot[et]:void 0},ut.prototype.has=function(et){var ot=this.__data__;return nt?ot[et]!==void 0:b.call(ot,et)},ut.prototype.set=function(et,ot){var ct=this.__data__;return this.size+=this.has(et)?0:1,ct[et]=nt&&ot===void 0?"__lodash_hash_undefined__":ot,this},ft.prototype.clear=function(){this.__data__=[],this.size=0},ft.prototype.delete=function(et){var ot=this.__data__,ct=Rt(ot,et);return!(ct<0)&&(ct==ot.length-1?ot.pop():Z.call(ot,ct,1),--this.size,!0)},ft.prototype.get=function(et){var ot=this.__data__,ct=Rt(ot,et);return ct<0?void 0:ot[ct][1]},ft.prototype.has=function(et){return Rt(this.__data__,et)>-1},ft.prototype.set=function(et,ot){var ct=this.__data__,yt=Rt(ct,et);return yt<0?(++this.size,ct.push([et,ot])):ct[yt][1]=ot,this},dt.prototype.clear=function(){this.size=0,this.__data__={hash:new ut,map:new(V||ft),string:new ut}},dt.prototype.delete=function(et){var ot=Et(this,et).delete(et);return this.size-=ot?1:0,ot},dt.prototype.get=function(et){return Et(this,et).get(et)},dt.prototype.has=function(et){return Et(this,et).has(et)},dt.prototype.set=function(et,ot){var ct=Et(this,et),yt=ct.size;return ct.set(et,ot),this.size+=ct.size==yt?0:1,this},xt.prototype.add=xt.prototype.push=function(et){return this.__data__.set(et,"__lodash_hash_undefined__"),this},xt.prototype.has=function(et){return this.__data__.has(et)},_t.prototype.clear=function(){this.__data__=new ft,this.size=0},_t.prototype.delete=function(et){var ot=this.__data__,ct=ot.delete(et);return this.size=ot.size,ct},_t.prototype.get=function(et){return this.__data__.get(et)},_t.prototype.has=function(et){return this.__data__.has(et)},_t.prototype.set=function(et,ot){var ct=this.__data__;if(ct instanceof ft){var yt=ct.__data__;if(!V||yt.length<199)return yt.push([et,ot]),this.size=++ct.size,this;ct=this.__data__=new dt(yt)}return ct.set(et,ot),this.size=ct.size,this};var re=H?function(et){return et==null?[]:(et=Object(et),(function(ot,ct){for(var yt=-1,Nt=ot==null?0:ot.length,wt=0,Lt=[];++yt<Nt;){var Pt=ot[yt];ct(Pt,yt,ot)&&(Lt[wt++]=Pt)}return Lt})(H(et),(function(ot){return $.call(et,ot)})))}:function(){return[]},It=Tt;function Qt(et,ot){return!!(ot=ot??9007199254740991)&&(typeof et=="number"||l.test(et))&&et>-1&&et%1==0&&et<ot}function Xt(et){if(et!=null){try{return m.call(et)}catch{}try{return et+""}catch{}}return""}function Ut(et,ot){return et===ot||et!=et&&ot!=ot}(F&&It(new F(new ArrayBuffer(1)))!="[object DataView]"||V&&It(new V)!=a||Y&&It(Y.resolve())!="[object Promise]"||q&&It(new q)!=t||K&&It(new K)!="[object WeakMap]")&&(It=function(et){var ot=Tt(et),ct=ot==r?et.constructor:void 0,yt=ct?Xt(ct):"";if(yt)switch(yt){case rt:return"[object DataView]";case G:return a;case tt:return"[object Promise]";case Q:return t;case st:return"[object WeakMap]"}return ot});var ue=At((function(){return arguments})())?At:function(et){return ee(et)&&b.call(et,"callee")&&!$.call(et,"callee")},te=Array.isArray,Dt=T||function(){return!1};function Yt(et){if(!Ft(et))return!1;var ot=Tt(et);return ot=="[object Function]"||ot=="[object GeneratorFunction]"||ot=="[object AsyncFunction]"||ot=="[object Proxy]"}function oe(et){return typeof et=="number"&&et>-1&&et%1==0&&et<=9007199254740991}function Ft(et){var ot=typeof et;return et!=null&&(ot=="object"||ot=="function")}function ee(et){return et!=null&&typeof et=="object"}var ae=A?(function(et){return function(ot){return et(ot)}})(A):function(et){return ee(et)&&oe(et.length)&&!!i[Tt(et)]};function Ht(et){return(ot=et)!=null&&oe(ot.length)&&!Yt(ot)?gt(et):mt(et);var ot}x.exports=function(et,ot){return jt(et,ot)}}).call(this)}).call(this,typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],446:[function(n,x,_){(function(c){(function(){var o=typeof c=="object"&&c&&c.Object===Object&&c,a=typeof self=="object"&&self&&self.Object===Object&&self,r=o||a||Function("return this")(),t=Object.prototype,e=t.hasOwnProperty,l=t.toString,i=r.Symbol,s=i?i.toStringTag:void 0;function f(h){return h==null?h===void 0?"[object Undefined]":"[object Null]":s&&s in Object(h)?(function(u){var p=e.call(u,s),d=u[s];try{u[s]=void 0;var w=!0}catch{}var S=l.call(u);return w&&(p?u[s]=d:delete u[s]),S})(h):(function(u){return l.call(u)})(h)}x.exports=function(h){if(!(function(p){var d=typeof p;return p!=null&&(d=="object"||d=="function")})(h))return!1;var u=f(h);return u=="[object Function]"||u=="[object GeneratorFunction]"||u=="[object AsyncFunction]"||u=="[object Proxy]"}}).call(this)}).call(this,typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],447:[function(n,x,_){x.exports=function(c){return c==null}},{}],448:[function(n,x,_){x.exports=function(c){return c===void 0}},{}],449:[function(n,x,_){(function(c){(function(){var o=/^\[object .+?Constructor\]$/,a=typeof c=="object"&&c&&c.Object===Object&&c,r=typeof self=="object"&&self&&self.Object===Object&&self,t=a||r||Function("return this")();function e(O,z){return!!(O&&O.length)&&(function($,Z,j){if(Z!=Z)return(function(M,F,V,Y){for(var q=M.length,K=V+-1;++K<q;)if(F(M[K],K,M))return K;return-1})($,l,j);for(var H=j-1,T=$.length;++H<T;)if($[H]===Z)return H;return-1})(O,z,0)>-1}function l(O){return O!=O}function i(O,z){return O.has(z)}function s(O){var z=-1,$=Array(O.size);return O.forEach((function(Z){$[++z]=Z})),$}var f,h=Array.prototype,u=Function.prototype,p=Object.prototype,d=t["__core-js_shared__"],w=(f=/[^.]+$/.exec(d&&d.keys&&d.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",S=u.toString,A=p.hasOwnProperty,N=p.toString,L=RegExp("^"+S.call(A).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=h.splice,P=E(t,"Map"),D=E(t,"Set"),U=E(Object,"create");function B(O){var z=-1,$=O?O.length:0;for(this.clear();++z<$;){var Z=O[z];this.set(Z[0],Z[1])}}function k(O){var z=-1,$=O?O.length:0;for(this.clear();++z<$;){var Z=O[z];this.set(Z[0],Z[1])}}function C(O){var z=-1,$=O?O.length:0;for(this.clear();++z<$;){var Z=O[z];this.set(Z[0],Z[1])}}function v(O){var z=-1,$=O?O.length:0;for(this.__data__=new C;++z<$;)this.add(O[z])}function m(O,z){for(var $,Z,j=O.length;j--;)if(($=O[j][0])===(Z=z)||$!=$&&Z!=Z)return j;return-1}function b(O){return!(!R(O)||(z=O,w&&w in z))&&((function($){var Z=R($)?N.call($):"";return Z=="[object Function]"||Z=="[object GeneratorFunction]"})(O)||(function($){var Z=!1;if($!=null&&typeof $.toString!="function")try{Z=!!($+"")}catch{}return Z})(O)?L:o).test((function($){if($!=null){try{return S.call($)}catch{}try{return $+""}catch{}}return""})(O));var z}B.prototype.clear=function(){this.__data__=U?U(null):{}},B.prototype.delete=function(O){return this.has(O)&&delete this.__data__[O]},B.prototype.get=function(O){var z=this.__data__;if(U){var $=z[O];return $==="__lodash_hash_undefined__"?void 0:$}return A.call(z,O)?z[O]:void 0},B.prototype.has=function(O){var z=this.__data__;return U?z[O]!==void 0:A.call(z,O)},B.prototype.set=function(O,z){return this.__data__[O]=U&&z===void 0?"__lodash_hash_undefined__":z,this},k.prototype.clear=function(){this.__data__=[]},k.prototype.delete=function(O){var z=this.__data__,$=m(z,O);return!($<0)&&($==z.length-1?z.pop():I.call(z,$,1),!0)},k.prototype.get=function(O){var z=this.__data__,$=m(z,O);return $<0?void 0:z[$][1]},k.prototype.has=function(O){return m(this.__data__,O)>-1},k.prototype.set=function(O,z){var $=this.__data__,Z=m($,O);return Z<0?$.push([O,z]):$[Z][1]=z,this},C.prototype.clear=function(){this.__data__={hash:new B,map:new(P||k),string:new B}},C.prototype.delete=function(O){return y(this,O).delete(O)},C.prototype.get=function(O){return y(this,O).get(O)},C.prototype.has=function(O){return y(this,O).has(O)},C.prototype.set=function(O,z){return y(this,O).set(O,z),this},v.prototype.add=v.prototype.push=function(O){return this.__data__.set(O,"__lodash_hash_undefined__"),this},v.prototype.has=function(O){return this.__data__.has(O)};var g=D&&1/s(new D([,-0]))[1]==1/0?function(O){return new D(O)}:function(){};function y(O,z){var $,Z,j=O.__data__;return((Z=typeof($=z))=="string"||Z=="number"||Z=="symbol"||Z=="boolean"?$!=="__proto__":$===null)?j[typeof z=="string"?"string":"hash"]:j.map}function E(O,z){var $=(function(Z,j){return Z?.[j]})(O,z);return b($)?$:void 0}function R(O){var z=typeof O;return!!O&&(z=="object"||z=="function")}x.exports=function(O){return O&&O.length?(function(z,$,Z){var j=-1,H=e,T=z.length,M=!0,F=[],V=F;if(T>=200){var Y=g(z);if(Y)return s(Y);M=!1,H=i,V=new v}else V=F;t:for(;++j<T;){var q=z[j],K=q;if(q=q!==0?q:0,M&&K==K){for(var nt=V.length;nt--;)if(V[nt]===K)continue t;F.push(q)}else H(V,K,Z)||(V!==F&&V.push(K),F.push(q))}return F})(O):[]}}).call(this)}).call(this,typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],450:[function(n,x,_){var c=n("inherits"),o=n("hash-base"),a=n("safe-buffer").Buffer,r=new Array(16);function t(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function e(h,u){return h<<u|h>>>32-u}function l(h,u,p,d,w,S,A){return e(h+(u&p|~u&d)+w+S|0,A)+u|0}function i(h,u,p,d,w,S,A){return e(h+(u&d|p&~d)+w+S|0,A)+u|0}function s(h,u,p,d,w,S,A){return e(h+(u^p^d)+w+S|0,A)+u|0}function f(h,u,p,d,w,S,A){return e(h+(p^(u|~d))+w+S|0,A)+u|0}c(t,o),t.prototype._update=function(){for(var h=r,u=0;u<16;++u)h[u]=this._block.readInt32LE(4*u);var p=this._a,d=this._b,w=this._c,S=this._d;p=l(p,d,w,S,h[0],3614090360,7),S=l(S,p,d,w,h[1],3905402710,12),w=l(w,S,p,d,h[2],606105819,17),d=l(d,w,S,p,h[3],3250441966,22),p=l(p,d,w,S,h[4],4118548399,7),S=l(S,p,d,w,h[5],1200080426,12),w=l(w,S,p,d,h[6],2821735955,17),d=l(d,w,S,p,h[7],4249261313,22),p=l(p,d,w,S,h[8],1770035416,7),S=l(S,p,d,w,h[9],2336552879,12),w=l(w,S,p,d,h[10],4294925233,17),d=l(d,w,S,p,h[11],2304563134,22),p=l(p,d,w,S,h[12],1804603682,7),S=l(S,p,d,w,h[13],4254626195,12),w=l(w,S,p,d,h[14],2792965006,17),p=i(p,d=l(d,w,S,p,h[15],1236535329,22),w,S,h[1],4129170786,5),S=i(S,p,d,w,h[6],3225465664,9),w=i(w,S,p,d,h[11],643717713,14),d=i(d,w,S,p,h[0],3921069994,20),p=i(p,d,w,S,h[5],3593408605,5),S=i(S,p,d,w,h[10],38016083,9),w=i(w,S,p,d,h[15],3634488961,14),d=i(d,w,S,p,h[4],3889429448,20),p=i(p,d,w,S,h[9],568446438,5),S=i(S,p,d,w,h[14],3275163606,9),w=i(w,S,p,d,h[3],4107603335,14),d=i(d,w,S,p,h[8],1163531501,20),p=i(p,d,w,S,h[13],2850285829,5),S=i(S,p,d,w,h[2],4243563512,9),w=i(w,S,p,d,h[7],1735328473,14),p=s(p,d=i(d,w,S,p,h[12],2368359562,20),w,S,h[5],4294588738,4),S=s(S,p,d,w,h[8],2272392833,11),w=s(w,S,p,d,h[11],1839030562,16),d=s(d,w,S,p,h[14],4259657740,23),p=s(p,d,w,S,h[1],2763975236,4),S=s(S,p,d,w,h[4],1272893353,11),w=s(w,S,p,d,h[7],4139469664,16),d=s(d,w,S,p,h[10],3200236656,23),p=s(p,d,w,S,h[13],681279174,4),S=s(S,p,d,w,h[0],3936430074,11),w=s(w,S,p,d,h[3],3572445317,16),d=s(d,w,S,p,h[6],76029189,23),p=s(p,d,w,S,h[9],3654602809,4),S=s(S,p,d,w,h[12],3873151461,11),w=s(w,S,p,d,h[15],530742520,16),p=f(p,d=s(d,w,S,p,h[2],3299628645,23),w,S,h[0],4096336452,6),S=f(S,p,d,w,h[7],1126891415,10),w=f(w,S,p,d,h[14],2878612391,15),d=f(d,w,S,p,h[5],4237533241,21),p=f(p,d,w,S,h[12],1700485571,6),S=f(S,p,d,w,h[3],2399980690,10),w=f(w,S,p,d,h[10],4293915773,15),d=f(d,w,S,p,h[1],2240044497,21),p=f(p,d,w,S,h[8],1873313359,6),S=f(S,p,d,w,h[15],4264355552,10),w=f(w,S,p,d,h[6],2734768916,15),d=f(d,w,S,p,h[13],1309151649,21),p=f(p,d,w,S,h[4],4149444226,6),S=f(S,p,d,w,h[11],3174756917,10),w=f(w,S,p,d,h[2],718787259,15),d=f(d,w,S,p,h[9],3951481745,21),this._a=this._a+p|0,this._b=this._b+d|0,this._c=this._c+w|0,this._d=this._d+S|0},t.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 h=a.allocUnsafe(16);return h.writeInt32LE(this._a,0),h.writeInt32LE(this._b,4),h.writeInt32LE(this._c,8),h.writeInt32LE(this._d,12),h},x.exports=t},{"hash-base":425,inherits:440,"safe-buffer":494}],451:[function(n,x,_){var c=n("bn.js"),o=n("brorand");function a(r){this.rand=r||new o.Rand}x.exports=a,a.create=function(r){return new a(r)},a.prototype._randbelow=function(r){var t=r.bitLength(),e=Math.ceil(t/8);do var l=new c(this.rand.generate(e));while(l.cmp(r)>=0);return l},a.prototype._randrange=function(r,t){var e=t.sub(r);return r.add(this._randbelow(e))},a.prototype.test=function(r,t,e){var l=r.bitLength(),i=c.mont(r),s=new c(1).toRed(i);t||(t=Math.max(1,l/48|0));for(var f=r.subn(1),h=0;!f.testn(h);h++);for(var u=r.shrn(h),p=f.toRed(i);t>0;t--){var d=this._randrange(new c(2),f);e&&e(d);var w=d.toRed(i).redPow(u);if(w.cmp(s)!==0&&w.cmp(p)!==0){for(var S=1;S<h;S++){if((w=w.redSqr()).cmp(s)===0)return!1;if(w.cmp(p)===0)break}if(S===h)return!1}}return!0},a.prototype.getDivisor=function(r,t){var e=r.bitLength(),l=c.mont(r),i=new c(1).toRed(l);t||(t=Math.max(1,e/48|0));for(var s=r.subn(1),f=0;!s.testn(f);f++);for(var h=r.shrn(f),u=s.toRed(l);t>0;t--){var p=this._randrange(new c(2),s),d=r.gcd(p);if(d.cmpn(1)!==0)return d;var w=p.toRed(l).redPow(h);if(w.cmp(i)!==0&&w.cmp(u)!==0){for(var S=1;S<f;S++){if((w=w.redSqr()).cmp(i)===0)return w.fromRed().subn(1).gcd(r);if(w.cmp(u)===0)break}if(S===f)return(w=w.redSqr()).fromRed().subn(1).gcd(r)}}return!1}},{"bn.js":452,brorand:187}],452:[function(n,x,_){arguments[4][184][0].apply(_,arguments)},{buffer:188,dup:184}],453:[function(n,x,_){function c(o,a){if(!o)throw new Error(a||"Assertion failed")}x.exports=c,c.equal=function(o,a,r){if(o!=a)throw new Error(r||"Assertion failed: "+o+" != "+a)}},{}],454:[function(n,x,_){var c=_;function o(r){return r.length===1?"0"+r:r}function a(r){for(var t="",e=0;e<r.length;e++)t+=o(r[e].toString(16));return t}c.toArray=function(r,t){if(Array.isArray(r))return r.slice();if(!r)return[];var e=[];if(typeof r!="string"){for(var l=0;l<r.length;l++)e[l]=0|r[l];return e}if(t==="hex")for((r=r.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(r="0"+r),l=0;l<r.length;l+=2)e.push(parseInt(r[l]+r[l+1],16));else for(l=0;l<r.length;l++){var i=r.charCodeAt(l),s=i>>8,f=255&i;s?e.push(s,f):e.push(f)}return e},c.zero2=o,c.toHex=a,c.encode=function(r,t){return t==="hex"?a(r):r}},{}],455:[function(n,x,_){x.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"}},{}],456:[function(n,x,_){var c=n("asn1.js");_.certificate=n("./certificate");var o=c.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())}));_.RSAPrivateKey=o;var a=c.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));_.RSAPublicKey=a;var r=c.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(t),this.key("subjectPublicKey").bitstr())}));_.PublicKey=r;var t=c.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())})),e=c.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(t),this.key("subjectPrivateKey").octstr())}));_.PrivateKey=e;var l=c.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())}));_.EncryptedPrivateKey=l;var i=c.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())}));_.DSAPrivateKey=i,_.DSAparam=c.define("DSAparam",(function(){this.int()}));var s=c.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())}));_.ECPrivateKey=s;var f=c.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));_.signature=c.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":457,"asn1.js":170}],457:[function(n,x,_){var c=n("asn1.js"),o=c.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=c.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),r=c.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),t=c.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(r),this.key("subjectPublicKey").bitstr())})),e=c.define("RelativeDistinguishedName",(function(){this.setof(a)})),l=c.define("RDNSequence",(function(){this.seqof(e)})),i=c.define("Name",(function(){this.choice({rdnSequence:this.use(l)})})),s=c.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(o),this.key("notAfter").use(o))})),f=c.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=c.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(r),this.key("issuer").use(i),this.key("validity").use(s),this.key("subject").use(i),this.key("subjectPublicKeyInfo").use(t),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())})),u=c.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(r),this.key("signatureValue").bitstr())}));x.exports=u},{"asn1.js":170}],458:[function(n,x,_){var c=/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,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,r=n("evp_bytestokey"),t=n("browserify-aes"),e=n("safe-buffer").Buffer;x.exports=function(l,i){var s,f=l.toString(),h=f.match(c);if(h){var u="aes"+h[1],p=e.from(h[2],"hex"),d=e.from(h[3].replace(/[\r\n]/g,""),"base64"),w=r(i,p.slice(0,8),parseInt(h[1],10)).key,S=[],A=t.createDecipheriv(u,w,p);S.push(A.update(d)),S.push(A.final()),s=e.concat(S)}else{var N=f.match(a);s=e.from(N[2].replace(/[\r\n]/g,""),"base64")}return{tag:f.match(o)[1],data:s}}},{"browserify-aes":191,evp_bytestokey:423,"safe-buffer":494}],459:[function(n,x,_){var c=n("./asn1"),o=n("./aesid.json"),a=n("./fixProc"),r=n("browserify-aes"),t=n("pbkdf2"),e=n("safe-buffer").Buffer;function l(i){var s;typeof i!="object"||e.isBuffer(i)||(s=i.passphrase,i=i.key),typeof i=="string"&&(i=e.from(i));var f,h,u=a(i,s),p=u.tag,d=u.data;switch(p){case"CERTIFICATE":h=c.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(h||(h=c.PublicKey.decode(d,"der")),f=h.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return c.RSAPublicKey.decode(h.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return h.subjectPrivateKey=h.subjectPublicKey,{type:"ec",data:h};case"1.2.840.10040.4.1":return h.algorithm.params.pub_key=c.DSAparam.decode(h.subjectPublicKey.data,"der"),{type:"dsa",data:h.algorithm.params};default:throw new Error("unknown key id "+f)}case"ENCRYPTED PRIVATE KEY":d=(function(w,S){var A=w.algorithm.decrypt.kde.kdeparams.salt,N=parseInt(w.algorithm.decrypt.kde.kdeparams.iters.toString(),10),L=o[w.algorithm.decrypt.cipher.algo.join(".")],I=w.algorithm.decrypt.cipher.iv,P=w.subjectPrivateKey,D=parseInt(L.split("-")[1],10)/8,U=t.pbkdf2Sync(S,A,N,D,"sha1"),B=r.createDecipheriv(L,U,I),k=[];return k.push(B.update(P)),k.push(B.final()),e.concat(k)})(d=c.EncryptedPrivateKey.decode(d,"der"),s);case"PRIVATE KEY":switch(f=(h=c.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return c.RSAPrivateKey.decode(h.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:h.algorithm.curve,privateKey:c.ECPrivateKey.decode(h.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return h.algorithm.params.priv_key=c.DSAparam.decode(h.subjectPrivateKey,"der"),{type:"dsa",params:h.algorithm.params};default:throw new Error("unknown key id "+f)}case"RSA PUBLIC KEY":return c.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return c.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:c.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=c.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+p)}}x.exports=l,l.signature=c.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":191,pbkdf2:460,"safe-buffer":494}],460:[function(n,x,_){_.pbkdf2=n("./lib/async"),_.pbkdf2Sync=n("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(n,x,_){(function(c){(function(){var o,a,r=n("safe-buffer").Buffer,t=n("./precondition"),e=n("./default-encoding"),l=n("./sync"),i=n("./to-buffer"),s=c.crypto&&c.crypto.subtle,f={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 u(){return a||(a=c.process&&c.process.nextTick?c.process.nextTick:c.queueMicrotask?c.queueMicrotask:c.setImmediate?c.setImmediate:c.setTimeout)}function p(d,w,S,A,N){return s.importKey("raw",d,{name:"PBKDF2"},!1,["deriveBits"]).then((function(L){return s.deriveBits({name:"PBKDF2",salt:w,iterations:S,hash:{name:N}},L,A<<3)})).then((function(L){return r.from(L)}))}x.exports=function(d,w,S,A,N,L){typeof N=="function"&&(L=N,N=void 0);var I=f[(N=N||"sha1").toLowerCase()];if(I&&typeof c.Promise=="function"){if(t(S,A),d=i(d,e,"Password"),w=i(w,e,"Salt"),typeof L!="function")throw new Error("No callback provided to pbkdf2");(function(P,D){P.then((function(U){u()((function(){D(null,U)}))}),(function(U){u()((function(){D(U)}))}))})((function(P){if(c.process&&!c.process.browser||!s||!s.importKey||!s.deriveBits)return Promise.resolve(!1);if(h[P]!==void 0)return h[P];var D=p(o=o||r.alloc(8),o,10,128,P).then((function(){return!0})).catch((function(){return!1}));return h[P]=D,D})(I).then((function(P){return P?p(d,w,S,A,I):l(d,w,S,A,N)})),L)}else u()((function(){var P;try{P=l(d,w,S,A,N)}catch(D){return L(D)}L(null,P)}))}}).call(this)}).call(this,typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,"safe-buffer":494}],462:[function(n,x,_){(function(c,o){(function(){var a;o.process&&o.process.browser?a="utf-8":o.process&&o.process.version?a=parseInt(c.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":a="utf-8",x.exports=a}).call(this)}).call(this,n("_process"),typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467}],463:[function(n,x,_){var c=Math.pow(2,30)-1;x.exports=function(o,a){if(typeof o!="number")throw new TypeError("Iterations not a number");if(o<0)throw new TypeError("Bad iterations");if(typeof a!="number")throw new TypeError("Key length not a number");if(a<0||a>c||a!=a)throw new TypeError("Bad key length")}},{}],464:[function(n,x,_){var c=n("create-hash/md5"),o=n("ripemd160"),a=n("sha.js"),r=n("safe-buffer").Buffer,t=n("./precondition"),e=n("./default-encoding"),l=n("./to-buffer"),i=r.alloc(128),s={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(h,u,p){var d=(function(I){function P(D){return a(I).update(D).digest()}return I==="rmd160"||I==="ripemd160"?function(D){return new o().update(D).digest()}:I==="md5"?c:P})(h),w=h==="sha512"||h==="sha384"?128:64;u.length>w?u=d(u):u.length<w&&(u=r.concat([u,i],w));for(var S=r.allocUnsafe(w+s[h]),A=r.allocUnsafe(w+s[h]),N=0;N<w;N++)S[N]=54^u[N],A[N]=92^u[N];var L=r.allocUnsafe(w+p+4);S.copy(L,0,0,w),this.ipad1=L,this.ipad2=S,this.opad=A,this.alg=h,this.blocksize=w,this.hash=d,this.size=s[h]}f.prototype.run=function(h,u){return h.copy(u,this.blocksize),this.hash(u).copy(this.opad,this.blocksize),this.hash(this.opad)},x.exports=function(h,u,p,d,w){t(p,d);var S=new f(w=w||"sha1",h=l(h,e,"Password"),(u=l(u,e,"Salt")).length),A=r.allocUnsafe(d),N=r.allocUnsafe(u.length+4);u.copy(N,0,0,u.length);for(var L=0,I=s[w],P=Math.ceil(d/I),D=1;D<=P;D++){N.writeUInt32BE(D,u.length);for(var U=S.run(N,S.ipad1),B=U,k=1;k<p;k++){B=S.run(B,S.ipad2);for(var C=0;C<I;C++)U[C]^=B[C]}U.copy(A,L),L+=I}return A}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":387,ripemd160:493,"safe-buffer":494,"sha.js":498}],465:[function(n,x,_){var c=n("safe-buffer").Buffer;x.exports=function(o,a,r){if(c.isBuffer(o))return o;if(typeof o=="string")return c.from(o,a);if(ArrayBuffer.isView(o))return c.from(o.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(n,x,_){(function(c){(function(){c===void 0||!c.version||c.version.indexOf("v0.")===0||c.version.indexOf("v1.")===0&&c.version.indexOf("v1.8.")!==0?x.exports={nextTick:function(o,a,r,t){if(typeof o!="function")throw new TypeError('"callback" argument must be a function');var e,l,i=arguments.length;switch(i){case 0:case 1:return c.nextTick(o);case 2:return c.nextTick((function(){o.call(null,a)}));case 3:return c.nextTick((function(){o.call(null,a,r)}));case 4:return c.nextTick((function(){o.call(null,a,r,t)}));default:for(e=new Array(i-1),l=0;l<e.length;)e[l++]=arguments[l];return c.nextTick((function(){o.apply(null,e)}))}}}:x.exports=c}).call(this)}).call(this,n("_process"))},{_process:467}],467:[function(n,x,_){var c,o,a=x.exports={};function r(){throw new Error("setTimeout has not been defined")}function t(){throw new Error("clearTimeout has not been defined")}function e(w){if(c===setTimeout)return setTimeout(w,0);if((c===r||!c)&&setTimeout)return c=setTimeout,setTimeout(w,0);try{return c(w,0)}catch{try{return c.call(null,w,0)}catch{return c.call(this,w,0)}}}(function(){try{c=typeof setTimeout=="function"?setTimeout:r}catch{c=r}try{o=typeof clearTimeout=="function"?clearTimeout:t}catch{o=t}})();var l,i=[],s=!1,f=-1;function h(){s&&l&&(s=!1,l.length?i=l.concat(i):f=-1,i.length&&u())}function u(){if(!s){var w=e(h);s=!0;for(var S=i.length;S;){for(l=i,i=[];++f<S;)l&&l[f].run();f=-1,S=i.length}l=null,s=!1,(function(A){if(o===clearTimeout)return clearTimeout(A);if((o===t||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(A);try{o(A)}catch{try{return o.call(null,A)}catch{return o.call(this,A)}}})(w)}}function p(w,S){this.fun=w,this.array=S}function d(){}a.nextTick=function(w){var S=new Array(arguments.length-1);if(arguments.length>1)for(var A=1;A<arguments.length;A++)S[A-1]=arguments[A];i.push(new p(w,S)),i.length!==1||s||e(u)},p.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=d,a.addListener=d,a.once=d,a.off=d,a.removeListener=d,a.removeAllListeners=d,a.emit=d,a.prependListener=d,a.prependOnceListener=d,a.listeners=function(w){return[]},a.binding=function(w){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(w){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],468:[function(n,x,_){_.publicEncrypt=n("./publicEncrypt"),_.privateDecrypt=n("./privateDecrypt"),_.privateEncrypt=function(c,o){return _.publicEncrypt(c,o,!0)},_.publicDecrypt=function(c,o){return _.privateDecrypt(c,o,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(n,x,_){var c=n("create-hash"),o=n("safe-buffer").Buffer;function a(r){var t=o.allocUnsafe(4);return t.writeUInt32BE(r,0),t}x.exports=function(r,t){for(var e,l=o.alloc(0),i=0;l.length<t;)e=a(i++),l=o.concat([l,c("sha1").update(r).update(e).digest()]);return l.slice(0,t)}},{"create-hash":386,"safe-buffer":494}],470:[function(n,x,_){arguments[4][184][0].apply(_,arguments)},{buffer:188,dup:184}],471:[function(n,x,_){var c=n("parse-asn1"),o=n("./mgf"),a=n("./xor"),r=n("bn.js"),t=n("browserify-rsa"),e=n("create-hash"),l=n("./withPublic"),i=n("safe-buffer").Buffer;x.exports=function(s,f,h){var u;u=s.padding?s.padding:h?1:4;var p,d=c(s),w=d.modulus.byteLength();if(f.length>w||new r(f).cmp(d.modulus)>=0)throw new Error("decryption error");p=h?l(new r(f),d):t(f,d);var S=i.alloc(w-p.length);if(p=i.concat([S,p],w),u===4)return(function(A,N){var L=A.modulus.byteLength(),I=e("sha1").update(i.alloc(0)).digest(),P=I.length;if(N[0]!==0)throw new Error("decryption error");var D=N.slice(1,P+1),U=N.slice(P+1),B=a(D,o(U,P)),k=a(U,o(B,L-P-1));if((function(v,m){v=i.from(v),m=i.from(m);var b=0,g=v.length;v.length!==m.length&&(b++,g=Math.min(v.length,m.length));for(var y=-1;++y<g;)b+=v[y]^m[y];return b})(I,k.slice(0,P)))throw new Error("decryption error");for(var C=P;k[C]===0;)C++;if(k[C++]!==1)throw new Error("decryption error");return k.slice(C)})(d,p);if(u===1)return(function(A,N,L){for(var I=N.slice(0,2),P=2,D=0;N[P++]!==0;)if(P>=N.length){D++;break}var U=N.slice(2,P-1);if((I.toString("hex")!=="0002"&&!L||I.toString("hex")!=="0001"&&L)&&D++,U.length<8&&D++,D)throw new Error("decryption error");return N.slice(P)})(0,p,h);if(u===3)return p;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,"safe-buffer":494}],472:[function(n,x,_){var c=n("parse-asn1"),o=n("randombytes"),a=n("create-hash"),r=n("./mgf"),t=n("./xor"),e=n("bn.js"),l=n("./withPublic"),i=n("browserify-rsa"),s=n("safe-buffer").Buffer;x.exports=function(f,h,u){var p;p=f.padding?f.padding:u?1:4;var d,w=c(f);if(p===4)d=(function(S,A){var N=S.modulus.byteLength(),L=A.length,I=a("sha1").update(s.alloc(0)).digest(),P=I.length,D=2*P;if(L>N-D-2)throw new Error("message too long");var U=s.alloc(N-L-D-2),B=N-P-1,k=o(P),C=t(s.concat([I,U,s.alloc(1,1),A],B),r(k,B)),v=t(k,r(C,P));return new e(s.concat([s.alloc(1),v,C],N))})(w,h);else if(p===1)d=(function(S,A,N){var L,I=A.length,P=S.modulus.byteLength();if(I>P-11)throw new Error("message too long");return L=N?s.alloc(P-I-3,255):(function(D){for(var U,B=s.allocUnsafe(D),k=0,C=o(2*D),v=0;k<D;)v===C.length&&(C=o(2*D),v=0),(U=C[v++])&&(B[k++]=U);return B})(P-I-3),new e(s.concat([s.from([0,N?1:2]),L,s.alloc(1),A],P))})(w,h,u);else{if(p!==3)throw new Error("unknown padding");if((d=new e(h)).cmp(w.modulus)>=0)throw new Error("data too long for modulus")}return u?i(d,w):l(d,w)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":209,"create-hash":386,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(n,x,_){var c=n("bn.js"),o=n("safe-buffer").Buffer;x.exports=function(a,r){return o.from(a.toRed(c.mont(r.modulus)).redPow(new c(r.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(n,x,_){x.exports=function(c,o){for(var a=c.length,r=-1;++r<a;)c[r]^=o[r];return c}},{}],475:[function(n,x,_){(function(c,o){(function(){var a=n("safe-buffer").Buffer,r=o.crypto||o.msCrypto;r&&r.getRandomValues?x.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var l=a.allocUnsafe(t);if(t>0)if(t>65536)for(var i=0;i<t;i+=65536)r.getRandomValues(l.slice(i,i+65536));else r.getRandomValues(l);return typeof e=="function"?c.nextTick((function(){e(null,l)})):l}:x.exports=function(){throw new Error(`Secure random number generation is not supported by this browser.
11
- Use Chrome, Firefox or Internet Explorer 11`)}}).call(this)}).call(this,n("_process"),typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,"safe-buffer":494}],476:[function(n,x,_){(function(c,o){(function(){function a(){throw new Error(`secure random number generation not supported by this browser
12
- use chrome, FireFox or Internet Explorer 11`)}var r=n("safe-buffer"),t=n("randombytes"),e=r.Buffer,l=r.kMaxLength,i=o.crypto||o.msCrypto,s=Math.pow(2,32)-1;function f(p,d){if(typeof p!="number"||p!=p)throw new TypeError("offset must be a number");if(p>s||p<0)throw new TypeError("offset must be a uint32");if(p>l||p>d)throw new RangeError("offset out of range")}function h(p,d,w){if(typeof p!="number"||p!=p)throw new TypeError("size must be a number");if(p>s||p<0)throw new TypeError("size must be a uint32");if(p+d>w||p>l)throw new RangeError("buffer too small")}function u(p,d,w,S){if(c.browser){var A=p.buffer,N=new Uint8Array(A,d,w);return i.getRandomValues(N),S?void c.nextTick((function(){S(null,p)})):p}if(!S)return t(w).copy(p,d),p;t(w,(function(L,I){if(L)return S(L);I.copy(p,d),S(null,p)}))}i&&i.getRandomValues||!c.browser?(_.randomFill=function(p,d,w,S){if(!(e.isBuffer(p)||p instanceof o.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof d=="function")S=d,d=0,w=p.length;else if(typeof w=="function")S=w,w=p.length-d;else if(typeof S!="function")throw new TypeError('"cb" argument must be a function');return f(d,p.length),h(w,d,p.length),u(p,d,w,S)},_.randomFillSync=function(p,d,w){if(d===void 0&&(d=0),!(e.isBuffer(p)||p instanceof o.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return f(d,p.length),w===void 0&&(w=p.length-d),h(w,d,p.length),u(p,d,w)}):(_.randomFill=a,_.randomFillSync=a)}).call(this)}).call(this,n("_process"),typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(n,x,_){var c={};function o(r,t,e){e||(e=Error);var l=(function(i){var s,f;function h(u,p,d){return i.call(this,(function(w,S,A){return typeof t=="string"?t:t(w,S,A)})(u,p,d))||this}return f=i,(s=h).prototype=Object.create(f.prototype),s.prototype.constructor=s,s.__proto__=f,h})(e);l.prototype.name=e.name,l.prototype.code=r,c[r]=l}function a(r,t){if(Array.isArray(r)){var e=r.length;return r=r.map((function(l){return String(l)})),e>2?"one of ".concat(t," ").concat(r.slice(0,e-1).join(", "),", or ")+r[e-1]:e===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}o("ERR_INVALID_OPT_VALUE",(function(r,t){return'The value "'+t+'" is invalid for option "'+r+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(r,t,e){var l,i,s;if(typeof t=="string"&&(i="not ",t.substr(0,i.length)===i)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(h,u,p){return(p===void 0||p>h.length)&&(p=h.length),h.substring(p-u.length,p)===u})(r," argument"))s="The ".concat(r," ").concat(l," ").concat(a(t,"type"));else{var f=(function(h,u,p){return typeof p!="number"&&(p=0),!(p+u.length>h.length)&&h.indexOf(u,p)!==-1})(r,".")?"property":"argument";s='The "'.concat(r,'" ').concat(f," ").concat(l," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof e)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(r){return"The "+r+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(r){return"Cannot call "+r+" 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(r){return"Unknown encoding: "+r}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),x.exports.codes=c},{}],478:[function(n,x,_){(function(c){(function(){var o=Object.keys||function(h){var u=[];for(var p in h)u.push(p);return u};x.exports=i;var a=n("./_stream_readable"),r=n("./_stream_writable");n("inherits")(i,a);for(var t=o(r.prototype),e=0;e<t.length;e++){var l=t[e];i.prototype[l]||(i.prototype[l]=r.prototype[l])}function i(h){if(!(this instanceof i))return new i(h);a.call(this,h),r.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}function s(){this._writableState.ended||c.nextTick(f,this)}function f(h){h.end()}Object.defineProperty(i.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(i.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(i.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(i.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(h){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=h,this._writableState.destroyed=h)}})}).call(this)}).call(this,n("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:440}],479:[function(n,x,_){x.exports=o;var c=n("./_stream_transform");function o(a){if(!(this instanceof o))return new o(a);c.call(this,a)}n("inherits")(o,c),o.prototype._transform=function(a,r,t){t(null,a)}},{"./_stream_transform":481,inherits:440}],480:[function(n,x,_){(function(c,o){(function(){var a;x.exports=B,B.ReadableState=U,n("events").EventEmitter;var r=function(T,M){return T.listeners(M).length},t=n("./internal/streams/stream"),e=n("buffer").Buffer,l=(o!==void 0?o:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},i,s=n("util");i=s&&s.debuglog?s.debuglog("stream"):function(){};var f,h,u,p=n("./internal/streams/buffer_list"),d=n("./internal/streams/destroy"),w=n("./internal/streams/state").getHighWaterMark,S=n("../errors").codes,A=S.ERR_INVALID_ARG_TYPE,N=S.ERR_STREAM_PUSH_AFTER_EOF,L=S.ERR_METHOD_NOT_IMPLEMENTED,I=S.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n("inherits")(B,t);var P=d.errorOrDestroy,D=["error","close","destroy","pause","resume"];function U(T,M,F){a=a||n("./_stream_duplex"),T=T||{},typeof F!="boolean"&&(F=M instanceof a),this.objectMode=!!T.objectMode,F&&(this.objectMode=this.objectMode||!!T.readableObjectMode),this.highWaterMark=w(this,T,"readableHighWaterMark",F),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=T.emitClose!==!1,this.autoDestroy=!!T.autoDestroy,this.destroyed=!1,this.defaultEncoding=T.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,T.encoding&&(f||(f=n("string_decoder/").StringDecoder),this.decoder=new f(T.encoding),this.encoding=T.encoding)}function B(T){if(a=a||n("./_stream_duplex"),!(this instanceof B))return new B(T);var M=this instanceof a;this._readableState=new U(T,this,M),this.readable=!0,T&&(typeof T.read=="function"&&(this._read=T.read),typeof T.destroy=="function"&&(this._destroy=T.destroy)),t.call(this)}function k(T,M,F,V,Y){i("readableAddChunk",M);var q,K=T._readableState;if(M===null)K.reading=!1,(function(nt,rt){if(i("onEofChunk"),!rt.ended){if(rt.decoder){var G=rt.decoder.end();G&&G.length&&(rt.buffer.push(G),rt.length+=rt.objectMode?1:G.length)}rt.ended=!0,rt.sync?m(nt):(rt.needReadable=!1,rt.emittedReadable||(rt.emittedReadable=!0,b(nt)))}})(T,K);else if(Y||(q=(function(nt,rt){var G;tt=rt,e.isBuffer(tt)||tt instanceof l||typeof rt=="string"||rt===void 0||nt.objectMode||(G=new A("chunk",["string","Buffer","Uint8Array"],rt));var tt;return G})(K,M)),q)P(T,q);else if(K.objectMode||M&&M.length>0)if(typeof M=="string"||K.objectMode||Object.getPrototypeOf(M)===e.prototype||(M=(function(nt){return e.from(nt)})(M)),V)K.endEmitted?P(T,new I):C(T,K,M,!0);else if(K.ended)P(T,new N);else{if(K.destroyed)return!1;K.reading=!1,K.decoder&&!F?(M=K.decoder.write(M),K.objectMode||M.length!==0?C(T,K,M,!1):g(T,K)):C(T,K,M,!1)}else V||(K.reading=!1,g(T,K));return!K.ended&&(K.length<K.highWaterMark||K.length===0)}function C(T,M,F,V){M.flowing&&M.length===0&&!M.sync?(M.awaitDrain=0,T.emit("data",F)):(M.length+=M.objectMode?1:F.length,V?M.buffer.unshift(F):M.buffer.push(F),M.needReadable&&m(T)),g(T,M)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(T){this._readableState&&(this._readableState.destroyed=T)}}),B.prototype.destroy=d.destroy,B.prototype._undestroy=d.undestroy,B.prototype._destroy=function(T,M){M(T)},B.prototype.push=function(T,M){var F,V=this._readableState;return V.objectMode?F=!0:typeof T=="string"&&((M=M||V.defaultEncoding)!==V.encoding&&(T=e.from(T,M),M=""),F=!0),k(this,T,M,!1,F)},B.prototype.unshift=function(T){return k(this,T,null,!0,!1)},B.prototype.isPaused=function(){return this._readableState.flowing===!1},B.prototype.setEncoding=function(T){f||(f=n("string_decoder/").StringDecoder);var M=new f(T);this._readableState.decoder=M,this._readableState.encoding=this._readableState.decoder.encoding;for(var F=this._readableState.buffer.head,V="";F!==null;)V+=M.write(F.data),F=F.next;return this._readableState.buffer.clear(),V!==""&&this._readableState.buffer.push(V),this._readableState.length=V.length,this};function v(T,M){return T<=0||M.length===0&&M.ended?0:M.objectMode?1:T!=T?M.flowing&&M.length?M.buffer.head.data.length:M.length:(T>M.highWaterMark&&(M.highWaterMark=(function(F){return F>=1073741824?F=1073741824:(F--,F|=F>>>1,F|=F>>>2,F|=F>>>4,F|=F>>>8,F|=F>>>16,F++),F})(T)),T<=M.length?T:M.ended?M.length:(M.needReadable=!0,0))}function m(T){var M=T._readableState;i("emitReadable",M.needReadable,M.emittedReadable),M.needReadable=!1,M.emittedReadable||(i("emitReadable",M.flowing),M.emittedReadable=!0,c.nextTick(b,T))}function b(T){var M=T._readableState;i("emitReadable_",M.destroyed,M.length,M.ended),M.destroyed||!M.length&&!M.ended||(T.emit("readable"),M.emittedReadable=!1),M.needReadable=!M.flowing&&!M.ended&&M.length<=M.highWaterMark,z(T)}function g(T,M){M.readingMore||(M.readingMore=!0,c.nextTick(y,T,M))}function y(T,M){for(;!M.reading&&!M.ended&&(M.length<M.highWaterMark||M.flowing&&M.length===0);){var F=M.length;if(i("maybeReadMore read 0"),T.read(0),F===M.length)break}M.readingMore=!1}function E(T){var M=T._readableState;M.readableListening=T.listenerCount("readable")>0,M.resumeScheduled&&!M.paused?M.flowing=!0:T.listenerCount("data")>0&&T.resume()}function R(T){i("readable nexttick read 0"),T.read(0)}function O(T,M){i("resume",M.reading),M.reading||T.read(0),M.resumeScheduled=!1,T.emit("resume"),z(T),M.flowing&&!M.reading&&T.read(0)}function z(T){var M=T._readableState;for(i("flow",M.flowing);M.flowing&&T.read()!==null;);}function $(T,M){return M.length===0?null:(M.objectMode?F=M.buffer.shift():!T||T>=M.length?(F=M.decoder?M.buffer.join(""):M.buffer.length===1?M.buffer.first():M.buffer.concat(M.length),M.buffer.clear()):F=M.buffer.consume(T,M.decoder),F);var F}function Z(T){var M=T._readableState;i("endReadable",M.endEmitted),M.endEmitted||(M.ended=!0,c.nextTick(j,M,T))}function j(T,M){if(i("endReadableNT",T.endEmitted,T.length),!T.endEmitted&&T.length===0&&(T.endEmitted=!0,M.readable=!1,M.emit("end"),T.autoDestroy)){var F=M._writableState;(!F||F.autoDestroy&&F.finished)&&M.destroy()}}function H(T,M){for(var F=0,V=T.length;F<V;F++)if(T[F]===M)return F;return-1}B.prototype.read=function(T){i("read",T),T=parseInt(T,10);var M=this._readableState,F=T;if(T!==0&&(M.emittedReadable=!1),T===0&&M.needReadable&&((M.highWaterMark!==0?M.length>=M.highWaterMark:M.length>0)||M.ended))return i("read: emitReadable",M.length,M.ended),M.length===0&&M.ended?Z(this):m(this),null;if((T=v(T,M))===0&&M.ended)return M.length===0&&Z(this),null;var V,Y=M.needReadable;return i("need readable",Y),(M.length===0||M.length-T<M.highWaterMark)&&i("length less than watermark",Y=!0),M.ended||M.reading?i("reading or ended",Y=!1):Y&&(i("do read"),M.reading=!0,M.sync=!0,M.length===0&&(M.needReadable=!0),this._read(M.highWaterMark),M.sync=!1,M.reading||(T=v(F,M))),(V=T>0?$(T,M):null)===null?(M.needReadable=M.length<=M.highWaterMark,T=0):(M.length-=T,M.awaitDrain=0),M.length===0&&(M.ended||(M.needReadable=!0),F!==T&&M.ended&&Z(this)),V!==null&&this.emit("data",V),V},B.prototype._read=function(T){P(this,new L("_read()"))},B.prototype.pipe=function(T,M){var F=this,V=this._readableState;switch(V.pipesCount){case 0:V.pipes=T;break;case 1:V.pipes=[V.pipes,T];break;default:V.pipes.push(T)}V.pipesCount+=1,i("pipe count=%d opts=%j",V.pipesCount,M);var Y=(!M||M.end!==!1)&&T!==c.stdout&&T!==c.stderr?K:it;function q(at,ut){i("onunpipe"),at===F&&ut&&ut.hasUnpiped===!1&&(ut.hasUnpiped=!0,i("cleanup"),T.removeListener("close",Q),T.removeListener("finish",st),T.removeListener("drain",nt),T.removeListener("error",tt),T.removeListener("unpipe",q),F.removeListener("end",K),F.removeListener("end",it),F.removeListener("data",G),rt=!0,!V.awaitDrain||T._writableState&&!T._writableState.needDrain||nt())}function K(){i("onend"),T.end()}V.endEmitted?c.nextTick(Y):F.once("end",Y),T.on("unpipe",q);var nt=(function(at){return function(){var ut=at._readableState;i("pipeOnDrain",ut.awaitDrain),ut.awaitDrain&&ut.awaitDrain--,ut.awaitDrain===0&&r(at,"data")&&(ut.flowing=!0,z(at))}})(F);T.on("drain",nt);var rt=!1;function G(at){i("ondata");var ut=T.write(at);i("dest.write",ut),ut===!1&&((V.pipesCount===1&&V.pipes===T||V.pipesCount>1&&H(V.pipes,T)!==-1)&&!rt&&(i("false write response, pause",V.awaitDrain),V.awaitDrain++),F.pause())}function tt(at){i("onerror",at),it(),T.removeListener("error",tt),r(T,"error")===0&&P(T,at)}function Q(){T.removeListener("finish",st),it()}function st(){i("onfinish"),T.removeListener("close",Q),it()}function it(){i("unpipe"),F.unpipe(T)}return F.on("data",G),(function(at,ut,ft){if(typeof at.prependListener=="function")return at.prependListener(ut,ft);at._events&&at._events[ut]?Array.isArray(at._events[ut])?at._events[ut].unshift(ft):at._events[ut]=[ft,at._events[ut]]:at.on(ut,ft)})(T,"error",tt),T.once("close",Q),T.once("finish",st),T.emit("pipe",F),V.flowing||(i("pipe resume"),F.resume()),T},B.prototype.unpipe=function(T){var M=this._readableState,F={hasUnpiped:!1};if(M.pipesCount===0)return this;if(M.pipesCount===1)return T&&T!==M.pipes||(T||(T=M.pipes),M.pipes=null,M.pipesCount=0,M.flowing=!1,T&&T.emit("unpipe",this,F)),this;if(!T){var V=M.pipes,Y=M.pipesCount;M.pipes=null,M.pipesCount=0,M.flowing=!1;for(var q=0;q<Y;q++)V[q].emit("unpipe",this,{hasUnpiped:!1});return this}var K=H(M.pipes,T);return K===-1||(M.pipes.splice(K,1),M.pipesCount-=1,M.pipesCount===1&&(M.pipes=M.pipes[0]),T.emit("unpipe",this,F)),this},B.prototype.on=function(T,M){var F=t.prototype.on.call(this,T,M),V=this._readableState;return T==="data"?(V.readableListening=this.listenerCount("readable")>0,V.flowing!==!1&&this.resume()):T==="readable"&&(V.endEmitted||V.readableListening||(V.readableListening=V.needReadable=!0,V.flowing=!1,V.emittedReadable=!1,i("on readable",V.length,V.reading),V.length?m(this):V.reading||c.nextTick(R,this))),F},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(T,M){var F=t.prototype.removeListener.call(this,T,M);return T==="readable"&&c.nextTick(E,this),F},B.prototype.removeAllListeners=function(T){var M=t.prototype.removeAllListeners.apply(this,arguments);return T!=="readable"&&T!==void 0||c.nextTick(E,this),M},B.prototype.resume=function(){var T=this._readableState;return T.flowing||(i("resume"),T.flowing=!T.readableListening,(function(M,F){F.resumeScheduled||(F.resumeScheduled=!0,c.nextTick(O,M,F))})(this,T)),T.paused=!1,this},B.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},B.prototype.wrap=function(T){var M=this,F=this._readableState,V=!1;for(var Y in T.on("end",(function(){if(i("wrapped end"),F.decoder&&!F.ended){var K=F.decoder.end();K&&K.length&&M.push(K)}M.push(null)})),T.on("data",(function(K){i("wrapped data"),F.decoder&&(K=F.decoder.write(K)),F.objectMode&&K==null||(F.objectMode||K&&K.length)&&(M.push(K)||(V=!0,T.pause()))})),T)this[Y]===void 0&&typeof T[Y]=="function"&&(this[Y]=(function(K){return function(){return T[K].apply(T,arguments)}})(Y));for(var q=0;q<D.length;q++)T.on(D[q],this.emit.bind(this,D[q]));return this._read=function(K){i("wrapped _read",K),V&&(V=!1,T.resume())},this},typeof Symbol=="function"&&(B.prototype[Symbol.asyncIterator]=function(){return h===void 0&&(h=n("./internal/streams/async_iterator")),h(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(T){this._readableState&&(this._readableState.flowing=T)}}),B._fromList=$,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),typeof Symbol=="function"&&(B.from=function(T,M){return u===void 0&&(u=n("./internal/streams/from")),u(B,T,M)})}).call(this)}).call(this,n("_process"),typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/async_iterator":483,"./internal/streams/buffer_list":484,"./internal/streams/destroy":485,"./internal/streams/from":487,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,events:422,inherits:440,"string_decoder/":522,util:188}],481:[function(n,x,_){x.exports=i;var c=n("../errors").codes,o=c.ERR_METHOD_NOT_IMPLEMENTED,a=c.ERR_MULTIPLE_CALLBACK,r=c.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=c.ERR_TRANSFORM_WITH_LENGTH_0,e=n("./_stream_duplex");function l(h,u){var p=this._transformState;p.transforming=!1;var d=p.writecb;if(d===null)return this.emit("error",new a);p.writechunk=null,p.writecb=null,u!=null&&this.push(u),d(h);var w=this._readableState;w.reading=!1,(w.needReadable||w.length<w.highWaterMark)&&this._read(w.highWaterMark)}function i(h){if(!(this instanceof i))return new i(h);e.call(this,h),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,h&&(typeof h.transform=="function"&&(this._transform=h.transform),typeof h.flush=="function"&&(this._flush=h.flush)),this.on("prefinish",s)}function s(){var h=this;typeof this._flush!="function"||this._readableState.destroyed?f(this,null,null):this._flush((function(u,p){f(h,u,p)}))}function f(h,u,p){if(u)return h.emit("error",u);if(p!=null&&h.push(p),h._writableState.length)throw new t;if(h._transformState.transforming)throw new r;return h.push(null)}n("inherits")(i,e),i.prototype.push=function(h,u){return this._transformState.needTransform=!1,e.prototype.push.call(this,h,u)},i.prototype._transform=function(h,u,p){p(new o("_transform()"))},i.prototype._write=function(h,u,p){var d=this._transformState;if(d.writecb=p,d.writechunk=h,d.writeencoding=u,!d.transforming){var w=this._readableState;(d.needTransform||w.needReadable||w.length<w.highWaterMark)&&this._read(w.highWaterMark)}},i.prototype._read=function(h){var u=this._transformState;u.writechunk===null||u.transforming?u.needTransform=!0:(u.transforming=!0,this._transform(u.writechunk,u.writeencoding,u.afterTransform))},i.prototype._destroy=function(h,u){e.prototype._destroy.call(this,h,(function(p){u(p)}))}},{"../errors":477,"./_stream_duplex":478,inherits:440}],482:[function(n,x,_){(function(c,o){(function(){function a(y){var E=this;this.next=null,this.entry=null,this.finish=function(){(function(R,O,z){var $=R.entry;for(R.entry=null;$;){var Z=$.callback;O.pendingcb--,Z(z),$=$.next}O.corkedRequestsFree.next=R})(E,y)}}var r;x.exports=B,B.WritableState=U;var t={deprecate:n("util-deprecate")},e=n("./internal/streams/stream"),l=n("buffer").Buffer,i=(o!==void 0?o:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},s,f=n("./internal/streams/destroy"),h=n("./internal/streams/state").getHighWaterMark,u=n("../errors").codes,p=u.ERR_INVALID_ARG_TYPE,d=u.ERR_METHOD_NOT_IMPLEMENTED,w=u.ERR_MULTIPLE_CALLBACK,S=u.ERR_STREAM_CANNOT_PIPE,A=u.ERR_STREAM_DESTROYED,N=u.ERR_STREAM_NULL_VALUES,L=u.ERR_STREAM_WRITE_AFTER_END,I=u.ERR_UNKNOWN_ENCODING,P=f.errorOrDestroy;function D(){}function U(y,E,R){r=r||n("./_stream_duplex"),y=y||{},typeof R!="boolean"&&(R=E instanceof r),this.objectMode=!!y.objectMode,R&&(this.objectMode=this.objectMode||!!y.writableObjectMode),this.highWaterMark=h(this,y,"writableHighWaterMark",R),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var O=y.decodeStrings===!1;this.decodeStrings=!O,this.defaultEncoding=y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(z){(function($,Z){var j=$._writableState,H=j.sync,T=j.writecb;if(typeof T!="function")throw new w;if((function(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0})(j),Z)(function(F,V,Y,q,K){--V.pendingcb,Y?(c.nextTick(K,q),c.nextTick(g,F,V),F._writableState.errorEmitted=!0,P(F,q)):(K(q),F._writableState.errorEmitted=!0,P(F,q),g(F,V))})($,j,H,Z,T);else{var M=m(j)||$.destroyed;M||j.corked||j.bufferProcessing||!j.bufferedRequest||v($,j),H?c.nextTick(C,$,j,M,T):C($,j,M,T)}})(E,z)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=y.emitClose!==!1,this.autoDestroy=!!y.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function B(y){var E=this instanceof(r=r||n("./_stream_duplex"));if(!E&&!s.call(B,this))return new B(y);this._writableState=new U(y,this,E),this.writable=!0,y&&(typeof y.write=="function"&&(this._write=y.write),typeof y.writev=="function"&&(this._writev=y.writev),typeof y.destroy=="function"&&(this._destroy=y.destroy),typeof y.final=="function"&&(this._final=y.final)),e.call(this)}function k(y,E,R,O,z,$,Z){E.writelen=O,E.writecb=Z,E.writing=!0,E.sync=!0,E.destroyed?E.onwrite(new A("write")):R?y._writev(z,E.onwrite):y._write(z,$,E.onwrite),E.sync=!1}function C(y,E,R,O){R||(function(z,$){$.length===0&&$.needDrain&&($.needDrain=!1,z.emit("drain"))})(y,E),E.pendingcb--,O(),g(y,E)}function v(y,E){E.bufferProcessing=!0;var R=E.bufferedRequest;if(y._writev&&R&&R.next){var O=E.bufferedRequestCount,z=new Array(O),$=E.corkedRequestsFree;$.entry=R;for(var Z=0,j=!0;R;)z[Z]=R,R.isBuf||(j=!1),R=R.next,Z+=1;z.allBuffers=j,k(y,E,!0,E.length,z,"",$.finish),E.pendingcb++,E.lastBufferedRequest=null,$.next?(E.corkedRequestsFree=$.next,$.next=null):E.corkedRequestsFree=new a(E),E.bufferedRequestCount=0}else{for(;R;){var H=R.chunk,T=R.encoding,M=R.callback;if(k(y,E,!1,E.objectMode?1:H.length,H,T,M),R=R.next,E.bufferedRequestCount--,E.writing)break}R===null&&(E.lastBufferedRequest=null)}E.bufferedRequest=R,E.bufferProcessing=!1}function m(y){return y.ending&&y.length===0&&y.bufferedRequest===null&&!y.finished&&!y.writing}function b(y,E){y._final((function(R){E.pendingcb--,R&&P(y,R),E.prefinished=!0,y.emit("prefinish"),g(y,E)}))}function g(y,E){var R=m(E);if(R&&((function(z,$){$.prefinished||$.finalCalled||(typeof z._final!="function"||$.destroyed?($.prefinished=!0,z.emit("prefinish")):($.pendingcb++,$.finalCalled=!0,c.nextTick(b,z,$)))})(y,E),E.pendingcb===0&&(E.finished=!0,y.emit("finish"),E.autoDestroy))){var O=y._readableState;(!O||O.autoDestroy&&O.endEmitted)&&y.destroy()}return R}n("inherits")(B,e),U.prototype.getBuffer=function(){for(var y=this.bufferedRequest,E=[];y;)E.push(y),y=y.next;return E},(function(){try{Object.defineProperty(U.prototype,"buffer",{get:t.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(y){return!!s.call(this,y)||this===B&&y&&y._writableState instanceof U}})):s=function(y){return y instanceof this},B.prototype.pipe=function(){P(this,new S)},B.prototype.write=function(y,E,R){var O,z=this._writableState,$=!1,Z=!z.objectMode&&(O=y,l.isBuffer(O)||O instanceof i);return Z&&!l.isBuffer(y)&&(y=(function(j){return l.from(j)})(y)),typeof E=="function"&&(R=E,E=null),Z?E="buffer":E||(E=z.defaultEncoding),typeof R!="function"&&(R=D),z.ending?(function(j,H){var T=new L;P(j,T),c.nextTick(H,T)})(this,R):(Z||(function(j,H,T,M){var F;return T===null?F=new N:typeof T=="string"||H.objectMode||(F=new p("chunk",["string","Buffer"],T)),!F||(P(j,F),c.nextTick(M,F),!1)})(this,z,y,R))&&(z.pendingcb++,$=(function(j,H,T,M,F,V){if(!T){var Y=(function(rt,G,tt){return rt.objectMode||rt.decodeStrings===!1||typeof G!="string"||(G=l.from(G,tt)),G})(H,M,F);M!==Y&&(T=!0,F="buffer",M=Y)}var q=H.objectMode?1:M.length;H.length+=q;var K=H.length<H.highWaterMark;if(K||(H.needDrain=!0),H.writing||H.corked){var nt=H.lastBufferedRequest;H.lastBufferedRequest={chunk:M,encoding:F,isBuf:T,callback:V,next:null},nt?nt.next=H.lastBufferedRequest:H.bufferedRequest=H.lastBufferedRequest,H.bufferedRequestCount+=1}else k(j,H,!1,q,M,F,V);return K})(this,z,Z,y,E,R)),$},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){var y=this._writableState;y.corked&&(y.corked--,y.writing||y.corked||y.bufferProcessing||!y.bufferedRequest||v(this,y))},B.prototype.setDefaultEncoding=function(y){if(typeof y=="string"&&(y=y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((y+"").toLowerCase())>-1))throw new I(y);return this._writableState.defaultEncoding=y,this},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),B.prototype._write=function(y,E,R){R(new d("_write()"))},B.prototype._writev=null,B.prototype.end=function(y,E,R){var O=this._writableState;return typeof y=="function"?(R=y,y=null,E=null):typeof E=="function"&&(R=E,E=null),y!=null&&this.write(y,E),O.corked&&(O.corked=1,this.uncork()),O.ending||(function(z,$,Z){$.ending=!0,g(z,$),Z&&($.finished?c.nextTick(Z):z.once("finish",Z)),$.ended=!0,z.writable=!1})(this,O,R),this},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(y){this._writableState&&(this._writableState.destroyed=y)}}),B.prototype.destroy=f.destroy,B.prototype._undestroy=f.undestroy,B.prototype._destroy=function(y,E){E(y)}}).call(this)}).call(this,n("_process"),typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/destroy":485,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:220,inherits:440,"util-deprecate":524}],483:[function(n,x,_){(function(c){(function(){var o;function a(A,N,L){return(N=(function(I){var P=(function(D,U){if(typeof D!="object"||D===null)return D;var B=D[Symbol.toPrimitive];if(B!==void 0){var k=B.call(D,U);if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return(U==="string"?String:Number)(D)})(I,"string");return typeof P=="symbol"?P:String(P)})(N))in A?Object.defineProperty(A,N,{value:L,enumerable:!0,configurable:!0,writable:!0}):A[N]=L,A}var r=n("./end-of-stream"),t=Symbol("lastResolve"),e=Symbol("lastReject"),l=Symbol("error"),i=Symbol("ended"),s=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function u(A,N){return{value:A,done:N}}function p(A){var N=A[t];if(N!==null){var L=A[h].read();L!==null&&(A[s]=null,A[t]=null,A[e]=null,N(u(L,!1)))}}function d(A){c.nextTick(p,A)}var w=Object.getPrototypeOf((function(){})),S=Object.setPrototypeOf((a(o={get stream(){return this[h]},next:function(){var A=this,N=this[l];if(N!==null)return Promise.reject(N);if(this[i])return Promise.resolve(u(void 0,!0));if(this[h].destroyed)return new Promise((function(D,U){c.nextTick((function(){A[l]?U(A[l]):D(u(void 0,!0))}))}));var L,I=this[s];if(I)L=new Promise((function(D,U){return function(B,k){D.then((function(){U[i]?B(u(void 0,!0)):U[f](B,k)}),k)}})(I,this));else{var P=this[h].read();if(P!==null)return Promise.resolve(u(P,!1));L=new Promise(this[f])}return this[s]=L,L}},Symbol.asyncIterator,(function(){return this})),a(o,"return",(function(){var A=this;return new Promise((function(N,L){A[h].destroy(null,(function(I){I?L(I):N(u(void 0,!0))}))}))})),o),w);x.exports=function(A){var N,L=Object.create(S,(a(N={},h,{value:A,writable:!0}),a(N,t,{value:null,writable:!0}),a(N,e,{value:null,writable:!0}),a(N,l,{value:null,writable:!0}),a(N,i,{value:A._readableState.endEmitted,writable:!0}),a(N,f,{value:function(I,P){var D=L[h].read();D?(L[s]=null,L[t]=null,L[e]=null,I(u(D,!1))):(L[t]=I,L[e]=P)},writable:!0}),N));return L[s]=null,r(A,(function(I){if(I&&I.code!=="ERR_STREAM_PREMATURE_CLOSE"){var P=L[e];return P!==null&&(L[s]=null,L[t]=null,L[e]=null,P(I)),void(L[l]=I)}var D=L[t];D!==null&&(L[s]=null,L[t]=null,L[e]=null,D(u(void 0,!0))),L[i]=!0})),A.on("readable",d.bind(null,L)),L}}).call(this)}).call(this,n("_process"))},{"./end-of-stream":486,_process:467}],484:[function(n,x,_){function c(s,f){var h=Object.keys(s);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(s);f&&(u=u.filter((function(p){return Object.getOwnPropertyDescriptor(s,p).enumerable}))),h.push.apply(h,u)}return h}function o(s){for(var f=1;f<arguments.length;f++){var h=arguments[f]!=null?arguments[f]:{};f%2?c(Object(h),!0).forEach((function(u){a(s,u,h[u])})):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(h)):c(Object(h)).forEach((function(u){Object.defineProperty(s,u,Object.getOwnPropertyDescriptor(h,u))}))}return s}function a(s,f,h){return(f=t(f))in s?Object.defineProperty(s,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):s[f]=h,s}function r(s,f){for(var h=0;h<f.length;h++){var u=f[h];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,t(u.key),u)}}function t(s){var f=(function(h,u){if(typeof h!="object"||h===null)return h;var p=h[Symbol.toPrimitive];if(p!==void 0){var d=p.call(h,u);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(h)})(s,"string");return typeof f=="symbol"?f:String(f)}var e=n("buffer").Buffer,l=n("util").inspect,i=l&&l.custom||"inspect";x.exports=(function(){function s(){(function(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}var f,h;return f=s,(h=[{key:"push",value:function(u){var p={data:u,next:null};this.length>0?this.tail.next=p:this.head=p,this.tail=p,++this.length}},{key:"unshift",value:function(u){var p={data:u,next:this.head};this.length===0&&(this.tail=p),this.head=p,++this.length}},{key:"shift",value:function(){if(this.length!==0){var u=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,u}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(u){if(this.length===0)return"";for(var p=this.head,d=""+p.data;p=p.next;)d+=u+p.data;return d}},{key:"concat",value:function(u){if(this.length===0)return e.alloc(0);for(var p,d,w,S=e.allocUnsafe(u>>>0),A=this.head,N=0;A;)p=A.data,d=S,w=N,e.prototype.copy.call(p,d,w),N+=A.data.length,A=A.next;return S}},{key:"consume",value:function(u,p){var d;return u<this.head.data.length?(d=this.head.data.slice(0,u),this.head.data=this.head.data.slice(u)):d=u===this.head.data.length?this.shift():p?this._getString(u):this._getBuffer(u),d}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(u){var p=this.head,d=1,w=p.data;for(u-=w.length;p=p.next;){var S=p.data,A=u>S.length?S.length:u;if(A===S.length?w+=S:w+=S.slice(0,u),(u-=A)==0){A===S.length?(++d,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=S.slice(A));break}++d}return this.length-=d,w}},{key:"_getBuffer",value:function(u){var p=e.allocUnsafe(u),d=this.head,w=1;for(d.data.copy(p),u-=d.data.length;d=d.next;){var S=d.data,A=u>S.length?S.length:u;if(S.copy(p,p.length-u,0,A),(u-=A)==0){A===S.length?(++w,d.next?this.head=d.next:this.head=this.tail=null):(this.head=d,d.data=S.slice(A));break}++w}return this.length-=w,p}},{key:i,value:function(u,p){return l(this,o(o({},p),{},{depth:0,customInspect:!1}))}}])&&r(f.prototype,h),Object.defineProperty(f,"prototype",{writable:!1}),s})()},{buffer:220,util:188}],485:[function(n,x,_){(function(c){(function(){function o(t,e){r(t,e),a(t)}function a(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function r(t,e){t.emit("error",e)}x.exports={destroy:function(t,e){var l=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,c.nextTick(r,this,t)):c.nextTick(r,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(f){!e&&f?l._writableState?l._writableState.errorEmitted?c.nextTick(a,l):(l._writableState.errorEmitted=!0,c.nextTick(o,l,f)):c.nextTick(o,l,f):e?(c.nextTick(a,l),e(f)):c.nextTick(a,l)})),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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var l=t._readableState,i=t._writableState;l&&l.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this)}).call(this,n("_process"))},{_process:467}],486:[function(n,x,_){var c=n("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}x.exports=function a(r,t,e){if(typeof t=="function")return a(r,null,t);t||(t={}),e=(function(A){var N=!1;return function(){if(!N){N=!0;for(var L=arguments.length,I=new Array(L),P=0;P<L;P++)I[P]=arguments[P];A.apply(this,I)}}})(e||o);var l=t.readable||t.readable!==!1&&r.readable,i=t.writable||t.writable!==!1&&r.writable,s=function(){r.writable||h()},f=r._writableState&&r._writableState.finished,h=function(){i=!1,f=!0,l||e.call(r)},u=r._readableState&&r._readableState.endEmitted,p=function(){l=!1,u=!0,i||e.call(r)},d=function(A){e.call(r,A)},w=function(){var A;return l&&!u?(r._readableState&&r._readableState.ended||(A=new c),e.call(r,A)):i&&!f?(r._writableState&&r._writableState.ended||(A=new c),e.call(r,A)):void 0},S=function(){r.req.on("finish",h)};return(function(A){return A.setHeader&&typeof A.abort=="function"})(r)?(r.on("complete",h),r.on("abort",w),r.req?S():r.on("request",S)):i&&!r._writableState&&(r.on("end",s),r.on("close",s)),r.on("end",p),r.on("finish",h),t.error!==!1&&r.on("error",d),r.on("close",w),function(){r.removeListener("complete",h),r.removeListener("abort",w),r.removeListener("request",S),r.req&&r.req.removeListener("finish",h),r.removeListener("end",s),r.removeListener("close",s),r.removeListener("finish",h),r.removeListener("end",p),r.removeListener("error",d),r.removeListener("close",w)}}},{"../../../errors":477}],487:[function(n,x,_){x.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(n,x,_){var c,o=n("../../../errors").codes,a=o.ERR_MISSING_ARGS,r=o.ERR_STREAM_DESTROYED;function t(f){if(f)throw f}function e(f,h,u,p){p=(function(S){var A=!1;return function(){A||(A=!0,S.apply(void 0,arguments))}})(p);var d=!1;f.on("close",(function(){d=!0})),c===void 0&&(c=n("./end-of-stream")),c(f,{readable:h,writable:u},(function(S){if(S)return p(S);d=!0,p()}));var w=!1;return function(S){if(!d&&!w)return w=!0,(function(A){return A.setHeader&&typeof A.abort=="function"})(f)?f.abort():typeof f.destroy=="function"?f.destroy():void p(S||new r("pipe"))}}function l(f){f()}function i(f,h){return f.pipe(h)}function s(f){return f.length?typeof f[f.length-1]!="function"?t:f.pop():t}x.exports=function(){for(var f=arguments.length,h=new Array(f),u=0;u<f;u++)h[u]=arguments[u];var p,d=s(h);if(Array.isArray(h[0])&&(h=h[0]),h.length<2)throw new a("streams");var w=h.map((function(S,A){var N=A<h.length-1;return e(S,N,A>0,(function(L){p||(p=L),L&&w.forEach(l),N||(w.forEach(l),d(p))}))}));return h.reduce(i)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(n,x,_){var c=n("../../../errors").codes.ERR_INVALID_OPT_VALUE;x.exports={getHighWaterMark:function(o,a,r,t){var e=(function(l,i,s){return l.highWaterMark!=null?l.highWaterMark:i?l[s]:null})(a,t,r);if(e!=null){if(!isFinite(e)||Math.floor(e)!==e||e<0)throw new c(t?r:"highWaterMark",e);return Math.floor(e)}return o.objectMode?16:16384}}},{"../../../errors":477}],490:[function(n,x,_){x.exports=n("events").EventEmitter},{events:422}],491:[function(n,x,_){(_=x.exports=n("./lib/_stream_readable.js")).Stream=_,_.Readable=_,_.Writable=n("./lib/_stream_writable.js"),_.Duplex=n("./lib/_stream_duplex.js"),_.Transform=n("./lib/_stream_transform.js"),_.PassThrough=n("./lib/_stream_passthrough.js"),_.finished=n("./lib/internal/streams/end-of-stream.js"),_.pipeline=n("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":478,"./lib/_stream_passthrough.js":479,"./lib/_stream_readable.js":480,"./lib/_stream_transform.js":481,"./lib/_stream_writable.js":482,"./lib/internal/streams/end-of-stream.js":486,"./lib/internal/streams/pipeline.js":488}],492:[function(n,x,_){var c=(function(o){var a=Object.prototype,r=a.hasOwnProperty,t=Object.defineProperty||function(g,y,E){g[y]=E.value},e=typeof Symbol=="function"?Symbol:{},l=e.iterator||"@@iterator",i=e.asyncIterator||"@@asyncIterator",s=e.toStringTag||"@@toStringTag";function f(g,y,E){return Object.defineProperty(g,y,{value:E,enumerable:!0,configurable:!0,writable:!0}),g[y]}try{f({},"")}catch{f=function(y,E,R){return y[E]=R}}function h(g,y,E,R){var O=y&&y.prototype instanceof d?y:d,z=Object.create(O.prototype),$=new v(R||[]);return t(z,"_invoke",{value:U(g,E,$)}),z}function u(g,y,E){try{return{type:"normal",arg:g.call(y,E)}}catch(R){return{type:"throw",arg:R}}}o.wrap=h;var p={};function d(){}function w(){}function S(){}var A={};f(A,l,(function(){return this}));var N=Object.getPrototypeOf,L=N&&N(N(m([])));L&&L!==a&&r.call(L,l)&&(A=L);var I=S.prototype=d.prototype=Object.create(A);function P(g){["next","throw","return"].forEach((function(y){f(g,y,(function(E){return this._invoke(y,E)}))}))}function D(g,y){var E;t(this,"_invoke",{value:function(R,O){function z(){return new y((function($,Z){(function j(H,T,M,F){var V=u(g[H],g,T);if(V.type!=="throw"){var Y=V.arg,q=Y.value;return q&&typeof q=="object"&&r.call(q,"__await")?y.resolve(q.__await).then((function(K){j("next",K,M,F)}),(function(K){j("throw",K,M,F)})):y.resolve(q).then((function(K){Y.value=K,M(Y)}),(function(K){return j("throw",K,M,F)}))}F(V.arg)})(R,O,$,Z)}))}return E=E?E.then(z,z):z()}})}function U(g,y,E){var R="suspendedStart";return function(O,z){if(R==="executing")throw new Error("Generator is already running");if(R==="completed"){if(O==="throw")throw z;return b()}for(E.method=O,E.arg=z;;){var $=E.delegate;if($){var Z=B($,E);if(Z){if(Z===p)continue;return Z}}if(E.method==="next")E.sent=E._sent=E.arg;else if(E.method==="throw"){if(R==="suspendedStart")throw R="completed",E.arg;E.dispatchException(E.arg)}else E.method==="return"&&E.abrupt("return",E.arg);R="executing";var j=u(g,y,E);if(j.type==="normal"){if(R=E.done?"completed":"suspendedYield",j.arg===p)continue;return{value:j.arg,done:E.done}}j.type==="throw"&&(R="completed",E.method="throw",E.arg=j.arg)}}}function B(g,y){var E=y.method,R=g.iterator[E];if(R===void 0)return y.delegate=null,E==="throw"&&g.iterator.return&&(y.method="return",y.arg=void 0,B(g,y),y.method==="throw")||E!=="return"&&(y.method="throw",y.arg=new TypeError("The iterator does not provide a '"+E+"' method")),p;var O=u(R,g.iterator,y.arg);if(O.type==="throw")return y.method="throw",y.arg=O.arg,y.delegate=null,p;var z=O.arg;return z?z.done?(y[g.resultName]=z.value,y.next=g.nextLoc,y.method!=="return"&&(y.method="next",y.arg=void 0),y.delegate=null,p):z:(y.method="throw",y.arg=new TypeError("iterator result is not an object"),y.delegate=null,p)}function k(g){var y={tryLoc:g[0]};1 in g&&(y.catchLoc=g[1]),2 in g&&(y.finallyLoc=g[2],y.afterLoc=g[3]),this.tryEntries.push(y)}function C(g){var y=g.completion||{};y.type="normal",delete y.arg,g.completion=y}function v(g){this.tryEntries=[{tryLoc:"root"}],g.forEach(k,this),this.reset(!0)}function m(g){if(g){var y=g[l];if(y)return y.call(g);if(typeof g.next=="function")return g;if(!isNaN(g.length)){var E=-1,R=function O(){for(;++E<g.length;)if(r.call(g,E))return O.value=g[E],O.done=!1,O;return O.value=void 0,O.done=!0,O};return R.next=R}}return{next:b}}function b(){return{value:void 0,done:!0}}return w.prototype=S,t(I,"constructor",{value:S,configurable:!0}),t(S,"constructor",{value:w,configurable:!0}),w.displayName=f(S,s,"GeneratorFunction"),o.isGeneratorFunction=function(g){var y=typeof g=="function"&&g.constructor;return!!y&&(y===w||(y.displayName||y.name)==="GeneratorFunction")},o.mark=function(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,S):(g.__proto__=S,f(g,s,"GeneratorFunction")),g.prototype=Object.create(I),g},o.awrap=function(g){return{__await:g}},P(D.prototype),f(D.prototype,i,(function(){return this})),o.AsyncIterator=D,o.async=function(g,y,E,R,O){O===void 0&&(O=Promise);var z=new D(h(g,y,E,R),O);return o.isGeneratorFunction(y)?z:z.next().then((function($){return $.done?$.value:z.next()}))},P(I),f(I,s,"Generator"),f(I,l,(function(){return this})),f(I,"toString",(function(){return"[object Generator]"})),o.keys=function(g){var y=Object(g),E=[];for(var R in y)E.push(R);return E.reverse(),function O(){for(;E.length;){var z=E.pop();if(z in y)return O.value=z,O.done=!1,O}return O.done=!0,O}},o.values=m,v.prototype={constructor:v,reset:function(g){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!g)for(var y in this)y.charAt(0)==="t"&&r.call(this,y)&&!isNaN(+y.slice(1))&&(this[y]=void 0)},stop:function(){this.done=!0;var g=this.tryEntries[0].completion;if(g.type==="throw")throw g.arg;return this.rval},dispatchException:function(g){if(this.done)throw g;var y=this;function E(j,H){return z.type="throw",z.arg=g,y.next=j,H&&(y.method="next",y.arg=void 0),!!H}for(var R=this.tryEntries.length-1;R>=0;--R){var O=this.tryEntries[R],z=O.completion;if(O.tryLoc==="root")return E("end");if(O.tryLoc<=this.prev){var $=r.call(O,"catchLoc"),Z=r.call(O,"finallyLoc");if($&&Z){if(this.prev<O.catchLoc)return E(O.catchLoc,!0);if(this.prev<O.finallyLoc)return E(O.finallyLoc)}else if($){if(this.prev<O.catchLoc)return E(O.catchLoc,!0)}else{if(!Z)throw new Error("try statement without catch or finally");if(this.prev<O.finallyLoc)return E(O.finallyLoc)}}}},abrupt:function(g,y){for(var E=this.tryEntries.length-1;E>=0;--E){var R=this.tryEntries[E];if(R.tryLoc<=this.prev&&r.call(R,"finallyLoc")&&this.prev<R.finallyLoc){var O=R;break}}O&&(g==="break"||g==="continue")&&O.tryLoc<=y&&y<=O.finallyLoc&&(O=null);var z=O?O.completion:{};return z.type=g,z.arg=y,O?(this.method="next",this.next=O.finallyLoc,p):this.complete(z)},complete:function(g,y){if(g.type==="throw")throw g.arg;return g.type==="break"||g.type==="continue"?this.next=g.arg:g.type==="return"?(this.rval=this.arg=g.arg,this.method="return",this.next="end"):g.type==="normal"&&y&&(this.next=y),p},finish:function(g){for(var y=this.tryEntries.length-1;y>=0;--y){var E=this.tryEntries[y];if(E.finallyLoc===g)return this.complete(E.completion,E.afterLoc),C(E),p}},catch:function(g){for(var y=this.tryEntries.length-1;y>=0;--y){var E=this.tryEntries[y];if(E.tryLoc===g){var R=E.completion;if(R.type==="throw"){var O=R.arg;C(E)}return O}}throw new Error("illegal catch attempt")},delegateYield:function(g,y,E){return this.delegate={iterator:m(g),resultName:y,nextLoc:E},this.method==="next"&&(this.arg=void 0),p}},o})(typeof x=="object"?x.exports:{});try{regeneratorRuntime=c}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=c:Function("r","regeneratorRuntime = r")(c)}},{}],493:[function(n,x,_){var c=n("buffer").Buffer,o=n("inherits"),a=n("hash-base"),r=new Array(16),t=[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],e=[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],l=[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],i=[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],s=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function h(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function u(N,L){return N<<L|N>>>32-L}function p(N,L,I,P,D,U,B,k){return u(N+(L^I^P)+U+B|0,k)+D|0}function d(N,L,I,P,D,U,B,k){return u(N+(L&I|~L&P)+U+B|0,k)+D|0}function w(N,L,I,P,D,U,B,k){return u(N+((L|~I)^P)+U+B|0,k)+D|0}function S(N,L,I,P,D,U,B,k){return u(N+(L&P|I&~P)+U+B|0,k)+D|0}function A(N,L,I,P,D,U,B,k){return u(N+(L^(I|~P))+U+B|0,k)+D|0}o(h,a),h.prototype._update=function(){for(var N=r,L=0;L<16;++L)N[L]=this._block.readInt32LE(4*L);for(var I=0|this._a,P=0|this._b,D=0|this._c,U=0|this._d,B=0|this._e,k=0|this._a,C=0|this._b,v=0|this._c,m=0|this._d,b=0|this._e,g=0;g<80;g+=1){var y,E;g<16?(y=p(I,P,D,U,B,N[t[g]],s[0],l[g]),E=A(k,C,v,m,b,N[e[g]],f[0],i[g])):g<32?(y=d(I,P,D,U,B,N[t[g]],s[1],l[g]),E=S(k,C,v,m,b,N[e[g]],f[1],i[g])):g<48?(y=w(I,P,D,U,B,N[t[g]],s[2],l[g]),E=w(k,C,v,m,b,N[e[g]],f[2],i[g])):g<64?(y=S(I,P,D,U,B,N[t[g]],s[3],l[g]),E=d(k,C,v,m,b,N[e[g]],f[3],i[g])):(y=A(I,P,D,U,B,N[t[g]],s[4],l[g]),E=p(k,C,v,m,b,N[e[g]],f[4],i[g])),I=B,B=U,U=u(D,10),D=P,P=y,k=b,b=m,m=u(v,10),v=C,C=E}var R=this._b+D+m|0;this._b=this._c+U+b|0,this._c=this._d+B+k|0,this._d=this._e+I+C|0,this._e=this._a+P+v|0,this._a=R},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var N=c.alloc?c.alloc(20):new c(20);return N.writeInt32LE(this._a,0),N.writeInt32LE(this._b,4),N.writeInt32LE(this._c,8),N.writeInt32LE(this._d,12),N.writeInt32LE(this._e,16),N},x.exports=h},{buffer:220,"hash-base":425,inherits:440}],494:[function(n,x,_){var c=n("buffer"),o=c.Buffer;function a(t,e){for(var l in t)e[l]=t[l]}function r(t,e,l){return o(t,e,l)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?x.exports=c:(a(c,_),_.Buffer=r),r.prototype=Object.create(o.prototype),a(o,r),r.from=function(t,e,l){if(typeof t=="number")throw new TypeError("Argument must not be a number");return o(t,e,l)},r.alloc=function(t,e,l){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=o(t);return e!==void 0?typeof l=="string"?i.fill(e,l):i.fill(e):i.fill(0),i},r.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return o(t)},r.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return c.SlowBuffer(t)}},{buffer:220}],495:[function(n,x,_){(function(c){(function(){var o,a=n("buffer"),r=a.Buffer,t={};for(o in a)a.hasOwnProperty(o)&&o!=="SlowBuffer"&&o!=="Buffer"&&(t[o]=a[o]);var e=t.Buffer={};for(o in r)r.hasOwnProperty(o)&&o!=="allocUnsafe"&&o!=="allocUnsafeSlow"&&(e[o]=r[o]);if(t.Buffer.prototype=r.prototype,e.from&&e.from!==Uint8Array.from||(e.from=function(l,i,s){if(typeof l=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof l);if(l&&l.length===void 0)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof l);return r(l,i,s)}),e.alloc||(e.alloc=function(l,i,s){if(typeof l!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof l);if(l<0||l>=2*(1<<30))throw new RangeError('The value "'+l+'" is invalid for option "size"');var f=r(l);return i&&i.length!==0?typeof s=="string"?f.fill(i,s):f.fill(i):f.fill(0),f}),!t.kStringMaxLength)try{t.kStringMaxLength=c.binding("buffer").kStringMaxLength}catch{}t.constants||(t.constants={MAX_LENGTH:t.kMaxLength},t.kStringMaxLength&&(t.constants.MAX_STRING_LENGTH=t.kStringMaxLength)),x.exports=t}).call(this)}).call(this,n("_process"))},{_process:467,buffer:220}],496:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0});const c=n("xmlchars/xml/1.0/ed5"),o=n("xmlchars/xml/1.1/ed2"),a=n("xmlchars/xmlns/1.0/ed3");var r=c.isS,t=c.isChar,e=c.isNameStartChar,l=c.isNameChar,i=c.S_LIST,s=c.NAME_RE,f=o.isChar,h=a.isNCNameStartChar,u=a.isNCNameChar,p=a.NC_NAME_RE;const d="http://www.w3.org/XML/1998/namespace",w="http://www.w3.org/2000/xmlns/",S={__proto__:null,xml:d,xmlns:w},A={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},N=m=>m===34||m===39,L=[34,39],I=[...L,91,62],P=[...L,60,93],D=[61,63,...i],U=[...i,62,38,60];function B(m,b,g){switch(b){case"xml":g!==d&&m.fail(`xml prefix must be bound to ${d}.`);break;case"xmlns":g!==w&&m.fail(`xmlns prefix must be bound to ${w}.`)}switch(g){case w:m.fail(b===""?`the default namespace may not be set to ${g}.`:`may not assign a prefix (even "xmlns") to the URI ${w}.`);break;case d:switch(b){case"xml":break;case"":m.fail(`the default namespace may not be set to ${g}.`);break;default:m.fail("may not assign the xml namespace to another prefix.")}}}const k=m=>p.test(m),C=m=>s.test(m);_.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const v={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"};_.SaxesParser=class{constructor(m){this.opt=m??{},this.fragmentOpt=!!this.opt.fragment;const b=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,b){this.nameStartCheck=h,this.nameCheck=u,this.isName=k,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},S);const g=this.opt.additionalNamespaces;g!=null&&((function(y,E){for(const R of Object.keys(E))B(y,R,E[R])})(this,g),Object.assign(this.ns,g))}else this.nameStartCheck=e,this.nameCheck=l,this.isName=C,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){var m;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:b}=this;this.state=b?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=b,this.xmlDeclPossible=!b,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:g}=this.opt;if(g===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");g="1.0"}this.setXMLVersion(g),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(A),(m=this.readyHandler)===null||m===void 0||m.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(m,b){this[v[m]]=b}off(m){this[v[m]]=void 0}makeError(m){var b;let g=(b=this.fileName)!==null&&b!==void 0?b:"";return this.trackPosition&&(g.length>0&&(g+=":"),g+=`${this.line}:${this.column}`),g.length>0&&(g+=": "),new Error(g+m)}fail(m){const b=this.makeError(m),g=this.errorHandler;if(g===void 0)throw b;return g(b),this}write(m){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let b=!1;m===null?(b=!0,m=""):typeof m=="object"&&(m=m.toString()),this.carriedFromPrevious!==void 0&&(m=`${this.carriedFromPrevious}${m}`,this.carriedFromPrevious=void 0);let g=m.length;const y=m.charCodeAt(g-1);!b&&(y===13||y>=55296&&y<=56319)&&(this.carriedFromPrevious=m[g-1],g--,m=m.slice(0,g));const{stateTable:E}=this;for(this.chunk=m,this.i=0;this.i<g;)E[this.state].call(this);return this.chunkPosition+=g,b?this.end():this}close(){return this.write(null)}getCode10(){const{chunk:m,i:b}=this;if(this.prevI=b,this.i=b+1,b>=m.length)return-1;const g=m.charCodeAt(b);if(this.column++,g<55296){if(g>=32||g===9)return g;switch(g){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return m.charCodeAt(b+1)===10&&(this.i=b+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),g}}if(g>56319)return g>=57344&&g<=65533||this.fail("disallowed character."),g;const y=65536+1024*(g-55296)+(m.charCodeAt(b+1)-56320);return this.i=b+2,y>1114111&&this.fail("disallowed character."),y}getCode11(){const{chunk:m,i:b}=this;if(this.prevI=b,this.i=b+1,b>=m.length)return-1;const g=m.charCodeAt(b);if(this.column++,g<55296){if(g>31&&g<127||g>159&&g!==8232||g===9)return g;switch(g){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:{const E=m.charCodeAt(b+1);E!==10&&E!==133||(this.i=b+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),g}}if(g>56319)return g>=57344&&g<=65533||this.fail("disallowed character."),g;const y=65536+1024*(g-55296)+(m.charCodeAt(b+1)-56320);return this.i=b+2,y>1114111&&this.fail("disallowed character."),y}getCodeNorm(){const m=this.getCode();return m===-2?10:m}unget(){this.i=this.prevI,this.column--}captureTo(m){let{i:b}=this;const{chunk:g}=this;for(;;){const y=this.getCode(),E=y===-2,R=E?10:y;if(R===-1||m.includes(R))return this.text+=g.slice(b,this.prevI),R;E&&(this.text+=g.slice(b,this.prevI)+`
13
- `,b=this.i)}}captureToChar(m){let{i:b}=this;const{chunk:g}=this;for(;;){let y=this.getCode();switch(y){case-2:this.text+=g.slice(b,this.prevI)+`
14
- `,b=this.i,y=10;break;case-1:return this.text+=g.slice(b),!1}if(y===m)return this.text+=g.slice(b,this.prevI),!0}}captureNameChars(){const{chunk:m,i:b}=this;for(;;){const g=this.getCode();if(g===-1)return this.name+=m.slice(b),-1;if(!l(g))return this.name+=m.slice(b,this.prevI),g===-2?10:g}}skipSpaces(){for(;;){const m=this.getCodeNorm();if(m===-1||!r(m))return m}}setXMLVersion(m){this.currentXMLVersion=m,m==="1.0"?(this.isChar=t,this.getCode=this.getCode10):(this.isChar=f,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const m=this.i,b=this.skipSpaces();switch(this.prevI!==m&&(this.xmlDeclPossible=!1),b){case 60:if(this.state=15,this.text.length!==0)throw new Error("no-empty text at start");break;case-1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=!1}}sDoctype(){var m;const b=this.captureTo(I);switch(b){case 62:(m=this.doctypeHandler)===null||m===void 0||m.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(b),b===91?this.state=4:N(b)&&(this.state=3,this.q=b)}}sDoctypeQuote(){const m=this.q;this.captureToChar(m)&&(this.text+=String.fromCodePoint(m),this.q=null,this.state=2)}sDTD(){const m=this.captureTo(P);m!==-1&&(this.text+=String.fromCodePoint(m),m===93?this.state=2:m===60?this.state=6:N(m)&&(this.state=5,this.q=m))}sDTDQuoted(){const m=this.q;this.captureToChar(m)&&(this.text+=String.fromCodePoint(m),this.state=4,this.q=null)}sDTDOpenWaka(){const m=this.getCodeNorm();switch(this.text+=String.fromCodePoint(m),m){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const m=String.fromCodePoint(this.getCodeNorm()),b=this.openWakaBang+=m;this.text+=m,b!=="-"&&(this.state=b==="--"?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const m=this.getCodeNorm();this.text+=String.fromCodePoint(m),this.state=m===45?10:8}sDTDCommentEnded(){const m=this.getCodeNorm();this.text+=String.fromCodePoint(m),m===62?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(63)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const m=this.getCodeNorm();this.text+=String.fromCodePoint(m),m===62&&(this.state=4)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:m}=this;const{chunk:b}=this;t:for(;;)switch(this.getCode()){case-2:this.entity+=b.slice(m,this.prevI)+`
15
- `,m=this.i;break;case 59:{const{entityReturnState:g}=this,y=this.entity+b.slice(m,this.prevI);let E;this.state=g,y===""?(this.fail("empty entity name."),E="&;"):(E=this.parseEntity(y),this.entity=""),g===13&&this.textHandler===void 0||(this.text+=E);break t}case-1:this.entity+=b.slice(m);break t}}sOpenWaka(){const m=this.getCode();if(e(m))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(m){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case 63:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=13,this.xmlDeclPossible=!1}}sOpenWakaBang(){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.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){var m;const b=this.getCodeNorm();b===45?(this.state=19,(m=this.commentHandler)===null||m===void 0||m.call(this,this.text),this.text=""):(this.text+="-"+String.fromCodePoint(b),this.state=17)}sCommentEnded(){const m=this.getCodeNorm();m!==62?(this.fail("malformed comment."),this.text+="--"+String.fromCodePoint(m),this.state=17):this.state=13}sCData(){this.captureToChar(93)&&(this.state=21)}sCDataEnding(){const m=this.getCodeNorm();m===93?this.state=22:(this.text+="]"+String.fromCodePoint(m),this.state=20)}sCDataEnding2(){var m;const b=this.getCodeNorm();switch(b){case 62:(m=this.cdataHandler)===null||m===void 0||m.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]"+String.fromCodePoint(b),this.state=20}}sPIFirstChar(){const m=this.getCodeNorm();this.nameStartCheck(m)?(this.piTarget+=String.fromCodePoint(m),this.state=24):m===63||r(m)?(this.fail("processing instruction without a target."),this.state=m===63?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(m),this.state=24)}sPIRest(){const{chunk:m,i:b}=this;for(;;){const g=this.getCodeNorm();if(g===-1)return void(this.piTarget+=m.slice(b));if(!this.nameCheck(g)){this.piTarget+=m.slice(b,this.prevI);const y=g===63;y||r(g)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=y?33:27):this.state=y?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(g));break}}}sPIBody(){if(this.text.length===0){const m=this.getCodeNorm();m===63?this.state=26:r(m)||(this.text=String.fromCodePoint(m))}else this.captureToChar(63)&&(this.state=26)}sPIEnding(){var m;const b=this.getCodeNorm();if(b===62){const{piTarget:g}=this;g.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(m=this.piHandler)===null||m===void 0||m.call(this,{target:g,body:this.text}),this.piTarget=this.text="",this.state=13}else b===63?this.text+="?":(this.text+="?"+String.fromCodePoint(b),this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const m=this.skipSpaces();m!==63?m!==-1&&(this.state=28,this.name=String.fromCodePoint(m)):this.state=33}sXMLDeclName(){const m=this.captureTo(D);if(m===63)return this.state=33,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(r(m)||m===61){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 ${this.xmlDeclExpects[0]}.`);break;default:this.fail("expected one of "+this.xmlDeclExpects.join(", "))}this.state=m===61?30:29}}sXMLDeclEq(){const m=this.getCodeNorm();if(m===63)return this.state=33,void this.fail("XML declaration is incomplete.");r(m)||(m!==61&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const m=this.getCodeNorm();if(m===63)return this.state=33,void this.fail("XML declaration is incomplete.");r(m)||(N(m)?this.q=m:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const m=this.captureTo([this.q,63]);if(m===63)return this.state=33,this.text="",void this.fail("XML declaration is incomplete.");if(m===-1)return;const b=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const g=b;this.xmlDecl.version=g,/^1\.[0-9]+$/.test(g)?this.opt.forceXMLVersion||this.setXMLVersion(g):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(b)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=b;break;case"standalone":b!=="yes"&&b!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=b}this.name="",this.state=32}sXMLDeclSeparator(){const m=this.getCodeNorm();m!==63?(r(m)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}sXMLDeclEnding(){var m;this.getCodeNorm()===62?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(m=this.xmldeclHandler)===null||m===void 0||m.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}sOpenTag(){var m;const b=this.captureNameChars();if(b===-1)return;const g=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=g.ns=Object.create(null)),(m=this.openTagStartHandler)===null||m===void 0||m.call(this,g),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),b){case 62:this.openTag();break;case 47:this.state=35;break;default:r(b)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===62?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const m=this.skipSpaces();m!==-1&&(e(m)?(this.unget(),this.state=37):m===62?this.openTag():m===47?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const m=this.captureNameChars();m===61?this.state=39:r(m)?this.state=38:m===62?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):m!==-1&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const m=this.skipSpaces();switch(m){case-1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",m===62?this.openTag():e(m)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const m=this.getCodeNorm();N(m)?(this.q=m,this.state=40):r(m)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:m,chunk:b}=this;let{i:g}=this;for(;;)switch(this.getCode()){case m:return this.pushAttrib(this.name,this.text+b.slice(g,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=b.slice(g,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+=b.slice(g,this.prevI)+" ",g=this.i;break;case 60:return this.text+=b.slice(g,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=b.slice(g))}}sAttribValueClosed(){const m=this.getCodeNorm();r(m)?this.state=36:m===62?this.openTag():m===47?this.state=35:e(m)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const m=this.captureTo(U);switch(m){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="",m===62?this.openTag():this.state=36}}sCloseTag(){const m=this.captureNameChars();m===62?this.closeTag():r(m)?this.state=44:m!==-1&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case 62:this.closeTag();break;case-1:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:m,forbiddenState:b}=this;const{chunk:g,textHandler:y}=this;t:for(;;)switch(this.getCode()){case 60:if(this.state=15,y!==void 0){const{text:E}=this,R=g.slice(m,this.prevI);E.length!==0?(y(E+R),this.text=""):R.length!==0&&y(R)}b=0;break t;case 38:this.state=14,this.entityReturnState=13,y!==void 0&&(this.text+=g.slice(m,this.prevI)),b=0;break t;case 93:switch(b){case 0:b=1;break;case 1:b=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:b===2&&this.fail('the string "]]>" is disallowed in char data.'),b=0;break;case-2:y!==void 0&&(this.text+=g.slice(m,this.prevI)+`
16
- `),m=this.i,b=0;break;case-1:y!==void 0&&(this.text+=g.slice(m));break t;default:b=0}this.forbiddenState=b}handleTextOutsideRoot(){let{i:m}=this;const{chunk:b,textHandler:g}=this;let y=!1;t:for(;;){const E=this.getCode();switch(E){case 60:if(this.state=15,g!==void 0){const{text:R}=this,O=b.slice(m,this.prevI);R.length!==0?(g(R+O),this.text=""):O.length!==0&&g(O)}break t;case 38:this.state=14,this.entityReturnState=13,g!==void 0&&(this.text+=b.slice(m,this.prevI)),y=!0;break t;case-2:g!==void 0&&(this.text+=b.slice(m,this.prevI)+`
17
- `),m=this.i;break;case-1:g!==void 0&&(this.text+=b.slice(m));break t;default:r(E)||(y=!0)}}y&&(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))}pushAttribNS(m,b){var g;const{prefix:y,local:E}=this.qname(m),R={name:m,prefix:y,local:E,value:b};if(this.attribList.push(R),(g=this.attributeHandler)===null||g===void 0||g.call(this,R),y==="xmlns"){const O=b.trim();this.currentXMLVersion==="1.0"&&O===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[E]=O,B(this,E,O)}else if(m==="xmlns"){const O=b.trim();this.topNS[""]=O,B(this,"",O)}}pushAttribPlain(m,b){var g;const y={name:m,value:b};this.attribList.push(y),(g=this.attributeHandler)===null||g===void 0||g.call(this,y)}end(){var m,b;this.sawRoot||this.fail("document must contain a root element.");const{tags:g}=this;for(;g.length>0;){const E=g.pop();this.fail("unclosed tag: "+E.name)}this.state!==0&&this.state!==13&&this.fail("unexpected end.");const{text:y}=this;return y.length!==0&&((m=this.textHandler)===null||m===void 0||m.call(this,y),this.text=""),this._closed=!0,(b=this.endHandler)===null||b===void 0||b.call(this),this._init(),this}resolve(m){var b,g;let y=this.topNS[m];if(y!==void 0)return y;const{tags:E}=this;for(let R=E.length-1;R>=0;R--)if(y=E[R].ns[m],y!==void 0)return y;return y=this.ns[m],y!==void 0?y:(g=(b=this.opt).resolvePrefix)===null||g===void 0?void 0:g.call(b,m)}qname(m){const b=m.indexOf(":");if(b===-1)return{prefix:"",local:m};const g=m.slice(b+1),y=m.slice(0,b);return(y===""||g===""||g.includes(":"))&&this.fail(`malformed name: ${m}.`),{prefix:y,local:g}}processAttribsNS(){var m;const{attribList:b}=this,g=this.tag;{const{prefix:R,local:O}=this.qname(g.name);g.prefix=R,g.local=O;const z=g.uri=(m=this.resolve(R))!==null&&m!==void 0?m:"";R!==""&&(R==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),z===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(R)}.`),g.uri=R))}if(b.length===0)return;const{attributes:y}=g,E=new Set;for(const R of b){const{name:O,prefix:z,local:$}=R;let Z,j;z===""?(Z=O==="xmlns"?w:"",j=O):(Z=this.resolve(z),Z===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(z)}.`),Z=z),j=`{${Z}}${$}`),E.has(j)&&this.fail(`duplicate attribute: ${j}.`),E.add(j),R.uri=Z,y[O]=R}this.attribList=[]}processAttribsPlain(){const{attribList:m}=this,b=this.tag.attributes;for(const{name:g,value:y}of m)b[g]!==void 0&&this.fail(`duplicate attribute: ${g}.`),b[g]=y;this.attribList=[]}openTag(){var m;this.processAttribs();const{tags:b}=this,g=this.tag;g.isSelfClosing=!1,(m=this.openTagHandler)===null||m===void 0||m.call(this,g),b.push(g),this.state=13,this.name=""}openSelfClosingTag(){var m,b,g;this.processAttribs();const{tags:y}=this,E=this.tag;E.isSelfClosing=!0,(m=this.openTagHandler)===null||m===void 0||m.call(this,E),(b=this.closeTagHandler)===null||b===void 0||b.call(this,E),(this.tag=(g=y[y.length-1])!==null&&g!==void 0?g:null)===null&&(this.closedRoot=!0),this.state=13,this.name=""}closeTag(){const{tags:m,name:b}=this;if(this.state=13,this.name="",b==="")return this.fail("weird empty close tag."),void(this.text+="</>");const g=this.closeTagHandler;let y=m.length;for(;y-- >0;){const E=this.tag=m.pop();if(this.topNS=E.ns,g?.(E),E.name===b)break;this.fail("unexpected close tag.")}y===0?this.closedRoot=!0:y<0&&(this.fail(`unmatched closing tag: ${b}.`),this.text+=`</${b}>`)}parseEntity(m){if(m[0]!=="#"){const g=this.ENTITIES[m];return g!==void 0?g:(this.fail(this.isName(m)?"undefined entity.":"disallowed character in entity name."),`&${m};`)}let b=NaN;return m[1]==="x"&&/^#x[0-9a-f]+$/i.test(m)?b=parseInt(m.slice(2),16):/^#[0-9]+$/.test(m)&&(b=parseInt(m.slice(1),10)),this.isChar(b)?String.fromCodePoint(b):(this.fail("malformed character entity."),`&${m};`)}}},{"xmlchars/xml/1.0/ed5":543,"xmlchars/xml/1.1/ed2":544,"xmlchars/xmlns/1.0/ed3":545}],497:[function(n,x,_){var c=n("safe-buffer").Buffer;function o(a,r){this._block=c.alloc(a),this._finalSize=r,this._blockSize=a,this._len=0}o.prototype.update=function(a,r){typeof a=="string"&&(r=r||"utf8",a=c.from(a,r));for(var t=this._block,e=this._blockSize,l=a.length,i=this._len,s=0;s<l;){for(var f=i%e,h=Math.min(l-s,e-f),u=0;u<h;u++)t[f+u]=a[s+u];s+=h,(i+=h)%e==0&&this._update(t)}return this._len+=l,this},o.prototype.digest=function(a){var r=this._len%this._blockSize;this._block[r]=128,this._block.fill(0,r+1),r>=this._finalSize&&(this._update(this._block),this._block.fill(0));var t=8*this._len;if(t<=4294967295)this._block.writeUInt32BE(t,this._blockSize-4);else{var e=(4294967295&t)>>>0,l=(t-e)/4294967296;this._block.writeUInt32BE(l,this._blockSize-8),this._block.writeUInt32BE(e,this._blockSize-4)}this._update(this._block);var i=this._hash();return a?i.toString(a):i},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},x.exports=o},{"safe-buffer":494}],498:[function(n,x,_){var c=x.exports=function(o){o=o.toLowerCase();var a=c[o];if(!a)throw new Error(o+" is not supported (we accept pull requests)");return new a};c.sha=n("./sha"),c.sha1=n("./sha1"),c.sha224=n("./sha224"),c.sha256=n("./sha256"),c.sha384=n("./sha384"),c.sha512=n("./sha512")},{"./sha":499,"./sha1":500,"./sha224":501,"./sha256":502,"./sha384":503,"./sha512":504}],499:[function(n,x,_){var c=n("inherits"),o=n("./hash"),a=n("safe-buffer").Buffer,r=[1518500249,1859775393,-1894007588,-899497514],t=new Array(80);function e(){this.init(),this._w=t,o.call(this,64,56)}function l(s){return s<<30|s>>>2}function i(s,f,h,u){return s===0?f&h|~f&u:s===2?f&h|f&u|h&u:f^h^u}c(e,o),e.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},e.prototype._update=function(s){for(var f,h=this._w,u=0|this._a,p=0|this._b,d=0|this._c,w=0|this._d,S=0|this._e,A=0;A<16;++A)h[A]=s.readInt32BE(4*A);for(;A<80;++A)h[A]=h[A-3]^h[A-8]^h[A-14]^h[A-16];for(var N=0;N<80;++N){var L=~~(N/20),I=0|((f=u)<<5|f>>>27)+i(L,p,d,w)+S+h[N]+r[L];S=w,w=d,d=l(p),p=u,u=I}this._a=u+this._a|0,this._b=p+this._b|0,this._c=d+this._c|0,this._d=w+this._d|0,this._e=S+this._e|0},e.prototype._hash=function(){var s=a.allocUnsafe(20);return s.writeInt32BE(0|this._a,0),s.writeInt32BE(0|this._b,4),s.writeInt32BE(0|this._c,8),s.writeInt32BE(0|this._d,12),s.writeInt32BE(0|this._e,16),s},x.exports=e},{"./hash":497,inherits:440,"safe-buffer":494}],500:[function(n,x,_){var c=n("inherits"),o=n("./hash"),a=n("safe-buffer").Buffer,r=[1518500249,1859775393,-1894007588,-899497514],t=new Array(80);function e(){this.init(),this._w=t,o.call(this,64,56)}function l(f){return f<<5|f>>>27}function i(f){return f<<30|f>>>2}function s(f,h,u,p){return f===0?h&u|~h&p:f===2?h&u|h&p|u&p:h^u^p}c(e,o),e.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},e.prototype._update=function(f){for(var h,u=this._w,p=0|this._a,d=0|this._b,w=0|this._c,S=0|this._d,A=0|this._e,N=0;N<16;++N)u[N]=f.readInt32BE(4*N);for(;N<80;++N)u[N]=(h=u[N-3]^u[N-8]^u[N-14]^u[N-16])<<1|h>>>31;for(var L=0;L<80;++L){var I=~~(L/20),P=l(p)+s(I,d,w,S)+A+u[L]+r[I]|0;A=S,S=w,w=i(d),d=p,p=P}this._a=p+this._a|0,this._b=d+this._b|0,this._c=w+this._c|0,this._d=S+this._d|0,this._e=A+this._e|0},e.prototype._hash=function(){var f=a.allocUnsafe(20);return f.writeInt32BE(0|this._a,0),f.writeInt32BE(0|this._b,4),f.writeInt32BE(0|this._c,8),f.writeInt32BE(0|this._d,12),f.writeInt32BE(0|this._e,16),f},x.exports=e},{"./hash":497,inherits:440,"safe-buffer":494}],501:[function(n,x,_){var c=n("inherits"),o=n("./sha256"),a=n("./hash"),r=n("safe-buffer").Buffer,t=new Array(64);function e(){this.init(),this._w=t,a.call(this,64,56)}c(e,o),e.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},e.prototype._hash=function(){var l=r.allocUnsafe(28);return l.writeInt32BE(this._a,0),l.writeInt32BE(this._b,4),l.writeInt32BE(this._c,8),l.writeInt32BE(this._d,12),l.writeInt32BE(this._e,16),l.writeInt32BE(this._f,20),l.writeInt32BE(this._g,24),l},x.exports=e},{"./hash":497,"./sha256":502,inherits:440,"safe-buffer":494}],502:[function(n,x,_){var c=n("inherits"),o=n("./hash"),a=n("safe-buffer").Buffer,r=[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],t=new Array(64);function e(){this.init(),this._w=t,o.call(this,64,56)}function l(u,p,d){return d^u&(p^d)}function i(u,p,d){return u&p|d&(u|p)}function s(u){return(u>>>2|u<<30)^(u>>>13|u<<19)^(u>>>22|u<<10)}function f(u){return(u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7)}function h(u){return(u>>>7|u<<25)^(u>>>18|u<<14)^u>>>3}c(e,o),e.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},e.prototype._update=function(u){for(var p,d=this._w,w=0|this._a,S=0|this._b,A=0|this._c,N=0|this._d,L=0|this._e,I=0|this._f,P=0|this._g,D=0|this._h,U=0;U<16;++U)d[U]=u.readInt32BE(4*U);for(;U<64;++U)d[U]=0|(((p=d[U-2])>>>17|p<<15)^(p>>>19|p<<13)^p>>>10)+d[U-7]+h(d[U-15])+d[U-16];for(var B=0;B<64;++B){var k=D+f(L)+l(L,I,P)+r[B]+d[B]|0,C=s(w)+i(w,S,A)|0;D=P,P=I,I=L,L=N+k|0,N=A,A=S,S=w,w=k+C|0}this._a=w+this._a|0,this._b=S+this._b|0,this._c=A+this._c|0,this._d=N+this._d|0,this._e=L+this._e|0,this._f=I+this._f|0,this._g=P+this._g|0,this._h=D+this._h|0},e.prototype._hash=function(){var u=a.allocUnsafe(32);return u.writeInt32BE(this._a,0),u.writeInt32BE(this._b,4),u.writeInt32BE(this._c,8),u.writeInt32BE(this._d,12),u.writeInt32BE(this._e,16),u.writeInt32BE(this._f,20),u.writeInt32BE(this._g,24),u.writeInt32BE(this._h,28),u},x.exports=e},{"./hash":497,inherits:440,"safe-buffer":494}],503:[function(n,x,_){var c=n("inherits"),o=n("./sha512"),a=n("./hash"),r=n("safe-buffer").Buffer,t=new Array(160);function e(){this.init(),this._w=t,a.call(this,128,112)}c(e,o),e.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},e.prototype._hash=function(){var l=r.allocUnsafe(48);function i(s,f,h){l.writeInt32BE(s,h),l.writeInt32BE(f,h+4)}return i(this._ah,this._al,0),i(this._bh,this._bl,8),i(this._ch,this._cl,16),i(this._dh,this._dl,24),i(this._eh,this._el,32),i(this._fh,this._fl,40),l},x.exports=e},{"./hash":497,"./sha512":504,inherits:440,"safe-buffer":494}],504:[function(n,x,_){var c=n("inherits"),o=n("./hash"),a=n("safe-buffer").Buffer,r=[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],t=new Array(160);function e(){this.init(),this._w=t,o.call(this,128,112)}function l(S,A,N){return N^S&(A^N)}function i(S,A,N){return S&A|N&(S|A)}function s(S,A){return(S>>>28|A<<4)^(A>>>2|S<<30)^(A>>>7|S<<25)}function f(S,A){return(S>>>14|A<<18)^(S>>>18|A<<14)^(A>>>9|S<<23)}function h(S,A){return(S>>>1|A<<31)^(S>>>8|A<<24)^S>>>7}function u(S,A){return(S>>>1|A<<31)^(S>>>8|A<<24)^(S>>>7|A<<25)}function p(S,A){return(S>>>19|A<<13)^(A>>>29|S<<3)^S>>>6}function d(S,A){return(S>>>19|A<<13)^(A>>>29|S<<3)^(S>>>6|A<<26)}function w(S,A){return S>>>0<A>>>0?1:0}c(e,o),e.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},e.prototype._update=function(S){for(var A=this._w,N=0|this._ah,L=0|this._bh,I=0|this._ch,P=0|this._dh,D=0|this._eh,U=0|this._fh,B=0|this._gh,k=0|this._hh,C=0|this._al,v=0|this._bl,m=0|this._cl,b=0|this._dl,g=0|this._el,y=0|this._fl,E=0|this._gl,R=0|this._hl,O=0;O<32;O+=2)A[O]=S.readInt32BE(4*O),A[O+1]=S.readInt32BE(4*O+4);for(;O<160;O+=2){var z=A[O-30],$=A[O-30+1],Z=h(z,$),j=u($,z),H=p(z=A[O-4],$=A[O-4+1]),T=d($,z),M=A[O-14],F=A[O-14+1],V=A[O-32],Y=A[O-32+1],q=j+F|0,K=Z+M+w(q,j)|0;K=(K=K+H+w(q=q+T|0,T)|0)+V+w(q=q+Y|0,Y)|0,A[O]=K,A[O+1]=q}for(var nt=0;nt<160;nt+=2){K=A[nt],q=A[nt+1];var rt=i(N,L,I),G=i(C,v,m),tt=s(N,C),Q=s(C,N),st=f(D,g),it=f(g,D),at=r[nt],ut=r[nt+1],ft=l(D,U,B),dt=l(g,y,E),xt=R+it|0,_t=k+st+w(xt,R)|0;_t=(_t=(_t=_t+ft+w(xt=xt+dt|0,dt)|0)+at+w(xt=xt+ut|0,ut)|0)+K+w(xt=xt+q|0,q)|0;var gt=Q+G|0,Rt=tt+rt+w(gt,Q)|0;k=B,R=E,B=U,E=y,U=D,y=g,D=P+_t+w(g=b+xt|0,b)|0,P=I,b=m,I=L,m=v,L=N,v=C,N=_t+Rt+w(C=xt+gt|0,xt)|0}this._al=this._al+C|0,this._bl=this._bl+v|0,this._cl=this._cl+m|0,this._dl=this._dl+b|0,this._el=this._el+g|0,this._fl=this._fl+y|0,this._gl=this._gl+E|0,this._hl=this._hl+R|0,this._ah=this._ah+N+w(this._al,C)|0,this._bh=this._bh+L+w(this._bl,v)|0,this._ch=this._ch+I+w(this._cl,m)|0,this._dh=this._dh+P+w(this._dl,b)|0,this._eh=this._eh+D+w(this._el,g)|0,this._fh=this._fh+U+w(this._fl,y)|0,this._gh=this._gh+B+w(this._gl,E)|0,this._hh=this._hh+k+w(this._hl,R)|0},e.prototype._hash=function(){var S=a.allocUnsafe(64);function A(N,L,I){S.writeInt32BE(N,I),S.writeInt32BE(L,I+4)}return A(this._ah,this._al,0),A(this._bh,this._bl,8),A(this._ch,this._cl,16),A(this._dh,this._dl,24),A(this._eh,this._el,32),A(this._fh,this._fl,40),A(this._gh,this._gl,48),A(this._hh,this._hl,56),S},x.exports=e},{"./hash":497,inherits:440,"safe-buffer":494}],505:[function(n,x,_){x.exports=o;var c=n("events").EventEmitter;function o(){c.call(this)}n("inherits")(o,c),o.Readable=n("readable-stream/readable.js"),o.Writable=n("readable-stream/writable.js"),o.Duplex=n("readable-stream/duplex.js"),o.Transform=n("readable-stream/transform.js"),o.PassThrough=n("readable-stream/passthrough.js"),o.Stream=o,o.prototype.pipe=function(a,r){var t=this;function e(p){a.writable&&a.write(p)===!1&&t.pause&&t.pause()}function l(){t.readable&&t.resume&&t.resume()}t.on("data",e),a.on("drain",l),a._isStdio||r&&r.end===!1||(t.on("end",s),t.on("close",f));var i=!1;function s(){i||(i=!0,a.end())}function f(){i||(i=!0,typeof a.destroy=="function"&&a.destroy())}function h(p){if(u(),c.listenerCount(this,"error")===0)throw p}function u(){t.removeListener("data",e),a.removeListener("drain",l),t.removeListener("end",s),t.removeListener("close",f),t.removeListener("error",h),a.removeListener("error",h),t.removeListener("end",u),t.removeListener("close",u),a.removeListener("close",u)}return t.on("error",h),a.on("error",h),t.on("end",u),t.on("close",u),a.on("close",u),a.emit("pipe",t),a}},{events:422,inherits:440,"readable-stream/duplex.js":507,"readable-stream/passthrough.js":516,"readable-stream/readable.js":517,"readable-stream/transform.js":518,"readable-stream/writable.js":519}],506:[function(n,x,_){var c={}.toString;x.exports=Array.isArray||function(o){return c.call(o)=="[object Array]"}},{}],507:[function(n,x,_){x.exports=n("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":508}],508:[function(n,x,_){var c=n("process-nextick-args"),o=Object.keys||function(u){var p=[];for(var d in u)p.push(d);return p};x.exports=s;var a=Object.create(n("core-util-is"));a.inherits=n("inherits");var r=n("./_stream_readable"),t=n("./_stream_writable");a.inherits(s,r);for(var e=o(t.prototype),l=0;l<e.length;l++){var i=e[l];s.prototype[i]||(s.prototype[i]=t.prototype[i])}function s(u){if(!(this instanceof s))return new s(u);r.call(this,u),t.call(this,u),u&&u.readable===!1&&(this.readable=!1),u&&u.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,u&&u.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||c.nextTick(h,this)}function h(u){u.end()}Object.defineProperty(s.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(s.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),s.prototype._destroy=function(u,p){this.push(null),this.end(),c.nextTick(p,u)}},{"./_stream_readable":510,"./_stream_writable":512,"core-util-is":383,inherits:440,"process-nextick-args":466}],509:[function(n,x,_){x.exports=a;var c=n("./_stream_transform"),o=Object.create(n("core-util-is"));function a(r){if(!(this instanceof a))return new a(r);c.call(this,r)}o.inherits=n("inherits"),o.inherits(a,c),a.prototype._transform=function(r,t,e){e(null,r)}},{"./_stream_transform":511,"core-util-is":383,inherits:440}],510:[function(n,x,_){(function(c,o){(function(){var a=n("process-nextick-args");x.exports=N;var r,t=n("isarray");N.ReadableState=A,n("events").EventEmitter;var e=function(R,O){return R.listeners(O).length},l=n("./internal/streams/stream"),i=n("safe-buffer").Buffer,s=(o!==void 0?o:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},f=Object.create(n("core-util-is"));f.inherits=n("inherits");var h=n("util"),u=void 0;u=h&&h.debuglog?h.debuglog("stream"):function(){};var p,d=n("./internal/streams/BufferList"),w=n("./internal/streams/destroy");f.inherits(N,l);var S=["error","close","destroy","pause","resume"];function A(R,O){R=R||{};var z=O instanceof(r=r||n("./_stream_duplex"));this.objectMode=!!R.objectMode,z&&(this.objectMode=this.objectMode||!!R.readableObjectMode);var $=R.highWaterMark,Z=R.readableHighWaterMark,j=this.objectMode?16:16384;this.highWaterMark=$||$===0?$:z&&(Z||Z===0)?Z:j,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=R.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,R.encoding&&(p||(p=n("string_decoder/").StringDecoder),this.decoder=new p(R.encoding),this.encoding=R.encoding)}function N(R){if(r=r||n("./_stream_duplex"),!(this instanceof N))return new N(R);this._readableState=new A(R,this),this.readable=!0,R&&(typeof R.read=="function"&&(this._read=R.read),typeof R.destroy=="function"&&(this._destroy=R.destroy)),l.call(this)}function L(R,O,z,$,Z){var j,H=R._readableState;return O===null?(H.reading=!1,(function(T,M){if(!M.ended){if(M.decoder){var F=M.decoder.end();F&&F.length&&(M.buffer.push(F),M.length+=M.objectMode?1:F.length)}M.ended=!0,D(T)}})(R,H)):(Z||(j=(function(T,M){var F;V=M,i.isBuffer(V)||V instanceof s||typeof M=="string"||M===void 0||T.objectMode||(F=new TypeError("Invalid non-string/buffer chunk"));var V;return F})(H,O)),j?R.emit("error",j):H.objectMode||O&&O.length>0?(typeof O=="string"||H.objectMode||Object.getPrototypeOf(O)===i.prototype||(O=(function(T){return i.from(T)})(O)),$?H.endEmitted?R.emit("error",new Error("stream.unshift() after end event")):I(R,H,O,!0):H.ended?R.emit("error",new Error("stream.push() after EOF")):(H.reading=!1,H.decoder&&!z?(O=H.decoder.write(O),H.objectMode||O.length!==0?I(R,H,O,!1):B(R,H)):I(R,H,O,!1))):$||(H.reading=!1)),(function(T){return!T.ended&&(T.needReadable||T.length<T.highWaterMark||T.length===0)})(H)}function I(R,O,z,$){O.flowing&&O.length===0&&!O.sync?(R.emit("data",z),R.read(0)):(O.length+=O.objectMode?1:z.length,$?O.buffer.unshift(z):O.buffer.push(z),O.needReadable&&D(R)),B(R,O)}Object.defineProperty(N.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(R){this._readableState&&(this._readableState.destroyed=R)}}),N.prototype.destroy=w.destroy,N.prototype._undestroy=w.undestroy,N.prototype._destroy=function(R,O){this.push(null),O(R)},N.prototype.push=function(R,O){var z,$=this._readableState;return $.objectMode?z=!0:typeof R=="string"&&((O=O||$.defaultEncoding)!==$.encoding&&(R=i.from(R,O),O=""),z=!0),L(this,R,O,!1,z)},N.prototype.unshift=function(R){return L(this,R,null,!0,!1)},N.prototype.isPaused=function(){return this._readableState.flowing===!1},N.prototype.setEncoding=function(R){return p||(p=n("string_decoder/").StringDecoder),this._readableState.decoder=new p(R),this._readableState.encoding=R,this};function P(R,O){return R<=0||O.length===0&&O.ended?0:O.objectMode?1:R!=R?O.flowing&&O.length?O.buffer.head.data.length:O.length:(R>O.highWaterMark&&(O.highWaterMark=(function(z){return z>=8388608?z=8388608:(z--,z|=z>>>1,z|=z>>>2,z|=z>>>4,z|=z>>>8,z|=z>>>16,z++),z})(R)),R<=O.length?R:O.ended?O.length:(O.needReadable=!0,0))}function D(R){var O=R._readableState;O.needReadable=!1,O.emittedReadable||(u("emitReadable",O.flowing),O.emittedReadable=!0,O.sync?a.nextTick(U,R):U(R))}function U(R){u("emit readable"),R.emit("readable"),m(R)}function B(R,O){O.readingMore||(O.readingMore=!0,a.nextTick(k,R,O))}function k(R,O){for(var z=O.length;!O.reading&&!O.flowing&&!O.ended&&O.length<O.highWaterMark&&(u("maybeReadMore read 0"),R.read(0),z!==O.length);)z=O.length;O.readingMore=!1}function C(R){u("readable nexttick read 0"),R.read(0)}function v(R,O){O.reading||(u("resume read 0"),R.read(0)),O.resumeScheduled=!1,O.awaitDrain=0,R.emit("resume"),m(R),O.flowing&&!O.reading&&R.read(0)}function m(R){var O=R._readableState;for(u("flow",O.flowing);O.flowing&&R.read()!==null;);}function b(R,O){return O.length===0?null:(O.objectMode?z=O.buffer.shift():!R||R>=O.length?(z=O.decoder?O.buffer.join(""):O.buffer.length===1?O.buffer.head.data:O.buffer.concat(O.length),O.buffer.clear()):z=(function($,Z,j){var H;return $<Z.head.data.length?(H=Z.head.data.slice(0,$),Z.head.data=Z.head.data.slice($)):H=$===Z.head.data.length?Z.shift():j?(function(T,M){var F=M.head,V=1,Y=F.data;for(T-=Y.length;F=F.next;){var q=F.data,K=T>q.length?q.length:T;if(K===q.length?Y+=q:Y+=q.slice(0,T),(T-=K)===0){K===q.length?(++V,F.next?M.head=F.next:M.head=M.tail=null):(M.head=F,F.data=q.slice(K));break}++V}return M.length-=V,Y})($,Z):(function(T,M){var F=i.allocUnsafe(T),V=M.head,Y=1;for(V.data.copy(F),T-=V.data.length;V=V.next;){var q=V.data,K=T>q.length?q.length:T;if(q.copy(F,F.length-T,0,K),(T-=K)===0){K===q.length?(++Y,V.next?M.head=V.next:M.head=M.tail=null):(M.head=V,V.data=q.slice(K));break}++Y}return M.length-=Y,F})($,Z),H})(R,O.buffer,O.decoder),z);var z}function g(R){var O=R._readableState;if(O.length>0)throw new Error('"endReadable()" called on non-empty stream');O.endEmitted||(O.ended=!0,a.nextTick(y,O,R))}function y(R,O){R.endEmitted||R.length!==0||(R.endEmitted=!0,O.readable=!1,O.emit("end"))}function E(R,O){for(var z=0,$=R.length;z<$;z++)if(R[z]===O)return z;return-1}N.prototype.read=function(R){u("read",R),R=parseInt(R,10);var O=this._readableState,z=R;if(R!==0&&(O.emittedReadable=!1),R===0&&O.needReadable&&(O.length>=O.highWaterMark||O.ended))return u("read: emitReadable",O.length,O.ended),O.length===0&&O.ended?g(this):D(this),null;if((R=P(R,O))===0&&O.ended)return O.length===0&&g(this),null;var $,Z=O.needReadable;return u("need readable",Z),(O.length===0||O.length-R<O.highWaterMark)&&u("length less than watermark",Z=!0),O.ended||O.reading?u("reading or ended",Z=!1):Z&&(u("do read"),O.reading=!0,O.sync=!0,O.length===0&&(O.needReadable=!0),this._read(O.highWaterMark),O.sync=!1,O.reading||(R=P(z,O))),($=R>0?b(R,O):null)===null?(O.needReadable=!0,R=0):O.length-=R,O.length===0&&(O.ended||(O.needReadable=!0),z!==R&&O.ended&&g(this)),$!==null&&this.emit("data",$),$},N.prototype._read=function(R){this.emit("error",new Error("_read() is not implemented"))},N.prototype.pipe=function(R,O){var z=this,$=this._readableState;switch($.pipesCount){case 0:$.pipes=R;break;case 1:$.pipes=[$.pipes,R];break;default:$.pipes.push(R)}$.pipesCount+=1,u("pipe count=%d opts=%j",$.pipesCount,O);var Z=(!O||O.end!==!1)&&R!==c.stdout&&R!==c.stderr?H:nt;function j(rt,G){u("onunpipe"),rt===z&&G&&G.hasUnpiped===!1&&(G.hasUnpiped=!0,u("cleanup"),R.removeListener("close",q),R.removeListener("finish",K),R.removeListener("drain",T),R.removeListener("error",Y),R.removeListener("unpipe",j),z.removeListener("end",H),z.removeListener("end",nt),z.removeListener("data",V),M=!0,!$.awaitDrain||R._writableState&&!R._writableState.needDrain||T())}function H(){u("onend"),R.end()}$.endEmitted?a.nextTick(Z):z.once("end",Z),R.on("unpipe",j);var T=(function(rt){return function(){var G=rt._readableState;u("pipeOnDrain",G.awaitDrain),G.awaitDrain&&G.awaitDrain--,G.awaitDrain===0&&e(rt,"data")&&(G.flowing=!0,m(rt))}})(z);R.on("drain",T);var M=!1,F=!1;function V(rt){u("ondata"),F=!1,R.write(rt)!==!1||F||(($.pipesCount===1&&$.pipes===R||$.pipesCount>1&&E($.pipes,R)!==-1)&&!M&&(u("false write response, pause",$.awaitDrain),$.awaitDrain++,F=!0),z.pause())}function Y(rt){u("onerror",rt),nt(),R.removeListener("error",Y),e(R,"error")===0&&R.emit("error",rt)}function q(){R.removeListener("finish",K),nt()}function K(){u("onfinish"),R.removeListener("close",q),nt()}function nt(){u("unpipe"),z.unpipe(R)}return z.on("data",V),(function(rt,G,tt){if(typeof rt.prependListener=="function")return rt.prependListener(G,tt);rt._events&&rt._events[G]?t(rt._events[G])?rt._events[G].unshift(tt):rt._events[G]=[tt,rt._events[G]]:rt.on(G,tt)})(R,"error",Y),R.once("close",q),R.once("finish",K),R.emit("pipe",z),$.flowing||(u("pipe resume"),z.resume()),R},N.prototype.unpipe=function(R){var O=this._readableState,z={hasUnpiped:!1};if(O.pipesCount===0)return this;if(O.pipesCount===1)return R&&R!==O.pipes||(R||(R=O.pipes),O.pipes=null,O.pipesCount=0,O.flowing=!1,R&&R.emit("unpipe",this,z)),this;if(!R){var $=O.pipes,Z=O.pipesCount;O.pipes=null,O.pipesCount=0,O.flowing=!1;for(var j=0;j<Z;j++)$[j].emit("unpipe",this,{hasUnpiped:!1});return this}var H=E(O.pipes,R);return H===-1||(O.pipes.splice(H,1),O.pipesCount-=1,O.pipesCount===1&&(O.pipes=O.pipes[0]),R.emit("unpipe",this,z)),this},N.prototype.on=function(R,O){var z=l.prototype.on.call(this,R,O);if(R==="data")this._readableState.flowing!==!1&&this.resume();else if(R==="readable"){var $=this._readableState;$.endEmitted||$.readableListening||($.readableListening=$.needReadable=!0,$.emittedReadable=!1,$.reading?$.length&&D(this):a.nextTick(C,this))}return z},N.prototype.addListener=N.prototype.on,N.prototype.resume=function(){var R=this._readableState;return R.flowing||(u("resume"),R.flowing=!0,(function(O,z){z.resumeScheduled||(z.resumeScheduled=!0,a.nextTick(v,O,z))})(this,R)),this},N.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this},N.prototype.wrap=function(R){var O=this,z=this._readableState,$=!1;for(var Z in R.on("end",(function(){if(u("wrapped end"),z.decoder&&!z.ended){var H=z.decoder.end();H&&H.length&&O.push(H)}O.push(null)})),R.on("data",(function(H){u("wrapped data"),z.decoder&&(H=z.decoder.write(H)),z.objectMode&&H==null||(z.objectMode||H&&H.length)&&(O.push(H)||($=!0,R.pause()))})),R)this[Z]===void 0&&typeof R[Z]=="function"&&(this[Z]=(function(H){return function(){return R[H].apply(R,arguments)}})(Z));for(var j=0;j<S.length;j++)R.on(S[j],this.emit.bind(this,S[j]));return this._read=function(H){u("wrapped _read",H),$&&($=!1,R.resume())},this},Object.defineProperty(N.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),N._fromList=b}).call(this)}).call(this,n("_process"),typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{"./_stream_duplex":508,"./internal/streams/BufferList":513,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":383,events:422,inherits:440,isarray:506,"process-nextick-args":466,"safe-buffer":520,"string_decoder/":521,util:188}],511:[function(n,x,_){x.exports=r;var c=n("./_stream_duplex"),o=Object.create(n("core-util-is"));function a(l,i){var s=this._transformState;s.transforming=!1;var f=s.writecb;if(!f)return this.emit("error",new Error("write callback called multiple times"));s.writechunk=null,s.writecb=null,i!=null&&this.push(i),f(l);var h=this._readableState;h.reading=!1,(h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}function r(l){if(!(this instanceof r))return new r(l);c.call(this,l),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,l&&(typeof l.transform=="function"&&(this._transform=l.transform),typeof l.flush=="function"&&(this._flush=l.flush)),this.on("prefinish",t)}function t(){var l=this;typeof this._flush=="function"?this._flush((function(i,s){e(l,i,s)})):e(this,null,null)}function e(l,i,s){if(i)return l.emit("error",i);if(s!=null&&l.push(s),l._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(l._transformState.transforming)throw new Error("Calling transform done when still transforming");return l.push(null)}o.inherits=n("inherits"),o.inherits(r,c),r.prototype.push=function(l,i){return this._transformState.needTransform=!1,c.prototype.push.call(this,l,i)},r.prototype._transform=function(l,i,s){throw new Error("_transform() is not implemented")},r.prototype._write=function(l,i,s){var f=this._transformState;if(f.writecb=s,f.writechunk=l,f.writeencoding=i,!f.transforming){var h=this._readableState;(f.needTransform||h.needReadable||h.length<h.highWaterMark)&&this._read(h.highWaterMark)}},r.prototype._read=function(l){var i=this._transformState;i.writechunk!==null&&i.writecb&&!i.transforming?(i.transforming=!0,this._transform(i.writechunk,i.writeencoding,i.afterTransform)):i.needTransform=!0},r.prototype._destroy=function(l,i){var s=this;c.prototype._destroy.call(this,l,(function(f){i(f),s.emit("close")}))}},{"./_stream_duplex":508,"core-util-is":383,inherits:440}],512:[function(n,x,_){(function(c,o,a){(function(){var r=n("process-nextick-args");function t(B){var k=this;this.next=null,this.entry=null,this.finish=function(){(function(C,v,m){var b=C.entry;for(C.entry=null;b;){var g=b.callback;v.pendingcb--,g(m),b=b.next}v.corkedRequestsFree.next=C})(k,B)}}x.exports=A;var e,l=!c.browser&&["v0.10","v0.9."].indexOf(c.version.slice(0,5))>-1?a:r.nextTick;A.WritableState=S;var i=Object.create(n("core-util-is"));i.inherits=n("inherits");var s={deprecate:n("util-deprecate")},f=n("./internal/streams/stream"),h=n("safe-buffer").Buffer,u=(o!==void 0?o:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){},p,d=n("./internal/streams/destroy");function w(){}function S(B,k){e=e||n("./_stream_duplex"),B=B||{};var C=k instanceof e;this.objectMode=!!B.objectMode,C&&(this.objectMode=this.objectMode||!!B.writableObjectMode);var v=B.highWaterMark,m=B.writableHighWaterMark,b=this.objectMode?16:16384;this.highWaterMark=v||v===0?v:C&&(m||m===0)?m:b,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 g=B.decodeStrings===!1;this.decodeStrings=!g,this.defaultEncoding=B.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(y){(function(E,R){var O=E._writableState,z=O.sync,$=O.writecb;if((function(j){j.writing=!1,j.writecb=null,j.length-=j.writelen,j.writelen=0})(O),R)(function(j,H,T,M,F){--H.pendingcb,T?(r.nextTick(F,M),r.nextTick(U,j,H),j._writableState.errorEmitted=!0,j.emit("error",M)):(F(M),j._writableState.errorEmitted=!0,j.emit("error",M),U(j,H))})(E,O,z,R,$);else{var Z=P(O);Z||O.corked||O.bufferProcessing||!O.bufferedRequest||I(E,O),z?l(L,E,O,Z,$):L(E,O,Z,$)}})(k,y)},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 t(this)}function A(B){if(e=e||n("./_stream_duplex"),!(p.call(A,this)||this instanceof e))return new A(B);this._writableState=new S(B,this),this.writable=!0,B&&(typeof B.write=="function"&&(this._write=B.write),typeof B.writev=="function"&&(this._writev=B.writev),typeof B.destroy=="function"&&(this._destroy=B.destroy),typeof B.final=="function"&&(this._final=B.final)),f.call(this)}function N(B,k,C,v,m,b,g){k.writelen=v,k.writecb=g,k.writing=!0,k.sync=!0,C?B._writev(m,k.onwrite):B._write(m,b,k.onwrite),k.sync=!1}function L(B,k,C,v){C||(function(m,b){b.length===0&&b.needDrain&&(b.needDrain=!1,m.emit("drain"))})(B,k),k.pendingcb--,v(),U(B,k)}function I(B,k){k.bufferProcessing=!0;var C=k.bufferedRequest;if(B._writev&&C&&C.next){var v=k.bufferedRequestCount,m=new Array(v),b=k.corkedRequestsFree;b.entry=C;for(var g=0,y=!0;C;)m[g]=C,C.isBuf||(y=!1),C=C.next,g+=1;m.allBuffers=y,N(B,k,!0,k.length,m,"",b.finish),k.pendingcb++,k.lastBufferedRequest=null,b.next?(k.corkedRequestsFree=b.next,b.next=null):k.corkedRequestsFree=new t(k),k.bufferedRequestCount=0}else{for(;C;){var E=C.chunk,R=C.encoding,O=C.callback;if(N(B,k,!1,k.objectMode?1:E.length,E,R,O),C=C.next,k.bufferedRequestCount--,k.writing)break}C===null&&(k.lastBufferedRequest=null)}k.bufferedRequest=C,k.bufferProcessing=!1}function P(B){return B.ending&&B.length===0&&B.bufferedRequest===null&&!B.finished&&!B.writing}function D(B,k){B._final((function(C){k.pendingcb--,C&&B.emit("error",C),k.prefinished=!0,B.emit("prefinish"),U(B,k)}))}function U(B,k){var C=P(k);return C&&((function(v,m){m.prefinished||m.finalCalled||(typeof v._final=="function"?(m.pendingcb++,m.finalCalled=!0,r.nextTick(D,v,m)):(m.prefinished=!0,v.emit("prefinish")))})(B,k),k.pendingcb===0&&(k.finished=!0,B.emit("finish"))),C}i.inherits(A,f),S.prototype.getBuffer=function(){for(var B=this.bufferedRequest,k=[];B;)k.push(B),B=B.next;return k},(function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})(),typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(B){return!!p.call(this,B)||this===A&&B&&B._writableState instanceof S}})):p=function(B){return B instanceof this},A.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},A.prototype.write=function(B,k,C){var v,m=this._writableState,b=!1,g=!m.objectMode&&(v=B,h.isBuffer(v)||v instanceof u);return g&&!h.isBuffer(B)&&(B=(function(y){return h.from(y)})(B)),typeof k=="function"&&(C=k,k=null),g?k="buffer":k||(k=m.defaultEncoding),typeof C!="function"&&(C=w),m.ended?(function(y,E){var R=new Error("write after end");y.emit("error",R),r.nextTick(E,R)})(this,C):(g||(function(y,E,R,O){var z=!0,$=!1;return R===null?$=new TypeError("May not write null values to stream"):typeof R=="string"||R===void 0||E.objectMode||($=new TypeError("Invalid non-string/buffer chunk")),$&&(y.emit("error",$),r.nextTick(O,$),z=!1),z})(this,m,B,C))&&(m.pendingcb++,b=(function(y,E,R,O,z,$){if(!R){var Z=(function(M,F,V){return M.objectMode||M.decodeStrings===!1||typeof F!="string"||(F=h.from(F,V)),F})(E,O,z);O!==Z&&(R=!0,z="buffer",O=Z)}var j=E.objectMode?1:O.length;E.length+=j;var H=E.length<E.highWaterMark;if(H||(E.needDrain=!0),E.writing||E.corked){var T=E.lastBufferedRequest;E.lastBufferedRequest={chunk:O,encoding:z,isBuf:R,callback:$,next:null},T?T.next=E.lastBufferedRequest:E.bufferedRequest=E.lastBufferedRequest,E.bufferedRequestCount+=1}else N(y,E,!1,j,O,z,$);return H})(this,m,g,B,k,C)),b},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var B=this._writableState;B.corked&&(B.corked--,B.writing||B.corked||B.bufferProcessing||!B.bufferedRequest||I(this,B))},A.prototype.setDefaultEncoding=function(B){if(typeof B=="string"&&(B=B.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((B+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+B);return this._writableState.defaultEncoding=B,this},Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(B,k,C){C(new Error("_write() is not implemented"))},A.prototype._writev=null,A.prototype.end=function(B,k,C){var v=this._writableState;typeof B=="function"?(C=B,B=null,k=null):typeof k=="function"&&(C=k,k=null),B!=null&&this.write(B,k),v.corked&&(v.corked=1,this.uncork()),v.ending||(function(m,b,g){b.ending=!0,U(m,b),g&&(b.finished?r.nextTick(g):m.once("finish",g)),b.ended=!0,m.writable=!1})(this,v,C)},Object.defineProperty(A.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(B){this._writableState&&(this._writableState.destroyed=B)}}),A.prototype.destroy=d.destroy,A.prototype._undestroy=d.undestroy,A.prototype._destroy=function(B,k){this.end(),k(B)}}).call(this)}).call(this,n("_process"),typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{},n("timers").setImmediate)},{"./_stream_duplex":508,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":383,inherits:440,"process-nextick-args":466,"safe-buffer":520,timers:523,"util-deprecate":524}],513:[function(n,x,_){var c=n("safe-buffer").Buffer,o=n("util");x.exports=(function(){function a(){(function(r,t){if(!(r instanceof t))throw new TypeError("Cannot call a class as a function")})(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(r){var t={data:r,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},a.prototype.unshift=function(r){var t={data:r,next:this.head};this.length===0&&(this.tail=t),this.head=t,++this.length},a.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(r){if(this.length===0)return"";for(var t=this.head,e=""+t.data;t=t.next;)e+=r+t.data;return e},a.prototype.concat=function(r){if(this.length===0)return c.alloc(0);for(var t,e,l,i=c.allocUnsafe(r>>>0),s=this.head,f=0;s;)t=s.data,e=i,l=f,t.copy(e,l),f+=s.data.length,s=s.next;return i},a})(),o&&o.inspect&&o.inspect.custom&&(x.exports.prototype[o.inspect.custom]=function(){var a=o.inspect({length:this.length});return this.constructor.name+" "+a})},{"safe-buffer":520,util:188}],514:[function(n,x,_){var c=n("process-nextick-args");function o(a,r){a.emit("error",r)}x.exports={destroy:function(a,r){var t=this,e=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return e||l?(r?r(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,c.nextTick(o,this,a)):c.nextTick(o,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,(function(i){!r&&i?t._writableState?t._writableState.errorEmitted||(t._writableState.errorEmitted=!0,c.nextTick(o,t,i)):c.nextTick(o,t,i):r&&r(i)})),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.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":466}],515:[function(n,x,_){arguments[4][490][0].apply(_,arguments)},{dup:490,events:422}],516:[function(n,x,_){x.exports=n("./readable").PassThrough},{"./readable":517}],517:[function(n,x,_){(_=x.exports=n("./lib/_stream_readable.js")).Stream=_,_.Readable=_,_.Writable=n("./lib/_stream_writable.js"),_.Duplex=n("./lib/_stream_duplex.js"),_.Transform=n("./lib/_stream_transform.js"),_.PassThrough=n("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":508,"./lib/_stream_passthrough.js":509,"./lib/_stream_readable.js":510,"./lib/_stream_transform.js":511,"./lib/_stream_writable.js":512}],518:[function(n,x,_){x.exports=n("./readable").Transform},{"./readable":517}],519:[function(n,x,_){x.exports=n("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":512}],520:[function(n,x,_){arguments[4][217][0].apply(_,arguments)},{buffer:220,dup:217}],521:[function(n,x,_){arguments[4][218][0].apply(_,arguments)},{dup:218,"safe-buffer":520}],522:[function(n,x,_){arguments[4][218][0].apply(_,arguments)},{dup:218,"safe-buffer":494}],523:[function(n,x,_){(function(c,o){(function(){var a=n("process/browser.js").nextTick,r=Function.prototype.apply,t=Array.prototype.slice,e={},l=0;function i(s,f){this._id=s,this._clearFn=f}_.setTimeout=function(){return new i(r.call(setTimeout,window,arguments),clearTimeout)},_.setInterval=function(){return new i(r.call(setInterval,window,arguments),clearInterval)},_.clearTimeout=_.clearInterval=function(s){s.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},_.enroll=function(s,f){clearTimeout(s._idleTimeoutId),s._idleTimeout=f},_.unenroll=function(s){clearTimeout(s._idleTimeoutId),s._idleTimeout=-1},_._unrefActive=_.active=function(s){clearTimeout(s._idleTimeoutId);var f=s._idleTimeout;f>=0&&(s._idleTimeoutId=setTimeout((function(){s._onTimeout&&s._onTimeout()}),f))},_.setImmediate=typeof c=="function"?c:function(s){var f=l++,h=!(arguments.length<2)&&t.call(arguments,1);return e[f]=!0,a((function(){e[f]&&(h?s.apply(null,h):s.call(null),_.clearImmediate(f))})),f},_.clearImmediate=typeof o=="function"?o:function(s){delete e[s]}}).call(this)}).call(this,n("timers").setImmediate,n("timers").clearImmediate)},{"process/browser.js":467,timers:523}],524:[function(n,x,_){(function(c){(function(){function o(a){try{if(!c.localStorage)return!1}catch{return!1}var r=c.localStorage[a];return r!=null&&String(r).toLowerCase()==="true"}x.exports=function(a,r){if(o("noDeprecation"))return a;var t=!1;return function(){if(!t){if(o("throwDeprecation"))throw new Error(r);o("traceDeprecation")?console.trace(r):console.warn(r),t=!0}return a.apply(this,arguments)}}}).call(this)}).call(this,typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{}],525:[function(n,x,_){typeof Object.create=="function"?x.exports=function(c,o){c.super_=o,c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}})}:x.exports=function(c,o){c.super_=o;var a=function(){};a.prototype=o.prototype,c.prototype=new a,c.prototype.constructor=c}},{}],526:[function(n,x,_){x.exports=function(c){return c&&typeof c=="object"&&typeof c.copy=="function"&&typeof c.fill=="function"&&typeof c.readUInt8=="function"}},{}],527:[function(n,x,_){(function(c,o){(function(){var a=/%[sdj%]/g;_.format=function(m){if(!S(m)){for(var b=[],g=0;g<arguments.length;g++)b.push(e(arguments[g]));return b.join(" ")}g=1;for(var y=arguments,E=y.length,R=String(m).replace(a,(function(z){if(z==="%%")return"%";if(g>=E)return z;switch(z){case"%s":return String(y[g++]);case"%d":return Number(y[g++]);case"%j":try{return JSON.stringify(y[g++])}catch{return"[Circular]"}default:return z}})),O=y[g];g<E;O=y[++g])d(O)||!L(O)?R+=" "+O:R+=" "+e(O);return R},_.deprecate=function(m,b){if(A(o.process))return function(){return _.deprecate(m,b).apply(this,arguments)};if(c.noDeprecation===!0)return m;var g=!1;return function(){if(!g){if(c.throwDeprecation)throw new Error(b);c.traceDeprecation?console.trace(b):console.error(b),g=!0}return m.apply(this,arguments)}};var r,t={};function e(m,b){var g={seen:[],stylize:i};return arguments.length>=3&&(g.depth=arguments[2]),arguments.length>=4&&(g.colors=arguments[3]),p(b)?g.showHidden=b:b&&_._extend(g,b),A(g.showHidden)&&(g.showHidden=!1),A(g.depth)&&(g.depth=2),A(g.colors)&&(g.colors=!1),A(g.customInspect)&&(g.customInspect=!0),g.colors&&(g.stylize=l),s(g,m,g.depth)}function l(m,b){var g=e.styles[b];return g?"\x1B["+e.colors[g][0]+"m"+m+"\x1B["+e.colors[g][1]+"m":m}function i(m,b){return m}function s(m,b,g){if(m.customInspect&&b&&D(b.inspect)&&b.inspect!==_.inspect&&(!b.constructor||b.constructor.prototype!==b)){var y=b.inspect(g,m);return S(y)||(y=s(m,y,g)),y}var E=(function(T,M){if(A(M))return T.stylize("undefined","undefined");if(S(M)){var F="'"+JSON.stringify(M).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return T.stylize(F,"string")}if(w(M))return T.stylize(""+M,"number");if(p(M))return T.stylize(""+M,"boolean");if(d(M))return T.stylize("null","null")})(m,b);if(E)return E;var R=Object.keys(b),O=(function(T){var M={};return T.forEach((function(F,V){M[F]=!0})),M})(R);if(m.showHidden&&(R=Object.getOwnPropertyNames(b)),P(b)&&(R.indexOf("message")>=0||R.indexOf("description")>=0))return f(b);if(R.length===0){if(D(b)){var z=b.name?": "+b.name:"";return m.stylize("[Function"+z+"]","special")}if(N(b))return m.stylize(RegExp.prototype.toString.call(b),"regexp");if(I(b))return m.stylize(Date.prototype.toString.call(b),"date");if(P(b))return f(b)}var $,Z="",j=!1,H=["{","}"];return u(b)&&(j=!0,H=["[","]"]),D(b)&&(Z=" [Function"+(b.name?": "+b.name:"")+"]"),N(b)&&(Z=" "+RegExp.prototype.toString.call(b)),I(b)&&(Z=" "+Date.prototype.toUTCString.call(b)),P(b)&&(Z=" "+f(b)),R.length!==0||j&&b.length!=0?g<0?N(b)?m.stylize(RegExp.prototype.toString.call(b),"regexp"):m.stylize("[Object]","special"):(m.seen.push(b),$=j?(function(T,M,F,V,Y){for(var q=[],K=0,nt=M.length;K<nt;++K)v(M,String(K))?q.push(h(T,M,F,V,String(K),!0)):q.push("");return Y.forEach((function(rt){rt.match(/^\d+$/)||q.push(h(T,M,F,V,rt,!0))})),q})(m,b,g,O,R):R.map((function(T){return h(m,b,g,O,T,j)})),m.seen.pop(),(function(T,M,F){return T.reduce((function(V,Y){return Y.indexOf(`
18
- `)>=0,V+Y.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?F[0]+(M===""?"":M+`
19
- `)+" "+T.join(`,
20
- `)+" "+F[1]:F[0]+M+" "+T.join(", ")+" "+F[1]})($,Z,H)):H[0]+Z+H[1]}function f(m){return"["+Error.prototype.toString.call(m)+"]"}function h(m,b,g,y,E,R){var O,z,$;if(($=Object.getOwnPropertyDescriptor(b,E)||{value:b[E]}).get?z=$.set?m.stylize("[Getter/Setter]","special"):m.stylize("[Getter]","special"):$.set&&(z=m.stylize("[Setter]","special")),v(y,E)||(O="["+E+"]"),z||(m.seen.indexOf($.value)<0?(z=d(g)?s(m,$.value,null):s(m,$.value,g-1)).indexOf(`
21
- `)>-1&&(z=R?z.split(`
22
- `).map((function(Z){return" "+Z})).join(`
23
- `).substr(2):`
24
- `+z.split(`
25
- `).map((function(Z){return" "+Z})).join(`
26
- `)):z=m.stylize("[Circular]","special")),A(O)){if(R&&E.match(/^\d+$/))return z;(O=JSON.stringify(""+E)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(O=O.substr(1,O.length-2),O=m.stylize(O,"name")):(O=O.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),O=m.stylize(O,"string"))}return O+": "+z}function u(m){return Array.isArray(m)}function p(m){return typeof m=="boolean"}function d(m){return m===null}function w(m){return typeof m=="number"}function S(m){return typeof m=="string"}function A(m){return m===void 0}function N(m){return L(m)&&U(m)==="[object RegExp]"}function L(m){return typeof m=="object"&&m!==null}function I(m){return L(m)&&U(m)==="[object Date]"}function P(m){return L(m)&&(U(m)==="[object Error]"||m instanceof Error)}function D(m){return typeof m=="function"}function U(m){return Object.prototype.toString.call(m)}function B(m){return m<10?"0"+m.toString(10):m.toString(10)}_.debuglog=function(m){if(A(r)&&(r=c.env.NODE_DEBUG||""),m=m.toUpperCase(),!t[m])if(new RegExp("\\b"+m+"\\b","i").test(r)){var b=c.pid;t[m]=function(){var g=_.format.apply(_,arguments);console.error("%s %d: %s",m,b,g)}}else t[m]=function(){};return t[m]},_.inspect=e,e.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]},e.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},_.isArray=u,_.isBoolean=p,_.isNull=d,_.isNullOrUndefined=function(m){return m==null},_.isNumber=w,_.isString=S,_.isSymbol=function(m){return typeof m=="symbol"},_.isUndefined=A,_.isRegExp=N,_.isObject=L,_.isDate=I,_.isError=P,_.isFunction=D,_.isPrimitive=function(m){return m===null||typeof m=="boolean"||typeof m=="number"||typeof m=="string"||typeof m=="symbol"||m===void 0},_.isBuffer=n("./support/isBuffer");var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var m=new Date,b=[B(m.getHours()),B(m.getMinutes()),B(m.getSeconds())].join(":");return[m.getDate(),k[m.getMonth()],b].join(" ")}function v(m,b){return Object.prototype.hasOwnProperty.call(m,b)}_.log=function(){console.log("%s - %s",C(),_.format.apply(_,arguments))},_.inherits=n("inherits"),_._extend=function(m,b){if(!b||!L(b))return m;for(var g=Object.keys(b),y=g.length;y--;)m[g[y]]=b[g[y]];return m}}).call(this)}).call(this,n("_process"),typeof Gt.commonjsGlobal<"u"?Gt.commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{"./support/isBuffer":526,_process:467,inherits:525}],528:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),Object.defineProperty(_,"v1",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(_,"v3",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(_,"v4",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(_,"v5",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(_,"NIL",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(_,"version",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(_,"validate",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(_,"stringify",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(_,"parse",{enumerable:!0,get:function(){return s.default}});var c=f(n("./v1.js")),o=f(n("./v3.js")),a=f(n("./v4.js")),r=f(n("./v5.js")),t=f(n("./nil.js")),e=f(n("./version.js")),l=f(n("./validate.js")),i=f(n("./stringify.js")),s=f(n("./parse.js"));function f(h){return h&&h.__esModule?h:{default:h}}},{"./nil.js":530,"./parse.js":531,"./stringify.js":535,"./v1.js":536,"./v3.js":537,"./v4.js":539,"./v5.js":540,"./validate.js":541,"./version.js":542}],529:[function(n,x,_){function c(s){return 14+(s+64>>>9<<4)+1}function o(s,f){const h=(65535&s)+(65535&f);return(s>>16)+(f>>16)+(h>>16)<<16|65535&h}function a(s,f,h,u,p,d){return o((w=o(o(f,s),o(u,d)))<<(S=p)|w>>>32-S,h);var w,S}function r(s,f,h,u,p,d,w){return a(f&h|~f&u,s,f,p,d,w)}function t(s,f,h,u,p,d,w){return a(f&u|h&~u,s,f,p,d,w)}function e(s,f,h,u,p,d,w){return a(f^h^u,s,f,p,d,w)}function l(s,f,h,u,p,d,w){return a(h^(f|~u),s,f,p,d,w)}Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var i=function(s){if(typeof s=="string"){const f=unescape(encodeURIComponent(s));s=new Uint8Array(f.length);for(let h=0;h<f.length;++h)s[h]=f.charCodeAt(h)}return(function(f){const h=[],u=32*f.length;for(let p=0;p<u;p+=8){const d=f[p>>5]>>>p%32&255,w=parseInt("0123456789abcdef".charAt(d>>>4&15)+"0123456789abcdef".charAt(15&d),16);h.push(w)}return h})((function(f,h){f[h>>5]|=128<<h%32,f[c(h)-1]=h;let u=1732584193,p=-271733879,d=-1732584194,w=271733878;for(let S=0;S<f.length;S+=16){const A=u,N=p,L=d,I=w;u=r(u,p,d,w,f[S],7,-680876936),w=r(w,u,p,d,f[S+1],12,-389564586),d=r(d,w,u,p,f[S+2],17,606105819),p=r(p,d,w,u,f[S+3],22,-1044525330),u=r(u,p,d,w,f[S+4],7,-176418897),w=r(w,u,p,d,f[S+5],12,1200080426),d=r(d,w,u,p,f[S+6],17,-1473231341),p=r(p,d,w,u,f[S+7],22,-45705983),u=r(u,p,d,w,f[S+8],7,1770035416),w=r(w,u,p,d,f[S+9],12,-1958414417),d=r(d,w,u,p,f[S+10],17,-42063),p=r(p,d,w,u,f[S+11],22,-1990404162),u=r(u,p,d,w,f[S+12],7,1804603682),w=r(w,u,p,d,f[S+13],12,-40341101),d=r(d,w,u,p,f[S+14],17,-1502002290),p=r(p,d,w,u,f[S+15],22,1236535329),u=t(u,p,d,w,f[S+1],5,-165796510),w=t(w,u,p,d,f[S+6],9,-1069501632),d=t(d,w,u,p,f[S+11],14,643717713),p=t(p,d,w,u,f[S],20,-373897302),u=t(u,p,d,w,f[S+5],5,-701558691),w=t(w,u,p,d,f[S+10],9,38016083),d=t(d,w,u,p,f[S+15],14,-660478335),p=t(p,d,w,u,f[S+4],20,-405537848),u=t(u,p,d,w,f[S+9],5,568446438),w=t(w,u,p,d,f[S+14],9,-1019803690),d=t(d,w,u,p,f[S+3],14,-187363961),p=t(p,d,w,u,f[S+8],20,1163531501),u=t(u,p,d,w,f[S+13],5,-1444681467),w=t(w,u,p,d,f[S+2],9,-51403784),d=t(d,w,u,p,f[S+7],14,1735328473),p=t(p,d,w,u,f[S+12],20,-1926607734),u=e(u,p,d,w,f[S+5],4,-378558),w=e(w,u,p,d,f[S+8],11,-2022574463),d=e(d,w,u,p,f[S+11],16,1839030562),p=e(p,d,w,u,f[S+14],23,-35309556),u=e(u,p,d,w,f[S+1],4,-1530992060),w=e(w,u,p,d,f[S+4],11,1272893353),d=e(d,w,u,p,f[S+7],16,-155497632),p=e(p,d,w,u,f[S+10],23,-1094730640),u=e(u,p,d,w,f[S+13],4,681279174),w=e(w,u,p,d,f[S],11,-358537222),d=e(d,w,u,p,f[S+3],16,-722521979),p=e(p,d,w,u,f[S+6],23,76029189),u=e(u,p,d,w,f[S+9],4,-640364487),w=e(w,u,p,d,f[S+12],11,-421815835),d=e(d,w,u,p,f[S+15],16,530742520),p=e(p,d,w,u,f[S+2],23,-995338651),u=l(u,p,d,w,f[S],6,-198630844),w=l(w,u,p,d,f[S+7],10,1126891415),d=l(d,w,u,p,f[S+14],15,-1416354905),p=l(p,d,w,u,f[S+5],21,-57434055),u=l(u,p,d,w,f[S+12],6,1700485571),w=l(w,u,p,d,f[S+3],10,-1894986606),d=l(d,w,u,p,f[S+10],15,-1051523),p=l(p,d,w,u,f[S+1],21,-2054922799),u=l(u,p,d,w,f[S+8],6,1873313359),w=l(w,u,p,d,f[S+15],10,-30611744),d=l(d,w,u,p,f[S+6],15,-1560198380),p=l(p,d,w,u,f[S+13],21,1309151649),u=l(u,p,d,w,f[S+4],6,-145523070),w=l(w,u,p,d,f[S+11],10,-1120210379),d=l(d,w,u,p,f[S+2],15,718787259),p=l(p,d,w,u,f[S+9],21,-343485551),u=o(u,A),p=o(p,N),d=o(d,L),w=o(w,I)}return[u,p,d,w]})((function(f){if(f.length===0)return[];const h=8*f.length,u=new Uint32Array(c(h));for(let p=0;p<h;p+=8)u[p>>5]|=(255&f[p/8])<<p%32;return u})(s),8*s.length))};_.default=i},{}],530:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0,_.default="00000000-0000-0000-0000-000000000000"},{}],531:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var c,o=(c=n("./validate.js"))&&c.__esModule?c:{default:c},a=function(r){if(!(0,o.default)(r))throw TypeError("Invalid UUID");let t;const e=new Uint8Array(16);return e[0]=(t=parseInt(r.slice(0,8),16))>>>24,e[1]=t>>>16&255,e[2]=t>>>8&255,e[3]=255&t,e[4]=(t=parseInt(r.slice(9,13),16))>>>8,e[5]=255&t,e[6]=(t=parseInt(r.slice(14,18),16))>>>8,e[7]=255&t,e[8]=(t=parseInt(r.slice(19,23),16))>>>8,e[9]=255&t,e[10]=(t=parseInt(r.slice(24,36),16))/1099511627776&255,e[11]=t/4294967296&255,e[12]=t>>>24&255,e[13]=t>>>16&255,e[14]=t>>>8&255,e[15]=255&t,e};_.default=a},{"./validate.js":541}],532:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0,_.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},{}],533:[function(n,x,_){let c;Object.defineProperty(_,"__esModule",{value:!0}),_.default=function(){if(!c&&(c=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!c))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return c(o)};const o=new Uint8Array(16)},{}],534:[function(n,x,_){function c(r,t,e,l){switch(r){case 0:return t&e^~t&l;case 1:return t^e^l;case 2:return t&e^t&l^e&l;case 3:return t^e^l}}function o(r,t){return r<<t|r>>>32-t}Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var a=function(r){const t=[1518500249,1859775393,2400959708,3395469782],e=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof r=="string"){const f=unescape(encodeURIComponent(r));r=[];for(let h=0;h<f.length;++h)r.push(f.charCodeAt(h))}else Array.isArray(r)||(r=Array.prototype.slice.call(r));r.push(128);const l=r.length/4+2,i=Math.ceil(l/16),s=new Array(i);for(let f=0;f<i;++f){const h=new Uint32Array(16);for(let u=0;u<16;++u)h[u]=r[64*f+4*u]<<24|r[64*f+4*u+1]<<16|r[64*f+4*u+2]<<8|r[64*f+4*u+3];s[f]=h}s[i-1][14]=8*(r.length-1)/Math.pow(2,32),s[i-1][14]=Math.floor(s[i-1][14]),s[i-1][15]=8*(r.length-1)&4294967295;for(let f=0;f<i;++f){const h=new Uint32Array(80);for(let A=0;A<16;++A)h[A]=s[f][A];for(let A=16;A<80;++A)h[A]=o(h[A-3]^h[A-8]^h[A-14]^h[A-16],1);let u=e[0],p=e[1],d=e[2],w=e[3],S=e[4];for(let A=0;A<80;++A){const N=Math.floor(A/20),L=o(u,5)+c(N,p,d,w)+S+t[N]+h[A]>>>0;S=w,w=d,d=o(p,30)>>>0,p=u,u=L}e[0]=e[0]+u>>>0,e[1]=e[1]+p>>>0,e[2]=e[2]+d>>>0,e[3]=e[3]+w>>>0,e[4]=e[4]+S>>>0}return[e[0]>>24&255,e[0]>>16&255,e[0]>>8&255,255&e[0],e[1]>>24&255,e[1]>>16&255,e[1]>>8&255,255&e[1],e[2]>>24&255,e[2]>>16&255,e[2]>>8&255,255&e[2],e[3]>>24&255,e[3]>>16&255,e[3]>>8&255,255&e[3],e[4]>>24&255,e[4]>>16&255,e[4]>>8&255,255&e[4]]};_.default=a},{}],535:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var c,o=(c=n("./validate.js"))&&c.__esModule?c:{default:c};const a=[];for(let t=0;t<256;++t)a.push((t+256).toString(16).substr(1));var r=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const l=(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase();if(!(0,o.default)(l))throw TypeError("Stringified UUID is invalid");return l};_.default=r},{"./validate.js":541}],536:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var c=a(n("./rng.js")),o=a(n("./stringify.js"));function a(s){return s&&s.__esModule?s:{default:s}}let r,t,e=0,l=0;var i=function(s,f,h){let u=f&&h||0;const p=f||new Array(16);let d=(s=s||{}).node||r,w=s.clockseq!==void 0?s.clockseq:t;if(d==null||w==null){const P=s.random||(s.rng||c.default)();d==null&&(d=r=[1|P[0],P[1],P[2],P[3],P[4],P[5]]),w==null&&(w=t=16383&(P[6]<<8|P[7]))}let S=s.msecs!==void 0?s.msecs:Date.now(),A=s.nsecs!==void 0?s.nsecs:l+1;const N=S-e+(A-l)/1e4;if(N<0&&s.clockseq===void 0&&(w=w+1&16383),(N<0||S>e)&&s.nsecs===void 0&&(A=0),A>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");e=S,l=A,t=w,S+=122192928e5;const L=(1e4*(268435455&S)+A)%4294967296;p[u++]=L>>>24&255,p[u++]=L>>>16&255,p[u++]=L>>>8&255,p[u++]=255&L;const I=S/4294967296*1e4&268435455;p[u++]=I>>>8&255,p[u++]=255&I,p[u++]=I>>>24&15|16,p[u++]=I>>>16&255,p[u++]=w>>>8|128,p[u++]=255&w;for(let P=0;P<6;++P)p[u+P]=d[P];return f||(0,o.default)(p)};_.default=i},{"./rng.js":533,"./stringify.js":535}],537:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var c=a(n("./v35.js")),o=a(n("./md5.js"));function a(t){return t&&t.__esModule?t:{default:t}}var r=(0,c.default)("v3",48,o.default);_.default=r},{"./md5.js":529,"./v35.js":538}],538:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=function(e,l,i){function s(f,h,u,p){if(typeof f=="string"&&(f=(function(w){w=unescape(encodeURIComponent(w));const S=[];for(let A=0;A<w.length;++A)S.push(w.charCodeAt(A));return S})(f)),typeof h=="string"&&(h=(0,o.default)(h)),h.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let d=new Uint8Array(16+f.length);if(d.set(h),d.set(f,h.length),d=i(d),d[6]=15&d[6]|l,d[8]=63&d[8]|128,u){p=p||0;for(let w=0;w<16;++w)u[p+w]=d[w];return u}return(0,c.default)(d)}try{s.name=e}catch{}return s.DNS=r,s.URL=t,s},_.URL=_.DNS=void 0;var c=a(n("./stringify.js")),o=a(n("./parse.js"));function a(e){return e&&e.__esModule?e:{default:e}}const r="6ba7b810-9dad-11d1-80b4-00c04fd430c8";_.DNS=r;const t="6ba7b811-9dad-11d1-80b4-00c04fd430c8";_.URL=t},{"./parse.js":531,"./stringify.js":535}],539:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var c=a(n("./rng.js")),o=a(n("./stringify.js"));function a(t){return t&&t.__esModule?t:{default:t}}var r=function(t,e,l){const i=(t=t||{}).random||(t.rng||c.default)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){l=l||0;for(let s=0;s<16;++s)e[l+s]=i[s];return e}return(0,o.default)(i)};_.default=r},{"./rng.js":533,"./stringify.js":535}],540:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var c=a(n("./v35.js")),o=a(n("./sha1.js"));function a(t){return t&&t.__esModule?t:{default:t}}var r=(0,c.default)("v5",80,o.default);_.default=r},{"./sha1.js":534,"./v35.js":538}],541:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var c,o=(c=n("./regex.js"))&&c.__esModule?c:{default:c},a=function(r){return typeof r=="string"&&o.default.test(r)};_.default=a},{"./regex.js":532}],542:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.default=void 0;var c,o=(c=n("./validate.js"))&&c.__esModule?c:{default:c},a=function(r){if(!(0,o.default)(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)};_.default=a},{"./validate.js":541}],543:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.CHAR=`
27
- \r -퟿-�𐀀-􏿿`,_.S=` \r
28
- `,_.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",_.NAME_CHAR="-"+_.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",_.CHAR_RE=new RegExp("^["+_.CHAR+"]$","u"),_.S_RE=new RegExp("^["+_.S+"]+$","u"),_.NAME_START_CHAR_RE=new RegExp("^["+_.NAME_START_CHAR+"]$","u"),_.NAME_CHAR_RE=new RegExp("^["+_.NAME_CHAR+"]$","u"),_.NAME_RE=new RegExp("^["+_.NAME_START_CHAR+"]["+_.NAME_CHAR+"]*$","u"),_.NMTOKEN_RE=new RegExp("^["+_.NAME_CHAR+"]+$","u");function c(o){return o>=65&&o<=90||o>=97&&o<=122||o===58||o===95||o===8204||o===8205||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}_.S_LIST=[32,10,13,9],_.isChar=function(o){return o>=32&&o<=55295||o===10||o===13||o===9||o>=57344&&o<=65533||o>=65536&&o<=1114111},_.isS=function(o){return o===32||o===10||o===13||o===9},_.isNameStartChar=c,_.isNameChar=function(o){return c(o)||o>=48&&o<=57||o===45||o===46||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}],544:[function(n,x,_){Object.defineProperty(_,"__esModule",{value:!0}),_.CHAR="-퟿-�𐀀-􏿿",_.RESTRICTED_CHAR="-\b\v\f--„†-Ÿ",_.S=` \r
29
- `,_.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",_.NAME_CHAR="-"+_.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",_.CHAR_RE=new RegExp("^["+_.CHAR+"]$","u"),_.RESTRICTED_CHAR_RE=new RegExp("^["+_.RESTRICTED_CHAR+"]$","u"),_.S_RE=new RegExp("^["+_.S+"]+$","u"),_.NAME_START_CHAR_RE=new RegExp("^["+_.NAME_START_CHAR+"]$","u"),_.NAME_CHAR_RE=new RegExp("^["+_.NAME_CHAR+"]$","u"),_.NAME_RE=new RegExp("^["+_.NAME_START_CHAR+"]["+_.NAME_CHAR+"]*$","u"),_.NMTOKEN_RE=new RegExp("^["+_.NAME_CHAR+"]+$","u");function c(o){return o>=65&&o<=90||o>=97&&o<=122||o===58||o===95||o===8204||o===8205||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}_.S_LIST=[32,10,13,9],_.isChar=function(o){return o>=1&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},_.isRestrictedChar=function(o){return o>=1&&o<=8||o===11||o===12||o>=14&&o<=31||o>=127&&o<=132||o>=134&&o<=159},_.isCharAndNotRestricted=function(o){return o===9||o===10||o===13||o>31&&o<127||o===133||o>159&&o<=55295||o>=57344&&o<=65533||o>=65536&&o<=1114111},_.isS=function(o){return o===32||o===10||o===13||o===9},_.isNameStartChar=c,_.isNameChar=function(o){return c(o)||o>=48&&o<=57||o===45||o===46||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}],545:[function(n,x,_){function c(o){return o>=65&&o<=90||o===95||o>=97&&o<=122||o>=192&&o<=214||o>=216&&o<=246||o>=248&&o<=767||o>=880&&o<=893||o>=895&&o<=8191||o>=8204&&o<=8205||o>=8304&&o<=8591||o>=11264&&o<=12271||o>=12289&&o<=55295||o>=63744&&o<=64975||o>=65008&&o<=65533||o>=65536&&o<=983039}Object.defineProperty(_,"__esModule",{value:!0}),_.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",_.NC_NAME_CHAR="-"+_.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",_.NC_NAME_START_CHAR_RE=new RegExp("^["+_.NC_NAME_START_CHAR+"]$","u"),_.NC_NAME_CHAR_RE=new RegExp("^["+_.NC_NAME_CHAR+"]$","u"),_.NC_NAME_RE=new RegExp("^["+_.NC_NAME_START_CHAR+"]["+_.NC_NAME_CHAR+"]*$","u"),_.isNCNameStartChar=c,_.isNCNameChar=function(o){return c(o)||o===45||o===46||o>=48&&o<=57||o===183||o>=768&&o<=879||o>=8255&&o<=8256}},{}]},{},[15])(15)}))})(Ke)),Ke.exports}var Sr=xr();const pr=Gt.getDefaultExportFromCjs(Sr),mr=25.4/96;function kr(W){return(W<1?W*12:W*7+5)*mr}function br(W){const X=W/mr;return X<12?X/12:(X-5)/7}const gr=72/25.4,Er=32767,Mr=253;function We(W,X){if(typeof W!="string")return;if(W.length>Er)throw new Error(`Excel 单元格 ${X} 最多支持 32767 个字符,无法无损导出;内容未裁剪`);let n=0;for(let x=0;x<W.length;x++)if(W.charCodeAt(x)===10&&++n>Mr)throw new Error(`Excel 单元格 ${X} 最多支持 253 个换行,无法无损导出;内容未改写`)}function Pe(W){if(!W)return;const X=W.replace("#","");return/^[0-9a-fA-F]{6}$/.test(X)?`FF${X.toUpperCase()}`:void 0}function yr(W,X={}){W.font={name:X.fontFamily,bold:X.bold===!0,italic:X.italic===!0,underline:X.underline===!0,size:dr.resolveFontSize(X).fontSizePt,color:Pe(X.color)?{argb:Pe(X.color)}:void 0}}const qe={a3:{width:297,height:420,code:8},a4:{width:210,height:297,code:9},a5:{width:148,height:210,code:11}};function Cr(W,X,n,x){if(X&&X!=="auto")return qe[X].code;const _=Math.min(W.pageWidthMm,W.pageHeightMm),c=Math.max(W.pageWidthMm,W.pageHeightMm),o=Object.values(qe).find(a=>Math.abs(_-a.width)<=1&&Math.abs(c-a.height)<=1);return o?o.code:(x.push(`page ${n+1}: 自定义纸张 ${W.pageWidthMm}×${W.pageHeightMm}mm 无对应 Excel 纸型,打印设置回退 A4;可显式配置 paperSize`),qe.a4.code)}function Tr(W,X,n,x){const _=typeof X.text=="string"?X.text:"";if(n!=="raw"||!Object.prototype.hasOwnProperty.call(X,"value")){We(_,W.address),W.value=_;return}const c=X.value;if(c===null||typeof c=="string"||typeof c=="boolean"||typeof c=="number"&&Number.isFinite(c)){We(c,W.address),W.value=c,X.numberFormat&&(W.numFmt=X.numberFormat);return}We(_,W.address),W.value=_,x.push(`原始单元格值无效,已保留显示文本:${W.address}`)}function Ar(W){const n=W.components.filter(x=>x.table!==void 0)[0]?.table;if(!(!n||typeof n.id!="string"||!n.id.trim()||!Array.isArray(n.columnKeys)||!n.columnKeys.length)){for(const x of W.components){if(x.table){if(!x.grid||x.table.id!==n.id)return;continue}if(x.grid||x.kind!=="text"||x.richParagraphs?.length&&!x.text&&!x.lines?.length)return}return{id:n.id,title:n.title,wide:n.layout==="wide"||W.layout==="wide"}}}function Rr(W,X){const n=new Set;for(const[x,_]of W.pages.entries())if(!X[x])for(const c of _.components)typeof c.table?.id=="string"&&n.add(c.table.id);return n}function er(W){return W.layout==="wide"||W.components.some(X=>X.table?.layout==="wide")}function Or(W,X,n){const x=[],_=W.pages.map(Ar),c=Rr(W,_);for(const[o,a]of W.pages.entries()){const r=_[o],t=r&&!c.has(r.id),e=X==="pages"||!t?void 0:r;if(X==="continuous"&&!e)throw new Error(`page ${o+1}: continuous Excel 需要完整、单一的逻辑表来源;自由布局请使用 sheetMode: 'pages'`);const l=e!==void 0&&(X==="continuous"||e.wide);!l&&X!=="pages"&&er(a)&&n.push(`page ${o+1}: 混合或缺少逻辑表来源,已保留独立 Sheet,未猜测合并内容`);const i=x[x.length-1];l&&i?.continuous&&i.tableId===e.id?i.pages.push({page:a,index:o}):x.push({pages:[{page:a,index:o}],continuous:l,...l?{tableId:e.id,title:e.title}:{}})}return x}function or(W,X,n){return!W||W.length===X.length&&W.every((x,_)=>n(x,X[_]))}function jr(W,X,n,x){const _=W.table,c=X.columns.map(r=>r.size),o=or(x.keys,_.columnKeys,(r,t)=>r===t),a=or(x.widths,c,(r,t)=>Math.abs(r-t)<=.001);if(_.columnKeys.length!==c.length||!o||!a)throw new Error(`page ${n+1}: 连续 Excel 逻辑表 ${_.id} 的列结构或列宽不一致`);if(x.keys??=_.columnKeys,x.widths??=c,_.role==="header"){if(_.rowIndex!==-1)throw new Error(`page ${n+1}: 连续 Excel 表头 rowIndex 必须为 -1`);x.headerSeen=!0}else{if(!["body","group-header","subtotal","grand-total"].includes(_.role)||_.rowIndex!==x.expectedRow)throw new Error(`page ${n+1}: 连续 Excel 逻辑行来源不连续或重复(期望 ${x.expectedRow})`);x.expectedRow+=X.rows.length}if(X.cells.some(r=>r.cell.children?.length))throw new Error(`page ${n+1}: 连续 Excel 暂不支持嵌套组件;请使用独立 Sheet 导出并检查告警`)}function Ir(W,X){const n={expectedRow:0,headerSeen:!1};for(const{page:x,index:_}of W.pages)for(const c of x.components){const o=X.get(c);c.table&&o&&jr(c,o,_,n)}if(!n.headerSeen)throw new Error("连续 Excel 逻辑表缺少明确表头来源")}function Nr(W,X,n){let x=(W?.replace(/[\\/*?:[\]]/g," ").replace(/\s+/g," ").trim()||`Sheet${X+1}`).slice(0,31).replace(/^'+|'+$/g,"").trim()||`Sheet${X+1}`;x.toLowerCase()==="history"&&(x+=" 报表");let _=x,c=1;for(;n.has(_.toLowerCase());){const o=` (${++c})`;_=x.slice(0,31-o.length)+o}return n.add(_.toLowerCase()),_}function Pr(W){const X=new Set;function n(x,_,c,o){return x<=_?x:(X.has(c)||(W.push(o),X.add(c)),_)}return{column:x=>n(x,255,"column","Excel 单列宽度上限为 255 字符,超宽列已收敛至 255;单元格值完整保留,显示范围可能受限"),row:x=>n(x,409,"row","Excel 行高上限为 409pt,超高行已收敛至 409pt;单元格值完整保留,显示范围可能受限")}}function Br(W){const X=W.pages.flatMap(({page:c,index:o})=>c.components.map(a=>({comp:a,pageIndex:o}))),n=new Map;let x=1,_=0;for(const{comp:c}of X)if(c.grid){const o=ve.resolveGridLayout(c.grid,c.widthMm,c.heightMm);n.set(c,o),x=Math.max(x,o.columns.length)}else c.kind==="text"&&(_=Math.max(_,c.widthMm));if(x>16384)throw new Error("Excel 最多支持 16384 列,无法无损导出此报表");return{components:X,grids:n,columnCount:x,textWidthMm:_}}function Dr(W,X,n){const{page:x,index:_}=W.pages[0],c=X!==void 0&&X!=="auto";return(W.continuous||er(x))&&!c?{}:{pageSetup:{paperSize:Cr(x,X,_,n),orientation:x.pageWidthMm>x.pageHeightMm?"landscape":"portrait",fitToPage:!0,...W.continuous?{fitToWidth:1,fitToHeight:0}:{}}}}function Fr(W){const X=Pe(W.borderColor??W.lineColor),n={style:"thin",...X?{color:{argb:X}}:{}};return{...W.borderTop!==!1?{top:n}:{},...W.borderLeft!==!1?{left:n}:{},...W.borderBottom!==!1?{bottom:n}:{},...W.borderRight!==!1?{right:n}:{}}}function Lr(W,X){W.alignment={horizontal:X.align??"left",vertical:X.verticalAlign??"middle",wrapText:!0};const n=Pe(X.backgroundColor);n&&(W.fill={type:"pattern",pattern:"solid",fgColor:{argb:n}}),W.border=Fr(X),yr(W,X)}function zr(W,X,n){for(const[x,_]of X.columns.entries()){const c=W.sheet.getColumn(x+1),o=W.limits.column(br(_.size));(c.width==null||c.width<o)&&(c.width=o)}for(const[x,_]of X.rows.entries()){const c=W.sheet.getRow(n+x),o=W.limits.row(_.size*gr);(c.height==null||c.height<o)&&(c.height=o)}}function Ur(W,X,n,x){const _=Math.max(1,Math.min(X.cell.colSpan??1,n.columns.length-X.ci)),c=Math.max(1,Math.min(X.cell.rowSpan??1,n.rows.length-X.ri));(_>1||c>1)&&W.mergeCells(x+X.ri,X.ci+1,x+X.ri+c-1,X.ci+_)}function $r(W,X,n,x,_){if(x+n.rows.length-1>1048576)throw new Error("Excel 最多支持 1048576 行,无法无损导出此报表");zr(W,n,x);for(const c of n.cells){const o=W.sheet.getCell(x+c.ri,c.ci+1);Tr(o,c.cell,W.valueMode,W.warnings),c.cell.children?.length&&W.warnings.push(`page ${_+1} ${X.nid??X.kind} cell ${c.ri+1}:${c.ci+1}: 嵌套组件内容暂不支持 xlsx 导出,已跳过`),Lr(o,dr.mergeComponentStyles(X.style,c.cell.style)),Ur(W.sheet,c,n,x)}return x+n.rows.length}function Hr(W,X,n,x,_){const c=Array.isArray(X.lines)&&X.lines.length>0?X.lines.join(`
30
- `):X.text??"";if(X.richParagraphs?.length){const t=c.length===0?"富文本内容暂不支持 xlsx 导出,已跳过":"富文本按已有文本回退导出,内联样式未保留";W.warnings.push(`page ${_+1} ${X.nid??X.kind}: ${t}`)}const o=W.sheet.getRow(n),a=o.getCell(1);We(c,a.address),a.value=c,a.alignment={horizontal:X.style?.align??"left",vertical:X.style?.verticalAlign??"middle",wrapText:!0};const r=Pe(X.style?.backgroundColor);return r&&(a.fill={type:"pattern",pattern:"solid",fgColor:{argb:r}}),yr(a,X.style),x>1&&W.sheet.mergeCells(n,1,n,x),o.height=W.limits.row(X.heightMm*gr),n+1}function Vr(W,X,n){const x=X+n-1;W.views=[{state:"frozen",ySplit:x,xSplit:0}],W.pageSetup.printTitlesRow=`1:${x}`}function Wr(W,X,n){!X.grids.size&&X.textWidthMm>0&&(W.sheet.getColumn(1).width=W.limits.column(br(X.textWidthMm)));let x=1,_=!1;for(const{comp:c,pageIndex:o}of X.components){const a=n&&c.table?.role==="header";if(a&&_)continue;if(x>1048576)throw new Error("Excel 最多支持 1048576 行,无法无损导出此报表");const r=X.grids.get(c);r?(a&&(Vr(W.sheet,x,r.rows.length),_=!0),x=$r(W,c,r,x,o)):c.kind==="text"?x=Hr(W,c,x,X.columnCount,o):W.warnings.push(`page ${o+1} ${c.nid??c.kind}: 组件类型 ${c.kind} 暂不支持 xlsx 导出,已跳过`)}}function qr(W){if(W.valueMode!==void 0&&W.valueMode!=="text"&&W.valueMode!=="raw")throw new Error("xlsx valueMode 必须是 text 或 raw");if(W.paperSize!==void 0&&W.paperSize!=="auto"&&!Object.prototype.hasOwnProperty.call(qe,W.paperSize))throw new Error("xlsx paperSize 必须是 auto、a3、a4 或 a5");if(W.sheetMode!==void 0&&!["auto","pages","continuous"].includes(W.sheetMode))throw new Error("xlsx sheetMode 必须是 auto、pages 或 continuous")}async function Xr(W,X={}){qr(X),ve.assertOutputActive(X.signal);const n=vr.reportOutputDiagnostics(W,"xlsx",X),x=new pr.Workbook,_=[],c=Pr(_),o=Or(W,X.sheetMode,_),a=new Set;for(const[t,e]of o.entries()){const l=Br(e);e.continuous&&Ir(e,l.grids);const i=e.pages[0].page,s=X.sheetName?.(t)??Nr(e.title,t,a);a.add(s.toLowerCase());const f=x.addWorksheet(s,Dr(e,X.paperSize,_)),h=X.valueMode??(er(i)||e.continuous?"raw":"text");ve.assertOutputActive(X.signal),Wr({sheet:f,warnings:_,limits:c,valueMode:h},l,e.continuous),await ve.outputCheckpoint(X,t+1,o.length)}ve.assertOutputActive(X.signal);const r=await x.xlsx.writeBuffer();return ve.assertOutputActive(X.signal),{workbook:x,buffer:r,warnings:_,diagnostics:n}}function Qe(W){let X="";for(let n=W;n>0;n=Math.floor((n-1)/26))X=String.fromCharCode(65+(n-1)%26)+X;return X}function Ze(W){return`${Qe(W.left)}${W.top}:${Qe(W.right)}${W.bottom}`}function ar(W){let X=0;for(const n of W.toUpperCase())X=X*26+n.charCodeAt(0)-64;return X}function xe(W){if(typeof W!="string")throw new Error("Excel 范围应为 A1:B20 格式的字符串");const X=/^\$?([A-Z]{1,3})\$?([1-9]\d{0,6})(?::\$?([A-Z]{1,3})\$?([1-9]\d{0,6}))?$/i.exec(W.trim());if(!X)throw new Error(`Excel 范围无效:${W}`);const n={left:ar(X[1]),top:Number(X[2]),right:ar(X[3]??X[1]),bottom:Number(X[4]??X[2])};if(n.right<n.left||n.bottom<n.top||n.right>16384||n.bottom>1048576)throw new Error(`Excel 范围超出边界或顺序无效:${W}`);return n}function Zr(W,X){if(X!==void 0)return xe(X);const n=W.model.rows??[];if(!n.length)return{top:1,left:1,bottom:1,right:1};const x={top:1/0,left:1/0,bottom:1,right:1};for(const _ of n)x.top=Math.min(x.top,_.number),x.bottom=Math.max(x.bottom,_.number),x.left=Math.min(x.left,_.min||1),x.right=Math.max(x.right,_.max||1);return x}function Gr(W,X,n){const x=W.bottom-W.top+1,_=W.right-W.left+1;if(x>X.limits.maxRows||_>X.limits.maxColumns||x*_>n)throw new Error(`Excel 范围 ${Ze(W)} 超过导入行、列或单元格上限;请用 sheets/range 缩小范围`);return x*_}function Kr(W,X){return W.top<=X.bottom&&W.bottom>=X.top&&W.left<=X.right&&W.right>=X.left}function Yr(W,X){const n=[];for(const x of W.model.merges){const _=xe(x);if(Kr(X,_)){if(_.left<X.left||_.right>X.right||_.top<X.top||_.bottom>X.bottom)throw new Error(`${W.name}: 范围 ${Ze(X)} 截断合并单元格 ${x},请包含完整合并区域`);n.push(_)}}return n}function Jr(W,X){const n=new Map;for(const _ of X)n.set(_.top,Math.max(n.get(_.top)??_.top,_.bottom));const x=[];for(let _=W.top;_<=W.bottom;){let c=n.get(_)??_;for(let o=_;o<=c;o++)c=Math.max(c,n.get(o)??o);x.push({top:_,bottom:c}),_=c+1}return x}function Qr(W,X,n,x){const _=[];let c,o=0;for(const a of W){const r=a.bottom-a.top+1;if(r>200)throw new Error("合并单元格跨越超过 200 行,无法安全分段;请先缩小或拆分该合并区域");let t=0;for(let l=a.top;l<=a.bottom;l++)t+=x(l);if(t>n&&Number.isFinite(n))throw new Error("合并区域或单行高度超过标准纸张可用高度;请使用 wide 或调整原模板行高");const e=c?a.bottom-c.top+1:r;c&&(e>X||o+t>n)&&(_.push(c),c=void 0,o=0),c?c.bottom=a.bottom:c={...a},o+=t}return c&&_.push(c),_}function tn(W){const X=new Map,n=new Set;for(const x of W){X.set(`${x.top}:${x.left}`,x);for(let _=x.top;_<=x.bottom;_++)for(let c=x.left;c<=x.right;c++)(_!==x.top||c!==x.left)&&n.add(`${_}:${c}`)}return{masters:X,covered:n}}function Ve(W,X){return new RegExp(`\\b${X}\\s*=\\s*["']([^"']*)["']`,"i").exec(W)?.[1]}function lr(W,X){const n=xe(W);if(n.bottom>X.limits.maxRows||n.right>X.limits.maxColumns)throw new Error(`Excel 源文件坐标 ${W} 超过加载行列上限;请先裁剪工作簿或显式提高 limits`)}function en(W,X,n){const x=/^<(?:\w+:)?(\w+)\b/.exec(W)?.[1];if(x==="c"){const _=Ve(W,"r");if(_&&lr(_,X),++n.cells>1e6)throw new Error("Excel 源文件超过 100 万个单元格的加载上限,请先裁剪工作簿")}else if(x==="row"){if(++n.rows>1e6)throw new Error("Excel 源文件超过 100 万行的加载上限,请先裁剪工作簿");const _=Ve(W,"r");if(_&&(!/^\d+$/.test(_)||Number(_)<1||Number(_)>X.limits.maxRows))throw new Error("Excel 源文件行坐标超过加载上限,请先裁剪工作簿或提高 limits.maxRows")}else if(x==="mergeCell"){const _=Ve(W,"ref");if(!_)throw new Error("Excel 合并单元格缺少范围");lr(_,X);const c=xe(_),o=(c.bottom-c.top+1)*(c.right-c.left+1);if(n.mergedCells+=o,c.bottom-c.top+1>200||n.mergedCells>1e6)throw new Error("Excel 合并区域超过安全加载上限,请先拆分合并区域")}else if(x==="dimension"){const _=Ve(W,"ref");_&&xe(_)}}function rn(W,X,n,x,_){let c="";return(o,a=!1)=>{if(c+=o,/<!DOCTYPE|<!ENTITY/i.test(c))throw new Error("Excel XML 不允许外部实体或 DTD");const r=/<[^>]*>/g;let t,e=0;for(;t=r.exec(c);){if(n&&en(t[0],W,X),x&&/^<(?:\w+:)?xf\b/.test(t[0])&&++X.styles>131072)throw new Error("Excel 样式数量超过安全加载上限");if(_&&/^<(?:\w+:)?si\b/.test(t[0])&&++X.strings>1e6)throw new Error("Excel 共享字符串数量超过安全加载上限");e=r.lastIndex}const l=c.lastIndexOf("<");if(c=l>=e?c.slice(l):"",c.length>65536)throw new Error("Excel XML 标签长度异常");if(a&&c)throw new Error("Excel XML 标签不完整")}}function nn(W,X){const n=W.slice(X.start,X.start+X.compressed),x=new Blob([n.buffer]).stream();if(X.method===0)return x;try{return x.pipeThrough(new DecompressionStream("deflate-raw"))}catch{throw new Error("当前环境不支持安全 Excel 解压;请使用支持 DecompressionStream deflate-raw 的现代浏览器或 Node.js 22+")}}async function sn(W,X,n){let x=0;const _={cells:0,rows:0,mergedCells:0,styles:0,strings:0};if(X.filter(o=>/^xl\/worksheets\/[^/]+\.xml$/i.test(o.name)).length>n.limits.maxSheets)throw new Error("Excel 工作表数量超过导入上限");for(const o of X){const a=nn(W,o).getReader(),r=/^xl\/worksheets\/[^/]+\.xml$/i.test(o.name),t=/\.xml$/i.test(o.name)?rn(n,_,r,o.name==="xl/styles.xml",o.name==="xl/sharedStrings.xml"):void 0,e=t?new TextDecoder("utf-8",{fatal:!0}):void 0;try{for(;;){const l=await a.read();if(l.done)break;if(x+=l.value.byteLength,x>n.limits.maxUncompressedBytes)throw new Error("Excel 实际解压内容超过导入大小上限");t&&e&&t(e.decode(l.value,{stream:!0}))}t&&e&&t(e.decode(),!0)}finally{await a.cancel().catch(()=>{}),a.releaseLock()}}}const on=101010256,an=33639248,ln=67324752;async function un(W,X){if(W instanceof Uint8Array){if(W.byteLength>X)throw new Error("Excel 文件超过导入大小上限");return new Uint8Array(W)}if(W instanceof ArrayBuffer){if(W.byteLength>X)throw new Error("Excel 文件超过导入大小上限");return new Uint8Array(W.slice(0))}if(typeof Blob<"u"&&W instanceof Blob){if(W.size>X)throw new Error("Excel 文件超过导入大小上限");return new Uint8Array(await W.arrayBuffer())}throw new Error("Excel 导入需要 ArrayBuffer、Uint8Array 或 Blob")}function fn(W){const X=Math.max(0,W.byteLength-65557);for(let n=W.byteLength-22;n>=X;n--)if(W.getUint32(n,!0)===on&&n+22+W.getUint16(n+20,!0)===W.byteLength)return n;throw new Error("Excel 文件不是完整的 .xlsx ZIP 文件")}function cn(W,X){const n=W.getUint16(X+10,!0),x=W.getUint32(X+16,!0),_=W.getUint32(X+12,!0);if(W.getUint16(X+4,!0)+W.getUint16(X+6,!0)||W.getUint16(X+8,!0)!==n||n===65535||x===4294967295||_===4294967295)throw new Error("不支持分卷或 ZIP64 Excel 文件");if(n<1||n>2048||x+_!==X)throw new Error("Excel ZIP 目录无效或条目过多");return{start:x,size:_,entries:n}}function hn(W,X,n,x,_){if(n+46>x||X.getUint32(n,!0)!==an)throw new Error("Excel ZIP 条目无效");const c=X.getUint16(n+8,!0),o=X.getUint16(n+10,!0),a=X.getUint16(n+28,!0),r=n+46+a+X.getUint16(n+30,!0)+X.getUint16(n+32,!0),t=X.getUint32(n+42,!0),e=X.getUint32(n+20,!0),l=X.getUint32(n+24,!0);if(r>x||t+30>W.length||c&1||![0,8].includes(o))throw new Error("Excel ZIP 包含无效、加密或不支持的条目");if(l===4294967295||e===4294967295||X.getUint32(t,!0)!==ln)throw new Error("Excel ZIP 本地条目无效");const i=t+30+X.getUint16(t+26,!0)+X.getUint16(t+28,!0);if(i+e>_||X.getUint16(t+8,!0)!==o||X.getUint16(t+6,!0)!==c)throw new Error("Excel ZIP 数据边界或压缩方式无效");const s=new TextDecoder().decode(W.subarray(n+46,n+46+a));if(s.includes("\\")||s.split("/").includes("..")||s.startsWith("/"))throw new Error("Excel ZIP 包含不安全路径");return{name:s,next:r,size:l,start:i,compressed:e,method:o}}function dn(W,X){/^xl\/(charts|media|drawings)\//.test(W)&&X.add("Excel 中的图表、图片与绘图对象暂不导入,仅保留单元格版式"),/^xl\/pivot/.test(W)&&X.add("Excel 透视表仅导入已保存的单元格结果,不提供交互或重算"),/^xl\/externalLinks\//.test(W)&&X.add("Excel 外部链接不会访问或刷新,仅使用文件内已保存的结果"),/vbaProject|activeX|embeddings/i.test(W)&&X.add("Excel 宏、控件与嵌入对象不会执行或导入")}async function pn(W,X,n){const x=await un(W,X.limits.maxFileBytes),_=new DataView(x.buffer,x.byteOffset,x.byteLength);if(x.length<22)throw new Error("Excel 文件为空或格式无效;仅支持 .xlsx");const c=cn(_,fn(_));let o=c.start,a=0;const r=new Set,t=[];for(let e=0;e<c.entries;e++){const l=hn(x,_,o,c.start+c.size,c.start);if(r.has(l.name))throw new Error("Excel ZIP 条目名称重复");if(r.add(l.name),a+=l.size,a>X.limits.maxUncompressedBytes)throw new Error("Excel 解压后内容超过导入大小上限");dn(l.name,n),t.push(l),o=l.next}if(o!==c.start+c.size||!r.has("xl/workbook.xml")||!r.has("[Content_Types].xml"))throw new Error("文件不是受支持的 .xlsx 工作簿");return await sn(x,t,X),x}const mn=864e5;function Ie(W,X=2){return String(W).padStart(X,"0")}function bn(W,X,n){const x=[],_=X.replace(/"([^"]*)"|\\(.)/g,(a,r,t)=>(x.push(r??t??""),`${x.length-1}`)).replace(/\[\$[^\]]*\]/g,"");if(/\[|ddd|mmm|AM\/PM/i.test(_))return n(),W.toISOString().replace("T"," ").replace(/\.000Z$/,"");let c=!1;return _.replace(/yyyy|yy|mm|m|dd|d|hh|h|ss|s/gi,(a,r)=>{const t=a.toLowerCase();if(t.startsWith("y"))return t.length===2?Ie(W.getUTCFullYear()%100):String(W.getUTCFullYear());if(t.startsWith("d"))return Ie(W.getUTCDate(),t.length);if(t.startsWith("h"))return c=!0,Ie(W.getUTCHours(),t.length);if(t.startsWith("s"))return Ie(W.getUTCSeconds(),t.length);const e=c||/^\s*:\s*s/i.test(_.slice(r+a.length));return Ie(e?W.getUTCMinutes():W.getUTCMonth()+1,t.length)}).replace(/\uE000(\d+)\uE000/g,(a,r)=>x[Number(r)]??"")}function gn(W,X,n){if(W==null)return{text:"",value:null};if(W instanceof Date)return Number.isFinite(W.getTime())?{text:bn(W,X||"yyyy-mm-dd",n),value:W.getTime()/mn+25569}:(n(),{text:"",value:null});if(typeof W=="number")return Number.isFinite(W)?{text:_r.formatExcelNumber(W,X,n),value:W}:(n(),{text:String(W),value:null});if(typeof W=="boolean")return{text:W?"TRUE":"FALSE",value:W};if(typeof W=="string")return{text:W,value:W};if("error"in W)return{text:W.error,value:W.error};if("richText"in W){const x=W.richText.map(_=>_.text).join("");return{text:x,value:x}}return"text"in W?{text:String(W.text),value:String(W.text)}:(n(),{text:"",value:null})}function yn(W,X){const n=(X??"").replace(/"[^"]*"|\\.|\[[^\]]*\]/g,"");return typeof W=="number"||W===null&&/[0#?]/.test(n)?"number":typeof W=="boolean"?"boolean":"text"}function vn(W,X,n,x,_){let c;try{c=X.formula}catch{_.add(`${x}: 部分共享公式无法展开,仅保留缓存结果`)}Object.assign(W,{editable:!1,...c?{formula:c}:{}}),_.add(`${x}: 公式使用 Excel 已保存的计算结果并保持只读;修改其他单元格不会自动重算公式`),n==null&&_.add(`${x}: 存在没有缓存结果的公式,显示为空;请先在 Excel 中计算并保存`)}function wn(W,X,n,x){const _=W.numFmt,c=()=>x.add(`${n}: 存在无法完整还原的自定义数字或日期格式,已保留原值和 numberFormat`),o=W.value,a=o&&typeof o=="object"&&("formula"in o||"sharedFormula"in o),r=a?W.result:o,t=gn(r,_,c),e={...t,editable:!0,..._?{numberFormat:_}:{}};return e.valueType=yn(t.value,_),r instanceof Date&&(Object.assign(e,{editable:!1}),x.add(`${n}: 日期单元格保留 Excel 日期序列与格式,目前在预览中保持只读`),X&&x.add(`${n}: 1904 日期系统已统一转换为 1900 日期系统,保留相同日历日期`)),a&&vn(e,W,r,n,x),o&&typeof o=="object"&&"richText"in o&&x.add(`${n}: 单元格内混合字体已合并为纯文本,保留单元格级样式`),typeof e.text=="string"&&/\{\{[^}]+\}\}/.test(e.text)&&x.add(`${n}: {{字段}} 占位符按原文导入;动态业务数据需显式绑定,不会自动推断接口字段`),e}const ur=["FFFFFF","000000","E7E6E6","44546A","4472C4","ED7D31","A5A5A5","FFC000","5B9BD5","70AD47","0563C1","954F72"],_n=["000000","FFFFFF","FF0000","00FF00","0000FF","FFFF00","FF00FF","00FFFF"],xn={hair:.25,dotted:.5,dashed:.5,thin:.5,medium:1,thick:1.5,double:1};function Sn(W){const X=W.model,n=/<(?:\w+:)?clrScheme\b[^>]*>([\s\S]*?)<\/(?:\w+:)?clrScheme>/.exec(X.themes?.theme1??"");if(!n)return ur;const x=[...n[1].matchAll(/<(?:\w+:)?(?:srgbClr|sysClr)\b[^>]*(?:val|lastClr)="([A-Fa-f0-9]{6})"[^>]*\/?\s*>/g)].map(_=>_[1].toUpperCase());return x.length<12?ur:[x[1],x[0],x[3],x[2],...x.slice(4,12)]}function Ye(W,X=0){return`#${[0,2,4].map(n=>{const x=Number.parseInt(W.slice(n,n+2),16),_=X<0?x*(1+X):x*(1-X)+255*X;return Math.max(0,Math.min(255,Math.round(_))).toString(16).padStart(2,"0")}).join("").toUpperCase()}`}function Ne(W,X){if(!W)return;const n=W.argb;if(n&&/^[A-Fa-f\d]{6,8}$/.test(n))return Ye(n.slice(-6),W.tint);if(W.theme!==void 0)return Ye(X[W.theme]??"000000",W.tint);if(W.indexed!==void 0&&W.indexed<16)return Ye(_n[W.indexed%8],W.tint)}function kn(W,X,n,x){const _=[X.top,X.right,X.bottom,X.left],c=_.map(a=>!!a?.style);[W.borderTop,W.borderRight,W.borderBottom,W.borderLeft]=c;const o=_.filter(a=>a?.style);o.length&&(W.borderColor=Ne(o[0]?.color,n)??"#000000",W.lineWidthPt=xn[o[0].style]??.5,o.some(a=>a.style!=="thin"&&a.style!=="medium"&&a.style!=="thick")&&x(),o.some(a=>Ne(a.color,n)!==Ne(o[0].color,n)||a.style!==o[0].style)&&x(),X.diagonal?.style&&x())}function En(W,X,n){const x=X.horizontal;x&&["left","center","right","justify"].includes(x)?W.align=x:x&&n(),X.vertical&&(W.verticalAlign=X.vertical==="distributed"||X.vertical==="justify"?"middle":X.vertical),(X.textRotation||X.shrinkToFit||X.indent||X.readingOrder)&&n()}function Mn(W,X,n,x){const _=W.style,c=_.font??{},o={align:"left",verticalAlign:"bottom",fontFamily:c.name||"Calibri",fontSize:c.size||11};c.bold!==void 0&&(o.bold=c.bold),c.italic!==void 0&&(o.italic=c.italic),c.underline!==void 0&&(o.underline=!!c.underline);const a=Ne(c.color,X);a&&(o.color=a);const r=_.fill;if(r?.type==="pattern"&&r.pattern==="solid"){const t=Ne(r.fgColor,X);t&&(o.backgroundColor=t)}else r&&!(r.type==="pattern"&&r.pattern==="none")&&x.add(`${n}: 渐变或图案填充暂不支持,保留单元格内容`);return kn(o,_.border??{},X,()=>x.add(`${n}: 多种边线颜色、虚线、双线或对角线按单元格统一实线近似呈现`)),_.alignment&&En(o,_.alignment,()=>x.add(`${n}: 部分旋转、缩进、收缩或分散对齐样式暂不支持`)),(c.strike||c.vertAlign)&&x.add(`${n}: 删除线、上标或下标暂不支持`),o}function Cn(W,X,n,x=1){const _=new WeakMap;return c=>{let o=_.get(c.style);if(!o){const e=Mn(c,W,X,n);e.fontSize=(e.fontSize??11)*x,o=c.alignment?.horizontal?{left:e,center:e,right:e}:{left:e,center:{...e,align:"center"},right:{...e,align:"right"}},_.set(c.style,o)}const a=c.value,r=a&&typeof a=="object"&&("formula"in a||"sharedFormula"in a)?c.result:a,t=r==null&&/[0#?]/.test((c.numFmt??"").replace(/"[^"]*"|\\.|\[[^\]]*\]/g,""));return typeof r=="boolean"?o.center:typeof r=="number"||r instanceof Date||t?o.right:o.left}}const tr={maxFileBytes:20*1024*1024,maxUncompressedBytes:64*1024*1024,maxCells:25e4,maxRows:1e5,maxColumns:2048,maxSheets:32},fr={...tr,maxCells:1e6,maxRows:1048576,maxColumns:16384};function Tn(W){const X=W.layout??"wide";if(!["wide","a3","a4"].includes(X))throw new Error("Excel 导入 layout 仅支持 wide、a3、a4");if(W.landscape!==void 0&&typeof W.landscape!="boolean")throw new Error("landscape 应为布尔值");const n=W.maxRowsPerPage??80;if(!Number.isInteger(n)||n<1||n>200)throw new Error("maxRowsPerPage 应为 1 到 200 的整数");const x={...tr};for(const _ of Object.keys(tr)){const c=W.limits?.[_];if(c!==void 0){if(!Number.isInteger(c)||c<1||c>fr[_])throw new Error(`${_} 应为 1 到 ${fr[_]} 的整数`);x[_]=c}}return{layout:X,landscape:W.landscape??!0,maxRowsPerPage:n,limits:x}}class An{constructor(){this.messages=new Set,this.overflow=!1}add(X){this.messages.size<200?this.messages.add(X):this.messages.has(X)||(this.overflow=!0)}result(){return[...this.messages,...this.overflow?["其余导入告警已合并;请缩小范围进一步检查"]:[]]}}const Rn=25.4/72;function On(W,X){if(X.sheets===void 0)return W.worksheets.filter(x=>x.state==="visible");if(!Array.isArray(X.sheets)||X.sheets.length===0)throw new Error("sheets 应为非空的工作表名称或一基位置数组");const n=[];for(const x of X.sheets){const _=typeof x=="string"?W.getWorksheet(x):Number.isInteger(x)&&x>0?W.worksheets[x-1]:void 0;if(!_)throw new Error(`Excel 工作表不存在:${String(x)}`);if(n.includes(_))throw new Error(`Excel 工作表选择重复:${_.name}`);n.push(_)}return n}function jn(W,X){if(typeof W.range=="string")return W.range;if(W.range!==void 0){if(W.range===null||typeof W.range!="object"||Array.isArray(W.range))throw new Error("range 应为 A1 范围或以工作表名为键的范围对象");return Object.prototype.hasOwnProperty.call(W.range,X)?W.range[X]:void 0}}function cr(W,X,n){if(!Number.isFinite(W)||W<0||W>n)throw new Error(`${X} 无效或超过尺寸上限`);return Math.max(.01,W)}function In(W,X,n,x){const _=[];for(let f=X.left;f<=X.right;f++){const h=W.getColumn(f);h.hidden&&x.add(`${W.name}: 隐藏行列按隐藏尺寸保留;需要编辑时请先在 Excel 中取消隐藏`);const u=h.width??W.properties.defaultColWidth??8.43;_.push(cr(h.hidden||u===0?.01:kr(u),"Excel 列宽",2e3))}const c=_.reduce((f,h)=>f+h,0),o=n.layout==="wide",a=n.layout==="a3"?[297,420]:[210,297],r=o?c:a[n.landscape?1:0],t=o?297:a[n.landscape?0:1],e=o?0:10,l=r-2*e,i=o?1:l/c;!o&&i<.5&&x.add(`${W.name}: 标准纸张列宽压缩较大;完整宽表建议使用 layout: 'wide'`);const s=f=>{const h=W.getRow(f);return h.hidden&&x.add(`${W.name}: 隐藏行列按隐藏尺寸保留;需要编辑时请先在 Excel 中取消隐藏`),cr(h.hidden?.01:(h.height??W.properties.defaultRowHeight??15)*Rn*i,"Excel 行高",1e3)};return{width:l,pageWidth:r,pageHeight:t,margin:e,scale:i,columns:_.map(f=>f*i),rowHeight:s}}function Nn(W,X){const{sheet:n,range:x,merges:_,style:c,date1904:o,warnings:a}=W,r=[];for(let t=X.top;t<=X.bottom;t++){const e=[];for(let l=x.left;l<=x.right;l++){const i=`${t}:${l}`;if(_.covered.has(i))continue;const s=n.getCell(t,l),f=wn(s,o,n.name,a);n.sheetProtection?.sheet===!0&&s.protection?.locked!==!1&&(f.editable=!1),f.style=c(s);const u=_.masters.get(i);u&&(f.colSpan=u.right-u.left+1,f.rowSpan=u.bottom-u.top+1),e.push(f)}r.push(e)}return r}function hr(W,X,n,x){const{geometry:_,range:c,sheet:o,options:a}=W,r=Array.from({length:X.bottom-X.top+1},(t,e)=>_.rowHeight(X.top+e));return{kind:"rect",leftMm:_.margin,topMm:n,widthMm:_.width,heightMm:r.reduce((t,e)=>t+e,0),nid:`xlsx:${W.tableId}:${X.top}`,grid:{cells:Nn(W,X),colWidthsMm:_.columns,rowHeightsMm:r,paddingMm:.25*_.scale},table:{id:W.tableId,role:x?"header":"body",rowIndex:x?-1:X.top-W.headerBottom-1,columnKeys:Array.from({length:c.right-c.left+1},(t,e)=>Qe(c.left+e)),title:o.name,layout:a.layout==="wide"?"wide":"page"},meta:{xlsxSheet:o.name,xlsxRange:Ze({...c,top:X.top,bottom:X.bottom})}}}function Pn(W,X){const{geometry:n,options:x,range:_,headerBottom:c}=W,o=[];let a=n.margin;if(X.top===_.top){const t=hr(W,{top:X.top,bottom:c},a,!0);o.push(t),a+=t.heightMm}const r=Math.max(X.top,c+1);return r<=X.bottom&&o.push(hr(W,{top:r,bottom:X.bottom},a,!1)),{widthMm:n.pageWidth,heightMm:n.pageHeight,layout:x.layout==="wide"?"wide":"page",marginTopMm:n.margin,marginBottomMm:n.margin,marginLeftMm:n.margin,marginRightMm:n.margin,components:o}}function Bn(W,X){const n=W;W.state!=="visible"&&X.add(`${W.name}: 已按显式选择导入隐藏工作表`),W.sheetProtection?.sheet===!0&&X.add(`${W.name}: 已保留启用的工作表保护,锁定单元格在预览中保持只读`),n.conditionalFormattings?.length&&X.add(`${W.name}: 条件格式规则暂不执行,仅使用已保存的基础单元格样式`),W.autoFilter&&X.add(`${W.name}: Excel 筛选下拉与排序操作不导入,完整保留选区单元格`),Object.keys(n.dataValidations?.model??{}).length&&X.add(`${W.name}: Excel 数据验证与下拉输入规则不导入;业务校验应由宿主配置`)}function Dn(W,X,n,x,_,c){Bn(W,_);const o=Yr(W,X),a=Jr(X,o),r=In(W,X,x,_),t=X.right-X.left+1,e=Math.max(1,Math.min(x.maxRowsPerPage,Math.floor(1e4/t)));if(a.some(s=>(s.bottom-s.top+1)*t>Math.max(1e4,t)))throw new Error(`${W.name}: 跨行合并区域超过单段单元格预算,请缩小范围或拆分合并区域`);const l=Qr(a,e,x.layout==="wide"?1/0:r.pageHeight-r.margin*2,r.rowHeight),i={sheet:W,range:X,geometry:r,options:x,warnings:_,merges:tn(o),style:Cn(Sn(n),W.name,_,r.scale),date1904:n.properties.date1904===!0,tableId:`xlsx:${c}:${W.name}`,headerBottom:a[0].bottom};return l.map(s=>Pn(i,s))}async function Fn(W,X={}){ve.assertOutputActive(X.signal);const n=Tn(X),x=new An,_=await pn(W,n,x);ve.assertOutputActive(X.signal);const c=new pr.Workbook;try{await c.xlsx.load(_)}catch{throw new Error("Excel 文件解析失败;请确认它是未加密且完整的 .xlsx 文件")}if(ve.assertOutputActive(X.signal),c.worksheets.length>n.limits.maxSheets)throw new Error("Excel 工作表数量超过导入上限");const o=On(c,X);if(!o.length)throw new Error("Excel 中没有可导入的可见工作表;可通过 sheets 显式选择隐藏工作表");const a={schemaVersion:wr.RENDER_PLAN_SCHEMA_VERSION,pages:[]},r=[];let t=n.limits.maxCells;for(const e of o){const l=Zr(e,jn(X,e.name));t-=Gr(l,n,t);const i=c.worksheets.indexOf(e)+1,s=Dn(e,l,c,n,x,i);r.push({name:e.name,index:i,range:Ze(l),rowCount:l.bottom-l.top+1,columnCount:l.right-l.left+1,pageStart:a.pages.length,pageCount:s.length}),a.pages.push(...s),await ve.outputCheckpoint(X,r.length,o.length)}return{template:a,warnings:x.result(),sheets:r}}function Xe(W){return JSON.parse(JSON.stringify(W))}function Ln(W,X){const n=W.template.pages.slice(X.pageStart,X.pageStart+X.pageCount),x=n[0];if(!x)throw new Error(`工作表 ${X.name} 没有可绑定页面`);const _=new Map;let c=[];for(const o of n)for(const a of o.components){if(a.kind==="list"||!a.grid||a.meta?.xlsxSheet!==X.name)continue;const r=xe(String(a.meta.xlsxRange)),t=a.grid;c=t.colWidthsMm??[],t.cells.forEach((e,l)=>_.set(r.top+l,{cells:Xe(e),height:t.rowHeightsMm?.[l]??6}))}if(!c.length||!_.size)throw new Error(`工作表 ${X.name} 缺少导入几何元数据`);return{rows:_,widths:[...c],page:x,range:xe(X.range)}}function Je(W,X,n){const x=[],_=[];for(let c=X;c<=n;c++){const o=W.rows.get(c);if(!o)throw new Error(`导入模板缺少第 ${c} 行`);for(const a of o.cells)if(a&&c+(a.rowSpan??1)-1>n)throw new Error(`第 ${c} 行合并区域跨越绑定边界,请调整 header/detail 范围`);x.push(Xe(o.cells)),_.push(o.height)}return{cells:x,rowHeightsMm:_,colWidthsMm:W.widths,paddingMm:.25}}function zn(W,X){const n=xe(W.header),x=W.detail?xe(W.detail):{...X.range,top:n.bottom+1};for(const _ of[n,x])if(_.left!==X.range.left||_.right!==X.range.right||_.top<X.range.top||_.bottom>X.range.bottom||_.top>_.bottom)throw new Error("绑定区域必须位于导入选区内并覆盖其完整列宽");if(x.top!==n.bottom+1)throw new Error("detail 应紧接 header,避免静态内容被隐式删除");if(W.columns.length!==X.widths.length)throw new Error("columns 应逐列映射整个选区;不能自动猜测业务字段");return Un(X,[n.top,n.bottom+1,x.bottom+1]),{header:n,detail:x}}function Un(W,X){for(const[n,x]of W.rows)for(const _ of x.cells){const c=n+(_?.rowSpan??1);if(X.some(o=>n<o&&c>o))throw new Error(`第 ${n} 行合并区域跨越绑定边界,请调整 header/detail 范围`)}}function $n(W,X){const n=[];for(const x of ve.resolveGridLayout(W,X.reduce((_,c)=>_+c,0),100).cells)for(let _=x.ci;_<Math.min(X.length,x.ci+(x.cell.colSpan??1));_++)n[_]=x.cell;return n}function Hn(W,X,n,x){if(X)return X;const _=W?.numberFormat;if(!_||_==="General")return;const c=/^(#,##)?0(?:\.(0+))?(%)?$/.exec(_);if(c){const o=c[2]?.length??0;if(o<=100)return c[3]?{kind:"percent",digits:o}:{kind:"number",digits:o,...c[1]?{thousands:!0}:{}}}x.push(`${n}: Excel 数字格式 ${_} 未自动套用到动态数据,请在 columns 中显式声明 format`)}function Vn(W,X,n,x,_){const c=$n(X,x),o=ve.resolveGridLayout(n,x.reduce((e,l)=>e+l,0),20).cells;if(o.some(({cell:e})=>(e.colSpan??1)!==1||(e.rowSpan??1)!==1))throw new Error("动态明细样例行不能包含合并格;合并表头可以保留");const a=new Map(o.map(e=>[e.ci,e.cell])),r=new Set,t=W.columns.map((e,l)=>{const i=typeof e=="string"?{field:e}:e;if(!i||typeof i.field!="string"||!i.field.trim()||r.has(i.field))throw new Error(`columns[${l}] 需要唯一的非空 field`);r.add(i.field);const s=c[l]?.text??i.field,f=a.get(l),h=Hn(f,i.format,i.field,_);return{...i,...h?{format:h}:{},header:i.header??s,widthMm:x[l],style:{...f?.style,...i.style},...i.semanticRole&&!i.align?{align:"auto"}:{},...i.editable===void 0&&f?.editable===!1?{editable:!1}:{}}});return Wn(W,c,t),t}function Wn(W,X,n){const x=new Map;W.columns.forEach((_,c)=>{const o=X[c];if(!o||typeof _=="string")return;const a=x.get(o)??{style:{}};if(_.header!==void 0){if(a.text!==void 0&&a.text!==_.header)throw new Error("同一合并表头不能配置不同 header");a.text=_.header}qn(a.style,{..._.headerAlign?{align:_.headerAlign}:{},..._.headerStyle}),x.set(o,a)});for(const[_,c]of x)c.text!==void 0&&Object.assign(_,{text:c.text,rawText:c.text,value:c.text}),_.style={..._.style,...c.style},X.forEach((o,a)=>{o===_&&(c.text!==void 0&&(n[a].header=c.text),c.style.align!==void 0&&(n[a].headerAlign=c.style.align))})}function qn(W,X){for(const n of Object.keys(X))if(X[n]!==void 0){if(W[n]!==void 0&&W[n]!==X[n])throw new Error(`同一合并表头不能配置不同 ${n}`);Object.assign(W,{[n]:X[n]})}}function Xn(W,X){const n=W.page,x=X.rowHeightsMm.reduce((_,c)=>_+c,0);return{...n,heightMm:Math.max(n.heightMm,x+(n.marginTopMm??0)+(n.marginBottomMm??0)),components:[{kind:"rect",leftMm:n.marginLeftMm??0,topMm:n.marginTopMm??0,widthMm:W.widths.reduce((_,c)=>_+c,0),heightMm:x,grid:X}]}}function Zn(W,X,n,x){const _=Ln(W,X),{header:c,detail:o}=zn(n,_),a=Je(_,_.range.top,c.bottom),r=Je(_,o.top,o.top),t={..._.page,components:[]},e={kind:"list",id:`bound:${X.name}`,dataset:n.dataset??"detail",title:X.name,leftMm:t.marginLeftMm??0,topMm:t.marginTopMm??0,widthMm:_.widths.reduce((l,i)=>l+i,0),layout:t.layout??"page",headerGrid:a,columns:Vn(n,a,r,_.widths,x),rowHeightMm:r.rowHeightsMm[0],headerEveryPage:!0,align:"auto",paddingMm:.25,...n.rowKey?{rowKey:n.rowKey}:{},...n.revisionField?{revisionField:n.revisionField}:{},...n.sourceTokenField?{sourceTokenField:n.sourceTokenField}:{},...n.groupBy?{groupBy:n.groupBy}:{},...n.grandTotal===void 0?{}:{grandTotal:n.grandTotal}};return t.components.push(e),o.bottom===_.range.bottom?[t]:(x.push(`${X.name}: 明细区域后的静态内容保留为后续独立页面,不推断动态页脚定位`),[t,Xn(_,Je(_,o.bottom+1,_.range.bottom))])}function Gn(W,X){const n=ir.validateReportTemplate(W.template);if(!n.ok)throw new Error(`导入模板无效:${n.errors[0]?.message}`);if(!X.length)throw new Error("至少需要一个 Excel 业务绑定");const x=new Map;for(const r of X){if(!W.sheets.some(t=>t.name===r.sheet)||x.has(r.sheet))throw new Error(`绑定工作表不存在或重复:${r.sheet}`);x.set(r.sheet,r)}const _=[...W.warnings],c=W.sheets.flatMap(r=>{const t=x.get(r.name);return t?Zn(W,r,t,_):Xe(W.template.pages.slice(r.pageStart,r.pageStart+r.pageCount))}),o={...Xe(W.template),pages:c},a=ir.validateReportTemplate(o);if(!a.ok)throw new Error(`业务模板无效:${a.errors[0]?.path} ${a.errors[0]?.message}`);return{template:o,warnings:_}}exports.bindExcelTemplate=Gn;exports.importExcelTemplate=Fn;exports.renderPlanToXlsx=Xr;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./progress-BnLiS5eH.cjs"),m=require("./import-template-CpxunKVp.cjs"),T=require("./grid-geometry-CZ_cYB6O.cjs"),M=require("./style-UgIJSA1F.cjs"),$=require("./capabilities-DYzWL7KS.cjs"),u=require("./binding-preview-B5834rml.cjs"),S=72/25.4,z=32767,A=253;function w(t,e){if(typeof t!="string")return;if(t.length>z)throw new Error(`Excel 单元格 ${e} 最多支持 32767 个字符,无法无损导出;内容未裁剪`);let o=0;for(let n=0;n<t.length;n++)if(t.charCodeAt(n)===10&&++o>A)throw new Error(`Excel 单元格 ${e} 最多支持 253 个换行,无法无损导出;内容未改写`)}function p(t){if(!t)return;const e=t.replace("#","");return/^[0-9a-fA-F]{6}$/.test(e)?`FF${e.toUpperCase()}`:void 0}function C(t,e={}){t.font={name:e.fontFamily,bold:e.bold===!0,italic:e.italic===!0,underline:e.underline===!0,size:M.resolveFontSize(e).fontSizePt,color:p(e.color)?{argb:p(e.color)}:void 0}}const x={a3:{width:297,height:420,code:8},a4:{width:210,height:297,code:9},a5:{width:148,height:210,code:11}};function W(t,e,o,n){if(e&&e!=="auto")return x[e].code;const r=Math.min(t.pageWidthMm,t.pageHeightMm),i=Math.max(t.pageWidthMm,t.pageHeightMm),s=Object.values(x).find(l=>Math.abs(r-l.width)<=1&&Math.abs(i-l.height)<=1);return s?s.code:(n.push(`page ${o+1}: 自定义纸张 ${t.pageWidthMm}×${t.pageHeightMm}mm 无对应 Excel 纸型,打印设置回退 A4;可显式配置 paperSize`),x.a4.code)}function B(t,e,o,n){const r=typeof e.text=="string"?e.text:"";if(o!=="raw"||!Object.prototype.hasOwnProperty.call(e,"value")){w(r,t.address),t.value=r;return}const i=e.value;if(i===null||typeof i=="string"||typeof i=="boolean"||typeof i=="number"&&Number.isFinite(i)){w(i,t.address),t.value=i,e.numberFormat&&(t.numFmt=e.numberFormat);return}w(r,t.address),t.value=r,n.push(`原始单元格值无效,已保留显示文本:${t.address}`)}function P(t){const o=t.components.filter(n=>n.table!==void 0)[0]?.table;if(!(!o||typeof o.id!="string"||!o.id.trim()||!Array.isArray(o.columnKeys)||!o.columnKeys.length)){for(const n of t.components){if(n.table){if(!n.grid||n.table.id!==o.id)return;continue}if(n.grid||n.kind!=="text"||n.richParagraphs?.length&&!n.text&&!n.lines?.length)return}return{id:o.id,title:o.title,wide:o.layout==="wide"||t.layout==="wide"}}}function F(t,e){const o=new Set;for(const[n,r]of t.pages.entries())if(!e[n])for(const i of r.components)typeof i.table?.id=="string"&&o.add(i.table.id);return o}function E(t){return t.layout==="wide"||t.components.some(e=>e.table?.layout==="wide")}function R(t,e,o){const n=[],r=t.pages.map(P),i=F(t,r);for(const[s,l]of t.pages.entries()){const a=r[s],d=a&&!i.has(a.id),c=e==="pages"||!d?void 0:a;if(e==="continuous"&&!c)throw new Error(`page ${s+1}: continuous Excel 需要完整、单一的逻辑表来源;自由布局请使用 sheetMode: 'pages'`);const g=c!==void 0&&(e==="continuous"||c.wide);!g&&e!=="pages"&&E(l)&&o.push(`page ${s+1}: 混合或缺少逻辑表来源,已保留独立 Sheet,未猜测合并内容`);const h=n[n.length-1];g&&h?.continuous&&h.tableId===c.id?h.pages.push({page:l,index:s}):n.push({pages:[{page:l,index:s}],continuous:g,...g?{tableId:c.id,title:c.title}:{}})}return n}function v(t,e,o){return!t||t.length===e.length&&t.every((n,r)=>o(n,e[r]))}function L(t,e,o,n){const r=t.table,i=e.columns.map(a=>a.size),s=v(n.keys,r.columnKeys,(a,d)=>a===d),l=v(n.widths,i,(a,d)=>Math.abs(a-d)<=.001);if(r.columnKeys.length!==i.length||!s||!l)throw new Error(`page ${o+1}: 连续 Excel 逻辑表 ${r.id} 的列结构或列宽不一致`);if(n.keys??=r.columnKeys,n.widths??=i,r.role==="header"){if(r.rowIndex!==-1)throw new Error(`page ${o+1}: 连续 Excel 表头 rowIndex 必须为 -1`);n.headerSeen=!0}else{if(!["body","group-header","subtotal","grand-total"].includes(r.role)||r.rowIndex!==n.expectedRow)throw new Error(`page ${o+1}: 连续 Excel 逻辑行来源不连续或重复(期望 ${n.expectedRow})`);n.expectedRow+=e.rows.length}if(e.cells.some(a=>a.cell.children?.length))throw new Error(`page ${o+1}: 连续 Excel 暂不支持嵌套组件;请使用独立 Sheet 导出并检查告警`)}function O(t,e){const o={expectedRow:0,headerSeen:!1};for(const{page:n,index:r}of t.pages)for(const i of n.components){const s=e.get(i);i.table&&s&&L(i,s,r,o)}if(!o.headerSeen)throw new Error("连续 Excel 逻辑表缺少明确表头来源")}function I(t,e,o){let n=(t?.replace(/[\\/*?:[\]]/g," ").replace(/\s+/g," ").trim()||`Sheet${e+1}`).slice(0,31).replace(/^'+|'+$/g,"").trim()||`Sheet${e+1}`;n.toLowerCase()==="history"&&(n+=" 报表");let r=n,i=1;for(;o.has(r.toLowerCase());){const s=` (${++i})`;r=n.slice(0,31-s.length)+s}return o.add(r.toLowerCase()),r}function _(t){const e=new Set;function o(n,r,i,s){return n<=r?n:(e.has(i)||(t.push(s),e.add(i)),r)}return{column:n=>o(n,255,"column","Excel 单列宽度上限为 255 字符,超宽列已收敛至 255;单元格值完整保留,显示范围可能受限"),row:n=>o(n,409,"row","Excel 行高上限为 409pt,超高行已收敛至 409pt;单元格值完整保留,显示范围可能受限")}}function H(t){const e=t.pages.flatMap(({page:i,index:s})=>i.components.map(l=>({comp:l,pageIndex:s}))),o=new Map;let n=1,r=0;for(const{comp:i}of e)if(i.grid){const s=T.resolveGridLayout(i.grid,i.widthMm,i.heightMm);o.set(i,s),n=Math.max(n,s.columns.length)}else i.kind==="text"&&(r=Math.max(r,i.widthMm));if(n>16384)throw new Error("Excel 最多支持 16384 列,无法无损导出此报表");return{components:e,grids:o,columnCount:n,textWidthMm:r}}function q(t,e,o){const{page:n,index:r}=t.pages[0],i=e!==void 0&&e!=="auto";return(t.continuous||E(n))&&!i?{}:{pageSetup:{paperSize:W(n,e,r,o),orientation:n.pageWidthMm>n.pageHeightMm?"landscape":"portrait",fitToPage:!0,...t.continuous?{fitToWidth:1,fitToHeight:0}:{}}}}function G(t){const e=p(t.borderColor??t.lineColor),o={style:"thin",...e?{color:{argb:e}}:{}};return{...t.borderTop!==!1?{top:o}:{},...t.borderLeft!==!1?{left:o}:{},...t.borderBottom!==!1?{bottom:o}:{},...t.borderRight!==!1?{right:o}:{}}}function j(t,e){t.alignment={horizontal:e.align??"left",vertical:e.verticalAlign??"middle",wrapText:!0};const o=p(e.backgroundColor);o&&(t.fill={type:"pattern",pattern:"solid",fgColor:{argb:o}}),t.border=G(e),C(t,e)}function D(t,e,o){for(const[n,r]of e.columns.entries()){const i=t.sheet.getColumn(n+1),s=t.limits.column(m.mmToExcelColumnWidth(r.size));(i.width==null||i.width<s)&&(i.width=s)}for(const[n,r]of e.rows.entries()){const i=t.sheet.getRow(o+n),s=t.limits.row(r.size*S);(i.height==null||i.height<s)&&(i.height=s)}}function K(t,e,o,n){const r=Math.max(1,Math.min(e.cell.colSpan??1,o.columns.length-e.ci)),i=Math.max(1,Math.min(e.cell.rowSpan??1,o.rows.length-e.ri));(r>1||i>1)&&t.mergeCells(n+e.ri,e.ci+1,n+e.ri+i-1,e.ci+r)}function N(t,e,o,n,r){if(n+o.rows.length-1>1048576)throw new Error("Excel 最多支持 1048576 行,无法无损导出此报表");D(t,o,n);for(const i of o.cells){const s=t.sheet.getCell(n+i.ri,i.ci+1);B(s,i.cell,t.valueMode,t.warnings),i.cell.children?.length&&t.warnings.push(`page ${r+1} ${e.nid??e.kind} cell ${i.ri+1}:${i.ci+1}: 嵌套组件内容暂不支持 xlsx 导出,已跳过`),j(s,M.mergeComponentStyles(e.style,i.cell.style)),K(t.sheet,i,o,n)}return n+o.rows.length}function X(t,e,o,n,r){const i=Array.isArray(e.lines)&&e.lines.length>0?e.lines.join(`
2
+ `):e.text??"";if(e.richParagraphs?.length){const d=i.length===0?"富文本内容暂不支持 xlsx 导出,已跳过":"富文本按已有文本回退导出,内联样式未保留";t.warnings.push(`page ${r+1} ${e.nid??e.kind}: ${d}`)}const s=t.sheet.getRow(o),l=s.getCell(1);w(i,l.address),l.value=i,l.alignment={horizontal:e.style?.align??"left",vertical:e.style?.verticalAlign??"middle",wrapText:!0};const a=p(e.style?.backgroundColor);return a&&(l.fill={type:"pattern",pattern:"solid",fgColor:{argb:a}}),C(l,e.style),n>1&&t.sheet.mergeCells(o,1,o,n),s.height=t.limits.row(e.heightMm*S),o+1}function U(t,e,o){const n=e+o-1;t.views=[{state:"frozen",ySplit:n,xSplit:0}],t.pageSetup.printTitlesRow=`1:${n}`}function J(t,e,o){!e.grids.size&&e.textWidthMm>0&&(t.sheet.getColumn(1).width=t.limits.column(m.mmToExcelColumnWidth(e.textWidthMm)));let n=1,r=!1;for(const{comp:i,pageIndex:s}of e.components){const l=o&&i.table?.role==="header";if(l&&r)continue;if(n>1048576)throw new Error("Excel 最多支持 1048576 行,无法无损导出此报表");const a=e.grids.get(i);a?(l&&(U(t.sheet,n,a.rows.length),r=!0),n=N(t,i,a,n,s)):i.kind==="text"?n=X(t,i,n,e.columnCount,s):t.warnings.push(`page ${s+1} ${i.nid??i.kind}: 组件类型 ${i.kind} 暂不支持 xlsx 导出,已跳过`)}}function V(t){if(t.valueMode!==void 0&&t.valueMode!=="text"&&t.valueMode!=="raw")throw new Error("xlsx valueMode 必须是 text 或 raw");if(t.paperSize!==void 0&&t.paperSize!=="auto"&&!Object.prototype.hasOwnProperty.call(x,t.paperSize))throw new Error("xlsx paperSize 必须是 auto、a3、a4 或 a5");if(t.sheetMode!==void 0&&!["auto","pages","continuous"].includes(t.sheetMode))throw new Error("xlsx sheetMode 必须是 auto、pages 或 continuous")}async function Q(t,e={}){V(e),f.assertOutputActive(e.signal);const o=$.reportOutputDiagnostics(t,"xlsx",e),n=new m.ExcelJSRuntime.Workbook,r=[],i=_(r),s=R(t,e.sheetMode,r),l=new Set;for(const[d,c]of s.entries()){const g=H(c);c.continuous&&O(c,g.grids);const h=c.pages[0].page,b=e.sheetName?.(d)??I(c.title,d,l);l.add(b.toLowerCase());const y=n.addWorksheet(b,q(c,e.paperSize,r)),k=e.valueMode??(E(h)||c.continuous?"raw":"text");f.assertOutputActive(e.signal),J({sheet:y,warnings:r,limits:i,valueMode:k},g,c.continuous),await f.outputCheckpoint(e,d+1,s.length)}f.assertOutputActive(e.signal);const a=await n.xlsx.writeBuffer();return f.assertOutputActive(e.signal),{workbook:n,buffer:a,warnings:r,diagnostics:o}}exports.importExcelTemplate=m.importExcelTemplate;exports.inspectExcelWorkbook=m.inspectExcelWorkbook;exports.bindExcelTemplate=u.bindExcelTemplate;exports.createExcelBindingDocument=u.createExcelBindingDocument;exports.createExcelBindingSession=u.createExcelBindingSession;exports.excelBindingRowRange=u.excelBindingRowRange;exports.getExcelSheetWindow=u.getExcelSheetWindow;exports.parseExcelBindingSession=u.parseExcelBindingSession;exports.validateExcelBindingFields=u.validateExcelBindingFields;exports.validateExcelBindingRecipe=u.validateExcelBindingRecipe;exports.validateExcelBindingRegions=u.validateExcelBindingRegions;exports.renderPlanToXlsx=Q;