@sheetxl/sdk 0.8.0-beta.10 → 0.8.0-beta.11
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.
- package/README.md +1 -1
- package/browser/esm/B7aUIvgUjncMMD_i.mjs +394 -0
- package/browser/esm/{Cgd5BnM3hg9RyUel.mjs → BFagR2JeWs74iAG3.mjs} +1 -1
- package/browser/esm/BGOFfpxr2jPIdqmV.mjs +40 -0
- package/browser/esm/{CdLZWVcH8cncBUPJ.mjs → BLoUBId2xZpXAK_H.mjs} +110 -261
- package/browser/esm/BMyDRQ716j79h_bH.mjs +86 -0
- package/browser/esm/{o8MFgcVXns987D6_.mjs → BVDiOXGMc5_FMGfy.mjs} +6 -6
- package/browser/esm/{BzLfNyc6OOShIErH.mjs → BjkCiv5Jz6WYKZeu.mjs} +2 -2
- package/browser/esm/{De175LygU7ot4nQm.mjs → BkBhLS0l6z8sxI6D.mjs} +2 -2
- package/browser/esm/{Y79I7Sm8kjaYexhf.mjs → BnG31I6Oj_HEtSPS.mjs} +1 -1
- package/browser/esm/BoV6zPBnfqCBCqZ7.mjs +7729 -0
- package/browser/esm/{CYyv6uGjo10ig5FP.mjs → BpgskG1Er_lGQ_yS.mjs} +1 -1
- package/browser/esm/{C9B0djuUarfNdoj0.mjs → BtvLTTfSBdAKplVG.mjs} +1 -1
- package/browser/esm/{zqJOaweiXE9D8RY1.mjs → C16ycKja6zG0crV_.mjs} +27687 -38788
- package/browser/esm/C2VbEI_XVAoseAwa.mjs +1552 -0
- package/browser/esm/{Btg43M1Bf-ENDreu.mjs → C4MqfLn9Dm-l3OIk.mjs} +1 -1
- package/browser/esm/C5E6zSGAALWf61n4.mjs +199 -0
- package/browser/esm/{CjsUGJEQSbGjnH6R.mjs → CHU6iu_WGlm7fLET.mjs} +1 -1
- package/browser/esm/{DhKkrCVASZ6Isvz6.mjs → CQYjO777cmAznUzK.mjs} +1 -1
- package/browser/esm/{D4uVlrG0xEFctsSM.mjs → CU3DmJ-YnVVrC1_k.mjs} +285 -67
- package/browser/esm/{ClB5ix51roQOpZEr.mjs → CV5EGEjG5_-CPpP0.mjs} +2877 -2067
- package/browser/esm/{CSx9ed1JOs7K5BXO.mjs → CaB7J-xgfKO2uAkG.mjs} +2 -2
- package/browser/esm/CkxWugaJFjDGZNZ-.mjs +12 -0
- package/browser/esm/{CZ5oa92wZEAXebgk.mjs → ClPfI4lODvCece29.mjs} +32 -22
- package/browser/esm/ClbvFbFzFzXLBKNN.mjs +193 -0
- package/browser/esm/{Cqr3knDsBvoVZ6MN.mjs → Ctjb0SsxV4K4MMqG.mjs} +2 -2
- package/browser/esm/{Bk7xxbdDpa7-sIwd.mjs → D5np__Jb1euAyaLw.mjs} +2 -2
- package/browser/esm/{Di58Ji1n--3Mgc_2.mjs → DEiPS3Dr-s4fPbVZ.mjs} +1 -1
- package/browser/esm/DLLE0FZNsKxbBzRn.mjs +128 -0
- package/browser/esm/{BqskM7wA8oPfFQue.mjs → DWNzqw7DUKwoxjri.mjs} +2 -2
- package/browser/esm/{BEAY9XgKNx-bakXW.mjs → Dlmig06rIo7cInRk.mjs} +1 -1
- package/browser/esm/DvAaxH6z_tGvrRzl.mjs +5132 -0
- package/browser/esm/Dyq_ivuHvlXLwPCl.mjs +12831 -0
- package/browser/esm/{Dtoyt8q5RyGAlxCp.mjs → PcHFjNzQsE54POri.mjs} +1 -1
- package/browser/esm/S2dNNx1a5ydRnARM.mjs +367 -0
- package/browser/esm/f1IoRb7tEb0QmCSt.mjs +110 -0
- package/browser/esm/gssVX_FH1XFN-twD.mjs +210 -0
- package/browser/esm/index.mjs +999 -850
- package/browser/esm/nvU0ClAbf0g94YBK.mjs +1695 -0
- package/browser/esm/{BcHmrKHwMMOlzc9_.mjs → zlLuW405RSguy4Kn.mjs} +34 -34
- package/licenses/dependencies.txt +75 -75
- package/node/esm/{CnSQ7MTXAUAyBOoS.mjs → 2Kihw_-5lVTEnwMa.mjs} +285 -64
- package/node/esm/857CIBgQgGpnqrXk.mjs +199 -0
- package/node/esm/B084DssTcdBheTp_.mjs +7966 -0
- package/node/esm/B21JjOLghRoDOrkx.mjs +134 -0
- package/node/esm/{CImNvdz1iP-lUlro.mjs → BIRq1kT7lLRzns9t.mjs} +181 -181
- package/node/esm/{CD9wbvufChVYYkrI.mjs → BIwObuhTJYf0jpUa.mjs} +2 -2
- package/node/esm/Bbf1Pm9Gk7YpLTvg.mjs +12 -0
- package/node/esm/{B6D7sSetrcOWLsKj.mjs → BqiexuA89caYnAPz.mjs} +1 -1
- package/node/esm/{BH1v-E4Ro3bR7Znw.mjs → BrCKGFRsX_ezFJ4B.mjs} +151 -302
- package/node/esm/CCN5vD410obwdz38.mjs +405 -0
- package/node/esm/{Bh4dv6tMjXX3X4nI.mjs → CDHdgJXH2vS71WMc.mjs} +1 -1
- package/node/esm/{DCplLG93GfTs1vNw.mjs → CGp6VZL-gZa9Uezx.mjs} +1 -1
- package/node/esm/{B9ljpEIZg6wOTzRE.mjs → CNCNJNg890KdgkWh.mjs} +1 -1
- package/node/esm/{Bqd62L8KFgdS0Vou.mjs → CZICGK_ss0HoGHCP.mjs} +2 -2
- package/node/esm/{D7MfcID2Wf6l6VpC.mjs → CZiqiay42tFTrLI4.mjs} +1 -1
- package/node/esm/{Bsx9uijd4X_SKV3L.mjs → CdJHUJSBRHZoryPe.mjs} +41 -41
- package/node/esm/Ct3h15sCus4Tgt6M.mjs +1762 -0
- package/node/esm/CwePQwTILHHjGDkZ.mjs +1033 -0
- package/node/esm/{CUUoseJmFsCf82bb.mjs → CzXT00vrQa1_gvW9.mjs} +1 -1
- package/node/esm/{C6ZXsNyLXI6zA63X.mjs → D1TKBVmoKGAXf37B.mjs} +9 -9
- package/node/esm/{BN9j8V9gCExMjVtJ.mjs → D2KBymQJd1XhpeQD.mjs} +1 -1
- package/node/esm/{MiU4rDOiocmJ-9Ry.mjs → D6e2z7eZpxOJXHc7.mjs} +1 -1
- package/node/esm/{BtuY37FumvLE7EBo.mjs → D8zEN-6ZdDqDvTxM.mjs} +156 -146
- package/node/esm/DNRhGK-8Tr9xcRyc.mjs +8320 -0
- package/node/esm/DOU54VsOjG-m-NyQ.mjs +210 -0
- package/node/esm/DUTskXCXref-IJnI.mjs +133 -0
- package/node/esm/{DMD12JUh7HJw2-jl.mjs → D_t5AUxSm7_icjzq.mjs} +1 -1
- package/node/esm/Db0v7zXNnyjBIjjI.mjs +372 -0
- package/node/esm/{CUQi5ZtMO02nhG0W.mjs → De2IONBxQhz-Qbyh.mjs} +1 -1
- package/node/esm/Df1bL6VFvrqIdSLB.mjs +40 -0
- package/node/esm/DkwIPzKc3UwdUIfM.mjs +86 -0
- package/node/esm/DrTZbfemSLq2mseG.mjs +111 -0
- package/node/esm/OVfaSb506tNSIvbv.mjs +57107 -0
- package/node/esm/{DefYISWfdZJFx57m.mjs → cGwrLA1RCE-WhJ7w.mjs} +1 -1
- package/node/esm/index.mjs +2657 -65664
- package/node/esm/mFiBSM7XgBHV9AY7.mjs +13010 -0
- package/node/esm/{DdFgXl-Ux2cMBTs_.mjs → yavzZOiZW_EjG9lE.mjs} +1 -1
- package/package.json +6 -7
- package/resources/contents.json +120 -0
- package/resources/fonts/arial-bold-italic.hinted.json +125 -0
- package/resources/fonts/arial-bold-italic.metrics.json +13 -13
- package/resources/fonts/arial-bold-italic.rows.json +9 -0
- package/resources/fonts/arial-bold.hinted.json +125 -0
- package/resources/fonts/arial-bold.metrics.json +12 -12
- package/resources/fonts/arial-bold.rows.json +9 -0
- package/resources/fonts/arial-italic.hinted.json +125 -0
- package/resources/fonts/arial-italic.metrics.json +13 -13
- package/resources/fonts/arial-italic.rows.json +9 -0
- package/resources/fonts/arial-regular.hinted.json +125 -0
- package/resources/fonts/arial-regular.metrics.json +12 -12
- package/resources/fonts/arial-regular.rows.json +9 -0
- package/resources/fonts/calibri-bold-italic.hinted.json +122 -0
- package/resources/fonts/calibri-bold-italic.metrics.json +2 -2
- package/resources/fonts/calibri-bold-italic.rows.json +9 -0
- package/resources/fonts/calibri-bold.hinted.json +122 -0
- package/resources/fonts/calibri-bold.metrics.json +1 -1
- package/resources/fonts/calibri-bold.rows.json +9 -0
- package/resources/fonts/calibri-italic.hinted.json +121 -0
- package/resources/fonts/calibri-italic.metrics.json +2 -2
- package/resources/fonts/calibri-italic.rows.json +9 -0
- package/resources/fonts/calibri-regular.hinted.json +121 -0
- package/resources/fonts/calibri-regular.metrics.json +1 -1
- package/resources/fonts/calibri-regular.rows.json +9 -0
- package/resources/fonts/cambria-bold-italic.hinted.json +105 -0
- package/resources/fonts/cambria-bold-italic.metrics.json +26 -26
- package/resources/fonts/cambria-bold-italic.rows.json +9 -0
- package/resources/fonts/cambria-bold.hinted.json +108 -0
- package/resources/fonts/cambria-bold.metrics.json +19 -19
- package/resources/fonts/cambria-bold.rows.json +9 -0
- package/resources/fonts/cambria-italic.hinted.json +102 -0
- package/resources/fonts/cambria-italic.metrics.json +23 -23
- package/resources/fonts/cambria-italic.rows.json +9 -0
- package/resources/fonts/cambria-regular.hinted.json +110 -0
- package/resources/fonts/cambria-regular.metrics.json +18 -18
- package/resources/fonts/cambria-regular.rows.json +9 -0
- package/resources/fonts/contents.json +280 -0
- package/resources/fonts/courier-new-bold-italic.hinted.json +11 -0
- package/resources/fonts/courier-new-bold-italic.metrics.json +12 -12
- package/resources/fonts/courier-new-bold-italic.rows.json +9 -0
- package/resources/fonts/courier-new-bold.hinted.json +11 -0
- package/resources/fonts/courier-new-bold.metrics.json +12 -12
- package/resources/fonts/courier-new-bold.rows.json +9 -0
- package/resources/fonts/courier-new-italic.hinted.json +11 -0
- package/resources/fonts/courier-new-italic.metrics.json +12 -12
- package/resources/fonts/courier-new-italic.rows.json +9 -0
- package/resources/fonts/courier-new-regular.hinted.json +11 -0
- package/resources/fonts/courier-new-regular.metrics.json +12 -12
- package/resources/fonts/courier-new-regular.rows.json +9 -0
- package/resources/fonts/times-new-roman-bold-italic.hinted.json +125 -0
- package/resources/fonts/times-new-roman-bold-italic.metrics.json +15 -15
- package/resources/fonts/times-new-roman-bold-italic.rows.json +9 -0
- package/resources/fonts/times-new-roman-bold.hinted.json +125 -0
- package/resources/fonts/times-new-roman-bold.metrics.json +12 -12
- package/resources/fonts/times-new-roman-bold.rows.json +9 -0
- package/resources/fonts/times-new-roman-italic.hinted.json +125 -0
- package/resources/fonts/times-new-roman-italic.metrics.json +16 -16
- package/resources/fonts/times-new-roman-italic.rows.json +9 -0
- package/resources/fonts/times-new-roman-regular.hinted.json +125 -0
- package/resources/fonts/times-new-roman-regular.metrics.json +16 -16
- package/resources/fonts/times-new-roman-regular.rows.json +9 -0
- package/resources/locales/de/model.msg.json +87 -9
- package/resources/locales/en/model.msg.json +88 -10
- package/types/scripting-api.json +10636 -8021
- package/types/scripting-enums.json +181 -43
- package/types/scripting.d.ts +15886 -8459
- package/types/src/.generated/wasm/fonts.d.ts +161 -0
- package/types/src/.generated/wasm/fonts_bg.inline.d.ts +3 -0
- package/types/src/.generated/wasm/sdk.d.ts +122 -0
- package/types/src/.generated/wasm/sdk_bg.inline.d.ts +3 -0
- package/types/src/address/AddressUtils.d.ts +10 -1
- package/types/src/address/_StructuredAddress.d.ts +58 -0
- package/types/src/border/IBorders.d.ts +16 -0
- package/types/src/calculation/Calculation.d.ts +93 -363
- package/types/src/calculation/FormulaLiterals.d.ts +2 -1
- package/types/src/calculation/FormulaText.d.ts +18 -2
- package/types/src/calculation/ICalculation.d.ts +37 -9
- package/types/src/calculation/INamedFormulasCollection.d.ts +4 -0
- package/types/src/calculation/NamedFormulaCollection.d.ts +190 -15
- package/types/src/calculation/_FormulaToolkit.d.ts +9 -0
- package/types/src/calculation/_TableExtent.d.ts +60 -0
- package/types/src/calculation/compiler/CompilerUtils.d.ts +17 -0
- package/types/src/calculation/compiler/ParserUtils.d.ts +16 -0
- package/types/src/calculation/compiler/Types.d.ts +1 -1
- package/types/src/calculation/engine/CalcBackend.d.ts +855 -0
- package/types/src/calculation/engine/index.d.ts +10 -0
- package/types/src/calculation/executor/CalcExecutor.d.ts +21 -2
- package/types/src/calculation/executor/CalcExecutorUtils.d.ts +6 -0
- package/types/src/calculation/formula/Formula.d.ts +9 -0
- package/types/src/calculation/formula/FormulaBlock.d.ts +6 -0
- package/types/src/calculation/formula/IFormulaBlock.d.ts +16 -0
- package/types/src/calculation/formula/LambdaValue.d.ts +5 -3
- package/types/src/calculation/functions/FunctionDeclarations.d.ts +5 -1
- package/types/src/calculation/functions/expandDeclaration.d.ts +15 -0
- package/types/src/calculation/functions/initializeFunctions.d.ts +0 -12
- package/types/src/calculation/grid/CalcGrid.d.ts +40 -4
- package/types/src/calculation/grid/CalcGridBackend.d.ts +30 -0
- package/types/src/calculation/grid/CalcGridProxy.d.ts +2 -0
- package/types/src/calculation/grid/CalcGridUtils.d.ts +8 -1
- package/types/src/calculation/grid/FormulaHost.d.ts +51 -6
- package/types/src/calculation/grid/ICalcGrid.d.ts +35 -6
- package/types/src/calculation/grid/_CalcRequest.d.ts +11 -1
- package/types/src/calculation/grid/_CellValueRun.d.ts +21 -0
- package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +27 -2
- package/types/src/calculation/state/CalcScope.d.ts +15 -6
- package/types/src/calculation/state/CalcState.d.ts +10 -0
- package/types/src/calculation/state/CalculationContext.d.ts +2 -2
- package/types/src/calculation/state/IContextContainer.d.ts +12 -0
- package/types/src/calculation/toolkit/FormulaLiteralReader.d.ts +4 -0
- package/types/src/calculation/toolkit/FormulaTextParser.d.ts +10 -0
- package/types/src/calculation/toolkit/FunctionDeclarationTable.d.ts +4 -0
- package/types/src/calculation/toolkit/index.d.ts +12 -0
- package/types/src/cell/ICell.d.ts +256 -7
- package/types/src/cell/ICellHeader.d.ts +7 -6
- package/types/src/cell/ICellProtection.d.ts +1 -1
- package/types/src/cellRange/ICellHeaderRange.d.ts +6 -9
- package/types/src/cellRange/ICellHeaderRanges.d.ts +5 -0
- package/types/src/cellRange/ICellRange.d.ts +322 -55
- package/types/src/cellRange/ICellRanges.d.ts +8 -3
- package/types/src/chart/Chart.d.ts +217 -15
- package/types/src/chart/ChartCollection.d.ts +7 -2
- package/types/src/chart/IChart.d.ts +1921 -35
- package/types/src/chart/IChartCollection.d.ts +27 -2
- package/types/src/chart/_ChartParts.d.ts +1066 -0
- package/types/src/chart/_ChartSource.d.ts +47 -0
- package/types/src/chart/createChart.d.ts +26 -0
- package/types/src/chart/index.d.ts +4 -0
- package/types/src/chart/kinds/ChartKind.d.ts +252 -0
- package/types/src/chart/kinds/_Area.d.ts +3 -0
- package/types/src/chart/kinds/_Bar.d.ts +4 -0
- package/types/src/chart/kinds/_BoxWhisker.d.ts +4 -0
- package/types/src/chart/kinds/_Bubble.d.ts +3 -0
- package/types/src/chart/kinds/_Funnel.d.ts +4 -0
- package/types/src/chart/kinds/_Hierarchy.d.ts +31 -0
- package/types/src/chart/kinds/_Histogram.d.ts +4 -0
- package/types/src/chart/kinds/_HitKinds.d.ts +23 -0
- package/types/src/chart/kinds/_Line.d.ts +4 -0
- package/types/src/chart/kinds/_OfPie.d.ts +4 -0
- package/types/src/chart/kinds/_Pie.d.ts +4 -0
- package/types/src/chart/kinds/_Placeholder.d.ts +6 -0
- package/types/src/chart/kinds/_Radar.d.ts +4 -0
- package/types/src/chart/kinds/_Scatter.d.ts +8 -0
- package/types/src/chart/kinds/_Sunburst.d.ts +4 -0
- package/types/src/chart/kinds/_Surface.d.ts +4 -0
- package/types/src/chart/kinds/_Treemap.d.ts +4 -0
- package/types/src/chart/kinds/_Waterfall.d.ts +18 -0
- package/types/src/chart/kinds/_builtIns.d.ts +11 -0
- package/types/src/chart/layout/ChartLayout.d.ts +825 -0
- package/types/src/chart/layout/TextMeasurer.d.ts +38 -0
- package/types/src/chart/layout/_HitGeometry.d.ts +50 -0
- package/types/src/chart/layout/_HitTest.d.ts +36 -0
- package/types/src/chart/layout/_Layout.d.ts +25 -0
- package/types/src/chart/layout/_LayoutUtils.d.ts +97 -0
- package/types/src/chart/math/BoxStats.d.ts +35 -0
- package/types/src/chart/math/DateUnitCalcs.d.ts +80 -0
- package/types/src/chart/math/DisplayUnits.d.ts +53 -0
- package/types/src/chart/math/Histogram.d.ts +48 -0
- package/types/src/chart/math/OrdUnitCalcs.d.ts +166 -0
- package/types/src/chart/math/Treemap.d.ts +28 -0
- package/types/src/chart/math/Trendlines.d.ts +71 -0
- package/types/src/chart/math/UnitCalcs.d.ts +98 -0
- package/types/src/chart/model/ChartModel.d.ts +681 -0
- package/types/src/chart/model/_ChartType.d.ts +14 -0
- package/types/src/chart/model/_Edits.d.ts +489 -0
- package/types/src/chart/model/_Grouping.d.ts +83 -0
- package/types/src/chart/model/_Inference.d.ts +52 -0
- package/types/src/chart/model/_ModelFacts.d.ts +112 -0
- package/types/src/chart/model/_NewChart.d.ts +208 -0
- package/types/src/chart/model/_OfPie.d.ts +18 -0
- package/types/src/chart/resolve/_LegacyStyles.d.ts +48 -0
- package/types/src/chart/resolve/_Resolve.d.ts +51 -0
- package/types/src/chart/resolve/_ResolvedChart.d.ts +444 -0
- package/types/src/collections/RTree.d.ts +116 -36
- package/types/src/collections/SparseGrid.d.ts +6 -3
- package/types/src/collections/SpatialMap.d.ts +2 -8
- package/types/src/collections/SpatialMap3D.d.ts +2 -0
- package/types/src/collections/index.d.ts +1 -1
- package/types/src/comment/Comment.d.ts +32 -9
- package/types/src/comment/IComment.d.ts +41 -4
- package/types/src/comment/_NoteBox.d.ts +19 -2
- package/types/src/condition/AnchoredConditional.d.ts +28 -2
- package/types/src/condition/ICondition.d.ts +3 -2
- package/types/src/conditionalFormat/ConditionalFormat.d.ts +9 -3
- package/types/src/conditionalFormat/IConditionalFormat.d.ts +4 -3
- package/types/src/dataTable/DataTable.d.ts +67 -0
- package/types/src/dataTable/DataTableCollection.d.ts +19 -0
- package/types/src/dataTable/IDataTable.d.ts +99 -0
- package/types/src/dataTable/IDataTableCollection.d.ts +18 -0
- package/types/src/dataTable/index.d.ts +6 -0
- package/types/src/dataValidation/DataValidation.d.ts +1 -1
- package/types/src/dataValidation/DataValidationCollection.d.ts +4 -1
- package/types/src/dataValidation/IDataValidation.d.ts +1 -1
- package/types/src/dataValidation/IDataValidationCollection.d.ts +24 -0
- package/types/src/documentProperties/DocumentProperties.d.ts +66 -0
- package/types/src/documentProperties/ICustomProperty.d.ts +69 -0
- package/types/src/documentProperties/IDocumentProperties.d.ts +110 -0
- package/types/src/documentProperties/index.d.ts +3 -0
- package/types/src/externalBook/IExternalBook.d.ts +1 -1
- package/types/src/fill/IFill.d.ts +7 -0
- package/types/src/fill/IFillable.d.ts +47 -0
- package/types/src/fill/IStroke.d.ts +15 -1
- package/types/src/fill/PaintUtils.d.ts +22 -0
- package/types/src/fill/index.d.ts +2 -0
- package/types/src/font/AdvanceBuilder.d.ts +34 -0
- package/types/src/font/AdvanceTable.d.ts +128 -14
- package/types/src/font/CanvasAdvanceBuilder.d.ts +54 -0
- package/types/src/font/FontCapture.d.ts +4 -0
- package/types/src/font/FontCollection.d.ts +53 -2
- package/types/src/font/FontPlatform.d.ts +20 -0
- package/types/src/font/FontUtils.d.ts +5 -0
- package/types/src/font/IFont.d.ts +191 -61
- package/types/src/font/IFontCollection.d.ts +20 -14
- package/types/src/font/IFontStyle.d.ts +207 -0
- package/types/src/font/TableFileAdvanceBuilder.d.ts +9 -0
- package/types/src/font/_FontUtils.d.ts +11 -4
- package/types/src/font/_FontsVersion.d.ts +7 -0
- package/types/src/font/index.d.ts +1 -3
- package/types/src/font/platform.browser.d.ts +15 -0
- package/types/src/font/platform.node.d.ts +5 -0
- package/types/src/group/Group.d.ts +5 -0
- package/types/src/group/GroupMovableCollection.d.ts +4 -0
- package/types/src/history/IHistory.d.ts +19 -2
- package/types/src/hyperlink/IHyperlink.d.ts +7 -1
- package/types/src/index.d.ts +3 -0
- package/types/src/license/LicenseManager.d.ts +21 -0
- package/types/src/license/_Utils.d.ts +18 -1
- package/types/src/license/runtime.browser.d.ts +5 -0
- package/types/src/license/runtime.node.d.ts +10 -0
- package/types/src/listener/IListener.d.ts +14 -2
- package/types/src/listener/ListenerEmitter.d.ts +11 -3
- package/types/src/movable/IMovable.d.ts +28 -15
- package/types/src/movable/IMovableCollection.d.ts +1 -1
- package/types/src/movable/Movable.d.ts +12 -1
- package/types/src/movable/MovableCollection.d.ts +7 -3
- package/types/src/movable/_InsertableCollection.d.ts +16 -5
- package/types/src/named/INamed.d.ts +30 -0
- package/types/src/named/INamedCollection.d.ts +2 -2
- package/types/src/named/NamedCollection.d.ts +16 -4
- package/types/src/numFmt/NumberFormatParser.d.ts +5 -0
- package/types/src/outline/IOutline.d.ts +1 -1
- package/types/src/outline/Outline.d.ts +2 -2
- package/types/src/picture/IPicture.d.ts +98 -1
- package/types/src/picture/Picture.d.ts +15 -7
- package/types/src/pivot/IPivotTable.d.ts +2 -2
- package/types/src/pivot/PivotTable.d.ts +5 -5
- package/types/src/primitives/ReferenceRange.d.ts +2 -2
- package/types/src/print/IPageLayout.d.ts +635 -0
- package/types/src/print/PageLayout.d.ts +258 -0
- package/types/src/print/index.d.ts +1 -1
- package/types/src/protectedRange/IProtectedRange.d.ts +2 -2
- package/types/src/protection/IProtection.d.ts +6 -0
- package/types/src/protection/PasswordHasher.d.ts +13 -0
- package/types/src/richData/IRichDataKind.d.ts +22 -0
- package/types/src/richData/RichDataRegistry.d.ts +57 -0
- package/types/src/richData/RichText.d.ts +59 -0
- package/types/src/richData/index.d.ts +3 -0
- package/types/src/scripting/IModule.d.ts +3 -3
- package/types/src/scripting/IScript.d.ts +2 -2
- package/types/src/scripting/ITypedFunction.d.ts +1 -1
- package/types/src/scripting/declarations.d.ts +3 -0
- package/types/src/selection/ChartElementSelection.d.ts +39 -0
- package/types/src/selection/IChartElementSelection.d.ts +103 -0
- package/types/src/selection/IItemSelection.d.ts +131 -0
- package/types/src/selection/IMovableSelection.d.ts +6 -34
- package/types/src/selection/IRangeSelection.d.ts +4 -4
- package/types/src/selection/ItemSelection.d.ts +49 -0
- package/types/src/selection/MovableSelection.d.ts +11 -30
- package/types/src/selection/RangeSelection.d.ts +4 -4
- package/types/src/selection/index.d.ts +3 -0
- package/types/src/shape/IShape.d.ts +2 -1
- package/types/src/shape/IShapeStyle.d.ts +5 -31
- package/types/src/shape/ITextBoxStyle.d.ts +85 -0
- package/types/src/shape/ShapeStyleUtils.d.ts +13 -1
- package/types/src/shape/_Connectors.d.ts +9 -9
- package/types/src/shape/_ShapeStyle.d.ts +9 -0
- package/types/src/shape/index.d.ts +1 -0
- package/types/src/sheet/CellRegion.d.ts +37 -3
- package/types/src/sheet/IOpaqueSheet.d.ts +46 -0
- package/types/src/sheet/ISheet.d.ts +81 -1078
- package/types/src/sheet/IWorksheet.d.ts +1514 -0
- package/types/src/sheet/{ISheetCollection.d.ts → IWorksheetCollection.d.ts} +37 -12
- package/types/src/sheet/NamedCellRange.d.ts +2 -2
- package/types/src/sheet/NamedRange.d.ts +2 -2
- package/types/src/sheet/OpaqueSheet.d.ts +114 -0
- package/types/src/sheet/SheetCell.d.ts +24 -27
- package/types/src/sheet/SheetRange.d.ts +42 -11
- package/types/src/sheet/SheetRanges.d.ts +12 -10
- package/types/src/sheet/{Sheet.d.ts → Worksheet.d.ts} +510 -144
- package/types/src/sheet/WorksheetCollection.d.ts +39 -0
- package/types/src/sheet/_Anomalies.d.ts +109 -0
- package/types/src/sheet/_AnomalyFormulaChecks.d.ts +125 -0
- package/types/src/sheet/_AnomalyLabelChecks.d.ts +21 -0
- package/types/src/sheet/_CellBuffer.d.ts +11 -1
- package/types/src/sheet/_CopyUtils.d.ts +13 -6
- package/types/src/sheet/_IgnoredErrors.d.ts +46 -0
- package/types/src/sheet/_InvalidSheetRange.d.ts +3 -2
- package/types/src/sheet/_Kinds.d.ts +34 -0
- package/types/src/sheet/_Labels.d.ts +38 -0
- package/types/src/sheet/_RangeStateSweep.d.ts +2 -3
- package/types/src/sheet/_ScalarListFactory.d.ts +1 -1
- package/types/src/sheet/_SheetAutoFillUtils.d.ts +3 -3
- package/types/src/sheet/_SheetAutoFitUtils.d.ts +3 -3
- package/types/src/sheet/_SheetChangeEvent.d.ts +72 -0
- package/types/src/sheet/_SheetCoords.d.ts +3 -3
- package/types/src/sheet/_SheetEvents.d.ts +1 -1
- package/types/src/sheet/_SheetFilterUtils.d.ts +6 -6
- package/types/src/sheet/_SheetIntents.d.ts +32 -14
- package/types/src/sheet/_SheetMessages.d.ts +1 -1
- package/types/src/sheet/_SheetMutations.d.ts +7 -8
- package/types/src/sheet/_SheetSortUtils.d.ts +2 -2
- package/types/src/sheet/_SheetStateReader.d.ts +18 -0
- package/types/src/sheet/_SheetStateTypes.d.ts +60 -1
- package/types/src/sheet/_SheetUtils.d.ts +20 -19
- package/types/src/sheet/_WatchAnchor.d.ts +15 -2
- package/types/src/sheet/clipboard/RangeClipboardItems.d.ts +4 -4
- package/types/src/sheet/clipboard/SheetHTMLTableParser.d.ts +3 -3
- package/types/src/sheet/clipboard/SheetHTMLTableWriter.d.ts +3 -3
- package/types/src/sheet/index.d.ts +5 -2
- package/types/src/sheet/style/SheetCellStyle.d.ts +67 -86
- package/types/src/sheet/style/SheetDirectStyle.d.ts +3 -3
- package/types/src/sheet/style/SheetNamedStyle.d.ts +2 -0
- package/types/src/sheet/style/_DigitWidth.d.ts +7 -0
- package/types/src/sheet/style/_Resolvers.d.ts +3 -2
- package/types/src/sheet/style/_StyleUtils.d.ts +7 -43
- package/types/src/sheetHeader/ISheetHeader.d.ts +2 -2
- package/types/src/sheetHeader/SheetCellHeader.d.ts +2 -0
- package/types/src/sheetHeader/SheetCellHeaderRange.d.ts +2 -0
- package/types/src/sheetHeader/SheetCellHeaderRanges.d.ts +2 -0
- package/types/src/sheetHeader/SheetHeader.d.ts +7 -6
- package/types/src/sheetHeader/_HeaderUtils.d.ts +2 -3
- package/types/src/sheetProtection/{ISheetProtection.d.ts → IWorksheetProtection.d.ts} +28 -28
- package/types/src/sheetProtection/WorksheetProtection.d.ts +51 -0
- package/types/src/sheetProtection/index.d.ts +1 -1
- package/types/src/sheetView/{ISheetView.d.ts → IWorksheetView.d.ts} +168 -61
- package/types/src/sheetView/WorksheetView.d.ts +139 -0
- package/types/src/sheetView/_SheetViewUtils.d.ts +5 -3
- package/types/src/sheetView/index.d.ts +1 -1
- package/types/src/slicer/ISlicer.d.ts +2 -2
- package/types/src/sort/ISort.d.ts +35 -5
- package/types/src/style/ICellStyle.d.ts +56 -44
- package/types/src/style/_BuiltInStyleDefs.d.ts +4 -3
- package/types/src/table/AnchoredTable.d.ts +23 -7
- package/types/src/table/AutoTable.d.ts +1 -1
- package/types/src/table/ITable.d.ts +32 -19
- package/types/src/table/_NamedTable.d.ts +3 -3
- package/types/src/table/_NamedTableSource.d.ts +2 -2
- package/types/src/text/IText.d.ts +4 -51
- package/types/src/text/TextEngine.d.ts +34 -0
- package/types/src/text/TextFrame.d.ts +4 -2
- package/types/src/text/TextRun.d.ts +3 -2
- package/types/src/text/TextWrapper.d.ts +32 -26
- package/types/src/text/_TextUtils.d.ts +5 -5
- package/types/src/text/_TextWrapperFallback.d.ts +49 -0
- package/types/src/text/impl/TabStrategy.d.ts +3 -1
- package/types/src/text/richtext/IRichText.d.ts +16 -2
- package/types/src/text/richtext/index.d.ts +0 -1
- package/types/src/theme/ITheme.d.ts +108 -7
- package/types/src/theme/ThemeCollection.d.ts +5 -0
- package/types/src/theme/_OfficeFontScheme.d.ts +8 -0
- package/types/src/transaction/ITransaction.d.ts +20 -1
- package/types/src/transaction/Transaction.d.ts +8 -1
- package/types/src/transaction/_BatchHandle.d.ts +118 -0
- package/types/src/type/AbstractCollection.d.ts +4 -13
- package/types/src/type/ICollection.d.ts +17 -4
- package/types/src/type/IProperties.d.ts +1 -1
- package/types/src/utils/_CSSUtils.d.ts +1 -1
- package/types/src/wasm/_fontsWasm.d.ts +7 -0
- package/types/src/wasm/_sdkWasm.d.ts +1 -1
- package/types/src/wasm/fontsWasm.d.ts +32 -0
- package/types/src/wasm/index.d.ts +1 -0
- package/types/src/wasm/loader.browser.d.ts +9 -0
- package/types/src/wasm/loader.node.d.ts +9 -0
- package/types/src/wasm/sdkWasm.d.ts +6 -3
- package/types/src/workbook/IWorkbook.d.ts +229 -38
- package/types/src/workbook/Workbook.d.ts +77 -22
- package/types/src/workbook/WorkbookRange.d.ts +2 -2
- package/types/src/workbook/WorkbookRanges.d.ts +2 -2
- package/types/src/workbook/_WorkbookIntents.d.ts +2 -2
- package/types/src/workbook/_WorkbookMessages.d.ts +5 -0
- package/types/src/workbookView/IWorkbookView.d.ts +82 -0
- package/types/src/workbookView/WorkbookView.d.ts +21 -0
- package/browser/esm/BbSmt62FpFIpoVzu.mjs +0 -392
- package/browser/esm/BgcZ-CoTbMfmyDJL.mjs +0 -412
- package/browser/esm/DOMHmhYzPcLVcpAW.mjs +0 -7
- package/browser/esm/DUvUK61b2_4pf4tG.mjs +0 -484
- package/node/esm/CCouEwT37f08qO3V.mjs +0 -7
- package/node/esm/CT0CN82y0_Qgoryk.mjs +0 -7568
- package/node/esm/DHUADiCmxNQS1ARz.mjs +0 -417
- package/node/esm/Ds0d8zXzmgOu3MGx.mjs +0 -403
- package/types/src/chart/_ChartXml.d.ts +0 -70
- package/types/src/collections/OverlappingRangeIterator.d.ts +0 -87
- package/types/src/collections/_RangeSweep.d.ts +0 -97
- package/types/src/font/CanvasFontMeasurer.d.ts +0 -25
- package/types/src/font/FontKitFontMeasurer.d.ts +0 -11
- package/types/src/font/SimpleFontMeasurer.d.ts +0 -4
- package/types/src/print/IPrint.d.ts +0 -212
- package/types/src/sheet/SheetCollection.d.ts +0 -29
- package/types/src/sheetProtection/SheetProtection.d.ts +0 -51
- package/types/src/sheetView/SheetView.d.ts +0 -122
- package/types/src/text/richtext/IStyledFont.d.ts +0 -330
package/browser/esm/index.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.11
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { $
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { a as e, l as t, o as n, t as r, u as i } from "./CU3DmJ-YnVVrC1_k.mjs";
|
|
8
|
+
import { A as a, Ar as o, Bi as s, Bt as c, C as l, Cn as u, Cr as d, D as f, Dr as p, E as m, Er as h, Fr as g, Ft as _, Gi as v, Gt as y, Hi as b, It as x, Ji as S, Jt as C, Ki as ee, Kt as te, Lt as ne, Mr as re, N as ie, Ni as ae, Nr as oe, O as se, Or as ce, Pr as le, Qr as ue, Ri as de, Rt as fe, S as pe, Sn as me, Sr as he, T as ge, Tr as _e, Ui as ve, Ur as ye, Vi as be, Vr as xe, Vt as Se, Wi as Ce, Wt as we, Xi as Te, Xr as Ee, Xt as De, Yi as Oe, Yt as w, Zi as ke, Zr as Ae, _i as je, _r as Me, a as Ne, ai as Pe, an as Fe, at as Ie, b as T, br as Le, bt as Re, ci as ze, ct as Be, di as Ve, dt as He, en as Ue, fi as We, fr as E, ft as Ge, gi as Ke, gn as qe, gr as Je, gt as Ye, hi as Xe, hn as Ze, hr as Qe, ht as $e, i as et, ii as tt, in as nt, it as rt, jr as it, k as at, kr as ot, lt as st, mi as ct, mr as lt, mt as ut, nn as D, oi as dt, on as ft, pi as pt, pr as mt, pt as ht, qi as O, qr as gt, qt as _t, r as vt, ri as k, rt as yt, si as bt, sn as xt, tn as St, ui as Ct, ut as wt, v as Tt, vr as Et, vt as Dt, w as A, wn as Ot, wr as kt, x as At, xr as jt, xt as Mt, y as j, yr as Nt, yt as Pt, zt as Ft } from "./C16ycKja6zG0crV_.mjs";
|
|
9
|
+
import { $t as It, B as Lt, Ct as Rt, E as zt, Gt as Bt, H as Vt, I as Ht, Kt as Ut, L as Wt, O as Gt, Qt as Kt, R as qt, St as Jt, V as Yt, W as Xt, Yt as M, at as Zt, ct as Qt, dt as $t, en as N, ft as P, lt as en, ot as tn, qt as F, rt as nn, st as rn, ut as an, z as on } from "./CV5EGEjG5_-CPpP0.mjs";
|
|
10
|
+
import { n as sn, t as cn } from "./BMyDRQ716j79h_bH.mjs";
|
|
11
|
+
import { t as ln } from "./gssVX_FH1XFN-twD.mjs";
|
|
12
12
|
import { FormulaError as I, ScalarType as L } from "@sheetxl/primitives";
|
|
13
|
-
import { BufferUtils as
|
|
13
|
+
import { BufferUtils as un, CommonUtils as R, CoordUtils as z, DOMUtils as dn, DefaultLanguagePackService as fn, ExpectedError as B, InvalidPasswordError as pn, MimeType as mn, Notifier as V, NullNotAllowedError as hn, OutOfBoundsError as H, PasswordRequiredError as gn, ProtectedError as U, UndoManager as _n, messageKey as W, t as G } from "@sheetxl/utils";
|
|
14
14
|
export * from "@sheetxl/primitives";
|
|
15
15
|
export * from "@sheetxl/utils";
|
|
16
|
-
var
|
|
16
|
+
var vn, yn = class extends _n {
|
|
17
17
|
constructor(e, t = 50) {
|
|
18
18
|
super(t), this._transactions = e, this._floorId = e ? e.getCurrentCommit(!1).getId() : null, this._removeListener = e?.addListener({ onCommitChange: () => this._notifyOnStackChange() });
|
|
19
19
|
}
|
|
@@ -98,14 +98,14 @@ var an, on = class extends nn {
|
|
|
98
98
|
return e.length === 0 && this._repeatOperation !== null && e.push(this._repeatOperation.description), Object.freeze(e);
|
|
99
99
|
}
|
|
100
100
|
getUndoEntries() {
|
|
101
|
-
return this._undoCommits().map(
|
|
101
|
+
return this._undoCommits().map(xn);
|
|
102
102
|
}
|
|
103
103
|
getRedoEntries() {
|
|
104
|
-
let e = this._redoCommits().map(
|
|
104
|
+
let e = this._redoCommits().map(xn);
|
|
105
105
|
return e.length === 0 && this._repeatOperation !== null && e.push({
|
|
106
106
|
description: this._repeatOperation.description,
|
|
107
107
|
author: null,
|
|
108
|
-
meta:
|
|
108
|
+
meta: bn
|
|
109
109
|
}), Object.freeze(e);
|
|
110
110
|
}
|
|
111
111
|
addUndoOperation() {
|
|
@@ -117,15 +117,15 @@ var an, on = class extends nn {
|
|
|
117
117
|
close() {
|
|
118
118
|
this._removeListener?.();
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, bn = Object.freeze({}), xn = (e) => ({
|
|
121
121
|
description: e.getDescription(),
|
|
122
122
|
author: e.getAuthor(),
|
|
123
|
-
meta: e.getMeta() ??
|
|
124
|
-
}),
|
|
125
|
-
constructor(
|
|
126
|
-
this._dirty = !1, this._store =
|
|
123
|
+
meta: e.getMeta() ?? bn
|
|
124
|
+
}), Sn = class {
|
|
125
|
+
constructor(t, n) {
|
|
126
|
+
this._dirty = !1, this._store = t, this._savedCommitId = t.getCurrentCommit()?.getId() ?? null, this._emitter = new e(this);
|
|
127
127
|
let r = this;
|
|
128
|
-
this._removeStoreListener =
|
|
128
|
+
this._removeStoreListener = t.addListener({
|
|
129
129
|
onCommitEnd() {
|
|
130
130
|
r._recompute();
|
|
131
131
|
},
|
|
@@ -159,10 +159,10 @@ var an, on = class extends nn {
|
|
|
159
159
|
this._removeStoreListener?.(), this._removeCommitListener?.(), this._emitter.close();
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
|
-
|
|
163
|
-
var K = class
|
|
162
|
+
vn ||= {};
|
|
163
|
+
var Cn, K = class t {
|
|
164
164
|
constructor(n, r = {}) {
|
|
165
|
-
this._password = null, this._emitter = new
|
|
165
|
+
this._password = null, this._emitter = new e(this), this._path = n ?? null, this._name = r.name ?? null, this._format = r.format ?? null, this._size = r.size ?? null, this._lastModified = r.lastModified ?? null, this._canWrite = r.canWrite ?? t._defaultCanWrite(this._path), this._encryption = r.encryption ?? null;
|
|
166
166
|
}
|
|
167
167
|
static _defaultCanWrite(e) {
|
|
168
168
|
return !!e && !/^(https?:|data:|blob:)/i.test(e);
|
|
@@ -173,7 +173,7 @@ var K = class e {
|
|
|
173
173
|
getName() {
|
|
174
174
|
if (this._name !== null && this._name !== void 0) return this._name;
|
|
175
175
|
let e = this._cleanPath();
|
|
176
|
-
return e &&
|
|
176
|
+
return e && O(e) || null;
|
|
177
177
|
}
|
|
178
178
|
getPath() {
|
|
179
179
|
return this._path;
|
|
@@ -184,7 +184,7 @@ var K = class e {
|
|
|
184
184
|
getExtension() {
|
|
185
185
|
let e = this._cleanPath();
|
|
186
186
|
if (!e) return null;
|
|
187
|
-
let t =
|
|
187
|
+
let t = S(e);
|
|
188
188
|
return t ? t.toLowerCase() : null;
|
|
189
189
|
}
|
|
190
190
|
getEncryption() {
|
|
@@ -234,18 +234,18 @@ var K = class e {
|
|
|
234
234
|
];
|
|
235
235
|
return `${t} ${(n / 1024 ** r).toFixed(2)}${i[Math.min(r, i.length - 1)]}`;
|
|
236
236
|
}
|
|
237
|
-
}, q = /* @__PURE__ */ new WeakMap(),
|
|
237
|
+
}, q = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new Set(), Tn = (e) => q.get(e) ?? null, En = () => Array.from(wn, (e) => e.getOrigin()), Dn = class t {
|
|
238
238
|
constructor(n) {
|
|
239
|
-
this._released = !1,
|
|
239
|
+
this._released = !1, t._assertFree(n), this._emitter = new e(this), this._origin = n, q.set(n, this), wn.add(this);
|
|
240
240
|
}
|
|
241
241
|
getOrigin() {
|
|
242
242
|
return this._origin;
|
|
243
243
|
}
|
|
244
|
-
setOrigin(
|
|
245
|
-
|
|
244
|
+
setOrigin(e) {
|
|
245
|
+
e !== this._origin && (t._assertFree(e), this._released || (q.delete(this._origin), q.set(e, this)), this._origin = e, this._emitter.notify("onOriginChange"));
|
|
246
246
|
}
|
|
247
247
|
release() {
|
|
248
|
-
this._released || (this._released = !0, q.get(this._origin) === this && q.delete(this._origin),
|
|
248
|
+
this._released || (this._released = !0, q.get(this._origin) === this && q.delete(this._origin), wn.delete(this));
|
|
249
249
|
}
|
|
250
250
|
addListeners(e, t) {
|
|
251
251
|
return this._emitter.addListeners(e, t);
|
|
@@ -253,7 +253,7 @@ var K = class e {
|
|
|
253
253
|
static _assertFree(e) {
|
|
254
254
|
if (q.has(e)) throw Error("This origin already backs an open workbook; an origin backs one workbook at a time.");
|
|
255
255
|
}
|
|
256
|
-
},
|
|
256
|
+
}, On = class {
|
|
257
257
|
constructor() {
|
|
258
258
|
this._defaultStringSourceType = "filepath";
|
|
259
259
|
}
|
|
@@ -264,28 +264,28 @@ var K = class e {
|
|
|
264
264
|
i && (n = i);
|
|
265
265
|
let a = t.format, o = this._detectSourceType(n);
|
|
266
266
|
if (!o) throw Error("Unable to detect source type from provided input.");
|
|
267
|
-
let s,
|
|
267
|
+
let s, c, l = !1;
|
|
268
268
|
if (o === "filepath") {
|
|
269
269
|
let e = typeof n == "string" && n.startsWith("file://") ? n.slice(7) : n;
|
|
270
|
-
n = await this.filePathToFile(e), o = "file",
|
|
270
|
+
n = await this.filePathToFile(e), o = "file", l = !0;
|
|
271
271
|
}
|
|
272
272
|
switch (o) {
|
|
273
273
|
case "file": {
|
|
274
|
-
let e = n, r = e?.name, o = r ? `${
|
|
275
|
-
s = await e.arrayBuffer(),
|
|
274
|
+
let e = n, r = e?.name, o = r ? `${O(r)}` : "";
|
|
275
|
+
s = await e.arrayBuffer(), c = {
|
|
276
276
|
format: a,
|
|
277
|
-
ext:
|
|
277
|
+
ext: S(r),
|
|
278
278
|
name: o,
|
|
279
279
|
absolutePath: r,
|
|
280
280
|
size: e.size,
|
|
281
281
|
lastModified: e.lastModified,
|
|
282
|
-
canWrite: !t.asCopy && (!!i ||
|
|
282
|
+
canWrite: !t.asCopy && (!!i || l && this._canWriteLocalPath())
|
|
283
283
|
};
|
|
284
284
|
break;
|
|
285
285
|
}
|
|
286
286
|
case "blob": {
|
|
287
287
|
let e = n;
|
|
288
|
-
s = await e.arrayBuffer(),
|
|
288
|
+
s = await e.arrayBuffer(), c = {
|
|
289
289
|
format: a,
|
|
290
290
|
size: e.size
|
|
291
291
|
};
|
|
@@ -298,7 +298,7 @@ var K = class e {
|
|
|
298
298
|
let [, t] = n.split(",");
|
|
299
299
|
e = t;
|
|
300
300
|
} else e = n;
|
|
301
|
-
s =
|
|
301
|
+
s = un.base64ToArrayBuffer(e), c = {
|
|
302
302
|
format: a,
|
|
303
303
|
size: e.length
|
|
304
304
|
};
|
|
@@ -314,28 +314,28 @@ var K = class e {
|
|
|
314
314
|
e = i.input, t = i.init, r = i.timeout;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
|
-
let i = r || 3e4, o = new AbortController(),
|
|
317
|
+
let i = r || 3e4, o = new AbortController(), l = setTimeout(() => o.abort(), i), u = typeof e == "string" ? e : e.toString(), d = S(u);
|
|
318
318
|
try {
|
|
319
319
|
let n = await fetch(e, {
|
|
320
320
|
...t,
|
|
321
321
|
signal: o.signal
|
|
322
322
|
});
|
|
323
|
-
if (clearTimeout(
|
|
323
|
+
if (clearTimeout(l), !n.ok) throw Error(`Failed to fetch: ${n.status} ${n.statusText}`);
|
|
324
324
|
let r = await n.arrayBuffer();
|
|
325
|
-
if (!r) throw Error(`Unable to fetched content: ${
|
|
326
|
-
s = r,
|
|
325
|
+
if (!r) throw Error(`Unable to fetched content: ${u}`);
|
|
326
|
+
s = r, c = {
|
|
327
327
|
format: a,
|
|
328
|
-
ext:
|
|
329
|
-
name:
|
|
330
|
-
absolutePath:
|
|
328
|
+
ext: d,
|
|
329
|
+
name: O(u, !0),
|
|
330
|
+
absolutePath: u
|
|
331
331
|
};
|
|
332
332
|
} catch (e) {
|
|
333
|
-
throw clearTimeout(
|
|
333
|
+
throw clearTimeout(l), e.name === "AbortError" ? Error(`Fetch timeout after ${i}ms: ${u}`) : e;
|
|
334
334
|
}
|
|
335
335
|
break;
|
|
336
336
|
}
|
|
337
337
|
case "buffer":
|
|
338
|
-
s = n,
|
|
338
|
+
s = n, c = { format: a };
|
|
339
339
|
break;
|
|
340
340
|
case "stream": {
|
|
341
341
|
let e = n.getReader(), t = [], r = 0;
|
|
@@ -348,25 +348,25 @@ var K = class e {
|
|
|
348
348
|
} finally {
|
|
349
349
|
e.releaseLock();
|
|
350
350
|
}
|
|
351
|
-
let i = new ArrayBuffer(r), o = new Uint8Array(i),
|
|
352
|
-
for (let e of t) o.set(e,
|
|
353
|
-
s = i,
|
|
351
|
+
let i = new ArrayBuffer(r), o = new Uint8Array(i), l = 0;
|
|
352
|
+
for (let e of t) o.set(e, l), l += e.length;
|
|
353
|
+
s = i, c = { format: a };
|
|
354
354
|
break;
|
|
355
355
|
}
|
|
356
356
|
default: throw Error(`Unsupported source type: ${o}`);
|
|
357
357
|
}
|
|
358
|
-
|
|
359
|
-
let
|
|
358
|
+
c.canWrite && await this.findOpenOrigin(r, c) && (c.canWrite = !1);
|
|
359
|
+
let u = await e.decode(s, {
|
|
360
360
|
sourceType: o,
|
|
361
|
-
...
|
|
361
|
+
...c
|
|
362
362
|
});
|
|
363
|
-
return
|
|
363
|
+
return u ? (await this.onWorkbookRead(u, r), u) : null;
|
|
364
364
|
}
|
|
365
365
|
async findOpenOrigin(e, t) {
|
|
366
366
|
return t.absolutePath ? this.findOpenPath(t.absolutePath) : null;
|
|
367
367
|
}
|
|
368
368
|
findOpenPath(e, t) {
|
|
369
|
-
return
|
|
369
|
+
return En().find((n) => {
|
|
370
370
|
if (n === t || !n.canWrite()) return !1;
|
|
371
371
|
let r = n.getPath();
|
|
372
372
|
return !!r && this.isSamePath(r, e);
|
|
@@ -397,21 +397,21 @@ var K = class e {
|
|
|
397
397
|
}
|
|
398
398
|
if (typeof File < "u" && e instanceof File) return "file";
|
|
399
399
|
if (typeof Blob < "u" && e instanceof Blob) return "blob";
|
|
400
|
-
let t = e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]", n = ArrayBuffer.isView(e), r =
|
|
400
|
+
let t = e instanceof ArrayBuffer || Object.prototype.toString.call(e) === "[object ArrayBuffer]", n = ArrayBuffer.isView(e), r = un.isNodeBuffer(e);
|
|
401
401
|
return t || n || r ? "buffer" : typeof ReadableStream < "u" && e instanceof ReadableStream || Object.prototype.toString.call(e) === "[object ReadableStream]" || e && typeof e.getReader == "function" && e.locked !== void 0 ? "stream" : null;
|
|
402
402
|
}
|
|
403
|
-
},
|
|
403
|
+
}, kn = class extends On {
|
|
404
404
|
constructor(e, t) {
|
|
405
405
|
super(), this._getWriteFormats = e, this._getReadFormats = t, this._defaultStringSourceType = "fetch", this._handleCache = /* @__PURE__ */ new WeakMap();
|
|
406
406
|
}
|
|
407
407
|
async fileFromHandle(e) {
|
|
408
|
-
return
|
|
408
|
+
return jn(e) ? e.getFile() : null;
|
|
409
409
|
}
|
|
410
410
|
async resolveSource() {
|
|
411
411
|
let e = await this._getReadFormats?.() ?? [];
|
|
412
412
|
if (typeof globalThis.showOpenFilePicker == "function") try {
|
|
413
413
|
let t = function(e) {
|
|
414
|
-
let t =
|
|
414
|
+
let t = An(e);
|
|
415
415
|
if (t.length <= 1) return t;
|
|
416
416
|
let n = /* @__PURE__ */ new Set(), r = {};
|
|
417
417
|
for (let e of t) for (let [t, i] of Object.entries(e.accept)) for (let e of i) n.has(e) || (n.add(e), (r[t] ??= []).push(e));
|
|
@@ -426,13 +426,13 @@ var K = class e {
|
|
|
426
426
|
throw e;
|
|
427
427
|
}
|
|
428
428
|
let t = e.flatMap((e) => e.exts.map((e) => "." + e)).join(", ");
|
|
429
|
-
return
|
|
429
|
+
return dn.openFileDialog(t);
|
|
430
430
|
}
|
|
431
431
|
async findOpenOrigin(e) {
|
|
432
|
-
return
|
|
432
|
+
return jn(e) ? this._findOpenHandle(e) : null;
|
|
433
433
|
}
|
|
434
434
|
async _findOpenHandle(e, t) {
|
|
435
|
-
for (let n of
|
|
435
|
+
for (let n of En()) {
|
|
436
436
|
if (n === t || !n.canWrite()) continue;
|
|
437
437
|
let r = this._handleCache.get(n);
|
|
438
438
|
if (r && typeof r.isSameEntry == "function" && await r.isSameEntry(e)) return n;
|
|
@@ -440,7 +440,7 @@ var K = class e {
|
|
|
440
440
|
return null;
|
|
441
441
|
}
|
|
442
442
|
async onWorkbookRead(e, t) {
|
|
443
|
-
if (!
|
|
443
|
+
if (!jn(t)) return;
|
|
444
444
|
let n = e.getOrigin?.();
|
|
445
445
|
n?.canWrite() && this._handleCache.set(n, t);
|
|
446
446
|
}
|
|
@@ -467,17 +467,17 @@ var K = class e {
|
|
|
467
467
|
if (!a) {
|
|
468
468
|
c = await globalThis.showSaveFilePicker({
|
|
469
469
|
suggestedName: n,
|
|
470
|
-
types:
|
|
470
|
+
types: An(o)
|
|
471
471
|
});
|
|
472
472
|
let t = await this._findOpenHandle(c, e.workbook?.getOrigin?.());
|
|
473
473
|
if (t) throw new B(G("error.io.openElsewhere", { name: t.getName() ?? c.name ?? "" }));
|
|
474
474
|
}
|
|
475
|
-
let s =
|
|
475
|
+
let s = Nn(c.name ?? n), l = o.find((e) => e.exts.some((e) => e.toLowerCase() === s)) ?? r, u = a ? t : new K(c.name ?? n, {
|
|
476
476
|
format: l.key,
|
|
477
477
|
canWrite: !0
|
|
478
478
|
}), d = await i(l.key, u);
|
|
479
479
|
if (!d) return null;
|
|
480
|
-
let f = new Blob([
|
|
480
|
+
let f = new Blob([Mn(d)], { type: l.mimeType || "application/octet-stream" }), p = await c.createWritable();
|
|
481
481
|
if (await p.write(f), await p.close(), this._handleCache.set(u, c), u instanceof K) {
|
|
482
482
|
let e = await Promise.resolve(c.getFile?.()).then((e) => e?.lastModified ?? null, () => null);
|
|
483
483
|
u.update({
|
|
@@ -490,19 +490,19 @@ var K = class e {
|
|
|
490
490
|
if (e?.name === "AbortError") return null;
|
|
491
491
|
if (e instanceof B) throw e;
|
|
492
492
|
}
|
|
493
|
-
let l = t.getPath(), u = l ? l.split(/[/\\]/).pop() : null, d = u && r.exts.some((e) => e.toLowerCase() ===
|
|
493
|
+
let l = t.getPath(), u = l ? l.split(/[/\\]/).pop() : null, d = u && r.exts.some((e) => e.toLowerCase() === Nn(u)) ? u : n, f = l !== d || t.canWrite() ? new K(d, {
|
|
494
494
|
format: r.key,
|
|
495
495
|
canWrite: !1
|
|
496
496
|
}) : t, p = await i(r.key, f);
|
|
497
497
|
if (!p) return null;
|
|
498
|
-
let m = new Blob([
|
|
498
|
+
let m = new Blob([Mn(p)], { type: r.mimeType || "application/octet-stream" });
|
|
499
499
|
return function(e, t) {
|
|
500
500
|
let n = URL.createObjectURL(e), r = document.createElement("a");
|
|
501
501
|
r.style.display = "none", r.href = n, r.download = t, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(n);
|
|
502
502
|
}(m, d), f instanceof K && f.update({ size: m.size }), f;
|
|
503
503
|
}
|
|
504
504
|
};
|
|
505
|
-
function
|
|
505
|
+
function An(e) {
|
|
506
506
|
return e.map((e) => {
|
|
507
507
|
let t = e.mimeType && e.mimeType.includes("/") ? e.mimeType : "application/octet-stream";
|
|
508
508
|
return {
|
|
@@ -511,402 +511,27 @@ function gn(e) {
|
|
|
511
511
|
};
|
|
512
512
|
});
|
|
513
513
|
}
|
|
514
|
-
function
|
|
514
|
+
function jn(e) {
|
|
515
515
|
return !!e && e.kind === "file" && typeof e.getFile == "function";
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function Mn(e) {
|
|
518
518
|
if (typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer) {
|
|
519
519
|
let t = new ArrayBuffer(e.byteLength);
|
|
520
520
|
return new Uint8Array(t).set(new Uint8Array(e)), t;
|
|
521
521
|
}
|
|
522
522
|
return e;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function Nn(e) {
|
|
525
525
|
let t = e.lastIndexOf(".");
|
|
526
526
|
return t >= 0 ? e.slice(t + 1).toLowerCase() : "";
|
|
527
527
|
}
|
|
528
|
-
|
|
529
|
-
constructor(e) {
|
|
530
|
-
this._private = { input: e }, typeof e == "string" ? this._private.name = e : Object.assign(this._private, e);
|
|
531
|
-
}
|
|
532
|
-
toJSON() {
|
|
533
|
-
return this._private.input;
|
|
534
|
-
}
|
|
535
|
-
getFamily() {
|
|
536
|
-
return this._private.name;
|
|
537
|
-
}
|
|
538
|
-
getPitch() {
|
|
539
|
-
return this._private.pitch;
|
|
540
|
-
}
|
|
541
|
-
getPanose() {
|
|
542
|
-
return this._private.panose;
|
|
543
|
-
}
|
|
544
|
-
toString() {
|
|
545
|
-
return typeof this._private.input == "string" ? this._private.input : JSON.stringify(this._private.input);
|
|
546
|
-
}
|
|
547
|
-
get isIFont() {
|
|
548
|
-
return !0;
|
|
549
|
-
}
|
|
550
|
-
}, xn = /^\p{White_Space}$/u, Sn = (e) => Math.max(0, Math.floor(e + .5)) || 0, J = class e {
|
|
551
|
-
constructor(e, t) {
|
|
552
|
-
this._perEm = /* @__PURE__ */ new Map(), this.family = e.family, this.weight = e.weight, this.italic = e.italic, this._vertical = t;
|
|
553
|
-
}
|
|
554
|
-
static fromJSON(t) {
|
|
555
|
-
if (t?.format !== e.FORMAT) throw Error(`Not a font metrics table: format '${t?.format}', expected '${e.FORMAT}'.`);
|
|
556
|
-
let n = Math.max(1, t.unitsPerEm), r = (e) => e ? {
|
|
557
|
-
position: e[0] / n,
|
|
558
|
-
thickness: e[1] / n
|
|
559
|
-
} : null, i = new e({
|
|
560
|
-
family: t.family,
|
|
561
|
-
weight: t.weight,
|
|
562
|
-
italic: t.italic
|
|
563
|
-
}, {
|
|
564
|
-
ascent: t.winAscent / n,
|
|
565
|
-
descent: t.winDescent / n,
|
|
566
|
-
underline: r(t.underline),
|
|
567
|
-
strikeout: r(t.strikeout)
|
|
568
|
-
}), a = i._perEm;
|
|
569
|
-
for (let [e, r] of t.advances) for (let t = 0; t < r.length; t++) a.set(e + t, r[t] / n);
|
|
570
|
-
return i;
|
|
571
|
-
}
|
|
572
|
-
get size() {
|
|
573
|
-
return this._perEm.size;
|
|
574
|
-
}
|
|
575
|
-
advance(e) {
|
|
576
|
-
return this._perEm.get(e);
|
|
577
|
-
}
|
|
578
|
-
set(e) {
|
|
579
|
-
for (let [t, n] of e) this._perEm.set(t, n);
|
|
580
|
-
}
|
|
581
|
-
missing(e) {
|
|
582
|
-
let t = /* @__PURE__ */ new Set();
|
|
583
|
-
for (let n of e) this._perEm.has(n.codePointAt(0)) || t.add(n);
|
|
584
|
-
return [...t];
|
|
585
|
-
}
|
|
586
|
-
width(e, t, n) {
|
|
587
|
-
let r = this._perEm, i = r.get(32) ?? 0, a = 0, o = 0;
|
|
588
|
-
for (let t of e) a += r.get(t.codePointAt(0)) ?? (xn.test(t) ? i : 0), o++;
|
|
589
|
-
return a * t * (n?.superSub ? .6 : 1) + (n?.letterSpacing ?? 0) * Math.max(0, o - 1);
|
|
590
|
-
}
|
|
591
|
-
metrics(e) {
|
|
592
|
-
let t = Sn(e), n = Sn(this._vertical.ascent * t), r = Sn(this._vertical.descent * t), i = n + r + 2;
|
|
593
|
-
return {
|
|
594
|
-
ascent: n,
|
|
595
|
-
descent: r,
|
|
596
|
-
lineHeight: i,
|
|
597
|
-
baseline: Math.floor((i - (n + r)) / 2) + n,
|
|
598
|
-
lineGap: 2
|
|
599
|
-
};
|
|
600
|
-
}
|
|
601
|
-
underline(e) {
|
|
602
|
-
return Cn(this._vertical.underline, e);
|
|
603
|
-
}
|
|
604
|
-
strikeout(e) {
|
|
605
|
-
return Cn(this._vertical.strikeout, e);
|
|
606
|
-
}
|
|
607
|
-
measure(e, t, n) {
|
|
608
|
-
return {
|
|
609
|
-
width: this.width(e, t, n),
|
|
610
|
-
...this.metrics(t)
|
|
611
|
-
};
|
|
612
|
-
}
|
|
613
|
-
};
|
|
614
|
-
function Cn(e, t) {
|
|
615
|
-
return e ? {
|
|
616
|
-
position: e.position * t,
|
|
617
|
-
thickness: e.thickness * t
|
|
618
|
-
} : null;
|
|
619
|
-
}
|
|
620
|
-
(J ||= {}).FORMAT = "sheetxl-font-metrics/1";
|
|
621
|
-
var wn = class {
|
|
622
|
-
constructor(e = null) {
|
|
623
|
-
this.name = "table-file", this.kind = "table", this._pending = /* @__PURE__ */ new Map(), this._base = e;
|
|
624
|
-
}
|
|
625
|
-
build(e) {
|
|
626
|
-
let t = function(e) {
|
|
627
|
-
let t = e.family.trim().toLowerCase().replace(/\s+/g, "-"), n = e.weight >= 600;
|
|
628
|
-
return `${t}-${n && e.italic ? "bold-italic" : n ? "bold" : e.italic ? "italic" : "regular"}.metrics.json`;
|
|
629
|
-
}(e), n = this._pending.get(t);
|
|
630
|
-
return n || (n = this._load(t), this._pending.set(t, n)), n;
|
|
631
|
-
}
|
|
632
|
-
async _load(e) {
|
|
633
|
-
let t;
|
|
634
|
-
try {
|
|
635
|
-
t = await rn("fonts", "@sheetxl/sdk", e, this._base, import.meta.url);
|
|
636
|
-
} catch {
|
|
637
|
-
return null;
|
|
638
|
-
}
|
|
639
|
-
return J.fromJSON(t);
|
|
640
|
-
}
|
|
641
|
-
}, Tn = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Arial\",\n \"weight\": 700,\n \"italic\": false,\n \"source\": { \"family\": \"Liberation Sans\", \"version\": \"Version 2.1.5\", \"license\": \"OFL-1.1\", \"notice\": \"Licensed under the SIL Open Font License, Version 1.1\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1854,\n \"winDescent\": 434,\n \"underline\": [-2, 215],\n \"strikeout\": [530, 102],\n \"advances\": [\n [32, [569,682,971,1139,1139,1821,1479,487,682,682,797,1196,569,682,569,569,1139,1139,1139,1139,1139,1139,1139,1139,1139,1139,682,682,1196,1196,1196,1251,1997,1479,1479,1479,1479,1366,1251,1593,1479,569,1139,1479,1251,1706,1479,1593,1366,1593,1479,1366,1251,1479,1366,1933,1366,1366,1251,682,569,682,1196,1139,682,1139,1251,1139,1251,1139,682,1251,1251,569,569,1139,569,1821,1251,1251,1251,1251,797,1139,682,1251,1139,1593,1139,1139,1024,797,573,797,1196]],\n [160, [569,682,1139,1139,1139,1139,573,1139,682,1509,758,1139,1196,682,1509,1131,819,1124,682,682,682,1180,1139,682,682,682,748,1139,1708,1708,1708,1251,1479,1479,1479,1479,1479,1479,2048,1479,1366,1366,1366,1366,569,569,569,569,1479,1479,1593,1593,1593,1593,1593,1196,1593,1479,1479,1479,1479,1366,1366,1251,1139,1139,1139,1139,1139,1139,1821,1139,1139,1139,1139,1139,569,569,569,569,1251,1251,1251,1251,1251,1251,1251,1124,1251,1251,1251,1251,1251,1139,1251,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1472,1479,1251,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1593,1251,1593,1251,1593,1251,1593,1251,1479,1251,1479,1251,569,569,569,569,569,569,569,569,569,569,1607,1139,1139,569,1479,1139,1139,1251,569,1251,569,1251,789,1251,981,1251,569,1479,1251,1479,1251,1479,1251,1451,1481,1251,1593,1251,1593,1251,1593,1251,2048,1933,1479,797,1479,797,1479,797,1366,1139,1366,1139,1366,1139,1366,1139,1251,682,1251,981,1251,682,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1933,1593,1366,1139,1366,1251,1024,1251,1024,1251,1024,569,1251,1713,1472,1251,1472,1251,1479,1479,1139,1479,1715,1472,1251,1242,1366,1487,1283,1251,1139,1593,1304,1906,569,569,1479,1139,569,1139,2031,1479,1251,1593,1747,1456,1816,1523,1601,1251,1366,1366,1139,1229,737,682,1251,682,1251,1699,1483,1642,1479,1577,1139,1251,1024,1251,1251,1078,1078,1139,1139,1018,1186,1251,573,1019,1197,682,2730,2503,2275,2390,1820,1138,2618,2048,1820,1479,1139,569,569,1593,1251,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1139,1479,1139,1479,1139,2048,1821,1593,1251,1593,1251,1479,1139,1593,1251,1593,1251,1251,1078,569,2730,2503,2275,1593,1251,2115,1362,1479,1251,1479,1139,2048,1821,1593,1251,1479,1139,1479,1139,1366,1139,1366,1139,569,569,569,569,1593,1251,1593,1251,1479,797,1479,797,1479,1251,1479,1251,1366,1139,1251,682,1182,1065,1479,1251,1439,1715,1292,1292,1251,1024,1479,1139,1366,1139,1593,1251,1593,1251,1593,1251,1593,1251,1366,1139,1022,1707,1036,569,1953,1953,1479,1479,1139,1251,1251,1139,1024,1321,991,1479,1479,1366,1366,1139,1139,569,1587,1251,1479,797,1366,1139,1139,1251,1251,1251,1139,1139,1251,1251,1139,1139,1601,1018,1018,1415,1162,682,1251,1251,1200,1139,1230,1251,1251,1251,569,569,830,680,729,569,1236,1821,1821,1821,1251,1251,1259,1251,1707,1730,1535,797,797,797,797,797,797,797,1195,1195,1139,682,682,682,1105,682,682,1251,1272,1192,1139,1593,1139,1169,1024,1392,1078,1078,1139,1139,1139,1139,1593,1259,1162,1200,1237,939,1139,926,1251,1139,1139,2111,1929,2479,1666,1094,1688,1780,1589,1418,1093,1154,1494,1494,753,753,398,516,516,516,768,1071,738,487,971,569,569,569,682,682,768,768,1196,1196,1196,1196,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,682,749,289,770,750,768,784,784,784,784,784,682,682,682,682,1024,682,682,682,682,682,682,682,682,682,682,682,682,682,682,814,814,682,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [682,682]],\n [890, [682,1139,1139,1139,682]],\n [900, [682,952,1479,682,1747,1855,970]],\n [908, [1689]],\n [910, [1899,1716,569,1479,1479,1231,1472,1366,1251,1479,1593,569,1479,1366,1706,1479,1318,1593,1479,1366]],\n [931, [1229,1251,1366,1681,1366,1657,1642,569,1366,1259,924,1251,569,1192,1259,1250,1139,1242,972,943,1251,1107,569,1142,1139,1253,1139,912,1251,1568,1267,1065,1401,914,1192,1465,1179,1543,1730,569,1192,1251,1192,1730]],\n [976, [1250,1192,1577,2050,1577,1535,1730,1385,1593,1251,1479,1139,1251,926,1539,1084,1647,1250,2031,1821,1439,1251,1439,1239,1366,1366,1316,1236,1505,1184,1038,900,1385,1265,1139,569,1593,980,980,1366,1251,1479,1706,1515,1267,1479,1479,1479,1366,1370,1813,1161,1457,1366,569,565,1139,2240,2176,1792,1250,1472,1274,1472,1479,1472,1479,1161,1459,1366,1851,1283,1472,1472,1250,1437,1706,1479,1593,1472,1366,1479,1251,1274,1748,1366,1496,1439,2058,2087,1781,2005,1472,1457,2112,1472,1139,1265,1259,853,1300,1139,1452,1018,1259,1259,1025,1301,1515,1237,1251,1237,1251,1139,1003,1139,1792,1139,1259,1189,1707,1728,1493,1749,1259,1131,1749,1195,1139,1139,1251,853,1131,1139,569,576,569,1984,1856,1251,1025,1259,1139,1237,2621,1594,1780,1439,1998,1630,1366,1139,1896,1639,1657,1543,2206,2008,1283,1018,1657,1543,1593,1251,1669,1324,1669,1324,2294,1995,1668,1306,2621,1845,2621,1594,1479,1139,1196,0,0,0,0,0,0,0,1472,1259,1472,1259,1366,1251,997,915,1161,853,1439,1225,1851,1452,1283,1018,1250,1025,1250,1025,1250,1025,1559,1276,1479,1237,1801,1462,2306,1887,1479,1183,1479,1139,1251,1003,1139,1139,1139,1139,1366,1139,1746,1411,1439,1189,1439,1189,1439,1251,1754,1389,1754,1389,569,1851,1452,1437,1224,1437,1301,1479,1237,1479,1237,1439,1189,1706,1515,569,1479,1139,1479,1139,2048,1821,1366,1139,1487,1139,1487,1139,1851,1452,1283,1018,1283,1078,1472,1259,1472,1259,1593,1251,1593,1251,1593,1251,1457,1131,1274,1139,1274,1139,1274,1139,1439,1189,1161,853,2005,1749,1161,853,1366,1139,1366,1139,1472,1251,2110,1914,1965,1732,1347,1098,2074,1957,2115,1894,1593,1200,1568,1435,1283,1018,1437,1301]],\n [1306, [1593,1251,1933,1593]],\n [1425, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,784,0,1153,0,0,682,0,0,862,0]],\n [1488, [1397,1311,981,1192,1384,618,748,1434,1409,618,1180,1133,1171,1475,1487,618,883,1430,1266,1382,1335,1128,1247,1339,1180,1649,1470]],\n [1520, [1237,1237,1237,831,1278]],\n [7424, [1205,1589,1821,1259,1139,1177,1177,1025,1018,569,1039,1142,926,1515,1259,1251,1139,1265,1265,1265,1933,1170,1251,1251,1257,1195,1195,1003,1192,1251,1572,1248,1139,1593,1024,991,1010,1260,853,1139,1237,1257,1543,1301,995,1425,930,930,931,853,853,1027,892,370,734,944,798,1058,887,888,1062,890,859,940,887,891,1300,773,773,801,1206,801,801,770,770,719,719,800,289,714,1156,754,840,778,841,841,800,444,754,834,1156,745,844,795,745,835,986,776,289,516,754,745,795,745,834,986,776,1888,1251,1251,682,1821,1251,1251,797,797,1139,682,1024,1251,752,1244,1787,569,569,1251,1192,1272,1251,1251,682,1573,1139,569,1821,1251,1251,797,1139,954,1139,1139,1024,1139,1251,1251,1139,1018,1018,1342,569,1139,682,1251,1078,801,778,778,840,719,496,496,800,753,372,289,289,372,630,398,336,585,1156,1156,863,863,762,840,1027,770,569,444,832,862,746,746,745,740,740,958,778,744,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1479,1139,1479,1251,1479,1251,1479,1251,1479,1139,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1251,682,1593,1251,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,569,569,569,569,1479,1139,1479,1139,1479,1139,1251,569,1251,569,1251,569,1251,569,1706,1821,1706,1821,1706,1821,1479,1251,1479,1251,1479,1251,1479,1251,1593,1251,1593,1251,1593,1251,1593,1251,1366,1251,1366,1251,1479,797,1479,797,1479,797,1479,797,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1251,682,1251,682,1251,682,1251,682,1479,1251,1479,1251,1479,1251,1479,1251,1479,1251,1366,1139,1366,1139,1933,1593,1933,1593,1933,1593,1933,1593,1933,1593,1366,1139,1366,1139,1366,1139,1251,1024,1251,1024,1251,1024,1251,682,1593,1139,1139,569]],\n [7838, [1465]],\n [7840, [1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,569,569,569,569,1593,1251,1593,1251,1593,1251,1593,1251,1593,1251,1593,1251,1593,1251,1747,1456,1747,1456,1747,1456,1747,1456,1747,1456,1479,1251,1479,1251,1699,1483,1699,1483,1699,1483,1699,1483,1699,1483,1366,1139,1366,1139,1366,1139,1366,1139]],\n [7936, [1259,1259,1259,1259,1259,1259,1259,1259,1479,1479,1779,1779,1779,1779,1779,1779,972,972,972,972,972,972]],\n [7960, [1566,1566,1966,1966,1966,1966]],\n [7968, [1251,1251,1251,1251,1251,1251,1251,1251,1679,1679,2079,2079,2079,2079,2079,2079,569,569,569,569,569,569,569,569,769,769,1169,1169,1169,1169,1169,1169,1251,1251,1251,1251,1251,1251]],\n [8008, [1693,1693,2133,2133,1993,1993]],\n [8016, [1192,1192,1192,1192,1192,1192,1192,1192]],\n [8025, [1666]],\n [8027, [2046]],\n [8029, [2146]],\n [8031, [1966,1730,1730,1730,1730,1730,1730,1730,1730,1742,1742,2182,2182,2042,2042,2042,2042,1259,1259,972,972,1251,1251,569,569,1251,1251,1192,1192,1730,1730]],\n [8064, [1259,1259,1259,1259,1259,1259,1259,1259,1479,1479,1779,1779,1779,1779,1779,1779,1251,1251,1251,1251,1251,1251,1251,1251,1679,1679,2079,2079,2079,2079,2079,2079,1730,1730,1730,1730,1730,1730,1730,1730,1742,1742,2182,2182,2042,2042,2042,2042,1259,1259,1259,1259,1259]],\n [8118, [1259,1259,1479,1479,1479,1479,1479,682,682,682,682,682,1251,1251,1251]],\n [8134, [1251,1251,1766,1766,1879,1879,1479,682,682,682,569,569,569,569]],\n [8150, [569,569,569,569,969,969]],\n [8157, [682,682,682,1192,1192,1192,1192,1267,1267,1192,1192,1366,1366,1766,1866,1566,952,952,682]],\n [8178, [1730,1730,1730]],\n [8182, [1730,1730,1893,1693,1942,1742,1642,682,682]],\n [8192, [1024,2048,1024,2048,683,512,341,1139,569,410,171,0,0,0,0,0,682]],\n [8210, [1139,1139,2048,2048,1019,1131,569,569,569,569,1024,1024,1024,1024,1139,1139,717]],\n [8230, [2048]],\n [8234, [0,0,0,0,0,410,2048]],\n [8242, [491,981,981]],\n [8249, [682,682]],\n [8252, [1237]],\n [8254, [682]],\n [8260, [342]],\n [8286, [682]],\n [8298, [0,0,0,0,0,0]],\n [8308, [1013,962,943,845,968,972]],\n [8319, [811,923,847,910,947,976,939,930,819,959,922]],\n [8336, [773,770,840,750,770]],\n [8352, [1139,1479,1479,1139,1139,1821,1479,2240,2509,1933,1810,1051,1139,1479,1251,2224,1139,1366,1593,1479,1366,1479]],\n [8383, [1669]],\n [8432, [0]],\n [8453, [1813]],\n [8467, [1001]],\n [8470, [2283,1509]],\n [8482, [2048]],\n [8486, [1573]],\n [8494, [1229]],\n [8525, [2048,1025]],\n [8531, [1708,1708]],\n [8539, [1708,1708,1708,1708]],\n [8580, [1139]],\n [8592, [2048,1024,2048,1024,2048,1024]],\n [8616, [1024]],\n [8660, [2048]],\n [8706, [1012]],\n [8710, [1253]],\n [8719, [1686]],\n [8721, [1460,1196]],\n [8725, [342]],\n [8729, [569,1124]],\n [8734, [1460,2005]],\n [8745, [1479]],\n [8747, [561]],\n [8776, [1124]],\n [8800, [1124,1195,2048]],\n [8804, [1124,1124]],\n [8962, [1237]],\n [8976, [1196]],\n [8992, [1237,1237]],\n [9472, [1451]],\n [9474, [1280]],\n [9484, [1451]],\n [9488, [1451]],\n [9492, [1451]],\n [9496, [1451]],\n [9500, [1451]],\n [9508, [1451]],\n [9516, [1451]],\n [9524, [1451]],\n [9532, [1451]],\n [9552, [1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451]],\n [9600, [1451]],\n [9604, [1451]],\n [9608, [1451]],\n [9612, [1451]],\n [9616, [1451,1451,1451,1493]],\n [9632, [1237,1237]],\n [9642, [726,726,2048]],\n [9650, [2027]],\n [9658, [2027]],\n [9660, [2027]],\n [9668, [2027]],\n [9674, [1012,1237,1217]],\n [9679, [1237,1237,1237,1237,1237,1237,1237,1237,1237,1237,1237]],\n [9702, [726]],\n [9786, [2091,2155,1877]],\n [9791, [1536,1536,1536,1536,1536,1536,1536,1536,1536]],\n [9824, [1088]],\n [9827, [1344]],\n [9829, [1216,1045]],\n [9833, [2048,1024,1536,2048]],\n [9839, [1024]],\n [11360, [1251,569,1251,1366,1479,1139,682,1479,1251,1479,1139,1251,1024,1563]],\n [11377, [1241,2139,1758,1139,1108,892,1465]],\n [11799, [682]],\n [42775, [0,0,0,0,1024,1024,682,682,682,0,0]],\n [42888, [682,682,796,487,487]],\n [64257, [1251,1251]],\n [64285, [618,0,1237,1266,1397,1192,1384,1133,1171,1475,1180,1470,1237,1649,1649,1649,1649,1397,1397,1397,1311,981,1192,1384,618,748]],\n [64312, [1409,618,1180,1133,1171]],\n [64318, [1487]],\n [64320, [883,1430]],\n [64323, [1382,1335]],\n [64326, [1247,1339,1180,1649,1470,618,1311,1133,1335,1368]],\n [65056, [0,0,0,0]],\n [65532, [2048]]\n ]\n}\n", En = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Arial\",\n \"weight\": 400,\n \"italic\": false,\n \"source\": { \"family\": \"Liberation Sans\", \"version\": \"Version 2.1.5\", \"license\": \"OFL-1.1\", \"notice\": \"Licensed under the SIL Open Font License, Version 1.1\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1854,\n \"winDescent\": 434,\n \"underline\": [-67, 150],\n \"strikeout\": [530, 102],\n \"advances\": [\n [32, [569,569,727,1139,1139,1821,1366,391,682,682,797,1196,569,682,569,569,1139,1139,1139,1139,1139,1139,1139,1139,1139,1139,569,569,1196,1196,1196,1139,2079,1366,1366,1479,1479,1366,1251,1593,1479,569,1024,1366,1139,1706,1479,1593,1366,1593,1479,1366,1251,1479,1366,1933,1366,1366,1251,569,569,569,961,1139,682,1139,1139,1024,1139,1139,569,1139,1139,455,455,1024,455,1706,1139,1139,1139,1139,682,1024,569,1139,1024,1479,1024,1024,1024,684,532,684,1196]],\n [160, [569,682,1139,1139,1139,1139,532,1139,682,1509,758,1139,1196,682,1509,1131,819,1124,682,682,682,1180,1100,682,682,682,748,1139,1708,1708,1708,1251,1366,1366,1366,1366,1366,1366,2048,1479,1366,1366,1366,1366,569,569,569,569,1479,1479,1593,1593,1593,1593,1593,1196,1593,1479,1479,1479,1479,1366,1366,1251,1139,1139,1139,1139,1139,1139,1821,1024,1139,1139,1139,1139,569,569,569,569,1139,1139,1139,1139,1139,1139,1139,1124,1251,1139,1139,1139,1139,1024,1139,1024,1366,1139,1366,1139,1366,1139,1479,1024,1479,1024,1479,1024,1479,1024,1479,1259,1479,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1593,1139,1593,1139,1593,1139,1593,1139,1479,1139,1479,1139,569,569,569,569,569,569,569,455,569,569,1505,909,1024,455,1366,1024,1024,1139,455,1139,455,1139,597,1139,684,1139,455,1479,1139,1479,1139,1479,1139,1237,1481,1139,1593,1139,1593,1139,1593,1139,2048,1933,1479,682,1479,682,1479,682,1366,1024,1366,1024,1366,1024,1366,1024,1251,569,1251,768,1251,569,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1933,1479,1366,1024,1366,1251,1024,1251,1024,1251,1024,455,1139,1553,1344,1139,1344,1139,1479,1479,1024,1479,1658,1344,1139,1140,1366,1541,1237,1251,1139,1593,1278,1804,455,569,1366,1024,455,1024,1824,1479,1139,1593,1756,1343,1778,1367,1545,1139,1366,1366,1024,1266,779,569,1251,569,1251,1749,1371,1531,1479,1582,1024,1251,1024,1251,1251,1116,1116,1139,1139,939,997,1139,532,846,1196,569,2730,2503,2148,2175,1706,924,2503,1934,1579,1366,1139,569,455,1593,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1139,1366,1139,1366,1139,2048,1821,1593,1139,1593,1139,1366,1024,1593,1139,1593,1139,1251,1116,455,2730,2503,2148,1593,1139,2118,1266,1479,1139,1366,1139,2048,1821,1593,1251,1366,1139,1366,1139,1366,1139,1366,1139,569,569,569,569,1593,1139,1593,1139,1479,682,1479,682,1479,1139,1479,1139,1366,1024,1251,569,1116,894,1479,1139,1446,1396,1238,1158,1251,1024,1366,1139,1366,1139,1593,1139,1593,1139,1593,1139,1593,1139,1366,1024,715,1402,752,455,1816,1816,1366,1479,1024,1139,1251,1024,1024,1189,928,1366,1479,1368,1366,1139,1024,455,1510,1139,1479,682,1366,1024,1139,1139,1139,1139,1024,1024,1139,1139,1139,1139,1513,939,939,1293,1039,569,1139,1139,1144,1026,1263,1139,1139,1139,455,455,729,670,622,455,1171,1706,1706,1706,1139,1139,1132,1139,1619,1599,1126,682,682,682,682,682,682,682,1109,1109,1024,455,532,455,715,569,569,1139,1164,1120,1024,1479,1024,1064,1024,1108,1116,1116,1024,1024,1024,1024,1593,1088,1039,1144,1131,814,1024,827,1139,1024,1024,1975,1856,2059,1459,879,1472,1564,1354,1295,994,1080,1407,1407,785,785,326,491,491,491,746,985,657,391,727,455,455,455,682,682,714,714,1196,1196,1196,1196,682,682,682,682,682,682,682,682,682,682,569,569,682,682,682,682,682,682,682,682,682,682,682,682,682,682,660,322,696,672,714,784,784,784,784,784,682,682,682,682,682,682,682,682,682,682,682,682,682,682,569,682,682,682,682,814,814,682,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [682,682]],\n [890, [682,1024,1024,1024,569]],\n [900, [682,682,1367,569,1606,1716,786]],\n [908, [1586]],\n [910, [1752,1541,455,1366,1366,1128,1368,1366,1251,1479,1593,569,1366,1368,1706,1479,1331,1593,1479,1366]],\n [931, [1266,1251,1366,1634,1366,1711,1531,569,1366,1184,913,1139,455,1120,1184,1178,1024,1140,913,903,1139,1139,455,1024,1024,1180,1024,917,1139,1413,1165,987,1264,809,1120,1328,1075,1460,1599,455,1120,1139,1120,1599]],\n [976, [1178,1120,1582,1962,1582,1147,1599,1231,1593,1139,1479,1024,1251,827,1279,1084,1549,1181,1824,1706,1381,1139,1380,1024,1366,1366,1248,1221,1509,1134,950,839,1231,1173,1024,455,1593,905,905,1366,1139,1479,1706,1408,1165,1479,1479,1479,1366,1367,1771,1109,1472,1366,569,569,1024,2165,2069,1749,1193,1472,1301,1472,1366,1344,1366,1109,1387,1366,1891,1237,1472,1472,1193,1344,1706,1479,1593,1472,1366,1479,1251,1301,1557,1366,1515,1365,1877,1920,1621,1813,1344,1472,2069,1479,1139,1173,1088,747,1195,1139,1370,939,1144,1144,896,1195,1408,1131,1139,1109,1139,1024,938,1024,1685,1024,1173,1067,1643,1685,1280,1472,1067,1045,1536,1109,1139,1139,1139,747,1045,1024,455,569,455,1856,1664,1139,896,1144,1024,1131,2740,1278,1593,1255,1945,1461,1368,1024,1838,1424,1697,1403,2157,1776,1237,939,1631,1410,1593,1139,1645,1292,1645,1292,2200,1836,1706,1254,2439,1744,2740,1278,1479,1024,1031,0,0,0,0,0,0,0,1472,1144,1344,1067,1366,1139,1001,842,1109,747,1373,1124,1891,1370,1237,939,1193,896,1193,896,1193,896,1519,1097,1479,1131,1801,1327,2328,1782,1542,1067,1479,1024,1251,938,1139,1024,1139,1024,1366,1024,1895,1415,1365,1067,1365,1067,1365,1139,1764,1364,1764,1364,569,1891,1370,1367,1128,1344,1195,1479,1131,1479,1131,1365,1067,1706,1408,455,1366,1139,1366,1139,2048,1821,1366,1139,1541,1139,1541,1139,1891,1370,1237,939,1237,1116,1472,1144,1472,1144,1593,1139,1593,1139,1593,1139,1472,1045,1301,1024,1301,1024,1301,1024,1365,1067,1109,747,1813,1472,1109,747,1366,1024,1366,1024,1344,1139,1983,1795,1958,1670,1357,1043,1987,1863,2118,1799,1593,1144,1529,1363,1237,939,1344,1195]],\n [1306, [1593,1139,1933,1479]],\n [1425, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,784,0,1153,0,0,569,0,0,776,0]],\n [1488, [1286,1225,866,1135,1298,532,662,1348,1337,532,1094,1075,1085,1389,1407,532,797,1343,1192,1276,1249,1032,1116,1208,1094,1495,1415]],\n [1520, [1042,1042,1042,788,1235]],\n [7424, [1016,1531,1821,1088,1024,1129,1129,1003,939,455,865,1024,822,1408,1144,1139,1024,1246,1246,1246,1933,936,1139,1139,1067,1109,1109,938,1120,1222,1502,1222,1024,1479,1024,939,875,1243,747,1024,1109,1067,1460,1195,928,1359,849,849,920,840,840,1016,878,342,644,870,720,1045,881,879,1048,783,857,924,886,879,1275,762,762,772,1228,773,773,761,761,652,652,772,322,694,1173,783,773,725,773,773,774,450,783,834,1173,658,800,789,658,774,901,703,322,491,783,658,789,658,777,901,703,1860,1139,1139,569,1706,1139,1139,682,682,1024,569,1024,1139,779,1140,1609,455,455,1139,1120,1164,1139,1139,569,1460,1024,455,1706,1139,1139,682,1024,792,1024,1024,1024,1139,1139,1139,1139,939,939,1332,455,1024,455,1139,1116,772,725,713,764,652,469,469,772,785,322,322,322,322,554,322,322,563,1171,1171,783,783,782,773,768,696,322,450,783,794,774,724,658,734,734,734,756,746,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1366,1139,1366,1139,1366,1139,1366,1139,1479,1024,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1251,569,1593,1139,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,569,455,569,569,1366,1024,1366,1024,1366,1024,1139,455,1139,455,1139,455,1139,455,1706,1706,1706,1706,1706,1706,1479,1139,1479,1139,1479,1139,1479,1139,1593,1139,1593,1139,1593,1139,1593,1139,1366,1139,1366,1139,1479,682,1479,682,1479,682,1479,682,1366,1024,1366,1024,1366,1024,1366,1024,1366,1024,1251,569,1251,569,1251,569,1251,569,1479,1139,1479,1139,1479,1139,1479,1139,1479,1139,1366,1024,1366,1024,1933,1479,1933,1479,1933,1479,1933,1479,1933,1479,1366,1024,1366,1024,1366,1024,1251,1024,1251,1024,1251,1024,1139,569,1479,1024,1139,455]],\n [7838, [1439]],\n [7840, [1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,1366,1139,569,455,569,455,1593,1139,1593,1139,1593,1139,1593,1139,1593,1139,1593,1139,1593,1139,1756,1343,1756,1343,1756,1343,1756,1343,1756,1343,1479,1139,1479,1139,1749,1371,1749,1371,1749,1371,1749,1371,1749,1371,1366,1024,1366,1024,1366,1024,1366,1024]],\n [7936, [1184,1184,1184,1184,1184,1184,1184,1184,1366,1366,1666,1666,1666,1666,1666,1666,913,913,913,913,913,913]],\n [7960, [1566,1566,1900,1900,1900,1900]],\n [7968, [1139,1139,1139,1139,1139,1139,1139,1139,1679,1679,2079,2079,2079,2079,2079,2079,455,455,455,455,455,455,455,455,769,769,1169,1169,1169,1169,1169,1169,1139,1139,1139,1139,1139,1139]],\n [8008, [1693,1693,2093,2093,1993,1993]],\n [8016, [1120,1120,1120,1120,1120,1120,1120,1120]],\n [8025, [1666]],\n [8027, [1966]],\n [8029, [2066]],\n [8031, [1966,1599,1599,1599,1599,1599,1599,1599,1599,1631,1631,2031,2031,1931,1931,1931,1931,1184,1184,913,913,1139,1139,455,455,1139,1139,1120,1120,1599,1599]],\n [8064, [1184,1184,1184,1184,1184,1184,1184,1184,1366,1366,1666,1666,1666,1666,1666,1666,1139,1139,1139,1139,1139,1139,1139,1139,1679,1679,2079,2079,2079,2079,2079,2079,1599,1599,1599,1599,1599,1599,1599,1599,1631,1631,2031,2031,1931,1931,1931,1931,1184,1184,1184,1184,1184]],\n [8118, [1184,1184,1366,1366,1366,1366,1366,682,682,682,682,682,1139,1139,1139]],\n [8134, [1139,1139,1666,1666,1779,1779,1479,682,682,682,455,455,455,455]],\n [8150, [455,455,569,569,869,869]],\n [8157, [682,682,682,1120,1120,1120,1120,1165,1165,1120,1120,1366,1366,1766,1816,1566,682,682,682]],\n [8178, [1599,1599,1599]],\n [8182, [1599,1599,1893,1693,1831,1631,1531,682,682]],\n [8192, [1024,2048,1024,2048,683,512,341,1139,569,410,171,0,0,0,0,0,682]],\n [8210, [1139,1139,2048,2048,846,1131,455,455,455,455,682,682,682,682,1139,1139,717]],\n [8230, [2048]],\n [8234, [0,0,0,0,0,410,2048]],\n [8242, [384,725,725]],\n [8249, [682,682]],\n [8252, [1024]],\n [8254, [682]],\n [8260, [342]],\n [8286, [569]],\n [8298, [0,0,0,0,0,0]],\n [8308, [880,849,843,741,864,877]],\n [8319, [747,850,691,795,834,836,825,826,704,849,812]],\n [8336, [762,761,773,672,761]],\n [8352, [1139,1479,1479,1139,1139,1706,1479,2240,2384,1933,1739,1051,1139,1366,1251,2048,1067,1366,1593,1366,1139,1479]],\n [8383, [1516]],\n [8432, [0]],\n [8453, [1813]],\n [8467, [662]],\n [8470, [2197,1509]],\n [8482, [2048]],\n [8486, [1573]],\n [8494, [1229]],\n [8525, [1931,1003]],\n [8531, [1708,1708]],\n [8539, [1708,1708,1708,1708]],\n [8580, [1024]],\n [8592, [2048,1024,2048,1024,2048,1024]],\n [8616, [1024]],\n [8660, [2048]],\n [8706, [1012]],\n [8710, [1253]],\n [8719, [1686]],\n [8721, [1460,1196]],\n [8725, [342]],\n [8729, [569,1124]],\n [8734, [1460,2005]],\n [8745, [1472]],\n [8747, [561]],\n [8776, [1124]],\n [8800, [1124,1195,2048]],\n [8804, [1124,1124]],\n [8962, [1237]],\n [8976, [1196]],\n [8992, [1237,1237]],\n [9472, [1451]],\n [9474, [1280]],\n [9484, [1451]],\n [9488, [1451]],\n [9492, [1451]],\n [9496, [1451]],\n [9500, [1451]],\n [9508, [1451]],\n [9516, [1451]],\n [9524, [1451]],\n [9532, [1451]],\n [9552, [1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451,1451]],\n [9600, [1451]],\n [9604, [1451]],\n [9608, [1451]],\n [9612, [1451]],\n [9616, [1451,1451,1451,1493]],\n [9632, [1237,1237]],\n [9642, [726,726,2048]],\n [9650, [2027]],\n [9658, [2027]],\n [9660, [2027]],\n [9668, [2027]],\n [9674, [1012,1237,1217]],\n [9679, [1237,1237,1237,1237,1237,1237,1237,1237,1237,1237,1237]],\n [9702, [726]],\n [9786, [2091,2155,1877]],\n [9791, [1536,1536,1536,1536,1536,1536,1536,1536,1536]],\n [9824, [1088]],\n [9827, [1344]],\n [9829, [1216,1045]],\n [9833, [2048,1024,1536,2048]],\n [9839, [1024]],\n [11360, [1139,455,1139,1366,1479,1139,569,1479,1139,1366,1024,1251,1024,1500]],\n [11377, [1222,2124,1722,1024,1182,871,1328]],\n [11799, [682]],\n [42775, [0,0,0,0,1024,1024,569,569,569,0,0]],\n [42888, [682,569,896,391,391]],\n [64257, [1024,1024]],\n [64285, [532,0,1042,1192,1286,1135,1298,1075,1085,1389,1094,1415,1151,1495,1495,1495,1495,1286,1286,1286,1225,866,1135,1298,532,662]],\n [64312, [1337,532,1094,1075,1085]],\n [64318, [1407]],\n [64320, [797,1343]],\n [64323, [1276,1249]],\n [64326, [1116,1208,1094,1495,1415,532,1225,1075,1249,1286]],\n [65056, [0,0,0,0]],\n [65532, [2048]]\n ]\n}\n", Dn = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Calibri\",\n \"weight\": 700,\n \"italic\": false,\n \"source\": { \"family\": \"Carlito\", \"version\": \"Version 1.103\", \"license\": \"OFL-1.1\", \"notice\": \"Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic (http://www.typoland.com/) with Reserved Font Name \\\"Carlito\\\". Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1950,\n \"winDescent\": 550,\n \"underline\": [-103, 194],\n \"strikeout\": [512, 134],\n \"advances\": [\n [0, [0]],\n [13, [0]],\n [32, [463,667,898,1020,1038,1493,1443,478,638,638,1020,1020,528,627,547,880,1038,1038,1038,1038,1038,1038,1038,1038,1038,1038,565,565,1020,1020,1020,949,1840,1241,1148,1084,1291,999,940,1305,1292,546,678,1120,866,1790,1349,1385,1090,1405,1153,968,1014,1337,1211,1856,1128,1064,979,665,880,665,1020,1020,615,1011,1099,857,1099,1031,648,971,1099,503,523,983,503,1666,1099,1101,1099,1099,728,817,710,1099,969,1526,941,970,814,704,973,704,1020]],\n [161, [667,1020,1038,1020,1038,1020,1020,849,1709,852,1103,1020]],\n [174, [1038,799,701,1020,692,688,616,1154,1224,548,621,517,891,1103,1347,1415,1437,949,1241,1241,1241,1241,1241,1241,1588,1084,999,999,999,999,546,546,546,546,1309,1349,1385,1385,1385,1385,1385,1020,1394,1337,1337,1337,1337,1064,1090,1136,1011,1011,1011,1011,1011,1011,1587,857,1031,1031,1031,1031,503,503,503,503,1099,1099,1101,1101,1101,1101,1101,1020,1114,1099,1099,1099,1099,970,1099,970,1241,1011,1241,1011,1241,1011,1084,857,1084,857,1084,857,1084,857,1291,1222,1309,1165,999,1031,999,1031,999,1031,999,1031,999,1031,1305,971,1305,971,1305,971,1305,971,1292,1099,1347,1121,546,503,546,503,546,503,546,503,546,503,1225,1027,678,523,1120,983,983,866,503,866,503,881,627,1150,865,886,540,1349,1099,1349,1099,1349,1099,1274,1313,1099,1385,1101,1385,1101,1385,1101,1790,1726,1153,728,1153,728,1153,728,968,817,968,817,968,817,968,817,1014,710,1014,744,1014,726,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1856,1526,1064,970,1064,979,814,979,814,979,814,529,1170,1368,1138,1099,1171,1119,1075,1243,950,1309,1511,1138,1099,1091,999,1347,1009,940,1020,1395,1210,1646,614,616,1124,983,641,996,1820,1349,1099,1385,1566,1296,1642,1415,1310,1099,1153,975,826,962,913,749,1116,710,1014,1559,1326,1394,1337,1125,1052,979,814,1003,1009,981,884,1038,1038,866,805,1099,541,985,1203,667,2270,2105,1913,1577,1389,1026,2027,1872,1622,1241,1011,546,503,1385,1101,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1031,1241,1011,1241,1011,1588,1587,1321,1140,1305,971,1120,983,1385,1101,1385,1101,1003,937,523,2245,2105,1913,1305,971,1812,1254,1349,1099,1241,1011,1588,1587,1394,1114,1241,1011,1241,1011,999,1031,999,1031,546,503,546,503,1385,1101,1385,1101,1153,728,1153,728,1337,1099,1337,1099,968,817,1014,710,1003,937,1292,1099,1315,1243,1081,1055,1004,826,1241,1011,999,1031,1385,1101,1385,1101,1385,1101,1385,1101,1064,970,676,1276,719,523,1693,1695,1241,1094,866,901,1034,817,814,898,890,1174,1374,1216,1000,1019,707,608,1295,1099,1181,776,1204,1010,1011,1099,1100,1099,867,904,1099,1121,1031,1031,1316,874,874,1103,1079,597,1118,1098,1098,980,992,1099,1099,1099,619,586,503,807,824,516,1195,1666,1666,1666,1099,1099,1128,1097,1473,1447,1432,728,728,729,728,728,672,672,1002,1002,817,494,582,494,671,710,710,1201,1197,1089,969,1526,970,948,824,981,937,942,898,898,898,857,1325,1013,1079,1108,1117,676,983,828,1120,898,898,1716,1789,1883,1314,1030,1439,1634,1268,1214,1075,1007,1117,1118,763,763,388,512,502,524,692,1051,678,439]],\n [699, [528,528,528,462,462,665,665,1020,1020,1099,1099,822,822,593]],\n [715, [615,593,807,615,616,569,569,462,462,682,682,682,682,788,482,671,646,910,995,682,682,682,374,570,681,665,784,784,784,784,784,682,682,822,1178,891,682,682,682,682,671]],\n [757, [961]],\n [759, [910,565,682,682,682,682,1088,1088,770]],\n [773, [0]],\n [781, [0,0,0,0,0]],\n [787, [0,0,508]],\n [792, [0,0,0,682,0,0,0,0,0,0,0]],\n [805, [0]],\n [809, [0,0,0]],\n [815, [0]],\n [818, [0,0]],\n [822, [0]],\n [825, [0,0,0,0,0,0,0]],\n [835, [0]],\n [838, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [857, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [528,528]],\n [890, [562,867,857,867,565]],\n [900, [649,1012,1241,548,999,1292,546]],\n [908, [1385]],\n [910, [1064,1394,586,1241,1148,839,1183,999,979,1292,1385,546,1120,1216,1790,1349,1008,1385,1292,1090]],\n [931, [962,1014,1064,1641,1128,1654,1394,546,1064,1210,937,1114,586,1123,1210,1117,957,1091,937,746,1114,1116,586,983,996,1154,965,789,1101,1186,1086,833,1115,804,1123,1432,923,1511,1470,586,1123,1101,1123,1470]],\n [976, [1098,1208,1071,1071,1071,1441,1733,1252,1385,1101,1075,839,940,914,1131,967,1228,1232,1809,1666,1117,1081,1148,1067,1038,860,1190,974,1368,1105,1031,826,1239,1082,857,523,1385,916,916,1090,1119,1084,1470,1262,1086,1110,1084,1110,999,999,1302,885,1103,968,546,546,678,1834,1836,1295,1153,1335,1121,1287,1241,1138,1148,885,1378,999,1705,987,1335,1335,1153,1288,1790,1292,1385,1290,1090,1084,1014,1121,1482,1128,1347,1166,1837,1898,1309,1635,1133,1103,1871,1176,1011,1090,1013,726,1192,1031,1509,874,1140,1140,1013,1077,1461,1117,1101,1094,1099,857,798,970,1383,941,1151,1000,1563,1616,1143,1458,1013,895,1542,1020,1031,1031,1133,726,896,817,503,503,523,1590,1626,1121,1013,1140,970,1100,1938,1473,1306,1089,1599,1337,1333,1173,1832,1615,1490,1282,1960,1722,1010,870,1654,1511,1385,1097,1253,1017]],\n [1143, [1017,2250,1960,1465,1200,1938,1628,1938,1473,1060,834,1248,0,0,0,0]],\n [1160, [2018,1944,1416,1206,1163,1031,1090,1099,889,752,903,774,1135,935,1818,1598,987,874,1268,1099,1203,1083,1180,1047,1323,1165,1378,1172,1490,1269,1880,1524,1351,1155,1084,857,1014,797,1064,975,1064,975,1239,1026,1541,1254,1227,1086,1166,1030,1166,1030,1597,1285,1597,1285,546,1705,1509,1196,1040,1368,1143,1292,1116,1373,1182,1166,1030,1871,1505,546,1241,1011,1241,1011,1588,1587,999,1031,1347,1031,1347,1031,1705,1509,987,874,1003,937,1335,1140,1335,1140,1385,1101,1385,1101,1385,1101,1103,895,1121,970,1121,970,1121,970,1166,1000,874,726,1635,1458,903,774,1223,1022,1128,941,1133,1099,1673,1595,1536,1395,1078,970,1808,1584,1812,1623,1318,1117,1299,1157,1009,874,1348,1134]],\n [3647, [1038]],\n [7424, [1063,1399,1587,1061,955,1122,1122,864]],\n [7433, [503,621,994,762,1461,1140,1192,955,1162,1161,1320,1726,953,1101,1101,987,1014,1014,853,1158,1135,1507,1175,1033,1595,878,860,817,1012,780,1003,1141,987,1444,1098,787,1047,778,807,875,695,695,892,871,432,517,756,615,1178,914,909,929,761,756,781,688,888,1185,703,684,757,1068,757,757,711,696,635,631,668,378,704,1132,761,757,580,742,742,757,506,763]],\n [7514, [1132,677,679,754,638,732,977,706,378,512,763,677,754,638,749,977,706,1691,1247,1242,813,1907,1362,1212,870,829,1004,813,880,971,813,994,1711,620,669,1140,1250,1236,1099,1198,680,1461,1131,583,1751,1184,1099,728,941,876,979,1070,850,1208,1234,1130,1041,904,874,1041,630,867,494,1224,907,741,580,622,736,631,464,449,668,763,503,434,378,504,557,444,435,584,1132,1132,812,812,802,757,951,570,522,531,855,816,747,740,705,570,670,714,674,790,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1241,1011,1148,1099,1148,1099,1148,1099,1084,857,1291,1099,1291,1099,1291,1099,1291,1099,1291,1099,999,1031,999,1031,999,1031,999,1031,999,1031,940,648,1305,971,1292,1099,1292,1099,1292,1099,1292,1099,1292,1099,546,503,546,503,1120,983,1120,983,1120,983,866,503,866,503,866,503,866,503,1790,1666,1790,1666,1790,1666,1349,1099,1349,1099,1349,1099,1349,1099,1385,1101,1385,1101,1385,1101,1385,1101,1090,1099,1090,1099,1153,728,1153,728,1153,728,1153,728,968,817,968,817,968,817,968,817,968,817,1014,710,1014,710,1014,710,1014,710,1337,1099,1337,1099,1337,1099,1337,1099,1337,1099,1211,969,1211,969,1856,1526,1856,1526,1856,1526,1856,1526,1856,1526,1128,941,1128,941,1064,970,979,814,979,814,979,814,1099,710,1526,970,1011,529]],\n [7838, [1173]],\n [7840, [1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,1241,1011,999,1031,999,1031,999,1031,999,1031,999,1031,999,1031,999,1031,999,1031,546,503,546,503,1385,1101,1385,1101,1385,1101,1385,1101,1385,1101,1385,1101,1385,1101,1428,1296,1428,1296,1428,1296,1428,1296,1428,1296,1337,1099,1337,1099,1559,1326,1559,1326,1559,1326,1559,1326,1559,1326,1064,970,1064,970,1064,970,1064,970]],\n [7936, [1210,1210,1210,1210,1210,1210,1210,1210,1241,1241,1241,1241,1241,1241,1241,1241,937,937,937,937,937,937]],\n [7960, [999,999,1258,1258,1258,1258]],\n [7968, [1114,1114,1114,1114,1114,1114,1114,1114,1292,1292,1551,1551,1551,1551,1479,1479,586,586,586,586,586,586,586,586,546,546,805,805,805,805,733,546,1101,1101,1101,1101,1101,1101]],\n [8008, [1385,1385,1590,1590,1590,1590]],\n [8016, [1123,1123,1123,1123,1123,1123,1123,1123]],\n [8025, [1064]],\n [8027, [1425]],\n [8029, [1425]],\n [8031, [1425,1470,1470,1470,1470,1470,1470,1470,1470,1394,1394,1598,1598,1598,1598,1523,1530,1210,1210,937,937,1114,1114,586,586,1101,1101,1123,1123,1470,1470]],\n [8064, [1210,1210,1210,1210,1210,1210,1210,1210,1241,1241,1241,1241,1241,1241,1241,1241,1114,1114,1114,1114,1114,1114,1114,1114,1292,1292,1551,1551,1551,1551,1479,1479,1470,1470,1470,1470,1470,1470,1470,1470,1394,1394,1598,1598,1598,1598,1530,1530,1210,1210,1210,1210,1210]],\n [8118, [1210,1210,1241,1241,1241,1241,1241,473]],\n [8127, [473,922,804,1114,1114,1114]],\n [8134, [1114,1114,999,999,1292,1292,1292,809,809,804,586,586,586,586]],\n [8150, [586,586,546,546,546,546]],\n [8157, [809,809,804,1123,1123,1123,1123,1086,1086,1123,1123,1064,1064,1064,1064,1090,1012,1012,649]],\n [8178, [1470,1470,1470]],\n [8182, [1470,1470,1385,1385,1394,1394,1394,649,473]],\n [8192, [1024,2048,1024,2048,687,512,341,1038,444,409,256,0,0,0,0,0]],\n [8210, [1038,1020,1854,1854,985,1022,528,528,528,528,891,891,891,891,1020,1020,1020]],\n [8230, [1457]],\n [8239, [463,2174]],\n [8243, [835,1221]],\n [8249, [705,705]],\n [8252, [1202,1034,1020]],\n [8260, [728]],\n [8286, [601,455]],\n [8304, [815,378]],\n [8308, [749,690,740,669,749,740,727,720,711,455,455,761,815,517,692,688,749,690,740,669,749,740,727,720,711,455,455,652,703,696,757,681,711]],\n [8352, [1323,1114,1084,950,1038,1666,1411,1884,1563,1945,1565,1165,1038,1148,1014,2286,1149,1211,1249,1274,1063,1084]],\n [8376, [1038,1038]],\n [8413, [2036]],\n [8453, [1589]],\n [8467, [1081]],\n [8470, [2142,1709]],\n [8480, [1497]],\n [8482, [1475]],\n [8486, [1394]],\n [8494, [1513]],\n [8498, [940]],\n [8525, [1569,750]],\n [8531, [1428,1530,1428,1530,1515,1543,1370,1457,1426,1512,1512,1392,812]],\n [8579, [1084,867]],\n [8592, [1854,1854,1854,1854,2683,1574,1719,1719,1719,1719]],\n [8616, [967]],\n [8706, [1100]],\n [8710, [1183]],\n [8719, [1602]],\n [8721, [1127,1020]],\n [8725, [780]],\n [8730, [1020]],\n [8734, [1716,1400]],\n [8745, [1437]],\n [8747, [769]],\n [8776, [1020]],\n [8800, [1020,1020]],\n [8804, [1020,1020]],\n [8962, [1793]],\n [8976, [1020]],\n [8992, [1106,1106]],\n [9312, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9450, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9471, [2720,1024]],\n [9474, [1024]],\n [9484, [1024]],\n [9488, [1024]],\n [9492, [1024]],\n [9496, [1024]],\n [9633, [1237]],\n [9642, [725,725]],\n [9674, [1093,1126,1217]],\n [9679, [1237]],\n [9702, [725]],\n [9728, [1506]],\n [9788, [1506]],\n [9833, [0]],\n [10102, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [11360, [912,656,996,1123,1153,1011,761,1378,1160,1228,1069,1013,829]],\n [11380, [1012,1001,846,1433]],\n [11799, [656]],\n [42775, [807,807,804,682]],\n [42784, [1810,1810]],\n [63743, [1522]],\n [64256, [1230,1135,1135,1718,1718]],\n [65056, [0,0,0,0]],\n [65279, [0]]\n ]\n}\n", On = "{\n \"format\": \"sheetxl-font-metrics/1\",\n \"family\": \"Calibri\",\n \"weight\": 400,\n \"italic\": false,\n \"source\": { \"family\": \"Carlito\", \"version\": \"Version 1.103\", \"license\": \"OFL-1.1\", \"notice\": \"Copyright (c) 2010-2013 by tyPoland Lukasz Dziedzic (http://www.typoland.com/) with Reserved Font Name \\\"Carlito\\\". Licensed under the SIL Open Font License, Version 1.1 (http://scripts.sil.org/OFL).\" },\n \"unitsPerEm\": 2048,\n \"winAscent\": 1950,\n \"winDescent\": 550,\n \"underline\": [-103, 194],\n \"strikeout\": [512, 134],\n \"advances\": [\n [0, [0]],\n [13, [0]],\n [32, [463,667,821,1020,1038,1464,1397,452,621,621,1020,1020,511,627,517,791,1038,1038,1038,1038,1038,1038,1038,1038,1038,1038,548,548,1020,1020,1020,949,1831,1185,1114,1092,1260,1000,941,1292,1276,516,653,1064,861,1751,1322,1356,1058,1378,1112,941,998,1314,1162,1822,1063,998,959,628,791,628,1020,1020,596,981,1076,866,1076,1019,625,964,1076,470,490,931,470,1636,1076,1080,1076,1076,714,801,686,1076,925,1464,887,927,809,644,943,644,1020]],\n [161, [667,1020,1038,1020,1038,1020,1020,804,1709,824,1049,1020]],\n [174, [1038,807,694,1020,688,685,598,1126,1200,517,629,504,865,1049,1303,1375,1383,949,1185,1185,1185,1185,1185,1185,1563,1092,1000,1000,1000,1000,516,516,516,516,1279,1322,1356,1356,1356,1356,1356,1020,1359,1314,1314,1314,1314,998,1058,1080,981,981,981,981,981,981,1583,866,1019,1019,1019,1019,470,470,470,470,1076,1076,1080,1080,1080,1080,1080,1020,1084,1076,1076,1076,1076,927,1076,927,1185,981,1185,981,1185,981,1092,866,1092,866,1092,866,1092,866,1260,1164,1279,1130,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1292,964,1292,964,1292,964,1292,964,1276,1076,1344,1091,516,470,516,470,516,470,516,470,516,470,1170,960,653,490,1064,931,931,861,470,861,470,866,540,1118,765,880,507,1322,1076,1322,1076,1322,1076,1186,1287,1076,1356,1080,1356,1080,1356,1080,1775,1740,1112,714,1112,714,1112,714,941,801,941,801,941,801,941,801,998,686,998,708,998,700,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1822,1464,998,927,998,959,809,959,809,959,809,497,1130,1260,1101,1076,1088,1076,1122,1181,947,1279,1406,1101,1076,1072,1000,1317,970,941,1020,1294,1162,1603,592,550,1064,931,577,948,1801,1322,1100,1356,1428,1184,1583,1342,1252,1076,1112,941,801,939,882,736,1087,686,998,1478,1234,1360,1314,1090,1020,959,809,970,970,970,870,1038,1038,872,801,1076,499,809,1175,667,2219,2069,1885,1539,1351,960,1975,1812,1566,1185,981,516,470,1356,1080,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1019,1185,981,1185,981,1563,1583,1292,1100,1292,964,1064,931,1356,1080,1356,1080,970,970,490,2197,2069,1885,1292,964,1832,1236,1322,1076,1185,981,1563,1583,1359,1084,1185,981,1185,981,1000,1019,1000,1019,516,470,516,470,1356,1080,1356,1080,1112,714,1112,714,1314,1076,1314,1076,941,801,998,686,970,970,1276,1076,1316,1229,1038,1038,1007,844,1185,981,1000,1019,1356,1080,1356,1080,1356,1080,1356,1080,998,927,649,1259,686,490,1683,1682,1185,1092,866,861,998,801,809,916,916,1131,1349,1173,1000,1019,673,576,1290,1076,1129,767,1184,994,981,1076,1076,1076,866,923,1076,1076,1019,1019,1307,866,866,1077,1083,577,1076,1076,1105,925,976,1075,1076,1076,577,562,470,743,761,470,1158,1635,1635,1636,1076,1076,1107,1080,1459,1426,1334,714,714,714,714,714,654,654,920,920,801,490,578,490,650,686,686,1188,1142,1109,925,1464,927,849,809,979,956,955,916,916,916,866,1287,981,1083,1131,1095,650,931,793,1076,916,916,1647,1748,1817,1267,964,1402,1548,1198,1129,1007,1007,1076,1101,745,745,365,502,502,515,651,1007,646,452]],\n [699, [511,511,511,462,462,665,665,1020,1020,1099,1099,809,809,593]],\n [715, [596,593,807,596,598,569,569,462,462,682,682,682,682,780,462,657,639,922,961,682,682,609,350,560,638,665,784,784,784,784,784,682,682,809,1178,857,682,682,682,682,657]],\n [757, [961]],\n [759, [922,548,682,682,682,682,1088,1088,770]],\n [773, [0]],\n [781, [0,0,0,0,0]],\n [787, [0,0,511]],\n [792, [0,0,0,682,0,0,0,0,0,0,0]],\n [805, [0]],\n [809, [0,0,0]],\n [815, [0]],\n [818, [0,0]],\n [822, [0]],\n [825, [0,0,0,0,0,0,0]],\n [835, [0]],\n [838, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [857, [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]],\n [884, [511,511]],\n [890, [562,866,866,866,548]],\n [900, [649,1012,1185,517,1000,1276,516]],\n [908, [1356]],\n [910, [998,1360,562,1185,1114,851,1156,1000,959,1276,1356,516,1064,1173,1751,1322,1007,1356,1276,1058]],\n [931, [939,998,998,1555,1063,1536,1360,516,998,1162,933,1100,562,1109,1162,1088,914,1072,933,712,1100,1089,562,931,948,1126,919,770,1080,1132,1042,841,1089,793,1109,1334,873,1449,1426,562,1109,1080,1109,1426]],\n [976, [1074,1144,998,1110,998,1339,1668,1239,1356,1080,1092,841,941,888,1117,921,1186,1186,1801,1636,1116,1071,1138,1048,1092,858,1232,1035,1378,1089,969,806,1239,1042,866,490,1356,885,885,1058,1142,1092,1431,1221,1042,1092,1092,1092,1000,1000,1279,880,1121,941,516,516,653,1786,1795,1266,1112,1314,1080,1269,1185,1101,1114,880,1319,1000,1640,970,1314,1314,1112,1251,1751,1276,1356,1273,1058,1092,998,1080,1428,1063,1308,1138,1778,1822,1259,1560,1088,1122,1800,1137,981,1091,981,708,1143,1019,1411,866,1107,1107,950,1045,1385,1095,1080,1066,1076,866,793,927,1278,887,1109,960,1492,1534,1098,1364,962,907,1478,971,1019,1019,1107,708,909,801,470,470,490,1538,1576,1091,950,1107,927,1075,1900,1386,1284,1063,1601,1332,1291,1075,1703,1455,1480,1152,1855,1547,970,846,1536,1449,1356,1073,1208,978]],\n [1143, [978,2140,1861,1356,1180,1900,1602,1900,1386,1092,866,1248,0,0,0,0]],\n [1160, [2018,1944,1358,1119,1088,991,1058,1076,886,725,870,761,1089,927,1714,1472,970,866,1189,1012,1112,950,1130,1003,1292,1095,1316,1137,1457,1240,1848,1521,1323,1135,1092,866,998,793,998,925,998,925,1142,946,1490,1221,1178,1002,1138,960,1138,960,1526,1224,1526,1224,516,1640,1411,1119,975,1294,1057,1276,1095,1276,1108,1138,960,1799,1462,516,1185,981,1185,981,1563,1583,1000,1019,1317,1019,1317,1019,1640,1411,970,866,970,956,1314,1107,1314,1107,1356,1080,1356,1073,1356,1073,1122,907,1080,927,1080,927,1080,927,1138,960,851,708,1560,1364,870,761,1157,945,1063,887,1088,1076,1629,1621,1565,1435,1050,954,1807,1567,1832,1616,1301,1093,1313,1153,970,866,1289,1067]],\n [3647, [1038]],\n [7424, [982,1295,1583,1042,971,1092,1113,831]],\n [7433, [470,551,913,752,1385,1107,1140,971,1193,1192,1320,1740,872,1080,1080,936,975,975,831,1130,1125,1479,1636,990,1550,847,815,801,976,754,990,1104,936,1327,1038,757,1009,743,763,843,680,680,836,859,422,459,736,603,1133,885,885,885,690,728,667,599,788,1093,684,684,741,1067,741,741,696,696,631,631,663,355,663,1110,742,742,590,742,742,741,483,745]],\n [7514, [1110,645,586,702,582,643,869,607,355,502,745,645,702,582,741,869,607,1684,1211,1213,778,1692,1204,1214,850,794,925,783,809,964,772,964,1672,577,617,1128,1243,1220,1076,1105,625,1356,1054,496,1663,1105,1076,714,891,762,925,1005,828,1148,1240,1076,1019,866,866,1019,470,866,563,1240,886,741,590,622,690,631,449,449,663,745,402,426,355,402,485,404,379,548,1110,1110,795,796,772,742,822,560,365,484,745,696,742,742,645,567,660,678,626,742,0,0,0,0,0,0,0,0,0,0,0]],\n [7678, [0,0,1185,981,1114,1076,1114,1076,1114,1076,1092,866,1260,1076,1260,1076,1260,1076,1260,1076,1260,1076,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,941,625,1292,964,1276,1076,1276,1076,1276,1076,1276,1076,1276,1076,516,470,516,470,1064,931,1064,931,1064,931,861,470,861,470,861,470,861,470,1751,1636,1751,1636,1751,1636,1322,1076,1322,1076,1322,1076,1322,1076,1356,1080,1356,1080,1356,1080,1356,1080,1058,1076,1058,1076,1112,714,1112,714,1112,714,1112,714,941,801,941,801,941,801,941,801,941,801,998,686,998,686,998,686,998,686,1314,1076,1314,1076,1314,1076,1314,1076,1314,1076,1162,925,1162,925,1822,1464,1822,1464,1822,1464,1822,1464,1822,1464,1063,887,1063,887,998,927,959,809,959,809,959,809,1076,686,1464,927,981,497]],\n [7838, [1149]],\n [7840, [1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1185,981,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,1000,1019,516,470,516,470,1356,1080,1356,1080,1356,1080,1356,1080,1356,1080,1356,1080,1356,1080,1428,1184,1428,1184,1428,1184,1428,1184,1428,1184,1314,1076,1314,1076,1478,1234,1478,1234,1478,1234,1478,1234,1478,1234,998,927,998,927,998,927,998,927]],\n [7936, [1162,1162,1162,1162,1162,1162,1162,1162,1185,1185,1185,1185,1185,1185,1185,1185,933,933,933,933,933,933]],\n [7960, [1000,1000,1213,1213,1213,1217]],\n [7968, [1100,1100,1100,1100,1100,1100,1100,1100,1276,1276,1489,1489,1489,1489,1369,1369,562,562,562,562,562,562,562,562,516,516,729,729,729,729,609,609,1080,1080,1080,1080,1080,1080]],\n [8008, [1356,1356,1548,1541,1525,1522]],\n [8016, [1109,1109,1109,1109,1109,1109,1109,1109]],\n [8025, [998]],\n [8027, [1299]],\n [8029, [1303]],\n [8031, [1183,1426,1426,1426,1426,1426,1426,1426,1426,1360,1360,1549,1553,1522,1522,1433,1433,1162,1162,933,933,1100,1100,562,562,1080,1080,1109,1109,1426,1426]],\n [8064, [1162,1162,1162,1162,1162,1162,1162,1162,1185,1185,1185,1185,1185,1185,1185,1185,1100,1100,1100,1100,1100,1100,1100,1100,1276,1276,1489,1489,1489,1489,1369,1369,1426,1426,1426,1426,1426,1426,1426,1426,1360,1360,1549,1553,1522,1522,1433,1433,1162,1162,1162,1162,1162]],\n [8118, [1162,1162,1185,1185,1185,1185,1185,473]],\n [8127, [473,922,804,1100,1100,1100]],\n [8134, [1100,1100,1000,1000,1276,1276,1276,809,809,804,562,562,562,562]],\n [8150, [562,562,516,516,516,516]],\n [8157, [809,809,804,1109,1109,1109,1109,1042,1042,1109,1109,998,998,998,998,1058,1012,1012,649]],\n [8178, [1426,1426,1426]],\n [8182, [1426,1426,1356,1356,1360,1360,1360,649,473]],\n [8192, [1024,2048,1024,2048,687,512,341,1104,444,409,256,0,0,0,0,0]],\n [8210, [1038,1020,1854,1854,809,1020,511,511,511,511,857,857,857,856,1020,1020,1020]],\n [8230, [1414]],\n [8239, [463,2126]],\n [8243, [820,1188]],\n [8249, [694,694]],\n [8252, [1142,990,1020]],\n [8260, [689]],\n [8286, [548,455]],\n [8304, [801,355]],\n [8308, [731,678,735,657,737,735,746,735,720,444,444,742,801,504,688,685,731,678,735,657,737,735,746,735,720,444,444,631,684,696,742,638,696]],\n [8352, [1262,1092,1092,941,1038,1636,1322,1888,1608,1822,1525,1130,1038,1064,998,2216,1082,1154,1202,1173,941,1092]],\n [8376, [1038,1038]],\n [8413, [2036]],\n [8453, [1569]],\n [8467, [1029]],\n [8470, [2099,1709]],\n [8480, [1452]],\n [8482, [1444]],\n [8486, [1360]],\n [8494, [1513]],\n [8498, [941]],\n [8525, [1569,750]],\n [8531, [1385,1481,1385,1481,1463,1485,1326,1405,1363,1442,1442,1322,787]],\n [8579, [1092,866]],\n [8592, [1854,1854,1854,1854,2638,1592,1806,1806,1806,1806]],\n [8616, [967]],\n [8706, [1091]],\n [8710, [1156]],\n [8719, [1637]],\n [8721, [1108,1020]],\n [8725, [689]],\n [8730, [1020]],\n [8734, [1747,1400]],\n [8745, [1437]],\n [8747, [749]],\n [8776, [1020]],\n [8800, [1020,1020]],\n [8804, [1020,1020]],\n [8962, [1793]],\n [8976, [1020]],\n [8992, [1106,1106]],\n [9312, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9450, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [9471, [2720,1024]],\n [9474, [1024]],\n [9484, [1024]],\n [9488, [1024]],\n [9492, [1024]],\n [9496, [1024]],\n [9633, [1237]],\n [9642, [725,725]],\n [9674, [1046,1126,1217]],\n [9679, [1237]],\n [9702, [725]],\n [9728, [1500]],\n [9788, [1500]],\n [9833, [0]],\n [10102, [2720,2720,2720,2720,2720,2720,2720,2720,2720,2720]],\n [11360, [861,577,962,1075,1112,981,686,1316,1123,1137,987,994,836]],\n [11380, [962,949,793,1339]],\n [11799, [627]],\n [42775, [807,807,804,682]],\n [42784, [1810,1810]],\n [63743, [1522]],\n [64256, [1195,1084,1084,1654,1654]],\n [65056, [0,0,0,0]],\n [65279, [0]]\n ]\n}\n", kn, An, jn = [
|
|
642
|
-
"Arial",
|
|
643
|
-
"Arial Black",
|
|
644
|
-
"Brush Script MT",
|
|
645
|
-
"Calibri",
|
|
646
|
-
"Comic Sans MS",
|
|
647
|
-
"Courier New",
|
|
648
|
-
"Garamond",
|
|
649
|
-
"Georgia",
|
|
650
|
-
"Impact",
|
|
651
|
-
"Luminari",
|
|
652
|
-
"Palatino Linotype",
|
|
653
|
-
"Tahoma",
|
|
654
|
-
"Times New Roman",
|
|
655
|
-
"Trebuchet MS",
|
|
656
|
-
"Verdana"
|
|
657
|
-
], Mn = /* @__PURE__ */ new Map([
|
|
658
|
-
[j.GenericName.Serif, ["Tahoma"]],
|
|
659
|
-
[j.GenericName.SanSerif, ["Calibri"]],
|
|
660
|
-
[j.GenericName.MonoSpace, ["Courier New"]],
|
|
661
|
-
[j.GenericName.Cursive, ["Comic Sans MS"]],
|
|
662
|
-
[j.GenericName.Fantasy, ["Luminari"]],
|
|
663
|
-
[j.GenericName.UISystem, ["Arial"]],
|
|
664
|
-
[j.GenericName.UISerif, ["Tahoma"]],
|
|
665
|
-
[j.GenericName.UISanSerif, ["Arial"]],
|
|
666
|
-
[j.GenericName.UIMonoSpace, ["Courier New"]],
|
|
667
|
-
[j.GenericName.UIRounded, ["Arial"]],
|
|
668
|
-
[j.GenericName.Math, []],
|
|
669
|
-
[j.GenericName.Emoji, []],
|
|
670
|
-
[j.GenericName.Fangsong, []]
|
|
671
|
-
]), Nn = /* @__PURE__ */ new Map([
|
|
672
|
-
["aptos", "calibri"],
|
|
673
|
-
["aptos narrow", "calibri"],
|
|
674
|
-
["aptos display", "calibri"],
|
|
675
|
-
["carlito", "calibri"],
|
|
676
|
-
["caladea", "cambria"],
|
|
677
|
-
["helvetica", "arial"],
|
|
678
|
-
["helvetica neue", "arial"],
|
|
679
|
-
["arial nova", "arial"],
|
|
680
|
-
["liberation sans", "arial"],
|
|
681
|
-
["arimo", "arial"],
|
|
682
|
-
["times", "times new roman"],
|
|
683
|
-
["liberation serif", "times new roman"],
|
|
684
|
-
["tinos", "times new roman"],
|
|
685
|
-
["courier", "courier new"],
|
|
686
|
-
["liberation mono", "courier new"],
|
|
687
|
-
["cousine", "courier new"],
|
|
688
|
-
["sans-serif", "calibri"],
|
|
689
|
-
["serif", "times new roman"],
|
|
690
|
-
["monospace", "courier new"],
|
|
691
|
-
["system-ui", "arial"],
|
|
692
|
-
["ui-system", "arial"],
|
|
693
|
-
["ui-sans-serif", "arial"],
|
|
694
|
-
["ui-rounded", "arial"],
|
|
695
|
-
["ui-serif", "times new roman"],
|
|
696
|
-
["ui-monospace", "courier new"]
|
|
697
|
-
]), Pn = /* @__PURE__ */ new Set([
|
|
698
|
-
"serif",
|
|
699
|
-
"sans-serif",
|
|
700
|
-
"monospace",
|
|
701
|
-
"cursive",
|
|
702
|
-
"fantasy",
|
|
703
|
-
"system-ui",
|
|
704
|
-
"ui-system",
|
|
705
|
-
"ui-serif",
|
|
706
|
-
"ui-sans-serif",
|
|
707
|
-
"ui-monospace",
|
|
708
|
-
"ui-rounded",
|
|
709
|
-
"math",
|
|
710
|
-
"emoji",
|
|
711
|
-
"fangsong"
|
|
712
|
-
]), Fn = (e) => e.trim().replace(/\s+/g, " ").toLowerCase(), Y = (e, t, n) => `${Fn(e)}|${t ? "b" : ""}${n ? "i" : ""}`, In = eval, Ln = (e) => {
|
|
713
|
-
try {
|
|
714
|
-
return In(`document.fonts.check('12px ${e}')`);
|
|
715
|
-
} catch {
|
|
716
|
-
return !0;
|
|
717
|
-
}
|
|
718
|
-
}, Rn = class e {
|
|
719
|
-
static {
|
|
720
|
-
this._shared = null;
|
|
721
|
-
}
|
|
722
|
-
static getShared() {
|
|
723
|
-
return e._shared ??= new e([new wn()]), e._shared;
|
|
724
|
-
}
|
|
725
|
-
constructor(e) {
|
|
726
|
-
this._entries = /* @__PURE__ */ new Map(), this._resolutions = /* @__PURE__ */ new Map(), this._loading = /* @__PURE__ */ new Set(), this._builtins = /* @__PURE__ */ new Map(), this._fontList = [], this._fontsByFamily = /* @__PURE__ */ new Map(), this._bestMatches = /* @__PURE__ */ new Map(), this._builders = e, this._emitter = new t(this), this._seedBuiltins(), this.setFontList(null);
|
|
727
|
-
}
|
|
728
|
-
getByName(e, t) {
|
|
729
|
-
let n = t?.bold ?? !1, r = t?.italic ?? !1, i = Y(e, n, r), a = this._resolutions.get(i);
|
|
730
|
-
if (a) return a;
|
|
731
|
-
let o = this._resolve(e, n, r);
|
|
732
|
-
return this._resolutions.set(i, o), o;
|
|
733
|
-
}
|
|
734
|
-
load(e) {
|
|
735
|
-
let t = e.map((e) => {
|
|
736
|
-
let t = typeof e == "string" ? { family: e } : e, n = Fn(t.family);
|
|
737
|
-
return Pn.has(n) ? void 0 : this._ensure(n, t.bold ?? !1, t.italic ?? !1).done;
|
|
738
|
-
});
|
|
739
|
-
return Promise.all(t).then(() => {});
|
|
740
|
-
}
|
|
741
|
-
async whenReady() {
|
|
742
|
-
for (; this._loading.size > 0;) await Promise.all(this._loading);
|
|
743
|
-
}
|
|
744
|
-
isLoading() {
|
|
745
|
-
return this._loading.size > 0;
|
|
746
|
-
}
|
|
747
|
-
setAdvanceBuilders(e) {
|
|
748
|
-
this._builders = e, this._entries.clear(), this._seedBuiltins(), this._changed();
|
|
749
|
-
}
|
|
750
|
-
getFontList() {
|
|
751
|
-
return this._fontList;
|
|
752
|
-
}
|
|
753
|
-
setFontList(e) {
|
|
754
|
-
let t = [];
|
|
755
|
-
this._fontsByFamily.clear(), this._bestMatches.clear();
|
|
756
|
-
for (let n of e ?? jn) {
|
|
757
|
-
let e = typeof n == "string" ? new bn(n) : n, r = {
|
|
758
|
-
fontRef: e,
|
|
759
|
-
loaded: Ln(e.getFamily())
|
|
760
|
-
};
|
|
761
|
-
t.push(r), this._fontsByFamily.set(e.getFamily(), r);
|
|
762
|
-
}
|
|
763
|
-
this._fontList = Object.freeze(t);
|
|
764
|
-
}
|
|
765
|
-
findBestMatch(e, t) {
|
|
766
|
-
let n = this._bestMatches.get(e);
|
|
767
|
-
if (n) return n.fontRef ? n : null;
|
|
768
|
-
let r = null;
|
|
769
|
-
for (let n of [e, ...t?.fallbacks ?? []]) {
|
|
770
|
-
r = this._fontsByFamily.get(n) ?? null;
|
|
771
|
-
for (let e of r ? [] : Mn.get(n) ?? []) if (r = this._fontsByFamily.get(e) ?? null, r) break;
|
|
772
|
-
if (r) break;
|
|
773
|
-
}
|
|
774
|
-
return this._bestMatches.set(e, r ?? {
|
|
775
|
-
fontRef: null,
|
|
776
|
-
loaded: !1
|
|
777
|
-
}), r;
|
|
778
|
-
}
|
|
779
|
-
addListeners(e, t) {
|
|
780
|
-
return this._emitter.addListeners(e, t);
|
|
781
|
-
}
|
|
782
|
-
get isIFontCollection() {
|
|
783
|
-
return !0;
|
|
784
|
-
}
|
|
785
|
-
_seedBuiltins() {
|
|
786
|
-
this._builtins = /* @__PURE__ */ new Map();
|
|
787
|
-
for (let e of [
|
|
788
|
-
On,
|
|
789
|
-
Dn,
|
|
790
|
-
En,
|
|
791
|
-
Tn
|
|
792
|
-
].map((e) => J.fromJSON(JSON.parse(e)))) {
|
|
793
|
-
let t = Y(e.family, e.weight >= 700, e.italic);
|
|
794
|
-
this._builtins.set(t, e), this._entries.set(t, {
|
|
795
|
-
state: "loaded",
|
|
796
|
-
table: e,
|
|
797
|
-
kind: "table",
|
|
798
|
-
done: Promise.resolve()
|
|
799
|
-
});
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
_resolve(e, t, n) {
|
|
803
|
-
let r = {
|
|
804
|
-
family: e,
|
|
805
|
-
weight: t ? 700 : 400,
|
|
806
|
-
italic: n
|
|
807
|
-
}, i = Fn(e), a = Pn.has(i) ? void 0 : this._ensure(i, t, n);
|
|
808
|
-
if (a?.state === "loaded") return {
|
|
809
|
-
table: a.table,
|
|
810
|
-
kind: a.kind,
|
|
811
|
-
status: "loaded",
|
|
812
|
-
requested: r
|
|
813
|
-
};
|
|
814
|
-
let o = a?.state === "loading", s = Nn.get(i);
|
|
815
|
-
if (s) {
|
|
816
|
-
let e = this._ensure(s, t, n);
|
|
817
|
-
if (e.state === "loaded") return {
|
|
818
|
-
table: e.table,
|
|
819
|
-
kind: "classified",
|
|
820
|
-
status: o ? "loading" : "loaded",
|
|
821
|
-
requested: r
|
|
822
|
-
};
|
|
823
|
-
o ||= e.state === "loading";
|
|
824
|
-
}
|
|
825
|
-
let c = s === "arial" || i === "arial" ? "arial" : "calibri";
|
|
826
|
-
return {
|
|
827
|
-
table: this._builtins.get(Y(c, t, !1)),
|
|
828
|
-
kind: "generic",
|
|
829
|
-
status: o ? "loading" : a?.state === "error" ? "error" : "loaded",
|
|
830
|
-
requested: r
|
|
831
|
-
};
|
|
832
|
-
}
|
|
833
|
-
_ensure(e, t, n) {
|
|
834
|
-
let r = Y(e, t, n), i = this._entries.get(r);
|
|
835
|
-
if (i) return i;
|
|
836
|
-
let a = {
|
|
837
|
-
state: "loading",
|
|
838
|
-
done: Promise.resolve()
|
|
839
|
-
}, o = {
|
|
840
|
-
family: e,
|
|
841
|
-
weight: t ? 700 : 400,
|
|
842
|
-
italic: n
|
|
843
|
-
}, s = this._builders, c = (async () => {
|
|
844
|
-
try {
|
|
845
|
-
for (let e of s) {
|
|
846
|
-
let t = await e.build(o);
|
|
847
|
-
if (t) return a.table = t, a.kind = e.kind, void (a.state = "loaded");
|
|
848
|
-
}
|
|
849
|
-
a.state = "missing";
|
|
850
|
-
} catch {
|
|
851
|
-
a.state = "error";
|
|
852
|
-
}
|
|
853
|
-
})().finally(() => {
|
|
854
|
-
this._loading.delete(c), this._entries.get(r) === a && this._changed();
|
|
855
|
-
});
|
|
856
|
-
return a.done = c, this._entries.set(r, a), this._loading.add(c), a;
|
|
857
|
-
}
|
|
858
|
-
_changed() {
|
|
859
|
-
this._resolutions.clear(), this._emitter.notify("onCollectionChange");
|
|
860
|
-
}
|
|
861
|
-
};
|
|
862
|
-
(An = kn ||= {}).getShared = function() {
|
|
863
|
-
return Rn.getShared();
|
|
864
|
-
}, An.ResolutionKind = {
|
|
865
|
-
Table: "table",
|
|
866
|
-
Exact: "exact",
|
|
867
|
-
Classified: "classified",
|
|
868
|
-
Generic: "generic"
|
|
869
|
-
}, An.FontStatus = {
|
|
870
|
-
Loading: "loading",
|
|
871
|
-
Loaded: "loaded",
|
|
872
|
-
Error: "error"
|
|
873
|
-
};
|
|
874
|
-
var zn, Bn = e({
|
|
875
|
-
DefaultFontSizes: () => Vn,
|
|
876
|
-
findNextFontSize: () => Hn
|
|
877
|
-
}), Vn = Object.freeze([
|
|
878
|
-
8,
|
|
879
|
-
9,
|
|
880
|
-
10,
|
|
881
|
-
11,
|
|
882
|
-
12,
|
|
883
|
-
14,
|
|
884
|
-
16,
|
|
885
|
-
18,
|
|
886
|
-
20,
|
|
887
|
-
22,
|
|
888
|
-
24,
|
|
889
|
-
26,
|
|
890
|
-
28,
|
|
891
|
-
30,
|
|
892
|
-
36,
|
|
893
|
-
48,
|
|
894
|
-
72
|
|
895
|
-
]);
|
|
896
|
-
function Hn(e, t = !0, n = Vn) {
|
|
897
|
-
if (!n || n.length === 0) return e;
|
|
898
|
-
if (e === void 0) return n[0];
|
|
899
|
-
if (t && e >= n[n.length - 1] || !t && e <= n[0]) return e;
|
|
900
|
-
let r = R.findEqualOrGreater(n, e);
|
|
901
|
-
return t ? (n[r] === e && (r += 1), n[r] || --r, n[r]) : (--r, n[r]);
|
|
902
|
-
}
|
|
903
|
-
(zn ||= {}).SortOn = {
|
|
528
|
+
(Cn ||= {}).SortOn = {
|
|
904
529
|
Value: "value",
|
|
905
530
|
FillColor: "fillColor",
|
|
906
531
|
FontColor: "fontColor",
|
|
907
532
|
Icon: "icon"
|
|
908
533
|
};
|
|
909
|
-
var
|
|
534
|
+
var Pn = {
|
|
910
535
|
TopLeft: "tl",
|
|
911
536
|
Top: "t",
|
|
912
537
|
TopRight: "tr",
|
|
@@ -916,53 +541,53 @@ var Un = {
|
|
|
916
541
|
BottomLeft: "bl",
|
|
917
542
|
Bottom: "b",
|
|
918
543
|
BottomRight: "br"
|
|
919
|
-
},
|
|
920
|
-
[
|
|
921
|
-
[
|
|
922
|
-
[
|
|
923
|
-
[
|
|
924
|
-
[
|
|
925
|
-
[
|
|
926
|
-
[
|
|
927
|
-
[
|
|
928
|
-
[
|
|
929
|
-
[
|
|
930
|
-
[
|
|
931
|
-
[
|
|
932
|
-
[
|
|
933
|
-
[
|
|
934
|
-
[
|
|
935
|
-
[
|
|
936
|
-
[
|
|
937
|
-
[
|
|
938
|
-
[
|
|
939
|
-
[
|
|
940
|
-
[
|
|
941
|
-
},
|
|
942
|
-
function
|
|
943
|
-
let t =
|
|
544
|
+
}, J = Zt.BuiltInName, Fn = {
|
|
545
|
+
[J.Normal]: W("style.builtin.normal"),
|
|
546
|
+
[J.Comma]: W("style.builtin.comma"),
|
|
547
|
+
[J.Currency]: W("style.builtin.currency"),
|
|
548
|
+
[J.Percent]: W("style.builtin.percent"),
|
|
549
|
+
[J.Comma0]: W("style.builtin.comma0"),
|
|
550
|
+
[J.Currency0]: W("style.builtin.currency0"),
|
|
551
|
+
[J.Hyperlink]: W("style.builtin.hyperlink"),
|
|
552
|
+
[J.FollowedHyperlink]: W("style.builtin.followedHyperlink"),
|
|
553
|
+
[J.Note]: W("style.builtin.note"),
|
|
554
|
+
[J.WarningText]: W("style.builtin.warningText"),
|
|
555
|
+
[J.Title]: W("style.builtin.title"),
|
|
556
|
+
[J.Input]: W("style.builtin.input"),
|
|
557
|
+
[J.Output]: W("style.builtin.output"),
|
|
558
|
+
[J.Calculation]: W("style.builtin.calculation"),
|
|
559
|
+
[J.CheckCell]: W("style.builtin.checkCell"),
|
|
560
|
+
[J.LinkedCell]: W("style.builtin.linkedCell"),
|
|
561
|
+
[J.Total]: W("style.builtin.total"),
|
|
562
|
+
[J.Good]: W("style.builtin.good"),
|
|
563
|
+
[J.Bad]: W("style.builtin.bad"),
|
|
564
|
+
[J.Neutral]: W("style.builtin.neutral"),
|
|
565
|
+
[J.ExplanatoryText]: W("style.builtin.explanatoryText")
|
|
566
|
+
}, In = W("style.builtin.heading"), Ln = W("style.builtin.accent"), Rn = W("style.builtin.accentTint"), zn = /^Heading ([1-4])$/, Bn = /^Accent([1-6])$/, Vn = /^(20|40|60)% - Accent([1-6])$/;
|
|
567
|
+
function Hn(e) {
|
|
568
|
+
let t = Fn[e];
|
|
944
569
|
if (t) return { key: t };
|
|
945
|
-
let n =
|
|
570
|
+
let n = zn.exec(e);
|
|
946
571
|
return n ? {
|
|
947
|
-
key:
|
|
572
|
+
key: In,
|
|
948
573
|
params: { n: +n[1] }
|
|
949
|
-
} : (n =
|
|
950
|
-
key:
|
|
574
|
+
} : (n = Bn.exec(e), n ? {
|
|
575
|
+
key: Ln,
|
|
951
576
|
params: { n: +n[1] }
|
|
952
|
-
} : (n =
|
|
953
|
-
key:
|
|
577
|
+
} : (n = Vn.exec(e), n ? {
|
|
578
|
+
key: Rn,
|
|
954
579
|
params: {
|
|
955
580
|
pct: +n[1],
|
|
956
581
|
n: +n[2]
|
|
957
582
|
}
|
|
958
583
|
} : null));
|
|
959
584
|
}
|
|
960
|
-
var
|
|
585
|
+
var Un, Wn, Gn, Kn, qn = (e, t, n, r, i) => {
|
|
961
586
|
let a = JSON.parse(JSON.stringify(e.definition));
|
|
962
587
|
a.adjs ||= [];
|
|
963
588
|
let o = "", s = 0, c = 0;
|
|
964
|
-
t > 0 ? (c = t, s = 100 - t, o = G("op.lighterPercent", { percent: t })) : t < 0 && (s = 100 + t, o = G("op.darkerPercent", { percent: -t })), s && a.adjs.push({ [
|
|
965
|
-
let l = new
|
|
589
|
+
t > 0 ? (c = t, s = 100 - t, o = G("op.lighterPercent", { percent: t })) : t < 0 && (s = 100 + t, o = G("op.darkerPercent", { percent: -t })), s && a.adjs.push({ [$t.AdjustmentType.LumMod]: s }), c && a.adjs.push({ [$t.AdjustmentType.LumOff]: c });
|
|
590
|
+
let l = new en({
|
|
966
591
|
val: a.val,
|
|
967
592
|
adjs: a.adjs
|
|
968
593
|
}, n), u = l.toString();
|
|
@@ -973,14 +598,14 @@ var Qn, $n, er, tr, nr = (e, t, n, r, i) => {
|
|
|
973
598
|
definition: a
|
|
974
599
|
};
|
|
975
600
|
};
|
|
976
|
-
function
|
|
601
|
+
function Jn(e, t, n, r) {
|
|
977
602
|
let i = [];
|
|
978
603
|
for (let a = 0; a < e.length; a++) {
|
|
979
604
|
let o = [];
|
|
980
605
|
i.push(o);
|
|
981
606
|
let s = (i) => {
|
|
982
|
-
for (let s = 0; s < i.length; s++) o.push(
|
|
983
|
-
}, c = new
|
|
607
|
+
for (let s = 0; s < i.length; s++) o.push(qn(e[a], i[s], t, n, r));
|
|
608
|
+
}, c = new en({
|
|
984
609
|
val: e[a].definition.val,
|
|
985
610
|
adjs: e[a].definition.adjs
|
|
986
611
|
}, t).toHSLA().lum;
|
|
@@ -1018,61 +643,28 @@ function rr(e, t, n, r) {
|
|
|
1018
643
|
}
|
|
1019
644
|
return i;
|
|
1020
645
|
}
|
|
1021
|
-
(
|
|
1022
|
-
var
|
|
1023
|
-
function
|
|
1024
|
-
if (!
|
|
1025
|
-
let e = import("./
|
|
646
|
+
(Un ||= {}).buildPalette = Jn, Wn ||= {}, Gn ||= {}, Kn ||= {};
|
|
647
|
+
var Yn, Y = null;
|
|
648
|
+
function Xn() {
|
|
649
|
+
if (!Y) {
|
|
650
|
+
let e = import("./DLLE0FZNsKxbBzRn.mjs").then(({ initializeFunctions: e }) => {
|
|
1026
651
|
let t = e(() => null);
|
|
1027
652
|
return Object.freeze(Array.from(t.keys()));
|
|
1028
653
|
});
|
|
1029
654
|
e.catch(() => {
|
|
1030
|
-
|
|
1031
|
-
}),
|
|
655
|
+
Y = null;
|
|
656
|
+
}), Y = e;
|
|
1032
657
|
}
|
|
1033
|
-
return
|
|
658
|
+
return Y;
|
|
1034
659
|
}
|
|
1035
|
-
function
|
|
1036
|
-
|
|
1037
|
-
if (!t) return;
|
|
1038
|
-
let n;
|
|
1039
|
-
try {
|
|
1040
|
-
let e = pe.shared().tokenize(t, !1);
|
|
1041
|
-
if (e.errors.length > 0) return;
|
|
1042
|
-
n = e.tokens;
|
|
1043
|
-
} catch {
|
|
1044
|
-
return;
|
|
1045
|
-
}
|
|
1046
|
-
let r = 0, i = 0;
|
|
1047
|
-
if (n.length === 2) {
|
|
1048
|
-
let e = n[0].tokenType?.name;
|
|
1049
|
-
e === "MinOp" ? (r = -1, i = 1) : e === "PlusOp" && (r = 1, i = 1);
|
|
1050
|
-
}
|
|
1051
|
-
if (n.length - i !== 1) return;
|
|
1052
|
-
let a = n[i], o = a.image;
|
|
1053
|
-
try {
|
|
1054
|
-
switch (a.tokenType?.name) {
|
|
1055
|
-
case "NumberToken":
|
|
1056
|
-
case "ScientificDigit":
|
|
1057
|
-
case "DigitToken": {
|
|
1058
|
-
let e = et(o).value;
|
|
1059
|
-
return r === 0 ? e : r * e;
|
|
1060
|
-
}
|
|
1061
|
-
case "StringToken": return r === 0 ? ue(o).value : void 0;
|
|
1062
|
-
case "BooleanToken": return r === 0 ? rt(o).value : void 0;
|
|
1063
|
-
case "LiteralError":
|
|
1064
|
-
case "RefError": return r === 0 ? l(o).value : void 0;
|
|
1065
|
-
default: return;
|
|
1066
|
-
}
|
|
1067
|
-
} catch {
|
|
1068
|
-
return;
|
|
1069
|
-
}
|
|
660
|
+
function Zn(e) {
|
|
661
|
+
return Ot.peek()?.readFormulaLiteral(e);
|
|
1070
662
|
}
|
|
1071
|
-
function
|
|
1072
|
-
let n =
|
|
663
|
+
function Qn(e, t) {
|
|
664
|
+
let n = $n(e), r = $n(t);
|
|
1073
665
|
return n === r ? e === t ? 0 : typeof e == "number" && typeof t == "number" ? e < t ? -1 : 1 : typeof e == "string" && typeof t == "string" ? e < t ? -1 : +(e > t) : typeof e == "boolean" ? e ? 1 : -1 : I.isError(e) && I.isError(t) ? e.getCode() - t.getCode() : 0 : n - r;
|
|
1074
666
|
}
|
|
1075
|
-
function
|
|
667
|
+
function $n(e) {
|
|
1076
668
|
if (e === null) return 0;
|
|
1077
669
|
switch (typeof e) {
|
|
1078
670
|
case "number": return 1;
|
|
@@ -1081,7 +673,15 @@ function sr(e) {
|
|
|
1081
673
|
default: return I.isError(e) ? 4 : 5;
|
|
1082
674
|
}
|
|
1083
675
|
}
|
|
1084
|
-
|
|
676
|
+
(function(e) {
|
|
677
|
+
function t(e) {
|
|
678
|
+
return Ot.peek()?.getFunctionDeclaration(e) ?? null;
|
|
679
|
+
}
|
|
680
|
+
e.get = t, e.has = function(e) {
|
|
681
|
+
return t(e) !== null;
|
|
682
|
+
};
|
|
683
|
+
})(Yn ||= {});
|
|
684
|
+
var er = class {
|
|
1085
685
|
constructor(e) {
|
|
1086
686
|
this._children = e;
|
|
1087
687
|
}
|
|
@@ -1126,19 +726,19 @@ var cr = class {
|
|
|
1126
726
|
let n = t[e].getSortedNumbers().getValues();
|
|
1127
727
|
n.length > 0 && r.push(n);
|
|
1128
728
|
}
|
|
1129
|
-
e = new
|
|
729
|
+
e = new vt(function(e) {
|
|
1130
730
|
let t = e.length;
|
|
1131
|
-
if (t === 0) return
|
|
731
|
+
if (t === 0) return tr;
|
|
1132
732
|
if (t === 1) return e[0];
|
|
1133
733
|
let n = e[0];
|
|
1134
|
-
for (let r = 1; r < t; r++) n =
|
|
734
|
+
for (let r = 1; r < t; r++) n = nr(n, e[r]);
|
|
1135
735
|
return Object.freeze(n);
|
|
1136
736
|
}(r)), this._sortedNumbers = e;
|
|
1137
737
|
}
|
|
1138
738
|
return e;
|
|
1139
739
|
}
|
|
1140
740
|
getRanked(e) {
|
|
1141
|
-
return
|
|
741
|
+
return et(this._children, e, Qn)[Symbol.iterator]();
|
|
1142
742
|
}
|
|
1143
743
|
getFrequencies(e) {
|
|
1144
744
|
if (e) return this._mergeFrequencies(e);
|
|
@@ -1146,7 +746,7 @@ var cr = class {
|
|
|
1146
746
|
return t || (t = this._mergeFrequencies(), this._frequencies = t), t;
|
|
1147
747
|
}
|
|
1148
748
|
_mergeFrequencies(e) {
|
|
1149
|
-
let t = e?.keyFn ??
|
|
749
|
+
let t = e?.keyFn ?? lt, n = e?.limit, r = /* @__PURE__ */ new Map(), i = this._children, a = i.length, o = 0, s = 0, c = !1;
|
|
1150
750
|
for (let l = 0; l < a; l++) {
|
|
1151
751
|
let a = i[l].getFrequencies(e);
|
|
1152
752
|
o += a.getVisitedCount(), s += a.getTotalCount(), c ||= a.isTruncated();
|
|
@@ -1159,7 +759,7 @@ var cr = class {
|
|
|
1159
759
|
}) : c = !0, d = u.next();
|
|
1160
760
|
}
|
|
1161
761
|
}
|
|
1162
|
-
return
|
|
762
|
+
return mt.fromGroups(r, t, e, Qn, o, s, c);
|
|
1163
763
|
}
|
|
1164
764
|
getTypedCounts(e) {
|
|
1165
765
|
let t = this._typedCounts;
|
|
@@ -1209,24 +809,24 @@ var cr = class {
|
|
|
1209
809
|
let a = n.numericalCount;
|
|
1210
810
|
a <= 0 || (r.numericalCount += a, r.sum += n.sum, r.sumSq += n.varP * a + n.sum * n.sum / a, (r.min === void 0 || n.min < r.min) && (r.min = n.min), (r.max === void 0 || n.max > r.max) && (r.max = n.max));
|
|
1211
811
|
}
|
|
1212
|
-
return
|
|
812
|
+
return Ne(r);
|
|
1213
813
|
}
|
|
1214
|
-
},
|
|
1215
|
-
function
|
|
814
|
+
}, tr = Object.freeze([]);
|
|
815
|
+
function nr(e, t) {
|
|
1216
816
|
let n = e.length, r = t.length, i = Array(n + r), a = 0, o = 0, s = 0;
|
|
1217
817
|
for (; a < n && o < r;) i[s++] = e[a] <= t[o] ? e[a++] : t[o++];
|
|
1218
818
|
for (; a < n;) i[s++] = e[a++];
|
|
1219
819
|
for (; o < r;) i[s++] = t[o++];
|
|
1220
820
|
return i;
|
|
1221
821
|
}
|
|
1222
|
-
var
|
|
822
|
+
var rr, ir = class {
|
|
1223
823
|
constructor(e, t) {
|
|
1224
824
|
this._source = null, this.cacheId = e, this.part = t;
|
|
1225
825
|
}
|
|
1226
826
|
_hold(e) {
|
|
1227
827
|
let t = this.part?.xml;
|
|
1228
828
|
if (!t || this._source) return;
|
|
1229
|
-
let n =
|
|
829
|
+
let n = te(t, "worksheetSource", "ref"), r = te(t, "worksheetSource", "sheet");
|
|
1230
830
|
if (!n || !r || n.includes("#REF!")) return;
|
|
1231
831
|
let i = e(r);
|
|
1232
832
|
if (!i) return;
|
|
@@ -1235,7 +835,7 @@ var dr = class {
|
|
|
1235
835
|
wired: null,
|
|
1236
836
|
last: null
|
|
1237
837
|
};
|
|
1238
|
-
this._source = a, i(`${
|
|
838
|
+
this._source = a, i(`${Ae(r)}!${y(n)}`, (e) => {
|
|
1239
839
|
a.formula = e.formula;
|
|
1240
840
|
let t = e.formula.getExpression();
|
|
1241
841
|
a.wired ??= t, e.formula.hasRefError() || (a.last = t);
|
|
@@ -1246,18 +846,18 @@ var dr = class {
|
|
|
1246
846
|
if (!e || !t?.formula) return e;
|
|
1247
847
|
let n = t.formula.hasRefError() ? t.last : t.formula.getExpression();
|
|
1248
848
|
if (n === null || n === t.wired) return e;
|
|
1249
|
-
let r =
|
|
1250
|
-
return r ?
|
|
849
|
+
let r = Mt(n);
|
|
850
|
+
return r ? C(C(e, "worksheetSource", "ref", _t(r.reference)), "worksheetSource", "sheet", r.sheet) : C(e, "worksheetSource", "ref", _t(n));
|
|
1251
851
|
}
|
|
1252
852
|
toJSON(e) {
|
|
1253
|
-
let t = { cacheId: this.cacheId }, n =
|
|
853
|
+
let t = { cacheId: this.cacheId }, n = w.toJSON(this.part, e);
|
|
1254
854
|
if (n) {
|
|
1255
855
|
let e = this.getXML();
|
|
1256
856
|
e !== null && (n.xml = e), t.part = n;
|
|
1257
857
|
}
|
|
1258
858
|
return t;
|
|
1259
859
|
}
|
|
1260
|
-
},
|
|
860
|
+
}, ar = class {
|
|
1261
861
|
constructor(e, t) {
|
|
1262
862
|
this._deleted = !1, this._json = { ...e }, this._deleteFromCollection = t ?? null;
|
|
1263
863
|
}
|
|
@@ -1291,7 +891,7 @@ var dr = class {
|
|
|
1291
891
|
get isIPerson() {
|
|
1292
892
|
return !0;
|
|
1293
893
|
}
|
|
1294
|
-
},
|
|
894
|
+
}, or = class extends ke {
|
|
1295
895
|
constructor(e) {
|
|
1296
896
|
super(), this._byId = /* @__PURE__ */ new Map(), this._byDisplayName = /* @__PURE__ */ new Map(), this._items = null, this._current = null, e && this.fromJSON(e);
|
|
1297
897
|
}
|
|
@@ -1312,7 +912,7 @@ var dr = class {
|
|
|
1312
912
|
let e = this._byDisplayName.get(r);
|
|
1313
913
|
if (e) return e;
|
|
1314
914
|
}
|
|
1315
|
-
let i = new
|
|
915
|
+
let i = new ar({
|
|
1316
916
|
...t,
|
|
1317
917
|
displayName: r,
|
|
1318
918
|
id: n ?? R.uuidV4().toUpperCase()
|
|
@@ -1355,7 +955,7 @@ var dr = class {
|
|
|
1355
955
|
get isIPersonCollection() {
|
|
1356
956
|
return !0;
|
|
1357
957
|
}
|
|
1358
|
-
},
|
|
958
|
+
}, sr = (e, t) => {
|
|
1359
959
|
let n = [0];
|
|
1360
960
|
for (let t = 0; t < e.length; t++) e[t] === "\n" && n.push(t + 1);
|
|
1361
961
|
let r = t.map((e) => ` ${((e) => {
|
|
@@ -1367,9 +967,9 @@ var dr = class {
|
|
|
1367
967
|
return `${t + 1}:${e - n[t] + 1}`;
|
|
1368
968
|
})(e.start)} ${e.code}: ${e.message}`), i = t.length;
|
|
1369
969
|
return `Script has ${i} compile error${i === 1 ? "" : "s"}:\n${r.join("\n")}`;
|
|
1370
|
-
},
|
|
1371
|
-
constructor(
|
|
1372
|
-
this._options =
|
|
970
|
+
}, cr = class {
|
|
971
|
+
constructor(t) {
|
|
972
|
+
this._options = t, this._emitter = new e(this), this._initState();
|
|
1373
973
|
}
|
|
1374
974
|
_initState() {}
|
|
1375
975
|
getModules() {
|
|
@@ -1392,13 +992,13 @@ var dr = class {
|
|
|
1392
992
|
minify: !0,
|
|
1393
993
|
...e
|
|
1394
994
|
});
|
|
1395
|
-
return t.module ? await
|
|
995
|
+
return t.module ? await D(Fe.DEFAULT_MODULE, t.module, e?.declarationsOnly ?? !1, t.diagnostics) : null;
|
|
1396
996
|
}
|
|
1397
997
|
addModule(e, t, n) {
|
|
1398
998
|
this._modules.add(e, t, n);
|
|
1399
999
|
}
|
|
1400
1000
|
async addModuleFromJSON(e, t, n) {
|
|
1401
|
-
let r = await
|
|
1001
|
+
let r = await D(e, t);
|
|
1402
1002
|
return this.addModule(e, r, n), r;
|
|
1403
1003
|
}
|
|
1404
1004
|
executeMacro(e, t, n) {
|
|
@@ -1414,7 +1014,7 @@ var dr = class {
|
|
|
1414
1014
|
}
|
|
1415
1015
|
async run(e, t) {
|
|
1416
1016
|
try {
|
|
1417
|
-
let n = typeof e == "string" ? await this.createModule({ source: e }) : await
|
|
1017
|
+
let n = typeof e == "string" ? await this.createModule({ source: e }) : await D(Fe.DEFAULT_MODULE, e), r = typeof e == "string" ? e : e?.source ?? "";
|
|
1418
1018
|
return await this._runModule(n, r, t);
|
|
1419
1019
|
} catch (e) {
|
|
1420
1020
|
return {
|
|
@@ -1431,7 +1031,7 @@ var dr = class {
|
|
|
1431
1031
|
};
|
|
1432
1032
|
let i = e.getDiagnostics(), a = i.filter((e) => e.severity === "error");
|
|
1433
1033
|
if (a.length > 0) {
|
|
1434
|
-
let e = Error(
|
|
1034
|
+
let e = Error(sr(t, a));
|
|
1435
1035
|
return e.diagnostics = a, {
|
|
1436
1036
|
ok: !1,
|
|
1437
1037
|
error: e,
|
|
@@ -1447,7 +1047,7 @@ var dr = class {
|
|
|
1447
1047
|
})[0] ?? null;
|
|
1448
1048
|
if (!s) return {
|
|
1449
1049
|
ok: !1,
|
|
1450
|
-
error: /* @__PURE__ */ Error("The script has no runnable entry. Export a default function taking the script context, e.g. `export default function run(ctx: IScript.ScriptContext) { ... }` (the workbook is `ctx.wb`; a macro may instead take its target first, e.g. `(sheet:
|
|
1050
|
+
error: /* @__PURE__ */ Error("The script has no runnable entry. Export a default function taking the script context, e.g. `export default function run(ctx: IScript.ScriptContext) { ... }` (the workbook is `ctx.wb`; a macro may instead take its target first, e.g. `(sheet: IWorksheet, ctx)`).")
|
|
1451
1051
|
};
|
|
1452
1052
|
let c = await s.execute(r, n);
|
|
1453
1053
|
return {
|
|
@@ -1482,7 +1082,7 @@ var dr = class {
|
|
|
1482
1082
|
}
|
|
1483
1083
|
if (!i || i.length === 0) return R.EmptyArray;
|
|
1484
1084
|
let o = e?.text ? e.text.trim().toUpperCase() : null;
|
|
1485
|
-
return o ?
|
|
1085
|
+
return o ? nt(i, o) : i.sort((e, t) => {
|
|
1486
1086
|
let n = e.getName().toUpperCase(), r = t.getName().toUpperCase();
|
|
1487
1087
|
return n < r ? -1 : +(n > r);
|
|
1488
1088
|
}), n !== void 0 && i.length > n ? i.slice(0, n) : i;
|
|
@@ -1499,13 +1099,13 @@ var dr = class {
|
|
|
1499
1099
|
for (let i = 0; i < r.length; i++) {
|
|
1500
1100
|
let a = r[i], o = t[a];
|
|
1501
1101
|
try {
|
|
1502
|
-
n[a] = await
|
|
1102
|
+
n[a] = await D(a, o, !1, [], o?.scope === "workbook" ? e : null);
|
|
1503
1103
|
} catch (e) {
|
|
1504
1104
|
V.error(`Could not load script '${a}'; it will be unavailable.`, e);
|
|
1505
1105
|
}
|
|
1506
1106
|
}
|
|
1507
1107
|
}
|
|
1508
|
-
let r = this, i = new
|
|
1108
|
+
let r = this, i = new Ze({
|
|
1509
1109
|
transactions: this._options?.transactions,
|
|
1510
1110
|
initial: n,
|
|
1511
1111
|
isReadOnly: () => r.isReadOnly(),
|
|
@@ -1548,9 +1148,9 @@ var dr = class {
|
|
|
1548
1148
|
get isIScript() {
|
|
1549
1149
|
return !0;
|
|
1550
1150
|
}
|
|
1551
|
-
},
|
|
1151
|
+
}, lr = class {
|
|
1552
1152
|
constructor(e, t, n, r) {
|
|
1553
|
-
this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = n, this._topLeft = t ?? z.EmptyCell, this._sheet = new
|
|
1153
|
+
this._mergedReading = [], this._colsReading = [], this._rowsReading = [], this._styles = n, this._topLeft = t ?? z.EmptyCell, this._sheet = new A({
|
|
1554
1154
|
runtime: e,
|
|
1555
1155
|
styles: this._styles,
|
|
1556
1156
|
calcOnLoad: "none",
|
|
@@ -1571,28 +1171,32 @@ var dr = class {
|
|
|
1571
1171
|
e.includes(r) && delete i[r];
|
|
1572
1172
|
}
|
|
1573
1173
|
}
|
|
1574
|
-
let a =
|
|
1174
|
+
let a = Yt(i.fontFamily);
|
|
1575
1175
|
r.font = {}, a && (r.font.family = a.family, r.font.fallbacks = a.fallbacks, r.font.size = a.size), r.font.size = i.fontSize, r.font.weight = i.fontWeight, r.font.style = i.fontStyle, r.font.color = i.color;
|
|
1576
|
-
let o =
|
|
1577
|
-
r.font.underline = o.underline, r.font.strike = o.strike, i.textUnderlineStyle && (r.font.underline =
|
|
1176
|
+
let o = qt(i.textDecoration);
|
|
1177
|
+
r.font.underline = o.underline, r.font.strike = o.strike ? M.StrikeStyle.Single : M.StrikeStyle.None, i.textUnderlineStyle && (r.font.underline = on(i.textUnderlineStyle)), r.alignment = {}, i?.textAlign && (r.alignment.horizontal = Wt(i.textAlign)), i?.textAlign && !r.alignment.horizontal && i?.textAlign !== "general" && (i.textAlign === "center-across" ? r.alignment.horizontal = N.HorizontalAlignment.CenterContinuous : i.textAlign === "fill" ? r.alignment.horizontal = N.HorizontalAlignment.Fill : i.textAlign === "121" || i.textAlign === "010" ? (r.alignment.horizontal = N.HorizontalAlignment.Distributed, r.alignment.justifyLastLine = i.textAlign === "121") : console.warn("unknown text-align", i.textAlign)), i.verticalAlign && (i.verticalAlign.toLowerCase() === "super" ? r.font.baseline = F.Baseline.Superscript : i.verticalAlign.toLowerCase() === "sub" ? r.font.baseline = F.Baseline.Subscript : r.alignment.vertical = Lt(i.verticalAlign), r.alignment.vertical || (i.verticalAlign === "121" ? r.alignment.vertical = N.VerticalAlignment.Distributed : console.warn("unknown vertical-align", i.verticalAlign))), i.msoCharIndentCount && (r.alignment.indent = i.msoCharIndentCount), i.whiteSpace && (r.alignment.overflow = i.whiteSpace === "no-wrap" || i.whiteSpace === "nowrap" ? N.Overflow.Visible : N.Overflow.Wrap), i.msoTextControl === "shrinktofit" && (r.alignment.overflow = N.Overflow.Shrink);
|
|
1578
1178
|
let s = null;
|
|
1579
1179
|
if (i.background ? s = i.background : i.backgroundColor && (s = i.backgroundColor), s && (r.fill = { color: s }), i.msoPattern) {
|
|
1580
|
-
let e =
|
|
1581
|
-
e && (e.patternType ===
|
|
1180
|
+
let e = Xt(i.msoPattern);
|
|
1181
|
+
e && (e.patternType === Qt.BuiltInSheetPattern.Solid ? r.fill = { color: e.foreground } : e.patternType !== Qt.BuiltInSheetPattern.None && (s && (e.background = s), r.fill = e));
|
|
1582
1182
|
}
|
|
1583
|
-
i.layoutFlow === "vertical" || i.layoutFlow === "vertical-ideographic" ? r.alignment.stacked = !0 : i.msoRotate !== void 0 && (r.alignment.rotation =
|
|
1183
|
+
i.layoutFlow === "vertical" || i.layoutFlow === "vertical-ideographic" ? r.alignment.stacked = !0 : i.msoRotate !== void 0 && (r.alignment.rotation = Ht(i.msoRotate));
|
|
1584
1184
|
let c = (e, t) => {
|
|
1585
1185
|
e && (r.borders ||= {}, r.borders[e] = t);
|
|
1586
1186
|
};
|
|
1587
1187
|
i.border && i.border !== "none" && (c("top", i.border), c("left", i.border), c("right", i.border), c("bottom", i.border)), i.borderTop && c("top", i.borderTop), i.borderLeft && c("left", i.borderLeft), i.borderRight && c("right", i.borderRight), i.borderBottom && c("bottom", i.borderBottom), i.msoDiagonalUp && c("diagonalUp", i.msoDiagonalUp), i.msoDiagonalDown && c("diagonalDown", i.msoDiagonalDown);
|
|
1588
1188
|
let l = r.numberFormat;
|
|
1589
|
-
i.msoNumberFormat && (l =
|
|
1189
|
+
i.msoNumberFormat && (l = nn(i.msoNumberFormat), l.includes("\\") ? l = null : l === "Fixed" ? l = P.Styles.lookupStyle(r.numberFormat).formatType === P.Type.Number ? null : P.Type.Number : l === "Percent" && (l = P.Styles.lookupStyle(r.numberFormat).formatType === P.Type.Percentage ? null : P.Type.Percentage)), l && (r.numberFormat = l), e.style = this._styles.normalize(r), n && Object.keys(e.style).length === 0 && delete e.style;
|
|
1590
1190
|
}
|
|
1591
1191
|
onCell(e, t, n, r, i) {
|
|
1592
1192
|
let a = r(i), o = { value: t === void 0 ? n ?? "" : t };
|
|
1593
|
-
if (typeof o.value == "string" && o.value.length === 0 && (o.value = void 0), a && this.applyCSSStyle(o, a),
|
|
1193
|
+
if (typeof o.value == "string" && o.value.length === 0 && (o.value = void 0), a && this.applyCSSStyle(o, a), typeof o.value == "string" && /^#+$/.test(o.value)) {
|
|
1194
|
+
let e = o.style?.numberFormat;
|
|
1195
|
+
e && (Jt(e) || Rt(e)) && (o.value = I.BuiltIn.Num);
|
|
1196
|
+
}
|
|
1197
|
+
if (i?.tagName.toUpperCase() === "TD") {
|
|
1594
1198
|
let e = o.style, t = e?.font ?? {};
|
|
1595
|
-
(i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike =
|
|
1199
|
+
(i.querySelectorAll("s").length > 0 || i.querySelectorAll("strike").length > 0) && (t.strike = M.StrikeStyle.Single), i.querySelectorAll("sub").length > 0 && (t.baseline = F.Baseline.Subscript), i.querySelectorAll("sup").length > 0 && (t.baseline = F.Baseline.Superscript), (i.querySelectorAll("b").length > 0 || i.querySelectorAll("strong").length > 0) && (t.weight = 700), i.querySelectorAll("i").length > 0 && (t.style = M.Style.Italic), i.querySelectorAll("u").length > 0 && (t.underline = M.UnderlineStyle.Single), Object.keys(t).length > 0 && (e || (e = {}, o.style = e), e.font || (e.font = t));
|
|
1596
1200
|
let n = i.querySelectorAll("a");
|
|
1597
1201
|
if (n.length > 0) {
|
|
1598
1202
|
let e = n[0].getAttribute("href");
|
|
@@ -1639,8 +1243,8 @@ var dr = class {
|
|
|
1639
1243
|
let i = n(r);
|
|
1640
1244
|
if (i.msoHeightSource !== "userset" || !r) return;
|
|
1641
1245
|
let a = r.getAttribute("height") ?? i.height, o = null;
|
|
1642
|
-
if (a && (o =
|
|
1643
|
-
let t = r.cells[e], i = t.getAttribute("height") ?? n(t).height, a =
|
|
1246
|
+
if (a && (o = Vt(a, this._styles.getNormal().getFont().getSize(), "px")), o === null) for (let e = 0; e < r.cells.length; e++) {
|
|
1247
|
+
let t = r.cells[e], i = t.getAttribute("height") ?? n(t).height, a = Vt(i, this._styles.getNormal().getFont().getSize(), "px");
|
|
1644
1248
|
a !== null && (o = Math.max(a, o ?? 0));
|
|
1645
1249
|
}
|
|
1646
1250
|
o !== null && this._rowsReading.push({
|
|
@@ -1648,19 +1252,19 @@ var dr = class {
|
|
|
1648
1252
|
min: this._topLeft.rowIndex + e,
|
|
1649
1253
|
max: this._topLeft.rowIndex + e + t - 1
|
|
1650
1254
|
},
|
|
1651
|
-
update: { size: o *
|
|
1255
|
+
update: { size: o * M.getDeviceScale() }
|
|
1652
1256
|
});
|
|
1653
1257
|
}
|
|
1654
1258
|
onColumn(e, t, n, r) {
|
|
1655
1259
|
let i = n(r);
|
|
1656
1260
|
if (i.msoWidthSource !== "userset" || !r) return;
|
|
1657
1261
|
let a = r.getAttribute("width") ?? i.width, o = null;
|
|
1658
|
-
a && (o =
|
|
1262
|
+
a && (o = Vt(a, this._styles.getNormal().getFont().getSize(), "px")), o !== null && this._colsReading.push({
|
|
1659
1263
|
address: {
|
|
1660
1264
|
min: this._topLeft.colIndex + e,
|
|
1661
1265
|
max: this._topLeft.colIndex + e + t - 1
|
|
1662
1266
|
},
|
|
1663
|
-
update: { size: o *
|
|
1267
|
+
update: { size: o * M.getDeviceScale() }
|
|
1664
1268
|
});
|
|
1665
1269
|
}
|
|
1666
1270
|
onDone() {
|
|
@@ -1671,9 +1275,9 @@ var dr = class {
|
|
|
1671
1275
|
sheet() {
|
|
1672
1276
|
return this._sheet;
|
|
1673
1277
|
}
|
|
1674
|
-
},
|
|
1278
|
+
}, ur = class {
|
|
1675
1279
|
constructor(e) {
|
|
1676
|
-
if (!e) throw new
|
|
1280
|
+
if (!e) throw new hn("snapshot is required.");
|
|
1677
1281
|
this._snapshot = e;
|
|
1678
1282
|
}
|
|
1679
1283
|
getItemType() {
|
|
@@ -1703,9 +1307,9 @@ var dr = class {
|
|
|
1703
1307
|
get isClipboardItem() {
|
|
1704
1308
|
return !0;
|
|
1705
1309
|
}
|
|
1706
|
-
},
|
|
1310
|
+
}, dr = class {
|
|
1707
1311
|
constructor(e, t, n, r, i) {
|
|
1708
|
-
if (this._parsed = void 0, this._runtime = e, !t) throw new
|
|
1312
|
+
if (this._parsed = void 0, this._runtime = e, !t) throw new hn("nativeItems are required.");
|
|
1709
1313
|
this._topLeft = n ?? z.EmptyCell, this._native = t, this._markOptions = Object.freeze(r ?? {}), this._styles = i;
|
|
1710
1314
|
}
|
|
1711
1315
|
getItemType() {
|
|
@@ -1730,6 +1334,10 @@ var dr = class {
|
|
|
1730
1334
|
if (this._snapshot) return this._snapshot;
|
|
1731
1335
|
let t = this;
|
|
1732
1336
|
return this._snapshot = {
|
|
1337
|
+
prepare: (n, r) => e.prepare?.(n, {
|
|
1338
|
+
...t._markOptions,
|
|
1339
|
+
...r
|
|
1340
|
+
}),
|
|
1733
1341
|
copyTo: (n, r) => e.copyTo(n, {
|
|
1734
1342
|
...t._markOptions,
|
|
1735
1343
|
...r
|
|
@@ -1747,33 +1355,45 @@ var dr = class {
|
|
|
1747
1355
|
async parse() {
|
|
1748
1356
|
let e, t = this._native?.text, n = this._native.html;
|
|
1749
1357
|
if (n === null && t && t.includes("<table")) try {
|
|
1750
|
-
let e = new DOMParser().parseFromString(t,
|
|
1358
|
+
let e = new DOMParser().parseFromString(t, mn.Html), r = e.querySelector("parsererror");
|
|
1751
1359
|
if (r) throw new B("Unable to parse: " + r);
|
|
1752
1360
|
n = e, t = null;
|
|
1753
1361
|
} catch {
|
|
1754
1362
|
console.warn("Discovered text as html table but could could not parse.");
|
|
1755
1363
|
}
|
|
1756
1364
|
try {
|
|
1757
|
-
let r = new
|
|
1758
|
-
if (
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1365
|
+
let r = new lr(this._runtime, this._topLeft, this._styles, n ? "HTML" : "Text"), i = await Promise.resolve(t ? rt(t) : [[]]), a;
|
|
1366
|
+
if (yt(n, i, r) ? (e = r.sheet(), a = e.getUsedRange()) : n = null, a) {
|
|
1367
|
+
let t = a.getSnapshot();
|
|
1368
|
+
return this._parsed = {
|
|
1369
|
+
prepare: (e, n) => t.prepare?.(e, n),
|
|
1370
|
+
copyTo: (e, n) => t.copyTo(e, n),
|
|
1371
|
+
getCoords: () => a.getCoords(),
|
|
1372
|
+
getSource: () => e,
|
|
1373
|
+
getName: () => e.getName()
|
|
1374
|
+
}, !0;
|
|
1375
|
+
}
|
|
1764
1376
|
} catch (e) {
|
|
1765
1377
|
throw e;
|
|
1766
1378
|
}
|
|
1767
1379
|
if (!t && !n && this._native.image) {
|
|
1768
|
-
let e = this;
|
|
1380
|
+
let e = await this._native.image.arrayBuffer(), t = null;
|
|
1769
1381
|
return this._parsed = {
|
|
1770
|
-
async
|
|
1771
|
-
let r =
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1382
|
+
async prepare(n) {
|
|
1383
|
+
let r = n.getWorksheet();
|
|
1384
|
+
t = {
|
|
1385
|
+
sheet: r,
|
|
1386
|
+
options: await r.getMovables()._preparePicture({ source: { buffer: e } }, {
|
|
1387
|
+
type: "picture",
|
|
1388
|
+
description: W("op.copyImageFromClipboard"),
|
|
1389
|
+
autoSelect: !0
|
|
1390
|
+
})
|
|
1391
|
+
};
|
|
1392
|
+
},
|
|
1393
|
+
copyTo(e, n) {
|
|
1394
|
+
let r = e.getWorksheet();
|
|
1395
|
+
if (t?.sheet !== r) throw Error("The image was not prepared for this sheet.");
|
|
1396
|
+
return r.getMovables()._insertNow(t.options), null;
|
|
1777
1397
|
},
|
|
1778
1398
|
getName: () => "Image"
|
|
1779
1399
|
}, !0;
|
|
@@ -1783,17 +1403,116 @@ var dr = class {
|
|
|
1783
1403
|
get isClipboardItem() {
|
|
1784
1404
|
return !0;
|
|
1785
1405
|
}
|
|
1786
|
-
},
|
|
1406
|
+
}, fr = class {
|
|
1407
|
+
constructor(t) {
|
|
1408
|
+
this._closed = !1, this._kind = t.kind, this._id = t.id, this._part = t.part, this._styles = t.styles, this._tabColor = t.tabColor ? this._styles.parseColor(t.tabColor) : null, this._transactions = t.transactions, this._workbook = t.workbook ?? null, this._container = t.container, this._emitter = new e(this, this._transactions);
|
|
1409
|
+
}
|
|
1410
|
+
getKind() {
|
|
1411
|
+
return this._kind;
|
|
1412
|
+
}
|
|
1413
|
+
getId() {
|
|
1414
|
+
return this._id;
|
|
1415
|
+
}
|
|
1416
|
+
getName() {
|
|
1417
|
+
return this._container.getName();
|
|
1418
|
+
}
|
|
1419
|
+
setName(e, t) {
|
|
1420
|
+
return this._assertOpen(), this._container.setName(e, t), this;
|
|
1421
|
+
}
|
|
1422
|
+
getVisibility() {
|
|
1423
|
+
return this._closed ? k.Visibility.VeryHidden : this._container.getVisibility();
|
|
1424
|
+
}
|
|
1425
|
+
setVisibility(e = !0, t) {
|
|
1426
|
+
let n;
|
|
1427
|
+
return this._assertOpen(), n = !0 === e ? k.Visibility.Visible : !1 === e ? k.Visibility.Hidden : e, this._container.setVisibility(n, t), this;
|
|
1428
|
+
}
|
|
1429
|
+
getIndex() {
|
|
1430
|
+
return this._container.getIndex();
|
|
1431
|
+
}
|
|
1432
|
+
setIndex(e, t) {
|
|
1433
|
+
return this._assertOpen(), this._container.setIndex(e, t), this;
|
|
1434
|
+
}
|
|
1435
|
+
getTabColor() {
|
|
1436
|
+
return this._tabColor;
|
|
1437
|
+
}
|
|
1438
|
+
setTabColor(e) {
|
|
1439
|
+
return this._assertOpen(), this._tabColor = typeof e == "string" ? this._styles.parseColor(e) : e ?? null, this._notify("onTabColorChange"), this;
|
|
1440
|
+
}
|
|
1441
|
+
getWorkbook() {
|
|
1442
|
+
return this._workbook;
|
|
1443
|
+
}
|
|
1444
|
+
async select(e) {
|
|
1445
|
+
return await this._container.requestSelect(e), this;
|
|
1446
|
+
}
|
|
1447
|
+
delete() {
|
|
1448
|
+
if (this._closed) return;
|
|
1449
|
+
let e = this._transactions.beginCommit({ description: G("op.deleteSheet", { name: this.getName() }) });
|
|
1450
|
+
try {
|
|
1451
|
+
try {
|
|
1452
|
+
this._notify("onBeforeDelete");
|
|
1453
|
+
} catch (e) {
|
|
1454
|
+
throw e instanceof Error ? e : new B(e?.message ?? G("error.sheet.modelDelete"));
|
|
1455
|
+
}
|
|
1456
|
+
this._notify("onDelete"), e.commit();
|
|
1457
|
+
} catch (t) {
|
|
1458
|
+
throw e.rollback(), t;
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
isDeleted() {
|
|
1462
|
+
return !this._container.isAttached();
|
|
1463
|
+
}
|
|
1464
|
+
addListeners(e, t) {
|
|
1465
|
+
return this._emitter.addListeners(e, t);
|
|
1466
|
+
}
|
|
1467
|
+
close() {
|
|
1468
|
+
this._closed ||= (this._notify("onClose"), this._emitter.close(), !0);
|
|
1469
|
+
}
|
|
1470
|
+
isClosed() {
|
|
1471
|
+
return this._closed;
|
|
1472
|
+
}
|
|
1473
|
+
_getPart() {
|
|
1474
|
+
return this._part;
|
|
1475
|
+
}
|
|
1476
|
+
_notify(e) {
|
|
1477
|
+
this._emitter.notify(e);
|
|
1478
|
+
}
|
|
1479
|
+
_assertOpen() {
|
|
1480
|
+
if (this._closed) throw Error(G("error.sheet.modelClosed"));
|
|
1481
|
+
}
|
|
1482
|
+
get [Symbol.toStringTag]() {
|
|
1483
|
+
return "[OpaqueSheet]";
|
|
1484
|
+
}
|
|
1485
|
+
toString() {
|
|
1486
|
+
return `[${this.getName() ?? "(untitled)"}]`;
|
|
1487
|
+
}
|
|
1488
|
+
get isISheet() {
|
|
1489
|
+
return !0;
|
|
1490
|
+
}
|
|
1491
|
+
get isIOpaqueSheet() {
|
|
1492
|
+
return !0;
|
|
1493
|
+
}
|
|
1494
|
+
};
|
|
1495
|
+
(rr ||= {}).Visibility = {
|
|
1496
|
+
Visible: "visible",
|
|
1497
|
+
Hidden: "hidden",
|
|
1498
|
+
VeryHidden: "veryHidden"
|
|
1499
|
+
};
|
|
1500
|
+
var X, pr = {
|
|
1787
1501
|
showFormulaBar: !0,
|
|
1788
1502
|
showTabs: !0,
|
|
1789
1503
|
tabRatio: 600,
|
|
1790
1504
|
showHorizontalScrollbar: !0,
|
|
1791
1505
|
showVerticalScrollbar: !0,
|
|
1792
1506
|
showStatusBar: !0,
|
|
1793
|
-
activeSheetId: 0
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1507
|
+
activeSheetId: 0,
|
|
1508
|
+
firstTab: 0,
|
|
1509
|
+
windowBounds: null,
|
|
1510
|
+
minimized: !1,
|
|
1511
|
+
visibility: rr.Visibility.Visible,
|
|
1512
|
+
autoFilterDateGrouping: !0
|
|
1513
|
+
}, mr = class {
|
|
1514
|
+
constructor(t) {
|
|
1515
|
+
this._id = R.uuidV4(), this._emitter = new e(this), this._state = { ...pr }, t?.json && this._fromJSON(t?.json);
|
|
1797
1516
|
}
|
|
1798
1517
|
getId() {
|
|
1799
1518
|
return this._id;
|
|
@@ -1841,6 +1560,39 @@ var dr = class {
|
|
|
1841
1560
|
let t = this._state, n = t.activeSheetId;
|
|
1842
1561
|
return t.activeSheetId = e, n !== e && this._emitter.notify("onViewChange"), this;
|
|
1843
1562
|
}
|
|
1563
|
+
getFirstTab() {
|
|
1564
|
+
return this._state.firstTab;
|
|
1565
|
+
}
|
|
1566
|
+
setFirstTab(e) {
|
|
1567
|
+
return this._set("firstTab", Math.max(0, Math.trunc(e)));
|
|
1568
|
+
}
|
|
1569
|
+
getWindowBounds() {
|
|
1570
|
+
return this._state.windowBounds;
|
|
1571
|
+
}
|
|
1572
|
+
setWindowBounds(e) {
|
|
1573
|
+
return this._set("windowBounds", e ? Object.freeze({ ...e }) : null);
|
|
1574
|
+
}
|
|
1575
|
+
isMinimized() {
|
|
1576
|
+
return this._state.minimized;
|
|
1577
|
+
}
|
|
1578
|
+
setMinimized(e) {
|
|
1579
|
+
return this._set("minimized", e);
|
|
1580
|
+
}
|
|
1581
|
+
getVisibility() {
|
|
1582
|
+
return this._state.visibility;
|
|
1583
|
+
}
|
|
1584
|
+
setVisibility(e) {
|
|
1585
|
+
return this._set("visibility", e);
|
|
1586
|
+
}
|
|
1587
|
+
isAutoFilterDateGrouping() {
|
|
1588
|
+
return this._state.autoFilterDateGrouping;
|
|
1589
|
+
}
|
|
1590
|
+
setAutoFilterDateGrouping(e) {
|
|
1591
|
+
return this._set("autoFilterDateGrouping", e);
|
|
1592
|
+
}
|
|
1593
|
+
_set(e, t) {
|
|
1594
|
+
return this._state[e] === t || (this._state[e] = t, this._emitter.notify("onViewChange")), this;
|
|
1595
|
+
}
|
|
1844
1596
|
addListeners(e, t) {
|
|
1845
1597
|
return this._emitter.addListeners(e, t);
|
|
1846
1598
|
}
|
|
@@ -1848,7 +1600,7 @@ var dr = class {
|
|
|
1848
1600
|
let e = {}, t = Object.keys(this._state), n = t.length;
|
|
1849
1601
|
for (let r = 0; r < n; r++) {
|
|
1850
1602
|
let n = t[r], i = this._state[n];
|
|
1851
|
-
i != null && i !==
|
|
1603
|
+
i != null && i !== pr[n] && (e[n] = i);
|
|
1852
1604
|
}
|
|
1853
1605
|
return Object.keys(e).length === 0 && (e = null), e;
|
|
1854
1606
|
}
|
|
@@ -1858,7 +1610,7 @@ var dr = class {
|
|
|
1858
1610
|
}
|
|
1859
1611
|
update(e, t = !0) {
|
|
1860
1612
|
this._state = {
|
|
1861
|
-
...
|
|
1613
|
+
...pr,
|
|
1862
1614
|
...this._state,
|
|
1863
1615
|
...e
|
|
1864
1616
|
}, t && this._emitter.notify("onViewChange");
|
|
@@ -1873,18 +1625,18 @@ var dr = class {
|
|
|
1873
1625
|
get isIWorkbookView() {
|
|
1874
1626
|
return !0;
|
|
1875
1627
|
}
|
|
1876
|
-
},
|
|
1628
|
+
}, hr = Object.freeze({
|
|
1877
1629
|
structure: !1,
|
|
1878
1630
|
windows: !1,
|
|
1879
|
-
revision: !
|
|
1631
|
+
revision: !0,
|
|
1880
1632
|
password: null,
|
|
1881
1633
|
revisionsPassword: null
|
|
1882
|
-
}),
|
|
1634
|
+
}), gr = class extends kt {
|
|
1883
1635
|
isWindowsAllowed() {
|
|
1884
1636
|
return this._isPropertyAllowed("windows");
|
|
1885
1637
|
}
|
|
1886
1638
|
isRevisionAllowed() {
|
|
1887
|
-
return this._isPropertyAllowed("revision");
|
|
1639
|
+
return this.isLocked() && this._properties?.revision === void 0 ? !this._isReadOnly : this._isPropertyAllowed("revision");
|
|
1888
1640
|
}
|
|
1889
1641
|
isStructureAllowed() {
|
|
1890
1642
|
return this._isPropertyAllowed("structure");
|
|
@@ -1901,7 +1653,7 @@ var dr = class {
|
|
|
1901
1653
|
let n = Object.keys(t), r = n.length;
|
|
1902
1654
|
for (let i = 0; i < r; i++) {
|
|
1903
1655
|
let r = n[i], a = t[r];
|
|
1904
|
-
a != null && a !==
|
|
1656
|
+
a != null && a !== hr[r] && (e[r] = a);
|
|
1905
1657
|
}
|
|
1906
1658
|
}
|
|
1907
1659
|
return super._toJSON(e);
|
|
@@ -1913,12 +1665,207 @@ var dr = class {
|
|
|
1913
1665
|
return !0;
|
|
1914
1666
|
}
|
|
1915
1667
|
};
|
|
1916
|
-
|
|
1668
|
+
(X ||= {}).Type = {
|
|
1669
|
+
Number: "number",
|
|
1670
|
+
Boolean: "boolean",
|
|
1671
|
+
Date: "date",
|
|
1672
|
+
String: "string",
|
|
1673
|
+
Float: "float"
|
|
1674
|
+
};
|
|
1675
|
+
var _r = (e) => {
|
|
1676
|
+
if (typeof e == "string") return {
|
|
1677
|
+
type: X.Type.String,
|
|
1678
|
+
value: e
|
|
1679
|
+
};
|
|
1680
|
+
if (typeof e == "boolean") return {
|
|
1681
|
+
type: X.Type.Boolean,
|
|
1682
|
+
value: e
|
|
1683
|
+
};
|
|
1684
|
+
if (typeof e == "number") {
|
|
1685
|
+
if (!Number.isFinite(e)) throw Error("A custom property value must be a finite number.");
|
|
1686
|
+
return {
|
|
1687
|
+
type: Number.isInteger(e) && e >= -2147483648 && e <= 2147483647 ? X.Type.Number : X.Type.Float,
|
|
1688
|
+
value: e
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1691
|
+
if (e instanceof Date) {
|
|
1692
|
+
if (isNaN(e.getTime())) throw Error("A custom property value must be a valid date.");
|
|
1693
|
+
return {
|
|
1694
|
+
type: X.Type.Date,
|
|
1695
|
+
value: e.toISOString()
|
|
1696
|
+
};
|
|
1697
|
+
}
|
|
1698
|
+
throw Error("A custom property value must be a string, number, boolean or Date.");
|
|
1699
|
+
}, vr = class {
|
|
1700
|
+
constructor(e, t) {
|
|
1701
|
+
this._json = e, this._owner = t;
|
|
1702
|
+
}
|
|
1703
|
+
getKey() {
|
|
1704
|
+
return this._json.key;
|
|
1705
|
+
}
|
|
1706
|
+
getType() {
|
|
1707
|
+
return this._json.type;
|
|
1708
|
+
}
|
|
1709
|
+
getLinkTarget() {
|
|
1710
|
+
return this._json.linkTarget ?? null;
|
|
1711
|
+
}
|
|
1712
|
+
getValue() {
|
|
1713
|
+
let { type: e, value: t } = this._json;
|
|
1714
|
+
return e === X.Type.Date ? new Date(t) : t;
|
|
1715
|
+
}
|
|
1716
|
+
setValue(e) {
|
|
1717
|
+
this._owner._assertCustomEditable(this), this._json = {
|
|
1718
|
+
...this._json,
|
|
1719
|
+
..._r(e)
|
|
1720
|
+
};
|
|
1721
|
+
}
|
|
1722
|
+
delete() {
|
|
1723
|
+
this._owner._removeCustom(this);
|
|
1724
|
+
}
|
|
1725
|
+
toJSON() {
|
|
1726
|
+
return { ...this._json };
|
|
1727
|
+
}
|
|
1728
|
+
}, yr = class {
|
|
1729
|
+
constructor(e) {
|
|
1730
|
+
this._json = {}, this._custom = [], this._assertOpen = e;
|
|
1731
|
+
}
|
|
1732
|
+
_text(e) {
|
|
1733
|
+
return this._json[e] ?? null;
|
|
1734
|
+
}
|
|
1735
|
+
_setText(e, t) {
|
|
1736
|
+
return this._assertOpen(), t == null || t === "" ? delete this._json[e] : this._json[e] = t, this;
|
|
1737
|
+
}
|
|
1738
|
+
getAuthor() {
|
|
1739
|
+
return this._text("author");
|
|
1740
|
+
}
|
|
1741
|
+
setAuthor(e) {
|
|
1742
|
+
return this._setText("author", e);
|
|
1743
|
+
}
|
|
1744
|
+
getCategory() {
|
|
1745
|
+
return this._text("category");
|
|
1746
|
+
}
|
|
1747
|
+
setCategory(e) {
|
|
1748
|
+
return this._setText("category", e);
|
|
1749
|
+
}
|
|
1750
|
+
getComments() {
|
|
1751
|
+
return this._text("comments");
|
|
1752
|
+
}
|
|
1753
|
+
setComments(e) {
|
|
1754
|
+
return this._setText("comments", e);
|
|
1755
|
+
}
|
|
1756
|
+
getCompany() {
|
|
1757
|
+
return this._text("company");
|
|
1758
|
+
}
|
|
1759
|
+
setCompany(e) {
|
|
1760
|
+
return this._setText("company", e);
|
|
1761
|
+
}
|
|
1762
|
+
getContentStatus() {
|
|
1763
|
+
return this._text("contentStatus");
|
|
1764
|
+
}
|
|
1765
|
+
setContentStatus(e) {
|
|
1766
|
+
return this._setText("contentStatus", e);
|
|
1767
|
+
}
|
|
1768
|
+
getCreationDate() {
|
|
1769
|
+
let e = this._json.creationDate;
|
|
1770
|
+
if (!e) return null;
|
|
1771
|
+
let t = new Date(e);
|
|
1772
|
+
return isNaN(t.getTime()) ? null : t;
|
|
1773
|
+
}
|
|
1774
|
+
getKeywords() {
|
|
1775
|
+
return this._text("keywords");
|
|
1776
|
+
}
|
|
1777
|
+
setKeywords(e) {
|
|
1778
|
+
return this._setText("keywords", e);
|
|
1779
|
+
}
|
|
1780
|
+
getLastAuthor() {
|
|
1781
|
+
return this._json.lastAuthor ?? null;
|
|
1782
|
+
}
|
|
1783
|
+
getManager() {
|
|
1784
|
+
return this._text("manager");
|
|
1785
|
+
}
|
|
1786
|
+
setManager(e) {
|
|
1787
|
+
return this._setText("manager", e);
|
|
1788
|
+
}
|
|
1789
|
+
getRevisionNumber() {
|
|
1790
|
+
return this._json.revisionNumber ?? null;
|
|
1791
|
+
}
|
|
1792
|
+
setRevisionNumber(e) {
|
|
1793
|
+
return this._assertOpen(), e != null && Number.isFinite(e) ? this._json.revisionNumber = e : delete this._json.revisionNumber, this;
|
|
1794
|
+
}
|
|
1795
|
+
getSubject() {
|
|
1796
|
+
return this._text("subject");
|
|
1797
|
+
}
|
|
1798
|
+
setSubject(e) {
|
|
1799
|
+
return this._setText("subject", e);
|
|
1800
|
+
}
|
|
1801
|
+
getTitle() {
|
|
1802
|
+
return this._text("title");
|
|
1803
|
+
}
|
|
1804
|
+
setTitle(e) {
|
|
1805
|
+
return this._setText("title", e);
|
|
1806
|
+
}
|
|
1807
|
+
getCustom() {
|
|
1808
|
+
return this._custom.slice();
|
|
1809
|
+
}
|
|
1810
|
+
getCustomProperty(e) {
|
|
1811
|
+
let t = e.toLowerCase();
|
|
1812
|
+
return this._custom.find((e) => e.getKey().toLowerCase() === t);
|
|
1813
|
+
}
|
|
1814
|
+
addCustomProperty(e, t) {
|
|
1815
|
+
if (this._assertOpen(), typeof e != "string" || e === "") throw Error("A custom property needs a name.");
|
|
1816
|
+
let n = this.getCustomProperty(e);
|
|
1817
|
+
if (n) return n.setValue(t), n;
|
|
1818
|
+
let r = new vr({
|
|
1819
|
+
key: e,
|
|
1820
|
+
..._r(t)
|
|
1821
|
+
}, this);
|
|
1822
|
+
return this._custom.push(r), r;
|
|
1823
|
+
}
|
|
1824
|
+
deleteAllCustomProperties() {
|
|
1825
|
+
this._assertOpen(), this._custom = [];
|
|
1826
|
+
}
|
|
1827
|
+
_assertCustomEditable(e) {
|
|
1828
|
+
if (this._assertOpen(), !this._custom.includes(e)) throw Error("The custom property has been deleted.");
|
|
1829
|
+
}
|
|
1830
|
+
_removeCustom(e) {
|
|
1831
|
+
this._assertCustomEditable(e), this._custom = this._custom.filter((t) => t !== e);
|
|
1832
|
+
}
|
|
1833
|
+
fromJSON(e) {
|
|
1834
|
+
let { custom: t, ...n } = e ?? {};
|
|
1835
|
+
this._json = n, this._custom = (t ?? []).map((e) => new vr({ ...e }, this));
|
|
1836
|
+
}
|
|
1837
|
+
toJSON() {
|
|
1838
|
+
let e = { ...this._json };
|
|
1839
|
+
return this._custom.length > 0 && (e.custom = this._custom.map((e) => e.toJSON())), e;
|
|
1840
|
+
}
|
|
1841
|
+
};
|
|
1842
|
+
function br(e) {
|
|
1917
1843
|
return G("error.workbook.invalidSheetKey", { key: e });
|
|
1918
1844
|
}
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1845
|
+
function xr(e) {
|
|
1846
|
+
return G("error.workbook.sheetNameNotFound", { sheetName: e });
|
|
1847
|
+
}
|
|
1848
|
+
function Sr(e, t) {
|
|
1849
|
+
return G(t === "chart" ? "error.workbook.sheetIsChart" : t === "macro" ? "error.workbook.sheetIsMacro" : "error.workbook.sheetIsDialog", { sheetName: e });
|
|
1850
|
+
}
|
|
1851
|
+
function Cr(e, t) {
|
|
1852
|
+
return t === "chart" ? G("error.workbook.selectedIsChart", { sheetName: e }) : t === "macro" ? G("error.workbook.selectedIsMacro", { sheetName: e }) : t === "dialog" ? G("error.workbook.selectedIsDialog", { sheetName: e }) : G("error.workbook.noWorksheet");
|
|
1853
|
+
}
|
|
1854
|
+
var wr = class extends ke {
|
|
1855
|
+
constructor(e, t, n, r) {
|
|
1856
|
+
super(), this._add = e, this._get = t, this._addListeners = n, this._getSelected = r;
|
|
1857
|
+
}
|
|
1858
|
+
getActive() {
|
|
1859
|
+
return this._getSelected();
|
|
1860
|
+
}
|
|
1861
|
+
getAt(e) {
|
|
1862
|
+
return this.getItems()[e] ?? null;
|
|
1863
|
+
}
|
|
1864
|
+
getByIndex(e) {
|
|
1865
|
+
return this.getItems()[e] ?? null;
|
|
1866
|
+
}
|
|
1867
|
+
getAll() {
|
|
1868
|
+
return this.getItems();
|
|
1922
1869
|
}
|
|
1923
1870
|
add(e) {
|
|
1924
1871
|
return this._add(e);
|
|
@@ -1932,7 +1879,7 @@ var wr = class extends ge {
|
|
|
1932
1879
|
addListeners(e, t) {
|
|
1933
1880
|
return this._addListeners(e, t);
|
|
1934
1881
|
}
|
|
1935
|
-
get
|
|
1882
|
+
get isIWorksheetCollection() {
|
|
1936
1883
|
return !0;
|
|
1937
1884
|
}
|
|
1938
1885
|
}, Tr = /* @__PURE__ */ new RegExp(/[\\/\\*?:[\]]+/), Er = /* @__PURE__ */ new RegExp(/\(((\d+)(?!.*\d))\)$/, "g");
|
|
@@ -1942,9 +1889,9 @@ function Dr(e) {
|
|
|
1942
1889
|
}
|
|
1943
1890
|
function Or(e, t) {
|
|
1944
1891
|
return {
|
|
1945
|
-
...
|
|
1946
|
-
|
|
1947
|
-
toString: () =>
|
|
1892
|
+
...At,
|
|
1893
|
+
getWorksheet: () => null,
|
|
1894
|
+
toString: () => ye(e, t)
|
|
1948
1895
|
};
|
|
1949
1896
|
}
|
|
1950
1897
|
function kr(e, t = !1) {
|
|
@@ -1967,7 +1914,7 @@ function kr(e, t = !1) {
|
|
|
1967
1914
|
}
|
|
1968
1915
|
return e;
|
|
1969
1916
|
}
|
|
1970
|
-
var Ar, jr
|
|
1917
|
+
var Ar, jr = "workbook.activeSheet", Mr = class e extends l {
|
|
1971
1918
|
constructor(e, t, n, r) {
|
|
1972
1919
|
super(e, t, r), this._workbook = n;
|
|
1973
1920
|
}
|
|
@@ -1978,23 +1925,24 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
1978
1925
|
let r = this._options;
|
|
1979
1926
|
return n && (r = {
|
|
1980
1927
|
...this._options,
|
|
1981
|
-
getOptions:
|
|
1928
|
+
getOptions: T(this._options?.getOptions, n)
|
|
1982
1929
|
}), new e(t, this._internal, this._workbook, r);
|
|
1983
1930
|
}
|
|
1984
1931
|
_createRange(e, t) {
|
|
1985
|
-
let n = e ? { ...e } : null, r = n ?
|
|
1986
|
-
if (!
|
|
1987
|
-
|
|
1932
|
+
let n = e ? { ...e } : null, r = this._workbook, i = n ? r._getSheetRef(n.scope, k.Visibility.VeryHidden) : null;
|
|
1933
|
+
if (i && !i.sheet.isIWorksheet) throw new B(Sr(i.name, i.sheet.getKind()));
|
|
1934
|
+
if (!i) {
|
|
1935
|
+
let e = r._anchorWorksheet();
|
|
1988
1936
|
return delete n?.scope, Or(n, n ? {
|
|
1989
|
-
scope:
|
|
1937
|
+
scope: g,
|
|
1990
1938
|
...e.getEntireRange().getCoords()
|
|
1991
1939
|
} : null);
|
|
1992
1940
|
}
|
|
1993
|
-
let
|
|
1994
|
-
return t && (
|
|
1941
|
+
let a = this._options;
|
|
1942
|
+
return t && (a = {
|
|
1995
1943
|
...this._options,
|
|
1996
|
-
getOptions:
|
|
1997
|
-
}), new
|
|
1944
|
+
getOptions: T(this._options.getOptions, t)
|
|
1945
|
+
}), new Nr(e, j(i.sheet), this._workbook, a);
|
|
1998
1946
|
}
|
|
1999
1947
|
async select(e) {
|
|
2000
1948
|
let t = [], n = null, r = this.getCoords();
|
|
@@ -2002,8 +1950,8 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2002
1950
|
let i = r[e];
|
|
2003
1951
|
i && (n ||= i.scope, i && i.scope === n && t.push(i));
|
|
2004
1952
|
}
|
|
2005
|
-
n ||= this._workbook.
|
|
2006
|
-
let i = this._workbook.
|
|
1953
|
+
n ||= this._workbook.getWorksheet().getName();
|
|
1954
|
+
let i = this._workbook.getWorksheets().getByName(n);
|
|
2007
1955
|
if (!i) return;
|
|
2008
1956
|
let a = await i.getRanges(t).select(e), o = this._workbook._rangesAddressToCoords(a.getCoords());
|
|
2009
1957
|
return this._createRanges(o);
|
|
@@ -2018,15 +1966,15 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2018
1966
|
}
|
|
2019
1967
|
getAddress(e) {
|
|
2020
1968
|
let t = this._internal.getSheet(), n = t.getEntireRange().getCoords();
|
|
2021
|
-
return
|
|
1969
|
+
return xe(this.getCoords(), {
|
|
2022
1970
|
...n,
|
|
2023
1971
|
scope: t.getName()
|
|
2024
|
-
},
|
|
1972
|
+
}, ye, Ee, e);
|
|
2025
1973
|
}
|
|
2026
1974
|
toString() {
|
|
2027
1975
|
return this.getAddress();
|
|
2028
1976
|
}
|
|
2029
|
-
},
|
|
1977
|
+
}, Nr = class e extends st {
|
|
2030
1978
|
constructor(e, t, n, r) {
|
|
2031
1979
|
super(e, t, r), this._workbook = n;
|
|
2032
1980
|
}
|
|
@@ -2034,17 +1982,17 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2034
1982
|
let n = this._options;
|
|
2035
1983
|
return t && (n = {
|
|
2036
1984
|
...this._options,
|
|
2037
|
-
getOptions:
|
|
2038
|
-
}), new
|
|
1985
|
+
getOptions: T(this._options?.getOptions, t)
|
|
1986
|
+
}), new Mr(e, this._internal, this._workbook, n);
|
|
2039
1987
|
}
|
|
2040
1988
|
_createRange(t, n) {
|
|
2041
1989
|
let r = this._internal;
|
|
2042
|
-
if (!t) return
|
|
2043
|
-
if (r.validateCoords(t), r.getSheet().isClosed()) return
|
|
1990
|
+
if (!t) return Tt(r.getSheet(), r.getSheet().getEntireCoords());
|
|
1991
|
+
if (r.validateCoords(t), r.getSheet().isClosed()) return Tt(null, r.getSheet().getEntireCoords(), t);
|
|
2044
1992
|
let i = this._options;
|
|
2045
1993
|
return n && (i = {
|
|
2046
1994
|
...this._options,
|
|
2047
|
-
getOptions:
|
|
1995
|
+
getOptions: T(this._options?.getOptions, n)
|
|
2048
1996
|
}), new e(t, this._internal, this._workbook, i);
|
|
2049
1997
|
}
|
|
2050
1998
|
addListener(e, t) {
|
|
@@ -2057,7 +2005,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2057
2005
|
}
|
|
2058
2006
|
getAddress(e) {
|
|
2059
2007
|
let t = this._internal.getSheet(), n = t?.getEntireRange().getCoords() ?? null;
|
|
2060
|
-
return
|
|
2008
|
+
return ye(this.getCoords(), {
|
|
2061
2009
|
...n,
|
|
2062
2010
|
scope: t.getName()
|
|
2063
2011
|
});
|
|
@@ -2065,15 +2013,15 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2065
2013
|
toString() {
|
|
2066
2014
|
return this.getAddress();
|
|
2067
2015
|
}
|
|
2068
|
-
},
|
|
2069
|
-
constructor(
|
|
2070
|
-
this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new
|
|
2016
|
+
}, Pr = (e) => !!e && typeof e == "object" && typeof e.getOrigin == "function", Fr = class {
|
|
2017
|
+
constructor(t) {
|
|
2018
|
+
this._isLoadingSheets = !1, this._lastTransactionUUID = null, this._starting = null, this._closed = !1, this._listenerOriginProvider = null, this._listenerOrigin = null, this._lastOriginName = null, this._initializing = !0, this._pivotCaches = [], this._pivotTableCollection = new we(() => {
|
|
2071
2019
|
let e = [];
|
|
2072
|
-
for (let t of this.
|
|
2020
|
+
for (let t of this.getWorksheets()) e.push(...t.getPivotTables());
|
|
2073
2021
|
return e;
|
|
2074
|
-
}), this._people = new
|
|
2022
|
+
}), this._people = new or(), this._commentCollection = new ht(null, (e, t, n) => {
|
|
2075
2023
|
let r = [];
|
|
2076
|
-
for (let i of this.
|
|
2024
|
+
for (let i of this.getWorksheets()) r.push(...i.getComments().getItems(e ? {
|
|
2077
2025
|
address: e,
|
|
2078
2026
|
ignoreHidden: t,
|
|
2079
2027
|
fullyContained: n
|
|
@@ -2084,23 +2032,25 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2084
2032
|
return r;
|
|
2085
2033
|
}, (e, t) => this.addListeners({ onSheetsChange: e.onCollectionChange ? () => {
|
|
2086
2034
|
e.onCollectionChange(this._commentCollection);
|
|
2087
|
-
} : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this.
|
|
2088
|
-
|
|
2089
|
-
|
|
2035
|
+
} : void 0 }, t)), this._isDate1904 = !1, this._codeName = null, this._updateLinks = null, this._documentProperties = new yr(() => {
|
|
2036
|
+
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
2037
|
+
}), this._locale = null, this._localeOverrides = null;
|
|
2038
|
+
let n = typeof t == "string" ? { origin: t } : { ...t }, r = n.origin;
|
|
2039
|
+
this._ownOriginProvider = !Pr(r), this._originProvider = Pr(r) ? r : new Dn(typeof r == "string" ? new K(null, { name: r }) : r ?? new K(null)), delete n.origin, this._bindOrigin(this._originProvider.getOrigin()), this._listenerOriginProvider = this._originProvider.addListeners({ onOriginChange: () => this._onOriginChange() });
|
|
2090
2040
|
let a = n.json;
|
|
2091
|
-
delete n.json, this._transactions = n.transactions ?? new
|
|
2041
|
+
delete n.json, this._transactions = n.transactions ?? new i(), this._id = this._transactions.create(), this._ownTransactions = !n.transactions, this._emitter = new e(this, this._transactions), this._runtime = n.runtime ?? new s("Workbook Runtime", {
|
|
2092
2042
|
isDate1904: () => this._isDate1904,
|
|
2093
2043
|
getNow: () => this._transactions.getCurrentCommit().getTimestamp(),
|
|
2094
|
-
getLocale: () => this._locale ??
|
|
2044
|
+
getLocale: () => this._locale ?? b() ?? be(),
|
|
2095
2045
|
getLocaleOverrides: () => this._localeOverrides
|
|
2096
|
-
}), this._listenerLanguage =
|
|
2046
|
+
}), this._listenerLanguage = fn.addChangeListener(() => {
|
|
2097
2047
|
this._closed || this._notifyAllChange();
|
|
2098
2048
|
});
|
|
2099
|
-
let o = this,
|
|
2049
|
+
let o = this, c = this._beginCommit({ description: W(a ? "op.openWorkbook" : "op.newWorkbook") });
|
|
2100
2050
|
try {
|
|
2101
|
-
this._strings = n.strings ?? new
|
|
2102
|
-
let e = n.
|
|
2103
|
-
e ||= (e) => new
|
|
2051
|
+
this._strings = n.strings ?? new Nt(), this._ownStrings = !n.strings, this._resources = n.resources ?? new Le(), this._ownResources = !n.resources, this._createSheetName = n.createSheetNameCallback ?? Dr;
|
|
2052
|
+
let e = n.createWorksheetCallback;
|
|
2053
|
+
e ||= (e) => new A(e), this._sheetOnNameChange = /* @__PURE__ */ new Map(), this._sheetOnVisibilityChange = /* @__PURE__ */ new Map(), this._sheetOnIndexChange = /* @__PURE__ */ new Map(), this._createSheet = (t, n, r, i, a, s, c) => {
|
|
2104
2054
|
let l = null, u = {
|
|
2105
2055
|
runtime: o._runtime,
|
|
2106
2056
|
readonly: o._options.readonly ?? !1,
|
|
@@ -2119,7 +2069,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2119
2069
|
l = e, o._addSheetRef({
|
|
2120
2070
|
name: n,
|
|
2121
2071
|
id: t,
|
|
2122
|
-
visibility: r ??
|
|
2072
|
+
visibility: r ?? k.Visibility.Visible,
|
|
2123
2073
|
sheetId: a,
|
|
2124
2074
|
sheet: e
|
|
2125
2075
|
}, i);
|
|
@@ -2136,7 +2086,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2136
2086
|
},
|
|
2137
2087
|
getVisibility: () => {
|
|
2138
2088
|
let e = o._getSheetRef(l);
|
|
2139
|
-
return e ? e.visibility :
|
|
2089
|
+
return e ? e.visibility : k.Visibility.Visible;
|
|
2140
2090
|
},
|
|
2141
2091
|
setVisibility: (e, t) => {
|
|
2142
2092
|
o._setSheetVisibility(l, e, t);
|
|
@@ -2147,40 +2097,36 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2147
2097
|
duplicate: () => o._duplicateSheet(l),
|
|
2148
2098
|
getIndex: () => {
|
|
2149
2099
|
let e = o._getSheetRef(l);
|
|
2150
|
-
return e ? o._getOffsetForId(e.id, o._getSheetRefs(
|
|
2100
|
+
return e ? o._getOffsetForId(e.id, o._getSheetRefs(k.Visibility.VeryHidden)) : i;
|
|
2151
2101
|
},
|
|
2152
2102
|
setIndex: (e, t) => {
|
|
2153
|
-
let n = o._getSheetRef(l,
|
|
2103
|
+
let n = o._getSheetRef(l, k.Visibility.VeryHidden);
|
|
2154
2104
|
return !!n && (o._moveSheet(n, e, t), !0);
|
|
2155
2105
|
},
|
|
2156
2106
|
setIndexCallback: (e) => {
|
|
2157
2107
|
o._sheetOnIndexChange.set(t, e);
|
|
2158
2108
|
},
|
|
2159
|
-
requestSelect:
|
|
2160
|
-
source: o,
|
|
2161
|
-
params: l,
|
|
2162
|
-
async: !0
|
|
2163
|
-
}), o.getSelectedSheet() === l)
|
|
2109
|
+
requestSelect: () => o._requestSelect(l)
|
|
2164
2110
|
}
|
|
2165
2111
|
};
|
|
2166
2112
|
return s && (u.json = s), c !== void 0 && (u.uid = () => c), l = e(u, n, i, r), l;
|
|
2167
|
-
}, this._namedTableSource = new
|
|
2168
|
-
getSheets: () => o._sheets ? o.
|
|
2113
|
+
}, this._namedTableSource = new Me({
|
|
2114
|
+
getSheets: () => o._sheets ? o.getWorksheets().getItems() : R.EmptyArray,
|
|
2169
2115
|
addSheetsListener: (e, t) => o.addListeners({ onSheetsChange: e }, t)
|
|
2170
|
-
}), this._names = n.names ?? new
|
|
2116
|
+
}), this._names = n.names ?? new De({
|
|
2171
2117
|
addressToRanges: (e) => o.getRanges(e),
|
|
2172
|
-
getCurrentScope: () => o.
|
|
2118
|
+
getCurrentScope: () => o.getSelectedWorksheet()?.getName() ?? null,
|
|
2173
2119
|
isReadOnly: () => (o._options.readonly ?? !1) || o._isStructureProtected(),
|
|
2174
2120
|
transactions: o._transactions,
|
|
2175
2121
|
getSources: () => o._calculation ? [o._calculation.getNamedFormulas(), o._namedTableSource] : R.EmptyArray
|
|
2176
|
-
}), this._ownNames = !n.names, this._calculation = n.calculation ?? new
|
|
2122
|
+
}), this._ownNames = !n.names, this._calculation = n.calculation ?? new m({
|
|
2177
2123
|
runtime: o._runtime,
|
|
2178
2124
|
functions: n.functions,
|
|
2179
2125
|
json: a?.calc,
|
|
2180
2126
|
isNamesReadOnly: () => o._isStructureProtected(),
|
|
2181
2127
|
getActiveCell: () => {
|
|
2182
|
-
let e = o.
|
|
2183
|
-
return t ? {
|
|
2128
|
+
let e = o.getSelectedWorksheet(), t = e?.getSelectedRange()?.getCoords();
|
|
2129
|
+
return e && t ? {
|
|
2184
2130
|
rowIndex: t.rowStart,
|
|
2185
2131
|
colIndex: t.colStart,
|
|
2186
2132
|
scope: e.getId()
|
|
@@ -2192,19 +2138,19 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2192
2138
|
getSheetIndex: (e) => {
|
|
2193
2139
|
if (e === void 0) {
|
|
2194
2140
|
let e = o.getSelectedSheet();
|
|
2195
|
-
return e ? this._getSheetRefs(
|
|
2141
|
+
return e ? this._getSheetRefs(k.Visibility.VeryHidden).findIndex((t) => t.sheet === e) : -1;
|
|
2196
2142
|
}
|
|
2197
|
-
let t = this._getSheetRefs(
|
|
2143
|
+
let t = this._getSheetRefs(k.Visibility.VeryHidden);
|
|
2198
2144
|
e = e.toLowerCase();
|
|
2199
2145
|
let n = t.length;
|
|
2200
2146
|
for (let r = 0; r < n; r++) if (t[r].name.toLowerCase() === e) return r;
|
|
2201
2147
|
try {
|
|
2202
|
-
|
|
2203
|
-
let t = this._names.getItems(
|
|
2148
|
+
Ir.address = e;
|
|
2149
|
+
let t = this._names.getItems(Ir);
|
|
2204
2150
|
if (!t || t.length === 0) return -1;
|
|
2205
2151
|
let n = t[0].getRanges?.()?.getCoords()?.[0]?.scope;
|
|
2206
2152
|
if (!n) return -1;
|
|
2207
|
-
let r = this._getSheetRefs(
|
|
2153
|
+
let r = this._getSheetRefs(k.Visibility.VeryHidden);
|
|
2208
2154
|
n = n.toLowerCase();
|
|
2209
2155
|
let i = r.length;
|
|
2210
2156
|
for (let e = 0; e < i; e++) if (r[e].name.toLowerCase() === n) return e;
|
|
@@ -2213,7 +2159,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2213
2159
|
}
|
|
2214
2160
|
return -1;
|
|
2215
2161
|
},
|
|
2216
|
-
getSheetCount: () => o.
|
|
2162
|
+
getSheetCount: () => o._getSheetRefs(k.Visibility.VeryHidden).length,
|
|
2217
2163
|
externalBooks: a?.externalBooks,
|
|
2218
2164
|
externalBookResolver: n.externalBookResolver,
|
|
2219
2165
|
namedCollection: o._names,
|
|
@@ -2221,22 +2167,29 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2221
2167
|
transactions: o._transactions,
|
|
2222
2168
|
names: a?.names
|
|
2223
2169
|
}), this._ownCalculation = !n.calculation, this._scripts = this._createScripts(a?.modules), this._ownNames = !n.names, this._options = Object.freeze({ ...n });
|
|
2224
|
-
let t = a?.sheets?.length ? a.sheets.map((e) => e.name) : [this._createSheetName(0)], r = t.map((e) => e + "-" + R.uuidV4())
|
|
2225
|
-
|
|
2226
|
-
|
|
2170
|
+
let t = a?.sheets?.length ? a.sheets.map((e) => e.name) : [this._createSheetName(0)], r = t.map((e) => e + "-" + R.uuidV4()), i = (e) => {
|
|
2171
|
+
let t = a?.sheets?.[e]?.kind;
|
|
2172
|
+
return !!t && t !== k.Kind.Worksheet;
|
|
2173
|
+
};
|
|
2174
|
+
this._calculation._setSheets(t.map((e, t) => i(t) ? [
|
|
2175
|
+
r[t],
|
|
2176
|
+
e,
|
|
2177
|
+
!0
|
|
2178
|
+
] : [r[t], e]));
|
|
2179
|
+
let s = n.calcOnLoad ?? "auto", l = !1, u = (async () => {
|
|
2227
2180
|
try {
|
|
2228
|
-
if (this._ownCalculation &&
|
|
2181
|
+
if (this._ownCalculation && s !== "none" && (s === "full" || s === "auto" && !0 === a?.calc?.fullCalcOnLoad ? await this._calculation.calculate({ full: !0 }) : await this._calculation.start(), this._closed)) return;
|
|
2229
2182
|
await this._scripts.start();
|
|
2230
2183
|
} finally {
|
|
2231
|
-
|
|
2184
|
+
l = !0, this._starting = null;
|
|
2232
2185
|
}
|
|
2233
2186
|
})();
|
|
2234
|
-
|
|
2187
|
+
l || (this._starting = u), this._starting?.catch(() => {}), a ? this._fromJSON(a, r) : (this._initState(), this._addSheet(!1, t[0], null, r[0])), this._sheets = new wr((e) => o._addSheetOptions(e), (e, t) => {
|
|
2235
2188
|
if (e) {
|
|
2236
2189
|
let n = this._getSheetRef(e, t);
|
|
2237
|
-
return n ? [n.sheet] : R.EmptyArray;
|
|
2190
|
+
return n && Z(n) ? [n.sheet] : R.EmptyArray;
|
|
2238
2191
|
}
|
|
2239
|
-
return this.
|
|
2192
|
+
return this._getWorksheets(t);
|
|
2240
2193
|
}, (e, t) => {
|
|
2241
2194
|
let n = e.onCollectionChange, r = e.onInvalidated;
|
|
2242
2195
|
return o._emitter.addListeners({
|
|
@@ -2247,9 +2200,9 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2247
2200
|
r(o._sheets);
|
|
2248
2201
|
} : void 0
|
|
2249
2202
|
}, t);
|
|
2250
|
-
}), this._ownCalculation && (n.calcOnLoad ?? "auto") !== "none" && this._calculation.hydrateNames(), this._emitter.notify("onLoad"), this._ownTransactions ?
|
|
2203
|
+
}, () => o.getSelectedWorksheet()), this._ownCalculation && (n.calcOnLoad ?? "auto") !== "none" && this._calculation.hydrateNames(), this._emitter.notify("onLoad"), this._ownTransactions ? c.amend() : c.commit();
|
|
2251
2204
|
} catch (e) {
|
|
2252
|
-
throw
|
|
2205
|
+
throw c.rollback(), e;
|
|
2253
2206
|
}
|
|
2254
2207
|
this._initializing = !1;
|
|
2255
2208
|
}
|
|
@@ -2257,13 +2210,13 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2257
2210
|
let e = this._getSheetRefs();
|
|
2258
2211
|
for (let t = (e ? e.length : 0) - 1; t >= 0; t--);
|
|
2259
2212
|
let t = this._options;
|
|
2260
|
-
this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new
|
|
2213
|
+
this._isDate1904 = t.runtime?.isDate1904() ?? !1, this._locale = null, this._localeOverrides = null, this._theme = t.theme ?? new oe().getDefaultTheme(), this._styles = t?.styles ?? new _e(this._theme), this._ownStyles = !t.styles, this._styles.getTheme() || this._styles.setTheme(this.getTheme()), this._activeSheetOffset = 0, this.setView(new mr()), this._listenerProtection?.(), this._protection = new gr(void 0, this._options.readonly ?? !1), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
|
|
2261
2214
|
n._emitter.notify("onProtectionChange");
|
|
2262
2215
|
} });
|
|
2263
2216
|
let n = this;
|
|
2264
2217
|
this._transactionsRemoveListener = this._transactions.addStateListener(this._id, {
|
|
2265
2218
|
async onAfterStateChange(e, t, r, i, a) {
|
|
2266
|
-
let o = n._view, s = a?.[
|
|
2219
|
+
let o = n._view, s = a?.[jr], c = r ? s?.before : s?.after, l = s?.viewId === o.getId() && c != null, u = l ? c : o.getActiveSheetId(), d = l && t.getId() === n._lastTransactionUUID ? n._getSheetRef({ id: u }) : null;
|
|
2267
2220
|
d ? await d.sheet.select() : n._resyncActiveSheet(u, e), n._lastTransactionUUID = t.getId(), (r || i) && n._emitter.notify("onSheetsChange"), n._emitter.notify("onSelectedSheetChange"), n._emitter.notify("onViewChange");
|
|
2268
2221
|
},
|
|
2269
2222
|
onRestoreOrRevert() {
|
|
@@ -2366,6 +2319,14 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2366
2319
|
getTransactions() {
|
|
2367
2320
|
return this._transactions;
|
|
2368
2321
|
}
|
|
2322
|
+
getChanges(e) {
|
|
2323
|
+
let t = this._transactions, [n, r] = t.getLog(e ?? t.getCurrentCommit(!1).getId(), 2), i = [], a = this.getWorksheets().getItems({ visibility: k.Visibility.VeryHidden });
|
|
2324
|
+
for (let e = 0; e < a.length; e++) {
|
|
2325
|
+
let t = a[e];
|
|
2326
|
+
t instanceof A && i.push(...t._changeEventsOf(n, r ?? null));
|
|
2327
|
+
}
|
|
2328
|
+
return i;
|
|
2329
|
+
}
|
|
2369
2330
|
getStrings() {
|
|
2370
2331
|
return this._strings;
|
|
2371
2332
|
}
|
|
@@ -2402,40 +2363,76 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2402
2363
|
}
|
|
2403
2364
|
getSelectedSheet() {
|
|
2404
2365
|
let e = this._getSheetRef(this.getSelectedSheetIndex());
|
|
2405
|
-
return e ? e
|
|
2366
|
+
return e ? e.sheet : null;
|
|
2367
|
+
}
|
|
2368
|
+
getSelectedWorksheet() {
|
|
2369
|
+
let e = this._getSheetRef(this.getSelectedSheetIndex());
|
|
2370
|
+
return e && Z(e) ? e.sheet : null;
|
|
2371
|
+
}
|
|
2372
|
+
getActiveSheet() {
|
|
2373
|
+
return this.getSelectedWorksheet();
|
|
2374
|
+
}
|
|
2375
|
+
getActiveWorksheet() {
|
|
2376
|
+
return this.getSelectedWorksheet();
|
|
2406
2377
|
}
|
|
2407
|
-
|
|
2378
|
+
getSheets(e) {
|
|
2379
|
+
let t = this._getSheetRefs(e?.visibility ?? k.Visibility.Visible), n = Array(t.length);
|
|
2380
|
+
for (let e = 0; e < t.length; e++) n[e] = t[e].sheet;
|
|
2381
|
+
return n;
|
|
2382
|
+
}
|
|
2383
|
+
getSheet(e) {
|
|
2408
2384
|
if (e === void 0) return this.getSelectedSheet();
|
|
2409
2385
|
if (!e) throw Error(G("error.workbook.sheetNameNotProvided"));
|
|
2386
|
+
let t = this._getSheetRef(e);
|
|
2387
|
+
if (!t) throw new H(xr(e));
|
|
2388
|
+
return t.sheet;
|
|
2389
|
+
}
|
|
2390
|
+
getWorksheet(e, t = k.Visibility.Visible) {
|
|
2391
|
+
if (typeof e == "number") return this.getWorksheetAt(e, t);
|
|
2392
|
+
if (e === void 0) return this._requireSelectedWorksheet();
|
|
2393
|
+
if (!e) throw Error(G("error.workbook.sheetNameNotProvided"));
|
|
2410
2394
|
let n = this._getSheetRef(e, t);
|
|
2411
|
-
if (!n) throw new H(
|
|
2395
|
+
if (!n) throw new H(xr(e));
|
|
2396
|
+
if (!Z(n)) throw new H(Sr(n.name, n.sheet.getKind()));
|
|
2412
2397
|
return n.sheet;
|
|
2413
2398
|
}
|
|
2414
|
-
|
|
2415
|
-
let n = this.
|
|
2399
|
+
getWorksheetAt(e, t = k.Visibility.Visible) {
|
|
2400
|
+
let n = this._getWorksheets(t)[e];
|
|
2416
2401
|
if (!n) throw new H(function(e) {
|
|
2417
2402
|
return G("error.workbook.sheetIndexNotFound", { index: e });
|
|
2418
2403
|
}(e));
|
|
2419
|
-
return n
|
|
2404
|
+
return n;
|
|
2405
|
+
}
|
|
2406
|
+
_requireSelectedWorksheet() {
|
|
2407
|
+
let e = this.getSelectedWorksheet();
|
|
2408
|
+
if (e) return e;
|
|
2409
|
+
let t = this.getSelectedSheet();
|
|
2410
|
+
throw new B(Cr(t?.getName() ?? "", t?.getKind() ?? k.Kind.Worksheet));
|
|
2420
2411
|
}
|
|
2421
|
-
|
|
2412
|
+
_anchorWorksheet() {
|
|
2413
|
+
return this.getSelectedWorksheet() || (this._getWorksheets(k.Visibility.VeryHidden)[0] ?? null);
|
|
2414
|
+
}
|
|
2415
|
+
getWorksheets() {
|
|
2422
2416
|
return this._sheets;
|
|
2423
2417
|
}
|
|
2424
|
-
|
|
2425
|
-
return this.
|
|
2418
|
+
addWorksheet(e) {
|
|
2419
|
+
return this.getWorksheets().add(e);
|
|
2426
2420
|
}
|
|
2427
|
-
|
|
2421
|
+
_getWorksheets(e = k.Visibility.Visible) {
|
|
2428
2422
|
let t = this._getSheetRefs(e), n = [], r = t.length;
|
|
2429
|
-
for (let e = 0; e < r; e++)
|
|
2423
|
+
for (let e = 0; e < r; e++) {
|
|
2424
|
+
let r = t[e];
|
|
2425
|
+
Z(r) && n.push(r.sheet);
|
|
2426
|
+
}
|
|
2430
2427
|
return n;
|
|
2431
2428
|
}
|
|
2432
|
-
_getSheetRefs(e =
|
|
2429
|
+
_getSheetRefs(e = k.Visibility.Visible) {
|
|
2433
2430
|
let t = this._getState();
|
|
2434
|
-
return t ? e ===
|
|
2431
|
+
return t ? e === k.Visibility.Visible ? t.sheetRefsVisible : e === k.Visibility.Hidden ? t.sheetRefsVisibleAndHidden : e === k.Visibility.VeryHidden ? t.sheetRefsAll : R.EmptyArray : [];
|
|
2435
2432
|
}
|
|
2436
|
-
_getSheetRef(e, t =
|
|
2433
|
+
_getSheetRef(e, t = k.Visibility.Visible) {
|
|
2437
2434
|
let n = null;
|
|
2438
|
-
return typeof e == "number" ? this._getSheetRefs(t)[e] : (typeof e == "string" ? n = this._getState().refsByLowerCaseName.get(e.toLowerCase()) :
|
|
2435
|
+
return typeof e == "number" ? this._getSheetRefs(t)[e] : (typeof e == "string" ? n = this._getState().refsByLowerCaseName.get(e.toLowerCase()) : !0 === e?.isISheet ? n = this._getState().refsByInstance.get(e) : e?.id !== void 0 && (n = this._getState().refsById.get(e.id)), n);
|
|
2439
2436
|
}
|
|
2440
2437
|
_validateNewSheetName(e, t = !0) {
|
|
2441
2438
|
if (e == null) return e;
|
|
@@ -2506,15 +2503,60 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2506
2503
|
}
|
|
2507
2504
|
_addSheet(e, t = null, n = null, r) {
|
|
2508
2505
|
t = this._nextSheetName(t);
|
|
2509
|
-
let i = this._getState(), a = this._createSheet(i.lastId, t,
|
|
2506
|
+
let i = this._getState(), a = this._createSheet(i.lastId, t, k.Visibility.Visible, n, void 0, null, r);
|
|
2510
2507
|
if (!a) throw new B(G("error.workbook.sheetNameBlank"));
|
|
2511
2508
|
return e && (this._tellSheets(), this._emitter.notify("onSheetsChange")), a;
|
|
2512
2509
|
}
|
|
2510
|
+
_createOpaqueSheet(e, t, n, r, i, a, o, s, c) {
|
|
2511
|
+
let l = this, u = null;
|
|
2512
|
+
return u = new fr({
|
|
2513
|
+
kind: a,
|
|
2514
|
+
id: c ?? t + "-" + R.uuidV4(),
|
|
2515
|
+
part: o,
|
|
2516
|
+
tabColor: s,
|
|
2517
|
+
styles: this._styles,
|
|
2518
|
+
transactions: this._transactions,
|
|
2519
|
+
workbook: this,
|
|
2520
|
+
container: {
|
|
2521
|
+
getName: () => l._getSheetRef(u)?.name ?? t,
|
|
2522
|
+
setName: (e, t) => {
|
|
2523
|
+
l._setSheetName(u, e, t);
|
|
2524
|
+
},
|
|
2525
|
+
getVisibility: () => l._getSheetRef(u, k.Visibility.VeryHidden)?.visibility ?? k.Visibility.Visible,
|
|
2526
|
+
setVisibility: (e, t) => {
|
|
2527
|
+
l._setSheetVisibility(u, e, t);
|
|
2528
|
+
},
|
|
2529
|
+
getIndex: () => {
|
|
2530
|
+
let e = l._getSheetRef(u, k.Visibility.VeryHidden);
|
|
2531
|
+
return e ? l._getOffsetForId(e.id, l._getSheetRefs(k.Visibility.VeryHidden)) : -1;
|
|
2532
|
+
},
|
|
2533
|
+
setIndex: (e, t) => {
|
|
2534
|
+
let n = l._getSheetRef(u, k.Visibility.VeryHidden);
|
|
2535
|
+
n && l._moveSheet(n, e, t);
|
|
2536
|
+
},
|
|
2537
|
+
requestSelect: () => l._requestSelect(u),
|
|
2538
|
+
isAttached: () => !!l._getSheetRef(u, k.Visibility.VeryHidden)
|
|
2539
|
+
}
|
|
2540
|
+
}), this._sheetOnNameChange.set(e, () => u._notify("onNameChange")), this._sheetOnVisibilityChange.set(e, () => u._notify("onVisibilityChange")), this._sheetOnIndexChange.set(e, () => u._notify("onIndexChange")), this._addSheetRef({
|
|
2541
|
+
name: t,
|
|
2542
|
+
id: e,
|
|
2543
|
+
visibility: n ?? k.Visibility.Visible,
|
|
2544
|
+
sheetId: i,
|
|
2545
|
+
sheet: u
|
|
2546
|
+
}, r), u;
|
|
2547
|
+
}
|
|
2548
|
+
async _requestSelect(e) {
|
|
2549
|
+
return this._setSelectedSheet(e), await this._emitter.notify("onRequestSelect", {
|
|
2550
|
+
source: this,
|
|
2551
|
+
params: e,
|
|
2552
|
+
async: !0
|
|
2553
|
+
}), this.getSelectedSheet() === e;
|
|
2554
|
+
}
|
|
2513
2555
|
_updateSheetRefStates(e) {
|
|
2514
2556
|
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
2515
2557
|
if (!this._initializing && !this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
|
|
2516
2558
|
let t = e, n = [], r = [], i = t.length;
|
|
2517
|
-
for (let e = 0; e < i; e++) t[e].visibility ===
|
|
2559
|
+
for (let e = 0; e < i; e++) t[e].visibility === k.Visibility.Visible ? (n.push(t[e]), r.push(t[e])) : t[e].visibility === k.Visibility.Hidden && r.push(t[e]);
|
|
2518
2560
|
this._updateState({
|
|
2519
2561
|
sheetRefsAll: t,
|
|
2520
2562
|
sheetRefsVisible: n,
|
|
@@ -2524,7 +2566,11 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2524
2566
|
_tellSheets() {
|
|
2525
2567
|
if (this._isLoadingSheets) return;
|
|
2526
2568
|
let e = this._getState().sheetRefsAll;
|
|
2527
|
-
this._calculation._setSheets(e.map((e) => [e.sheet.getId(), e.name]
|
|
2569
|
+
this._calculation._setSheets(e.map((e) => Z(e) ? [e.sheet.getId(), e.name] : [
|
|
2570
|
+
e.sheet.getId(),
|
|
2571
|
+
e.name,
|
|
2572
|
+
!0
|
|
2573
|
+
]));
|
|
2528
2574
|
}
|
|
2529
2575
|
_addSheetRef(e, t = null) {
|
|
2530
2576
|
let n = this._getState(), r = n.sheetRefsAll, i = Math.max(0, Math.min(r.length, t ?? r.length)), a = [
|
|
@@ -2550,7 +2596,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2550
2596
|
p._validateDeleteSheet(e);
|
|
2551
2597
|
},
|
|
2552
2598
|
onDelete(e) {
|
|
2553
|
-
let t = p._getSheetRef(e,
|
|
2599
|
+
let t = p._getSheetRef(e, k.Visibility.VeryHidden);
|
|
2554
2600
|
if (!t) return;
|
|
2555
2601
|
let n = p._beginCommit({ description: G("op.deleteSheet", { name: t.name }) });
|
|
2556
2602
|
try {
|
|
@@ -2582,14 +2628,14 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2582
2628
|
throw n.rollback(), e;
|
|
2583
2629
|
}
|
|
2584
2630
|
}
|
|
2585
|
-
}), r =
|
|
2631
|
+
}, { transactional: !0 }), r = Z(e) ? e.sheet.addListeners({ onSelectionChange: (e) => {
|
|
2586
2632
|
p.getView().getActiveSheetId() === p._getSheetRef(e)?.id && p._emitter.notify("onSelectionChange", {
|
|
2587
2633
|
source: p,
|
|
2588
2634
|
params: e
|
|
2589
2635
|
});
|
|
2590
|
-
} }, { transactional: !1 });
|
|
2636
|
+
} }, { transactional: !1 }) : null;
|
|
2591
2637
|
m = new Map(n.listenersSheets), m.set(e.id, () => {
|
|
2592
|
-
t(), r();
|
|
2638
|
+
t(), r?.();
|
|
2593
2639
|
});
|
|
2594
2640
|
}
|
|
2595
2641
|
let h = n.lastId;
|
|
@@ -2606,7 +2652,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2606
2652
|
}
|
|
2607
2653
|
_recordActiveSheet(e, t, n) {
|
|
2608
2654
|
let r = this.getView().getId();
|
|
2609
|
-
e.setIntent(
|
|
2655
|
+
e.setIntent(jr, (e) => ({
|
|
2610
2656
|
viewId: r,
|
|
2611
2657
|
before: e?.before ?? t,
|
|
2612
2658
|
after: n
|
|
@@ -2636,7 +2682,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2636
2682
|
let n = this._view.getActiveSheetId();
|
|
2637
2683
|
n ??= (this._view.setActiveSheetId(t), t);
|
|
2638
2684
|
let r = e.refsById.get(n);
|
|
2639
|
-
r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), n = t), r.visibility ===
|
|
2685
|
+
r || (this._view.setActiveSheetId(t), r = e.refsById.get(t), n = t), r.visibility === k.Visibility.Visible && (this._activeSheetOffset = this._getOffsetForId(n, e.sheetRefsVisible));
|
|
2640
2686
|
}
|
|
2641
2687
|
_validateDeleteSheet(e) {
|
|
2642
2688
|
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
@@ -2655,10 +2701,11 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2655
2701
|
}
|
|
2656
2702
|
find(e) {
|
|
2657
2703
|
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
2658
|
-
let t = this.
|
|
2704
|
+
let t = this._getWorksheets();
|
|
2705
|
+
if (t.length === 0) return { next: () => de };
|
|
2659
2706
|
if (t.length === 1) return t[0].find(e);
|
|
2660
2707
|
typeof e == "string" && (e = { text: e });
|
|
2661
|
-
let n = !e?.reverse, r = e?.disableWrap ?? !1, i = this.getSelectedSheetIndex(), a = i, o = t[a], s = !1;
|
|
2708
|
+
let n = !e?.reverse, r = e?.disableWrap ?? !1, i = this._worksheetOffsetFrom(this.getSelectedSheetIndex(), t), a = i, o = t[a], s = !1;
|
|
2662
2709
|
e = {
|
|
2663
2710
|
...e,
|
|
2664
2711
|
disableWrap: !0
|
|
@@ -2681,7 +2728,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2681
2728
|
}
|
|
2682
2729
|
if (!d && s && a === i && (u.done || !c || !u.done && f(u.value.getCoords(), c) >= 0) && (d = !0), d) {
|
|
2683
2730
|
let e = u;
|
|
2684
|
-
return u =
|
|
2731
|
+
return u = de, e;
|
|
2685
2732
|
}
|
|
2686
2733
|
let p = u;
|
|
2687
2734
|
return u = l.next(), p;
|
|
@@ -2693,11 +2740,11 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2693
2740
|
} };
|
|
2694
2741
|
}
|
|
2695
2742
|
replace(e, t, n) {
|
|
2696
|
-
let r = 0, i = null, a = typeof t == "function", o = n?.maxCount ?? 2 ** 53 - 1, s = !n?.maxCount, c = "", l = typeof t == "string" ?
|
|
2743
|
+
let r = 0, i = null, a = typeof t == "function", o = n?.maxCount ?? 2 ** 53 - 1, s = !n?.maxCount, c = "", l = typeof t == "string" ? ee(t) : null, u = n?.description ?? W("op.replace"), d = this._transactions.beginCommit({ description: u });
|
|
2697
2744
|
try {
|
|
2698
2745
|
let u = null, f = null, p = e.next();
|
|
2699
2746
|
for (; !p.done && r < o;) {
|
|
2700
|
-
let o = p.value, s = o.
|
|
2747
|
+
let o = p.value, s = o.getWorksheet();
|
|
2701
2748
|
s !== u && (u = s, f !== null && f.apply(), f = u.getEntireRange().createSparseBuilder({
|
|
2702
2749
|
axis: n?.axis,
|
|
2703
2750
|
allowUnorderedWrites: !0
|
|
@@ -2725,6 +2772,16 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2725
2772
|
let n = t.length;
|
|
2726
2773
|
return n === 1 ? 0 : (e === void 0 && (e = this.getSelectedSheetIndex()), (e = Math.max(0, Math.min(e, n - 1))) <= 0 ? n - 1 : e - 1);
|
|
2727
2774
|
}
|
|
2775
|
+
_worksheetOffsetFrom(e, t) {
|
|
2776
|
+
let n = this._getSheetRefs(), r = n.length;
|
|
2777
|
+
for (let i = 0; i < r; i++) {
|
|
2778
|
+
let a = n[(e + i) % r];
|
|
2779
|
+
if (!Z(a)) continue;
|
|
2780
|
+
let o = t.indexOf(a.sheet);
|
|
2781
|
+
if (o !== -1) return o;
|
|
2782
|
+
}
|
|
2783
|
+
return 0;
|
|
2784
|
+
}
|
|
2728
2785
|
getNextSheet(e) {
|
|
2729
2786
|
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
2730
2787
|
let t = this._getSheetRefs();
|
|
@@ -2740,35 +2797,40 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2740
2797
|
if (!this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
|
|
2741
2798
|
let t = this._getSheetRefs(), n = this.getSelectedSheetIndex(), r = null;
|
|
2742
2799
|
if (e) {
|
|
2743
|
-
if (r = this._getSheetRef(e), !r) throw new B(
|
|
2800
|
+
if (r = this._getSheetRef(e), !r) throw new B(br(r));
|
|
2744
2801
|
} else r = t[n];
|
|
2745
2802
|
if (!r) return null;
|
|
2746
|
-
|
|
2803
|
+
if (!Z(r)) throw new B((i = r.name, G("error.workbook.sheetNotDuplicable", { sheetName: i })));
|
|
2804
|
+
var i;
|
|
2805
|
+
let a = r.sheet, o = this._strings.beginPersist(), s = this.getResources().beginPersist(), c = this.getStyles().beginPersist(), l = null, u = this.beginCommit(G("op.duplicateNamed", { name: a.getName() }));
|
|
2747
2806
|
try {
|
|
2748
|
-
let e = this._getState().refsByInstance.get(
|
|
2749
|
-
this._tellSheets(), this._emitter.notify("onSheetsChange"),
|
|
2807
|
+
let e = this._getState().refsByInstance.get(a), r = await a.toJSON(), i = t.length + 1, o = this.findValidSheetName(e.name), s = this._createSheet(i, o, e.visibility, n, void 0, r);
|
|
2808
|
+
this._tellSheets(), this._emitter.notify("onSheetsChange"), l = s, u.commit();
|
|
2750
2809
|
} catch (e) {
|
|
2751
|
-
throw
|
|
2810
|
+
throw u.rollback(), e;
|
|
2752
2811
|
} finally {
|
|
2753
|
-
|
|
2812
|
+
c.endPersist(), s.endPersist(), o.endPersist();
|
|
2754
2813
|
}
|
|
2755
|
-
return
|
|
2814
|
+
return l;
|
|
2756
2815
|
}
|
|
2757
2816
|
_createRange(e, t) {
|
|
2758
|
-
let n = e ? { ...e } : null, r = n ? this._getSheetRef(n.scope,
|
|
2817
|
+
let n = e ? { ...e } : null, r = n ? this._getSheetRef(n.scope, k.Visibility.VeryHidden) : null;
|
|
2818
|
+
if (r && !Z(r)) throw new B(Sr(r.name, r.sheet.getKind()));
|
|
2759
2819
|
if (!r) {
|
|
2760
|
-
let e = this.
|
|
2820
|
+
let e = this._anchorWorksheet();
|
|
2761
2821
|
return e ? (delete n?.scope, Or(n, n ? {
|
|
2762
|
-
scope:
|
|
2822
|
+
scope: g,
|
|
2763
2823
|
...e.getEntireRange().getCoords()
|
|
2764
2824
|
} : null)) : void console.warn(G("error.workbook.noVisibleRefs"));
|
|
2765
2825
|
}
|
|
2766
2826
|
let i = r.sheet, a = null;
|
|
2767
|
-
return t && (a = { getOptions: t }), new
|
|
2827
|
+
return t && (a = { getOptions: t }), new Nr(e, j(i), this, a);
|
|
2768
2828
|
}
|
|
2769
2829
|
_createRanges(e, t) {
|
|
2770
|
-
let n = this.
|
|
2771
|
-
|
|
2830
|
+
let n = this._anchorWorksheet();
|
|
2831
|
+
if (!n) throw new B(Cr("", k.Kind.Worksheet));
|
|
2832
|
+
let r = null;
|
|
2833
|
+
return t && (r = { getOptions: t }), new Mr(e, j(n), this, r);
|
|
2772
2834
|
}
|
|
2773
2835
|
getRange(e, t) {
|
|
2774
2836
|
if (e === void 0) return this.getSelectedRange(t);
|
|
@@ -2777,7 +2839,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2777
2839
|
if (n.length !== 1) throw new B(G("error.address.singleRangeOnlyAlt"));
|
|
2778
2840
|
return this._createRange(n[0], t);
|
|
2779
2841
|
} catch (t) {
|
|
2780
|
-
throw t instanceof H ? new H(t.message) : new B(t.message ??
|
|
2842
|
+
throw t instanceof H ? new H(t.message) : new B(t.message ?? d(e));
|
|
2781
2843
|
}
|
|
2782
2844
|
}
|
|
2783
2845
|
getCell(e) {
|
|
@@ -2788,28 +2850,41 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2788
2850
|
}
|
|
2789
2851
|
getRanges(e, t) {
|
|
2790
2852
|
let n = this._rangesAddressToCoords(e);
|
|
2791
|
-
if (n.length === 0) throw new B(
|
|
2853
|
+
if (n.length === 0) throw new B(d(e));
|
|
2792
2854
|
return this._createRanges(n, t);
|
|
2793
2855
|
}
|
|
2794
2856
|
_createGraphRanges(e, t) {
|
|
2795
2857
|
let n = [], r = this.getCalculation()?.getNamedFormulas() ?? null;
|
|
2796
2858
|
for (let e = 0; e < t.length; e++) {
|
|
2797
|
-
let i = t[e], a =
|
|
2798
|
-
|
|
2859
|
+
let i = t[e], a = i.sheetName ? this._getSheetRef(i.sheetName, k.Visibility.VeryHidden) : null, o = a && Z(a) ? a.sheet : this._anchorWorksheet();
|
|
2860
|
+
o && n.push(new Be(i, r, j(o), null));
|
|
2799
2861
|
}
|
|
2800
2862
|
for (let t = 0; t < e.length; t++) n.push(e[t]);
|
|
2801
|
-
|
|
2863
|
+
let i = this._anchorWorksheet();
|
|
2864
|
+
return n.length !== 0 && i ? new Mr(n, j(i), this, null) : null;
|
|
2865
|
+
}
|
|
2866
|
+
getAnomalies(e) {
|
|
2867
|
+
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
2868
|
+
let t = He(e), n = this._getWorksheets(k.Visibility.VeryHidden).map((e) => {
|
|
2869
|
+
let t = j(e);
|
|
2870
|
+
return {
|
|
2871
|
+
bounds: t.getSheet().getEntireCoords(),
|
|
2872
|
+
internal: t,
|
|
2873
|
+
qualified: !0
|
|
2874
|
+
};
|
|
2875
|
+
});
|
|
2876
|
+
return new wt(n, () => (this.getSelectedWorksheet() ?? this._getWorksheets(k.Visibility.VeryHidden)[0]).getEntireRange(), t);
|
|
2802
2877
|
}
|
|
2803
2878
|
getStats(e) {
|
|
2804
2879
|
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
2805
|
-
let t = this.
|
|
2880
|
+
let t = this._getWorksheets(k.Visibility.VeryHidden), n = t.length;
|
|
2806
2881
|
if (n === 1) return t[0].getStats(e);
|
|
2807
2882
|
let r = Array(n);
|
|
2808
2883
|
for (let i = 0; i < n; i++) r[i] = t[i].getStats(e);
|
|
2809
|
-
return new
|
|
2884
|
+
return new er(r);
|
|
2810
2885
|
}
|
|
2811
2886
|
_activeRangeCoords() {
|
|
2812
|
-
let e = this.
|
|
2887
|
+
let e = this._requireSelectedWorksheet(), t = e.getSelection().getRanges().getCoords(), n = e.getName(), r = t.length, i = Array(r);
|
|
2813
2888
|
for (let e = 0; e < r; e++) {
|
|
2814
2889
|
let r = t[e];
|
|
2815
2890
|
i[e] = {
|
|
@@ -2829,32 +2904,40 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2829
2904
|
return this.getRanges(this._activeRangeCoords(), e);
|
|
2830
2905
|
}
|
|
2831
2906
|
getSelectedCell() {
|
|
2832
|
-
return this.
|
|
2907
|
+
return this._requireSelectedWorksheet().getSelectedCell();
|
|
2833
2908
|
}
|
|
2834
|
-
_rangesAddressToCoords(e, t = !0, n =
|
|
2909
|
+
_rangesAddressToCoords(e, t = !0, n = k.Visibility.Hidden) {
|
|
2835
2910
|
if (!e) throw new B(G("error.address.noAddress"));
|
|
2836
|
-
let r = this.
|
|
2837
|
-
if (
|
|
2911
|
+
let r = this.getSelectedWorksheet(), i = { ...(r ?? this._anchorWorksheet())?.getEntireRange().getCoords() }, o = r?.getName();
|
|
2912
|
+
if (o && (i.scope = o), typeof e == "string") {
|
|
2838
2913
|
let t = e.trim().toLowerCase();
|
|
2839
2914
|
if (t === "r" || t === "c") {
|
|
2840
2915
|
let n = this.getSelectedCell().getCoords(), r = {};
|
|
2841
2916
|
t === "r" ? r.rowStart = r.rowEnd = n.rowIndex : r.colStart = r.colEnd = n.colIndex, e = r;
|
|
2842
2917
|
}
|
|
2843
2918
|
}
|
|
2844
|
-
let
|
|
2919
|
+
let s = this, c = gt(e, i, ue, (e) => {
|
|
2845
2920
|
if (!t) return null;
|
|
2846
2921
|
if (typeof e == "string") {
|
|
2847
|
-
let t =
|
|
2848
|
-
|
|
2922
|
+
let t = a(e, {
|
|
2923
|
+
getTable: (e) => at(s.getNames().getByName(e)),
|
|
2924
|
+
getAnchor: () => r ? {
|
|
2925
|
+
sheet: r,
|
|
2926
|
+
coords: r.getSelectedCell().getCoords()
|
|
2927
|
+
} : null
|
|
2928
|
+
});
|
|
2929
|
+
if (t) return [t];
|
|
2930
|
+
let n = s.getNames().getByName(e)?.getRanges?.();
|
|
2931
|
+
if (n) return n.getCoords();
|
|
2849
2932
|
}
|
|
2850
2933
|
throw new B(`Invalid sheet reference '${e}'.`);
|
|
2851
|
-
}),
|
|
2852
|
-
for (let e = 0; e <
|
|
2853
|
-
return
|
|
2934
|
+
}), l = c.length;
|
|
2935
|
+
for (let e = 0; e < l; e++) this._validateCoords(c[e], n);
|
|
2936
|
+
return c;
|
|
2854
2937
|
}
|
|
2855
|
-
_validateCoords(e, t =
|
|
2938
|
+
_validateCoords(e, t = k.Visibility.Visible, n = G("error.sheet.oobRange")) {
|
|
2856
2939
|
if (e === null) return;
|
|
2857
|
-
let r = this.
|
|
2940
|
+
let r = this.getWorksheet(e.scope ?? void 0, t).getEntireRange().getCoords();
|
|
2858
2941
|
if (!z.isRangeWithinRange(e, r)) throw new H(n);
|
|
2859
2942
|
if (e.rowEnd < e.rowStart || e.colEnd < e.colStart) throw new B(G("error.address.invalidRangeInverted"));
|
|
2860
2943
|
}
|
|
@@ -2879,7 +2962,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2879
2962
|
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
2880
2963
|
if (!this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
|
|
2881
2964
|
let r = this._getSheetRef(e);
|
|
2882
|
-
if (!r) throw new B(
|
|
2965
|
+
if (!r) throw new B(br(e));
|
|
2883
2966
|
if (t === r.name) return r.sheet;
|
|
2884
2967
|
if ((t = this._validateNewSheetName(t)) == null) throw new B(G("error.workbook.sheetNameNotProvided"));
|
|
2885
2968
|
let i = Object.freeze({
|
|
@@ -2896,23 +2979,23 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2896
2979
|
}
|
|
2897
2980
|
return a;
|
|
2898
2981
|
}
|
|
2899
|
-
_setSheetVisibility(e, t =
|
|
2982
|
+
_setSheetVisibility(e, t = k.Visibility.Visible, n) {
|
|
2900
2983
|
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
2901
2984
|
if (!this.getProtection().isStructureAllowed()) throw new U(G("error.workbook.protection"));
|
|
2902
|
-
let r = this._getSheetRef(e,
|
|
2985
|
+
let r = this._getSheetRef(e, k.Visibility.VeryHidden);
|
|
2903
2986
|
if (!r) return null;
|
|
2904
2987
|
if (t === r.visibility) return;
|
|
2905
2988
|
let i = null, a = "";
|
|
2906
|
-
t ===
|
|
2989
|
+
t === k.Visibility.Visible ? a = W("op.unhideSheet") : t === k.Visibility.Hidden ? a = W("op.hideSheet") : t === k.Visibility.VeryHidden && (a = W("op.veryHideSheet"));
|
|
2907
2990
|
let o = this.beginCommit(a);
|
|
2908
2991
|
try {
|
|
2909
2992
|
let e = this._getState().sheetRefsVisible;
|
|
2910
|
-
if (t !==
|
|
2993
|
+
if (t !== k.Visibility.Visible && e.length === 1 && e[0].id === r.id) throw new B(G("error.workbook.sheetOne"));
|
|
2911
2994
|
let a = {
|
|
2912
2995
|
...r,
|
|
2913
2996
|
visibility: t
|
|
2914
2997
|
}, s = -1;
|
|
2915
|
-
t !==
|
|
2998
|
+
t !== k.Visibility.Visible && (s = this._getOffsetForId(r.id, e)), i = this._updateSheetRef(r, a).sheet, t !== k.Visibility.Visible && this._adjustRemoveSelectionIfRequired(s, r.id), this._adjustSheetNamesIfRequired(), o.commit(n);
|
|
2916
2999
|
} catch (e) {
|
|
2917
3000
|
throw o.rollback(), e;
|
|
2918
3001
|
}
|
|
@@ -2941,13 +3024,16 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2941
3024
|
_setSelectedSheet(e) {
|
|
2942
3025
|
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
2943
3026
|
let t = this._getSheetRef(e);
|
|
2944
|
-
if (!t) throw new B(
|
|
3027
|
+
if (!t) throw new B(br(e));
|
|
2945
3028
|
let n = null;
|
|
2946
|
-
return t.visibility !==
|
|
3029
|
+
return t.visibility !== k.Visibility.Visible && this._setSheetVisibility(t, k.Visibility.Visible), this._view.setActiveSheetId(t.id), n = t.sheet, n;
|
|
2947
3030
|
}
|
|
2948
3031
|
getProtection() {
|
|
2949
3032
|
return this._protection;
|
|
2950
3033
|
}
|
|
3034
|
+
getProperties() {
|
|
3035
|
+
return this._documentProperties;
|
|
3036
|
+
}
|
|
2951
3037
|
getCodeName() {
|
|
2952
3038
|
return this._codeName;
|
|
2953
3039
|
}
|
|
@@ -2958,7 +3044,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2958
3044
|
return this._calculation;
|
|
2959
3045
|
}
|
|
2960
3046
|
getFonts() {
|
|
2961
|
-
return
|
|
3047
|
+
return Ct.getShared();
|
|
2962
3048
|
}
|
|
2963
3049
|
createFormula(e, t, n) {
|
|
2964
3050
|
return this.getCalculation().createFormula(e, t, n);
|
|
@@ -2970,6 +3056,12 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2970
3056
|
let e = this._starting;
|
|
2971
3057
|
return e ? e.then(() => this.getCalculation().ready()) : this.getCalculation().ready();
|
|
2972
3058
|
}
|
|
3059
|
+
whenFontsReady() {
|
|
3060
|
+
return this.getFonts().whenReady();
|
|
3061
|
+
}
|
|
3062
|
+
async whenReady() {
|
|
3063
|
+
await Promise.all([this.whenCalculationReady(), this.whenFontsReady()]);
|
|
3064
|
+
}
|
|
2973
3065
|
getScripts() {
|
|
2974
3066
|
return this._scripts ||= this._createScripts(), this._scripts;
|
|
2975
3067
|
}
|
|
@@ -2992,15 +3084,15 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
2992
3084
|
let n = [...e.getCoords()], r = n.length;
|
|
2993
3085
|
for (let t = 0; t < r; t++) {
|
|
2994
3086
|
let r = n[t];
|
|
2995
|
-
!r.scope && e.
|
|
3087
|
+
!r.scope && e.getWorksheet().getName() && (n[t] = {
|
|
2996
3088
|
...r,
|
|
2997
|
-
scope: e.
|
|
3089
|
+
scope: e.getWorksheet().getName()
|
|
2998
3090
|
});
|
|
2999
3091
|
}
|
|
3000
3092
|
return t.getRanges(n);
|
|
3001
3093
|
}
|
|
3002
3094
|
if (e.isICellRange) {
|
|
3003
|
-
let n = e.getCoords(), r = e.
|
|
3095
|
+
let n = e.getCoords(), r = e.getWorksheet().getName();
|
|
3004
3096
|
return t.getRange({
|
|
3005
3097
|
...n,
|
|
3006
3098
|
scope: r
|
|
@@ -3011,7 +3103,6 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3011
3103
|
getSource: r,
|
|
3012
3104
|
trigger: n.trigger,
|
|
3013
3105
|
getFrom: () => t.getRanges(n.getFrom()),
|
|
3014
|
-
getTo: () => t.getRange(n.getTo()),
|
|
3015
3106
|
isDataChange: n.isDataChange,
|
|
3016
3107
|
getTransactionId: n.getTransactionId,
|
|
3017
3108
|
isUndo: n.isUndo,
|
|
@@ -3024,23 +3115,23 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3024
3115
|
let e = this._pivotCaches;
|
|
3025
3116
|
if (e.length === 0) return;
|
|
3026
3117
|
let t = (e) => {
|
|
3027
|
-
let t = this._getSheetRef(e)
|
|
3028
|
-
return
|
|
3118
|
+
let t = this._getSheetRef(e), n = t && Z(t) ? t.sheet : null;
|
|
3119
|
+
return n ? n._contentAddWatch(() => null) : null;
|
|
3029
3120
|
};
|
|
3030
3121
|
for (let n = 0; n < e.length; n++) e[n]._hold(t);
|
|
3031
3122
|
}
|
|
3032
3123
|
_fromJSON(e, t) {
|
|
3033
3124
|
if (this._emitter.notify("onBeforeLoad", { params: e }), this._initState(), !e.sheets || e.sheets.length === 0) throw new B(G("error.workbook.sheetOne"));
|
|
3034
|
-
e.theme && (this._theme = new
|
|
3125
|
+
e.theme && (this._theme = new re(e.theme), this._styles.setTheme(this._theme));
|
|
3035
3126
|
let n = this._strings.beginPersist(), r = this._resources.beginPersist(), i = this._styles.beginPersist();
|
|
3036
3127
|
try {
|
|
3037
|
-
n.fromJSON(e.strings), r.fromJSON(e.resources), i.fromJSON(e.styles), e.date1904 && (this._isDate1904 = !0), this._codeName = e.codeName ?? null, this._updateLinks = e.updateLinks ?? null, e.locale && (this._locale = e.locale), e.localeOverrides && (this._localeOverrides = e.localeOverrides), e.view ||= {};
|
|
3128
|
+
n.fromJSON(e.strings), r.fromJSON(e.resources), i.fromJSON(e.styles), e.date1904 && (this._isDate1904 = !0), this._codeName = e.codeName ?? null, this._updateLinks = e.updateLinks ?? null, this._documentProperties.fromJSON(e.properties), e.locale && (this._locale = e.locale), e.localeOverrides && (this._localeOverrides = e.localeOverrides), e.view ||= {};
|
|
3038
3129
|
let a = [], o = e.pivotCaches;
|
|
3039
3130
|
if (o) {
|
|
3040
3131
|
let e = r.fromResourceId.bind(r);
|
|
3041
3132
|
for (let t = 0; t < o.length; t++) {
|
|
3042
3133
|
let n = o[t];
|
|
3043
|
-
n && typeof n.cacheId == "number" && a.push(new
|
|
3134
|
+
n && typeof n.cacheId == "number" && a.push(new ir(n.cacheId, w.fromJSON(n.part, e)));
|
|
3044
3135
|
}
|
|
3045
3136
|
}
|
|
3046
3137
|
this._pivotCaches = a, this._people.fromJSON(e.people);
|
|
@@ -3049,17 +3140,22 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3049
3140
|
let u = null, d = null;
|
|
3050
3141
|
this._isLoadingSheets = !0;
|
|
3051
3142
|
for (let e = 0; e < c; e++) {
|
|
3052
|
-
let n = s[e],
|
|
3053
|
-
d =
|
|
3143
|
+
let n = s[e], i = n.visibility || k.Visibility.Visible, a = e;
|
|
3144
|
+
d = a, i === k.Visibility.Visible ? u === null && (u = a) : l !== null && l === a && (l = null);
|
|
3054
3145
|
try {
|
|
3055
|
-
|
|
3146
|
+
let o = n.kind ?? k.Kind.Worksheet;
|
|
3147
|
+
if (o !== k.Kind.Worksheet) {
|
|
3148
|
+
let s = n.sheet, c = w.fromJSON(s?.part, r.fromResourceId.bind(r));
|
|
3149
|
+
if (!c) throw new B(G("error.workbook.sheetPartMissing", { sheetName: n.name }));
|
|
3150
|
+
this._createOpaqueSheet(a, n.name, i, e, n.sheetId, o, c, s?.tabColor ?? null, t?.[e]);
|
|
3151
|
+
} else this._createSheet(a, n.name, i, e, n.sheetId, n.sheet, t?.[e]);
|
|
3056
3152
|
} catch (e) {
|
|
3057
3153
|
throw this._isLoadingSheets = !1, e;
|
|
3058
3154
|
}
|
|
3059
3155
|
}
|
|
3060
|
-
this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._updateState({ lastId: d }), e.view.activeSheetId = l ?? u, this.setView(new
|
|
3156
|
+
this._isLoadingSheets = !1, this._tellSheets(), this._holdPivotCaches(), this._updateState({ lastId: d }), e.view.activeSheetId = l ?? u, this.setView(new mr({ json: e.view })), this._adjustSheetNamesIfRequired(), this._listenerProtection?.();
|
|
3061
3157
|
let f = this;
|
|
3062
|
-
this._protection = new
|
|
3158
|
+
this._protection = new gr(e?.protection, this._options?.readonly), this._listenerProtection = this._protection.addListeners({ onChange: (e) => {
|
|
3063
3159
|
f._emitter.notify("onProtectionChange", { source: e });
|
|
3064
3160
|
} }), this._emitter.notify("onLoad");
|
|
3065
3161
|
} finally {
|
|
@@ -3068,14 +3164,14 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3068
3164
|
}
|
|
3069
3165
|
_createScripts(e) {
|
|
3070
3166
|
let t = this;
|
|
3071
|
-
return new
|
|
3167
|
+
return new cr({
|
|
3072
3168
|
transactions: this._transactions,
|
|
3073
3169
|
json: e,
|
|
3074
3170
|
workbook: t,
|
|
3075
3171
|
getBuiltInFunctions: () => t._calculation?.getFunctions(),
|
|
3076
3172
|
onAdd: (e, n) => {
|
|
3077
3173
|
let r = t._calculation;
|
|
3078
|
-
r.getStatus() !==
|
|
3174
|
+
r.getStatus() !== E.Status.Off && r.start().then(async () => {
|
|
3079
3175
|
let e = n.getFunctions().getItems({
|
|
3080
3176
|
type: "formula",
|
|
3081
3177
|
includeHidden: !0
|
|
@@ -3097,7 +3193,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3097
3193
|
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
3098
3194
|
await Promise.resolve(this._starting);
|
|
3099
3195
|
let t = this.getCalculation();
|
|
3100
|
-
t.getStatus() !==
|
|
3196
|
+
t.getStatus() !== E.Status.Off && (await t.ready(), await t._whenRequestsSettled?.()), await this._emitter.notify("onBeforeSave", { async: !0 });
|
|
3101
3197
|
let n = { sheets: [] }, r = e?.ignoreStyles ?? !1;
|
|
3102
3198
|
if (!r) {
|
|
3103
3199
|
let e = this._theme.toJSON();
|
|
@@ -3107,48 +3203,59 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3107
3203
|
let e = this._scripts.toJSON();
|
|
3108
3204
|
e && Object.keys(e).length > 0 && (n.modules = e);
|
|
3109
3205
|
}
|
|
3110
|
-
this._isDate1904 && (n.date1904 = !0), this._codeName && (n.codeName = this._codeName), this._updateLinks && (n.updateLinks = this._updateLinks)
|
|
3111
|
-
let i =
|
|
3206
|
+
this._isDate1904 && (n.date1904 = !0), this._codeName && (n.codeName = this._codeName), this._updateLinks && (n.updateLinks = this._updateLinks);
|
|
3207
|
+
let i = this._documentProperties.toJSON();
|
|
3208
|
+
Object.keys(i).length > 0 && (n.properties = i), this._locale && (n.locale = this._locale), this._localeOverrides && (n.localeOverrides = this._localeOverrides);
|
|
3209
|
+
let a = e?.resources ?? "embed", o = a === "ignore", s = this._strings.beginPersist(), c = o ? null : this._resources.beginPersist(), l = this._styles.beginPersist();
|
|
3112
3210
|
try {
|
|
3113
|
-
let t = this._getSheetRef(this.getSelectedSheetIndex()).id,
|
|
3211
|
+
let t = this._getSheetRef(this.getSelectedSheetIndex()).id, i = t, u = null, d = this._getState(), f = d.sheetRefsAll, p = d.sheetsById, m = f.length;
|
|
3114
3212
|
for (let r = 0; r < m; r++) {
|
|
3115
|
-
let
|
|
3116
|
-
|
|
3117
|
-
|
|
3213
|
+
let a = f[r], o = r + 1, s, l = p.get(a.id);
|
|
3214
|
+
if (Z(a)) s = {
|
|
3215
|
+
name: a.name,
|
|
3216
|
+
sheet: await a.sheet.toJSON(e)
|
|
3118
3217
|
};
|
|
3119
|
-
|
|
3218
|
+
else {
|
|
3219
|
+
let e = l, t = c ? c.toResourceId.bind(c) : () => null, n = { part: w.toJSON(e._getPart(), t) }, r = e.getTabColor();
|
|
3220
|
+
r && (n.tabColor = r.toString()), s = {
|
|
3221
|
+
name: a.name,
|
|
3222
|
+
kind: e.getKind(),
|
|
3223
|
+
sheet: n
|
|
3224
|
+
};
|
|
3225
|
+
}
|
|
3226
|
+
a.sheetId !== void 0 && (s.sheetId = a.sheetId), a.visibility === k.Visibility.Visible ? u === null && (u = o) : s.visibility = a.visibility, a.id === t && (i = o), n.sheets.push(s);
|
|
3120
3227
|
}
|
|
3121
3228
|
if (!r) {
|
|
3122
|
-
let e =
|
|
3229
|
+
let e = l.toJSON();
|
|
3123
3230
|
e && Object.keys(e).length > 0 && (n.styles = e);
|
|
3124
3231
|
}
|
|
3125
3232
|
let h = this.getProtection().toJSON();
|
|
3126
3233
|
h && (n.protection = h);
|
|
3127
3234
|
let g = this._calculation.toJSON();
|
|
3128
3235
|
Object.keys(g).length > 0 && (n.calc = g);
|
|
3129
|
-
let _ = await
|
|
3236
|
+
let _ = await s.toJSONAsync();
|
|
3130
3237
|
_ && _.length > 0 && (n.strings = _);
|
|
3131
3238
|
let v = this._calculation.getExternalBooks().toJSON();
|
|
3132
3239
|
v && (n.externalBooks = v);
|
|
3133
3240
|
let y = this._pivotCaches;
|
|
3134
3241
|
if (y.length > 0) {
|
|
3135
|
-
let e =
|
|
3242
|
+
let e = c ? c.toResourceId.bind(c) : () => null, t = /* @__PURE__ */ new Set();
|
|
3136
3243
|
for (let e of this.getPivotTables()) t.add(e.getCacheId());
|
|
3137
3244
|
let r = [];
|
|
3138
3245
|
for (let n = 0; n < y.length; n++) t.has(y[n].cacheId) && r.push(y[n].toJSON(e));
|
|
3139
3246
|
r.length > 0 && (n.pivotCaches = r);
|
|
3140
3247
|
}
|
|
3141
3248
|
let b = this._people.toJSON();
|
|
3142
|
-
if (b && (n.people = b), !
|
|
3143
|
-
let e = await
|
|
3249
|
+
if (b && (n.people = b), !o) {
|
|
3250
|
+
let e = await c.toJSONAsync(typeof a == "function" ? a : void 0);
|
|
3144
3251
|
e && e.length > 0 && (n.resources = e);
|
|
3145
3252
|
}
|
|
3146
3253
|
let x = this._calculation.getNamedFormulas().toJSON();
|
|
3147
3254
|
x && x.length > 0 && (n.names = x);
|
|
3148
3255
|
let S = this._view.toJSON();
|
|
3149
|
-
S && (
|
|
3256
|
+
S && (i === u ? delete S.activeSheetId : S.activeSheetId = i, Object.keys(S).length > 0 && (n.view = S));
|
|
3150
3257
|
} finally {
|
|
3151
|
-
|
|
3258
|
+
l.endPersist(), o || c.endPersist(), s.endPersist();
|
|
3152
3259
|
}
|
|
3153
3260
|
return this._emitter.notify("onSave", { params: n }), n;
|
|
3154
3261
|
}
|
|
@@ -3168,19 +3275,24 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3168
3275
|
} catch (e) {
|
|
3169
3276
|
console.warn("error on close", e);
|
|
3170
3277
|
}
|
|
3171
|
-
this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof
|
|
3278
|
+
this._ownResources, this._ownNames && this._names.close(), this._ownCalculation && this._calculation.close(), this._ownStyles, this._transactionsRemoveListener?.(), this._listenerLanguage?.(), this._listenerOrigin?.(), this._listenerOriginProvider?.(), this._ownOriginProvider && this._originProvider instanceof Dn && this._originProvider.release(), this._closed = !0;
|
|
3172
3279
|
}
|
|
3173
3280
|
beginCommit(e) {
|
|
3174
3281
|
if (this._closed) throw Error(G("error.workbook.modelClosed"));
|
|
3175
3282
|
return this._beginCommit(typeof e == "string" ? { description: e } : e);
|
|
3176
3283
|
}
|
|
3177
3284
|
doBatch(e, t) {
|
|
3178
|
-
let
|
|
3179
|
-
|
|
3285
|
+
let r = this;
|
|
3286
|
+
t = typeof t == "string" ? { description: t } : {
|
|
3180
3287
|
description: W("op.updateWorkbook"),
|
|
3181
3288
|
...t
|
|
3182
|
-
}
|
|
3183
|
-
|
|
3289
|
+
};
|
|
3290
|
+
let i = n.bind(this._transactions, this, e);
|
|
3291
|
+
return this._transactions.doBatch(i.callback, {
|
|
3292
|
+
...t,
|
|
3293
|
+
onChildCommit: i.onChildCommit
|
|
3294
|
+
}, (e, t) => {
|
|
3295
|
+
i.close(), e.getDepth() === 0 && (r._lastTransactionUUID = e.getId());
|
|
3184
3296
|
});
|
|
3185
3297
|
}
|
|
3186
3298
|
_beginCommit(e) {
|
|
@@ -3213,7 +3325,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3213
3325
|
get isIWorkbook() {
|
|
3214
3326
|
return !0;
|
|
3215
3327
|
}
|
|
3216
|
-
},
|
|
3328
|
+
}, Ir = { address: null }, Z = (e) => e.sheet.getKind() === k.Kind.Worksheet, Lr = class {
|
|
3217
3329
|
constructor() {
|
|
3218
3330
|
this._readFormats = [], this._writeFormats = [], this._encryptions = [];
|
|
3219
3331
|
}
|
|
@@ -3287,9 +3399,9 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3287
3399
|
return !0;
|
|
3288
3400
|
});
|
|
3289
3401
|
}
|
|
3290
|
-
},
|
|
3402
|
+
}, Rr = /* @__PURE__ */ new WeakMap(), zr = (e) => !!e && typeof e == "object" && typeof e.getPath == "function" && typeof e.canWrite == "function", Br = class {
|
|
3291
3403
|
constructor() {
|
|
3292
|
-
this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new
|
|
3404
|
+
this._setInstalled = /* @__PURE__ */ new WeakSet(), this._backingStore = null, this._emitter = new e(this), this._registry = new Lr(), this._defaultStore = new kn(() => this.getWriteFormats(), () => this.getReadFormats());
|
|
3293
3405
|
}
|
|
3294
3406
|
getBackingStore() {
|
|
3295
3407
|
return this._backingStore ?? this._defaultStore;
|
|
@@ -3329,10 +3441,10 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3329
3441
|
async read(e) {
|
|
3330
3442
|
let t = null;
|
|
3331
3443
|
if (typeof e == "string") e = { source: e };
|
|
3332
|
-
else if (
|
|
3444
|
+
else if (zr(e)) {
|
|
3333
3445
|
let n = e.getPath();
|
|
3334
3446
|
if (!n) throw Error("Cannot read from an unbound origin (no path).");
|
|
3335
|
-
|
|
3447
|
+
Tn(e) ? e = {
|
|
3336
3448
|
source: n,
|
|
3337
3449
|
asCopy: !0
|
|
3338
3450
|
} : (t = e, e = { source: n });
|
|
@@ -3406,7 +3518,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3406
3518
|
try {
|
|
3407
3519
|
return i = await r.decode(e, t), !0;
|
|
3408
3520
|
} catch (e) {
|
|
3409
|
-
if (!(e instanceof
|
|
3521
|
+
if (!(e instanceof pn)) throw e;
|
|
3410
3522
|
return !1;
|
|
3411
3523
|
}
|
|
3412
3524
|
};
|
|
@@ -3416,7 +3528,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3416
3528
|
};
|
|
3417
3529
|
if (!n?.onPassword) {
|
|
3418
3530
|
let e = t.getName();
|
|
3419
|
-
throw new
|
|
3531
|
+
throw new gn(e ? G("error.io.passwordRequired", { name: e }) : G("error.io.passwordRequiredUnnamed"));
|
|
3420
3532
|
}
|
|
3421
3533
|
let o = await Promise.resolve(n.onPassword({
|
|
3422
3534
|
origin: t,
|
|
@@ -3428,7 +3540,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3428
3540
|
bytes: i,
|
|
3429
3541
|
password: o
|
|
3430
3542
|
};
|
|
3431
|
-
throw new
|
|
3543
|
+
throw new pn(G("error.io.passwordIncorrect"));
|
|
3432
3544
|
}
|
|
3433
3545
|
async writeArrayBuffer(e, t) {
|
|
3434
3546
|
if (!t?.format) throw Error("A format must be specified to write to an ArrayBuffer (e.g. { format: 'xlsx' }).");
|
|
@@ -3437,7 +3549,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3437
3549
|
return this._writeArrayBuffer(e, n, t);
|
|
3438
3550
|
}
|
|
3439
3551
|
async write(e, t, n) {
|
|
3440
|
-
return typeof t == "string" ||
|
|
3552
|
+
return typeof t == "string" || zr(t) ? this._write(e, t, !1, n) : this._write(e, e?.getOrigin?.(), !0, t ?? n);
|
|
3441
3553
|
}
|
|
3442
3554
|
async writeAs(e, t, n) {
|
|
3443
3555
|
if (!t) throw Error("A target must be provided for writeAs (use write(workbook) for a plain save).");
|
|
@@ -3461,13 +3573,13 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3461
3573
|
}
|
|
3462
3574
|
if (typeof t == "string") {
|
|
3463
3575
|
let e = i.getPath();
|
|
3464
|
-
i = new K(
|
|
3576
|
+
i = new K(S(e) ? e : `${e}.${o.exts[0]}`, { format: o.key });
|
|
3465
3577
|
}
|
|
3466
3578
|
let c = i.getEncryption(), l = e.getOrigin?.(), u = (i instanceof K ? i.getPassword() : null) ?? (l instanceof K ? l.getPassword() : null), d = i.isEncrypted() || (l?.isEncrypted() ?? !1), f = r?.password === void 0 ? u ?? (d ? void 0 : null) : r.password, p = null;
|
|
3467
3579
|
if (f === void 0) {
|
|
3468
3580
|
if (d) {
|
|
3469
3581
|
let e = i.getName();
|
|
3470
|
-
throw new
|
|
3582
|
+
throw new gn(e ? G("error.io.passwordRequiredSave", { name: e }) : G("error.io.passwordRequiredSaveUnnamed"));
|
|
3471
3583
|
}
|
|
3472
3584
|
} else if (f !== null && (p = await this._registry.getEncryption(c), !p)) throw new B(G("error.io.encryptionUnavailable"));
|
|
3473
3585
|
let m = `${i.getName() ?? G("workbook.defaultName")}.${o.exts[0]}`, h = r?.progress, g = !i.getPath() || !i.canWrite() || !!r?.prompt, _ = !1, v = this, y = null, b = [], x = {
|
|
@@ -3495,7 +3607,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3495
3607
|
}))(h, l), d = await v._writeArrayBuffer(e, c, {
|
|
3496
3608
|
...r,
|
|
3497
3609
|
progress: u
|
|
3498
|
-
}), m =
|
|
3610
|
+
}), m = Rr.get(s);
|
|
3499
3611
|
if (l.some((e) => !m?.has(e.message)) && r?.onWarnings) {
|
|
3500
3612
|
let t = await Promise.resolve(r.onWarnings({
|
|
3501
3613
|
workbook: e,
|
|
@@ -3508,37 +3620,37 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3508
3620
|
}
|
|
3509
3621
|
return b = l, p ? p.encode(d, f) : d;
|
|
3510
3622
|
}
|
|
3511
|
-
},
|
|
3623
|
+
}, C = null;
|
|
3512
3624
|
try {
|
|
3513
3625
|
let t = this.getBackingStore();
|
|
3514
3626
|
if (!t.write) throw Error("The active backing store is read-only (no write implementation).");
|
|
3515
|
-
if (
|
|
3516
|
-
if (f !== void 0 &&
|
|
3517
|
-
let e =
|
|
3627
|
+
if (C = await t.write(x), C) {
|
|
3628
|
+
if (f !== void 0 && C instanceof K && (C.setPassword(f), C.update({ encryption: p ? p.key : null })), b.length) {
|
|
3629
|
+
let e = Rr.get(C) ?? /* @__PURE__ */ new Set();
|
|
3518
3630
|
for (let t of b) e.add(t.message);
|
|
3519
|
-
|
|
3631
|
+
Rr.set(C, e);
|
|
3520
3632
|
}
|
|
3521
|
-
n &&
|
|
3633
|
+
n && C !== e.getOrigin() && Tn(e.getOrigin())?.setOrigin(C);
|
|
3522
3634
|
let t = y ?? e.getTransactions?.()?.getCurrentCommit() ?? null;
|
|
3523
3635
|
this._emitter.notify("onWrite", {
|
|
3524
3636
|
params: {
|
|
3525
3637
|
workbook: e,
|
|
3526
|
-
origin:
|
|
3638
|
+
origin: C,
|
|
3527
3639
|
commitId: t?.getId() ?? null,
|
|
3528
3640
|
save: n
|
|
3529
3641
|
},
|
|
3530
3642
|
transactional: !1
|
|
3531
3643
|
});
|
|
3532
3644
|
}
|
|
3533
|
-
h?.onComplete && await Promise.resolve(h.onComplete(
|
|
3645
|
+
h?.onComplete && await Promise.resolve(h.onComplete(C));
|
|
3534
3646
|
} catch (e) {
|
|
3535
3647
|
let t = e instanceof Error ? e : Error(String(e));
|
|
3536
3648
|
throw h?.onError && await Promise.resolve(h.onError(t)), h?.onComplete && await Promise.resolve(h.onComplete(null)), t instanceof B ? t : Error(G("error.io.writeFailed", { reason: t.message }), { cause: e });
|
|
3537
3649
|
}
|
|
3538
|
-
return
|
|
3650
|
+
return C;
|
|
3539
3651
|
}
|
|
3540
3652
|
_stripExtension(e) {
|
|
3541
|
-
let t =
|
|
3653
|
+
let t = S(e);
|
|
3542
3654
|
return t ? e.slice(0, e.length - t.length - 1) : e;
|
|
3543
3655
|
}
|
|
3544
3656
|
_baseName(e) {
|
|
@@ -3558,7 +3670,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3558
3670
|
async _readArrayBuffer(e, t, n) {
|
|
3559
3671
|
if (!e) throw Error("ArrayBuffer must be specified.");
|
|
3560
3672
|
if (!t) throw Error("format must be specified.");
|
|
3561
|
-
if (e.byteLength === 0) return new
|
|
3673
|
+
if (e.byteLength === 0) return new Fr(n?.createWorkbookOptions);
|
|
3562
3674
|
let r = t.handler;
|
|
3563
3675
|
if (!r) throw Error(`Unable to resolve a read handler for '${t.key}'.`);
|
|
3564
3676
|
let i;
|
|
@@ -3570,12 +3682,12 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3570
3682
|
reason: e?.message ?? String(e)
|
|
3571
3683
|
}), { cause: e });
|
|
3572
3684
|
}
|
|
3573
|
-
return await
|
|
3685
|
+
return await Ue(), i;
|
|
3574
3686
|
}
|
|
3575
3687
|
get isIWorkbookIO() {
|
|
3576
3688
|
return !0;
|
|
3577
3689
|
}
|
|
3578
|
-
},
|
|
3690
|
+
}, Vr = new Br(), Hr = class {
|
|
3579
3691
|
constructor() {
|
|
3580
3692
|
this._buffer = null, this._formatKey = null;
|
|
3581
3693
|
}
|
|
@@ -3589,7 +3701,7 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3589
3701
|
async read(e) {
|
|
3590
3702
|
return this._buffer ? e.decode(this._buffer, { format: this._formatKey ?? void 0 }) : null;
|
|
3591
3703
|
}
|
|
3592
|
-
},
|
|
3704
|
+
}, Ur = "locales", Wr = "fonts", Gr = {
|
|
3593
3705
|
suffix: ".msg.json",
|
|
3594
3706
|
async extract(e) {
|
|
3595
3707
|
let t = e.relPath.split("/");
|
|
@@ -3599,55 +3711,92 @@ var Ar, jr, Mr = "workbook.activeSheet", Nr = class e extends it {
|
|
|
3599
3711
|
} : null;
|
|
3600
3712
|
},
|
|
3601
3713
|
place: (e, t) => t ? `${t}/${e}` : null
|
|
3602
|
-
},
|
|
3714
|
+
}, Kr = [
|
|
3603
3715
|
".woff2",
|
|
3604
3716
|
".woff",
|
|
3605
3717
|
".ttf",
|
|
3606
3718
|
".otf",
|
|
3607
|
-
".ttc"
|
|
3719
|
+
".ttc",
|
|
3720
|
+
".otc"
|
|
3608
3721
|
].map((e) => ({
|
|
3609
3722
|
suffix: e,
|
|
3610
3723
|
place: (e, t) => t ? `${t}/${e}` : e
|
|
3611
|
-
})),
|
|
3612
|
-
|
|
3613
|
-
|
|
3724
|
+
})), qr = {
|
|
3725
|
+
suffix: ".metrics.json",
|
|
3726
|
+
async extract(e) {
|
|
3727
|
+
let t = await e.readJson();
|
|
3728
|
+
return t?.format === "sheetxl-font-metrics/1" ? {
|
|
3729
|
+
family: t.family,
|
|
3730
|
+
weight: t.weight,
|
|
3731
|
+
italic: t.italic
|
|
3732
|
+
} : null;
|
|
3733
|
+
},
|
|
3734
|
+
place: (e, t) => t ? `${t}/${e}` : e
|
|
3735
|
+
}, Jr = [{
|
|
3736
|
+
kind: Ur,
|
|
3737
|
+
files: [Gr]
|
|
3614
3738
|
}, {
|
|
3615
|
-
kind:
|
|
3616
|
-
files: [
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3739
|
+
kind: Wr,
|
|
3740
|
+
files: [
|
|
3741
|
+
qr,
|
|
3742
|
+
{
|
|
3743
|
+
suffix: ".hinted.json",
|
|
3744
|
+
async extract(e) {
|
|
3745
|
+
let t = await e.readJson();
|
|
3746
|
+
return t?.format === "sheetxl-font-hinting/1" ? {
|
|
3747
|
+
family: t.family,
|
|
3748
|
+
weight: t.weight,
|
|
3749
|
+
italic: t.italic,
|
|
3750
|
+
hinted: !0
|
|
3751
|
+
} : null;
|
|
3752
|
+
},
|
|
3753
|
+
place: qr.place
|
|
3625
3754
|
},
|
|
3626
|
-
|
|
3627
|
-
|
|
3755
|
+
{
|
|
3756
|
+
suffix: ".rows.json",
|
|
3757
|
+
async extract(e) {
|
|
3758
|
+
let t = await e.readJson();
|
|
3759
|
+
return t?.format === "sheetxl-font-rows/1" ? {
|
|
3760
|
+
family: t.family,
|
|
3761
|
+
weight: t.weight,
|
|
3762
|
+
italic: t.italic,
|
|
3763
|
+
rows: !0
|
|
3764
|
+
} : null;
|
|
3765
|
+
},
|
|
3766
|
+
place: qr.place
|
|
3767
|
+
},
|
|
3768
|
+
...Kr
|
|
3769
|
+
]
|
|
3628
3770
|
}];
|
|
3629
|
-
|
|
3771
|
+
async function Yr(e, t) {
|
|
3772
|
+
let { Chart: n } = await import("./Dyq_ivuHvlXLwPCl.mjs");
|
|
3773
|
+
return new n({
|
|
3774
|
+
json: e,
|
|
3775
|
+
getStyles: t?.getStyles
|
|
3776
|
+
});
|
|
3777
|
+
}
|
|
3778
|
+
Ar ||= {};
|
|
3630
3779
|
var Q = null;
|
|
3631
|
-
function
|
|
3780
|
+
function Xr() {
|
|
3632
3781
|
if (!Q) {
|
|
3633
|
-
let e = import("./
|
|
3782
|
+
let e = import("./DWNzqw7DUKwoxjri.mjs").then((e) => e.loadScriptingDeclarations());
|
|
3634
3783
|
e.catch(() => {
|
|
3635
3784
|
Q = null;
|
|
3636
3785
|
}), Q = e;
|
|
3637
3786
|
}
|
|
3638
3787
|
return Q;
|
|
3639
3788
|
}
|
|
3640
|
-
var
|
|
3641
|
-
function
|
|
3789
|
+
var Zr, Qr, $r, $ = null;
|
|
3790
|
+
function ei() {
|
|
3642
3791
|
if (!$) {
|
|
3643
|
-
let e = import("./
|
|
3792
|
+
let e = import("./DWNzqw7DUKwoxjri.mjs").then((e) => e.loadScriptingApi()).then((e) => JSON.parse(e));
|
|
3644
3793
|
e.catch(() => {
|
|
3645
3794
|
$ = null;
|
|
3646
3795
|
}), $ = e;
|
|
3647
3796
|
}
|
|
3648
3797
|
return $;
|
|
3649
3798
|
}
|
|
3650
|
-
|
|
3799
|
+
Zr ||= {}, (Qr ||= {}).Type = {
|
|
3651
3800
|
Button: "button",
|
|
3652
3801
|
CheckBox: "checkBox",
|
|
3653
3802
|
OptionButton: "optionButton",
|
|
@@ -3660,12 +3809,12 @@ Xr ||= {}, (Zr ||= {}).Type = {
|
|
|
3660
3809
|
EditBox: "editBox",
|
|
3661
3810
|
Dialog: "dialog",
|
|
3662
3811
|
Unknown: "formControl"
|
|
3663
|
-
}, (
|
|
3812
|
+
}, ($r ||= {}).DropStyle = {
|
|
3664
3813
|
Combo: "combo",
|
|
3665
3814
|
ComboEdit: "comboEdit",
|
|
3666
3815
|
Simple: "simple"
|
|
3667
3816
|
};
|
|
3668
|
-
var
|
|
3817
|
+
var ti = class extends qe {
|
|
3669
3818
|
constructor(e) {
|
|
3670
3819
|
super(e);
|
|
3671
3820
|
}
|
|
@@ -3678,8 +3827,8 @@ var ei = class extends ie {
|
|
|
3678
3827
|
colEnd: (e?.size?.width ?? 5) - 1,
|
|
3679
3828
|
rowEnd: (e?.size?.height ?? 5) - 1
|
|
3680
3829
|
},
|
|
3681
|
-
getRanges: (e) => new
|
|
3830
|
+
getRanges: (e) => new pe(null)
|
|
3682
3831
|
}, super._initializeOptions(e);
|
|
3683
3832
|
}
|
|
3684
|
-
},
|
|
3685
|
-
export {
|
|
3833
|
+
}, ni = "0.8.0-beta.11", ri = "2026-10-23T19:00:05.446Z";
|
|
3834
|
+
export { ke as AbstractCollection, r as AbstractMovableContent, Ye as AddressUtils, Hr as ArrayBackingStore, ie as AutoFill, ri as BUILD_DATE, se as ChartElementSelection, cn as ChartKinds, en as Color, me as Condition, tt as DateUtils, Br as DefaultWorkbookIO, _ as EXTERNAL_LINK_PATH_REL_TYPE, dr as ExternalRangeClipboardItem, Wr as FONTS_KIND, Ut as FontUtils, u as FormulaText, Yn as FunctionDeclarations, Ie as GeomUtils, Et as IAnchored, Bt as IBorders, E as ICalculation, Re as ICell, Kn as ICellHeaderRange, Je as ICellRange, Gn as ICellRanges, Zt as ICellStyle, $t as IColor, Qe as ICondition, $e as IConditionalFormat, X as ICustomProperty, ut as IDataValidation, $r as IDropDown, tn as IEffect, Qt as IFill, M as IFont, Ct as IFontCollection, F as IFontStyle, Qr as IFormControl, ln as IGeometry, Zr as IMovable, f as IPageLayout, Ar as IPicture, Wn as IResource, Fe as IScript, Gt as IShape, k as ISheet, h as ISlicerStyle, Cn as ISort, rn as IStroke, it as ITable, o as ITableStyle, Oe as IText, N as ITextFrame, Un as ITheme, le as IThemeCollection, vn as IWorkbookIO, rr as IWorkbookView, Ge as IWorksheetView, Ur as LOCALES_KIND, he as LicenseManager, St as MovableContentRegistry, ot as NamedStyleCollection, P as NumberFormat, sn as PaintUtils, or as PersonCollection, ur as RangeClipboardItem, Pn as RectAlignment, Te as Registry, jt as Resource, Le as ResourceCollection, dt as RichDataRegistry, bt as RichText, ze as RichTextKind, Jr as SHEETXL_RESOURCE_KINDS, an as SYSTEM_COLOR_CSS_PREFIX, zt as ShapeStyleUtils, Ve as SimpleFontFace, p as SlicerStyleCollection, Pe as Sort, Nt as StringCollection, _e as StyleCollection, ti as Table, ce as TableStyleCollection, Ce as TextRotation, ve as TextStacked, v as TextUtils, re as Theme, oe as ThemeCollection, t as TransactionConflictError, Sn as TransactionSaveStateManager, i as TransactionStore, yn as TransactionUndoManager, ae as Tuple, ni as VERSION, Fr as Workbook, Vr as WorkbookIO, K as WorkbookOrigin, mr as WorkbookView, A as Worksheet, Hn as builtInStyleNameDisplay, ge as createCellRangeCounts, Yr as createChart, x as externalBookClosedName, ne as externalBookFileName, fe as externalBookLocation, Ft as externalBookOpenName, Dt as findLabel, Xn as getBuiltInFunctionNames, pt as getLanguagePack, Kt as getLocaleProfile, ft as getScriptRuntime, ei as getScriptingApi, Xr as getScriptingDeclarations, ct as localizeBoolean, Xe as localizeErrorLabel, It as makeLocaleProfile, Pt as normalizeLabel, Ke as parseBooleanLocal, je as parseErrorLocal, c as parseExternalScope, Zn as parseFormulaLiteral, We as registerSdkLocales, Se as sourceEntryFromPath, xt as withScriptRuntime };
|