@sheetxl/io-xlsx 0.8.0-beta.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +8 -7
- package/browser/esm/7rZlWcm56hn3Jmnk.mjs +7021 -0
- package/browser/esm/AZus_5slvoIVhf1u.mjs +10323 -0
- package/browser/esm/B9QfzGvsvg-V3utu.mjs +4632 -0
- package/browser/esm/{C-2KaUyV4gs-sDTZ.mjs → BIR_Si489gIkGOnc.mjs} +194 -144
- package/browser/esm/{DsSIg46AR7IFBN5N.mjs → BJFvc-i40R4rPZ5y.mjs} +939 -804
- package/browser/esm/{D-epcZSoKLbsAIaC.mjs → BX8Ebx4NC5zp7_3J.mjs} +3 -3
- package/browser/esm/{CxtFawTfwRTCC4Xr.mjs → Bnxw38IvtA04zXEE.mjs} +2 -2
- package/browser/esm/CfVhYH77KdrR3fEK.mjs +24 -0
- package/browser/esm/index.mjs +3 -4
- package/browser/esm/jIQks3Crw6jehdDU.mjs +2474 -0
- package/browser/esm/{CRrTMRdN_IcSA_pm.mjs → qc9hnuR2z-whY8YO.mjs} +3 -3
- package/browser/esm/wZGpmkMUubNjClhG.mjs +104 -0
- package/licenses/dependencies.txt +2 -2
- package/node/esm/{BsTMtvwpQoPNv95M.mjs → BNLHWJHyy5eB0P_4.mjs} +2 -2
- package/node/esm/CVtsY2F9A9NzEGLk.mjs +2478 -0
- package/node/esm/CoeQ0LO-nNXiowwv.mjs +7284 -0
- package/node/esm/CxY3iIYLXVhCebeV.mjs +4746 -0
- package/node/esm/D2CZy9TQM9h2uqBh.mjs +2562 -0
- package/node/esm/{BCr4lCI6qQXXN0K1.mjs → Dm0hvKcR4xb0TV_N.mjs} +3 -3
- package/node/esm/_IA1gQ-zFQYQSZSs.mjs +6957 -0
- package/node/esm/index.mjs +65 -28
- package/node/esm/{CBtj0-a4l2qux2hA.mjs → zZFe3mW0xjmobowq.mjs} +3 -3
- package/package.json +9 -10
- package/types/src/AutoFilterRules.d.ts +34 -44
- package/types/src/ConditionalFormatRules.d.ts +2 -2
- package/types/src/DataTableFormula.d.ts +26 -0
- package/types/src/DataValidationRules.d.ts +0 -5
- package/types/src/DefinedNameAttributes.d.ts +8 -0
- package/types/src/ExcelCalcStamp.d.ts +0 -36
- package/types/src/ExcelCompat.d.ts +15 -143
- package/types/src/ExcelFunctionFacts.d.ts +0 -272
- package/types/src/ExcelReservedNames.d.ts +0 -65
- package/types/src/KnownFonts.d.ts +37 -0
- package/types/src/LegacyFormula.d.ts +1 -46
- package/types/src/OOXMLExtensions.d.ts +24 -2
- package/types/src/PageLayoutAttributes.d.ts +8 -0
- package/types/src/Plugin.d.ts +15 -3
- package/types/src/ProtectionAttributes.d.ts +2 -2
- package/types/src/SheetKinds.d.ts +42 -0
- package/types/src/SheetViewAttributes.d.ts +4 -0
- package/types/src/SortExtent.d.ts +16 -0
- package/types/src/SourcePackage.d.ts +0 -44
- package/types/src/SparklineGroups.d.ts +52 -0
- package/types/src/Types.d.ts +13 -3
- package/types/src/XlsxHeader.d.ts +19 -0
- package/types/src/chart/ChartExXml.d.ts +38 -0
- package/types/src/chart/ChartPartXml.d.ts +47 -0
- package/types/src/chart/ChartSpaceXml.d.ts +37 -0
- package/types/src/chart/_XmlTree.d.ts +34 -0
- package/types/src/chart/_chartCodecs.d.ts +12 -0
- package/types/src/chart/_chartExCodecs.d.ts +7 -0
- package/types/src/chart/_chartExFold.d.ts +14 -0
- package/types/src/chart/_chartExMarkup.d.ts +236 -0
- package/types/src/chart/_chartExStyle.d.ts +13 -0
- package/types/src/chart/_codec.d.ts +78 -0
- package/types/src/chart/_drawingml.d.ts +10 -0
- package/types/src/chart/_xml.d.ts +70 -0
- package/types/src/pivot/PivotArea.d.ts +20 -0
- package/types/src/pivot/PivotCacheRead.d.ts +30 -0
- package/types/src/pivot/PivotCacheWrite.d.ts +23 -0
- package/types/src/pivot/PivotFilters.d.ts +29 -0
- package/types/src/pivot/PivotFormats.d.ts +60 -0
- package/types/src/pivot/PivotTableRead.d.ts +44 -0
- package/types/src/pivot/PivotTableWrite.d.ts +13 -0
- package/types/src/pivot/_PivotCacheXml.d.ts +48 -0
- package/types/src/pivot/_PivotTableXml.d.ts +23 -0
- package/types/src/reader/CellControls.d.ts +18 -0
- package/types/src/reader/DocumentPropertiesRead.d.ts +16 -0
- package/types/src/reader/DummyFunctionUnwrap.d.ts +43 -23
- package/types/src/reader/HeaderStyles.d.ts +15 -0
- package/types/src/reader/IsoDateCell.d.ts +20 -0
- package/types/src/reader/LibreOfficeDataTable.d.ts +12 -0
- package/types/src/reader/PivotButtons.d.ts +14 -0
- package/types/src/reader/PivotCellFormats.d.ts +22 -0
- package/types/src/reader/SlicerJoin.d.ts +26 -0
- package/types/src/reader/ZipReader.d.ts +1 -1
- package/types/src/reader/_SlicerRecord.d.ts +59 -0
- package/types/src/reader/dom/DOMTransformer.d.ts +2 -2
- package/types/src/reader/domVisitors/AppPropertiesVisitor.d.ts +13 -1
- package/types/src/reader/domVisitors/AutoFilterVisitor.d.ts +3 -11
- package/types/src/reader/domVisitors/ColorContainerVisitor.d.ts +8 -1
- package/types/src/reader/domVisitors/CommentVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/DrawingElementVisitor.d.ts +13 -6
- package/types/src/reader/domVisitors/DrawingGraphicFrameVisitor.d.ts +9 -0
- package/types/src/reader/domVisitors/DrawingGrpSpVisitor.d.ts +10 -7
- package/types/src/reader/domVisitors/DrawingPicVisitor.d.ts +22 -13
- package/types/src/reader/domVisitors/DrawingSpVisitor.d.ts +5 -5
- package/types/src/reader/domVisitors/DrawingVisitor.d.ts +4 -2
- package/types/src/reader/domVisitors/ExternalLinkVisitor.d.ts +1 -11
- package/types/src/reader/domVisitors/FeaturePropertyBagVisitor.d.ts +18 -0
- package/types/src/reader/domVisitors/FmtSchemeVisitor.d.ts +0 -11
- package/types/src/reader/domVisitors/FontSchemeVisitor.d.ts +3 -2
- package/types/src/reader/domVisitors/ObjectDefaultsVisitor.d.ts +11 -0
- package/types/src/reader/domVisitors/SheetColorContainerVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/SheetStyleVisitor.d.ts +26 -5
- package/types/src/reader/domVisitors/SlicerCacheDefinitionVisitor.d.ts +11 -2
- package/types/src/reader/domVisitors/SlicersVisitor.d.ts +9 -3
- package/types/src/reader/domVisitors/SortStateVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/ThreadedCommentsVisitor.d.ts +2 -2
- package/types/src/reader/domVisitors/TimelinesVisitor.d.ts +13 -0
- package/types/src/reader/domVisitors/WorkbookVisitor.d.ts +0 -9
- package/types/src/reader/domVisitors/_Dxfs.d.ts +10 -0
- package/types/src/reader/domVisitors/index.d.ts +6 -34
- package/types/src/reader/saxVisitors/ContentTypesVisitor.d.ts +1 -0
- package/types/src/reader/saxVisitors/SharedStringsVisitor.d.ts +31 -6
- package/types/src/reader/saxVisitors/WorksheetVisitor.d.ts +26 -8
- package/types/src/richValue/ErrorRichValueHandler.d.ts +22 -0
- package/types/src/richValue/IRichValueHandler.d.ts +109 -0
- package/types/src/richValue/LocalImageRichValueHandler.d.ts +18 -0
- package/types/src/richValue/RichDataParts.d.ts +69 -0
- package/types/src/richValue/RichRecordWriter.d.ts +61 -0
- package/types/src/richValue/RichValueHandlers.d.ts +25 -0
- package/types/src/richValue/RichValueResolver.d.ts +54 -0
- package/types/src/richValue/WebImageRichValueHandler.d.ts +37 -0
- package/types/src/richValue/index.d.ts +7 -0
- package/types/src/utils/DrawingMLText.d.ts +2 -2
- package/types/src/utils/FormControls.d.ts +79 -6
- package/types/src/utils/SharedNames.d.ts +13 -0
- package/types/src/utils/SpreadsheetFont.d.ts +38 -0
- package/types/src/utils/VmlNoteShapes.d.ts +25 -32
- package/types/src/utils/VmlNoteStyle.d.ts +25 -0
- package/types/src/utils/VmlPrefixes.d.ts +24 -0
- package/types/src/vba/VBAProject.d.ts +0 -19
- package/types/src/writer/EvaluationSheet.d.ts +5 -0
- package/types/src/writer/builder/OpcXmlUtils.d.ts +0 -8
- package/types/src/writer/builder/PackageBuilder.d.ts +2 -41
- package/types/src/writer/builder/Types.d.ts +18 -28
- package/types/src/writer/emitters/CommentsEmitter.d.ts +3 -3
- package/types/src/writer/emitters/DrawingEmitter.d.ts +2 -2
- package/types/src/writer/emitters/ExternalLinkEmitter.d.ts +0 -11
- package/types/src/writer/emitters/FeaturePropertyBagEmitter.d.ts +8 -0
- package/types/src/writer/emitters/LegacyDrawingEmitter.d.ts +4 -4
- package/types/src/writer/emitters/PivotTableEmitter.d.ts +30 -1
- package/types/src/writer/emitters/PropsCoreEmitter.d.ts +7 -2
- package/types/src/writer/emitters/PropsCustomEmitter.d.ts +15 -0
- package/types/src/writer/emitters/RichValuePartsEmitters.d.ts +36 -0
- package/types/src/writer/emitters/RichValueRelEmitter.d.ts +12 -0
- package/types/src/writer/emitters/RichValueStructureEmitter.d.ts +4 -3
- package/types/src/writer/emitters/RichValueTypesEmitter.d.ts +3 -2
- package/types/src/writer/emitters/RichValueWebImageEmitter.d.ts +24 -0
- package/types/src/writer/emitters/SharedStringsEmitter.d.ts +6 -3
- package/types/src/writer/emitters/SlicerEmitter.d.ts +132 -0
- package/types/src/writer/emitters/StylesEmitter.d.ts +35 -2
- package/types/src/writer/emitters/TableEmitter.d.ts +14 -0
- package/types/src/writer/emitters/WorkbookEmitter.d.ts +24 -2
- package/types/src/writer/emitters/WorksheetEmitter.d.ts +4 -3
- package/types/src/writer/utils/AutoFilter.d.ts +3 -3
- package/types/src/writer/utils/CellControlComplements.d.ts +29 -0
- package/types/src/writer/utils/DateSystem.d.ts +6 -0
- package/types/src/writer/utils/DefaultRows.d.ts +22 -0
- package/types/src/writer/utils/DrawMLUtils.d.ts +8 -6
- package/types/src/writer/utils/DummyFunction.d.ts +0 -25
- package/types/src/writer/utils/DxfCollector.d.ts +14 -11
- package/types/src/writer/utils/PrstGeomUtils.d.ts +11 -3
- package/types/src/writer/utils/RichValueCollector.d.ts +81 -129
- package/types/src/writer/utils/SheetStyleLayout.d.ts +86 -0
- package/types/src/writer/utils/TextUtils.d.ts +6 -1
- package/types/src/writer/utils/UnsupportedFunctions.d.ts +2 -2
- package/types/src/writer/utils/XfVariants.d.ts +61 -0
- package/browser/cjs/B0Ugu_crqQYpdfQz.cjs +0 -1
- package/browser/cjs/B6sirGz6w-Bm7Ofo.cjs +0 -1
- package/browser/cjs/BHM3_D9PsNURVAVy.cjs +0 -1
- package/browser/cjs/BHWdwAQ322YA8JAZ.cjs +0 -6
- package/browser/cjs/CeuX8p1aBuKTuagi.cjs +0 -2
- package/browser/cjs/D3EWCPfCu-qMOIGd.cjs +0 -1
- package/browser/cjs/DSM4q1dhVVXvsgby.cjs +0 -30
- package/browser/cjs/DiAHwNv2I8RHE9GY.cjs +0 -1
- package/browser/cjs/index.cjs +0 -1
- package/browser/cjs/wrpXlaSBGEicQf6_.cjs +0 -6
- package/browser/cjs/xQ6-wbTw5UzZUM1Y.cjs +0 -1
- package/browser/esm/Bu64BYvRAlVftMr1.mjs +0 -67
- package/browser/esm/CWt4fDYEbj2hvsl_.mjs +0 -3346
- package/browser/esm/Ccnxz-y2WBEgfvvh.mjs +0 -6498
- package/browser/esm/Dx64JMAGwNNDBkC1.mjs +0 -4928
- package/browser/esm/Sv4twwEJDb9dZ91h.mjs +0 -149
- package/node/esm/BPn5XBizKkwaUqXB.mjs +0 -4285
- package/node/esm/BVV11IlqF6Lmlv8D.mjs +0 -154
- package/node/esm/BiJEEgltJzx94zIR.mjs +0 -3433
- package/node/esm/CkmZuMvRTpva7eQu.mjs +0 -5074
- package/node/esm/j0RE2usgdljRw_gr.mjs +0 -2345
- package/types/src/legacyChart/OOXMLMappings.d.ts +0 -8
- package/types/src/legacyChart/OOXMLUtils.d.ts +0 -78
- package/types/src/legacyChart/ToOOXMLConverter.d.ts +0 -30
- package/types/src/reader/domVisitors/AxisVisitor.d.ts +0 -12
- package/types/src/reader/domVisitors/BarChartTypeVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/ChartSpaceVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/ChartTypeVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/ChartVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/DataLabelsVisitor.d.ts +0 -8
- package/types/src/reader/domVisitors/DataPointVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/LayoutVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/LegendEntryVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/LegendVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/MarkerVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/NegativeShapeVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/PlotAreaVisitor.d.ts +0 -5
- package/types/src/reader/domVisitors/RichValueDataVisitor.d.ts +0 -7
- package/types/src/reader/domVisitors/RichValueStructureVisitor.d.ts +0 -6
- package/types/src/reader/domVisitors/SeriesVisitor.d.ts +0 -8
- package/types/src/reader/domVisitors/TitleVisitor.d.ts +0 -9
- package/types/src/writer/emitters/ChartColorsEmitter.d.ts +0 -7
- package/types/src/writer/emitters/ChartEmitter.d.ts +0 -14
- package/types/src/writer/emitters/ChartStyleEmitter.d.ts +0 -46
- package/types/src/writer/utils/HiddenFormulaXfs.d.ts +0 -28
|
@@ -0,0 +1,2474 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license @sheetxl/io-xlsx - SheetXL - Import/Export from/to Excel - v1.0.0
|
|
3
|
+
*
|
|
4
|
+
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
|
+
* License: SheetXL EULA — https://www.sheetxl.com/eula
|
|
6
|
+
*/
|
|
7
|
+
import { En as e, Sn as t, Tn as n, wn as r } from "./AZus_5slvoIVhf1u.mjs";
|
|
8
|
+
import { Color as i, FormulaError as a, IFill as o, IFontStyle as s } from "@sheetxl/sdk";
|
|
9
|
+
var c = [
|
|
10
|
+
"customMenu",
|
|
11
|
+
"description",
|
|
12
|
+
"help",
|
|
13
|
+
"statusBar",
|
|
14
|
+
"shortcutKey"
|
|
15
|
+
], l = [
|
|
16
|
+
"function",
|
|
17
|
+
"vbProcedure",
|
|
18
|
+
"xlm",
|
|
19
|
+
"publishToServer",
|
|
20
|
+
"workbookParameter"
|
|
21
|
+
], u = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords", d = class extends Error {}, f = () => {
|
|
22
|
+
throw new d();
|
|
23
|
+
}, p = {
|
|
24
|
+
t: "z",
|
|
25
|
+
v: 0
|
|
26
|
+
}, m = /<([snbdemx])((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/g, h = (e, t, n) => {
|
|
27
|
+
try {
|
|
28
|
+
return _(e, t, n);
|
|
29
|
+
} catch (e) {
|
|
30
|
+
if (e instanceof d) return null;
|
|
31
|
+
throw e;
|
|
32
|
+
}
|
|
33
|
+
}, g = (e) => {
|
|
34
|
+
let t = r(e, "cacheSource");
|
|
35
|
+
if (!t || n(t.attributes).get("type") !== "worksheet") return;
|
|
36
|
+
let i = r(e, "worksheetSource", t.contentStart, t.end);
|
|
37
|
+
if (!i) return;
|
|
38
|
+
let a = n(i.attributes);
|
|
39
|
+
if (a.has("r:id")) return;
|
|
40
|
+
let o = {};
|
|
41
|
+
for (let e of [
|
|
42
|
+
"ref",
|
|
43
|
+
"sheet",
|
|
44
|
+
"name"
|
|
45
|
+
]) {
|
|
46
|
+
let t = a.get(e);
|
|
47
|
+
t !== void 0 && (o[e] = t);
|
|
48
|
+
}
|
|
49
|
+
return o;
|
|
50
|
+
}, _ = (t, i, a) => {
|
|
51
|
+
let o = t.xml ?? f(), s = ee(o, "pivotCacheDefinition") ?? f(), c = n(s.attributes), l = c.get("r:id"), u = t.parts?.find((e) => e.id === l && e.type === "http://schemas.openxmlformats.org/officeDocument/2006/relationships/pivotCacheRecords")?.xml ?? null;
|
|
52
|
+
l !== void 0 && u === null && f();
|
|
53
|
+
let d = g(o) ?? f(), p = r(o, "cacheSource") ?? f(), m = r(o, "worksheetSource", p.contentStart, p.end) ?? f(), h = r(o, "cacheFields") ?? f(), _ = [], re = h.contentStart;
|
|
54
|
+
for (;;) {
|
|
55
|
+
let e = r(o, "cacheField", re, h.contentEnd);
|
|
56
|
+
if (!e) break;
|
|
57
|
+
_.push(ne(o, e, _.length, i, a)), re = e.end;
|
|
58
|
+
}
|
|
59
|
+
let v = r(o, "calculatedItems");
|
|
60
|
+
v && te(o, v, _);
|
|
61
|
+
let ie = u === null ? parseInt(c.get("recordCount") ?? "0", 10) : y(u, _.filter((e) => e.records !== null), i), b = [], ae = [];
|
|
62
|
+
for (let e = 0; e < _.length; e++) {
|
|
63
|
+
let t = _[e];
|
|
64
|
+
t.hasDate && t.hasNumber ? t.json.dateItems = t.dateItems : t.hasDate && (t.json.dates = !0), t.items.length > 0 && b.push([e, [[0, t.items]]]), t.records && t.records.length > 0 && ae.push([e, [[0, t.records]]]);
|
|
65
|
+
}
|
|
66
|
+
let oe = v ? o.substring(0, v.start) + o.substring(v.end) : o, se = r(oe, "cacheFields") ?? f(), x = oe.substring(0, se.start) + oe.substring(se.end), S = o.substring(m.start, m.start + m.attributes.length + 16);
|
|
67
|
+
x = x.replace(S, () => "<worksheetSource" + e(m.attributes, [
|
|
68
|
+
"ref",
|
|
69
|
+
"sheet",
|
|
70
|
+
"name"
|
|
71
|
+
])), x = x.replace(s.tag, () => "<pivotCacheDefinition" + e(s.attributes, [
|
|
72
|
+
"r:id",
|
|
73
|
+
"recordCount",
|
|
74
|
+
"refreshOnLoad"
|
|
75
|
+
]));
|
|
76
|
+
let C = {
|
|
77
|
+
source: d,
|
|
78
|
+
fields: _.map((e) => e.json),
|
|
79
|
+
items: b,
|
|
80
|
+
recordCount: ie,
|
|
81
|
+
rest: x
|
|
82
|
+
};
|
|
83
|
+
u !== null && (C.records = ae);
|
|
84
|
+
let ce = c.get("refreshOnLoad");
|
|
85
|
+
return ce !== "1" && ce !== "true" || (C.refreshOnLoad = !0), C;
|
|
86
|
+
}, ee = (e, t) => {
|
|
87
|
+
let n = RegExp(`<${t}((?:\\s+[^\\s=/>]+\\s*=\\s*(?:"[^"]*"|'[^']*'))*)`).exec(e);
|
|
88
|
+
return n ? {
|
|
89
|
+
tag: n[0],
|
|
90
|
+
attributes: n[1]
|
|
91
|
+
} : null;
|
|
92
|
+
}, te = (e, t, i) => {
|
|
93
|
+
let a = t.contentStart;
|
|
94
|
+
for (;;) {
|
|
95
|
+
let o = r(e, "calculatedItem", a, t.contentEnd);
|
|
96
|
+
if (!o) break;
|
|
97
|
+
a = o.end;
|
|
98
|
+
let s = n(o.attributes).get("formula") ?? f(), c = [...e.substring(o.contentStart, o.contentEnd).matchAll(/<reference\s[^>]*?field="(\d+)"[^>]*>\s*<x(?:\s+v="(\d+)")?\s*\/>\s*<\/reference>/g)];
|
|
99
|
+
c.length !== 1 && f();
|
|
100
|
+
let l = i[parseInt(c[0][1], 10)] ?? f();
|
|
101
|
+
(l.json.calculatedItems ??= []).push({
|
|
102
|
+
item: c[0][2] ? parseInt(c[0][2], 10) : 0,
|
|
103
|
+
formula: s
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}, ne = (i, a, o, s, c) => {
|
|
107
|
+
let l = n(a.attributes), u = { name: l.get("name") ?? f() }, d = l.get("numFmtId"), p = d === void 0 ? void 0 : c(parseInt(d, 10));
|
|
108
|
+
p !== void 0 && (u.numberFormat = p);
|
|
109
|
+
let h = l.get("databaseField") === "0";
|
|
110
|
+
h && (u.noRecords = !0);
|
|
111
|
+
let g = l.get("formula");
|
|
112
|
+
g !== void 0 && (u.formula = g);
|
|
113
|
+
let _ = r(i, "fieldGroup", a.contentStart, a.contentEnd);
|
|
114
|
+
_ && (u.group = ((e, i, a, o) => {
|
|
115
|
+
let s = n(i.attributes), c = (e) => e === void 0 ? void 0 : parseInt(e, 10), l = {
|
|
116
|
+
base: c(s.get("base")) ?? a,
|
|
117
|
+
items: []
|
|
118
|
+
}, u = c(s.get("par"));
|
|
119
|
+
u !== void 0 && (l.parent = u);
|
|
120
|
+
let d = r(e, "groupItems", i.contentStart, i.contentEnd);
|
|
121
|
+
if (d) {
|
|
122
|
+
let t = e.substring(d.contentStart, d.contentEnd);
|
|
123
|
+
m.lastIndex = 0;
|
|
124
|
+
let r, i = 0, a = {
|
|
125
|
+
items: l.items,
|
|
126
|
+
hasDate: !1,
|
|
127
|
+
hasNumber: !1,
|
|
128
|
+
dateItems: []
|
|
129
|
+
};
|
|
130
|
+
for (; r = m.exec(t);) (r[3] !== "/" || t.substring(i, r.index).trim()) && f(), l.items.push(v(r[1], n(r[2]).get("v"), a, o)), i = m.lastIndex;
|
|
131
|
+
t.substring(i).trim() && f(), a.hasDate && (l.dateItems = a.dateItems);
|
|
132
|
+
}
|
|
133
|
+
let p = r(e, "rangePr", i.contentStart, i.contentEnd);
|
|
134
|
+
if (p) {
|
|
135
|
+
let e = n(p.attributes), r = e.get("groupBy") ?? "range", i = r !== "range", a = (n) => {
|
|
136
|
+
let r = e.get(`${n}${i ? "Date" : "Num"}`) ?? f(), a = i ? t(r, o) : Number(r);
|
|
137
|
+
return a !== null && Number.isFinite(a) ? a : f();
|
|
138
|
+
}, s = {
|
|
139
|
+
by: i ? r : "numbers",
|
|
140
|
+
start: a("start"),
|
|
141
|
+
end: a("end")
|
|
142
|
+
}, c = e.get("groupInterval");
|
|
143
|
+
c !== void 0 && (s.interval = Number(c)), e.get("autoStart") === "0" && (s.fixedStart = !0), e.get("autoEnd") === "0" && (s.fixedEnd = !0), l.range = s;
|
|
144
|
+
}
|
|
145
|
+
let h = r(e, "discretePr", i.contentStart, i.contentEnd);
|
|
146
|
+
if (h) {
|
|
147
|
+
let t = e.substring(h.contentStart, h.contentEnd);
|
|
148
|
+
l.discrete = Array.from(t.matchAll(/<x((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*\/>/g), (e) => c(n(e[1]).get("v")) ?? 0);
|
|
149
|
+
}
|
|
150
|
+
return l;
|
|
151
|
+
})(i, _, o, s));
|
|
152
|
+
let ee = h ? null : r(i, "sharedItems", a.contentStart, a.contentEnd), te = {
|
|
153
|
+
json: u,
|
|
154
|
+
items: [],
|
|
155
|
+
byValue: null,
|
|
156
|
+
records: h ? null : [],
|
|
157
|
+
hasDate: !1,
|
|
158
|
+
hasNumber: !1,
|
|
159
|
+
dateItems: []
|
|
160
|
+
}, ne = [ee, _].filter((e) => !!e).sort((e, t) => e.start - t.start), y = "", ie = a.contentStart;
|
|
161
|
+
for (let e of ne) y += i.substring(ie, e.start), ie = e.end;
|
|
162
|
+
y += i.substring(ie, a.contentEnd), ee && re(i.substring(ee.contentStart, ee.contentEnd), te, s), h || te.items.length !== 0 || (u.inline = !0, te.byValue = /* @__PURE__ */ new Map());
|
|
163
|
+
let b = e(a.attributes, [
|
|
164
|
+
"name",
|
|
165
|
+
"numFmtId",
|
|
166
|
+
"databaseField",
|
|
167
|
+
"formula"
|
|
168
|
+
]);
|
|
169
|
+
return (b.trim() || y.trim()) && (u.rest = y.trim() ? `<cacheField${b}>${y}</cacheField>` : `<cacheField${b}/>`), te;
|
|
170
|
+
}, re = (e, t, r) => {
|
|
171
|
+
m.lastIndex = 0;
|
|
172
|
+
let i, a = 0;
|
|
173
|
+
for (; i = m.exec(e);) {
|
|
174
|
+
e.substring(a, i.index).trim() && f();
|
|
175
|
+
let [, o, s, c] = i;
|
|
176
|
+
c === "/" && o !== "x" || f();
|
|
177
|
+
let l = n(s);
|
|
178
|
+
for (let e of l.keys()) e !== "v" && e !== "u" && e !== "f" && f();
|
|
179
|
+
let u = l.get("u");
|
|
180
|
+
u !== "1" && u !== "true" || (t.json.unused ??= []).push(t.items.length), t.items.push(v(o, l.get("v"), t, r)), a = m.lastIndex;
|
|
181
|
+
}
|
|
182
|
+
e.substring(a).trim() && f();
|
|
183
|
+
}, v = (e, n, r, i) => {
|
|
184
|
+
switch (e) {
|
|
185
|
+
case "m": return p;
|
|
186
|
+
case "s": return n ?? f();
|
|
187
|
+
case "n": {
|
|
188
|
+
let e = n === void 0 ? NaN : Number(n);
|
|
189
|
+
return Number.isFinite(e) || f(), r.hasNumber = !0, e;
|
|
190
|
+
}
|
|
191
|
+
case "d": {
|
|
192
|
+
let e = n === void 0 ? null : t(n, i);
|
|
193
|
+
return e === null && f(), r.hasDate = !0, r.dateItems.push(r.items.length), e;
|
|
194
|
+
}
|
|
195
|
+
case "b": return n === "1" || n === "true";
|
|
196
|
+
case "e": {
|
|
197
|
+
let e = n === void 0 ? void 0 : a.getBuiltInByLabel(n);
|
|
198
|
+
return e || f(), {
|
|
199
|
+
t: "e",
|
|
200
|
+
v: e.getCode()
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
default: return f();
|
|
204
|
+
}
|
|
205
|
+
}, y = (e, t, n) => {
|
|
206
|
+
let i = r(e, "pivotCacheRecords") ?? f(), a = e.substring(i.contentStart, i.contentEnd), o = /<r>([\s\S]*?)<\/r>|<r\/>/g, s, c = 0, l = 0;
|
|
207
|
+
for (; s = o.exec(a);) a.substring(l, s.index).trim() && f(), ie(s[1] ?? "", t, n), c++, l = o.lastIndex;
|
|
208
|
+
return a.substring(l).trim() && f(), c;
|
|
209
|
+
}, ie = (e, t, r) => {
|
|
210
|
+
m.lastIndex = 0;
|
|
211
|
+
let i, a = 0, o = 0;
|
|
212
|
+
for (; i = m.exec(e);) {
|
|
213
|
+
e.substring(o, i.index).trim() && f();
|
|
214
|
+
let [, s, c, l] = i;
|
|
215
|
+
l !== "/" && f();
|
|
216
|
+
let u = t[a++] ?? f(), d = n(c);
|
|
217
|
+
for (let e of d.keys()) e !== "v" && f();
|
|
218
|
+
let p = d.get("v");
|
|
219
|
+
if (s === "x") {
|
|
220
|
+
let e = p === void 0 ? NaN : Number(p);
|
|
221
|
+
(u.byValue || !Number.isInteger(e) || e < 0 || e >= u.items.length) && f(), u.records.push(e);
|
|
222
|
+
} else {
|
|
223
|
+
let e = u.byValue ?? f(), t = s + (p ?? ""), n = e.get(t);
|
|
224
|
+
n === void 0 && (n = u.items.length, u.items.push(v(s, p, u, r)), e.set(t, n)), u.records.push(n);
|
|
225
|
+
}
|
|
226
|
+
o = m.lastIndex;
|
|
227
|
+
}
|
|
228
|
+
(e.substring(o).trim() || a !== t.length) && f();
|
|
229
|
+
}, b = /<!\[CDATA\[([\s\S]*?)\]\]>|<!--[\s\S]*?-->|<\?[\s\S]*?\?>|<!DOCTYPE[^>]*>|<(\/?)([^\s/>]+)((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>|([^<]+)/g, ae = {
|
|
230
|
+
amp: "&",
|
|
231
|
+
lt: "<",
|
|
232
|
+
gt: ">",
|
|
233
|
+
quot: "\"",
|
|
234
|
+
apos: "'"
|
|
235
|
+
}, oe = (e) => e.indexOf("&") === -1 ? e : e.replace(/&(#x[0-9a-fA-F]+|#\d+|\w+);/g, (e, t) => {
|
|
236
|
+
if (t[0] !== "#") return ae[t] ?? e;
|
|
237
|
+
let n = t[1] === "x" ? parseInt(t.slice(2), 16) : parseInt(t.slice(1), 10);
|
|
238
|
+
return Number.isFinite(n) ? String.fromCodePoint(n) : e;
|
|
239
|
+
}), se = (e) => {
|
|
240
|
+
let t = e.indexOf(":");
|
|
241
|
+
return t === -1 ? e : e.slice(t + 1);
|
|
242
|
+
}, x = (e) => {
|
|
243
|
+
let t = {
|
|
244
|
+
name: "",
|
|
245
|
+
qname: "",
|
|
246
|
+
attrs: "",
|
|
247
|
+
children: [],
|
|
248
|
+
start: 0,
|
|
249
|
+
end: e.length,
|
|
250
|
+
contentStart: 0,
|
|
251
|
+
contentEnd: e.length
|
|
252
|
+
}, n = [t];
|
|
253
|
+
b.lastIndex = 0;
|
|
254
|
+
for (let t = b.exec(e); t; t = b.exec(e)) {
|
|
255
|
+
let e = n[n.length - 1];
|
|
256
|
+
if (t[1] !== void 0) e.children.push(t[1]);
|
|
257
|
+
else if (t[6] !== void 0) e.children.push(oe(t[6]));
|
|
258
|
+
else if (t[3] !== void 0) {
|
|
259
|
+
if (t[2]) {
|
|
260
|
+
if (n.length > 1) {
|
|
261
|
+
let e = n.pop();
|
|
262
|
+
e.contentEnd = t.index, e.end = t.index + t[0].length;
|
|
263
|
+
}
|
|
264
|
+
continue;
|
|
265
|
+
}
|
|
266
|
+
let r = t.index + t[0].length, i = {
|
|
267
|
+
name: se(t[3]),
|
|
268
|
+
qname: t[3],
|
|
269
|
+
attrs: t[4] ?? "",
|
|
270
|
+
children: [],
|
|
271
|
+
start: t.index,
|
|
272
|
+
end: r,
|
|
273
|
+
contentStart: r,
|
|
274
|
+
contentEnd: r
|
|
275
|
+
};
|
|
276
|
+
e.children.push(i), t[5] || n.push(i);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return t.children.find((e) => typeof e != "string") ?? null;
|
|
280
|
+
}, S = (e) => e.children.filter((e) => typeof e != "string"), C = (e) => {
|
|
281
|
+
let t = "";
|
|
282
|
+
for (let n of e.children) typeof n == "string" && (t += n);
|
|
283
|
+
return t;
|
|
284
|
+
}, ce = "http://schemas.openxmlformats.org/drawingml/2006/chart", le = "http://purl.oclc.org/ooxml/drawingml/chart", ue = "http://schemas.openxmlformats.org/drawingml/2006/main", de = "http://purl.oclc.org/ooxml/drawingml/main", fe = "http://schemas.openxmlformats.org/officeDocument/2006/relationships", pe = "http://schemas.microsoft.com/office/drawing/2012/chart", me = "http://schemas.microsoft.com/office/drawing/2014/chartex", he = "http://www.w3.org/XML/1998/namespace", w = {
|
|
285
|
+
c: "c",
|
|
286
|
+
a: "a",
|
|
287
|
+
r: "r",
|
|
288
|
+
c15: "c15",
|
|
289
|
+
cx: "cx"
|
|
290
|
+
}, ge = (e) => e === ce || e === le, _e = (e) => e === ue || e === de, ve = (e) => e === me, ye = Object.freeze({ xml: he }), be = /([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g, T = (e) => {
|
|
291
|
+
let t = [];
|
|
292
|
+
be.lastIndex = 0;
|
|
293
|
+
for (let n = be.exec(e.attrs); n; n = be.exec(e.attrs)) t.push([n[1], oe(n[2] ?? n[3] ?? "")]);
|
|
294
|
+
return t;
|
|
295
|
+
}, xe = (e, t) => {
|
|
296
|
+
let n = null;
|
|
297
|
+
for (let [r, i] of T(e)) r === "xmlns" ? (n ??= { ...t })[""] = i : r.startsWith("xmlns:") && ((n ??= { ...t })[r.slice(6)] = i);
|
|
298
|
+
return n ?? t;
|
|
299
|
+
}, Se = (e, t) => t[((e) => {
|
|
300
|
+
let t = e.indexOf(":");
|
|
301
|
+
return t === -1 ? "" : e.slice(0, t);
|
|
302
|
+
})(e.qname)], Ce = class {
|
|
303
|
+
constructor() {
|
|
304
|
+
this._parts = [];
|
|
305
|
+
}
|
|
306
|
+
open(e, t, n = !1) {
|
|
307
|
+
let r = "<" + e;
|
|
308
|
+
if (t) for (let [e, n] of t) r += ` ${e}="${we(n)}"`;
|
|
309
|
+
return this._parts.push(r + (n ? "/>" : ">")), this;
|
|
310
|
+
}
|
|
311
|
+
close(e) {
|
|
312
|
+
return this._parts.push(`</${e}>`), this;
|
|
313
|
+
}
|
|
314
|
+
val(e, t) {
|
|
315
|
+
return this.open(e, [["val", t]], !0);
|
|
316
|
+
}
|
|
317
|
+
text(e) {
|
|
318
|
+
return this._parts.push(((e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"))(e)), this;
|
|
319
|
+
}
|
|
320
|
+
raw(e) {
|
|
321
|
+
return this._parts.push(e), this;
|
|
322
|
+
}
|
|
323
|
+
toString() {
|
|
324
|
+
return this._parts.join("");
|
|
325
|
+
}
|
|
326
|
+
}, we = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """), E = (e) => e === "1" || e === "true" || e !== "0" && e !== "false" && null, D = (e) => e ? "1" : "0", Te = /^[-+]?(?:\d+\.?\d*|\.\d+)(?:[eE][-+]?\d+)?$/, O = (e) => {
|
|
327
|
+
let t = E(e);
|
|
328
|
+
return t === null ? Te.test(e) ? String(Number(e)) : e : D(t);
|
|
329
|
+
}, Ee = /* @__PURE__ */ new Set(/* @__PURE__ */ "date1904.roundedCorners.autoTitleDeleted.plotVisOnly.showDLblsOverMax.varyColors.marker.smooth.invertIfNegative.bubble3D.delete.showLegendKey.showVal.showCatName.showSerName.showPercent.showBubbleSize.showLeaderLines.overlay.rAngAx.showHorzBorder.showVertBorder.showOutline.showKeys.auto.noMultiLvlLbl.wireframe.showNegBubbles.autoUpdate.applyToFront.applyToSides.applyToEnd.chartObject.data.formatting.selection.userInterface".split(".")), De = (e, t, n = !1) => {
|
|
330
|
+
let r = xe(e, t), i = Se(e, r) ?? "", a = [];
|
|
331
|
+
for (let [t, n] of T(e)) {
|
|
332
|
+
if (t === "xmlns" || t.startsWith("xmlns:")) continue;
|
|
333
|
+
let e = t.indexOf(":"), i = e === -1 ? t : `{${r[t.slice(0, e)] ?? t.slice(0, e)}}${t.slice(e + 1)}`;
|
|
334
|
+
a.push(`${i}=${JSON.stringify(O(n))}`);
|
|
335
|
+
}
|
|
336
|
+
let o = S(e), s = o.length === 0 ? e.children.join("") : "";
|
|
337
|
+
a.length === 0 && o.length === 0 && s === "" && ge(i) && Ee.has(e.name) && a.push("val=\"1\""), a.sort();
|
|
338
|
+
let c = `<{${i}}${e.name}${a.length ? " " + a.join(" ") : ""}>`;
|
|
339
|
+
if (o.length > 0) {
|
|
340
|
+
let t = [];
|
|
341
|
+
for (let i of e.children) typeof i == "string" ? i.trim() !== "" && t.push(JSON.stringify(i)) : t.push(De(i, r, n));
|
|
342
|
+
n && t.sort(), c += t.join("");
|
|
343
|
+
} else s !== "" && (c += JSON.stringify(s));
|
|
344
|
+
return c + "</>";
|
|
345
|
+
}, Oe = class {
|
|
346
|
+
constructor(e, t) {
|
|
347
|
+
this.xml = e, this.rootScope = t, this.kept = 0, this.reordered = 0;
|
|
348
|
+
let n = Object.values(t).find(ge) ?? ce, r = _e(t[w.a]) ? t[w.a] : ue;
|
|
349
|
+
this.writeScope = {
|
|
350
|
+
...t,
|
|
351
|
+
[w.c]: n,
|
|
352
|
+
[w.cx]: me,
|
|
353
|
+
[w.a]: r,
|
|
354
|
+
[w.r]: t[w.r] ?? fe
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
markupOf(e, t) {
|
|
358
|
+
let n = this.xml.slice(e.start, e.end), r = new Set(T(e).map(([e]) => e).filter((e) => e === "xmlns" || e.startsWith("xmlns:"))), i = "";
|
|
359
|
+
for (let e of Object.keys(t)) e !== "xml" && t[e] !== this.rootScope[e] && (r.has(e === "" ? "xmlns" : `xmlns:${e}`) || (i += e === "" ? ` xmlns="${t[e]}"` : ` xmlns:${e}="${t[e]}"`));
|
|
360
|
+
if (i) {
|
|
361
|
+
let t = 1 + e.qname.length;
|
|
362
|
+
n = n.slice(0, t) + i + n.slice(t);
|
|
363
|
+
}
|
|
364
|
+
return n;
|
|
365
|
+
}
|
|
366
|
+
}, ke = (e, t) => {
|
|
367
|
+
switch (e) {
|
|
368
|
+
case "c": return ge(t);
|
|
369
|
+
case "c15": return t === pe;
|
|
370
|
+
case "cx": return ve(t);
|
|
371
|
+
default: return _e(t);
|
|
372
|
+
}
|
|
373
|
+
}, k = (e, t, n, r) => {
|
|
374
|
+
let i = xe(e, n), a = {}, o, s;
|
|
375
|
+
for (let [n, r] of T(e)) {
|
|
376
|
+
let e = t.attributes?.find((e) => e.name === n), i = e ? e.read(r) : void 0;
|
|
377
|
+
e && i !== void 0 && O(e.write(i)) === O(r) ? a[e.key] = i : (o ??= {})[n] = r;
|
|
378
|
+
}
|
|
379
|
+
let c = -1, l = "", u = {};
|
|
380
|
+
for (let n of S(e)) {
|
|
381
|
+
let e = xe(n, i), o = Se(n, e), d = t.fields.findIndex((e) => e.tags.includes(n.name) && ke(e.ns, o)), f = d === -1 ? null : t.fields[d], p = f && !f.many ? f.get ? f.get(a) : a[f.key] : void 0, m = d > c || d === c && !!f?.many;
|
|
382
|
+
if (f && p === void 0 && (m || !f.many)) {
|
|
383
|
+
let t = f.read(n, e, r);
|
|
384
|
+
if (t !== void 0) {
|
|
385
|
+
f.many ? (a[f.key] ??= []).push(t) : f.set ? f.set(a, t) : a[f.key] = t, u[f.key] = (u[f.key] ?? 0) + 1, m ? (c = d, l = n.name) : r.reordered++;
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
let h = c === -1 ? null : t.fields[c], g = {
|
|
390
|
+
after: l,
|
|
391
|
+
xml: r.markupOf(n, i)
|
|
392
|
+
};
|
|
393
|
+
h?.many && (g.at = u[h.key]), (s ??= []).push(g);
|
|
394
|
+
}
|
|
395
|
+
return (o || s) && (a.unknown = {}, s && (a.unknown.elements = s), o && (a.unknown.attributes = o)), t.afterRead?.(a, e, i, r), a;
|
|
396
|
+
}, A = (e, t, n, r) => {
|
|
397
|
+
let i = [];
|
|
398
|
+
for (let e of r.attributes ?? []) {
|
|
399
|
+
let t = n[e.key];
|
|
400
|
+
t !== void 0 && i.push([e.name, e.write(t)]);
|
|
401
|
+
}
|
|
402
|
+
let a = n.unknown;
|
|
403
|
+
if (a?.attributes) for (let e of Object.keys(a.attributes)) i.push([e, a.attributes[e]]);
|
|
404
|
+
for (let e of r.declares?.(n) ?? []) i.some(([t]) => t === e[0]) || i.push(e);
|
|
405
|
+
let o = new Ce(), s = a?.elements ? [...a.elements] : [], c = (e) => {
|
|
406
|
+
for (let t = 0; t < s.length; t++) e(s[t]) && (o.raw(s[t].xml), s.splice(t--, 1));
|
|
407
|
+
};
|
|
408
|
+
c((e) => e.after === "");
|
|
409
|
+
for (let e of r.fields) {
|
|
410
|
+
let t = e.get ? e.get(n) : n[e.key], r = (t) => e.tags.includes(t.after);
|
|
411
|
+
if (e.many) {
|
|
412
|
+
let n = t ?? [];
|
|
413
|
+
for (let t = 0; t < n.length; t++) e.write(o, n[t]), c((e) => r(e) && e.at === t + 1);
|
|
414
|
+
} else t !== void 0 && e.write(o, t);
|
|
415
|
+
c(r);
|
|
416
|
+
}
|
|
417
|
+
c(() => !0);
|
|
418
|
+
let l = o.toString();
|
|
419
|
+
l === "" ? e.open(t, i, !0) : e.open(t, i).raw(l).close(t);
|
|
420
|
+
}, j = (e, t) => `${w[e]}:${t}`, M = (e, t, n = e, r = "c") => ({
|
|
421
|
+
tags: [e],
|
|
422
|
+
key: n,
|
|
423
|
+
ns: r,
|
|
424
|
+
read: (e) => {
|
|
425
|
+
let n = ((e) => {
|
|
426
|
+
if (S(e).length > 0) return;
|
|
427
|
+
let t = null;
|
|
428
|
+
for (let [n, r] of T(e)) {
|
|
429
|
+
if (n !== "val") return;
|
|
430
|
+
t = r;
|
|
431
|
+
}
|
|
432
|
+
return t;
|
|
433
|
+
})(e);
|
|
434
|
+
if (n === void 0) return;
|
|
435
|
+
if (t === "bool") return n === null || (E(n) ?? void 0);
|
|
436
|
+
if (n === null) return;
|
|
437
|
+
if (t === "str") return n;
|
|
438
|
+
let r = Number(n);
|
|
439
|
+
return Number.isFinite(r) && (t !== "int" || Number.isInteger(r)) && O(String(r)) === O(n) ? r : void 0;
|
|
440
|
+
},
|
|
441
|
+
write: (n, i) => {
|
|
442
|
+
n.val(j(r, e), t === "bool" ? D(i) : String(i));
|
|
443
|
+
}
|
|
444
|
+
}), N = (e, t = e, n = "c") => ({
|
|
445
|
+
tags: [e],
|
|
446
|
+
key: t,
|
|
447
|
+
ns: n,
|
|
448
|
+
read: (e) => {
|
|
449
|
+
if (!(S(e).length > 0 || T(e).some(([e]) => !e.startsWith("xmlns")))) return C(e);
|
|
450
|
+
},
|
|
451
|
+
write: (t, r) => {
|
|
452
|
+
let i = j(n, e);
|
|
453
|
+
r === "" ? t.open(i, null, !0) : t.open(i).text(r).close(i);
|
|
454
|
+
}
|
|
455
|
+
}), P = (e, t, n = e, r) => {
|
|
456
|
+
let i = r?.ns ?? "c", a = typeof t == "function" ? t : () => t;
|
|
457
|
+
return {
|
|
458
|
+
tags: [e],
|
|
459
|
+
key: n,
|
|
460
|
+
ns: i,
|
|
461
|
+
many: r?.many,
|
|
462
|
+
read: (e, t, n) => k(e, a(), t, n),
|
|
463
|
+
write: (t, n) => A(t, j(i, e), n, a())
|
|
464
|
+
};
|
|
465
|
+
}, F = (e, t, n = e, r = 1) => ({
|
|
466
|
+
name: e,
|
|
467
|
+
key: n,
|
|
468
|
+
read: (e) => {
|
|
469
|
+
if (t === "str") return e;
|
|
470
|
+
if (t === "bool") return E(e) ?? void 0;
|
|
471
|
+
let n = Number(e);
|
|
472
|
+
return Number.isFinite(n) && (t !== "int" || Number.isInteger(n)) ? r === 1 ? n : n / r : void 0;
|
|
473
|
+
},
|
|
474
|
+
write: (e) => t === "bool" ? D(e) : t === "str" ? e : String(r === 1 ? e : Math.round(e * r))
|
|
475
|
+
}), Ae = (e, t, n, r) => ({
|
|
476
|
+
name: e,
|
|
477
|
+
key: t,
|
|
478
|
+
read: n,
|
|
479
|
+
write: r
|
|
480
|
+
}), je = (e) => ({
|
|
481
|
+
...e,
|
|
482
|
+
read: (t, n, r) => {
|
|
483
|
+
let i = e.read(t, n, r);
|
|
484
|
+
if (i === void 0) return;
|
|
485
|
+
let a = new Ce();
|
|
486
|
+
e.write(a, i);
|
|
487
|
+
let o = ((e, t) => {
|
|
488
|
+
let n = x(e);
|
|
489
|
+
return n ? De(n, t) : null;
|
|
490
|
+
})(a.toString(), r.writeScope) === De(t, n);
|
|
491
|
+
return o || r.kept++, o ? i : void 0;
|
|
492
|
+
}
|
|
493
|
+
}), I = (e) => `a:${e}`, Me = /* @__PURE__ */ new Set([
|
|
494
|
+
"bg1",
|
|
495
|
+
"tx1",
|
|
496
|
+
"bg2",
|
|
497
|
+
"tx2",
|
|
498
|
+
"accent1",
|
|
499
|
+
"accent2",
|
|
500
|
+
"accent3",
|
|
501
|
+
"accent4",
|
|
502
|
+
"accent5",
|
|
503
|
+
"accent6",
|
|
504
|
+
"hlink",
|
|
505
|
+
"folHlink",
|
|
506
|
+
"phClr",
|
|
507
|
+
"dk1",
|
|
508
|
+
"lt1",
|
|
509
|
+
"dk2",
|
|
510
|
+
"lt2"
|
|
511
|
+
]), Ne = /* @__PURE__ */ new Set(/* @__PURE__ */ "scrollBar.background.activeCaption.inactiveCaption.menu.window.windowFrame.menuText.windowText.captionText.activeBorder.inactiveBorder.appWorkspace.highlight.highlightText.btnFace.btnShadow.grayText.btnText.inactiveCaptionText.btnHighlight.3dDkShadow.3dLight.infoText.infoBk.hotLight.gradientActiveCaption.gradientInactiveCaption.menuHighlight.menuBar".split(".")), Pe = [
|
|
512
|
+
"scrgbClr",
|
|
513
|
+
"srgbClr",
|
|
514
|
+
"hslClr",
|
|
515
|
+
"sysClr",
|
|
516
|
+
"schemeClr",
|
|
517
|
+
"prstClr"
|
|
518
|
+
], Fe = (e) => e === "hue" || e === "hueOff" || e === "hueMod" ? 6e4 : e === "alpha" || e === "alphaOff" || e === "alphaMod" ? 1e5 : 1e3, L = (e, t) => {
|
|
519
|
+
let n = {};
|
|
520
|
+
for (let [r, i] of T(e)) {
|
|
521
|
+
if (!t.includes(r)) return null;
|
|
522
|
+
n[r] = i;
|
|
523
|
+
}
|
|
524
|
+
return n;
|
|
525
|
+
}, R = /^-?\d+$/, Ie = (e) => {
|
|
526
|
+
let t = S(e);
|
|
527
|
+
return t.length === 0 ? null : t.length > 1 || !Pe.includes(t[0].name) ? void 0 : ((e) => {
|
|
528
|
+
let t;
|
|
529
|
+
switch (e.name) {
|
|
530
|
+
case "scrgbClr": {
|
|
531
|
+
let n = L(e, [
|
|
532
|
+
"r",
|
|
533
|
+
"g",
|
|
534
|
+
"b"
|
|
535
|
+
]);
|
|
536
|
+
if (!(n && R.test(n.r ?? "") && R.test(n.g ?? "") && R.test(n.b ?? ""))) return;
|
|
537
|
+
t = `lrgb(${Number(n.r) / 1e3},${Number(n.g) / 1e3},${Number(n.b) / 1e3})`;
|
|
538
|
+
break;
|
|
539
|
+
}
|
|
540
|
+
case "hslClr": {
|
|
541
|
+
let n = L(e, [
|
|
542
|
+
"hue",
|
|
543
|
+
"sat",
|
|
544
|
+
"lum"
|
|
545
|
+
]);
|
|
546
|
+
if (!(n && R.test(n.hue ?? "") && R.test(n.sat ?? "") && R.test(n.lum ?? ""))) return;
|
|
547
|
+
t = `hsl(${Number(n.hue) / 6e4},${Number(n.sat) / 1e3},${Number(n.lum) / 1e3})`;
|
|
548
|
+
break;
|
|
549
|
+
}
|
|
550
|
+
case "sysClr": {
|
|
551
|
+
let n = L(e, ["val", "lastClr"]);
|
|
552
|
+
if (!n?.val || !Ne.has(n.val)) return;
|
|
553
|
+
t = n.lastClr === void 0 ? n.val : `${n.val} lastClr ${n.lastClr}`;
|
|
554
|
+
break;
|
|
555
|
+
}
|
|
556
|
+
default: {
|
|
557
|
+
let n = L(e, ["val"]);
|
|
558
|
+
if (!n?.val || /\s/.test(n.val) || (Me.has(n.val) ? "schemeClr" : /^[0-9A-Fa-f]{6}$/.test(n.val) ? "srgbClr" : "prstClr") !== e.name) return;
|
|
559
|
+
t = n.val;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
for (let n of S(e)) {
|
|
563
|
+
if (S(n).length > 0) return;
|
|
564
|
+
let e = L(n, ["val"]);
|
|
565
|
+
if (!e) return;
|
|
566
|
+
if (e.val !== void 0) {
|
|
567
|
+
if (!R.test(e.val)) return;
|
|
568
|
+
t += ` ${n.name} ${Number(e.val) / Fe(n.name)}`;
|
|
569
|
+
} else t += ` ${n.name}`;
|
|
570
|
+
}
|
|
571
|
+
return t;
|
|
572
|
+
})(t[0]);
|
|
573
|
+
}, Le = /^-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?$/i, Re = (e, t) => {
|
|
574
|
+
let n = ((e) => {
|
|
575
|
+
let t = e.trim(), n = /^[a-z]+\([^)]*\)|^[^\s,]+/i.exec(t)?.[0] ?? t, r = t.slice(n.length).split(/\s*,\s*|\s+/).filter((e) => e !== "");
|
|
576
|
+
return [n.replace(/\s+/g, ""), ...r];
|
|
577
|
+
})(t), r = n.shift(), a, o, s = /^(lrgb|hsl)\(([^,]+),([^,]+),([^)]+)\)$/.exec(r);
|
|
578
|
+
if (s?.[1] === "lrgb") a = "scrgbClr", o = [
|
|
579
|
+
["r", String(Math.round(1e3 * Number(s[2])))],
|
|
580
|
+
["g", String(Math.round(1e3 * Number(s[3])))],
|
|
581
|
+
["b", String(Math.round(1e3 * Number(s[4])))]
|
|
582
|
+
];
|
|
583
|
+
else if (s?.[1] === "hsl") a = "hslClr", o = [
|
|
584
|
+
["hue", String(Math.round(6e4 * Number(s[2])))],
|
|
585
|
+
["sat", String(Math.round(1e3 * Number(s[3])))],
|
|
586
|
+
["lum", String(Math.round(1e3 * Number(s[4])))]
|
|
587
|
+
];
|
|
588
|
+
else if (n[0] === "lastClr" || Ne.has(r)) a = "sysClr", o = [["val", r]], n[0] === "lastClr" && (n.shift(), o.push(["lastClr", n.shift()]));
|
|
589
|
+
else {
|
|
590
|
+
let e = ((e) => {
|
|
591
|
+
if (Me.has(e) || /^[0-9A-Fa-f]{6}$/.test(e) || /^[a-z]+$/i.test(e)) return null;
|
|
592
|
+
let t;
|
|
593
|
+
try {
|
|
594
|
+
t = new i(e);
|
|
595
|
+
} catch {
|
|
596
|
+
return null;
|
|
597
|
+
}
|
|
598
|
+
let n = t.getType();
|
|
599
|
+
return n === "hex" || n === "rgb" || n === "hsl" ? t.toHex().toString(!1).replace("#", "").toUpperCase() : null;
|
|
600
|
+
})(r);
|
|
601
|
+
a = e ? "srgbClr" : Me.has(r) ? "schemeClr" : /^[0-9A-Fa-f]{6}$/.test(r) ? "srgbClr" : "prstClr", o = [["val", e ?? r]];
|
|
602
|
+
}
|
|
603
|
+
if (n.length !== 0) {
|
|
604
|
+
e.open(I(a), o);
|
|
605
|
+
for (let t = 0; t < n.length; t++) {
|
|
606
|
+
let r = n[t];
|
|
607
|
+
t + 1 < n.length && Le.test(n[t + 1]) ? e.val(I(r), String(Math.round(Number(n[++t]) * Fe(r)))) : e.open(I(r), null, !0);
|
|
608
|
+
}
|
|
609
|
+
e.close(I(a));
|
|
610
|
+
} else e.open(I(a), o, !0);
|
|
611
|
+
}, ze = (e, t, n, r) => {
|
|
612
|
+
n === void 0 ? e.open(I(t), r, !0) : (e.open(I(t), r), Re(e, n), e.close(I(t)));
|
|
613
|
+
}, Be = [
|
|
614
|
+
"noFill",
|
|
615
|
+
"solidFill",
|
|
616
|
+
"gradFill",
|
|
617
|
+
"pattFill",
|
|
618
|
+
"grpFill"
|
|
619
|
+
], Ve = (e) => {
|
|
620
|
+
let t = L(e, [
|
|
621
|
+
"l",
|
|
622
|
+
"t",
|
|
623
|
+
"r",
|
|
624
|
+
"b"
|
|
625
|
+
]);
|
|
626
|
+
if (!t) return;
|
|
627
|
+
let n = {};
|
|
628
|
+
return t.l !== void 0 && (n.left = Number(t.l) / 1e3), t.t !== void 0 && (n.top = Number(t.t) / 1e3), t.r !== void 0 && (n.right = Number(t.r) / 1e3), t.b !== void 0 && (n.bottom = Number(t.b) / 1e3), n;
|
|
629
|
+
}, He = (e, t, n) => {
|
|
630
|
+
let r = [];
|
|
631
|
+
n.left !== void 0 && r.push(["l", String(Math.round(1e3 * n.left))]), n.top !== void 0 && r.push(["t", String(Math.round(1e3 * n.top))]), n.right !== void 0 && r.push(["r", String(Math.round(1e3 * n.right))]), n.bottom !== void 0 && r.push(["b", String(Math.round(1e3 * n.bottom))]), e.open(I(t), r, !0);
|
|
632
|
+
}, Ue = (e) => {
|
|
633
|
+
switch (e.name) {
|
|
634
|
+
case "noFill": return S(e).length === 0 && T(e).length === 0 ? { type: o.Type.None } : void 0;
|
|
635
|
+
case "grpFill": return S(e).length === 0 && T(e).length === 0 ? { type: o.Type.Group } : void 0;
|
|
636
|
+
case "solidFill": {
|
|
637
|
+
if (T(e).length > 0) return;
|
|
638
|
+
let t = Ie(e);
|
|
639
|
+
return t === void 0 ? void 0 : t === null ? { type: o.Type.Solid } : {
|
|
640
|
+
type: o.Type.Solid,
|
|
641
|
+
color: t
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
case "gradFill": return ((e) => {
|
|
645
|
+
let t = L(e, ["rotWithShape", "flip"]);
|
|
646
|
+
if (!t) return;
|
|
647
|
+
let n = { type: o.Type.Gradient };
|
|
648
|
+
if (t.rotWithShape !== void 0) {
|
|
649
|
+
let e = E(t.rotWithShape);
|
|
650
|
+
if (e === null) return;
|
|
651
|
+
n.isRotatedWithShape = e;
|
|
652
|
+
}
|
|
653
|
+
t.flip !== void 0 && (n.flip = t.flip);
|
|
654
|
+
for (let t of S(e)) if (t.name === "gsLst") {
|
|
655
|
+
let e = [];
|
|
656
|
+
for (let n of S(t)) {
|
|
657
|
+
let t = n.name === "gs" ? L(n, ["pos"]) : null, r = t && R.test(t.pos ?? "") ? Ie(n) : void 0;
|
|
658
|
+
if (!r) return;
|
|
659
|
+
e.push({
|
|
660
|
+
offset: Number(t.pos) / 1e5,
|
|
661
|
+
color: r
|
|
662
|
+
});
|
|
663
|
+
}
|
|
664
|
+
n.stops = e;
|
|
665
|
+
} else if (t.name === "lin") {
|
|
666
|
+
let e = L(t, ["ang", "scaled"]);
|
|
667
|
+
if (!e || S(t).length > 0) return;
|
|
668
|
+
if (n.gradientType = o.GradientType.Linear, e.ang !== void 0) {
|
|
669
|
+
if (!R.test(e.ang)) return;
|
|
670
|
+
n.angle = (Number(e.ang) / 6e4 + 90) % 360;
|
|
671
|
+
}
|
|
672
|
+
if (e.scaled !== void 0) {
|
|
673
|
+
let t = E(e.scaled);
|
|
674
|
+
if (t === null) return;
|
|
675
|
+
n.scaled = t;
|
|
676
|
+
}
|
|
677
|
+
} else if (t.name === "path") {
|
|
678
|
+
let e = L(t, ["path"]);
|
|
679
|
+
if (!e) return;
|
|
680
|
+
n.gradientType = e.path === "circle" ? o.GradientType.Path : e.path;
|
|
681
|
+
let r = S(t);
|
|
682
|
+
if (r.length > 1 || r.length === 1 && r[0].name !== "fillToRect") return;
|
|
683
|
+
if (r.length === 1) {
|
|
684
|
+
let e = Ve(r[0]);
|
|
685
|
+
if (!e) return;
|
|
686
|
+
n.focus = {
|
|
687
|
+
left: (e.left ?? 0) / 100,
|
|
688
|
+
top: (e.top ?? 0) / 100,
|
|
689
|
+
right: 1 - (e.right ?? 0) / 100,
|
|
690
|
+
bottom: 1 - (e.bottom ?? 0) / 100
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
} else {
|
|
694
|
+
if (t.name !== "tileRect") return;
|
|
695
|
+
{
|
|
696
|
+
let e = Ve(t);
|
|
697
|
+
if (!e) return;
|
|
698
|
+
n.tileRect = e;
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return n;
|
|
702
|
+
})(e);
|
|
703
|
+
case "pattFill": {
|
|
704
|
+
let t = L(e, ["prst"]);
|
|
705
|
+
if (!t) return;
|
|
706
|
+
let n = { type: o.Type.Pattern };
|
|
707
|
+
t.prst !== void 0 && (n.patternType = t.prst);
|
|
708
|
+
for (let t of S(e)) {
|
|
709
|
+
let e = t.name === "fgClr" || t.name === "bgClr" ? Ie(t) : void 0;
|
|
710
|
+
if (!e) return;
|
|
711
|
+
t.name === "fgClr" ? n.foreground = e : n.background = e;
|
|
712
|
+
}
|
|
713
|
+
return n;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
}, We = (e, t) => {
|
|
717
|
+
switch (t.type) {
|
|
718
|
+
case o.Type.None:
|
|
719
|
+
e.open(I("noFill"), null, !0);
|
|
720
|
+
return;
|
|
721
|
+
case o.Type.Group:
|
|
722
|
+
e.open(I("grpFill"), null, !0);
|
|
723
|
+
return;
|
|
724
|
+
case o.Type.Solid:
|
|
725
|
+
ze(e, "solidFill", t.color);
|
|
726
|
+
return;
|
|
727
|
+
case o.Type.Gradient:
|
|
728
|
+
((e, t) => {
|
|
729
|
+
let n = [];
|
|
730
|
+
if (t.flip !== void 0 && n.push(["flip", t.flip]), t.isRotatedWithShape !== void 0 && n.push(["rotWithShape", D(t.isRotatedWithShape)]), e.open(I("gradFill"), n), t.stops) {
|
|
731
|
+
e.open(I("gsLst"));
|
|
732
|
+
for (let n of t.stops) {
|
|
733
|
+
let { offset: t, color: r } = typeof n == "string" ? {
|
|
734
|
+
offset: 0,
|
|
735
|
+
color: n
|
|
736
|
+
} : n;
|
|
737
|
+
ze(e, "gs", r, [["pos", String(Math.round(1e5 * (t ?? 0)))]]);
|
|
738
|
+
}
|
|
739
|
+
e.close(I("gsLst"));
|
|
740
|
+
}
|
|
741
|
+
if (t.gradientType === o.GradientType.Linear) {
|
|
742
|
+
let n = [];
|
|
743
|
+
t.angle !== void 0 && n.push(["ang", String(Math.round((t.angle - 90 + 360) % 360 * 6e4))]), t.scaled !== void 0 && n.push(["scaled", D(t.scaled)]), e.open(I("lin"), n, !0);
|
|
744
|
+
} else if (t.gradientType !== void 0) {
|
|
745
|
+
let n = t.gradientType === o.GradientType.Path ? "circle" : t.gradientType;
|
|
746
|
+
t.focus ? (e.open(I("path"), [["path", n]]), He(e, "fillToRect", {
|
|
747
|
+
left: 100 * t.focus.left,
|
|
748
|
+
top: 100 * t.focus.top,
|
|
749
|
+
right: 100 * (1 - t.focus.right),
|
|
750
|
+
bottom: 100 * (1 - t.focus.bottom)
|
|
751
|
+
}), e.close(I("path"))) : e.open(I("path"), [["path", n]], !0);
|
|
752
|
+
}
|
|
753
|
+
t.tileRect && He(e, "tileRect", t.tileRect), e.close(I("gradFill"));
|
|
754
|
+
})(e, t);
|
|
755
|
+
return;
|
|
756
|
+
case o.Type.Pattern: {
|
|
757
|
+
let n = t, r = n.patternType === void 0 ? [] : [["prst", n.patternType]];
|
|
758
|
+
n.foreground === void 0 && n.background === void 0 ? e.open(I("pattFill"), r, !0) : (e.open(I("pattFill"), r), n.foreground !== void 0 && ze(e, "fgClr", n.foreground), n.background !== void 0 && ze(e, "bgClr", n.background), e.close(I("pattFill")));
|
|
759
|
+
return;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
throw Error(`A chart cannot write a fill of type '${t.type}'.`);
|
|
763
|
+
}, Ge = (e) => je({
|
|
764
|
+
tags: Be,
|
|
765
|
+
key: e,
|
|
766
|
+
ns: "a",
|
|
767
|
+
read: (e) => Ue(e),
|
|
768
|
+
write: (e, t) => We(e, t)
|
|
769
|
+
}), Ke = {
|
|
770
|
+
tags: ["effectLst"],
|
|
771
|
+
key: "effects",
|
|
772
|
+
ns: "a",
|
|
773
|
+
read: (e) => S(e).length === 0 && T(e).length === 0 ? [] : void 0,
|
|
774
|
+
write: (e, t) => {
|
|
775
|
+
if (t.length > 0) throw Error("A chart cannot write effects yet.");
|
|
776
|
+
e.open(I("effectLst"), null, !0);
|
|
777
|
+
}
|
|
778
|
+
}, qe = {
|
|
779
|
+
rnd: "round",
|
|
780
|
+
flat: "butt",
|
|
781
|
+
sq: "square"
|
|
782
|
+
}, Je = (e, t) => ({
|
|
783
|
+
tags: [e],
|
|
784
|
+
key: `${t}Type`,
|
|
785
|
+
ns: "a",
|
|
786
|
+
read: (e) => {
|
|
787
|
+
let t = L(e, [
|
|
788
|
+
"type",
|
|
789
|
+
"w",
|
|
790
|
+
"len"
|
|
791
|
+
]);
|
|
792
|
+
if (t && !(S(e).length > 0) && Object.keys(t).length !== 0) return t;
|
|
793
|
+
},
|
|
794
|
+
write: (t, n) => {
|
|
795
|
+
let r = [];
|
|
796
|
+
for (let e of [
|
|
797
|
+
"type",
|
|
798
|
+
"w",
|
|
799
|
+
"len"
|
|
800
|
+
]) n[e] !== void 0 && r.push([e, n[e]]);
|
|
801
|
+
t.open(I(e), r, !0);
|
|
802
|
+
},
|
|
803
|
+
get: (e) => {
|
|
804
|
+
let n = {};
|
|
805
|
+
return e[`${t}Type`] !== void 0 && (n.type = e[`${t}Type`]), e[`${t}Width`] !== void 0 && (n.w = e[`${t}Width`]), e[`${t}Length`] !== void 0 && (n.len = e[`${t}Length`]), Object.keys(n).length > 0 ? n : void 0;
|
|
806
|
+
},
|
|
807
|
+
set: (e, n) => {
|
|
808
|
+
n.type !== void 0 && (e[`${t}Type`] = n.type), n.w !== void 0 && (e[`${t}Width`] = n.w), n.len !== void 0 && (e[`${t}Length`] = n.len);
|
|
809
|
+
}
|
|
810
|
+
}), Ye = {
|
|
811
|
+
attributes: [
|
|
812
|
+
F("w", "int", "width", 12700),
|
|
813
|
+
Ae("cap", "lineCap", (e) => qe[e], (e) => Object.keys(qe).find((t) => qe[t] === e)),
|
|
814
|
+
F("cmpd", "str", "compound"),
|
|
815
|
+
F("algn", "str", "align")
|
|
816
|
+
],
|
|
817
|
+
fields: [
|
|
818
|
+
Ge("fill"),
|
|
819
|
+
{
|
|
820
|
+
tags: ["prstDash", "custDash"],
|
|
821
|
+
key: "dash",
|
|
822
|
+
ns: "a",
|
|
823
|
+
read: (e) => {
|
|
824
|
+
if (e.name === "prstDash") {
|
|
825
|
+
let t = L(e, ["val"]);
|
|
826
|
+
return t?.val !== void 0 && S(e).length === 0 ? t.val : void 0;
|
|
827
|
+
}
|
|
828
|
+
if (T(e).length > 0) return;
|
|
829
|
+
let t = [];
|
|
830
|
+
for (let n of S(e)) {
|
|
831
|
+
let e = n.name === "ds" ? L(n, ["d", "sp"]) : null;
|
|
832
|
+
if (!e || !R.test(e.d ?? "") || !R.test(e.sp ?? "")) return;
|
|
833
|
+
t.push(Number(e.d) / 1e3, Number(e.sp) / 1e3);
|
|
834
|
+
}
|
|
835
|
+
return t;
|
|
836
|
+
},
|
|
837
|
+
write: (e, t) => {
|
|
838
|
+
if (typeof t != "string") {
|
|
839
|
+
e.open(I("custDash"));
|
|
840
|
+
for (let n = 0; n < t.length; n += 2) e.open(I("ds"), [["d", String(Math.round(1e3 * t[n]))], ["sp", String(Math.round(1e3 * t[n + 1]))]], !0);
|
|
841
|
+
e.close(I("custDash"));
|
|
842
|
+
} else e.val(I("prstDash"), t);
|
|
843
|
+
}
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
tags: [
|
|
847
|
+
"round",
|
|
848
|
+
"bevel",
|
|
849
|
+
"miter"
|
|
850
|
+
],
|
|
851
|
+
key: "lineJoin",
|
|
852
|
+
ns: "a",
|
|
853
|
+
read: (e) => {
|
|
854
|
+
let t = L(e, e.name === "miter" ? ["lim"] : []);
|
|
855
|
+
if (t && !(S(e).length > 0) && (t.lim === void 0 || R.test(t.lim))) return {
|
|
856
|
+
join: e.name,
|
|
857
|
+
limit: t.lim === void 0 ? void 0 : Number(t.lim) / 1e5
|
|
858
|
+
};
|
|
859
|
+
},
|
|
860
|
+
write: (e, t) => {
|
|
861
|
+
e.open(I(t.join), t.limit === void 0 ? null : [["lim", String(Math.round(1e5 * t.limit))]], !0);
|
|
862
|
+
},
|
|
863
|
+
get: (e) => e.lineJoin ? {
|
|
864
|
+
join: e.lineJoin,
|
|
865
|
+
limit: e.miterLimit
|
|
866
|
+
} : void 0,
|
|
867
|
+
set: (e, t) => {
|
|
868
|
+
e.lineJoin = t.join, t.limit !== void 0 && (e.miterLimit = t.limit);
|
|
869
|
+
}
|
|
870
|
+
},
|
|
871
|
+
Je("headEnd", "head"),
|
|
872
|
+
Je("tailEnd", "tail")
|
|
873
|
+
]
|
|
874
|
+
}, Xe = (e) => je(P("ln", Ye, e, { ns: "a" })), Ze = { fields: [
|
|
875
|
+
Ge("fill"),
|
|
876
|
+
Xe("stroke"),
|
|
877
|
+
Ke
|
|
878
|
+
] }, Qe = (e, t, n) => ({
|
|
879
|
+
tags: [e],
|
|
880
|
+
key: t,
|
|
881
|
+
ns: "a",
|
|
882
|
+
read: (e) => {
|
|
883
|
+
let t = L(e, ["typeface"]);
|
|
884
|
+
if (!(t?.typeface === void 0 || S(e).length > 0)) return n && t.typeface === `+mn-${n}` ? s.ThemeFamily.Body : n && t.typeface === `+mj-${n}` ? s.ThemeFamily.Heading : t.typeface;
|
|
885
|
+
},
|
|
886
|
+
write: (t, r) => {
|
|
887
|
+
let i = n ? r === s.ThemeFamily.Body ? `+mn-${n}` : r === s.ThemeFamily.Heading ? `+mj-${n}` : r : r;
|
|
888
|
+
t.open(I(e), [["typeface", i]], !0);
|
|
889
|
+
}
|
|
890
|
+
}), $e = (e, t, n) => {
|
|
891
|
+
let r = Object.fromEntries(Object.entries(n).map(([e, t]) => [t, e]));
|
|
892
|
+
return Ae(e, t, (e) => r[e], (e) => n[e] ?? e);
|
|
893
|
+
}, et = {
|
|
894
|
+
attributes: [
|
|
895
|
+
F("lang", "str", "language"),
|
|
896
|
+
F("altLang", "str", "alternateLanguage"),
|
|
897
|
+
F("sz", "int", "size", 100),
|
|
898
|
+
Ae("b", "weight", (e) => {
|
|
899
|
+
let t = E(e);
|
|
900
|
+
return t === null ? void 0 : t ? 700 : 400;
|
|
901
|
+
}, (e) => D(e >= 600)),
|
|
902
|
+
Ae("i", "style", (e) => {
|
|
903
|
+
let t = E(e);
|
|
904
|
+
return t === null ? void 0 : t ? "italic" : "normal";
|
|
905
|
+
}, (e) => D(e === "italic")),
|
|
906
|
+
$e("u", "underline", {
|
|
907
|
+
none: "none",
|
|
908
|
+
words: "words",
|
|
909
|
+
single: "sng",
|
|
910
|
+
double: "dbl",
|
|
911
|
+
heavy: "heavy",
|
|
912
|
+
dotted: "dotted",
|
|
913
|
+
dottedHeavy: "dottedHeavy",
|
|
914
|
+
dash: "dash",
|
|
915
|
+
dashHeavy: "dashHeavy",
|
|
916
|
+
dashLong: "dashLong",
|
|
917
|
+
dashLongHeavy: "dashLongHeavy",
|
|
918
|
+
dotDash: "dotDash",
|
|
919
|
+
dotDashHeavy: "dotDashHeavy",
|
|
920
|
+
dotDotDash: "dotDotDash",
|
|
921
|
+
dotDotDashHeavy: "dotDotDashHeavy",
|
|
922
|
+
wavy: "wavy",
|
|
923
|
+
wavyHeavy: "wavyHeavy",
|
|
924
|
+
wavyDouble: "wavyDbl"
|
|
925
|
+
}),
|
|
926
|
+
$e("strike", "strike", {
|
|
927
|
+
none: "noStrike",
|
|
928
|
+
single: "sngStrike",
|
|
929
|
+
double: "dblStrike"
|
|
930
|
+
}),
|
|
931
|
+
F("kern", "int", "kerning", 100),
|
|
932
|
+
$e("cap", "capitals", {
|
|
933
|
+
none: "none",
|
|
934
|
+
small: "small",
|
|
935
|
+
all: "all"
|
|
936
|
+
}),
|
|
937
|
+
F("spc", "int", "letterSpacing", 100),
|
|
938
|
+
F("normalizeH", "bool", "normalizeHeight"),
|
|
939
|
+
F("baseline", "int", "baseline", 1e3)
|
|
940
|
+
],
|
|
941
|
+
fields: [
|
|
942
|
+
Xe("outline"),
|
|
943
|
+
Ge("color"),
|
|
944
|
+
Ke,
|
|
945
|
+
Qe("latin", "latin", "lt"),
|
|
946
|
+
Qe("ea", "eastAsian", "ea"),
|
|
947
|
+
Qe("cs", "complexScript", "cs"),
|
|
948
|
+
Qe("sym", "symbol")
|
|
949
|
+
]
|
|
950
|
+
}, tt = {
|
|
951
|
+
attributes: [F("algn", "str", "align"), F("rtl", "bool", "rtl")],
|
|
952
|
+
fields: [P("defRPr", et, "defaultRun", { ns: "a" })]
|
|
953
|
+
}, nt = { fields: [P("rPr", et, "rPr", { ns: "a" }), {
|
|
954
|
+
tags: ["t"],
|
|
955
|
+
key: "text",
|
|
956
|
+
ns: "a",
|
|
957
|
+
read: (e) => {
|
|
958
|
+
if (S(e).length > 0) return;
|
|
959
|
+
let t = !1;
|
|
960
|
+
for (let [n, r] of T(e)) if (n !== "xmlns" && !n.startsWith("xmlns:")) {
|
|
961
|
+
if (n !== "xml:space" || r !== "preserve") return;
|
|
962
|
+
t = !0;
|
|
963
|
+
}
|
|
964
|
+
return {
|
|
965
|
+
text: C(e),
|
|
966
|
+
preserve: t
|
|
967
|
+
};
|
|
968
|
+
},
|
|
969
|
+
get: (e) => e.text === void 0 ? void 0 : {
|
|
970
|
+
text: e.text,
|
|
971
|
+
preserve: !0 === e.preserveSpace
|
|
972
|
+
},
|
|
973
|
+
set: (e, t) => {
|
|
974
|
+
e.text = t.text, t.preserve && (e.preserveSpace = !0);
|
|
975
|
+
},
|
|
976
|
+
write: (e, t) => {
|
|
977
|
+
let n = I("t"), r = t.preserve ? [["xml:space", "preserve"]] : null;
|
|
978
|
+
t.text === "" ? e.open(n, r, !0) : e.open(n, r).text(t.text).close(n);
|
|
979
|
+
}
|
|
980
|
+
}] }, rt = {
|
|
981
|
+
attributes: [F("id", "str", "id"), F("type", "str", "type")],
|
|
982
|
+
fields: nt.fields
|
|
983
|
+
}, it = { fields: [P("rPr", et, "rPr", { ns: "a" })] }, at = { fields: [
|
|
984
|
+
P("pPr", tt, "pPr", { ns: "a" }),
|
|
985
|
+
{
|
|
986
|
+
tags: [
|
|
987
|
+
"r",
|
|
988
|
+
"br",
|
|
989
|
+
"fld"
|
|
990
|
+
],
|
|
991
|
+
key: "runs",
|
|
992
|
+
ns: "a",
|
|
993
|
+
many: !0,
|
|
994
|
+
read: (e, t, n) => {
|
|
995
|
+
if (e.name === "br") return {
|
|
996
|
+
...k(e, it, t, n),
|
|
997
|
+
text: "\n",
|
|
998
|
+
break: !0
|
|
999
|
+
};
|
|
1000
|
+
if (e.name === "r") {
|
|
1001
|
+
let r = k(e, nt, t, n);
|
|
1002
|
+
return r.text === void 0 ? void 0 : r;
|
|
1003
|
+
}
|
|
1004
|
+
let { id: r, type: i, ...a } = k(e, rt, t, n);
|
|
1005
|
+
return r === void 0 ? void 0 : (a.text ??= "", a.field = i === void 0 ? { id: r } : {
|
|
1006
|
+
id: r,
|
|
1007
|
+
type: i
|
|
1008
|
+
}, a);
|
|
1009
|
+
},
|
|
1010
|
+
write: (e, t) => {
|
|
1011
|
+
if (t.break) {
|
|
1012
|
+
let { text: n, break: r, ...i } = t;
|
|
1013
|
+
A(e, I("br"), i, it);
|
|
1014
|
+
} else if (t.field) {
|
|
1015
|
+
let { field: n, ...r } = t;
|
|
1016
|
+
A(e, I("fld"), {
|
|
1017
|
+
...r,
|
|
1018
|
+
id: n.id,
|
|
1019
|
+
type: n.type
|
|
1020
|
+
}, rt);
|
|
1021
|
+
} else A(e, I("r"), t, nt);
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
P("endParaRPr", et, "endRun", { ns: "a" })
|
|
1025
|
+
] }, ot = { fields: [
|
|
1026
|
+
P("bodyPr", {
|
|
1027
|
+
attributes: [
|
|
1028
|
+
F("rot", "int", "rotation", 6e4),
|
|
1029
|
+
F("spcFirstLastPara", "bool", "spcFirstLastPara"),
|
|
1030
|
+
F("vertOverflow", "str", "vertOverflow"),
|
|
1031
|
+
F("horzOverflow", "str", "horzOverflow"),
|
|
1032
|
+
F("vert", "str", "vert"),
|
|
1033
|
+
F("wrap", "str", "wrap"),
|
|
1034
|
+
F("lIns", "int", "lIns"),
|
|
1035
|
+
F("tIns", "int", "tIns"),
|
|
1036
|
+
F("rIns", "int", "rIns"),
|
|
1037
|
+
F("bIns", "int", "bIns"),
|
|
1038
|
+
F("anchor", "str", "anchor"),
|
|
1039
|
+
F("anchorCtr", "bool", "anchorCtr")
|
|
1040
|
+
],
|
|
1041
|
+
fields: []
|
|
1042
|
+
}, "bodyPr", { ns: "a" }),
|
|
1043
|
+
P("lstStyle", { fields: [] }, "lstStyle", { ns: "a" }),
|
|
1044
|
+
P("p", at, "paragraphs", {
|
|
1045
|
+
ns: "a",
|
|
1046
|
+
many: !0
|
|
1047
|
+
})
|
|
1048
|
+
] }, z = () => P("spPr", Ze), B = () => P("txPr", ot), st = {
|
|
1049
|
+
attributes: [F("idx", "int"), F("formatCode", "str")],
|
|
1050
|
+
fields: [N("v")]
|
|
1051
|
+
}, ct = { fields: [
|
|
1052
|
+
N("formatCode"),
|
|
1053
|
+
M("ptCount", "int"),
|
|
1054
|
+
P("pt", st, "points", { many: !0 })
|
|
1055
|
+
] }, lt = { fields: [M("ptCount", "int"), P("pt", st, "points", { many: !0 })] }, ut = { fields: [M("ptCount", "int"), P("lvl", { fields: [P("pt", st, "points", { many: !0 })] }, "levels", { many: !0 })] }, dt = { fields: [N("f"), P("numCache", ct, "cache")] }, ft = { fields: [N("f"), P("strCache", lt, "cache")] }, pt = { fields: [N("f"), P("multiLvlStrCache", ut, "cache")] }, mt = P("datalabelsRange", { fields: [N("f", "f", "c15"), P("dlblRangeCache", lt, "cache", { ns: "c15" })] }, "datalabelsRange", { ns: "c15" }), ht = {
|
|
1056
|
+
...mt,
|
|
1057
|
+
read: (e, t, n) => t[w.c15] === pe ? mt.read(e, t, n) : void 0
|
|
1058
|
+
}, gt = M("showDataLabelsRange", "bool", "showDataLabelsRange", "c15"), _t = {
|
|
1059
|
+
...gt,
|
|
1060
|
+
read: (e, t, n) => t[w.c15] === pe ? gt.read(e, t, n) : void 0
|
|
1061
|
+
}, vt = { fields: [P("ext", {
|
|
1062
|
+
attributes: [F("uri", "str")],
|
|
1063
|
+
fields: [ht, _t],
|
|
1064
|
+
declares: (e) => e.datalabelsRange !== void 0 || e.showDataLabelsRange !== void 0 ? [[`xmlns:${w.c15}`, pe]] : []
|
|
1065
|
+
}, "extensions", { many: !0 })] }, yt = { fields: [
|
|
1066
|
+
P("multiLvlStrRef", pt),
|
|
1067
|
+
P("numRef", dt),
|
|
1068
|
+
P("numLit", ct),
|
|
1069
|
+
P("strRef", ft),
|
|
1070
|
+
P("strLit", lt)
|
|
1071
|
+
] }, bt = { fields: [P("strRef", ft), N("v")] }, xt = { fields: [P("strRef", ft), P("rich", ot)] }, St = {
|
|
1072
|
+
attributes: [F("formatCode", "str"), F("sourceLinked", "bool")],
|
|
1073
|
+
fields: []
|
|
1074
|
+
}, V = { fields: [P("manualLayout", { fields: [
|
|
1075
|
+
M("layoutTarget", "str"),
|
|
1076
|
+
M("xMode", "str"),
|
|
1077
|
+
M("yMode", "str"),
|
|
1078
|
+
M("wMode", "str"),
|
|
1079
|
+
M("hMode", "str"),
|
|
1080
|
+
M("x", "num"),
|
|
1081
|
+
M("y", "num"),
|
|
1082
|
+
M("w", "num"),
|
|
1083
|
+
M("h", "num")
|
|
1084
|
+
] })] }, Ct = { fields: [
|
|
1085
|
+
P("tx", xt),
|
|
1086
|
+
P("layout", V),
|
|
1087
|
+
M("overlay", "bool"),
|
|
1088
|
+
z(),
|
|
1089
|
+
B()
|
|
1090
|
+
] }, wt = { fields: [z()] }, Tt = { fields: [
|
|
1091
|
+
M("symbol", "str"),
|
|
1092
|
+
M("size", "int"),
|
|
1093
|
+
z()
|
|
1094
|
+
] }, Et = { fields: [
|
|
1095
|
+
M("idx", "int"),
|
|
1096
|
+
M("invertIfNegative", "bool"),
|
|
1097
|
+
P("marker", Tt),
|
|
1098
|
+
M("bubble3D", "bool"),
|
|
1099
|
+
M("explosion", "int"),
|
|
1100
|
+
z()
|
|
1101
|
+
] }, Dt = () => [
|
|
1102
|
+
P("numFmt", St),
|
|
1103
|
+
z(),
|
|
1104
|
+
B(),
|
|
1105
|
+
M("dLblPos", "str"),
|
|
1106
|
+
M("showLegendKey", "bool"),
|
|
1107
|
+
M("showVal", "bool"),
|
|
1108
|
+
M("showCatName", "bool"),
|
|
1109
|
+
M("showSerName", "bool"),
|
|
1110
|
+
M("showPercent", "bool"),
|
|
1111
|
+
M("showBubbleSize", "bool"),
|
|
1112
|
+
N("separator")
|
|
1113
|
+
], Ot = { fields: [
|
|
1114
|
+
P("dLbl", { fields: [
|
|
1115
|
+
M("idx", "int"),
|
|
1116
|
+
M("delete", "bool"),
|
|
1117
|
+
P("layout", V),
|
|
1118
|
+
P("tx", xt),
|
|
1119
|
+
...Dt(),
|
|
1120
|
+
P("extLst", vt)
|
|
1121
|
+
] }, "labels", { many: !0 }),
|
|
1122
|
+
M("delete", "bool"),
|
|
1123
|
+
...Dt(),
|
|
1124
|
+
M("showLeaderLines", "bool"),
|
|
1125
|
+
P("leaderLines", wt),
|
|
1126
|
+
P("extLst", vt)
|
|
1127
|
+
] }, kt = { fields: [
|
|
1128
|
+
P("layout", V),
|
|
1129
|
+
P("tx", xt),
|
|
1130
|
+
P("numFmt", St),
|
|
1131
|
+
z(),
|
|
1132
|
+
B()
|
|
1133
|
+
] }, At = { fields: [
|
|
1134
|
+
N("name"),
|
|
1135
|
+
z(),
|
|
1136
|
+
M("trendlineType", "str"),
|
|
1137
|
+
M("order", "int"),
|
|
1138
|
+
M("period", "int"),
|
|
1139
|
+
M("forward", "num"),
|
|
1140
|
+
M("backward", "num"),
|
|
1141
|
+
M("intercept", "num"),
|
|
1142
|
+
M("dispRSqr", "bool"),
|
|
1143
|
+
M("dispEq", "bool"),
|
|
1144
|
+
P("trendlineLbl", kt)
|
|
1145
|
+
] }, jt = { fields: [
|
|
1146
|
+
M("errDir", "str"),
|
|
1147
|
+
M("errBarType", "str"),
|
|
1148
|
+
M("errValType", "str"),
|
|
1149
|
+
M("noEndCap", "bool"),
|
|
1150
|
+
P("plus", yt),
|
|
1151
|
+
P("minus", yt),
|
|
1152
|
+
M("val", "num"),
|
|
1153
|
+
z(),
|
|
1154
|
+
P("extLst", vt)
|
|
1155
|
+
] }, Mt = { fields: [
|
|
1156
|
+
M("gapWidth", "int"),
|
|
1157
|
+
P("upBars", wt),
|
|
1158
|
+
P("downBars", wt)
|
|
1159
|
+
] }, H = () => [
|
|
1160
|
+
M("idx", "int"),
|
|
1161
|
+
M("order", "int"),
|
|
1162
|
+
P("tx", bt),
|
|
1163
|
+
z()
|
|
1164
|
+
], U = () => P("dPt", Et, "points", { many: !0 }), W = () => P("dLbls", Ot), Nt = () => P("trendline", At, "trendlines", { many: !0 }), Pt = () => P("errBars", jt, "errBars", { many: !0 }), G = (e) => P(e, yt), K = () => P("extLst", vt), Ft = {
|
|
1165
|
+
bar: { fields: [
|
|
1166
|
+
...H(),
|
|
1167
|
+
M("invertIfNegative", "bool"),
|
|
1168
|
+
U(),
|
|
1169
|
+
W(),
|
|
1170
|
+
Nt(),
|
|
1171
|
+
Pt(),
|
|
1172
|
+
G("cat"),
|
|
1173
|
+
G("val"),
|
|
1174
|
+
M("shape", "str"),
|
|
1175
|
+
K()
|
|
1176
|
+
] },
|
|
1177
|
+
line: { fields: [
|
|
1178
|
+
...H(),
|
|
1179
|
+
P("marker", Tt),
|
|
1180
|
+
U(),
|
|
1181
|
+
W(),
|
|
1182
|
+
Nt(),
|
|
1183
|
+
Pt(),
|
|
1184
|
+
G("cat"),
|
|
1185
|
+
G("val"),
|
|
1186
|
+
M("smooth", "bool"),
|
|
1187
|
+
K()
|
|
1188
|
+
] },
|
|
1189
|
+
area: { fields: [
|
|
1190
|
+
...H(),
|
|
1191
|
+
U(),
|
|
1192
|
+
W(),
|
|
1193
|
+
Nt(),
|
|
1194
|
+
Pt(),
|
|
1195
|
+
G("cat"),
|
|
1196
|
+
G("val"),
|
|
1197
|
+
K()
|
|
1198
|
+
] },
|
|
1199
|
+
pie: { fields: [
|
|
1200
|
+
...H(),
|
|
1201
|
+
M("explosion", "int"),
|
|
1202
|
+
U(),
|
|
1203
|
+
W(),
|
|
1204
|
+
G("cat"),
|
|
1205
|
+
G("val"),
|
|
1206
|
+
K()
|
|
1207
|
+
] },
|
|
1208
|
+
scatter: { fields: [
|
|
1209
|
+
...H(),
|
|
1210
|
+
P("marker", Tt),
|
|
1211
|
+
U(),
|
|
1212
|
+
W(),
|
|
1213
|
+
Nt(),
|
|
1214
|
+
Pt(),
|
|
1215
|
+
G("xVal"),
|
|
1216
|
+
G("yVal"),
|
|
1217
|
+
M("smooth", "bool"),
|
|
1218
|
+
K()
|
|
1219
|
+
] },
|
|
1220
|
+
bubble: { fields: [
|
|
1221
|
+
...H(),
|
|
1222
|
+
M("invertIfNegative", "bool"),
|
|
1223
|
+
U(),
|
|
1224
|
+
W(),
|
|
1225
|
+
Nt(),
|
|
1226
|
+
Pt(),
|
|
1227
|
+
G("xVal"),
|
|
1228
|
+
G("yVal"),
|
|
1229
|
+
G("bubbleSize"),
|
|
1230
|
+
M("bubble3D", "bool"),
|
|
1231
|
+
K()
|
|
1232
|
+
] },
|
|
1233
|
+
radar: { fields: [
|
|
1234
|
+
...H(),
|
|
1235
|
+
P("marker", Tt),
|
|
1236
|
+
U(),
|
|
1237
|
+
W(),
|
|
1238
|
+
G("cat"),
|
|
1239
|
+
G("val"),
|
|
1240
|
+
K()
|
|
1241
|
+
] },
|
|
1242
|
+
surface: { fields: [
|
|
1243
|
+
...H(),
|
|
1244
|
+
G("cat"),
|
|
1245
|
+
G("val"),
|
|
1246
|
+
K()
|
|
1247
|
+
] }
|
|
1248
|
+
}, q = (e) => P("ser", Ft[e], "series", { many: !0 }), J = () => ({
|
|
1249
|
+
...M("axId", "int", "axIds"),
|
|
1250
|
+
many: !0
|
|
1251
|
+
}), Y = (e, t) => P(e, wt, e, { many: t }), It = {
|
|
1252
|
+
tags: ["custSplit"],
|
|
1253
|
+
key: "custSplit",
|
|
1254
|
+
ns: "c",
|
|
1255
|
+
read: (e, t, n) => {
|
|
1256
|
+
let r = k(e, { fields: [{
|
|
1257
|
+
...M("secondPiePt", "int", "points"),
|
|
1258
|
+
many: !0
|
|
1259
|
+
}] }, t, n);
|
|
1260
|
+
return r.unknown ? void 0 : r.points ?? [];
|
|
1261
|
+
},
|
|
1262
|
+
write: (e, t) => {
|
|
1263
|
+
A(e, "c:custSplit", { points: t }, { fields: [{
|
|
1264
|
+
...M("secondPiePt", "int", "points"),
|
|
1265
|
+
many: !0
|
|
1266
|
+
}] });
|
|
1267
|
+
}
|
|
1268
|
+
}, Lt = { fields: [M("idx", "int"), z()] }, Rt = {
|
|
1269
|
+
tags: ["bandFmts"],
|
|
1270
|
+
key: "bandFmts",
|
|
1271
|
+
ns: "c",
|
|
1272
|
+
read: (e, t, n) => {
|
|
1273
|
+
let r = k(e, { fields: [P("bandFmt", Lt, "formats", { many: !0 })] }, t, n);
|
|
1274
|
+
return r.unknown ? void 0 : r.formats ?? [];
|
|
1275
|
+
},
|
|
1276
|
+
write: (e, t) => {
|
|
1277
|
+
A(e, "c:bandFmts", { formats: t }, { fields: [P("bandFmt", Lt, "formats", { many: !0 })] });
|
|
1278
|
+
}
|
|
1279
|
+
}, zt = {
|
|
1280
|
+
areaChart: {
|
|
1281
|
+
type: "area",
|
|
1282
|
+
codec: { fields: [
|
|
1283
|
+
M("grouping", "str"),
|
|
1284
|
+
M("varyColors", "bool"),
|
|
1285
|
+
q("area"),
|
|
1286
|
+
W(),
|
|
1287
|
+
Y("dropLines"),
|
|
1288
|
+
J()
|
|
1289
|
+
] }
|
|
1290
|
+
},
|
|
1291
|
+
area3DChart: {
|
|
1292
|
+
type: "area",
|
|
1293
|
+
is3D: !0,
|
|
1294
|
+
codec: { fields: [
|
|
1295
|
+
M("grouping", "str"),
|
|
1296
|
+
M("varyColors", "bool"),
|
|
1297
|
+
q("area"),
|
|
1298
|
+
W(),
|
|
1299
|
+
Y("dropLines"),
|
|
1300
|
+
M("gapDepth", "int"),
|
|
1301
|
+
J()
|
|
1302
|
+
] }
|
|
1303
|
+
},
|
|
1304
|
+
lineChart: {
|
|
1305
|
+
type: "line",
|
|
1306
|
+
codec: { fields: [
|
|
1307
|
+
M("grouping", "str"),
|
|
1308
|
+
M("varyColors", "bool"),
|
|
1309
|
+
q("line"),
|
|
1310
|
+
W(),
|
|
1311
|
+
Y("dropLines"),
|
|
1312
|
+
Y("hiLowLines"),
|
|
1313
|
+
P("upDownBars", Mt),
|
|
1314
|
+
M("marker", "bool"),
|
|
1315
|
+
M("smooth", "bool"),
|
|
1316
|
+
J()
|
|
1317
|
+
] }
|
|
1318
|
+
},
|
|
1319
|
+
line3DChart: {
|
|
1320
|
+
type: "line",
|
|
1321
|
+
is3D: !0,
|
|
1322
|
+
codec: { fields: [
|
|
1323
|
+
M("grouping", "str"),
|
|
1324
|
+
M("varyColors", "bool"),
|
|
1325
|
+
q("line"),
|
|
1326
|
+
W(),
|
|
1327
|
+
Y("dropLines"),
|
|
1328
|
+
M("gapDepth", "int"),
|
|
1329
|
+
J()
|
|
1330
|
+
] }
|
|
1331
|
+
},
|
|
1332
|
+
stockChart: {
|
|
1333
|
+
type: "stock",
|
|
1334
|
+
codec: { fields: [
|
|
1335
|
+
q("line"),
|
|
1336
|
+
W(),
|
|
1337
|
+
Y("dropLines"),
|
|
1338
|
+
Y("hiLowLines"),
|
|
1339
|
+
P("upDownBars", Mt),
|
|
1340
|
+
J()
|
|
1341
|
+
] }
|
|
1342
|
+
},
|
|
1343
|
+
radarChart: {
|
|
1344
|
+
type: "radar",
|
|
1345
|
+
codec: { fields: [
|
|
1346
|
+
M("radarStyle", "str"),
|
|
1347
|
+
M("varyColors", "bool"),
|
|
1348
|
+
q("radar"),
|
|
1349
|
+
W(),
|
|
1350
|
+
J()
|
|
1351
|
+
] }
|
|
1352
|
+
},
|
|
1353
|
+
scatterChart: {
|
|
1354
|
+
type: "scatter",
|
|
1355
|
+
codec: { fields: [
|
|
1356
|
+
M("scatterStyle", "str"),
|
|
1357
|
+
M("varyColors", "bool"),
|
|
1358
|
+
q("scatter"),
|
|
1359
|
+
W(),
|
|
1360
|
+
J()
|
|
1361
|
+
] }
|
|
1362
|
+
},
|
|
1363
|
+
pieChart: {
|
|
1364
|
+
type: "pie",
|
|
1365
|
+
codec: { fields: [
|
|
1366
|
+
M("varyColors", "bool"),
|
|
1367
|
+
q("pie"),
|
|
1368
|
+
W(),
|
|
1369
|
+
M("firstSliceAng", "int")
|
|
1370
|
+
] }
|
|
1371
|
+
},
|
|
1372
|
+
pie3DChart: {
|
|
1373
|
+
type: "pie",
|
|
1374
|
+
is3D: !0,
|
|
1375
|
+
codec: { fields: [
|
|
1376
|
+
M("varyColors", "bool"),
|
|
1377
|
+
q("pie"),
|
|
1378
|
+
W()
|
|
1379
|
+
] }
|
|
1380
|
+
},
|
|
1381
|
+
doughnutChart: {
|
|
1382
|
+
type: "doughnut",
|
|
1383
|
+
codec: { fields: [
|
|
1384
|
+
M("varyColors", "bool"),
|
|
1385
|
+
q("pie"),
|
|
1386
|
+
W(),
|
|
1387
|
+
M("firstSliceAng", "int"),
|
|
1388
|
+
M("holeSize", "int")
|
|
1389
|
+
] }
|
|
1390
|
+
},
|
|
1391
|
+
barChart: {
|
|
1392
|
+
type: "bar",
|
|
1393
|
+
codec: { fields: [
|
|
1394
|
+
M("barDir", "str"),
|
|
1395
|
+
M("grouping", "str"),
|
|
1396
|
+
M("varyColors", "bool"),
|
|
1397
|
+
q("bar"),
|
|
1398
|
+
W(),
|
|
1399
|
+
M("gapWidth", "int"),
|
|
1400
|
+
M("overlap", "int"),
|
|
1401
|
+
Y("serLines", !0),
|
|
1402
|
+
J()
|
|
1403
|
+
] }
|
|
1404
|
+
},
|
|
1405
|
+
bar3DChart: {
|
|
1406
|
+
type: "bar",
|
|
1407
|
+
is3D: !0,
|
|
1408
|
+
codec: { fields: [
|
|
1409
|
+
M("barDir", "str"),
|
|
1410
|
+
M("grouping", "str"),
|
|
1411
|
+
M("varyColors", "bool"),
|
|
1412
|
+
q("bar"),
|
|
1413
|
+
W(),
|
|
1414
|
+
M("gapWidth", "int"),
|
|
1415
|
+
M("gapDepth", "int"),
|
|
1416
|
+
M("shape", "str"),
|
|
1417
|
+
J()
|
|
1418
|
+
] }
|
|
1419
|
+
},
|
|
1420
|
+
ofPieChart: {
|
|
1421
|
+
type: "ofPie",
|
|
1422
|
+
codec: { fields: [
|
|
1423
|
+
M("ofPieType", "str"),
|
|
1424
|
+
M("varyColors", "bool"),
|
|
1425
|
+
q("pie"),
|
|
1426
|
+
W(),
|
|
1427
|
+
M("gapWidth", "int"),
|
|
1428
|
+
M("splitType", "str"),
|
|
1429
|
+
M("splitPos", "num"),
|
|
1430
|
+
It,
|
|
1431
|
+
M("secondPieSize", "int"),
|
|
1432
|
+
Y("serLines", !0)
|
|
1433
|
+
] }
|
|
1434
|
+
},
|
|
1435
|
+
surfaceChart: {
|
|
1436
|
+
type: "surface",
|
|
1437
|
+
codec: { fields: [
|
|
1438
|
+
M("wireframe", "bool"),
|
|
1439
|
+
q("surface"),
|
|
1440
|
+
Rt,
|
|
1441
|
+
J()
|
|
1442
|
+
] }
|
|
1443
|
+
},
|
|
1444
|
+
surface3DChart: {
|
|
1445
|
+
type: "surface",
|
|
1446
|
+
is3D: !0,
|
|
1447
|
+
codec: { fields: [
|
|
1448
|
+
M("wireframe", "bool"),
|
|
1449
|
+
q("surface"),
|
|
1450
|
+
Rt,
|
|
1451
|
+
J()
|
|
1452
|
+
] }
|
|
1453
|
+
},
|
|
1454
|
+
bubbleChart: {
|
|
1455
|
+
type: "bubble",
|
|
1456
|
+
codec: { fields: [
|
|
1457
|
+
M("varyColors", "bool"),
|
|
1458
|
+
q("bubble"),
|
|
1459
|
+
W(),
|
|
1460
|
+
M("bubble3D", "bool"),
|
|
1461
|
+
M("bubbleScale", "int"),
|
|
1462
|
+
M("showNegBubbles", "bool"),
|
|
1463
|
+
M("sizeRepresents", "str"),
|
|
1464
|
+
J()
|
|
1465
|
+
] }
|
|
1466
|
+
}
|
|
1467
|
+
}, Bt = {
|
|
1468
|
+
tags: Object.keys(zt),
|
|
1469
|
+
key: "groups",
|
|
1470
|
+
ns: "c",
|
|
1471
|
+
many: !0,
|
|
1472
|
+
read: (e, t, n) => {
|
|
1473
|
+
let { type: r, is3D: i, codec: a } = zt[e.name], o = k(e, a, t, n);
|
|
1474
|
+
return o.series ??= [], o.axIds ??= [], i ? {
|
|
1475
|
+
type: r,
|
|
1476
|
+
is3D: i,
|
|
1477
|
+
...o
|
|
1478
|
+
} : {
|
|
1479
|
+
type: r,
|
|
1480
|
+
...o
|
|
1481
|
+
};
|
|
1482
|
+
},
|
|
1483
|
+
write: (e, t) => {
|
|
1484
|
+
let n = ((e) => `${e.type}${e.is3D ? "3D" : ""}Chart`)(t), { type: r, is3D: i, ...a } = Wt(t);
|
|
1485
|
+
A(e, `c:${n}`, a, zt[n].codec);
|
|
1486
|
+
}
|
|
1487
|
+
}, Vt = [
|
|
1488
|
+
"ctr",
|
|
1489
|
+
"l",
|
|
1490
|
+
"r",
|
|
1491
|
+
"t",
|
|
1492
|
+
"b"
|
|
1493
|
+
], Ht = (e) => {
|
|
1494
|
+
switch (e.type) {
|
|
1495
|
+
case "bar": return e.is3D ? [] : e.grouping === "stacked" || e.grouping === "percentStacked" ? [
|
|
1496
|
+
"ctr",
|
|
1497
|
+
"inEnd",
|
|
1498
|
+
"inBase"
|
|
1499
|
+
] : [
|
|
1500
|
+
"ctr",
|
|
1501
|
+
"inEnd",
|
|
1502
|
+
"inBase",
|
|
1503
|
+
"outEnd"
|
|
1504
|
+
];
|
|
1505
|
+
case "line": return e.is3D ? [] : Vt;
|
|
1506
|
+
case "stock":
|
|
1507
|
+
case "scatter":
|
|
1508
|
+
case "bubble": return Vt;
|
|
1509
|
+
case "pie":
|
|
1510
|
+
case "ofPie": return [
|
|
1511
|
+
"ctr",
|
|
1512
|
+
"inEnd",
|
|
1513
|
+
"outEnd",
|
|
1514
|
+
"bestFit"
|
|
1515
|
+
];
|
|
1516
|
+
default: return [];
|
|
1517
|
+
}
|
|
1518
|
+
}, Ut = (e, t) => t?.dLblPos !== void 0 && !e.includes(t.dLblPos), Wt = (e) => {
|
|
1519
|
+
let t = Ht(e), n = (e) => {
|
|
1520
|
+
if (!Ut(t, e)) return e;
|
|
1521
|
+
let { dLblPos: n, ...r } = e;
|
|
1522
|
+
return r;
|
|
1523
|
+
}, r = (e) => e.labels ? {
|
|
1524
|
+
...n(e),
|
|
1525
|
+
labels: e.labels.map(n)
|
|
1526
|
+
} : n(e);
|
|
1527
|
+
return {
|
|
1528
|
+
...e,
|
|
1529
|
+
...e.dLbls ? { dLbls: r(e.dLbls) } : {},
|
|
1530
|
+
series: e.series.map((e) => e.dLbls ? {
|
|
1531
|
+
...e,
|
|
1532
|
+
dLbls: r(e.dLbls)
|
|
1533
|
+
} : e)
|
|
1534
|
+
};
|
|
1535
|
+
}, Gt = { fields: [
|
|
1536
|
+
M("logBase", "num"),
|
|
1537
|
+
M("orientation", "str"),
|
|
1538
|
+
M("max", "num"),
|
|
1539
|
+
M("min", "num")
|
|
1540
|
+
] }, Kt = { fields: [
|
|
1541
|
+
P("layout", V),
|
|
1542
|
+
P("tx", xt),
|
|
1543
|
+
z(),
|
|
1544
|
+
B()
|
|
1545
|
+
] }, qt = { fields: [
|
|
1546
|
+
M("custUnit", "num"),
|
|
1547
|
+
M("builtInUnit", "str"),
|
|
1548
|
+
P("dispUnitsLbl", Kt)
|
|
1549
|
+
] }, Jt = () => [
|
|
1550
|
+
M("axId", "int"),
|
|
1551
|
+
P("scaling", Gt),
|
|
1552
|
+
M("delete", "bool"),
|
|
1553
|
+
M("axPos", "str"),
|
|
1554
|
+
Y("majorGridlines"),
|
|
1555
|
+
Y("minorGridlines"),
|
|
1556
|
+
P("title", Ct),
|
|
1557
|
+
P("numFmt", St),
|
|
1558
|
+
M("majorTickMark", "str"),
|
|
1559
|
+
M("minorTickMark", "str"),
|
|
1560
|
+
M("tickLblPos", "str"),
|
|
1561
|
+
z(),
|
|
1562
|
+
B(),
|
|
1563
|
+
M("crossAx", "int"),
|
|
1564
|
+
M("crosses", "str"),
|
|
1565
|
+
M("crossesAt", "num")
|
|
1566
|
+
], Yt = {
|
|
1567
|
+
valAx: {
|
|
1568
|
+
type: "val",
|
|
1569
|
+
codec: { fields: [
|
|
1570
|
+
...Jt(),
|
|
1571
|
+
M("crossBetween", "str"),
|
|
1572
|
+
M("majorUnit", "num"),
|
|
1573
|
+
M("minorUnit", "num"),
|
|
1574
|
+
P("dispUnits", qt)
|
|
1575
|
+
] }
|
|
1576
|
+
},
|
|
1577
|
+
catAx: {
|
|
1578
|
+
type: "cat",
|
|
1579
|
+
codec: { fields: [
|
|
1580
|
+
...Jt(),
|
|
1581
|
+
M("auto", "bool"),
|
|
1582
|
+
M("lblAlgn", "str"),
|
|
1583
|
+
M("lblOffset", "int"),
|
|
1584
|
+
M("tickLblSkip", "int"),
|
|
1585
|
+
M("tickMarkSkip", "int"),
|
|
1586
|
+
M("noMultiLvlLbl", "bool")
|
|
1587
|
+
] }
|
|
1588
|
+
},
|
|
1589
|
+
dateAx: {
|
|
1590
|
+
type: "date",
|
|
1591
|
+
codec: { fields: [
|
|
1592
|
+
...Jt(),
|
|
1593
|
+
M("auto", "bool"),
|
|
1594
|
+
M("lblOffset", "int"),
|
|
1595
|
+
M("baseTimeUnit", "str"),
|
|
1596
|
+
M("majorUnit", "num"),
|
|
1597
|
+
M("majorTimeUnit", "str"),
|
|
1598
|
+
M("minorUnit", "num"),
|
|
1599
|
+
M("minorTimeUnit", "str")
|
|
1600
|
+
] }
|
|
1601
|
+
},
|
|
1602
|
+
serAx: {
|
|
1603
|
+
type: "ser",
|
|
1604
|
+
codec: { fields: [
|
|
1605
|
+
...Jt(),
|
|
1606
|
+
M("tickLblSkip", "int"),
|
|
1607
|
+
M("tickMarkSkip", "int")
|
|
1608
|
+
] }
|
|
1609
|
+
}
|
|
1610
|
+
}, Xt = {
|
|
1611
|
+
tags: Object.keys(Yt),
|
|
1612
|
+
key: "axes",
|
|
1613
|
+
ns: "c",
|
|
1614
|
+
many: !0,
|
|
1615
|
+
read: (e, t, n) => ({
|
|
1616
|
+
type: Yt[e.name].type,
|
|
1617
|
+
...k(e, Yt[e.name].codec, t, n)
|
|
1618
|
+
}),
|
|
1619
|
+
write: (e, t) => {
|
|
1620
|
+
let { type: n, ...r } = t, i = `${n}Ax`;
|
|
1621
|
+
A(e, `c:${i}`, r, Yt[i].codec);
|
|
1622
|
+
}
|
|
1623
|
+
}, Zt = { fields: [
|
|
1624
|
+
M("showHorzBorder", "bool"),
|
|
1625
|
+
M("showVertBorder", "bool"),
|
|
1626
|
+
M("showOutline", "bool"),
|
|
1627
|
+
M("showKeys", "bool"),
|
|
1628
|
+
z(),
|
|
1629
|
+
B()
|
|
1630
|
+
] }, Qt = {
|
|
1631
|
+
fields: [
|
|
1632
|
+
P("layout", V),
|
|
1633
|
+
Bt,
|
|
1634
|
+
Xt,
|
|
1635
|
+
P("dTable", Zt),
|
|
1636
|
+
z()
|
|
1637
|
+
],
|
|
1638
|
+
afterRead: (e) => {
|
|
1639
|
+
e.groups ??= [], e.axes ??= [];
|
|
1640
|
+
}
|
|
1641
|
+
}, $t = { fields: [
|
|
1642
|
+
M("rotX", "int"),
|
|
1643
|
+
M("hPercent", "int"),
|
|
1644
|
+
M("rotY", "int"),
|
|
1645
|
+
M("depthPercent", "int"),
|
|
1646
|
+
M("rAngAx", "bool"),
|
|
1647
|
+
M("perspective", "int")
|
|
1648
|
+
] }, en = { fields: [M("thickness", "int"), z()] }, tn = { fields: [
|
|
1649
|
+
M("idx", "int"),
|
|
1650
|
+
M("delete", "bool"),
|
|
1651
|
+
B()
|
|
1652
|
+
] }, nn = { fields: [
|
|
1653
|
+
M("legendPos", "str"),
|
|
1654
|
+
P("legendEntry", tn, "entries", { many: !0 }),
|
|
1655
|
+
P("layout", V),
|
|
1656
|
+
M("overlay", "bool"),
|
|
1657
|
+
z(),
|
|
1658
|
+
B()
|
|
1659
|
+
] }, rn = { fields: [
|
|
1660
|
+
P("title", Ct),
|
|
1661
|
+
M("autoTitleDeleted", "bool"),
|
|
1662
|
+
P("view3D", $t),
|
|
1663
|
+
P("floor", en),
|
|
1664
|
+
P("sideWall", en),
|
|
1665
|
+
P("backWall", en),
|
|
1666
|
+
P("plotArea", Qt),
|
|
1667
|
+
P("legend", nn),
|
|
1668
|
+
M("plotVisOnly", "bool"),
|
|
1669
|
+
M("dispBlanksAs", "str"),
|
|
1670
|
+
M("showDLblsOverMax", "bool")
|
|
1671
|
+
] }, an = { fields: [N("name"), M("fmtId", "int")] }, on = { fields: [
|
|
1672
|
+
M("date1904", "bool"),
|
|
1673
|
+
M("lang", "str"),
|
|
1674
|
+
M("roundedCorners", "bool"),
|
|
1675
|
+
M("style", "int"),
|
|
1676
|
+
P("pivotSource", an),
|
|
1677
|
+
P("chart", rn),
|
|
1678
|
+
z(),
|
|
1679
|
+
B()
|
|
1680
|
+
] }, sn = (e) => {
|
|
1681
|
+
let t = x(e);
|
|
1682
|
+
if (!t || t.name !== "chartSpace") return null;
|
|
1683
|
+
let n = xe(t, ye);
|
|
1684
|
+
if (!ge(Se(t, n))) return null;
|
|
1685
|
+
let r = new Oe(e, n);
|
|
1686
|
+
return {
|
|
1687
|
+
model: k(t, on, ye, r),
|
|
1688
|
+
kept: r.kept,
|
|
1689
|
+
reordered: r.reordered
|
|
1690
|
+
};
|
|
1691
|
+
}, cn = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n", ln = (e) => {
|
|
1692
|
+
let t = { ...e.unknown?.attributes }, n = (e, n) => {
|
|
1693
|
+
t[`xmlns:${e}`] ??= n;
|
|
1694
|
+
};
|
|
1695
|
+
n(w.c, ce), n(w.a, ue), n(w.r, fe);
|
|
1696
|
+
let r = new Ce().raw(cn);
|
|
1697
|
+
return ((e, t) => {
|
|
1698
|
+
A(e, "c:chartSpace", t, on);
|
|
1699
|
+
})(r, {
|
|
1700
|
+
...e,
|
|
1701
|
+
unknown: {
|
|
1702
|
+
...e.unknown,
|
|
1703
|
+
attributes: t
|
|
1704
|
+
}
|
|
1705
|
+
}), r.toString();
|
|
1706
|
+
}, un = (e, t) => {
|
|
1707
|
+
if (t && (n = e, !(n.chart?.plotArea?.groups ?? []).some((e) => {
|
|
1708
|
+
let t = Ht(e), n = (e) => Ut(t, e) || !!e?.labels?.some((e) => Ut(t, e));
|
|
1709
|
+
return n(e.dLbls) || e.series.some((e) => n(e.dLbls));
|
|
1710
|
+
}))) {
|
|
1711
|
+
let n = sn(t);
|
|
1712
|
+
if (n && JSON.stringify(n.model) === JSON.stringify(e)) return t;
|
|
1713
|
+
}
|
|
1714
|
+
var n;
|
|
1715
|
+
return ln(e);
|
|
1716
|
+
}, X = (e, t, n = e, r) => P(e, t, n, {
|
|
1717
|
+
ns: "cx",
|
|
1718
|
+
many: r
|
|
1719
|
+
}), Z = () => X("spPr", Ze), Q = () => X("txPr", ot), dn = () => X("numFmt", St), fn = (e) => ({
|
|
1720
|
+
name: e,
|
|
1721
|
+
key: e,
|
|
1722
|
+
read: (e) => {
|
|
1723
|
+
if (e === "auto") return "auto";
|
|
1724
|
+
let t = Number(e);
|
|
1725
|
+
return e.trim() !== "" && Number.isFinite(t) ? t : void 0;
|
|
1726
|
+
},
|
|
1727
|
+
write: (e) => String(e)
|
|
1728
|
+
}), pn = (e) => T(e).filter(([e]) => e !== "xmlns" && !e.startsWith("xmlns:")), mn = (e) => ({
|
|
1729
|
+
tags: [e],
|
|
1730
|
+
key: e,
|
|
1731
|
+
ns: "cx",
|
|
1732
|
+
read: (e) => {
|
|
1733
|
+
if (S(e).length > 0) return;
|
|
1734
|
+
let t = { f: C(e) };
|
|
1735
|
+
for (let [n, r] of pn(e)) {
|
|
1736
|
+
if (n !== "dir" || r !== "col" && r !== "row") return;
|
|
1737
|
+
t.dir = r;
|
|
1738
|
+
}
|
|
1739
|
+
return t.f === "" ? void 0 : t;
|
|
1740
|
+
},
|
|
1741
|
+
write: (t, n) => {
|
|
1742
|
+
let r = j("cx", e);
|
|
1743
|
+
t.open(r, n.dir ? [["dir", n.dir]] : null).text(n.f).close(r);
|
|
1744
|
+
}
|
|
1745
|
+
}), hn = {
|
|
1746
|
+
attributes: [
|
|
1747
|
+
F("ptCount", "int"),
|
|
1748
|
+
F("formatCode", "str"),
|
|
1749
|
+
F("name", "str")
|
|
1750
|
+
],
|
|
1751
|
+
fields: [{
|
|
1752
|
+
tags: ["pt"],
|
|
1753
|
+
key: "points",
|
|
1754
|
+
ns: "cx",
|
|
1755
|
+
many: !0,
|
|
1756
|
+
read: (e) => {
|
|
1757
|
+
if (S(e).length > 0) return;
|
|
1758
|
+
let t = pn(e);
|
|
1759
|
+
if (t.length !== 1 || t[0][0] !== "idx") return;
|
|
1760
|
+
let n = Number(t[0][1]);
|
|
1761
|
+
return Number.isInteger(n) && O(String(n)) === O(t[0][1]) ? {
|
|
1762
|
+
idx: n,
|
|
1763
|
+
v: C(e)
|
|
1764
|
+
} : void 0;
|
|
1765
|
+
},
|
|
1766
|
+
write: (e, t) => {
|
|
1767
|
+
let n = j("cx", "pt");
|
|
1768
|
+
t.v === "" ? e.open(n, [["idx", String(t.idx)]], !0) : e.open(n, [["idx", String(t.idx)]]).text(t.v).close(n);
|
|
1769
|
+
}
|
|
1770
|
+
}]
|
|
1771
|
+
}, gn = {
|
|
1772
|
+
attributes: [F("type", "str")],
|
|
1773
|
+
fields: [
|
|
1774
|
+
mn("f"),
|
|
1775
|
+
mn("nf"),
|
|
1776
|
+
X("lvl", hn, "levels", !0)
|
|
1777
|
+
]
|
|
1778
|
+
}, _n = /* @__PURE__ */ new Set([
|
|
1779
|
+
"val",
|
|
1780
|
+
"x",
|
|
1781
|
+
"y",
|
|
1782
|
+
"size",
|
|
1783
|
+
"colorVal"
|
|
1784
|
+
]), vn = /* @__PURE__ */ new Set([
|
|
1785
|
+
"cat",
|
|
1786
|
+
"colorStr",
|
|
1787
|
+
"entityId"
|
|
1788
|
+
]), yn = {
|
|
1789
|
+
fields: [X("data", {
|
|
1790
|
+
attributes: [F("id", "int")],
|
|
1791
|
+
fields: [{
|
|
1792
|
+
tags: ["numDim", "strDim"],
|
|
1793
|
+
key: "dimensions",
|
|
1794
|
+
ns: "cx",
|
|
1795
|
+
many: !0,
|
|
1796
|
+
read: (e, t, n) => {
|
|
1797
|
+
let r = k(e, gn, t, n);
|
|
1798
|
+
return (e.name === "numDim" ? _n : vn).has(r.type) ? r : void 0;
|
|
1799
|
+
},
|
|
1800
|
+
write: (e, t) => {
|
|
1801
|
+
A(e, j("cx", _n.has(t.type) ? "numDim" : "strDim"), t, gn);
|
|
1802
|
+
}
|
|
1803
|
+
}],
|
|
1804
|
+
afterRead: (e) => {
|
|
1805
|
+
e.dimensions ??= [];
|
|
1806
|
+
}
|
|
1807
|
+
}, "data", !0)],
|
|
1808
|
+
afterRead: (e) => {
|
|
1809
|
+
e.data ??= [];
|
|
1810
|
+
}
|
|
1811
|
+
}, bn = { fields: [X("txData", { fields: [mn("f"), N("v", "v", "cx")] }), X("rich", ot)] }, xn = () => [
|
|
1812
|
+
F("pos", "str"),
|
|
1813
|
+
F("align", "str"),
|
|
1814
|
+
F("overlay", "bool")
|
|
1815
|
+
], Sn = {
|
|
1816
|
+
attributes: xn(),
|
|
1817
|
+
fields: [
|
|
1818
|
+
X("tx", bn),
|
|
1819
|
+
Z(),
|
|
1820
|
+
Q()
|
|
1821
|
+
]
|
|
1822
|
+
}, Cn = {
|
|
1823
|
+
attributes: xn(),
|
|
1824
|
+
fields: [Z(), Q()]
|
|
1825
|
+
}, wn = {
|
|
1826
|
+
attributes: [
|
|
1827
|
+
F("seriesName", "bool"),
|
|
1828
|
+
F("categoryName", "bool"),
|
|
1829
|
+
F("value", "bool")
|
|
1830
|
+
],
|
|
1831
|
+
fields: []
|
|
1832
|
+
}, Tn = () => [
|
|
1833
|
+
dn(),
|
|
1834
|
+
Z(),
|
|
1835
|
+
Q(),
|
|
1836
|
+
X("visibility", wn),
|
|
1837
|
+
N("separator", "separator", "cx")
|
|
1838
|
+
], En = {
|
|
1839
|
+
attributes: [F("idx", "int"), F("pos", "str")],
|
|
1840
|
+
fields: Tn()
|
|
1841
|
+
}, Dn = {
|
|
1842
|
+
attributes: [F("idx", "int")],
|
|
1843
|
+
fields: []
|
|
1844
|
+
}, On = {
|
|
1845
|
+
attributes: [F("pos", "str")],
|
|
1846
|
+
fields: [
|
|
1847
|
+
...Tn(),
|
|
1848
|
+
X("dataLabel", En, "labels", !0),
|
|
1849
|
+
X("dataLabelHidden", Dn, "hiddenLabels", !0)
|
|
1850
|
+
]
|
|
1851
|
+
}, kn = {
|
|
1852
|
+
attributes: [F("idx", "int")],
|
|
1853
|
+
fields: [Z()]
|
|
1854
|
+
}, An = {
|
|
1855
|
+
attributes: [
|
|
1856
|
+
"connectorLines",
|
|
1857
|
+
"meanLine",
|
|
1858
|
+
"meanMarker",
|
|
1859
|
+
"nonoutliers",
|
|
1860
|
+
"outliers"
|
|
1861
|
+
].map((e) => F(e, "bool")),
|
|
1862
|
+
fields: []
|
|
1863
|
+
}, jn = {
|
|
1864
|
+
attributes: [
|
|
1865
|
+
F("intervalClosed", "str"),
|
|
1866
|
+
fn("underflow"),
|
|
1867
|
+
fn("overflow")
|
|
1868
|
+
],
|
|
1869
|
+
fields: [M("binSize", "num", "binSize", "cx"), M("binCount", "int", "binCount", "cx")]
|
|
1870
|
+
}, Mn = { fields: [{
|
|
1871
|
+
...M("idx", "int", "indexes", "cx"),
|
|
1872
|
+
many: !0
|
|
1873
|
+
}] }, Nn = { fields: [
|
|
1874
|
+
M("parentLabelLayout", "str", "parentLabelLayout", "cx"),
|
|
1875
|
+
M("regionLabelLayout", "str", "regionLabelLayout", "cx"),
|
|
1876
|
+
X("visibility", An),
|
|
1877
|
+
X("aggregation", { fields: [] }),
|
|
1878
|
+
X("binning", jn),
|
|
1879
|
+
X("statistics", {
|
|
1880
|
+
attributes: [F("quartileMethod", "str")],
|
|
1881
|
+
fields: []
|
|
1882
|
+
}),
|
|
1883
|
+
{
|
|
1884
|
+
tags: ["subtotals"],
|
|
1885
|
+
key: "subtotals",
|
|
1886
|
+
ns: "cx",
|
|
1887
|
+
read: (e, t, n) => {
|
|
1888
|
+
let r = k(e, Mn, t, n);
|
|
1889
|
+
return r.unknown ? void 0 : r.indexes ?? [];
|
|
1890
|
+
},
|
|
1891
|
+
write: (e, t) => {
|
|
1892
|
+
A(e, j("cx", "subtotals"), { indexes: t }, Mn);
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
] }, Pn = {
|
|
1896
|
+
attributes: [
|
|
1897
|
+
F("layoutId", "str"),
|
|
1898
|
+
F("hidden", "bool"),
|
|
1899
|
+
F("ownerIdx", "int"),
|
|
1900
|
+
F("uniqueId", "str"),
|
|
1901
|
+
F("formatIdx", "int")
|
|
1902
|
+
],
|
|
1903
|
+
fields: [
|
|
1904
|
+
X("tx", bn),
|
|
1905
|
+
Z(),
|
|
1906
|
+
X("dataPt", kn, "points", !0),
|
|
1907
|
+
X("dataLabels", On),
|
|
1908
|
+
M("dataId", "int", "dataId", "cx"),
|
|
1909
|
+
X("layoutPr", Nn),
|
|
1910
|
+
{
|
|
1911
|
+
...M("axisId", "int", "axisIds", "cx"),
|
|
1912
|
+
many: !0
|
|
1913
|
+
}
|
|
1914
|
+
]
|
|
1915
|
+
}, Fn = {
|
|
1916
|
+
fields: [X("plotSurface", { fields: [Z()] }), X("series", Pn, "series", !0)],
|
|
1917
|
+
afterRead: (e) => {
|
|
1918
|
+
e.series ??= [];
|
|
1919
|
+
}
|
|
1920
|
+
}, In = { fields: [
|
|
1921
|
+
X("tx", bn),
|
|
1922
|
+
Z(),
|
|
1923
|
+
Q()
|
|
1924
|
+
] }, Ln = { fields: [Z()] }, Rn = {
|
|
1925
|
+
attributes: [F("type", "str")],
|
|
1926
|
+
fields: []
|
|
1927
|
+
}, zn = {
|
|
1928
|
+
attributes: [F("id", "int"), F("hidden", "bool")],
|
|
1929
|
+
fields: [
|
|
1930
|
+
X("catScaling", {
|
|
1931
|
+
attributes: [F("gapWidth", "num")],
|
|
1932
|
+
fields: []
|
|
1933
|
+
}),
|
|
1934
|
+
X("valScaling", {
|
|
1935
|
+
attributes: [
|
|
1936
|
+
"max",
|
|
1937
|
+
"min",
|
|
1938
|
+
"majorUnit",
|
|
1939
|
+
"minorUnit"
|
|
1940
|
+
].map((e) => F(e, "num")),
|
|
1941
|
+
fields: []
|
|
1942
|
+
}),
|
|
1943
|
+
X("title", In),
|
|
1944
|
+
X("units", {
|
|
1945
|
+
attributes: [F("unit", "str")],
|
|
1946
|
+
fields: [X("unitsLabel", In)]
|
|
1947
|
+
}),
|
|
1948
|
+
X("majorGridlines", Ln),
|
|
1949
|
+
X("minorGridlines", Ln),
|
|
1950
|
+
X("majorTickMarks", Rn),
|
|
1951
|
+
X("minorTickMarks", Rn),
|
|
1952
|
+
X("tickLabels", { fields: [] }),
|
|
1953
|
+
dn(),
|
|
1954
|
+
Z(),
|
|
1955
|
+
Q()
|
|
1956
|
+
]
|
|
1957
|
+
}, Bn = {
|
|
1958
|
+
fields: [
|
|
1959
|
+
X("plotAreaRegion", Fn),
|
|
1960
|
+
X("axis", zn, "axes", !0),
|
|
1961
|
+
Z()
|
|
1962
|
+
],
|
|
1963
|
+
afterRead: (e) => {
|
|
1964
|
+
e.axes ??= [];
|
|
1965
|
+
}
|
|
1966
|
+
}, Vn = { fields: [
|
|
1967
|
+
X("title", Sn),
|
|
1968
|
+
X("plotArea", Bn),
|
|
1969
|
+
X("legend", Cn)
|
|
1970
|
+
] }, Hn = { fields: [
|
|
1971
|
+
X("chartData", yn),
|
|
1972
|
+
X("chart", Vn),
|
|
1973
|
+
Z(),
|
|
1974
|
+
Q()
|
|
1975
|
+
] }, Un = {
|
|
1976
|
+
waterfall: "waterfall",
|
|
1977
|
+
clusteredColumn: "histogram",
|
|
1978
|
+
boxWhisker: "boxWhisker",
|
|
1979
|
+
treemap: "treemap",
|
|
1980
|
+
sunburst: "sunburst",
|
|
1981
|
+
funnel: "funnel",
|
|
1982
|
+
regionMap: "regionMap"
|
|
1983
|
+
}, Wn = Object.fromEntries(Object.entries(Un).map(([e, t]) => [t, e])), Gn = new Set(Object.values(Un)), Kn = "paretoLine", qn = {
|
|
1984
|
+
cat: "cat",
|
|
1985
|
+
val: "val",
|
|
1986
|
+
x: "xVal",
|
|
1987
|
+
y: "yVal",
|
|
1988
|
+
size: "bubbleSize",
|
|
1989
|
+
colorVal: "color",
|
|
1990
|
+
colorStr: "color",
|
|
1991
|
+
entityId: "entityId"
|
|
1992
|
+
}, Jn = /* @__PURE__ */ new Set([
|
|
1993
|
+
"val",
|
|
1994
|
+
"x",
|
|
1995
|
+
"y",
|
|
1996
|
+
"size",
|
|
1997
|
+
"colorVal"
|
|
1998
|
+
]), Yn = [
|
|
1999
|
+
"cat",
|
|
2000
|
+
"colorStr",
|
|
2001
|
+
"entityId",
|
|
2002
|
+
"x",
|
|
2003
|
+
"y",
|
|
2004
|
+
"val",
|
|
2005
|
+
"size",
|
|
2006
|
+
"colorVal"
|
|
2007
|
+
], $ = (e) => {
|
|
2008
|
+
for (let t of Object.keys(e)) e[t] === void 0 && delete e[t];
|
|
2009
|
+
return e;
|
|
2010
|
+
}, Xn = (e) => $({
|
|
2011
|
+
f: e.f,
|
|
2012
|
+
dir: e.dir
|
|
2013
|
+
}), Zn = (e) => e && $({
|
|
2014
|
+
strRef: e.txData?.f ? Xn(e.txData.f) : void 0,
|
|
2015
|
+
v: e.txData?.v,
|
|
2016
|
+
rich: e.rich,
|
|
2017
|
+
unknown: e.unknown
|
|
2018
|
+
}), Qn = (e) => e && $({
|
|
2019
|
+
tx: Zn(e.tx),
|
|
2020
|
+
overlay: e.overlay,
|
|
2021
|
+
spPr: e.spPr,
|
|
2022
|
+
txPr: e.txPr,
|
|
2023
|
+
pos: e.pos,
|
|
2024
|
+
align: e.align,
|
|
2025
|
+
unknown: e.unknown
|
|
2026
|
+
}), $n = (e) => $({
|
|
2027
|
+
numFmt: e.numFmt,
|
|
2028
|
+
spPr: e.spPr,
|
|
2029
|
+
txPr: e.txPr,
|
|
2030
|
+
dLblPos: e.pos,
|
|
2031
|
+
showSerName: e.visibility?.seriesName,
|
|
2032
|
+
showCatName: e.visibility?.categoryName,
|
|
2033
|
+
showVal: e.visibility?.value,
|
|
2034
|
+
separator: e.separator,
|
|
2035
|
+
unknown: e.unknown
|
|
2036
|
+
}), er = (e) => {
|
|
2037
|
+
if (!e) return;
|
|
2038
|
+
let t = $n(e), n = [...(e.labels ?? []).map((e) => ({
|
|
2039
|
+
idx: e.idx,
|
|
2040
|
+
...$n(e)
|
|
2041
|
+
})), ...(e.hiddenLabels ?? []).map((e) => ({
|
|
2042
|
+
idx: e.idx,
|
|
2043
|
+
delete: !0
|
|
2044
|
+
}))];
|
|
2045
|
+
return n.length > 0 && (t.labels = n), t;
|
|
2046
|
+
}, tr = (e, t) => {
|
|
2047
|
+
let n = (e ?? []).map((e) => ({ ...e }));
|
|
2048
|
+
for (let e of [...t ?? []].sort((e, t) => e - t)) {
|
|
2049
|
+
let t = n.find((t) => t.idx === e);
|
|
2050
|
+
t ? t.subtotal = !0 : n.push({
|
|
2051
|
+
idx: e,
|
|
2052
|
+
subtotal: !0
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
return n.length > 0 ? n : void 0;
|
|
2056
|
+
}, nr = (e) => {
|
|
2057
|
+
if (!e) return;
|
|
2058
|
+
let { subtotals: t, ...n } = e;
|
|
2059
|
+
return Object.keys(n).length > 0 ? n : void 0;
|
|
2060
|
+
}, rr = (e) => $({
|
|
2061
|
+
ptCount: e.ptCount,
|
|
2062
|
+
formatCode: e.formatCode,
|
|
2063
|
+
name: e.name,
|
|
2064
|
+
points: (e.points ?? []).map((e) => ({
|
|
2065
|
+
idx: e.idx,
|
|
2066
|
+
v: e.v
|
|
2067
|
+
})),
|
|
2068
|
+
unknown: e.unknown
|
|
2069
|
+
}), ir = (e) => {
|
|
2070
|
+
let t = Jn.has(e.type), n = e.levels?.map(rr), r = {};
|
|
2071
|
+
return e.f ? r[t ? "numRef" : "strRef"] = $({
|
|
2072
|
+
...Xn(e.f),
|
|
2073
|
+
cache: n ? { levels: n } : void 0
|
|
2074
|
+
}) : r[t ? "numLit" : "strLit"] = $({ levels: n }), e.nf && (r.nf = Xn(e.nf)), e.unknown && (r.unknown = e.unknown), r;
|
|
2075
|
+
}, ar = (e, t) => {
|
|
2076
|
+
let n = $({
|
|
2077
|
+
idx: e.formatIdx,
|
|
2078
|
+
hidden: e.hidden,
|
|
2079
|
+
uniqueId: e.uniqueId,
|
|
2080
|
+
tx: Zn(e.tx),
|
|
2081
|
+
spPr: e.spPr,
|
|
2082
|
+
points: tr(e.points, e.layoutPr?.subtotals),
|
|
2083
|
+
dLbls: er(e.dataLabels),
|
|
2084
|
+
layoutPr: nr(e.layoutPr),
|
|
2085
|
+
unknown: e.unknown
|
|
2086
|
+
});
|
|
2087
|
+
for (let e of t?.dimensions ?? []) {
|
|
2088
|
+
let t = qn[e.type];
|
|
2089
|
+
t && !n[t] && (n[t] = ir(e));
|
|
2090
|
+
}
|
|
2091
|
+
return n;
|
|
2092
|
+
}, or = (e) => $({
|
|
2093
|
+
idx: e.formatIdx,
|
|
2094
|
+
hidden: e.hidden,
|
|
2095
|
+
uniqueId: e.uniqueId,
|
|
2096
|
+
tx: Zn(e.tx),
|
|
2097
|
+
spPr: e.spPr,
|
|
2098
|
+
points: tr(e.points, e.layoutPr?.subtotals),
|
|
2099
|
+
dLbls: er(e.dataLabels),
|
|
2100
|
+
layoutPr: nr(e.layoutPr),
|
|
2101
|
+
axIds: e.axisIds,
|
|
2102
|
+
unknown: e.unknown
|
|
2103
|
+
}), sr = (e, t) => {
|
|
2104
|
+
let n = new Map(t.map((e) => [e.id, e])), r = [], i = [], a = null;
|
|
2105
|
+
for (let t of e?.series ?? []) {
|
|
2106
|
+
if (t.layoutId === Kn) {
|
|
2107
|
+
let e = t.ownerIdx === void 0 ? null : i[t.ownerIdx];
|
|
2108
|
+
e && !e.cumulativeLine && (e.cumulativeLine = or(t)), i.push(null);
|
|
2109
|
+
continue;
|
|
2110
|
+
}
|
|
2111
|
+
let e = Un[t.layoutId] ?? t.layoutId, o = t.axisIds ?? [];
|
|
2112
|
+
a && a.type === e && JSON.stringify(a.axIds) === JSON.stringify(o) || (a = {
|
|
2113
|
+
type: e,
|
|
2114
|
+
series: [],
|
|
2115
|
+
axIds: o
|
|
2116
|
+
}, r.push(a));
|
|
2117
|
+
let s = ar(t, t.dataId === void 0 ? void 0 : n.get(t.dataId));
|
|
2118
|
+
a.series.push(s), i.push(s);
|
|
2119
|
+
}
|
|
2120
|
+
return r;
|
|
2121
|
+
}, cr = (e) => {
|
|
2122
|
+
let t = e.catScaling ?? e.valScaling;
|
|
2123
|
+
return $({
|
|
2124
|
+
type: e.catScaling || !e.valScaling ? "cat" : "val",
|
|
2125
|
+
axId: e.id,
|
|
2126
|
+
scaling: $({
|
|
2127
|
+
max: e.valScaling?.max,
|
|
2128
|
+
min: e.valScaling?.min,
|
|
2129
|
+
gapWidth: e.catScaling?.gapWidth,
|
|
2130
|
+
unknown: t?.unknown
|
|
2131
|
+
}),
|
|
2132
|
+
delete: e.hidden,
|
|
2133
|
+
majorGridlines: e.majorGridlines,
|
|
2134
|
+
minorGridlines: e.minorGridlines,
|
|
2135
|
+
title: Qn(e.title),
|
|
2136
|
+
numFmt: e.numFmt,
|
|
2137
|
+
majorTickMark: e.majorTickMarks?.type,
|
|
2138
|
+
minorTickMark: e.minorTickMarks?.type,
|
|
2139
|
+
tickLblPos: e.tickLabels ? void 0 : "none",
|
|
2140
|
+
spPr: e.spPr,
|
|
2141
|
+
txPr: e.txPr,
|
|
2142
|
+
majorUnit: e.valScaling?.majorUnit,
|
|
2143
|
+
minorUnit: e.valScaling?.minorUnit,
|
|
2144
|
+
dispUnits: e.units && $({
|
|
2145
|
+
builtInUnit: e.units.unit,
|
|
2146
|
+
dispUnitsLbl: Qn(e.units.unitsLabel),
|
|
2147
|
+
unknown: e.units.unknown
|
|
2148
|
+
}),
|
|
2149
|
+
unknown: e.unknown
|
|
2150
|
+
});
|
|
2151
|
+
}, lr = (e) => e && $({
|
|
2152
|
+
txData: e.strRef || e.v !== void 0 ? $({
|
|
2153
|
+
f: e.strRef ? Xn(e.strRef) : void 0,
|
|
2154
|
+
v: e.v
|
|
2155
|
+
}) : void 0,
|
|
2156
|
+
rich: e.rich,
|
|
2157
|
+
unknown: e.unknown
|
|
2158
|
+
}), ur = (e) => e && $({
|
|
2159
|
+
tx: lr(e.tx),
|
|
2160
|
+
spPr: e.spPr,
|
|
2161
|
+
txPr: e.txPr,
|
|
2162
|
+
unknown: e.unknown
|
|
2163
|
+
}), dr = (e) => {
|
|
2164
|
+
let t = e.showSerName !== void 0 || e.showCatName !== void 0 || e.showVal !== void 0;
|
|
2165
|
+
return $({
|
|
2166
|
+
pos: e.dLblPos,
|
|
2167
|
+
numFmt: e.numFmt,
|
|
2168
|
+
spPr: e.spPr,
|
|
2169
|
+
txPr: e.txPr,
|
|
2170
|
+
visibility: t ? $({
|
|
2171
|
+
seriesName: e.showSerName,
|
|
2172
|
+
categoryName: e.showCatName,
|
|
2173
|
+
value: e.showVal
|
|
2174
|
+
}) : void 0,
|
|
2175
|
+
separator: e.separator,
|
|
2176
|
+
unknown: e.unknown
|
|
2177
|
+
});
|
|
2178
|
+
}, fr = (e) => !0 === e.delete && Object.keys(e).every((e) => e === "idx" || e === "delete"), pr = (e) => {
|
|
2179
|
+
if (!e) return;
|
|
2180
|
+
let t = dr(e), n = (e.labels ?? []).filter((e) => !fr(e)).map((e) => ({
|
|
2181
|
+
idx: e.idx,
|
|
2182
|
+
...dr(e)
|
|
2183
|
+
})), r = (e.labels ?? []).filter(fr).map((e) => ({ idx: e.idx }));
|
|
2184
|
+
return n.length > 0 && (t.labels = n), r.length > 0 && (t.hiddenLabels = r), t;
|
|
2185
|
+
}, mr = (e) => {
|
|
2186
|
+
let t = (e ?? []).filter((e) => Object.keys(e).some((e) => e !== "idx" && e !== "subtotal")).map(({ subtotal: e, ...t }) => t);
|
|
2187
|
+
return t.length > 0 ? t : void 0;
|
|
2188
|
+
}, hr = (e, t, n) => {
|
|
2189
|
+
let r = (t ?? []).filter((e) => e.subtotal).map((e) => e.idx).sort((e, t) => e - t);
|
|
2190
|
+
return r.length !== 0 || n ? {
|
|
2191
|
+
...e,
|
|
2192
|
+
subtotals: r
|
|
2193
|
+
} : e;
|
|
2194
|
+
}, gr = (e) => $({
|
|
2195
|
+
ptCount: e.ptCount,
|
|
2196
|
+
formatCode: e.formatCode,
|
|
2197
|
+
name: e.name,
|
|
2198
|
+
points: e.points.length > 0 ? e.points.map((e) => ({
|
|
2199
|
+
idx: e.idx,
|
|
2200
|
+
v: e.v
|
|
2201
|
+
})) : void 0,
|
|
2202
|
+
unknown: e.unknown
|
|
2203
|
+
}), _r = (e, t) => e === "color" ? t.strRef || t.strLit ? "colorStr" : "colorVal" : Object.keys(qn).find((t) => qn[t] === e), vr = (e) => {
|
|
2204
|
+
let t = [];
|
|
2205
|
+
for (let n of [
|
|
2206
|
+
"cat",
|
|
2207
|
+
"val",
|
|
2208
|
+
"xVal",
|
|
2209
|
+
"yVal",
|
|
2210
|
+
"bubbleSize",
|
|
2211
|
+
"color",
|
|
2212
|
+
"entityId"
|
|
2213
|
+
]) {
|
|
2214
|
+
let r = e[n];
|
|
2215
|
+
if (!r) continue;
|
|
2216
|
+
let i = r.numRef ?? r.strRef, a = (i ? i.cache : r.numLit ?? r.strLit)?.levels;
|
|
2217
|
+
t.push($({
|
|
2218
|
+
type: _r(n, r),
|
|
2219
|
+
f: i ? Xn(i) : void 0,
|
|
2220
|
+
nf: r.nf ? Xn(r.nf) : void 0,
|
|
2221
|
+
levels: a && a.length > 0 ? a.map(gr) : void 0,
|
|
2222
|
+
unknown: r.unknown
|
|
2223
|
+
}));
|
|
2224
|
+
}
|
|
2225
|
+
return t.sort((e, t) => Yn.indexOf(e.type) - Yn.indexOf(t.type));
|
|
2226
|
+
}, yr = (e) => {
|
|
2227
|
+
let t = e.scaling ?? {}, n = e.type === "cat" || e.type === "date";
|
|
2228
|
+
return $({
|
|
2229
|
+
id: e.axId,
|
|
2230
|
+
hidden: e.delete,
|
|
2231
|
+
catScaling: n ? $({
|
|
2232
|
+
gapWidth: t.gapWidth,
|
|
2233
|
+
unknown: t.unknown
|
|
2234
|
+
}) : void 0,
|
|
2235
|
+
valScaling: n ? void 0 : $({
|
|
2236
|
+
max: t.max,
|
|
2237
|
+
min: t.min,
|
|
2238
|
+
majorUnit: e.majorUnit,
|
|
2239
|
+
minorUnit: e.minorUnit,
|
|
2240
|
+
unknown: t.unknown
|
|
2241
|
+
}),
|
|
2242
|
+
title: ur(e.title),
|
|
2243
|
+
units: e.dispUnits && $({
|
|
2244
|
+
unit: e.dispUnits.builtInUnit,
|
|
2245
|
+
unitsLabel: ur(e.dispUnits.dispUnitsLbl),
|
|
2246
|
+
unknown: e.dispUnits.unknown
|
|
2247
|
+
}),
|
|
2248
|
+
majorGridlines: e.majorGridlines,
|
|
2249
|
+
minorGridlines: e.minorGridlines,
|
|
2250
|
+
majorTickMarks: e.majorTickMark ? { type: e.majorTickMark } : void 0,
|
|
2251
|
+
minorTickMarks: e.minorTickMark ? { type: e.minorTickMark } : void 0,
|
|
2252
|
+
tickLabels: e.tickLblPos === "none" ? void 0 : {},
|
|
2253
|
+
numFmt: e.numFmt,
|
|
2254
|
+
spPr: e.spPr,
|
|
2255
|
+
txPr: e.txPr,
|
|
2256
|
+
unknown: e.unknown
|
|
2257
|
+
});
|
|
2258
|
+
}, br = (e) => {
|
|
2259
|
+
let t = e.chart, n = t?.plotArea, r = [], i = [], a = [];
|
|
2260
|
+
for (let e of n?.groups ?? []) {
|
|
2261
|
+
let t = Wn[e.type];
|
|
2262
|
+
if (t) for (let n of e.series) {
|
|
2263
|
+
let o = vr(n), s;
|
|
2264
|
+
if (o.length > 0) {
|
|
2265
|
+
let e = JSON.stringify(o);
|
|
2266
|
+
s = a.indexOf(e), s === -1 && (s = i.length, i.push({
|
|
2267
|
+
id: s,
|
|
2268
|
+
dimensions: o
|
|
2269
|
+
}), a.push(e));
|
|
2270
|
+
}
|
|
2271
|
+
let c = r.length;
|
|
2272
|
+
r.push($({
|
|
2273
|
+
layoutId: t,
|
|
2274
|
+
hidden: n.hidden,
|
|
2275
|
+
uniqueId: n.uniqueId,
|
|
2276
|
+
formatIdx: n.idx,
|
|
2277
|
+
tx: lr(n.tx),
|
|
2278
|
+
spPr: n.spPr,
|
|
2279
|
+
points: mr(n.points),
|
|
2280
|
+
dataLabels: pr(n.dLbls),
|
|
2281
|
+
dataId: s,
|
|
2282
|
+
layoutPr: hr(n.layoutPr, n.points, e.type === "waterfall"),
|
|
2283
|
+
axisIds: e.axIds.length > 0 ? e.axIds : void 0,
|
|
2284
|
+
unknown: n.unknown
|
|
2285
|
+
}));
|
|
2286
|
+
let l = n.cumulativeLine;
|
|
2287
|
+
l && r.push($({
|
|
2288
|
+
layoutId: Kn,
|
|
2289
|
+
hidden: l.hidden,
|
|
2290
|
+
ownerIdx: c,
|
|
2291
|
+
uniqueId: l.uniqueId,
|
|
2292
|
+
formatIdx: l.idx,
|
|
2293
|
+
tx: lr(l.tx),
|
|
2294
|
+
spPr: l.spPr,
|
|
2295
|
+
points: mr(l.points),
|
|
2296
|
+
dataLabels: pr(l.dLbls),
|
|
2297
|
+
layoutPr: hr(l.layoutPr, l.points, !1),
|
|
2298
|
+
axisIds: l.axIds,
|
|
2299
|
+
unknown: l.unknown
|
|
2300
|
+
}));
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
let o = t?.legend;
|
|
2304
|
+
return $({
|
|
2305
|
+
chartData: { data: i },
|
|
2306
|
+
chart: $({
|
|
2307
|
+
title: (s = t?.title, s && $({
|
|
2308
|
+
pos: s.pos,
|
|
2309
|
+
align: s.align,
|
|
2310
|
+
overlay: s.overlay,
|
|
2311
|
+
tx: lr(s.tx),
|
|
2312
|
+
spPr: s.spPr,
|
|
2313
|
+
txPr: s.txPr,
|
|
2314
|
+
unknown: s.unknown
|
|
2315
|
+
})),
|
|
2316
|
+
plotArea: $({
|
|
2317
|
+
plotAreaRegion: $({
|
|
2318
|
+
plotSurface: n?.plotSurface,
|
|
2319
|
+
series: r
|
|
2320
|
+
}),
|
|
2321
|
+
axes: (n?.axes ?? []).map(yr),
|
|
2322
|
+
spPr: n?.spPr,
|
|
2323
|
+
unknown: n?.unknown
|
|
2324
|
+
}),
|
|
2325
|
+
legend: o && $({
|
|
2326
|
+
pos: o.legendPos === "tr" ? "r" : o.legendPos,
|
|
2327
|
+
align: o.align,
|
|
2328
|
+
overlay: o.overlay,
|
|
2329
|
+
spPr: o.spPr,
|
|
2330
|
+
txPr: o.txPr,
|
|
2331
|
+
unknown: o.unknown
|
|
2332
|
+
}),
|
|
2333
|
+
unknown: t?.unknown
|
|
2334
|
+
}),
|
|
2335
|
+
spPr: e.spPr,
|
|
2336
|
+
txPr: e.txPr,
|
|
2337
|
+
unknown: e.unknown
|
|
2338
|
+
});
|
|
2339
|
+
var s;
|
|
2340
|
+
}, xr = (e, t) => {
|
|
2341
|
+
if (e === t) return !0;
|
|
2342
|
+
if (typeof e != "object" || typeof t != "object" || e === null || t === null || Array.isArray(e) !== Array.isArray(t)) return !1;
|
|
2343
|
+
let n = (e) => Object.keys(e).filter((t) => e[t] !== void 0), r = n(e), i = n(t);
|
|
2344
|
+
return r.length === i.length && r.every((n) => xr(e[n], t[n]));
|
|
2345
|
+
}, Sr = (e, t) => xr(e, br(t)), Cr = (e) => {
|
|
2346
|
+
let t = x(e);
|
|
2347
|
+
if (!t || t.name !== "chartSpace") return null;
|
|
2348
|
+
let n = xe(t, ye);
|
|
2349
|
+
if (!ve(Se(t, n))) return null;
|
|
2350
|
+
let r = new Oe(e, n), i = k(t, Hn, ye, r), a = ((e) => {
|
|
2351
|
+
let t = e.chart, n = t?.plotArea, r = t?.legend;
|
|
2352
|
+
return $({
|
|
2353
|
+
chart: $({
|
|
2354
|
+
title: Qn(t?.title),
|
|
2355
|
+
plotArea: $({
|
|
2356
|
+
groups: sr(n?.plotAreaRegion, e.chartData?.data ?? []),
|
|
2357
|
+
axes: (n?.axes ?? []).map(cr),
|
|
2358
|
+
spPr: n?.spPr,
|
|
2359
|
+
plotSurface: n?.plotAreaRegion?.plotSurface,
|
|
2360
|
+
unknown: n?.unknown
|
|
2361
|
+
}),
|
|
2362
|
+
legend: r && $({
|
|
2363
|
+
legendPos: r.pos,
|
|
2364
|
+
align: r.align,
|
|
2365
|
+
overlay: r.overlay,
|
|
2366
|
+
spPr: r.spPr,
|
|
2367
|
+
txPr: r.txPr,
|
|
2368
|
+
unknown: r.unknown
|
|
2369
|
+
}),
|
|
2370
|
+
unknown: t?.unknown
|
|
2371
|
+
}),
|
|
2372
|
+
spPr: e.spPr,
|
|
2373
|
+
txPr: e.txPr,
|
|
2374
|
+
unknown: e.unknown
|
|
2375
|
+
});
|
|
2376
|
+
})(i);
|
|
2377
|
+
return {
|
|
2378
|
+
model: a,
|
|
2379
|
+
kept: r.kept,
|
|
2380
|
+
reordered: r.reordered,
|
|
2381
|
+
lossy: !Sr(i, a)
|
|
2382
|
+
};
|
|
2383
|
+
}, wr = (e) => {
|
|
2384
|
+
let t = { ...e.unknown?.attributes }, n = (e, n) => {
|
|
2385
|
+
t[`xmlns:${e}`] ??= n;
|
|
2386
|
+
};
|
|
2387
|
+
n(w.a, ue), n(w.r, fe), n(w.cx, me);
|
|
2388
|
+
let r = br(e), i = new Ce().raw(cn);
|
|
2389
|
+
return ((e, t) => {
|
|
2390
|
+
A(e, j("cx", "chartSpace"), t, Hn);
|
|
2391
|
+
})(i, {
|
|
2392
|
+
...r,
|
|
2393
|
+
unknown: {
|
|
2394
|
+
...r.unknown,
|
|
2395
|
+
attributes: t
|
|
2396
|
+
}
|
|
2397
|
+
}), i.toString();
|
|
2398
|
+
}, Tr = (e, t) => {
|
|
2399
|
+
if (t) {
|
|
2400
|
+
let n = Cr(t);
|
|
2401
|
+
if (n && JSON.stringify(n.model) === JSON.stringify(e)) return t;
|
|
2402
|
+
}
|
|
2403
|
+
return wr(e);
|
|
2404
|
+
}, Er = {
|
|
2405
|
+
chart: {
|
|
2406
|
+
relType: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
|
|
2407
|
+
contentType: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
|
|
2408
|
+
path: "../charts/chart{n}.xml",
|
|
2409
|
+
graphicUri: ce
|
|
2410
|
+
},
|
|
2411
|
+
chartEx: {
|
|
2412
|
+
relType: "http://schemas.microsoft.com/office/2014/relationships/chartEx",
|
|
2413
|
+
contentType: "application/vnd.ms-office.chartex+xml",
|
|
2414
|
+
path: "../charts/chartEx{n}.xml",
|
|
2415
|
+
graphicUri: me
|
|
2416
|
+
}
|
|
2417
|
+
}, Dr = /* @__PURE__ */ new Set([
|
|
2418
|
+
"area",
|
|
2419
|
+
"bar",
|
|
2420
|
+
"line",
|
|
2421
|
+
"pie",
|
|
2422
|
+
"doughnut",
|
|
2423
|
+
"ofPie",
|
|
2424
|
+
"scatter",
|
|
2425
|
+
"bubble",
|
|
2426
|
+
"radar",
|
|
2427
|
+
"stock",
|
|
2428
|
+
"surface"
|
|
2429
|
+
]), Or = (e) => e === Er.chartEx.relType ? "chartEx" : e === Er.chart.relType ? "chart" : null, kr = (e) => Dr.has(e) ? "chart" : Gn.has(e) ? "chartEx" : null, Ar = (e) => {
|
|
2430
|
+
let t = sn(e);
|
|
2431
|
+
if (t) return {
|
|
2432
|
+
model: t.model,
|
|
2433
|
+
family: "chart",
|
|
2434
|
+
kept: t.kept,
|
|
2435
|
+
lossy: !1
|
|
2436
|
+
};
|
|
2437
|
+
let n = Cr(e);
|
|
2438
|
+
return n ? {
|
|
2439
|
+
model: n.model,
|
|
2440
|
+
family: "chartEx",
|
|
2441
|
+
kept: n.kept,
|
|
2442
|
+
lossy: n.lossy
|
|
2443
|
+
} : null;
|
|
2444
|
+
}, jr = (e) => {
|
|
2445
|
+
if (Array.isArray(e)) return e.map(jr);
|
|
2446
|
+
if (typeof e != "object" || !e) return e;
|
|
2447
|
+
let t = {};
|
|
2448
|
+
for (let [n, r] of Object.entries(e)) n !== "unknown" && (t[n] = jr(r));
|
|
2449
|
+
return t;
|
|
2450
|
+
}, Mr = (e, t) => {
|
|
2451
|
+
let n = e.chart?.plotArea?.groups ?? [], r = n.map((e) => kr(e.type)).find((e) => e !== null) ?? t?.family ?? "chart", i = n.filter((e) => kr(e.type) !== r).map((e) => e.type), a = e;
|
|
2452
|
+
if (i.length > 0) {
|
|
2453
|
+
let t = {
|
|
2454
|
+
...e.chart.plotArea,
|
|
2455
|
+
groups: n.filter((e) => kr(e.type) === r)
|
|
2456
|
+
};
|
|
2457
|
+
a = {
|
|
2458
|
+
...e,
|
|
2459
|
+
chart: {
|
|
2460
|
+
...e.chart,
|
|
2461
|
+
plotArea: t
|
|
2462
|
+
}
|
|
2463
|
+
};
|
|
2464
|
+
}
|
|
2465
|
+
let o = (t?.family ?? r) === r;
|
|
2466
|
+
o || (a = jr(a));
|
|
2467
|
+
let s = o ? t?.xml : void 0;
|
|
2468
|
+
return {
|
|
2469
|
+
family: r,
|
|
2470
|
+
leftOut: i,
|
|
2471
|
+
xml: r === "chartEx" ? Tr(a, s) : un(a, s)
|
|
2472
|
+
};
|
|
2473
|
+
};
|
|
2474
|
+
export { u as a, l as c, Mr as i, c as l, Or as n, h as o, Ar as r, g as s, Er as t };
|