@silurus/ooxml 0.89.10 → 0.89.12
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-jGsxSIGb.js → render-worker-BD7EhV2y.js} +17 -17
- package/dist/assets/render-worker-BiKxVVB1.js +16 -0
- package/dist/assets/{render-worker-Coh33rbW.js → render-worker-CVqXtEMW.js} +13 -13
- package/dist/{bounded-raw-part-cache-B5a6cGKO.js → bounded-raw-part-cache-D2Q0FIoE.js} +719 -663
- package/dist/{canvas-viewer-mechanics-BsqaoYgK.js → canvas-viewer-mechanics-_ZBxW_sN.js} +1 -1
- package/dist/{comment-overlay-controller-b3tKmzMa.js → comment-overlay-controller-CVvQCYhQ.js} +8 -8
- package/dist/{comment-ui-runtime-Bp37ytDC.js → comment-ui-runtime-CYkt_9-b.js} +2 -2
- package/dist/{comment-ui-runtime-BkpFlPT0.js → comment-ui-runtime-DhTTGSay.js} +3 -3
- package/dist/{document-model-source-Ca2fk_Fc.js → document-model-source-C6wGN8m3.js} +45 -45
- package/dist/{document-pull-client-CTGM4i1m.js → document-pull-client-BfGXPuQc.js} +4117 -4128
- package/dist/{document-pull-worker-hMKJ5RdB.js → document-pull-worker-Bl3wlLXC.js} +4 -4
- package/dist/{docx-B-47Ff78.js → docx-CNscQaT8.js} +496 -496
- package/dist/{docx-DwdB7I59.js → docx-Cry-eklK.js} +7 -7
- package/dist/{docx-model-source-CWuvf9jk.js → docx-model-source-Cj8DGdLl.js} +6 -6
- package/dist/docx.mjs +3 -3
- package/dist/{drawingml-shape-B1_kg4BV.js → drawingml-shape-CFzAXuvj.js} +88 -116
- package/dist/{font-preload-demand-NqcVKIpX.js → font-preload-demand-DhFVOxz4.js} +1 -1
- package/dist/{host-layout-measure-IFLllYwV.js → host-layout-measure-CWKDrVpo.js} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/internal-companion.mjs +2 -2
- package/dist/{line-distribute-CwtditQo.js → line-distribute-DxnuaRdO.js} +24 -24
- package/dist/{model-source-Cch44xsb.js → model-source-DksDDVb4.js} +1 -1
- package/dist/{model-source-session-DRcqFGfM.js → model-source-session-8wqlNxsQ.js} +2 -2
- package/dist/{model-source-session-ClNCRDOg.js → model-source-session-BogYRDwj.js} +2 -2
- package/dist/{model-source-session-DSABX94B.js → model-source-session-ifwyPPhZ.js} +2 -2
- package/dist/node.mjs +4 -4
- package/dist/{pptx-DbjWegUB.js → pptx-Bons7t3Y.js} +26 -26
- package/dist/{pptx-C1CiFW1D.js → pptx-CQtPbMxI.js} +10 -10
- package/dist/{pptx-model-source-C9TuBisH.js → pptx-model-source-mg-O0LR9.js} +5 -5
- package/dist/pptx.mjs +4 -4
- package/dist/{presentation-model-source-DLNioq7T.js → presentation-model-source-CK6_hY1W.js} +5 -5
- package/dist/{render-Bf_Gywxw.js → render-C7F07FrC.js} +2 -2
- package/dist/{render-worker-host-80mSndWp.js → render-worker-host-Cj-U3WPe.js} +1 -1
- package/dist/{render-worker-host-CVr53kg0.js → render-worker-host-D7L6GMbE.js} +1 -1
- package/dist/{render-worker-host-pKls3F_t.js → render-worker-host-stI5Lppz.js} +1 -1
- package/dist/{renderer-DuYC3xXi.js → renderer-N76SnQW7.js} +1286 -1212
- package/dist/{resource-measurement-CfJtbwiR.js → resource-measurement-B2hzmYlu.js} +90 -90
- package/dist/{session-DPXK_lpI.js → session-D5au4i-W.js} +166 -166
- package/dist/{slide-pull-client-3g6TxaKa.js → slide-pull-client-3mJmNjjB.js} +854 -904
- package/dist/{wasm-runtime-generation-D97yoAXz.js → wasm-runtime-generation--_2SjW2G.js} +1 -1
- package/dist/{workbook-model-source-D1dmkDMP.js → workbook-model-source-CI1q6nxK.js} +6 -6
- package/dist/{worksheet-pull-client-BudfclVl.js → worksheet-pull-client-C2h4AMwt.js} +18 -18
- package/dist/{xlsx-DBhYlJKp.js → xlsx-CKXeKvxl.js} +452 -452
- package/dist/{xlsx-DA0uR1B1.js → xlsx-DujIp7CR.js} +4 -4
- package/dist/{xlsx-model-source-zemVDAfl.js → xlsx-model-source-fs0svOUo.js} +6 -6
- package/dist/xlsx.mjs +4 -4
- package/dist/xlsx_parser_bg.wasm +0 -0
- package/package.json +1 -1
- package/dist/assets/render-worker-Ck21oePL.js +0 -16
|
@@ -23523,28 +23523,84 @@ function Yn(e, t, n, r, i, a, o, s, c) {
|
|
|
23523
23523
|
let l = xn(t, i, a, o, void 0, n, r), u = l?.[l.length - 1];
|
|
23524
23524
|
return !u || !u.stroke || !(u.fill === "none" || u.fill == null) ? !1 : (nn(e, qn(u.path, s, c)), !0);
|
|
23525
23525
|
}
|
|
23526
|
-
function Xn(e, t, n, r, i, a, o, s, c) {
|
|
23527
|
-
let
|
|
23528
|
-
|
|
23526
|
+
function Xn(e, t, n, r, i, a, o, s, c, l = !1) {
|
|
23527
|
+
let u = Ln(i, a, o, s);
|
|
23528
|
+
u && Zn(e, t, n, r, u, a, c, l);
|
|
23529
23529
|
}
|
|
23530
|
-
function Zn(e, t, n, r, i, a, o) {
|
|
23531
|
-
let
|
|
23532
|
-
e.save(), e.translate(t, n), e.rotate(r), e.fillStyle =
|
|
23530
|
+
function Zn(e, t, n, r, i, a, o, s = !1) {
|
|
23531
|
+
let c = o ?? g(a.color), l = (_(a.fill) || s && typeof c == "object") && typeof e.getTransform == "function" ? e.getTransform() : void 0;
|
|
23532
|
+
e.save(), e.translate(t, n), e.rotate(r), e.fillStyle = c, e.strokeStyle = c, e.lineWidth = i.stroke.lineWidth, e.setLineDash([]), e.beginPath(), nn(e, i.path), i.paint === "stroke" && (e.lineCap = i.stroke.lineCap, e.lineJoin = i.stroke.lineJoin, e.miterLimit = i.stroke.miterLimit), l && typeof c == "object" && (s || "setTransform" in c) && e.setTransform(l), i.paint === "fill" ? e.fill() : e.stroke(), e.restore();
|
|
23533
23533
|
}
|
|
23534
|
-
function Qn(e, t, n, r, i, a, o, s, c, l, u) {
|
|
23534
|
+
function Qn(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
23535
23535
|
if (!t.fill || s.type === "none") return;
|
|
23536
|
-
if (!_(t.fill) || typeof e.getTransform != "function") return b(t.fill, e, c.x, c.y, c.w, c.h, l, u) ?? void 0;
|
|
23537
|
-
let
|
|
23538
|
-
if (!
|
|
23539
|
-
let
|
|
23536
|
+
if (!_(t.fill) || typeof e.getTransform != "function") return b(t.fill, e, c.x, c.y, c.w, c.h, l, u, d) ?? void 0;
|
|
23537
|
+
let f = Fn(s, t, n, r);
|
|
23538
|
+
if (!f) return;
|
|
23539
|
+
let p = e.getTransform(), m = Math.cos(o), h = Math.sin(o), g = p.a * m + p.c * h, v = p.b * m + p.d * h, y = -p.a * h + p.c * m, x = -p.b * h + p.d * m, S = (f.x0 + f.x1) / 2, C = (f.x1 - f.x0) / 2, w = p.a * i + p.c * a + p.e + g * S, T = p.b * i + p.d * a + p.f + v * S, E = s.type === "oval", D = E ? Math.hypot(g * C, y * f.halfY) : Math.abs(g) * C + Math.abs(y) * f.halfY, ee = E ? Math.hypot(v * C, x * f.halfY) : Math.abs(v) * C + Math.abs(x) * f.halfY;
|
|
23540
23540
|
return b(t.fill, e, c.x, c.y, c.w, c.h, l, u, void 0, void 0, {
|
|
23541
|
-
x:
|
|
23542
|
-
y:
|
|
23543
|
-
w: 2 *
|
|
23544
|
-
h: 2 *
|
|
23541
|
+
x: w - D,
|
|
23542
|
+
y: T - ee,
|
|
23543
|
+
w: 2 * D,
|
|
23544
|
+
h: 2 * ee
|
|
23545
23545
|
}) ?? void 0;
|
|
23546
23546
|
}
|
|
23547
|
-
|
|
23547
|
+
var $n = new Set([
|
|
23548
|
+
"line",
|
|
23549
|
+
"straightconnector1",
|
|
23550
|
+
"bentconnector2",
|
|
23551
|
+
"bentconnector3",
|
|
23552
|
+
"bentconnector4",
|
|
23553
|
+
"bentconnector5",
|
|
23554
|
+
"curvedconnector2",
|
|
23555
|
+
"curvedconnector3",
|
|
23556
|
+
"curvedconnector4",
|
|
23557
|
+
"curvedconnector5"
|
|
23558
|
+
]), er = new Set([
|
|
23559
|
+
"callout1",
|
|
23560
|
+
"callout2",
|
|
23561
|
+
"callout3",
|
|
23562
|
+
"bordercallout1",
|
|
23563
|
+
"bordercallout2",
|
|
23564
|
+
"bordercallout3",
|
|
23565
|
+
"accentcallout1",
|
|
23566
|
+
"accentcallout2",
|
|
23567
|
+
"accentcallout3",
|
|
23568
|
+
"accentbordercallout1",
|
|
23569
|
+
"accentbordercallout2",
|
|
23570
|
+
"accentbordercallout3"
|
|
23571
|
+
]);
|
|
23572
|
+
function tr(e) {
|
|
23573
|
+
return $n.has(e) || er.has(e);
|
|
23574
|
+
}
|
|
23575
|
+
function nr(e) {
|
|
23576
|
+
return er.has(e) || e === "line" || e === "straightconnector1" || e.startsWith("bentconnector");
|
|
23577
|
+
}
|
|
23578
|
+
var rr = (e) => !!e && e.type !== "none";
|
|
23579
|
+
function ir(e, t, n, r, i = !1) {
|
|
23580
|
+
if (!t || !tr(e)) return null;
|
|
23581
|
+
let a = t.headEnd ? Pn(t.headEnd, t, n, r) : 0, o = t.tailEnd ? Pn(t.tailEnd, t, n, r) : 0, s = rr(t.headEnd) || rr(t.tailEnd);
|
|
23582
|
+
return {
|
|
23583
|
+
headTrim: a,
|
|
23584
|
+
tailTrim: o,
|
|
23585
|
+
decorated: s,
|
|
23586
|
+
restroke: nr(e) && (s || i) ? "vertices" : e.startsWith("curvedconnector") && (a > 0 || o > 0) ? "curve" : null
|
|
23587
|
+
};
|
|
23588
|
+
}
|
|
23589
|
+
function ar(e, t, n, r, i, a, o, s, c) {
|
|
23590
|
+
if (t.restroke === "vertices") {
|
|
23591
|
+
let n = r.vertices;
|
|
23592
|
+
return n.length < 2 ? !1 : (Jn(e, (e) => {
|
|
23593
|
+
e.moveTo(n[0].x, n[0].y);
|
|
23594
|
+
for (let t = 1; t < n.length; t++) e.lineTo(n[t].x, n[t].y);
|
|
23595
|
+
}, t.headTrim, t.tailTrim), !0);
|
|
23596
|
+
}
|
|
23597
|
+
return t.restroke === "curve" ? Yn(e, n, i, a, o, s, c, t.headTrim, t.tailTrim) : !1;
|
|
23598
|
+
}
|
|
23599
|
+
function or(e, t, n, r, i, a, o, s, c) {
|
|
23600
|
+
let l = (t, l) => Xn(e, l.x, l.y, l.angle, t, n, r, i, Qn(e, n, r, i, l.x, l.y, l.angle, t, a, o, s, c?.patternCoordinateTransform), c?.hostFrame ?? !1);
|
|
23601
|
+
n.tailEnd && t.end && l(n.tailEnd, t.end), n.headEnd && t.start && l(n.headEnd, t.start);
|
|
23602
|
+
}
|
|
23603
|
+
function sr(e, t, n, r, i, a, o, s, c, l, u) {
|
|
23548
23604
|
let d = xn(t, i, a, o, void 0, n, r);
|
|
23549
23605
|
if (!d) return !1;
|
|
23550
23606
|
let f = !1, p = d.length - 1;
|
|
@@ -23576,21 +23632,21 @@ function $n(e, t, n, r, i, a, o, s, c, l, u) {
|
|
|
23576
23632
|
}
|
|
23577
23633
|
return !0;
|
|
23578
23634
|
}
|
|
23579
|
-
var
|
|
23580
|
-
async function
|
|
23581
|
-
let n =
|
|
23635
|
+
var cr = /* @__PURE__ */ new WeakMap();
|
|
23636
|
+
async function lr(e, t) {
|
|
23637
|
+
let n = cr.get(e);
|
|
23582
23638
|
n || (n = {
|
|
23583
23639
|
active: 0,
|
|
23584
23640
|
waiters: []
|
|
23585
|
-
},
|
|
23641
|
+
}, cr.set(e, n)), n.active >= 2 || n.waiters.length > 0 ? await new Promise((e) => n.waiters.push(e)) : n.active++;
|
|
23586
23642
|
try {
|
|
23587
23643
|
return await Promise.resolve(), await t();
|
|
23588
23644
|
} finally {
|
|
23589
23645
|
let t = n.waiters.shift();
|
|
23590
|
-
t ? t() : (n.active--, n.active === 0 &&
|
|
23646
|
+
t ? t() : (n.active--, n.active === 0 && cr.delete(e));
|
|
23591
23647
|
}
|
|
23592
23648
|
}
|
|
23593
|
-
function
|
|
23649
|
+
function ur(e = void 0) {
|
|
23594
23650
|
if (e !== void 0 && (typeof e != "object" || !e || Array.isArray(e))) throw TypeError("imageResources must be an object when provided");
|
|
23595
23651
|
let t = e?.decodedByteBudget ?? 134217728;
|
|
23596
23652
|
if (!Number.isSafeInteger(t) || t < 4 || t > 536870912) throw RangeError(`imageResources.decodedByteBudget must be a safe integer from 4 to ${te} bytes`);
|
|
@@ -23604,13 +23660,13 @@ function nr(e = void 0) {
|
|
|
23604
23660
|
resolution: r
|
|
23605
23661
|
});
|
|
23606
23662
|
}
|
|
23607
|
-
function
|
|
23663
|
+
function dr(e) {
|
|
23608
23664
|
return Number.isFinite(e) && e > 0 ? Math.max(1, Math.ceil(e)) : 1;
|
|
23609
23665
|
}
|
|
23610
|
-
function
|
|
23666
|
+
function fr(e) {
|
|
23611
23667
|
return Number.isSafeInteger(e) && (e ?? 0) > 0 ? e : 1;
|
|
23612
23668
|
}
|
|
23613
|
-
function
|
|
23669
|
+
function pr(e, t) {
|
|
23614
23670
|
let n = 0;
|
|
23615
23671
|
for (let r of e.values()) {
|
|
23616
23672
|
let e = t(r), i = e.width * e.height * r.surfaces * 4;
|
|
@@ -23618,10 +23674,10 @@ function ar(e, t) {
|
|
|
23618
23674
|
}
|
|
23619
23675
|
return n;
|
|
23620
23676
|
}
|
|
23621
|
-
function
|
|
23677
|
+
function mr(e, t) {
|
|
23622
23678
|
let n = /* @__PURE__ */ new Map();
|
|
23623
23679
|
for (let t of e) {
|
|
23624
|
-
let e =
|
|
23680
|
+
let e = dr(t.targetWidthPx), r = dr(t.targetHeightPx), i = t.sourceWidthPx !== void 0 && t.sourceHeightPx !== void 0, a = i ? dr(t.sourceWidthPx) : void 0, o = i ? dr(t.sourceHeightPx) : void 0, s = fr(t.retainedSurfaceCount), c = n.get(t.key);
|
|
23625
23681
|
c ? (c.targetWidth = Math.max(c.targetWidth, e), c.targetHeight = Math.max(c.targetHeight, r), a !== void 0 && o !== void 0 && (c.sourceWidth = Math.max(c.sourceWidth ?? 0, a), c.sourceHeight = Math.max(c.sourceHeight ?? 0, o)), c.surfaces = Math.max(c.surfaces, s)) : n.set(t.key, {
|
|
23626
23682
|
targetWidth: e,
|
|
23627
23683
|
targetHeight: r,
|
|
@@ -23654,10 +23710,10 @@ function or(e, t) {
|
|
|
23654
23710
|
retainedPixels: s,
|
|
23655
23711
|
maxRetainedPixels: n ?? s
|
|
23656
23712
|
});
|
|
23657
|
-
}, s =
|
|
23713
|
+
}, s = pr(n, r), c = [...n.values()].every((e) => {
|
|
23658
23714
|
let t = r(e);
|
|
23659
23715
|
return t.width * t.height <= O;
|
|
23660
|
-
}), l = [...n.values()].some((e) => e.sourceWidth === void 0 || e.sourceHeight === void 0), u = t.resolution === "native-if-fit" && !l && c && s <= t.decodedByteBudget, d =
|
|
23716
|
+
}), l = [...n.values()].some((e) => e.sourceWidth === void 0 || e.sourceHeight === void 0), u = t.resolution === "native-if-fit" && !l && c && s <= t.decodedByteBudget, d = pr(n, (e) => a(e, 1));
|
|
23661
23717
|
if (u) {
|
|
23662
23718
|
let e = /* @__PURE__ */ new Map();
|
|
23663
23719
|
for (let [t, i] of n) {
|
|
@@ -23702,7 +23758,7 @@ function or(e, t) {
|
|
|
23702
23758
|
}
|
|
23703
23759
|
if (t.strategy === "strict" && d > t.decodedByteBudget) throw new k("active-decoded-bytes", t.decodedByteBudget, d);
|
|
23704
23760
|
if (t.strategy === "adaptive") {
|
|
23705
|
-
let e =
|
|
23761
|
+
let e = pr(n, (e) => a(e, 0));
|
|
23706
23762
|
if (e > t.decodedByteBudget) throw new k("active-decoded-bytes", t.decodedByteBudget, e);
|
|
23707
23763
|
}
|
|
23708
23764
|
let f = 1;
|
|
@@ -23710,13 +23766,13 @@ function or(e, t) {
|
|
|
23710
23766
|
let e = 0, r = 1;
|
|
23711
23767
|
for (let i = 0; i < 40; i++) {
|
|
23712
23768
|
let i = (e + r) / 2;
|
|
23713
|
-
|
|
23769
|
+
pr(n, (e) => a(e, i)) <= t.decodedByteBudget ? e = i : r = i;
|
|
23714
23770
|
}
|
|
23715
23771
|
f = e;
|
|
23716
23772
|
}
|
|
23717
23773
|
let p = /* @__PURE__ */ new Map();
|
|
23718
23774
|
for (let [e, t] of n) p.set(e, o(t, f));
|
|
23719
|
-
let m =
|
|
23775
|
+
let m = pr(n, (e) => a(e, f)), h = f < 1 && n.size > 0 ? Math.min(...[...n.entries()].flatMap(([e, t]) => {
|
|
23720
23776
|
let n = p.get(e);
|
|
23721
23777
|
return [n.width / t.targetWidth, n.height / t.targetHeight];
|
|
23722
23778
|
})) : f;
|
|
@@ -23728,10 +23784,10 @@ function or(e, t) {
|
|
|
23728
23784
|
degraded: f < 1
|
|
23729
23785
|
});
|
|
23730
23786
|
}
|
|
23731
|
-
function
|
|
23787
|
+
function hr(e) {
|
|
23732
23788
|
return typeof e == "number" && Number.isFinite(e) && e > 0 ? Math.ceil(e) : void 0;
|
|
23733
23789
|
}
|
|
23734
|
-
function
|
|
23790
|
+
function gr(e, t) {
|
|
23735
23791
|
if (!Number.isFinite(e) || !Number.isFinite(t) || !(e > 0) || !(t > 0)) throw Error(`invalid SVG raster size: ${e}x${t}`);
|
|
23736
23792
|
let n = Math.sqrt(O) / Math.sqrt(e) / Math.sqrt(t), r = Math.min(1, D / e, D / t, n);
|
|
23737
23793
|
return {
|
|
@@ -23739,28 +23795,28 @@ function cr(e, t) {
|
|
|
23739
23795
|
height: Math.min(D, Math.max(1, Math.floor(t * r)))
|
|
23740
23796
|
};
|
|
23741
23797
|
}
|
|
23742
|
-
function
|
|
23798
|
+
function _r(e, t, n, r) {
|
|
23743
23799
|
let i = n === void 0 ? 0 : n / e, a = r === void 0 ? 0 : r / t, o = n === void 0 && r === void 0 ? 1 : Math.max(i, a), s = Math.min(D / e, D / t, Math.sqrt(O) / Math.sqrt(e) / Math.sqrt(t));
|
|
23744
23800
|
if (!Number.isFinite(o) || !(o > 0) || !Number.isFinite(s) || !(s > 0)) throw Error(`invalid SVG raster scale: ${Math.min(o, s)}`);
|
|
23745
|
-
return s < o ?
|
|
23801
|
+
return s < o ? gr(Math.max(1, Math.floor(e * s)), Math.max(1, Math.floor(t * s))) : n !== void 0 && i >= a ? gr(n, Math.max(1, Math.ceil(t * n / e))) : r === void 0 ? gr(Math.ceil(e), Math.ceil(t)) : gr(Math.max(1, Math.ceil(e * r / t)), r);
|
|
23746
23802
|
}
|
|
23747
|
-
function
|
|
23748
|
-
let r =
|
|
23803
|
+
function vr(e, t, n) {
|
|
23804
|
+
let r = hr(n.targetWidthPx), i = hr(n.targetHeightPx);
|
|
23749
23805
|
if (r === void 0 && i === void 0 || !(e > 0) || !(t > 0) || !(r === void 0 || e > r) || !(i === void 0 || t > i)) return;
|
|
23750
|
-
let a =
|
|
23806
|
+
let a = _r(e, t, r, i);
|
|
23751
23807
|
throw new k("image-pixels", a.width * a.height, e * t);
|
|
23752
23808
|
}
|
|
23753
|
-
async function
|
|
23809
|
+
async function yr(e, t = {}) {
|
|
23754
23810
|
if (typeof Image > "u") throw Error("SVG host decode requires HTMLImageElement");
|
|
23755
23811
|
let n = URL.createObjectURL(e);
|
|
23756
23812
|
try {
|
|
23757
|
-
let e = new Image(), r =
|
|
23813
|
+
let e = new Image(), r = hr(t.targetWidthPx), i = hr(t.targetHeightPx);
|
|
23758
23814
|
await new Promise((t, r) => {
|
|
23759
23815
|
e.onload = () => {
|
|
23760
23816
|
typeof e.decode == "function" ? e.decode().then(t).catch(t) : t();
|
|
23761
23817
|
}, e.onerror = () => r(/* @__PURE__ */ Error("SVG host decode failed")), e.src = n;
|
|
23762
23818
|
});
|
|
23763
|
-
let a = Number.isFinite(e.naturalWidth) && e.naturalWidth > 0 && Number.isFinite(e.naturalHeight) && e.naturalHeight > 0, o =
|
|
23819
|
+
let a = Number.isFinite(e.naturalWidth) && e.naturalWidth > 0 && Number.isFinite(e.naturalHeight) && e.naturalHeight > 0, o = _r(a ? e.naturalWidth : 300, a ? e.naturalHeight : 150, r, i);
|
|
23764
23820
|
e.width = o.width, e.height = o.height;
|
|
23765
23821
|
let s;
|
|
23766
23822
|
if (typeof OffscreenCanvas < "u") {
|
|
@@ -23781,45 +23837,45 @@ async function dr(e, t = {}) {
|
|
|
23781
23837
|
URL.revokeObjectURL(n);
|
|
23782
23838
|
}
|
|
23783
23839
|
}
|
|
23784
|
-
function
|
|
23840
|
+
function br(e) {
|
|
23785
23841
|
return typeof e == "object" && !!e || typeof e == "function";
|
|
23786
23842
|
}
|
|
23787
|
-
var
|
|
23788
|
-
function
|
|
23789
|
-
return
|
|
23843
|
+
var xr = 256, F = /* @__PURE__ */ new WeakMap(), Sr = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), wr = /* @__PURE__ */ new WeakMap();
|
|
23844
|
+
function Tr(e) {
|
|
23845
|
+
return Cr.get(e) ?? 0;
|
|
23790
23846
|
}
|
|
23791
|
-
function
|
|
23792
|
-
return
|
|
23847
|
+
function Er(e, t) {
|
|
23848
|
+
return wr.get(e)?.get(t) ?? 0;
|
|
23793
23849
|
}
|
|
23794
|
-
function
|
|
23795
|
-
if (
|
|
23850
|
+
function Dr(e, t) {
|
|
23851
|
+
if (Tr(e) !== t) throw Error("Decoded bitmap cache was dropped during raster inspection");
|
|
23796
23852
|
}
|
|
23797
|
-
function
|
|
23853
|
+
function Or(e, t) {
|
|
23798
23854
|
return {
|
|
23799
23855
|
owner: e,
|
|
23800
|
-
ownerGeneration:
|
|
23856
|
+
ownerGeneration: Tr(e),
|
|
23801
23857
|
namespace: t,
|
|
23802
|
-
namespaceGeneration:
|
|
23858
|
+
namespaceGeneration: Er(e, t)
|
|
23803
23859
|
};
|
|
23804
23860
|
}
|
|
23805
|
-
function
|
|
23806
|
-
if (t.owner !== e ||
|
|
23861
|
+
function kr(e, t) {
|
|
23862
|
+
if (t.owner !== e || Tr(e) !== t.ownerGeneration) throw Error("Decoded bitmap cache was dropped during a derived image operation");
|
|
23807
23863
|
}
|
|
23808
|
-
function
|
|
23809
|
-
if (
|
|
23864
|
+
function Ar(e, t, n) {
|
|
23865
|
+
if (kr(e, n), n.namespace !== t || Er(e, t) !== n.namespaceGeneration) throw Error("Decoded bitmap cache namespace was dropped during a derived image operation");
|
|
23810
23866
|
}
|
|
23811
|
-
function
|
|
23812
|
-
let t =
|
|
23867
|
+
function jr(e) {
|
|
23868
|
+
let t = Sr.get(e);
|
|
23813
23869
|
if (t) for (let e of t.values()) e.then((e) => {
|
|
23814
23870
|
e.initialBlob = void 0;
|
|
23815
23871
|
}).catch(() => {});
|
|
23816
23872
|
}
|
|
23817
|
-
function
|
|
23818
|
-
let i =
|
|
23819
|
-
i || (i = /* @__PURE__ */ new Map(),
|
|
23873
|
+
function Mr(e, t, n, r) {
|
|
23874
|
+
let i = Sr.get(e);
|
|
23875
|
+
i || (i = /* @__PURE__ */ new Map(), Sr.set(e, i));
|
|
23820
23876
|
let a = i.get(t);
|
|
23821
23877
|
if (a) return a;
|
|
23822
|
-
let o =
|
|
23878
|
+
let o = lr(e, async () => {
|
|
23823
23879
|
let e = await r(t, n);
|
|
23824
23880
|
return {
|
|
23825
23881
|
inspection: await ie(e),
|
|
@@ -23830,10 +23886,10 @@ function wr(e, t, n, r) {
|
|
|
23830
23886
|
});
|
|
23831
23887
|
return i.set(t, o), o;
|
|
23832
23888
|
}
|
|
23833
|
-
async function
|
|
23834
|
-
return (await
|
|
23889
|
+
async function Nr(e, t, n, r = n) {
|
|
23890
|
+
return (await Mr(r, e, t, n)).inspection;
|
|
23835
23891
|
}
|
|
23836
|
-
function
|
|
23892
|
+
function Pr(e) {
|
|
23837
23893
|
let t = F.get(e);
|
|
23838
23894
|
return t || (t = {
|
|
23839
23895
|
entries: /* @__PURE__ */ new Map(),
|
|
@@ -23841,9 +23897,9 @@ function Er(e) {
|
|
|
23841
23897
|
retainedLimit: E
|
|
23842
23898
|
}, F.set(e, t)), t;
|
|
23843
23899
|
}
|
|
23844
|
-
var
|
|
23845
|
-
async function
|
|
23846
|
-
let r =
|
|
23900
|
+
var Fr = /* @__PURE__ */ new WeakMap(), Ir = /* @__PURE__ */ new WeakMap();
|
|
23901
|
+
async function Lr(e, t, n) {
|
|
23902
|
+
let r = Ir.get(e);
|
|
23847
23903
|
if (!r) {
|
|
23848
23904
|
let i;
|
|
23849
23905
|
r = {
|
|
@@ -23851,12 +23907,12 @@ async function kr(e, t, n) {
|
|
|
23851
23907
|
i = e;
|
|
23852
23908
|
}),
|
|
23853
23909
|
pending: 1
|
|
23854
|
-
},
|
|
23910
|
+
}, Ir.set(e, r);
|
|
23855
23911
|
let a;
|
|
23856
23912
|
try {
|
|
23857
|
-
return a =
|
|
23913
|
+
return a = Hr(e, t), await n();
|
|
23858
23914
|
} finally {
|
|
23859
|
-
|
|
23915
|
+
jr(e), a?.(), i(), r.pending--, r.pending === 0 && Ir.delete(e);
|
|
23860
23916
|
}
|
|
23861
23917
|
}
|
|
23862
23918
|
let i = r, a = i.tail.catch(() => {}), o, s = new Promise((e) => {
|
|
@@ -23865,25 +23921,25 @@ async function kr(e, t, n) {
|
|
|
23865
23921
|
i.pending++, i.tail = a.then(() => s), await a;
|
|
23866
23922
|
let c;
|
|
23867
23923
|
try {
|
|
23868
|
-
return c =
|
|
23924
|
+
return c = Hr(e, t), await n();
|
|
23869
23925
|
} finally {
|
|
23870
|
-
|
|
23926
|
+
jr(e), c?.(), o(), i.pending--, i.pending === 0 && Ir.delete(e);
|
|
23871
23927
|
}
|
|
23872
23928
|
}
|
|
23873
|
-
var
|
|
23874
|
-
function
|
|
23875
|
-
!e ||
|
|
23929
|
+
var Rr = /* @__PURE__ */ new WeakSet();
|
|
23930
|
+
function zr(e) {
|
|
23931
|
+
!e || Rr.has(e) || (Rr.add(e), ne(e));
|
|
23876
23932
|
}
|
|
23877
|
-
function
|
|
23933
|
+
function Br(e) {
|
|
23878
23934
|
try {
|
|
23879
|
-
|
|
23935
|
+
zr(e);
|
|
23880
23936
|
} catch {}
|
|
23881
23937
|
}
|
|
23882
|
-
function
|
|
23883
|
-
return
|
|
23938
|
+
function Vr(e) {
|
|
23939
|
+
return Hr(e, { decodedByteBudget: Pr(e).retainedLimit });
|
|
23884
23940
|
}
|
|
23885
|
-
function
|
|
23886
|
-
let n =
|
|
23941
|
+
function Hr(e, t) {
|
|
23942
|
+
let n = ur(t), r = Fr.get(e);
|
|
23887
23943
|
r || (r = {
|
|
23888
23944
|
count: 0,
|
|
23889
23945
|
deferred: [],
|
|
@@ -23891,11 +23947,11 @@ function Pr(e, t) {
|
|
|
23891
23947
|
activeBitmaps: /* @__PURE__ */ new WeakSet(),
|
|
23892
23948
|
limits: /* @__PURE__ */ new Map(),
|
|
23893
23949
|
activeLimit: n.decodedByteBudget
|
|
23894
|
-
},
|
|
23950
|
+
}, Fr.set(e, r));
|
|
23895
23951
|
let i = r, a = Symbol("decoded-image-lease");
|
|
23896
23952
|
i.limits.set(a, n.decodedByteBudget), i.activeLimit = Math.min(...i.limits.values());
|
|
23897
|
-
let o =
|
|
23898
|
-
for (o.retainedLimit = i.activeLimit; o.retainedBytes > o.retainedLimit &&
|
|
23953
|
+
let o = Pr(e);
|
|
23954
|
+
for (o.retainedLimit = i.activeLimit; o.retainedBytes > o.retainedLimit && Gr(e, o););
|
|
23899
23955
|
i.count++;
|
|
23900
23956
|
let s = !1;
|
|
23901
23957
|
return () => {
|
|
@@ -23906,90 +23962,90 @@ function Pr(e, t) {
|
|
|
23906
23962
|
t && (t.retainedLimit = i.activeLimit);
|
|
23907
23963
|
return;
|
|
23908
23964
|
}
|
|
23909
|
-
for (let e of i.deferred) e.then((e) =>
|
|
23910
|
-
i.deferred = [], i.activeBytes = 0, i.activeBitmaps = /* @__PURE__ */ new WeakSet(),
|
|
23965
|
+
for (let e of i.deferred) e.then((e) => zr(e)).catch(() => {});
|
|
23966
|
+
i.deferred = [], i.activeBytes = 0, i.activeBitmaps = /* @__PURE__ */ new WeakSet(), Fr.delete(e);
|
|
23911
23967
|
let t = F.get(e);
|
|
23912
23968
|
t && (t.retainedLimit = E);
|
|
23913
23969
|
};
|
|
23914
23970
|
}
|
|
23915
|
-
function
|
|
23971
|
+
function Ur(e) {
|
|
23916
23972
|
if (!e) return 0;
|
|
23917
23973
|
let t = Number(e.width), n = Number(e.height);
|
|
23918
23974
|
return Number.isSafeInteger(t) && t > 0 && Number.isSafeInteger(n) && n > 0 ? t * n * 4 : 0;
|
|
23919
23975
|
}
|
|
23920
|
-
function
|
|
23976
|
+
function Wr(e, t) {
|
|
23921
23977
|
if (!t) return;
|
|
23922
|
-
let n =
|
|
23978
|
+
let n = Fr.get(e);
|
|
23923
23979
|
if (!n || n.count === 0 || n.activeBitmaps.has(t)) return;
|
|
23924
|
-
let r = n.activeBytes +
|
|
23980
|
+
let r = n.activeBytes + Ur(t);
|
|
23925
23981
|
if (r > n.activeLimit) throw new k("active-decoded-bytes", n.activeLimit, r);
|
|
23926
23982
|
n.activeBitmaps.add(t), n.activeBytes = r;
|
|
23927
23983
|
}
|
|
23928
|
-
function
|
|
23984
|
+
function Gr(e, t, n) {
|
|
23929
23985
|
let r = [...t.entries].find(([e]) => e !== n);
|
|
23930
23986
|
if (!r) return !1;
|
|
23931
23987
|
let [i, a] = r;
|
|
23932
|
-
return t.entries.delete(i), t.retainedBytes -= a.weight,
|
|
23988
|
+
return t.entries.delete(i), t.retainedBytes -= a.weight, Kr(e, a.ownedPromise), !0;
|
|
23933
23989
|
}
|
|
23934
|
-
function
|
|
23935
|
-
let n =
|
|
23990
|
+
function Kr(e, t) {
|
|
23991
|
+
let n = Fr.get(e);
|
|
23936
23992
|
if (n && n.count > 0) {
|
|
23937
23993
|
n.deferred.push(t);
|
|
23938
23994
|
return;
|
|
23939
23995
|
}
|
|
23940
|
-
t.then((e) =>
|
|
23996
|
+
t.then((e) => zr(e)).catch(() => {});
|
|
23941
23997
|
}
|
|
23942
23998
|
function I(e) {
|
|
23943
23999
|
if (!(typeof e != "number" || !Number.isFinite(e) || !(e > 0))) return Math.ceil(e);
|
|
23944
24000
|
}
|
|
23945
|
-
function
|
|
24001
|
+
function qr(e) {
|
|
23946
24002
|
return {
|
|
23947
24003
|
...e,
|
|
23948
24004
|
targetWidthPx: I(e.targetWidthPx),
|
|
23949
24005
|
targetHeightPx: I(e.targetHeightPx)
|
|
23950
24006
|
};
|
|
23951
24007
|
}
|
|
23952
|
-
function
|
|
24008
|
+
function Jr(e) {
|
|
23953
24009
|
let t = e.maxRetainedPixels;
|
|
23954
24010
|
return typeof t == "number" && Number.isSafeInteger(t) && t > 0 ? Math.min(t, E / 4) : E / 4;
|
|
23955
24011
|
}
|
|
23956
|
-
function
|
|
23957
|
-
return
|
|
24012
|
+
function Yr(e) {
|
|
24013
|
+
return Jr(e) < E / 4;
|
|
23958
24014
|
}
|
|
23959
|
-
function
|
|
24015
|
+
function Xr(e, t) {
|
|
23960
24016
|
if (!e) return null;
|
|
23961
|
-
let n =
|
|
24017
|
+
let n = Jr(t), r = Number(e.width), i = Number(e.height), a = Math.max(r, i);
|
|
23962
24018
|
if (!Number.isFinite(a) || a > 32767) throw new k("image-dimension", D, Number.isFinite(a) ? a : 2 ** 53 - 1);
|
|
23963
24019
|
let o = r * i;
|
|
23964
24020
|
if (!(r > 0) || !(i > 0) || o > n) throw new k("image-pixels", n, Number.isSafeInteger(o) && o >= 0 ? o : 2 ** 53 - 1);
|
|
23965
24021
|
return e;
|
|
23966
24022
|
}
|
|
23967
24023
|
function L(e, t = {}) {
|
|
23968
|
-
let n = I(t.targetWidthPx), r = I(t.targetHeightPx), i = `${e.length}:${e}`, a =
|
|
24024
|
+
let n = I(t.targetWidthPx), r = I(t.targetHeightPx), i = `${e.length}:${e}`, a = Jr(t);
|
|
23969
24025
|
return n || r ? `raster:${i}:${n ?? 0}x${r ?? 0}:p${a}` : `native:${i}`;
|
|
23970
24026
|
}
|
|
23971
|
-
function
|
|
24027
|
+
function Zr(e) {
|
|
23972
24028
|
return e.inspection.format === "wmf" || e.inspection.format === "emf";
|
|
23973
24029
|
}
|
|
23974
|
-
function
|
|
24030
|
+
function Qr(e) {
|
|
23975
24031
|
let t = a(e.widthPt ?? 0, e.heightPt ?? 0);
|
|
23976
24032
|
return {
|
|
23977
24033
|
width: t.w,
|
|
23978
24034
|
height: t.h,
|
|
23979
|
-
pixelLimit:
|
|
24035
|
+
pixelLimit: Jr(e),
|
|
23980
24036
|
rejectIncomplete: e.incompleteMetafile === "reject"
|
|
23981
24037
|
};
|
|
23982
24038
|
}
|
|
23983
|
-
function
|
|
24039
|
+
function $r(e, t) {
|
|
23984
24040
|
let n = `${e.length}:${e}`, r = t.rejectIncomplete ? "r1:" : "";
|
|
23985
24041
|
return `metafile:${n}:p${t.pixelLimit}:${r}`;
|
|
23986
24042
|
}
|
|
23987
|
-
function
|
|
23988
|
-
let r =
|
|
23989
|
-
return `${
|
|
24043
|
+
function ei(e, t, n) {
|
|
24044
|
+
let r = Qr(t), i = I(n?.width) ?? r.width, a = I(n?.height) ?? r.height;
|
|
24045
|
+
return `${$r(e, r)}${i}x${a}`;
|
|
23990
24046
|
}
|
|
23991
|
-
function
|
|
23992
|
-
let r =
|
|
24047
|
+
function ti(e, t, n) {
|
|
24048
|
+
let r = Qr(n), i = `${R}${$r(t, r)}`, a;
|
|
23993
24049
|
for (let t of F.get(e)?.entries.keys() ?? []) {
|
|
23994
24050
|
if (!t.startsWith(i)) continue;
|
|
23995
24051
|
let e = /^(\d+)x(\d+)$/.exec(t.slice(i.length));
|
|
@@ -24004,10 +24060,10 @@ function qr(e, t, n) {
|
|
|
24004
24060
|
}
|
|
24005
24061
|
return a?.key;
|
|
24006
24062
|
}
|
|
24007
|
-
function
|
|
24063
|
+
function ni(e, t, n, r) {
|
|
24008
24064
|
let i = I(n.targetWidthPx), a = I(n.targetHeightPx);
|
|
24009
24065
|
if (!i && !a) return;
|
|
24010
|
-
let o =
|
|
24066
|
+
let o = Jr(n), s = `${R}raster:${`${t.length}:${t}`}:`, c;
|
|
24011
24067
|
for (let [t, n] of F.get(e)?.entries ?? []) {
|
|
24012
24068
|
if (!t.startsWith(s)) continue;
|
|
24013
24069
|
let e = /^(\d+)x(\d+):p(\d+)$/.exec(t.slice(s.length));
|
|
@@ -24022,20 +24078,20 @@ function Jr(e, t, n, r) {
|
|
|
24022
24078
|
}
|
|
24023
24079
|
return c?.key;
|
|
24024
24080
|
}
|
|
24025
|
-
function
|
|
24026
|
-
let n =
|
|
24081
|
+
function ri(e, t = {}) {
|
|
24082
|
+
let n = Jr(t), r = e.inspection.dimensions;
|
|
24027
24083
|
if (!r) return !1;
|
|
24028
24084
|
let i = r.width * r.height;
|
|
24029
24085
|
if (t.maxRetainedPixels !== void 0 && !ce(r) && i <= n) return !1;
|
|
24030
24086
|
let a = I(t.targetWidthPx), o = I(t.targetHeightPx);
|
|
24031
24087
|
return (e.inspection.format === "tiff" ? (a !== void 0 || o !== void 0) && (a === void 0 || a < r.width) && (o === void 0 || o < r.height) : a !== void 0 && o !== void 0 && (a < r.width || o < r.height)) || ce(r) || i > n;
|
|
24032
24088
|
}
|
|
24033
|
-
async function
|
|
24034
|
-
i &&
|
|
24035
|
-
let o =
|
|
24036
|
-
i ?
|
|
24037
|
-
let l =
|
|
24038
|
-
if (a) return l ?
|
|
24089
|
+
async function ii(e, t, n, r = {}, i, a) {
|
|
24090
|
+
i && kr(n, i);
|
|
24091
|
+
let o = qr(r), s = i?.ownerGeneration ?? Tr(n), c = await Mr(n, e, t, n);
|
|
24092
|
+
i ? kr(n, i) : Dr(n, s);
|
|
24093
|
+
let l = Zr(c);
|
|
24094
|
+
if (a) return l ? ei(e, o, {
|
|
24039
24095
|
width: Number(a.width),
|
|
24040
24096
|
height: Number(a.height)
|
|
24041
24097
|
}) : L(e, {
|
|
@@ -24043,19 +24099,19 @@ async function Xr(e, t, n, r = {}, i, a) {
|
|
|
24043
24099
|
targetHeightPx: Number(a.height),
|
|
24044
24100
|
maxRetainedPixels: o.maxRetainedPixels
|
|
24045
24101
|
});
|
|
24046
|
-
if (l) return
|
|
24102
|
+
if (l) return ti(n, e, o) ?? ei(e, o);
|
|
24047
24103
|
if (!o.targetWidthPx && !o.targetHeightPx) return L(e);
|
|
24048
24104
|
let u = `${R}${L(e)}`;
|
|
24049
|
-
return !
|
|
24105
|
+
return !Yr(o) && F.get(n)?.entries.has(u) ? L(e) : ri(c, o) ? ni(n, e, o, c.inspection.dimensions) ?? L(e, o) : L(e);
|
|
24050
24106
|
}
|
|
24051
|
-
function
|
|
24052
|
-
let i =
|
|
24053
|
-
if (o) return a.delete(e), a.set(e, o), o.promise.then((e) => (
|
|
24054
|
-
let s = r ? Promise.resolve().then(r).then(() =>
|
|
24107
|
+
function ai(e, t, n, r) {
|
|
24108
|
+
let i = Pr(t), a = i.entries, o = a.get(e);
|
|
24109
|
+
if (o) return a.delete(e), a.set(e, o), o.promise.then((e) => (Wr(t, e), e));
|
|
24110
|
+
let s = r ? Promise.resolve().then(r).then(() => lr(t, n)) : lr(t, n), c = s.then(({ bitmap: e, owned: t }) => t ? e : null).catch(() => null), l = s.then(({ bitmap: e, owned: n }) => {
|
|
24055
24111
|
try {
|
|
24056
|
-
return
|
|
24112
|
+
return Wr(t, e), e;
|
|
24057
24113
|
} catch (t) {
|
|
24058
|
-
throw n &&
|
|
24114
|
+
throw n && zr(e), t;
|
|
24059
24115
|
}
|
|
24060
24116
|
}), u = {
|
|
24061
24117
|
promise: l,
|
|
@@ -24068,45 +24124,45 @@ function Zr(e, t, n, r) {
|
|
|
24068
24124
|
a.delete(e);
|
|
24069
24125
|
return;
|
|
24070
24126
|
}
|
|
24071
|
-
for (u.weight =
|
|
24127
|
+
for (u.weight = Ur(n), i.retainedBytes += u.weight; i.retainedBytes > i.retainedLimit && Gr(t, i, e););
|
|
24072
24128
|
}
|
|
24073
24129
|
}).catch(() => {}), l.catch(() => {
|
|
24074
|
-
a.get(e) === u && (a.delete(e), i.retainedBytes -= u.weight,
|
|
24075
|
-
}), a.set(e, u); a.size >
|
|
24130
|
+
a.get(e) === u && (a.delete(e), i.retainedBytes -= u.weight, Kr(t, c));
|
|
24131
|
+
}), a.set(e, u); a.size > xr && Gr(t, i, e););
|
|
24076
24132
|
return l;
|
|
24077
24133
|
}
|
|
24078
|
-
var
|
|
24079
|
-
function
|
|
24080
|
-
return
|
|
24134
|
+
var oi = "base", R = `${oi}:`, si = "derived:";
|
|
24135
|
+
function ci(e, t, n, r) {
|
|
24136
|
+
return ai(`${e}:${t}`, n, r);
|
|
24081
24137
|
}
|
|
24082
|
-
function
|
|
24083
|
-
return i &&
|
|
24084
|
-
i &&
|
|
24138
|
+
function li(e, t, n, r, i, a) {
|
|
24139
|
+
return i && Ar(n, e, i), ai(`${si}${e}:${t}`, n, () => (i && Ar(n, e, i), r()), a ? async () => {
|
|
24140
|
+
i && Ar(n, e, i), await a(), i && Ar(n, e, i);
|
|
24085
24141
|
} : void 0);
|
|
24086
24142
|
}
|
|
24087
|
-
function
|
|
24088
|
-
let a =
|
|
24089
|
-
if (t === "image/svg+xml" && f) return
|
|
24143
|
+
function ui(e, t, n, r = {}, i = n) {
|
|
24144
|
+
let a = qr(r), { widthPt: o = 0, heightPt: s = 0, tiff: c, targetWidthPx: l, targetHeightPx: u, maxRetainedPixels: d, svgDecoder: f, incompleteMetafile: p } = a;
|
|
24145
|
+
if (t === "image/svg+xml" && f) return ci(oi, L(e, a), i, async () => {
|
|
24090
24146
|
let r = await f(await n(e, t), {
|
|
24091
24147
|
targetWidthPx: l,
|
|
24092
24148
|
targetHeightPx: u
|
|
24093
24149
|
});
|
|
24094
24150
|
try {
|
|
24095
|
-
|
|
24151
|
+
Xr(r, a), r && vr(r.width, r.height, {
|
|
24096
24152
|
targetWidthPx: l,
|
|
24097
24153
|
targetHeightPx: u
|
|
24098
24154
|
});
|
|
24099
24155
|
} catch (e) {
|
|
24100
|
-
throw
|
|
24156
|
+
throw zr(r), e;
|
|
24101
24157
|
}
|
|
24102
24158
|
return {
|
|
24103
24159
|
bitmap: r,
|
|
24104
24160
|
owned: !0
|
|
24105
24161
|
};
|
|
24106
|
-
}).then((e) =>
|
|
24162
|
+
}).then((e) => Xr(e, a));
|
|
24107
24163
|
let m = (r, f, m = !0) => {
|
|
24108
24164
|
let h = f?.initialBlob;
|
|
24109
|
-
return f && (f.initialBlob = void 0),
|
|
24165
|
+
return f && (f.initialBlob = void 0), ci(oi, r, i, async () => {
|
|
24110
24166
|
let r = h ?? await n(e, t), i = {
|
|
24111
24167
|
widthPt: o,
|
|
24112
24168
|
heightPt: s,
|
|
@@ -24120,36 +24176,36 @@ function ni(e, t, n, r = {}, i = n) {
|
|
|
24120
24176
|
bitmap: f ? await re(r, i, f.inspection) : await se(r, i),
|
|
24121
24177
|
owned: !0
|
|
24122
24178
|
};
|
|
24123
|
-
}).then((e) =>
|
|
24124
|
-
}, h =
|
|
24125
|
-
return
|
|
24126
|
-
if (
|
|
24179
|
+
}).then((e) => Xr(e, a));
|
|
24180
|
+
}, h = Tr(i);
|
|
24181
|
+
return Mr(i, e, t, n).then((t) => {
|
|
24182
|
+
if (Dr(i, h), Zr(t)) return m(ti(i, e, a) ?? ei(e, a), t);
|
|
24127
24183
|
if (!l && !u) return m(L(e), t, !1);
|
|
24128
24184
|
let n = `${R}${L(e)}`;
|
|
24129
|
-
if (!
|
|
24130
|
-
let r =
|
|
24131
|
-
return m(r ?
|
|
24185
|
+
if (!Yr(a) && F.get(i)?.entries.has(n)) return m(L(e), t, !1);
|
|
24186
|
+
let r = ri(t, a);
|
|
24187
|
+
return m(r ? ni(i, e, a, t.inspection.dimensions) ?? L(e, a) : L(e), t, r);
|
|
24132
24188
|
});
|
|
24133
24189
|
}
|
|
24134
|
-
function
|
|
24190
|
+
function di(e, t) {
|
|
24135
24191
|
return F.get(t)?.entries.get(`${R}${L(e)}`)?.bitmap;
|
|
24136
24192
|
}
|
|
24137
|
-
function
|
|
24138
|
-
if (!
|
|
24139
|
-
|
|
24193
|
+
function fi(e) {
|
|
24194
|
+
if (!br(e)) return;
|
|
24195
|
+
Cr.set(e, Tr(e) + 1), wr.delete(e), Sr.delete(e);
|
|
24140
24196
|
let t = F.get(e);
|
|
24141
24197
|
if (t) {
|
|
24142
|
-
for (let n of t.entries.values())
|
|
24198
|
+
for (let n of t.entries.values()) Kr(e, n.ownedPromise);
|
|
24143
24199
|
t.entries.clear(), t.retainedBytes = 0, F.delete(e);
|
|
24144
24200
|
}
|
|
24145
24201
|
}
|
|
24146
|
-
var
|
|
24147
|
-
function
|
|
24148
|
-
let t =
|
|
24149
|
-
return t || (t = { imgs: /* @__PURE__ */ new Map() },
|
|
24202
|
+
var pi = /* @__PURE__ */ new WeakMap(), mi = 256;
|
|
24203
|
+
function hi(e) {
|
|
24204
|
+
let t = pi.get(e);
|
|
24205
|
+
return t || (t = { imgs: /* @__PURE__ */ new Map() }, pi.set(e, t)), t;
|
|
24150
24206
|
}
|
|
24151
|
-
function
|
|
24152
|
-
if (typeof Image > "u") return
|
|
24207
|
+
function gi(e, t, n = {}) {
|
|
24208
|
+
if (typeof Image > "u") return ui(e, "image/svg+xml", t, {
|
|
24153
24209
|
targetWidthPx: n.targetWidthPx,
|
|
24154
24210
|
targetHeightPx: n.targetHeightPx,
|
|
24155
24211
|
maxRetainedPixels: n.maxRetainedPixels,
|
|
@@ -24158,10 +24214,10 @@ function ci(e, t, n = {}) {
|
|
|
24158
24214
|
if (!t) throw Error(`svg decode failed: ${e}`);
|
|
24159
24215
|
return t;
|
|
24160
24216
|
});
|
|
24161
|
-
let r =
|
|
24217
|
+
let r = hi(t), i = r.imgs.get(e);
|
|
24162
24218
|
if (i) return r.imgs.delete(e), r.imgs.set(e, i), i.promise;
|
|
24163
24219
|
let a = {};
|
|
24164
|
-
if (a.promise =
|
|
24220
|
+
if (a.promise = lr(t, async () => {
|
|
24165
24221
|
if (r.imgs.get(e) !== a) throw Error("SVG decode was superseded before it started");
|
|
24166
24222
|
let n = await t(e, "image/svg+xml"), i = URL.createObjectURL(n);
|
|
24167
24223
|
try {
|
|
@@ -24176,17 +24232,17 @@ function ci(e, t, n = {}) {
|
|
|
24176
24232
|
}
|
|
24177
24233
|
}), a.promise.catch(() => {
|
|
24178
24234
|
r.imgs.get(e) === a && r.imgs.delete(e);
|
|
24179
|
-
}), r.imgs.set(e, a), r.imgs.size >
|
|
24235
|
+
}), r.imgs.set(e, a), r.imgs.size > mi) {
|
|
24180
24236
|
let e = r.imgs.keys().next().value;
|
|
24181
24237
|
r.imgs.delete(e);
|
|
24182
24238
|
}
|
|
24183
24239
|
return a.promise;
|
|
24184
24240
|
}
|
|
24185
|
-
function
|
|
24186
|
-
let t =
|
|
24187
|
-
t && (t.imgs.clear(),
|
|
24241
|
+
function _i(e) {
|
|
24242
|
+
let t = pi.get(e);
|
|
24243
|
+
t && (t.imgs.clear(), pi.delete(e));
|
|
24188
24244
|
}
|
|
24189
|
-
var
|
|
24245
|
+
var vi = class {
|
|
24190
24246
|
limit;
|
|
24191
24247
|
used = 0;
|
|
24192
24248
|
constructor(e = C) {
|
|
@@ -24201,7 +24257,7 @@ var ui = class {
|
|
|
24201
24257
|
function z() {
|
|
24202
24258
|
throw new e("unsupported-image-effect", "Malformed image effect parameters");
|
|
24203
24259
|
}
|
|
24204
|
-
var B = (e) => typeof e == "string" && /^(?:[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e),
|
|
24260
|
+
var B = (e) => typeof e == "string" && /^(?:[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e), yi = (e) => typeof e == "string" && /^[0-9a-f]{6}$/i.test(e), bi = (e) => [
|
|
24205
24261
|
"over",
|
|
24206
24262
|
"mult",
|
|
24207
24263
|
"screen",
|
|
@@ -24214,8 +24270,8 @@ function V(e, t, n = -Infinity, r = Infinity) {
|
|
|
24214
24270
|
(typeof t != "number" || !Number.isFinite(t) || t < n || t > r) && z();
|
|
24215
24271
|
}
|
|
24216
24272
|
}
|
|
24217
|
-
function
|
|
24218
|
-
(!e || !
|
|
24273
|
+
function xi(e) {
|
|
24274
|
+
(!e || !yi(e.color)) && z(), V(e, ["alpha"], 0, 1), V(e, ["blur", "dist"], 0), V(e, ["dir"]);
|
|
24219
24275
|
for (let t of [
|
|
24220
24276
|
"sx",
|
|
24221
24277
|
"sy",
|
|
@@ -24234,7 +24290,7 @@ function pi(e) {
|
|
|
24234
24290
|
"br"
|
|
24235
24291
|
].includes(e.algn) && z(), e.rotWithShape !== void 0 && typeof e.rotWithShape != "boolean" && z();
|
|
24236
24292
|
}
|
|
24237
|
-
function
|
|
24293
|
+
function Si(e) {
|
|
24238
24294
|
switch (e || z(), e.fillType) {
|
|
24239
24295
|
case "none": return;
|
|
24240
24296
|
case "solid":
|
|
@@ -24279,7 +24335,7 @@ function mi(e) {
|
|
|
24279
24335
|
default: z();
|
|
24280
24336
|
}
|
|
24281
24337
|
}
|
|
24282
|
-
function
|
|
24338
|
+
function Ci(e, t) {
|
|
24283
24339
|
switch ((!e || typeof e != "object") && z(), e.type) {
|
|
24284
24340
|
case "grayscale":
|
|
24285
24341
|
case "alphaCeiling":
|
|
@@ -24298,10 +24354,10 @@ function hi(e, t) {
|
|
|
24298
24354
|
e.color !== void 0 && !B(e.color) && z();
|
|
24299
24355
|
return;
|
|
24300
24356
|
case "colorReplace":
|
|
24301
|
-
|
|
24357
|
+
yi(e.color) || z();
|
|
24302
24358
|
return;
|
|
24303
24359
|
case "colorChange":
|
|
24304
|
-
(!
|
|
24360
|
+
(!yi(e.from) || !yi(e.to) || typeof e.useAlpha != "boolean") && z(), V(e, ["fromAlpha", "toAlpha"], 0, 1);
|
|
24305
24361
|
return;
|
|
24306
24362
|
case "duotone": {
|
|
24307
24363
|
let n = e.clr1 ?? t.duotone?.clr1, r = e.clr2 ?? t.duotone?.clr2;
|
|
@@ -24340,13 +24396,13 @@ function hi(e, t) {
|
|
|
24340
24396
|
]);
|
|
24341
24397
|
return;
|
|
24342
24398
|
case "glow":
|
|
24343
|
-
(!e.glow || !
|
|
24399
|
+
(!e.glow || !yi(e.glow.color)) && z(), V(e.glow, ["radius"], 0), V(e.glow, ["alpha"], 0, 1);
|
|
24344
24400
|
return;
|
|
24345
24401
|
case "shadow":
|
|
24346
|
-
|
|
24402
|
+
xi(e.shadow), e.inner && e.shadow.rotWithShape === !1 && z();
|
|
24347
24403
|
return;
|
|
24348
24404
|
case "presetShadow":
|
|
24349
|
-
(!Array.isArray(e.shadows) || e.shadows.length < 1 || e.shadows.length > 2) && z(), e.shadows.forEach(
|
|
24405
|
+
(!Array.isArray(e.shadows) || e.shadows.length < 1 || e.shadows.length > 2) && z(), e.shadows.forEach(xi);
|
|
24350
24406
|
return;
|
|
24351
24407
|
case "reflection":
|
|
24352
24408
|
e.reflection || z(), e.reflection.rotWithShape !== void 0 && typeof e.reflection.rotWithShape != "boolean" && z(), e.reflection.algn !== void 0 && ![
|
|
@@ -24376,13 +24432,13 @@ function hi(e, t) {
|
|
|
24376
24432
|
]) t in e.reflection && V(e.reflection, [t]);
|
|
24377
24433
|
return;
|
|
24378
24434
|
case "fill":
|
|
24379
|
-
|
|
24435
|
+
Si(e.fill);
|
|
24380
24436
|
return;
|
|
24381
24437
|
case "fillOverlay":
|
|
24382
|
-
|
|
24438
|
+
Si(e.fill), bi(e.blend) || z();
|
|
24383
24439
|
return;
|
|
24384
24440
|
case "blend":
|
|
24385
|
-
|
|
24441
|
+
bi(e.blend) || z();
|
|
24386
24442
|
return;
|
|
24387
24443
|
case "alphaMod":
|
|
24388
24444
|
case "container": return;
|
|
@@ -24397,7 +24453,7 @@ function hi(e, t) {
|
|
|
24397
24453
|
default: z();
|
|
24398
24454
|
}
|
|
24399
24455
|
}
|
|
24400
|
-
function
|
|
24456
|
+
function wi(e, t) {
|
|
24401
24457
|
let n = e.frame ?? {
|
|
24402
24458
|
x: 0,
|
|
24403
24459
|
y: 0,
|
|
@@ -24429,8 +24485,8 @@ function gi(e, t) {
|
|
|
24429
24485
|
}
|
|
24430
24486
|
};
|
|
24431
24487
|
}
|
|
24432
|
-
function
|
|
24433
|
-
let n =
|
|
24488
|
+
function Ti(e, t) {
|
|
24489
|
+
let n = wi(e, t), r = new Uint8ClampedArray(n.width * n.height * 4), [i, a, o, s, c, l] = t, u = i * s - a * o;
|
|
24434
24490
|
if (u === 0) return {
|
|
24435
24491
|
...n,
|
|
24436
24492
|
data: r
|
|
@@ -24455,7 +24511,7 @@ function _i(e, t) {
|
|
|
24455
24511
|
data: r
|
|
24456
24512
|
};
|
|
24457
24513
|
}
|
|
24458
|
-
function
|
|
24514
|
+
function Ei(e, t) {
|
|
24459
24515
|
let n = e.frame ?? {
|
|
24460
24516
|
x: 0,
|
|
24461
24517
|
y: 0,
|
|
@@ -24479,7 +24535,7 @@ function vi(e, t) {
|
|
|
24479
24535
|
}
|
|
24480
24536
|
};
|
|
24481
24537
|
}
|
|
24482
|
-
function
|
|
24538
|
+
function Di(e, t, n) {
|
|
24483
24539
|
let r = t.frame ?? {
|
|
24484
24540
|
x: 0,
|
|
24485
24541
|
y: 0,
|
|
@@ -24502,9 +24558,9 @@ function yi(e, t, n) {
|
|
|
24502
24558
|
"l",
|
|
24503
24559
|
"ctr",
|
|
24504
24560
|
"r"
|
|
24505
|
-
].includes(t) ? r.height / 2 : 0, l = e.sx ?? 1, u = Math.tan((e.ky ?? 0) * Math.PI / 180), d = Math.tan((e.kx ?? 0) * Math.PI / 180), f = e.sy ?? 1, [p, m] =
|
|
24561
|
+
].includes(t) ? r.height / 2 : 0, l = e.sx ?? 1, u = Math.tan((e.ky ?? 0) * Math.PI / 180), d = Math.tan((e.kx ?? 0) * Math.PI / 180), f = e.sy ?? 1, [p, m] = ki(e.dir, !1, n).map((t) => t * e.dist);
|
|
24506
24562
|
if (e.rotWithShape === !1) {
|
|
24507
|
-
let [e, t] =
|
|
24563
|
+
let [e, t] = ki(n.hostRotation ?? 0, !1, { effects: [] }), r = n.hostFlipH ? -1 : 1, i = n.hostFlipV ? -1 : 1, a = e * (l * e + d * t) + t * (u * e + f * t), o = r * i * (-t * (l * e + d * t) + e * (u * e + f * t)), s = r * i * (e * (-l * t + d * e) + t * (-u * t + f * e)), c = -t * (-l * t + d * e) + e * (-u * t + f * e);
|
|
24508
24564
|
[l, u, d, f] = [
|
|
24509
24565
|
a,
|
|
24510
24566
|
o,
|
|
@@ -24575,7 +24631,7 @@ function yi(e, t, n) {
|
|
|
24575
24631
|
default: return;
|
|
24576
24632
|
}
|
|
24577
24633
|
}
|
|
24578
|
-
function
|
|
24634
|
+
function Oi(e, t, n) {
|
|
24579
24635
|
if (e.type === "alphaOutset") return [
|
|
24580
24636
|
{ type: "alphaCeiling" },
|
|
24581
24637
|
{
|
|
@@ -24586,7 +24642,7 @@ function bi(e, t, n) {
|
|
|
24586
24642
|
{ type: e.radius >= 0 ? "alphaCeiling" : "alphaFloor" }
|
|
24587
24643
|
];
|
|
24588
24644
|
if (e.type === "shadow" && e.inner) {
|
|
24589
|
-
let [t, r] =
|
|
24645
|
+
let [t, r] = ki(e.shadow.dir, !1, n);
|
|
24590
24646
|
return [{
|
|
24591
24647
|
type: "blur",
|
|
24592
24648
|
radius: e.shadow.blur,
|
|
@@ -24603,7 +24659,7 @@ function bi(e, t, n) {
|
|
|
24603
24659
|
}
|
|
24604
24660
|
if (e.type === "reflection") {
|
|
24605
24661
|
let r = e.reflection;
|
|
24606
|
-
return
|
|
24662
|
+
return Di({
|
|
24607
24663
|
type: "shadow",
|
|
24608
24664
|
inner: !1,
|
|
24609
24665
|
shadow: {
|
|
@@ -24614,7 +24670,7 @@ function bi(e, t, n) {
|
|
|
24614
24670
|
}, t, n).slice(2);
|
|
24615
24671
|
}
|
|
24616
24672
|
}
|
|
24617
|
-
function
|
|
24673
|
+
function ki(e, t, n) {
|
|
24618
24674
|
let r = t ? e - (n.hostRotation ?? 0) : e, i = (r / 90 % 4 + 4) % 4, [a, o] = Number.isInteger(i) ? [
|
|
24619
24675
|
[1, 0],
|
|
24620
24676
|
[0, 1],
|
|
@@ -24623,7 +24679,7 @@ function xi(e, t, n) {
|
|
|
24623
24679
|
][i] : [Math.cos(r * Math.PI / 180), Math.sin(r * Math.PI / 180)];
|
|
24624
24680
|
return t && (n.hostFlipH && (a = -a), n.hostFlipV && (o = -o)), [a, o];
|
|
24625
24681
|
}
|
|
24626
|
-
function
|
|
24682
|
+
function Ai(e, t, n, r, i, a, o) {
|
|
24627
24683
|
let s = t < 0 ? 0 : e[t + 3] / 255, c = r < 0 ? 0 : n[r + 3] / 255, l = c + s * (1 - c);
|
|
24628
24684
|
for (let u = 0; u < 3; u++) {
|
|
24629
24685
|
let d = t < 0 ? 0 : e[t + u] / 255, f = r < 0 ? 0 : n[r + u] / 255, p = o === "darken" ? Math.min(d, f) : o === "lighten" ? Math.max(d, f) : o === "mult" ? d * f : o === "screen" ? d + f - d * f : f;
|
|
@@ -24631,13 +24687,13 @@ function Si(e, t, n, r, i, a, o) {
|
|
|
24631
24687
|
}
|
|
24632
24688
|
i[a + 3] = Math.round(l * 255);
|
|
24633
24689
|
}
|
|
24634
|
-
function
|
|
24690
|
+
function ji() {
|
|
24635
24691
|
throw new k("image-effect-work", C, 2 ** 53 - 1);
|
|
24636
24692
|
}
|
|
24637
24693
|
function H(...e) {
|
|
24638
|
-
e.every((e) => Number.isFinite(e) && Math.abs(e) <= 2 ** 53 - 1) ||
|
|
24694
|
+
e.every((e) => Number.isFinite(e) && Math.abs(e) <= 2 ** 53 - 1) || ji();
|
|
24639
24695
|
}
|
|
24640
|
-
function
|
|
24696
|
+
function Mi(e, t, n, r, i = 0) {
|
|
24641
24697
|
let a = e.tile, o = l(t);
|
|
24642
24698
|
H(e.dpi ?? 96);
|
|
24643
24699
|
let s = h(t) ?? {
|
|
@@ -24648,7 +24704,7 @@ function wi(e, t, n, r, i = 0) {
|
|
|
24648
24704
|
}, c = e.srcRect, u = 1 - (c?.l ?? 0) - (c?.r ?? 0), d = 1 - (c?.t ?? 0) - (c?.b ?? 0);
|
|
24649
24705
|
if (H(u, d), !(u > 0 && d > 0)) return null;
|
|
24650
24706
|
let f = s.width * u, p = s.height * d, m = f * 72 / (e.dpi || 96) * (a.sx ?? 1), g = p * 72 / (e.dpi || 96) * (a.sy ?? 1);
|
|
24651
|
-
H(m, g), m > 0 && g > 0 ||
|
|
24707
|
+
H(m, g), m > 0 && g > 0 || ji();
|
|
24652
24708
|
let _ = 0, v = 0;
|
|
24653
24709
|
if (e.rotWithShape === !1 && i !== 0) {
|
|
24654
24710
|
H(i);
|
|
@@ -24668,7 +24724,7 @@ function wi(e, t, n, r, i = 0) {
|
|
|
24668
24724
|
].includes(T) ? (r - g) / 2 : 0, ee = E + (a.tx ?? 0) / 12700, O = D + (a.ty ?? 0) / 12700;
|
|
24669
24725
|
H(ee, O);
|
|
24670
24726
|
let te = Math.floor(-ee / m) - y, ne = Math.floor(-O / g) - b;
|
|
24671
|
-
[te, ne].every(Number.isSafeInteger) ||
|
|
24727
|
+
[te, ne].every(Number.isSafeInteger) || ji();
|
|
24672
24728
|
let re = (e, t) => {
|
|
24673
24729
|
let n = e % t;
|
|
24674
24730
|
return n > 0 ? n - t : n;
|
|
@@ -24686,7 +24742,7 @@ function wi(e, t, n, r, i = 0) {
|
|
|
24686
24742
|
th: g
|
|
24687
24743
|
};
|
|
24688
24744
|
}
|
|
24689
|
-
function
|
|
24745
|
+
function Ni(t, n, r, i, a, o = 0) {
|
|
24690
24746
|
let s = n.width * n.height;
|
|
24691
24747
|
if (t.fillType === "none") return 0;
|
|
24692
24748
|
if (t.fillType === "solid") return s;
|
|
@@ -24699,12 +24755,12 @@ function Ti(t, n, r, i, a, o = 0) {
|
|
|
24699
24755
|
y: 0,
|
|
24700
24756
|
width: n.width,
|
|
24701
24757
|
height: n.height
|
|
24702
|
-
}, d =
|
|
24758
|
+
}, d = Mi(t, l, u.width / (12700 / r), u.height / (12700 / i), o);
|
|
24703
24759
|
d && (c += d.work + s * d.overlap);
|
|
24704
24760
|
}
|
|
24705
24761
|
return c;
|
|
24706
24762
|
}
|
|
24707
|
-
function
|
|
24763
|
+
function Pi(t, n, r, i, a, o = 0) {
|
|
24708
24764
|
if (t.fillType === "solid" || t.fillType === "none") {
|
|
24709
24765
|
let e = new Uint8ClampedArray(n.width * n.height * 4);
|
|
24710
24766
|
if (t.fillType === "solid") {
|
|
@@ -24737,11 +24793,11 @@ function Ei(t, n, r, i, a, o = 0) {
|
|
|
24737
24793
|
height: n.height
|
|
24738
24794
|
}, u = 12700 / r, d = 12700 / i, f = l.width / u, p = l.height / d;
|
|
24739
24795
|
try {
|
|
24740
|
-
if (H(l.x, l.y, u, d, f, p), u > 0 && d > 0 && f >= 0 && p >= 0 ||
|
|
24796
|
+
if (H(l.x, l.y, u, d, f, p), u > 0 && d > 0 && f >= 0 && p >= 0 || ji(), c.translate(l.x, l.y), c.scale(u, d), t.fillType === "image") {
|
|
24741
24797
|
let n = a.images?.get(t);
|
|
24742
24798
|
if (!n) throw new e("unsupported-image-effect", "Image fill source unavailable");
|
|
24743
24799
|
if (c.save(), c.beginPath(), c.rect(0, 0, f, p), c.clip(), t.rotWithShape === !1 && o !== 0 && (c.translate(f / 2, p / 2), c.rotate(-o * Math.PI / 180), c.translate(-f / 2, -p / 2)), t.alpha != null && (c.globalAlpha *= t.alpha), t.tile) {
|
|
24744
|
-
let e = t.tile, { cols: r, rows: i, x0: a, y0: s, px: l, py: u, tw: d, th: m } =
|
|
24800
|
+
let e = t.tile, { cols: r, rows: i, x0: a, y0: s, px: l, py: u, tw: d, th: m } = Mi(t, n, f, p, o) ?? {
|
|
24745
24801
|
cols: 0,
|
|
24746
24802
|
rows: 0,
|
|
24747
24803
|
x0: 0,
|
|
@@ -24773,7 +24829,7 @@ function Ei(t, n, r, i, a, o = 0) {
|
|
|
24773
24829
|
s.width = 0;
|
|
24774
24830
|
}
|
|
24775
24831
|
}
|
|
24776
|
-
function
|
|
24832
|
+
function Fi(e, t, n, r, i) {
|
|
24777
24833
|
let a = Math.ceil(n), o = Math.ceil(r), s = e + (i ? 2 * a : 0), c = t + (i ? 2 * o : 0), l = 2 * a + 2 * o + 2, u = s * c * (l + 2) + 2 * l, d = (l + 4) * Float64Array.BYTES_PER_ELEMENT, f = s * c;
|
|
24778
24834
|
if (![
|
|
24779
24835
|
s,
|
|
@@ -24793,7 +24849,7 @@ function Di(e, t, n, r, i) {
|
|
|
24793
24849
|
kernelBytes: d
|
|
24794
24850
|
};
|
|
24795
24851
|
}
|
|
24796
|
-
function
|
|
24852
|
+
function Ii(e, t) {
|
|
24797
24853
|
let n = new Float64Array(2 * t + 1);
|
|
24798
24854
|
if (e === 0) return n[0] = 1, n;
|
|
24799
24855
|
let r = 0;
|
|
@@ -24804,9 +24860,9 @@ function Oi(e, t) {
|
|
|
24804
24860
|
for (let e = 0; e < n.length; e++) n[e] /= r;
|
|
24805
24861
|
return n;
|
|
24806
24862
|
}
|
|
24807
|
-
function
|
|
24863
|
+
function Li(e, t, n, r) {
|
|
24808
24864
|
if (t === 0 && n === 0) return e;
|
|
24809
|
-
let { rx: i, ry: a, width: o, height: s } =
|
|
24865
|
+
let { rx: i, ry: a, width: o, height: s } = Fi(e.width, e.height, t, n, r), c = r ? i : 0, l = r ? a : 0, u = Ii(t, i), d = Ii(n, a), f = new Uint8ClampedArray(o * s * 4), p = new Uint8ClampedArray(f.length), m = new Float64Array(4);
|
|
24810
24866
|
for (let t = 0; t < s; t++) for (let n = 0; n < o; n++) {
|
|
24811
24867
|
let r = t - l;
|
|
24812
24868
|
if (r < 0 || r >= e.height) continue;
|
|
@@ -24850,21 +24906,21 @@ function ki(e, t, n, r) {
|
|
|
24850
24906
|
}
|
|
24851
24907
|
};
|
|
24852
24908
|
}
|
|
24853
|
-
function
|
|
24909
|
+
function Ri(e) {
|
|
24854
24910
|
return typeof e == "object" && !!e && Array.isArray(e.effects);
|
|
24855
24911
|
}
|
|
24856
|
-
function
|
|
24912
|
+
function zi(e) {
|
|
24857
24913
|
let t = [];
|
|
24858
|
-
for (let n of
|
|
24914
|
+
for (let n of Hi(e, !1)) (n.type === "fillOverlay" || n.type === "fill") && n.fill.fillType === "image" && t.push(n.fill);
|
|
24859
24915
|
return t;
|
|
24860
24916
|
}
|
|
24861
|
-
function
|
|
24862
|
-
let t =
|
|
24917
|
+
function Bi(e) {
|
|
24918
|
+
let t = Vi(e, 1, 1);
|
|
24863
24919
|
return t === null || t.x > 0 || t.y > 0;
|
|
24864
24920
|
}
|
|
24865
|
-
function
|
|
24921
|
+
function Vi(e, t, n) {
|
|
24866
24922
|
let r = 0, i = 0, a = (e) => Number.isFinite(e) ? Math.abs(e) : Infinity;
|
|
24867
|
-
for (let o of
|
|
24923
|
+
for (let o of Hi(e, !1)) switch (o.type) {
|
|
24868
24924
|
case "blur":
|
|
24869
24925
|
o.grow && (r += a(o.radius), i += a(o.radius));
|
|
24870
24926
|
break;
|
|
@@ -24906,7 +24962,7 @@ function Ni(e, t, n) {
|
|
|
24906
24962
|
}
|
|
24907
24963
|
if (r > 0 || i > 0) {
|
|
24908
24964
|
let a = 0;
|
|
24909
|
-
for (let t of
|
|
24965
|
+
for (let t of Hi(e, !1)) [
|
|
24910
24966
|
"blur",
|
|
24911
24967
|
"alphaOutset",
|
|
24912
24968
|
"glow",
|
|
@@ -24922,7 +24978,7 @@ function Ni(e, t, n) {
|
|
|
24922
24978
|
y: o
|
|
24923
24979
|
} : null;
|
|
24924
24980
|
}
|
|
24925
|
-
function*
|
|
24981
|
+
function* Hi(t, n = !0) {
|
|
24926
24982
|
let r = [{
|
|
24927
24983
|
list: t,
|
|
24928
24984
|
index: 0
|
|
@@ -24961,8 +25017,8 @@ function* Pi(t, n = !0) {
|
|
|
24961
25017
|
yield o;
|
|
24962
25018
|
}
|
|
24963
25019
|
}
|
|
24964
|
-
function
|
|
24965
|
-
|
|
25020
|
+
function Ui(t) {
|
|
25021
|
+
Xi(t, 0);
|
|
24966
25022
|
try {
|
|
24967
25023
|
return JSON.stringify([
|
|
24968
25024
|
t.effects,
|
|
@@ -24980,15 +25036,15 @@ function Fi(t) {
|
|
|
24980
25036
|
throw t instanceof e ? t : new e("unsupported-image-effect", "Image effect recipe is not serializable");
|
|
24981
25037
|
}
|
|
24982
25038
|
}
|
|
24983
|
-
function
|
|
25039
|
+
function Wi(e, t, n) {
|
|
24984
25040
|
return (.2126 * e + .7152 * t + .0722 * n) / 255;
|
|
24985
25041
|
}
|
|
24986
|
-
function
|
|
24987
|
-
return Math.floor(
|
|
25042
|
+
function Gi(e, t, n) {
|
|
25043
|
+
return Math.floor(Wi(e, t, n) * 255 + 1e-6);
|
|
24988
25044
|
}
|
|
24989
|
-
function
|
|
24990
|
-
t.duotone &&
|
|
24991
|
-
let a =
|
|
25045
|
+
function Ki(t, n, r, i) {
|
|
25046
|
+
t.duotone && Ci({ type: "duotone" }, t);
|
|
25047
|
+
let a = qi(t.effects, t), o = {
|
|
24992
25048
|
width: r?.width ?? n,
|
|
24993
25049
|
height: r?.height ?? 1,
|
|
24994
25050
|
frame: r?.frame,
|
|
@@ -25010,7 +25066,7 @@ function Ri(t, n, r, i) {
|
|
|
25010
25066
|
}
|
|
25011
25067
|
if (f.type === "unsupported") throw new e("unsupported-image-effect", `Malformed CT_Blip effect: ${f.effect}`);
|
|
25012
25068
|
l += h, f.type === "luminance" && (l += 256);
|
|
25013
|
-
let n =
|
|
25069
|
+
let n = Di(f, {
|
|
25014
25070
|
width: p,
|
|
25015
25071
|
height: m,
|
|
25016
25072
|
frame: g
|
|
@@ -25024,18 +25080,18 @@ function Ri(t, n, r, i) {
|
|
|
25024
25080
|
});
|
|
25025
25081
|
_ = Math.max(_, e.peak), p = e.width, m = e.height, h = e.pixels, g = e.frame;
|
|
25026
25082
|
} else if (f.type === "transform" && h > 0) {
|
|
25027
|
-
let e =
|
|
25083
|
+
let e = wi({
|
|
25028
25084
|
width: p,
|
|
25029
25085
|
height: m,
|
|
25030
25086
|
frame: g
|
|
25031
|
-
},
|
|
25087
|
+
}, ea(f, t));
|
|
25032
25088
|
_ = Math.max(_, h + e.width * e.height), p = e.width, m = e.height, g = e.frame, h = p * m, l += h * 5;
|
|
25033
|
-
} else if (
|
|
25089
|
+
} else if (Oi(f, {
|
|
25034
25090
|
width: p,
|
|
25035
25091
|
height: m,
|
|
25036
25092
|
frame: g
|
|
25037
25093
|
}, t) && h > 0) {
|
|
25038
|
-
let e = d(
|
|
25094
|
+
let e = d(Oi(f, {
|
|
25039
25095
|
width: p,
|
|
25040
25096
|
height: m,
|
|
25041
25097
|
frame: g
|
|
@@ -25047,7 +25103,7 @@ function Ri(t, n, r, i) {
|
|
|
25047
25103
|
});
|
|
25048
25104
|
_ = Math.max(_, h + e.peak), l += h * 3 + e.pixels, f.type !== "shadow" && (p = e.width, m = e.height, g = e.frame, h = e.pixels);
|
|
25049
25105
|
} else if (f.type === "blur" && f.radius !== 0 && h > 0) {
|
|
25050
|
-
let e = h, n =
|
|
25106
|
+
let e = h, n = Fi(p, m, f.radius / (t.emuPerPixelX ?? 9525), f.radius / (t.emuPerPixelY ?? 9525), f.grow), r = g ?? {
|
|
25051
25107
|
x: 0,
|
|
25052
25108
|
y: 0,
|
|
25053
25109
|
width: p,
|
|
@@ -25089,7 +25145,7 @@ function Ri(t, n, r, i) {
|
|
|
25089
25145
|
frame: g
|
|
25090
25146
|
};
|
|
25091
25147
|
for (let e of n) {
|
|
25092
|
-
let n = i.width * i.height, r = t.kind === "tree" ? e :
|
|
25148
|
+
let n = i.width * i.height, r = t.kind === "tree" ? e : Ei(i, e), a = r.width * r.height, o = r.width !== i.width || r.height !== i.height || (r.frame?.x ?? 0) !== (i.frame?.x ?? 0) || (r.frame?.y ?? 0) !== (i.frame?.y ?? 0);
|
|
25093
25149
|
_ = Math.max(_, h + e.peak + (t.kind === "sib" ? n : 0)), t.kind === "sib" && (l += a, _ = Math.max(_, h + n + e.pixels + (o ? a : 0))), i = {
|
|
25094
25150
|
width: r.width,
|
|
25095
25151
|
height: r.height,
|
|
@@ -25098,7 +25154,7 @@ function Ri(t, n, r, i) {
|
|
|
25098
25154
|
}
|
|
25099
25155
|
if (f.type !== "alphaMod") {
|
|
25100
25156
|
if (f.type === "blend") {
|
|
25101
|
-
let e =
|
|
25157
|
+
let e = Ei({
|
|
25102
25158
|
width: p,
|
|
25103
25159
|
height: m,
|
|
25104
25160
|
frame: g
|
|
@@ -25108,7 +25164,7 @@ function Ri(t, n, r, i) {
|
|
|
25108
25164
|
p = i.width, m = i.height, g = i.frame, h = r ? p * m : h;
|
|
25109
25165
|
}
|
|
25110
25166
|
s.delete(t);
|
|
25111
|
-
} else (f.type === "fillOverlay" || f.type === "fill") && (_ = Math.max(_, h * 3 + v(f.fill) / 4), l +=
|
|
25167
|
+
} else (f.type === "fillOverlay" || f.type === "fill") && (_ = Math.max(_, h * 3 + v(f.fill) / 4), l += $i(f.fill, {
|
|
25112
25168
|
width: p,
|
|
25113
25169
|
height: m,
|
|
25114
25170
|
frame: g
|
|
@@ -25126,9 +25182,9 @@ function Ri(t, n, r, i) {
|
|
|
25126
25182
|
}, f = d(t.effects, o);
|
|
25127
25183
|
t.duotone && !t.effects.some((e) => e.type === "duotone") && (f.count++, f.work += f.pixels);
|
|
25128
25184
|
let p = f.peak > n || f.pixels !== n;
|
|
25129
|
-
return
|
|
25185
|
+
return Yi(t.effects) && (f.peak += n, f.work += n), f.peak = Math.max(f.peak, f.pixels * 3), f.peak += n * (p ? 2 : 1), f;
|
|
25130
25186
|
}
|
|
25131
|
-
function
|
|
25187
|
+
function qi(t, n) {
|
|
25132
25188
|
for (let t of [n.emuPerPixelX ?? 9525, n.emuPerPixelY ?? 9525]) if (!Number.isFinite(t) || t <= 0) throw new e("unsupported-image-effect", "Invalid effect sampling");
|
|
25133
25189
|
if (!Number.isFinite(n.hostRotation ?? 0) || [n.hostFlipH, n.hostFlipV].some((e) => e !== void 0 && typeof e != "boolean")) throw new e("unsupported-image-effect", "Invalid host orientation");
|
|
25134
25190
|
let r = /* @__PURE__ */ new Map(), i = (t) => {
|
|
@@ -25138,54 +25194,54 @@ function zi(t, n) {
|
|
|
25138
25194
|
r.set(t.name, t);
|
|
25139
25195
|
}
|
|
25140
25196
|
};
|
|
25141
|
-
for (let r of
|
|
25142
|
-
if (
|
|
25197
|
+
for (let r of Hi(t)) {
|
|
25198
|
+
if (Ci(r, n), r.type === "unsupported") throw new e("unsupported-image-effect", `Malformed CT_Blip effect: ${r.effect}`);
|
|
25143
25199
|
if (r.type === "effectCountLimit") throw Number.isSafeInteger(r.observed) && r.observed > T ? new k("image-effect-count", T, r.observed) : new e("unsupported-image-effect", "Invalid effect-count record");
|
|
25144
25200
|
}
|
|
25145
|
-
for (let e of
|
|
25201
|
+
for (let e of Hi(t, !1)) if (e.type === "definitions") for (let t of e.containers) i(t);
|
|
25146
25202
|
else (e.type === "alphaMod" || e.type === "container" || e.type === "blend") && i(e.container);
|
|
25147
25203
|
return r;
|
|
25148
25204
|
}
|
|
25149
|
-
function
|
|
25150
|
-
return
|
|
25205
|
+
function Ji(e, t, n, r = {}) {
|
|
25206
|
+
return Ki(e, t * n, {
|
|
25151
25207
|
width: t,
|
|
25152
25208
|
height: n
|
|
25153
25209
|
}, r).work;
|
|
25154
25210
|
}
|
|
25155
|
-
function
|
|
25211
|
+
function Yi(e, t = /* @__PURE__ */ new Set()) {
|
|
25156
25212
|
for (let n of e) {
|
|
25157
25213
|
if (n.type === "definitions") {
|
|
25158
|
-
for (let e of n.containers) if (!t.has(e) && (t.add(e),
|
|
25214
|
+
for (let e of n.containers) if (!t.has(e) && (t.add(e), Yi(e.effects, t))) return !0;
|
|
25159
25215
|
}
|
|
25160
|
-
if (n.type === "reference" && ["fill", "fillLine"].includes(n.reference) || (n.type === "alphaMod" || n.type === "container" || n.type === "blend") && !t.has(n.container) && (t.add(n.container),
|
|
25216
|
+
if (n.type === "reference" && ["fill", "fillLine"].includes(n.reference) || (n.type === "alphaMod" || n.type === "container" || n.type === "blend") && !t.has(n.container) && (t.add(n.container), Yi(n.container.effects, t))) return !0;
|
|
25161
25217
|
}
|
|
25162
25218
|
return !1;
|
|
25163
25219
|
}
|
|
25164
|
-
function
|
|
25165
|
-
let i =
|
|
25220
|
+
function Xi(e, t, n, r = 0) {
|
|
25221
|
+
let i = Ki(e, t, n);
|
|
25166
25222
|
if (i.count > T) throw new k("image-effect-count", T, i.count);
|
|
25167
25223
|
if (!Number.isSafeInteger(i.work) || i.work > 134217728) throw new k("image-effect-work", C, Number.isSafeInteger(i.work) ? i.work : 2 ** 53 - 1);
|
|
25168
25224
|
if (n && i.peak + r > 33554432) throw new k("active-decoded-bytes", O * 4, Math.ceil((i.peak + r) * 4));
|
|
25169
25225
|
}
|
|
25170
|
-
function
|
|
25226
|
+
function Zi(e, t, n = {}) {
|
|
25171
25227
|
let r = e.data, i = 0;
|
|
25172
25228
|
for (let e of new Set(n.images?.values())) {
|
|
25173
25229
|
if (e === n.baseImage) continue;
|
|
25174
25230
|
let t = e;
|
|
25175
25231
|
i += t.width * t.height;
|
|
25176
25232
|
}
|
|
25177
|
-
|
|
25178
|
-
let a =
|
|
25233
|
+
Xi(t, r.length / 4, e, i);
|
|
25234
|
+
let a = Ki(t, e.width * e.height, e, n).work;
|
|
25179
25235
|
if (!Number.isSafeInteger(a) || a > 134217728) throw new k("image-effect-work", C, Number.isSafeInteger(a) ? a : 2 ** 53 - 1);
|
|
25180
|
-
let o = new
|
|
25181
|
-
names:
|
|
25236
|
+
let o = new vi(Math.min(a, C)), s = {
|
|
25237
|
+
names: qi(t.effects, t),
|
|
25182
25238
|
chargedDefinitions: /* @__PURE__ */ new Set(),
|
|
25183
25239
|
charge: (e) => {
|
|
25184
25240
|
o.charge(e), n.workLedger?.charge(e);
|
|
25185
25241
|
}
|
|
25186
25242
|
};
|
|
25187
25243
|
try {
|
|
25188
|
-
return
|
|
25244
|
+
return Yi(t.effects) && (s.original = W(e, s)), U(e, t, n, s);
|
|
25189
25245
|
} catch (e) {
|
|
25190
25246
|
throw ae(e);
|
|
25191
25247
|
}
|
|
@@ -25198,7 +25254,7 @@ function U(t, n, r, i) {
|
|
|
25198
25254
|
continue;
|
|
25199
25255
|
}
|
|
25200
25256
|
i.charge(t.width * t.height);
|
|
25201
|
-
let c =
|
|
25257
|
+
let c = Di(s, t, n);
|
|
25202
25258
|
if (c) {
|
|
25203
25259
|
t = U(t, {
|
|
25204
25260
|
...n,
|
|
@@ -25210,19 +25266,19 @@ function U(t, n, r, i) {
|
|
|
25210
25266
|
switch (s.type) {
|
|
25211
25267
|
case "effectCountLimit": break;
|
|
25212
25268
|
case "transform": {
|
|
25213
|
-
let e =
|
|
25214
|
-
i.charge(e.width * e.height * 5), t =
|
|
25269
|
+
let e = wi(t, ea(s, n));
|
|
25270
|
+
i.charge(e.width * e.height * 5), t = Ti(t, ea(s, n)), a = t.data;
|
|
25215
25271
|
break;
|
|
25216
25272
|
}
|
|
25217
25273
|
case "alphaOutset": {
|
|
25218
25274
|
let e = U(W(t, i), {
|
|
25219
25275
|
...n,
|
|
25220
25276
|
duotone: void 0,
|
|
25221
|
-
effects:
|
|
25277
|
+
effects: Oi(s, t, n)
|
|
25222
25278
|
}, r, i);
|
|
25223
25279
|
i.charge(t.width * t.height * 2 + e.width * e.height);
|
|
25224
25280
|
for (let n = 0; n < e.height; n++) for (let r = 0; r < e.width; r++) {
|
|
25225
|
-
let i = (n * e.width + r) * 4, a =
|
|
25281
|
+
let i = (n * e.width + r) * 4, a = ia(t, e, r, n);
|
|
25226
25282
|
for (let t = 0; t < 3; t++) e.data[i + t] = a[t];
|
|
25227
25283
|
}
|
|
25228
25284
|
t = e, a = t.data;
|
|
@@ -25231,7 +25287,7 @@ function U(t, n, r, i) {
|
|
|
25231
25287
|
case "reflection": {
|
|
25232
25288
|
let e = s.reflection, o = W(t, i);
|
|
25233
25289
|
i.charge(t.width * t.height * 2);
|
|
25234
|
-
let [c, l] =
|
|
25290
|
+
let [c, l] = ki(e.fadeDir ?? 90, e.rotWithShape === !1, n), u = o.width * (n.emuPerPixelX ?? 9525), d = o.height * (n.emuPerPixelY ?? 9525), f = Math.min(0, c * u) + Math.min(0, l * d), p = Math.abs(c * u) + Math.abs(l * d);
|
|
25235
25291
|
for (let t = 0; t < o.height; t++) for (let n = 0; n < o.width; n++) {
|
|
25236
25292
|
let r = ((n + .5) / o.width * u * c + (t + .5) / o.height * d * l - f) / p, i = e.endPos === e.stPos ? +(r >= e.endPos) : Math.max(0, Math.min(1, (r - e.stPos) / (e.endPos - e.stPos))), a = (t * o.width + n) * 4 + 3;
|
|
25237
25293
|
o.data[a] = Math.round(o.data[a] * (e.stA + (e.endA - e.stA) * i));
|
|
@@ -25239,7 +25295,7 @@ function U(t, n, r, i) {
|
|
|
25239
25295
|
t = U(o, {
|
|
25240
25296
|
...n,
|
|
25241
25297
|
duotone: void 0,
|
|
25242
|
-
effects:
|
|
25298
|
+
effects: Oi(s, t, n)
|
|
25243
25299
|
}, r, i), i.charge(t.width * t.height), a = t.data;
|
|
25244
25300
|
break;
|
|
25245
25301
|
}
|
|
@@ -25247,7 +25303,7 @@ function U(t, n, r, i) {
|
|
|
25247
25303
|
let e = s.shadow, o = U(W(t, i), {
|
|
25248
25304
|
...n,
|
|
25249
25305
|
duotone: void 0,
|
|
25250
|
-
effects:
|
|
25306
|
+
effects: Oi(s, t, n)
|
|
25251
25307
|
}, r, i);
|
|
25252
25308
|
i.charge(t.width * t.height * 2 + o.width * o.height);
|
|
25253
25309
|
let c = pe(e.color) ?? [
|
|
@@ -25256,16 +25312,16 @@ function U(t, n, r, i) {
|
|
|
25256
25312
|
0
|
|
25257
25313
|
];
|
|
25258
25314
|
for (let n = 0; n < t.height; n++) for (let r = 0; r < t.width; r++) {
|
|
25259
|
-
let i = (n * t.width + r) * 4, s =
|
|
25315
|
+
let i = (n * t.width + r) * 4, s = na(o, t, r, n);
|
|
25260
25316
|
a[i + 3] = Math.round(a[i + 3] * e.alpha * (1 - (s < 0 ? 0 : o.data[s + 3]) / 255));
|
|
25261
25317
|
for (let e = 0; e < 3; e++) a[i + e] = c[e];
|
|
25262
25318
|
}
|
|
25263
25319
|
break;
|
|
25264
25320
|
}
|
|
25265
25321
|
case "fill":
|
|
25266
|
-
i.charge(
|
|
25322
|
+
i.charge($i(s.fill, t, n, r));
|
|
25267
25323
|
{
|
|
25268
|
-
let e =
|
|
25324
|
+
let e = Pi(s.fill, t, n.emuPerPixelX ?? 9525, n.emuPerPixelY ?? 9525, r, Qi(n));
|
|
25269
25325
|
t = {
|
|
25270
25326
|
data: e.data,
|
|
25271
25327
|
width: e.width,
|
|
@@ -25279,20 +25335,20 @@ function U(t, n, r, i) {
|
|
|
25279
25335
|
case "softEdge":
|
|
25280
25336
|
case "presetShadow": break;
|
|
25281
25337
|
case "alphaMod": {
|
|
25282
|
-
let e =
|
|
25338
|
+
let e = aa(t, s.container, n, r, i);
|
|
25283
25339
|
for (let n = 0; n < t.height; n++) for (let r = 0; r < t.width; r++) {
|
|
25284
|
-
let i =
|
|
25340
|
+
let i = na(e, t, r, n), o = i < 0 ? 0 : e.data[i + 3], s = (n * t.width + r) * 4 + 3;
|
|
25285
25341
|
a[s] = Math.round(a[s] * o / 255);
|
|
25286
25342
|
}
|
|
25287
25343
|
break;
|
|
25288
25344
|
}
|
|
25289
25345
|
case "blend":
|
|
25290
25346
|
case "container":
|
|
25291
|
-
t = s.type === "blend" ?
|
|
25347
|
+
t = s.type === "blend" ? ta(t, aa(t, s.container, n, r, i), s.blend, i) : aa(t, s.container, n, r, i), a = t.data;
|
|
25292
25348
|
break;
|
|
25293
25349
|
case "reference": {
|
|
25294
25350
|
let e = i.names.get(s.reference);
|
|
25295
|
-
t = e ?
|
|
25351
|
+
t = e ? aa(t, e, n, r, i) : ["fill", "fillLine"].includes(s.reference) ? W(i.original ?? t, i) : {
|
|
25296
25352
|
width: t.width,
|
|
25297
25353
|
height: t.height,
|
|
25298
25354
|
frame: t.frame,
|
|
@@ -25301,23 +25357,23 @@ function U(t, n, r, i) {
|
|
|
25301
25357
|
break;
|
|
25302
25358
|
}
|
|
25303
25359
|
case "fillOverlay": {
|
|
25304
|
-
i.charge(
|
|
25305
|
-
let e =
|
|
25306
|
-
for (let t = 0; t < a.length; t += 4)
|
|
25360
|
+
i.charge($i(s.fill, t, n, r));
|
|
25361
|
+
let e = Pi(s.fill, t, n.emuPerPixelX ?? 9525, n.emuPerPixelY ?? 9525, r, Qi(n));
|
|
25362
|
+
for (let t = 0; t < a.length; t += 4) Ai(a, t, e.data, t, a, t, s.blend);
|
|
25307
25363
|
break;
|
|
25308
25364
|
}
|
|
25309
25365
|
case "blur":
|
|
25310
|
-
s.radius !== 0 && i.charge(
|
|
25366
|
+
s.radius !== 0 && i.charge(Fi(t.width, t.height, s.radius / (n.emuPerPixelX ?? 9525), s.radius / (n.emuPerPixelY ?? 9525), s.grow).work), t = Li(t, s.radius / (n.emuPerPixelX ?? 9525), s.radius / (n.emuPerPixelY ?? 9525), s.grow), a = t.data;
|
|
25311
25367
|
break;
|
|
25312
25368
|
case "grayscale":
|
|
25313
25369
|
for (let e = 0; e < a.length; e += 4) {
|
|
25314
|
-
let t =
|
|
25370
|
+
let t = Gi(a[e], a[e + 1], a[e + 2]);
|
|
25315
25371
|
a[e] = t, a[e + 1] = t, a[e + 2] = t;
|
|
25316
25372
|
}
|
|
25317
25373
|
break;
|
|
25318
25374
|
case "biLevel":
|
|
25319
25375
|
for (let e = 0; e < a.length; e += 4) {
|
|
25320
|
-
let t =
|
|
25376
|
+
let t = Wi(a[e], a[e + 1], a[e + 2]) >= s.thresh ? 255 : 0;
|
|
25321
25377
|
a[e] = t, a[e + 1] = t, a[e + 2] = t;
|
|
25322
25378
|
}
|
|
25323
25379
|
break;
|
|
@@ -25330,7 +25386,7 @@ function U(t, n, r, i) {
|
|
|
25330
25386
|
}
|
|
25331
25387
|
case "luminance": {
|
|
25332
25388
|
i.charge(256);
|
|
25333
|
-
let e =
|
|
25389
|
+
let e = oa(s.bright, s.contrast);
|
|
25334
25390
|
for (let t = 0; t < a.length; t += 4) a[t] = e[a[t]], a[t + 1] = e[a[t + 1]], a[t + 2] = e[a[t + 2]];
|
|
25335
25391
|
break;
|
|
25336
25392
|
}
|
|
@@ -25401,15 +25457,15 @@ function U(t, n, r, i) {
|
|
|
25401
25457
|
}
|
|
25402
25458
|
return !o && n.duotone && (i.charge(t.width * t.height), he(t, n.duotone.clr1, n.duotone.clr2)), t;
|
|
25403
25459
|
}
|
|
25404
|
-
function
|
|
25460
|
+
function Qi(e) {
|
|
25405
25461
|
let t = e.hostRotation ?? 0;
|
|
25406
25462
|
return (e.hostFlipH ?? !1) === (e.hostFlipV ?? !1) ? t : -t;
|
|
25407
25463
|
}
|
|
25408
|
-
function
|
|
25409
|
-
let i = t.width * t.height > 0 ?
|
|
25464
|
+
function $i(e, t, n, r) {
|
|
25465
|
+
let i = t.width * t.height > 0 ? Ni(e, t, n.emuPerPixelX ?? 9525, n.emuPerPixelY ?? 9525, r, Qi(n)) + v(e) : 0;
|
|
25410
25466
|
return e.fillType === "gradient" && (i += 2 * e.stops.length * (1 + Math.max(1, Math.ceil(Math.log2(e.stops.length))))), i;
|
|
25411
25467
|
}
|
|
25412
|
-
function
|
|
25468
|
+
function ea(e, t) {
|
|
25413
25469
|
let n = t.emuPerPixelX ?? 9525, r = t.emuPerPixelY ?? 9525;
|
|
25414
25470
|
return [
|
|
25415
25471
|
e.sx,
|
|
@@ -25420,14 +25476,14 @@ function Ki(e, t) {
|
|
|
25420
25476
|
e.ty / r
|
|
25421
25477
|
];
|
|
25422
25478
|
}
|
|
25423
|
-
function
|
|
25424
|
-
let i =
|
|
25479
|
+
function ta(e, t, n, r) {
|
|
25480
|
+
let i = Ei(e, t);
|
|
25425
25481
|
r.charge(i.width * i.height);
|
|
25426
25482
|
let a = e.frame, o = i.width === e.width && i.height === e.height && i.frame.x === (a?.x ?? 0) && i.frame.y === (a?.y ?? 0) ? e.data : new Uint8ClampedArray(i.width * i.height * 4), s = {
|
|
25427
25483
|
...i,
|
|
25428
25484
|
data: o
|
|
25429
25485
|
};
|
|
25430
|
-
for (let r = 0; r < i.height; r++) for (let a = 0; a < i.width; a++)
|
|
25486
|
+
for (let r = 0; r < i.height; r++) for (let a = 0; a < i.width; a++) Ai(e.data, na(e, s, a, r), t.data, na(t, s, a, r), o, (r * i.width + a) * 4, n);
|
|
25431
25487
|
return s;
|
|
25432
25488
|
}
|
|
25433
25489
|
function W(e, t) {
|
|
@@ -25438,7 +25494,7 @@ function W(e, t) {
|
|
|
25438
25494
|
data: new Uint8ClampedArray(e.data)
|
|
25439
25495
|
};
|
|
25440
25496
|
}
|
|
25441
|
-
function
|
|
25497
|
+
function na(e, t, n, r) {
|
|
25442
25498
|
let i = e.frame ?? {
|
|
25443
25499
|
x: 0,
|
|
25444
25500
|
y: 0
|
|
@@ -25448,17 +25504,17 @@ function Ji(e, t, n, r) {
|
|
|
25448
25504
|
}, o = n + i.x - a.x, s = r + i.y - a.y;
|
|
25449
25505
|
return o < 0 || s < 0 || o >= e.width || s >= e.height ? -1 : (s * e.width + o) * 4;
|
|
25450
25506
|
}
|
|
25451
|
-
var
|
|
25507
|
+
var ra = [
|
|
25452
25508
|
0,
|
|
25453
25509
|
0,
|
|
25454
25510
|
0,
|
|
25455
25511
|
0
|
|
25456
25512
|
];
|
|
25457
|
-
function
|
|
25458
|
-
let i =
|
|
25459
|
-
return i < 0 ?
|
|
25513
|
+
function ia(e, t, n, r) {
|
|
25514
|
+
let i = na(e, t, n, r);
|
|
25515
|
+
return i < 0 ? ra : e.data.subarray(i, i + 4);
|
|
25460
25516
|
}
|
|
25461
|
-
function
|
|
25517
|
+
function aa(e, t, n, r, i) {
|
|
25462
25518
|
if (t.kind === "tree") return U(W(e, i), {
|
|
25463
25519
|
...n,
|
|
25464
25520
|
duotone: void 0,
|
|
@@ -25476,11 +25532,11 @@ function Zi(e, t, n, r, i) {
|
|
|
25476
25532
|
duotone: void 0,
|
|
25477
25533
|
effects: [o]
|
|
25478
25534
|
}, r, i);
|
|
25479
|
-
a =
|
|
25535
|
+
a = ta(a, t, "over", i);
|
|
25480
25536
|
}
|
|
25481
25537
|
return a;
|
|
25482
25538
|
}
|
|
25483
|
-
function
|
|
25539
|
+
function oa(e, t) {
|
|
25484
25540
|
let n = new Uint8ClampedArray(256), r = Math.max(-1, Math.min(1, e)), i = Math.max(-1, Math.min(1, t));
|
|
25485
25541
|
for (let e = 0; e < 256; e++) {
|
|
25486
25542
|
let t = e / 255 + r / 2 - .5, a;
|
|
@@ -25488,11 +25544,11 @@ function Qi(e, t) {
|
|
|
25488
25544
|
}
|
|
25489
25545
|
return n;
|
|
25490
25546
|
}
|
|
25491
|
-
function
|
|
25547
|
+
function sa(e) {
|
|
25492
25548
|
return e.svgImagePath != null && e.srcRect == null;
|
|
25493
25549
|
}
|
|
25494
|
-
var
|
|
25495
|
-
async function
|
|
25550
|
+
var ca = "duotone";
|
|
25551
|
+
async function la(t, n, r, i, a = {}) {
|
|
25496
25552
|
try {
|
|
25497
25553
|
let { offscreenFactory: o, failClosedOnDuotoneFailure: s = !1, ...c } = a, u = r ? {
|
|
25498
25554
|
...c,
|
|
@@ -25503,11 +25559,11 @@ async function ta(t, n, r, i, a = {}) {
|
|
|
25503
25559
|
targetHeightPx: void 0
|
|
25504
25560
|
} : u;
|
|
25505
25561
|
r?.preflight(0);
|
|
25506
|
-
let f = r ?
|
|
25562
|
+
let f = r ? Or(i, ca) : void 0, p = await ui(t, n, i, d);
|
|
25507
25563
|
if (!r || !p) return p;
|
|
25508
25564
|
r.preflight(p.width * p.height, p.width, p.height);
|
|
25509
|
-
let m = await
|
|
25510
|
-
return await
|
|
25565
|
+
let m = await ii(t, n, i, d, f, p), h = fe(Number(p.width), Number(p.height), c.targetWidthPx, c.targetHeightPx), g = h ? `|resize:${h.resizeWidth}x${h.resizeHeight}` : "";
|
|
25566
|
+
return await li(ca, JSON.stringify([
|
|
25511
25567
|
m,
|
|
25512
25568
|
r.key,
|
|
25513
25569
|
g,
|
|
@@ -25557,34 +25613,34 @@ async function ta(t, n, r, i, a = {}) {
|
|
|
25557
25613
|
throw r?.strict ? ae(e) : e;
|
|
25558
25614
|
}
|
|
25559
25615
|
}
|
|
25560
|
-
function
|
|
25616
|
+
function ua(e, t) {
|
|
25561
25617
|
return t ? `${e}|duo:${t.clr1}:${t.clr2}` : e;
|
|
25562
25618
|
}
|
|
25563
|
-
function
|
|
25564
|
-
return
|
|
25619
|
+
function da(e, t, n, r, i = {}) {
|
|
25620
|
+
return la(e, t, n ? {
|
|
25565
25621
|
key: `duo:${n.clr1}:${n.clr2}`,
|
|
25566
25622
|
strict: !1,
|
|
25567
25623
|
preflight() {},
|
|
25568
25624
|
apply: (e, t) => be(e, n, t)
|
|
25569
25625
|
} : void 0, r, i);
|
|
25570
25626
|
}
|
|
25571
|
-
function
|
|
25572
|
-
return
|
|
25627
|
+
function fa(e, t) {
|
|
25628
|
+
return Ri(t) ? `${e}|fx:${Ui(t)}` : ua(e, t);
|
|
25573
25629
|
}
|
|
25574
|
-
async function
|
|
25575
|
-
if (!
|
|
25630
|
+
async function pa(e, t, n, r, i = {}) {
|
|
25631
|
+
if (!Ri(n)) return da(e, t, n, r, i);
|
|
25576
25632
|
try {
|
|
25577
|
-
|
|
25578
|
-
let a =
|
|
25579
|
-
return await
|
|
25633
|
+
Xi(n, 0);
|
|
25634
|
+
let a = zi(n.effects).length ? Vr(r) : void 0;
|
|
25635
|
+
return await ma(e, t, n, r, i, {
|
|
25580
25636
|
work: 0,
|
|
25581
|
-
execution: new
|
|
25637
|
+
execution: new vi()
|
|
25582
25638
|
}).finally(() => a?.());
|
|
25583
25639
|
} catch (e) {
|
|
25584
25640
|
throw ae(e);
|
|
25585
25641
|
}
|
|
25586
25642
|
}
|
|
25587
|
-
async function
|
|
25643
|
+
async function ma(t, n, r, i, a, o) {
|
|
25588
25644
|
if (![a.widthPt ?? 0, a.heightPt ?? 0].every((e) => Number.isFinite(e) && e >= 0)) throw new e("unsupported-image-effect", "Invalid physical image effect dimensions");
|
|
25589
25645
|
let s = (t, n) => {
|
|
25590
25646
|
let i = {
|
|
@@ -25595,19 +25651,19 @@ async function oa(t, n, r, i, a, o) {
|
|
|
25595
25651
|
if (![i.emuPerPixelX ?? 9525, i.emuPerPixelY ?? 9525].every((e) => Number.isFinite(e) && e > 0)) throw new e("unsupported-image-effect", "Unrepresentable physical image effect sampling");
|
|
25596
25652
|
return i;
|
|
25597
25653
|
}, c = /* @__PURE__ */ new Map();
|
|
25598
|
-
return
|
|
25599
|
-
key: `fx:${
|
|
25654
|
+
return la(t, n, {
|
|
25655
|
+
key: `fx:${Ui(r)}|physical:${JSON.stringify([a.widthPt ?? 0, a.heightPt ?? 0])}`,
|
|
25600
25656
|
strict: !0,
|
|
25601
25657
|
preflight: (e, t, n) => {
|
|
25602
|
-
|
|
25658
|
+
Xi(s(t, n), e, t && n ? {
|
|
25603
25659
|
width: t,
|
|
25604
25660
|
height: n
|
|
25605
25661
|
} : void 0);
|
|
25606
25662
|
},
|
|
25607
25663
|
prepare: async (t) => {
|
|
25608
25664
|
let n = s(t.width, t.height);
|
|
25609
|
-
for (let r of
|
|
25610
|
-
let s = !r.blipEffects?.length &&
|
|
25665
|
+
for (let r of zi(n.effects)) {
|
|
25666
|
+
let s = !r.blipEffects?.length && sa(r), l = s ? r.svgImagePath : r.imagePath, u = s ? "image/svg+xml" : r.mimeType, d = {
|
|
25611
25667
|
...n,
|
|
25612
25668
|
effects: r.blipEffects ?? [],
|
|
25613
25669
|
duotone: r.duotone,
|
|
@@ -25624,7 +25680,7 @@ async function oa(t, n, r, i, a, o) {
|
|
|
25624
25680
|
let e = r.srcRect, i = r.fillRect, a = 1 - (e?.l ?? 0) - (e?.r ?? 0), o = 1 - (e?.t ?? 0) - (e?.b ?? 0);
|
|
25625
25681
|
f.widthPt = t.width * (n.emuPerPixelX ?? 9525) / 12700 * (1 - (i?.l ?? 0) - (i?.r ?? 0)) / (a > 0 ? a : 1), f.heightPt = t.height * (n.emuPerPixelY ?? 9525) / 12700 * (1 - (i?.t ?? 0) - (i?.b ?? 0)) / (o > 0 ? o : 1);
|
|
25626
25682
|
}
|
|
25627
|
-
let p = r.blipEffects?.length || r.duotone ? await
|
|
25683
|
+
let p = r.blipEffects?.length || r.duotone ? await ma(l, u, d, i, f, o) : await da(l, u, r.duotone, i, f);
|
|
25628
25684
|
if (!p) throw new e("unsupported-image-effect", "Image fill decode unavailable");
|
|
25629
25685
|
c.set(r, p);
|
|
25630
25686
|
}
|
|
@@ -25634,9 +25690,9 @@ async function oa(t, n, r, i, a, o) {
|
|
|
25634
25690
|
let n = e;
|
|
25635
25691
|
r += n.width * n.height;
|
|
25636
25692
|
}
|
|
25637
|
-
if (
|
|
25693
|
+
if (Xi(n, t.width * t.height, t, r), o.work += Ji(n, t.width, t.height, { images: c }), o.work > 134217728) throw new k("image-effect-work", C, o.work);
|
|
25638
25694
|
},
|
|
25639
|
-
apply: (e, t) => _e(e, (t) =>
|
|
25695
|
+
apply: (e, t) => _e(e, (t) => Zi(t, s(e.width, e.height), {
|
|
25640
25696
|
offscreenFactory: a.offscreenFactory,
|
|
25641
25697
|
images: c,
|
|
25642
25698
|
baseImage: e,
|
|
@@ -25644,13 +25700,13 @@ async function oa(t, n, r, i, a, o) {
|
|
|
25644
25700
|
}), t)
|
|
25645
25701
|
}, i, a);
|
|
25646
25702
|
}
|
|
25647
|
-
var
|
|
25703
|
+
var ha = {
|
|
25648
25704
|
"&": "&",
|
|
25649
25705
|
"<": "<",
|
|
25650
25706
|
">": ">",
|
|
25651
25707
|
"\"": """
|
|
25652
|
-
}, G = (e) => e.replace(/[&<>"]/g, (e) =>
|
|
25653
|
-
function
|
|
25708
|
+
}, G = (e) => e.replace(/[&<>"]/g, (e) => ha[e]);
|
|
25709
|
+
function ga(e, t = "roman") {
|
|
25654
25710
|
if (t === "double-struck" || t === "monospace") return t;
|
|
25655
25711
|
if (t === "fraktur") return e === "bold" || e === "boldItalic" ? "bold-fraktur" : "fraktur";
|
|
25656
25712
|
if (t === "script") return e === "bold" || e === "boldItalic" ? "bold-script" : "script";
|
|
@@ -25667,9 +25723,9 @@ function ca(e, t = "roman") {
|
|
|
25667
25723
|
case "italic": return null;
|
|
25668
25724
|
}
|
|
25669
25725
|
}
|
|
25670
|
-
var
|
|
25671
|
-
function
|
|
25672
|
-
let r =
|
|
25726
|
+
var _a = new Set([..."⏞⏟⎴⎵︷︸⏜⏝{}[]()¯_‾"]), va = "+−±∓×÷·∗⋅∘∙*/", ya = "=≠<>≤≥≈≡∼≅≃→←↔⇒∈∉⊂⊆⊃⊇∝≪≫⊥≔", ba = "([{⟨⌈⌊", xa = ")]}⟩⌉⌋", Sa = ",;";
|
|
25727
|
+
function Ca(e, t, n) {
|
|
25728
|
+
let r = ga(t, n), i = r ? ` mathvariant="${r}"` : "", a = "", o = "", s = () => {
|
|
25673
25729
|
o &&= (a += `<mn${i}>${G(o)}</mn>`, "");
|
|
25674
25730
|
};
|
|
25675
25731
|
for (let t of e) {
|
|
@@ -25681,56 +25737,56 @@ function ha(e, t, n) {
|
|
|
25681
25737
|
o += t;
|
|
25682
25738
|
continue;
|
|
25683
25739
|
}
|
|
25684
|
-
s(),
|
|
25740
|
+
s(), va.includes(t) || ya.includes(t) || Sa.includes(t) ? a += `<mo>${G(t)}</mo>` : ba.includes(t) || xa.includes(t) ? a += `<mo fence="true" stretchy="false">${G(t)}</mo>` : a += `<mi${i}>${G(t)}</mi>`;
|
|
25685
25741
|
}
|
|
25686
25742
|
return s(), a;
|
|
25687
25743
|
}
|
|
25688
25744
|
function K(e) {
|
|
25689
|
-
return e.map(
|
|
25745
|
+
return e.map(wa).join("");
|
|
25690
25746
|
}
|
|
25691
25747
|
function q(e) {
|
|
25692
25748
|
return `<mrow>${K(e)}</mrow>`;
|
|
25693
25749
|
}
|
|
25694
|
-
function
|
|
25750
|
+
function wa(e) {
|
|
25695
25751
|
switch (e.kind) {
|
|
25696
|
-
case "run": return
|
|
25752
|
+
case "run": return Ca(e.text, e.style, e.__script);
|
|
25697
25753
|
case "group": return q(e.items);
|
|
25698
25754
|
case "fraction": return `<mfrac${e.bar === !1 ? " linethickness=\"0\"" : ""}>${q(e.num)}${q(e.den)}</mfrac>`;
|
|
25699
25755
|
case "sup": return `<msup>${q(e.base)}${q(e.sup ?? [])}</msup>`;
|
|
25700
25756
|
case "sub": return `<msub>${q(e.base)}${q(e.sub ?? [])}</msub>`;
|
|
25701
25757
|
case "subSup": return `<msubsup>${q(e.base)}${q(e.sub ?? [])}${q(e.sup ?? [])}</msubsup>`;
|
|
25702
|
-
case "nary": return
|
|
25703
|
-
case "delimiter": return
|
|
25758
|
+
case "nary": return Na(e);
|
|
25759
|
+
case "delimiter": return Pa(e);
|
|
25704
25760
|
case "radical": return e.index && e.index.length ? `<mroot>${q(e.radicand)}${q(e.index)}</mroot>` : `<msqrt>${K(e.radicand)}</msqrt>`;
|
|
25705
|
-
case "limit": return
|
|
25706
|
-
case "array": return
|
|
25761
|
+
case "limit": return Aa(e);
|
|
25762
|
+
case "array": return ja(e);
|
|
25707
25763
|
case "groupChr": {
|
|
25708
|
-
let t = q(e.base), n =
|
|
25764
|
+
let t = q(e.base), n = _a.has(e.char), r = e.pos === "top" ? "mover" : "munder", i = `<mo stretchy="${n}">${G(e.char)}</mo>`;
|
|
25709
25765
|
return n ? `<${r}>${t}${i}</${r}>` : `<${r} accent="true">${t}${i}</${r}>`;
|
|
25710
25766
|
}
|
|
25711
25767
|
case "bar": {
|
|
25712
25768
|
let t = q(e.base), n = "<mo stretchy=\"true\">―</mo>";
|
|
25713
25769
|
return e.pos === "bot" ? `<munder>${t}${n}</munder>` : `<mover>${t}${n}</mover>`;
|
|
25714
25770
|
}
|
|
25715
|
-
case "accent": return
|
|
25771
|
+
case "accent": return ka(e);
|
|
25716
25772
|
case "func": return `<mrow>${q(e.name)}<mo>⁡</mo>${q(e.arg)}</mrow>`;
|
|
25717
|
-
case "phant": return
|
|
25773
|
+
case "phant": return Ta(e);
|
|
25718
25774
|
case "sPre": return `<mmultiscripts>${q(e.base)}<mprescripts/>${q(e.sub)}${q(e.sup)}</mmultiscripts>`;
|
|
25719
25775
|
case "box": return q(e.base);
|
|
25720
|
-
case "borderBox": return
|
|
25776
|
+
case "borderBox": return Ea(e);
|
|
25721
25777
|
}
|
|
25722
25778
|
}
|
|
25723
|
-
function
|
|
25779
|
+
function Ta(e) {
|
|
25724
25780
|
let t = e.show ? K(e.base) : `<mphantom>${K(e.base)}</mphantom>`, n = [];
|
|
25725
25781
|
return e.zeroWid && n.push("width=\"0\""), e.zeroAsc && n.push("height=\"0\""), e.zeroDesc && n.push("depth=\"0\""), n.length ? `<mpadded ${n.join(" ")}>${t}</mpadded>` : `<mrow>${t}</mrow>`;
|
|
25726
25782
|
}
|
|
25727
|
-
function
|
|
25783
|
+
function Ea(e) {
|
|
25728
25784
|
let t = [], n = !e.hideTop, r = !e.hideBot, i = !e.hideLeft, a = !e.hideRight;
|
|
25729
25785
|
n && r && i && a ? t.push("box") : (n && t.push("top"), r && t.push("bottom"), i && t.push("left"), a && t.push("right")), e.strikeH && t.push("horizontalstrike"), e.strikeV && t.push("verticalstrike"), e.strikeBltr && t.push("updiagonalstrike"), e.strikeTlbr && t.push("downdiagonalstrike");
|
|
25730
25786
|
let o = K(e.base);
|
|
25731
25787
|
return t.length ? `<menclose notation="${t.join(" ")}">${o}</menclose>` : `<mrow>${o}</mrow>`;
|
|
25732
25788
|
}
|
|
25733
|
-
var
|
|
25789
|
+
var Da = {
|
|
25734
25790
|
"̀": "`",
|
|
25735
25791
|
"́": "´",
|
|
25736
25792
|
"̂": "^",
|
|
@@ -25741,7 +25797,7 @@ var ya = {
|
|
|
25741
25797
|
"̌": "ˇ",
|
|
25742
25798
|
"⃗": "→",
|
|
25743
25799
|
"⃖": "←"
|
|
25744
|
-
},
|
|
25800
|
+
}, Oa = new Set([
|
|
25745
25801
|
"̅",
|
|
25746
25802
|
"̄",
|
|
25747
25803
|
"¯",
|
|
@@ -25749,37 +25805,37 @@ var ya = {
|
|
|
25749
25805
|
"̲",
|
|
25750
25806
|
"̳"
|
|
25751
25807
|
]);
|
|
25752
|
-
function
|
|
25808
|
+
function ka(e) {
|
|
25753
25809
|
let t = q(e.base);
|
|
25754
|
-
if (
|
|
25755
|
-
let r = n(
|
|
25810
|
+
if (Oa.has(e.char)) return `<mover>${t}<mo stretchy="true">―</mo></mover>`;
|
|
25811
|
+
let r = n(Da, e.char) ?? e.char;
|
|
25756
25812
|
return `<mover accent="true">${t}<mo stretchy="${r === "→" || r === "←" ? "true" : "false"}">${G(r)}</mo></mover>`;
|
|
25757
25813
|
}
|
|
25758
|
-
function
|
|
25814
|
+
function Aa(e) {
|
|
25759
25815
|
let t = q(e.base), n = e.lower && e.lower.length ? q(e.lower) : null, r = e.upper && e.upper.length ? q(e.upper) : null;
|
|
25760
25816
|
return n && r ? `<munderover>${t}${n}${r}</munderover>` : n ? `<munder>${t}${n}</munder>` : r ? `<mover>${t}${r}</mover>` : t;
|
|
25761
25817
|
}
|
|
25762
|
-
function
|
|
25818
|
+
function ja(e) {
|
|
25763
25819
|
let t = Math.max(1, ...e.rows.map((e) => e.length)), n;
|
|
25764
25820
|
n = e.align === "eq" ? Array.from({ length: t }, (e, t) => t % 2 == 0 ? "right" : "left").join(" ") : e.align === "left" ? "left" : "center";
|
|
25765
25821
|
let r = e.rows.map((e) => `<mtr>${e.map((e) => `<mtd>${K(e)}</mtd>`).join("")}</mtr>`).join("");
|
|
25766
25822
|
return `<mtable columnalign="${n}" rowspacing="0.2em" columnspacing="0.3em">${r}</mtable>`;
|
|
25767
25823
|
}
|
|
25768
|
-
var
|
|
25769
|
-
function
|
|
25770
|
-
let t = e.limLoc === "subSup" ? !0 : e.limLoc === "undOvr" ? !1 :
|
|
25824
|
+
var Ma = new Set([..."∫∬∭∮∯∰∱∲∳⨌⨍⨎⨏⨐⨑⨒⨓⨔⨕⨖⨗"]);
|
|
25825
|
+
function Na(e) {
|
|
25826
|
+
let t = e.limLoc === "subSup" ? !0 : e.limLoc === "undOvr" ? !1 : Ma.has(e.op), n = `<mo largeop="true">${G(e.op)}</mo>`, r = e.sub ?? [], i = e.sup ?? [], a;
|
|
25771
25827
|
return a = t ? r.length && i.length ? `<msubsup>${n}${q(r)}${q(i)}</msubsup>` : r.length ? `<msub>${n}${q(r)}</msub>` : i.length ? `<msup>${n}${q(i)}</msup>` : n : r.length && i.length ? `<munderover>${n}${q(r)}${q(i)}</munderover>` : r.length ? `<munder>${n}${q(r)}</munder>` : i.length ? `<mover>${n}${q(i)}</mover>` : n, `<mrow>${a}${K(e.body)}</mrow>`;
|
|
25772
25828
|
}
|
|
25773
|
-
function
|
|
25829
|
+
function Pa(e) {
|
|
25774
25830
|
let t = (e) => `<mo fence="true" stretchy="true">${G(e)}</mo>`, n = e.items.map((e) => q(e)).join("<mo separator=\"true\">,</mo>");
|
|
25775
25831
|
return `<mrow>${t(e.begChar)}${n}${t(e.endChar)}</mrow>`;
|
|
25776
25832
|
}
|
|
25777
|
-
function
|
|
25833
|
+
function Fa(e, t) {
|
|
25778
25834
|
return `<math xmlns="http://www.w3.org/1998/Math/MathML" display="${t ? "block" : "inline"}">${K(e)}</math>`;
|
|
25779
25835
|
}
|
|
25780
|
-
var
|
|
25781
|
-
function
|
|
25782
|
-
let r = Math.max(1, Math.round(t *
|
|
25836
|
+
var Ia = 256, La = 64;
|
|
25837
|
+
function Ra(e, t, n) {
|
|
25838
|
+
let r = Math.max(1, Math.round(t * Ia)), i = Math.max(1, Math.round(n * Ia));
|
|
25783
25839
|
return e.replace(/<svg([^>]*?)>/, (e, t) => `<svg${t.replace(/\s(?:width|height)="[^"]*"/g, "")} width="${r}" height="${i}">`);
|
|
25784
25840
|
}
|
|
25785
25841
|
function J(e, t) {
|
|
@@ -25789,7 +25845,7 @@ function Y(e, t, n = 0) {
|
|
|
25789
25845
|
let r = Number.parseFloat(J(e, t) ?? "");
|
|
25790
25846
|
return Number.isFinite(r) ? r : n;
|
|
25791
25847
|
}
|
|
25792
|
-
function
|
|
25848
|
+
function za(e) {
|
|
25793
25849
|
return e.replace(/&(#(?:x[\da-fA-F]+|\d+)|amp|lt|gt|quot|apos);/g, (e, t) => {
|
|
25794
25850
|
if (t[0] === "#") {
|
|
25795
25851
|
let n = t[1] === "x" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
|
|
@@ -25804,7 +25860,7 @@ function ja(e) {
|
|
|
25804
25860
|
}[t];
|
|
25805
25861
|
});
|
|
25806
25862
|
}
|
|
25807
|
-
function
|
|
25863
|
+
function Ba(e) {
|
|
25808
25864
|
let t = /* @__PURE__ */ new Map();
|
|
25809
25865
|
for (let n of [
|
|
25810
25866
|
"fill",
|
|
@@ -25827,8 +25883,8 @@ function Ma(e) {
|
|
|
25827
25883
|
}
|
|
25828
25884
|
return t;
|
|
25829
25885
|
}
|
|
25830
|
-
function
|
|
25831
|
-
let r =
|
|
25886
|
+
function Va(e, t, n) {
|
|
25887
|
+
let r = Ba(t), i = { ...n }, a = r.get("fill");
|
|
25832
25888
|
a === "none" ? i.fill = !1 : a && (i.fill = !0, e.fillStyle = a);
|
|
25833
25889
|
let o = r.get("stroke");
|
|
25834
25890
|
o === "none" ? i.stroke = !1 : o && (i.stroke = !0, e.strokeStyle = o);
|
|
@@ -25843,7 +25899,7 @@ function Na(e, t, n) {
|
|
|
25843
25899
|
let d = Number.parseFloat(r.get("opacity") ?? "");
|
|
25844
25900
|
return Number.isFinite(d) && (e.globalAlpha *= Math.max(0, Math.min(1, d))), i;
|
|
25845
25901
|
}
|
|
25846
|
-
function
|
|
25902
|
+
function Ha(e, t) {
|
|
25847
25903
|
if (!t) return;
|
|
25848
25904
|
let n = /([a-zA-Z]+)\(([^)]*)\)/g;
|
|
25849
25905
|
for (let r = n.exec(t); r; r = n.exec(t)) {
|
|
@@ -25868,10 +25924,10 @@ function Pa(e, t) {
|
|
|
25868
25924
|
}
|
|
25869
25925
|
}
|
|
25870
25926
|
}
|
|
25871
|
-
function
|
|
25927
|
+
function Ua(e, t, n) {
|
|
25872
25928
|
n.fill && e.fill(t, n.fillRule), n.stroke && e.lineWidth > 0 && e.stroke(t);
|
|
25873
25929
|
}
|
|
25874
|
-
function
|
|
25930
|
+
function Wa(e, t, n, r) {
|
|
25875
25931
|
let i = J(t.slice(0, t.indexOf(">") + 1), "viewBox")?.trim().split(/[\s,]+/).map(Number);
|
|
25876
25932
|
if (!i || i.length !== 4 || i.some((e) => !Number.isFinite(e))) throw TypeError("MathJax SVG must contain a finite viewBox");
|
|
25877
25933
|
let [a, o, s, c] = i;
|
|
@@ -25891,33 +25947,33 @@ function Ia(e, t, n, r) {
|
|
|
25891
25947
|
continue;
|
|
25892
25948
|
}
|
|
25893
25949
|
if (o === "g") {
|
|
25894
|
-
f.push(d), e.save(), d =
|
|
25950
|
+
f.push(d), e.save(), d = Va(e, a, d), Ha(e, J(a, "transform"));
|
|
25895
25951
|
continue;
|
|
25896
25952
|
}
|
|
25897
25953
|
if (o === "text") {
|
|
25898
25954
|
let n = t.indexOf("</text>", p.lastIndex);
|
|
25899
25955
|
if (n < 0) throw TypeError("MathJax SVG text must have a closing tag");
|
|
25900
25956
|
e.save();
|
|
25901
|
-
let r =
|
|
25902
|
-
|
|
25903
|
-
let i =
|
|
25957
|
+
let r = Va(e, a, d);
|
|
25958
|
+
Ha(e, J(a, "transform")), e.font = `${J(a, "font-style") === "italic" ? "italic " : ""}${J(a, "font-weight") === "bold" ? "bold " : ""}${Y(a, "font-size", 1e3)}px ${J(a, "font-family") ?? "serif"}`, e.textBaseline = "alphabetic";
|
|
25959
|
+
let i = za(t.slice(p.lastIndex, n)), o = Y(a, "x"), s = Y(a, "y");
|
|
25904
25960
|
r.fill && e.fillText(i, o, s), r.stroke && e.lineWidth > 0 && e.strokeText(i, o, s), e.restore(), p.lastIndex = n + 7;
|
|
25905
25961
|
continue;
|
|
25906
25962
|
}
|
|
25907
25963
|
if (o !== "path" && o !== "rect" && o !== "line") continue;
|
|
25908
25964
|
e.save();
|
|
25909
|
-
let c =
|
|
25910
|
-
|
|
25965
|
+
let c = Va(e, a, d);
|
|
25966
|
+
Ha(e, J(a, "transform"));
|
|
25911
25967
|
let l = o === "path" ? new Path2D(J(a, "d") ?? "") : new Path2D();
|
|
25912
|
-
o === "rect" ? l.rect(Y(a, "x"), Y(a, "y"), Y(a, "width"), Y(a, "height")) : o === "line" && (l.moveTo(Y(a, "x1"), Y(a, "y1")), l.lineTo(Y(a, "x2"), Y(a, "y2"))),
|
|
25968
|
+
o === "rect" ? l.rect(Y(a, "x"), Y(a, "y"), Y(a, "width"), Y(a, "height")) : o === "line" && (l.moveTo(Y(a, "x1"), Y(a, "y1")), l.lineTo(Y(a, "x2"), Y(a, "y2"))), Ua(e, l, c), e.restore();
|
|
25913
25969
|
}
|
|
25914
25970
|
e.restore();
|
|
25915
25971
|
}
|
|
25916
|
-
async function
|
|
25917
|
-
let { width: n, height: r } = d(e.widthEm *
|
|
25972
|
+
async function Ga(e, t) {
|
|
25973
|
+
let { width: n, height: r } = d(e.widthEm * Ia, (e.ascentEm + e.descentEm) * Ia), i = y(n, r), a = i?.getContext("2d");
|
|
25918
25974
|
if (!i || !a || typeof Path2D > "u") throw Error("Math SVG rasterization requires Canvas 2D and Path2D support");
|
|
25919
|
-
|
|
25920
|
-
let o = i, s = n, c = r, l =
|
|
25975
|
+
Wa(a, Ra(xe(e.svg, t), e.widthEm, e.ascentEm + e.descentEm), n, r);
|
|
25976
|
+
let o = i, s = n, c = r, l = La / Ia, u = Math.max(1, Math.round(n * l)), f = Math.max(1, Math.round(r * l));
|
|
25921
25977
|
for (; s > u || c > f;) {
|
|
25922
25978
|
let e = Math.max(u, Math.ceil(s / 2)), t = Math.max(f, Math.ceil(c / 2)), n = y(e, t), r = n?.getContext("2d");
|
|
25923
25979
|
if (!n || !r) break;
|
|
@@ -25929,19 +25985,19 @@ async function La(e, t) {
|
|
|
25929
25985
|
heightPx: c
|
|
25930
25986
|
};
|
|
25931
25987
|
}
|
|
25932
|
-
function
|
|
25988
|
+
function Ka(e, t) {
|
|
25933
25989
|
let n = y(e.widthPx, e.heightPx);
|
|
25934
25990
|
if (!n) return e.source;
|
|
25935
25991
|
let r = n.getContext("2d");
|
|
25936
25992
|
return r ? (r.drawImage(e.source, 0, 0, e.widthPx, e.heightPx), r.globalCompositeOperation = "source-in", r.fillStyle = t, r.fillRect(0, 0, e.widthPx, e.heightPx), n) : e.source;
|
|
25937
25993
|
}
|
|
25938
|
-
function
|
|
25994
|
+
function qa(e, t) {
|
|
25939
25995
|
let n = e.tinted.get(t);
|
|
25940
25996
|
if (n) return n;
|
|
25941
|
-
let r =
|
|
25997
|
+
let r = Ka(e.raster, t);
|
|
25942
25998
|
return e.tinted.set(t, r), r;
|
|
25943
25999
|
}
|
|
25944
|
-
function
|
|
26000
|
+
function Ja(e) {
|
|
25945
26001
|
if (typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement) return !0;
|
|
25946
26002
|
if (typeof e != "object" || !e) return !1;
|
|
25947
26003
|
let t = e;
|
|
@@ -25949,30 +26005,30 @@ function Ba(e) {
|
|
|
25949
26005
|
let n = t.ownerDocument?.defaultView?.HTMLCanvasElement;
|
|
25950
26006
|
return typeof n == "function" && e instanceof n;
|
|
25951
26007
|
}
|
|
25952
|
-
function
|
|
26008
|
+
function Ya(e = 1) {
|
|
25953
26009
|
return typeof window < "u" && window.devicePixelRatio || e;
|
|
25954
26010
|
}
|
|
25955
|
-
var
|
|
25956
|
-
function
|
|
26011
|
+
var Xa = "ooxml-insufficient-credit", Za = "OOXML_INSUFFICIENT_CREDIT:";
|
|
26012
|
+
function Qa(e) {
|
|
25957
26013
|
return typeof e == "number" && Number.isSafeInteger(e) && e > 0;
|
|
25958
26014
|
}
|
|
25959
|
-
function
|
|
26015
|
+
function $a(e) {
|
|
25960
26016
|
if (!e || typeof e != "object" || Array.isArray(e)) return !1;
|
|
25961
26017
|
let t = e;
|
|
25962
|
-
return
|
|
26018
|
+
return Qa(t.requiredBytes) && Qa(t.offeredBytes) && t.requiredBytes > t.offeredBytes;
|
|
25963
26019
|
}
|
|
25964
|
-
var
|
|
25965
|
-
code =
|
|
26020
|
+
var eo = class e extends RangeError {
|
|
26021
|
+
code = Xa;
|
|
25966
26022
|
requiredBytes;
|
|
25967
26023
|
offeredBytes;
|
|
25968
26024
|
constructor(t) {
|
|
25969
26025
|
super(`Pull unit requires ${t.requiredBytes} bytes but credit is ${t.offeredBytes}`), this.name = "PullSessionInsufficientCreditError", this.requiredBytes = t.requiredBytes, this.offeredBytes = t.offeredBytes, Object.setPrototypeOf(this, e.prototype);
|
|
25970
26026
|
}
|
|
25971
26027
|
};
|
|
25972
|
-
function
|
|
25973
|
-
if (e instanceof
|
|
26028
|
+
function to(e) {
|
|
26029
|
+
if (e instanceof eo) return e;
|
|
25974
26030
|
let t = e instanceof Error ? e.message : String(e);
|
|
25975
|
-
if (!t.startsWith(
|
|
26031
|
+
if (!t.startsWith(Za)) return;
|
|
25976
26032
|
let n;
|
|
25977
26033
|
try {
|
|
25978
26034
|
n = JSON.parse(t.slice(26));
|
|
@@ -25981,62 +26037,62 @@ function qa(e) {
|
|
|
25981
26037
|
}
|
|
25982
26038
|
if (!n || typeof n != "object" || Array.isArray(n)) return;
|
|
25983
26039
|
let r = n;
|
|
25984
|
-
if (!(r.code !== "ooxml-insufficient-credit" ||
|
|
26040
|
+
if (!(r.code !== "ooxml-insufficient-credit" || !$a(r))) return new eo(r);
|
|
25985
26041
|
}
|
|
25986
|
-
function
|
|
25987
|
-
let r =
|
|
26042
|
+
function no(e, t, n) {
|
|
26043
|
+
let r = to(e);
|
|
25988
26044
|
if (!(!r || r.offeredBytes !== t || r.requiredBytes > n)) return r;
|
|
25989
26045
|
}
|
|
25990
|
-
function
|
|
25991
|
-
if (
|
|
26046
|
+
function ro(e, t, n) {
|
|
26047
|
+
if (ao(e)) return e.offeredBytes === t && e.requiredBytes <= n ? e.requiredBytes : void 0;
|
|
25992
26048
|
}
|
|
25993
|
-
async function
|
|
26049
|
+
async function io(e, t, n, r) {
|
|
25994
26050
|
try {
|
|
25995
26051
|
return await e.pull(t, { signal: r });
|
|
25996
26052
|
} catch (i) {
|
|
25997
|
-
let a =
|
|
26053
|
+
let a = ro(i, t, n);
|
|
25998
26054
|
if (a === void 0) throw i;
|
|
25999
26055
|
return e.pull(a, { signal: r });
|
|
26000
26056
|
}
|
|
26001
26057
|
}
|
|
26002
|
-
function
|
|
26003
|
-
return e instanceof
|
|
26058
|
+
function ao(e) {
|
|
26059
|
+
return e instanceof eo || !!e && typeof e == "object" && e.code === "ooxml-insufficient-credit" && $a(e);
|
|
26004
26060
|
}
|
|
26005
|
-
var
|
|
26061
|
+
var oo = "OOXML_RESOURCE_LIMIT:", so = "OOXML_NOT_OOXML:", co = 128, lo = 256, uo = 4096;
|
|
26006
26062
|
function X(e) {
|
|
26007
26063
|
return typeof e == "number" && Number.isSafeInteger(e) && e >= 0;
|
|
26008
26064
|
}
|
|
26009
|
-
function
|
|
26065
|
+
function fo(e) {
|
|
26010
26066
|
if (!e || typeof e != "object" || Array.isArray(e)) return !1;
|
|
26011
26067
|
let t = e;
|
|
26012
26068
|
return X(t.archiveEntryCount) && X(t.declaredInflatedBytes) && (t.largestInflatedEntryBytes === void 0 || X(t.largestInflatedEntryBytes)) && X(t.distinctInflatedBytes) && X(t.operationInflatedBytes);
|
|
26013
26069
|
}
|
|
26014
|
-
function
|
|
26070
|
+
function po(e) {
|
|
26015
26071
|
let t;
|
|
26016
26072
|
try {
|
|
26017
26073
|
t = JSON.parse(new TextDecoder().decode(e));
|
|
26018
26074
|
} catch {
|
|
26019
26075
|
throw TypeError("OOXML resource usage checkpoint is not valid JSON");
|
|
26020
26076
|
}
|
|
26021
|
-
if (!
|
|
26077
|
+
if (!fo(t)) throw TypeError("OOXML resource usage checkpoint is invalid");
|
|
26022
26078
|
return t;
|
|
26023
26079
|
}
|
|
26024
|
-
function
|
|
26080
|
+
function mo(e) {
|
|
26025
26081
|
return e === "docx" || e === "xlsx" || e === "pptx";
|
|
26026
26082
|
}
|
|
26027
|
-
function
|
|
26083
|
+
function ho(e) {
|
|
26028
26084
|
return e === "container" || e === "decompression" || e === "parsing" || e === "serialization" || e === "layout" || e === "rendering" || e === "worker";
|
|
26029
26085
|
}
|
|
26030
|
-
function
|
|
26086
|
+
function go(e, t) {
|
|
26031
26087
|
return typeof e == "string" && e.length > 0 && e.length <= t && !/[\u0000-\u001f\u007f]/u.test(e);
|
|
26032
26088
|
}
|
|
26033
|
-
function
|
|
26034
|
-
return
|
|
26089
|
+
function _o(e) {
|
|
26090
|
+
return go(e, co) && /^[a-z0-9][a-z0-9-]*$/u.test(e);
|
|
26035
26091
|
}
|
|
26036
|
-
function
|
|
26037
|
-
return !
|
|
26092
|
+
function vo(e) {
|
|
26093
|
+
return !go(e, uo) || e.startsWith("/") || e.startsWith("\\") || e.includes("\\") || e.includes("?") || e.includes("#") || e.includes("://") || /^[a-z]:/iu.test(e) ? !1 : e.split("/").every((e) => e !== "" && e !== "." && e !== "..");
|
|
26038
26094
|
}
|
|
26039
|
-
var
|
|
26095
|
+
var yo = new Map([
|
|
26040
26096
|
["archive-entry:declared-inflated-bytes", {
|
|
26041
26097
|
stage: "container",
|
|
26042
26098
|
part: "required"
|
|
@@ -26138,20 +26194,20 @@ var uo = new Map([
|
|
|
26138
26194
|
part: "forbidden",
|
|
26139
26195
|
configurable: !1
|
|
26140
26196
|
}]
|
|
26141
|
-
]),
|
|
26142
|
-
function
|
|
26197
|
+
]), bo = new Set([...yo.keys()].map((e) => e.slice(0, e.indexOf(":")))), xo = new Set([...yo.keys()].map((e) => e.slice(e.indexOf(":") + 1)));
|
|
26198
|
+
function So(e) {
|
|
26143
26199
|
if (!e || typeof e != "object" || Array.isArray(e)) return !1;
|
|
26144
26200
|
let t = e;
|
|
26145
|
-
return !
|
|
26201
|
+
return !mo(t.format) || !go(t.operation, lo) || !_o(t.resource) || !_o(t.metric) || !X(t.limit) || !X(t.observed) || typeof t.configurable != "boolean" || !fo(t.usage) ? !1 : !("part" in t) || vo(t.part);
|
|
26146
26202
|
}
|
|
26147
|
-
function
|
|
26203
|
+
function Co(e) {
|
|
26148
26204
|
if (!e || typeof e != "object" || Array.isArray(e)) return !1;
|
|
26149
26205
|
let t = e;
|
|
26150
|
-
if (!
|
|
26151
|
-
let n = t.violation, r =
|
|
26152
|
-
return r ? t.stage !== r.stage || r.configurable === !1 && n.configurable !== !1 ? !1 : r.part === "required" ? n.part !== void 0 : r.part === "forbidden" ? n.part === void 0 : !0 : !(
|
|
26206
|
+
if (!ho(t.stage) || !So(t.violation)) return !1;
|
|
26207
|
+
let n = t.violation, r = yo.get(`${n.resource}:${n.metric}`);
|
|
26208
|
+
return r ? t.stage !== r.stage || r.configurable === !1 && n.configurable !== !1 ? !1 : r.part === "required" ? n.part !== void 0 : r.part === "forbidden" ? n.part === void 0 : !0 : !(bo.has(n.resource) && xo.has(n.metric));
|
|
26153
26209
|
}
|
|
26154
|
-
function
|
|
26210
|
+
function wo(e) {
|
|
26155
26211
|
return {
|
|
26156
26212
|
archiveEntryCount: e.archiveEntryCount,
|
|
26157
26213
|
declaredInflatedBytes: e.declaredInflatedBytes,
|
|
@@ -26160,8 +26216,8 @@ function go(e) {
|
|
|
26160
26216
|
operationInflatedBytes: e.operationInflatedBytes
|
|
26161
26217
|
};
|
|
26162
26218
|
}
|
|
26163
|
-
function
|
|
26164
|
-
if (!
|
|
26219
|
+
function To(e) {
|
|
26220
|
+
if (!Co(e)) return;
|
|
26165
26221
|
let t = e.violation, n = {
|
|
26166
26222
|
stage: e.stage,
|
|
26167
26223
|
violation: {
|
|
@@ -26173,18 +26229,18 @@ function _o(e) {
|
|
|
26173
26229
|
limit: t.limit,
|
|
26174
26230
|
observed: t.observed,
|
|
26175
26231
|
configurable: t.configurable,
|
|
26176
|
-
usage:
|
|
26232
|
+
usage: wo(t.usage)
|
|
26177
26233
|
}
|
|
26178
26234
|
};
|
|
26179
|
-
return
|
|
26235
|
+
return Co(n) ? n : void 0;
|
|
26180
26236
|
}
|
|
26181
|
-
function
|
|
26237
|
+
function Eo(e) {
|
|
26182
26238
|
let t = e.violation;
|
|
26183
26239
|
return `OOXML resource limit exceeded${t.part ? ` for ${t.part}` : ""} (${t.resource}, ${e.stage}): ${t.metric} ${t.observed} > ${t.limit}`;
|
|
26184
26240
|
}
|
|
26185
|
-
function
|
|
26241
|
+
function Do(e) {
|
|
26186
26242
|
let t = e instanceof Error ? e.message : String(e);
|
|
26187
|
-
if (!t.startsWith(
|
|
26243
|
+
if (!t.startsWith(oo)) return;
|
|
26188
26244
|
let n;
|
|
26189
26245
|
try {
|
|
26190
26246
|
n = JSON.parse(t.slice(21));
|
|
@@ -26193,43 +26249,43 @@ function yo(e) {
|
|
|
26193
26249
|
}
|
|
26194
26250
|
if (!n || typeof n != "object") return;
|
|
26195
26251
|
let r = n;
|
|
26196
|
-
if (!(r.code !== "ooxml-resource-limit" || !
|
|
26252
|
+
if (!(r.code !== "ooxml-resource-limit" || !Co(r.details))) return new x(Eo(r.details), r.details);
|
|
26197
26253
|
}
|
|
26198
|
-
function
|
|
26254
|
+
function Oo(e) {
|
|
26199
26255
|
try {
|
|
26200
26256
|
return e();
|
|
26201
26257
|
} catch (e) {
|
|
26202
|
-
throw e instanceof x || typeof e != "string" && !(e instanceof Error) ? e :
|
|
26258
|
+
throw e instanceof x || typeof e != "string" && !(e instanceof Error) ? e : Do(e) ?? e;
|
|
26203
26259
|
}
|
|
26204
26260
|
}
|
|
26205
|
-
function
|
|
26261
|
+
function ko(t) {
|
|
26206
26262
|
let n = t instanceof Error ? t.message : String(t);
|
|
26207
|
-
if (n.startsWith(
|
|
26263
|
+
if (n.startsWith(so)) return new e("not-ooxml", `This file is not an Office Open XML document: ${n.slice(16)}`);
|
|
26208
26264
|
}
|
|
26209
|
-
function
|
|
26265
|
+
function Ao(e) {
|
|
26210
26266
|
if (!e || typeof e != "object" || Array.isArray(e)) return;
|
|
26211
26267
|
let t = e, n = t.format, r = t.reason;
|
|
26212
|
-
if (!(!
|
|
26268
|
+
if (!(!_o(n) || r !== "source-subset")) return {
|
|
26213
26269
|
format: n,
|
|
26214
26270
|
reason: r
|
|
26215
26271
|
};
|
|
26216
26272
|
}
|
|
26217
|
-
function
|
|
26273
|
+
function jo(t) {
|
|
26218
26274
|
return new e("unsupported-content", "Input is outside the source’s supported subset.", t);
|
|
26219
26275
|
}
|
|
26220
|
-
function
|
|
26276
|
+
function Mo(e) {
|
|
26221
26277
|
let t = typeof e == "string" ? e : e instanceof Error ? e.message : "";
|
|
26222
26278
|
if (!(!t.startsWith("MODEL_SOURCE_UNSUPPORTED:") || t.length > 1024)) try {
|
|
26223
|
-
let e =
|
|
26224
|
-
return e ?
|
|
26279
|
+
let e = Ao(JSON.parse(t.slice(25)));
|
|
26280
|
+
return e ? jo(e) : void 0;
|
|
26225
26281
|
} catch {
|
|
26226
26282
|
return;
|
|
26227
26283
|
}
|
|
26228
26284
|
}
|
|
26229
|
-
function
|
|
26230
|
-
return t === "OOXML_SOURCE_UNSUPPORTED_ENCRYPTION" || t instanceof Error && t.message === "OOXML_SOURCE_UNSUPPORTED_ENCRYPTION" ? new e("unsupported-encryption", "The configured source cannot decrypt this input.") :
|
|
26285
|
+
function No(t) {
|
|
26286
|
+
return t === "OOXML_SOURCE_UNSUPPORTED_ENCRYPTION" || t instanceof Error && t.message === "OOXML_SOURCE_UNSUPPORTED_ENCRYPTION" ? new e("unsupported-encryption", "The configured source cannot decrypt this input.") : Mo(t) ?? Do(t) ?? ko(t);
|
|
26231
26287
|
}
|
|
26232
|
-
function
|
|
26288
|
+
function Po(t) {
|
|
26233
26289
|
let n = w(t);
|
|
26234
26290
|
if (n) {
|
|
26235
26291
|
let e = new k(n.metric, n.limit, n.observed);
|
|
@@ -26246,7 +26302,7 @@ function Eo(t) {
|
|
|
26246
26302
|
errorName: "TiffDecodeError",
|
|
26247
26303
|
code: "ooxml-tiff-decode"
|
|
26248
26304
|
};
|
|
26249
|
-
let i =
|
|
26305
|
+
let i = to(t);
|
|
26250
26306
|
if (i) return {
|
|
26251
26307
|
message: i.message,
|
|
26252
26308
|
errorName: i.name,
|
|
@@ -26256,11 +26312,11 @@ function Eo(t) {
|
|
|
26256
26312
|
offeredBytes: i.offeredBytes
|
|
26257
26313
|
}
|
|
26258
26314
|
};
|
|
26259
|
-
let a = t instanceof e || t instanceof x ? t :
|
|
26315
|
+
let a = t instanceof e || t instanceof x ? t : No(t), o = a ?? t;
|
|
26260
26316
|
if (a instanceof x || o && typeof o == "object" && o.code === "ooxml-resource-limit") {
|
|
26261
|
-
let e = o, t =
|
|
26317
|
+
let e = o, t = To(e.details);
|
|
26262
26318
|
return t ? {
|
|
26263
|
-
message: typeof e.message == "string" ? e.message :
|
|
26319
|
+
message: typeof e.message == "string" ? e.message : Eo(t),
|
|
26264
26320
|
errorName: "OoxmlResourceLimitError",
|
|
26265
26321
|
code: "ooxml-resource-limit",
|
|
26266
26322
|
resourceLimit: t
|
|
@@ -26270,9 +26326,9 @@ function Eo(t) {
|
|
|
26270
26326
|
};
|
|
26271
26327
|
}
|
|
26272
26328
|
if (o && typeof o == "object" && o.code === "unsupported-content") {
|
|
26273
|
-
let e =
|
|
26329
|
+
let e = Ao(o.details);
|
|
26274
26330
|
return e ? {
|
|
26275
|
-
message:
|
|
26331
|
+
message: jo(e).message,
|
|
26276
26332
|
code: "unsupported-content",
|
|
26277
26333
|
unsupportedContent: e
|
|
26278
26334
|
} : {
|
|
@@ -26282,24 +26338,24 @@ function Eo(t) {
|
|
|
26282
26338
|
}
|
|
26283
26339
|
if (a instanceof e) return {
|
|
26284
26340
|
message: typeof a.message == "string" ? a.message : String(a.message),
|
|
26285
|
-
errorName:
|
|
26286
|
-
...
|
|
26341
|
+
errorName: go(a.name, co) ? a.name : "OoxmlError",
|
|
26342
|
+
..._o(a.code) ? { code: a.code } : {}
|
|
26287
26343
|
};
|
|
26288
26344
|
let s = t instanceof Error ? t.message : String(t);
|
|
26289
|
-
if (typeof s == "string" && s.startsWith(
|
|
26345
|
+
if (typeof s == "string" && s.startsWith(oo)) return {
|
|
26290
26346
|
message: "Invalid OOXML resource-limit payload",
|
|
26291
26347
|
errorName: "Error"
|
|
26292
26348
|
};
|
|
26293
26349
|
let c = t instanceof Error ? t : Error(s), l = c;
|
|
26294
26350
|
return {
|
|
26295
26351
|
message: typeof c.message == "string" ? c.message : String(c.message),
|
|
26296
|
-
errorName:
|
|
26352
|
+
errorName: go(c.name, co) ? c.name : "Error",
|
|
26297
26353
|
...typeof l.code == "string" ? { code: l.code } : {}
|
|
26298
26354
|
};
|
|
26299
26355
|
}
|
|
26300
|
-
function
|
|
26356
|
+
function Fo(e) {
|
|
26301
26357
|
try {
|
|
26302
|
-
return
|
|
26358
|
+
return Po(e);
|
|
26303
26359
|
} catch {
|
|
26304
26360
|
return {
|
|
26305
26361
|
message: "Worker operation failed with an unreadable error",
|
|
@@ -26307,7 +26363,7 @@ function Do(e) {
|
|
|
26307
26363
|
};
|
|
26308
26364
|
}
|
|
26309
26365
|
}
|
|
26310
|
-
var
|
|
26366
|
+
var Io = new Set([
|
|
26311
26367
|
"encrypted",
|
|
26312
26368
|
"invalid-password",
|
|
26313
26369
|
"unsupported-encryption",
|
|
@@ -26315,7 +26371,7 @@ var Oo = new Set([
|
|
|
26315
26371
|
"not-ooxml",
|
|
26316
26372
|
"invalid-numbering",
|
|
26317
26373
|
"unsupported-image-effect"
|
|
26318
|
-
]),
|
|
26374
|
+
]), Lo = {
|
|
26319
26375
|
"image-dimension": !0,
|
|
26320
26376
|
"image-pixels": !0,
|
|
26321
26377
|
"active-decoded-bytes": !0,
|
|
@@ -26328,41 +26384,41 @@ var Oo = new Set([
|
|
|
26328
26384
|
"metafile-record-rectangles": !0,
|
|
26329
26385
|
"metafile-record-text-units": !0
|
|
26330
26386
|
};
|
|
26331
|
-
function
|
|
26332
|
-
return typeof e == "string" && Object.prototype.hasOwnProperty.call(
|
|
26387
|
+
function Ro(e) {
|
|
26388
|
+
return typeof e == "string" && Object.prototype.hasOwnProperty.call(Lo, e);
|
|
26333
26389
|
}
|
|
26334
|
-
function
|
|
26390
|
+
function zo(e, t) {
|
|
26335
26391
|
if (e !== "ooxml-decoded-image-limit" || !t || typeof t != "object") return;
|
|
26336
26392
|
let n = t, r = n.metric, i = n.limit, a = n.observed;
|
|
26337
|
-
if (!(!
|
|
26393
|
+
if (!(!Ro(r) || !X(i) || !X(a) || a <= i)) return {
|
|
26338
26394
|
metric: r,
|
|
26339
26395
|
limit: i,
|
|
26340
26396
|
observed: a
|
|
26341
26397
|
};
|
|
26342
26398
|
}
|
|
26343
|
-
function
|
|
26344
|
-
let n = t.message, r = t.errorName, i = t.code, a = t.decodedImage, o = t.insufficientCredit, s = t.resourceLimit, c = t.unsupportedContent, l = typeof n == "string" ? n : "Worker operation failed with an invalid error payload", u =
|
|
26399
|
+
function Bo(t) {
|
|
26400
|
+
let n = t.message, r = t.errorName, i = t.code, a = t.decodedImage, o = t.insufficientCredit, s = t.resourceLimit, c = t.unsupportedContent, l = typeof n == "string" ? n : "Worker operation failed with an invalid error payload", u = go(r, co) ? r : void 0, d = typeof i == "string" ? i : void 0;
|
|
26345
26401
|
if (d === "unsupported-content") {
|
|
26346
|
-
let e =
|
|
26347
|
-
return e ?
|
|
26402
|
+
let e = Ao(c);
|
|
26403
|
+
return e ? jo(e) : /* @__PURE__ */ Error("Invalid unsupported-content error payload");
|
|
26348
26404
|
}
|
|
26349
|
-
let f =
|
|
26405
|
+
let f = zo(d, a);
|
|
26350
26406
|
if (f) return new k(f.metric, f.limit, f.observed);
|
|
26351
26407
|
if (d === "ooxml-tiff-decode") return new ue(l);
|
|
26352
|
-
if (d === "ooxml-insufficient-credit" &&
|
|
26353
|
-
if (d === "ooxml-resource-limit" &&
|
|
26354
|
-
if (d &&
|
|
26408
|
+
if (d === "ooxml-insufficient-credit" && $a(o)) return new eo(o);
|
|
26409
|
+
if (d === "ooxml-resource-limit" && Co(s)) return new x(l, s);
|
|
26410
|
+
if (d && Io.has(d)) return new e(d, l);
|
|
26355
26411
|
let p = u === "TypeError" ? TypeError(l) : u === "RangeError" ? RangeError(l) : Error(l);
|
|
26356
26412
|
return u && (p.name = u), d !== void 0 && Object.assign(p, { code: d }), p;
|
|
26357
26413
|
}
|
|
26358
|
-
function
|
|
26414
|
+
function Vo(e) {
|
|
26359
26415
|
try {
|
|
26360
|
-
return
|
|
26416
|
+
return Bo(e);
|
|
26361
26417
|
} catch {
|
|
26362
26418
|
return /* @__PURE__ */ Error("Worker operation failed with an unreadable error payload");
|
|
26363
26419
|
}
|
|
26364
26420
|
}
|
|
26365
|
-
var
|
|
26421
|
+
var Ho = class {
|
|
26366
26422
|
initialize;
|
|
26367
26423
|
reinitialize;
|
|
26368
26424
|
normalizeFailure;
|
|
@@ -26419,75 +26475,75 @@ var Po = class {
|
|
|
26419
26475
|
assertCurrent(e) {
|
|
26420
26476
|
if (this.state !== "ready" || e !== this.generationValue) throw Error("WASM archive session belongs to a discarded runtime generation");
|
|
26421
26477
|
}
|
|
26422
|
-
},
|
|
26478
|
+
}, Uo = class e extends Error {
|
|
26423
26479
|
code = "parser-crashed";
|
|
26424
26480
|
constructor(t) {
|
|
26425
26481
|
super(t), this.name = "WasmTrapError", Object.setPrototypeOf(this, e.prototype);
|
|
26426
26482
|
}
|
|
26427
26483
|
};
|
|
26428
|
-
function
|
|
26484
|
+
function Wo(e) {
|
|
26429
26485
|
let t = globalThis.WebAssembly?.RuntimeError;
|
|
26430
26486
|
return t && e instanceof t || e instanceof RangeError ? !0 : e instanceof Error ? e.name === "RuntimeError" || e.name === "CompileError" || e.name === "LinkError" || e.name === "InternalError" || e.name === "OOMError" : !1;
|
|
26431
26487
|
}
|
|
26432
|
-
function
|
|
26488
|
+
function Go(e) {
|
|
26433
26489
|
try {
|
|
26434
26490
|
if ((typeof e != "object" || !e) && typeof e != "function") return;
|
|
26435
26491
|
let t = Reflect.get(e, "__destroy_into_raw");
|
|
26436
26492
|
typeof t == "function" && Reflect.apply(t, e, []);
|
|
26437
26493
|
} catch {}
|
|
26438
26494
|
}
|
|
26439
|
-
var
|
|
26495
|
+
var Ko = Object.freeze({
|
|
26440
26496
|
maxArchiveEntryBytes: Ie,
|
|
26441
26497
|
maxTotalInflatedBytes: Le,
|
|
26442
26498
|
maxArchiveEntries: Re
|
|
26443
26499
|
});
|
|
26444
|
-
function
|
|
26500
|
+
function qo(e, t, n) {
|
|
26445
26501
|
if (t === void 0) return n;
|
|
26446
26502
|
if (t === null) return null;
|
|
26447
26503
|
if (!Number.isSafeInteger(t) || t <= 0) throw RangeError(`resourceLimits.${e} must be null or a positive safe integer number of bytes`);
|
|
26448
26504
|
return t;
|
|
26449
26505
|
}
|
|
26450
|
-
function
|
|
26451
|
-
if (e === void 0) return
|
|
26506
|
+
function Jo(e) {
|
|
26507
|
+
if (e === void 0) return Ko.maxArchiveEntries;
|
|
26452
26508
|
if (e === null) return null;
|
|
26453
26509
|
if (!Number.isSafeInteger(e) || e <= 0) throw RangeError("resourceLimits.maxArchiveEntries must be null or a positive safe integer");
|
|
26454
26510
|
if (e > 2e4) throw RangeError(`resourceLimits.maxArchiveEntries must not exceed the internal hard ceiling of ${ze}`);
|
|
26455
26511
|
return e;
|
|
26456
26512
|
}
|
|
26457
|
-
function
|
|
26513
|
+
function Yo(e) {
|
|
26458
26514
|
if (!(e === void 0 || !(e > 0))) {
|
|
26459
26515
|
if (!Number.isSafeInteger(e)) throw RangeError("maxZipEntryBytes must be a positive safe integer number of bytes");
|
|
26460
26516
|
return e;
|
|
26461
26517
|
}
|
|
26462
26518
|
}
|
|
26463
|
-
function
|
|
26519
|
+
function Xo(e) {
|
|
26464
26520
|
let t = e.resourceLimits;
|
|
26465
26521
|
if (t !== void 0 && (typeof t != "object" || !t || Array.isArray(t))) throw TypeError("resourceLimits must be an object when provided");
|
|
26466
|
-
let n =
|
|
26522
|
+
let n = Yo(e.maxZipEntryBytes), r = t?.maxArchiveEntryBytes;
|
|
26467
26523
|
if (n !== void 0 && r !== void 0 && n !== r) throw RangeError("maxZipEntryBytes conflicts with resourceLimits.maxArchiveEntryBytes");
|
|
26468
26524
|
return Object.freeze({
|
|
26469
|
-
maxArchiveEntryBytes:
|
|
26470
|
-
maxTotalInflatedBytes:
|
|
26471
|
-
maxArchiveEntries:
|
|
26525
|
+
maxArchiveEntryBytes: qo("maxArchiveEntryBytes", r === void 0 ? n : r, Ko.maxArchiveEntryBytes),
|
|
26526
|
+
maxTotalInflatedBytes: qo("maxTotalInflatedBytes", t?.maxTotalInflatedBytes, Ko.maxTotalInflatedBytes),
|
|
26527
|
+
maxArchiveEntries: Jo(t?.maxArchiveEntries)
|
|
26472
26528
|
});
|
|
26473
26529
|
}
|
|
26474
|
-
function
|
|
26530
|
+
function Zo(e) {
|
|
26475
26531
|
if (e.debug !== void 0 && typeof e.debug != "boolean") throw TypeError("debug must be a boolean when provided");
|
|
26476
26532
|
if (e.onResourceMetrics !== void 0 && typeof e.onResourceMetrics != "function") throw TypeError("onResourceMetrics must be a function when provided");
|
|
26477
26533
|
return Object.freeze({
|
|
26478
|
-
policy:
|
|
26534
|
+
policy: Xo(e),
|
|
26479
26535
|
debug: e.debug ?? !1,
|
|
26480
26536
|
...e.onResourceMetrics ? { onResourceMetrics: e.onResourceMetrics } : {}
|
|
26481
26537
|
});
|
|
26482
26538
|
}
|
|
26483
|
-
function
|
|
26539
|
+
function Qo(e) {
|
|
26484
26540
|
return [
|
|
26485
26541
|
e.maxArchiveEntryBytes === null ? 0n : BigInt(e.maxArchiveEntryBytes),
|
|
26486
26542
|
e.maxTotalInflatedBytes === null ? 0n : BigInt(e.maxTotalInflatedBytes),
|
|
26487
26543
|
e.maxArchiveEntries === null ? 0n : BigInt(e.maxArchiveEntries)
|
|
26488
26544
|
];
|
|
26489
26545
|
}
|
|
26490
|
-
var
|
|
26546
|
+
var $o = [
|
|
26491
26547
|
"font-family: \"SFMono-Regular\", Menlo, Monaco, Consolas, monospace",
|
|
26492
26548
|
"font-size: 12px",
|
|
26493
26549
|
"line-height: 1.35",
|
|
@@ -26495,27 +26551,27 @@ var Go = [
|
|
|
26495
26551
|
"letter-spacing: 0",
|
|
26496
26552
|
"white-space: pre"
|
|
26497
26553
|
].join(";");
|
|
26498
|
-
function
|
|
26499
|
-
if (
|
|
26500
|
-
console.log(`%c${e}`,
|
|
26554
|
+
function es(e) {
|
|
26555
|
+
if (ts()) {
|
|
26556
|
+
console.log(`%c${e}`, $o);
|
|
26501
26557
|
return;
|
|
26502
26558
|
}
|
|
26503
26559
|
console.log(e);
|
|
26504
26560
|
}
|
|
26505
|
-
function
|
|
26561
|
+
function ts() {
|
|
26506
26562
|
return typeof window < "u" && globalThis.process?.release?.name !== "node";
|
|
26507
26563
|
}
|
|
26508
|
-
function
|
|
26509
|
-
let t = e.scope === "session" ? "SESSION" : "LOAD", n = e.status === "ok" ? e.scope === "session" ? "COMPLETE" : "READY" : "FAILED", r = [
|
|
26510
|
-
if (r.push(Z(`mode ${e.mode.padEnd(8)} elapsed ${
|
|
26511
|
-
r.push(
|
|
26564
|
+
function ns(e) {
|
|
26565
|
+
let t = e.scope === "session" ? "SESSION" : "LOAD", n = e.status === "ok" ? e.scope === "session" ? "COMPLETE" : "READY" : "FAILED", r = [ss(` OOXML ${t} ${e.format.toUpperCase()} ${n} `, 68)];
|
|
26566
|
+
if (r.push(Z(`mode ${e.mode.padEnd(8)} elapsed ${as(e.elapsedMs)}`, 68)), e.sourceBytes !== void 0 && r.push(Z(`source ${is(e.sourceBytes)}`, 68)), r.push(cs(" admission ", 68)), r.push(ls("largest entry", e.usage?.largestInflatedEntryBytes, e.policy.maxArchiveEntryBytes, 68)), r.push(ls("total inflated", e.usage?.distinctInflatedBytes, e.policy.maxTotalInflatedBytes, 68)), r.push(Z(`entry count ${e.usage ? os(e.usage.archiveEntryCount) : "—"} / ${e.policy.maxArchiveEntries === null ? "public off" : os(e.policy.maxArchiveEntries)}`, 68)), e.usage ? r.push(Z(`declared inflated ${is(e.usage.declaredInflatedBytes)}`, 68)) : r.push(Z("usage unavailable for this report", 68)), e.checkpoints.length > 0) {
|
|
26567
|
+
r.push(cs(" checkpoints ", 68));
|
|
26512
26568
|
for (let t of e.checkpoints) {
|
|
26513
|
-
let e = t.usage ?
|
|
26514
|
-
r.push(Z(`${
|
|
26569
|
+
let e = t.usage ? is(t.usage.distinctInflatedBytes) : "—";
|
|
26570
|
+
r.push(Z(`${as(t.elapsedMs).padStart(8)} ${t.name.padEnd(25)} ${e.padStart(12)}`, 68));
|
|
26515
26571
|
}
|
|
26516
26572
|
}
|
|
26517
|
-
if (e.outcome && Object.keys(e.outcome).length > 0 && (r.push(
|
|
26518
|
-
r.push(
|
|
26573
|
+
if (e.outcome && Object.keys(e.outcome).length > 0 && (r.push(cs(" result ", 68)), r.push(Z(Object.entries(e.outcome).map(([e, t]) => `${e} ${os(t)}`).join(" "), 68))), e.error) {
|
|
26574
|
+
r.push(cs(" failure ", 68));
|
|
26519
26575
|
let t = [
|
|
26520
26576
|
e.error.code,
|
|
26521
26577
|
e.error.stage,
|
|
@@ -26526,10 +26582,10 @@ function Jo(e) {
|
|
|
26526
26582
|
}
|
|
26527
26583
|
return r.push(`└${"─".repeat(68)}┘`), r.join("\n");
|
|
26528
26584
|
}
|
|
26529
|
-
function
|
|
26530
|
-
|
|
26585
|
+
function rs(e) {
|
|
26586
|
+
es(ns(e));
|
|
26531
26587
|
}
|
|
26532
|
-
function
|
|
26588
|
+
function is(e) {
|
|
26533
26589
|
if (!Number.isFinite(e) || e < 0) return "—";
|
|
26534
26590
|
let t = [
|
|
26535
26591
|
"B",
|
|
@@ -26542,17 +26598,17 @@ function Xo(e) {
|
|
|
26542
26598
|
let i = r === 0 || n >= 100 ? 0 : n >= 10 ? 1 : 2;
|
|
26543
26599
|
return `${n.toFixed(i)} ${t[r]}`;
|
|
26544
26600
|
}
|
|
26545
|
-
function
|
|
26601
|
+
function as(e) {
|
|
26546
26602
|
return e < 1e3 ? `${Math.round(e)} ms` : `${(e / 1e3).toFixed(2)} s`;
|
|
26547
26603
|
}
|
|
26548
|
-
function
|
|
26604
|
+
function os(e) {
|
|
26549
26605
|
return Number.isSafeInteger(e) ? e.toLocaleString("en-US") : "—";
|
|
26550
26606
|
}
|
|
26551
|
-
function
|
|
26607
|
+
function ss(e, t) {
|
|
26552
26608
|
let n = e.slice(0, t);
|
|
26553
26609
|
return `┌${n}${"─".repeat(t - n.length)}┐`;
|
|
26554
26610
|
}
|
|
26555
|
-
function
|
|
26611
|
+
function cs(e, t) {
|
|
26556
26612
|
let n = e.slice(0, t);
|
|
26557
26613
|
return `├${n}${"─".repeat(t - n.length)}┤`;
|
|
26558
26614
|
}
|
|
@@ -26560,18 +26616,18 @@ function Z(e, t) {
|
|
|
26560
26616
|
let n = e.slice(0, t - 2);
|
|
26561
26617
|
return `│ ${n}${" ".repeat(t - n.length - 2)} │`;
|
|
26562
26618
|
}
|
|
26563
|
-
function
|
|
26564
|
-
let i = t === void 0 || n === null || n <= 0 ? 0 : Math.min(1, t / n), a = Math.round(i * 16), o = `${"█".repeat(a)}${"░".repeat(16 - a)}`, s = `${t === void 0 ? "—" :
|
|
26619
|
+
function ls(e, t, n, r) {
|
|
26620
|
+
let i = t === void 0 || n === null || n <= 0 ? 0 : Math.min(1, t / n), a = Math.round(i * 16), o = `${"█".repeat(a)}${"░".repeat(16 - a)}`, s = `${t === void 0 ? "—" : is(t)} / ${n === null ? "public off" : is(n)}`;
|
|
26565
26621
|
return Z(`${e.padEnd(14)} ${o} ${s}`, r);
|
|
26566
26622
|
}
|
|
26567
|
-
var
|
|
26568
|
-
async function
|
|
26569
|
-
e.observeUsage(await t(
|
|
26623
|
+
var us = 1e3;
|
|
26624
|
+
async function ds(e, t) {
|
|
26625
|
+
e.observeUsage(await t(us));
|
|
26570
26626
|
let n = e.current();
|
|
26571
26627
|
if (!n) throw Error("OOXML resource metrics are not ready");
|
|
26572
26628
|
return n;
|
|
26573
26629
|
}
|
|
26574
|
-
var
|
|
26630
|
+
var fs = class {
|
|
26575
26631
|
options;
|
|
26576
26632
|
now;
|
|
26577
26633
|
startedAt;
|
|
@@ -26586,7 +26642,7 @@ var is = class {
|
|
|
26586
26642
|
terminalOutcome;
|
|
26587
26643
|
terminalElapsedMs;
|
|
26588
26644
|
constructor(e) {
|
|
26589
|
-
this.options = e, this.now = e.now ??
|
|
26645
|
+
this.options = e, this.now = e.now ?? hs, this.startedAt = this.now(), this.policy = Object.freeze({
|
|
26590
26646
|
maxArchiveEntryBytes: e.policy.maxArchiveEntryBytes,
|
|
26591
26647
|
maxTotalInflatedBytes: e.policy.maxTotalInflatedBytes,
|
|
26592
26648
|
maxArchiveEntries: e.policy.maxArchiveEntries,
|
|
@@ -26601,16 +26657,16 @@ var is = class {
|
|
|
26601
26657
|
}
|
|
26602
26658
|
checkpoint(e, t) {
|
|
26603
26659
|
if (!this.options.enabled || this.finished) return;
|
|
26604
|
-
t && (this.lastUsage =
|
|
26660
|
+
t && (this.lastUsage = gs(t));
|
|
26605
26661
|
let n = this.lastUsage;
|
|
26606
26662
|
this.checkpoints.push(Object.freeze({
|
|
26607
|
-
name:
|
|
26608
|
-
elapsedMs:
|
|
26663
|
+
name: ys(e),
|
|
26664
|
+
elapsedMs: vs(this.startedAt, this.now()),
|
|
26609
26665
|
...n ? { usage: n } : {}
|
|
26610
26666
|
}));
|
|
26611
26667
|
}
|
|
26612
26668
|
observeUsage(e) {
|
|
26613
|
-
!this.options.enabled || !e || (this.lastUsage =
|
|
26669
|
+
!this.options.enabled || !e || (this.lastUsage = gs(e));
|
|
26614
26670
|
}
|
|
26615
26671
|
current() {
|
|
26616
26672
|
if (!(!this.options.enabled || !this.terminalStatus)) return this.report(this.terminalStatus, this.terminalError, this.terminalOutcome);
|
|
@@ -26623,12 +26679,12 @@ var is = class {
|
|
|
26623
26679
|
}
|
|
26624
26680
|
finish(e, t, n) {
|
|
26625
26681
|
if (!this.options.enabled || this.finished) return;
|
|
26626
|
-
this.finished = !0, this.terminalStatus = e, this.terminalError = t, this.terminalOutcome = n, this.terminalElapsedMs =
|
|
26682
|
+
this.finished = !0, this.terminalStatus = e, this.terminalError = t, this.terminalOutcome = n, this.terminalElapsedMs = vs(this.startedAt, this.now());
|
|
26627
26683
|
let r = this.report(e, t, n);
|
|
26628
|
-
return this.options.onMetrics &&
|
|
26684
|
+
return this.options.onMetrics && ps(this.options.onMetrics, r), (this.options.emitToConsole ?? this.options.onMetrics === void 0) && ps(rs, r), r;
|
|
26629
26685
|
}
|
|
26630
26686
|
report(e, t, n) {
|
|
26631
|
-
let r =
|
|
26687
|
+
let r = _s(t) ?? this.lastUsage;
|
|
26632
26688
|
return Object.freeze({
|
|
26633
26689
|
schemaVersion: 1,
|
|
26634
26690
|
scope: this.options.scope ?? "load",
|
|
@@ -26636,28 +26692,28 @@ var is = class {
|
|
|
26636
26692
|
mode: this.mode,
|
|
26637
26693
|
status: e,
|
|
26638
26694
|
...this.sourceBytes === void 0 ? {} : { sourceBytes: this.sourceBytes },
|
|
26639
|
-
elapsedMs: this.terminalElapsedMs ??
|
|
26695
|
+
elapsedMs: this.terminalElapsedMs ?? vs(this.startedAt, this.now()),
|
|
26640
26696
|
policy: this.policy,
|
|
26641
26697
|
...r ? { usage: r } : {},
|
|
26642
26698
|
checkpoints: Object.freeze([...this.checkpoints]),
|
|
26643
|
-
...n ? { outcome:
|
|
26644
|
-
...e === "error" ? { error:
|
|
26699
|
+
...n ? { outcome: bs(n) } : {},
|
|
26700
|
+
...e === "error" ? { error: xs(t) } : {}
|
|
26645
26701
|
});
|
|
26646
26702
|
}
|
|
26647
26703
|
};
|
|
26648
|
-
function
|
|
26704
|
+
function ps(e, t) {
|
|
26649
26705
|
try {
|
|
26650
26706
|
let n = e(t);
|
|
26651
|
-
|
|
26707
|
+
ms(n) && Promise.resolve(n).catch(() => void 0);
|
|
26652
26708
|
} catch {}
|
|
26653
26709
|
}
|
|
26654
|
-
function
|
|
26710
|
+
function ms(e) {
|
|
26655
26711
|
return (typeof e == "object" && !!e || typeof e == "function") && typeof e.then == "function";
|
|
26656
26712
|
}
|
|
26657
|
-
function
|
|
26713
|
+
function hs() {
|
|
26658
26714
|
return typeof performance > "u" ? Date.now() : performance.now();
|
|
26659
26715
|
}
|
|
26660
|
-
function
|
|
26716
|
+
function gs(e) {
|
|
26661
26717
|
return Object.freeze({
|
|
26662
26718
|
archiveEntryCount: e.archiveEntryCount,
|
|
26663
26719
|
declaredInflatedBytes: e.declaredInflatedBytes,
|
|
@@ -26666,23 +26722,23 @@ function cs(e) {
|
|
|
26666
26722
|
operationInflatedBytes: e.operationInflatedBytes
|
|
26667
26723
|
});
|
|
26668
26724
|
}
|
|
26669
|
-
function
|
|
26725
|
+
function _s(e) {
|
|
26670
26726
|
try {
|
|
26671
|
-
return e instanceof x ?
|
|
26727
|
+
return e instanceof x ? gs(e.details.violation.usage) : void 0;
|
|
26672
26728
|
} catch {
|
|
26673
26729
|
return;
|
|
26674
26730
|
}
|
|
26675
26731
|
}
|
|
26676
|
-
function
|
|
26732
|
+
function vs(e, t) {
|
|
26677
26733
|
return Math.max(0, Math.round((t - e) * 10) / 10);
|
|
26678
26734
|
}
|
|
26679
|
-
function
|
|
26735
|
+
function ys(e) {
|
|
26680
26736
|
return e.replace(/[^a-z0-9 -]/giu, "").trim().slice(0, 32) || "checkpoint";
|
|
26681
26737
|
}
|
|
26682
|
-
function
|
|
26738
|
+
function bs(e) {
|
|
26683
26739
|
return Object.freeze(Object.fromEntries(Object.entries(e).filter(([e, t]) => /^[a-z][a-z0-9-]{0,31}$/u.test(e) && Number.isSafeInteger(t) && t >= 0)));
|
|
26684
26740
|
}
|
|
26685
|
-
function
|
|
26741
|
+
function xs(t) {
|
|
26686
26742
|
try {
|
|
26687
26743
|
if (t instanceof x) {
|
|
26688
26744
|
let e = t.details.violation;
|
|
@@ -26694,18 +26750,18 @@ function ps(t) {
|
|
|
26694
26750
|
});
|
|
26695
26751
|
}
|
|
26696
26752
|
if (t instanceof e || t instanceof k) return Object.freeze({ code: t.code });
|
|
26697
|
-
if (t instanceof
|
|
26753
|
+
if (t instanceof Uo || typeof t == "object" && t && t.code === "parser-crashed") return Object.freeze({ code: "parser-crashed" });
|
|
26698
26754
|
} catch {}
|
|
26699
26755
|
return Object.freeze({});
|
|
26700
26756
|
}
|
|
26701
|
-
var
|
|
26757
|
+
var Ss = 1e3, Q = "ooxml-pull-v1";
|
|
26702
26758
|
function $(e, t) {
|
|
26703
26759
|
if (!Number.isSafeInteger(e) || e <= 0) throw RangeError(`${t} must be a positive safe integer`);
|
|
26704
26760
|
}
|
|
26705
|
-
function
|
|
26761
|
+
function Cs(e) {
|
|
26706
26762
|
if (!(typeof e == "string" && e.length > 0 || typeof e == "number" && Number.isSafeInteger(e) && e > 0)) throw RangeError("session id must be a non-empty string or positive safe integer");
|
|
26707
26763
|
}
|
|
26708
|
-
var
|
|
26764
|
+
var ws = class {
|
|
26709
26765
|
bridge;
|
|
26710
26766
|
options;
|
|
26711
26767
|
sequence = 0;
|
|
@@ -26718,7 +26774,7 @@ var gs = class {
|
|
|
26718
26774
|
orphanedRequestIds = /* @__PURE__ */ new Set();
|
|
26719
26775
|
transferDisposers = /* @__PURE__ */ new Set();
|
|
26720
26776
|
constructor(e, t) {
|
|
26721
|
-
|
|
26777
|
+
Cs(t.sessionId), $(t.operationId, "operation id"), $(t.generation, "generation"), $(t.maxByteCredit, "max byte credit"), t.cancelGraceMs !== void 0 && $(t.cancelGraceMs, "cancel grace"), this.bridge = e, this.options = t;
|
|
26722
26778
|
}
|
|
26723
26779
|
async pull(e, t) {
|
|
26724
26780
|
if (this.validateCredit(e), this.ending || this.completed) throw Error("pull session is closed");
|
|
@@ -26735,7 +26791,7 @@ var gs = class {
|
|
|
26735
26791
|
sequence: n,
|
|
26736
26792
|
byteCredit: e
|
|
26737
26793
|
}), t);
|
|
26738
|
-
if (this.validateResponseIdentity(r), r.usage && (this.usage = r.usage), r.kind === "error") throw
|
|
26794
|
+
if (this.validateResponseIdentity(r), r.usage && (this.usage = r.usage), r.kind === "error") throw Vo(r.error);
|
|
26739
26795
|
if (r.kind !== "chunk") throw Error(`expected chunk response, received ${r.kind}`);
|
|
26740
26796
|
if (this.ending) throw this.disposePayload(r.payload), Error("pull session is closed");
|
|
26741
26797
|
try {
|
|
@@ -26745,7 +26801,7 @@ var gs = class {
|
|
|
26745
26801
|
}
|
|
26746
26802
|
return this.outstanding = !0, this.makeChunk(r);
|
|
26747
26803
|
} catch (e) {
|
|
26748
|
-
throw !
|
|
26804
|
+
throw !ao(e) && !this.ending && !this.completed && this.cancel("protocol-error").catch(() => void 0), e;
|
|
26749
26805
|
} finally {
|
|
26750
26806
|
this.pulling = !1;
|
|
26751
26807
|
}
|
|
@@ -26811,7 +26867,7 @@ var gs = class {
|
|
|
26811
26867
|
this.forgetLifecycleOrphans();
|
|
26812
26868
|
return;
|
|
26813
26869
|
}
|
|
26814
|
-
throw
|
|
26870
|
+
throw Vo(r.error);
|
|
26815
26871
|
}
|
|
26816
26872
|
if (r.kind !== "accepted" || r.command !== e) throw Error(`expected ${e} acceptance`);
|
|
26817
26873
|
(e === "cancel" || e === "close") && this.forgetLifecycleOrphans();
|
|
@@ -26856,7 +26912,7 @@ var gs = class {
|
|
|
26856
26912
|
for (let e of [...this.transferDisposers]) e();
|
|
26857
26913
|
}
|
|
26858
26914
|
lifecycleControl(e) {
|
|
26859
|
-
let t = this.options.cancelGraceMs ??
|
|
26915
|
+
let t = this.options.cancelGraceMs ?? Ss, n, r = new Promise((e, r) => {
|
|
26860
26916
|
n = setTimeout(() => {
|
|
26861
26917
|
this.bridge.terminate(), r(/* @__PURE__ */ Error(`worker did not accept lifecycle command within ${t}ms`));
|
|
26862
26918
|
}, t);
|
|
@@ -26875,7 +26931,7 @@ var gs = class {
|
|
|
26875
26931
|
this.options.disposeTransferred?.(e);
|
|
26876
26932
|
} catch {}
|
|
26877
26933
|
}
|
|
26878
|
-
},
|
|
26934
|
+
}, Ts = class {
|
|
26879
26935
|
owner;
|
|
26880
26936
|
queue = Promise.resolve();
|
|
26881
26937
|
leases = /* @__PURE__ */ new Map();
|
|
@@ -26932,7 +26988,7 @@ var gs = class {
|
|
|
26932
26988
|
}
|
|
26933
26989
|
return this.fatal;
|
|
26934
26990
|
}
|
|
26935
|
-
},
|
|
26991
|
+
}, Es = class {
|
|
26936
26992
|
options;
|
|
26937
26993
|
coordinator;
|
|
26938
26994
|
coordinatorOwner = Symbol("pull-session-host");
|
|
@@ -26950,7 +27006,7 @@ var gs = class {
|
|
|
26950
27006
|
driverCloseComplete = !1;
|
|
26951
27007
|
completed = !1;
|
|
26952
27008
|
constructor(e) {
|
|
26953
|
-
|
|
27009
|
+
Cs(e.sessionId), $(e.operationId, "operation id"), $(e.generation, "generation"), $(e.maxByteCredit, "max byte credit"), e.wireLeaseIdStart !== void 0 && $(e.wireLeaseIdStart, "wire lease id start"), this.options = e, this.coordinator = e.coordinator, this.nextWireLeaseId = e.wireLeaseIdStart ?? 1, this.unregisterCleanup = this.coordinator.registerCleanup(() => this.forceFatalCleanup());
|
|
26954
27010
|
}
|
|
26955
27011
|
dispatch(e, t) {
|
|
26956
27012
|
return this.coordinator.enqueue(async () => {
|
|
@@ -27009,7 +27065,7 @@ var gs = class {
|
|
|
27009
27065
|
case "close": return await this.close(), { response: this.accepted(e, "close") };
|
|
27010
27066
|
}
|
|
27011
27067
|
} catch (t) {
|
|
27012
|
-
let n =
|
|
27068
|
+
let n = Fo(t);
|
|
27013
27069
|
return n.code === "ooxml-resource-limit" && (n = await this.coordinator.poison(n)), { response: this.errorResponse(e, n) };
|
|
27014
27070
|
}
|
|
27015
27071
|
}
|
|
@@ -27219,27 +27275,27 @@ var gs = class {
|
|
|
27219
27275
|
return;
|
|
27220
27276
|
}
|
|
27221
27277
|
}
|
|
27222
|
-
},
|
|
27223
|
-
function
|
|
27278
|
+
}, Ds = "”’)〕]}〉》」』】〙〗〟⦆»、。,.・:;/?!‐ー゠–〜~ぁぃぅぇぉっゃゅょゎゕゖァィゥェォッャュョヮヵヶㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ゝゞヽヾ゛゜%‰℃°′″。」、・ー゙゚!),.:;?]}⦆", Os = "“‘(〔[{〈《「『【〘〖〝⦅«$¥#£¢([{⦅";
|
|
27279
|
+
function ks(e) {
|
|
27224
27280
|
let t = /* @__PURE__ */ new Set();
|
|
27225
27281
|
for (let n of e) t.add(n.codePointAt(0));
|
|
27226
27282
|
return t;
|
|
27227
27283
|
}
|
|
27228
|
-
function
|
|
27284
|
+
function As(e) {
|
|
27229
27285
|
return {
|
|
27230
27286
|
enabled: e?.kinsoku !== !1,
|
|
27231
|
-
lineStartForbidden:
|
|
27232
|
-
lineEndForbidden:
|
|
27287
|
+
lineStartForbidden: ks(e?.noLineBreaksBefore ?? Ds),
|
|
27288
|
+
lineEndForbidden: ks(e?.noLineBreaksAfter ?? Os)
|
|
27233
27289
|
};
|
|
27234
27290
|
}
|
|
27235
|
-
var
|
|
27236
|
-
function
|
|
27291
|
+
var js = As();
|
|
27292
|
+
function Ms(e, t, n, r = 1) {
|
|
27237
27293
|
if (!n.enabled || t <= 0 || t >= e.length) return t;
|
|
27238
27294
|
let i = (t) => t < e.length && n.lineStartForbidden.has(e[t].codePointAt(0)), a = (t) => t >= 0 && n.lineEndForbidden.has(e[t].codePointAt(0)), o = t;
|
|
27239
27295
|
for (; o > r && (i(o) || a(o - 1));) o--;
|
|
27240
27296
|
return o <= r && (i(o) || a(o - 1)) ? t : o;
|
|
27241
27297
|
}
|
|
27242
|
-
function
|
|
27298
|
+
function Ns(e, t, n) {
|
|
27243
27299
|
if (!t.enabled) return 0;
|
|
27244
27300
|
let r = e.length - n;
|
|
27245
27301
|
for (let n = 1; n <= r; n++) {
|
|
@@ -27250,7 +27306,7 @@ function Ts(e, t, n) {
|
|
|
27250
27306
|
}
|
|
27251
27307
|
return 0;
|
|
27252
27308
|
}
|
|
27253
|
-
var
|
|
27309
|
+
var Ps = /* @__PURE__ */ "BK.CM.CR.GL.LF.NL.SP.WJ.ZW.ZWJ.AK.AL.AP.AS.B2.BA.BB.CB.CL.CP.EB.EM.EX.H2.H3.HL.HH.HY.ID.IN.IS.JL.JT.JV.NS.NU.OP.PO.PR.QU.RI.SY.VF.VI".split("."), Fs = [
|
|
27254
27310
|
0,
|
|
27255
27311
|
9,
|
|
27256
27312
|
10,
|
|
@@ -29873,7 +29929,7 @@ var Es = /* @__PURE__ */ "BK.CM.CR.GL.LF.NL.SP.WJ.ZW.ZWJ.AK.AL.AP.AS.B2.BA.BB.CB
|
|
|
29873
29929
|
917632,
|
|
29874
29930
|
917760,
|
|
29875
29931
|
918e3
|
|
29876
|
-
],
|
|
29932
|
+
], Is = [
|
|
29877
29933
|
1,
|
|
29878
29934
|
15,
|
|
29879
29935
|
4,
|
|
@@ -32496,7 +32552,7 @@ var Es = /* @__PURE__ */ "BK.CM.CR.GL.LF.NL.SP.WJ.ZW.ZWJ.AK.AL.AP.AS.B2.BA.BB.CB
|
|
|
32496
32552
|
11,
|
|
32497
32553
|
1,
|
|
32498
32554
|
11
|
|
32499
|
-
],
|
|
32555
|
+
], Ls = [
|
|
32500
32556
|
4352,
|
|
32501
32557
|
8361,
|
|
32502
32558
|
8986,
|
|
@@ -32626,7 +32682,7 @@ var Es = /* @__PURE__ */ "BK.CM.CR.GL.LF.NL.SP.WJ.ZW.ZWJ.AK.AL.AP.AS.B2.BA.BB.CB
|
|
|
32626
32682
|
129775,
|
|
32627
32683
|
131072,
|
|
32628
32684
|
196608
|
|
32629
|
-
],
|
|
32685
|
+
], Rs = [
|
|
32630
32686
|
4448,
|
|
32631
32687
|
8362,
|
|
32632
32688
|
8988,
|
|
@@ -32757,35 +32813,35 @@ var Es = /* @__PURE__ */ "BK.CM.CR.GL.LF.NL.SP.WJ.ZW.ZWJ.AK.AL.AP.AS.B2.BA.BB.CB
|
|
|
32757
32813
|
196606,
|
|
32758
32814
|
262142
|
|
32759
32815
|
];
|
|
32760
|
-
function
|
|
32761
|
-
let t = 0, n =
|
|
32816
|
+
function zs(e) {
|
|
32817
|
+
let t = 0, n = Fs.length - 1;
|
|
32762
32818
|
for (; t < n;) {
|
|
32763
32819
|
let r = t + n + 1 >> 1;
|
|
32764
|
-
|
|
32820
|
+
Fs[r] <= e ? t = r : n = r - 1;
|
|
32765
32821
|
}
|
|
32766
|
-
return
|
|
32822
|
+
return Ps[Is[t]];
|
|
32767
32823
|
}
|
|
32768
|
-
function
|
|
32769
|
-
let t = 0, n =
|
|
32770
|
-
if (n < 0 || e <
|
|
32824
|
+
function Bs(e) {
|
|
32825
|
+
let t = 0, n = Ls.length - 1;
|
|
32826
|
+
if (n < 0 || e < Ls[0]) return !1;
|
|
32771
32827
|
for (; t < n;) {
|
|
32772
32828
|
let r = t + n + 1 >> 1;
|
|
32773
|
-
|
|
32829
|
+
Ls[r] <= e ? t = r : n = r - 1;
|
|
32774
32830
|
}
|
|
32775
|
-
return e <
|
|
32831
|
+
return e < Rs[t];
|
|
32776
32832
|
}
|
|
32777
|
-
function
|
|
32778
|
-
let n =
|
|
32833
|
+
function Vs(e, t) {
|
|
32834
|
+
let n = zs(e);
|
|
32779
32835
|
if (n === "OP") return !0;
|
|
32780
|
-
let r =
|
|
32781
|
-
return !!(i && (a || r === "NU" || r === "PR" || r === "PO") || a && (n === "NU" || n === "PR" || n === "PO") || n === "PR" && (r === "ID" || r === "EB" || r === "EM") || (n === "ID" || n === "EB" || n === "EM") && r === "PO" || n === "NU" && (r === "NU" || r === "PO" || r === "PR") || r === "NU" && (n === "PO" || n === "PR" || n === "HY" || n === "IS") || (i || n === "NU") && r === "OP" && !
|
|
32836
|
+
let r = zs(t), i = n === "AL" || n === "HL", a = r === "AL" || r === "HL";
|
|
32837
|
+
return !!(i && (a || r === "NU" || r === "PR" || r === "PO") || a && (n === "NU" || n === "PR" || n === "PO") || n === "PR" && (r === "ID" || r === "EB" || r === "EM") || (n === "ID" || n === "EB" || n === "EM") && r === "PO" || n === "NU" && (r === "NU" || r === "PO" || r === "PR") || r === "NU" && (n === "PO" || n === "PR" || n === "HY" || n === "IS") || (i || n === "NU") && r === "OP" && !Bs(t) || n === "CP" && !Bs(e) && (a || r === "NU"));
|
|
32782
32838
|
}
|
|
32783
|
-
var
|
|
32839
|
+
var Hs = [
|
|
32784
32840
|
"U",
|
|
32785
32841
|
"R",
|
|
32786
32842
|
"Tu",
|
|
32787
32843
|
"Tr"
|
|
32788
|
-
],
|
|
32844
|
+
], Us = [
|
|
32789
32845
|
0,
|
|
32790
32846
|
167,
|
|
32791
32847
|
168,
|
|
@@ -33066,7 +33122,7 @@ var Ps = [
|
|
|
33066
33122
|
1048574,
|
|
33067
33123
|
1048576,
|
|
33068
33124
|
1114110
|
|
33069
|
-
],
|
|
33125
|
+
], Ws = [
|
|
33070
33126
|
1,
|
|
33071
33127
|
0,
|
|
33072
33128
|
1,
|
|
@@ -33348,29 +33404,29 @@ var Ps = [
|
|
|
33348
33404
|
0,
|
|
33349
33405
|
1
|
|
33350
33406
|
];
|
|
33351
|
-
function
|
|
33352
|
-
let t = 0, n =
|
|
33407
|
+
function Gs(e) {
|
|
33408
|
+
let t = 0, n = Us.length - 1;
|
|
33353
33409
|
for (; t < n;) {
|
|
33354
33410
|
let r = t + n + 1 >> 1;
|
|
33355
|
-
|
|
33411
|
+
Us[r] <= e ? t = r : n = r - 1;
|
|
33356
33412
|
}
|
|
33357
|
-
return
|
|
33413
|
+
return Ws[t];
|
|
33358
33414
|
}
|
|
33359
|
-
function
|
|
33360
|
-
return
|
|
33415
|
+
function Ks(e) {
|
|
33416
|
+
return Hs[Gs(e)];
|
|
33361
33417
|
}
|
|
33362
|
-
function
|
|
33363
|
-
return
|
|
33418
|
+
function qs(e) {
|
|
33419
|
+
return Js.get(e) ?? null;
|
|
33364
33420
|
}
|
|
33365
|
-
var
|
|
33421
|
+
var Js = new Map([
|
|
33366
33422
|
[65292, 65040],
|
|
33367
33423
|
[12289, 65041],
|
|
33368
33424
|
[12290, 65042]
|
|
33369
33425
|
]);
|
|
33370
|
-
function
|
|
33371
|
-
return
|
|
33426
|
+
function Ys(e) {
|
|
33427
|
+
return Xs.get(e) ?? null;
|
|
33372
33428
|
}
|
|
33373
|
-
var
|
|
33429
|
+
var Xs = new Map([
|
|
33374
33430
|
[65288, 65077],
|
|
33375
33431
|
[65289, 65078],
|
|
33376
33432
|
[65371, 65079],
|
|
@@ -33389,38 +33445,38 @@ var Hs = new Map([
|
|
|
33389
33445
|
[12303, 65092],
|
|
33390
33446
|
[12310, 65047],
|
|
33391
33447
|
[12311, 65048]
|
|
33392
|
-
]),
|
|
33393
|
-
function
|
|
33394
|
-
return
|
|
33448
|
+
]), Zs = new Set([65307]);
|
|
33449
|
+
function Qs(e) {
|
|
33450
|
+
return Zs.has(e);
|
|
33395
33451
|
}
|
|
33396
|
-
var
|
|
33452
|
+
var $s = new Set([
|
|
33397
33453
|
12540,
|
|
33398
33454
|
12316,
|
|
33399
33455
|
65374
|
|
33400
33456
|
]);
|
|
33401
|
-
function
|
|
33402
|
-
return
|
|
33457
|
+
function ec(e) {
|
|
33458
|
+
return $s.has(e);
|
|
33403
33459
|
}
|
|
33404
|
-
var
|
|
33405
|
-
function
|
|
33460
|
+
var tc = 256, nc = 200, rc = /* @__PURE__ */ new WeakMap();
|
|
33461
|
+
function ic(e) {
|
|
33406
33462
|
let t = e.canvas, n = t?.ownerDocument?.defaultView?.HTMLCanvasElement;
|
|
33407
33463
|
return typeof n == "function" && t instanceof n || typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement ? t : null;
|
|
33408
33464
|
}
|
|
33409
|
-
function
|
|
33465
|
+
function ac(e, t) {
|
|
33410
33466
|
return e.replace(/(^|\s)\d*\.?\d+(?:px|pt|pc|in|cm|mm|q|em|rem|%)(?:\/[^\s]+)?(?=\s)/i, `$1${t}`);
|
|
33411
33467
|
}
|
|
33412
|
-
function
|
|
33468
|
+
function oc(e, t = !0) {
|
|
33413
33469
|
let n = e.trim();
|
|
33414
33470
|
return [...n === "" || n.toLowerCase() === "normal" ? [] : n.split(",").map((e) => e.trim()).filter((e) => !/^(["'])vert\1(?:\s+(?:on|off|\d+))?$/i.test(e)), `"vert" ${+!!t}`].join(", ");
|
|
33415
33471
|
}
|
|
33416
|
-
function
|
|
33472
|
+
function sc(e) {
|
|
33417
33473
|
try {
|
|
33418
33474
|
let t = e.ownerDocument?.defaultView, n = t?.getComputedStyle ? t.getComputedStyle(e) : typeof getComputedStyle == "function" ? getComputedStyle(e) : null;
|
|
33419
33475
|
if (n?.fontFeatureSettings) return n.fontFeatureSettings;
|
|
33420
33476
|
} catch {}
|
|
33421
33477
|
return e.style.fontFeatureSettings;
|
|
33422
33478
|
}
|
|
33423
|
-
function
|
|
33479
|
+
function cc(e, t) {
|
|
33424
33480
|
if (e.isConnected) return t();
|
|
33425
33481
|
let n = e.ownerDocument ?? (typeof document > "u" ? null : document), r = n?.body ?? n?.documentElement;
|
|
33426
33482
|
if (!r) return t();
|
|
@@ -33461,15 +33517,15 @@ function ec(e, t) {
|
|
|
33461
33517
|
if (t !== void 0 && !c) throw t;
|
|
33462
33518
|
}
|
|
33463
33519
|
}
|
|
33464
|
-
function
|
|
33465
|
-
let n =
|
|
33466
|
-
return n === null ? t() :
|
|
33520
|
+
function lc(e, t) {
|
|
33521
|
+
let n = ic(e);
|
|
33522
|
+
return n === null ? t() : cc(n, t);
|
|
33467
33523
|
}
|
|
33468
|
-
function
|
|
33469
|
-
let t =
|
|
33524
|
+
function uc(e) {
|
|
33525
|
+
let t = rc.get(e);
|
|
33470
33526
|
if (t) return t;
|
|
33471
33527
|
let n = e.createElement("canvas");
|
|
33472
|
-
n.width =
|
|
33528
|
+
n.width = tc, n.height = tc, n.setAttribute("aria-hidden", "true"), Object.assign(n.style, {
|
|
33473
33529
|
position: "fixed",
|
|
33474
33530
|
left: "-99999px",
|
|
33475
33531
|
top: "0",
|
|
@@ -33483,9 +33539,9 @@ function nc(e) {
|
|
|
33483
33539
|
}, i = () => {
|
|
33484
33540
|
r.epoch += 1, r.cache.clear();
|
|
33485
33541
|
};
|
|
33486
|
-
return e.fonts?.addEventListener?.("loadingdone", i), e.fonts?.addEventListener?.("loadingerror", i),
|
|
33542
|
+
return e.fonts?.addEventListener?.("loadingdone", i), e.fonts?.addEventListener?.("loadingerror", i), rc.set(e, r), r;
|
|
33487
33543
|
}
|
|
33488
|
-
function
|
|
33544
|
+
function dc(e, t) {
|
|
33489
33545
|
let { width: n, height: r } = e.canvas, i = e.getImageData(0, 0, n, r).data, a = new Uint8ClampedArray(n * r), o = n, s = r, c = -1, l = -1, u = 0, d = 0, f = 0;
|
|
33490
33546
|
for (let e = 0; e < r; e += 1) for (let t = 0; t < n; t += 1) {
|
|
33491
33547
|
let r = i[(e * n + t) * 4 + 3];
|
|
@@ -33512,28 +33568,28 @@ function rc(e, t) {
|
|
|
33512
33568
|
]
|
|
33513
33569
|
};
|
|
33514
33570
|
}
|
|
33515
|
-
function
|
|
33571
|
+
function fc(e, t, n) {
|
|
33516
33572
|
let r = e.canvas;
|
|
33517
33573
|
r.style.fontFeatureSettings = n, e.font = e.font, e.clearRect(0, 0, r.width, r.height);
|
|
33518
33574
|
let i = String.fromCodePoint(t);
|
|
33519
|
-
return e.fillText(i, r.width / 2, r.height / 2),
|
|
33575
|
+
return e.fillText(i, r.width / 2, r.height / 2), dc(e, i);
|
|
33520
33576
|
}
|
|
33521
|
-
function
|
|
33577
|
+
function pc(e, t) {
|
|
33522
33578
|
let n = 0, r = Math.min(e.length, t.length);
|
|
33523
33579
|
for (let i = 0; i < r; i += 1) n += Math.abs(e[i] - t[i]);
|
|
33524
33580
|
return n;
|
|
33525
33581
|
}
|
|
33526
|
-
function
|
|
33582
|
+
function mc(e, t, n, r) {
|
|
33527
33583
|
let i = (e, t, n, r) => {
|
|
33528
|
-
let i = Math.max(
|
|
33529
|
-
return Math.min(
|
|
33584
|
+
let i = Math.max(pc(e, t), pc(n, r));
|
|
33585
|
+
return Math.min(pc(e, n), pc(e, r), pc(t, n), pc(t, r)) > i;
|
|
33530
33586
|
};
|
|
33531
33587
|
return i(e.alpha, t.alpha, n.alpha, r.alpha) || i(e.geometry, t.geometry, n.geometry, r.geometry) || i(e.metrics, t.metrics, n.metrics, r.metrics);
|
|
33532
33588
|
}
|
|
33533
|
-
function
|
|
33534
|
-
let n =
|
|
33589
|
+
function hc(e, t) {
|
|
33590
|
+
let n = ic(e);
|
|
33535
33591
|
if (n === null || typeof document > "u") return !1;
|
|
33536
|
-
let r = n.ownerDocument ?? document, i =
|
|
33592
|
+
let r = n.ownerDocument ?? document, i = uc(r), a = sc(n), o = `${i.epoch}:${ac(e.font, "<size>")}:${a}:${t}`, s = i.cache.get(o);
|
|
33537
33593
|
if (s !== void 0) return s;
|
|
33538
33594
|
let c = !1, l = r.body ?? r.documentElement;
|
|
33539
33595
|
if (!l) return !1;
|
|
@@ -33543,9 +33599,9 @@ function sc(e, t) {
|
|
|
33543
33599
|
if (d !== null) {
|
|
33544
33600
|
let n = i.canvas.style.fontFeatureSettings;
|
|
33545
33601
|
try {
|
|
33546
|
-
d.font =
|
|
33547
|
-
let n =
|
|
33548
|
-
c = i !== null && o !== null && s !== null && l !== null &&
|
|
33602
|
+
d.font = ac(e.font, `${nc}px`), d.fillStyle = "#000", d.textAlign = "center", d.textBaseline = "middle";
|
|
33603
|
+
let n = oc(a, !1), r = oc(a, !0), i = fc(d, t, n), o = fc(d, t, n), s = fc(d, t, r), l = fc(d, t, r);
|
|
33604
|
+
c = i !== null && o !== null && s !== null && l !== null && mc(i, o, s, l);
|
|
33549
33605
|
} catch {
|
|
33550
33606
|
c = !1;
|
|
33551
33607
|
} finally {
|
|
@@ -33554,11 +33610,11 @@ function sc(e, t) {
|
|
|
33554
33610
|
}
|
|
33555
33611
|
return i.cache.set(o, c), c;
|
|
33556
33612
|
}
|
|
33557
|
-
function
|
|
33613
|
+
function gc(e, t) {
|
|
33558
33614
|
let n = e.canvas;
|
|
33559
|
-
return n?.style ?
|
|
33615
|
+
return n?.style ? lc(e, () => {
|
|
33560
33616
|
let r = n.style, i = r.fontFeatureSettings;
|
|
33561
|
-
r.fontFeatureSettings =
|
|
33617
|
+
r.fontFeatureSettings = oc(sc(n)), e.font = e.font;
|
|
33562
33618
|
try {
|
|
33563
33619
|
return t();
|
|
33564
33620
|
} finally {
|
|
@@ -33566,8 +33622,8 @@ function cc(e, t) {
|
|
|
33566
33622
|
}
|
|
33567
33623
|
}) : t();
|
|
33568
33624
|
}
|
|
33569
|
-
function
|
|
33570
|
-
return
|
|
33625
|
+
function _c(e, t) {
|
|
33626
|
+
return gc(e, () => {
|
|
33571
33627
|
let n = e.textAlign, r = e.textBaseline;
|
|
33572
33628
|
e.textAlign = "center", e.textBaseline = "middle";
|
|
33573
33629
|
try {
|
|
@@ -33584,13 +33640,13 @@ function lc(e, t) {
|
|
|
33584
33640
|
}
|
|
33585
33641
|
});
|
|
33586
33642
|
}
|
|
33587
|
-
var
|
|
33643
|
+
var vc = [
|
|
33588
33644
|
"http",
|
|
33589
33645
|
"https",
|
|
33590
33646
|
"mailto",
|
|
33591
33647
|
"tel"
|
|
33592
33648
|
];
|
|
33593
|
-
function
|
|
33649
|
+
function yc(e) {
|
|
33594
33650
|
let t = "";
|
|
33595
33651
|
for (let n of e) {
|
|
33596
33652
|
let e = n.codePointAt(0);
|
|
@@ -33599,28 +33655,28 @@ function dc(e) {
|
|
|
33599
33655
|
let n = /^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(t);
|
|
33600
33656
|
return n ? n[1].toLowerCase() : null;
|
|
33601
33657
|
}
|
|
33602
|
-
function
|
|
33658
|
+
function bc(e, t = vc) {
|
|
33603
33659
|
if (e === "") return null;
|
|
33604
|
-
let n =
|
|
33660
|
+
let n = yc(e);
|
|
33605
33661
|
return n === null || t.includes(n) ? e : null;
|
|
33606
33662
|
}
|
|
33607
|
-
function
|
|
33608
|
-
let r =
|
|
33663
|
+
function xc(e, t = vc, n = typeof window < "u" ? window : void 0) {
|
|
33664
|
+
let r = bc(e, t);
|
|
33609
33665
|
return r === null || !n ? !1 : (n.open(r, "_blank", "noopener,noreferrer"), !0);
|
|
33610
33666
|
}
|
|
33611
|
-
var
|
|
33612
|
-
function
|
|
33667
|
+
var Sc = 1.3;
|
|
33668
|
+
function Cc(e, t) {
|
|
33613
33669
|
if (e == null || t == null || !Number.isFinite(e) || !Number.isFinite(t) || e < 0 || t < 0 || e + t <= 0) return null;
|
|
33614
|
-
let n = (
|
|
33670
|
+
let n = (Sc - 1) / 2 * (e + t);
|
|
33615
33671
|
return {
|
|
33616
33672
|
ascent: e + n,
|
|
33617
33673
|
descent: t + n
|
|
33618
33674
|
};
|
|
33619
33675
|
}
|
|
33620
|
-
function
|
|
33676
|
+
function wc(e) {
|
|
33621
33677
|
let { unitsPerEm: t, hheaAscent: n, hheaDescent: r, hheaLineGap: i, farEastCodePage: a } = e;
|
|
33622
33678
|
if (!(Number.isFinite(t) && t > 0 && Number.isFinite(n) && n >= 0 && Number.isFinite(r) && r <= 0 && Number.isFinite(i)) || !(n - r > 0)) return null;
|
|
33623
|
-
let o = a ?
|
|
33679
|
+
let o = a ? Cc(e.winAscent, e.winDescent) : {
|
|
33624
33680
|
ascent: n + i,
|
|
33625
33681
|
descent: -r
|
|
33626
33682
|
};
|
|
@@ -33632,7 +33688,7 @@ function gc(e) {
|
|
|
33632
33688
|
designDescentRatio: c / t
|
|
33633
33689
|
}) : null;
|
|
33634
33690
|
}
|
|
33635
|
-
function
|
|
33691
|
+
function Tc(e) {
|
|
33636
33692
|
let { faceSource: t, unitsPerEm: n, hhea: r, win: i, typoMetrics: a, farEastCodePage: o } = e, s = [
|
|
33637
33693
|
n,
|
|
33638
33694
|
...r,
|
|
@@ -33645,7 +33701,7 @@ function _c(e) {
|
|
|
33645
33701
|
if (o) return null;
|
|
33646
33702
|
p = c + Math.max(0, u), m = -l;
|
|
33647
33703
|
} else if (o) {
|
|
33648
|
-
let e =
|
|
33704
|
+
let e = Cc(d, f);
|
|
33649
33705
|
if (!e) return null;
|
|
33650
33706
|
({ascent: p, descent: m} = e);
|
|
33651
33707
|
} else if (a) p = a[0] + Math.max(0, a[2]), m = -a[1];
|
|
@@ -33658,15 +33714,15 @@ function _c(e) {
|
|
|
33658
33714
|
descentRatio: m / n
|
|
33659
33715
|
}) : null;
|
|
33660
33716
|
}
|
|
33661
|
-
var
|
|
33717
|
+
var Ec = (e) => {
|
|
33662
33718
|
let t = e.text;
|
|
33663
33719
|
return typeof t == "string" ? t : void 0;
|
|
33664
33720
|
};
|
|
33665
|
-
function
|
|
33721
|
+
function Dc(e, t, n, r) {
|
|
33666
33722
|
let i = e.charCodeAt(0);
|
|
33667
33723
|
return t && i >= 48 && i <= 57 ? "AN" : n && r.isRtlAmbiguous?.(e) ? "R" : void 0;
|
|
33668
33724
|
}
|
|
33669
|
-
function
|
|
33725
|
+
function Oc(e, t, n) {
|
|
33670
33726
|
if (!t || !n.directionFromAnyOdd) return;
|
|
33671
33727
|
let i = r();
|
|
33672
33728
|
if (!f(i)) return;
|
|
@@ -33705,7 +33761,7 @@ function bc(e, t, n) {
|
|
|
33705
33761
|
default: return;
|
|
33706
33762
|
}
|
|
33707
33763
|
if (p(m)) return;
|
|
33708
|
-
let g =
|
|
33764
|
+
let g = Dc(e[f], t, r, n);
|
|
33709
33765
|
if (a && h === "CS" && g === "R") return;
|
|
33710
33766
|
let _ = g ?? h;
|
|
33711
33767
|
l ??= _, f < i && (d = _), (h === "L" || _ === "L") && (s = !1), (_ === "R" || _ === "AL" || _ === "AN") && (c = !1), f < i && (_ === "R" || _ === "AL") && (o = !0), f += m > 65535 ? 2 : 1;
|
|
@@ -33716,7 +33772,7 @@ function bc(e, t, n) {
|
|
|
33716
33772
|
};
|
|
33717
33773
|
for (let t of e) {
|
|
33718
33774
|
if (typeof t != "object" || !t) return;
|
|
33719
|
-
let e = n.isolateDirection?.(t), r =
|
|
33775
|
+
let e = n.isolateDirection?.(t), r = Ec(t);
|
|
33720
33776
|
if (n.isTab?.(t) === !0) {
|
|
33721
33777
|
if (e !== void 0 && e !== "rtl" || r !== void 0 && r.length !== 0) return;
|
|
33722
33778
|
o[c.length] = 3, c.push(!0), m = void 0, v = void 0;
|
|
@@ -33751,28 +33807,28 @@ function bc(e, t, n) {
|
|
|
33751
33807
|
rtl: c
|
|
33752
33808
|
};
|
|
33753
33809
|
}
|
|
33754
|
-
function
|
|
33755
|
-
return e.some((e) => t.isRtlMarked?.(e) || i(
|
|
33810
|
+
function kc(e, t = {}) {
|
|
33811
|
+
return e.some((e) => t.isRtlMarked?.(e) || i(Ec(e) ?? ""));
|
|
33756
33812
|
}
|
|
33757
|
-
function
|
|
33758
|
-
return
|
|
33813
|
+
function Ac(e, t, n = {}) {
|
|
33814
|
+
return Nc(e, t, n, !1);
|
|
33759
33815
|
}
|
|
33760
|
-
function
|
|
33816
|
+
function jc(e, t, n) {
|
|
33761
33817
|
if (!f(r())) return;
|
|
33762
33818
|
let i = [];
|
|
33763
|
-
return
|
|
33819
|
+
return Nc(e, t, n, !1, void 0, (e) => {
|
|
33764
33820
|
i = e;
|
|
33765
33821
|
}), i;
|
|
33766
33822
|
}
|
|
33767
|
-
function
|
|
33823
|
+
function Mc(e, t, n, r, i) {
|
|
33768
33824
|
let a = () => ({
|
|
33769
|
-
...
|
|
33825
|
+
...Nc(e, n, i, !0),
|
|
33770
33826
|
view: "parents"
|
|
33771
33827
|
});
|
|
33772
33828
|
if (!r.directionFromAnyOdd || r.isTab !== i.isTab || r.isRtlMarked !== i.isRtlMarked || r.digitsAsAN !== i.digitsAsAN || r.isRtlAmbiguous !== i.isRtlAmbiguous || r.preserveRtlNumericCS !== i.preserveRtlNumericCS || r.directionFromAnyOdd !== i.directionFromAnyOdd || i.isolateDirection !== void 0 && (i.isolateDirection !== r.isolateDirection || !i.isolateRequiresUniformSlices)) return a();
|
|
33773
33829
|
let o = 0;
|
|
33774
33830
|
for (let n = 0; n < e.length; n++) {
|
|
33775
|
-
let r =
|
|
33831
|
+
let r = Ec(e[n]) ?? "", i = 0, s = 0;
|
|
33776
33832
|
for (; t[o]?.parentIndex === n;) {
|
|
33777
33833
|
let e = t[o++];
|
|
33778
33834
|
if (!Number.isInteger(e.startUTF16) || !Number.isInteger(e.endUTF16) || e.startUTF16 !== i || e.endUTF16 < i || e.endUTF16 > r.length || r.length > 0 && e.endUTF16 === i || e.spaceOnly !== (r.slice(e.startUTF16, e.endUTF16) === " ")) return a();
|
|
@@ -33780,12 +33836,12 @@ function wc(e, t, n, r, i) {
|
|
|
33780
33836
|
}
|
|
33781
33837
|
if (s === 0 || i !== r.length || r.length === 0 && s !== 1) return a();
|
|
33782
33838
|
}
|
|
33783
|
-
return o === t.length ?
|
|
33839
|
+
return o === t.length ? Nc(e, n, r, !0, {
|
|
33784
33840
|
cells: t,
|
|
33785
33841
|
legacyOptions: i
|
|
33786
33842
|
}) : a();
|
|
33787
33843
|
}
|
|
33788
|
-
function
|
|
33844
|
+
function Nc(e, t, n, i, a, o) {
|
|
33789
33845
|
let s = e.length;
|
|
33790
33846
|
if (s === 0 && a) return {
|
|
33791
33847
|
view: "cells",
|
|
@@ -33806,14 +33862,14 @@ function Tc(e, t, n, i, a, o) {
|
|
|
33806
33862
|
if (r !== void 0 && r === "rtl" !== t) return p = !0, r;
|
|
33807
33863
|
}) : void 0;
|
|
33808
33864
|
for (let t = 0; t < s; t++) {
|
|
33809
|
-
let r = e[t], i =
|
|
33865
|
+
let r = e[t], i = Ec(r) ?? "", a = h?.[t];
|
|
33810
33866
|
a !== void 0 && h[t - 1] !== a && (c += a === "rtl" ? "" : "");
|
|
33811
33867
|
let o = n.digitsAsAN?.(r) === !0, s = n.isRtlMarked?.(r) === !0;
|
|
33812
33868
|
if (l[t] = c.length, c += i.length > 0 ? i : "", d[t] = c.length, n.isTab?.(r)) (f ??= [])[l[t]] = "S";
|
|
33813
33869
|
else if (i.length > 0 && (o || s)) {
|
|
33814
33870
|
let e = f ??= [];
|
|
33815
33871
|
for (let r = l[t]; r < d[t]; r++) {
|
|
33816
|
-
let t =
|
|
33872
|
+
let t = Dc(c[r], o, s, n);
|
|
33817
33873
|
t !== void 0 && (e[r] = t), t === "R" && n.preserveRtlNumericCS && u(c.charCodeAt(r)) === "CS" && (m ??= []).push(r);
|
|
33818
33874
|
}
|
|
33819
33875
|
}
|
|
@@ -33834,7 +33890,7 @@ function Tc(e, t, n, i, a, o) {
|
|
|
33834
33890
|
if (o) {
|
|
33835
33891
|
let t = [];
|
|
33836
33892
|
for (let n = 0; n < s; n++) {
|
|
33837
|
-
let r =
|
|
33893
|
+
let r = Ec(e[n]) ?? "";
|
|
33838
33894
|
if (r.length === 0) continue;
|
|
33839
33895
|
let i = 0;
|
|
33840
33896
|
for (let e = 1; e <= r.length; e++) e !== r.length && g[l[n] + e] === g[l[n] + i] || (t.push({
|
|
@@ -33850,27 +33906,27 @@ function Tc(e, t, n, i, a, o) {
|
|
|
33850
33906
|
};
|
|
33851
33907
|
}
|
|
33852
33908
|
if (a) {
|
|
33853
|
-
let r = a.cells.map((e) => l[e.parentIndex] + e.startUTF16), i = a.cells.map((t) => d[t.parentIndex] - l[t.parentIndex] === 1 && (
|
|
33909
|
+
let r = a.cells.map((e) => l[e.parentIndex] + e.startUTF16), i = a.cells.map((t) => d[t.parentIndex] - l[t.parentIndex] === 1 && (Ec(e[t.parentIndex]) ?? "").length === 0 ? d[t.parentIndex] : l[t.parentIndex] + t.endUTF16), o = Pc(c, g, _, r, i, n, a.cells, !0);
|
|
33854
33910
|
return o ? {
|
|
33855
33911
|
...o,
|
|
33856
33912
|
view: "cells"
|
|
33857
33913
|
} : p ? {
|
|
33858
|
-
...
|
|
33914
|
+
...Nc(e, t, {
|
|
33859
33915
|
...a.legacyOptions,
|
|
33860
33916
|
isolateDirection: void 0
|
|
33861
33917
|
}, !0),
|
|
33862
33918
|
view: "parents"
|
|
33863
33919
|
} : {
|
|
33864
|
-
...
|
|
33920
|
+
...Pc(c, g, _, l, d, a.legacyOptions, !1, !0),
|
|
33865
33921
|
view: "parents"
|
|
33866
33922
|
};
|
|
33867
33923
|
}
|
|
33868
|
-
return
|
|
33924
|
+
return Pc(c, g, _, l, d, n, !!(p && n.isolateRequiresUniformSlices), i) || Nc(e, t, {
|
|
33869
33925
|
...n,
|
|
33870
33926
|
isolateDirection: void 0
|
|
33871
33927
|
}, i);
|
|
33872
33928
|
}
|
|
33873
|
-
function
|
|
33929
|
+
function Pc(e, n, r, i, a, o, s, c) {
|
|
33874
33930
|
let l = i.length;
|
|
33875
33931
|
if (!o.directionFromAnyOdd) {
|
|
33876
33932
|
let { order: e, segLevels: a } = t(n, r, i), o = Array.from(a, (e) => (e & 1) == 1);
|
|
@@ -33905,13 +33961,13 @@ function Ec(e, n, r, i, a, o, s, c) {
|
|
|
33905
33961
|
rtl: u
|
|
33906
33962
|
};
|
|
33907
33963
|
}
|
|
33908
|
-
function
|
|
33964
|
+
function Fc(e, t) {
|
|
33909
33965
|
if (!Number.isSafeInteger(e) || e <= 0) throw TypeError(`${t} must be a positive safe integer`);
|
|
33910
33966
|
}
|
|
33911
|
-
function
|
|
33967
|
+
function Ic(e) {
|
|
33912
33968
|
if (!Number.isSafeInteger(e) || e < 0) throw TypeError("cache entry weight must be a non-negative safe integer");
|
|
33913
33969
|
}
|
|
33914
|
-
var
|
|
33970
|
+
var Lc = class {
|
|
33915
33971
|
#e;
|
|
33916
33972
|
#t;
|
|
33917
33973
|
#n;
|
|
@@ -33920,7 +33976,7 @@ var kc = class {
|
|
|
33920
33976
|
#a = /* @__PURE__ */ new Map();
|
|
33921
33977
|
#o = 0;
|
|
33922
33978
|
constructor(e) {
|
|
33923
|
-
|
|
33979
|
+
Fc(e.maxEntries, "maxEntries"), Fc(e.maxWeight, "maxWeight"), this.#e = e.maxEntries, this.#t = e.maxWeight, this.#n = e.measure, this.#r = e.onRemove;
|
|
33924
33980
|
}
|
|
33925
33981
|
get usage() {
|
|
33926
33982
|
return {
|
|
@@ -33966,7 +34022,7 @@ var kc = class {
|
|
|
33966
34022
|
if (this.#a.get(e)?.token !== t) return n;
|
|
33967
34023
|
let r;
|
|
33968
34024
|
try {
|
|
33969
|
-
r = this.#n(n),
|
|
34025
|
+
r = this.#n(n), Ic(r);
|
|
33970
34026
|
} catch (n) {
|
|
33971
34027
|
throw this.#s(e, t), n;
|
|
33972
34028
|
}
|
|
@@ -33990,10 +34046,10 @@ var kc = class {
|
|
|
33990
34046
|
this.#r?.(e, t, n);
|
|
33991
34047
|
} catch {}
|
|
33992
34048
|
}
|
|
33993
|
-
},
|
|
34049
|
+
}, Rc = class {
|
|
33994
34050
|
#e;
|
|
33995
34051
|
constructor(e) {
|
|
33996
|
-
this.#e = new
|
|
34052
|
+
this.#e = new Lc({
|
|
33997
34053
|
maxEntries: e.maxEntries,
|
|
33998
34054
|
maxWeight: e.maxBytes,
|
|
33999
34055
|
measure: (e) => e.size
|
|
@@ -34021,4 +34077,4 @@ var kc = class {
|
|
|
34021
34077
|
this.#e.clear();
|
|
34022
34078
|
}
|
|
34023
34079
|
};
|
|
34024
|
-
export {
|
|
34080
|
+
export { Ja as $, Vt as $t, Q as A, Ye as An, Zn as At, Go as B, bn as Bt, Vs as C, et as Cn, sr as Ct, js as D, Xe as Dn, ir as Dt, Ms as E, $e as En, nr as Et, ds as F, Fe as Fn, Ln as Ft, Do as G, sn as Gt, Ho as H, Cn as Ht, Zo as I, Ee as In, qn as It, Fo as J, tn as Jt, No as K, $t as Kt, Xo as L, we as Ln, Tn as Lt, Ts as M, Ne as Mn, Jn as Mt, us as N, ke as Nn, In as Nt, As as O, qe as On, ar as Ot, fs as P, Pe as Pn, Pn as Pt, Ya as Q, Ut as Qt, Qo as R, Ce as Rn, hn as Rt, Qs as S, Ge as Sn, mr as St, Ns as T, Qe as Tn, tr as Tt, po as U, xn as Ut, Wo as V, pn as Vt, Vo as W, on as Wt, no as X, Qt as Xt, Oo as Y, en as Yt, io as Z, Wt as Zt, lc as _, Ve as _n, Br as _t, Ac as a, st as an, sa as at, Ks as b, Ue as bn, yr as bt, Sc as c, St as cn, Ui as ct, vc as d, at as dn, Or as dt, Ht as en, qa as et, yc as f, A as fn, fi as ft, gc as g, Be as gn, di as gt, hc as h, rt as hn, Nr as ht, Mc as i, j as in, pa as it, Es as j, Ke as jn, Qn as jt, ws as k, Je as kn, Xn as kt, Tc as l, lt as ln, _i as lt, _c as m, nt as mn, li as mt, Lc as n, It as nn, Fa as nt, jc as o, vt as on, Vi as ot, xc as p, gt as pn, ui as pt, Eo as q, nn as qt, Oc as r, Rt as rn, fa as rt, kc as s, xt as sn, Bi as st, Rc as t, Pt as tn, Ga as tt, wc as u, ct as un, gi as ut, Ys as v, tt as vn, ii as vt, zs as w, Ze as wn, or as wt, ec as x, He as xn, ur as xt, qs as y, We as yn, Lr as yt, Uo as z, Sn as zt };
|