@backmatter/studio 0.0.8 → 0.0.10
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/chunks/UiKitApp-BxvTwsko.js +2410 -0
- package/dist/chunks/WorkspaceRoutes-BKKEkAq7.js +90126 -0
- package/dist/chunks/{dashboard-bNp6AbKE.js → dashboard-8rjkfEXl.js} +380 -382
- package/dist/chunks/{index-DoDE-hwB.js → index-laWAz5_p.js} +111 -112
- package/dist/dashboard.js +2 -2
- package/dist/index.js +287 -146
- package/dist/site-widget.css +1615 -0
- package/dist/site-widget.js +30903 -628
- package/dist/studio.css +268 -67
- package/package.json +4 -4
- package/src/App.tsx +12 -29
- package/src/api.ts +55 -0
- package/src/chat/ChangeCard.tsx +2 -0
- package/src/chat/ChatMessage.tsx +73 -62
- package/src/chat/ChatPanel.tsx +110 -15
- package/src/chat/DocListCard.tsx +2 -0
- package/src/chat/LiveStatus.tsx +78 -8
- package/src/chat/Reveal.tsx +34 -0
- package/src/chat/Shimmer.tsx +65 -23
- package/src/chat/chat-helpers.ts +35 -0
- package/src/chat/motion.ts +73 -0
- package/src/chat/useStickToBottom.ts +129 -14
- package/src/chrome/ContentExplorerSidebar.tsx +23 -8
- package/src/chrome/content-tree-visibility.ts +55 -0
- package/src/devbar-state.ts +125 -0
- package/src/index.css +3 -131
- package/src/pages/CliAuthorizePage.tsx +61 -28
- package/src/pages/MediaGalleryPage.tsx +74 -11
- package/src/pages/MediaLightbox.tsx +93 -1
- package/src/pages/SettingsUsagePage.tsx +23 -1
- package/src/pages/media-grid.ts +13 -0
- package/src/pages/ui-kit/UiKitApp.tsx +164 -0
- package/src/pages/ui-kit/buttons.tsx +30 -0
- package/src/pages/ui-kit/catalog.tsx +41 -0
- package/src/pages/ui-kit/colors.tsx +95 -0
- package/src/pages/ui-kit/devbar.tsx +160 -0
- package/src/pages/ui-kit/feedback.tsx +39 -0
- package/src/pages/ui-kit/fields.tsx +47 -0
- package/src/pages/ui-kit/lists.tsx +19 -0
- package/src/pages/ui-kit/overlays.tsx +39 -0
- package/src/pages/ui-kit/path.ts +9 -0
- package/src/pages/ui-kit/sections.tsx +32 -0
- package/src/pages/ui-kit/surfaces.tsx +121 -0
- package/src/pages/ui-kit/topic.tsx +112 -0
- package/src/pages/ui-kit/topics.ts +71 -0
- package/src/pages/ui-kit/type.tsx +55 -0
- package/src/preview-frame-radius.ts +51 -0
- package/src/preview-frame.tsx +108 -49
- package/src/shell-resets.css +155 -0
- package/src/site-bar.tsx +1810 -425
- package/src/site-dashboard-href.ts +21 -0
- package/src/site-devbar-overlay-inject.ts +15 -0
- package/src/site-devbar-overlay.css +217 -0
- package/src/site-pointer.ts +1 -1
- package/src/site-publish-menu.tsx +33 -0
- package/src/site-widget-styles.ts +7 -0
- package/src/site-widget.tsx +61 -21
- package/src/studio-prose-ui.css +39 -0
- package/src/theme/ThemeProvider.tsx +4 -1
- package/src/workspace-path.ts +10 -6
- package/dist/chunks/EmbedPublishPage-CtIlaeGO.js +0 -149
- package/dist/chunks/UiKitPage-DcnSQ-Hf.js +0 -173
- package/dist/chunks/WorkspaceRoutes-DVpUOaMV.js +0 -59550
- package/dist/chunks/status-bar-action-C0fsAWvD.js +0 -30618
- package/src/pages/UiKitPage.tsx +0 -331
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
var Rs = Object.defineProperty;
|
|
2
2
|
var Es = (r, e, t) => e in r ? Rs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var M = (r, e, t) => Es(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import {
|
|
5
|
-
import { z as Ps, A as xt, C as La, D as Os, E as qs } from "./WorkspaceRoutes-DVpUOaMV.js";
|
|
4
|
+
import { aG as Bt, aH as Bs, aI as a0, aJ as ct, aK as xt, aL as ea, aM as Gn, aN as Is, aO as Ls, aP as Ds, aQ as La, aR as Ps, aS as Os, aT as Le, aU as qs } from "./WorkspaceRoutes-BKKEkAq7.js";
|
|
6
5
|
function Fs() {
|
|
7
6
|
return {
|
|
8
7
|
enter: {
|
|
@@ -97,7 +96,7 @@ function Gs(r) {
|
|
|
97
96
|
handlers: { math: t, inlineMath: a }
|
|
98
97
|
};
|
|
99
98
|
function t(i, s, l, o) {
|
|
100
|
-
const h = i.value || "", d = l.createTracker(o), p = "$".repeat(Math.max(
|
|
99
|
+
const h = i.value || "", d = l.createTracker(o), p = "$".repeat(Math.max(Bs(h, "$") + 1, 2)), g = l.enter("mathFlow");
|
|
101
100
|
let v = d.move(p);
|
|
102
101
|
if (i.meta) {
|
|
103
102
|
const w = l.enter("mathFlowMeta");
|
|
@@ -287,7 +286,7 @@ var Js = /([A-Z])/g, Ys = (r) => r.replace(Js, "-$1").toLowerCase(), Ks = {
|
|
|
287
286
|
"<": "<",
|
|
288
287
|
'"': """,
|
|
289
288
|
"'": "'"
|
|
290
|
-
},
|
|
289
|
+
}, Qs = /[&><"']/g, fe = (r) => String(r).replace(Qs, (e) => Ks[e]), f0 = (r) => r.type === "ordgroup" || r.type === "color" ? r.body.length === 1 ? f0(r.body[0]) : r : r.type === "font" ? f0(r.body) : r, Zs = /* @__PURE__ */ new Set(["mathord", "textord", "atom"]), We = (r) => Zs.has(f0(r).type), eo = (r) => {
|
|
291
290
|
var e = /^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(r);
|
|
292
291
|
return e ? e[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(e[1]) ? null : e[1].toLowerCase() : "_relative";
|
|
293
292
|
}, Tr = {
|
|
@@ -460,7 +459,7 @@ class ta {
|
|
|
460
459
|
return !!a;
|
|
461
460
|
}
|
|
462
461
|
}
|
|
463
|
-
class
|
|
462
|
+
class Qe {
|
|
464
463
|
constructor(e, t, a) {
|
|
465
464
|
this.id = void 0, this.size = void 0, this.cramped = void 0, this.id = e, this.size = t, this.cramped = a;
|
|
466
465
|
}
|
|
@@ -510,7 +509,7 @@ class Ze {
|
|
|
510
509
|
return this.size >= 2;
|
|
511
510
|
}
|
|
512
511
|
}
|
|
513
|
-
var ra = 0, b0 = 1, St = 2, $e = 3, Ft = 4, Ne = 5, kt = 6, ye = 7, Ie = [new
|
|
512
|
+
var ra = 0, b0 = 1, St = 2, $e = 3, Ft = 4, Ne = 5, kt = 6, ye = 7, Ie = [new Qe(ra, 0, !1), new Qe(b0, 0, !0), new Qe(St, 1, !1), new Qe($e, 1, !0), new Qe(Ft, 2, !1), new Qe(Ne, 2, !0), new Qe(kt, 3, !1), new Qe(ye, 3, !0)], no = [Ft, Ne, Ft, Ne, kt, ye, kt, ye], io = [Ne, Ne, Ne, Ne, ye, ye, ye, ye], so = [St, $e, Ft, Ne, kt, ye, kt, ye], oo = [$e, $e, Ne, Ne, ye, ye, ye, ye], lo = [b0, b0, $e, $e, Ne, Ne, ye, ye], uo = [ra, b0, St, $e, St, $e, St, $e], H = {
|
|
514
513
|
DISPLAY: Ie[ra],
|
|
515
514
|
TEXT: Ie[St],
|
|
516
515
|
SCRIPT: Ie[Ft],
|
|
@@ -1079,7 +1078,7 @@ var Mr = {
|
|
|
1079
1078
|
mu: !0
|
|
1080
1079
|
}, $n = function(e) {
|
|
1081
1080
|
return typeof e != "string" && (e = e.unit), e in Mr || e in ko || e === "ex";
|
|
1082
|
-
},
|
|
1081
|
+
}, Z = function(e, t) {
|
|
1083
1082
|
var a;
|
|
1084
1083
|
if (e.unit in Mr)
|
|
1085
1084
|
a = Mr[e.unit] / t.fontMetrics().ptPerEm / t.sizeMultiplier;
|
|
@@ -4198,8 +4197,8 @@ G = "𝕜";
|
|
|
4198
4197
|
u(c, m, F, "k", G);
|
|
4199
4198
|
u(z, m, x, "k", G);
|
|
4200
4199
|
for (var lt = 0; lt < 10; lt++) {
|
|
4201
|
-
var
|
|
4202
|
-
G = String.fromCharCode(55349, 57294 + lt), u(c, m, F,
|
|
4200
|
+
var Ze = lt.toString();
|
|
4201
|
+
G = String.fromCharCode(55349, 57294 + lt), u(c, m, F, Ze, G), u(z, m, x, Ze, G), G = String.fromCharCode(55349, 57314 + lt), u(c, m, F, Ze, G), u(z, m, x, Ze, G), G = String.fromCharCode(55349, 57324 + lt), u(c, m, F, Ze, G), u(z, m, x, Ze, G), G = String.fromCharCode(55349, 57334 + lt), u(c, m, F, Ze, G), u(z, m, x, Ze, G);
|
|
4203
4202
|
}
|
|
4204
4203
|
var Nr = "ÐÞþ";
|
|
4205
4204
|
for (var or = 0; or < Nr.length; or++) {
|
|
@@ -4516,7 +4515,7 @@ var _r = {
|
|
|
4516
4515
|
var q = N(["vlist-t"], I);
|
|
4517
4516
|
return I.length === 2 && q.classes.push("vlist-t2"), q.height = g, q.depth = -p, q;
|
|
4518
4517
|
}, Jn = (r, e) => {
|
|
4519
|
-
var t = N(["mspace"], [], e), a =
|
|
4518
|
+
var t = N(["mspace"], [], e), a = Z(r, e);
|
|
4520
4519
|
return t.style.marginRight = B(a), t;
|
|
4521
4520
|
}, o0 = (r, e, t) => {
|
|
4522
4521
|
var a, n;
|
|
@@ -4610,7 +4609,7 @@ var _r = {
|
|
|
4610
4609
|
preserveAspectRatio: "xMinYMin"
|
|
4611
4610
|
}), o = it(["overlay"], [l], t);
|
|
4612
4611
|
return o.height = i, o.style.height = B(i), o.style.width = B(n), o;
|
|
4613
|
-
},
|
|
4612
|
+
}, Q = {
|
|
4614
4613
|
number: 3,
|
|
4615
4614
|
unit: "mu"
|
|
4616
4615
|
}, ut = {
|
|
@@ -4621,16 +4620,16 @@ var _r = {
|
|
|
4621
4620
|
unit: "mu"
|
|
4622
4621
|
}, qo = {
|
|
4623
4622
|
mord: {
|
|
4624
|
-
mop:
|
|
4623
|
+
mop: Q,
|
|
4625
4624
|
mbin: ut,
|
|
4626
4625
|
mrel: Fe,
|
|
4627
|
-
minner:
|
|
4626
|
+
minner: Q
|
|
4628
4627
|
},
|
|
4629
4628
|
mop: {
|
|
4630
|
-
mord:
|
|
4631
|
-
mop:
|
|
4629
|
+
mord: Q,
|
|
4630
|
+
mop: Q,
|
|
4632
4631
|
mrel: Fe,
|
|
4633
|
-
minner:
|
|
4632
|
+
minner: Q
|
|
4634
4633
|
},
|
|
4635
4634
|
mbin: {
|
|
4636
4635
|
mord: ut,
|
|
@@ -4646,48 +4645,48 @@ var _r = {
|
|
|
4646
4645
|
},
|
|
4647
4646
|
mopen: {},
|
|
4648
4647
|
mclose: {
|
|
4649
|
-
mop:
|
|
4648
|
+
mop: Q,
|
|
4650
4649
|
mbin: ut,
|
|
4651
4650
|
mrel: Fe,
|
|
4652
|
-
minner:
|
|
4651
|
+
minner: Q
|
|
4653
4652
|
},
|
|
4654
4653
|
mpunct: {
|
|
4655
|
-
mord:
|
|
4656
|
-
mop:
|
|
4654
|
+
mord: Q,
|
|
4655
|
+
mop: Q,
|
|
4657
4656
|
mrel: Fe,
|
|
4658
|
-
mopen:
|
|
4659
|
-
mclose:
|
|
4660
|
-
mpunct:
|
|
4661
|
-
minner:
|
|
4657
|
+
mopen: Q,
|
|
4658
|
+
mclose: Q,
|
|
4659
|
+
mpunct: Q,
|
|
4660
|
+
minner: Q
|
|
4662
4661
|
},
|
|
4663
4662
|
minner: {
|
|
4664
|
-
mord:
|
|
4665
|
-
mop:
|
|
4663
|
+
mord: Q,
|
|
4664
|
+
mop: Q,
|
|
4666
4665
|
mbin: ut,
|
|
4667
4666
|
mrel: Fe,
|
|
4668
|
-
mopen:
|
|
4669
|
-
mpunct:
|
|
4670
|
-
minner:
|
|
4667
|
+
mopen: Q,
|
|
4668
|
+
mpunct: Q,
|
|
4669
|
+
minner: Q
|
|
4671
4670
|
}
|
|
4672
4671
|
}, Fo = {
|
|
4673
4672
|
mord: {
|
|
4674
|
-
mop:
|
|
4673
|
+
mop: Q
|
|
4675
4674
|
},
|
|
4676
4675
|
mop: {
|
|
4677
|
-
mord:
|
|
4678
|
-
mop:
|
|
4676
|
+
mord: Q,
|
|
4677
|
+
mop: Q
|
|
4679
4678
|
},
|
|
4680
4679
|
mbin: {},
|
|
4681
4680
|
mrel: {},
|
|
4682
4681
|
mopen: {},
|
|
4683
4682
|
mclose: {
|
|
4684
|
-
mop:
|
|
4683
|
+
mop: Q
|
|
4685
4684
|
},
|
|
4686
4685
|
mpunct: {},
|
|
4687
4686
|
minner: {
|
|
4688
|
-
mop:
|
|
4687
|
+
mop: Q
|
|
4689
4688
|
}
|
|
4690
|
-
},
|
|
4689
|
+
}, Qn = {}, x0 = {}, S0 = {};
|
|
4691
4690
|
function L(r) {
|
|
4692
4691
|
for (var {
|
|
4693
4692
|
type: e,
|
|
@@ -4708,7 +4707,7 @@ function L(r) {
|
|
|
4708
4707
|
primitive: !!a.primitive,
|
|
4709
4708
|
handler: n
|
|
4710
4709
|
}, o = 0; o < t.length; ++o)
|
|
4711
|
-
|
|
4710
|
+
Qn[t[o]] = l;
|
|
4712
4711
|
e && (i && (x0[e] = i), s && (S0[e] = s));
|
|
4713
4712
|
}
|
|
4714
4713
|
function dt(r) {
|
|
@@ -4781,7 +4780,7 @@ var k0 = function(e) {
|
|
|
4781
4780
|
}, Lr = function(e, t, a, n, i) {
|
|
4782
4781
|
n && e.push(n);
|
|
4783
4782
|
for (var s = 0; s < e.length; s++) {
|
|
4784
|
-
var l = e[s], o =
|
|
4783
|
+
var l = e[s], o = Zn(l);
|
|
4785
4784
|
if (o) {
|
|
4786
4785
|
Lr(o.children, t, a, null, i);
|
|
4787
4786
|
continue;
|
|
@@ -4796,10 +4795,10 @@ var k0 = function(e) {
|
|
|
4796
4795
|
})(s);
|
|
4797
4796
|
}
|
|
4798
4797
|
n && e.pop();
|
|
4799
|
-
},
|
|
4798
|
+
}, Zn = function(e) {
|
|
4800
4799
|
return e instanceof Mt || e instanceof L0 || e instanceof zt && e.hasClass("enclosing") ? e : null;
|
|
4801
4800
|
}, Dr = function(e, t) {
|
|
4802
|
-
var a =
|
|
4801
|
+
var a = Zn(e);
|
|
4803
4802
|
if (a) {
|
|
4804
4803
|
var n = a.children;
|
|
4805
4804
|
if (n.length) {
|
|
@@ -5115,7 +5114,7 @@ var Xo = [
|
|
|
5115
5114
|
1.728,
|
|
5116
5115
|
2.074,
|
|
5117
5116
|
2.488
|
|
5118
|
-
],
|
|
5117
|
+
], Qa = function(e, t) {
|
|
5119
5118
|
return t.size < 2 ? e : Xo[e - 1][t.size - 1];
|
|
5120
5119
|
};
|
|
5121
5120
|
class Ge {
|
|
@@ -5149,7 +5148,7 @@ class Ge {
|
|
|
5149
5148
|
havingStyle(e) {
|
|
5150
5149
|
return this.style === e ? this : this.extend({
|
|
5151
5150
|
style: e,
|
|
5152
|
-
size:
|
|
5151
|
+
size: Qa(this.textSize, e)
|
|
5153
5152
|
});
|
|
5154
5153
|
}
|
|
5155
5154
|
/**
|
|
@@ -5177,7 +5176,7 @@ class Ge {
|
|
|
5177
5176
|
*/
|
|
5178
5177
|
havingBaseStyle(e) {
|
|
5179
5178
|
e = e || this.style.text();
|
|
5180
|
-
var t =
|
|
5179
|
+
var t = Qa(Ge.BASESIZE, e);
|
|
5181
5180
|
return this.size === t && this.textSize === Ge.BASESIZE && this.style === e ? this : this.extend({
|
|
5182
5181
|
style: e,
|
|
5183
5182
|
size: t
|
|
@@ -5363,7 +5362,7 @@ var ri = function(e) {
|
|
|
5363
5362
|
}, O0 = function(e) {
|
|
5364
5363
|
var t = new E("mo", [new ie(Ko[e.replace(/^\\/, "")])]);
|
|
5365
5364
|
return t.setAttribute("stretchy", "true"), t;
|
|
5366
|
-
},
|
|
5365
|
+
}, Qo = {
|
|
5367
5366
|
// path(s), minWidth, height, align
|
|
5368
5367
|
overrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
|
|
5369
5368
|
overleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
|
|
@@ -5412,10 +5411,10 @@ var ri = function(e) {
|
|
|
5412
5411
|
xrightleftarrows: [["baraboveleftarrow", "rightarrowabovebar"], 1.75, 901],
|
|
5413
5412
|
xrightequilibrium: [["baraboveshortleftharpoon", "rightharpoonaboveshortbar"], 1.75, 716],
|
|
5414
5413
|
xleftequilibrium: [["shortbaraboveleftharpoon", "shortrightharpoonabovebar"], 1.75, 716]
|
|
5415
|
-
},
|
|
5414
|
+
}, Zo = /* @__PURE__ */ new Set(["widehat", "widecheck", "widetilde", "utilde"]), q0 = function(e, t) {
|
|
5416
5415
|
function a() {
|
|
5417
5416
|
var l = 4e5, o = e.label.slice(1);
|
|
5418
|
-
if (
|
|
5417
|
+
if (Zo.has(o) && "base" in e) {
|
|
5419
5418
|
var h = e.base.type === "ordgroup" ? e.base.body.length : 1, d, p, g;
|
|
5420
5419
|
if (h > 5)
|
|
5421
5420
|
o === "widehat" || o === "widecheck" ? (d = 420, l = 2364, g = 0.42, p = o + "4") : (d = 312, l = 2340, g = 0.34, p = "tilde4");
|
|
@@ -5435,7 +5434,7 @@ var ri = function(e) {
|
|
|
5435
5434
|
height: g
|
|
5436
5435
|
};
|
|
5437
5436
|
} else {
|
|
5438
|
-
var T = [], A =
|
|
5437
|
+
var T = [], A = Qo[o];
|
|
5439
5438
|
if (!A)
|
|
5440
5439
|
throw new Error('No SVG data for "' + o + '".');
|
|
5441
5440
|
var [k, C, _] = A, I = _ / 1e3, P = k.length, O, j;
|
|
@@ -5926,7 +5925,7 @@ var il = {
|
|
|
5926
5925
|
V: "\\downarrow",
|
|
5927
5926
|
"|": "\\Vert",
|
|
5928
5927
|
".": "no arrow"
|
|
5929
|
-
},
|
|
5928
|
+
}, Za = () => ({
|
|
5930
5929
|
type: "styling",
|
|
5931
5930
|
body: [],
|
|
5932
5931
|
mode: "math",
|
|
@@ -5985,7 +5984,7 @@ function ll(r) {
|
|
|
5985
5984
|
throw new R("Expected \\\\ or \\cr or \\end", r.nextToken);
|
|
5986
5985
|
}
|
|
5987
5986
|
for (var a = [], n = [a], i = 0; i < e.length; i++) {
|
|
5988
|
-
for (var s = e[i], l =
|
|
5987
|
+
for (var s = e[i], l = Za(), o = 0; o < s.length; o++)
|
|
5989
5988
|
if (!en(s[o]))
|
|
5990
5989
|
l.body.push(s[o]);
|
|
5991
5990
|
else {
|
|
@@ -6023,7 +6022,7 @@ function ll(r) {
|
|
|
6023
6022
|
// CD is always displaystyle.
|
|
6024
6023
|
resetFont: !0
|
|
6025
6024
|
};
|
|
6026
|
-
a.push(S), l =
|
|
6025
|
+
a.push(S), l = Za();
|
|
6027
6026
|
}
|
|
6028
6027
|
i % 2 === 0 ? a.push(l) : a.shift(), a = [], n.push(a);
|
|
6029
6028
|
}
|
|
@@ -6202,11 +6201,11 @@ L({
|
|
|
6202
6201
|
// not within tabular/array environments.
|
|
6203
6202
|
htmlBuilder(r, e) {
|
|
6204
6203
|
var t = N(["mspace"], [], e);
|
|
6205
|
-
return r.newLine && (t.classes.push("newline"), r.size && (t.style.marginTop = B(
|
|
6204
|
+
return r.newLine && (t.classes.push("newline"), r.size && (t.style.marginTop = B(Z(r.size, e)))), t;
|
|
6206
6205
|
},
|
|
6207
6206
|
mathmlBuilder(r, e) {
|
|
6208
6207
|
var t = new E("mspace");
|
|
6209
|
-
return r.newLine && (t.setAttribute("linebreak", "newline"), r.size && t.setAttribute("height", B(
|
|
6208
|
+
return r.newLine && (t.setAttribute("linebreak", "newline"), r.size && t.setAttribute("height", B(Z(r.size, e)))), t;
|
|
6210
6209
|
}
|
|
6211
6210
|
});
|
|
6212
6211
|
var qr = {
|
|
@@ -6780,10 +6779,10 @@ var j0 = (r, e) => {
|
|
|
6780
6779
|
if (a === "sout")
|
|
6781
6780
|
i = N(["stretchy", "sout"]), i.height = e.fontMetrics().defaultRuleThickness / n, s = -0.5 * e.fontMetrics().xHeight;
|
|
6782
6781
|
else if (a === "phase") {
|
|
6783
|
-
var o =
|
|
6782
|
+
var o = Z({
|
|
6784
6783
|
number: 0.6,
|
|
6785
6784
|
unit: "pt"
|
|
6786
|
-
}, e), h =
|
|
6785
|
+
}, e), h = Z({
|
|
6787
6786
|
number: 0.35,
|
|
6788
6787
|
unit: "ex"
|
|
6789
6788
|
}, e), d = e.havingBaseSizing();
|
|
@@ -7176,7 +7175,7 @@ var Oe = function(e, t) {
|
|
|
7176
7175
|
var v = t.havingStyle(H.SCRIPT).sizeMultiplier;
|
|
7177
7176
|
g = 0.2778 * (v / t.sizeMultiplier);
|
|
7178
7177
|
}
|
|
7179
|
-
var w = e.colSeparationType === "CD" ?
|
|
7178
|
+
var w = e.colSeparationType === "CD" ? Z({
|
|
7180
7179
|
number: 3,
|
|
7181
7180
|
unit: "ex"
|
|
7182
7181
|
}, t) : 12 * p, S = 3 * p, T = e.arraystretch * w, A = 0.7 * T, k = 0.3 * T, C = 0;
|
|
@@ -7201,7 +7200,7 @@ var Oe = function(e, t) {
|
|
|
7201
7200
|
O < q.depth && (O = q.depth), P < q.height && (P = q.height), j.cells[n] = q;
|
|
7202
7201
|
}
|
|
7203
7202
|
var K = e.rowGaps[a], te = 0;
|
|
7204
|
-
K && (te =
|
|
7203
|
+
K && (te = Z(K, t), te > 0 && (te += k, O < te && (O = te), te = 0)), e.addJot && a < e.body.length - 1 && (O += S), j.height = P, j.depth = O, C += P, j.pos = C, C += O + te, o[a] = j, _(s[a + 1]);
|
|
7205
7204
|
}
|
|
7206
7205
|
var V = C / 2 + t.fontMetrics().axisHeight, Je = e.cols || [], re = [], he, Ce, ft = [];
|
|
7207
7206
|
if (e.tags && e.tags.some((t0) => t0))
|
|
@@ -7239,12 +7238,12 @@ var Oe = function(e, t) {
|
|
|
7239
7238
|
}
|
|
7240
7239
|
var _a = [];
|
|
7241
7240
|
for (a = 0; a < i; ++a) {
|
|
7242
|
-
var
|
|
7243
|
-
if (
|
|
7244
|
-
var As =
|
|
7245
|
-
|
|
7241
|
+
var Qt = o[a], Zt = Qt.cells[n];
|
|
7242
|
+
if (Zt) {
|
|
7243
|
+
var As = Qt.pos - V;
|
|
7244
|
+
Zt.depth = Qt.depth, Zt.height = Qt.height, _a.push({
|
|
7246
7245
|
type: "elem",
|
|
7247
|
-
elem:
|
|
7246
|
+
elem: Zt,
|
|
7248
7247
|
shift: As
|
|
7249
7248
|
});
|
|
7250
7249
|
}
|
|
@@ -7783,7 +7782,7 @@ var Sl = (r, e) => {
|
|
|
7783
7782
|
}
|
|
7784
7783
|
i = e.havingStyle(n);
|
|
7785
7784
|
var h = W(r.denom, i, e), d, p, g;
|
|
7786
|
-
r.hasBarLine ? (r.barSize ? (p =
|
|
7785
|
+
r.hasBarLine ? (r.barSize ? (p = Z(r.barSize, e), d = At("frac-line", e, p)) : d = At("frac-line", e), p = d.height, g = d.height) : (d = null, p = 0, g = e.fontMetrics().defaultRuleThickness);
|
|
7787
7786
|
var v, w, S;
|
|
7788
7787
|
t.size === H.DISPLAY.size ? (v = e.fontMetrics().num1, p > 0 ? w = 3 * g : w = 7 * g, S = e.fontMetrics().denom1) : (p > 0 ? (v = e.fontMetrics().num2, w = g) : (v = e.fontMetrics().num3, w = 3 * g), S = e.fontMetrics().denom2);
|
|
7789
7788
|
var T;
|
|
@@ -7832,7 +7831,7 @@ var Sl = (r, e) => {
|
|
|
7832
7831
|
if (!r.hasBarLine)
|
|
7833
7832
|
t.setAttribute("linethickness", "0px");
|
|
7834
7833
|
else if (r.barSize) {
|
|
7835
|
-
var a =
|
|
7834
|
+
var a = Z(r.barSize, e);
|
|
7836
7835
|
t.setAttribute("linethickness", B(a));
|
|
7837
7836
|
}
|
|
7838
7837
|
if (r.leftDelim != null || r.rightDelim != null) {
|
|
@@ -8409,10 +8408,10 @@ L({
|
|
|
8409
8408
|
} : a.formatUnsupportedCmd("\\includegraphics");
|
|
8410
8409
|
},
|
|
8411
8410
|
htmlBuilder: (r, e) => {
|
|
8412
|
-
var t =
|
|
8413
|
-
r.totalheight.number > 0 && (a =
|
|
8411
|
+
var t = Z(r.height, e), a = 0;
|
|
8412
|
+
r.totalheight.number > 0 && (a = Z(r.totalheight, e) - t);
|
|
8414
8413
|
var n = 0;
|
|
8415
|
-
r.width.number > 0 && (n =
|
|
8414
|
+
r.width.number > 0 && (n = Z(r.width, e));
|
|
8416
8415
|
var i = {
|
|
8417
8416
|
height: B(t + a)
|
|
8418
8417
|
};
|
|
@@ -8423,9 +8422,9 @@ L({
|
|
|
8423
8422
|
mathmlBuilder: (r, e) => {
|
|
8424
8423
|
var t = new E("mglyph", []);
|
|
8425
8424
|
t.setAttribute("alt", r.alt);
|
|
8426
|
-
var a =
|
|
8427
|
-
if (r.totalheight.number > 0 && (n =
|
|
8428
|
-
var i =
|
|
8425
|
+
var a = Z(r.height, e), n = 0;
|
|
8426
|
+
if (r.totalheight.number > 0 && (n = Z(r.totalheight, e) - a, t.setAttribute("valign", B(-n))), t.setAttribute("height", B(a + n)), r.width.number > 0) {
|
|
8427
|
+
var i = Z(r.width, e);
|
|
8429
8428
|
t.setAttribute("width", B(i));
|
|
8430
8429
|
}
|
|
8431
8430
|
return t.setAttribute("src", r.src), t;
|
|
@@ -8459,7 +8458,7 @@ L({
|
|
|
8459
8458
|
return Jn(r.dimension, e);
|
|
8460
8459
|
},
|
|
8461
8460
|
mathmlBuilder(r, e) {
|
|
8462
|
-
var t =
|
|
8461
|
+
var t = Z(r.dimension, e);
|
|
8463
8462
|
return new ti(t);
|
|
8464
8463
|
}
|
|
8465
8464
|
});
|
|
@@ -9059,7 +9058,7 @@ L({
|
|
|
9059
9058
|
};
|
|
9060
9059
|
},
|
|
9061
9060
|
htmlBuilder(r, e) {
|
|
9062
|
-
var t = W(r.body, e), a =
|
|
9061
|
+
var t = W(r.body, e), a = Z(r.dy, e);
|
|
9063
9062
|
return U({
|
|
9064
9063
|
positionType: "shift",
|
|
9065
9064
|
positionData: -a,
|
|
@@ -9115,11 +9114,11 @@ L({
|
|
|
9115
9114
|
};
|
|
9116
9115
|
},
|
|
9117
9116
|
htmlBuilder(r, e) {
|
|
9118
|
-
var t = N(["mord", "rule"], [], e), a =
|
|
9117
|
+
var t = N(["mord", "rule"], [], e), a = Z(r.width, e), n = Z(r.height, e), i = r.shift ? Z(r.shift, e) : 0;
|
|
9119
9118
|
return t.style.borderRightWidth = B(a), t.style.borderTopWidth = B(n), t.style.bottom = B(i), t.width = a, t.height = n + i, t.depth = -i, t.maxFontSize = n * 1.125 * e.sizeMultiplier, t;
|
|
9120
9119
|
},
|
|
9121
9120
|
mathmlBuilder(r, e) {
|
|
9122
|
-
var t =
|
|
9121
|
+
var t = Z(r.width, e), a = Z(r.height, e), n = r.shift ? Z(r.shift, e) : 0, i = e.color && e.getColor() || "black", s = new E("mspace");
|
|
9123
9122
|
s.setAttribute("mathbackground", i), s.setAttribute("width", B(t)), s.setAttribute("height", B(a));
|
|
9124
9123
|
var l = new E("mpadded", [s]);
|
|
9125
9124
|
return n >= 0 ? l.setAttribute("height", B(n)) : (l.setAttribute("height", B(n)), l.setAttribute("depth", B(-n))), l.setAttribute("voffset", B(n)), l;
|
|
@@ -9726,7 +9725,7 @@ L({
|
|
|
9726
9725
|
return a.setAttribute("mathvariant", "monospace"), a;
|
|
9727
9726
|
}
|
|
9728
9727
|
});
|
|
9729
|
-
var gn = (r) => r.body.replace(/ /g, r.star ? "␣" : " "), et =
|
|
9728
|
+
var gn = (r) => r.body.replace(/ /g, r.star ? "␣" : " "), et = Qn, Ei = `[ \r
|
|
9730
9729
|
]`, El = "\\\\[a-zA-Z@]+", Bl = "\\\\[^\uD800-\uDFFF]", Il = "(" + El + ")" + Ei + "*", Ll = `\\\\(
|
|
9731
9730
|
|[ \r ]+
|
|
9732
9731
|
?)[ \r ]*`, $r = "[̀-ͯ]", Dl = new RegExp($r + "+$"), Pl = "(" + Ei + "+)|" + // whitespace
|
|
@@ -12004,15 +12003,15 @@ function Kl(r) {
|
|
|
12004
12003
|
return va(r);
|
|
12005
12004
|
}
|
|
12006
12005
|
function va(r) {
|
|
12007
|
-
return Array.isArray(r) ?
|
|
12006
|
+
return Array.isArray(r) ? Ql(r) : r instanceof RegExp ? r : typeof r == "object" ? Zl(r) : r;
|
|
12008
12007
|
}
|
|
12009
|
-
function
|
|
12008
|
+
function Ql(r) {
|
|
12010
12009
|
let e = [];
|
|
12011
12010
|
for (let t = 0, a = r.length; t < a; t++)
|
|
12012
12011
|
e[t] = va(r[t]);
|
|
12013
12012
|
return e;
|
|
12014
12013
|
}
|
|
12015
|
-
function
|
|
12014
|
+
function Zl(r) {
|
|
12016
12015
|
let e = {};
|
|
12017
12016
|
for (let t in r)
|
|
12018
12017
|
e[t] = va(r[t]);
|
|
@@ -12826,7 +12825,7 @@ var Yt = class {
|
|
|
12826
12825
|
_getCachedCompiledWhilePatterns(e, t) {
|
|
12827
12826
|
return this._cachedCompiledWhilePatterns || (this._cachedCompiledWhilePatterns = new Wt(), this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while)), this._while.hasBackReferences && this._cachedCompiledWhilePatterns.setSource(0, t || ""), this._cachedCompiledWhilePatterns;
|
|
12828
12827
|
}
|
|
12829
|
-
},
|
|
12828
|
+
}, Qi = class de {
|
|
12830
12829
|
static createCaptureRule(e, t, a, n, i) {
|
|
12831
12830
|
return e.registerRule((s) => new w1(t, s, a, n, i));
|
|
12832
12831
|
}
|
|
@@ -12940,7 +12939,7 @@ var Yt = class {
|
|
|
12940
12939
|
hasMissingPatterns: (e ? e.length : 0) !== n.length
|
|
12941
12940
|
};
|
|
12942
12941
|
}
|
|
12943
|
-
}, Ut = class
|
|
12942
|
+
}, Ut = class Zi {
|
|
12944
12943
|
constructor(e, t) {
|
|
12945
12944
|
M(this, "source");
|
|
12946
12945
|
M(this, "ruleId");
|
|
@@ -12961,7 +12960,7 @@ var Yt = class {
|
|
|
12961
12960
|
this.hasAnchor ? this._anchorCache = this._buildAnchorCache() : this._anchorCache = null, this.ruleId = t, typeof this.source == "string" ? this.hasBackReferences = y1.test(this.source) : this.hasBackReferences = !1;
|
|
12962
12961
|
}
|
|
12963
12962
|
clone() {
|
|
12964
|
-
return new
|
|
12963
|
+
return new Zi(this.source, this.ruleId);
|
|
12965
12964
|
}
|
|
12966
12965
|
setSource(e) {
|
|
12967
12966
|
this.source !== e && (this.source = e, this.hasAnchor && (this._anchorCache = this._buildAnchorCache()));
|
|
@@ -13406,7 +13405,7 @@ function _1(r, e, t, a, n, i, s, l) {
|
|
|
13406
13405
|
);
|
|
13407
13406
|
}
|
|
13408
13407
|
function zn(r, e, t, a, n) {
|
|
13409
|
-
const i = C0(e, N0), s =
|
|
13408
|
+
const i = C0(e, N0), s = Qi.getCompiledRuleId(t, a, n.repository);
|
|
13410
13409
|
for (const l of i)
|
|
13411
13410
|
r.push({
|
|
13412
13411
|
debugSelector: e,
|
|
@@ -13547,7 +13546,7 @@ var E1 = class {
|
|
|
13547
13546
|
};
|
|
13548
13547
|
}
|
|
13549
13548
|
_tokenize(r, e, t, a) {
|
|
13550
|
-
this._rootId === -1 && (this._rootId =
|
|
13549
|
+
this._rootId === -1 && (this._rootId = Qi.getCompiledRuleId(
|
|
13551
13550
|
this._grammar.repository.$self,
|
|
13552
13551
|
this,
|
|
13553
13552
|
this._grammar.repository
|
|
@@ -14207,7 +14206,7 @@ const ya = ns({
|
|
|
14207
14206
|
html: U1,
|
|
14208
14207
|
li: X1,
|
|
14209
14208
|
optgroup: K1,
|
|
14210
|
-
option:
|
|
14209
|
+
option: Q1,
|
|
14211
14210
|
p: V1,
|
|
14212
14211
|
rp: _n,
|
|
14213
14212
|
rt: _n,
|
|
@@ -14215,7 +14214,7 @@ const ya = ns({
|
|
|
14215
14214
|
td: Rn,
|
|
14216
14215
|
tfoot: tu,
|
|
14217
14216
|
th: Rn,
|
|
14218
|
-
thead:
|
|
14217
|
+
thead: Z1,
|
|
14219
14218
|
tr: ru
|
|
14220
14219
|
});
|
|
14221
14220
|
function Sr(r, e, t) {
|
|
@@ -14255,11 +14254,11 @@ function K1(r, e, t) {
|
|
|
14255
14254
|
const a = ce(t, e);
|
|
14256
14255
|
return !a || a.type === "element" && a.tagName === "optgroup";
|
|
14257
14256
|
}
|
|
14258
|
-
function
|
|
14257
|
+
function Q1(r, e, t) {
|
|
14259
14258
|
const a = ce(t, e);
|
|
14260
14259
|
return !a || a.type === "element" && (a.tagName === "option" || a.tagName === "optgroup");
|
|
14261
14260
|
}
|
|
14262
|
-
function
|
|
14261
|
+
function Z1(r, e, t) {
|
|
14263
14262
|
const a = ce(t, e);
|
|
14264
14263
|
return !!(a && a.type === "element" && (a.tagName === "tbody" || a.tagName === "tfoot"));
|
|
14265
14264
|
}
|
|
@@ -14369,7 +14368,7 @@ function cu(r, e) {
|
|
|
14369
14368
|
return t.join("");
|
|
14370
14369
|
}
|
|
14371
14370
|
function hu(r, e, t) {
|
|
14372
|
-
const a =
|
|
14371
|
+
const a = Is(r.schema, e), n = r.settings.allowParseErrors && r.schema.space === "html" ? 0 : 1, i = r.settings.allowDangerousCharacters ? 0 : 1;
|
|
14373
14372
|
let s = r.quote, l;
|
|
14374
14373
|
if (a.overloadedBoolean && (t === a.attribute || t === "") ? t = !0 : (a.boolean || a.overloadedBoolean) && (typeof t != "string" || t === a.attribute || t === "") && (t = !!t), t == null || t === !1 || typeof t == "number" && Number.isNaN(t))
|
|
14375
14374
|
return "";
|
|
@@ -14380,7 +14379,7 @@ function hu(r, e, t) {
|
|
|
14380
14379
|
subset: d0.name[n][i]
|
|
14381
14380
|
})
|
|
14382
14381
|
);
|
|
14383
|
-
return t === !0 || (t = Array.isArray(t) ? (a.commaSeparated ?
|
|
14382
|
+
return t === !0 || (t = Array.isArray(t) ? (a.commaSeparated ? Ls : Ds)(t, {
|
|
14384
14383
|
padLeft: !r.settings.tightCommaSeparatedLists
|
|
14385
14384
|
}) : String(t), r.settings.collapseEmptyAttributes && !t) ? o : (r.settings.preferUnquoted && (l = xt(
|
|
14386
14385
|
t,
|
|
@@ -14412,7 +14411,7 @@ function du(r, e, t, a) {
|
|
|
14412
14411
|
function pu(r, e, t, a) {
|
|
14413
14412
|
return a.all(r);
|
|
14414
14413
|
}
|
|
14415
|
-
const fu =
|
|
14414
|
+
const fu = Ps("type", {
|
|
14416
14415
|
invalid: gu,
|
|
14417
14416
|
unknown: vu,
|
|
14418
14417
|
handlers: { comment: G1, doctype: H1, element: uu, raw: du, root: pu, text: is }
|
|
@@ -14454,7 +14453,7 @@ function xu(r, e) {
|
|
|
14454
14453
|
closeSelfClosing: t.closeSelfClosing || !1,
|
|
14455
14454
|
closeEmptyElements: t.closeEmptyElements || !1
|
|
14456
14455
|
},
|
|
14457
|
-
schema: t.space === "svg" ? Gn :
|
|
14456
|
+
schema: t.space === "svg" ? Gn : Os,
|
|
14458
14457
|
quote: a,
|
|
14459
14458
|
alternative: n
|
|
14460
14459
|
}.one(
|
|
@@ -14613,7 +14612,7 @@ function Kr(r) {
|
|
|
14613
14612
|
return typeof r == "string" ? r : Object.entries(r).map(([e, t]) => `${e}:${t}`).join(";");
|
|
14614
14613
|
}
|
|
14615
14614
|
const cs = /* @__PURE__ */ new WeakMap();
|
|
14616
|
-
function
|
|
14615
|
+
function Q0(r, e) {
|
|
14617
14616
|
cs.set(r, e);
|
|
14618
14617
|
}
|
|
14619
14618
|
function Vt(r) {
|
|
@@ -15155,7 +15154,7 @@ function Uu(r, e, t, a, n) {
|
|
|
15155
15154
|
e.name,
|
|
15156
15155
|
t.name
|
|
15157
15156
|
);
|
|
15158
|
-
return
|
|
15157
|
+
return Q0(i.tokens, s), i.tokens;
|
|
15159
15158
|
}
|
|
15160
15159
|
function ka(r, e, t, a, n) {
|
|
15161
15160
|
const i = _0(t, n), {
|
|
@@ -15324,7 +15323,7 @@ function ms(r, e, t) {
|
|
|
15324
15323
|
})),
|
|
15325
15324
|
n[0].state.lang
|
|
15326
15325
|
) : void 0;
|
|
15327
|
-
return l &&
|
|
15326
|
+
return l && Q0(s, l), s;
|
|
15328
15327
|
}
|
|
15329
15328
|
function Yu(...r) {
|
|
15330
15329
|
const e = r.map(() => []), t = r.length;
|
|
@@ -15367,7 +15366,7 @@ function B0(r, e, t) {
|
|
|
15367
15366
|
if (o = Vt(v), h && xa !== h && !g.find((A) => A.color === h))
|
|
15368
15367
|
throw new ae(`\`themes\` option must contain the defaultColor key \`${h}\``);
|
|
15369
15368
|
const w = g.map((A) => r.getTheme(A.theme)), S = g.map((A) => A.color);
|
|
15370
|
-
i = v.map((A) => A.map((k) => Nu(k, S, d, h, p))), o &&
|
|
15369
|
+
i = v.map((A) => A.map((k) => Nu(k, S, d, h, p))), o && Q0(i, o);
|
|
15371
15370
|
const T = g.map((A) => _0(A.theme, t));
|
|
15372
15371
|
n = In(g, w, T, d, h, "fg", p), a = In(g, w, T, d, h, "bg", p), s = `shiki-themes ${w.map((A) => A.name).join(" ")}`, l = h ? void 0 : [n, a].join(";");
|
|
15373
15372
|
} else if ("theme" in t) {
|
|
@@ -15428,7 +15427,7 @@ function I0(r, e, t, a = {
|
|
|
15428
15427
|
mergeWhitespaces: p = !0,
|
|
15429
15428
|
mergeSameStyleTokens: g = !1
|
|
15430
15429
|
} = t;
|
|
15431
|
-
p === !0 ? i =
|
|
15430
|
+
p === !0 ? i = Qu(i) : p === "never" && (i = Zu(i)), g && (i = ec(i));
|
|
15432
15431
|
const v = {
|
|
15433
15432
|
...a,
|
|
15434
15433
|
get source() {
|
|
@@ -15573,9 +15572,9 @@ function Ku(r, e, t, a = Vt(r)) {
|
|
|
15573
15572
|
let w = s;
|
|
15574
15573
|
for (const C of n)
|
|
15575
15574
|
w = ((k = C == null ? void 0 : C.root) == null ? void 0 : k.call(v, w)) || w;
|
|
15576
|
-
return a &&
|
|
15575
|
+
return a && Q0(w, a), w;
|
|
15577
15576
|
}
|
|
15578
|
-
function
|
|
15577
|
+
function Qu(r) {
|
|
15579
15578
|
return r.map((e) => {
|
|
15580
15579
|
const t = [];
|
|
15581
15580
|
let a = "", n;
|
|
@@ -15595,7 +15594,7 @@ function Zu(r) {
|
|
|
15595
15594
|
}), t;
|
|
15596
15595
|
});
|
|
15597
15596
|
}
|
|
15598
|
-
function
|
|
15597
|
+
function Zu(r) {
|
|
15599
15598
|
return r.map((e) => e.flatMap((t) => {
|
|
15600
15599
|
if (t.content.match(/^\s+$/))
|
|
15601
15600
|
return t;
|
|
@@ -18198,10 +18197,10 @@ let me = null;
|
|
|
18198
18197
|
function Ac(r) {
|
|
18199
18198
|
throw new Ta(r.UTF8ToString(r.getLastOnigError()));
|
|
18200
18199
|
}
|
|
18201
|
-
class
|
|
18200
|
+
class Z0 {
|
|
18202
18201
|
constructor(e) {
|
|
18203
18202
|
le(this, "utf16Length"), le(this, "utf8Length"), le(this, "utf16Value"), le(this, "utf8Value"), le(this, "utf16OffsetToUtf8"), le(this, "utf8OffsetToUtf16");
|
|
18204
|
-
const t = e.length, a =
|
|
18203
|
+
const t = e.length, a = Z0._utf8ByteLength(e), n = a !== t, i = n ? new Uint32Array(t + 1) : null;
|
|
18205
18204
|
n && (i[t] = a);
|
|
18206
18205
|
const s = n ? new Uint32Array(a + 1) : null;
|
|
18207
18206
|
n && (s[a] = t);
|
|
@@ -18241,7 +18240,7 @@ const er = class Be {
|
|
|
18241
18240
|
if (le(this, "id", ++Be.LAST_ID), le(this, "_onigBinding"), le(this, "content"), le(this, "utf16Length"), le(this, "utf8Length"), le(this, "utf16OffsetToUtf8"), le(this, "utf8OffsetToUtf16"), le(this, "ptr"), !me)
|
|
18242
18241
|
throw new Ta("Must invoke loadWasm first.");
|
|
18243
18242
|
this._onigBinding = me, this.content = e;
|
|
18244
|
-
const t = new
|
|
18243
|
+
const t = new Z0(e);
|
|
18245
18244
|
this.utf16Length = t.utf16Length, this.utf8Length = t.utf8Length, this.utf16OffsetToUtf8 = t.utf16OffsetToUtf8, this.utf8OffsetToUtf16 = t.utf8OffsetToUtf16, this.utf8Length < 1e4 && !Be._sharedPtrInUse ? (Be._sharedPtr || (Be._sharedPtr = me.omalloc(1e4)), Be._sharedPtrInUse = !0, me.HEAPU8.set(t.utf8Value, Be._sharedPtr), this.ptr = Be._sharedPtr) : this.ptr = t.createString(me);
|
|
18246
18245
|
}
|
|
18247
18246
|
convertUtf8OffsetToUtf16(e) {
|
|
@@ -18264,7 +18263,7 @@ class Tc {
|
|
|
18264
18263
|
throw new Ta("Must invoke loadWasm first.");
|
|
18265
18264
|
const t = [], a = [];
|
|
18266
18265
|
for (let l = 0, o = e.length; l < o; l++) {
|
|
18267
|
-
const h = new
|
|
18266
|
+
const h = new Z0(e[l]);
|
|
18268
18267
|
t[l] = h.createString(me), a[l] = h.utf8Length;
|
|
18269
18268
|
}
|
|
18270
18269
|
const n = me.omalloc(4 * e.length);
|
|
@@ -18717,7 +18716,7 @@ function ws(r) {
|
|
|
18717
18716
|
const e = [r.lang, r.meta ?? ""].filter((l) => !!l).join(" "), t = e.match(Gc), a = (s = t == null ? void 0 : t.groups) == null ? void 0 : s.title, n = r.lang && !r.lang.includes("showLineNumbers") && !r.lang.includes("title=") ? r.lang : "text", i = e.includes("showLineNumbers");
|
|
18718
18717
|
return { title: a, lang: n, showLineNumbers: i };
|
|
18719
18718
|
}
|
|
18720
|
-
const
|
|
18719
|
+
const Qr = (r) => r.reduce((e, t) => (t.type === "mdxJsxAttribute" && (e[t.name] = t), e), {}), Zr = (r, e) => {
|
|
18721
18720
|
const t = r[e];
|
|
18722
18721
|
if (!t)
|
|
18723
18722
|
return null;
|
|
@@ -18805,11 +18804,11 @@ function Kc(r) {
|
|
|
18805
18804
|
const e = r.split(/[\\/]/).pop() ?? "", t = e.lastIndexOf(".");
|
|
18806
18805
|
return t <= 0 ? "" : e.slice(t);
|
|
18807
18806
|
}
|
|
18808
|
-
const
|
|
18807
|
+
const Qc = { join: Yc, extname: Kc };
|
|
18809
18808
|
function Pt(r) {
|
|
18810
18809
|
return r.startsWith("\\\\?\\") ? r : r.replace(/\\/g, "/");
|
|
18811
18810
|
}
|
|
18812
|
-
const
|
|
18811
|
+
const Zc = /^https?:\/\//, qn = (r) => (r == null ? void 0 : r.type) === "paragraph" && Array.isArray(r.children) && r.children.length > 1, Ss = (r) => Ue("zoom", r), eh = (r, e) => Zc.test(r) ? r : r.startsWith("/") ? `${e}${r}` : `${e}/${r}`, th = (r, { alt: e, width: t, height: a, zoom: n }) => {
|
|
18813
18812
|
const i = t !== void 0 ? Ue("width", t) : void 0, s = a !== void 0 ? Ue("height", a) : void 0, l = n !== void 0 ? Ss(n) : void 0;
|
|
18814
18813
|
return Y0("Image", [], [Se("src", r), Se("alt", e), i, s, l]);
|
|
18815
18814
|
}, Fn = "./public", rh = ({ imageDir: r, basePath: e } = { imageDir: Fn }) => (r = r ?? Fn, () => async (a, n, i) => {
|
|
@@ -18828,7 +18827,7 @@ const Qc = /^https?:\/\//, qn = (r) => (r == null ? void 0 : r.type) === "paragr
|
|
|
18828
18827
|
});
|
|
18829
18828
|
const l = /* @__PURE__ */ new Map();
|
|
18830
18829
|
for (const o of s) {
|
|
18831
|
-
const h =
|
|
18830
|
+
const h = Qc.join(r, o);
|
|
18832
18831
|
l.has(o) || console.error("Image not found", h);
|
|
18833
18832
|
}
|
|
18834
18833
|
Le(a, "image", (o, h, d) => {
|
|
@@ -18844,9 +18843,9 @@ const Qc = /^https?:\/\//, qn = (r) => (r == null ? void 0 : r.type) === "paragr
|
|
|
18844
18843
|
{ type: "mdxJsxTextElement", name: "Image" }
|
|
18845
18844
|
], (o, h, d) => {
|
|
18846
18845
|
o = o;
|
|
18847
|
-
const p =
|
|
18846
|
+
const p = Qr(o.attributes);
|
|
18848
18847
|
let g = On(p, "width"), v = On(p, "height");
|
|
18849
|
-
const w =
|
|
18848
|
+
const w = Zr(p, "src");
|
|
18850
18849
|
let S = w ? Pt(decodeURI(w)) : void 0;
|
|
18851
18850
|
if (S) {
|
|
18852
18851
|
e && (p.src.value = eh(S, e));
|
|
@@ -18887,13 +18886,13 @@ const Qc = /^https?:\/\//, qn = (r) => (r == null ? void 0 : r.type) === "paragr
|
|
|
18887
18886
|
}, oh = () => (r) => {
|
|
18888
18887
|
const e = xs(r, { type: "mdxJsxFlowElement", name: "Tabs" });
|
|
18889
18888
|
for (const { node: t, index: a, parent: n } of e) {
|
|
18890
|
-
const i =
|
|
18889
|
+
const i = Qr(t.attributes);
|
|
18891
18890
|
if (i.items)
|
|
18892
18891
|
continue;
|
|
18893
|
-
const s =
|
|
18892
|
+
const s = Zr(i, "groupId"), l = [];
|
|
18894
18893
|
for (const p of t.children)
|
|
18895
18894
|
if (p.type === "mdxJsxFlowElement" && p.name === "Tab") {
|
|
18896
|
-
const g =
|
|
18895
|
+
const g = Qr(p.attributes), v = Zr(g, "value");
|
|
18897
18896
|
v && l.push(v);
|
|
18898
18897
|
}
|
|
18899
18898
|
const o = jr(l.map((p) => X0(p))), h = [];
|
|
@@ -18906,7 +18905,7 @@ const Qc = /^https?:\/\//, qn = (r) => (r == null ? void 0 : r.type) === "paragr
|
|
|
18906
18905
|
};
|
|
18907
18906
|
pt(n, a, d);
|
|
18908
18907
|
}
|
|
18909
|
-
},
|
|
18908
|
+
}, dh = (r = {}) => [
|
|
18910
18909
|
qs,
|
|
18911
18910
|
Vc,
|
|
18912
18911
|
Jc,
|
|
@@ -18921,5 +18920,5 @@ const Qc = /^https?:\/\//, qn = (r) => (r == null ? void 0 : r.type) === "paragr
|
|
|
18921
18920
|
];
|
|
18922
18921
|
export {
|
|
18923
18922
|
bs as highlightCode,
|
|
18924
|
-
|
|
18923
|
+
dh as remarkPlugins
|
|
18925
18924
|
};
|