@node-projects/excelforge 3.3.0 → 3.4.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.
@@ -0,0 +1,9 @@
1
+ export { Workbook } from './core/Workbook.js';
2
+ export { Worksheet } from './core/Worksheet.js';
3
+ export { SharedStrings } from './core/SharedStrings.js';
4
+ export { StyleRegistry } from './styles/StyleRegistry.js';
5
+ export { CellError } from './core/types.js';
6
+ export { style, StyleBuilder, Styles, Colors, NumFmt } from './styles/builders.js';
7
+ export { a1ToR1C1, r1c1ToA1, formulaToR1C1, formulaFromR1C1, } from './utils/helpers.js';
8
+ export type { CellValue, ErrorValue, Cell, RichTextRun, CellStyle, Font, Fill, PatternFill, GradientFill, GradientStop, Border, BorderSide, BorderStyle, Alignment, NumberFormat, Color, FillPattern, HorizontalAlign, VerticalAlign, MergeRange, Image, CellImage, ImageFormat, ImagePosition, Chart, ChartType, ChartSeries, ChartAxis, ChartPosition, ChartDataLabels, ChartTemplate, ChartModernStyle, ChartColorPalette, ConditionalFormat, CFType, CFColorScale, CFDataBar, CFIconSet, IconSet, Table, TableColumn, TableStyle, PivotTable, PivotDataField, PivotFunction, Sparkline, SparklineType, DataValidation, ValidationType, ValidationOperator, AutoFilter, Comment, Hyperlink, FormControl, FormControlType, FormControlAnchor, NamedRange, Connection, ConnectionType, CommandType, PowerQuery, ColumnDef, RowDef, FreezePane, SplitPane, SheetProtection, PageSetup, PageMargins, PageBreak, HeaderFooter, PrintOptions, SheetView, PaperSize, Orientation, WorkbookProperties, WorksheetOptions, CalcSettings, CalcMode, OleObject, Shape, ShapeType, WordArt, WordArtPreset, Theme, ThemeColor, CustomIcon, CFCustomIconSet, TableSlicer, PivotSlicer, CustomPivotStyle, PivotStyleElement, QueryTable, ExternalLink, LocaleSettings, MathEquation, MathElement, MathElementType, } from './core/types.js';
9
+ export { colIndexToLetter, colLetterToIndex, cellRefToIndices, indicesToCellRef, parseRange, dateToSerial, pxToEmu, base64ToBytes, bytesToBase64, } from './utils/helpers.js';
@@ -0,0 +1,9 @@
1
+ export { Workbook } from './core/Workbook.js';
2
+ export { Worksheet } from './core/Worksheet.js';
3
+ export { SharedStrings } from './core/SharedStrings.js';
4
+ export { StyleRegistry } from './styles/StyleRegistry.js';
5
+ export { CellError } from './core/types.js';
6
+ export { style, StyleBuilder, Styles, Colors, NumFmt } from './styles/builders.js';
7
+ export { a1ToR1C1, r1c1ToA1, formulaToR1C1, formulaFromR1C1, } from './utils/helpers.js';
8
+ export { colIndexToLetter, colLetterToIndex, cellRefToIndices, indicesToCellRef, parseRange, dateToSerial, pxToEmu, base64ToBytes, bytesToBase64, } from './utils/helpers.js';
9
+ //# sourceMappingURL=index-core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-core.js","sourceRoot":"","sources":["../src/index-core.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,QAAQ,EAAE,MAAU,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAS,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAS,iBAAiB,CAAC;AAG/C,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EACL,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,GACnD,MAAM,oBAAoB,CAAC;AAmH5B,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,OAAO,EACP,aAAa,EACb,aAAa,GACd,MAAM,oBAAoB,CAAC"}
package/dist/index-min.js CHANGED
@@ -1,4 +1,4 @@
1
- var te=class e{constructor(t){this.error=t}toString(){return this.error}static{this.NULL=new e("#NULL!")}static{this.DIV0=new e("#DIV/0!")}static{this.VALUE=new e("#VALUE!")}static{this.REF=new e("#REF!")}static{this.NAME=new e("#NAME?")}static{this.NUM=new e("#NUM!")}static{this.NA=new e("#N/A")}static{this.GETTING=new e("#GETTING_DATA")}};var Eo=[];function Ut(e){if(Eo[e])return Eo[e];let t="",o=e;for(;o>0;){let n=(o-1)%26;t=String.fromCharCode(65+n)+t,o=Math.floor((o-1)/26)}return Eo[e]=t,t}function qt(e){let t=0;for(let o=0;o<e.length;o++)t=t*26+(e.charCodeAt(o)-64);return t}function Gt(e){let t=e.match(/^(\$?)([A-Z]+)(\$?)(\d+)$/);if(!t)throw new Error(`Invalid cell ref: ${e}`);return{col:qt(t[2]),row:parseInt(t[4],10)}}function ye(e,t,o=!1){let n=o?"$":"";return`${n}${Ut(t)}${n}${e}`}function Kt(e){let[t,o]=e.split(":"),n=Gt(t.replace(/\$/g,"")),s=o?Gt(o.replace(/\$/g,"")):n;return{startRow:n.row,startCol:n.col,endRow:s.row,endCol:s.col}}var Ms={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"},Bo=/[&<>"']/g;function I(e){return Bo.test(e)?(Bo.lastIndex=0,e.replace(Bo,t=>Ms[t])):e}var Es=new TextEncoder;function rt(e){return Es.encode(e)}function _o(e,t=!1){let o=t?Date.UTC(1904,0,1):Date.UTC(1899,11,30),n=(e.getTime()-o)/864e5;return t||n>=60,n}function jo(e){return Math.round(e*914400/96)}function le(e){let t=atob(e),o=new Uint8Array(t.length);for(let n=0;n<t.length;n++)o[n]=t.charCodeAt(n);return o}function Bs(e){let t=[];for(let o=0;o<e.length;o+=8192)t.push(String.fromCharCode.apply(null,e.subarray(o,o+8192)));return btoa(t.join(""))}function un(e,t,o){let n=e.match(/^(\$?)([A-Z]+)(\$?)(\d+)$/);if(!n)return e;let s=n[1]==="$",r=qt(n[2]),a=n[3]==="$",i=parseInt(n[4],10),l=a?`R${i}`:i===t?"R":`R[${i-t}]`,h=s?`C${r}`:r===o?"C":`C[${r-o}]`;return l+h}function gn(e,t,o){let n=e.match(/^R(\[(-?\d+)\]|(\d+))?C(\[(-?\d+)\]|(\d+))?$/);if(!n)return e;let s,r,a,i;return n[3]!==void 0?(s=parseInt(n[3],10),r=!0):n[2]!==void 0?(s=t+parseInt(n[2],10),r=!1):(s=t,r=!1),n[6]!==void 0?(a=parseInt(n[6],10),i=!0):n[5]!==void 0?(a=o+parseInt(n[5],10),i=!1):(a=o,i=!1),`${i?"$":""}${Ut(a)}${r?"$":""}${s}`}function _s(e,t,o){return e.replace(/(\$?)([A-Z]+)(\$?)(\d+)/g,(n,s,r,a,i)=>un(`${s}${r}${a}${i}`,t,o))}function js(e,t,o){return e.replace(/R(\[(-?\d+)\]|(\d+))?C(\[(-?\d+)\]|(\d+))?/g,n=>gn(n,t,o))}var Oo=/[&<>]/g,Os={"&":"&amp;","<":"&lt;",">":"&gt;"};function Lo(e){return Oo.test(e)?(Oo.lastIndex=0,e.replace(Oo,t=>Os[t])):e}function xn(e){return e.startsWith("theme:")?`<color theme="${e.slice(6)}"/>`:`<color rgb="${e.startsWith("#")?"FF"+e.slice(1):e}"/>`}var Ls={average:101,count:102,countNums:103,max:104,min:105,stdDev:107,sum:109,var:110,vars:111},Ie=class{constructor(t,o={}){this.cells=new Map,this.merges=[],this.images=[],this.cellImages=[],this.charts=[],this.conditionalFormats=[],this.tables=[],this.pivotTables=[],this.sparklines=[],this.formControls=[],this.shapes=[],this.wordArt=[],this.queryTables=[],this.tableSlicers=[],this.mathEquations=[],this.oleObjects=[],this.colDefs=new Map,this.rowDefs=new Map,this.dataValidations=new Map,this.rowBreaks=[],this.colBreaks=[],this.preservedXml=[],this._nextSharedIdx=0,this._isChartSheet=!1,this._isDialogSheet=!1,this.sheetIndex=0,this.rId="",this.drawingRId="",this.legacyDrawingRId="",this.tableRIds=[],this.ctrlPropRIds=[],this.slicerRId="",this._slicerDrawingInfo=[],this._cellImageVm=new Map,this.ignoreErrors=[],this.oleRIds=[],this.oleIconRIds=[],this.name=t,this.options={...o,name:t}}markDirty(){this._workbook?.markDirty(this.name)}setActive(){this._workbook?.setActiveSheet(this.name)}getCell(t,o){let n=this.cells.get(t);n||(n=new Map,this.cells.set(t,n));let s=n.get(o);return s||(s={},n.set(o,s)),s}getCellByRef(t){let{row:o,col:n}=Gt(t);return this.getCell(o,n)}setCell(t,o,n){let s=this.cells.get(t);return s||(s=new Map,this.cells.set(t,s)),s.set(o,n),this}setValue(t,o,n){let s=this.getCell(t,o);return delete s.formula,delete s.arrayFormula,delete s.richText,delete s._sharedIdx,delete s._sharedRef,delete s._dynamic,s.value=n,this}setFormula(t,o,n){let s=this.getCell(t,o);return delete s.arrayFormula,delete s.richText,delete s._sharedIdx,delete s._sharedRef,delete s._dynamic,s.formula=n,this}setDynamicArrayFormula(t,o,n){let s=this.getCell(t,o);return delete s.formula,delete s.richText,delete s._sharedIdx,delete s._sharedRef,s.arrayFormula=n,s._dynamic=!0,this}setSharedFormula(t,o,n,s){let r=this._nextSharedIdx++,a=this.getCell(t,o);a.formula=n,a._sharedRef=s,a._sharedIdx=r;let{startRow:i,startCol:l,endRow:h,endCol:m}=Kt(s);for(let c=i;c<=h;c++)for(let d=l;d<=m;d++){if(c===t&&d===o)continue;let f=this.getCell(c,d);f._sharedIdx=r}return this}setStyle(t,o,n){return this.getCell(t,o).style=n,this}writeArray(t,o,n){for(let s=0;s<n.length;s++)for(let r=0;r<n[s].length;r++)this.setValue(t+s,o+r,n[s][r]);return this}writeColumn(t,o,n){return n.forEach((s,r)=>this.setValue(t+r,o,s)),this}writeRow(t,o,n){return n.forEach((s,r)=>this.setValue(t,o+r,s)),this}setColumn(t,o){return this.colDefs.set(t,o),this}setColumnWidth(t,o){let n=this.colDefs.get(t)??{};return this.colDefs.set(t,{...n,width:o,customWidth:!0}),this}setRow(t,o){return this.rowDefs.set(t,o),this}setRowHeight(t,o){let n=this.rowDefs.get(t)??{};return this.rowDefs.set(t,{...n,height:o}),this}merge(t,o,n,s){return this.merges.push({startRow:t,startCol:o,endRow:n,endCol:s}),this}mergeByRef(t){let[o,n]=t.split(":"),s=Gt(o),r=Gt(n);return this.merge(s.row,s.col,r.row,r.col)}getMerges(){return this.merges}addImage(t){return this.images.push(t),this}getImages(){return this.images}addCellImage(t){return this.cellImages.push(t),this}getCellImages(){return this.cellImages}getComments(){let t=[];for(let[o,n]of this.cells)for(let[s,r]of n)r.comment&&t.push({row:o,col:s,comment:r.comment});return t}addChart(t){return this.charts.push(t),this}getCharts(){return this.charts}addConditionalFormat(t){return this.conditionalFormats.push(t),this}getConditionalFormats(){return this.conditionalFormats}getDataValidations(){return this.dataValidations}addTable(t){if(this.tables.push(t),t.totalsRow&&t.columns?.length){let{startRow:o,startCol:n,endRow:s}=Kt(t.ref),r=o+1,a=s-1;t.columns.forEach((i,l)=>{let h=n+l;if(i.totalsRowLabel)this.setValue(s,h,i.totalsRowLabel);else if(i.totalsRowFunction&&i.totalsRowFunction!=="none"){let m=Ls[i.totalsRowFunction];if(m!==void 0){let c=Ut(h);this.setFormula(s,h,`SUBTOTAL(${m},${c}${r}:${c}${a})`)}}})}return this}getTables(){return this.tables}addPivotTable(t){return this.pivotTables.push(t),this}getPivotTables(){return this.pivotTables}readRange(t){let{startRow:o,startCol:n,endRow:s,endCol:r}=Kt(t),a=[];for(let i=o;i<=s;i++){let l=[],h=this.cells.get(i);for(let m=n;m<=r;m++){let c=h?.get(m);l.push(c?.value??null)}a.push(l)}return a}readAllCells(){let t=[];for(let[o,n]of this.cells)for(let[s,r]of n)t.push({row:o,col:s,cell:r});return t}getUsedRange(){let t=1/0,o=0,n=1/0,s=0;for(let[r,a]of this.cells)for(let[i]of a)r<t&&(t=r),r>o&&(o=r),i<n&&(n=i),i>s&&(s=i);return o===0?null:{startRow:t,startCol:n,endRow:o,endCol:s}}getColumn(t){return this.colDefs.get(t)}getRow(t){return this.rowDefs.get(t)}insertRows(t,o){let n=[...this.cells.keys()].filter(r=>r>=t).sort((r,a)=>a-r);for(let r of n){let a=this.cells.get(r);this.cells.delete(r),this.cells.set(r+o,a)}let s=[...this.rowDefs.keys()].filter(r=>r>=t).sort((r,a)=>a-r);for(let r of s){let a=this.rowDefs.get(r);this.rowDefs.delete(r),this.rowDefs.set(r+o,a)}for(let r of this.merges)r.startRow>=t&&(r.startRow+=o),r.endRow>=t&&(r.endRow+=o);return this}deleteRows(t,o){for(let r=t;r<t+o;r++)this.cells.delete(r),this.rowDefs.delete(r);let n=[...this.cells.keys()].filter(r=>r>=t+o).sort((r,a)=>r-a);for(let r of n){let a=this.cells.get(r);this.cells.delete(r),this.cells.set(r-o,a)}let s=[...this.rowDefs.keys()].filter(r=>r>=t+o).sort((r,a)=>r-a);for(let r of s){let a=this.rowDefs.get(r);this.rowDefs.delete(r),this.rowDefs.set(r-o,a)}this.merges=this.merges.filter(r=>!(r.startRow>=t&&r.endRow<t+o));for(let r of this.merges)r.startRow>=t+o&&(r.startRow-=o),r.endRow>=t+o&&(r.endRow-=o);return this}insertColumns(t,o){for(let[,s]of this.cells){let r=[...s.keys()].filter(a=>a>=t).sort((a,i)=>i-a);for(let a of r){let i=s.get(a);s.delete(a),s.set(a+o,i)}}let n=[...this.colDefs.keys()].filter(s=>s>=t).sort((s,r)=>r-s);for(let s of n){let r=this.colDefs.get(s);this.colDefs.delete(s),this.colDefs.set(s+o,r)}for(let s of this.merges)s.startCol>=t&&(s.startCol+=o),s.endCol>=t&&(s.endCol+=o);return this}copyRange(t,o,n){let{startRow:s,startCol:r,endRow:a,endCol:i}=Kt(t);for(let l=s;l<=a;l++)for(let h=r;h<=i;h++){let m=this.getCell(l,h),c=o+(l-s),d=n+(h-r);m.value!=null&&this.setValue(c,d,m.value),m.formula&&this.setFormula(c,d,m.formula),m.style&&this.setStyle(c,d,{...m.style})}return this}moveRange(t,o,n){let{startRow:s,startCol:r,endRow:a,endCol:i}=Kt(t);this.copyRange(t,o,n);let l=o+(a-s),h=n+(i-r);for(let m=s;m<=a;m++)for(let c=r;c<=i;c++){let d=o+(m-s),f=n+(c-r);if(d===m&&f===c)continue;let p=this.cells.get(m);p&&p.delete(c)}return this}sortRange(t,o,n="asc"){let{startRow:s,startCol:r,endRow:a,endCol:i}=Kt(t),l=[];for(let h=s;h<=a;h++){let m=this.cells.get(h),c=new Map;for(let d=r;d<=i;d++){let f=m?.get(d);f&&c.set(d,{...f})}l.push({rowIdx:h,cells:c})}l.sort((h,m)=>{let c=h.cells.get(o)?.value,d=m.cells.get(o)?.value,f=typeof c=="number"||typeof c=="string"?c:"",p=typeof d=="number"||typeof d=="string"?d:"",g=0;return typeof f=="number"&&typeof p=="number"?g=f-p:g=String(f).localeCompare(String(p)),n==="desc"?-g:g});for(let h=0;h<l.length;h++){let m=s+h;for(let c=r;c<=i;c++){let d=l[h].cells.get(c),f=this.cells.get(m)??new Map;this.cells.has(m)||this.cells.set(m,f),d?f.set(c,d):f.delete(c)}}return this}fillNumber(t,o,n,s=0,r=1){for(let a=0;a<n;a++)this.setValue(t+a,o,s+a*r);return this}fillDate(t,o,n,s,r="day",a=1){for(let i=0;i<n;i++){let l=new Date(s);switch(r){case"day":l.setDate(l.getDate()+i*a);break;case"week":l.setDate(l.getDate()+i*a*7);break;case"month":l.setMonth(l.getMonth()+i*a);break;case"year":l.setFullYear(l.getFullYear()+i*a);break}this.setValue(t+i,o,l)}return this}fillList(t,o,n,s){for(let r=0;r<s;r++)this.setValue(t+r,o,n[r%n.length]);return this}autoFitColumns(t=8,o=60){let n=this.getUsedRange();if(!n)return this;for(let s=n.startCol;s<=n.endCol;s++){let r=0;for(let a=n.startRow;a<=n.endRow;a++){let i=this.cells.get(a)?.get(s);if(i?.value!=null){let l=String(i.value);l.length>r&&(r=l.length)}if(i?.richText){let l=i.richText.map(h=>h.text).join("");l.length>r&&(r=l.length)}}if(r>0){let a=Math.max(t,Math.min(o,r*1.2+2));this.setColumn(s,{...this.colDefs.get(s)??{},width:a,customWidth:!0})}}return this}duplicateRow(t,o){this.insertRows(o,1);let n=this.cells.get(t>=o?t+1:t);if(n){let r=new Map;for(let[a,i]of n)r.set(a,{...i,style:i.style?{...i.style}:void 0});this.cells.set(o,r)}let s=this.rowDefs.get(t>=o?t+1:t);return s&&this.rowDefs.set(o,{...s}),this}spliceRows(t,o,n){if(o>0&&this.deleteRows(t,o),n&&n.length>0){this.insertRows(t,n.length);for(let s=0;s<n.length;s++)this.writeRow(t+s,1,n[s])}return this}setAutoFilter(t,o){return this.autoFilter={ref:t},o?.columns&&(this._filterColumns=o.columns),this}addSparkline(t){return this.sparklines.push(t),this}getSparklines(){return this.sparklines}addDataValidation(t,o){return this.dataValidations.set(t,o),this}addRowBreak(t,o=!0){return this.rowBreaks.push({id:t,manual:o}),this}addColBreak(t,o=!0){return this.colBreaks.push({id:t,manual:o}),this}getRowBreaks(){return this.rowBreaks}getColBreaks(){return this.colBreaks}addFormControl(t){if(!t.to&&(t.width||t.height)){let s=t.width??100,r=t.height??30,a=t.from.col+s/64,i=t.from.row+r/20;t={...t,to:{col:Math.floor(a),row:Math.floor(i),colOff:Math.round(a%1*64),rowOff:Math.round(i%1*20)}}}return this.formControls.push(t),this}getFormControls(){return this.formControls}addShape(t){return this.shapes.push(t),this}getShapes(){return this.shapes}addOleObject(t){return this.oleObjects.push(t),this}getOleObjects(){return this.oleObjects}addWordArt(t){return this.wordArt.push(t),this}getWordArt(){return this.wordArt}addQueryTable(t){return this.queryTables.push(t),this}getQueryTables(){return this.queryTables}addTableSlicer(t){return this.tableSlicers.push(t),this}getTableSlicers(){return this.tableSlicers}addMathEquation(t){return this.mathEquations.push(t),this}getMathEquations(){return this.mathEquations}addIgnoredError(t,o){return this.ignoreErrors.push({sqref:t,...o}),this}getIgnoredErrors(){return this.ignoreErrors}addPreservedXml(t){return this.preservedXml.push(t),this}freeze(t,o){return this.freezePane={row:t,col:o},this}toXml(t,o){let n=this.pageSetup?.fitToPage,s=this.options?.tabColor,r=n||s?`<sheetPr>${s?`<tabColor rgb="${s}"/>`:""}${n?'<pageSetUpPr fitToPage="1"/>':""}</sheetPr>`:"",a=this._sheetViewXml(),i=this._colsXml(t),l=this._sheetDataXml(t,o),h=this._mergesXml(),m=this._conditionalFormatXml(t),c=this._dataValidationsXml(),d=this.autoFilter&&!this.tables.some(A=>A.ref===this.autoFilter.ref)?this._autoFilterXml():"",f=this.tables.length?`<tableParts count="${this.tables.length}">${this.tableRIds.map(A=>`<tablePart r:id="${A}"/>`).join("")}</tableParts>`:"",p=this.drawingRId?`<drawing r:id="${this.drawingRId}"/>`:"",g=this.legacyDrawingRId?`<legacyDrawing r:id="${this.legacyDrawingRId}"/>`:"",u=this._formControlsXml(),$=this._oleObjectsXml(),x=this._sparklineXml(),b=this._customIconExtXml(),C=this.slicerRId?`<extLst><ext uri="{A8765BA9-456A-4dab-B4F3-ACF838C121DE}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerList><x14:slicer r:id="${this.slicerRId}"/></x14:slicerList></ext></extLst>`:"",y=this._ignoredErrorsXml(),v=this._protectionXml(),w=this._pageSetupXml(),k=this._pageMarginsXml(),T=this._headerFooterXml(),S=this._printOptionsXml(),D=this._pageBreaksXml("rowBreaks",this.rowBreaks,16383),R=this._pageBreaksXml("colBreaks",this.colBreaks,1048575);return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1
+ var te=class e{constructor(t){this.error=t}toString(){return this.error}static{this.NULL=new e("#NULL!")}static{this.DIV0=new e("#DIV/0!")}static{this.VALUE=new e("#VALUE!")}static{this.REF=new e("#REF!")}static{this.NAME=new e("#NAME?")}static{this.NUM=new e("#NUM!")}static{this.NA=new e("#N/A")}static{this.GETTING=new e("#GETTING_DATA")}};var Eo=[];function Ut(e){if(Eo[e])return Eo[e];let t="",o=e;for(;o>0;){let n=(o-1)%26;t=String.fromCharCode(65+n)+t,o=Math.floor((o-1)/26)}return Eo[e]=t,t}function qt(e){let t=0;for(let o=0;o<e.length;o++)t=t*26+(e.charCodeAt(o)-64);return t}function Gt(e){let t=e.match(/^(\$?)([A-Z]+)(\$?)(\d+)$/);if(!t)throw new Error(`Invalid cell ref: ${e}`);return{col:qt(t[2]),row:parseInt(t[4],10)}}function ye(e,t,o=!1){let n=o?"$":"";return`${n}${Ut(t)}${n}${e}`}function Kt(e){let[t,o]=e.split(":"),n=Gt(t.replace(/\$/g,"")),s=o?Gt(o.replace(/\$/g,"")):n;return{startRow:n.row,startCol:n.col,endRow:s.row,endCol:s.col}}var Ms={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"},Bo=/[&<>"']/g;function I(e){return Bo.test(e)?(Bo.lastIndex=0,e.replace(Bo,t=>Ms[t])):e}var Es=new TextEncoder;function rt(e){return Es.encode(e)}function _o(e,t=!1){let o=t?Date.UTC(1904,0,1):Date.UTC(1899,11,30),n=(e.getTime()-o)/864e5;return t||n>=60,n}function jo(e){return Math.round(e*914400/96)}function le(e){let t=atob(e),o=new Uint8Array(t.length);for(let n=0;n<t.length;n++)o[n]=t.charCodeAt(n);return o}function Bs(e){let t=[];for(let o=0;o<e.length;o+=8192)t.push(String.fromCharCode.apply(null,e.subarray(o,o+8192)));return btoa(t.join(""))}function un(e,t,o){let n=e.match(/^(\$?)([A-Z]+)(\$?)(\d+)$/);if(!n)return e;let s=n[1]==="$",r=qt(n[2]),a=n[3]==="$",i=parseInt(n[4],10),l=a?`R${i}`:i===t?"R":`R[${i-t}]`,h=s?`C${r}`:r===o?"C":`C[${r-o}]`;return l+h}function gn(e,t,o){let n=e.match(/^R(\[(-?\d+)\]|(\d+))?C(\[(-?\d+)\]|(\d+))?$/);if(!n)return e;let s,r,a,i;return n[3]!==void 0?(s=parseInt(n[3],10),r=!0):n[2]!==void 0?(s=t+parseInt(n[2],10),r=!1):(s=t,r=!1),n[6]!==void 0?(a=parseInt(n[6],10),i=!0):n[5]!==void 0?(a=o+parseInt(n[5],10),i=!1):(a=o,i=!1),`${i?"$":""}${Ut(a)}${r?"$":""}${s}`}function _s(e,t,o){return e.replace(/(\$?)([A-Z]+)(\$?)(\d+)/g,(n,s,r,a,i)=>un(`${s}${r}${a}${i}`,t,o))}function js(e,t,o){return e.replace(/R(\[(-?\d+)\]|(\d+))?C(\[(-?\d+)\]|(\d+))?/g,n=>gn(n,t,o))}var Oo=/[&<>]/g,Os={"&":"&amp;","<":"&lt;",">":"&gt;"};function Lo(e){return Oo.test(e)?(Oo.lastIndex=0,e.replace(Oo,t=>Os[t])):e}function xn(e){if(e.startsWith("theme:")){let o=e.slice(6),n=o.indexOf(":tint:");if(n>=0){let s=o.slice(0,n),r=o.slice(n+6);return`<color theme="${s}" tint="${r}"/>`}return`<color theme="${o}"/>`}return`<color rgb="${e.startsWith("#")?"FF"+e.slice(1):e}"/>`}var Ls={average:101,count:102,countNums:103,max:104,min:105,stdDev:107,sum:109,var:110,vars:111},Ie=class{constructor(t,o={}){this.cells=new Map,this.merges=[],this.images=[],this.cellImages=[],this.charts=[],this.conditionalFormats=[],this.tables=[],this.pivotTables=[],this.sparklines=[],this.formControls=[],this.shapes=[],this.wordArt=[],this.queryTables=[],this.tableSlicers=[],this.mathEquations=[],this.oleObjects=[],this.colDefs=new Map,this.rowDefs=new Map,this.dataValidations=new Map,this.rowBreaks=[],this.colBreaks=[],this.preservedXml=[],this._nextSharedIdx=0,this._isChartSheet=!1,this._isDialogSheet=!1,this.sheetIndex=0,this.rId="",this.drawingRId="",this.legacyDrawingRId="",this.tableRIds=[],this.ctrlPropRIds=[],this.slicerRId="",this._slicerDrawingInfo=[],this._cellImageVm=new Map,this.ignoreErrors=[],this.oleRIds=[],this.oleIconRIds=[],this.name=t,this.options={...o,name:t}}markDirty(){this._workbook?.markDirty(this.name)}setActive(){this._workbook?.setActiveSheet(this.name)}getCell(t,o){let n=this.cells.get(t);n||(n=new Map,this.cells.set(t,n));let s=n.get(o);return s||(s={},n.set(o,s)),s}getCellByRef(t){let{row:o,col:n}=Gt(t);return this.getCell(o,n)}setCell(t,o,n){let s=this.cells.get(t);return s||(s=new Map,this.cells.set(t,s)),s.set(o,n),this}setValue(t,o,n){let s=this.getCell(t,o);return delete s.formula,delete s.arrayFormula,delete s.richText,delete s._sharedIdx,delete s._sharedRef,delete s._dynamic,s.value=n,this}setFormula(t,o,n){let s=this.getCell(t,o);return delete s.arrayFormula,delete s.richText,delete s._sharedIdx,delete s._sharedRef,delete s._dynamic,s.formula=n,this}setDynamicArrayFormula(t,o,n){let s=this.getCell(t,o);return delete s.formula,delete s.richText,delete s._sharedIdx,delete s._sharedRef,s.arrayFormula=n,s._dynamic=!0,this}setSharedFormula(t,o,n,s){let r=this._nextSharedIdx++,a=this.getCell(t,o);a.formula=n,a._sharedRef=s,a._sharedIdx=r;let{startRow:i,startCol:l,endRow:h,endCol:m}=Kt(s);for(let c=i;c<=h;c++)for(let d=l;d<=m;d++){if(c===t&&d===o)continue;let f=this.getCell(c,d);f._sharedIdx=r}return this}setStyle(t,o,n){return this.getCell(t,o).style=n,this}writeArray(t,o,n){for(let s=0;s<n.length;s++)for(let r=0;r<n[s].length;r++)this.setValue(t+s,o+r,n[s][r]);return this}writeColumn(t,o,n){return n.forEach((s,r)=>this.setValue(t+r,o,s)),this}writeRow(t,o,n){return n.forEach((s,r)=>this.setValue(t,o+r,s)),this}setColumn(t,o){return this.colDefs.set(t,o),this}setColumnWidth(t,o){let n=this.colDefs.get(t)??{};return this.colDefs.set(t,{...n,width:o,customWidth:!0}),this}setRow(t,o){return this.rowDefs.set(t,o),this}setRowHeight(t,o){let n=this.rowDefs.get(t)??{};return this.rowDefs.set(t,{...n,height:o}),this}merge(t,o,n,s){return this.merges.push({startRow:t,startCol:o,endRow:n,endCol:s}),this}mergeByRef(t){let[o,n]=t.split(":"),s=Gt(o),r=Gt(n);return this.merge(s.row,s.col,r.row,r.col)}getMerges(){return this.merges}addImage(t){return this.images.push(t),this}getImages(){return this.images}addCellImage(t){return this.cellImages.push(t),this}getCellImages(){return this.cellImages}getComments(){let t=[];for(let[o,n]of this.cells)for(let[s,r]of n)r.comment&&t.push({row:o,col:s,comment:r.comment});return t}addChart(t){return this.charts.push(t),this}getCharts(){return this.charts}addConditionalFormat(t){return this.conditionalFormats.push(t),this}getConditionalFormats(){return this.conditionalFormats}getDataValidations(){return this.dataValidations}addTable(t){if(this.tables.push(t),t.totalsRow&&t.columns?.length){let{startRow:o,startCol:n,endRow:s}=Kt(t.ref),r=o+1,a=s-1;t.columns.forEach((i,l)=>{let h=n+l;if(i.totalsRowLabel)this.setValue(s,h,i.totalsRowLabel);else if(i.totalsRowFunction&&i.totalsRowFunction!=="none"){let m=Ls[i.totalsRowFunction];if(m!==void 0){let c=Ut(h);this.setFormula(s,h,`SUBTOTAL(${m},${c}${r}:${c}${a})`)}}})}return this}getTables(){return this.tables}addPivotTable(t){return this.pivotTables.push(t),this}getPivotTables(){return this.pivotTables}readRange(t){let{startRow:o,startCol:n,endRow:s,endCol:r}=Kt(t),a=[];for(let i=o;i<=s;i++){let l=[],h=this.cells.get(i);for(let m=n;m<=r;m++){let c=h?.get(m);l.push(c?.value??null)}a.push(l)}return a}readAllCells(){let t=[];for(let[o,n]of this.cells)for(let[s,r]of n)t.push({row:o,col:s,cell:r});return t}getUsedRange(){let t=1/0,o=0,n=1/0,s=0;for(let[r,a]of this.cells)for(let[i]of a)r<t&&(t=r),r>o&&(o=r),i<n&&(n=i),i>s&&(s=i);return o===0?null:{startRow:t,startCol:n,endRow:o,endCol:s}}getColumn(t){return this.colDefs.get(t)}getRow(t){return this.rowDefs.get(t)}insertRows(t,o){let n=[...this.cells.keys()].filter(r=>r>=t).sort((r,a)=>a-r);for(let r of n){let a=this.cells.get(r);this.cells.delete(r),this.cells.set(r+o,a)}let s=[...this.rowDefs.keys()].filter(r=>r>=t).sort((r,a)=>a-r);for(let r of s){let a=this.rowDefs.get(r);this.rowDefs.delete(r),this.rowDefs.set(r+o,a)}for(let r of this.merges)r.startRow>=t&&(r.startRow+=o),r.endRow>=t&&(r.endRow+=o);return this}deleteRows(t,o){for(let r=t;r<t+o;r++)this.cells.delete(r),this.rowDefs.delete(r);let n=[...this.cells.keys()].filter(r=>r>=t+o).sort((r,a)=>r-a);for(let r of n){let a=this.cells.get(r);this.cells.delete(r),this.cells.set(r-o,a)}let s=[...this.rowDefs.keys()].filter(r=>r>=t+o).sort((r,a)=>r-a);for(let r of s){let a=this.rowDefs.get(r);this.rowDefs.delete(r),this.rowDefs.set(r-o,a)}this.merges=this.merges.filter(r=>!(r.startRow>=t&&r.endRow<t+o));for(let r of this.merges)r.startRow>=t+o&&(r.startRow-=o),r.endRow>=t+o&&(r.endRow-=o);return this}insertColumns(t,o){for(let[,s]of this.cells){let r=[...s.keys()].filter(a=>a>=t).sort((a,i)=>i-a);for(let a of r){let i=s.get(a);s.delete(a),s.set(a+o,i)}}let n=[...this.colDefs.keys()].filter(s=>s>=t).sort((s,r)=>r-s);for(let s of n){let r=this.colDefs.get(s);this.colDefs.delete(s),this.colDefs.set(s+o,r)}for(let s of this.merges)s.startCol>=t&&(s.startCol+=o),s.endCol>=t&&(s.endCol+=o);return this}copyRange(t,o,n){let{startRow:s,startCol:r,endRow:a,endCol:i}=Kt(t);for(let l=s;l<=a;l++)for(let h=r;h<=i;h++){let m=this.getCell(l,h),c=o+(l-s),d=n+(h-r);m.value!=null&&this.setValue(c,d,m.value),m.formula&&this.setFormula(c,d,m.formula),m.style&&this.setStyle(c,d,{...m.style})}return this}moveRange(t,o,n){let{startRow:s,startCol:r,endRow:a,endCol:i}=Kt(t);this.copyRange(t,o,n);let l=o+(a-s),h=n+(i-r);for(let m=s;m<=a;m++)for(let c=r;c<=i;c++){let d=o+(m-s),f=n+(c-r);if(d===m&&f===c)continue;let p=this.cells.get(m);p&&p.delete(c)}return this}sortRange(t,o,n="asc"){let{startRow:s,startCol:r,endRow:a,endCol:i}=Kt(t),l=[];for(let h=s;h<=a;h++){let m=this.cells.get(h),c=new Map;for(let d=r;d<=i;d++){let f=m?.get(d);f&&c.set(d,{...f})}l.push({rowIdx:h,cells:c})}l.sort((h,m)=>{let c=h.cells.get(o)?.value,d=m.cells.get(o)?.value,f=typeof c=="number"||typeof c=="string"?c:"",p=typeof d=="number"||typeof d=="string"?d:"",g=0;return typeof f=="number"&&typeof p=="number"?g=f-p:g=String(f).localeCompare(String(p)),n==="desc"?-g:g});for(let h=0;h<l.length;h++){let m=s+h;for(let c=r;c<=i;c++){let d=l[h].cells.get(c),f=this.cells.get(m)??new Map;this.cells.has(m)||this.cells.set(m,f),d?f.set(c,d):f.delete(c)}}return this}fillNumber(t,o,n,s=0,r=1){for(let a=0;a<n;a++)this.setValue(t+a,o,s+a*r);return this}fillDate(t,o,n,s,r="day",a=1){for(let i=0;i<n;i++){let l=new Date(s);switch(r){case"day":l.setDate(l.getDate()+i*a);break;case"week":l.setDate(l.getDate()+i*a*7);break;case"month":l.setMonth(l.getMonth()+i*a);break;case"year":l.setFullYear(l.getFullYear()+i*a);break}this.setValue(t+i,o,l)}return this}fillList(t,o,n,s){for(let r=0;r<s;r++)this.setValue(t+r,o,n[r%n.length]);return this}autoFitColumns(t=8,o=60){let n=this.getUsedRange();if(!n)return this;for(let s=n.startCol;s<=n.endCol;s++){let r=0;for(let a=n.startRow;a<=n.endRow;a++){let i=this.cells.get(a)?.get(s);if(i?.value!=null){let l=String(i.value);l.length>r&&(r=l.length)}if(i?.richText){let l=i.richText.map(h=>h.text).join("");l.length>r&&(r=l.length)}}if(r>0){let a=Math.max(t,Math.min(o,r*1.2+2));this.setColumn(s,{...this.colDefs.get(s)??{},width:a,customWidth:!0})}}return this}duplicateRow(t,o){this.insertRows(o,1);let n=this.cells.get(t>=o?t+1:t);if(n){let r=new Map;for(let[a,i]of n)r.set(a,{...i,style:i.style?{...i.style}:void 0});this.cells.set(o,r)}let s=this.rowDefs.get(t>=o?t+1:t);return s&&this.rowDefs.set(o,{...s}),this}spliceRows(t,o,n){if(o>0&&this.deleteRows(t,o),n&&n.length>0){this.insertRows(t,n.length);for(let s=0;s<n.length;s++)this.writeRow(t+s,1,n[s])}return this}setAutoFilter(t,o){return this.autoFilter={ref:t},o?.columns&&(this._filterColumns=o.columns),this}addSparkline(t){return this.sparklines.push(t),this}getSparklines(){return this.sparklines}addDataValidation(t,o){return this.dataValidations.set(t,o),this}addRowBreak(t,o=!0){return this.rowBreaks.push({id:t,manual:o}),this}addColBreak(t,o=!0){return this.colBreaks.push({id:t,manual:o}),this}getRowBreaks(){return this.rowBreaks}getColBreaks(){return this.colBreaks}addFormControl(t){if(!t.to&&(t.width||t.height)){let s=t.width??100,r=t.height??30,a=t.from.col+s/64,i=t.from.row+r/20;t={...t,to:{col:Math.floor(a),row:Math.floor(i),colOff:Math.round(a%1*64),rowOff:Math.round(i%1*20)}}}return this.formControls.push(t),this}getFormControls(){return this.formControls}addShape(t){return this.shapes.push(t),this}getShapes(){return this.shapes}addOleObject(t){return this.oleObjects.push(t),this}getOleObjects(){return this.oleObjects}addWordArt(t){return this.wordArt.push(t),this}getWordArt(){return this.wordArt}addQueryTable(t){return this.queryTables.push(t),this}getQueryTables(){return this.queryTables}addTableSlicer(t){return this.tableSlicers.push(t),this}getTableSlicers(){return this.tableSlicers}addMathEquation(t){return this.mathEquations.push(t),this}getMathEquations(){return this.mathEquations}addIgnoredError(t,o){return this.ignoreErrors.push({sqref:t,...o}),this}getIgnoredErrors(){return this.ignoreErrors}addPreservedXml(t){return this.preservedXml.push(t),this}freeze(t,o){return this.freezePane={row:t,col:o},this}toXml(t,o){let n=this.pageSetup?.fitToPage,s=this.options?.tabColor,r=n||s?`<sheetPr>${s?`<tabColor rgb="${s}"/>`:""}${n?'<pageSetUpPr fitToPage="1"/>':""}</sheetPr>`:"",a=this._sheetViewXml(),i=this._colsXml(t),l=this._sheetDataXml(t,o),h=this._mergesXml(),m=this._conditionalFormatXml(t),c=this._dataValidationsXml(),d=this.autoFilter&&!this.tables.some(A=>A.ref===this.autoFilter.ref)?this._autoFilterXml():"",f=this.tables.length?`<tableParts count="${this.tables.length}">${this.tableRIds.map(A=>`<tablePart r:id="${A}"/>`).join("")}</tableParts>`:"",p=this.drawingRId?`<drawing r:id="${this.drawingRId}"/>`:"",g=this.legacyDrawingRId?`<legacyDrawing r:id="${this.legacyDrawingRId}"/>`:"",u=this._formControlsXml(),$=this._oleObjectsXml(),x=this._sparklineXml(),b=this._customIconExtXml(),C=this.slicerRId?`<extLst><ext uri="{A8765BA9-456A-4dab-B4F3-ACF838C121DE}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerList><x14:slicer r:id="${this.slicerRId}"/></x14:slicerList></ext></extLst>`:"",y=this._ignoredErrorsXml(),v=this._protectionXml(),w=this._pageSetupXml(),k=this._pageMarginsXml(),T=this._headerFooterXml(),S=this._printOptionsXml(),D=this._pageBreaksXml("rowBreaks",this.rowBreaks,16383),R=this._pageBreaksXml("colBreaks",this.colBreaks,1048575);return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
2
  <worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
3
3
  xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
4
4
  xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"
@@ -73,7 +73,7 @@ ${s}
73
73
  xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">
74
74
  ${n.join(`
75
75
  `)}
76
- </xdr:wsDr>`}};function Ns(e){let t=0;for(let o=e.length-1;o>=0;o--)t=t>>14&1|t<<1&32767,t^=e.charCodeAt(o);return t=t>>14&1|t<<1&32767,t^=e.length,t^=52811,t.toString(16).toUpperCase().padStart(4,"0")}function to(e,t){if(!t)return"";if(t.startsWith("theme:"))return`<${e} theme="${t.slice(6)}"/>`;let o=t.startsWith("#")?"FF"+t.slice(1):t;return`<${e} rgb="${o}"/>`}function No(e){let t=[];return e.bold&&t.push("<b/>"),e.italic&&t.push("<i/>"),e.strike&&t.push("<strike/>"),e.underline&&e.underline!=="none"&&t.push(`<u val="${e.underline}"/>`),e.vertAlign&&t.push(`<vertAlign val="${e.vertAlign}"/>`),e.size&&t.push(`<sz val="${e.size}"/>`),e.color&&t.push(to("color",e.color)),e.name&&t.push(`<name val="${I(e.name)}"/>`),e.family&&t.push(`<family val="${e.family}"/>`),e.scheme&&t.push(`<scheme val="${e.scheme}"/>`),e.charset&&t.push(`<charset val="${e.charset}"/>`),t.join("")}function uo(e){if(e.type==="pattern"){let s=e,r=to("fgColor",s.fgColor),a=to("bgColor",s.bgColor);return`<patternFill patternType="${s.pattern}">${r}${a}</patternFill>`}let t=e,o=t.stops.map(s=>`<stop position="${s.position}">${to("color",s.color)}</stop>`).join("");return`<gradientFill ${[t.gradientType?`type="${t.gradientType}"`:"",t.degree!==void 0?`degree="${t.degree}"`:"",t.left!==void 0?`left="${t.left}"`:"",t.right!==void 0?`right="${t.right}"`:"",t.top!==void 0?`top="${t.top}"`:"",t.bottom!==void 0?`bottom="${t.bottom}"`:""].filter(Boolean).join(" ")}>${o}</gradientFill>`}function Je(e,t){if(!t)return`<${e}/>`;let o=to("color",t.color);return t.style?`<${e} style="${t.style}">${o}</${e}>`:`<${e}/>`}function Xo(e){let t=[e.diagonalUp?'diagonalUp="1"':"",e.diagonalDown?'diagonalDown="1"':""].filter(Boolean).join(" ");return`<border${t?" "+t:""}>`+Je("left",e.left)+Je("right",e.right)+Je("top",e.top)+Je("bottom",e.bottom)+Je("diagonal",e.diagonal)+"</border>"}function $n(e){return`<alignment ${[e.horizontal?`horizontal="${e.horizontal}"`:"",e.vertical?`vertical="${e.vertical}"`:"",e.wrapText?'wrapText="1"':"",e.shrinkToFit?'shrinkToFit="1"':"",e.textRotation!==void 0?`textRotation="${e.textRotation}"`:"",e.indent?`indent="${e.indent}"`:"",e.readingOrder!==void 0?`readingOrder="${e.readingOrder}"`:""].filter(Boolean).join(" ")}/>`}var Oe=class{constructor(){this.fonts=[],this.fills=[],this.borders=[],this.fontIdx=new Map,this.fillIdx=new Map,this.borderIdx=new Map,this.numFmts=new Map,this.xfs=[],this.styleKey=new Map,this.dxfs=[],this.nextNumFmtId=164,this.cellStyleXfs=[],this.cellStyleNames=[],this.tableStyleDefs=[];let t=No({name:"Calibri",size:11,scheme:"minor"});this.fonts.push(t),this.fontIdx.set(t,0);let o=uo({type:"pattern",pattern:"none"}),n=uo({type:"pattern",pattern:"gray125"});this.fills.push(o,n),this.fillIdx.set(o,0),this.fillIdx.set(n,1);let s=Xo({});this.borders.push(s),this.borderIdx.set(s,0),this.cellStyleXfs.push('<xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>'),this.cellStyleNames.push({name:"Normal",xfId:0,builtinId:0}),this.xfs.push('<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>')}registerNamedStyle(t,o,n){let s=this.internFont(o.font),r=this.internFill(o.fill),a=this.internBorder(o.border),i=this.internNumFmt(o.numberFormat,o.numFmtId),l=o.font?' applyFont="1"':"",h=o.fill?' applyFill="1"':"",m=o.border?' applyBorder="1"':"",c=o.alignment?' applyAlignment="1"':"",d=o.numberFormat||o.numFmtId!==void 0?' applyNumberFormat="1"':"",f=o.alignment?$n(o.alignment):"",p=`<xf numFmtId="${i}" fontId="${s}" fillId="${r}" borderId="${a}"${l}${h}${m}${c}${d}>${f}</xf>`;this.cellStyleXfs.push(p);let g=this.cellStyleXfs.length-1;return this.cellStyleNames.push({name:t,xfId:g,builtinId:n}),g}internFont(t){if(!t)return 0;let o=No(t),n=this.fontIdx.get(o);if(n!==void 0)return n;let s=this.fonts.length;return this.fonts.push(o),this.fontIdx.set(o,s),s}internFill(t){if(!t)return 0;let o=uo(t),n=this.fillIdx.get(o);if(n!==void 0)return n;let s=this.fills.length;return this.fills.push(o),this.fillIdx.set(o,s),s}internBorder(t){if(!t)return 0;let o=Xo(t),n=this.borderIdx.get(o);if(n!==void 0)return n;let s=this.borders.length;return this.borders.push(o),this.borderIdx.set(o,s),s}internNumFmt(t,o){if(o!==void 0)return o;if(!t)return 0;if(this.numFmts.has(t.formatCode))return this.numFmts.get(t.formatCode);let n=this.nextNumFmtId++;return this.numFmts.set(t.formatCode,n),n}register(t){if(!t)return 0;let o=JSON.stringify(t);if(this.styleKey.has(o))return this.styleKey.get(o);let n=this.internFont(t.font),s=this.internFill(t.fill),r=this.internBorder(t.border),a=this.internNumFmt(t.numberFormat,t.numFmtId),i=t.font?' applyFont="1"':"",l=t.fill?' applyFill="1"':"",h=t.border?' applyBorder="1"':"",m=t.alignment?' applyAlignment="1"':"",c=t.numberFormat||t.numFmtId!==void 0?' applyNumberFormat="1"':"",d=t.locked!==void 0||t.hidden!==void 0?' applyProtection="1"':"",f=t.alignment?$n(t.alignment):"",p=t.locked!==void 0||t.hidden!==void 0?`<protection${t.locked!==void 0?` locked="${t.locked?"1":"0"}"`:""}${t.hidden!==void 0?` hidden="${t.hidden?"1":"0"}"`:""}/>`:"",g=t.namedStyleId??0,u=`<xf numFmtId="${a}" fontId="${n}" fillId="${s}" borderId="${r}" xfId="${g}"${i}${l}${h}${m}${c}${d}>${f}${p}</xf>`;this.xfs.push(u);let $=this.xfs.length-1;return this.styleKey.set(o,$),$}registerDxf(t){let o=[];if(t.font&&o.push(`<font>${No(t.font)}</font>`),t.numberFormat){let s=this.internNumFmt(t.numberFormat);o.push(`<numFmt numFmtId="${s}" formatCode="${I(t.numberFormat.formatCode)}"/>`)}t.fill&&o.push(`<fill>${uo(t.fill)}</fill>`),t.alignment&&o.push(`<alignment${t.alignment.horizontal?` horizontal="${t.alignment.horizontal}"`:""}${t.alignment.vertical?` vertical="${t.alignment.vertical}"`:""}${t.alignment.wrapText?' wrapText="1"':""}${t.alignment.textRotation?` textRotation="${t.alignment.textRotation}"`:""}/>`),t.border&&o.push(Xo(t.border));let n=o.join("");return this.dxfs.push(n),this.dxfs.length-1}prependRawDxfs(t){this.dxfs.unshift(...t)}registerTableStyle(t,o){let n=[];o.headerRow&&n.push({type:"headerRow",dxfId:this.registerDxf(o.headerRow)}),o.totalRow&&n.push({type:"totalRow",dxfId:this.registerDxf(o.totalRow)}),o.dataRow1&&n.push({type:"firstRowStripe",dxfId:this.registerDxf(o.dataRow1)}),o.dataRow2&&n.push({type:"secondRowStripe",dxfId:this.registerDxf(o.dataRow2)}),this.tableStyleDefs.push({name:t,elements:n})}toXml(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
76
+ </xdr:wsDr>`}};function Ns(e){let t=0;for(let o=e.length-1;o>=0;o--)t=t>>14&1|t<<1&32767,t^=e.charCodeAt(o);return t=t>>14&1|t<<1&32767,t^=e.length,t^=52811,t.toString(16).toUpperCase().padStart(4,"0")}function to(e,t){if(!t)return"";if(t.startsWith("theme:")){let n=t.slice(6),s=n.indexOf(":tint:");if(s>=0){let r=n.slice(0,s),a=n.slice(s+6);return`<${e} theme="${r}" tint="${a}"/>`}return`<${e} theme="${n}"/>`}let o=t.startsWith("#")?"FF"+t.slice(1):t;return`<${e} rgb="${o}"/>`}function No(e){let t=[];return e.bold&&t.push("<b/>"),e.italic&&t.push("<i/>"),e.strike&&t.push("<strike/>"),e.underline&&e.underline!=="none"&&t.push(`<u val="${e.underline}"/>`),e.vertAlign&&t.push(`<vertAlign val="${e.vertAlign}"/>`),e.size&&t.push(`<sz val="${e.size}"/>`),e.color&&t.push(to("color",e.color)),e.name&&t.push(`<name val="${I(e.name)}"/>`),e.family&&t.push(`<family val="${e.family}"/>`),e.scheme&&t.push(`<scheme val="${e.scheme}"/>`),e.charset&&t.push(`<charset val="${e.charset}"/>`),t.join("")}function uo(e){if(e.type==="pattern"){let s=e,r=to("fgColor",s.fgColor),a=to("bgColor",s.bgColor);return`<patternFill${s.pattern?` patternType="${s.pattern}"`:""}>${r}${a}</patternFill>`}let t=e,o=t.stops.map(s=>`<stop position="${s.position}">${to("color",s.color)}</stop>`).join("");return`<gradientFill ${[t.gradientType?`type="${t.gradientType}"`:"",t.degree!==void 0?`degree="${t.degree}"`:"",t.left!==void 0?`left="${t.left}"`:"",t.right!==void 0?`right="${t.right}"`:"",t.top!==void 0?`top="${t.top}"`:"",t.bottom!==void 0?`bottom="${t.bottom}"`:""].filter(Boolean).join(" ")}>${o}</gradientFill>`}function Je(e,t){if(!t)return`<${e}/>`;let o=to("color",t.color);return t.style?`<${e} style="${t.style}">${o}</${e}>`:`<${e}/>`}function Xo(e){let t=[e.diagonalUp?'diagonalUp="1"':"",e.diagonalDown?'diagonalDown="1"':""].filter(Boolean).join(" ");return`<border${t?" "+t:""}>`+Je("left",e.left)+Je("right",e.right)+Je("top",e.top)+Je("bottom",e.bottom)+Je("diagonal",e.diagonal)+"</border>"}function $n(e){return`<alignment ${[e.horizontal?`horizontal="${e.horizontal}"`:"",e.vertical?`vertical="${e.vertical}"`:"",e.wrapText?'wrapText="1"':"",e.shrinkToFit?'shrinkToFit="1"':"",e.textRotation!==void 0?`textRotation="${e.textRotation}"`:"",e.indent?`indent="${e.indent}"`:"",e.readingOrder!==void 0?`readingOrder="${e.readingOrder}"`:""].filter(Boolean).join(" ")}/>`}var Oe=class{constructor(){this.fonts=[],this.fills=[],this.borders=[],this.fontIdx=new Map,this.fillIdx=new Map,this.borderIdx=new Map,this.numFmts=new Map,this.xfs=[],this.styleKey=new Map,this.dxfs=[],this.nextNumFmtId=164,this.cellStyleXfs=[],this.cellStyleNames=[],this.tableStyleDefs=[];let t=No({name:"Calibri",size:11,scheme:"minor"});this.fonts.push(t),this.fontIdx.set(t,0);let o=uo({type:"pattern",pattern:"none"}),n=uo({type:"pattern",pattern:"gray125"});this.fills.push(o,n),this.fillIdx.set(o,0),this.fillIdx.set(n,1);let s=Xo({});this.borders.push(s),this.borderIdx.set(s,0),this.cellStyleXfs.push('<xf numFmtId="0" fontId="0" fillId="0" borderId="0"/>'),this.cellStyleNames.push({name:"Normal",xfId:0,builtinId:0}),this.xfs.push('<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>')}registerNamedStyle(t,o,n){let s=this.internFont(o.font),r=this.internFill(o.fill),a=this.internBorder(o.border),i=this.internNumFmt(o.numberFormat,o.numFmtId),l=o.font?' applyFont="1"':"",h=o.fill?' applyFill="1"':"",m=o.border?' applyBorder="1"':"",c=o.alignment?' applyAlignment="1"':"",d=o.numberFormat||o.numFmtId!==void 0?' applyNumberFormat="1"':"",f=o.alignment?$n(o.alignment):"",p=`<xf numFmtId="${i}" fontId="${s}" fillId="${r}" borderId="${a}"${l}${h}${m}${c}${d}>${f}</xf>`;this.cellStyleXfs.push(p);let g=this.cellStyleXfs.length-1;return this.cellStyleNames.push({name:t,xfId:g,builtinId:n}),g}internFont(t){if(!t)return 0;let o=No(t),n=this.fontIdx.get(o);if(n!==void 0)return n;let s=this.fonts.length;return this.fonts.push(o),this.fontIdx.set(o,s),s}internFill(t){if(!t)return 0;let o=uo(t),n=this.fillIdx.get(o);if(n!==void 0)return n;let s=this.fills.length;return this.fills.push(o),this.fillIdx.set(o,s),s}internBorder(t){if(!t)return 0;let o=Xo(t),n=this.borderIdx.get(o);if(n!==void 0)return n;let s=this.borders.length;return this.borders.push(o),this.borderIdx.set(o,s),s}internNumFmt(t,o){if(o!==void 0)return o;if(!t)return 0;if(this.numFmts.has(t.formatCode))return this.numFmts.get(t.formatCode);let n=this.nextNumFmtId++;return this.numFmts.set(t.formatCode,n),n}register(t){if(!t)return 0;let o=JSON.stringify(t);if(this.styleKey.has(o))return this.styleKey.get(o);let n=this.internFont(t.font),s=this.internFill(t.fill),r=this.internBorder(t.border),a=this.internNumFmt(t.numberFormat,t.numFmtId),i=t.font?' applyFont="1"':"",l=t.fill?' applyFill="1"':"",h=t.border?' applyBorder="1"':"",m=t.alignment?' applyAlignment="1"':"",c=t.numberFormat||t.numFmtId!==void 0?' applyNumberFormat="1"':"",d=t.locked!==void 0||t.hidden!==void 0?' applyProtection="1"':"",f=t.alignment?$n(t.alignment):"",p=t.locked!==void 0||t.hidden!==void 0?`<protection${t.locked!==void 0?` locked="${t.locked?"1":"0"}"`:""}${t.hidden!==void 0?` hidden="${t.hidden?"1":"0"}"`:""}/>`:"",g=t.namedStyleId??0,u=`<xf numFmtId="${a}" fontId="${n}" fillId="${s}" borderId="${r}" xfId="${g}"${i}${l}${h}${m}${c}${d}>${f}${p}</xf>`;this.xfs.push(u);let $=this.xfs.length-1;return this.styleKey.set(o,$),$}registerDxf(t){let o=[];if(t.font&&o.push(`<font>${No(t.font)}</font>`),t.numberFormat){let s=this.internNumFmt(t.numberFormat);o.push(`<numFmt numFmtId="${s}" formatCode="${I(t.numberFormat.formatCode)}"/>`)}t.fill&&o.push(`<fill>${uo(t.fill)}</fill>`),t.alignment&&o.push(`<alignment${t.alignment.horizontal?` horizontal="${t.alignment.horizontal}"`:""}${t.alignment.vertical?` vertical="${t.alignment.vertical}"`:""}${t.alignment.wrapText?' wrapText="1"':""}${t.alignment.textRotation?` textRotation="${t.alignment.textRotation}"`:""}/>`),t.border&&o.push(Xo(t.border));let n=o.join("");return this.dxfs.push(n),this.dxfs.length-1}prependRawDxfs(t){this.dxfs.unshift(...t)}registerTableStyle(t,o){let n=[];o.headerRow&&n.push({type:"headerRow",dxfId:this.registerDxf(o.headerRow)}),o.totalRow&&n.push({type:"totalRow",dxfId:this.registerDxf(o.totalRow)}),o.dataRow1&&n.push({type:"firstRowStripe",dxfId:this.registerDxf(o.dataRow1)}),o.dataRow2&&n.push({type:"secondRowStripe",dxfId:this.registerDxf(o.dataRow2)}),this.tableStyleDefs.push({name:t,elements:n})}toXml(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
77
77
  <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
78
78
  ${this.numFmts.size?`<numFmts count="${this.numFmts.size}">${[...this.numFmts.entries()].map(([o,n])=>`<numFmt numFmtId="${n}" formatCode="${I(o)}"/>`).join("")}</numFmts>`:""}
79
79
  <fonts count="${this.fonts.length}">${this.fonts.map(o=>`<font>${o}</font>`).join("")}</fonts>
@@ -251,7 +251,7 @@ ${t??""}
251
251
  ${e.map(n=>{let s,r=n.value;switch(r.type){case"string":s=`<vt:lpwstr>${I(r.value)}</vt:lpwstr>`;break;case"int":s=`<vt:i4>${r.value}</vt:i4>`;break;case"decimal":s=`<vt:decimal>${r.value}</vt:decimal>`;break;case"bool":s=`<vt:bool>${r.value}</vt:bool>`;break;case"date":s=`<vt:filetime>${r.value.toISOString()}</vt:filetime>`;break;case"r8":s=`<vt:r8>${r.value}</vt:r8>`;break;case"i8":s=`<vt:i8>${r.value}</vt:i8>`;break;case"error":s=`<vt:error>${I(r.value)}</vt:error>`;break;default:s="<vt:lpwstr></vt:lpwstr>";break}return`<property fmtid="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}" pid="${t++}" name="${I(n.name)}">${s}</property>`}).join(`
252
252
  `)}
253
253
  </Properties>`}function Wn(e){let t=Lt(e),o=s=>{let r=t.children.find(a=>ct(a.tag)===s);return r?.text??r?.children[0]?.text},n=s=>{let r=o(s);return r?new Date(r):void 0};return{title:o("title"),subject:o("subject"),creator:o("creator"),keywords:o("keywords"),description:o("description"),lastModifiedBy:o("lastModifiedBy"),revision:o("revision"),created:n("created"),modified:n("modified"),category:o("category"),contentStatus:o("contentStatus"),language:o("language"),identifier:o("identifier"),version:o("version")}}function Hn(e){let t=Lt(e),o=d=>t.children.find(f=>ct(f.tag)===d)?.text,n=d=>{let f=o(d);return f!==void 0?Number(f):void 0},s=d=>{let f=o(d);return f!==void 0?f==="true"||f==="1":void 0},r,a=t.children.find(d=>ct(d.tag)==="HeadingPairs");if(a){let d=a.children[0];if(d){let f=d.children.filter(p=>ct(p.tag)==="variant");r=[];for(let p=0;p<f.length-1;p+=2){let g=f[p].children[0],u=f[p+1].children[0];r.push({name:g?.text??"",count:parseInt(u?.text??"0",10)})}}}let i,l=t.children.find(d=>ct(d.tag)==="TitlesOfParts");if(l){let d=l.children[0];d&&(i=d.children.map(f=>f.text??""))}let h=new Set(["Application","AppVersion","Company","Manager","DocSecurity","ScaleCrop","LinksUpToDate","SharedDoc","HyperlinksChanged","Characters","CharactersWithSpaces","Words","Lines","Paragraphs","Pages","Slides","Notes","HiddenSlides","MMClips","Template","PresentationFormat","TotalTime","HyperlinkBase","HeadingPairs","TitlesOfParts"]),c=t.children.filter(d=>!h.has(ct(d.tag))).map(d=>{let f=Object.entries(d.attrs).map(([g,u])=>` ${g}="${u}"`).join(""),p=d.text??"";return!p&&!d.children.length?`<${d.tag}${f}/>`:`<${d.tag}${f}>${p}</${d.tag}>`}).join(`
254
- `);return{props:{application:o("Application"),appVersion:o("AppVersion"),company:o("Company"),manager:o("Manager"),docSecurity:n("DocSecurity"),scaleCrop:s("ScaleCrop"),linksUpToDate:s("LinksUpToDate"),sharedDoc:s("SharedDoc"),hyperlinksChanged:s("HyperlinksChanged"),characters:n("Characters"),charactersByWord:n("CharactersWithSpaces"),words:n("Words"),lines:n("Lines"),paragraphs:n("Paragraphs"),pages:n("Pages"),slides:n("Slides"),notes:n("Notes"),hiddenSlides:n("HiddenSlides"),mmClips:n("MMClips"),template:o("Template"),presentationFormat:o("PresentationFormat"),totalTime:n("TotalTime"),hyperlinkBase:o("HyperlinkBase"),headingPairs:r,titlesOfParts:i},unknownRaw:c}}function zn(e){return Lt(e).children.filter(o=>ct(o.tag)==="property").map(o=>{let n=o.attrs.name??"",s=o.children[0];if(!s)return null;let r=ct(s.tag),a=s.text??"",i;switch(r){case"lpwstr":case"lpstr":case"bstr":i={type:"string",value:a};break;case"i4":case"int":i={type:"int",value:parseInt(a,10)};break;case"decimal":i={type:"decimal",value:parseFloat(a)};break;case"bool":i={type:"bool",value:a==="true"||a==="1"};break;case"filetime":i={type:"date",value:new Date(a)};break;case"r8":i={type:"r8",value:parseFloat(a)};break;case"i8":i={type:"i8",value:BigInt(a)};break;case"error":i={type:"error",value:a};break;default:i={type:"string",value:a};break}return{name:n,value:i}}).filter(Boolean)}function sn(e){let t=new Map;try{let o=Lt(e);for(let n of o.children)if(ct(n.tag)==="Relationship"){let s={type:n.attrs.Type??"",target:n.attrs.Target??""};n.attrs.TargetMode&&(s.targetMode=n.attrs.TargetMode),t.set(n.attrs.Id??"",s)}}catch{}return t}function Nr(e){let t=new Map;try{let o=Lt(e);for(let n of o.children)if(ct(n.tag)==="Override"){let r=n.attrs.PartName??"",a=n.attrs.ContentType??"";t.set(r.startsWith("/")?r.slice(1):r,a)}}catch{}return t}function Xr(e){let t=Lt(e),o=new Map,n=[],s={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"mm-dd-yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@"},r=oe(t,"numFmts");if(r)for(let g of ut(r,"numFmt")){let u=parseInt(g.attrs.numFmtId??"0",10),$=g.attrs.formatCode??"";o.set(u,$)}let a=oe(t,"fonts"),i=[];if(a)for(let g of ut(a,"font"))i.push(rn(g));let l=oe(t,"fills"),h=[];if(l)for(let g of ut(l,"fill"))h.push(Gn(g));let m=oe(t,"borders"),c=[];if(m)for(let g of ut(m,"border"))c.push(qn(g));let d=oe(t,"cellXfs");if(d)for(let g of ut(d,"xf")){let u=parseInt(g.attrs.fontId??"0",10),$=parseInt(g.attrs.fillId??"0",10),x=parseInt(g.attrs.borderId??"0",10),b=parseInt(g.attrs.numFmtId??"0",10),C=g.attrs.applyFont==="1",y=g.attrs.applyFill==="1",v=g.attrs.applyBorder==="1",w=g.attrs.applyAlignment==="1",k=g.attrs.applyNumberFormat==="1",T=g.attrs.applyProtection==="1",S={};C&&i[u]&&(S.font=i[u]),y&&h[$]&&(S.fill=h[$]),v&&c[x]&&(S.border=c[x]),k&&b!==0&&(o.has(b)?S.numberFormat={formatCode:o.get(b)}:s[b]&&(S.numFmtId=b));let D=B(g,"alignment");w&&D&&(S.alignment=Kn(D));let R=B(g,"protection");T&&R&&(R.attrs.locked!==void 0&&(S.locked=R.attrs.locked!=="0"),R.attrs.hidden!==void 0&&(S.hidden=R.attrs.hidden!=="0")),n.push(S)}let f=[],p=oe(t,"dxfs");if(p)for(let g of ut(p,"dxf")){let u={},$=B(g,"font");$&&(u.font=rn($));let x=B(g,"fill");x&&(u.fill=Gn(x));let b=B(g,"border");b&&(u.border=qn(b));let C=B(g,"numFmt");if(C){let v=C.attrs.formatCode??"";v&&(u.numberFormat={formatCode:v})}let y=B(g,"alignment");y&&(u.alignment=Kn(y)),f.push(u)}return{xfs:n,numFmts:o,dxfs:f}}function oe(e,t){if(ct(e.tag)===t)return e;for(let o of e.children){let n=oe(o,t);if(n)return n}}function rn(e){let t={};for(let o of e.children)switch(ct(o.tag)){case"b":t.bold=o.attrs.val!=="0";break;case"i":t.italic=o.attrs.val!=="0";break;case"strike":t.strike=o.attrs.val!=="0";break;case"u":t.underline=o.attrs.val??"single";break;case"sz":t.size=parseFloat(o.attrs.val??"11");break;case"name":t.name=o.attrs.val;break;case"family":t.family=parseInt(o.attrs.val??"0",10);break;case"scheme":t.scheme=o.attrs.val;break;case"charset":t.charset=parseInt(o.attrs.val??"0",10);break;case"vertAlign":t.vertAlign=o.attrs.val;break;case"color":{let n=o.attrs.rgb,s=o.attrs.theme;n?t.color=n:s&&(t.color=`theme:${s}`);break}}return t}function Gn(e){let t=B(e,"patternFill");if(t){let n=B(t,"fgColor"),s=B(t,"bgColor");return{type:"pattern",pattern:t.attrs.patternType??"none",fgColor:n?.attrs.rgb??(n?.attrs.theme?`theme:${n.attrs.theme}`:void 0),bgColor:s?.attrs.rgb??(s?.attrs.theme?`theme:${s.attrs.theme}`:void 0)}}let o=B(e,"gradientFill");if(o){let n=ut(o,"stop").concat(ut(o,"gradientStop")).map(s=>{let r=B(s,"color");return{position:parseFloat(s.attrs.position??"0"),color:r?.attrs.rgb??(r?.attrs.theme?`theme:${r.attrs.theme}`:"FF000000")}});return{type:"gradient",gradientType:o.attrs.type,degree:o.attrs.degree?parseFloat(o.attrs.degree):void 0,stops:n}}return{type:"pattern",pattern:"none"}}function qn(e){let t=o=>{let n=B(e,o);if(!n)return;let s=n.attrs.style,r=B(n,"color");if(!s&&!r)return;let a=r?.attrs.rgb??(r?.attrs.theme?`theme:${r.attrs.theme}`:void 0);return{style:s,color:a}};return{left:t("left"),right:t("right"),top:t("top"),bottom:t("bottom"),diagonal:t("diagonal"),diagonalUp:e.attrs.diagonalUp==="1",diagonalDown:e.attrs.diagonalDown==="1"}}function Kn(e){let t={};return e.attrs.horizontal&&(t.horizontal=e.attrs.horizontal),e.attrs.vertical&&(t.vertical=e.attrs.vertical),e.attrs.wrapText&&(t.wrapText=e.attrs.wrapText!=="0"),e.attrs.shrinkToFit&&(t.shrinkToFit=e.attrs.shrinkToFit!=="0"),e.attrs.textRotation&&(t.textRotation=parseInt(e.attrs.textRotation,10)),e.attrs.indent&&(t.indent=parseInt(e.attrs.indent,10)),e.attrs.readingOrder&&(t.readingOrder=parseInt(e.attrs.readingOrder,10)),t}function Ur(e){let t=Lt(e);return ut(t,"si").map(o=>{let n=B(o,"t"),s=ut(o,"r");if(n&&!s.length)return{text:n.text??""};let r=s.map(l=>{let h=B(l,"t")?.text??"",m=B(l,"rPr"),c={text:h};return m&&(c.font=rn(m)),c}),a=r.map(l=>l.text).join("");return r.some(l=>l.font&&Object.keys(l.font).length>0)?{text:a,richText:r}:{text:a}})}function Vr(e,t,o,n){let s=new Ie(t),r=Lt(e),a=[],i=[],l="",h="",m=[],c=new Map,d=new Set(["sheetPr","dimension","sheetViews","sheetFormatPr","cols","sheetData","mergeCells","conditionalFormatting","dataValidations","sheetProtection","printOptions","pageMargins","pageSetup","headerFooter","drawing","tableParts","autoFilter","rowBreaks","colBreaks","picture","oleObjects","ctrlProps","legacyDrawing","AlternateContent","extLst"]);for(let f of r.children){let p=ct(f.tag);switch(p){case"sheetViews":Wr(f,s);break;case"cols":Hr(f,s,o);break;case"sheetData":zr(f,s,o,n,c);break;case"mergeCells":Gr(f,s);break;case"autoFilter":s.autoFilter={ref:f.attrs.ref??""};break;case"tableParts":for(let g of ut(f,"tablePart")){let u=g.attrs["r:id"]??"";u&&i.push(u)}break;case"sheetProtection":qr(f,s);break;case"pageMargins":Kr(f,s);break;case"pageSetup":Zr(f,s);break;case"headerFooter":Yr(f,s);break;case"printOptions":Qr(f,s);break;case"conditionalFormatting":Jr(f,s,o);break;case"dataValidations":ta(f,s);break;case"rowBreaks":for(let g of ut(f,"brk")){let u=parseInt(g.attrs.id??"0",10);u>0&&s.addRowBreak(u,g.attrs.man==="1")}break;case"colBreaks":for(let g of ut(f,"brk")){let u=parseInt(g.attrs.id??"0",10);u>0&&s.addColBreak(u,g.attrs.man==="1")}break;case"drawing":h=f.attrs["r:id"]??"";break;case"legacyDrawing":l=f.attrs["r:id"]??"";break;case"AlternateContent":{let g=f.children.find($=>typeof $!="string"&&ct($.tag)==="Choice"),u=g?g.children.find($=>typeof $!="string"&&ct($.tag)==="controls"):void 0;if(u)for(let $ of u.children){if(typeof $=="string")continue;let x;if(ct($.tag)==="control"?x=$:ct($.tag)==="AlternateContent"&&(x=$.children.find(v=>typeof v!="string"&&ct(v.tag)==="Choice")?.children.find(v=>typeof v!="string"&&ct(v.tag)==="control")),!x)continue;let b=x.children.find(y=>typeof y!="string"&&ct(y.tag)==="controlPr"),C=x.attrs["r:id"]??b?.attrs["r:id"]??"";C&&m.push(C)}break}case"extLst":ra(f,s);break;default:d.has(p)||a.push(ro(f));break}}return{ws:s,originalXml:e,unknownParts:a,tableRIds:i,legacyDrawingRId:l,ctrlPropRIds:m,drawingRId:h,vmCells:c}}function Wr(e,t){let o=ut(e,"sheetView")[0];if(!o)return;t.view={showGridLines:o.attrs.showGridLines!=="0",showRowColHeaders:o.attrs.showRowColHeaders!=="0",zoomScale:o.attrs.zoomScale?parseInt(o.attrs.zoomScale,10):void 0,rightToLeft:o.attrs.rightToLeft==="1",tabSelected:o.attrs.tabSelected==="1",view:o.attrs.view};let n=B(o,"pane");n&&n.attrs.state==="frozen"&&(t.freezePane={col:n.attrs.xSplit?parseInt(n.attrs.xSplit,10):void 0,row:n.attrs.ySplit?parseInt(n.attrs.ySplit,10):void 0})}function Hr(e,t,o){for(let n of ut(e,"col")){let s=parseInt(n.attrs.min??"1",10),r=parseInt(n.attrs.max??"1",10),a={width:n.attrs.width?parseFloat(n.attrs.width):void 0,hidden:n.attrs.hidden==="1",customWidth:n.attrs.customWidth==="1",outlineLevel:n.attrs.outlineLevel?parseInt(n.attrs.outlineLevel,10):void 0,style:n.attrs.style?o.xfs[parseInt(n.attrs.style,10)]:void 0};for(let i=s;i<=r;i++)t.setColumn(i,a)}}function zr(e,t,o,n,s){for(let r of ut(e,"row")){let a=parseInt(r.attrs.r??"0",10);if(!a)continue;let i={};r.attrs.ht&&(i.height=parseFloat(r.attrs.ht)),r.attrs.hidden&&(i.hidden=r.attrs.hidden==="1"),r.attrs.outlineLevel&&(i.outlineLevel=parseInt(r.attrs.outlineLevel,10)),r.attrs.collapsed&&(i.collapsed=r.attrs.collapsed==="1"),r.attrs.s&&(i.style=o.xfs[parseInt(r.attrs.s,10)]),Object.keys(i).length&&t.setRow(a,i);for(let l of ut(r,"c")){let h=l.attrs.r??"";if(!h)continue;let{row:m,col:c}=Gt(h),d=l.attrs.s?parseInt(l.attrs.s,10):0,f=d>0?o.xfs[d]:void 0,p=l.attrs.t??"",g=B(l,"f"),u=B(l,"v"),$={};f&&($.style=f);let x=l.attrs.vm;if(x&&s&&s.set(h,parseInt(x,10)),g)g.attrs.t==="array"?$.arrayFormula=g.text??"":$.formula=g.text??"";else if(u){let b=u.text??"";switch(p){case"s":{let C=parseInt(b,10),y=n[C];y?($.value=y.text,y.richText&&($.richText=y.richText)):$.value="";break}case"b":$.value=b==="1"||b==="true";break;case"str":case"inlineStr":{let C=B(l,"is");$.value=C?B(C,"t")?.text??b:b;break}case"e":$.value=new te(b);break;default:{let C=parseFloat(b);$.value=isNaN(C)?b:C;break}}}(Object.keys($).length||$.value!==void 0)&&t.setCell(m,c,$)}}}function Gr(e,t){for(let o of ut(e,"mergeCell")){let n=o.attrs.ref??"";n.includes(":")&&t.mergeByRef(n)}}function qr(e,t){t.protection={sheet:e.attrs.sheet!=="0",password:void 0,selectLockedCells:e.attrs.selectLockedCells!=="0",selectUnlockedCells:e.attrs.selectUnlockedCells!=="0",formatCells:e.attrs.formatCells==="0",formatColumns:e.attrs.formatColumns==="0",formatRows:e.attrs.formatRows==="0",insertColumns:e.attrs.insertColumns==="0",insertRows:e.attrs.insertRows==="0",insertHyperlinks:e.attrs.insertHyperlinks==="0",deleteColumns:e.attrs.deleteColumns==="0",deleteRows:e.attrs.deleteRows==="0",sort:e.attrs.sort==="0",autoFilter:e.attrs.autoFilter==="0",pivotTables:e.attrs.pivotTables==="0"}}function Kr(e,t){t.pageMargins={left:parseFloat(e.attrs.left??"0.7"),right:parseFloat(e.attrs.right??"0.7"),top:parseFloat(e.attrs.top??"0.75"),bottom:parseFloat(e.attrs.bottom??"0.75"),header:parseFloat(e.attrs.header??"0.3"),footer:parseFloat(e.attrs.footer??"0.3")}}function Zr(e,t){t.pageSetup={paperSize:e.attrs.paperSize?parseInt(e.attrs.paperSize,10):void 0,orientation:e.attrs.orientation,fitToPage:e.attrs.fitToPage==="1",fitToWidth:e.attrs.fitToWidth?parseInt(e.attrs.fitToWidth,10):void 0,fitToHeight:e.attrs.fitToHeight?parseInt(e.attrs.fitToHeight,10):void 0,scale:e.attrs.scale?parseInt(e.attrs.scale,10):void 0,horizontalDpi:e.attrs.horizontalDpi?parseInt(e.attrs.horizontalDpi,10):void 0,verticalDpi:e.attrs.verticalDpi?parseInt(e.attrs.verticalDpi,10):void 0}}function Yr(e,t){t.headerFooter={oddHeader:B(e,"oddHeader")?.text,oddFooter:B(e,"oddFooter")?.text,evenHeader:B(e,"evenHeader")?.text,evenFooter:B(e,"evenFooter")?.text,firstHeader:B(e,"firstHeader")?.text,firstFooter:B(e,"firstFooter")?.text,differentOddEven:e.attrs.differentOddEven==="1",differentFirst:e.attrs.differentFirst==="1"}}function Qr(e,t){t.printOptions={gridLines:e.attrs.gridLines==="1",gridLinesSet:e.attrs.gridLinesSet==="1",headings:e.attrs.headings==="1",centerHorizontal:e.attrs.horizontalCentered==="1",centerVertical:e.attrs.verticalCentered==="1"}}function Jr(e,t,o){let n=e.attrs.sqref??"";for(let s of ut(e,"cfRule")){let r=s.attrs.type??"cellIs",a={sqref:n,type:r};if(s.attrs.operator&&(a.operator=s.attrs.operator),s.attrs.priority&&(a.priority=parseInt(s.attrs.priority,10)),s.attrs.text&&(a.text=s.attrs.text),s.attrs.aboveAverage==="0"&&(a.aboveAverage=!1),s.attrs.percent==="1"&&(a.percent=!0),s.attrs.rank&&(a.rank=parseInt(s.attrs.rank,10)),s.attrs.timePeriod&&(a.timePeriod=s.attrs.timePeriod),s.attrs.dxfId!==void 0){let c=parseInt(s.attrs.dxfId,10);o.dxfs[c]&&(a.style=o.dxfs[c])}let i=ut(s,"formula");i[0]?.text&&(a.formula=i[0].text),i[1]?.text&&(a.formula2=i[1].text);let l=B(s,"colorScale");if(l){let c=ut(l,"cfvo").map(f=>({type:f.attrs.type??"min",val:f.attrs.val})),d=ut(l,"color").map(f=>f.attrs.rgb??f.attrs.theme??"");a.colorScale={type:"colorScale",cfvo:c,color:d}}let h=B(s,"dataBar");if(h){let c=ut(h,"cfvo"),d=B(h,"color");a.dataBar={type:"dataBar",showValue:h.attrs.showValue!=="0"?void 0:!1,minType:c[0]?.attrs.type,minVal:c[0]?.attrs.val,maxType:c[1]?.attrs.type,maxVal:c[1]?.attrs.val,color:d?.attrs.rgb}}let m=B(s,"iconSet");if(m){let c=ut(m,"cfvo").map(d=>({type:d.attrs.type??"percent",val:d.attrs.val}));a.iconSet={type:"iconSet",iconSet:m.attrs.iconSet??"3TrafficLights1",cfvo:c,showValue:m.attrs.showValue==="0"?!1:void 0,reverse:m.attrs.reverse==="1"?!0:void 0}}t.addConditionalFormat(a)}}function ta(e,t){for(let o of ut(e,"dataValidation")){let n=o.attrs.sqref??"";if(!n)continue;let s=o.attrs.type??"whole",r={type:s};o.attrs.operator&&(r.operator=o.attrs.operator),o.attrs.allowBlank==="1"&&(r.allowBlank=!0),o.attrs.showErrorMessage==="1"&&(r.showErrorAlert=!0),o.attrs.errorTitle&&(r.errorTitle=o.attrs.errorTitle),o.attrs.error&&(r.error=o.attrs.error),o.attrs.showInputMessage==="1"&&(r.showInputMessage=!0),o.attrs.promptTitle&&(r.promptTitle=o.attrs.promptTitle),o.attrs.prompt&&(r.prompt=o.attrs.prompt),o.attrs.showDropDown==="1"&&(r.showDropDown=!1);let a=B(o,"formula1"),i=B(o,"formula2");a?.text&&(s==="list"&&a.text.startsWith('"')&&a.text.endsWith('"')?r.list=a.text.slice(1,-1).split(","):r.formula1=a.text),i?.text&&(r.formula2=i.text),t.addDataValidation(n,r)}}function ea(e){try{let t=Lt(e);if(ct(t.tag)!=="table")return null;let n=t.attrs.name??"",s=t.attrs.displayName??n,r=t.attrs.ref??"",a=parseInt(t.attrs.totalsRowCount??"0",10),i=[],l=oe(t,"tableColumns");if(l)for(let c of ut(l,"tableColumn")){let d={name:c.attrs.name??""};c.attrs.totalsRowFunction&&(d.totalsRowFunction=c.attrs.totalsRowFunction),c.attrs.totalsRowFormula&&(d.totalsRowFormula=c.attrs.totalsRowFormula),c.attrs.totalsRowLabel&&(d.totalsRowLabel=c.attrs.totalsRowLabel),i.push(d)}let h={name:n,ref:r,columns:i};s&&s!==n&&(h.displayName=s),a>0&&(h.totalsRow=!0);let m=oe(t,"tableStyleInfo");return m&&(m.attrs.name&&(h.style=m.attrs.name),m.attrs.showFirstColumn==="1"&&(h.showFirstColumn=!0),m.attrs.showLastColumn==="1"&&(h.showLastColumn=!0),m.attrs.showRowStripes==="1"&&(h.showRowStripes=!0),m.attrs.showColumnStripes==="1"&&(h.showColumnStripes=!0)),h}catch{return null}}var De=9525;function Zn(e){return{col:parseInt(B(e,"col")?.text??"0",10),row:parseInt(B(e,"row")?.text??"0",10),colOff:parseInt(B(e,"colOff")?.text??"0",10),rowOff:parseInt(B(e,"rowOff")?.text??"0",10)}}function Yn(e){return{png:"png",jpg:"jpeg",jpeg:"jpeg",gif:"gif",emf:"emf",wmf:"wmf",tiff:"tiff",tif:"tiff",svg:"svg",ico:"ico",webp:"webp",bmp:"bmp"}[e.toLowerCase()]??"png"}function oa(e,t,o,n,s){let r=Lt(e);for(let a of r.children){if(typeof a=="string")continue;let i=ct(a.tag);if(i!=="twoCellAnchor"&&i!=="oneCellAnchor"&&i!=="absoluteAnchor")continue;let l=aa(a,i),h=wt(a,"pic");if(h){ia(h,a,i,l,t,o,n,s);continue}let m=wt(a,"graphicFrame");if(m){na(m,a,i,t,o,n,s);continue}let c=wt(a,"oMath");if(c){la(c,a,i,l,s);continue}let d=wt(a,"sp");if(d){sa(d,a,i,s);continue}}}function na(e,t,o,n,s,r,a){let i=wt(e,"chart");if(!i||!n)return;let l=i.attrs["r:id"]??Vn(i,"r:id")??"";if(!l)return;let h=n.get(l);if(!h)return;let m=h.target.startsWith("/")?h.target.slice(1):We(s,h.target),c=r(m);if(!c)return;let f=new TextDecoder().decode(c.data),p=Lt(f),g={col:0,row:0},u={col:8,row:15};if(o==="twoCellAnchor"){let E=B(t,"from"),_=B(t,"to");E&&(g={col:parseInt(B(E,"col")?.text??"0",10),row:parseInt(B(E,"row")?.text??"0",10)}),_&&(u={col:parseInt(B(_,"col")?.text??"0",10),row:parseInt(B(_,"row")?.text??"0",10)})}let $=wt(p,"plotArea");if(!$)return;let x={barChart:"column",bar3DChart:"column",lineChart:"line",line3DChart:"line",areaChart:"area",area3DChart:"area",pieChart:"pie",pie3DChart:"pie",doughnutChart:"doughnut",scatterChart:"scatter",bubbleChart:"bubble",radarChart:"radar",stockChart:"stock"},b="column",C;for(let E of $.children){if(typeof E=="string")continue;let _=ct(E.tag);if(x[_]){if(b=x[_],C=E,_==="barChart"||_==="bar3DChart"){(B(E,"barDir")?.attrs.val??"")==="bar"&&(b="bar");let V=B(E,"grouping")?.attrs.val??"";V==="stacked"&&(b=b==="bar"?"barStacked":"columnStacked"),V==="percentStacked"&&(b=b==="bar"?"barStacked100":"columnStacked100")}if(_==="lineChart"){let M=wt(E,"marker");if(M){let N=B(M,"symbol")?.attrs.val??"";N&&N!=="none"&&(b="lineMarker")}}_==="scatterChart"&&B(E,"scatterStyle")?.attrs.val?.includes("Smooth")&&(b="scatterSmooth"),_==="radarChart"&&B(E,"radarStyle")?.attrs.val==="filled"&&(b="radarFilled");break}}if(!C)return;let y=[];for(let E of ut(C,"ser")){let _={values:""},M=B(E,"tx");if(M){let K=wt(M,"strRef");if(K){let mt=B(K,"f");mt?.text&&(_.name=mt.text);let it=B(K,"strCache");if(it){let gt=wt(it,"pt"),St=gt?wt(gt,"v"):void 0;St?.text&&(_.name=St.text)}}let z=wt(M,"v");z?.text&&!_.name&&(_.name=z.text)}let N=B(E,"val")||B(E,"yVal");if(N){let K=wt(N,"numRef");if(K){let z=B(K,"f");z?.text&&(_.values=z.text)}}let H=B(E,"cat")||B(E,"xVal");if(H){let K=wt(H,"strRef"),z=wt(H,"numRef"),mt=K||z;if(mt){let it=B(mt,"f");it?.text&&(_.categories=it.text)}}let V=B(E,"spPr");if(V){let K=B(V,"solidFill");if(K){let z=B(K,"srgbClr");z?.attrs.val&&(_.color="#"+z.attrs.val)}}_.values&&y.push(_)}if(!y.length)return;let v,w=B(p,"title")||wt(p,"title");if(w){let E=wt(w,"t");E?.text&&(v=E.text)}let k,T,S=wt($,"catAx")||wt($,"dateAx"),D=wt($,"valAx");if(S){k={};let E=wt(S,"title");if(E){let _=wt(E,"t");_?.text&&(k.title=_.text)}}if(D){T={};let E=wt(D,"title");if(E){let M=wt(E,"t");M?.text&&(T.title=M.text)}B(D,"majorGridlines")&&(T.gridLines=!0)}let R=!1,A=wt(p,"legend");A&&(R=B(A,"legendPos")?.attrs.val||!0);let Q=B(C,"varyColors")?.attrs.val!=="0",q={type:b,series:y,from:g,to:u};v&&(q.title=v),k&&(q.xAxis=k),T&&(q.yAxis=T),R!==!1&&(q.legend=R),Q&&(q.varyColors=!0),a.addChart(q)}function sa(e,t,o,n){let s={col:0,row:0},r={col:2,row:2};if(o==="twoCellAnchor"){let u=B(t,"from"),$=B(t,"to");u&&(s={col:parseInt(B(u,"col")?.text??"0",10),row:parseInt(B(u,"row")?.text??"0",10)}),$&&(r={col:parseInt(B($,"col")?.text??"0",10),row:parseInt(B($,"row")?.text??"0",10)})}let a=wt(e,"spPr"),i="rect",l,h,m,c;if(a){let u=wt(a,"prstGeom");if(u){let C=u.attrs.prst??"";new Set(["rect","roundRect","ellipse","triangle","diamond","pentagon","hexagon","octagon","star5","star6","rightArrow","leftArrow","upArrow","downArrow","line","curvedConnector3","callout1","callout2","cloud","heart","lightningBolt","sun","moon","smileyFace","flowChartProcess","flowChartDecision","flowChartTerminator","flowChartDocument"]).has(C)&&(i=C)}let $=B(a,"solidFill");if($){let C=B($,"srgbClr");C?.attrs.val&&(l="#"+C.attrs.val);let y=B($,"schemeClr");y?.attrs.val&&(l="theme:"+y.attrs.val)}let x=B(a,"ln");if(x){let C=x.attrs.w;C&&(m=Math.round(parseInt(C,10)/De));let y=B(x,"solidFill");if(y){let v=B(y,"srgbClr");v?.attrs.val&&(h="#"+v.attrs.val)}}let b=wt(a,"xfrm");b?.attrs.rot&&(c=parseInt(b.attrs.rot,10)/6e4)}let d,f,p=wt(e,"txBody");if(p){let u=B(p,"bodyPr"),x=(u?B(u,"prstTxWarp"):void 0)?.attrs.prst??u?.attrs.prstTxWarp??"",b=[];for(let y of ut(p,"p"))for(let v of ut(y,"r")){let w=B(v,"t");if(w?.text&&b.push(w.text),!f){let k=B(v,"rPr");if(k){f={},k.attrs.sz&&(f.size=parseInt(k.attrs.sz,10)/100),k.attrs.b==="1"&&(f.bold=!0),k.attrs.i==="1"&&(f.italic=!0);let T=wt(k,"latin");T?.attrs.typeface&&(f.name=T.attrs.typeface);let S=B(k,"solidFill");if(S){let D=B(S,"srgbClr");D?.attrs.val&&(f.color="#"+D.attrs.val)}}}}if(d=b.join(""),x&&new Set(["textPlain","textArchUp","textArchDown","textCircle","textWave1","textWave2","textInflate","textDeflate","textFadeUp","textFadeDown","textFadeLeft","textFadeRight","textSlantUp","textSlantDown","textCascadeUp","textCascadeDown","textChevron","textRingInside","textRingOutside","textStop"]).has(x)&&d){let y={text:d,from:s,to:r};x!=="textPlain"&&(y.preset=x),f&&(y.font=f),l&&(y.fillColor=l),h&&(y.outlineColor=h),n.addWordArt(y);return}}let g={type:i,from:s,to:r};d&&(g.text=d),l&&(g.fillColor=l),h&&(g.lineColor=h),m&&(g.lineWidth=m),f&&(g.font=f),c&&(g.rotation=c),n.addShape(g)}function ra(e,t){for(let o of ut(e,"ext")){let n=o.children?.filter(s=>typeof s!="string"&&ct(s.tag)==="sparklineGroups");if(n?.length)for(let s of n)for(let r of ut(s,"sparklineGroup")){let a=r.attrs.type??"line",i=a==="column"?"bar":a==="stacked"?"stacked":"line",l=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorSeries"),h=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorHigh"),m=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorLow"),c=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorFirst"),d=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorLast"),f=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorNegative"),p=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorMarkers"),g=r.attrs.high==="1",u=r.attrs.low==="1",$=r.attrs.first==="1",x=r.attrs.last==="1",b=r.attrs.negative==="1",C=r.attrs.markers==="1",y=r.attrs.lineWeight,v=y?parseFloat(y):void 0,w=r.attrs.minAxisType==="individual"?"individual":r.attrs.minAxisType==="custom"?"custom":void 0,k=r.attrs.maxAxisType==="individual"?"individual":r.attrs.maxAxisType==="custom"?"custom":void 0,T=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="sparklines");if(!T)continue;let S=T.children?.filter(D=>typeof D!="string"&&ct(D.tag)==="sparkline");if(S)for(let D of S){let R=D.children?.find(E=>typeof E!="string"&&ct(E.tag)==="f"),A=D.children?.find(E=>typeof E!="string"&&ct(E.tag)==="sqref"),W=R?.text??"",Q=A?.text??"";if(!W||!Q)continue;let q={type:i,dataRange:W,location:Q};if(l){let E=l.attrs.rgb;E&&(q.color="#"+E.slice(2));let _=l.attrs.theme;_&&(q.color="theme:"+_)}if(h){let E=h.attrs.rgb;E&&(q.highColor="#"+E.slice(2));let _=h.attrs.theme;_&&(q.highColor="theme:"+_)}if(m){let E=m.attrs.rgb;E&&(q.lowColor="#"+E.slice(2));let _=m.attrs.theme;_&&(q.lowColor="theme:"+_)}if(c){let E=c.attrs.rgb;E&&(q.firstColor="#"+E.slice(2));let _=c.attrs.theme;_&&(q.firstColor="theme:"+_)}if(d){let E=d.attrs.rgb;E&&(q.lastColor="#"+E.slice(2));let _=d.attrs.theme;_&&(q.lastColor="theme:"+_)}if(f){let E=f.attrs.rgb;E&&(q.negativeColor="#"+E.slice(2));let _=f.attrs.theme;_&&(q.negativeColor="theme:"+_)}if(p){let E=p.attrs.rgb;E&&(q.markersColor="#"+E.slice(2));let _=p.attrs.theme;_&&(q.markersColor="theme:"+_)}g&&(q.showHigh=!0),u&&(q.showLow=!0),$&&(q.showFirst=!0),x&&(q.showLast=!0),b&&(q.showNegative=!0),C&&(q.showMarkers=!0),v!==void 0&&(q.lineWidth=v),w&&(q.minAxisType=w),k&&(q.maxAxisType=k),t.addSparkline(q)}}}}function aa(e,t){let o={};if(t==="twoCellAnchor"||t==="oneCellAnchor"){let n=B(e,"from");n&&(o.from={col:parseInt(B(n,"col")?.text??"0",10),row:parseInt(B(n,"row")?.text??"0",10),colOff:parseInt(B(n,"colOff")?.text??"0",10),rowOff:parseInt(B(n,"rowOff")?.text??"0",10)})}if(t==="oneCellAnchor"){let n=wt(e,"ext");n&&(o.width=parseInt(n.attrs.cx??"0",10),o.height=parseInt(n.attrs.cy??"0",10))}return o}function ia(e,t,o,n,s,r,a,i){let l=wt(e,"blipFill"),h=l?wt(l,"blip"):void 0,m=h?.attrs["r:embed"]??h?.attrs.embed??"";if(!m||!s)return;let c=s.get(m);if(!c)return;let d=c.target.startsWith("/")?c.target.slice(1):We(r,c.target),f=a(d);if(!f)return;let p=d.split(".").pop()??"png",g=Yn(p),$=wt(e,"cNvPr")?.attrs.descr||void 0,x={data:f.data,format:g};if($&&(x.altText=$),o==="twoCellAnchor"){let b=B(t,"from"),C=B(t,"to");b&&(x.from=Zn(b)),C&&(x.to=Zn(C))}else if(o==="oneCellAnchor")n.from&&(x.from=n.from),n.width&&(x.width=Math.round(n.width/De)),n.height&&(x.height=Math.round(n.height/De));else{let b=B(t,"pos"),C=B(t,"ext");b&&(x.position={x:Math.round(parseInt(b.attrs.x??"0",10)/De),y:Math.round(parseInt(b.attrs.y??"0",10)/De)}),C&&(x.width=Math.round(parseInt(C.attrs.cx??"0",10)/De),x.height=Math.round(parseInt(C.attrs.cy??"0",10)/De))}i.addImage(x)}function la(e,t,o,n,s){let r=kt(e);if(!r.length)return;let a=n.from??{col:0,row:0},i={elements:r,from:a};n.width&&(i.width=n.width),n.height&&(i.height=n.height);let l=wt(e,"rPr");if(l){let h=l.attrs.sz;h&&(i.fontSize=parseInt(h,10)/100);let m=wt(l,"latin");m?.attrs.typeface&&(i.fontName=m.attrs.typeface)}s.addMathEquation(i)}function kt(e){let t=[];for(let o of e.children){if(typeof o=="string")continue;let n=ca(o);n&&t.push(n)}return t}function ca(e){switch(ct(e.tag)){case"r":return{type:"text",text:wt(e,"t")?.text??""};case"f":{let o=B(e,"num"),n=B(e,"den");return{type:"frac",base:o?kt(o):[],argument:n?kt(n):[]}}case"sSup":{let o=B(e,"e"),n=B(e,"sup");return{type:"sup",base:o?kt(o):[],argument:n?kt(n):[]}}case"sSub":{let o=B(e,"e"),n=B(e,"sub");return{type:"sub",base:o?kt(o):[],argument:n?kt(n):[]}}case"sSubSup":{let o=B(e,"e"),n=B(e,"sub"),s=B(e,"sup");return{type:"subSup",base:o?kt(o):[],subscript:n?kt(n):[],superscript:s?kt(s):[]}}case"nary":{let o=B(e,"naryPr"),n=o?B(o,"chr"):void 0,s=n?.attrs["m:val"]??n?.attrs.val??"\u2211",r=B(e,"sub"),a=B(e,"sup"),i=B(e,"e");return{type:"nary",operator:s,lower:r?kt(r):[],upper:a?kt(a):[],body:i?kt(i):[]}}case"rad":{let o=B(e,"radPr"),n=o?B(o,"degHide"):void 0,s=n?.attrs["m:val"]==="1"||n?.attrs.val==="1",r=B(e,"deg"),a=B(e,"e");return{type:"rad",hideDegree:s,degree:r?kt(r):[],body:a?kt(a):[]}}case"d":{let o=B(e,"dPr"),n=o?B(o,"begChr"):void 0,s=o?B(o,"endChr"):void 0,r=B(e,"e");return{type:"delim",open:n?.attrs["m:val"]??n?.attrs.val??"(",close:s?.attrs["m:val"]??s?.attrs.val??")",body:r?kt(r):[]}}case"func":{let o=B(e,"fName"),n=B(e,"e");return{type:"func",base:o?kt(o):[],argument:n?kt(n):[]}}case"groupChr":{let o=B(e,"groupChrPr"),n=o?B(o,"chr"):void 0,s=B(e,"e");return{type:"groupChar",operator:n?.attrs["m:val"]??n?.attrs.val??"\u23DF",base:s?kt(s):[]}}case"acc":{let o=B(e,"accPr"),n=o?B(o,"chr"):void 0,s=B(e,"e");return{type:"accent",operator:n?.attrs["m:val"]??n?.attrs.val??"\u0302",base:s?kt(s):[]}}case"bar":{let o=B(e,"e");return{type:"bar",base:o?kt(o):[]}}case"limLow":{let o=B(e,"e"),n=B(e,"lim");return{type:"limLow",base:o?kt(o):[],argument:n?kt(n):[]}}case"limUpp":{let o=B(e,"e"),n=B(e,"lim");return{type:"limUpp",base:o?kt(o):[],argument:n?kt(n):[]}}case"m":{let o=[];for(let n of ut(e,"mr")){let s=[];for(let r of ut(n,"e")){let a=kt(r);a.length===1?s.push(a[0]):s.push({type:"text",text:a.map(i=>i.text??"").join("")})}o.push(s)}return{type:"matrix",rows:o}}case"eqArr":{let o=[];for(let n of ut(e,"e"))o.push(kt(n));return{type:"eqArr",rows:o}}default:return null}}function ha(e,t,o,n){let s=t("xl/metadata.xml");if(!s)return;let r=Lt(s),a=B(r,"valueMetadata");if(!a)return;let i=ut(a,"bk"),l=r.children.find(x=>typeof x!="string"&&ct(x.tag)==="futureMetadata"),h=l?ut(l,"bk"):[],m=t("xl/richData/rdrichvalue.xml");if(!m)return;let c=Lt(m),d=ut(c,"rv"),f=t("xl/richData/_rels/richValueRel.xml.rels");if(!f)return;let p=sn(f),g=t("xl/richData/richValueRel.xml");if(!g)return;let u=Lt(g),$=ut(u,"rel");for(let[x,b]of e){let C=i[b-1];if(!C)continue;let y=C.children.find(N=>typeof N!="string"&&ct(N.tag)==="rc");if(!y)continue;let v=parseInt(y.attrs.v??"-1",10);if(v<0)continue;let w=h[v];if(!w)continue;let k=wt(w,"rvb"),T=parseInt(k?.attrs.i??"-1",10);if(T<0)continue;let S=d[T];if(!S)continue;let D=ut(S,"v"),R=parseInt(D[0]?.text??"-1",10);if(R<0)continue;let A=$[R];if(!A)continue;let W=A.attrs["r:id"]??"",Q=p.get(W);if(!Q)continue;let q=Q.target.startsWith("/")?Q.target.slice(1):`xl/richData/${Q.target}`,E=o(q);if(!E)continue;let _=q.split(".").pop()??"png",M=Yn(_);n.addCellImage({data:E.data,format:M,cell:x})}}function wt(e,t){for(let o of e.children){if(typeof o=="string")continue;if(ct(o.tag)===t)return o;let n=wt(o,t);if(n)return n}}function We(e,t){let o=e.replace(/\/$/,"").split("/");for(let n of t.split("/"))n===".."?o.pop():n!=="."&&o.push(n);return o.join("/")}async function Qn(e){let t=await tn(e),o=E=>t.get(E)??t.get(E.replace(/^\//,"")),n=E=>{let _=o(E);return _?Co(_):void 0},s=n("[Content_Types].xml")??"<Types/>",r=Nr(s),a=n("xl/_rels/workbook.xml.rels")??"<Relationships/>",i=sn(a),l=n("xl/workbook.xml")??"<workbook/>",h=n("xl/styles.xml")??"<styleSheet/>",m=Xr(h),c=n("xl/sharedStrings.xml")??"<sst/>",d=c!=="<sst/>"?Ur(c):[],f=n("docProps/core.xml")??"",p=f?Wn(f):{},g=n("docProps/app.xml")??"",u={},$="";if(g){let E=Hn(g);u=E.props,$=E.unknownRaw}let x=n("docProps/custom.xml")??"",b=x?zn(x):[],C=Lt(l),y=oe(C,"sheets"),v=y?ut(y,"sheet"):[],w=[],k=oe(C,"definedNames");if(k)for(let E of ut(k,"definedName")){let _=E.attrs.name??"",M=E.text??"";if(!_||!M)continue;let N={name:_,ref:M};if(E.attrs.localSheetId!==void 0){let H=parseInt(E.attrs.localSheetId,10),V=v[H];V&&(N.scope=V.attrs.name??void 0)}E.attrs.comment&&(N.comment=E.attrs.comment),w.push(N)}let T=new Map;for(let[E,_]of t)E.includes("_rels/")&&T.set(E,sn(Co(_)));let S=[];for(let E of v){let _=E.attrs["r:id"]??Object.values(E.attrs).find(U=>U.startsWith("rId"))??"",M=E.attrs.sheetId??"",N=E.attrs.name??`Sheet${M}`,H=i.get(_);if(!H)continue;let V=H.target.startsWith("/")?H.target.slice(1):`xl/${H.target}`,K=n(V)??"";if(!K)continue;let{ws:z,originalXml:mt,unknownParts:it,tableRIds:gt,legacyDrawingRId:St,ctrlPropRIds:J,drawingRId:G,vmCells:X}=Vr(K,N,m,d);z.sheetIndex=S.length+1,z.rId=_;let F=[],P=[];if(gt.length){let U=V.split("/").pop()??"",Y=V.substring(0,V.lastIndexOf("/")+1),st=`${Y}_rels/${U}.rels`,ht=T.get(st);if(ht){for(let tt of gt){let ft=ht.get(tt);if(!ft)continue;let j=ft.target.startsWith("/")?ft.target.slice(1):We(Y,ft.target),et=n(j);if(et){let L=ea(et);L&&z.addTable(L),F.push(j),P.push(et)}}z.tableRIds=gt}}if(St&&J.length){let U=V.split("/").pop()??"",Y=V.substring(0,V.lastIndexOf("/")+1),st=`${Y}_rels/${U}.rels`,ht=T.get(st);if(ht){let tt=ht.get(St),ft=tt?tt.target.startsWith("/")?tt.target.slice(1):We(Y,tt.target):"",j=ft?n(ft):"",et=[];if(j){let L=Lt(j);for(let $t of L.children){if(typeof $t=="string"||ct($t.tag)!=="shape")continue;let ot=$t.children.find(bt=>typeof bt!="string"&&ct(bt.tag)==="ClientData");if(!ot)continue;let Ft=ot.attrs.ObjectType??"";if(Ft==="Note"||!Ft)continue;let xt=($t.attrs.id??"").replace(/\D/g,""),at=parseInt(xt,10)||0;et.push({objectType:Ft,shapeXml:ro($t),clientData:ot,shapeId:at})}}for(let L=0;L<J.length;L++){let $t=ht.get(J[L]);if(!$t)continue;let ot=$t.target.startsWith("/")?$t.target.slice(1):We(Y,$t.target),Ft=n(ot)??"",xt=Ft?Lt(Ft):null,at=xt?.attrs.objectType??"",bt=Fn[at]??"button",Z=et[L],yt=ma(Z?.clientData),nt={type:bt,from:yt.from,to:yt.to,_ctrlPropXml:Ft||void 0,_vmlShapeXml:Z?.shapeXml,_shapeId:Z?.shapeId};if(xt){if(xt.attrs.fmlaLink&&(nt.linkedCell=xt.attrs.fmlaLink),xt.attrs.fmlaRange&&(nt.inputRange=xt.attrs.fmlaRange),xt.attrs.checked&&(nt.checked=Sn[xt.attrs.checked]??"unchecked"),xt.attrs.dropLines&&(nt.dropLines=parseInt(xt.attrs.dropLines,10)),xt.attrs.min&&(nt.min=parseInt(xt.attrs.min,10)),xt.attrs.max&&(nt.max=parseInt(xt.attrs.max,10)),xt.attrs.inc&&(nt.inc=parseInt(xt.attrs.inc,10)),xt.attrs.page&&(nt.page=parseInt(xt.attrs.page,10)),xt.attrs.val&&(nt.val=parseInt(xt.attrs.val,10)),xt.attrs.selType){let dt={Single:"single",Multi:"multi",Extend:"extend"};nt.selType=dt[xt.attrs.selType]??"single"}xt.attrs.noThreeD==="1"&&(nt.noThreeD=!0)}if(Z?.clientData){let dt=Z.clientData.children.find(pt=>typeof pt!="string"&&ct(pt.tag)==="FmlaMacro");dt&&(nt.macro=dt.text??"")}z.addFormControl(nt)}z.legacyDrawingRId=St,z.ctrlPropRIds=J}}if(G){let U=V.split("/").pop()??"",Y=V.substring(0,V.lastIndexOf("/")+1),st=`${Y}_rels/${U}.rels`,ht=T.get(st);if(ht){let tt=ht.get(G);if(tt){let ft=tt.target.startsWith("/")?tt.target.slice(1):We(Y,tt.target),j=n(ft);if(j){let et=ft.substring(0,ft.lastIndexOf("/")+1),L=ft.split("/").pop()??"",$t=`${et}_rels/${L}.rels`,ot=T.get($t);oa(j,ot,et,o,z)}}}}X.size>0&&ha(X,n,o,z),S.push({ws:z,sheetId:M,rId:_,originalXml:mt,unknownParts:it,tablePaths:F,tableXmls:P})}let D=n("xl/connections.xml")??"",R=[];if(D){let E=Lt(D);for(let _ of ut(E,"connection")){let M=parseInt(_.attrs.id??"0",10),N=_.attrs.name??"",H=parseInt(_.attrs.type??"0",10),V=fa(H);if(!N||!V)continue;let K={id:M,name:N,type:V};_.attrs.description&&(K.description=_.attrs.description),_.attrs.refreshOnLoad==="1"&&(K.refreshOnLoad=!0),_.attrs.background==="1"&&(K.background=!0),_.attrs.saveData==="1"&&(K.saveData=!0),_.attrs.keepAlive==="1"&&(K.keepAlive=!0),_.attrs.interval&&(K.interval=parseInt(_.attrs.interval,10));let z=B(_,"dbPr");z&&(z.attrs.connection&&(K.connectionString=z.attrs.connection),z.attrs.command&&(K.command=z.attrs.command),z.attrs.commandType&&(K.commandType=ua(parseInt(z.attrs.commandType,10)))),K._rawXml=ro(_),R.push(K)}}let A=[];for(let[E,_]of t)if(!(!E.startsWith("customXml/item")||E.includes("Props")||E.includes("_rels")))try{let M=await ga(_.data);if(M.length){A.push(...M);break}}catch{}let W=new Set(["xl/workbook.xml","xl/styles.xml","xl/sharedStrings.xml","xl/worksheets/","docProps/","[Content_Types].xml","_rels/","xl/_rels/","xl/connections.xml"]),Q=new Map;for(let[E,_]of t){if(E.endsWith("_rels/")||E==="[Content_Types].xml")continue;[...W].some(N=>E.startsWith(N))||Q.set(E,_.data)}let q=[];for(let E of w)if(E.name==="_xlnm.Print_Area"&&E.scope){let _=S.find(M=>M.ws.name===E.scope);_&&(_.ws.printArea=E.ref)}else q.push(E);return{sheets:S,styles:m,stylesXml:h,sharedStrings:d,sharedXml:c,workbookXml:l,workbookRels:i,contentTypes:r,contentTypesXml:s,core:p,extended:u,extendedUnknownRaw:$,custom:b,hasCustomProps:b.length>0,namedRanges:q,connections:R,connectionsXml:D,powerQueries:A,unknownParts:Q,allRels:T}}function ma(e){let t={from:{col:0,row:0},to:{col:2,row:2}};if(!e)return t;let o=e.children.find(r=>typeof r!="string"&&ct(r.tag)==="Anchor");if(!o)return t;let s=(o.text??"").split(",").map(r=>parseInt(r.trim(),10));return s.length<8||s.some(isNaN)?t:{from:{col:s[0],colOff:s[1],row:s[2],rowOff:s[3]},to:{col:s[4],colOff:s[5],row:s[6],rowOff:s[7]}}}var Jn={1:"odbc",2:"dao",3:"file",4:"web",5:"oledb",6:"text",7:"dsp"},da=Object.fromEntries(Object.entries(Jn).map(([e,t])=>[t,Number(e)]));function fa(e){return Jn[e]}function ts(e){return da[e]}var es={1:"sql",2:"table",3:"default",4:"web",5:"oledb"},pa=Object.fromEntries(Object.entries(es).map(([e,t])=>[t,Number(e)]));function ua(e){return es[e]}function os(e){return pa[e]}async function ga(e){if(e.length<12)return[];let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.getUint32(0,!0)!==0)return[];let n=t.getUint32(4,!0);if(n<4||8+n>e.length)return[];let s=e.subarray(8,8+n);if(s[0]!==80||s[1]!==75)return[];let r=await tn(s),a=[];for(let[i,l]of r){if(!i.includes("/Formula/")||!i.endsWith(".m"))continue;let h=Co(l);if(!h)continue;let m=i.match(/Formulas\/([^/]+)\//),c=m?m[1]:void 0,d=/shared\s+(?:#"([^"]+)"|(\w+))\s*=/g,f,p=new Set;for(;(f=d.exec(h))!==null;){let g=f[1]??f[2];p.add(g)}if(p.size>0){let g=/shared\s+(?:#"([^"]+)"|(\w+))\s*=\s*([\s\S]*?)(?=,\s*shared\s|\]\s*$)/g,u;for(;(u=g.exec(h))!==null;){let $=u[1]??u[2],x=u[3].replace(/,\s*$/,"").trim();a.push({name:$,formula:x})}a.length===0&&a.push({name:c??"Section1",formula:h})}else c&&a.push({name:c,formula:h})}return a}var ao=class e{constructor(){this.sheets=[],this.namedRanges=[],this.connections=[],this.powerQueries=[],this.externalLinks=[],this.customPivotStyles=[],this.pivotSlicers=[],this.properties={},this.compressionLevel=6,this.coreProperties={},this.extendedProperties={},this.customProperties=[],this.isTemplate=!1,this._dirtySheets=new Set,this._activeTabIndex=0,this._customTableStyles=new Map}markDirty(t){if(typeof t=="string"){let o=this.sheets.findIndex(n=>n.name===t);o>=0&&this._dirtySheets.add(o)}else this._dirtySheets.add(t)}static async fromBytes(t){let o=new e,n=await Qn(t);o._readResult=n,o.coreProperties=n.core,o.extendedProperties=n.extended,o.customProperties=n.custom,o.properties={title:n.core.title,author:n.core.creator,subject:n.core.subject,description:n.core.description,keywords:n.core.keywords,company:n.extended.company,lastModifiedBy:n.core.lastModifiedBy,created:n.core.created,modified:n.core.modified,category:n.core.category,status:n.core.contentStatus},o.sheets=n.sheets.map(a=>a.ws);for(let a=0;a<o.sheets.length;a++){let i=o.sheets[a];i._workbook=o,i.view?.tabSelected&&(o._activeTabIndex=a)}o.namedRanges=n.namedRanges,o.connections=n.connections,o.powerQueries=n.powerQueries;let s=n.unknownParts.get("xl/vbaProject.bin");if(s)try{o.vbaProject=oo.fromBytes(s)}catch{}let r=n.workbookXml.match(/<calcPr([^>]*)\/?>/);if(r){let a=r[1],i={},l=a.match(/calcMode="([^"]+)"/);l&&(i.calcMode=l[1]),/fullCalcOnLoad="1"/.test(a)?i.fullCalcOnLoad=!0:/fullCalcOnLoad="0"/.test(a)&&(i.fullCalcOnLoad=!1),/iterate="1"/.test(a)&&(i.iterate=!0);let h=a.match(/iterateCount="(\d+)"/);h&&(i.iterateCount=parseInt(h[1],10));let m=a.match(/iterateDelta="([^"]+)"/);m&&(i.iterateDelta=parseFloat(m[1])),/fullPrecision="1"/.test(a)?i.fullPrecision=!0:/fullPrecision="0"/.test(a)&&(i.fullPrecision=!1),/calcOnSave="1"/.test(a)?i.calcOnSave=!0:/calcOnSave="0"/.test(a)&&(i.calcOnSave=!1),/concurrentCalc="1"/.test(a)?i.concurrentCalc=!0:/concurrentCalc="0"/.test(a)&&(i.concurrentCalc=!1),Object.keys(i).length>0&&(o.calcSettings=i)}return o}static async fromBase64(t){return e.fromBytes(le(t))}static async fromFile(t){let n=await(await import("fs/promises")).readFile(t);return e.fromBytes(new Uint8Array(n))}static async fromBlob(t){return e.fromBytes(new Uint8Array(await t.arrayBuffer()))}addSheet(t,o={}){let n=new Ie(t,o);return n.sheetIndex=this.sheets.length+1,n._workbook=this,this.sheets.push(n),this._dirtySheets.add(n.sheetIndex-1),n}getSheet(t){return this.sheets.find(o=>o.name===t)}getSheetByIndex(t){return this.sheets[t]}getSheetNames(){return this.sheets.map(t=>t.name)}getSheets(){return this.sheets}removeSheet(t){return this.sheets=this.sheets.filter(o=>o.name!==t),this}setActiveSheet(t){let o=typeof t=="string"?this.sheets.findIndex(n=>n.name===t):t;if(!(o<0||o>=this.sheets.length)){for(let n=0;n<this.sheets.length;n++){let s=this.sheets[n];n===o?s.view={...s.view??{},tabSelected:!0}:s.view?.tabSelected&&(s.view={...s.view,tabSelected:!1})}this._activeTabIndex=o}}addChartSheet(t,o){let n=this.addSheet(t);return n._isChartSheet=!0,n.addChart(o),n}addDialogSheet(t){let o=this.addSheet(t);return o._isDialogSheet=!0,o}copySheet(t,o){let n=this.getSheet(t);if(!n)throw new Error(`Sheet "${t}" not found`);let s=this.addSheet(o),r=n.readAllCells();for(let{row:i,col:l,cell:h}of r){let m=s.getCell(i,l);h.value!=null&&(m.value=h.value),h.formula&&(m.formula=h.formula),h.arrayFormula&&(m.arrayFormula=h.arrayFormula),h.richText&&(m.richText=h.richText.map(c=>({...c,font:c.font?{...c.font}:void 0}))),h.style&&(m.style={...h.style}),h.comment&&(m.comment={...h.comment}),h.hyperlink&&(m.hyperlink={...h.hyperlink})}for(let i of n.getMerges())s.merge(i.startRow,i.startCol,i.endRow,i.endCol);let a=n.getUsedRange();if(a)for(let i=a.startCol;i<=a.endCol;i++){let l=n.getColumn(i);l&&s.setColumn(i,{...l})}return n.pageSetup&&(s.pageSetup={...n.pageSetup}),n.printArea&&(s.printArea=n.printArea),s}registerTableStyle(t,o){return this._customTableStyles.set(t,o),this}addNamedRange(t){return this.namedRanges.push(t),this}getNamedRanges(){return this.namedRanges}getNamedRange(t){return this.namedRanges.find(o=>o.name===t)}removeNamedRange(t){return this.namedRanges=this.namedRanges.filter(o=>o.name!==t),this}addConnection(t){return this.connections.push(t),this}getConnections(){return this.connections}getConnection(t){return this.connections.find(o=>o.name===t)}removeConnection(t){return this.connections=this.connections.filter(o=>o.name!==t),this}getPowerQueries(){return this.powerQueries}getPowerQuery(t){return this.powerQueries.find(o=>o.name===t)}getCustomProperty(t){return this.customProperties.find(o=>o.name===t)}setCustomProperty(t,o){let n=this.customProperties.findIndex(s=>s.name===t);return n>=0?this.customProperties[n]={name:t,value:o}:this.customProperties.push({name:t,value:o}),this}removeCustomProperty(t){return this.customProperties=this.customProperties.filter(o=>o.name!==t),this}addExternalLink(t){return this.externalLinks.push(t),this}getExternalLinks(){return this.externalLinks}registerPivotStyle(t){return this.customPivotStyles.push(t),this}addPivotSlicer(t){return this.pivotSlicers.push(t),this}getPivotSlicers(){return this.pivotSlicers}async build(){return this._syncLegacyProperties(),this._readResult?this._buildPatched():this._buildFresh()}async _buildPatched(){let t=this._readResult,o=[],n=this._dirtySheets.size>0,s=new Oe,r=new Le,a=new Map,i=new Map;if(n){for(let p=0;p<this.sheets.length;p++){let g=this.sheets[p],u=g.getTables();for(let $=0;$<u.length;$++){let x=u[$];i.set(`${p}:${$}`,x.columns.map(v=>v.name));let{startRow:b,startCol:C}=Kt(x.ref),y=new Set;for(let v=0;v<x.columns.length;v++){let w=g.getCell(b,C+v),k=w.value,T=null;k==null?T=null:k instanceof Date?T=k.toISOString():typeof k=="object"&&"error"in k?T=String(k.error):T=String(k);let S=T??x.columns[v].name,D=S,R=2;for(;y.has(D);)D=`${S}${R++}`;y.add(D),x.columns[v].name=D,(k==null||typeof k!="string"||k!==D)&&(w.value=D)}}}let c=/<dxf>([\s\S]*?)<\/dxf>|<dxf\/>/g,d=[],f;for(;(f=c.exec(t.stylesXml))!==null;)d.push(f[1]??"");d.length&&s.prependRawDxfs(d);for(let p=0;p<this.sheets.length;p++)a.set(p,this.sheets[p].toXml(s,r))}o.push({name:"docProps/core.xml",data:rt(en({...t.core,...this.coreProperties,modified:new Date}))}),o.push({name:"docProps/app.xml",data:rt(on({...t.extended,...this.extendedProperties,titlesOfParts:this.sheets.map(c=>c.name),headingPairs:this._headingPairs()},t.extendedUnknownRaw))});let l=this.customProperties.length>0?this.customProperties:t.hasCustomProps?t.custom:null;l&&l.length>0&&o.push({name:"docProps/custom.xml",data:rt(nn(l))}),o.push({name:"xl/workbook.xml",data:rt(this._patchWorkbookXml(t.workbookXml,t))});let h=this._connectionsXml(t.connectionsXml);h&&o.push({name:"xl/connections.xml",data:rt(h)}),n?(o.push({name:"xl/styles.xml",data:rt(s.toXml())}),o.push({name:"xl/sharedStrings.xml",data:rt(r.toXml())})):(o.push({name:"xl/styles.xml",data:rt(t.stylesXml)}),o.push({name:"xl/sharedStrings.xml",data:rt(t.sharedXml)}));for(let c=0;c<this.sheets.length;c++){let d=this.sheets[c],p=`xl/${d._isChartSheet?"chartsheets":d._isDialogSheet?"dialogsheets":"worksheets"}/sheet${c+1}.xml`;n?d._isChartSheet?o.push({name:p,data:rt(d.toChartSheetXml())}):d._isDialogSheet?o.push({name:p,data:rt(d.toDialogSheetXml(s,r))}):o.push({name:p,data:rt(a.get(c)??"")}):o.push({name:p,data:rt(t.sheets[c]?.originalXml??"")})}let m=new Set;for(let c=0;c<this.sheets.length;c++){let f=this.sheets[c].getTables(),p=t.sheets[c]?.tablePaths??[],g=t.sheets[c]?.tableXmls??[];for(let u=0;u<f.length;u++){let $=p[u];if($)if(m.add($),u<g.length){let x=g[u],b=x.match(/\bref="([^"]+)"/);if(b&&b[1]!==f[u].ref&&(x=x.replace(`ref="${b[1]}"`,`ref="${f[u].ref}"`)),n){let C=i.get(`${c}:${u}`);if(C)for(let y=0;y<f[u].columns.length;y++){let v=C[y],w=f[u].columns[y].name;v&&v!==w&&(x=x.replace(`name="${I(v)}"`,`name="${I(w)}"`))}}o.push({name:$,data:rt(x)})}else{let x=$.match(/table(\d+)\.xml$/),b=x?parseInt(x[1],10):u+1;o.push({name:$,data:rt(Uo(f[u],b))})}}}for(let[c,d]of t.unknownParts)m.has(c)||c==="xl/vbaProject.bin"&&this.vbaProject||t.allRels.has(c)||n&&c==="xl/calcChain.xml"||o.push({name:c,data:d});this.vbaProject&&(this._ensureVbaSheetModules(),o.push({name:"xl/vbaProject.bin",data:this.vbaProject.build()})),o.push({name:"_rels/.rels",data:rt(this._buildRootRels(l!=null&&l.length>0))}),o.push({name:"xl/_rels/workbook.xml.rels",data:rt(this._buildWorkbookRels(t,n))});for(let[c,d]of t.allRels)c==="xl/_rels/workbook.xml.rels"||c==="_rels/.rels"||o.push({name:c,data:rt(this._relsToXml(d))});return o.push({name:"[Content_Types].xml",data:rt(this._patchContentTypes(t.contentTypesXml,l!=null&&l.length>0,n))}),Jo(o,{level:this.compressionLevel})}async _buildFresh(){let t=new Oe,o=new Le,n=[];for(let[F,P]of this._customTableStyles)t.registerTableStyle(F,P);let s=1;for(let F of this.sheets)F.rId=`rId${s++}`;let r=[],a=[],i=[],l=[],h=new Map,m=new Map,c=new Map,d=new Map,f=1,p=1,g=1,u=1,$=1,x=0,b=0,C=0;for(let F of this.sheets){let P=F.getImages(),U=F.getCharts(),Y=F.getTables(),st=[],ht=[],tt=[];(P.length||U.length||F.getShapes().length||F.getWordArt().length||F.getMathEquations().length||F.getTableSlicers().length||F.getOleObjects().length)&&(F.drawingRId=`rId${s++}`);let ft=F.getFormControls();(F.getComments().length||ft.length)&&(F.legacyDrawingRId=`rId${s++}`);for(let ot of P){let Ft=`rId${s++}`;st.push(Ft),r.push({ws:F,img:ot,ext:ns(ot.format),idx:f++})}for(let ot=0;ot<U.length;ot++){let Ft=`rId${s++}`;ht.push(Ft),a.push({ws:F,chartIdx:ot,globalIdx:p++})}for(let ot=0;ot<Y.length;ot++){let Ft=`rId${s++}`;tt.push(Ft),i.push({ws:F,tableIdx:ot,globalTableId:g++})}let j=[],et=[];for(let ot of F.getOleObjects())j.push(`rId${s++}`),ot.iconData?et.push(`rId${s++}`):et.push("");F.oleRIds=j,F.oleIconRIds=et;let L=[];for(let ot=0;ot<ft.length;ot++)L.push(`rId${s++}`);F.ctrlPropRIds=L,h.set(F,st),m.set(F,ht),c.set(F,tt),F.tableRIds=tt;let $t=[];for(let ot of F.getPivotTables()){let Ft=`rId${s++}`,xt=`rId${s++}`;$t.push(Ft),l.push({ws:F,pt:ot,pivotIdx:$++,cacheId:x++,pivotRId:Ft,cacheRId:xt})}d.set(F,$t)}let y=[],v=f,w=1;for(let F of this.sheets){F._cellImageVm=new Map;for(let P of F.getCellImages()){let U=ns(P.format);y.push({img:P,ext:U,idx:v++}),F._cellImageVm.set(P.cell,w++),F.getCellByRef(P.cell)}}let k=y.length>0,T=new Map,S=[],D=0,R=0;for(let F of this.sheets)F.getTableSlicers().length&&T.set(F,{tableSlicers:[],pivotSlicers:[],slicerDefRId:"",slicerDefIdx:0});for(let F of this.pivotSlicers)for(let P of this.sheets)if(P.getPivotTables().some(U=>U.name===F.pivotTableName)){T.has(P)||T.set(P,{tableSlicers:[],pivotSlicers:[],slicerDefRId:"",slicerDefIdx:0});break}for(let[F,P]of T){F.drawingRId||(F.drawingRId=`rId${s++}`),P.slicerDefRId=`rId${s++}`,P.slicerDefIdx=++D,F.slicerRId=P.slicerDefRId;let U=[];for(let Y of F.getTableSlicers()){let st=F.getTables().find(j=>j.name===Y.tableName),tt=i.find(j=>j.ws===F&&F.getTables()[j.tableIdx]===st)?.globalTableId??1,ft=st?(st.columns?.findIndex(j=>j.name===Y.columnName)??0)+1:1;P.tableSlicers.push({slicer:Y,tableId:tt,columnIndex:ft}),U.push({name:Y.name,cell:Y.cell}),S.push({name:Y.name+"_cache",sourceName:Y.columnName,type:"table",rId:`rId${s++}`,idx:++R,tableId:tt,columnIndex:ft,sortOrder:Y.sortOrder??"ascending"})}for(let Y of this.pivotSlicers){let st=F.getPivotTables().find(et=>et.name===Y.pivotTableName);if(!st)continue;let ht=l.find(et=>et.ws===F&&et.pt===st),tt=this.sheets.indexOf(F)+1,ft=[],j=this.sheets.find(et=>et.name===st.sourceSheet);if(j){let et=j.readRange(st.sourceRef),$t=(et[0]??[]).map(ot=>String(ot??"")).indexOf(Y.fieldName);if($t>=0){let ot=new Set;for(let Ft=1;Ft<et.length;Ft++)ot.add(String(et[Ft][$t]??""));ft=[...ot]}}P.pivotSlicers.push({slicer:Y,pivotCacheId:ht?.cacheId??0}),U.push({name:Y.name,cell:Y.cell}),S.push({name:Y.name+"_cache",sourceName:Y.fieldName,type:"pivot",rId:`rId${s++}`,idx:++R,pivotTableName:Y.pivotTableName,pivotCacheId:ht?.cacheId??0,tabId:tt,items:ft})}F._slicerDrawingInfo=U}let A=T.size>0,W=this.customProperties.length>0,Q=!!this.vbaProject,q=new Set;for(let{ext:F}of[...r,...y]){let P=xa(F);q.add(`<Default Extension="${F}" ContentType="${P}"/>`)}let E=this.sheets.filter(F=>F.getComments().length),M=this.sheets.filter(F=>F.getComments().length||F.getFormControls().length).length?'<Default Extension="vml" ContentType="application/vnd.openxmlformats-officedocument.vmlDrawing"/>':"",N=0,H=E.map(()=>`<Override PartName="/xl/comments${++N}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"/>`).join(""),V=0,K=[];for(let F of this.sheets)if(!F._isDialogSheet)for(let P=0;P<F.getFormControls().length;P++)K.push(`<Override PartName="/xl/ctrlProps/ctrlProp${++V}.xml" ContentType="application/vnd.ms-excel.controlproperties+xml"/>`);let mt=this.sheets.some(F=>F.getOleObjects().length>0)?'<Default Extension="bin" ContentType="application/vnd.openxmlformats-officedocument.oleObject"/>':"";n.push({name:"[Content_Types].xml",data:rt(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
254
+ `);return{props:{application:o("Application"),appVersion:o("AppVersion"),company:o("Company"),manager:o("Manager"),docSecurity:n("DocSecurity"),scaleCrop:s("ScaleCrop"),linksUpToDate:s("LinksUpToDate"),sharedDoc:s("SharedDoc"),hyperlinksChanged:s("HyperlinksChanged"),characters:n("Characters"),charactersByWord:n("CharactersWithSpaces"),words:n("Words"),lines:n("Lines"),paragraphs:n("Paragraphs"),pages:n("Pages"),slides:n("Slides"),notes:n("Notes"),hiddenSlides:n("HiddenSlides"),mmClips:n("MMClips"),template:o("Template"),presentationFormat:o("PresentationFormat"),totalTime:n("TotalTime"),hyperlinkBase:o("HyperlinkBase"),headingPairs:r,titlesOfParts:i},unknownRaw:c}}function zn(e){return Lt(e).children.filter(o=>ct(o.tag)==="property").map(o=>{let n=o.attrs.name??"",s=o.children[0];if(!s)return null;let r=ct(s.tag),a=s.text??"",i;switch(r){case"lpwstr":case"lpstr":case"bstr":i={type:"string",value:a};break;case"i4":case"int":i={type:"int",value:parseInt(a,10)};break;case"decimal":i={type:"decimal",value:parseFloat(a)};break;case"bool":i={type:"bool",value:a==="true"||a==="1"};break;case"filetime":i={type:"date",value:new Date(a)};break;case"r8":i={type:"r8",value:parseFloat(a)};break;case"i8":i={type:"i8",value:BigInt(a)};break;case"error":i={type:"error",value:a};break;default:i={type:"string",value:a};break}return{name:n,value:i}}).filter(Boolean)}function sn(e){let t=new Map;try{let o=Lt(e);for(let n of o.children)if(ct(n.tag)==="Relationship"){let s={type:n.attrs.Type??"",target:n.attrs.Target??""};n.attrs.TargetMode&&(s.targetMode=n.attrs.TargetMode),t.set(n.attrs.Id??"",s)}}catch{}return t}function Nr(e){let t=new Map;try{let o=Lt(e);for(let n of o.children)if(ct(n.tag)==="Override"){let r=n.attrs.PartName??"",a=n.attrs.ContentType??"";t.set(r.startsWith("/")?r.slice(1):r,a)}}catch{}return t}function Xr(e){let t=Lt(e),o=new Map,n=[],s={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"mm-dd-yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@"},r=oe(t,"numFmts");if(r)for(let g of ut(r,"numFmt")){let u=parseInt(g.attrs.numFmtId??"0",10),$=g.attrs.formatCode??"";o.set(u,$)}let a=oe(t,"fonts"),i=[];if(a)for(let g of ut(a,"font"))i.push(rn(g));let l=oe(t,"fills"),h=[];if(l)for(let g of ut(l,"fill"))h.push(Gn(g));let m=oe(t,"borders"),c=[];if(m)for(let g of ut(m,"border"))c.push(qn(g));let d=oe(t,"cellXfs");if(d)for(let g of ut(d,"xf")){let u=parseInt(g.attrs.fontId??"0",10),$=parseInt(g.attrs.fillId??"0",10),x=parseInt(g.attrs.borderId??"0",10),b=parseInt(g.attrs.numFmtId??"0",10),C=g.attrs.applyFont==="1",y=g.attrs.applyFill==="1",v=g.attrs.applyBorder==="1",w=g.attrs.applyAlignment==="1",k=g.attrs.applyNumberFormat==="1",T=g.attrs.applyProtection==="1",S={};C&&i[u]&&(S.font=i[u]),y&&h[$]&&(S.fill=h[$]),v&&c[x]&&(S.border=c[x]),k&&b!==0&&(o.has(b)?S.numberFormat={formatCode:o.get(b)}:s[b]&&(S.numFmtId=b));let D=B(g,"alignment");w&&D&&(S.alignment=Kn(D));let R=B(g,"protection");T&&R&&(R.attrs.locked!==void 0&&(S.locked=R.attrs.locked!=="0"),R.attrs.hidden!==void 0&&(S.hidden=R.attrs.hidden!=="0")),n.push(S)}let f=[],p=oe(t,"dxfs");if(p)for(let g of ut(p,"dxf")){let u={},$=B(g,"font");$&&(u.font=rn($));let x=B(g,"fill");x&&(u.fill=Gn(x));let b=B(g,"border");b&&(u.border=qn(b));let C=B(g,"numFmt");if(C){let v=C.attrs.formatCode??"";v&&(u.numberFormat={formatCode:v})}let y=B(g,"alignment");y&&(u.alignment=Kn(y)),f.push(u)}return{xfs:n,numFmts:o,dxfs:f}}function oe(e,t){if(ct(e.tag)===t)return e;for(let o of e.children){let n=oe(o,t);if(n)return n}}function rn(e){let t={};for(let o of e.children)switch(ct(o.tag)){case"b":t.bold=o.attrs.val!=="0";break;case"i":t.italic=o.attrs.val!=="0";break;case"strike":t.strike=o.attrs.val!=="0";break;case"u":t.underline=o.attrs.val??"single";break;case"sz":t.size=parseFloat(o.attrs.val??"11");break;case"name":t.name=o.attrs.val;break;case"family":t.family=parseInt(o.attrs.val??"0",10);break;case"scheme":t.scheme=o.attrs.val;break;case"charset":t.charset=parseInt(o.attrs.val??"0",10);break;case"vertAlign":t.vertAlign=o.attrs.val;break;case"color":{let n=o.attrs.rgb,s=o.attrs.theme;n?t.color=n:s&&(t.color=`theme:${s}${o.attrs.tint?":tint:"+o.attrs.tint:""}`);break}}return t}function Gn(e){let t=B(e,"patternFill");if(t){let n=B(t,"fgColor"),s=B(t,"bgColor");return{type:"pattern",pattern:t.attrs.patternType,fgColor:n?.attrs.rgb??(n?.attrs.theme?`theme:${n.attrs.theme}${n.attrs.tint?":tint:"+n.attrs.tint:""}`:void 0),bgColor:s?.attrs.rgb??(s?.attrs.theme?`theme:${s.attrs.theme}${s.attrs.tint?":tint:"+s.attrs.tint:""}`:void 0)}}let o=B(e,"gradientFill");if(o){let n=ut(o,"stop").concat(ut(o,"gradientStop")).map(s=>{let r=B(s,"color");return{position:parseFloat(s.attrs.position??"0"),color:r?.attrs.rgb??(r?.attrs.theme?`theme:${r.attrs.theme}${r.attrs.tint?":tint:"+r.attrs.tint:""}`:"FF000000")}});return{type:"gradient",gradientType:o.attrs.type,degree:o.attrs.degree?parseFloat(o.attrs.degree):void 0,stops:n}}return{type:"pattern",pattern:"none"}}function qn(e){let t=o=>{let n=B(e,o);if(!n)return;let s=n.attrs.style,r=B(n,"color");if(!s&&!r)return;let a=r?.attrs.rgb??(r?.attrs.theme?`theme:${r.attrs.theme}${r.attrs.tint?":tint:"+r.attrs.tint:""}`:void 0);return{style:s,color:a}};return{left:t("left"),right:t("right"),top:t("top"),bottom:t("bottom"),diagonal:t("diagonal"),diagonalUp:e.attrs.diagonalUp==="1",diagonalDown:e.attrs.diagonalDown==="1"}}function Kn(e){let t={};return e.attrs.horizontal&&(t.horizontal=e.attrs.horizontal),e.attrs.vertical&&(t.vertical=e.attrs.vertical),e.attrs.wrapText&&(t.wrapText=e.attrs.wrapText!=="0"),e.attrs.shrinkToFit&&(t.shrinkToFit=e.attrs.shrinkToFit!=="0"),e.attrs.textRotation&&(t.textRotation=parseInt(e.attrs.textRotation,10)),e.attrs.indent&&(t.indent=parseInt(e.attrs.indent,10)),e.attrs.readingOrder&&(t.readingOrder=parseInt(e.attrs.readingOrder,10)),t}function Ur(e){let t=Lt(e);return ut(t,"si").map(o=>{let n=B(o,"t"),s=ut(o,"r");if(n&&!s.length)return{text:n.text??""};let r=s.map(l=>{let h=B(l,"t")?.text??"",m=B(l,"rPr"),c={text:h};return m&&(c.font=rn(m)),c}),a=r.map(l=>l.text).join("");return r.some(l=>l.font&&Object.keys(l.font).length>0)?{text:a,richText:r}:{text:a}})}function Vr(e,t,o,n){let s=new Ie(t),r=Lt(e),a=[],i=[],l="",h="",m=[],c=new Map,d=new Set(["sheetPr","dimension","sheetViews","sheetFormatPr","cols","sheetData","mergeCells","conditionalFormatting","dataValidations","sheetProtection","printOptions","pageMargins","pageSetup","headerFooter","drawing","tableParts","autoFilter","rowBreaks","colBreaks","picture","oleObjects","ctrlProps","legacyDrawing","AlternateContent","extLst"]);for(let f of r.children){let p=ct(f.tag);switch(p){case"sheetViews":Wr(f,s);break;case"cols":Hr(f,s,o);break;case"sheetData":zr(f,s,o,n,c);break;case"mergeCells":Gr(f,s);break;case"autoFilter":s.autoFilter={ref:f.attrs.ref??""};break;case"tableParts":for(let g of ut(f,"tablePart")){let u=g.attrs["r:id"]??"";u&&i.push(u)}break;case"sheetProtection":qr(f,s);break;case"pageMargins":Kr(f,s);break;case"pageSetup":Zr(f,s);break;case"headerFooter":Yr(f,s);break;case"printOptions":Qr(f,s);break;case"conditionalFormatting":Jr(f,s,o);break;case"dataValidations":ta(f,s);break;case"rowBreaks":for(let g of ut(f,"brk")){let u=parseInt(g.attrs.id??"0",10);u>0&&s.addRowBreak(u,g.attrs.man==="1")}break;case"colBreaks":for(let g of ut(f,"brk")){let u=parseInt(g.attrs.id??"0",10);u>0&&s.addColBreak(u,g.attrs.man==="1")}break;case"drawing":h=f.attrs["r:id"]??"";break;case"legacyDrawing":l=f.attrs["r:id"]??"";break;case"AlternateContent":{let g=f.children.find($=>typeof $!="string"&&ct($.tag)==="Choice"),u=g?g.children.find($=>typeof $!="string"&&ct($.tag)==="controls"):void 0;if(u)for(let $ of u.children){if(typeof $=="string")continue;let x;if(ct($.tag)==="control"?x=$:ct($.tag)==="AlternateContent"&&(x=$.children.find(v=>typeof v!="string"&&ct(v.tag)==="Choice")?.children.find(v=>typeof v!="string"&&ct(v.tag)==="control")),!x)continue;let b=x.children.find(y=>typeof y!="string"&&ct(y.tag)==="controlPr"),C=x.attrs["r:id"]??b?.attrs["r:id"]??"";C&&m.push(C)}break}case"extLst":ra(f,s);break;default:d.has(p)||a.push(ro(f));break}}return{ws:s,originalXml:e,unknownParts:a,tableRIds:i,legacyDrawingRId:l,ctrlPropRIds:m,drawingRId:h,vmCells:c}}function Wr(e,t){let o=ut(e,"sheetView")[0];if(!o)return;t.view={showGridLines:o.attrs.showGridLines!=="0",showRowColHeaders:o.attrs.showRowColHeaders!=="0",zoomScale:o.attrs.zoomScale?parseInt(o.attrs.zoomScale,10):void 0,rightToLeft:o.attrs.rightToLeft==="1",tabSelected:o.attrs.tabSelected==="1",view:o.attrs.view};let n=B(o,"pane");n&&n.attrs.state==="frozen"&&(t.freezePane={col:n.attrs.xSplit?parseInt(n.attrs.xSplit,10):void 0,row:n.attrs.ySplit?parseInt(n.attrs.ySplit,10):void 0})}function Hr(e,t,o){for(let n of ut(e,"col")){let s=parseInt(n.attrs.min??"1",10),r=parseInt(n.attrs.max??"1",10),a={width:n.attrs.width?parseFloat(n.attrs.width):void 0,hidden:n.attrs.hidden==="1",customWidth:n.attrs.customWidth==="1",outlineLevel:n.attrs.outlineLevel?parseInt(n.attrs.outlineLevel,10):void 0,style:n.attrs.style?o.xfs[parseInt(n.attrs.style,10)]:void 0};for(let i=s;i<=r;i++)t.setColumn(i,a)}}function zr(e,t,o,n,s){for(let r of ut(e,"row")){let a=parseInt(r.attrs.r??"0",10);if(!a)continue;let i={};r.attrs.ht&&(i.height=parseFloat(r.attrs.ht)),r.attrs.hidden&&(i.hidden=r.attrs.hidden==="1"),r.attrs.outlineLevel&&(i.outlineLevel=parseInt(r.attrs.outlineLevel,10)),r.attrs.collapsed&&(i.collapsed=r.attrs.collapsed==="1"),r.attrs.s&&(i.style=o.xfs[parseInt(r.attrs.s,10)]),Object.keys(i).length&&t.setRow(a,i);for(let l of ut(r,"c")){let h=l.attrs.r??"";if(!h)continue;let{row:m,col:c}=Gt(h),d=l.attrs.s?parseInt(l.attrs.s,10):0,f=d>0?o.xfs[d]:void 0,p=l.attrs.t??"",g=B(l,"f"),u=B(l,"v"),$={};f&&($.style=f);let x=l.attrs.vm;if(x&&s&&s.set(h,parseInt(x,10)),g)g.attrs.t==="array"?$.arrayFormula=g.text??"":$.formula=g.text??"";else if(u){let b=u.text??"";switch(p){case"s":{let C=parseInt(b,10),y=n[C];y?($.value=y.text,y.richText&&($.richText=y.richText)):$.value="";break}case"b":$.value=b==="1"||b==="true";break;case"str":case"inlineStr":{let C=B(l,"is");$.value=C?B(C,"t")?.text??b:b;break}case"e":$.value=new te(b);break;default:{let C=parseFloat(b);$.value=isNaN(C)?b:C;break}}}(Object.keys($).length||$.value!==void 0)&&t.setCell(m,c,$)}}}function Gr(e,t){for(let o of ut(e,"mergeCell")){let n=o.attrs.ref??"";n.includes(":")&&t.mergeByRef(n)}}function qr(e,t){t.protection={sheet:e.attrs.sheet!=="0",password:void 0,selectLockedCells:e.attrs.selectLockedCells!=="0",selectUnlockedCells:e.attrs.selectUnlockedCells!=="0",formatCells:e.attrs.formatCells==="0",formatColumns:e.attrs.formatColumns==="0",formatRows:e.attrs.formatRows==="0",insertColumns:e.attrs.insertColumns==="0",insertRows:e.attrs.insertRows==="0",insertHyperlinks:e.attrs.insertHyperlinks==="0",deleteColumns:e.attrs.deleteColumns==="0",deleteRows:e.attrs.deleteRows==="0",sort:e.attrs.sort==="0",autoFilter:e.attrs.autoFilter==="0",pivotTables:e.attrs.pivotTables==="0"}}function Kr(e,t){t.pageMargins={left:parseFloat(e.attrs.left??"0.7"),right:parseFloat(e.attrs.right??"0.7"),top:parseFloat(e.attrs.top??"0.75"),bottom:parseFloat(e.attrs.bottom??"0.75"),header:parseFloat(e.attrs.header??"0.3"),footer:parseFloat(e.attrs.footer??"0.3")}}function Zr(e,t){t.pageSetup={paperSize:e.attrs.paperSize?parseInt(e.attrs.paperSize,10):void 0,orientation:e.attrs.orientation,fitToPage:e.attrs.fitToPage==="1",fitToWidth:e.attrs.fitToWidth?parseInt(e.attrs.fitToWidth,10):void 0,fitToHeight:e.attrs.fitToHeight?parseInt(e.attrs.fitToHeight,10):void 0,scale:e.attrs.scale?parseInt(e.attrs.scale,10):void 0,horizontalDpi:e.attrs.horizontalDpi?parseInt(e.attrs.horizontalDpi,10):void 0,verticalDpi:e.attrs.verticalDpi?parseInt(e.attrs.verticalDpi,10):void 0}}function Yr(e,t){t.headerFooter={oddHeader:B(e,"oddHeader")?.text,oddFooter:B(e,"oddFooter")?.text,evenHeader:B(e,"evenHeader")?.text,evenFooter:B(e,"evenFooter")?.text,firstHeader:B(e,"firstHeader")?.text,firstFooter:B(e,"firstFooter")?.text,differentOddEven:e.attrs.differentOddEven==="1",differentFirst:e.attrs.differentFirst==="1"}}function Qr(e,t){t.printOptions={gridLines:e.attrs.gridLines==="1",gridLinesSet:e.attrs.gridLinesSet==="1",headings:e.attrs.headings==="1",centerHorizontal:e.attrs.horizontalCentered==="1",centerVertical:e.attrs.verticalCentered==="1"}}function Jr(e,t,o){let n=e.attrs.sqref??"";for(let s of ut(e,"cfRule")){let r=s.attrs.type??"cellIs",a={sqref:n,type:r};if(s.attrs.operator&&(a.operator=s.attrs.operator),s.attrs.priority&&(a.priority=parseInt(s.attrs.priority,10)),s.attrs.text&&(a.text=s.attrs.text),s.attrs.aboveAverage==="0"&&(a.aboveAverage=!1),s.attrs.percent==="1"&&(a.percent=!0),s.attrs.rank&&(a.rank=parseInt(s.attrs.rank,10)),s.attrs.timePeriod&&(a.timePeriod=s.attrs.timePeriod),s.attrs.dxfId!==void 0){let c=parseInt(s.attrs.dxfId,10);o.dxfs[c]&&(a.style=o.dxfs[c])}let i=ut(s,"formula");i[0]?.text&&(a.formula=i[0].text),i[1]?.text&&(a.formula2=i[1].text);let l=B(s,"colorScale");if(l){let c=ut(l,"cfvo").map(f=>({type:f.attrs.type??"min",val:f.attrs.val})),d=ut(l,"color").map(f=>f.attrs.rgb??f.attrs.theme??"");a.colorScale={type:"colorScale",cfvo:c,color:d}}let h=B(s,"dataBar");if(h){let c=ut(h,"cfvo"),d=B(h,"color");a.dataBar={type:"dataBar",showValue:h.attrs.showValue!=="0"?void 0:!1,minType:c[0]?.attrs.type,minVal:c[0]?.attrs.val,maxType:c[1]?.attrs.type,maxVal:c[1]?.attrs.val,color:d?.attrs.rgb}}let m=B(s,"iconSet");if(m){let c=ut(m,"cfvo").map(d=>({type:d.attrs.type??"percent",val:d.attrs.val}));a.iconSet={type:"iconSet",iconSet:m.attrs.iconSet??"3TrafficLights1",cfvo:c,showValue:m.attrs.showValue==="0"?!1:void 0,reverse:m.attrs.reverse==="1"?!0:void 0}}t.addConditionalFormat(a)}}function ta(e,t){for(let o of ut(e,"dataValidation")){let n=o.attrs.sqref??"";if(!n)continue;let s=o.attrs.type??"whole",r={type:s};o.attrs.operator&&(r.operator=o.attrs.operator),o.attrs.allowBlank==="1"&&(r.allowBlank=!0),o.attrs.showErrorMessage==="1"&&(r.showErrorAlert=!0),o.attrs.errorTitle&&(r.errorTitle=o.attrs.errorTitle),o.attrs.error&&(r.error=o.attrs.error),o.attrs.showInputMessage==="1"&&(r.showInputMessage=!0),o.attrs.promptTitle&&(r.promptTitle=o.attrs.promptTitle),o.attrs.prompt&&(r.prompt=o.attrs.prompt),o.attrs.showDropDown==="1"&&(r.showDropDown=!1);let a=B(o,"formula1"),i=B(o,"formula2");a?.text&&(s==="list"&&a.text.startsWith('"')&&a.text.endsWith('"')?r.list=a.text.slice(1,-1).split(","):r.formula1=a.text),i?.text&&(r.formula2=i.text),t.addDataValidation(n,r)}}function ea(e){try{let t=Lt(e);if(ct(t.tag)!=="table")return null;let n=t.attrs.name??"",s=t.attrs.displayName??n,r=t.attrs.ref??"",a=parseInt(t.attrs.totalsRowCount??"0",10),i=[],l=oe(t,"tableColumns");if(l)for(let c of ut(l,"tableColumn")){let d={name:c.attrs.name??""};c.attrs.totalsRowFunction&&(d.totalsRowFunction=c.attrs.totalsRowFunction),c.attrs.totalsRowFormula&&(d.totalsRowFormula=c.attrs.totalsRowFormula),c.attrs.totalsRowLabel&&(d.totalsRowLabel=c.attrs.totalsRowLabel),i.push(d)}let h={name:n,ref:r,columns:i};s&&s!==n&&(h.displayName=s),a>0&&(h.totalsRow=!0);let m=oe(t,"tableStyleInfo");return m&&(m.attrs.name&&(h.style=m.attrs.name),m.attrs.showFirstColumn==="1"&&(h.showFirstColumn=!0),m.attrs.showLastColumn==="1"&&(h.showLastColumn=!0),m.attrs.showRowStripes==="1"&&(h.showRowStripes=!0),m.attrs.showColumnStripes==="1"&&(h.showColumnStripes=!0)),h}catch{return null}}var De=9525;function Zn(e){return{col:parseInt(B(e,"col")?.text??"0",10),row:parseInt(B(e,"row")?.text??"0",10),colOff:parseInt(B(e,"colOff")?.text??"0",10),rowOff:parseInt(B(e,"rowOff")?.text??"0",10)}}function Yn(e){return{png:"png",jpg:"jpeg",jpeg:"jpeg",gif:"gif",emf:"emf",wmf:"wmf",tiff:"tiff",tif:"tiff",svg:"svg",ico:"ico",webp:"webp",bmp:"bmp"}[e.toLowerCase()]??"png"}function oa(e,t,o,n,s){let r=Lt(e);for(let a of r.children){if(typeof a=="string")continue;let i=ct(a.tag);if(i!=="twoCellAnchor"&&i!=="oneCellAnchor"&&i!=="absoluteAnchor")continue;let l=aa(a,i),h=wt(a,"pic");if(h){ia(h,a,i,l,t,o,n,s);continue}let m=wt(a,"graphicFrame");if(m){na(m,a,i,t,o,n,s);continue}let c=wt(a,"oMath");if(c){la(c,a,i,l,s);continue}let d=wt(a,"sp");if(d){sa(d,a,i,s);continue}}}function na(e,t,o,n,s,r,a){let i=wt(e,"chart");if(!i||!n)return;let l=i.attrs["r:id"]??Vn(i,"r:id")??"";if(!l)return;let h=n.get(l);if(!h)return;let m=h.target.startsWith("/")?h.target.slice(1):We(s,h.target),c=r(m);if(!c)return;let f=new TextDecoder().decode(c.data),p=Lt(f),g={col:0,row:0},u={col:8,row:15};if(o==="twoCellAnchor"){let E=B(t,"from"),_=B(t,"to");E&&(g={col:parseInt(B(E,"col")?.text??"0",10),row:parseInt(B(E,"row")?.text??"0",10)}),_&&(u={col:parseInt(B(_,"col")?.text??"0",10),row:parseInt(B(_,"row")?.text??"0",10)})}let $=wt(p,"plotArea");if(!$)return;let x={barChart:"column",bar3DChart:"column",lineChart:"line",line3DChart:"line",areaChart:"area",area3DChart:"area",pieChart:"pie",pie3DChart:"pie",doughnutChart:"doughnut",scatterChart:"scatter",bubbleChart:"bubble",radarChart:"radar",stockChart:"stock"},b="column",C;for(let E of $.children){if(typeof E=="string")continue;let _=ct(E.tag);if(x[_]){if(b=x[_],C=E,_==="barChart"||_==="bar3DChart"){(B(E,"barDir")?.attrs.val??"")==="bar"&&(b="bar");let V=B(E,"grouping")?.attrs.val??"";V==="stacked"&&(b=b==="bar"?"barStacked":"columnStacked"),V==="percentStacked"&&(b=b==="bar"?"barStacked100":"columnStacked100")}if(_==="lineChart"){let M=wt(E,"marker");if(M){let N=B(M,"symbol")?.attrs.val??"";N&&N!=="none"&&(b="lineMarker")}}_==="scatterChart"&&B(E,"scatterStyle")?.attrs.val?.includes("Smooth")&&(b="scatterSmooth"),_==="radarChart"&&B(E,"radarStyle")?.attrs.val==="filled"&&(b="radarFilled");break}}if(!C)return;let y=[];for(let E of ut(C,"ser")){let _={values:""},M=B(E,"tx");if(M){let K=wt(M,"strRef");if(K){let mt=B(K,"f");mt?.text&&(_.name=mt.text);let it=B(K,"strCache");if(it){let gt=wt(it,"pt"),St=gt?wt(gt,"v"):void 0;St?.text&&(_.name=St.text)}}let z=wt(M,"v");z?.text&&!_.name&&(_.name=z.text)}let N=B(E,"val")||B(E,"yVal");if(N){let K=wt(N,"numRef");if(K){let z=B(K,"f");z?.text&&(_.values=z.text)}}let H=B(E,"cat")||B(E,"xVal");if(H){let K=wt(H,"strRef"),z=wt(H,"numRef"),mt=K||z;if(mt){let it=B(mt,"f");it?.text&&(_.categories=it.text)}}let V=B(E,"spPr");if(V){let K=B(V,"solidFill");if(K){let z=B(K,"srgbClr");z?.attrs.val&&(_.color="#"+z.attrs.val)}}_.values&&y.push(_)}if(!y.length)return;let v,w=B(p,"title")||wt(p,"title");if(w){let E=wt(w,"t");E?.text&&(v=E.text)}let k,T,S=wt($,"catAx")||wt($,"dateAx"),D=wt($,"valAx");if(S){k={};let E=wt(S,"title");if(E){let _=wt(E,"t");_?.text&&(k.title=_.text)}}if(D){T={};let E=wt(D,"title");if(E){let M=wt(E,"t");M?.text&&(T.title=M.text)}B(D,"majorGridlines")&&(T.gridLines=!0)}let R=!1,A=wt(p,"legend");A&&(R=B(A,"legendPos")?.attrs.val||!0);let Q=B(C,"varyColors")?.attrs.val!=="0",q={type:b,series:y,from:g,to:u};v&&(q.title=v),k&&(q.xAxis=k),T&&(q.yAxis=T),R!==!1&&(q.legend=R),Q&&(q.varyColors=!0),a.addChart(q)}function sa(e,t,o,n){let s={col:0,row:0},r={col:2,row:2};if(o==="twoCellAnchor"){let u=B(t,"from"),$=B(t,"to");u&&(s={col:parseInt(B(u,"col")?.text??"0",10),row:parseInt(B(u,"row")?.text??"0",10)}),$&&(r={col:parseInt(B($,"col")?.text??"0",10),row:parseInt(B($,"row")?.text??"0",10)})}let a=wt(e,"spPr"),i="rect",l,h,m,c;if(a){let u=wt(a,"prstGeom");if(u){let C=u.attrs.prst??"";new Set(["rect","roundRect","ellipse","triangle","diamond","pentagon","hexagon","octagon","star5","star6","rightArrow","leftArrow","upArrow","downArrow","line","curvedConnector3","callout1","callout2","cloud","heart","lightningBolt","sun","moon","smileyFace","flowChartProcess","flowChartDecision","flowChartTerminator","flowChartDocument"]).has(C)&&(i=C)}let $=B(a,"solidFill");if($){let C=B($,"srgbClr");C?.attrs.val&&(l="#"+C.attrs.val);let y=B($,"schemeClr");y?.attrs.val&&(l="theme:"+y.attrs.val)}let x=B(a,"ln");if(x){let C=x.attrs.w;C&&(m=Math.round(parseInt(C,10)/De));let y=B(x,"solidFill");if(y){let v=B(y,"srgbClr");v?.attrs.val&&(h="#"+v.attrs.val)}}let b=wt(a,"xfrm");b?.attrs.rot&&(c=parseInt(b.attrs.rot,10)/6e4)}let d,f,p=wt(e,"txBody");if(p){let u=B(p,"bodyPr"),x=(u?B(u,"prstTxWarp"):void 0)?.attrs.prst??u?.attrs.prstTxWarp??"",b=[];for(let y of ut(p,"p"))for(let v of ut(y,"r")){let w=B(v,"t");if(w?.text&&b.push(w.text),!f){let k=B(v,"rPr");if(k){f={},k.attrs.sz&&(f.size=parseInt(k.attrs.sz,10)/100),k.attrs.b==="1"&&(f.bold=!0),k.attrs.i==="1"&&(f.italic=!0);let T=wt(k,"latin");T?.attrs.typeface&&(f.name=T.attrs.typeface);let S=B(k,"solidFill");if(S){let D=B(S,"srgbClr");D?.attrs.val&&(f.color="#"+D.attrs.val)}}}}if(d=b.join(""),x&&new Set(["textPlain","textArchUp","textArchDown","textCircle","textWave1","textWave2","textInflate","textDeflate","textFadeUp","textFadeDown","textFadeLeft","textFadeRight","textSlantUp","textSlantDown","textCascadeUp","textCascadeDown","textChevron","textRingInside","textRingOutside","textStop"]).has(x)&&d){let y={text:d,from:s,to:r};x!=="textPlain"&&(y.preset=x),f&&(y.font=f),l&&(y.fillColor=l),h&&(y.outlineColor=h),n.addWordArt(y);return}}let g={type:i,from:s,to:r};d&&(g.text=d),l&&(g.fillColor=l),h&&(g.lineColor=h),m&&(g.lineWidth=m),f&&(g.font=f),c&&(g.rotation=c),n.addShape(g)}function ra(e,t){for(let o of ut(e,"ext")){let n=o.children?.filter(s=>typeof s!="string"&&ct(s.tag)==="sparklineGroups");if(n?.length)for(let s of n)for(let r of ut(s,"sparklineGroup")){let a=r.attrs.type??"line",i=a==="column"?"bar":a==="stacked"?"stacked":"line",l=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorSeries"),h=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorHigh"),m=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorLow"),c=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorFirst"),d=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorLast"),f=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorNegative"),p=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="colorMarkers"),g=r.attrs.high==="1",u=r.attrs.low==="1",$=r.attrs.first==="1",x=r.attrs.last==="1",b=r.attrs.negative==="1",C=r.attrs.markers==="1",y=r.attrs.lineWeight,v=y?parseFloat(y):void 0,w=r.attrs.minAxisType==="individual"?"individual":r.attrs.minAxisType==="custom"?"custom":void 0,k=r.attrs.maxAxisType==="individual"?"individual":r.attrs.maxAxisType==="custom"?"custom":void 0,T=r.children?.find(D=>typeof D!="string"&&ct(D.tag)==="sparklines");if(!T)continue;let S=T.children?.filter(D=>typeof D!="string"&&ct(D.tag)==="sparkline");if(S)for(let D of S){let R=D.children?.find(E=>typeof E!="string"&&ct(E.tag)==="f"),A=D.children?.find(E=>typeof E!="string"&&ct(E.tag)==="sqref"),W=R?.text??"",Q=A?.text??"";if(!W||!Q)continue;let q={type:i,dataRange:W,location:Q};if(l){let E=l.attrs.rgb;E&&(q.color="#"+E.slice(2));let _=l.attrs.theme;_&&(q.color="theme:"+_)}if(h){let E=h.attrs.rgb;E&&(q.highColor="#"+E.slice(2));let _=h.attrs.theme;_&&(q.highColor="theme:"+_)}if(m){let E=m.attrs.rgb;E&&(q.lowColor="#"+E.slice(2));let _=m.attrs.theme;_&&(q.lowColor="theme:"+_)}if(c){let E=c.attrs.rgb;E&&(q.firstColor="#"+E.slice(2));let _=c.attrs.theme;_&&(q.firstColor="theme:"+_)}if(d){let E=d.attrs.rgb;E&&(q.lastColor="#"+E.slice(2));let _=d.attrs.theme;_&&(q.lastColor="theme:"+_)}if(f){let E=f.attrs.rgb;E&&(q.negativeColor="#"+E.slice(2));let _=f.attrs.theme;_&&(q.negativeColor="theme:"+_)}if(p){let E=p.attrs.rgb;E&&(q.markersColor="#"+E.slice(2));let _=p.attrs.theme;_&&(q.markersColor="theme:"+_)}g&&(q.showHigh=!0),u&&(q.showLow=!0),$&&(q.showFirst=!0),x&&(q.showLast=!0),b&&(q.showNegative=!0),C&&(q.showMarkers=!0),v!==void 0&&(q.lineWidth=v),w&&(q.minAxisType=w),k&&(q.maxAxisType=k),t.addSparkline(q)}}}}function aa(e,t){let o={};if(t==="twoCellAnchor"||t==="oneCellAnchor"){let n=B(e,"from");n&&(o.from={col:parseInt(B(n,"col")?.text??"0",10),row:parseInt(B(n,"row")?.text??"0",10),colOff:parseInt(B(n,"colOff")?.text??"0",10),rowOff:parseInt(B(n,"rowOff")?.text??"0",10)})}if(t==="oneCellAnchor"){let n=wt(e,"ext");n&&(o.width=parseInt(n.attrs.cx??"0",10),o.height=parseInt(n.attrs.cy??"0",10))}return o}function ia(e,t,o,n,s,r,a,i){let l=wt(e,"blipFill"),h=l?wt(l,"blip"):void 0,m=h?.attrs["r:embed"]??h?.attrs.embed??"";if(!m||!s)return;let c=s.get(m);if(!c)return;let d=c.target.startsWith("/")?c.target.slice(1):We(r,c.target),f=a(d);if(!f)return;let p=d.split(".").pop()??"png",g=Yn(p),$=wt(e,"cNvPr")?.attrs.descr||void 0,x={data:f.data,format:g};if($&&(x.altText=$),o==="twoCellAnchor"){let b=B(t,"from"),C=B(t,"to");b&&(x.from=Zn(b)),C&&(x.to=Zn(C))}else if(o==="oneCellAnchor")n.from&&(x.from=n.from),n.width&&(x.width=Math.round(n.width/De)),n.height&&(x.height=Math.round(n.height/De));else{let b=B(t,"pos"),C=B(t,"ext");b&&(x.position={x:Math.round(parseInt(b.attrs.x??"0",10)/De),y:Math.round(parseInt(b.attrs.y??"0",10)/De)}),C&&(x.width=Math.round(parseInt(C.attrs.cx??"0",10)/De),x.height=Math.round(parseInt(C.attrs.cy??"0",10)/De))}i.addImage(x)}function la(e,t,o,n,s){let r=kt(e);if(!r.length)return;let a=n.from??{col:0,row:0},i={elements:r,from:a};n.width&&(i.width=n.width),n.height&&(i.height=n.height);let l=wt(e,"rPr");if(l){let h=l.attrs.sz;h&&(i.fontSize=parseInt(h,10)/100);let m=wt(l,"latin");m?.attrs.typeface&&(i.fontName=m.attrs.typeface)}s.addMathEquation(i)}function kt(e){let t=[];for(let o of e.children){if(typeof o=="string")continue;let n=ca(o);n&&t.push(n)}return t}function ca(e){switch(ct(e.tag)){case"r":return{type:"text",text:wt(e,"t")?.text??""};case"f":{let o=B(e,"num"),n=B(e,"den");return{type:"frac",base:o?kt(o):[],argument:n?kt(n):[]}}case"sSup":{let o=B(e,"e"),n=B(e,"sup");return{type:"sup",base:o?kt(o):[],argument:n?kt(n):[]}}case"sSub":{let o=B(e,"e"),n=B(e,"sub");return{type:"sub",base:o?kt(o):[],argument:n?kt(n):[]}}case"sSubSup":{let o=B(e,"e"),n=B(e,"sub"),s=B(e,"sup");return{type:"subSup",base:o?kt(o):[],subscript:n?kt(n):[],superscript:s?kt(s):[]}}case"nary":{let o=B(e,"naryPr"),n=o?B(o,"chr"):void 0,s=n?.attrs["m:val"]??n?.attrs.val??"\u2211",r=B(e,"sub"),a=B(e,"sup"),i=B(e,"e");return{type:"nary",operator:s,lower:r?kt(r):[],upper:a?kt(a):[],body:i?kt(i):[]}}case"rad":{let o=B(e,"radPr"),n=o?B(o,"degHide"):void 0,s=n?.attrs["m:val"]==="1"||n?.attrs.val==="1",r=B(e,"deg"),a=B(e,"e");return{type:"rad",hideDegree:s,degree:r?kt(r):[],body:a?kt(a):[]}}case"d":{let o=B(e,"dPr"),n=o?B(o,"begChr"):void 0,s=o?B(o,"endChr"):void 0,r=B(e,"e");return{type:"delim",open:n?.attrs["m:val"]??n?.attrs.val??"(",close:s?.attrs["m:val"]??s?.attrs.val??")",body:r?kt(r):[]}}case"func":{let o=B(e,"fName"),n=B(e,"e");return{type:"func",base:o?kt(o):[],argument:n?kt(n):[]}}case"groupChr":{let o=B(e,"groupChrPr"),n=o?B(o,"chr"):void 0,s=B(e,"e");return{type:"groupChar",operator:n?.attrs["m:val"]??n?.attrs.val??"\u23DF",base:s?kt(s):[]}}case"acc":{let o=B(e,"accPr"),n=o?B(o,"chr"):void 0,s=B(e,"e");return{type:"accent",operator:n?.attrs["m:val"]??n?.attrs.val??"\u0302",base:s?kt(s):[]}}case"bar":{let o=B(e,"e");return{type:"bar",base:o?kt(o):[]}}case"limLow":{let o=B(e,"e"),n=B(e,"lim");return{type:"limLow",base:o?kt(o):[],argument:n?kt(n):[]}}case"limUpp":{let o=B(e,"e"),n=B(e,"lim");return{type:"limUpp",base:o?kt(o):[],argument:n?kt(n):[]}}case"m":{let o=[];for(let n of ut(e,"mr")){let s=[];for(let r of ut(n,"e")){let a=kt(r);a.length===1?s.push(a[0]):s.push({type:"text",text:a.map(i=>i.text??"").join("")})}o.push(s)}return{type:"matrix",rows:o}}case"eqArr":{let o=[];for(let n of ut(e,"e"))o.push(kt(n));return{type:"eqArr",rows:o}}default:return null}}function ha(e,t,o,n){let s=t("xl/metadata.xml");if(!s)return;let r=Lt(s),a=B(r,"valueMetadata");if(!a)return;let i=ut(a,"bk"),l=r.children.find(x=>typeof x!="string"&&ct(x.tag)==="futureMetadata"),h=l?ut(l,"bk"):[],m=t("xl/richData/rdrichvalue.xml");if(!m)return;let c=Lt(m),d=ut(c,"rv"),f=t("xl/richData/_rels/richValueRel.xml.rels");if(!f)return;let p=sn(f),g=t("xl/richData/richValueRel.xml");if(!g)return;let u=Lt(g),$=ut(u,"rel");for(let[x,b]of e){let C=i[b-1];if(!C)continue;let y=C.children.find(N=>typeof N!="string"&&ct(N.tag)==="rc");if(!y)continue;let v=parseInt(y.attrs.v??"-1",10);if(v<0)continue;let w=h[v];if(!w)continue;let k=wt(w,"rvb"),T=parseInt(k?.attrs.i??"-1",10);if(T<0)continue;let S=d[T];if(!S)continue;let D=ut(S,"v"),R=parseInt(D[0]?.text??"-1",10);if(R<0)continue;let A=$[R];if(!A)continue;let W=A.attrs["r:id"]??"",Q=p.get(W);if(!Q)continue;let q=Q.target.startsWith("/")?Q.target.slice(1):`xl/richData/${Q.target}`,E=o(q);if(!E)continue;let _=q.split(".").pop()??"png",M=Yn(_);n.addCellImage({data:E.data,format:M,cell:x})}}function wt(e,t){for(let o of e.children){if(typeof o=="string")continue;if(ct(o.tag)===t)return o;let n=wt(o,t);if(n)return n}}function We(e,t){let o=e.replace(/\/$/,"").split("/");for(let n of t.split("/"))n===".."?o.pop():n!=="."&&o.push(n);return o.join("/")}async function Qn(e){let t=await tn(e),o=E=>t.get(E)??t.get(E.replace(/^\//,"")),n=E=>{let _=o(E);return _?Co(_):void 0},s=n("[Content_Types].xml")??"<Types/>",r=Nr(s),a=n("xl/_rels/workbook.xml.rels")??"<Relationships/>",i=sn(a),l=n("xl/workbook.xml")??"<workbook/>",h=n("xl/styles.xml")??"<styleSheet/>",m=Xr(h),c=n("xl/sharedStrings.xml")??"<sst/>",d=c!=="<sst/>"?Ur(c):[],f=n("docProps/core.xml")??"",p=f?Wn(f):{},g=n("docProps/app.xml")??"",u={},$="";if(g){let E=Hn(g);u=E.props,$=E.unknownRaw}let x=n("docProps/custom.xml")??"",b=x?zn(x):[],C=Lt(l),y=oe(C,"sheets"),v=y?ut(y,"sheet"):[],w=[],k=oe(C,"definedNames");if(k)for(let E of ut(k,"definedName")){let _=E.attrs.name??"",M=E.text??"";if(!_||!M)continue;let N={name:_,ref:M};if(E.attrs.localSheetId!==void 0){let H=parseInt(E.attrs.localSheetId,10),V=v[H];V&&(N.scope=V.attrs.name??void 0)}E.attrs.comment&&(N.comment=E.attrs.comment),w.push(N)}let T=new Map;for(let[E,_]of t)E.includes("_rels/")&&T.set(E,sn(Co(_)));let S=[];for(let E of v){let _=E.attrs["r:id"]??Object.values(E.attrs).find(U=>U.startsWith("rId"))??"",M=E.attrs.sheetId??"",N=E.attrs.name??`Sheet${M}`,H=i.get(_);if(!H)continue;let V=H.target.startsWith("/")?H.target.slice(1):`xl/${H.target}`,K=n(V)??"";if(!K)continue;let{ws:z,originalXml:mt,unknownParts:it,tableRIds:gt,legacyDrawingRId:St,ctrlPropRIds:J,drawingRId:G,vmCells:X}=Vr(K,N,m,d);z.sheetIndex=S.length+1,z.rId=_;let F=[],P=[];if(gt.length){let U=V.split("/").pop()??"",Y=V.substring(0,V.lastIndexOf("/")+1),st=`${Y}_rels/${U}.rels`,ht=T.get(st);if(ht){for(let tt of gt){let ft=ht.get(tt);if(!ft)continue;let j=ft.target.startsWith("/")?ft.target.slice(1):We(Y,ft.target),et=n(j);if(et){let L=ea(et);L&&z.addTable(L),F.push(j),P.push(et)}}z.tableRIds=gt}}if(St&&J.length){let U=V.split("/").pop()??"",Y=V.substring(0,V.lastIndexOf("/")+1),st=`${Y}_rels/${U}.rels`,ht=T.get(st);if(ht){let tt=ht.get(St),ft=tt?tt.target.startsWith("/")?tt.target.slice(1):We(Y,tt.target):"",j=ft?n(ft):"",et=[];if(j){let L=Lt(j);for(let $t of L.children){if(typeof $t=="string"||ct($t.tag)!=="shape")continue;let ot=$t.children.find(bt=>typeof bt!="string"&&ct(bt.tag)==="ClientData");if(!ot)continue;let Ft=ot.attrs.ObjectType??"";if(Ft==="Note"||!Ft)continue;let xt=($t.attrs.id??"").replace(/\D/g,""),at=parseInt(xt,10)||0;et.push({objectType:Ft,shapeXml:ro($t),clientData:ot,shapeId:at})}}for(let L=0;L<J.length;L++){let $t=ht.get(J[L]);if(!$t)continue;let ot=$t.target.startsWith("/")?$t.target.slice(1):We(Y,$t.target),Ft=n(ot)??"",xt=Ft?Lt(Ft):null,at=xt?.attrs.objectType??"",bt=Fn[at]??"button",Z=et[L],yt=ma(Z?.clientData),nt={type:bt,from:yt.from,to:yt.to,_ctrlPropXml:Ft||void 0,_vmlShapeXml:Z?.shapeXml,_shapeId:Z?.shapeId};if(xt){if(xt.attrs.fmlaLink&&(nt.linkedCell=xt.attrs.fmlaLink),xt.attrs.fmlaRange&&(nt.inputRange=xt.attrs.fmlaRange),xt.attrs.checked&&(nt.checked=Sn[xt.attrs.checked]??"unchecked"),xt.attrs.dropLines&&(nt.dropLines=parseInt(xt.attrs.dropLines,10)),xt.attrs.min&&(nt.min=parseInt(xt.attrs.min,10)),xt.attrs.max&&(nt.max=parseInt(xt.attrs.max,10)),xt.attrs.inc&&(nt.inc=parseInt(xt.attrs.inc,10)),xt.attrs.page&&(nt.page=parseInt(xt.attrs.page,10)),xt.attrs.val&&(nt.val=parseInt(xt.attrs.val,10)),xt.attrs.selType){let dt={Single:"single",Multi:"multi",Extend:"extend"};nt.selType=dt[xt.attrs.selType]??"single"}xt.attrs.noThreeD==="1"&&(nt.noThreeD=!0)}if(Z?.clientData){let dt=Z.clientData.children.find(pt=>typeof pt!="string"&&ct(pt.tag)==="FmlaMacro");dt&&(nt.macro=dt.text??"")}z.addFormControl(nt)}z.legacyDrawingRId=St,z.ctrlPropRIds=J}}if(G){let U=V.split("/").pop()??"",Y=V.substring(0,V.lastIndexOf("/")+1),st=`${Y}_rels/${U}.rels`,ht=T.get(st);if(ht){let tt=ht.get(G);if(tt){let ft=tt.target.startsWith("/")?tt.target.slice(1):We(Y,tt.target),j=n(ft);if(j){let et=ft.substring(0,ft.lastIndexOf("/")+1),L=ft.split("/").pop()??"",$t=`${et}_rels/${L}.rels`,ot=T.get($t);oa(j,ot,et,o,z)}}}}X.size>0&&ha(X,n,o,z),S.push({ws:z,sheetId:M,rId:_,originalXml:mt,unknownParts:it,tablePaths:F,tableXmls:P})}let D=n("xl/connections.xml")??"",R=[];if(D){let E=Lt(D);for(let _ of ut(E,"connection")){let M=parseInt(_.attrs.id??"0",10),N=_.attrs.name??"",H=parseInt(_.attrs.type??"0",10),V=fa(H);if(!N||!V)continue;let K={id:M,name:N,type:V};_.attrs.description&&(K.description=_.attrs.description),_.attrs.refreshOnLoad==="1"&&(K.refreshOnLoad=!0),_.attrs.background==="1"&&(K.background=!0),_.attrs.saveData==="1"&&(K.saveData=!0),_.attrs.keepAlive==="1"&&(K.keepAlive=!0),_.attrs.interval&&(K.interval=parseInt(_.attrs.interval,10));let z=B(_,"dbPr");z&&(z.attrs.connection&&(K.connectionString=z.attrs.connection),z.attrs.command&&(K.command=z.attrs.command),z.attrs.commandType&&(K.commandType=ua(parseInt(z.attrs.commandType,10)))),K._rawXml=ro(_),R.push(K)}}let A=[];for(let[E,_]of t)if(!(!E.startsWith("customXml/item")||E.includes("Props")||E.includes("_rels")))try{let M=await ga(_.data);if(M.length){A.push(...M);break}}catch{}let W=new Set(["xl/workbook.xml","xl/styles.xml","xl/sharedStrings.xml","xl/worksheets/","docProps/","[Content_Types].xml","_rels/","xl/_rels/","xl/connections.xml"]),Q=new Map;for(let[E,_]of t){if(E.endsWith("_rels/")||E==="[Content_Types].xml")continue;[...W].some(N=>E.startsWith(N))||Q.set(E,_.data)}let q=[];for(let E of w)if(E.name==="_xlnm.Print_Area"&&E.scope){let _=S.find(M=>M.ws.name===E.scope);_&&(_.ws.printArea=E.ref)}else q.push(E);return{sheets:S,styles:m,stylesXml:h,sharedStrings:d,sharedXml:c,workbookXml:l,workbookRels:i,contentTypes:r,contentTypesXml:s,core:p,extended:u,extendedUnknownRaw:$,custom:b,hasCustomProps:b.length>0,namedRanges:q,connections:R,connectionsXml:D,powerQueries:A,unknownParts:Q,allRels:T}}function ma(e){let t={from:{col:0,row:0},to:{col:2,row:2}};if(!e)return t;let o=e.children.find(r=>typeof r!="string"&&ct(r.tag)==="Anchor");if(!o)return t;let s=(o.text??"").split(",").map(r=>parseInt(r.trim(),10));return s.length<8||s.some(isNaN)?t:{from:{col:s[0],colOff:s[1],row:s[2],rowOff:s[3]},to:{col:s[4],colOff:s[5],row:s[6],rowOff:s[7]}}}var Jn={1:"odbc",2:"dao",3:"file",4:"web",5:"oledb",6:"text",7:"dsp"},da=Object.fromEntries(Object.entries(Jn).map(([e,t])=>[t,Number(e)]));function fa(e){return Jn[e]}function ts(e){return da[e]}var es={1:"sql",2:"table",3:"default",4:"web",5:"oledb"},pa=Object.fromEntries(Object.entries(es).map(([e,t])=>[t,Number(e)]));function ua(e){return es[e]}function os(e){return pa[e]}async function ga(e){if(e.length<12)return[];let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.getUint32(0,!0)!==0)return[];let n=t.getUint32(4,!0);if(n<4||8+n>e.length)return[];let s=e.subarray(8,8+n);if(s[0]!==80||s[1]!==75)return[];let r=await tn(s),a=[];for(let[i,l]of r){if(!i.includes("/Formula/")||!i.endsWith(".m"))continue;let h=Co(l);if(!h)continue;let m=i.match(/Formulas\/([^/]+)\//),c=m?m[1]:void 0,d=/shared\s+(?:#"([^"]+)"|(\w+))\s*=/g,f,p=new Set;for(;(f=d.exec(h))!==null;){let g=f[1]??f[2];p.add(g)}if(p.size>0){let g=/shared\s+(?:#"([^"]+)"|(\w+))\s*=\s*([\s\S]*?)(?=,\s*shared\s|\]\s*$)/g,u;for(;(u=g.exec(h))!==null;){let $=u[1]??u[2],x=u[3].replace(/,\s*$/,"").trim();a.push({name:$,formula:x})}a.length===0&&a.push({name:c??"Section1",formula:h})}else c&&a.push({name:c,formula:h})}return a}var ao=class e{constructor(){this.sheets=[],this.namedRanges=[],this.connections=[],this.powerQueries=[],this.externalLinks=[],this.customPivotStyles=[],this.pivotSlicers=[],this.properties={},this.compressionLevel=6,this.coreProperties={},this.extendedProperties={},this.customProperties=[],this.isTemplate=!1,this._dirtySheets=new Set,this._activeTabIndex=0,this._customTableStyles=new Map}markDirty(t){if(typeof t=="string"){let o=this.sheets.findIndex(n=>n.name===t);o>=0&&this._dirtySheets.add(o)}else this._dirtySheets.add(t)}static async fromBytes(t){let o=new e,n=await Qn(t);o._readResult=n,o.coreProperties=n.core,o.extendedProperties=n.extended,o.customProperties=n.custom,o.properties={title:n.core.title,author:n.core.creator,subject:n.core.subject,description:n.core.description,keywords:n.core.keywords,company:n.extended.company,lastModifiedBy:n.core.lastModifiedBy,created:n.core.created,modified:n.core.modified,category:n.core.category,status:n.core.contentStatus},o.sheets=n.sheets.map(a=>a.ws);for(let a=0;a<o.sheets.length;a++){let i=o.sheets[a];i._workbook=o,i.view?.tabSelected&&(o._activeTabIndex=a)}o.namedRanges=n.namedRanges,o.connections=n.connections,o.powerQueries=n.powerQueries;let s=n.unknownParts.get("xl/vbaProject.bin");if(s)try{o.vbaProject=oo.fromBytes(s)}catch{}let r=n.workbookXml.match(/<calcPr([^>]*)\/?>/);if(r){let a=r[1],i={},l=a.match(/calcMode="([^"]+)"/);l&&(i.calcMode=l[1]),/fullCalcOnLoad="1"/.test(a)?i.fullCalcOnLoad=!0:/fullCalcOnLoad="0"/.test(a)&&(i.fullCalcOnLoad=!1),/iterate="1"/.test(a)&&(i.iterate=!0);let h=a.match(/iterateCount="(\d+)"/);h&&(i.iterateCount=parseInt(h[1],10));let m=a.match(/iterateDelta="([^"]+)"/);m&&(i.iterateDelta=parseFloat(m[1])),/fullPrecision="1"/.test(a)?i.fullPrecision=!0:/fullPrecision="0"/.test(a)&&(i.fullPrecision=!1),/calcOnSave="1"/.test(a)?i.calcOnSave=!0:/calcOnSave="0"/.test(a)&&(i.calcOnSave=!1),/concurrentCalc="1"/.test(a)?i.concurrentCalc=!0:/concurrentCalc="0"/.test(a)&&(i.concurrentCalc=!1),Object.keys(i).length>0&&(o.calcSettings=i)}return o}static async fromBase64(t){return e.fromBytes(le(t))}static async fromFile(t){let n=await(await import("fs/promises")).readFile(t);return e.fromBytes(new Uint8Array(n))}static async fromBlob(t){return e.fromBytes(new Uint8Array(await t.arrayBuffer()))}addSheet(t,o={}){let n=new Ie(t,o);return n.sheetIndex=this.sheets.length+1,n._workbook=this,this.sheets.push(n),this._dirtySheets.add(n.sheetIndex-1),n}getSheet(t){return this.sheets.find(o=>o.name===t)}getSheetByIndex(t){return this.sheets[t]}getSheetNames(){return this.sheets.map(t=>t.name)}getSheets(){return this.sheets}removeSheet(t){return this.sheets=this.sheets.filter(o=>o.name!==t),this}setActiveSheet(t){let o=typeof t=="string"?this.sheets.findIndex(n=>n.name===t):t;if(!(o<0||o>=this.sheets.length)){for(let n=0;n<this.sheets.length;n++){let s=this.sheets[n];n===o?s.view={...s.view??{},tabSelected:!0}:s.view?.tabSelected&&(s.view={...s.view,tabSelected:!1})}this._activeTabIndex=o}}addChartSheet(t,o){let n=this.addSheet(t);return n._isChartSheet=!0,n.addChart(o),n}addDialogSheet(t){let o=this.addSheet(t);return o._isDialogSheet=!0,o}copySheet(t,o){let n=this.getSheet(t);if(!n)throw new Error(`Sheet "${t}" not found`);let s=this.addSheet(o),r=n.readAllCells();for(let{row:i,col:l,cell:h}of r){let m=s.getCell(i,l);h.value!=null&&(m.value=h.value),h.formula&&(m.formula=h.formula),h.arrayFormula&&(m.arrayFormula=h.arrayFormula),h.richText&&(m.richText=h.richText.map(c=>({...c,font:c.font?{...c.font}:void 0}))),h.style&&(m.style={...h.style}),h.comment&&(m.comment={...h.comment}),h.hyperlink&&(m.hyperlink={...h.hyperlink})}for(let i of n.getMerges())s.merge(i.startRow,i.startCol,i.endRow,i.endCol);let a=n.getUsedRange();if(a)for(let i=a.startCol;i<=a.endCol;i++){let l=n.getColumn(i);l&&s.setColumn(i,{...l})}return n.pageSetup&&(s.pageSetup={...n.pageSetup}),n.printArea&&(s.printArea=n.printArea),s}registerTableStyle(t,o){return this._customTableStyles.set(t,o),this}addNamedRange(t){return this.namedRanges.push(t),this}getNamedRanges(){return this.namedRanges}getNamedRange(t){return this.namedRanges.find(o=>o.name===t)}removeNamedRange(t){return this.namedRanges=this.namedRanges.filter(o=>o.name!==t),this}addConnection(t){return this.connections.push(t),this}getConnections(){return this.connections}getConnection(t){return this.connections.find(o=>o.name===t)}removeConnection(t){return this.connections=this.connections.filter(o=>o.name!==t),this}getPowerQueries(){return this.powerQueries}getPowerQuery(t){return this.powerQueries.find(o=>o.name===t)}getCustomProperty(t){return this.customProperties.find(o=>o.name===t)}setCustomProperty(t,o){let n=this.customProperties.findIndex(s=>s.name===t);return n>=0?this.customProperties[n]={name:t,value:o}:this.customProperties.push({name:t,value:o}),this}removeCustomProperty(t){return this.customProperties=this.customProperties.filter(o=>o.name!==t),this}addExternalLink(t){return this.externalLinks.push(t),this}getExternalLinks(){return this.externalLinks}registerPivotStyle(t){return this.customPivotStyles.push(t),this}addPivotSlicer(t){return this.pivotSlicers.push(t),this}getPivotSlicers(){return this.pivotSlicers}async build(){return this._syncLegacyProperties(),this._readResult?this._buildPatched():this._buildFresh()}async _buildPatched(){let t=this._readResult,o=[],n=this._dirtySheets.size>0,s=new Oe,r=new Le,a=new Map,i=new Map;if(n){for(let p=0;p<this.sheets.length;p++){let g=this.sheets[p],u=g.getTables();for(let $=0;$<u.length;$++){let x=u[$];i.set(`${p}:${$}`,x.columns.map(v=>v.name));let{startRow:b,startCol:C}=Kt(x.ref),y=new Set;for(let v=0;v<x.columns.length;v++){let w=g.getCell(b,C+v),k=w.value,T=null;k==null?T=null:k instanceof Date?T=k.toISOString():typeof k=="object"&&"error"in k?T=String(k.error):T=String(k);let S=T??x.columns[v].name,D=S,R=2;for(;y.has(D);)D=`${S}${R++}`;y.add(D),x.columns[v].name=D,(k==null||typeof k!="string"||k!==D)&&(w.value=D)}}}let c=/<dxf>([\s\S]*?)<\/dxf>|<dxf\/>/g,d=[],f;for(;(f=c.exec(t.stylesXml))!==null;)d.push(f[1]??"");d.length&&s.prependRawDxfs(d);for(let p=0;p<this.sheets.length;p++)a.set(p,this.sheets[p].toXml(s,r))}o.push({name:"docProps/core.xml",data:rt(en({...t.core,...this.coreProperties,modified:new Date}))}),o.push({name:"docProps/app.xml",data:rt(on({...t.extended,...this.extendedProperties,titlesOfParts:this.sheets.map(c=>c.name),headingPairs:this._headingPairs()},t.extendedUnknownRaw))});let l=this.customProperties.length>0?this.customProperties:t.hasCustomProps?t.custom:null;l&&l.length>0&&o.push({name:"docProps/custom.xml",data:rt(nn(l))}),o.push({name:"xl/workbook.xml",data:rt(this._patchWorkbookXml(t.workbookXml,t))});let h=this._connectionsXml(t.connectionsXml);h&&o.push({name:"xl/connections.xml",data:rt(h)}),n?(o.push({name:"xl/styles.xml",data:rt(s.toXml())}),o.push({name:"xl/sharedStrings.xml",data:rt(r.toXml())})):(o.push({name:"xl/styles.xml",data:rt(t.stylesXml)}),o.push({name:"xl/sharedStrings.xml",data:rt(t.sharedXml)}));for(let c=0;c<this.sheets.length;c++){let d=this.sheets[c],p=`xl/${d._isChartSheet?"chartsheets":d._isDialogSheet?"dialogsheets":"worksheets"}/sheet${c+1}.xml`;n?d._isChartSheet?o.push({name:p,data:rt(d.toChartSheetXml())}):d._isDialogSheet?o.push({name:p,data:rt(d.toDialogSheetXml(s,r))}):o.push({name:p,data:rt(a.get(c)??"")}):o.push({name:p,data:rt(t.sheets[c]?.originalXml??"")})}let m=new Set;for(let c=0;c<this.sheets.length;c++){let f=this.sheets[c].getTables(),p=t.sheets[c]?.tablePaths??[],g=t.sheets[c]?.tableXmls??[];for(let u=0;u<f.length;u++){let $=p[u];if($)if(m.add($),u<g.length){let x=g[u],b=x.match(/\bref="([^"]+)"/);if(b&&b[1]!==f[u].ref&&(x=x.replace(`ref="${b[1]}"`,`ref="${f[u].ref}"`)),n){let C=i.get(`${c}:${u}`);if(C)for(let y=0;y<f[u].columns.length;y++){let v=C[y],w=f[u].columns[y].name;v&&v!==w&&(x=x.replace(`name="${I(v)}"`,`name="${I(w)}"`))}}o.push({name:$,data:rt(x)})}else{let x=$.match(/table(\d+)\.xml$/),b=x?parseInt(x[1],10):u+1;o.push({name:$,data:rt(Uo(f[u],b))})}}}for(let[c,d]of t.unknownParts)m.has(c)||c==="xl/vbaProject.bin"&&this.vbaProject||t.allRels.has(c)||n&&c==="xl/calcChain.xml"||o.push({name:c,data:d});this.vbaProject&&(this._ensureVbaSheetModules(),o.push({name:"xl/vbaProject.bin",data:this.vbaProject.build()})),o.push({name:"_rels/.rels",data:rt(this._buildRootRels(l!=null&&l.length>0))}),o.push({name:"xl/_rels/workbook.xml.rels",data:rt(this._buildWorkbookRels(t,n))});for(let[c,d]of t.allRels)c==="xl/_rels/workbook.xml.rels"||c==="_rels/.rels"||o.push({name:c,data:rt(this._relsToXml(d))});return o.push({name:"[Content_Types].xml",data:rt(this._patchContentTypes(t.contentTypesXml,l!=null&&l.length>0,n))}),Jo(o,{level:this.compressionLevel})}async _buildFresh(){let t=new Oe,o=new Le,n=[];for(let[F,P]of this._customTableStyles)t.registerTableStyle(F,P);let s=1;for(let F of this.sheets)F.rId=`rId${s++}`;let r=[],a=[],i=[],l=[],h=new Map,m=new Map,c=new Map,d=new Map,f=1,p=1,g=1,u=1,$=1,x=0,b=0,C=0;for(let F of this.sheets){let P=F.getImages(),U=F.getCharts(),Y=F.getTables(),st=[],ht=[],tt=[];(P.length||U.length||F.getShapes().length||F.getWordArt().length||F.getMathEquations().length||F.getTableSlicers().length||F.getOleObjects().length)&&(F.drawingRId=`rId${s++}`);let ft=F.getFormControls();(F.getComments().length||ft.length)&&(F.legacyDrawingRId=`rId${s++}`);for(let ot of P){let Ft=`rId${s++}`;st.push(Ft),r.push({ws:F,img:ot,ext:ns(ot.format),idx:f++})}for(let ot=0;ot<U.length;ot++){let Ft=`rId${s++}`;ht.push(Ft),a.push({ws:F,chartIdx:ot,globalIdx:p++})}for(let ot=0;ot<Y.length;ot++){let Ft=`rId${s++}`;tt.push(Ft),i.push({ws:F,tableIdx:ot,globalTableId:g++})}let j=[],et=[];for(let ot of F.getOleObjects())j.push(`rId${s++}`),ot.iconData?et.push(`rId${s++}`):et.push("");F.oleRIds=j,F.oleIconRIds=et;let L=[];for(let ot=0;ot<ft.length;ot++)L.push(`rId${s++}`);F.ctrlPropRIds=L,h.set(F,st),m.set(F,ht),c.set(F,tt),F.tableRIds=tt;let $t=[];for(let ot of F.getPivotTables()){let Ft=`rId${s++}`,xt=`rId${s++}`;$t.push(Ft),l.push({ws:F,pt:ot,pivotIdx:$++,cacheId:x++,pivotRId:Ft,cacheRId:xt})}d.set(F,$t)}let y=[],v=f,w=1;for(let F of this.sheets){F._cellImageVm=new Map;for(let P of F.getCellImages()){let U=ns(P.format);y.push({img:P,ext:U,idx:v++}),F._cellImageVm.set(P.cell,w++),F.getCellByRef(P.cell)}}let k=y.length>0,T=new Map,S=[],D=0,R=0;for(let F of this.sheets)F.getTableSlicers().length&&T.set(F,{tableSlicers:[],pivotSlicers:[],slicerDefRId:"",slicerDefIdx:0});for(let F of this.pivotSlicers)for(let P of this.sheets)if(P.getPivotTables().some(U=>U.name===F.pivotTableName)){T.has(P)||T.set(P,{tableSlicers:[],pivotSlicers:[],slicerDefRId:"",slicerDefIdx:0});break}for(let[F,P]of T){F.drawingRId||(F.drawingRId=`rId${s++}`),P.slicerDefRId=`rId${s++}`,P.slicerDefIdx=++D,F.slicerRId=P.slicerDefRId;let U=[];for(let Y of F.getTableSlicers()){let st=F.getTables().find(j=>j.name===Y.tableName),tt=i.find(j=>j.ws===F&&F.getTables()[j.tableIdx]===st)?.globalTableId??1,ft=st?(st.columns?.findIndex(j=>j.name===Y.columnName)??0)+1:1;P.tableSlicers.push({slicer:Y,tableId:tt,columnIndex:ft}),U.push({name:Y.name,cell:Y.cell}),S.push({name:Y.name+"_cache",sourceName:Y.columnName,type:"table",rId:`rId${s++}`,idx:++R,tableId:tt,columnIndex:ft,sortOrder:Y.sortOrder??"ascending"})}for(let Y of this.pivotSlicers){let st=F.getPivotTables().find(et=>et.name===Y.pivotTableName);if(!st)continue;let ht=l.find(et=>et.ws===F&&et.pt===st),tt=this.sheets.indexOf(F)+1,ft=[],j=this.sheets.find(et=>et.name===st.sourceSheet);if(j){let et=j.readRange(st.sourceRef),$t=(et[0]??[]).map(ot=>String(ot??"")).indexOf(Y.fieldName);if($t>=0){let ot=new Set;for(let Ft=1;Ft<et.length;Ft++)ot.add(String(et[Ft][$t]??""));ft=[...ot]}}P.pivotSlicers.push({slicer:Y,pivotCacheId:ht?.cacheId??0}),U.push({name:Y.name,cell:Y.cell}),S.push({name:Y.name+"_cache",sourceName:Y.fieldName,type:"pivot",rId:`rId${s++}`,idx:++R,pivotTableName:Y.pivotTableName,pivotCacheId:ht?.cacheId??0,tabId:tt,items:ft})}F._slicerDrawingInfo=U}let A=T.size>0,W=this.customProperties.length>0,Q=!!this.vbaProject,q=new Set;for(let{ext:F}of[...r,...y]){let P=xa(F);q.add(`<Default Extension="${F}" ContentType="${P}"/>`)}let E=this.sheets.filter(F=>F.getComments().length),M=this.sheets.filter(F=>F.getComments().length||F.getFormControls().length).length?'<Default Extension="vml" ContentType="application/vnd.openxmlformats-officedocument.vmlDrawing"/>':"",N=0,H=E.map(()=>`<Override PartName="/xl/comments${++N}.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"/>`).join(""),V=0,K=[];for(let F of this.sheets)if(!F._isDialogSheet)for(let P=0;P<F.getFormControls().length;P++)K.push(`<Override PartName="/xl/ctrlProps/ctrlProp${++V}.xml" ContentType="application/vnd.ms-excel.controlproperties+xml"/>`);let mt=this.sheets.some(F=>F.getOleObjects().length>0)?'<Default Extension="bin" ContentType="application/vnd.openxmlformats-officedocument.oleObject"/>':"";n.push({name:"[Content_Types].xml",data:rt(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
255
255
  <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">
256
256
  <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>
257
257
  <Default Extension="xml" ContentType="application/xml"/>
@@ -20,8 +20,16 @@ function colorXml(color, prefix = 'rgb') {
20
20
  function colorAttrXml(tag, color) {
21
21
  if (!color)
22
22
  return '';
23
- if (color.startsWith('theme:'))
24
- return `<${tag} theme="${color.slice(6)}"/>`;
23
+ if (color.startsWith('theme:')) {
24
+ const rest = color.slice(6);
25
+ const tintIdx = rest.indexOf(':tint:');
26
+ if (tintIdx >= 0) {
27
+ const theme = rest.slice(0, tintIdx);
28
+ const tint = rest.slice(tintIdx + 6);
29
+ return `<${tag} theme="${theme}" tint="${tint}"/>`;
30
+ }
31
+ return `<${tag} theme="${rest}"/>`;
32
+ }
25
33
  const rgb = color.startsWith('#') ? 'FF' + color.slice(1) : color;
26
34
  return `<${tag} rgb="${rgb}"/>`;
27
35
  }
@@ -56,7 +64,8 @@ function fillXml(fill) {
56
64
  const f = fill;
57
65
  const fg = colorAttrXml('fgColor', f.fgColor);
58
66
  const bg = colorAttrXml('bgColor', f.bgColor);
59
- return `<patternFill patternType="${f.pattern}">${fg}${bg}</patternFill>`;
67
+ const ptAttr = f.pattern ? ` patternType="${f.pattern}"` : '';
68
+ return `<patternFill${ptAttr}>${fg}${bg}</patternFill>`;
60
69
  }
61
70
  const f = fill;
62
71
  const stops = f.stops.map(s => `<stop position="${s.position}">${colorAttrXml('color', s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AAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE;cACjB,CAAC;IACb,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-projects/excelforge",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "A **complete TypeScript library** for reading and writing Excel `.xlsx` files with **zero external dependencies**. Works in browsers, Node.js, Deno, Bun, and edge runtimes.",
5
5
  "homepage": "https://github.com/node-projects/excelForge#readme",
6
6
  "bugs": {
@@ -18,8 +18,9 @@
18
18
  "test": "node ./dist/test/examples.js",
19
19
  "test2": "node ./dist/test/test_features",
20
20
  "build": "tsc",
21
- "prepublishOnly": "npm run build && npm run bundle",
22
- "bundle": "esbuild ./dist/index.js --format=esm --minify --external:fs/promises --external:zlib --platform=neutral --bundle --outfile=./dist/index-min.js"
21
+ "prepublishOnly": "npm run build && npm run bundle && npm run bundle-core",
22
+ "bundle": "esbuild ./dist/index.js --format=esm --minify --external:fs/promises --external:zlib --platform=neutral --bundle --outfile=./dist/index-min.js",
23
+ "bundle-core": "esbuild ./dist/index-core.js --format=esm --minify --external:fs/promises --external:zlib --platform=neutral --bundle --outfile=./dist/index-core-min.js"
23
24
  },
24
25
  "devDependencies": {
25
26
  "esbuild": "^0.28.0",