manim-web 0.3.20 → 0.3.21

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.
Files changed (144) hide show
  1. package/dist/AmsConfiguration-BMyoprhk.js +847 -0
  2. package/dist/AmsConfiguration-BdxxYRby.js +847 -0
  3. package/dist/ConfigMacrosConfiguration-B8X_JSVI.js +46 -0
  4. package/dist/ConfigMacrosConfiguration-DUxp6DUV.js +46 -0
  5. package/dist/Entities-B1o7gN0J.js +429 -0
  6. package/dist/Entities-C82lnCux.js +429 -0
  7. package/dist/Factory-BKM7FEO-.js +107 -0
  8. package/dist/Factory-D-whCqrb.js +107 -0
  9. package/dist/{GifExporter-C9lP34Iu.js → GifExporter-BrxY_q7e.js} +1 -1
  10. package/dist/{GifExporter-DBak5Vk7.js → GifExporter-S2pbxMc5.js} +1 -1
  11. package/dist/HtmlNode-BLmQ2r7U.js +981 -0
  12. package/dist/HtmlNode-DXGeKrcW.js +981 -0
  13. package/dist/InputJax-DL9oUQY4.js +41 -0
  14. package/dist/InputJax-DnDWM3Y0.js +41 -0
  15. package/dist/NewcommandConfiguration-BPjclFig.js +32 -0
  16. package/dist/NewcommandConfiguration-bJ6P1rBY.js +32 -0
  17. package/dist/NewcommandMethods-C_E3iLoK.js +187 -0
  18. package/dist/NewcommandMethods-Cb7yFm5P.js +187 -0
  19. package/dist/Options-DRlTi0G8.js +63 -0
  20. package/dist/Options-XPptO-6X.js +63 -0
  21. package/dist/ParseMethods-BMPfzfQC.js +2636 -0
  22. package/dist/ParseMethods-D3_HeS1K.js +2636 -0
  23. package/dist/Styles-Dky5jZUe.js +293 -0
  24. package/dist/Styles-J-6R3Vr8.js +293 -0
  25. package/dist/{VideoExporter-Bdtz_pWv.js → VideoExporter-6ikT3u9H.js} +1 -1
  26. package/dist/{VideoExporter-Vjfsnv1h.js → VideoExporter-D_RxVahH.js} +1 -1
  27. package/dist/animation/Animation.d.ts +15 -0
  28. package/dist/animation/Animation.d.ts.map +1 -1
  29. package/dist/animation/transform/FadeMorphStrategy.d.ts +18 -0
  30. package/dist/animation/transform/FadeMorphStrategy.d.ts.map +1 -0
  31. package/dist/animation/transform/FadeTransforms.d.ts +2 -0
  32. package/dist/animation/transform/FadeTransforms.d.ts.map +1 -1
  33. package/dist/animation/transform/MorphStrategy.d.ts +8 -0
  34. package/dist/animation/transform/MorphStrategy.d.ts.map +1 -0
  35. package/dist/animation/transform/MovementTransforms.d.ts.map +1 -1
  36. package/dist/animation/transform/PointMorphStrategy.d.ts +36 -0
  37. package/dist/animation/transform/PointMorphStrategy.d.ts.map +1 -0
  38. package/dist/animation/transform/ShapeMorphStrategy.d.ts +39 -0
  39. package/dist/animation/transform/ShapeMorphStrategy.d.ts.map +1 -0
  40. package/dist/animation/transform/Transform.d.ts +9 -91
  41. package/dist/animation/transform/Transform.d.ts.map +1 -1
  42. package/dist/animation/transform/TransformMatching.d.ts.map +1 -1
  43. package/dist/animation/transform/TransformMatchingBase.d.ts +1 -0
  44. package/dist/animation/transform/TransformMatchingBase.d.ts.map +1 -1
  45. package/dist/animation/transform/TransformMatchingShared.d.ts +37 -0
  46. package/dist/animation/transform/TransformMatchingShared.d.ts.map +1 -0
  47. package/dist/animation/transform/TransformPairing.d.ts +19 -0
  48. package/dist/animation/transform/TransformPairing.d.ts.map +1 -0
  49. package/dist/core/AnimateProxy.d.ts +1 -0
  50. package/dist/core/AnimateProxy.d.ts.map +1 -1
  51. package/dist/core/Group.d.ts +2 -0
  52. package/dist/core/Group.d.ts.map +1 -1
  53. package/dist/core/Mobject.d.ts +6 -0
  54. package/dist/core/Mobject.d.ts.map +1 -1
  55. package/dist/core/Scene.d.ts.map +1 -1
  56. package/dist/core/TexturedMobject.d.ts +38 -0
  57. package/dist/core/TexturedMobject.d.ts.map +1 -0
  58. package/dist/core/ThreeDScene.d.ts +16 -3
  59. package/dist/core/ThreeDScene.d.ts.map +1 -1
  60. package/dist/core/VMobject.d.ts +34 -109
  61. package/dist/core/VMobject.d.ts.map +1 -1
  62. package/dist/core/VMobjectCurveUtils.d.ts +106 -0
  63. package/dist/core/VMobjectCurveUtils.d.ts.map +1 -0
  64. package/dist/core/VMobjectGeometry.d.ts +2 -15
  65. package/dist/core/VMobjectGeometry.d.ts.map +1 -1
  66. package/dist/core/VMobjectRendering.d.ts.map +1 -1
  67. package/dist/core/VMobjectStrokeGeometry.d.ts +20 -0
  68. package/dist/core/VMobjectStrokeGeometry.d.ts.map +1 -0
  69. package/dist/core/VMobjectTransformAlignment.d.ts +11 -0
  70. package/dist/core/VMobjectTransformAlignment.d.ts.map +1 -0
  71. package/dist/html-DU38zqaN.js +829 -0
  72. package/dist/html-DjkQuIHJ.js +829 -0
  73. package/dist/index.js +4 -4
  74. package/dist/integrations/react.js +5 -5
  75. package/dist/integrations/vue.js +7 -7
  76. package/dist/interaction/Draggable.d.ts +2 -0
  77. package/dist/interaction/Draggable.d.ts.map +1 -1
  78. package/dist/lengths-CP7zmbxJ.js +54 -0
  79. package/dist/lengths-D4tR1gYA.js +54 -0
  80. package/dist/liteAdaptor-BLgze3o2.js +616 -0
  81. package/dist/liteAdaptor-zXv-jsO1.js +616 -0
  82. package/dist/manim-web.browser.js +34463 -31055
  83. package/dist/mathjax-7LgaTjtj.js +121 -0
  84. package/dist/mathjax-CoSFlQ0H.js +121 -0
  85. package/dist/mo-C5uLT3Z9.js +2675 -0
  86. package/dist/mo-CNYDGAsg.js +2675 -0
  87. package/dist/mobjects/geometry/BooleanOperations.d.ts +1 -1
  88. package/dist/mobjects/geometry/BooleanOperations.d.ts.map +1 -1
  89. package/dist/mobjects/geometry/PolygonExtensions.d.ts +1 -1
  90. package/dist/mobjects/geometry/PolygonExtensions.d.ts.map +1 -1
  91. package/dist/mobjects/graphing/ComplexPlane.d.ts +18 -0
  92. package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -1
  93. package/dist/mobjects/image/index.d.ts +9 -2
  94. package/dist/mobjects/image/index.d.ts.map +1 -1
  95. package/dist/mobjects/text/MarkupText.d.ts.map +1 -1
  96. package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -1
  97. package/dist/mobjects/text/MathTexImage.d.ts +9 -3
  98. package/dist/mobjects/text/MathTexImage.d.ts.map +1 -1
  99. package/dist/mobjects/text/Text.d.ts +8 -3
  100. package/dist/mobjects/text/Text.d.ts.map +1 -1
  101. package/dist/mobjects/text/svgPathParser.d.ts.map +1 -1
  102. package/dist/mobjects/three-d/ThreeDAxes.d.ts +8 -0
  103. package/dist/mobjects/three-d/ThreeDAxes.d.ts.map +1 -1
  104. package/dist/{src-Db7QTr4S.js → src-CW4pfZdP.js} +32387 -28979
  105. package/dist/svg-CYweEoZ1.js +28698 -0
  106. package/dist/svg-swSF_J59.js +28698 -0
  107. package/dist/tex-C4_queV-.js +1423 -0
  108. package/dist/tex-CA5MLeEe.js +1423 -0
  109. package/dist/utils/math.d.ts +7 -0
  110. package/dist/utils/math.d.ts.map +1 -1
  111. package/package.json +3 -3
  112. package/dist/AllPackages-B0GtkYjD.js +0 -7912
  113. package/dist/AllPackages-BIAELuhU.js +0 -7912
  114. package/dist/BaseConfiguration-CDf44lxS.js +0 -4402
  115. package/dist/BaseConfiguration-Chcqjv9L.js +0 -4402
  116. package/dist/Entities-B_gwJfrn.js +0 -458
  117. package/dist/Entities-CmJkmuw_.js +0 -458
  118. package/dist/InputJax-C5sGfjJ8.js +0 -43
  119. package/dist/InputJax-Jb4hSThK.js +0 -43
  120. package/dist/MathItem-BmK41eqe.js +0 -77
  121. package/dist/MathItem-C_mZyaeT.js +0 -77
  122. package/dist/Options-Ch1vGsgd.js +0 -188
  123. package/dist/Options-V6ag48Dv.js +0 -188
  124. package/dist/PrioritizedList-DkoCmqPk.js +0 -36
  125. package/dist/PrioritizedList-eKTii0tW.js +0 -36
  126. package/dist/Styles-De4BjKiV.js +0 -411
  127. package/dist/Styles-DgoiBrzf.js +0 -411
  128. package/dist/TeXAtom-DT2wCvcU.js +0 -2025
  129. package/dist/TeXAtom-JogI0lus.js +0 -2025
  130. package/dist/html-53__O8r2.js +0 -1587
  131. package/dist/html-DfHFh5II.js +0 -1587
  132. package/dist/lengths-3epoqRj7.js +0 -65
  133. package/dist/lengths-B-bX9Tfk.js +0 -65
  134. package/dist/liteAdaptor-BxFvlO-q.js +0 -828
  135. package/dist/liteAdaptor-CsOIKw2g.js +0 -828
  136. package/dist/mathjax-Bkrmftxh.js +0 -102
  137. package/dist/mathjax-DBrTNl9C.js +0 -102
  138. package/dist/mo-AzagC5AD.js +0 -3271
  139. package/dist/mo-I_6dyJsk.js +0 -3271
  140. package/dist/svg-CoGQ_sAt.js +0 -23880
  141. package/dist/svg-DiIG93Lr.js +0 -23880
  142. package/dist/tex-ChPKMfdv.js +0 -401
  143. package/dist/tex-hYZcjadW.js +0 -401
  144. /package/dist/{chunk-3e0lkp8x.js → rolldown-runtime-DnwLefa7.js} +0 -0
@@ -0,0 +1,829 @@
1
+ import { a as e, i as t, n, o as r, t as i } from "./Options-XPptO-6X.js";
2
+ import { i as a, o, t as s } from "./mathjax-CoSFlQ0H.js";
3
+ import { _ as c, b as l, f as u, p as d, t as f, u as p, v as m } from "./mo-CNYDGAsg.js";
4
+ import { t as ee } from "./InputJax-DnDWM3Y0.js";
5
+ import { A as te, C as ne, D as re, E as ie, F as ae, I as oe, L as se, M as ce, N as le, O as ue, P as de, S as h, T as g, _, a as v, b as y, c as b, d as x, f as S, g as C, h as w, i as T, j as E, k as D, l as O, m as k, n as A, o as j, p as M, r as N, s as P, t as F, u as I, v as L, w as R, x as z, y as B } from "./HtmlNode-BLmQ2r7U.js";
6
+ import { i as fe, n as V, r as H, t as pe } from "./Factory-D-whCqrb.js";
7
+ //#region node_modules/@mathjax/src/mjs/util/LinkedList.js
8
+ var U = Symbol(), W = class {
9
+ constructor(e = null) {
10
+ this.next = null, this.prev = null, this.data = e;
11
+ }
12
+ }, me = class e {
13
+ constructor(...e) {
14
+ this.list = new W(U), this.list.next = this.list.prev = this.list, this.push(...e);
15
+ }
16
+ isBefore(e, t) {
17
+ return e < t;
18
+ }
19
+ push(...e) {
20
+ for (let t of e) {
21
+ let e = new W(t);
22
+ e.next = this.list, e.prev = this.list.prev, this.list.prev = e, e.prev.next = e;
23
+ }
24
+ return this;
25
+ }
26
+ pop() {
27
+ let e = this.list.prev;
28
+ return e.data === U ? null : (this.list.prev = e.prev, e.prev.next = this.list, e.next = e.prev = null, e.data);
29
+ }
30
+ unshift(...e) {
31
+ for (let t of e.slice(0).reverse()) {
32
+ let e = new W(t);
33
+ e.next = this.list.next, e.prev = this.list, this.list.next = e, e.next.prev = e;
34
+ }
35
+ return this;
36
+ }
37
+ shift() {
38
+ let e = this.list.next;
39
+ return e.data === U ? null : (this.list.next = e.next, e.next.prev = this.list, e.next = e.prev = null, e.data);
40
+ }
41
+ remove(...e) {
42
+ let t = /* @__PURE__ */ new Map();
43
+ for (let n of e) t.set(n, !0);
44
+ let n = this.list.next;
45
+ for (; n.data !== U;) {
46
+ let e = n.next;
47
+ t.has(n.data) && (n.prev.next = n.next, n.next.prev = n.prev, n.next = n.prev = null), n = e;
48
+ }
49
+ return this;
50
+ }
51
+ clear() {
52
+ return this.list.next.prev = this.list.prev.next = null, this.list.next = this.list.prev = this.list, this;
53
+ }
54
+ *[Symbol.iterator]() {
55
+ let e = this.list.next;
56
+ for (; e.data !== U;) yield e.data, e = e.next;
57
+ }
58
+ *reversed() {
59
+ let e = this.list.prev;
60
+ for (; e.data !== U;) yield e.data, e = e.prev;
61
+ }
62
+ insert(e, t = null) {
63
+ t === null && (t = this.isBefore.bind(this));
64
+ let n = new W(e), r = this.list.next;
65
+ for (; r.data !== U && t(r.data, n.data);) r = r.next;
66
+ return n.prev = r.prev, n.next = r, r.prev.next = r.prev = n, this;
67
+ }
68
+ sort(t = null) {
69
+ t === null && (t = this.isBefore.bind(this));
70
+ let n = [];
71
+ for (let t of this) n.push(new e(t));
72
+ for (this.list.next = this.list.prev = this.list; n.length > 1;) {
73
+ let e = n.shift(), r = n.shift();
74
+ e.merge(r, t), n.push(e);
75
+ }
76
+ return n.length && (this.list = n[0].list), this;
77
+ }
78
+ merge(e, t = null) {
79
+ t === null && (t = this.isBefore.bind(this));
80
+ let n = this.list.next, r = e.list.next;
81
+ for (; n.data !== U && r.data !== U;) t(r.data, n.data) ? ([r.prev.next, n.prev.next] = [n, r], [r.prev, n.prev] = [n.prev, r.prev], [this.list.prev.next, e.list.prev.next] = [e.list, this.list], [this.list.prev, e.list.prev] = [e.list.prev, this.list.prev], [n, r] = [r.next, n]) : n = n.next;
82
+ return r.data !== U && (this.list.prev.next = e.list.next, e.list.next.prev = this.list.prev, e.list.prev.next = this.list, this.list.prev = e.list.prev, e.list.next = e.list.prev = e.list), this;
83
+ }
84
+ }, he = class extends me {
85
+ isBefore(e, t) {
86
+ return e.start.i < t.start.i || e.start.i === t.start.i && e.start.n < t.start.n;
87
+ }
88
+ }, ge = class extends pe {
89
+ create(e, t = {}, n = []) {
90
+ return this.node[e](t, n);
91
+ }
92
+ }, G = class extends u {
93
+ get kind() {
94
+ return "mstyle";
95
+ }
96
+ get notParent() {
97
+ return this.childNodes[0] && this.childNodes[0].childNodes.length === 1;
98
+ }
99
+ setInheritedAttributes(e = {}, t = !1, n = 0, r = !1) {
100
+ this.attributes.setInherited("displaystyle", t), this.attributes.setInherited("scriptlevel", n), super.setInheritedAttributes(e, t, n, r);
101
+ }
102
+ setChildInheritedAttributes(e, t, n, r) {
103
+ let i = this.attributes.getExplicit("scriptlevel");
104
+ i != null && (i = i.toString(), i.match(/^\s*[-+]/) ? n += parseInt(i) : n = parseInt(i), r = !1);
105
+ let a = this.attributes.getExplicit("displaystyle");
106
+ a != null && (t = a === !0, r = !1);
107
+ let o = this.attributes.getExplicit("data-cramped");
108
+ o != null && (r = o), e = this.addInheritedAttributes(e, this.attributes.getAllAttributes()), this.childNodes[0].setInheritedAttributes(e, t, n, r);
109
+ }
110
+ };
111
+ G.defaults = Object.assign(Object.assign({}, u.defaults), {
112
+ scriptlevel: l,
113
+ displaystyle: l,
114
+ scriptsizemultiplier: 1 / Math.sqrt(2),
115
+ scriptminsize: ".4em",
116
+ mathbackground: l,
117
+ mathcolor: l,
118
+ dir: l,
119
+ infixlinebreakstyle: "before"
120
+ });
121
+ //#endregion
122
+ //#region node_modules/@mathjax/src/mjs/core/MmlTree/MmlNodes/maligngroup.js
123
+ var K = class extends u {
124
+ get kind() {
125
+ return "maligngroup";
126
+ }
127
+ get isSpacelike() {
128
+ return !0;
129
+ }
130
+ setChildInheritedAttributes(e, t, n, r) {
131
+ e = this.addInheritedAttributes(e, this.attributes.getAllAttributes()), super.setChildInheritedAttributes(e, t, n, r);
132
+ }
133
+ };
134
+ K.defaults = Object.assign(Object.assign({}, u.defaults), { groupalign: l });
135
+ //#endregion
136
+ //#region node_modules/@mathjax/src/mjs/core/MmlTree/MmlNodes/malignmark.js
137
+ var q = class extends d {
138
+ get kind() {
139
+ return "malignmark";
140
+ }
141
+ get arity() {
142
+ return 0;
143
+ }
144
+ get isSpacelike() {
145
+ return !0;
146
+ }
147
+ };
148
+ q.defaults = Object.assign(Object.assign({}, d.defaults), { edge: "left" });
149
+ //#endregion
150
+ //#region node_modules/@mathjax/src/mjs/core/MmlTree/MmlNodes/mathchoice.js
151
+ var J = class extends p {
152
+ get kind() {
153
+ return "MathChoice";
154
+ }
155
+ get arity() {
156
+ return 4;
157
+ }
158
+ get notParent() {
159
+ return !0;
160
+ }
161
+ setInheritedAttributes(e, t, n, r) {
162
+ let i = t ? 0 : Math.max(0, Math.min(n, 2)) + 1, a = this.childNodes[i] || this.factory.create("mrow");
163
+ this.parent.replaceChild(a, this), a.setInheritedAttributes(e, t, n, r);
164
+ }
165
+ };
166
+ J.defaults = Object.assign({}, p.defaults);
167
+ //#endregion
168
+ //#region node_modules/@mathjax/src/mjs/core/MmlTree/MML.js
169
+ var _e = {
170
+ [oe.prototype.kind]: oe,
171
+ [ae.prototype.kind]: ae,
172
+ [de.prototype.kind]: de,
173
+ [f.prototype.kind]: f,
174
+ [le.prototype.kind]: le,
175
+ [ce.prototype.kind]: ce,
176
+ [E.prototype.kind]: E,
177
+ [te.prototype.kind]: te,
178
+ [D.prototype.kind]: D,
179
+ [ue.prototype.kind]: ue,
180
+ [re.prototype.kind]: re,
181
+ [ie.prototype.kind]: ie,
182
+ [G.prototype.kind]: G,
183
+ [g.prototype.kind]: g,
184
+ [R.prototype.kind]: R,
185
+ [ne.prototype.kind]: ne,
186
+ [h.prototype.kind]: h,
187
+ [z.prototype.kind]: z,
188
+ [y.prototype.kind]: y,
189
+ [_.prototype.kind]: _,
190
+ [B.prototype.kind]: B,
191
+ [L.prototype.kind]: L,
192
+ [w.prototype.kind]: w,
193
+ [k.prototype.kind]: k,
194
+ [C.prototype.kind]: C,
195
+ [x.prototype.kind]: x,
196
+ [S.prototype.kind]: S,
197
+ [M.prototype.kind]: M,
198
+ [I.prototype.kind]: I,
199
+ [b.prototype.kind]: b,
200
+ [O.prototype.kind]: O,
201
+ [P.prototype.kind]: P,
202
+ [K.prototype.kind]: K,
203
+ [q.prototype.kind]: q,
204
+ [j.prototype.kind]: j,
205
+ [v.prototype.kind]: v,
206
+ [N.prototype.kind]: N,
207
+ [T.prototype.kind]: T,
208
+ [A.prototype.kind]: A,
209
+ [J.prototype.kind]: J,
210
+ [c.prototype.kind]: c,
211
+ [m.prototype.kind]: m,
212
+ [F.prototype.kind]: F
213
+ }, ve = class extends ge {
214
+ get MML() {
215
+ return this.node;
216
+ }
217
+ };
218
+ ve.defaultNodes = _e;
219
+ //#endregion
220
+ //#region node_modules/@mathjax/src/mjs/util/BitField.js
221
+ var Y = class e {
222
+ constructor() {
223
+ this.bits = 0;
224
+ }
225
+ static allocate(...t) {
226
+ for (let n of t) {
227
+ if (this.has(n)) throw Error("Bit already allocated for " + n);
228
+ if (this.next === e.MAXBIT) throw Error("Maximum number of bits already allocated");
229
+ this.names.set(n, this.next), this.next <<= 1;
230
+ }
231
+ }
232
+ static has(e) {
233
+ return this.names.has(e);
234
+ }
235
+ set(e) {
236
+ this.bits |= this.getBit(e);
237
+ }
238
+ clear(e) {
239
+ this.bits &= ~this.getBit(e);
240
+ }
241
+ isSet(e) {
242
+ return !!(this.bits & this.getBit(e));
243
+ }
244
+ reset() {
245
+ this.bits = 0;
246
+ }
247
+ getBit(e) {
248
+ let t = this.constructor.names.get(e);
249
+ if (!t) throw Error("Unknown bit-field name: " + e);
250
+ return t;
251
+ }
252
+ };
253
+ Y.MAXBIT = 1 << 31, Y.next = 1, Y.names = /* @__PURE__ */ new Map();
254
+ function ye(...e) {
255
+ let t = class extends Y {};
256
+ return t.allocate(...e), t;
257
+ }
258
+ //#endregion
259
+ //#region node_modules/@mathjax/src/mjs/core/MathDocument.js
260
+ var X = function(e, t, n, r) {
261
+ function i(e) {
262
+ return e instanceof n ? e : new n(function(t) {
263
+ t(e);
264
+ });
265
+ }
266
+ return new (n ||= Promise)(function(n, a) {
267
+ function o(e) {
268
+ try {
269
+ c(r.next(e));
270
+ } catch (e) {
271
+ a(e);
272
+ }
273
+ }
274
+ function s(e) {
275
+ try {
276
+ c(r.throw(e));
277
+ } catch (e) {
278
+ a(e);
279
+ }
280
+ }
281
+ function c(e) {
282
+ e.done ? n(e.value) : i(e.value).then(o, s);
283
+ }
284
+ c((r = r.apply(e, t || [])).next());
285
+ });
286
+ }, be = class extends o {
287
+ static create(e) {
288
+ let t = new this();
289
+ for (let n of Object.keys(e)) {
290
+ let [r, i] = this.action(n, e[n]);
291
+ i && t.add(r, i);
292
+ }
293
+ return t;
294
+ }
295
+ static action(e, t) {
296
+ let n, r, i = !0, a = t[0];
297
+ if (t.length === 1 || typeof t[1] == "boolean") t.length === 2 && (i = t[1]), [n, r] = this.methodActions(e);
298
+ else if (typeof t[1] == "string") if (typeof t[2] == "string") {
299
+ t.length === 4 && (i = t[3]);
300
+ let [e, a] = t.slice(1);
301
+ [n, r] = this.methodActions(e, a);
302
+ } else t.length === 3 && (i = t[2]), [n, r] = this.methodActions(t[1]);
303
+ else t.length === 4 && (i = t[3]), [n, r] = t.slice(1);
304
+ return [{
305
+ id: e,
306
+ renderDoc: n,
307
+ renderMath: r,
308
+ convert: i
309
+ }, a];
310
+ }
311
+ static methodActions(e, t = e) {
312
+ return [(t) => (e && t[e](), !1), (e, n) => (t && e[t](n), !1)];
313
+ }
314
+ renderDoc(e, t = H.UNPROCESSED) {
315
+ for (let n of this.items) if (n.priority >= t && n.item.renderDoc(e)) return;
316
+ }
317
+ renderMath(e, t, n = H.UNPROCESSED) {
318
+ for (let r of this.items) if (r.priority >= n && r.item.renderMath(e, t)) return;
319
+ }
320
+ renderConvert(e, t, n = H.LAST) {
321
+ for (let r of this.items) if (r.priority > n || r.item.convert && r.item.renderMath(e, t)) return;
322
+ }
323
+ findID(e) {
324
+ for (let t of this.items) if (t.item.id === e) return t.item;
325
+ return null;
326
+ }
327
+ }, xe = {
328
+ all: !1,
329
+ processed: !1,
330
+ inputJax: null,
331
+ outputJax: null
332
+ }, Se = {
333
+ all: !0,
334
+ processed: !0,
335
+ inputJax: [],
336
+ outputJax: []
337
+ }, Ce = class extends ee {
338
+ compile(e) {
339
+ return null;
340
+ }
341
+ }, we = class extends se {
342
+ typeset(e, t = null) {
343
+ return null;
344
+ }
345
+ escaped(e, t) {
346
+ return null;
347
+ }
348
+ }, Te = class extends he {}, Ee = class extends V {}, Z = class e {
349
+ constructor(t, n, a) {
350
+ let o = this.constructor;
351
+ this.document = t, this.options = r(i({}, o.OPTIONS), a), this.math = new (this.options.MathList || Te)(), this.renderActions = be.create(this.options.renderActions), this._actionPromises = [], this._readyPromise = Promise.resolve(), this.processed = new e.ProcessBits(), this.outputJax = this.options.OutputJax || new we();
352
+ let s = this.options.InputJax || [new Ce()];
353
+ Array.isArray(s) || (s = [s]), this.inputJax = s, this.adaptor = n, this.outputJax.setAdaptor(n), this.inputJax.map((e) => e.setAdaptor(n)), this.mmlFactory = this.options.MmlFactory || new ve(), this.inputJax.map((e) => e.setMmlFactory(this.mmlFactory)), this.outputJax.initialize(), this.inputJax.map((e) => e.initialize());
354
+ }
355
+ get kind() {
356
+ return this.constructor.KIND;
357
+ }
358
+ addRenderAction(e, ...t) {
359
+ let [n, r] = be.action(e, t);
360
+ this.renderActions.add(n, r);
361
+ }
362
+ removeRenderAction(e) {
363
+ let t = this.renderActions.findID(e);
364
+ t && this.renderActions.remove(t);
365
+ }
366
+ render() {
367
+ return this.clearPromises(), this.renderActions.renderDoc(this), this;
368
+ }
369
+ renderPromise() {
370
+ return this.whenReady(() => a(() => X(this, void 0, void 0, function* () {
371
+ return this.render(), yield this.actionPromises(), this.clearPromises(), this;
372
+ })));
373
+ }
374
+ rerender(e = H.RERENDER) {
375
+ return this.state(e - 1), this.render(), this;
376
+ }
377
+ rerenderPromise(e = H.RERENDER) {
378
+ return this.whenReady(() => a(() => X(this, void 0, void 0, function* () {
379
+ return this.rerender(e), yield this.actionPromises(), this.clearPromises(), this;
380
+ })));
381
+ }
382
+ convert(e, t = {}) {
383
+ let { format: n, display: i, end: a, ex: o, em: s, containerWidth: c, scale: l, family: u } = r({
384
+ format: this.inputJax[0].name,
385
+ display: !0,
386
+ end: H.LAST,
387
+ em: 16,
388
+ ex: 8,
389
+ containerWidth: null,
390
+ scale: 1,
391
+ family: ""
392
+ }, t);
393
+ c === null && (c = 80 * o);
394
+ let d = this.inputJax.reduce((e, t) => t.name === n ? t : e, null), f = new this.options.MathItem(e, d, i);
395
+ return f.start.node = this.adaptor.body(this.document), f.setMetrics(s, o, c, l), u && this.outputJax.options.mtextInheritFont && (f.outputData.mtextFamily = u), u && this.outputJax.options.merrorInheritFont && (f.outputData.merrorFamily = u), this.clearPromises(), f.convert(this, a), f.typesetRoot || f.root;
396
+ }
397
+ convertPromise(e, t = {}) {
398
+ return this.whenReady(() => a(() => X(this, void 0, void 0, function* () {
399
+ let n = this.convert(e, t);
400
+ return yield this.actionPromises(), this.clearPromises(), n;
401
+ })));
402
+ }
403
+ whenReady(e) {
404
+ return this._readyPromise = this._readyPromise.catch((e) => {}).then(() => {
405
+ let t = this._readyPromise;
406
+ this._readyPromise = Promise.resolve();
407
+ let n = e(), r = this._readyPromise.then(() => n);
408
+ return this._readyPromise = t, r;
409
+ });
410
+ }
411
+ actionPromises() {
412
+ return Promise.all(this._actionPromises);
413
+ }
414
+ clearPromises() {
415
+ this._actionPromises = [];
416
+ }
417
+ savePromise(e) {
418
+ this._actionPromises.push(e);
419
+ }
420
+ findMath(e = null) {
421
+ return this.processed.set("findMath"), this;
422
+ }
423
+ compile() {
424
+ if (!this.processed.isSet("compile")) {
425
+ let e = [];
426
+ for (let t of this.math) this.compileMath(t), t.inputData.recompile !== void 0 && e.push(t);
427
+ for (let t of e) {
428
+ let e = t.inputData.recompile;
429
+ t.state(e.state), t.inputData.recompile = e, this.compileMath(t);
430
+ }
431
+ this.processed.set("compile");
432
+ }
433
+ return this;
434
+ }
435
+ compileMath(e) {
436
+ try {
437
+ e.compile(this);
438
+ } catch (t) {
439
+ if (t.retry || t.restart) throw t;
440
+ this.options.compileError(this, e, t), e.inputData.error = t;
441
+ }
442
+ }
443
+ compileError(e, t) {
444
+ e.root = this.mmlFactory.create("math", null, [this.mmlFactory.create("merror", {
445
+ "data-mjx-error": t.message,
446
+ title: t.message
447
+ }, [this.mmlFactory.create("mtext", null, [this.mmlFactory.create("text").setText("Math input error")])])]), e.display && e.root.attributes.set("display", "block"), e.inputData.error = t.message;
448
+ }
449
+ typeset() {
450
+ if (!this.processed.isSet("typeset")) {
451
+ for (let e of this.math) try {
452
+ e.typeset(this);
453
+ } catch (t) {
454
+ if (t.retry || t.restart) throw t;
455
+ this.options.typesetError(this, e, t), e.outputData.error = t;
456
+ }
457
+ this.processed.set("typeset");
458
+ }
459
+ return this;
460
+ }
461
+ typesetError(e, t) {
462
+ e.typesetRoot = this.adaptor.node("mjx-container", {
463
+ class: "MathJax mjx-output-error",
464
+ jax: this.outputJax.name
465
+ }, [this.adaptor.node("span", {
466
+ "data-mjx-error": t.message,
467
+ title: t.message,
468
+ style: {
469
+ color: "red",
470
+ "background-color": "yellow",
471
+ "line-height": "normal"
472
+ }
473
+ }, [this.adaptor.text("Math output error")])]), e.display && this.adaptor.setAttributes(e.typesetRoot, { style: {
474
+ display: "block",
475
+ margin: "1em 0",
476
+ "text-align": "center"
477
+ } }), e.outputData.error = t.message;
478
+ }
479
+ getMetrics() {
480
+ return this.processed.isSet("getMetrics") || (this.outputJax.getMetrics(this), this.processed.set("getMetrics")), this;
481
+ }
482
+ updateDocument() {
483
+ if (!this.processed.isSet("updateDocument")) {
484
+ for (let e of this.math.reversed()) e.updateDocument(this);
485
+ this.processed.set("updateDocument");
486
+ }
487
+ return this;
488
+ }
489
+ removeFromDocument(e = !1) {
490
+ return this;
491
+ }
492
+ state(e, t = !1) {
493
+ for (let n of this.math) n.state(e, t);
494
+ return e < H.INSERTED && this.processed.clear("updateDocument"), e < H.TYPESET && (this.processed.clear("typeset"), this.processed.clear("getMetrics")), e < H.COMPILED && this.processed.clear("compile"), e < H.FINDMATH && this.processed.clear("findMath"), this;
495
+ }
496
+ reset(e = { processed: !0 }) {
497
+ return e = r(Object.assign({}, xe), e), e.all && Object.assign(e, Se), e.processed && this.processed.reset(), e.inputJax && this.inputJax.forEach((t) => t.reset(...e.inputJax)), e.outputJax && this.outputJax.reset(...e.outputJax), this;
498
+ }
499
+ clear() {
500
+ return this.reset(), this.math.clear(), this;
501
+ }
502
+ done() {
503
+ return Promise.resolve();
504
+ }
505
+ concat(e) {
506
+ return this.math.merge(e), this;
507
+ }
508
+ clearMathItemsWithin(e) {
509
+ let t = this.getMathItemsWithin(e);
510
+ for (let e of t.slice(0).reverse()) e.clear();
511
+ return this.math.remove(...t), t;
512
+ }
513
+ getMathItemsWithin(e) {
514
+ Array.isArray(e) || (e = [e]);
515
+ let t = this.adaptor, n = [], r = t.getElements(e, this.document);
516
+ ITEMS: for (let e of this.math) for (let i of r) if (e.start.node && t.contains(i, e.start.node)) {
517
+ n.push(e);
518
+ continue ITEMS;
519
+ }
520
+ return n;
521
+ }
522
+ };
523
+ Z.KIND = "MathDocument", Z.OPTIONS = {
524
+ OutputJax: null,
525
+ InputJax: null,
526
+ MmlFactory: null,
527
+ MathList: Te,
528
+ MathItem: Ee,
529
+ compileError: (e, t, n) => {
530
+ e.compileError(t, n);
531
+ },
532
+ typesetError: (e, t, n) => {
533
+ e.typesetError(t, n);
534
+ },
535
+ renderActions: n({
536
+ find: [
537
+ H.FINDMATH,
538
+ "findMath",
539
+ "",
540
+ !1
541
+ ],
542
+ compile: [H.COMPILED],
543
+ metrics: [
544
+ H.METRICS,
545
+ "getMetrics",
546
+ "",
547
+ !1
548
+ ],
549
+ typeset: [H.TYPESET],
550
+ update: [
551
+ H.INSERTED,
552
+ "updateDocument",
553
+ !1
554
+ ]
555
+ })
556
+ }, Z.ProcessBits = ye("findMath", "compile", "getMetrics", "typeset", "updateDocument");
557
+ //#endregion
558
+ //#region node_modules/@mathjax/src/mjs/core/Handler.js
559
+ var De = class extends Z {}, Oe = class {
560
+ constructor(e, t = 5) {
561
+ this.documentClass = De, this.adaptor = e, this.priority = t;
562
+ }
563
+ get name() {
564
+ return this.constructor.NAME;
565
+ }
566
+ handlesDocument(e) {
567
+ return !1;
568
+ }
569
+ create(e, t) {
570
+ return new this.documentClass(e, this.adaptor, t);
571
+ }
572
+ };
573
+ Oe.NAME = "generic";
574
+ //#endregion
575
+ //#region node_modules/@mathjax/src/mjs/handlers/html/HTMLMathItem.js
576
+ var ke = class extends V {
577
+ get adaptor() {
578
+ return this.inputJax.adaptor;
579
+ }
580
+ constructor(e, t, n = !0, r = {
581
+ node: null,
582
+ n: 0,
583
+ delim: ""
584
+ }, i = {
585
+ node: null,
586
+ n: 0,
587
+ delim: ""
588
+ }) {
589
+ super(e, t, n, r, i);
590
+ }
591
+ updateDocument(e) {
592
+ if (this.state() < H.INSERTED) {
593
+ if (this.inputJax.processStrings) {
594
+ let e = this.start.node;
595
+ if (e === this.end.node) this.end.n && this.end.n < this.adaptor.value(this.end.node).length && this.adaptor.split(this.end.node, this.end.n), this.start.n && (e = this.adaptor.split(this.start.node, this.start.n)), this.adaptor.parent(e) && this.adaptor.replace(this.typesetRoot, e);
596
+ else {
597
+ for (this.start.n && (e = this.adaptor.split(e, this.start.n)); e !== this.end.node;) {
598
+ let t = this.adaptor.next(e);
599
+ this.adaptor.remove(e), e = t;
600
+ }
601
+ this.adaptor.insert(this.typesetRoot, e), this.end.n < this.adaptor.value(e).length && this.adaptor.split(e, this.end.n), this.adaptor.remove(e);
602
+ }
603
+ } else this.adaptor.replace(this.typesetRoot, this.start.node);
604
+ this.start.node = this.end.node = this.typesetRoot, this.start.n = this.end.n = 0, this.state(H.INSERTED);
605
+ }
606
+ }
607
+ updateStyleSheet(e) {
608
+ e.addStyleSheet();
609
+ }
610
+ removeFromDocument(e = !1) {
611
+ if (super.removeFromDocument(e), this.state() >= H.TYPESET) {
612
+ let t = this.adaptor, n = this.start.node, r = t.text("");
613
+ if (e) {
614
+ let e = this.start.delim + this.math + this.end.delim;
615
+ if (this.inputJax.processStrings) r = t.text(e);
616
+ else {
617
+ let n = t.parse(e, "text/html");
618
+ r = t.firstChild(t.body(n));
619
+ }
620
+ }
621
+ t.parent(n) && t.replace(r, n), this.start.node = this.end.node = r, this.start.n = this.end.n = 0;
622
+ }
623
+ }
624
+ }, Ae = class extends he {}, Q = class {
625
+ constructor(e = null) {
626
+ let t = this.constructor;
627
+ this.options = r(i({}, t.OPTIONS), e), this.init(), this.getPatterns();
628
+ }
629
+ init() {
630
+ this.strings = [], this.string = "", this.snodes = [], this.nodes = [], this.stack = [];
631
+ }
632
+ getPatterns() {
633
+ let e = t(this.options.skipHtmlTags), n = t(this.options.ignoreHtmlClass), r = t(this.options.processHtmlClass);
634
+ this.skipHtmlTags = RegExp("^(?:" + e.join("|") + ")$", "i"), this.ignoreHtmlClass = RegExp("(?:^| )(?:" + n.join("|") + ")(?: |$)"), this.processHtmlClass = RegExp("(?:^| )(?:" + r + ")(?: |$)");
635
+ }
636
+ pushString() {
637
+ this.string.match(/\S/) && (this.strings.push(this.string), this.nodes.push(this.snodes)), this.string = "", this.snodes = [];
638
+ }
639
+ extendString(e, t) {
640
+ this.snodes.push([e, t.length]), this.string += t;
641
+ }
642
+ handleText(e, t) {
643
+ return t || this.extendString(e, this.adaptor.value(e)), this.adaptor.next(e);
644
+ }
645
+ handleTag(e, t) {
646
+ if (!t) {
647
+ let t = this.options.includeHtmlTags[this.adaptor.kind(e)];
648
+ t instanceof Function ? this.extendString(e, t(e, this.adaptor)) : this.extendString(e, t);
649
+ }
650
+ return this.adaptor.next(e);
651
+ }
652
+ handleContainer(e, t) {
653
+ this.pushString();
654
+ let n = this.adaptor.getAttribute(e, "class") || "", r = this.adaptor.kind(e) || "", i = this.processHtmlClass.exec(n), a = e;
655
+ return this.adaptor.firstChild(e) && !this.adaptor.getAttribute(e, "data-MJX") && (i || !this.skipHtmlTags.exec(r)) ? (this.adaptor.next(e) && this.stack.push([this.adaptor.next(e), t]), a = this.adaptor.firstChild(e), t = (t || this.ignoreHtmlClass.exec(n)) && !i) : a = this.adaptor.next(e), [a, t];
656
+ }
657
+ handleOther(e, t) {
658
+ return this.pushString(), this.adaptor.next(e);
659
+ }
660
+ find(e) {
661
+ this.init();
662
+ let t = this.adaptor.next(e), n = !1, r = this.options.includeHtmlTags;
663
+ for (; e && e !== t;) {
664
+ let t = this.adaptor.kind(e);
665
+ t === "#text" ? e = this.handleText(e, n) : Object.hasOwn(r, t) ? e = this.handleTag(e, n) : t ? [e, n] = this.handleContainer(e, n) : e = this.handleOther(e, n), !e && this.stack.length && (this.pushString(), [e, n] = this.stack.pop());
666
+ }
667
+ this.pushString();
668
+ let i = [this.strings, this.nodes];
669
+ return this.init(), i;
670
+ }
671
+ };
672
+ //#endregion
673
+ //#region node_modules/@mathjax/src/mjs/handlers/html/HTMLDocument.js
674
+ Q.OPTIONS = {
675
+ skipHtmlTags: [
676
+ "script",
677
+ "noscript",
678
+ "style",
679
+ "textarea",
680
+ "pre",
681
+ "code",
682
+ "math",
683
+ "select",
684
+ "option",
685
+ "mjx-container"
686
+ ],
687
+ includeHtmlTags: n({
688
+ br: "\n",
689
+ wbr: "",
690
+ "#comment": ""
691
+ }),
692
+ ignoreHtmlClass: "mathjax_ignore",
693
+ processHtmlClass: "mathjax_process"
694
+ }, fe("STYLES", H.INSERTED + 1);
695
+ var $ = class extends Z {
696
+ constructor(t, n, r) {
697
+ let [i, a] = e(r, Q.OPTIONS);
698
+ super(t, n, i), this.domStrings = this.options.DomStrings || new Q(a), this.domStrings.adaptor = n, this.styles = [];
699
+ }
700
+ findPosition(e, t, n, r) {
701
+ let i = this.adaptor, a = 1 / (r[e].length || 1), o = e;
702
+ for (let [s, c] of r[e]) {
703
+ if (t <= c && i.kind(s) === "#text") return {
704
+ i: o,
705
+ node: s,
706
+ n: Math.max(t, 0),
707
+ delim: n
708
+ };
709
+ t -= c, o += a;
710
+ }
711
+ return {
712
+ node: null,
713
+ n: 0,
714
+ delim: n
715
+ };
716
+ }
717
+ mathItem(e, t, n) {
718
+ let r = e.math, i = this.findPosition(e.n, e.start.n, e.open, n), a = this.findPosition(e.n, e.end.n, e.close, n);
719
+ return new this.options.MathItem(r, t, e.display, i, a);
720
+ }
721
+ findMath(e) {
722
+ if (!this.processed.isSet("findMath")) {
723
+ this.adaptor.document = this.document, e = r({ elements: this.options.elements || [this.adaptor.body(this.document)] }, e);
724
+ let t = this.adaptor.getElements(e.elements, this.document);
725
+ for (let e of this.inputJax) {
726
+ let n = e.processStrings ? this.findMathFromStrings(e, t) : this.findMathFromDOM(e, t);
727
+ this.math.merge(n);
728
+ }
729
+ this.processed.set("findMath");
730
+ }
731
+ return this;
732
+ }
733
+ findMathFromStrings(e, t) {
734
+ let n = [], r = [];
735
+ for (let e of t) {
736
+ let [t, i] = this.domStrings.find(e);
737
+ n.push(...t), r.push(...i);
738
+ }
739
+ let i = new this.options.MathList();
740
+ for (let t of e.findMath(n)) i.push(this.mathItem(t, e, r));
741
+ return i;
742
+ }
743
+ findMathFromDOM(e, t) {
744
+ let n = [];
745
+ for (let r of t) for (let t of e.findMath(r)) n.push(new this.options.MathItem(t.math, e, t.display, t.start, t.end));
746
+ return new this.options.MathList(...n);
747
+ }
748
+ updateDocument() {
749
+ return this.processed.isSet("updateDocument") || (this.addPageElements(), this.addStyleSheet(), super.updateDocument(), this.processed.set("updateDocument")), this;
750
+ }
751
+ addPageElements() {
752
+ let e = this.adaptor, t = e.body(this.document), n = this.documentPageElements();
753
+ if (n) {
754
+ let r = e.firstChild(t);
755
+ r ? e.insert(n, r) : e.append(t, n);
756
+ }
757
+ }
758
+ addStyleSheet() {
759
+ let e = this.documentStyleSheet(), t = this.adaptor;
760
+ if (e && !t.parent(e)) {
761
+ let n = t.head(this.document), r = this.findSheet(n, t.getAttribute(e, "id"));
762
+ r ? t.replace(e, r) : t.append(n, e);
763
+ }
764
+ }
765
+ findSheet(e, t) {
766
+ if (t) {
767
+ for (let n of this.adaptor.tags(e, "style")) if (this.adaptor.getAttribute(n, "id") === t) return n;
768
+ }
769
+ return null;
770
+ }
771
+ removeFromDocument(e = !1) {
772
+ if (this.processed.isSet("updateDocument")) for (let t of this.math) t.state() >= H.INSERTED && t.state(H.TYPESET, e);
773
+ return this.processed.clear("updateDocument"), this;
774
+ }
775
+ documentStyleSheet() {
776
+ return this.outputJax.styleSheet(this);
777
+ }
778
+ documentPageElements() {
779
+ return this.outputJax.pageElements(this);
780
+ }
781
+ addStyles(e) {
782
+ this.styles.push(e), "insertStyles" in this.outputJax && this.outputJax.insertStyles(e);
783
+ }
784
+ getStyles() {
785
+ return this.styles;
786
+ }
787
+ };
788
+ $.KIND = "HTML", $.OPTIONS = Object.assign(Object.assign({}, Z.OPTIONS), {
789
+ renderActions: n(Object.assign(Object.assign({}, Z.OPTIONS.renderActions), { styles: [
790
+ H.STYLES,
791
+ "",
792
+ "updateStyleSheet",
793
+ !1
794
+ ] })),
795
+ MathList: Ae,
796
+ MathItem: ke,
797
+ DomStrings: null
798
+ });
799
+ //#endregion
800
+ //#region node_modules/@mathjax/src/mjs/handlers/html/HTMLHandler.js
801
+ var je = class extends Oe {
802
+ constructor() {
803
+ super(...arguments), this.documentClass = $;
804
+ }
805
+ handlesDocument(e) {
806
+ let t = this.adaptor;
807
+ if (typeof e == "string") try {
808
+ e = t.parse(e, "text/html");
809
+ } catch {}
810
+ return e instanceof t.window.Document || e instanceof t.window.HTMLElement || e instanceof t.window.DocumentFragment;
811
+ }
812
+ create(e, t) {
813
+ let n = this.adaptor;
814
+ if (typeof e == "string") e = n.parse(e, "text/html");
815
+ else if (e instanceof n.window.HTMLElement || e instanceof n.window.DocumentFragment) {
816
+ let t = e;
817
+ e = n.parse("", "text/html"), n.append(n.body(e), t);
818
+ }
819
+ return super.create(e, t);
820
+ }
821
+ };
822
+ //#endregion
823
+ //#region node_modules/@mathjax/src/mjs/handlers/html.js
824
+ function Me(e) {
825
+ let t = new je(e);
826
+ return s.handlers.register(t), t;
827
+ }
828
+ //#endregion
829
+ export { Me as RegisterHTMLHandler };