@silurus/ooxml 0.89.7 → 0.89.8
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/dist/assets/render-worker-Ck21oePL.js +16 -0
- package/dist/assets/render-worker-DJiGqgi0.js +15 -0
- package/dist/assets/render-worker-hPLJ82d2.js +35 -0
- package/dist/{bounded-raw-part-cache-B8t03tSP.js → bounded-raw-part-cache-B5a6cGKO.js} +1713 -1515
- package/dist/{canvas-viewer-mechanics-DI38gHNV.js → canvas-viewer-mechanics-BsqaoYgK.js} +2 -2
- package/dist/{cfb-guard-BIaHdonq.js → cfb-guard-DzYlucez.js} +1 -1
- package/dist/chart-ex.mjs +367 -367
- package/dist/{comment-overlay-controller-Crm5Syhx.js → comment-overlay-controller-B7AoyoDK.js} +18 -18
- package/dist/{comment-ui-runtime-DKlEfBPp.js → comment-ui-runtime-C5eWtZSW.js} +3 -3
- package/dist/{comment-ui-runtime-BfEPgl5r.js → comment-ui-runtime-CV0I9faV.js} +3 -3
- package/dist/{document-model-source-xnkMoTZ_.js → document-model-source-90ext13g.js} +37 -37
- package/dist/{document-pull-client-CzhPbnY_.js → document-pull-client-DSYpUET2.js} +17109 -13858
- package/dist/{document-pull-worker-Bkewz-So.js → document-pull-worker-hMKJ5RdB.js} +14 -14
- package/dist/{docx-BgCQiuuN.js → docx-DCCDnwrG.js} +593 -593
- package/dist/{docx-BWyACb-n.js → docx-G7pt7ajR.js} +33 -33
- package/dist/{docx-model-source-DCRFgO7-.js → docx-model-source-Beon3BD5.js} +6 -6
- package/dist/docx.mjs +4 -4
- package/dist/docx_parser_bg.wasm +0 -0
- package/dist/{drawingml-shape-BcXkRayC.js → drawingml-shape-B1_kg4BV.js} +55 -55
- package/dist/{duotone-BI7CoghW.js → duotone-GK4Hqn7f.js} +1 -1
- package/dist/{emf-DgUBx9BU.js → emf--QWY-UlT.js} +50 -50
- package/dist/{font-preload-demand-B6HPFxDp.js → font-preload-demand-NqcVKIpX.js} +2 -2
- package/dist/{grid-geometry-CqTDvpDr.js → grid-geometry-DpMAiSZb.js} +1 -1
- package/dist/{host-layout-measure-CXKOWA5J.js → host-layout-measure-Z2fIsmDw.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/internal-companion.mjs +2 -2
- package/dist/{line-distribute-DR9Qwd3u.js → line-distribute-CwtditQo.js} +31 -25
- package/dist/{model-source-DcI3vC00.js → model-source-Cch44xsb.js} +2 -2
- package/dist/{model-source-session-BlQWNyj2.js → model-source-session-ClNCRDOg.js} +21 -21
- package/dist/{model-source-session-D0LF49Ve.js → model-source-session-DRcqFGfM.js} +2 -2
- package/dist/{model-source-session-BCteVilS.js → model-source-session-DSABX94B.js} +2 -2
- package/dist/node.mjs +5 -5
- package/dist/{plot-area-frame-D3JtHvov.js → plot-area-frame-DNYMd9Pf.js} +1914 -1890
- package/dist/{pptx-SmjDGyub.js → pptx-C1CiFW1D.js} +35 -33
- package/dist/{pptx-CfCiVlNB.js → pptx-Ci1Y9SS_.js} +261 -259
- package/dist/{pptx-model-source-B2Irk68a.js → pptx-model-source-C9TuBisH.js} +18 -12
- package/dist/pptx-parsed-slides-BMGr4khe.js +8 -0
- package/dist/pptx.mjs +5 -5
- package/dist/pptx_parser_bg.wasm +0 -0
- package/dist/{presentation-model-source-DL6duh5l.js → presentation-model-source-3N7xLtmI.js} +6 -6
- package/dist/region-map.mjs +39 -39
- package/dist/{render-CMUEAeHp.js → render-Bf_Gywxw.js} +32 -30
- package/dist/{render-worker-host-CZHIKTtZ.js → render-worker-host-BZoh-wqR.js} +1 -1
- package/dist/{render-worker-host-CtlBbau5.js → render-worker-host-BmVeB_mR.js} +1 -1
- package/dist/{render-worker-host-G1fnymI8.js → render-worker-host-CVr53kg0.js} +1 -1
- package/dist/{renderer-B4KIpz-2.js → renderer-CCA_bQB8.js} +439 -439
- package/dist/renderer-DpTePxGq.js +5887 -0
- package/dist/{resource-measurement-D2bu0Qfx.js → resource-measurement-CfJtbwiR.js} +129 -129
- package/dist/{session-KIWcCCP2.js → session-DPXK_lpI.js} +64 -64
- package/dist/{slide-pull-client-BUuJQQVE.js → slide-pull-client-3g6TxaKa.js} +1421 -1421
- package/dist/{three-d-ByHGsYrX.js → three-d-BfMZVR0w.js} +98 -98
- package/dist/three-d.mjs +678 -678
- package/dist/types/chart-ex.d.ts +5 -2
- package/dist/types/docx.d.ts +29 -7
- package/dist/types/index.d.ts +34 -11
- package/dist/types/node.d.ts +27 -5
- package/dist/types/pptx.d.ts +11 -7
- package/dist/types/region-map.d.ts +5 -2
- package/dist/types/three-d.d.ts +5 -2
- package/dist/types/xlsx.d.ts +10 -7
- package/dist/{wasm-runtime-generation-BLweKv8r.js → wasm-runtime-generation-D97yoAXz.js} +17 -17
- package/dist/{workbook-model-source-J9ir5Kov.js → workbook-model-source-BHR8shXr.js} +6 -6
- package/dist/{worksheet-pull-client-Du0MuIro.js → worksheet-pull-client-BudfclVl.js} +84 -84
- package/dist/{xlsx-BbQ7RcNc.js → xlsx-7aY3Pbvh.js} +44 -44
- package/dist/{xlsx-ClQiNSrr.js → xlsx-DTtDjzFq.js} +299 -299
- package/dist/{xlsx-model-source-C-Riw89p.js → xlsx-model-source-DXKvb90T.js} +36 -36
- package/dist/xlsx.mjs +5 -5
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-B3hF7Akg.js +0 -35
- package/dist/assets/render-worker-B5HWxkbU.js +0 -16
- package/dist/assets/render-worker-DNGf06QT.js +0 -15
- package/dist/renderer-xdugdcMd.js +0 -5769
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as t } from "./session-
|
|
3
|
-
import { t as n } from "./pptx-
|
|
4
|
-
import { t as r } from "./model-source-
|
|
1
|
+
import { Xt as e } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
2
|
+
import { n as t } from "./session-DPXK_lpI.js";
|
|
3
|
+
import { t as n } from "./pptx-C1CiFW1D.js";
|
|
4
|
+
import { t as r } from "./model-source-Cch44xsb.js";
|
|
5
5
|
async function i(t, r, i) {
|
|
6
6
|
let o = await a(t, r, i), s = new Proxy(o.archive, { get(e, t) {
|
|
7
7
|
if (t === "extract_media" && !e.extract_media) return () => {
|
|
@@ -10,14 +10,17 @@ async function i(t, r, i) {
|
|
|
10
10
|
let n = Reflect.get(e, t);
|
|
11
11
|
return typeof n == "function" ? n.bind(e) : n;
|
|
12
12
|
} });
|
|
13
|
-
return new n(o.closeArchive, s, o.bootstrap, o.metrics, r.signal, e(r.cjkFallback));
|
|
13
|
+
return new n(o.closeArchive, s, o.bootstrap, o.metrics, r.signal, e(r.cjkFallback), o.parsedTextChain);
|
|
14
14
|
}
|
|
15
15
|
async function a(e, n, i) {
|
|
16
|
-
let { acquirePptxSessionFromArchive: a, validatePptxModelSourceArchive: o, validatePptxModelSourceViewDefaults: s } = await import("./model-source-session-
|
|
16
|
+
let { acquirePptxSessionFromArchive: a, validatePptxModelSourceArchive: o, validatePptxModelSourceViewDefaults: s } = await import("./model-source-session-DRcqFGfM.js"), c = await r(e, "pptx", {
|
|
17
17
|
...n,
|
|
18
18
|
source: n.legacyPpt
|
|
19
19
|
}, o);
|
|
20
|
-
if (c.kind === "ooxml") return
|
|
20
|
+
if (c.kind === "ooxml") return {
|
|
21
|
+
...await t(c.bytes, i(), n),
|
|
22
|
+
parsedTextChain: !0
|
|
23
|
+
};
|
|
21
24
|
try {
|
|
22
25
|
s(c.opened.viewDefaults);
|
|
23
26
|
} catch (e) {
|
|
@@ -26,10 +29,13 @@ async function a(e, n, i) {
|
|
|
26
29
|
} catch {}
|
|
27
30
|
throw e;
|
|
28
31
|
}
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
return {
|
|
33
|
+
...a({
|
|
34
|
+
archive: c.opened.archive,
|
|
35
|
+
sourceByteLength: c.sourceByteLength,
|
|
36
|
+
closeArchive: c.opened.close
|
|
37
|
+
}, n),
|
|
38
|
+
parsedTextChain: !1
|
|
39
|
+
};
|
|
34
40
|
}
|
|
35
41
|
export { i as openPptxSource };
|
package/dist/pptx.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as e } from "./slide-pull-client-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { l as e } from "./slide-pull-client-3g6TxaKa.js";
|
|
2
|
+
import { Co as t, wo as n } from "./plot-area-frame-DNYMd9Pf.js";
|
|
3
|
+
import { p as r } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
4
4
|
import { f as i, u as a } from "./pixel-budget-DI82Hn3R.js";
|
|
5
5
|
import { i as o, t as s } from "./tiff-contract-DEd8CGuz.js";
|
|
6
|
-
import { D as c } from "./canvas-viewer-mechanics-
|
|
7
|
-
import { a as l, c as u, i as d, l as f, n as p, o as m } from "./pptx-
|
|
6
|
+
import { D as c } from "./canvas-viewer-mechanics-BsqaoYgK.js";
|
|
7
|
+
import { a as l, c as u, i as d, l as f, n as p, o as m } from "./pptx-Ci1Y9SS_.js";
|
|
8
8
|
export { a as OoxmlDecodedImageLimitError, t as OoxmlError, n as OoxmlResourceLimitError, m as PptxPresentation, p as PptxScrollViewer, d as PptxViewer, s as TiffDecodeError, c as autoResize, u as buildPptxHighlightLayer, f as buildPptxTextLayer, i as isOoxmlDecodedImageLimitError, o as isTiffDecodeError, r as openExternalHyperlink, l as readPptxTextSelectionContext, e as renderSlide };
|
package/dist/pptx_parser_bg.wasm
CHANGED
|
Binary file
|
package/dist/{presentation-model-source-DL6duh5l.js → presentation-model-source-3N7xLtmI.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { b as r } from "./comment-overlay-controller-
|
|
3
|
-
import { T as i } from "./canvas-viewer-mechanics-
|
|
1
|
+
import { I as e, P as t, Xt as n } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
2
|
+
import { b as r } from "./comment-overlay-controller-B7AoyoDK.js";
|
|
3
|
+
import { T as i } from "./canvas-viewer-mechanics-BsqaoYgK.js";
|
|
4
4
|
import { n as a } from "./renderer-module-contract-BuTx2FWJ.js";
|
|
5
|
-
import { o, s } from "./pptx-
|
|
5
|
+
import { o, s } from "./pptx-Ci1Y9SS_.js";
|
|
6
6
|
import { n as c, o as l, r as u } from "./model-source-COXegBNA.js";
|
|
7
7
|
import { t as d } from "./bundled-asset-url-BMJ8vNHP.js";
|
|
8
8
|
async function f(u, d) {
|
|
@@ -30,11 +30,11 @@ async function f(u, d) {
|
|
|
30
30
|
let _ = c(t, "pptx");
|
|
31
31
|
try {
|
|
32
32
|
g.setSourceBytes(e.byteLength), g.checkpoint("container ready");
|
|
33
|
-
let t = f === "worker" ? (await import("./render-worker-host-
|
|
33
|
+
let t = f === "worker" ? (await import("./render-worker-host-CVr53kg0.js")).createRenderWorker() : new (await (import("./worker-source-ZQE9C1j6.js"))).default(), c = p(t, _), l = f === "worker" ? a(d) : void 0, u;
|
|
34
34
|
try {
|
|
35
35
|
u = new o(c, f, d.wasmUrl);
|
|
36
36
|
let t = u;
|
|
37
|
-
t._metrics = g, t._cjkFallback = n(d.cjkFallback), t._math = f === "worker" ? void 0 : d.math, t._threeD = f === "worker" ? void 0 : d.threeD, t._regionMap = f === "worker" ? void 0 : d.regionMap, t._chartEx = f === "worker" ? void 0 : d.chartEx, t._tiff = f === "worker" ? void 0 : d.tiff, t._googleSubstitutes = !!d.useGoogleFonts, m(d, f, l);
|
|
37
|
+
t._metrics = g, t._cjkFallback = n(d.cjkFallback), t._math = f === "worker" ? void 0 : d.math, t._threeD = f === "worker" ? void 0 : d.threeD, t._regionMap = f === "worker" ? void 0 : d.regionMap, t._chartEx = f === "worker" ? void 0 : d.chartEx, t._tiff = f === "worker" ? void 0 : d.tiff, t._googleSubstitutes = !!d.useGoogleFonts, t._parsedTextChain = !1, m(d, f, l);
|
|
38
38
|
let i = d.progressiveLayout ? {
|
|
39
39
|
onProgress: d.onLayoutProgress,
|
|
40
40
|
onPartial: d.onLayoutPartial,
|
package/dist/region-map.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// optional-renderer: packages/core/src/chart/region-map-natural-earth.generated.ts
|
|
2
|
-
import {
|
|
3
|
-
import { a as d, l as f, s as p } from "./duotone-
|
|
2
|
+
import { Cn as e, Io as t, Sa as n, _a as r, ba as i, ma as a, pa as o, qt as s, t as c, ua as l, ya as u } from "./plot-area-frame-DNYMd9Pf.js";
|
|
3
|
+
import { a as d, l as f, s as p } from "./duotone-GK4Hqn7f.js";
|
|
4
4
|
import { t as m } from "./renderer-module-contract-BuTx2FWJ.js";
|
|
5
5
|
var h = [
|
|
6
6
|
{
|
|
@@ -12512,10 +12512,10 @@ var E = {
|
|
|
12512
12512
|
drcongo: "Democratic Republic of the Congo",
|
|
12513
12513
|
congodemocraticrepublic: "Democratic Republic of the Congo"
|
|
12514
12514
|
};
|
|
12515
|
-
function D(
|
|
12515
|
+
function D(e, n) {
|
|
12516
12516
|
let r = (e) => S.get(e) ?? C.get(e) ?? w.get(e) ?? T.get(e), i = n ? r(x(n)) : void 0;
|
|
12517
12517
|
if (i) return i;
|
|
12518
|
-
let a = x(
|
|
12518
|
+
let a = x(e), o = t(E, a);
|
|
12519
12519
|
return r(a) ?? (o ? r(x(o)) : void 0);
|
|
12520
12520
|
}
|
|
12521
12521
|
function O(e, t) {
|
|
@@ -12578,52 +12578,52 @@ function I(e) {
|
|
|
12578
12578
|
}
|
|
12579
12579
|
return t;
|
|
12580
12580
|
}
|
|
12581
|
-
function L(e, t, n, r,
|
|
12581
|
+
function L(e, t, n, r, a) {
|
|
12582
12582
|
if (!t.title && !t.titlePresent) return;
|
|
12583
|
-
let
|
|
12584
|
-
e.font = `${t.titleFontBold ?? !0 ? "bold " : ""}${r}px ${JSON.stringify(
|
|
12583
|
+
let o = t.titleFontFace || t.themeMajorFontLatin || "sans-serif";
|
|
12584
|
+
e.font = `${t.titleFontBold ?? !0 ? "bold " : ""}${r}px ${JSON.stringify(o)}`, e.fillStyle = t.titleFontColor ? `#${t.titleFontColor}` : "#333333", e.textAlign = "center", e.textBaseline = "top", i(e, t.title ?? "", n.x + n.w / 2, n.y + a, r);
|
|
12585
12585
|
}
|
|
12586
|
-
function R(
|
|
12586
|
+
function R(t, n, a, o, s, c, l, u) {
|
|
12587
12587
|
let d = n.series[0]?.name ?? "", f = Math.max(8, (n.legendFontSizeHpt ?? 900) / 100 * u);
|
|
12588
|
-
|
|
12589
|
-
let p = Math.min(c * .58, 240), m = Math.max(6, Math.min(12, l * .25)), h =
|
|
12590
|
-
_.addColorStop(0,
|
|
12588
|
+
t.font = `${n.legendFontBold ? "bold " : ""}${f}px ${JSON.stringify(n.legendFontFace || n.themeMinorFontLatin || "sans-serif")}`, t.fillStyle = n.legendFontColor ? `#${n.legendFontColor}` : "#595959", t.textAlign = "center", t.textBaseline = "top", d && i(t, d, o + c / 2, s, f + 2);
|
|
12589
|
+
let p = Math.min(c * .58, 240), m = Math.max(6, Math.min(12, l * .25)), h = o + (c - p) / 2, g = s + (d ? f + 2 + (r(d) - 1) * (f + 2) : 0), _ = t.createLinearGradient(h, 0, h + p, 0);
|
|
12590
|
+
_.addColorStop(0, a.minColor), a.midColor && _.addColorStop(.5, a.midColor), _.addColorStop(1, a.maxColor), t.fillStyle = _, t.fillRect(h, g, p, m), t.fillStyle = n.legendFontColor ? `#${n.legendFontColor}` : "#595959", t.textBaseline = "top", t.textAlign = "left";
|
|
12591
12591
|
let v = n.series[0]?.valFormatCode ?? null;
|
|
12592
|
-
|
|
12592
|
+
i(t, e(a.min, v, n.date1904), h, g + m + 2, f + 2), t.textAlign = "right", i(t, e(a.max, v, n.date1904), h + p, g + m + 2, f + 2);
|
|
12593
12593
|
}
|
|
12594
|
-
function z(
|
|
12595
|
-
let o =
|
|
12596
|
-
if (l <= 1 && u <= 1) return
|
|
12594
|
+
function z(t, n, i, a) {
|
|
12595
|
+
let o = t.series[0]?.name ?? "", s = Math.max(8, (t.legendFontSizeHpt ?? 900) / 100 * i), c = t.series[0]?.valFormatCode ?? null, l = o ? r(o) : 0, u = Math.max(r(e(n.min, c, t.date1904)), r(e(n.max, c, t.date1904)));
|
|
12596
|
+
if (l <= 1 && u <= 1) return a;
|
|
12597
12597
|
let d = l * (s + 2) + 12 + 2 + (u - 1) * (s + 2) + s;
|
|
12598
|
-
return Math.max(
|
|
12598
|
+
return Math.max(a, d);
|
|
12599
12599
|
}
|
|
12600
12600
|
function B(e, t, n, r) {
|
|
12601
12601
|
e.fillStyle = "#666666", e.font = `${Math.max(9, 9 * n)}px sans-serif`, e.textAlign = "center", e.textBaseline = "middle", e.fillText(r, t.x + t.w / 2, t.y + t.h / 2);
|
|
12602
12602
|
}
|
|
12603
|
-
function V(e, t,
|
|
12603
|
+
function V(e, t, r, d, f = 0) {
|
|
12604
12604
|
if (t.chartType !== "regionMap" || !t.chartexRegionMap) return !1;
|
|
12605
12605
|
let p = t.chartexRegionMap;
|
|
12606
|
-
if (p.rows.length > y) return B(e,
|
|
12607
|
-
if (p.geography?.cachePresent) return B(e,
|
|
12606
|
+
if (p.rows.length > y) return B(e, r, d, "(chart values exceed rendering limit)"), !0;
|
|
12607
|
+
if (p.geography?.cachePresent) return B(e, r, d, "(region map cache is unavailable offline)"), !0;
|
|
12608
12608
|
let m = p.geography?.viewedRegionType;
|
|
12609
|
-
if (m != null && m !== "world") return B(e,
|
|
12610
|
-
let g = I(p), _ = F([...g.values()], p.colors, t.chartexAccents?.[0]), v =
|
|
12609
|
+
if (m != null && m !== "world") return B(e, r, d, "(region map detail is unavailable offline)"), !0;
|
|
12610
|
+
let g = I(p), _ = F([...g.values()], p.colors, t.chartexAccents?.[0]), v = l(t, r.h, d, .02, .015), x = t.titleRichRuns?.length ? {
|
|
12611
12611
|
...v,
|
|
12612
|
-
bandH: v.bandH +
|
|
12612
|
+
bandH: v.bandH + a(t.title, v.fontPx)
|
|
12613
12613
|
} : v;
|
|
12614
|
-
L(e, t,
|
|
12615
|
-
let S = t.showLegend ? z(t, _, d, Math.max(32,
|
|
12616
|
-
x:
|
|
12617
|
-
y:
|
|
12618
|
-
w:
|
|
12614
|
+
L(e, t, r, x.fontPx, x.topPad);
|
|
12615
|
+
let S = t.showLegend ? z(t, _, d, Math.max(32, r.h * .16)) : 0, C = t.showLegend ? {
|
|
12616
|
+
x: r.x,
|
|
12617
|
+
y: r.y + x.bandH,
|
|
12618
|
+
w: r.w,
|
|
12619
12619
|
h: S
|
|
12620
|
-
} : null, w = C && t.legendManualLayout ?
|
|
12621
|
-
x:
|
|
12622
|
-
y:
|
|
12623
|
-
w: Math.max(1,
|
|
12624
|
-
h: Math.max(1,
|
|
12625
|
-
}, A = t.plotAreaManualLayout ?
|
|
12626
|
-
|
|
12620
|
+
} : null, w = C && t.legendManualLayout ? o(t.legendManualLayout, r, C) ?? C : C, T = t.legendOverlay === !0 ? 0 : S, E = r.w * .03, O = r.h * .035, k = {
|
|
12621
|
+
x: r.x + E,
|
|
12622
|
+
y: r.y + x.bandH + T,
|
|
12623
|
+
w: Math.max(1, r.w - E * 2),
|
|
12624
|
+
h: Math.max(1, r.h - x.bandH - T - O)
|
|
12625
|
+
}, A = t.plotAreaManualLayout ? o(t.plotAreaManualLayout, r, k) ?? k : k;
|
|
12626
|
+
c(e, t, A.x, A.y, A.w, A.h, d, f), w && (s(e, t, w, d, f), R(e, t, _, w.x, w.y, w.w, w.h, d));
|
|
12627
12627
|
let j = p.geography?.projectionType, M = Infinity, N = Infinity, P = -Infinity, V = -Infinity;
|
|
12628
12628
|
for (let e of h) for (let t of e.g) for (let e of t) for (let t of e) {
|
|
12629
12629
|
let e = b(t, j);
|
|
@@ -12659,15 +12659,15 @@ function V(e, t, a, d, f = 0) {
|
|
|
12659
12659
|
let r = Math.max(7, (t.dataLabelFontSizeHpt ?? 800) / 100 * d);
|
|
12660
12660
|
e.font = `${r}px ${JSON.stringify(t.dataLabelFontFace || t.themeMinorFontLatin || "sans-serif")}`, e.fillStyle = t.dataLabelFontColor ? `#${t.dataLabelFontColor}` : "#404040", e.textAlign = "center", e.textBaseline = "middle";
|
|
12661
12661
|
for (let t of p.rows) {
|
|
12662
|
-
let
|
|
12663
|
-
if (!
|
|
12664
|
-
let s = G(
|
|
12665
|
-
(p.regionLabelLayout === "showAll" ||
|
|
12662
|
+
let a = D(t.label, t.entityId), o = a ? K.get(a) : void 0;
|
|
12663
|
+
if (!a || !o || !t.label) continue;
|
|
12664
|
+
let s = G(a.l), c = n(e, t.label) <= Math.max(0, o.maxX - o.minX - 4);
|
|
12665
|
+
(p.regionLabelLayout === "showAll" || c) && i(e, t.label, s.x, s.y, u(r));
|
|
12666
12666
|
}
|
|
12667
12667
|
}
|
|
12668
12668
|
if (p.geography?.attribution) {
|
|
12669
12669
|
let t = Math.max(7, 7 * d);
|
|
12670
|
-
e.font = `${t}px sans-serif`, e.fillStyle = "#777777", e.textAlign = "right", e.textBaseline = "bottom",
|
|
12670
|
+
e.font = `${t}px sans-serif`, e.fillStyle = "#777777", e.textAlign = "right", e.textBaseline = "bottom", i(e, p.geography.attribution, r.x + r.w - 4, r.y + r.h - 2, u(t));
|
|
12671
12671
|
}
|
|
12672
12672
|
return !0;
|
|
12673
12673
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { t as e } from "./chunk-D5OxutzX.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { Xt as t } from "./bounded-raw-part-cache-B5a6cGKO.js";
|
|
3
|
+
import { t as n } from "./pptx-parsed-slides-BMGr4khe.js";
|
|
4
|
+
var r = /* @__PURE__ */ e({
|
|
5
|
+
installImageBitmapShim: () => o,
|
|
6
|
+
installOffscreenCanvasShim: () => a,
|
|
7
|
+
renderSlideNode: () => c,
|
|
8
|
+
withNodeCanvasRuntime: () => s
|
|
9
|
+
}), i = Promise.resolve();
|
|
10
|
+
function a(e) {
|
|
10
11
|
let t = globalThis, n = t.OffscreenCanvas, r = Object.prototype.hasOwnProperty.call(globalThis, "OffscreenCanvas");
|
|
11
12
|
if (n !== void 0) return () => {};
|
|
12
13
|
class i {
|
|
@@ -18,7 +19,7 @@ function i(e) {
|
|
|
18
19
|
r ? t.OffscreenCanvas = n : delete t.OffscreenCanvas;
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function o(e) {
|
|
22
23
|
let t = globalThis, n = t.createImageBitmap;
|
|
23
24
|
return t.createImageBitmap = async (t, n) => {
|
|
24
25
|
if (t && typeof t.getContext == "function") return t;
|
|
@@ -34,34 +35,35 @@ function a(e) {
|
|
|
34
35
|
t.createImageBitmap = n;
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
+
function s(e, t) {
|
|
38
39
|
let n = async () => {
|
|
39
|
-
let n = typeof globalThis.createImageBitmap == "function" ? () => void 0 :
|
|
40
|
+
let n = typeof globalThis.createImageBitmap == "function" ? () => void 0 : o(e), r = a(e);
|
|
40
41
|
try {
|
|
41
42
|
return await t();
|
|
42
43
|
} finally {
|
|
43
44
|
r(), n();
|
|
44
45
|
}
|
|
45
|
-
},
|
|
46
|
-
return
|
|
46
|
+
}, r = i.then(n, n);
|
|
47
|
+
return i = r.then(() => void 0, () => void 0), r;
|
|
47
48
|
}
|
|
48
|
-
async function
|
|
49
|
-
let
|
|
50
|
-
if (!
|
|
51
|
-
let
|
|
52
|
-
await
|
|
53
|
-
width:
|
|
54
|
-
dpr:
|
|
55
|
-
cjkFallback:
|
|
56
|
-
defaultTextColor:
|
|
57
|
-
majorFont:
|
|
58
|
-
minorFont:
|
|
59
|
-
hlinkColor:
|
|
60
|
-
fetchMedia:
|
|
61
|
-
fetchImage:
|
|
62
|
-
skipMediaControls: !0
|
|
49
|
+
async function c(e, r, i, a = {}) {
|
|
50
|
+
let o = t(a.cjkFallback), { renderSlideWithEmbeddedFonts: c } = await import("./session-DPXK_lpI.js").then((e) => e.t), l = r.slides[i];
|
|
51
|
+
if (!l) throw Error(`Slide index ${i} out of range`);
|
|
52
|
+
let u = a.width ?? 960, d = a.dpr ?? 2, f = a.fetchImage ?? (async () => new Blob([])), p = async () => {
|
|
53
|
+
await c(e, l, r.slideWidth, r.slideHeight, {
|
|
54
|
+
width: u,
|
|
55
|
+
dpr: d,
|
|
56
|
+
cjkFallback: o,
|
|
57
|
+
defaultTextColor: r.defaultTextColor,
|
|
58
|
+
majorFont: r.majorFont,
|
|
59
|
+
minorFont: r.minorFont,
|
|
60
|
+
hlinkColor: r.hlinkColor ?? null,
|
|
61
|
+
fetchMedia: a.fetchMedia ?? (async () => new Blob([])),
|
|
62
|
+
fetchImage: f,
|
|
63
|
+
skipMediaControls: !0,
|
|
64
|
+
...n(l) ? { parsedTextChain: !0 } : {}
|
|
63
65
|
});
|
|
64
66
|
};
|
|
65
|
-
await (
|
|
67
|
+
await (a.factory ? s(a.factory, p) : p());
|
|
66
68
|
}
|
|
67
|
-
export {
|
|
69
|
+
export { s as a, r as i, a as n, c as r, o as t };
|