manim-web 0.3.18 → 0.3.19
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/README.md +26 -40
- package/dist/AllPackages-C4Ha3Jps.js +7912 -0
- package/dist/AllPackages-Dwxf_-Ps.js +7912 -0
- package/dist/BaseConfiguration-D2fikupy.js +4402 -0
- package/dist/BaseConfiguration-DYpI8zxb.js +4402 -0
- package/dist/Entities-BxzKxtF2.js +458 -0
- package/dist/Entities-gIbwAkB6.js +458 -0
- package/dist/GifExporter-7EpPGupp.js +338 -0
- package/dist/GifExporter-DCrSD6FV.js +338 -0
- package/dist/InputJax-BszJvLkW.js +43 -0
- package/dist/InputJax-CgHBfQsv.js +43 -0
- package/dist/MathItem-4gYKatZT.js +77 -0
- package/dist/MathItem-BGJUnd1K.js +77 -0
- package/dist/Options-CQim5zsr.js +188 -0
- package/dist/Options-Cn9jv1mh.js +188 -0
- package/dist/PrioritizedList-C1R4aNEC.js +36 -0
- package/dist/PrioritizedList-lIkFMNlo.js +36 -0
- package/dist/Styles-Bi9Db-2J.js +411 -0
- package/dist/Styles-CzHPc-An.js +411 -0
- package/dist/TeXAtom-Cinii27y.js +2025 -0
- package/dist/TeXAtom-DFdvwkN2.js +2025 -0
- package/dist/VideoExporter-6w8xBpcV.js +102 -0
- package/dist/VideoExporter-DdQb18dC.js +102 -0
- package/dist/animation/creation/Create.d.ts +1 -1
- package/dist/animation/movement/Rotate.d.ts +2 -0
- package/dist/animation/movement/Rotate.d.ts.map +1 -1
- package/dist/animation/movement/Scale.d.ts +2 -0
- package/dist/animation/movement/Scale.d.ts.map +1 -1
- package/dist/animation/transform/ApplyTransforms.d.ts +1 -2
- package/dist/animation/transform/ApplyTransforms.d.ts.map +1 -1
- package/dist/animation/utility/index.d.ts +2 -0
- package/dist/animation/utility/index.d.ts.map +1 -1
- package/dist/chunk-DeC0fbbY.js +23 -0
- package/dist/core/Group.d.ts +2 -2
- package/dist/core/Group.d.ts.map +1 -1
- package/dist/core/Mobject.d.ts +26 -6
- package/dist/core/Mobject.d.ts.map +1 -1
- package/dist/core/MobjectState.d.ts +23 -2
- package/dist/core/MobjectState.d.ts.map +1 -1
- package/dist/core/Scene.d.ts +7 -1
- package/dist/core/Scene.d.ts.map +1 -1
- package/dist/core/ThreeDScene.d.ts +17 -0
- package/dist/core/ThreeDScene.d.ts.map +1 -1
- package/dist/core/VGroup.d.ts +1 -1
- package/dist/core/VGroup.d.ts.map +1 -1
- package/dist/html-DKkfg_ss.js +1587 -0
- package/dist/html-DpiYkktJ.js +1587 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -579
- package/dist/integrations/react.js +144 -735
- package/dist/integrations/vue.js +109 -735
- package/dist/interaction/Draggable.d.ts.map +1 -1
- package/dist/lengths-C0YS8_KC.js +65 -0
- package/dist/lengths-eBH2o1TO.js +65 -0
- package/dist/liteAdaptor-CB8lQj3d.js +828 -0
- package/dist/liteAdaptor-DvuW8HsZ.js +828 -0
- package/dist/manim-web.browser.js +72327 -83816
- package/dist/mathjax-BVz9WLAG.js +105 -0
- package/dist/mathjax-BbWkqal4.js +2 -0
- package/dist/mathjax-BrFZxFhK.js +2 -0
- package/dist/mathjax-DdKmwllV.js +105 -0
- package/dist/mo-B60kIOAG.js +3271 -0
- package/dist/mo-cSv2058o.js +3271 -0
- package/dist/mobjects/geometry/AngleShapes.d.ts +8 -0
- package/dist/mobjects/geometry/AngleShapes.d.ts.map +1 -1
- package/dist/mobjects/geometry/DashedLine.d.ts +2 -2
- package/dist/mobjects/geometry/DashedLine.d.ts.map +1 -1
- package/dist/mobjects/graphing/Axes.d.ts +2 -2
- package/dist/mobjects/graphing/Axes.d.ts.map +1 -1
- package/dist/mobjects/graphing/ComplexPlane.d.ts +4 -1
- package/dist/mobjects/graphing/ComplexPlane.d.ts.map +1 -1
- package/dist/mobjects/matrix/Matrix.d.ts +2 -2
- package/dist/mobjects/matrix/Matrix.d.ts.map +1 -1
- package/dist/mobjects/point/PGroup.d.ts +1 -1
- package/dist/mobjects/point/PGroup.d.ts.map +1 -1
- package/dist/mobjects/point/PMobject.d.ts +1 -1
- package/dist/mobjects/point/PMobject.d.ts.map +1 -1
- package/dist/mobjects/svg/Brace.d.ts +3 -3
- package/dist/mobjects/svg/Brace.d.ts.map +1 -1
- package/dist/mobjects/table/Table.d.ts +4 -4
- package/dist/mobjects/table/Table.d.ts.map +1 -1
- package/dist/mobjects/text/MathJaxRenderer.d.ts.map +1 -1
- package/dist/mobjects/text/MathTex.d.ts +61 -202
- package/dist/mobjects/text/MathTex.d.ts.map +1 -1
- package/dist/mobjects/text/MathTexImage.d.ts +254 -0
- package/dist/mobjects/text/MathTexImage.d.ts.map +1 -0
- package/dist/mobjects/text/MathTexParts.d.ts +10 -10
- package/dist/mobjects/text/MathTexParts.d.ts.map +1 -1
- package/dist/mobjects/text/Tex.d.ts +2 -7
- package/dist/mobjects/text/Tex.d.ts.map +1 -1
- package/dist/mobjects/text/Variable.d.ts +5 -5
- package/dist/mobjects/text/Variable.d.ts.map +1 -1
- package/dist/mobjects/text/index.d.ts +2 -2
- package/dist/mobjects/text/index.d.ts.map +1 -1
- package/dist/mobjects/text/svgPathParser.d.ts.map +1 -1
- package/dist/player/Player.d.ts +8 -2
- package/dist/player/Player.d.ts.map +1 -1
- package/dist/player/PlayerController.d.ts +2 -0
- package/dist/player/PlayerController.d.ts.map +1 -1
- package/dist/player/PlayerUI.d.ts +5 -0
- package/dist/player/PlayerUI.d.ts.map +1 -1
- package/dist/src-0ifQdJUj.js +59703 -0
- package/dist/svg-BDTt4xHZ.js +23879 -0
- package/dist/svg-DzbC3CbJ.js +23879 -0
- package/dist/tex-CRhAZgfS.js +401 -0
- package/dist/tex-D3LEgNlQ.js +401 -0
- package/dist/utils/math.d.ts +7 -0
- package/dist/utils/math.d.ts.map +1 -1
- package/package.json +3 -2
- package/dist/featureFlags-H97tY2Rw.js +0 -59814
- package/dist/mobjects/text/MathTexSVG.d.ts +0 -102
- package/dist/mobjects/text/MathTexSVG.d.ts.map +0 -1
|
@@ -0,0 +1,4402 @@
|
|
|
1
|
+
import { t as e } from "./chunk-DeC0fbbY.js";
|
|
2
|
+
import { t } from "./Options-CQim5zsr.js";
|
|
3
|
+
import { t as n } from "./PrioritizedList-C1R4aNEC.js";
|
|
4
|
+
import { t as r } from "./Entities-BxzKxtF2.js";
|
|
5
|
+
import { i, o as a, r as o, s, t as c } from "./mo-cSv2058o.js";
|
|
6
|
+
import { t as l } from "./lengths-C0YS8_KC.js";
|
|
7
|
+
//#region node_modules/mathjax-full/js/input/tex/NodeUtil.js
|
|
8
|
+
var u = /* @__PURE__ */ e(((e) => {
|
|
9
|
+
var t = e && e.__values || function(e) {
|
|
10
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
11
|
+
if (n) return n.call(e);
|
|
12
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
13
|
+
return e && r >= e.length && (e = void 0), {
|
|
14
|
+
value: e && e[r++],
|
|
15
|
+
done: !e
|
|
16
|
+
};
|
|
17
|
+
} };
|
|
18
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
19
|
+
}, n = e && e.__read || function(e, t) {
|
|
20
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
21
|
+
if (!n) return e;
|
|
22
|
+
var r = n.call(e), i, a = [], o;
|
|
23
|
+
try {
|
|
24
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
25
|
+
} catch (e) {
|
|
26
|
+
o = { error: e };
|
|
27
|
+
} finally {
|
|
28
|
+
try {
|
|
29
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
30
|
+
} finally {
|
|
31
|
+
if (o) throw o.error;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return a;
|
|
35
|
+
}, r = e && e.__spreadArray || function(e, t, n) {
|
|
36
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
37
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
38
|
+
};
|
|
39
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
40
|
+
var a = i(), o = c(), s;
|
|
41
|
+
(function(e) {
|
|
42
|
+
var i = new Map([
|
|
43
|
+
["autoOP", !0],
|
|
44
|
+
["fnOP", !0],
|
|
45
|
+
["movesupsub", !0],
|
|
46
|
+
["subsupOK", !0],
|
|
47
|
+
["texprimestyle", !0],
|
|
48
|
+
["useHeight", !0],
|
|
49
|
+
["variantForm", !0],
|
|
50
|
+
["withDelims", !0],
|
|
51
|
+
["mathaccent", !0],
|
|
52
|
+
["open", !0],
|
|
53
|
+
["close", !0]
|
|
54
|
+
]);
|
|
55
|
+
function s(e) {
|
|
56
|
+
return String.fromCodePoint(parseInt(e, 16));
|
|
57
|
+
}
|
|
58
|
+
e.createEntity = s;
|
|
59
|
+
function c(e) {
|
|
60
|
+
return e.childNodes;
|
|
61
|
+
}
|
|
62
|
+
e.getChildren = c;
|
|
63
|
+
function l(e) {
|
|
64
|
+
return e.getText();
|
|
65
|
+
}
|
|
66
|
+
e.getText = l;
|
|
67
|
+
function u(e, n) {
|
|
68
|
+
var r, i;
|
|
69
|
+
try {
|
|
70
|
+
for (var a = t(n), o = a.next(); !o.done; o = a.next()) {
|
|
71
|
+
var s = o.value;
|
|
72
|
+
e.appendChild(s);
|
|
73
|
+
}
|
|
74
|
+
} catch (e) {
|
|
75
|
+
r = { error: e };
|
|
76
|
+
} finally {
|
|
77
|
+
try {
|
|
78
|
+
o && !o.done && (i = a.return) && i.call(a);
|
|
79
|
+
} finally {
|
|
80
|
+
if (r) throw r.error;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
e.appendChildren = u;
|
|
85
|
+
function d(e, t, n) {
|
|
86
|
+
e.attributes.set(t, n);
|
|
87
|
+
}
|
|
88
|
+
e.setAttribute = d;
|
|
89
|
+
function f(e, t, n) {
|
|
90
|
+
e.setProperty(t, n);
|
|
91
|
+
}
|
|
92
|
+
e.setProperty = f;
|
|
93
|
+
function p(e, n) {
|
|
94
|
+
var r, a;
|
|
95
|
+
try {
|
|
96
|
+
for (var o = t(Object.keys(n)), s = o.next(); !s.done; s = o.next()) {
|
|
97
|
+
var c = s.value, l = n[c];
|
|
98
|
+
c === "texClass" ? (e.texClass = l, e.setProperty(c, l)) : c === "movablelimits" ? (e.setProperty("movablelimits", l), (e.isKind("mo") || e.isKind("mstyle")) && e.attributes.set("movablelimits", l)) : c === "inferred" || (i.has(c) ? e.setProperty(c, l) : e.attributes.set(c, l));
|
|
99
|
+
}
|
|
100
|
+
} catch (e) {
|
|
101
|
+
r = { error: e };
|
|
102
|
+
} finally {
|
|
103
|
+
try {
|
|
104
|
+
s && !s.done && (a = o.return) && a.call(o);
|
|
105
|
+
} finally {
|
|
106
|
+
if (r) throw r.error;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
e.setProperties = p;
|
|
111
|
+
function m(e, t) {
|
|
112
|
+
return e.getProperty(t);
|
|
113
|
+
}
|
|
114
|
+
e.getProperty = m;
|
|
115
|
+
function h(e, t) {
|
|
116
|
+
return e.attributes.get(t);
|
|
117
|
+
}
|
|
118
|
+
e.getAttribute = h;
|
|
119
|
+
function g(e) {
|
|
120
|
+
var t = [...arguments].slice(1);
|
|
121
|
+
e.removeProperty.apply(e, r([], n(t), !1));
|
|
122
|
+
}
|
|
123
|
+
e.removeProperties = g;
|
|
124
|
+
function _(e, t) {
|
|
125
|
+
return e.childNodes[t];
|
|
126
|
+
}
|
|
127
|
+
e.getChildAt = _;
|
|
128
|
+
function v(e, t, n) {
|
|
129
|
+
var r = e.childNodes;
|
|
130
|
+
r[t] = n, n && (n.parent = e);
|
|
131
|
+
}
|
|
132
|
+
e.setChild = v;
|
|
133
|
+
function y(e, t) {
|
|
134
|
+
for (var n = e.childNodes, r = 0; r < n.length; r++) v(t, r, n[r]);
|
|
135
|
+
}
|
|
136
|
+
e.copyChildren = y;
|
|
137
|
+
function b(e, t) {
|
|
138
|
+
t.attributes = e.attributes, p(t, e.getAllProperties());
|
|
139
|
+
}
|
|
140
|
+
e.copyAttributes = b;
|
|
141
|
+
function x(e, t) {
|
|
142
|
+
return e.isKind(t);
|
|
143
|
+
}
|
|
144
|
+
e.isType = x;
|
|
145
|
+
function S(e) {
|
|
146
|
+
return e.isEmbellished;
|
|
147
|
+
}
|
|
148
|
+
e.isEmbellished = S;
|
|
149
|
+
function C(e) {
|
|
150
|
+
return e.texClass;
|
|
151
|
+
}
|
|
152
|
+
e.getTexClass = C;
|
|
153
|
+
function w(e) {
|
|
154
|
+
return e.coreMO();
|
|
155
|
+
}
|
|
156
|
+
e.getCoreMO = w;
|
|
157
|
+
function T(e) {
|
|
158
|
+
return e instanceof a.AbstractMmlNode || e instanceof a.AbstractMmlEmptyNode;
|
|
159
|
+
}
|
|
160
|
+
e.isNode = T;
|
|
161
|
+
function E(e) {
|
|
162
|
+
return e.isInferred;
|
|
163
|
+
}
|
|
164
|
+
e.isInferred = E;
|
|
165
|
+
function D(e) {
|
|
166
|
+
var n, r;
|
|
167
|
+
if (!x(e, "mo")) return null;
|
|
168
|
+
var i = e, a = i.getForms();
|
|
169
|
+
try {
|
|
170
|
+
for (var s = t(a), c = s.next(); !c.done; c = s.next()) {
|
|
171
|
+
var l = c.value, u = o.MmlMo.OPTABLE[l][i.getText()];
|
|
172
|
+
if (u) return u;
|
|
173
|
+
}
|
|
174
|
+
} catch (e) {
|
|
175
|
+
n = { error: e };
|
|
176
|
+
} finally {
|
|
177
|
+
try {
|
|
178
|
+
c && !c.done && (r = s.return) && r.call(s);
|
|
179
|
+
} finally {
|
|
180
|
+
if (n) throw n.error;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
e.getForm = D;
|
|
186
|
+
})(s ||= {}), e.default = s;
|
|
187
|
+
})), d = /* @__PURE__ */ e(((e) => {
|
|
188
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = function() {
|
|
189
|
+
function e(t, n) {
|
|
190
|
+
var r = [...arguments].slice(2);
|
|
191
|
+
this.id = t, this.message = e.processString(n, r);
|
|
192
|
+
}
|
|
193
|
+
return e.processString = function(t, n) {
|
|
194
|
+
for (var r = t.split(e.pattern), i = 1, a = r.length; i < a; i += 2) {
|
|
195
|
+
var o = r[i].charAt(0);
|
|
196
|
+
o >= "0" && o <= "9" ? (r[i] = n[parseInt(r[i], 10) - 1], typeof r[i] == "number" && (r[i] = r[i].toString())) : o === "{" && (o = r[i].substr(1), o >= "0" && o <= "9" ? (r[i] = n[parseInt(r[i].substr(1, r[i].length - 2), 10) - 1], typeof r[i] == "number" && (r[i] = r[i].toString())) : r[i].match(/^\{([a-z]+):%(\d+)\|(.*)\}$/) && (r[i] = "%" + r[i])), r[i] ?? (r[i] = "???");
|
|
197
|
+
}
|
|
198
|
+
return r.join("");
|
|
199
|
+
}, e.pattern = /%(\d+|\{\d+\}|\{[a-z]+:\%\d+(?:\|(?:%\{\d+\}|%.|[^\}])*)+\}|.)/g, e;
|
|
200
|
+
}();
|
|
201
|
+
})), f = /* @__PURE__ */ e(((e) => {
|
|
202
|
+
var t = e && e.__read || function(e, t) {
|
|
203
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
204
|
+
if (!n) return e;
|
|
205
|
+
var r = n.call(e), i, a = [], o;
|
|
206
|
+
try {
|
|
207
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
208
|
+
} catch (e) {
|
|
209
|
+
o = { error: e };
|
|
210
|
+
} finally {
|
|
211
|
+
try {
|
|
212
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
213
|
+
} finally {
|
|
214
|
+
if (o) throw o.error;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
return a;
|
|
218
|
+
}, n = e && e.__values || function(e) {
|
|
219
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
220
|
+
if (n) return n.call(e);
|
|
221
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
222
|
+
return e && r >= e.length && (e = void 0), {
|
|
223
|
+
value: e && e[r++],
|
|
224
|
+
done: !e
|
|
225
|
+
};
|
|
226
|
+
} };
|
|
227
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
228
|
+
}, a = e && e.__importDefault || function(e) {
|
|
229
|
+
return e && e.__esModule ? e : { default: e };
|
|
230
|
+
};
|
|
231
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
232
|
+
var o = i(), s = a(u()), c = a(m()), l = a(d()), f = r(), p;
|
|
233
|
+
(function(e) {
|
|
234
|
+
var r = 7.2, i = 72, a = {
|
|
235
|
+
em: function(e) {
|
|
236
|
+
return e;
|
|
237
|
+
},
|
|
238
|
+
ex: function(e) {
|
|
239
|
+
return e * .43;
|
|
240
|
+
},
|
|
241
|
+
pt: function(e) {
|
|
242
|
+
return e / 10;
|
|
243
|
+
},
|
|
244
|
+
pc: function(e) {
|
|
245
|
+
return e * 1.2;
|
|
246
|
+
},
|
|
247
|
+
px: function(e) {
|
|
248
|
+
return e * r / i;
|
|
249
|
+
},
|
|
250
|
+
in: function(e) {
|
|
251
|
+
return e * r;
|
|
252
|
+
},
|
|
253
|
+
cm: function(e) {
|
|
254
|
+
return e * r / 2.54;
|
|
255
|
+
},
|
|
256
|
+
mm: function(e) {
|
|
257
|
+
return e * r / 25.4;
|
|
258
|
+
},
|
|
259
|
+
mu: function(e) {
|
|
260
|
+
return e / 18;
|
|
261
|
+
}
|
|
262
|
+
}, u = "([-+]?([.,]\\d+|\\d+([.,]\\d*)?))", d = "(pt|em|ex|mu|px|mm|cm|in|pc)", p = RegExp("^\\s*" + u + "\\s*" + d + "\\s*$"), m = RegExp("^\\s*" + u + "\\s*" + d + " ?");
|
|
263
|
+
function h(e, t) {
|
|
264
|
+
t === void 0 && (t = !1);
|
|
265
|
+
var n = e.match(t ? m : p);
|
|
266
|
+
return n ? g([
|
|
267
|
+
n[1].replace(/,/, "."),
|
|
268
|
+
n[4],
|
|
269
|
+
n[0].length
|
|
270
|
+
]) : [
|
|
271
|
+
null,
|
|
272
|
+
null,
|
|
273
|
+
0
|
|
274
|
+
];
|
|
275
|
+
}
|
|
276
|
+
e.matchDimen = h;
|
|
277
|
+
function g(e) {
|
|
278
|
+
var n = t(e, 3), r = n[0], i = n[1], o = n[2];
|
|
279
|
+
return i === "mu" ? [
|
|
280
|
+
v(a[i](parseFloat(r || "1"))).slice(0, -2),
|
|
281
|
+
"em",
|
|
282
|
+
o
|
|
283
|
+
] : [
|
|
284
|
+
r,
|
|
285
|
+
i,
|
|
286
|
+
o
|
|
287
|
+
];
|
|
288
|
+
}
|
|
289
|
+
function _(e) {
|
|
290
|
+
var n = t(h(e), 2), r = n[0], i = n[1], o = parseFloat(r || "1"), s = a[i];
|
|
291
|
+
return s ? s(o) : 0;
|
|
292
|
+
}
|
|
293
|
+
e.dimen2em = _;
|
|
294
|
+
function v(e) {
|
|
295
|
+
return Math.abs(e) < 6e-4 ? "0em" : e.toFixed(3).replace(/\.?0+$/, "") + "em";
|
|
296
|
+
}
|
|
297
|
+
e.Em = v;
|
|
298
|
+
function y() {
|
|
299
|
+
return [...arguments].map(function(e) {
|
|
300
|
+
return v(e);
|
|
301
|
+
}).join(" ");
|
|
302
|
+
}
|
|
303
|
+
e.cols = y;
|
|
304
|
+
function b(e, t, n, r, i, a) {
|
|
305
|
+
i === void 0 && (i = ""), a === void 0 && (a = "");
|
|
306
|
+
var l = e.nodeFactory, u = l.create("node", "mrow", [], {
|
|
307
|
+
open: t,
|
|
308
|
+
close: r,
|
|
309
|
+
texClass: o.TEXCLASS.INNER
|
|
310
|
+
}), d;
|
|
311
|
+
if (i) d = new c.default("\\" + i + "l" + t, e.parser.stack.env, e).mml();
|
|
312
|
+
else {
|
|
313
|
+
var f = l.create("text", t);
|
|
314
|
+
d = l.create("node", "mo", [], {
|
|
315
|
+
fence: !0,
|
|
316
|
+
stretchy: !0,
|
|
317
|
+
symmetric: !0,
|
|
318
|
+
texClass: o.TEXCLASS.OPEN
|
|
319
|
+
}, f);
|
|
320
|
+
}
|
|
321
|
+
if (s.default.appendChildren(u, [d, n]), i) d = new c.default("\\" + i + "r" + r, e.parser.stack.env, e).mml();
|
|
322
|
+
else {
|
|
323
|
+
var p = l.create("text", r);
|
|
324
|
+
d = l.create("node", "mo", [], {
|
|
325
|
+
fence: !0,
|
|
326
|
+
stretchy: !0,
|
|
327
|
+
symmetric: !0,
|
|
328
|
+
texClass: o.TEXCLASS.CLOSE
|
|
329
|
+
}, p);
|
|
330
|
+
}
|
|
331
|
+
return a && d.attributes.set("mathcolor", a), s.default.appendChildren(u, [d]), u;
|
|
332
|
+
}
|
|
333
|
+
e.fenced = b;
|
|
334
|
+
function x(e, t, n, r) {
|
|
335
|
+
var i = e.nodeFactory.create("node", "mrow", [], {
|
|
336
|
+
open: t,
|
|
337
|
+
close: r,
|
|
338
|
+
texClass: o.TEXCLASS.ORD
|
|
339
|
+
});
|
|
340
|
+
return t && s.default.appendChildren(i, [S(e, t, "l")]), s.default.isType(n, "mrow") ? s.default.appendChildren(i, s.default.getChildren(n)) : s.default.appendChildren(i, [n]), r && s.default.appendChildren(i, [S(e, r, "r")]), i;
|
|
341
|
+
}
|
|
342
|
+
e.fixedFence = x;
|
|
343
|
+
function S(e, t, n) {
|
|
344
|
+
(t === "{" || t === "}") && (t = "\\" + t);
|
|
345
|
+
var r = "{\\bigg" + n + " " + t + "}", i = "{\\big" + n + " " + t + "}";
|
|
346
|
+
return new c.default("\\mathchoice" + r + i + i + i, {}, e).mml();
|
|
347
|
+
}
|
|
348
|
+
e.mathPalette = S;
|
|
349
|
+
function C(e, t) {
|
|
350
|
+
for (var n = 0, r = t.length; n < r; n++) {
|
|
351
|
+
var i = t[n];
|
|
352
|
+
if (i && !s.default.isType(i, "mspace") && (!s.default.isType(i, "TeXAtom") || s.default.getChildren(i)[0] && s.default.getChildren(s.default.getChildren(i)[0]).length)) {
|
|
353
|
+
if (s.default.isEmbellished(i) || s.default.isType(i, "TeXAtom") && s.default.getTexClass(i) === o.TEXCLASS.REL) {
|
|
354
|
+
var a = e.nodeFactory.create("node", "mi");
|
|
355
|
+
t.unshift(a);
|
|
356
|
+
}
|
|
357
|
+
break;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
e.fixInitialMO = C;
|
|
362
|
+
function w(e, t, n, r) {
|
|
363
|
+
if (e.configuration.options.internalMath) return e.configuration.options.internalMath(e, t, n, r);
|
|
364
|
+
var i = r || e.stack.env.font, a = i ? { mathvariant: i } : {}, o = [], s = 0, u = 0, d, f, p = "", m = 0;
|
|
365
|
+
if (t.match(/\\?[${}\\]|\\\(|\\(eq)?ref\s*\{/)) {
|
|
366
|
+
for (; s < t.length;) if (d = t.charAt(s++), d === "$") p === "$" && m === 0 ? (f = e.create("node", "TeXAtom", [new c.default(t.slice(u, s - 1), {}, e.configuration).mml()]), o.push(f), p = "", u = s) : p === "" && (u < s - 1 && o.push(T(e, t.slice(u, s - 1), a)), p = "$", u = s);
|
|
367
|
+
else if (d === "{" && p !== "") m++;
|
|
368
|
+
else if (d === "}") if (p === "}" && m === 0) {
|
|
369
|
+
var h = new c.default(t.slice(u, s), {}, e.configuration).mml();
|
|
370
|
+
f = e.create("node", "TeXAtom", [h], a), o.push(f), p = "", u = s;
|
|
371
|
+
} else p !== "" && m && m--;
|
|
372
|
+
else if (d === "\\") if (p === "" && t.substr(s).match(/^(eq)?ref\s*\{/)) {
|
|
373
|
+
var g = RegExp["$&"].length;
|
|
374
|
+
u < s - 1 && o.push(T(e, t.slice(u, s - 1), a)), p = "}", u = s - 1, s += g;
|
|
375
|
+
} else d = t.charAt(s++), d === "(" && p === "" ? (u < s - 2 && o.push(T(e, t.slice(u, s - 2), a)), p = ")", u = s) : d === ")" && p === ")" && m === 0 ? (f = e.create("node", "TeXAtom", [new c.default(t.slice(u, s - 2), {}, e.configuration).mml()]), o.push(f), p = "", u = s) : d.match(/[${}\\]/) && p === "" && (s--, t = t.substr(0, s - 1) + t.substr(s));
|
|
376
|
+
if (p !== "") throw new l.default("MathNotTerminated", "Math not terminated in text box");
|
|
377
|
+
}
|
|
378
|
+
return u < t.length && o.push(T(e, t.slice(u), a)), n == null ? o.length > 1 && (o = [e.create("node", "mrow", o)]) : o = [e.create("node", "mstyle", o, {
|
|
379
|
+
displaystyle: !1,
|
|
380
|
+
scriptlevel: n
|
|
381
|
+
})], o;
|
|
382
|
+
}
|
|
383
|
+
e.internalMath = w;
|
|
384
|
+
function T(e, t, n) {
|
|
385
|
+
t = t.replace(/^\s+/, f.entities.nbsp).replace(/\s+$/, f.entities.nbsp);
|
|
386
|
+
var r = e.create("text", t);
|
|
387
|
+
return e.create("node", "mtext", [], n, r);
|
|
388
|
+
}
|
|
389
|
+
e.internalText = T;
|
|
390
|
+
function E(t, n, r, i, a) {
|
|
391
|
+
if (e.checkMovableLimits(n), s.default.isType(n, "munderover") && s.default.isEmbellished(n)) {
|
|
392
|
+
s.default.setProperties(s.default.getCoreMO(n), {
|
|
393
|
+
lspace: 0,
|
|
394
|
+
rspace: 0
|
|
395
|
+
});
|
|
396
|
+
var c = t.create("node", "mo", [], { rspace: 0 });
|
|
397
|
+
n = t.create("node", "mrow", [c, n]);
|
|
398
|
+
}
|
|
399
|
+
var l = t.create("node", "munderover", [n]);
|
|
400
|
+
s.default.setChild(l, i === "over" ? l.over : l.under, r);
|
|
401
|
+
var u = l;
|
|
402
|
+
return a && (u = t.create("node", "TeXAtom", [l], {
|
|
403
|
+
texClass: o.TEXCLASS.OP,
|
|
404
|
+
movesupsub: !0
|
|
405
|
+
})), s.default.setProperty(u, "subsupOK", !0), u;
|
|
406
|
+
}
|
|
407
|
+
e.underOver = E;
|
|
408
|
+
function D(e) {
|
|
409
|
+
var t = s.default.isType(e, "mo") ? s.default.getForm(e) : null;
|
|
410
|
+
(s.default.getProperty(e, "movablelimits") || t && t[3] && t[3].movablelimits) && s.default.setProperties(e, { movablelimits: !1 });
|
|
411
|
+
}
|
|
412
|
+
e.checkMovableLimits = D;
|
|
413
|
+
function O(e) {
|
|
414
|
+
if (typeof e != "string") return e;
|
|
415
|
+
var t = e.trim();
|
|
416
|
+
return t.match(/\\$/) && e.match(/ $/) && (t += " "), t;
|
|
417
|
+
}
|
|
418
|
+
e.trimSpaces = O;
|
|
419
|
+
function k(t, n) {
|
|
420
|
+
return n = e.trimSpaces(n || ""), n === "t" ? t.arraydef.align = "baseline 1" : n === "b" ? t.arraydef.align = "baseline -1" : n === "c" ? t.arraydef.align = "axis" : n && (t.arraydef.align = n), t;
|
|
421
|
+
}
|
|
422
|
+
e.setArrayAlign = k;
|
|
423
|
+
function A(e, t, n) {
|
|
424
|
+
for (var r = "", i = "", a = 0; a < n.length;) {
|
|
425
|
+
var o = n.charAt(a++);
|
|
426
|
+
if (o === "\\") r += o + n.charAt(a++);
|
|
427
|
+
else if (o === "#") if (o = n.charAt(a++), o === "#") r += o;
|
|
428
|
+
else {
|
|
429
|
+
if (!o.match(/[1-9]/) || parseInt(o, 10) > t.length) throw new l.default("IllegalMacroParam", "Illegal macro parameter reference");
|
|
430
|
+
i = j(e, j(e, i, r), t[parseInt(o, 10) - 1]), r = "";
|
|
431
|
+
}
|
|
432
|
+
else r += o;
|
|
433
|
+
}
|
|
434
|
+
return j(e, i, r);
|
|
435
|
+
}
|
|
436
|
+
e.substituteArgs = A;
|
|
437
|
+
function j(e, t, n) {
|
|
438
|
+
if (n.match(/^[a-z]/i) && t.match(/(^|[^\\])(\\\\)*\\[a-z]+$/i) && (t += " "), t.length + n.length > e.configuration.options.maxBuffer) throw new l.default("MaxBufferSize", "MathJax internal buffer size exceeded; is there a recursive macro call?");
|
|
439
|
+
return t + n;
|
|
440
|
+
}
|
|
441
|
+
e.addArgs = j;
|
|
442
|
+
function M(e, t) {
|
|
443
|
+
if (t === void 0 && (t = !0), !(++e.macroCount <= e.configuration.options.maxMacros)) throw t ? new l.default("MaxMacroSub1", "MathJax maximum macro substitution count exceeded; is here a recursive macro call?") : new l.default("MaxMacroSub2", "MathJax maximum substitution count exceeded; is there a recursive latex environment?");
|
|
444
|
+
}
|
|
445
|
+
e.checkMaxMacros = M;
|
|
446
|
+
function N(e) {
|
|
447
|
+
if (e.stack.global.eqnenv) throw new l.default("ErroneousNestingEq", "Erroneous nesting of equation structures");
|
|
448
|
+
e.stack.global.eqnenv = !0;
|
|
449
|
+
}
|
|
450
|
+
e.checkEqnEnv = N;
|
|
451
|
+
function P(e, t) {
|
|
452
|
+
var r = e.copy(), i = t.configuration;
|
|
453
|
+
return r.walkTree(function(e) {
|
|
454
|
+
var t, r;
|
|
455
|
+
i.addNode(e.kind, e);
|
|
456
|
+
var a = (e.getProperty("in-lists") || "").split(/,/);
|
|
457
|
+
try {
|
|
458
|
+
for (var o = n(a), s = o.next(); !s.done; s = o.next()) {
|
|
459
|
+
var c = s.value;
|
|
460
|
+
c && i.addNode(c, e);
|
|
461
|
+
}
|
|
462
|
+
} catch (e) {
|
|
463
|
+
t = { error: e };
|
|
464
|
+
} finally {
|
|
465
|
+
try {
|
|
466
|
+
s && !s.done && (r = o.return) && r.call(o);
|
|
467
|
+
} finally {
|
|
468
|
+
if (t) throw t.error;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}), r;
|
|
472
|
+
}
|
|
473
|
+
e.copyNode = P;
|
|
474
|
+
function F(e, t, n) {
|
|
475
|
+
return n;
|
|
476
|
+
}
|
|
477
|
+
e.MmlFilterAttribute = F;
|
|
478
|
+
function I(e) {
|
|
479
|
+
var t = e.stack.env.font;
|
|
480
|
+
return t ? { mathvariant: t } : {};
|
|
481
|
+
}
|
|
482
|
+
e.getFontDef = I;
|
|
483
|
+
function L(e, t, r) {
|
|
484
|
+
var i, a;
|
|
485
|
+
t === void 0 && (t = null), r === void 0 && (r = !1);
|
|
486
|
+
var o = R(e);
|
|
487
|
+
if (t) try {
|
|
488
|
+
for (var s = n(Object.keys(o)), c = s.next(); !c.done; c = s.next()) {
|
|
489
|
+
var u = c.value;
|
|
490
|
+
if (!t.hasOwnProperty(u)) {
|
|
491
|
+
if (r) throw new l.default("InvalidOption", "Invalid option: %1", u);
|
|
492
|
+
delete o[u];
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
} catch (e) {
|
|
496
|
+
i = { error: e };
|
|
497
|
+
} finally {
|
|
498
|
+
try {
|
|
499
|
+
c && !c.done && (a = s.return) && a.call(s);
|
|
500
|
+
} finally {
|
|
501
|
+
if (i) throw i.error;
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
return o;
|
|
505
|
+
}
|
|
506
|
+
e.keyvalOptions = L;
|
|
507
|
+
function R(e) {
|
|
508
|
+
for (var n, r, i = {}, a = e, o, s, c; a;) n = t(B(a, ["=", ","]), 3), s = n[0], o = n[1], a = n[2], o === "=" ? (r = t(B(a, [","]), 3), c = r[0], o = r[1], a = r[2], c = c === "false" || c === "true" ? JSON.parse(c) : c, i[s] = c) : s && (i[s] = !0);
|
|
509
|
+
return i;
|
|
510
|
+
}
|
|
511
|
+
function z(e, t) {
|
|
512
|
+
for (; t > 0;) e = e.trim().slice(1, -1), t--;
|
|
513
|
+
return e.trim();
|
|
514
|
+
}
|
|
515
|
+
function B(e, t) {
|
|
516
|
+
for (var n = e.length, r = 0, i = "", a = 0, o = 0, s = !0, c = !1; a < n;) {
|
|
517
|
+
var u = e[a++];
|
|
518
|
+
switch (u) {
|
|
519
|
+
case " ": break;
|
|
520
|
+
case "{":
|
|
521
|
+
s ? o++ : (c = !1, o > r && (o = r)), r++;
|
|
522
|
+
break;
|
|
523
|
+
case "}":
|
|
524
|
+
r && r--, (s || c) && (o--, c = !0), s = !1;
|
|
525
|
+
break;
|
|
526
|
+
default:
|
|
527
|
+
if (!r && t.indexOf(u) !== -1) return [
|
|
528
|
+
c ? "true" : z(i, o),
|
|
529
|
+
u,
|
|
530
|
+
e.slice(a)
|
|
531
|
+
];
|
|
532
|
+
s = !1, c = !1;
|
|
533
|
+
}
|
|
534
|
+
i += u;
|
|
535
|
+
}
|
|
536
|
+
if (r) throw new l.default("ExtraOpenMissingClose", "Extra open brace or missing close brace");
|
|
537
|
+
return [
|
|
538
|
+
c ? "true" : z(i, o),
|
|
539
|
+
"",
|
|
540
|
+
e.slice(a)
|
|
541
|
+
];
|
|
542
|
+
}
|
|
543
|
+
})(p ||= {}), e.default = p;
|
|
544
|
+
})), p = /* @__PURE__ */ e(((e) => {
|
|
545
|
+
var t = e && e.__values || function(e) {
|
|
546
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
547
|
+
if (n) return n.call(e);
|
|
548
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
549
|
+
return e && r >= e.length && (e = void 0), {
|
|
550
|
+
value: e && e[r++],
|
|
551
|
+
done: !e
|
|
552
|
+
};
|
|
553
|
+
} };
|
|
554
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
555
|
+
}, n = e && e.__read || function(e, t) {
|
|
556
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
557
|
+
if (!n) return e;
|
|
558
|
+
var r = n.call(e), i, a = [], o;
|
|
559
|
+
try {
|
|
560
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
561
|
+
} catch (e) {
|
|
562
|
+
o = { error: e };
|
|
563
|
+
} finally {
|
|
564
|
+
try {
|
|
565
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
566
|
+
} finally {
|
|
567
|
+
if (o) throw o.error;
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
return a;
|
|
571
|
+
}, r = e && e.__spreadArray || function(e, t, n) {
|
|
572
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
573
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
574
|
+
}, i = e && e.__importDefault || function(e) {
|
|
575
|
+
return e && e.__esModule ? e : { default: e };
|
|
576
|
+
};
|
|
577
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
578
|
+
var a = i(u());
|
|
579
|
+
e.default = function() {
|
|
580
|
+
function e(e, t, n) {
|
|
581
|
+
this._factory = e, this._env = t, this.global = {}, this.stack = [], this.global = { isInner: n }, this.stack = [this._factory.create("start", this.global)], t && (this.stack[0].env = t), this.env = this.stack[0].env;
|
|
582
|
+
}
|
|
583
|
+
return Object.defineProperty(e.prototype, "env", {
|
|
584
|
+
get: function() {
|
|
585
|
+
return this._env;
|
|
586
|
+
},
|
|
587
|
+
set: function(e) {
|
|
588
|
+
this._env = e;
|
|
589
|
+
},
|
|
590
|
+
enumerable: !1,
|
|
591
|
+
configurable: !0
|
|
592
|
+
}), e.prototype.Push = function() {
|
|
593
|
+
for (var e, i, o = [], s = 0; s < arguments.length; s++) o[s] = arguments[s];
|
|
594
|
+
try {
|
|
595
|
+
for (var c = t(o), l = c.next(); !l.done; l = c.next()) {
|
|
596
|
+
var u = l.value;
|
|
597
|
+
if (u) {
|
|
598
|
+
var d = a.default.isNode(u) ? this._factory.create("mml", u) : u;
|
|
599
|
+
d.global = this.global;
|
|
600
|
+
var f = n(this.stack.length ? this.Top().checkItem(d) : [null, !0], 2), p = f[0];
|
|
601
|
+
if (f[1]) {
|
|
602
|
+
if (p) {
|
|
603
|
+
this.Pop(), this.Push.apply(this, r([], n(p), !1));
|
|
604
|
+
continue;
|
|
605
|
+
}
|
|
606
|
+
this.stack.push(d), d.env ? (d.copyEnv && Object.assign(d.env, this.env), this.env = d.env) : d.env = this.env;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
} catch (t) {
|
|
611
|
+
e = { error: t };
|
|
612
|
+
} finally {
|
|
613
|
+
try {
|
|
614
|
+
l && !l.done && (i = c.return) && i.call(c);
|
|
615
|
+
} finally {
|
|
616
|
+
if (e) throw e.error;
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}, e.prototype.Pop = function() {
|
|
620
|
+
var e = this.stack.pop();
|
|
621
|
+
return e.isOpen || delete e.env, this.env = this.stack.length ? this.Top().env : {}, e;
|
|
622
|
+
}, e.prototype.Top = function(e) {
|
|
623
|
+
return e === void 0 && (e = 1), this.stack.length < e ? null : this.stack[this.stack.length - e];
|
|
624
|
+
}, e.prototype.Prev = function(e) {
|
|
625
|
+
var t = this.Top();
|
|
626
|
+
return e ? t.First : t.Pop();
|
|
627
|
+
}, e.prototype.toString = function() {
|
|
628
|
+
return "stack[\n " + this.stack.join("\n ") + "\n]";
|
|
629
|
+
}, e;
|
|
630
|
+
}();
|
|
631
|
+
})), m = /* @__PURE__ */ e(((e) => {
|
|
632
|
+
var t = e && e.__values || function(e) {
|
|
633
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
634
|
+
if (n) return n.call(e);
|
|
635
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
636
|
+
return e && r >= e.length && (e = void 0), {
|
|
637
|
+
value: e && e[r++],
|
|
638
|
+
done: !e
|
|
639
|
+
};
|
|
640
|
+
} };
|
|
641
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
642
|
+
}, n = e && e.__read || function(e, t) {
|
|
643
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
644
|
+
if (!n) return e;
|
|
645
|
+
var r = n.call(e), i, a = [], o;
|
|
646
|
+
try {
|
|
647
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
648
|
+
} catch (e) {
|
|
649
|
+
o = { error: e };
|
|
650
|
+
} finally {
|
|
651
|
+
try {
|
|
652
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
653
|
+
} finally {
|
|
654
|
+
if (o) throw o.error;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
return a;
|
|
658
|
+
}, r = e && e.__spreadArray || function(e, t, n) {
|
|
659
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
660
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
661
|
+
}, a = e && e.__importDefault || function(e) {
|
|
662
|
+
return e && e.__esModule ? e : { default: e };
|
|
663
|
+
};
|
|
664
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
665
|
+
var o = a(f()), s = a(p()), c = a(d()), l = i();
|
|
666
|
+
e.default = function() {
|
|
667
|
+
function e(e, n, r) {
|
|
668
|
+
var i, a;
|
|
669
|
+
this._string = e, this.configuration = r, this.macroCount = 0, this.i = 0, this.currentCS = "";
|
|
670
|
+
var o = n.hasOwnProperty("isInner"), c = n.isInner;
|
|
671
|
+
delete n.isInner;
|
|
672
|
+
var l;
|
|
673
|
+
if (n) {
|
|
674
|
+
l = {};
|
|
675
|
+
try {
|
|
676
|
+
for (var u = t(Object.keys(n)), d = u.next(); !d.done; d = u.next()) {
|
|
677
|
+
var f = d.value;
|
|
678
|
+
l[f] = n[f];
|
|
679
|
+
}
|
|
680
|
+
} catch (e) {
|
|
681
|
+
i = { error: e };
|
|
682
|
+
} finally {
|
|
683
|
+
try {
|
|
684
|
+
d && !d.done && (a = u.return) && a.call(u);
|
|
685
|
+
} finally {
|
|
686
|
+
if (i) throw i.error;
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
this.configuration.pushParser(this), this.stack = new s.default(this.itemFactory, l, o ? c : !0), this.Parse(), this.Push(this.itemFactory.create("stop"));
|
|
691
|
+
}
|
|
692
|
+
return Object.defineProperty(e.prototype, "options", {
|
|
693
|
+
get: function() {
|
|
694
|
+
return this.configuration.options;
|
|
695
|
+
},
|
|
696
|
+
enumerable: !1,
|
|
697
|
+
configurable: !0
|
|
698
|
+
}), Object.defineProperty(e.prototype, "itemFactory", {
|
|
699
|
+
get: function() {
|
|
700
|
+
return this.configuration.itemFactory;
|
|
701
|
+
},
|
|
702
|
+
enumerable: !1,
|
|
703
|
+
configurable: !0
|
|
704
|
+
}), Object.defineProperty(e.prototype, "tags", {
|
|
705
|
+
get: function() {
|
|
706
|
+
return this.configuration.tags;
|
|
707
|
+
},
|
|
708
|
+
enumerable: !1,
|
|
709
|
+
configurable: !0
|
|
710
|
+
}), Object.defineProperty(e.prototype, "string", {
|
|
711
|
+
get: function() {
|
|
712
|
+
return this._string;
|
|
713
|
+
},
|
|
714
|
+
set: function(e) {
|
|
715
|
+
this._string = e;
|
|
716
|
+
},
|
|
717
|
+
enumerable: !1,
|
|
718
|
+
configurable: !0
|
|
719
|
+
}), e.prototype.parse = function(e, t) {
|
|
720
|
+
return this.configuration.handlers.get(e).parse(t);
|
|
721
|
+
}, e.prototype.lookup = function(e, t) {
|
|
722
|
+
return this.configuration.handlers.get(e).lookup(t);
|
|
723
|
+
}, e.prototype.contains = function(e, t) {
|
|
724
|
+
return this.configuration.handlers.get(e).contains(t);
|
|
725
|
+
}, e.prototype.toString = function() {
|
|
726
|
+
var e, n, r = "";
|
|
727
|
+
try {
|
|
728
|
+
for (var i = t(Array.from(this.configuration.handlers.keys())), a = i.next(); !a.done; a = i.next()) {
|
|
729
|
+
var o = a.value;
|
|
730
|
+
r += o + ": " + this.configuration.handlers.get(o) + "\n";
|
|
731
|
+
}
|
|
732
|
+
} catch (t) {
|
|
733
|
+
e = { error: t };
|
|
734
|
+
} finally {
|
|
735
|
+
try {
|
|
736
|
+
a && !a.done && (n = i.return) && n.call(i);
|
|
737
|
+
} finally {
|
|
738
|
+
if (e) throw e.error;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
return r;
|
|
742
|
+
}, e.prototype.Parse = function() {
|
|
743
|
+
for (var e; this.i < this.string.length;) e = this.getCodePoint(), this.i += e.length, this.parse("character", [this, e]);
|
|
744
|
+
}, e.prototype.Push = function(e) {
|
|
745
|
+
e instanceof l.AbstractMmlNode && e.isInferred ? this.PushAll(e.childNodes) : this.stack.Push(e);
|
|
746
|
+
}, e.prototype.PushAll = function(e) {
|
|
747
|
+
var n, r;
|
|
748
|
+
try {
|
|
749
|
+
for (var i = t(e), a = i.next(); !a.done; a = i.next()) {
|
|
750
|
+
var o = a.value;
|
|
751
|
+
this.stack.Push(o);
|
|
752
|
+
}
|
|
753
|
+
} catch (e) {
|
|
754
|
+
n = { error: e };
|
|
755
|
+
} finally {
|
|
756
|
+
try {
|
|
757
|
+
a && !a.done && (r = i.return) && r.call(i);
|
|
758
|
+
} finally {
|
|
759
|
+
if (n) throw n.error;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}, e.prototype.mml = function() {
|
|
763
|
+
if (!this.stack.Top().isKind("mml")) return null;
|
|
764
|
+
var e = this.stack.Top().First;
|
|
765
|
+
return this.configuration.popParser(), e;
|
|
766
|
+
}, e.prototype.convertDelimiter = function(e) {
|
|
767
|
+
var t = this.lookup("delimiter", e);
|
|
768
|
+
return t ? t.char : null;
|
|
769
|
+
}, e.prototype.getCodePoint = function() {
|
|
770
|
+
var e = this.string.codePointAt(this.i);
|
|
771
|
+
return e === void 0 ? "" : String.fromCodePoint(e);
|
|
772
|
+
}, e.prototype.nextIsSpace = function() {
|
|
773
|
+
return !!this.string.charAt(this.i).match(/\s/);
|
|
774
|
+
}, e.prototype.GetNext = function() {
|
|
775
|
+
for (; this.nextIsSpace();) this.i++;
|
|
776
|
+
return this.getCodePoint();
|
|
777
|
+
}, e.prototype.GetCS = function() {
|
|
778
|
+
var e = this.string.slice(this.i).match(/^(([a-z]+) ?|[\uD800-\uDBFF].|.)/i);
|
|
779
|
+
return e ? (this.i += e[0].length, e[2] || e[1]) : (this.i++, " ");
|
|
780
|
+
}, e.prototype.GetArgument = function(e, t) {
|
|
781
|
+
switch (this.GetNext()) {
|
|
782
|
+
case "":
|
|
783
|
+
if (!t) throw new c.default("MissingArgFor", "Missing argument for %1", this.currentCS);
|
|
784
|
+
return null;
|
|
785
|
+
case "}":
|
|
786
|
+
if (!t) throw new c.default("ExtraCloseMissingOpen", "Extra close brace or missing open brace");
|
|
787
|
+
return null;
|
|
788
|
+
case "\\": return this.i++, "\\" + this.GetCS();
|
|
789
|
+
case "{":
|
|
790
|
+
for (var n = ++this.i, r = 1; this.i < this.string.length;) switch (this.string.charAt(this.i++)) {
|
|
791
|
+
case "\\":
|
|
792
|
+
this.i++;
|
|
793
|
+
break;
|
|
794
|
+
case "{":
|
|
795
|
+
r++;
|
|
796
|
+
break;
|
|
797
|
+
case "}":
|
|
798
|
+
if (--r === 0) return this.string.slice(n, this.i - 1);
|
|
799
|
+
break;
|
|
800
|
+
}
|
|
801
|
+
throw new c.default("MissingCloseBrace", "Missing close brace");
|
|
802
|
+
}
|
|
803
|
+
var i = this.getCodePoint();
|
|
804
|
+
return this.i += i.length, i;
|
|
805
|
+
}, e.prototype.GetBrackets = function(e, t) {
|
|
806
|
+
if (this.GetNext() !== "[") return t;
|
|
807
|
+
for (var n = ++this.i, r = 0; this.i < this.string.length;) switch (this.string.charAt(this.i++)) {
|
|
808
|
+
case "{":
|
|
809
|
+
r++;
|
|
810
|
+
break;
|
|
811
|
+
case "\\":
|
|
812
|
+
this.i++;
|
|
813
|
+
break;
|
|
814
|
+
case "}":
|
|
815
|
+
if (r-- <= 0) throw new c.default("ExtraCloseLooking", "Extra close brace while looking for %1", "']'");
|
|
816
|
+
break;
|
|
817
|
+
case "]":
|
|
818
|
+
if (r === 0) return this.string.slice(n, this.i - 1);
|
|
819
|
+
break;
|
|
820
|
+
}
|
|
821
|
+
throw new c.default("MissingCloseBracket", "Could not find closing ']' for argument to %1", this.currentCS);
|
|
822
|
+
}, e.prototype.GetDelimiter = function(e, t) {
|
|
823
|
+
var n = this.GetNext();
|
|
824
|
+
if (this.i += n.length, this.i <= this.string.length && (n === "\\" ? n += this.GetCS() : n === "{" && t && (this.i--, n = this.GetArgument(e).trim()), this.contains("delimiter", n))) return this.convertDelimiter(n);
|
|
825
|
+
throw new c.default("MissingOrUnrecognizedDelim", "Missing or unrecognized delimiter for %1", this.currentCS);
|
|
826
|
+
}, e.prototype.GetDimen = function(e) {
|
|
827
|
+
if (this.GetNext() === "{") {
|
|
828
|
+
var t = this.GetArgument(e), r = n(o.default.matchDimen(t), 2), i = r[0], a = r[1];
|
|
829
|
+
if (i) return i + a;
|
|
830
|
+
} else {
|
|
831
|
+
var t = this.string.slice(this.i), s = n(o.default.matchDimen(t, !0), 3), i = s[0], a = s[1], l = s[2];
|
|
832
|
+
if (i) return this.i += l, i + a;
|
|
833
|
+
}
|
|
834
|
+
throw new c.default("MissingDimOrUnits", "Missing dimension or its units for %1", this.currentCS);
|
|
835
|
+
}, e.prototype.GetUpTo = function(e, t) {
|
|
836
|
+
for (; this.nextIsSpace();) this.i++;
|
|
837
|
+
for (var n = this.i, r = 0; this.i < this.string.length;) {
|
|
838
|
+
var i = this.i, a = this.GetNext();
|
|
839
|
+
switch (this.i += a.length, a) {
|
|
840
|
+
case "\\":
|
|
841
|
+
a += this.GetCS();
|
|
842
|
+
break;
|
|
843
|
+
case "{":
|
|
844
|
+
r++;
|
|
845
|
+
break;
|
|
846
|
+
case "}":
|
|
847
|
+
if (r === 0) throw new c.default("ExtraCloseLooking", "Extra close brace while looking for %1", t);
|
|
848
|
+
r--;
|
|
849
|
+
break;
|
|
850
|
+
}
|
|
851
|
+
if (r === 0 && a === t) return this.string.slice(n, i);
|
|
852
|
+
}
|
|
853
|
+
throw new c.default("TokenNotFoundForCommand", "Could not find %1 for %2", t, this.currentCS);
|
|
854
|
+
}, e.prototype.ParseArg = function(t) {
|
|
855
|
+
return new e(this.GetArgument(t), this.stack.env, this.configuration).mml();
|
|
856
|
+
}, e.prototype.ParseUpTo = function(t, n) {
|
|
857
|
+
return new e(this.GetUpTo(t, n), this.stack.env, this.configuration).mml();
|
|
858
|
+
}, e.prototype.GetDelimiterArg = function(e) {
|
|
859
|
+
var t = o.default.trimSpaces(this.GetArgument(e));
|
|
860
|
+
if (t === "") return null;
|
|
861
|
+
if (this.contains("delimiter", t)) return t;
|
|
862
|
+
throw new c.default("MissingOrUnrecognizedDelim", "Missing or unrecognized delimiter for %1", this.currentCS);
|
|
863
|
+
}, e.prototype.GetStar = function() {
|
|
864
|
+
var e = this.GetNext() === "*";
|
|
865
|
+
return e && this.i++, e;
|
|
866
|
+
}, e.prototype.create = function(e) {
|
|
867
|
+
for (var t, i = [], a = 1; a < arguments.length; a++) i[a - 1] = arguments[a];
|
|
868
|
+
return (t = this.configuration.nodeFactory).create.apply(t, r([e], n(i), !1));
|
|
869
|
+
}, e;
|
|
870
|
+
}();
|
|
871
|
+
})), h = /* @__PURE__ */ e(((e) => {
|
|
872
|
+
var t = e && e.__extends || (function() {
|
|
873
|
+
var e = function(t, n) {
|
|
874
|
+
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
875
|
+
e.__proto__ = t;
|
|
876
|
+
} || function(e, t) {
|
|
877
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
878
|
+
}, e(t, n);
|
|
879
|
+
};
|
|
880
|
+
return function(t, n) {
|
|
881
|
+
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
882
|
+
e(t, n);
|
|
883
|
+
function r() {
|
|
884
|
+
this.constructor = t;
|
|
885
|
+
}
|
|
886
|
+
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
887
|
+
};
|
|
888
|
+
})(), n = e && e.__read || function(e, t) {
|
|
889
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
890
|
+
if (!n) return e;
|
|
891
|
+
var r = n.call(e), i, a = [], o;
|
|
892
|
+
try {
|
|
893
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
894
|
+
} catch (e) {
|
|
895
|
+
o = { error: e };
|
|
896
|
+
} finally {
|
|
897
|
+
try {
|
|
898
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
899
|
+
} finally {
|
|
900
|
+
if (o) throw o.error;
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
return a;
|
|
904
|
+
}, r = e && e.__spreadArray || function(e, t, n) {
|
|
905
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
906
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
907
|
+
}, i = e && e.__values || function(e) {
|
|
908
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
909
|
+
if (n) return n.call(e);
|
|
910
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
911
|
+
return e && r >= e.length && (e = void 0), {
|
|
912
|
+
value: e && e[r++],
|
|
913
|
+
done: !e
|
|
914
|
+
};
|
|
915
|
+
} };
|
|
916
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
917
|
+
}, a = e && e.__importDefault || function(e) {
|
|
918
|
+
return e && e.__esModule ? e : { default: e };
|
|
919
|
+
};
|
|
920
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.BaseItem = e.MmlStack = void 0;
|
|
921
|
+
var o = a(d()), s = function() {
|
|
922
|
+
function e(e) {
|
|
923
|
+
this._nodes = e;
|
|
924
|
+
}
|
|
925
|
+
return Object.defineProperty(e.prototype, "nodes", {
|
|
926
|
+
get: function() {
|
|
927
|
+
return this._nodes;
|
|
928
|
+
},
|
|
929
|
+
enumerable: !1,
|
|
930
|
+
configurable: !0
|
|
931
|
+
}), e.prototype.Push = function() {
|
|
932
|
+
for (var e, t = [], i = 0; i < arguments.length; i++) t[i] = arguments[i];
|
|
933
|
+
(e = this._nodes).push.apply(e, r([], n(t), !1));
|
|
934
|
+
}, e.prototype.Pop = function() {
|
|
935
|
+
return this._nodes.pop();
|
|
936
|
+
}, Object.defineProperty(e.prototype, "First", {
|
|
937
|
+
get: function() {
|
|
938
|
+
return this._nodes[this.Size() - 1];
|
|
939
|
+
},
|
|
940
|
+
set: function(e) {
|
|
941
|
+
this._nodes[this.Size() - 1] = e;
|
|
942
|
+
},
|
|
943
|
+
enumerable: !1,
|
|
944
|
+
configurable: !0
|
|
945
|
+
}), Object.defineProperty(e.prototype, "Last", {
|
|
946
|
+
get: function() {
|
|
947
|
+
return this._nodes[0];
|
|
948
|
+
},
|
|
949
|
+
set: function(e) {
|
|
950
|
+
this._nodes[0] = e;
|
|
951
|
+
},
|
|
952
|
+
enumerable: !1,
|
|
953
|
+
configurable: !0
|
|
954
|
+
}), e.prototype.Peek = function(e) {
|
|
955
|
+
return e ??= 1, this._nodes.slice(this.Size() - e);
|
|
956
|
+
}, e.prototype.Size = function() {
|
|
957
|
+
return this._nodes.length;
|
|
958
|
+
}, e.prototype.Clear = function() {
|
|
959
|
+
this._nodes = [];
|
|
960
|
+
}, e.prototype.toMml = function(e, t) {
|
|
961
|
+
return e === void 0 && (e = !0), this._nodes.length === 1 && !t ? this.First : this.create("node", e ? "inferredMrow" : "mrow", this._nodes, {});
|
|
962
|
+
}, e.prototype.create = function(e) {
|
|
963
|
+
for (var t, i = [], a = 1; a < arguments.length; a++) i[a - 1] = arguments[a];
|
|
964
|
+
return (t = this.factory.configuration.nodeFactory).create.apply(t, r([e], n(i), !1));
|
|
965
|
+
}, e;
|
|
966
|
+
}();
|
|
967
|
+
e.MmlStack = s, e.BaseItem = function(e) {
|
|
968
|
+
t(r, e);
|
|
969
|
+
function r(t) {
|
|
970
|
+
var n = [...arguments].slice(1), r = e.call(this, n) || this;
|
|
971
|
+
return r.factory = t, r.global = {}, r._properties = {}, r.isOpen && (r._env = {}), r;
|
|
972
|
+
}
|
|
973
|
+
return Object.defineProperty(r.prototype, "kind", {
|
|
974
|
+
get: function() {
|
|
975
|
+
return "base";
|
|
976
|
+
},
|
|
977
|
+
enumerable: !1,
|
|
978
|
+
configurable: !0
|
|
979
|
+
}), Object.defineProperty(r.prototype, "env", {
|
|
980
|
+
get: function() {
|
|
981
|
+
return this._env;
|
|
982
|
+
},
|
|
983
|
+
set: function(e) {
|
|
984
|
+
this._env = e;
|
|
985
|
+
},
|
|
986
|
+
enumerable: !1,
|
|
987
|
+
configurable: !0
|
|
988
|
+
}), Object.defineProperty(r.prototype, "copyEnv", {
|
|
989
|
+
get: function() {
|
|
990
|
+
return !0;
|
|
991
|
+
},
|
|
992
|
+
enumerable: !1,
|
|
993
|
+
configurable: !0
|
|
994
|
+
}), r.prototype.getProperty = function(e) {
|
|
995
|
+
return this._properties[e];
|
|
996
|
+
}, r.prototype.setProperty = function(e, t) {
|
|
997
|
+
return this._properties[e] = t, this;
|
|
998
|
+
}, Object.defineProperty(r.prototype, "isOpen", {
|
|
999
|
+
get: function() {
|
|
1000
|
+
return !1;
|
|
1001
|
+
},
|
|
1002
|
+
enumerable: !1,
|
|
1003
|
+
configurable: !0
|
|
1004
|
+
}), Object.defineProperty(r.prototype, "isClose", {
|
|
1005
|
+
get: function() {
|
|
1006
|
+
return !1;
|
|
1007
|
+
},
|
|
1008
|
+
enumerable: !1,
|
|
1009
|
+
configurable: !0
|
|
1010
|
+
}), Object.defineProperty(r.prototype, "isFinal", {
|
|
1011
|
+
get: function() {
|
|
1012
|
+
return !1;
|
|
1013
|
+
},
|
|
1014
|
+
enumerable: !1,
|
|
1015
|
+
configurable: !0
|
|
1016
|
+
}), r.prototype.isKind = function(e) {
|
|
1017
|
+
return e === this.kind;
|
|
1018
|
+
}, r.prototype.checkItem = function(e) {
|
|
1019
|
+
if (e.isKind("over") && this.isOpen && (e.setProperty("num", this.toMml(!1)), this.Clear()), e.isKind("cell") && this.isOpen) {
|
|
1020
|
+
if (e.getProperty("linebreak")) return r.fail;
|
|
1021
|
+
throw new o.default("Misplaced", "Misplaced %1", e.getName());
|
|
1022
|
+
}
|
|
1023
|
+
if (e.isClose && this.getErrors(e.kind)) {
|
|
1024
|
+
var t = n(this.getErrors(e.kind), 2), i = t[0], a = t[1];
|
|
1025
|
+
throw new o.default(i, a, e.getName());
|
|
1026
|
+
}
|
|
1027
|
+
return e.isFinal ? (this.Push(e.First), r.fail) : r.success;
|
|
1028
|
+
}, r.prototype.clearEnv = function() {
|
|
1029
|
+
var e, t;
|
|
1030
|
+
try {
|
|
1031
|
+
for (var n = i(Object.keys(this.env)), r = n.next(); !r.done; r = n.next()) {
|
|
1032
|
+
var a = r.value;
|
|
1033
|
+
delete this.env[a];
|
|
1034
|
+
}
|
|
1035
|
+
} catch (t) {
|
|
1036
|
+
e = { error: t };
|
|
1037
|
+
} finally {
|
|
1038
|
+
try {
|
|
1039
|
+
r && !r.done && (t = n.return) && t.call(n);
|
|
1040
|
+
} finally {
|
|
1041
|
+
if (e) throw e.error;
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
}, r.prototype.setProperties = function(e) {
|
|
1045
|
+
return Object.assign(this._properties, e), this;
|
|
1046
|
+
}, r.prototype.getName = function() {
|
|
1047
|
+
return this.getProperty("name");
|
|
1048
|
+
}, r.prototype.toString = function() {
|
|
1049
|
+
return this.kind + "[" + this.nodes.join("; ") + "]";
|
|
1050
|
+
}, r.prototype.getErrors = function(e) {
|
|
1051
|
+
return (this.constructor.errors || {})[e] || r.errors[e];
|
|
1052
|
+
}, r.fail = [null, !1], r.success = [null, !0], r.errors = {
|
|
1053
|
+
end: ["MissingBeginExtraEnd", "Missing \\begin{%1} or extra \\end{%1}"],
|
|
1054
|
+
close: ["ExtraCloseMissingOpen", "Extra close brace or missing open brace"],
|
|
1055
|
+
right: ["MissingLeftExtraRight", "Missing \\left or extra \\right"],
|
|
1056
|
+
middle: ["ExtraMiddle", "Extra \\middle"]
|
|
1057
|
+
}, r;
|
|
1058
|
+
}(s);
|
|
1059
|
+
})), g = /* @__PURE__ */ e(((e) => {
|
|
1060
|
+
var t = e && e.__extends || (function() {
|
|
1061
|
+
var e = function(t, n) {
|
|
1062
|
+
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
1063
|
+
e.__proto__ = t;
|
|
1064
|
+
} || function(e, t) {
|
|
1065
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
1066
|
+
}, e(t, n);
|
|
1067
|
+
};
|
|
1068
|
+
return function(t, n) {
|
|
1069
|
+
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
1070
|
+
e(t, n);
|
|
1071
|
+
function r() {
|
|
1072
|
+
this.constructor = t;
|
|
1073
|
+
}
|
|
1074
|
+
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
1075
|
+
};
|
|
1076
|
+
})(), n;
|
|
1077
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
1078
|
+
var r = h(), i = a(), o = function(e) {
|
|
1079
|
+
t(n, e);
|
|
1080
|
+
function n() {
|
|
1081
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
1082
|
+
}
|
|
1083
|
+
return n;
|
|
1084
|
+
}(r.BaseItem);
|
|
1085
|
+
e.default = function(e) {
|
|
1086
|
+
t(r, e);
|
|
1087
|
+
function r() {
|
|
1088
|
+
var t = e !== null && e.apply(this, arguments) || this;
|
|
1089
|
+
return t.defaultKind = "dummy", t.configuration = null, t;
|
|
1090
|
+
}
|
|
1091
|
+
return r.DefaultStackItems = (n = {}, n[o.prototype.kind] = o, n), r;
|
|
1092
|
+
}(i.AbstractFactory);
|
|
1093
|
+
})), _ = /* @__PURE__ */ e(((e) => {
|
|
1094
|
+
var t = e && e.__read || function(e, t) {
|
|
1095
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
1096
|
+
if (!n) return e;
|
|
1097
|
+
var r = n.call(e), i, a = [], o;
|
|
1098
|
+
try {
|
|
1099
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
1100
|
+
} catch (e) {
|
|
1101
|
+
o = { error: e };
|
|
1102
|
+
} finally {
|
|
1103
|
+
try {
|
|
1104
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
1105
|
+
} finally {
|
|
1106
|
+
if (o) throw o.error;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
return a;
|
|
1110
|
+
}, n = e && e.__spreadArray || function(e, t, n) {
|
|
1111
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
1112
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
1113
|
+
}, r = e && e.__importDefault || function(e) {
|
|
1114
|
+
return e && e.__esModule ? e : { default: e };
|
|
1115
|
+
};
|
|
1116
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.NodeFactory = void 0;
|
|
1117
|
+
var i = r(u());
|
|
1118
|
+
e.NodeFactory = function() {
|
|
1119
|
+
function e() {
|
|
1120
|
+
this.mmlFactory = null, this.factory = {
|
|
1121
|
+
node: e.createNode,
|
|
1122
|
+
token: e.createToken,
|
|
1123
|
+
text: e.createText,
|
|
1124
|
+
error: e.createError
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
return e.createNode = function(e, t, n, r, a) {
|
|
1128
|
+
n === void 0 && (n = []), r === void 0 && (r = {});
|
|
1129
|
+
var o = e.mmlFactory.create(t);
|
|
1130
|
+
return o.setChildren(n), a && o.appendChild(a), i.default.setProperties(o, r), o;
|
|
1131
|
+
}, e.createToken = function(e, t, n, r) {
|
|
1132
|
+
n === void 0 && (n = {}), r === void 0 && (r = "");
|
|
1133
|
+
var i = e.create("text", r);
|
|
1134
|
+
return e.create("node", t, [], n, i);
|
|
1135
|
+
}, e.createText = function(e, t) {
|
|
1136
|
+
return t == null ? null : e.mmlFactory.create("text").setText(t);
|
|
1137
|
+
}, e.createError = function(e, t) {
|
|
1138
|
+
var n = e.create("text", t), r = e.create("node", "mtext", [], {}, n);
|
|
1139
|
+
return e.create("node", "merror", [r], { "data-mjx-error": t });
|
|
1140
|
+
}, e.prototype.setMmlFactory = function(e) {
|
|
1141
|
+
this.mmlFactory = e;
|
|
1142
|
+
}, e.prototype.set = function(e, t) {
|
|
1143
|
+
this.factory[e] = t;
|
|
1144
|
+
}, e.prototype.setCreators = function(e) {
|
|
1145
|
+
for (var t in e) this.set(t, e[t]);
|
|
1146
|
+
}, e.prototype.create = function(e) {
|
|
1147
|
+
var r = [...arguments].slice(1), i = (this.factory[e] || this.factory.node).apply(void 0, n([this, r[0]], t(r.slice(1)), !1));
|
|
1148
|
+
return e === "node" && this.configuration.addNode(r[0], i), i;
|
|
1149
|
+
}, e.prototype.get = function(e) {
|
|
1150
|
+
return this.factory[e];
|
|
1151
|
+
}, e;
|
|
1152
|
+
}();
|
|
1153
|
+
})), v = /* @__PURE__ */ e(((e) => {
|
|
1154
|
+
var n = e && e.__read || function(e, t) {
|
|
1155
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
1156
|
+
if (!n) return e;
|
|
1157
|
+
var r = n.call(e), i, a = [], o;
|
|
1158
|
+
try {
|
|
1159
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
1160
|
+
} catch (e) {
|
|
1161
|
+
o = { error: e };
|
|
1162
|
+
} finally {
|
|
1163
|
+
try {
|
|
1164
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
1165
|
+
} finally {
|
|
1166
|
+
if (o) throw o.error;
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
return a;
|
|
1170
|
+
}, r = e && e.__spreadArray || function(e, t, n) {
|
|
1171
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
1172
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
1173
|
+
}, i = e && e.__values || function(e) {
|
|
1174
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
1175
|
+
if (n) return n.call(e);
|
|
1176
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
1177
|
+
return e && r >= e.length && (e = void 0), {
|
|
1178
|
+
value: e && e[r++],
|
|
1179
|
+
done: !e
|
|
1180
|
+
};
|
|
1181
|
+
} };
|
|
1182
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1183
|
+
}, a = e && e.__importDefault || function(e) {
|
|
1184
|
+
return e && e.__esModule ? e : { default: e };
|
|
1185
|
+
};
|
|
1186
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
1187
|
+
var o = a(g()), s = _(), c = a(u()), l = t();
|
|
1188
|
+
e.default = function() {
|
|
1189
|
+
function e(e, t) {
|
|
1190
|
+
t === void 0 && (t = []), this.options = {}, this.packageData = /* @__PURE__ */ new Map(), this.parsers = [], this.root = null, this.nodeLists = {}, this.error = !1, this.handlers = e.handlers, this.nodeFactory = new s.NodeFactory(), this.nodeFactory.configuration = this, this.nodeFactory.setCreators(e.nodes), this.itemFactory = new o.default(e.items), this.itemFactory.configuration = this, l.defaultOptions.apply(void 0, r([this.options], n(t), !1)), (0, l.defaultOptions)(this.options, e.options);
|
|
1191
|
+
}
|
|
1192
|
+
return e.prototype.pushParser = function(e) {
|
|
1193
|
+
this.parsers.unshift(e);
|
|
1194
|
+
}, e.prototype.popParser = function() {
|
|
1195
|
+
this.parsers.shift();
|
|
1196
|
+
}, Object.defineProperty(e.prototype, "parser", {
|
|
1197
|
+
get: function() {
|
|
1198
|
+
return this.parsers[0];
|
|
1199
|
+
},
|
|
1200
|
+
enumerable: !1,
|
|
1201
|
+
configurable: !0
|
|
1202
|
+
}), e.prototype.clear = function() {
|
|
1203
|
+
this.parsers = [], this.root = null, this.nodeLists = {}, this.error = !1, this.tags.resetTag();
|
|
1204
|
+
}, e.prototype.addNode = function(e, t) {
|
|
1205
|
+
var n = this.nodeLists[e];
|
|
1206
|
+
if (n ||= this.nodeLists[e] = [], n.push(t), t.kind !== e) {
|
|
1207
|
+
var r = c.default.getProperty(t, "in-lists") || "", i = (r ? r.split(/,/) : []).concat(e).join(",");
|
|
1208
|
+
c.default.setProperty(t, "in-lists", i);
|
|
1209
|
+
}
|
|
1210
|
+
}, e.prototype.getList = function(e) {
|
|
1211
|
+
var t, n, r = this.nodeLists[e] || [], a = [];
|
|
1212
|
+
try {
|
|
1213
|
+
for (var o = i(r), s = o.next(); !s.done; s = o.next()) {
|
|
1214
|
+
var c = s.value;
|
|
1215
|
+
this.inTree(c) && a.push(c);
|
|
1216
|
+
}
|
|
1217
|
+
} catch (e) {
|
|
1218
|
+
t = { error: e };
|
|
1219
|
+
} finally {
|
|
1220
|
+
try {
|
|
1221
|
+
s && !s.done && (n = o.return) && n.call(o);
|
|
1222
|
+
} finally {
|
|
1223
|
+
if (t) throw t.error;
|
|
1224
|
+
}
|
|
1225
|
+
}
|
|
1226
|
+
return this.nodeLists[e] = a, a;
|
|
1227
|
+
}, e.prototype.removeFromList = function(e, t) {
|
|
1228
|
+
var n, r, a = this.nodeLists[e] || [];
|
|
1229
|
+
try {
|
|
1230
|
+
for (var o = i(t), s = o.next(); !s.done; s = o.next()) {
|
|
1231
|
+
var c = s.value, l = a.indexOf(c);
|
|
1232
|
+
l >= 0 && a.splice(l, 1);
|
|
1233
|
+
}
|
|
1234
|
+
} catch (e) {
|
|
1235
|
+
n = { error: e };
|
|
1236
|
+
} finally {
|
|
1237
|
+
try {
|
|
1238
|
+
s && !s.done && (r = o.return) && r.call(o);
|
|
1239
|
+
} finally {
|
|
1240
|
+
if (n) throw n.error;
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
}, e.prototype.inTree = function(e) {
|
|
1244
|
+
for (; e && e !== this.root;) e = e.parent;
|
|
1245
|
+
return !!e;
|
|
1246
|
+
}, e;
|
|
1247
|
+
}();
|
|
1248
|
+
})), y = /* @__PURE__ */ e(((e) => {
|
|
1249
|
+
var t = e && e.__extends || (function() {
|
|
1250
|
+
var e = function(t, n) {
|
|
1251
|
+
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
1252
|
+
e.__proto__ = t;
|
|
1253
|
+
} || function(e, t) {
|
|
1254
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
1255
|
+
}, e(t, n);
|
|
1256
|
+
};
|
|
1257
|
+
return function(t, n) {
|
|
1258
|
+
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
1259
|
+
e(t, n);
|
|
1260
|
+
function r() {
|
|
1261
|
+
this.constructor = t;
|
|
1262
|
+
}
|
|
1263
|
+
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
1264
|
+
};
|
|
1265
|
+
})(), n = e && e.__values || function(e) {
|
|
1266
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
1267
|
+
if (n) return n.call(e);
|
|
1268
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
1269
|
+
return e && r >= e.length && (e = void 0), {
|
|
1270
|
+
value: e && e[r++],
|
|
1271
|
+
done: !e
|
|
1272
|
+
};
|
|
1273
|
+
} };
|
|
1274
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1275
|
+
}, r = e && e.__importDefault || function(e) {
|
|
1276
|
+
return e && e.__esModule ? e : { default: e };
|
|
1277
|
+
};
|
|
1278
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.TagsFactory = e.AllTags = e.NoTags = e.AbstractTags = e.TagInfo = e.Label = void 0;
|
|
1279
|
+
var i = r(m()), a = function() {
|
|
1280
|
+
function e(e, t) {
|
|
1281
|
+
e === void 0 && (e = "???"), t === void 0 && (t = ""), this.tag = e, this.id = t;
|
|
1282
|
+
}
|
|
1283
|
+
return e;
|
|
1284
|
+
}();
|
|
1285
|
+
e.Label = a;
|
|
1286
|
+
var o = function() {
|
|
1287
|
+
function e(e, t, n, r, i, a, o, s) {
|
|
1288
|
+
e === void 0 && (e = ""), t === void 0 && (t = !1), n === void 0 && (n = !1), r === void 0 && (r = null), i === void 0 && (i = ""), a === void 0 && (a = ""), o === void 0 && (o = !1), s === void 0 && (s = ""), this.env = e, this.taggable = t, this.defaultTags = n, this.tag = r, this.tagId = i, this.tagFormat = a, this.noTag = o, this.labelId = s;
|
|
1289
|
+
}
|
|
1290
|
+
return e;
|
|
1291
|
+
}();
|
|
1292
|
+
e.TagInfo = o;
|
|
1293
|
+
var s = function() {
|
|
1294
|
+
function e() {
|
|
1295
|
+
this.counter = 0, this.allCounter = 0, this.configuration = null, this.ids = {}, this.allIds = {}, this.labels = {}, this.allLabels = {}, this.redo = !1, this.refUpdate = !1, this.currentTag = new o(), this.history = [], this.stack = [], this.enTag = function(e, t) {
|
|
1296
|
+
var n = this.configuration.nodeFactory, r = n.create("node", "mtd", [e]), i = n.create("node", "mlabeledtr", [t, r]);
|
|
1297
|
+
return n.create("node", "mtable", [i], {
|
|
1298
|
+
side: this.configuration.options.tagSide,
|
|
1299
|
+
minlabelspacing: this.configuration.options.tagIndent,
|
|
1300
|
+
displaystyle: !0
|
|
1301
|
+
});
|
|
1302
|
+
};
|
|
1303
|
+
}
|
|
1304
|
+
return e.prototype.start = function(e, t, n) {
|
|
1305
|
+
this.currentTag && this.stack.push(this.currentTag), this.currentTag = new o(e, t, n);
|
|
1306
|
+
}, Object.defineProperty(e.prototype, "env", {
|
|
1307
|
+
get: function() {
|
|
1308
|
+
return this.currentTag.env;
|
|
1309
|
+
},
|
|
1310
|
+
enumerable: !1,
|
|
1311
|
+
configurable: !0
|
|
1312
|
+
}), e.prototype.end = function() {
|
|
1313
|
+
this.history.push(this.currentTag), this.currentTag = this.stack.pop();
|
|
1314
|
+
}, e.prototype.tag = function(e, t) {
|
|
1315
|
+
this.currentTag.tag = e, this.currentTag.tagFormat = t ? e : this.formatTag(e), this.currentTag.noTag = !1;
|
|
1316
|
+
}, e.prototype.notag = function() {
|
|
1317
|
+
this.tag("", !0), this.currentTag.noTag = !0;
|
|
1318
|
+
}, Object.defineProperty(e.prototype, "noTag", {
|
|
1319
|
+
get: function() {
|
|
1320
|
+
return this.currentTag.noTag;
|
|
1321
|
+
},
|
|
1322
|
+
enumerable: !1,
|
|
1323
|
+
configurable: !0
|
|
1324
|
+
}), Object.defineProperty(e.prototype, "label", {
|
|
1325
|
+
get: function() {
|
|
1326
|
+
return this.currentTag.labelId;
|
|
1327
|
+
},
|
|
1328
|
+
set: function(e) {
|
|
1329
|
+
this.currentTag.labelId = e;
|
|
1330
|
+
},
|
|
1331
|
+
enumerable: !1,
|
|
1332
|
+
configurable: !0
|
|
1333
|
+
}), e.prototype.formatUrl = function(e, t) {
|
|
1334
|
+
return t + "#" + encodeURIComponent(e);
|
|
1335
|
+
}, e.prototype.formatTag = function(e) {
|
|
1336
|
+
return "(" + e + ")";
|
|
1337
|
+
}, e.prototype.formatId = function(e) {
|
|
1338
|
+
return "mjx-eqn:" + e.replace(/\s/g, "_");
|
|
1339
|
+
}, e.prototype.formatNumber = function(e) {
|
|
1340
|
+
return e.toString();
|
|
1341
|
+
}, e.prototype.autoTag = function() {
|
|
1342
|
+
this.currentTag.tag ?? (this.counter++, this.tag(this.formatNumber(this.counter), !1));
|
|
1343
|
+
}, e.prototype.clearTag = function() {
|
|
1344
|
+
this.label = "", this.tag(null, !0), this.currentTag.tagId = "";
|
|
1345
|
+
}, e.prototype.getTag = function(e) {
|
|
1346
|
+
if (e === void 0 && (e = !1), e) return this.autoTag(), this.makeTag();
|
|
1347
|
+
var t = this.currentTag;
|
|
1348
|
+
return t.taggable && !t.noTag && (t.defaultTags && this.autoTag(), t.tag) ? this.makeTag() : null;
|
|
1349
|
+
}, e.prototype.resetTag = function() {
|
|
1350
|
+
this.history = [], this.redo = !1, this.refUpdate = !1, this.clearTag();
|
|
1351
|
+
}, e.prototype.reset = function(e) {
|
|
1352
|
+
e === void 0 && (e = 0), this.resetTag(), this.counter = this.allCounter = e, this.allLabels = {}, this.allIds = {};
|
|
1353
|
+
}, e.prototype.startEquation = function(e) {
|
|
1354
|
+
this.history = [], this.stack = [], this.clearTag(), this.currentTag = new o("", void 0, void 0), this.labels = {}, this.ids = {}, this.counter = this.allCounter, this.redo = !1;
|
|
1355
|
+
var t = e.inputData.recompile;
|
|
1356
|
+
t && (this.refUpdate = !0, this.counter = t.counter);
|
|
1357
|
+
}, e.prototype.finishEquation = function(e) {
|
|
1358
|
+
this.redo && (e.inputData.recompile = {
|
|
1359
|
+
state: e.state(),
|
|
1360
|
+
counter: this.allCounter
|
|
1361
|
+
}), this.refUpdate || (this.allCounter = this.counter), Object.assign(this.allIds, this.ids), Object.assign(this.allLabels, this.labels);
|
|
1362
|
+
}, e.prototype.finalize = function(e, t) {
|
|
1363
|
+
if (!t.display || this.currentTag.env || this.currentTag.tag == null) return e;
|
|
1364
|
+
var n = this.makeTag();
|
|
1365
|
+
return this.enTag(e, n);
|
|
1366
|
+
}, e.prototype.makeId = function() {
|
|
1367
|
+
this.currentTag.tagId = this.formatId(this.configuration.options.useLabelIds && this.label || this.currentTag.tag);
|
|
1368
|
+
}, e.prototype.makeTag = function() {
|
|
1369
|
+
this.makeId(), this.label && (this.labels[this.label] = new a(this.currentTag.tag, this.currentTag.tagId));
|
|
1370
|
+
var e = new i.default("\\text{" + this.currentTag.tagFormat + "}", {}, this.configuration).mml();
|
|
1371
|
+
return this.configuration.nodeFactory.create("node", "mtd", [e], { id: this.currentTag.tagId });
|
|
1372
|
+
}, e;
|
|
1373
|
+
}();
|
|
1374
|
+
e.AbstractTags = s;
|
|
1375
|
+
var c = function(e) {
|
|
1376
|
+
t(n, e);
|
|
1377
|
+
function n() {
|
|
1378
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
1379
|
+
}
|
|
1380
|
+
return n.prototype.autoTag = function() {}, n.prototype.getTag = function() {
|
|
1381
|
+
return this.currentTag.tag ? e.prototype.getTag.call(this) : null;
|
|
1382
|
+
}, n;
|
|
1383
|
+
}(s);
|
|
1384
|
+
e.NoTags = c;
|
|
1385
|
+
var l = function(e) {
|
|
1386
|
+
t(n, e);
|
|
1387
|
+
function n() {
|
|
1388
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
1389
|
+
}
|
|
1390
|
+
return n.prototype.finalize = function(e, t) {
|
|
1391
|
+
if (!t.display || this.history.find(function(e) {
|
|
1392
|
+
return e.taggable;
|
|
1393
|
+
})) return e;
|
|
1394
|
+
var n = this.getTag(!0);
|
|
1395
|
+
return this.enTag(e, n);
|
|
1396
|
+
}, n;
|
|
1397
|
+
}(s);
|
|
1398
|
+
e.AllTags = l, (function(e) {
|
|
1399
|
+
var t = new Map([["none", c], ["all", l]]), r = "none";
|
|
1400
|
+
e.OPTIONS = {
|
|
1401
|
+
tags: r,
|
|
1402
|
+
tagSide: "right",
|
|
1403
|
+
tagIndent: "0.8em",
|
|
1404
|
+
useLabelIds: !0,
|
|
1405
|
+
ignoreDuplicateLabels: !1
|
|
1406
|
+
}, e.add = function(e, n) {
|
|
1407
|
+
t.set(e, n);
|
|
1408
|
+
}, e.addTags = function(t) {
|
|
1409
|
+
var r, i;
|
|
1410
|
+
try {
|
|
1411
|
+
for (var a = n(Object.keys(t)), o = a.next(); !o.done; o = a.next()) {
|
|
1412
|
+
var s = o.value;
|
|
1413
|
+
e.add(s, t[s]);
|
|
1414
|
+
}
|
|
1415
|
+
} catch (e) {
|
|
1416
|
+
r = { error: e };
|
|
1417
|
+
} finally {
|
|
1418
|
+
try {
|
|
1419
|
+
o && !o.done && (i = a.return) && i.call(a);
|
|
1420
|
+
} finally {
|
|
1421
|
+
if (r) throw r.error;
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
}, e.create = function(e) {
|
|
1425
|
+
var n = t.get(e) || t.get(r);
|
|
1426
|
+
if (!n) throw Error("Unknown tags class");
|
|
1427
|
+
return new n();
|
|
1428
|
+
}, e.setDefault = function(e) {
|
|
1429
|
+
r = e;
|
|
1430
|
+
}, e.getDefault = function() {
|
|
1431
|
+
return e.create(r);
|
|
1432
|
+
};
|
|
1433
|
+
})(e.TagsFactory ||= {});
|
|
1434
|
+
})), b = /* @__PURE__ */ e(((e) => {
|
|
1435
|
+
var t = e && e.__values || function(e) {
|
|
1436
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
1437
|
+
if (n) return n.call(e);
|
|
1438
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
1439
|
+
return e && r >= e.length && (e = void 0), {
|
|
1440
|
+
value: e && e[r++],
|
|
1441
|
+
done: !e
|
|
1442
|
+
};
|
|
1443
|
+
} };
|
|
1444
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1445
|
+
}, r = e && e.__read || function(e, t) {
|
|
1446
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
1447
|
+
if (!n) return e;
|
|
1448
|
+
var r = n.call(e), i, a = [], o;
|
|
1449
|
+
try {
|
|
1450
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
1451
|
+
} catch (e) {
|
|
1452
|
+
o = { error: e };
|
|
1453
|
+
} finally {
|
|
1454
|
+
try {
|
|
1455
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
1456
|
+
} finally {
|
|
1457
|
+
if (o) throw o.error;
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
return a;
|
|
1461
|
+
};
|
|
1462
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.SubHandlers = e.SubHandler = e.MapHandler = void 0;
|
|
1463
|
+
var i = n(), a = s(), o;
|
|
1464
|
+
(function(e) {
|
|
1465
|
+
var t = /* @__PURE__ */ new Map();
|
|
1466
|
+
e.register = function(e) {
|
|
1467
|
+
t.set(e.name, e);
|
|
1468
|
+
}, e.getMap = function(e) {
|
|
1469
|
+
return t.get(e);
|
|
1470
|
+
};
|
|
1471
|
+
})(o = e.MapHandler ||= {});
|
|
1472
|
+
var c = function() {
|
|
1473
|
+
function e() {
|
|
1474
|
+
this._configuration = new i.PrioritizedList(), this._fallback = new a.FunctionList();
|
|
1475
|
+
}
|
|
1476
|
+
return e.prototype.add = function(e, n, r) {
|
|
1477
|
+
var a, s;
|
|
1478
|
+
r === void 0 && (r = i.PrioritizedList.DEFAULTPRIORITY);
|
|
1479
|
+
try {
|
|
1480
|
+
for (var c = t(e.slice().reverse()), l = c.next(); !l.done; l = c.next()) {
|
|
1481
|
+
var u = l.value, d = o.getMap(u);
|
|
1482
|
+
if (!d) {
|
|
1483
|
+
this.warn("Configuration " + u + " not found! Omitted.");
|
|
1484
|
+
return;
|
|
1485
|
+
}
|
|
1486
|
+
this._configuration.add(d, r);
|
|
1487
|
+
}
|
|
1488
|
+
} catch (e) {
|
|
1489
|
+
a = { error: e };
|
|
1490
|
+
} finally {
|
|
1491
|
+
try {
|
|
1492
|
+
l && !l.done && (s = c.return) && s.call(c);
|
|
1493
|
+
} finally {
|
|
1494
|
+
if (a) throw a.error;
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
n && this._fallback.add(n, r);
|
|
1498
|
+
}, e.prototype.parse = function(e) {
|
|
1499
|
+
var n, i;
|
|
1500
|
+
try {
|
|
1501
|
+
for (var a = t(this._configuration), o = a.next(); !o.done; o = a.next()) {
|
|
1502
|
+
var s = o.value.item.parse(e);
|
|
1503
|
+
if (s) return s;
|
|
1504
|
+
}
|
|
1505
|
+
} catch (e) {
|
|
1506
|
+
n = { error: e };
|
|
1507
|
+
} finally {
|
|
1508
|
+
try {
|
|
1509
|
+
o && !o.done && (i = a.return) && i.call(a);
|
|
1510
|
+
} finally {
|
|
1511
|
+
if (n) throw n.error;
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
var c = r(e, 2), l = c[0], u = c[1];
|
|
1515
|
+
Array.from(this._fallback)[0].item(l, u);
|
|
1516
|
+
}, e.prototype.lookup = function(e) {
|
|
1517
|
+
var t = this.applicable(e);
|
|
1518
|
+
return t ? t.lookup(e) : null;
|
|
1519
|
+
}, e.prototype.contains = function(e) {
|
|
1520
|
+
return !!this.applicable(e);
|
|
1521
|
+
}, e.prototype.toString = function() {
|
|
1522
|
+
var e, n, r = [];
|
|
1523
|
+
try {
|
|
1524
|
+
for (var i = t(this._configuration), a = i.next(); !a.done; a = i.next()) {
|
|
1525
|
+
var o = a.value.item;
|
|
1526
|
+
r.push(o.name);
|
|
1527
|
+
}
|
|
1528
|
+
} catch (t) {
|
|
1529
|
+
e = { error: t };
|
|
1530
|
+
} finally {
|
|
1531
|
+
try {
|
|
1532
|
+
a && !a.done && (n = i.return) && n.call(i);
|
|
1533
|
+
} finally {
|
|
1534
|
+
if (e) throw e.error;
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
return r.join(", ");
|
|
1538
|
+
}, e.prototype.applicable = function(e) {
|
|
1539
|
+
var n, r;
|
|
1540
|
+
try {
|
|
1541
|
+
for (var i = t(this._configuration), a = i.next(); !a.done; a = i.next()) {
|
|
1542
|
+
var o = a.value.item;
|
|
1543
|
+
if (o.contains(e)) return o;
|
|
1544
|
+
}
|
|
1545
|
+
} catch (e) {
|
|
1546
|
+
n = { error: e };
|
|
1547
|
+
} finally {
|
|
1548
|
+
try {
|
|
1549
|
+
a && !a.done && (r = i.return) && r.call(i);
|
|
1550
|
+
} finally {
|
|
1551
|
+
if (n) throw n.error;
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
return null;
|
|
1555
|
+
}, e.prototype.retrieve = function(e) {
|
|
1556
|
+
var n, r;
|
|
1557
|
+
try {
|
|
1558
|
+
for (var i = t(this._configuration), a = i.next(); !a.done; a = i.next()) {
|
|
1559
|
+
var o = a.value.item;
|
|
1560
|
+
if (o.name === e) return o;
|
|
1561
|
+
}
|
|
1562
|
+
} catch (e) {
|
|
1563
|
+
n = { error: e };
|
|
1564
|
+
} finally {
|
|
1565
|
+
try {
|
|
1566
|
+
a && !a.done && (r = i.return) && r.call(i);
|
|
1567
|
+
} finally {
|
|
1568
|
+
if (n) throw n.error;
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
return null;
|
|
1572
|
+
}, e.prototype.warn = function(e) {
|
|
1573
|
+
console.log("TexParser Warning: " + e);
|
|
1574
|
+
}, e;
|
|
1575
|
+
}();
|
|
1576
|
+
e.SubHandler = c, e.SubHandlers = function() {
|
|
1577
|
+
function e() {
|
|
1578
|
+
this.map = /* @__PURE__ */ new Map();
|
|
1579
|
+
}
|
|
1580
|
+
return e.prototype.add = function(e, n, r) {
|
|
1581
|
+
var a, o;
|
|
1582
|
+
r === void 0 && (r = i.PrioritizedList.DEFAULTPRIORITY);
|
|
1583
|
+
try {
|
|
1584
|
+
for (var s = t(Object.keys(e)), l = s.next(); !l.done; l = s.next()) {
|
|
1585
|
+
var u = l.value, d = this.get(u);
|
|
1586
|
+
d || (d = new c(), this.set(u, d)), d.add(e[u], n[u], r);
|
|
1587
|
+
}
|
|
1588
|
+
} catch (e) {
|
|
1589
|
+
a = { error: e };
|
|
1590
|
+
} finally {
|
|
1591
|
+
try {
|
|
1592
|
+
l && !l.done && (o = s.return) && o.call(s);
|
|
1593
|
+
} finally {
|
|
1594
|
+
if (a) throw a.error;
|
|
1595
|
+
}
|
|
1596
|
+
}
|
|
1597
|
+
}, e.prototype.set = function(e, t) {
|
|
1598
|
+
this.map.set(e, t);
|
|
1599
|
+
}, e.prototype.get = function(e) {
|
|
1600
|
+
return this.map.get(e);
|
|
1601
|
+
}, e.prototype.retrieve = function(e) {
|
|
1602
|
+
var n, r;
|
|
1603
|
+
try {
|
|
1604
|
+
for (var i = t(this.map.values()), a = i.next(); !a.done; a = i.next()) {
|
|
1605
|
+
var o = a.value.retrieve(e);
|
|
1606
|
+
if (o) return o;
|
|
1607
|
+
}
|
|
1608
|
+
} catch (e) {
|
|
1609
|
+
n = { error: e };
|
|
1610
|
+
} finally {
|
|
1611
|
+
try {
|
|
1612
|
+
a && !a.done && (r = i.return) && r.call(i);
|
|
1613
|
+
} finally {
|
|
1614
|
+
if (n) throw n.error;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
return null;
|
|
1618
|
+
}, e.prototype.keys = function() {
|
|
1619
|
+
return this.map.keys();
|
|
1620
|
+
}, e;
|
|
1621
|
+
}();
|
|
1622
|
+
})), x = /* @__PURE__ */ e(((e) => {
|
|
1623
|
+
var r = e && e.__values || function(e) {
|
|
1624
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
1625
|
+
if (n) return n.call(e);
|
|
1626
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
1627
|
+
return e && r >= e.length && (e = void 0), {
|
|
1628
|
+
value: e && e[r++],
|
|
1629
|
+
done: !e
|
|
1630
|
+
};
|
|
1631
|
+
} };
|
|
1632
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1633
|
+
}, i = e && e.__read || function(e, t) {
|
|
1634
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
1635
|
+
if (!n) return e;
|
|
1636
|
+
var r = n.call(e), i, a = [], o;
|
|
1637
|
+
try {
|
|
1638
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
1639
|
+
} catch (e) {
|
|
1640
|
+
o = { error: e };
|
|
1641
|
+
} finally {
|
|
1642
|
+
try {
|
|
1643
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
1644
|
+
} finally {
|
|
1645
|
+
if (o) throw o.error;
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
return a;
|
|
1649
|
+
};
|
|
1650
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.ParserConfiguration = e.ConfigurationHandler = e.Configuration = void 0;
|
|
1651
|
+
var a = t(), o = b(), c = s(), l = n(), u = y();
|
|
1652
|
+
e.Configuration = function() {
|
|
1653
|
+
function e(e, t, n, r, i, a, o, s, c, l, u, d, f) {
|
|
1654
|
+
t === void 0 && (t = {}), n === void 0 && (n = {}), r === void 0 && (r = {}), i === void 0 && (i = {}), a === void 0 && (a = {}), o === void 0 && (o = {}), s === void 0 && (s = []), c === void 0 && (c = []), l === void 0 && (l = null), u === void 0 && (u = null), this.name = e, this.handler = t, this.fallback = n, this.items = r, this.tags = i, this.options = a, this.nodes = o, this.preprocessors = s, this.postprocessors = c, this.initMethod = l, this.configMethod = u, this.priority = d, this.parser = f, this.handler = Object.assign({
|
|
1655
|
+
character: [],
|
|
1656
|
+
delimiter: [],
|
|
1657
|
+
macro: [],
|
|
1658
|
+
environment: []
|
|
1659
|
+
}, t);
|
|
1660
|
+
}
|
|
1661
|
+
return e.makeProcessor = function(e, t) {
|
|
1662
|
+
return Array.isArray(e) ? e : [e, t];
|
|
1663
|
+
}, e._create = function(t, n) {
|
|
1664
|
+
var r = this;
|
|
1665
|
+
n === void 0 && (n = {});
|
|
1666
|
+
var i = n.priority || l.PrioritizedList.DEFAULTPRIORITY, a = n.init ? this.makeProcessor(n.init, i) : null, o = n.config ? this.makeProcessor(n.config, i) : null, s = (n.preprocessors || []).map(function(e) {
|
|
1667
|
+
return r.makeProcessor(e, i);
|
|
1668
|
+
}), c = (n.postprocessors || []).map(function(e) {
|
|
1669
|
+
return r.makeProcessor(e, i);
|
|
1670
|
+
}), u = n.parser || "tex";
|
|
1671
|
+
return new e(t, n.handler || {}, n.fallback || {}, n.items || {}, n.tags || {}, n.options || {}, n.nodes || {}, s, c, a, o, i, u);
|
|
1672
|
+
}, e.create = function(t, n) {
|
|
1673
|
+
n === void 0 && (n = {});
|
|
1674
|
+
var r = e._create(t, n);
|
|
1675
|
+
return d.set(t, r), r;
|
|
1676
|
+
}, e.local = function(t) {
|
|
1677
|
+
return t === void 0 && (t = {}), e._create("", t);
|
|
1678
|
+
}, Object.defineProperty(e.prototype, "init", {
|
|
1679
|
+
get: function() {
|
|
1680
|
+
return this.initMethod ? this.initMethod[0] : null;
|
|
1681
|
+
},
|
|
1682
|
+
enumerable: !1,
|
|
1683
|
+
configurable: !0
|
|
1684
|
+
}), Object.defineProperty(e.prototype, "config", {
|
|
1685
|
+
get: function() {
|
|
1686
|
+
return this.configMethod ? this.configMethod[0] : null;
|
|
1687
|
+
},
|
|
1688
|
+
enumerable: !1,
|
|
1689
|
+
configurable: !0
|
|
1690
|
+
}), e;
|
|
1691
|
+
}();
|
|
1692
|
+
var d;
|
|
1693
|
+
(function(e) {
|
|
1694
|
+
var t = /* @__PURE__ */ new Map();
|
|
1695
|
+
e.set = function(e, n) {
|
|
1696
|
+
t.set(e, n);
|
|
1697
|
+
}, e.get = function(e) {
|
|
1698
|
+
return t.get(e);
|
|
1699
|
+
}, e.keys = function() {
|
|
1700
|
+
return t.keys();
|
|
1701
|
+
};
|
|
1702
|
+
})(d = e.ConfigurationHandler ||= {}), e.ParserConfiguration = function() {
|
|
1703
|
+
function e(e, t) {
|
|
1704
|
+
var n, i, a, s;
|
|
1705
|
+
t === void 0 && (t = ["tex"]), this.initMethod = new c.FunctionList(), this.configMethod = new c.FunctionList(), this.configurations = new l.PrioritizedList(), this.parsers = [], this.handlers = new o.SubHandlers(), this.items = {}, this.tags = {}, this.options = {}, this.nodes = {}, this.parsers = t;
|
|
1706
|
+
try {
|
|
1707
|
+
for (var u = r(e.slice().reverse()), d = u.next(); !d.done; d = u.next()) {
|
|
1708
|
+
var f = d.value;
|
|
1709
|
+
this.addPackage(f);
|
|
1710
|
+
}
|
|
1711
|
+
} catch (e) {
|
|
1712
|
+
n = { error: e };
|
|
1713
|
+
} finally {
|
|
1714
|
+
try {
|
|
1715
|
+
d && !d.done && (i = u.return) && i.call(u);
|
|
1716
|
+
} finally {
|
|
1717
|
+
if (n) throw n.error;
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
try {
|
|
1721
|
+
for (var p = r(this.configurations), m = p.next(); !m.done; m = p.next()) {
|
|
1722
|
+
var h = m.value, g = h.item, _ = h.priority;
|
|
1723
|
+
this.append(g, _);
|
|
1724
|
+
}
|
|
1725
|
+
} catch (e) {
|
|
1726
|
+
a = { error: e };
|
|
1727
|
+
} finally {
|
|
1728
|
+
try {
|
|
1729
|
+
m && !m.done && (s = p.return) && s.call(p);
|
|
1730
|
+
} finally {
|
|
1731
|
+
if (a) throw a.error;
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
return e.prototype.init = function() {
|
|
1736
|
+
this.initMethod.execute(this);
|
|
1737
|
+
}, e.prototype.config = function(e) {
|
|
1738
|
+
var t, n;
|
|
1739
|
+
this.configMethod.execute(this, e);
|
|
1740
|
+
try {
|
|
1741
|
+
for (var i = r(this.configurations), a = i.next(); !a.done; a = i.next()) {
|
|
1742
|
+
var o = a.value;
|
|
1743
|
+
this.addFilters(e, o.item);
|
|
1744
|
+
}
|
|
1745
|
+
} catch (e) {
|
|
1746
|
+
t = { error: e };
|
|
1747
|
+
} finally {
|
|
1748
|
+
try {
|
|
1749
|
+
a && !a.done && (n = i.return) && n.call(i);
|
|
1750
|
+
} finally {
|
|
1751
|
+
if (t) throw t.error;
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
}, e.prototype.addPackage = function(e) {
|
|
1755
|
+
var t = typeof e == "string" ? e : e[0], n = this.getPackage(t);
|
|
1756
|
+
n && this.configurations.add(n, typeof e == "string" ? n.priority : e[1]);
|
|
1757
|
+
}, e.prototype.add = function(e, t, n) {
|
|
1758
|
+
var i, o;
|
|
1759
|
+
n === void 0 && (n = {});
|
|
1760
|
+
var s = this.getPackage(e);
|
|
1761
|
+
this.append(s), this.configurations.add(s, s.priority), this.init();
|
|
1762
|
+
var c = t.parseOptions;
|
|
1763
|
+
c.nodeFactory.setCreators(s.nodes);
|
|
1764
|
+
try {
|
|
1765
|
+
for (var l = r(Object.keys(s.items)), d = l.next(); !d.done; d = l.next()) {
|
|
1766
|
+
var f = d.value;
|
|
1767
|
+
c.itemFactory.setNodeClass(f, s.items[f]);
|
|
1768
|
+
}
|
|
1769
|
+
} catch (e) {
|
|
1770
|
+
i = { error: e };
|
|
1771
|
+
} finally {
|
|
1772
|
+
try {
|
|
1773
|
+
d && !d.done && (o = l.return) && o.call(l);
|
|
1774
|
+
} finally {
|
|
1775
|
+
if (i) throw i.error;
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
u.TagsFactory.addTags(s.tags), (0, a.defaultOptions)(c.options, s.options), (0, a.userOptions)(c.options, n), this.addFilters(t, s), s.config && s.config(this, t);
|
|
1779
|
+
}, e.prototype.getPackage = function(e) {
|
|
1780
|
+
var t = d.get(e);
|
|
1781
|
+
if (t && this.parsers.indexOf(t.parser) < 0) throw Error(`Package ${e} doesn't target the proper parser`);
|
|
1782
|
+
return t;
|
|
1783
|
+
}, e.prototype.append = function(e, t) {
|
|
1784
|
+
t ||= e.priority, e.initMethod && this.initMethod.add(e.initMethod[0], e.initMethod[1]), e.configMethod && this.configMethod.add(e.configMethod[0], e.configMethod[1]), this.handlers.add(e.handler, e.fallback, t), Object.assign(this.items, e.items), Object.assign(this.tags, e.tags), (0, a.defaultOptions)(this.options, e.options), Object.assign(this.nodes, e.nodes);
|
|
1785
|
+
}, e.prototype.addFilters = function(e, t) {
|
|
1786
|
+
var n, a, o, s;
|
|
1787
|
+
try {
|
|
1788
|
+
for (var c = r(t.preprocessors), l = c.next(); !l.done; l = c.next()) {
|
|
1789
|
+
var u = i(l.value, 2), d = u[0], f = u[1];
|
|
1790
|
+
e.preFilters.add(d, f);
|
|
1791
|
+
}
|
|
1792
|
+
} catch (e) {
|
|
1793
|
+
n = { error: e };
|
|
1794
|
+
} finally {
|
|
1795
|
+
try {
|
|
1796
|
+
l && !l.done && (a = c.return) && a.call(c);
|
|
1797
|
+
} finally {
|
|
1798
|
+
if (n) throw n.error;
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
try {
|
|
1802
|
+
for (var p = r(t.postprocessors), m = p.next(); !m.done; m = p.next()) {
|
|
1803
|
+
var h = i(m.value, 2), g = h[0], f = h[1];
|
|
1804
|
+
e.postFilters.add(g, f);
|
|
1805
|
+
}
|
|
1806
|
+
} catch (e) {
|
|
1807
|
+
o = { error: e };
|
|
1808
|
+
} finally {
|
|
1809
|
+
try {
|
|
1810
|
+
m && !m.done && (s = p.return) && s.call(p);
|
|
1811
|
+
} finally {
|
|
1812
|
+
if (o) throw o.error;
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
}, e;
|
|
1816
|
+
}();
|
|
1817
|
+
})), S = /* @__PURE__ */ e(((e) => {
|
|
1818
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.Macro = e.Symbol = void 0, e.Symbol = function() {
|
|
1819
|
+
function e(e, t, n) {
|
|
1820
|
+
this._symbol = e, this._char = t, this._attributes = n;
|
|
1821
|
+
}
|
|
1822
|
+
return Object.defineProperty(e.prototype, "symbol", {
|
|
1823
|
+
get: function() {
|
|
1824
|
+
return this._symbol;
|
|
1825
|
+
},
|
|
1826
|
+
enumerable: !1,
|
|
1827
|
+
configurable: !0
|
|
1828
|
+
}), Object.defineProperty(e.prototype, "char", {
|
|
1829
|
+
get: function() {
|
|
1830
|
+
return this._char;
|
|
1831
|
+
},
|
|
1832
|
+
enumerable: !1,
|
|
1833
|
+
configurable: !0
|
|
1834
|
+
}), Object.defineProperty(e.prototype, "attributes", {
|
|
1835
|
+
get: function() {
|
|
1836
|
+
return this._attributes;
|
|
1837
|
+
},
|
|
1838
|
+
enumerable: !1,
|
|
1839
|
+
configurable: !0
|
|
1840
|
+
}), e;
|
|
1841
|
+
}(), e.Macro = function() {
|
|
1842
|
+
function e(e, t, n) {
|
|
1843
|
+
n === void 0 && (n = []), this._symbol = e, this._func = t, this._args = n;
|
|
1844
|
+
}
|
|
1845
|
+
return Object.defineProperty(e.prototype, "symbol", {
|
|
1846
|
+
get: function() {
|
|
1847
|
+
return this._symbol;
|
|
1848
|
+
},
|
|
1849
|
+
enumerable: !1,
|
|
1850
|
+
configurable: !0
|
|
1851
|
+
}), Object.defineProperty(e.prototype, "func", {
|
|
1852
|
+
get: function() {
|
|
1853
|
+
return this._func;
|
|
1854
|
+
},
|
|
1855
|
+
enumerable: !1,
|
|
1856
|
+
configurable: !0
|
|
1857
|
+
}), Object.defineProperty(e.prototype, "args", {
|
|
1858
|
+
get: function() {
|
|
1859
|
+
return this._args;
|
|
1860
|
+
},
|
|
1861
|
+
enumerable: !1,
|
|
1862
|
+
configurable: !0
|
|
1863
|
+
}), e;
|
|
1864
|
+
}();
|
|
1865
|
+
})), C = /* @__PURE__ */ e(((e) => {
|
|
1866
|
+
var t = e && e.__extends || (function() {
|
|
1867
|
+
var e = function(t, n) {
|
|
1868
|
+
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
1869
|
+
e.__proto__ = t;
|
|
1870
|
+
} || function(e, t) {
|
|
1871
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
1872
|
+
}, e(t, n);
|
|
1873
|
+
};
|
|
1874
|
+
return function(t, n) {
|
|
1875
|
+
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
1876
|
+
e(t, n);
|
|
1877
|
+
function r() {
|
|
1878
|
+
this.constructor = t;
|
|
1879
|
+
}
|
|
1880
|
+
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
1881
|
+
};
|
|
1882
|
+
})(), n = e && e.__read || function(e, t) {
|
|
1883
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
1884
|
+
if (!n) return e;
|
|
1885
|
+
var r = n.call(e), i, a = [], o;
|
|
1886
|
+
try {
|
|
1887
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
1888
|
+
} catch (e) {
|
|
1889
|
+
o = { error: e };
|
|
1890
|
+
} finally {
|
|
1891
|
+
try {
|
|
1892
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
1893
|
+
} finally {
|
|
1894
|
+
if (o) throw o.error;
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
return a;
|
|
1898
|
+
}, r = e && e.__values || function(e) {
|
|
1899
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
1900
|
+
if (n) return n.call(e);
|
|
1901
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
1902
|
+
return e && r >= e.length && (e = void 0), {
|
|
1903
|
+
value: e && e[r++],
|
|
1904
|
+
done: !e
|
|
1905
|
+
};
|
|
1906
|
+
} };
|
|
1907
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1908
|
+
}, i = e && e.__spreadArray || function(e, t, n) {
|
|
1909
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
1910
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
1911
|
+
};
|
|
1912
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.EnvironmentMap = e.CommandMap = e.MacroMap = e.DelimiterMap = e.CharacterMap = e.AbstractParseMap = e.RegExpMap = e.AbstractSymbolMap = e.parseResult = void 0;
|
|
1913
|
+
var a = S(), o = b();
|
|
1914
|
+
function s(e) {
|
|
1915
|
+
return e === void 0 ? !0 : e;
|
|
1916
|
+
}
|
|
1917
|
+
e.parseResult = s;
|
|
1918
|
+
var c = function() {
|
|
1919
|
+
function e(e, t) {
|
|
1920
|
+
this._name = e, this._parser = t, o.MapHandler.register(this);
|
|
1921
|
+
}
|
|
1922
|
+
return Object.defineProperty(e.prototype, "name", {
|
|
1923
|
+
get: function() {
|
|
1924
|
+
return this._name;
|
|
1925
|
+
},
|
|
1926
|
+
enumerable: !1,
|
|
1927
|
+
configurable: !0
|
|
1928
|
+
}), e.prototype.parserFor = function(e) {
|
|
1929
|
+
return this.contains(e) ? this.parser : null;
|
|
1930
|
+
}, e.prototype.parse = function(e) {
|
|
1931
|
+
var t = n(e, 2), r = t[0], i = t[1], a = this.parserFor(i), o = this.lookup(i);
|
|
1932
|
+
return a && o ? s(a(r, o)) : null;
|
|
1933
|
+
}, Object.defineProperty(e.prototype, "parser", {
|
|
1934
|
+
get: function() {
|
|
1935
|
+
return this._parser;
|
|
1936
|
+
},
|
|
1937
|
+
set: function(e) {
|
|
1938
|
+
this._parser = e;
|
|
1939
|
+
},
|
|
1940
|
+
enumerable: !1,
|
|
1941
|
+
configurable: !0
|
|
1942
|
+
}), e;
|
|
1943
|
+
}();
|
|
1944
|
+
e.AbstractSymbolMap = c, e.RegExpMap = function(e) {
|
|
1945
|
+
t(n, e);
|
|
1946
|
+
function n(t, n, r) {
|
|
1947
|
+
var i = e.call(this, t, n) || this;
|
|
1948
|
+
return i._regExp = r, i;
|
|
1949
|
+
}
|
|
1950
|
+
return n.prototype.contains = function(e) {
|
|
1951
|
+
return this._regExp.test(e);
|
|
1952
|
+
}, n.prototype.lookup = function(e) {
|
|
1953
|
+
return this.contains(e) ? e : null;
|
|
1954
|
+
}, n;
|
|
1955
|
+
}(c);
|
|
1956
|
+
var l = function(e) {
|
|
1957
|
+
t(n, e);
|
|
1958
|
+
function n() {
|
|
1959
|
+
var t = e !== null && e.apply(this, arguments) || this;
|
|
1960
|
+
return t.map = /* @__PURE__ */ new Map(), t;
|
|
1961
|
+
}
|
|
1962
|
+
return n.prototype.lookup = function(e) {
|
|
1963
|
+
return this.map.get(e);
|
|
1964
|
+
}, n.prototype.contains = function(e) {
|
|
1965
|
+
return this.map.has(e);
|
|
1966
|
+
}, n.prototype.add = function(e, t) {
|
|
1967
|
+
this.map.set(e, t);
|
|
1968
|
+
}, n.prototype.remove = function(e) {
|
|
1969
|
+
this.map.delete(e);
|
|
1970
|
+
}, n;
|
|
1971
|
+
}(c);
|
|
1972
|
+
e.AbstractParseMap = l;
|
|
1973
|
+
var u = function(e) {
|
|
1974
|
+
t(i, e);
|
|
1975
|
+
function i(t, i, o) {
|
|
1976
|
+
var s, c, l = e.call(this, t, i) || this;
|
|
1977
|
+
try {
|
|
1978
|
+
for (var u = r(Object.keys(o)), d = u.next(); !d.done; d = u.next()) {
|
|
1979
|
+
var f = d.value, p = o[f], m = n(typeof p == "string" ? [p, null] : p, 2), h = m[0], g = m[1], _ = new a.Symbol(f, h, g);
|
|
1980
|
+
l.add(f, _);
|
|
1981
|
+
}
|
|
1982
|
+
} catch (e) {
|
|
1983
|
+
s = { error: e };
|
|
1984
|
+
} finally {
|
|
1985
|
+
try {
|
|
1986
|
+
d && !d.done && (c = u.return) && c.call(u);
|
|
1987
|
+
} finally {
|
|
1988
|
+
if (s) throw s.error;
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
return l;
|
|
1992
|
+
}
|
|
1993
|
+
return i;
|
|
1994
|
+
}(l);
|
|
1995
|
+
e.CharacterMap = u, e.DelimiterMap = function(e) {
|
|
1996
|
+
t(r, e);
|
|
1997
|
+
function r() {
|
|
1998
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
1999
|
+
}
|
|
2000
|
+
return r.prototype.parse = function(t) {
|
|
2001
|
+
var r = n(t, 2), i = r[0], a = r[1];
|
|
2002
|
+
return e.prototype.parse.call(this, [i, "\\" + a]);
|
|
2003
|
+
}, r;
|
|
2004
|
+
}(u);
|
|
2005
|
+
var d = function(e) {
|
|
2006
|
+
t(o, e);
|
|
2007
|
+
function o(t, i, o) {
|
|
2008
|
+
var s, c, l = e.call(this, t, null) || this;
|
|
2009
|
+
try {
|
|
2010
|
+
for (var u = r(Object.keys(i)), d = u.next(); !d.done; d = u.next()) {
|
|
2011
|
+
var f = d.value, p = i[f], m = n(typeof p == "string" ? [p] : p), h = m[0], g = m.slice(1), _ = new a.Macro(f, o[h], g);
|
|
2012
|
+
l.add(f, _);
|
|
2013
|
+
}
|
|
2014
|
+
} catch (e) {
|
|
2015
|
+
s = { error: e };
|
|
2016
|
+
} finally {
|
|
2017
|
+
try {
|
|
2018
|
+
d && !d.done && (c = u.return) && c.call(u);
|
|
2019
|
+
} finally {
|
|
2020
|
+
if (s) throw s.error;
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
return l;
|
|
2024
|
+
}
|
|
2025
|
+
return o.prototype.parserFor = function(e) {
|
|
2026
|
+
var t = this.lookup(e);
|
|
2027
|
+
return t ? t.func : null;
|
|
2028
|
+
}, o.prototype.parse = function(e) {
|
|
2029
|
+
var t = n(e, 2), r = t[0], a = t[1], o = this.lookup(a), c = this.parserFor(a);
|
|
2030
|
+
return !o || !c ? null : s(c.apply(void 0, i([r, o.symbol], n(o.args), !1)));
|
|
2031
|
+
}, o;
|
|
2032
|
+
}(l);
|
|
2033
|
+
e.MacroMap = d, e.CommandMap = function(e) {
|
|
2034
|
+
t(r, e);
|
|
2035
|
+
function r() {
|
|
2036
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2037
|
+
}
|
|
2038
|
+
return r.prototype.parse = function(e) {
|
|
2039
|
+
var t = n(e, 2), r = t[0], a = t[1], o = this.lookup(a), c = this.parserFor(a);
|
|
2040
|
+
if (!o || !c) return null;
|
|
2041
|
+
var l = r.currentCS;
|
|
2042
|
+
r.currentCS = "\\" + a;
|
|
2043
|
+
var u = c.apply(void 0, i([r, "\\" + o.symbol], n(o.args), !1));
|
|
2044
|
+
return r.currentCS = l, s(u);
|
|
2045
|
+
}, r;
|
|
2046
|
+
}(d), e.EnvironmentMap = function(e) {
|
|
2047
|
+
t(r, e);
|
|
2048
|
+
function r(t, n, r, i) {
|
|
2049
|
+
var a = e.call(this, t, r, i) || this;
|
|
2050
|
+
return a.parser = n, a;
|
|
2051
|
+
}
|
|
2052
|
+
return r.prototype.parse = function(e) {
|
|
2053
|
+
var t = n(e, 2), r = t[0], i = t[1], a = this.lookup(i), o = this.parserFor(i);
|
|
2054
|
+
return !a || !o ? null : s(this.parser(r, a.symbol, o, a.args));
|
|
2055
|
+
}, r;
|
|
2056
|
+
}(d);
|
|
2057
|
+
})), w = /* @__PURE__ */ e(((e) => {
|
|
2058
|
+
var t = e && e.__extends || (function() {
|
|
2059
|
+
var e = function(t, n) {
|
|
2060
|
+
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
2061
|
+
e.__proto__ = t;
|
|
2062
|
+
} || function(e, t) {
|
|
2063
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
2064
|
+
}, e(t, n);
|
|
2065
|
+
};
|
|
2066
|
+
return function(t, n) {
|
|
2067
|
+
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
2068
|
+
e(t, n);
|
|
2069
|
+
function r() {
|
|
2070
|
+
this.constructor = t;
|
|
2071
|
+
}
|
|
2072
|
+
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
2073
|
+
};
|
|
2074
|
+
})(), n = e && e.__read || function(e, t) {
|
|
2075
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
2076
|
+
if (!n) return e;
|
|
2077
|
+
var r = n.call(e), i, a = [], o;
|
|
2078
|
+
try {
|
|
2079
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
2080
|
+
} catch (e) {
|
|
2081
|
+
o = { error: e };
|
|
2082
|
+
} finally {
|
|
2083
|
+
try {
|
|
2084
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
2085
|
+
} finally {
|
|
2086
|
+
if (o) throw o.error;
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
return a;
|
|
2090
|
+
}, a = e && e.__spreadArray || function(e, t, n) {
|
|
2091
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
2092
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
2093
|
+
}, o = e && e.__importDefault || function(e) {
|
|
2094
|
+
return e && e.__esModule ? e : { default: e };
|
|
2095
|
+
};
|
|
2096
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.EquationItem = e.EqnArrayItem = e.ArrayItem = e.DotsItem = e.NonscriptItem = e.NotItem = e.FnItem = e.MmlItem = e.CellItem = e.PositionItem = e.StyleItem = e.EndItem = e.BeginItem = e.RightItem = e.Middle = e.LeftItem = e.OverItem = e.SubsupItem = e.PrimeItem = e.CloseItem = e.OpenItem = e.StopItem = e.StartItem = void 0;
|
|
2097
|
+
var s = b(), c = r(), l = i(), p = o(d()), m = o(f()), g = o(u()), _ = h();
|
|
2098
|
+
e.StartItem = function(e) {
|
|
2099
|
+
t(n, e);
|
|
2100
|
+
function n(t, n) {
|
|
2101
|
+
var r = e.call(this, t) || this;
|
|
2102
|
+
return r.global = n, r;
|
|
2103
|
+
}
|
|
2104
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2105
|
+
get: function() {
|
|
2106
|
+
return "start";
|
|
2107
|
+
},
|
|
2108
|
+
enumerable: !1,
|
|
2109
|
+
configurable: !0
|
|
2110
|
+
}), Object.defineProperty(n.prototype, "isOpen", {
|
|
2111
|
+
get: function() {
|
|
2112
|
+
return !0;
|
|
2113
|
+
},
|
|
2114
|
+
enumerable: !1,
|
|
2115
|
+
configurable: !0
|
|
2116
|
+
}), n.prototype.checkItem = function(t) {
|
|
2117
|
+
if (t.isKind("stop")) {
|
|
2118
|
+
var n = this.toMml();
|
|
2119
|
+
return this.global.isInner || (n = this.factory.configuration.tags.finalize(n, this.env)), [[this.factory.create("mml", n)], !0];
|
|
2120
|
+
}
|
|
2121
|
+
return e.prototype.checkItem.call(this, t);
|
|
2122
|
+
}, n;
|
|
2123
|
+
}(_.BaseItem), e.StopItem = function(e) {
|
|
2124
|
+
t(n, e);
|
|
2125
|
+
function n() {
|
|
2126
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2127
|
+
}
|
|
2128
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2129
|
+
get: function() {
|
|
2130
|
+
return "stop";
|
|
2131
|
+
},
|
|
2132
|
+
enumerable: !1,
|
|
2133
|
+
configurable: !0
|
|
2134
|
+
}), Object.defineProperty(n.prototype, "isClose", {
|
|
2135
|
+
get: function() {
|
|
2136
|
+
return !0;
|
|
2137
|
+
},
|
|
2138
|
+
enumerable: !1,
|
|
2139
|
+
configurable: !0
|
|
2140
|
+
}), n;
|
|
2141
|
+
}(_.BaseItem), e.OpenItem = function(e) {
|
|
2142
|
+
t(n, e);
|
|
2143
|
+
function n() {
|
|
2144
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2145
|
+
}
|
|
2146
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2147
|
+
get: function() {
|
|
2148
|
+
return "open";
|
|
2149
|
+
},
|
|
2150
|
+
enumerable: !1,
|
|
2151
|
+
configurable: !0
|
|
2152
|
+
}), Object.defineProperty(n.prototype, "isOpen", {
|
|
2153
|
+
get: function() {
|
|
2154
|
+
return !0;
|
|
2155
|
+
},
|
|
2156
|
+
enumerable: !1,
|
|
2157
|
+
configurable: !0
|
|
2158
|
+
}), n.prototype.checkItem = function(t) {
|
|
2159
|
+
if (t.isKind("close")) {
|
|
2160
|
+
var n = this.toMml(), r = this.create("node", "TeXAtom", [n]);
|
|
2161
|
+
return [[this.factory.create("mml", r)], !0];
|
|
2162
|
+
}
|
|
2163
|
+
return e.prototype.checkItem.call(this, t);
|
|
2164
|
+
}, n.errors = Object.assign(Object.create(_.BaseItem.errors), { stop: ["ExtraOpenMissingClose", "Extra open brace or missing close brace"] }), n;
|
|
2165
|
+
}(_.BaseItem), e.CloseItem = function(e) {
|
|
2166
|
+
t(n, e);
|
|
2167
|
+
function n() {
|
|
2168
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2169
|
+
}
|
|
2170
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2171
|
+
get: function() {
|
|
2172
|
+
return "close";
|
|
2173
|
+
},
|
|
2174
|
+
enumerable: !1,
|
|
2175
|
+
configurable: !0
|
|
2176
|
+
}), Object.defineProperty(n.prototype, "isClose", {
|
|
2177
|
+
get: function() {
|
|
2178
|
+
return !0;
|
|
2179
|
+
},
|
|
2180
|
+
enumerable: !1,
|
|
2181
|
+
configurable: !0
|
|
2182
|
+
}), n;
|
|
2183
|
+
}(_.BaseItem), e.PrimeItem = function(e) {
|
|
2184
|
+
t(r, e);
|
|
2185
|
+
function r() {
|
|
2186
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2187
|
+
}
|
|
2188
|
+
return Object.defineProperty(r.prototype, "kind", {
|
|
2189
|
+
get: function() {
|
|
2190
|
+
return "prime";
|
|
2191
|
+
},
|
|
2192
|
+
enumerable: !1,
|
|
2193
|
+
configurable: !0
|
|
2194
|
+
}), r.prototype.checkItem = function(e) {
|
|
2195
|
+
var t = n(this.Peek(2), 2), r = t[0], i = t[1];
|
|
2196
|
+
return !g.default.isType(r, "msubsup") || g.default.isType(r, "msup") ? [[this.create("node", "msup", [r, i]), e], !0] : (g.default.setChild(r, r.sup, i), [[r, e], !0]);
|
|
2197
|
+
}, r;
|
|
2198
|
+
}(_.BaseItem), e.SubsupItem = function(e) {
|
|
2199
|
+
t(r, e);
|
|
2200
|
+
function r() {
|
|
2201
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2202
|
+
}
|
|
2203
|
+
return Object.defineProperty(r.prototype, "kind", {
|
|
2204
|
+
get: function() {
|
|
2205
|
+
return "subsup";
|
|
2206
|
+
},
|
|
2207
|
+
enumerable: !1,
|
|
2208
|
+
configurable: !0
|
|
2209
|
+
}), r.prototype.checkItem = function(t) {
|
|
2210
|
+
if (t.isKind("open") || t.isKind("left")) return _.BaseItem.success;
|
|
2211
|
+
var r = this.First, i = this.getProperty("position");
|
|
2212
|
+
if (t.isKind("mml")) return this.getProperty("primes") && (i === 2 ? (g.default.setProperty(this.getProperty("primes"), "variantForm", !0), t.First = this.create("node", "mrow", [this.getProperty("primes"), t.First])) : g.default.setChild(r, 2, this.getProperty("primes"))), g.default.setChild(r, i, t.First), this.getProperty("movesupsub") != null && g.default.setProperty(r, "movesupsub", this.getProperty("movesupsub")), [[this.factory.create("mml", r)], !0];
|
|
2213
|
+
if (e.prototype.checkItem.call(this, t)[1]) {
|
|
2214
|
+
var o = this.getErrors([
|
|
2215
|
+
"",
|
|
2216
|
+
"sub",
|
|
2217
|
+
"sup"
|
|
2218
|
+
][i]);
|
|
2219
|
+
throw new (p.default.bind.apply(p.default, a([
|
|
2220
|
+
void 0,
|
|
2221
|
+
o[0],
|
|
2222
|
+
o[1]
|
|
2223
|
+
], n(o.splice(2)), !1)))();
|
|
2224
|
+
}
|
|
2225
|
+
return null;
|
|
2226
|
+
}, r.errors = Object.assign(Object.create(_.BaseItem.errors), {
|
|
2227
|
+
stop: ["MissingScript", "Missing superscript or subscript argument"],
|
|
2228
|
+
sup: ["MissingOpenForSup", "Missing open brace for superscript"],
|
|
2229
|
+
sub: ["MissingOpenForSub", "Missing open brace for subscript"]
|
|
2230
|
+
}), r;
|
|
2231
|
+
}(_.BaseItem), e.OverItem = function(e) {
|
|
2232
|
+
t(n, e);
|
|
2233
|
+
function n(t) {
|
|
2234
|
+
var n = e.call(this, t) || this;
|
|
2235
|
+
return n.setProperty("name", "\\over"), n;
|
|
2236
|
+
}
|
|
2237
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2238
|
+
get: function() {
|
|
2239
|
+
return "over";
|
|
2240
|
+
},
|
|
2241
|
+
enumerable: !1,
|
|
2242
|
+
configurable: !0
|
|
2243
|
+
}), Object.defineProperty(n.prototype, "isClose", {
|
|
2244
|
+
get: function() {
|
|
2245
|
+
return !0;
|
|
2246
|
+
},
|
|
2247
|
+
enumerable: !1,
|
|
2248
|
+
configurable: !0
|
|
2249
|
+
}), n.prototype.checkItem = function(t) {
|
|
2250
|
+
if (t.isKind("over")) throw new p.default("AmbiguousUseOf", "Ambiguous use of %1", t.getName());
|
|
2251
|
+
if (t.isClose) {
|
|
2252
|
+
var n = this.create("node", "mfrac", [this.getProperty("num"), this.toMml(!1)]);
|
|
2253
|
+
return this.getProperty("thickness") != null && g.default.setAttribute(n, "linethickness", this.getProperty("thickness")), (this.getProperty("open") || this.getProperty("close")) && (g.default.setProperty(n, "withDelims", !0), n = m.default.fixedFence(this.factory.configuration, this.getProperty("open"), n, this.getProperty("close"))), [[this.factory.create("mml", n), t], !0];
|
|
2254
|
+
}
|
|
2255
|
+
return e.prototype.checkItem.call(this, t);
|
|
2256
|
+
}, n.prototype.toString = function() {
|
|
2257
|
+
return "over[" + this.getProperty("num") + " / " + this.nodes.join("; ") + "]";
|
|
2258
|
+
}, n;
|
|
2259
|
+
}(_.BaseItem), e.LeftItem = function(e) {
|
|
2260
|
+
t(n, e);
|
|
2261
|
+
function n(t, n) {
|
|
2262
|
+
var r = e.call(this, t) || this;
|
|
2263
|
+
return r.setProperty("delim", n), r;
|
|
2264
|
+
}
|
|
2265
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2266
|
+
get: function() {
|
|
2267
|
+
return "left";
|
|
2268
|
+
},
|
|
2269
|
+
enumerable: !1,
|
|
2270
|
+
configurable: !0
|
|
2271
|
+
}), Object.defineProperty(n.prototype, "isOpen", {
|
|
2272
|
+
get: function() {
|
|
2273
|
+
return !0;
|
|
2274
|
+
},
|
|
2275
|
+
enumerable: !1,
|
|
2276
|
+
configurable: !0
|
|
2277
|
+
}), n.prototype.checkItem = function(t) {
|
|
2278
|
+
if (t.isKind("right")) return [[this.factory.create("mml", m.default.fenced(this.factory.configuration, this.getProperty("delim"), this.toMml(), t.getProperty("delim"), "", t.getProperty("color")))], !0];
|
|
2279
|
+
if (t.isKind("middle")) {
|
|
2280
|
+
var n = { stretchy: !0 };
|
|
2281
|
+
return t.getProperty("color") && (n.mathcolor = t.getProperty("color")), this.Push(this.create("node", "TeXAtom", [], { texClass: l.TEXCLASS.CLOSE }), this.create("token", "mo", n, t.getProperty("delim")), this.create("node", "TeXAtom", [], { texClass: l.TEXCLASS.OPEN })), this.env = {}, [[this], !0];
|
|
2282
|
+
}
|
|
2283
|
+
return e.prototype.checkItem.call(this, t);
|
|
2284
|
+
}, n.errors = Object.assign(Object.create(_.BaseItem.errors), { stop: ["ExtraLeftMissingRight", "Extra \\left or missing \\right"] }), n;
|
|
2285
|
+
}(_.BaseItem), e.Middle = function(e) {
|
|
2286
|
+
t(n, e);
|
|
2287
|
+
function n(t, n, r) {
|
|
2288
|
+
var i = e.call(this, t) || this;
|
|
2289
|
+
return i.setProperty("delim", n), r && i.setProperty("color", r), i;
|
|
2290
|
+
}
|
|
2291
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2292
|
+
get: function() {
|
|
2293
|
+
return "middle";
|
|
2294
|
+
},
|
|
2295
|
+
enumerable: !1,
|
|
2296
|
+
configurable: !0
|
|
2297
|
+
}), Object.defineProperty(n.prototype, "isClose", {
|
|
2298
|
+
get: function() {
|
|
2299
|
+
return !0;
|
|
2300
|
+
},
|
|
2301
|
+
enumerable: !1,
|
|
2302
|
+
configurable: !0
|
|
2303
|
+
}), n;
|
|
2304
|
+
}(_.BaseItem), e.RightItem = function(e) {
|
|
2305
|
+
t(n, e);
|
|
2306
|
+
function n(t, n, r) {
|
|
2307
|
+
var i = e.call(this, t) || this;
|
|
2308
|
+
return i.setProperty("delim", n), r && i.setProperty("color", r), i;
|
|
2309
|
+
}
|
|
2310
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2311
|
+
get: function() {
|
|
2312
|
+
return "right";
|
|
2313
|
+
},
|
|
2314
|
+
enumerable: !1,
|
|
2315
|
+
configurable: !0
|
|
2316
|
+
}), Object.defineProperty(n.prototype, "isClose", {
|
|
2317
|
+
get: function() {
|
|
2318
|
+
return !0;
|
|
2319
|
+
},
|
|
2320
|
+
enumerable: !1,
|
|
2321
|
+
configurable: !0
|
|
2322
|
+
}), n;
|
|
2323
|
+
}(_.BaseItem), e.BeginItem = function(e) {
|
|
2324
|
+
t(n, e);
|
|
2325
|
+
function n() {
|
|
2326
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2327
|
+
}
|
|
2328
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2329
|
+
get: function() {
|
|
2330
|
+
return "begin";
|
|
2331
|
+
},
|
|
2332
|
+
enumerable: !1,
|
|
2333
|
+
configurable: !0
|
|
2334
|
+
}), Object.defineProperty(n.prototype, "isOpen", {
|
|
2335
|
+
get: function() {
|
|
2336
|
+
return !0;
|
|
2337
|
+
},
|
|
2338
|
+
enumerable: !1,
|
|
2339
|
+
configurable: !0
|
|
2340
|
+
}), n.prototype.checkItem = function(t) {
|
|
2341
|
+
if (t.isKind("end")) {
|
|
2342
|
+
if (t.getName() !== this.getName()) throw new p.default("EnvBadEnd", "\\begin{%1} ended with \\end{%2}", this.getName(), t.getName());
|
|
2343
|
+
return this.getProperty("end") ? _.BaseItem.fail : [[this.factory.create("mml", this.toMml())], !0];
|
|
2344
|
+
}
|
|
2345
|
+
if (t.isKind("stop")) throw new p.default("EnvMissingEnd", "Missing \\end{%1}", this.getName());
|
|
2346
|
+
return e.prototype.checkItem.call(this, t);
|
|
2347
|
+
}, n;
|
|
2348
|
+
}(_.BaseItem), e.EndItem = function(e) {
|
|
2349
|
+
t(n, e);
|
|
2350
|
+
function n() {
|
|
2351
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2352
|
+
}
|
|
2353
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2354
|
+
get: function() {
|
|
2355
|
+
return "end";
|
|
2356
|
+
},
|
|
2357
|
+
enumerable: !1,
|
|
2358
|
+
configurable: !0
|
|
2359
|
+
}), Object.defineProperty(n.prototype, "isClose", {
|
|
2360
|
+
get: function() {
|
|
2361
|
+
return !0;
|
|
2362
|
+
},
|
|
2363
|
+
enumerable: !1,
|
|
2364
|
+
configurable: !0
|
|
2365
|
+
}), n;
|
|
2366
|
+
}(_.BaseItem), e.StyleItem = function(e) {
|
|
2367
|
+
t(n, e);
|
|
2368
|
+
function n() {
|
|
2369
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2370
|
+
}
|
|
2371
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2372
|
+
get: function() {
|
|
2373
|
+
return "style";
|
|
2374
|
+
},
|
|
2375
|
+
enumerable: !1,
|
|
2376
|
+
configurable: !0
|
|
2377
|
+
}), n.prototype.checkItem = function(t) {
|
|
2378
|
+
if (!t.isClose) return e.prototype.checkItem.call(this, t);
|
|
2379
|
+
var n = this.create("node", "mstyle", this.nodes, this.getProperty("styles"));
|
|
2380
|
+
return [[this.factory.create("mml", n), t], !0];
|
|
2381
|
+
}, n;
|
|
2382
|
+
}(_.BaseItem), e.PositionItem = function(e) {
|
|
2383
|
+
t(n, e);
|
|
2384
|
+
function n() {
|
|
2385
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2386
|
+
}
|
|
2387
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2388
|
+
get: function() {
|
|
2389
|
+
return "position";
|
|
2390
|
+
},
|
|
2391
|
+
enumerable: !1,
|
|
2392
|
+
configurable: !0
|
|
2393
|
+
}), n.prototype.checkItem = function(t) {
|
|
2394
|
+
if (t.isClose) throw new p.default("MissingBoxFor", "Missing box for %1", this.getName());
|
|
2395
|
+
if (t.isFinal) {
|
|
2396
|
+
var n = t.toMml();
|
|
2397
|
+
switch (this.getProperty("move")) {
|
|
2398
|
+
case "vertical": return n = this.create("node", "mpadded", [n], {
|
|
2399
|
+
height: this.getProperty("dh"),
|
|
2400
|
+
depth: this.getProperty("dd"),
|
|
2401
|
+
voffset: this.getProperty("dh")
|
|
2402
|
+
}), [[this.factory.create("mml", n)], !0];
|
|
2403
|
+
case "horizontal": return [[
|
|
2404
|
+
this.factory.create("mml", this.getProperty("left")),
|
|
2405
|
+
t,
|
|
2406
|
+
this.factory.create("mml", this.getProperty("right"))
|
|
2407
|
+
], !0];
|
|
2408
|
+
}
|
|
2409
|
+
}
|
|
2410
|
+
return e.prototype.checkItem.call(this, t);
|
|
2411
|
+
}, n;
|
|
2412
|
+
}(_.BaseItem), e.CellItem = function(e) {
|
|
2413
|
+
t(n, e);
|
|
2414
|
+
function n() {
|
|
2415
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2416
|
+
}
|
|
2417
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2418
|
+
get: function() {
|
|
2419
|
+
return "cell";
|
|
2420
|
+
},
|
|
2421
|
+
enumerable: !1,
|
|
2422
|
+
configurable: !0
|
|
2423
|
+
}), Object.defineProperty(n.prototype, "isClose", {
|
|
2424
|
+
get: function() {
|
|
2425
|
+
return !0;
|
|
2426
|
+
},
|
|
2427
|
+
enumerable: !1,
|
|
2428
|
+
configurable: !0
|
|
2429
|
+
}), n;
|
|
2430
|
+
}(_.BaseItem), e.MmlItem = function(e) {
|
|
2431
|
+
t(n, e);
|
|
2432
|
+
function n() {
|
|
2433
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2434
|
+
}
|
|
2435
|
+
return Object.defineProperty(n.prototype, "isFinal", {
|
|
2436
|
+
get: function() {
|
|
2437
|
+
return !0;
|
|
2438
|
+
},
|
|
2439
|
+
enumerable: !1,
|
|
2440
|
+
configurable: !0
|
|
2441
|
+
}), Object.defineProperty(n.prototype, "kind", {
|
|
2442
|
+
get: function() {
|
|
2443
|
+
return "mml";
|
|
2444
|
+
},
|
|
2445
|
+
enumerable: !1,
|
|
2446
|
+
configurable: !0
|
|
2447
|
+
}), n;
|
|
2448
|
+
}(_.BaseItem), e.FnItem = function(e) {
|
|
2449
|
+
t(n, e);
|
|
2450
|
+
function n() {
|
|
2451
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2452
|
+
}
|
|
2453
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2454
|
+
get: function() {
|
|
2455
|
+
return "fn";
|
|
2456
|
+
},
|
|
2457
|
+
enumerable: !1,
|
|
2458
|
+
configurable: !0
|
|
2459
|
+
}), n.prototype.checkItem = function(t) {
|
|
2460
|
+
var n = this.First;
|
|
2461
|
+
if (n) {
|
|
2462
|
+
if (t.isOpen) return _.BaseItem.success;
|
|
2463
|
+
if (!t.isKind("fn")) {
|
|
2464
|
+
var r = t.First;
|
|
2465
|
+
if (!t.isKind("mml") || !r || g.default.isType(r, "mstyle") && r.childNodes.length && g.default.isType(r.childNodes[0].childNodes[0], "mspace") || g.default.isType(r, "mspace")) return [[n, t], !0];
|
|
2466
|
+
g.default.isEmbellished(r) && (r = g.default.getCoreMO(r));
|
|
2467
|
+
var i = g.default.getForm(r);
|
|
2468
|
+
if (i != null && [
|
|
2469
|
+
0,
|
|
2470
|
+
0,
|
|
2471
|
+
1,
|
|
2472
|
+
1,
|
|
2473
|
+
0,
|
|
2474
|
+
1,
|
|
2475
|
+
1,
|
|
2476
|
+
0,
|
|
2477
|
+
0,
|
|
2478
|
+
0
|
|
2479
|
+
][i[2]]) return [[n, t], !0];
|
|
2480
|
+
}
|
|
2481
|
+
return [[
|
|
2482
|
+
n,
|
|
2483
|
+
this.create("token", "mo", { texClass: l.TEXCLASS.NONE }, c.entities.ApplyFunction),
|
|
2484
|
+
t
|
|
2485
|
+
], !0];
|
|
2486
|
+
}
|
|
2487
|
+
return e.prototype.checkItem.apply(this, arguments);
|
|
2488
|
+
}, n;
|
|
2489
|
+
}(_.BaseItem), e.NotItem = function(e) {
|
|
2490
|
+
t(n, e);
|
|
2491
|
+
function n() {
|
|
2492
|
+
var t = e !== null && e.apply(this, arguments) || this;
|
|
2493
|
+
return t.remap = s.MapHandler.getMap("not_remap"), t;
|
|
2494
|
+
}
|
|
2495
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2496
|
+
get: function() {
|
|
2497
|
+
return "not";
|
|
2498
|
+
},
|
|
2499
|
+
enumerable: !1,
|
|
2500
|
+
configurable: !0
|
|
2501
|
+
}), n.prototype.checkItem = function(e) {
|
|
2502
|
+
var t, n, r;
|
|
2503
|
+
if (e.isKind("open") || e.isKind("left")) return _.BaseItem.success;
|
|
2504
|
+
if (e.isKind("mml") && (g.default.isType(e.First, "mo") || g.default.isType(e.First, "mi") || g.default.isType(e.First, "mtext")) && (t = e.First, n = g.default.getText(t), n.length === 1 && !g.default.getProperty(t, "movesupsub") && g.default.getChildren(t).length === 1)) return this.remap.contains(n) ? (r = this.create("text", this.remap.lookup(n).char), g.default.setChild(t, 0, r)) : (r = this.create("text", "̸"), g.default.appendChildren(t, [r])), [[e], !0];
|
|
2505
|
+
r = this.create("text", "⧸");
|
|
2506
|
+
var i = this.create("node", "mtext", [], {}, r), a = this.create("node", "mpadded", [i], { width: 0 });
|
|
2507
|
+
return t = this.create("node", "TeXAtom", [a], { texClass: l.TEXCLASS.REL }), [[t, e], !0];
|
|
2508
|
+
}, n;
|
|
2509
|
+
}(_.BaseItem), e.NonscriptItem = function(e) {
|
|
2510
|
+
t(n, e);
|
|
2511
|
+
function n() {
|
|
2512
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2513
|
+
}
|
|
2514
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2515
|
+
get: function() {
|
|
2516
|
+
return "nonscript";
|
|
2517
|
+
},
|
|
2518
|
+
enumerable: !1,
|
|
2519
|
+
configurable: !0
|
|
2520
|
+
}), n.prototype.checkItem = function(e) {
|
|
2521
|
+
if (e.isKind("mml") && e.Size() === 1) {
|
|
2522
|
+
var t = e.First;
|
|
2523
|
+
if (t.isKind("mstyle") && t.notParent && (t = g.default.getChildren(g.default.getChildren(t)[0])[0]), t.isKind("mspace")) {
|
|
2524
|
+
if (t !== e.First) {
|
|
2525
|
+
var n = this.create("node", "mrow", [e.Pop()]);
|
|
2526
|
+
e.Push(n);
|
|
2527
|
+
}
|
|
2528
|
+
this.factory.configuration.addNode("nonscript", e.First);
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
return [[e], !0];
|
|
2532
|
+
}, n;
|
|
2533
|
+
}(_.BaseItem), e.DotsItem = function(e) {
|
|
2534
|
+
t(n, e);
|
|
2535
|
+
function n() {
|
|
2536
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
2537
|
+
}
|
|
2538
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2539
|
+
get: function() {
|
|
2540
|
+
return "dots";
|
|
2541
|
+
},
|
|
2542
|
+
enumerable: !1,
|
|
2543
|
+
configurable: !0
|
|
2544
|
+
}), n.prototype.checkItem = function(e) {
|
|
2545
|
+
if (e.isKind("open") || e.isKind("left")) return _.BaseItem.success;
|
|
2546
|
+
var t = this.getProperty("ldots"), n = e.First;
|
|
2547
|
+
if (e.isKind("mml") && g.default.isEmbellished(n)) {
|
|
2548
|
+
var r = g.default.getTexClass(g.default.getCoreMO(n));
|
|
2549
|
+
(r === l.TEXCLASS.BIN || r === l.TEXCLASS.REL) && (t = this.getProperty("cdots"));
|
|
2550
|
+
}
|
|
2551
|
+
return [[t, e], !0];
|
|
2552
|
+
}, n;
|
|
2553
|
+
}(_.BaseItem);
|
|
2554
|
+
var v = function(e) {
|
|
2555
|
+
t(n, e);
|
|
2556
|
+
function n() {
|
|
2557
|
+
var t = e !== null && e.apply(this, arguments) || this;
|
|
2558
|
+
return t.table = [], t.row = [], t.frame = [], t.hfill = [], t.arraydef = {}, t.dashed = !1, t;
|
|
2559
|
+
}
|
|
2560
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2561
|
+
get: function() {
|
|
2562
|
+
return "array";
|
|
2563
|
+
},
|
|
2564
|
+
enumerable: !1,
|
|
2565
|
+
configurable: !0
|
|
2566
|
+
}), Object.defineProperty(n.prototype, "isOpen", {
|
|
2567
|
+
get: function() {
|
|
2568
|
+
return !0;
|
|
2569
|
+
},
|
|
2570
|
+
enumerable: !1,
|
|
2571
|
+
configurable: !0
|
|
2572
|
+
}), Object.defineProperty(n.prototype, "copyEnv", {
|
|
2573
|
+
get: function() {
|
|
2574
|
+
return !1;
|
|
2575
|
+
},
|
|
2576
|
+
enumerable: !1,
|
|
2577
|
+
configurable: !0
|
|
2578
|
+
}), n.prototype.checkItem = function(t) {
|
|
2579
|
+
if (t.isClose && !t.isKind("over")) {
|
|
2580
|
+
if (t.getProperty("isEntry")) return this.EndEntry(), this.clearEnv(), _.BaseItem.fail;
|
|
2581
|
+
if (t.getProperty("isCR")) return this.EndEntry(), this.EndRow(), this.clearEnv(), _.BaseItem.fail;
|
|
2582
|
+
this.EndTable(), this.clearEnv();
|
|
2583
|
+
var n = this.factory.create("mml", this.createMml());
|
|
2584
|
+
if (this.getProperty("requireClose")) {
|
|
2585
|
+
if (t.isKind("close")) return [[n], !0];
|
|
2586
|
+
throw new p.default("MissingCloseBrace", "Missing close brace");
|
|
2587
|
+
}
|
|
2588
|
+
return [[n, t], !0];
|
|
2589
|
+
}
|
|
2590
|
+
return e.prototype.checkItem.call(this, t);
|
|
2591
|
+
}, n.prototype.createMml = function() {
|
|
2592
|
+
var e = this.arraydef.scriptlevel;
|
|
2593
|
+
delete this.arraydef.scriptlevel;
|
|
2594
|
+
var t = this.create("node", "mtable", this.table, this.arraydef);
|
|
2595
|
+
return e && t.setProperty("scriptlevel", e), this.frame.length === 4 ? g.default.setAttribute(t, "frame", this.dashed ? "dashed" : "solid") : this.frame.length && (this.arraydef.rowlines && (this.arraydef.rowlines = this.arraydef.rowlines.replace(/none( none)+$/, "none")), g.default.setAttribute(t, "frame", ""), t = this.create("node", "menclose", [t], { notation: this.frame.join(" ") }), ((this.arraydef.columnlines || "none") !== "none" || (this.arraydef.rowlines || "none") !== "none") && g.default.setAttribute(t, "data-padding", 0)), (this.getProperty("open") || this.getProperty("close")) && (t = m.default.fenced(this.factory.configuration, this.getProperty("open"), t, this.getProperty("close"))), t;
|
|
2596
|
+
}, n.prototype.EndEntry = function() {
|
|
2597
|
+
var e = this.create("node", "mtd", this.nodes);
|
|
2598
|
+
this.hfill.length && (this.hfill[0] === 0 && g.default.setAttribute(e, "columnalign", "right"), this.hfill[this.hfill.length - 1] === this.Size() && g.default.setAttribute(e, "columnalign", g.default.getAttribute(e, "columnalign") ? "center" : "left")), this.row.push(e), this.Clear(), this.hfill = [];
|
|
2599
|
+
}, n.prototype.EndRow = function() {
|
|
2600
|
+
var e;
|
|
2601
|
+
this.getProperty("isNumbered") && this.row.length === 3 ? (this.row.unshift(this.row.pop()), e = this.create("node", "mlabeledtr", this.row)) : e = this.create("node", "mtr", this.row), this.table.push(e), this.row = [];
|
|
2602
|
+
}, n.prototype.EndTable = function() {
|
|
2603
|
+
(this.Size() || this.row.length) && (this.EndEntry(), this.EndRow()), this.checkLines();
|
|
2604
|
+
}, n.prototype.checkLines = function() {
|
|
2605
|
+
if (this.arraydef.rowlines) {
|
|
2606
|
+
var e = this.arraydef.rowlines.split(/ /);
|
|
2607
|
+
e.length === this.table.length ? (this.frame.push("bottom"), e.pop(), this.arraydef.rowlines = e.join(" ")) : e.length < this.table.length - 1 && (this.arraydef.rowlines += " none");
|
|
2608
|
+
}
|
|
2609
|
+
if (this.getProperty("rowspacing")) {
|
|
2610
|
+
for (var t = this.arraydef.rowspacing.split(/ /); t.length < this.table.length;) t.push(this.getProperty("rowspacing") + "em");
|
|
2611
|
+
this.arraydef.rowspacing = t.join(" ");
|
|
2612
|
+
}
|
|
2613
|
+
}, n.prototype.addRowSpacing = function(e) {
|
|
2614
|
+
if (this.arraydef.rowspacing) {
|
|
2615
|
+
var t = this.arraydef.rowspacing.split(/ /);
|
|
2616
|
+
if (!this.getProperty("rowspacing")) {
|
|
2617
|
+
var n = m.default.dimen2em(t[0]);
|
|
2618
|
+
this.setProperty("rowspacing", n);
|
|
2619
|
+
}
|
|
2620
|
+
for (var r = this.getProperty("rowspacing"); t.length < this.table.length;) t.push(m.default.Em(r));
|
|
2621
|
+
t[this.table.length - 1] = m.default.Em(Math.max(0, r + m.default.dimen2em(e))), this.arraydef.rowspacing = t.join(" ");
|
|
2622
|
+
}
|
|
2623
|
+
}, n;
|
|
2624
|
+
}(_.BaseItem);
|
|
2625
|
+
e.ArrayItem = v, e.EqnArrayItem = function(e) {
|
|
2626
|
+
t(r, e);
|
|
2627
|
+
function r(t) {
|
|
2628
|
+
var n = [...arguments].slice(1), r = e.call(this, t) || this;
|
|
2629
|
+
return r.maxrow = 0, r.factory.configuration.tags.start(n[0], n[2], n[1]), r;
|
|
2630
|
+
}
|
|
2631
|
+
return Object.defineProperty(r.prototype, "kind", {
|
|
2632
|
+
get: function() {
|
|
2633
|
+
return "eqnarray";
|
|
2634
|
+
},
|
|
2635
|
+
enumerable: !1,
|
|
2636
|
+
configurable: !0
|
|
2637
|
+
}), r.prototype.EndEntry = function() {
|
|
2638
|
+
this.row.length && m.default.fixInitialMO(this.factory.configuration, this.nodes);
|
|
2639
|
+
var e = this.create("node", "mtd", this.nodes);
|
|
2640
|
+
this.row.push(e), this.Clear();
|
|
2641
|
+
}, r.prototype.EndRow = function() {
|
|
2642
|
+
this.row.length > this.maxrow && (this.maxrow = this.row.length);
|
|
2643
|
+
var e = "mtr", t = this.factory.configuration.tags.getTag();
|
|
2644
|
+
t && (this.row = [t].concat(this.row), e = "mlabeledtr"), this.factory.configuration.tags.clearTag();
|
|
2645
|
+
var n = this.create("node", e, this.row);
|
|
2646
|
+
this.table.push(n), this.row = [];
|
|
2647
|
+
}, r.prototype.EndTable = function() {
|
|
2648
|
+
e.prototype.EndTable.call(this), this.factory.configuration.tags.end(), this.extendArray("columnalign", this.maxrow), this.extendArray("columnwidth", this.maxrow), this.extendArray("columnspacing", this.maxrow - 1);
|
|
2649
|
+
}, r.prototype.extendArray = function(e, t) {
|
|
2650
|
+
if (this.arraydef[e]) {
|
|
2651
|
+
var r = this.arraydef[e].split(/ /), i = a([], n(r), !1);
|
|
2652
|
+
if (i.length > 1) {
|
|
2653
|
+
for (; i.length < t;) i.push.apply(i, a([], n(r), !1));
|
|
2654
|
+
this.arraydef[e] = i.slice(0, t).join(" ");
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
}, r;
|
|
2658
|
+
}(v), e.EquationItem = function(e) {
|
|
2659
|
+
t(n, e);
|
|
2660
|
+
function n(t) {
|
|
2661
|
+
var n = [...arguments].slice(1), r = e.call(this, t) || this;
|
|
2662
|
+
return r.factory.configuration.tags.start("equation", !0, n[0]), r;
|
|
2663
|
+
}
|
|
2664
|
+
return Object.defineProperty(n.prototype, "kind", {
|
|
2665
|
+
get: function() {
|
|
2666
|
+
return "equation";
|
|
2667
|
+
},
|
|
2668
|
+
enumerable: !1,
|
|
2669
|
+
configurable: !0
|
|
2670
|
+
}), Object.defineProperty(n.prototype, "isOpen", {
|
|
2671
|
+
get: function() {
|
|
2672
|
+
return !0;
|
|
2673
|
+
},
|
|
2674
|
+
enumerable: !1,
|
|
2675
|
+
configurable: !0
|
|
2676
|
+
}), n.prototype.checkItem = function(t) {
|
|
2677
|
+
if (t.isKind("end")) {
|
|
2678
|
+
var n = this.toMml(), r = this.factory.configuration.tags.getTag();
|
|
2679
|
+
return this.factory.configuration.tags.end(), [[r ? this.factory.configuration.tags.enTag(n, r) : n, t], !0];
|
|
2680
|
+
}
|
|
2681
|
+
if (t.isKind("stop")) throw new p.default("EnvMissingEnd", "Missing \\end{%1}", this.getName());
|
|
2682
|
+
return e.prototype.checkItem.call(this, t);
|
|
2683
|
+
}, n;
|
|
2684
|
+
}(_.BaseItem);
|
|
2685
|
+
})), T = /* @__PURE__ */ e(((e) => {
|
|
2686
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.TexConstant = void 0, (function(e) {
|
|
2687
|
+
e.Variant = {
|
|
2688
|
+
NORMAL: "normal",
|
|
2689
|
+
BOLD: "bold",
|
|
2690
|
+
ITALIC: "italic",
|
|
2691
|
+
BOLDITALIC: "bold-italic",
|
|
2692
|
+
DOUBLESTRUCK: "double-struck",
|
|
2693
|
+
FRAKTUR: "fraktur",
|
|
2694
|
+
BOLDFRAKTUR: "bold-fraktur",
|
|
2695
|
+
SCRIPT: "script",
|
|
2696
|
+
BOLDSCRIPT: "bold-script",
|
|
2697
|
+
SANSSERIF: "sans-serif",
|
|
2698
|
+
BOLDSANSSERIF: "bold-sans-serif",
|
|
2699
|
+
SANSSERIFITALIC: "sans-serif-italic",
|
|
2700
|
+
SANSSERIFBOLDITALIC: "sans-serif-bold-italic",
|
|
2701
|
+
MONOSPACE: "monospace",
|
|
2702
|
+
INITIAL: "inital",
|
|
2703
|
+
TAILED: "tailed",
|
|
2704
|
+
LOOPED: "looped",
|
|
2705
|
+
STRETCHED: "stretched",
|
|
2706
|
+
CALLIGRAPHIC: "-tex-calligraphic",
|
|
2707
|
+
BOLDCALLIGRAPHIC: "-tex-bold-calligraphic",
|
|
2708
|
+
OLDSTYLE: "-tex-oldstyle",
|
|
2709
|
+
BOLDOLDSTYLE: "-tex-bold-oldstyle",
|
|
2710
|
+
MATHITALIC: "-tex-mathit"
|
|
2711
|
+
}, e.Form = {
|
|
2712
|
+
PREFIX: "prefix",
|
|
2713
|
+
INFIX: "infix",
|
|
2714
|
+
POSTFIX: "postfix"
|
|
2715
|
+
}, e.LineBreak = {
|
|
2716
|
+
AUTO: "auto",
|
|
2717
|
+
NEWLINE: "newline",
|
|
2718
|
+
NOBREAK: "nobreak",
|
|
2719
|
+
GOODBREAK: "goodbreak",
|
|
2720
|
+
BADBREAK: "badbreak"
|
|
2721
|
+
}, e.LineBreakStyle = {
|
|
2722
|
+
BEFORE: "before",
|
|
2723
|
+
AFTER: "after",
|
|
2724
|
+
DUPLICATE: "duplicate",
|
|
2725
|
+
INFIXLINBREAKSTYLE: "infixlinebreakstyle"
|
|
2726
|
+
}, e.IndentAlign = {
|
|
2727
|
+
LEFT: "left",
|
|
2728
|
+
CENTER: "center",
|
|
2729
|
+
RIGHT: "right",
|
|
2730
|
+
AUTO: "auto",
|
|
2731
|
+
ID: "id",
|
|
2732
|
+
INDENTALIGN: "indentalign"
|
|
2733
|
+
}, e.IndentShift = { INDENTSHIFT: "indentshift" }, e.LineThickness = {
|
|
2734
|
+
THIN: "thin",
|
|
2735
|
+
MEDIUM: "medium",
|
|
2736
|
+
THICK: "thick"
|
|
2737
|
+
}, e.Notation = {
|
|
2738
|
+
LONGDIV: "longdiv",
|
|
2739
|
+
ACTUARIAL: "actuarial",
|
|
2740
|
+
PHASORANGLE: "phasorangle",
|
|
2741
|
+
RADICAL: "radical",
|
|
2742
|
+
BOX: "box",
|
|
2743
|
+
ROUNDEDBOX: "roundedbox",
|
|
2744
|
+
CIRCLE: "circle",
|
|
2745
|
+
LEFT: "left",
|
|
2746
|
+
RIGHT: "right",
|
|
2747
|
+
TOP: "top",
|
|
2748
|
+
BOTTOM: "bottom",
|
|
2749
|
+
UPDIAGONALSTRIKE: "updiagonalstrike",
|
|
2750
|
+
DOWNDIAGONALSTRIKE: "downdiagonalstrike",
|
|
2751
|
+
VERTICALSTRIKE: "verticalstrike",
|
|
2752
|
+
HORIZONTALSTRIKE: "horizontalstrike",
|
|
2753
|
+
NORTHEASTARROW: "northeastarrow",
|
|
2754
|
+
MADRUWB: "madruwb",
|
|
2755
|
+
UPDIAGONALARROW: "updiagonalarrow"
|
|
2756
|
+
}, e.Align = {
|
|
2757
|
+
TOP: "top",
|
|
2758
|
+
BOTTOM: "bottom",
|
|
2759
|
+
CENTER: "center",
|
|
2760
|
+
BASELINE: "baseline",
|
|
2761
|
+
AXIS: "axis",
|
|
2762
|
+
LEFT: "left",
|
|
2763
|
+
RIGHT: "right"
|
|
2764
|
+
}, e.Lines = {
|
|
2765
|
+
NONE: "none",
|
|
2766
|
+
SOLID: "solid",
|
|
2767
|
+
DASHED: "dashed"
|
|
2768
|
+
}, e.Side = {
|
|
2769
|
+
LEFT: "left",
|
|
2770
|
+
RIGHT: "right",
|
|
2771
|
+
LEFTOVERLAP: "leftoverlap",
|
|
2772
|
+
RIGHTOVERLAP: "rightoverlap"
|
|
2773
|
+
}, e.Width = {
|
|
2774
|
+
AUTO: "auto",
|
|
2775
|
+
FIT: "fit"
|
|
2776
|
+
}, e.Actiontype = {
|
|
2777
|
+
TOGGLE: "toggle",
|
|
2778
|
+
STATUSLINE: "statusline",
|
|
2779
|
+
TOOLTIP: "tooltip",
|
|
2780
|
+
INPUT: "input"
|
|
2781
|
+
}, e.Overflow = {
|
|
2782
|
+
LINBREAK: "linebreak",
|
|
2783
|
+
SCROLL: "scroll",
|
|
2784
|
+
ELIDE: "elide",
|
|
2785
|
+
TRUNCATE: "truncate",
|
|
2786
|
+
SCALE: "scale"
|
|
2787
|
+
}, e.Unit = {
|
|
2788
|
+
EM: "em",
|
|
2789
|
+
EX: "ex",
|
|
2790
|
+
PX: "px",
|
|
2791
|
+
IN: "in",
|
|
2792
|
+
CM: "cm",
|
|
2793
|
+
MM: "mm",
|
|
2794
|
+
PT: "pt",
|
|
2795
|
+
PC: "pc"
|
|
2796
|
+
};
|
|
2797
|
+
})(e.TexConstant ||= {});
|
|
2798
|
+
})), E = /* @__PURE__ */ e(((e) => {
|
|
2799
|
+
var n = e && e.__assign || function() {
|
|
2800
|
+
return n = Object.assign || function(e) {
|
|
2801
|
+
for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
2802
|
+
return e;
|
|
2803
|
+
}, n.apply(this, arguments);
|
|
2804
|
+
}, a = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
2805
|
+
r === void 0 && (r = n);
|
|
2806
|
+
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
2807
|
+
(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
|
|
2808
|
+
enumerable: !0,
|
|
2809
|
+
get: function() {
|
|
2810
|
+
return t[n];
|
|
2811
|
+
}
|
|
2812
|
+
}), Object.defineProperty(e, r, i);
|
|
2813
|
+
}) : (function(e, t, n, r) {
|
|
2814
|
+
r === void 0 && (r = n), e[r] = t[n];
|
|
2815
|
+
})), o = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
|
|
2816
|
+
Object.defineProperty(e, "default", {
|
|
2817
|
+
enumerable: !0,
|
|
2818
|
+
value: t
|
|
2819
|
+
});
|
|
2820
|
+
}) : function(e, t) {
|
|
2821
|
+
e.default = t;
|
|
2822
|
+
}), s = e && e.__importStar || function(e) {
|
|
2823
|
+
if (e && e.__esModule) return e;
|
|
2824
|
+
var t = {};
|
|
2825
|
+
if (e != null) for (var n in e) n !== "default" && Object.prototype.hasOwnProperty.call(e, n) && a(t, e, n);
|
|
2826
|
+
return o(t, e), t;
|
|
2827
|
+
}, c = e && e.__read || function(e, t) {
|
|
2828
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
2829
|
+
if (!n) return e;
|
|
2830
|
+
var r = n.call(e), i, a = [], o;
|
|
2831
|
+
try {
|
|
2832
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
2833
|
+
} catch (e) {
|
|
2834
|
+
o = { error: e };
|
|
2835
|
+
} finally {
|
|
2836
|
+
try {
|
|
2837
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
2838
|
+
} finally {
|
|
2839
|
+
if (o) throw o.error;
|
|
2840
|
+
}
|
|
2841
|
+
}
|
|
2842
|
+
return a;
|
|
2843
|
+
}, p = e && e.__importDefault || function(e) {
|
|
2844
|
+
return e && e.__esModule ? e : { default: e };
|
|
2845
|
+
};
|
|
2846
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
2847
|
+
var h = s(w()), g = p(u()), _ = p(d()), v = p(m()), b = T(), x = p(f()), S = i(), C = y(), E = l(), D = r(), O = t(), k = {}, A = 1.2 / .85, j = {
|
|
2848
|
+
fontfamily: 1,
|
|
2849
|
+
fontsize: 1,
|
|
2850
|
+
fontweight: 1,
|
|
2851
|
+
fontstyle: 1,
|
|
2852
|
+
color: 1,
|
|
2853
|
+
background: 1,
|
|
2854
|
+
id: 1,
|
|
2855
|
+
class: 1,
|
|
2856
|
+
href: 1,
|
|
2857
|
+
style: 1
|
|
2858
|
+
};
|
|
2859
|
+
k.Open = function(e, t) {
|
|
2860
|
+
e.Push(e.itemFactory.create("open"));
|
|
2861
|
+
}, k.Close = function(e, t) {
|
|
2862
|
+
e.Push(e.itemFactory.create("close"));
|
|
2863
|
+
}, k.Tilde = function(e, t) {
|
|
2864
|
+
e.Push(e.create("token", "mtext", {}, D.entities.nbsp));
|
|
2865
|
+
}, k.Space = function(e, t) {}, k.Superscript = function(e, t) {
|
|
2866
|
+
var n;
|
|
2867
|
+
e.GetNext().match(/\d/) && (e.string = e.string.substr(0, e.i + 1) + " " + e.string.substr(e.i + 1));
|
|
2868
|
+
var r, i, a = e.stack.Top();
|
|
2869
|
+
a.isKind("prime") ? (n = c(a.Peek(2), 2), i = n[0], r = n[1], e.stack.Pop()) : (i = e.stack.Prev(), i ||= e.create("token", "mi", {}, ""));
|
|
2870
|
+
var o = g.default.getProperty(i, "movesupsub"), s = g.default.isType(i, "msubsup") ? i.sup : i.over;
|
|
2871
|
+
if (g.default.isType(i, "msubsup") && !g.default.isType(i, "msup") && g.default.getChildAt(i, i.sup) || g.default.isType(i, "munderover") && !g.default.isType(i, "mover") && g.default.getChildAt(i, i.over) && !g.default.getProperty(i, "subsupOK")) throw new _.default("DoubleExponent", "Double exponent: use braces to clarify");
|
|
2872
|
+
(!g.default.isType(i, "msubsup") || g.default.isType(i, "msup")) && (o ? ((!g.default.isType(i, "munderover") || g.default.isType(i, "mover") || g.default.getChildAt(i, i.over)) && (i = e.create("node", "munderover", [i], { movesupsub: !0 })), s = i.over) : (i = e.create("node", "msubsup", [i]), s = i.sup)), e.Push(e.itemFactory.create("subsup", i).setProperties({
|
|
2873
|
+
position: s,
|
|
2874
|
+
primes: r,
|
|
2875
|
+
movesupsub: o
|
|
2876
|
+
}));
|
|
2877
|
+
}, k.Subscript = function(e, t) {
|
|
2878
|
+
var n;
|
|
2879
|
+
e.GetNext().match(/\d/) && (e.string = e.string.substr(0, e.i + 1) + " " + e.string.substr(e.i + 1));
|
|
2880
|
+
var r, i, a = e.stack.Top();
|
|
2881
|
+
a.isKind("prime") ? (n = c(a.Peek(2), 2), i = n[0], r = n[1], e.stack.Pop()) : (i = e.stack.Prev(), i ||= e.create("token", "mi", {}, ""));
|
|
2882
|
+
var o = g.default.getProperty(i, "movesupsub"), s = g.default.isType(i, "msubsup") ? i.sub : i.under;
|
|
2883
|
+
if (g.default.isType(i, "msubsup") && !g.default.isType(i, "msup") && g.default.getChildAt(i, i.sub) || g.default.isType(i, "munderover") && !g.default.isType(i, "mover") && g.default.getChildAt(i, i.under) && !g.default.getProperty(i, "subsupOK")) throw new _.default("DoubleSubscripts", "Double subscripts: use braces to clarify");
|
|
2884
|
+
(!g.default.isType(i, "msubsup") || g.default.isType(i, "msup")) && (o ? ((!g.default.isType(i, "munderover") || g.default.isType(i, "mover") || g.default.getChildAt(i, i.under)) && (i = e.create("node", "munderover", [i], { movesupsub: !0 })), s = i.under) : (i = e.create("node", "msubsup", [i]), s = i.sub)), e.Push(e.itemFactory.create("subsup", i).setProperties({
|
|
2885
|
+
position: s,
|
|
2886
|
+
primes: r,
|
|
2887
|
+
movesupsub: o
|
|
2888
|
+
}));
|
|
2889
|
+
}, k.Prime = function(e, t) {
|
|
2890
|
+
var n = e.stack.Prev();
|
|
2891
|
+
if (n ||= e.create("node", "mi"), g.default.isType(n, "msubsup") && !g.default.isType(n, "msup") && g.default.getChildAt(n, n.sup)) throw new _.default("DoubleExponentPrime", "Prime causes double exponent: use braces to clarify");
|
|
2892
|
+
var r = "";
|
|
2893
|
+
e.i--;
|
|
2894
|
+
do
|
|
2895
|
+
r += D.entities.prime, e.i++, t = e.GetNext();
|
|
2896
|
+
while (t === "'" || t === D.entities.rsquo);
|
|
2897
|
+
r = [
|
|
2898
|
+
"",
|
|
2899
|
+
"′",
|
|
2900
|
+
"″",
|
|
2901
|
+
"‴",
|
|
2902
|
+
"⁗"
|
|
2903
|
+
][r.length] || r;
|
|
2904
|
+
var i = e.create("token", "mo", { variantForm: !0 }, r);
|
|
2905
|
+
e.Push(e.itemFactory.create("prime", n, i));
|
|
2906
|
+
}, k.Comment = function(e, t) {
|
|
2907
|
+
for (; e.i < e.string.length && e.string.charAt(e.i) !== "\n";) e.i++;
|
|
2908
|
+
}, k.Hash = function(e, t) {
|
|
2909
|
+
throw new _.default("CantUseHash1", "You can't use 'macro parameter character #' in math mode");
|
|
2910
|
+
}, k.MathFont = function(e, t, r) {
|
|
2911
|
+
var i = e.GetArgument(t), a = new v.default(i, n(n({}, e.stack.env), {
|
|
2912
|
+
font: r,
|
|
2913
|
+
multiLetterIdentifiers: /^[a-zA-Z]+/,
|
|
2914
|
+
noAutoOP: !0
|
|
2915
|
+
}), e.configuration).mml();
|
|
2916
|
+
e.Push(e.create("node", "TeXAtom", [a]));
|
|
2917
|
+
}, k.SetFont = function(e, t, n) {
|
|
2918
|
+
e.stack.env.font = n;
|
|
2919
|
+
}, k.SetStyle = function(e, t, n, r, i) {
|
|
2920
|
+
e.stack.env.style = n, e.stack.env.level = i, e.Push(e.itemFactory.create("style").setProperty("styles", {
|
|
2921
|
+
displaystyle: r,
|
|
2922
|
+
scriptlevel: i
|
|
2923
|
+
}));
|
|
2924
|
+
}, k.SetSize = function(e, t, n) {
|
|
2925
|
+
e.stack.env.size = n, e.Push(e.itemFactory.create("style").setProperty("styles", { mathsize: (0, E.em)(n) }));
|
|
2926
|
+
}, k.Spacer = function(e, t, n) {
|
|
2927
|
+
var r = e.create("node", "mspace", [], { width: (0, E.em)(n) }), i = e.create("node", "mstyle", [r], { scriptlevel: 0 });
|
|
2928
|
+
e.Push(i);
|
|
2929
|
+
}, k.LeftRight = function(e, t) {
|
|
2930
|
+
var n = t.substr(1);
|
|
2931
|
+
e.Push(e.itemFactory.create(n, e.GetDelimiter(t), e.stack.env.color));
|
|
2932
|
+
}, k.NamedFn = function(e, t, n) {
|
|
2933
|
+
n ||= t.substr(1);
|
|
2934
|
+
var r = e.create("token", "mi", { texClass: S.TEXCLASS.OP }, n);
|
|
2935
|
+
e.Push(e.itemFactory.create("fn", r));
|
|
2936
|
+
}, k.NamedOp = function(e, t, n) {
|
|
2937
|
+
n ||= t.substr(1), n = n.replace(/ /, " ");
|
|
2938
|
+
var r = e.create("token", "mo", {
|
|
2939
|
+
movablelimits: !0,
|
|
2940
|
+
movesupsub: !0,
|
|
2941
|
+
form: b.TexConstant.Form.PREFIX,
|
|
2942
|
+
texClass: S.TEXCLASS.OP
|
|
2943
|
+
}, n);
|
|
2944
|
+
e.Push(r);
|
|
2945
|
+
}, k.Limits = function(e, t, n) {
|
|
2946
|
+
var r = e.stack.Prev(!0);
|
|
2947
|
+
if (!r || g.default.getTexClass(g.default.getCoreMO(r)) !== S.TEXCLASS.OP && g.default.getProperty(r, "movesupsub") == null) throw new _.default("MisplacedLimits", "%1 is allowed only on operators", e.currentCS);
|
|
2948
|
+
var i = e.stack.Top(), a;
|
|
2949
|
+
g.default.isType(r, "munderover") && !n ? (a = e.create("node", "msubsup"), g.default.copyChildren(r, a), r = i.Last = a) : g.default.isType(r, "msubsup") && n && (a = e.create("node", "munderover"), g.default.copyChildren(r, a), r = i.Last = a), g.default.setProperty(r, "movesupsub", !!n), g.default.setProperties(g.default.getCoreMO(r), { movablelimits: !1 }), (g.default.getAttribute(r, "movablelimits") || g.default.getProperty(r, "movablelimits")) && g.default.setProperties(r, { movablelimits: !1 });
|
|
2950
|
+
}, k.Over = function(e, t, n, r) {
|
|
2951
|
+
var i = e.itemFactory.create("over").setProperty("name", e.currentCS);
|
|
2952
|
+
n || r ? (i.setProperty("open", n), i.setProperty("close", r)) : t.match(/withdelims$/) && (i.setProperty("open", e.GetDelimiter(t)), i.setProperty("close", e.GetDelimiter(t))), t.match(/^\\above/) ? i.setProperty("thickness", e.GetDimen(t)) : (t.match(/^\\atop/) || n || r) && i.setProperty("thickness", 0), e.Push(i);
|
|
2953
|
+
}, k.Frac = function(e, t) {
|
|
2954
|
+
var n = e.ParseArg(t), r = e.ParseArg(t), i = e.create("node", "mfrac", [n, r]);
|
|
2955
|
+
e.Push(i);
|
|
2956
|
+
}, k.Sqrt = function(e, t) {
|
|
2957
|
+
var n = e.GetBrackets(t), r = e.GetArgument(t);
|
|
2958
|
+
r === "\\frac" && (r += "{" + e.GetArgument(r) + "}{" + e.GetArgument(r) + "}");
|
|
2959
|
+
var i = new v.default(r, e.stack.env, e.configuration).mml();
|
|
2960
|
+
i = n ? e.create("node", "mroot", [i, M(e, n)]) : e.create("node", "msqrt", [i]), e.Push(i);
|
|
2961
|
+
};
|
|
2962
|
+
function M(e, t) {
|
|
2963
|
+
var n = e.stack.env, r = n.inRoot;
|
|
2964
|
+
n.inRoot = !0;
|
|
2965
|
+
var i = new v.default(t, n, e.configuration), a = i.mml(), o = i.stack.global;
|
|
2966
|
+
if (o.leftRoot || o.upRoot) {
|
|
2967
|
+
var s = {};
|
|
2968
|
+
o.leftRoot && (s.width = o.leftRoot), o.upRoot && (s.voffset = o.upRoot, s.height = o.upRoot), a = e.create("node", "mpadded", [a], s);
|
|
2969
|
+
}
|
|
2970
|
+
return n.inRoot = r, a;
|
|
2971
|
+
}
|
|
2972
|
+
k.Root = function(e, t) {
|
|
2973
|
+
var n = e.GetUpTo(t, "\\of"), r = e.ParseArg(t), i = e.create("node", "mroot", [r, M(e, n)]);
|
|
2974
|
+
e.Push(i);
|
|
2975
|
+
}, k.MoveRoot = function(e, t, n) {
|
|
2976
|
+
if (!e.stack.env.inRoot) throw new _.default("MisplacedMoveRoot", "%1 can appear only within a root", e.currentCS);
|
|
2977
|
+
if (e.stack.global[n]) throw new _.default("MultipleMoveRoot", "Multiple use of %1", e.currentCS);
|
|
2978
|
+
var r = e.GetArgument(t);
|
|
2979
|
+
if (!r.match(/-?[0-9]+/)) throw new _.default("IntegerArg", "The argument to %1 must be an integer", e.currentCS);
|
|
2980
|
+
r = parseInt(r, 10) / 15 + "em", r.substr(0, 1) !== "-" && (r = "+" + r), e.stack.global[n] = r;
|
|
2981
|
+
}, k.Accent = function(e, t, r, i) {
|
|
2982
|
+
var a = e.ParseArg(t), o = n(n({}, x.default.getFontDef(e)), {
|
|
2983
|
+
accent: !0,
|
|
2984
|
+
mathaccent: !0
|
|
2985
|
+
}), s = g.default.createEntity(r), c = e.create("token", "mo", o, s);
|
|
2986
|
+
g.default.setAttribute(c, "stretchy", !!i);
|
|
2987
|
+
var l = g.default.isEmbellished(a) ? g.default.getCoreMO(a) : a;
|
|
2988
|
+
(g.default.isType(l, "mo") || g.default.getProperty(l, "movablelimits")) && g.default.setProperties(l, { movablelimits: !1 });
|
|
2989
|
+
var u = e.create("node", "munderover");
|
|
2990
|
+
g.default.setChild(u, 0, a), g.default.setChild(u, 1, null), g.default.setChild(u, 2, c);
|
|
2991
|
+
var d = e.create("node", "TeXAtom", [u]);
|
|
2992
|
+
e.Push(d);
|
|
2993
|
+
}, k.UnderOver = function(e, t, n, r) {
|
|
2994
|
+
var i = g.default.createEntity(n), a = e.create("token", "mo", {
|
|
2995
|
+
stretchy: !0,
|
|
2996
|
+
accent: !0
|
|
2997
|
+
}, i), o = t.charAt(1) === "o" ? "over" : "under", s = e.ParseArg(t);
|
|
2998
|
+
e.Push(x.default.underOver(e, s, a, o, r));
|
|
2999
|
+
}, k.Overset = function(e, t) {
|
|
3000
|
+
var n = e.ParseArg(t), r = e.ParseArg(t);
|
|
3001
|
+
x.default.checkMovableLimits(r), n.isKind("mo") && g.default.setAttribute(n, "accent", !1);
|
|
3002
|
+
var i = e.create("node", "mover", [r, n]);
|
|
3003
|
+
e.Push(i);
|
|
3004
|
+
}, k.Underset = function(e, t) {
|
|
3005
|
+
var n = e.ParseArg(t), r = e.ParseArg(t);
|
|
3006
|
+
x.default.checkMovableLimits(r), n.isKind("mo") && g.default.setAttribute(n, "accent", !1);
|
|
3007
|
+
var i = e.create("node", "munder", [r, n], { accentunder: !1 });
|
|
3008
|
+
e.Push(i);
|
|
3009
|
+
}, k.Overunderset = function(e, t) {
|
|
3010
|
+
var n = e.ParseArg(t), r = e.ParseArg(t), i = e.ParseArg(t);
|
|
3011
|
+
x.default.checkMovableLimits(i), n.isKind("mo") && g.default.setAttribute(n, "accent", !1), r.isKind("mo") && g.default.setAttribute(r, "accent", !1);
|
|
3012
|
+
var a = e.create("node", "munderover", [
|
|
3013
|
+
i,
|
|
3014
|
+
r,
|
|
3015
|
+
n
|
|
3016
|
+
], {
|
|
3017
|
+
accent: !1,
|
|
3018
|
+
accentunder: !1
|
|
3019
|
+
});
|
|
3020
|
+
e.Push(a);
|
|
3021
|
+
}, k.TeXAtom = function(e, t, n) {
|
|
3022
|
+
var r = { texClass: n }, i, a, o;
|
|
3023
|
+
if (n === S.TEXCLASS.OP) {
|
|
3024
|
+
r.movesupsub = r.movablelimits = !0;
|
|
3025
|
+
var s = e.GetArgument(t), c = s.match(/^\s*\\rm\s+([a-zA-Z0-9 ]+)$/);
|
|
3026
|
+
c ? (r.mathvariant = b.TexConstant.Variant.NORMAL, a = e.create("token", "mi", r, c[1])) : (o = new v.default(s, e.stack.env, e.configuration).mml(), a = e.create("node", "TeXAtom", [o], r)), i = e.itemFactory.create("fn", a);
|
|
3027
|
+
} else o = e.ParseArg(t), i = e.create("node", "TeXAtom", [o], r);
|
|
3028
|
+
e.Push(i);
|
|
3029
|
+
}, k.MmlToken = function(e, t) {
|
|
3030
|
+
var n = e.GetArgument(t), r = e.GetBrackets(t, "").replace(/^\s+/, ""), i = e.GetArgument(t), a = {}, o = [], s;
|
|
3031
|
+
try {
|
|
3032
|
+
s = e.create("node", n);
|
|
3033
|
+
} catch {
|
|
3034
|
+
s = null;
|
|
3035
|
+
}
|
|
3036
|
+
if (!s || !s.isToken) throw new _.default("NotMathMLToken", "%1 is not a token element", n);
|
|
3037
|
+
for (; r !== "";) {
|
|
3038
|
+
var c = r.match(/^([a-z]+)\s*=\s*('[^']*'|"[^"]*"|[^ ,]*)\s*,?\s*/i);
|
|
3039
|
+
if (!c) throw new _.default("InvalidMathMLAttr", "Invalid MathML attribute: %1", r);
|
|
3040
|
+
if (!s.attributes.hasDefault(c[1]) && !j[c[1]]) throw new _.default("UnknownAttrForElement", "%1 is not a recognized attribute for %2", c[1], n);
|
|
3041
|
+
var l = x.default.MmlFilterAttribute(e, c[1], c[2].replace(/^(['"])(.*)\1$/, "$2"));
|
|
3042
|
+
l && (l.toLowerCase() === "true" ? l = !0 : l.toLowerCase() === "false" && (l = !1), a[c[1]] = l, o.push(c[1])), r = r.substr(c[0].length);
|
|
3043
|
+
}
|
|
3044
|
+
o.length && (a["mjx-keep-attrs"] = o.join(" "));
|
|
3045
|
+
var u = e.create("text", i);
|
|
3046
|
+
s.appendChild(u), g.default.setProperties(s, a), e.Push(s);
|
|
3047
|
+
}, k.Strut = function(e, t) {
|
|
3048
|
+
var n = e.create("node", "mrow"), r = e.create("node", "mpadded", [n], {
|
|
3049
|
+
height: "8.6pt",
|
|
3050
|
+
depth: "3pt",
|
|
3051
|
+
width: 0
|
|
3052
|
+
});
|
|
3053
|
+
e.Push(r);
|
|
3054
|
+
}, k.Phantom = function(e, t, n, r) {
|
|
3055
|
+
var i = e.create("node", "mphantom", [e.ParseArg(t)]);
|
|
3056
|
+
(n || r) && (i = e.create("node", "mpadded", [i]), r && (g.default.setAttribute(i, "height", 0), g.default.setAttribute(i, "depth", 0)), n && g.default.setAttribute(i, "width", 0));
|
|
3057
|
+
var a = e.create("node", "TeXAtom", [i]);
|
|
3058
|
+
e.Push(a);
|
|
3059
|
+
}, k.Smash = function(e, t) {
|
|
3060
|
+
var n = x.default.trimSpaces(e.GetBrackets(t, "")), r = e.create("node", "mpadded", [e.ParseArg(t)]);
|
|
3061
|
+
switch (n) {
|
|
3062
|
+
case "b":
|
|
3063
|
+
g.default.setAttribute(r, "depth", 0);
|
|
3064
|
+
break;
|
|
3065
|
+
case "t":
|
|
3066
|
+
g.default.setAttribute(r, "height", 0);
|
|
3067
|
+
break;
|
|
3068
|
+
default: g.default.setAttribute(r, "height", 0), g.default.setAttribute(r, "depth", 0);
|
|
3069
|
+
}
|
|
3070
|
+
var i = e.create("node", "TeXAtom", [r]);
|
|
3071
|
+
e.Push(i);
|
|
3072
|
+
}, k.Lap = function(e, t) {
|
|
3073
|
+
var n = e.create("node", "mpadded", [e.ParseArg(t)], { width: 0 });
|
|
3074
|
+
t === "\\llap" && g.default.setAttribute(n, "lspace", "-1width");
|
|
3075
|
+
var r = e.create("node", "TeXAtom", [n]);
|
|
3076
|
+
e.Push(r);
|
|
3077
|
+
}, k.RaiseLower = function(e, t) {
|
|
3078
|
+
var n = e.GetDimen(t), r = e.itemFactory.create("position").setProperties({
|
|
3079
|
+
name: e.currentCS,
|
|
3080
|
+
move: "vertical"
|
|
3081
|
+
});
|
|
3082
|
+
n.charAt(0) === "-" && (n = n.slice(1), t = t.substr(1) === "raise" ? "\\lower" : "\\raise"), t === "\\lower" ? (r.setProperty("dh", "-" + n), r.setProperty("dd", "+" + n)) : (r.setProperty("dh", "+" + n), r.setProperty("dd", "-" + n)), e.Push(r);
|
|
3083
|
+
}, k.MoveLeftRight = function(e, t) {
|
|
3084
|
+
var n = e.GetDimen(t), r = n.charAt(0) === "-" ? n.slice(1) : "-" + n;
|
|
3085
|
+
if (t === "\\moveleft") {
|
|
3086
|
+
var i = n;
|
|
3087
|
+
n = r, r = i;
|
|
3088
|
+
}
|
|
3089
|
+
e.Push(e.itemFactory.create("position").setProperties({
|
|
3090
|
+
name: e.currentCS,
|
|
3091
|
+
move: "horizontal",
|
|
3092
|
+
left: e.create("node", "mspace", [], { width: n }),
|
|
3093
|
+
right: e.create("node", "mspace", [], { width: r })
|
|
3094
|
+
}));
|
|
3095
|
+
}, k.Hskip = function(e, t) {
|
|
3096
|
+
var n = e.create("node", "mspace", [], { width: e.GetDimen(t) });
|
|
3097
|
+
e.Push(n);
|
|
3098
|
+
}, k.Nonscript = function(e, t) {
|
|
3099
|
+
e.Push(e.itemFactory.create("nonscript"));
|
|
3100
|
+
}, k.Rule = function(e, t, n) {
|
|
3101
|
+
var r = {
|
|
3102
|
+
width: e.GetDimen(t),
|
|
3103
|
+
height: e.GetDimen(t),
|
|
3104
|
+
depth: e.GetDimen(t)
|
|
3105
|
+
};
|
|
3106
|
+
n !== "blank" && (r.mathbackground = e.stack.env.color || "black");
|
|
3107
|
+
var i = e.create("node", "mspace", [], r);
|
|
3108
|
+
e.Push(i);
|
|
3109
|
+
}, k.rule = function(e, t) {
|
|
3110
|
+
var n = e.GetBrackets(t), r = e.GetDimen(t), i = e.GetDimen(t), a = e.create("node", "mspace", [], {
|
|
3111
|
+
width: r,
|
|
3112
|
+
height: i,
|
|
3113
|
+
mathbackground: e.stack.env.color || "black"
|
|
3114
|
+
});
|
|
3115
|
+
n && (a = e.create("node", "mpadded", [a], { voffset: n }), n.match(/^\-/) ? (g.default.setAttribute(a, "height", n), g.default.setAttribute(a, "depth", "+" + n.substr(1))) : g.default.setAttribute(a, "height", "+" + n)), e.Push(a);
|
|
3116
|
+
}, k.MakeBig = function(e, t, n, r) {
|
|
3117
|
+
r *= A;
|
|
3118
|
+
var i = String(r).replace(/(\.\d\d\d).+/, "$1") + "em", a = e.GetDelimiter(t, !0), o = e.create("token", "mo", {
|
|
3119
|
+
minsize: i,
|
|
3120
|
+
maxsize: i,
|
|
3121
|
+
fence: !0,
|
|
3122
|
+
stretchy: !0,
|
|
3123
|
+
symmetric: !0
|
|
3124
|
+
}, a), s = e.create("node", "TeXAtom", [o], { texClass: n });
|
|
3125
|
+
e.Push(s);
|
|
3126
|
+
}, k.BuildRel = function(e, t) {
|
|
3127
|
+
var n = e.ParseUpTo(t, "\\over"), r = e.ParseArg(t), i = e.create("node", "munderover");
|
|
3128
|
+
g.default.setChild(i, 0, r), g.default.setChild(i, 1, null), g.default.setChild(i, 2, n);
|
|
3129
|
+
var a = e.create("node", "TeXAtom", [i], { texClass: S.TEXCLASS.REL });
|
|
3130
|
+
e.Push(a);
|
|
3131
|
+
}, k.HBox = function(e, t, n, r) {
|
|
3132
|
+
e.PushAll(x.default.internalMath(e, e.GetArgument(t), n, r));
|
|
3133
|
+
}, k.FBox = function(e, t) {
|
|
3134
|
+
var n = x.default.internalMath(e, e.GetArgument(t)), r = e.create("node", "menclose", n, { notation: "box" });
|
|
3135
|
+
e.Push(r);
|
|
3136
|
+
}, k.FrameBox = function(e, t) {
|
|
3137
|
+
var n = e.GetBrackets(t), r = e.GetBrackets(t) || "c", i = x.default.internalMath(e, e.GetArgument(t));
|
|
3138
|
+
n && (i = [e.create("node", "mpadded", i, {
|
|
3139
|
+
width: n,
|
|
3140
|
+
"data-align": (0, O.lookup)(r, {
|
|
3141
|
+
l: "left",
|
|
3142
|
+
r: "right"
|
|
3143
|
+
}, "center")
|
|
3144
|
+
})]);
|
|
3145
|
+
var a = e.create("node", "TeXAtom", [e.create("node", "menclose", i, { notation: "box" })], { texClass: S.TEXCLASS.ORD });
|
|
3146
|
+
e.Push(a);
|
|
3147
|
+
}, k.Not = function(e, t) {
|
|
3148
|
+
e.Push(e.itemFactory.create("not"));
|
|
3149
|
+
}, k.Dots = function(e, t) {
|
|
3150
|
+
var n = g.default.createEntity("2026"), r = g.default.createEntity("22EF"), i = e.create("token", "mo", { stretchy: !1 }, n), a = e.create("token", "mo", { stretchy: !1 }, r);
|
|
3151
|
+
e.Push(e.itemFactory.create("dots").setProperties({
|
|
3152
|
+
ldots: i,
|
|
3153
|
+
cdots: a
|
|
3154
|
+
}));
|
|
3155
|
+
}, k.Matrix = function(e, t, n, r, i, a, o, s, c, l) {
|
|
3156
|
+
var u = e.GetNext();
|
|
3157
|
+
if (u === "") throw new _.default("MissingArgFor", "Missing argument for %1", e.currentCS);
|
|
3158
|
+
u === "{" ? e.i++ : (e.string = u + "}" + e.string.slice(e.i + 1), e.i = 0);
|
|
3159
|
+
var d = e.itemFactory.create("array").setProperty("requireClose", !0);
|
|
3160
|
+
d.arraydef = {
|
|
3161
|
+
rowspacing: o || "4pt",
|
|
3162
|
+
columnspacing: a || "1em"
|
|
3163
|
+
}, c && d.setProperty("isCases", !0), l && (d.setProperty("isNumbered", !0), d.arraydef.side = l), (n || r) && (d.setProperty("open", n), d.setProperty("close", r)), s === "D" && (d.arraydef.displaystyle = !0), i != null && (d.arraydef.columnalign = i), e.Push(d);
|
|
3164
|
+
}, k.Entry = function(e, t) {
|
|
3165
|
+
e.Push(e.itemFactory.create("cell").setProperties({
|
|
3166
|
+
isEntry: !0,
|
|
3167
|
+
name: t
|
|
3168
|
+
}));
|
|
3169
|
+
var n = e.stack.Top(), r = n.getProperty("casesEnv");
|
|
3170
|
+
if (!(!n.getProperty("isCases") && !r)) {
|
|
3171
|
+
for (var i = e.string, a = 0, o = -1, s = e.i, c = i.length, l = r ? RegExp(`^\\\\end\\s*\\{${r.replace(/\*/, "\\*")}\\}`) : null; s < c;) {
|
|
3172
|
+
var u = i.charAt(s);
|
|
3173
|
+
if (u === "{") a++, s++;
|
|
3174
|
+
else if (u === "}") a === 0 ? c = 0 : (a--, a === 0 && o < 0 && (o = s - e.i), s++);
|
|
3175
|
+
else if (u === "&" && a === 0) throw new _.default("ExtraAlignTab", "Extra alignment tab in \\cases text");
|
|
3176
|
+
else if (u === "\\") {
|
|
3177
|
+
var d = i.substr(s);
|
|
3178
|
+
d.match(/^((\\cr)[^a-zA-Z]|\\\\)/) || l && d.match(l) ? c = 0 : s += 2;
|
|
3179
|
+
} else s++;
|
|
3180
|
+
}
|
|
3181
|
+
var f = i.substr(e.i, s - e.i);
|
|
3182
|
+
if (!f.match(/^\s*\\text[^a-zA-Z]/) || o !== f.replace(/\s+$/, "").length - 1) {
|
|
3183
|
+
var p = x.default.internalMath(e, x.default.trimSpaces(f), 0);
|
|
3184
|
+
e.PushAll(p), e.i = s;
|
|
3185
|
+
}
|
|
3186
|
+
}
|
|
3187
|
+
}, k.Cr = function(e, t) {
|
|
3188
|
+
e.Push(e.itemFactory.create("cell").setProperties({
|
|
3189
|
+
isCR: !0,
|
|
3190
|
+
name: t
|
|
3191
|
+
}));
|
|
3192
|
+
}, k.CrLaTeX = function(e, t, n) {
|
|
3193
|
+
n === void 0 && (n = !1);
|
|
3194
|
+
var r;
|
|
3195
|
+
if (!n && (e.string.charAt(e.i) === "*" && e.i++, e.string.charAt(e.i) === "[")) {
|
|
3196
|
+
var i = e.GetBrackets(t, ""), a = c(x.default.matchDimen(i), 2), o = a[0], s = a[1];
|
|
3197
|
+
if (i && !o) throw new _.default("BracketMustBeDimension", "Bracket argument to %1 must be a dimension", e.currentCS);
|
|
3198
|
+
r = o + s;
|
|
3199
|
+
}
|
|
3200
|
+
e.Push(e.itemFactory.create("cell").setProperties({
|
|
3201
|
+
isCR: !0,
|
|
3202
|
+
name: t,
|
|
3203
|
+
linebreak: !0
|
|
3204
|
+
}));
|
|
3205
|
+
var l = e.stack.Top(), u;
|
|
3206
|
+
l instanceof h.ArrayItem ? r && l.addRowSpacing(r) : (r && (u = e.create("node", "mspace", [], { depth: r }), e.Push(u)), u = e.create("node", "mspace", [], { linebreak: b.TexConstant.LineBreak.NEWLINE }), e.Push(u));
|
|
3207
|
+
}, k.HLine = function(e, t, n) {
|
|
3208
|
+
n ??= "solid";
|
|
3209
|
+
var r = e.stack.Top();
|
|
3210
|
+
if (!(r instanceof h.ArrayItem) || r.Size()) throw new _.default("Misplaced", "Misplaced %1", e.currentCS);
|
|
3211
|
+
if (!r.table.length) r.frame.push("top");
|
|
3212
|
+
else {
|
|
3213
|
+
for (var i = r.arraydef.rowlines ? r.arraydef.rowlines.split(/ /) : []; i.length < r.table.length;) i.push("none");
|
|
3214
|
+
i[r.table.length - 1] = n, r.arraydef.rowlines = i.join(" ");
|
|
3215
|
+
}
|
|
3216
|
+
}, k.HFill = function(e, t) {
|
|
3217
|
+
var n = e.stack.Top();
|
|
3218
|
+
if (n instanceof h.ArrayItem) n.hfill.push(n.Size());
|
|
3219
|
+
else throw new _.default("UnsupportedHFill", "Unsupported use of %1", e.currentCS);
|
|
3220
|
+
}, k.BeginEnd = function(e, t) {
|
|
3221
|
+
var n = e.GetArgument(t);
|
|
3222
|
+
if (n.match(/\\/i)) throw new _.default("InvalidEnv", "Invalid environment name '%1'", n);
|
|
3223
|
+
var r = e.configuration.handlers.get("environment").lookup(n);
|
|
3224
|
+
if (r && t === "\\end") {
|
|
3225
|
+
if (!r.args[0]) {
|
|
3226
|
+
var i = e.itemFactory.create("end").setProperty("name", n);
|
|
3227
|
+
e.Push(i);
|
|
3228
|
+
return;
|
|
3229
|
+
}
|
|
3230
|
+
e.stack.env.closing = n;
|
|
3231
|
+
}
|
|
3232
|
+
x.default.checkMaxMacros(e, !1), e.parse("environment", [e, n]);
|
|
3233
|
+
}, k.Array = function(e, t, n, r, i, a, o, s, c) {
|
|
3234
|
+
i ||= e.GetArgument("\\begin{" + t.getName() + "}");
|
|
3235
|
+
var l = ("c" + i).replace(/[^clr|:]/g, "").replace(/[^|:]([|:])+/g, "$1");
|
|
3236
|
+
i = i.replace(/[^clr]/g, "").split("").join(" "), i = i.replace(/l/g, "left").replace(/r/g, "right").replace(/c/g, "center");
|
|
3237
|
+
var u = e.itemFactory.create("array");
|
|
3238
|
+
return u.arraydef = {
|
|
3239
|
+
columnalign: i,
|
|
3240
|
+
columnspacing: a || "1em",
|
|
3241
|
+
rowspacing: o || "4pt"
|
|
3242
|
+
}, l.match(/[|:]/) && (l.charAt(0).match(/[|:]/) && (u.frame.push("left"), u.dashed = l.charAt(0) === ":"), l.charAt(l.length - 1).match(/[|:]/) && u.frame.push("right"), l = l.substr(1, l.length - 2), u.arraydef.columnlines = l.split("").join(" ").replace(/[^|: ]/g, "none").replace(/\|/g, "solid").replace(/:/g, "dashed")), n && u.setProperty("open", e.convertDelimiter(n)), r && u.setProperty("close", e.convertDelimiter(r)), (s || "").charAt(1) === "'" && (u.arraydef["data-cramped"] = !0, s = s.charAt(0)), s === "D" ? u.arraydef.displaystyle = !0 : s && (u.arraydef.displaystyle = !1), s === "S" && (u.arraydef.scriptlevel = 1), c && (u.arraydef.useHeight = !1), e.Push(t), u;
|
|
3243
|
+
}, k.AlignedArray = function(e, t) {
|
|
3244
|
+
var n = e.GetBrackets("\\begin{" + t.getName() + "}"), r = k.Array(e, t);
|
|
3245
|
+
return x.default.setArrayAlign(r, n);
|
|
3246
|
+
}, k.Equation = function(e, t, n) {
|
|
3247
|
+
return e.Push(t), x.default.checkEqnEnv(e), e.itemFactory.create("equation", n).setProperty("name", t.getName());
|
|
3248
|
+
}, k.EqnArray = function(e, t, n, r, i, a) {
|
|
3249
|
+
e.Push(t), r && x.default.checkEqnEnv(e), i = i.replace(/[^clr]/g, "").split("").join(" "), i = i.replace(/l/g, "left").replace(/r/g, "right").replace(/c/g, "center");
|
|
3250
|
+
var o = e.itemFactory.create("eqnarray", t.getName(), n, r, e.stack.global);
|
|
3251
|
+
return o.arraydef = {
|
|
3252
|
+
displaystyle: !0,
|
|
3253
|
+
columnalign: i,
|
|
3254
|
+
columnspacing: a || "1em",
|
|
3255
|
+
rowspacing: "3pt",
|
|
3256
|
+
side: e.options.tagSide,
|
|
3257
|
+
minlabelspacing: e.options.tagIndent
|
|
3258
|
+
}, o;
|
|
3259
|
+
}, k.HandleNoTag = function(e, t) {
|
|
3260
|
+
e.tags.notag();
|
|
3261
|
+
}, k.HandleLabel = function(e, t) {
|
|
3262
|
+
var n = e.GetArgument(t);
|
|
3263
|
+
if (n !== "" && !e.tags.refUpdate) {
|
|
3264
|
+
if (e.tags.label) throw new _.default("MultipleCommand", "Multiple %1", e.currentCS);
|
|
3265
|
+
if (e.tags.label = n, (e.tags.allLabels[n] || e.tags.labels[n]) && !e.options.ignoreDuplicateLabels) throw new _.default("MultipleLabel", "Label '%1' multiply defined", n);
|
|
3266
|
+
e.tags.labels[n] = new C.Label();
|
|
3267
|
+
}
|
|
3268
|
+
}, k.HandleRef = function(e, t, n) {
|
|
3269
|
+
var r = e.GetArgument(t), i = e.tags.allLabels[r] || e.tags.labels[r];
|
|
3270
|
+
i ||= (e.tags.refUpdate || (e.tags.redo = !0), new C.Label());
|
|
3271
|
+
var a = i.tag;
|
|
3272
|
+
n && (a = e.tags.formatTag(a));
|
|
3273
|
+
var o = e.create("node", "mrow", x.default.internalMath(e, a), {
|
|
3274
|
+
href: e.tags.formatUrl(i.id, e.options.baseURL),
|
|
3275
|
+
class: "MathJax_ref"
|
|
3276
|
+
});
|
|
3277
|
+
e.Push(o);
|
|
3278
|
+
}, k.Macro = function(e, t, n, r, i) {
|
|
3279
|
+
if (r) {
|
|
3280
|
+
var a = [];
|
|
3281
|
+
if (i != null) {
|
|
3282
|
+
var o = e.GetBrackets(t);
|
|
3283
|
+
a.push(o ?? i);
|
|
3284
|
+
}
|
|
3285
|
+
for (var s = a.length; s < r; s++) a.push(e.GetArgument(t));
|
|
3286
|
+
n = x.default.substituteArgs(e, a, n);
|
|
3287
|
+
}
|
|
3288
|
+
e.string = x.default.addArgs(e, n, e.string.slice(e.i)), e.i = 0, x.default.checkMaxMacros(e);
|
|
3289
|
+
}, k.MathChoice = function(e, t) {
|
|
3290
|
+
var n = e.ParseArg(t), r = e.ParseArg(t), i = e.ParseArg(t), a = e.ParseArg(t);
|
|
3291
|
+
e.Push(e.create("node", "MathChoice", [
|
|
3292
|
+
n,
|
|
3293
|
+
r,
|
|
3294
|
+
i,
|
|
3295
|
+
a
|
|
3296
|
+
]));
|
|
3297
|
+
}, e.default = k;
|
|
3298
|
+
})), D = /* @__PURE__ */ e(((e) => {
|
|
3299
|
+
var t = e && e.__read || function(e, t) {
|
|
3300
|
+
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
3301
|
+
if (!n) return e;
|
|
3302
|
+
var r = n.call(e), i, a = [], o;
|
|
3303
|
+
try {
|
|
3304
|
+
for (; (t === void 0 || t-- > 0) && !(i = r.next()).done;) a.push(i.value);
|
|
3305
|
+
} catch (e) {
|
|
3306
|
+
o = { error: e };
|
|
3307
|
+
} finally {
|
|
3308
|
+
try {
|
|
3309
|
+
i && !i.done && (n = r.return) && n.call(r);
|
|
3310
|
+
} finally {
|
|
3311
|
+
if (o) throw o.error;
|
|
3312
|
+
}
|
|
3313
|
+
}
|
|
3314
|
+
return a;
|
|
3315
|
+
}, n = e && e.__spreadArray || function(e, t, n) {
|
|
3316
|
+
if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
|
|
3317
|
+
return e.concat(a || Array.prototype.slice.call(t));
|
|
3318
|
+
}, r = e && e.__importDefault || function(e) {
|
|
3319
|
+
return e && e.__esModule ? e : { default: e };
|
|
3320
|
+
};
|
|
3321
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
3322
|
+
var i = r(u()), a = T(), o = r(f()), s;
|
|
3323
|
+
(function(e) {
|
|
3324
|
+
function r(e, t) {
|
|
3325
|
+
var n = o.default.getFontDef(e), r = e.stack.env;
|
|
3326
|
+
r.multiLetterIdentifiers && r.font !== "" && (t = e.string.substr(e.i - 1).match(r.multiLetterIdentifiers)[0], e.i += t.length - 1, n.mathvariant === a.TexConstant.Variant.NORMAL && r.noAutoOP && t.length > 1 && (n.autoOP = !1));
|
|
3327
|
+
var i = e.create("token", "mi", n, t);
|
|
3328
|
+
e.Push(i);
|
|
3329
|
+
}
|
|
3330
|
+
e.variable = r;
|
|
3331
|
+
function s(e, t) {
|
|
3332
|
+
var n, r = e.configuration.options.digits, i = e.string.slice(e.i - 1).match(r), a = o.default.getFontDef(e);
|
|
3333
|
+
i ? (n = e.create("token", "mn", a, i[0].replace(/[{}]/g, "")), e.i += i[0].length - 1) : n = e.create("token", "mo", a, t), e.Push(n);
|
|
3334
|
+
}
|
|
3335
|
+
e.digit = s;
|
|
3336
|
+
function c(e, t) {
|
|
3337
|
+
var n = e.GetCS();
|
|
3338
|
+
e.parse("macro", [e, n]);
|
|
3339
|
+
}
|
|
3340
|
+
e.controlSequence = c;
|
|
3341
|
+
function l(e, t) {
|
|
3342
|
+
var n = t.attributes || { mathvariant: a.TexConstant.Variant.ITALIC }, r = e.create("token", "mi", n, t.char);
|
|
3343
|
+
e.Push(r);
|
|
3344
|
+
}
|
|
3345
|
+
e.mathchar0mi = l;
|
|
3346
|
+
function u(e, t) {
|
|
3347
|
+
var n = t.attributes || {};
|
|
3348
|
+
n.stretchy = !1;
|
|
3349
|
+
var r = e.create("token", "mo", n, t.char);
|
|
3350
|
+
i.default.setProperty(r, "fixStretchy", !0), e.configuration.addNode("fixStretchy", r), e.Push(r);
|
|
3351
|
+
}
|
|
3352
|
+
e.mathchar0mo = u;
|
|
3353
|
+
function d(e, t) {
|
|
3354
|
+
var n = t.attributes || { mathvariant: a.TexConstant.Variant.NORMAL };
|
|
3355
|
+
e.stack.env.font && (n.mathvariant = e.stack.env.font);
|
|
3356
|
+
var r = e.create("token", "mi", n, t.char);
|
|
3357
|
+
e.Push(r);
|
|
3358
|
+
}
|
|
3359
|
+
e.mathchar7 = d;
|
|
3360
|
+
function f(e, t) {
|
|
3361
|
+
var n = t.attributes || {};
|
|
3362
|
+
n = Object.assign({
|
|
3363
|
+
fence: !1,
|
|
3364
|
+
stretchy: !1
|
|
3365
|
+
}, n);
|
|
3366
|
+
var r = e.create("token", "mo", n, t.char);
|
|
3367
|
+
e.Push(r);
|
|
3368
|
+
}
|
|
3369
|
+
e.delimiter = f;
|
|
3370
|
+
function p(e, r, i, a) {
|
|
3371
|
+
var o = a[0], s = e.itemFactory.create("begin").setProperties({
|
|
3372
|
+
name: r,
|
|
3373
|
+
end: o
|
|
3374
|
+
});
|
|
3375
|
+
s = i.apply(void 0, n([e, s], t(a.slice(1)), !1)), e.Push(s);
|
|
3376
|
+
}
|
|
3377
|
+
e.environment = p;
|
|
3378
|
+
})(s ||= {}), e.default = s;
|
|
3379
|
+
})), O = /* @__PURE__ */ e(((e) => {
|
|
3380
|
+
var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
3381
|
+
r === void 0 && (r = n);
|
|
3382
|
+
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
3383
|
+
(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
|
|
3384
|
+
enumerable: !0,
|
|
3385
|
+
get: function() {
|
|
3386
|
+
return t[n];
|
|
3387
|
+
}
|
|
3388
|
+
}), Object.defineProperty(e, r, i);
|
|
3389
|
+
}) : (function(e, t, n, r) {
|
|
3390
|
+
r === void 0 && (r = n), e[r] = t[n];
|
|
3391
|
+
})), n = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
|
|
3392
|
+
Object.defineProperty(e, "default", {
|
|
3393
|
+
enumerable: !0,
|
|
3394
|
+
value: t
|
|
3395
|
+
});
|
|
3396
|
+
}) : function(e, t) {
|
|
3397
|
+
e.default = t;
|
|
3398
|
+
}), r = e && e.__importStar || function(e) {
|
|
3399
|
+
if (e && e.__esModule) return e;
|
|
3400
|
+
var r = {};
|
|
3401
|
+
if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && t(r, e, i);
|
|
3402
|
+
return n(r, e), r;
|
|
3403
|
+
}, a = e && e.__importDefault || function(e) {
|
|
3404
|
+
return e && e.__esModule ? e : { default: e };
|
|
3405
|
+
};
|
|
3406
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
3407
|
+
var o = r(C()), s = T(), c = a(E()), u = a(D()), d = a(f()), p = i(), m = l();
|
|
3408
|
+
new o.RegExpMap("letter", u.default.variable, /[a-z]/i), new o.RegExpMap("digit", u.default.digit, /[0-9.,]/), new o.RegExpMap("command", u.default.controlSequence, /^\\/), new o.MacroMap("special", {
|
|
3409
|
+
"{": "Open",
|
|
3410
|
+
"}": "Close",
|
|
3411
|
+
"~": "Tilde",
|
|
3412
|
+
"^": "Superscript",
|
|
3413
|
+
_: "Subscript",
|
|
3414
|
+
" ": "Space",
|
|
3415
|
+
" ": "Space",
|
|
3416
|
+
"\r": "Space",
|
|
3417
|
+
"\n": "Space",
|
|
3418
|
+
"'": "Prime",
|
|
3419
|
+
"%": "Comment",
|
|
3420
|
+
"&": "Entry",
|
|
3421
|
+
"#": "Hash",
|
|
3422
|
+
"\xA0": "Space",
|
|
3423
|
+
"’": "Prime"
|
|
3424
|
+
}, c.default), new o.CharacterMap("mathchar0mi", u.default.mathchar0mi, {
|
|
3425
|
+
alpha: "α",
|
|
3426
|
+
beta: "β",
|
|
3427
|
+
gamma: "γ",
|
|
3428
|
+
delta: "δ",
|
|
3429
|
+
epsilon: "ϵ",
|
|
3430
|
+
zeta: "ζ",
|
|
3431
|
+
eta: "η",
|
|
3432
|
+
theta: "θ",
|
|
3433
|
+
iota: "ι",
|
|
3434
|
+
kappa: "κ",
|
|
3435
|
+
lambda: "λ",
|
|
3436
|
+
mu: "μ",
|
|
3437
|
+
nu: "ν",
|
|
3438
|
+
xi: "ξ",
|
|
3439
|
+
omicron: "ο",
|
|
3440
|
+
pi: "π",
|
|
3441
|
+
rho: "ρ",
|
|
3442
|
+
sigma: "σ",
|
|
3443
|
+
tau: "τ",
|
|
3444
|
+
upsilon: "υ",
|
|
3445
|
+
phi: "ϕ",
|
|
3446
|
+
chi: "χ",
|
|
3447
|
+
psi: "ψ",
|
|
3448
|
+
omega: "ω",
|
|
3449
|
+
varepsilon: "ε",
|
|
3450
|
+
vartheta: "ϑ",
|
|
3451
|
+
varpi: "ϖ",
|
|
3452
|
+
varrho: "ϱ",
|
|
3453
|
+
varsigma: "ς",
|
|
3454
|
+
varphi: "φ",
|
|
3455
|
+
S: ["§", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3456
|
+
aleph: ["ℵ", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3457
|
+
hbar: ["ℏ", { variantForm: !0 }],
|
|
3458
|
+
imath: "ı",
|
|
3459
|
+
jmath: "ȷ",
|
|
3460
|
+
ell: "ℓ",
|
|
3461
|
+
wp: ["℘", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3462
|
+
Re: ["ℜ", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3463
|
+
Im: ["ℑ", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3464
|
+
partial: ["∂", { mathvariant: s.TexConstant.Variant.ITALIC }],
|
|
3465
|
+
infty: ["∞", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3466
|
+
prime: ["′", { variantForm: !0 }],
|
|
3467
|
+
emptyset: ["∅", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3468
|
+
nabla: ["∇", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3469
|
+
top: ["⊤", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3470
|
+
bot: ["⊥", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3471
|
+
angle: ["∠", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3472
|
+
triangle: ["△", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3473
|
+
backslash: ["∖", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3474
|
+
forall: ["∀", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3475
|
+
exists: ["∃", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3476
|
+
neg: ["¬", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3477
|
+
lnot: ["¬", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3478
|
+
flat: ["♭", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3479
|
+
natural: ["♮", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3480
|
+
sharp: ["♯", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3481
|
+
clubsuit: ["♣", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3482
|
+
diamondsuit: ["♢", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3483
|
+
heartsuit: ["♡", { mathvariant: s.TexConstant.Variant.NORMAL }],
|
|
3484
|
+
spadesuit: ["♠", { mathvariant: s.TexConstant.Variant.NORMAL }]
|
|
3485
|
+
}), new o.CharacterMap("mathchar0mo", u.default.mathchar0mo, {
|
|
3486
|
+
surd: "√",
|
|
3487
|
+
coprod: ["∐", {
|
|
3488
|
+
texClass: p.TEXCLASS.OP,
|
|
3489
|
+
movesupsub: !0
|
|
3490
|
+
}],
|
|
3491
|
+
bigvee: ["⋁", {
|
|
3492
|
+
texClass: p.TEXCLASS.OP,
|
|
3493
|
+
movesupsub: !0
|
|
3494
|
+
}],
|
|
3495
|
+
bigwedge: ["⋀", {
|
|
3496
|
+
texClass: p.TEXCLASS.OP,
|
|
3497
|
+
movesupsub: !0
|
|
3498
|
+
}],
|
|
3499
|
+
biguplus: ["⨄", {
|
|
3500
|
+
texClass: p.TEXCLASS.OP,
|
|
3501
|
+
movesupsub: !0
|
|
3502
|
+
}],
|
|
3503
|
+
bigcap: ["⋂", {
|
|
3504
|
+
texClass: p.TEXCLASS.OP,
|
|
3505
|
+
movesupsub: !0
|
|
3506
|
+
}],
|
|
3507
|
+
bigcup: ["⋃", {
|
|
3508
|
+
texClass: p.TEXCLASS.OP,
|
|
3509
|
+
movesupsub: !0
|
|
3510
|
+
}],
|
|
3511
|
+
int: ["∫", { texClass: p.TEXCLASS.OP }],
|
|
3512
|
+
intop: ["∫", {
|
|
3513
|
+
texClass: p.TEXCLASS.OP,
|
|
3514
|
+
movesupsub: !0,
|
|
3515
|
+
movablelimits: !0
|
|
3516
|
+
}],
|
|
3517
|
+
iint: ["∬", { texClass: p.TEXCLASS.OP }],
|
|
3518
|
+
iiint: ["∭", { texClass: p.TEXCLASS.OP }],
|
|
3519
|
+
prod: ["∏", {
|
|
3520
|
+
texClass: p.TEXCLASS.OP,
|
|
3521
|
+
movesupsub: !0
|
|
3522
|
+
}],
|
|
3523
|
+
sum: ["∑", {
|
|
3524
|
+
texClass: p.TEXCLASS.OP,
|
|
3525
|
+
movesupsub: !0
|
|
3526
|
+
}],
|
|
3527
|
+
bigotimes: ["⨂", {
|
|
3528
|
+
texClass: p.TEXCLASS.OP,
|
|
3529
|
+
movesupsub: !0
|
|
3530
|
+
}],
|
|
3531
|
+
bigoplus: ["⨁", {
|
|
3532
|
+
texClass: p.TEXCLASS.OP,
|
|
3533
|
+
movesupsub: !0
|
|
3534
|
+
}],
|
|
3535
|
+
bigodot: ["⨀", {
|
|
3536
|
+
texClass: p.TEXCLASS.OP,
|
|
3537
|
+
movesupsub: !0
|
|
3538
|
+
}],
|
|
3539
|
+
oint: ["∮", { texClass: p.TEXCLASS.OP }],
|
|
3540
|
+
bigsqcup: ["⨆", {
|
|
3541
|
+
texClass: p.TEXCLASS.OP,
|
|
3542
|
+
movesupsub: !0
|
|
3543
|
+
}],
|
|
3544
|
+
smallint: ["∫", { largeop: !1 }],
|
|
3545
|
+
triangleleft: "◃",
|
|
3546
|
+
triangleright: "▹",
|
|
3547
|
+
bigtriangleup: "△",
|
|
3548
|
+
bigtriangledown: "▽",
|
|
3549
|
+
wedge: "∧",
|
|
3550
|
+
land: "∧",
|
|
3551
|
+
vee: "∨",
|
|
3552
|
+
lor: "∨",
|
|
3553
|
+
cap: "∩",
|
|
3554
|
+
cup: "∪",
|
|
3555
|
+
ddagger: "‡",
|
|
3556
|
+
dagger: "†",
|
|
3557
|
+
sqcap: "⊓",
|
|
3558
|
+
sqcup: "⊔",
|
|
3559
|
+
uplus: "⊎",
|
|
3560
|
+
amalg: "⨿",
|
|
3561
|
+
diamond: "⋄",
|
|
3562
|
+
bullet: "∙",
|
|
3563
|
+
wr: "≀",
|
|
3564
|
+
div: "÷",
|
|
3565
|
+
divsymbol: "÷",
|
|
3566
|
+
odot: ["⊙", { largeop: !1 }],
|
|
3567
|
+
oslash: ["⊘", { largeop: !1 }],
|
|
3568
|
+
otimes: ["⊗", { largeop: !1 }],
|
|
3569
|
+
ominus: ["⊖", { largeop: !1 }],
|
|
3570
|
+
oplus: ["⊕", { largeop: !1 }],
|
|
3571
|
+
mp: "∓",
|
|
3572
|
+
pm: "±",
|
|
3573
|
+
circ: "∘",
|
|
3574
|
+
bigcirc: "◯",
|
|
3575
|
+
setminus: "∖",
|
|
3576
|
+
cdot: "⋅",
|
|
3577
|
+
ast: "∗",
|
|
3578
|
+
times: "×",
|
|
3579
|
+
star: "⋆",
|
|
3580
|
+
propto: "∝",
|
|
3581
|
+
sqsubseteq: "⊑",
|
|
3582
|
+
sqsupseteq: "⊒",
|
|
3583
|
+
parallel: "∥",
|
|
3584
|
+
mid: "∣",
|
|
3585
|
+
dashv: "⊣",
|
|
3586
|
+
vdash: "⊢",
|
|
3587
|
+
leq: "≤",
|
|
3588
|
+
le: "≤",
|
|
3589
|
+
geq: "≥",
|
|
3590
|
+
ge: "≥",
|
|
3591
|
+
lt: "<",
|
|
3592
|
+
gt: ">",
|
|
3593
|
+
succ: "≻",
|
|
3594
|
+
prec: "≺",
|
|
3595
|
+
approx: "≈",
|
|
3596
|
+
succeq: "⪰",
|
|
3597
|
+
preceq: "⪯",
|
|
3598
|
+
supset: "⊃",
|
|
3599
|
+
subset: "⊂",
|
|
3600
|
+
supseteq: "⊇",
|
|
3601
|
+
subseteq: "⊆",
|
|
3602
|
+
in: "∈",
|
|
3603
|
+
ni: "∋",
|
|
3604
|
+
notin: "∉",
|
|
3605
|
+
owns: "∋",
|
|
3606
|
+
gg: "≫",
|
|
3607
|
+
ll: "≪",
|
|
3608
|
+
sim: "∼",
|
|
3609
|
+
simeq: "≃",
|
|
3610
|
+
perp: "⊥",
|
|
3611
|
+
equiv: "≡",
|
|
3612
|
+
asymp: "≍",
|
|
3613
|
+
smile: "⌣",
|
|
3614
|
+
frown: "⌢",
|
|
3615
|
+
ne: "≠",
|
|
3616
|
+
neq: "≠",
|
|
3617
|
+
cong: "≅",
|
|
3618
|
+
doteq: "≐",
|
|
3619
|
+
bowtie: "⋈",
|
|
3620
|
+
models: "⊨",
|
|
3621
|
+
notChar: "⧸",
|
|
3622
|
+
Leftrightarrow: "⇔",
|
|
3623
|
+
Leftarrow: "⇐",
|
|
3624
|
+
Rightarrow: "⇒",
|
|
3625
|
+
leftrightarrow: "↔",
|
|
3626
|
+
leftarrow: "←",
|
|
3627
|
+
gets: "←",
|
|
3628
|
+
rightarrow: "→",
|
|
3629
|
+
to: ["→", { accent: !1 }],
|
|
3630
|
+
mapsto: "↦",
|
|
3631
|
+
leftharpoonup: "↼",
|
|
3632
|
+
leftharpoondown: "↽",
|
|
3633
|
+
rightharpoonup: "⇀",
|
|
3634
|
+
rightharpoondown: "⇁",
|
|
3635
|
+
nearrow: "↗",
|
|
3636
|
+
searrow: "↘",
|
|
3637
|
+
nwarrow: "↖",
|
|
3638
|
+
swarrow: "↙",
|
|
3639
|
+
rightleftharpoons: "⇌",
|
|
3640
|
+
hookrightarrow: "↪",
|
|
3641
|
+
hookleftarrow: "↩",
|
|
3642
|
+
longleftarrow: "⟵",
|
|
3643
|
+
Longleftarrow: "⟸",
|
|
3644
|
+
longrightarrow: "⟶",
|
|
3645
|
+
Longrightarrow: "⟹",
|
|
3646
|
+
Longleftrightarrow: "⟺",
|
|
3647
|
+
longleftrightarrow: "⟷",
|
|
3648
|
+
longmapsto: "⟼",
|
|
3649
|
+
ldots: "…",
|
|
3650
|
+
cdots: "⋯",
|
|
3651
|
+
vdots: "⋮",
|
|
3652
|
+
ddots: "⋱",
|
|
3653
|
+
dotsc: "…",
|
|
3654
|
+
dotsb: "⋯",
|
|
3655
|
+
dotsm: "⋯",
|
|
3656
|
+
dotsi: "⋯",
|
|
3657
|
+
dotso: "…",
|
|
3658
|
+
ldotp: [".", { texClass: p.TEXCLASS.PUNCT }],
|
|
3659
|
+
cdotp: ["⋅", { texClass: p.TEXCLASS.PUNCT }],
|
|
3660
|
+
colon: [":", { texClass: p.TEXCLASS.PUNCT }]
|
|
3661
|
+
}), new o.CharacterMap("mathchar7", u.default.mathchar7, {
|
|
3662
|
+
Gamma: "Γ",
|
|
3663
|
+
Delta: "Δ",
|
|
3664
|
+
Theta: "Θ",
|
|
3665
|
+
Lambda: "Λ",
|
|
3666
|
+
Xi: "Ξ",
|
|
3667
|
+
Pi: "Π",
|
|
3668
|
+
Sigma: "Σ",
|
|
3669
|
+
Upsilon: "Υ",
|
|
3670
|
+
Phi: "Φ",
|
|
3671
|
+
Psi: "Ψ",
|
|
3672
|
+
Omega: "Ω",
|
|
3673
|
+
_: "_",
|
|
3674
|
+
"#": "#",
|
|
3675
|
+
$: "$",
|
|
3676
|
+
"%": "%",
|
|
3677
|
+
"&": "&",
|
|
3678
|
+
And: "&"
|
|
3679
|
+
}), new o.DelimiterMap("delimiter", u.default.delimiter, {
|
|
3680
|
+
"(": "(",
|
|
3681
|
+
")": ")",
|
|
3682
|
+
"[": "[",
|
|
3683
|
+
"]": "]",
|
|
3684
|
+
"<": "⟨",
|
|
3685
|
+
">": "⟩",
|
|
3686
|
+
"\\lt": "⟨",
|
|
3687
|
+
"\\gt": "⟩",
|
|
3688
|
+
"/": "/",
|
|
3689
|
+
"|": ["|", { texClass: p.TEXCLASS.ORD }],
|
|
3690
|
+
".": "",
|
|
3691
|
+
"\\\\": "\\",
|
|
3692
|
+
"\\lmoustache": "⎰",
|
|
3693
|
+
"\\rmoustache": "⎱",
|
|
3694
|
+
"\\lgroup": "⟮",
|
|
3695
|
+
"\\rgroup": "⟯",
|
|
3696
|
+
"\\arrowvert": "⏐",
|
|
3697
|
+
"\\Arrowvert": "‖",
|
|
3698
|
+
"\\bracevert": "⎪",
|
|
3699
|
+
"\\Vert": ["‖", { texClass: p.TEXCLASS.ORD }],
|
|
3700
|
+
"\\|": ["‖", { texClass: p.TEXCLASS.ORD }],
|
|
3701
|
+
"\\vert": ["|", { texClass: p.TEXCLASS.ORD }],
|
|
3702
|
+
"\\uparrow": "↑",
|
|
3703
|
+
"\\downarrow": "↓",
|
|
3704
|
+
"\\updownarrow": "↕",
|
|
3705
|
+
"\\Uparrow": "⇑",
|
|
3706
|
+
"\\Downarrow": "⇓",
|
|
3707
|
+
"\\Updownarrow": "⇕",
|
|
3708
|
+
"\\backslash": "\\",
|
|
3709
|
+
"\\rangle": "⟩",
|
|
3710
|
+
"\\langle": "⟨",
|
|
3711
|
+
"\\rbrace": "}",
|
|
3712
|
+
"\\lbrace": "{",
|
|
3713
|
+
"\\}": "}",
|
|
3714
|
+
"\\{": "{",
|
|
3715
|
+
"\\rceil": "⌉",
|
|
3716
|
+
"\\lceil": "⌈",
|
|
3717
|
+
"\\rfloor": "⌋",
|
|
3718
|
+
"\\lfloor": "⌊",
|
|
3719
|
+
"\\lbrack": "[",
|
|
3720
|
+
"\\rbrack": "]"
|
|
3721
|
+
}), new o.CommandMap("macros", {
|
|
3722
|
+
displaystyle: [
|
|
3723
|
+
"SetStyle",
|
|
3724
|
+
"D",
|
|
3725
|
+
!0,
|
|
3726
|
+
0
|
|
3727
|
+
],
|
|
3728
|
+
textstyle: [
|
|
3729
|
+
"SetStyle",
|
|
3730
|
+
"T",
|
|
3731
|
+
!1,
|
|
3732
|
+
0
|
|
3733
|
+
],
|
|
3734
|
+
scriptstyle: [
|
|
3735
|
+
"SetStyle",
|
|
3736
|
+
"S",
|
|
3737
|
+
!1,
|
|
3738
|
+
1
|
|
3739
|
+
],
|
|
3740
|
+
scriptscriptstyle: [
|
|
3741
|
+
"SetStyle",
|
|
3742
|
+
"SS",
|
|
3743
|
+
!1,
|
|
3744
|
+
2
|
|
3745
|
+
],
|
|
3746
|
+
rm: ["SetFont", s.TexConstant.Variant.NORMAL],
|
|
3747
|
+
mit: ["SetFont", s.TexConstant.Variant.ITALIC],
|
|
3748
|
+
oldstyle: ["SetFont", s.TexConstant.Variant.OLDSTYLE],
|
|
3749
|
+
cal: ["SetFont", s.TexConstant.Variant.CALLIGRAPHIC],
|
|
3750
|
+
it: ["SetFont", s.TexConstant.Variant.MATHITALIC],
|
|
3751
|
+
bf: ["SetFont", s.TexConstant.Variant.BOLD],
|
|
3752
|
+
bbFont: ["SetFont", s.TexConstant.Variant.DOUBLESTRUCK],
|
|
3753
|
+
scr: ["SetFont", s.TexConstant.Variant.SCRIPT],
|
|
3754
|
+
frak: ["SetFont", s.TexConstant.Variant.FRAKTUR],
|
|
3755
|
+
sf: ["SetFont", s.TexConstant.Variant.SANSSERIF],
|
|
3756
|
+
tt: ["SetFont", s.TexConstant.Variant.MONOSPACE],
|
|
3757
|
+
mathrm: ["MathFont", s.TexConstant.Variant.NORMAL],
|
|
3758
|
+
mathup: ["MathFont", s.TexConstant.Variant.NORMAL],
|
|
3759
|
+
mathnormal: ["MathFont", ""],
|
|
3760
|
+
mathbf: ["MathFont", s.TexConstant.Variant.BOLD],
|
|
3761
|
+
mathbfup: ["MathFont", s.TexConstant.Variant.BOLD],
|
|
3762
|
+
mathit: ["MathFont", s.TexConstant.Variant.MATHITALIC],
|
|
3763
|
+
mathbfit: ["MathFont", s.TexConstant.Variant.BOLDITALIC],
|
|
3764
|
+
mathbb: ["MathFont", s.TexConstant.Variant.DOUBLESTRUCK],
|
|
3765
|
+
Bbb: ["MathFont", s.TexConstant.Variant.DOUBLESTRUCK],
|
|
3766
|
+
mathfrak: ["MathFont", s.TexConstant.Variant.FRAKTUR],
|
|
3767
|
+
mathbffrak: ["MathFont", s.TexConstant.Variant.BOLDFRAKTUR],
|
|
3768
|
+
mathscr: ["MathFont", s.TexConstant.Variant.SCRIPT],
|
|
3769
|
+
mathbfscr: ["MathFont", s.TexConstant.Variant.BOLDSCRIPT],
|
|
3770
|
+
mathsf: ["MathFont", s.TexConstant.Variant.SANSSERIF],
|
|
3771
|
+
mathsfup: ["MathFont", s.TexConstant.Variant.SANSSERIF],
|
|
3772
|
+
mathbfsf: ["MathFont", s.TexConstant.Variant.BOLDSANSSERIF],
|
|
3773
|
+
mathbfsfup: ["MathFont", s.TexConstant.Variant.BOLDSANSSERIF],
|
|
3774
|
+
mathsfit: ["MathFont", s.TexConstant.Variant.SANSSERIFITALIC],
|
|
3775
|
+
mathbfsfit: ["MathFont", s.TexConstant.Variant.SANSSERIFBOLDITALIC],
|
|
3776
|
+
mathtt: ["MathFont", s.TexConstant.Variant.MONOSPACE],
|
|
3777
|
+
mathcal: ["MathFont", s.TexConstant.Variant.CALLIGRAPHIC],
|
|
3778
|
+
mathbfcal: ["MathFont", s.TexConstant.Variant.BOLDCALLIGRAPHIC],
|
|
3779
|
+
symrm: ["MathFont", s.TexConstant.Variant.NORMAL],
|
|
3780
|
+
symup: ["MathFont", s.TexConstant.Variant.NORMAL],
|
|
3781
|
+
symnormal: ["MathFont", ""],
|
|
3782
|
+
symbf: ["MathFont", s.TexConstant.Variant.BOLD],
|
|
3783
|
+
symbfup: ["MathFont", s.TexConstant.Variant.BOLD],
|
|
3784
|
+
symit: ["MathFont", s.TexConstant.Variant.ITALIC],
|
|
3785
|
+
symbfit: ["MathFont", s.TexConstant.Variant.BOLDITALIC],
|
|
3786
|
+
symbb: ["MathFont", s.TexConstant.Variant.DOUBLESTRUCK],
|
|
3787
|
+
symfrak: ["MathFont", s.TexConstant.Variant.FRAKTUR],
|
|
3788
|
+
symbffrak: ["MathFont", s.TexConstant.Variant.BOLDFRAKTUR],
|
|
3789
|
+
symscr: ["MathFont", s.TexConstant.Variant.SCRIPT],
|
|
3790
|
+
symbfscr: ["MathFont", s.TexConstant.Variant.BOLDSCRIPT],
|
|
3791
|
+
symsf: ["MathFont", s.TexConstant.Variant.SANSSERIF],
|
|
3792
|
+
symsfup: ["MathFont", s.TexConstant.Variant.SANSSERIF],
|
|
3793
|
+
symbfsf: ["MathFont", s.TexConstant.Variant.BOLDSANSSERIF],
|
|
3794
|
+
symbfsfup: ["MathFont", s.TexConstant.Variant.BOLDSANSSERIF],
|
|
3795
|
+
symsfit: ["MathFont", s.TexConstant.Variant.SANSSERIFITALIC],
|
|
3796
|
+
symbfsfit: ["MathFont", s.TexConstant.Variant.SANSSERIFBOLDITALIC],
|
|
3797
|
+
symtt: ["MathFont", s.TexConstant.Variant.MONOSPACE],
|
|
3798
|
+
symcal: ["MathFont", s.TexConstant.Variant.CALLIGRAPHIC],
|
|
3799
|
+
symbfcal: ["MathFont", s.TexConstant.Variant.BOLDCALLIGRAPHIC],
|
|
3800
|
+
textrm: [
|
|
3801
|
+
"HBox",
|
|
3802
|
+
null,
|
|
3803
|
+
s.TexConstant.Variant.NORMAL
|
|
3804
|
+
],
|
|
3805
|
+
textup: [
|
|
3806
|
+
"HBox",
|
|
3807
|
+
null,
|
|
3808
|
+
s.TexConstant.Variant.NORMAL
|
|
3809
|
+
],
|
|
3810
|
+
textnormal: ["HBox"],
|
|
3811
|
+
textit: [
|
|
3812
|
+
"HBox",
|
|
3813
|
+
null,
|
|
3814
|
+
s.TexConstant.Variant.ITALIC
|
|
3815
|
+
],
|
|
3816
|
+
textbf: [
|
|
3817
|
+
"HBox",
|
|
3818
|
+
null,
|
|
3819
|
+
s.TexConstant.Variant.BOLD
|
|
3820
|
+
],
|
|
3821
|
+
textsf: [
|
|
3822
|
+
"HBox",
|
|
3823
|
+
null,
|
|
3824
|
+
s.TexConstant.Variant.SANSSERIF
|
|
3825
|
+
],
|
|
3826
|
+
texttt: [
|
|
3827
|
+
"HBox",
|
|
3828
|
+
null,
|
|
3829
|
+
s.TexConstant.Variant.MONOSPACE
|
|
3830
|
+
],
|
|
3831
|
+
tiny: ["SetSize", .5],
|
|
3832
|
+
Tiny: ["SetSize", .6],
|
|
3833
|
+
scriptsize: ["SetSize", .7],
|
|
3834
|
+
small: ["SetSize", .85],
|
|
3835
|
+
normalsize: ["SetSize", 1],
|
|
3836
|
+
large: ["SetSize", 1.2],
|
|
3837
|
+
Large: ["SetSize", 1.44],
|
|
3838
|
+
LARGE: ["SetSize", 1.73],
|
|
3839
|
+
huge: ["SetSize", 2.07],
|
|
3840
|
+
Huge: ["SetSize", 2.49],
|
|
3841
|
+
arcsin: "NamedFn",
|
|
3842
|
+
arccos: "NamedFn",
|
|
3843
|
+
arctan: "NamedFn",
|
|
3844
|
+
arg: "NamedFn",
|
|
3845
|
+
cos: "NamedFn",
|
|
3846
|
+
cosh: "NamedFn",
|
|
3847
|
+
cot: "NamedFn",
|
|
3848
|
+
coth: "NamedFn",
|
|
3849
|
+
csc: "NamedFn",
|
|
3850
|
+
deg: "NamedFn",
|
|
3851
|
+
det: "NamedOp",
|
|
3852
|
+
dim: "NamedFn",
|
|
3853
|
+
exp: "NamedFn",
|
|
3854
|
+
gcd: "NamedOp",
|
|
3855
|
+
hom: "NamedFn",
|
|
3856
|
+
inf: "NamedOp",
|
|
3857
|
+
ker: "NamedFn",
|
|
3858
|
+
lg: "NamedFn",
|
|
3859
|
+
lim: "NamedOp",
|
|
3860
|
+
liminf: ["NamedOp", "lim inf"],
|
|
3861
|
+
limsup: ["NamedOp", "lim sup"],
|
|
3862
|
+
ln: "NamedFn",
|
|
3863
|
+
log: "NamedFn",
|
|
3864
|
+
max: "NamedOp",
|
|
3865
|
+
min: "NamedOp",
|
|
3866
|
+
Pr: "NamedOp",
|
|
3867
|
+
sec: "NamedFn",
|
|
3868
|
+
sin: "NamedFn",
|
|
3869
|
+
sinh: "NamedFn",
|
|
3870
|
+
sup: "NamedOp",
|
|
3871
|
+
tan: "NamedFn",
|
|
3872
|
+
tanh: "NamedFn",
|
|
3873
|
+
limits: ["Limits", 1],
|
|
3874
|
+
nolimits: ["Limits", 0],
|
|
3875
|
+
overline: ["UnderOver", "2015"],
|
|
3876
|
+
underline: ["UnderOver", "2015"],
|
|
3877
|
+
overbrace: [
|
|
3878
|
+
"UnderOver",
|
|
3879
|
+
"23DE",
|
|
3880
|
+
1
|
|
3881
|
+
],
|
|
3882
|
+
underbrace: [
|
|
3883
|
+
"UnderOver",
|
|
3884
|
+
"23DF",
|
|
3885
|
+
1
|
|
3886
|
+
],
|
|
3887
|
+
overparen: ["UnderOver", "23DC"],
|
|
3888
|
+
underparen: ["UnderOver", "23DD"],
|
|
3889
|
+
overrightarrow: ["UnderOver", "2192"],
|
|
3890
|
+
underrightarrow: ["UnderOver", "2192"],
|
|
3891
|
+
overleftarrow: ["UnderOver", "2190"],
|
|
3892
|
+
underleftarrow: ["UnderOver", "2190"],
|
|
3893
|
+
overleftrightarrow: ["UnderOver", "2194"],
|
|
3894
|
+
underleftrightarrow: ["UnderOver", "2194"],
|
|
3895
|
+
overset: "Overset",
|
|
3896
|
+
underset: "Underset",
|
|
3897
|
+
overunderset: "Overunderset",
|
|
3898
|
+
stackrel: [
|
|
3899
|
+
"Macro",
|
|
3900
|
+
"\\mathrel{\\mathop{#2}\\limits^{#1}}",
|
|
3901
|
+
2
|
|
3902
|
+
],
|
|
3903
|
+
stackbin: [
|
|
3904
|
+
"Macro",
|
|
3905
|
+
"\\mathbin{\\mathop{#2}\\limits^{#1}}",
|
|
3906
|
+
2
|
|
3907
|
+
],
|
|
3908
|
+
over: "Over",
|
|
3909
|
+
overwithdelims: "Over",
|
|
3910
|
+
atop: "Over",
|
|
3911
|
+
atopwithdelims: "Over",
|
|
3912
|
+
above: "Over",
|
|
3913
|
+
abovewithdelims: "Over",
|
|
3914
|
+
brace: [
|
|
3915
|
+
"Over",
|
|
3916
|
+
"{",
|
|
3917
|
+
"}"
|
|
3918
|
+
],
|
|
3919
|
+
brack: [
|
|
3920
|
+
"Over",
|
|
3921
|
+
"[",
|
|
3922
|
+
"]"
|
|
3923
|
+
],
|
|
3924
|
+
choose: [
|
|
3925
|
+
"Over",
|
|
3926
|
+
"(",
|
|
3927
|
+
")"
|
|
3928
|
+
],
|
|
3929
|
+
frac: "Frac",
|
|
3930
|
+
sqrt: "Sqrt",
|
|
3931
|
+
root: "Root",
|
|
3932
|
+
uproot: ["MoveRoot", "upRoot"],
|
|
3933
|
+
leftroot: ["MoveRoot", "leftRoot"],
|
|
3934
|
+
left: "LeftRight",
|
|
3935
|
+
right: "LeftRight",
|
|
3936
|
+
middle: "LeftRight",
|
|
3937
|
+
llap: "Lap",
|
|
3938
|
+
rlap: "Lap",
|
|
3939
|
+
raise: "RaiseLower",
|
|
3940
|
+
lower: "RaiseLower",
|
|
3941
|
+
moveleft: "MoveLeftRight",
|
|
3942
|
+
moveright: "MoveLeftRight",
|
|
3943
|
+
",": ["Spacer", m.MATHSPACE.thinmathspace],
|
|
3944
|
+
":": ["Spacer", m.MATHSPACE.mediummathspace],
|
|
3945
|
+
">": ["Spacer", m.MATHSPACE.mediummathspace],
|
|
3946
|
+
";": ["Spacer", m.MATHSPACE.thickmathspace],
|
|
3947
|
+
"!": ["Spacer", m.MATHSPACE.negativethinmathspace],
|
|
3948
|
+
enspace: ["Spacer", .5],
|
|
3949
|
+
quad: ["Spacer", 1],
|
|
3950
|
+
qquad: ["Spacer", 2],
|
|
3951
|
+
thinspace: ["Spacer", m.MATHSPACE.thinmathspace],
|
|
3952
|
+
negthinspace: ["Spacer", m.MATHSPACE.negativethinmathspace],
|
|
3953
|
+
hskip: "Hskip",
|
|
3954
|
+
hspace: "Hskip",
|
|
3955
|
+
kern: "Hskip",
|
|
3956
|
+
mskip: "Hskip",
|
|
3957
|
+
mspace: "Hskip",
|
|
3958
|
+
mkern: "Hskip",
|
|
3959
|
+
rule: "rule",
|
|
3960
|
+
Rule: ["Rule"],
|
|
3961
|
+
Space: ["Rule", "blank"],
|
|
3962
|
+
nonscript: "Nonscript",
|
|
3963
|
+
big: [
|
|
3964
|
+
"MakeBig",
|
|
3965
|
+
p.TEXCLASS.ORD,
|
|
3966
|
+
.85
|
|
3967
|
+
],
|
|
3968
|
+
Big: [
|
|
3969
|
+
"MakeBig",
|
|
3970
|
+
p.TEXCLASS.ORD,
|
|
3971
|
+
1.15
|
|
3972
|
+
],
|
|
3973
|
+
bigg: [
|
|
3974
|
+
"MakeBig",
|
|
3975
|
+
p.TEXCLASS.ORD,
|
|
3976
|
+
1.45
|
|
3977
|
+
],
|
|
3978
|
+
Bigg: [
|
|
3979
|
+
"MakeBig",
|
|
3980
|
+
p.TEXCLASS.ORD,
|
|
3981
|
+
1.75
|
|
3982
|
+
],
|
|
3983
|
+
bigl: [
|
|
3984
|
+
"MakeBig",
|
|
3985
|
+
p.TEXCLASS.OPEN,
|
|
3986
|
+
.85
|
|
3987
|
+
],
|
|
3988
|
+
Bigl: [
|
|
3989
|
+
"MakeBig",
|
|
3990
|
+
p.TEXCLASS.OPEN,
|
|
3991
|
+
1.15
|
|
3992
|
+
],
|
|
3993
|
+
biggl: [
|
|
3994
|
+
"MakeBig",
|
|
3995
|
+
p.TEXCLASS.OPEN,
|
|
3996
|
+
1.45
|
|
3997
|
+
],
|
|
3998
|
+
Biggl: [
|
|
3999
|
+
"MakeBig",
|
|
4000
|
+
p.TEXCLASS.OPEN,
|
|
4001
|
+
1.75
|
|
4002
|
+
],
|
|
4003
|
+
bigr: [
|
|
4004
|
+
"MakeBig",
|
|
4005
|
+
p.TEXCLASS.CLOSE,
|
|
4006
|
+
.85
|
|
4007
|
+
],
|
|
4008
|
+
Bigr: [
|
|
4009
|
+
"MakeBig",
|
|
4010
|
+
p.TEXCLASS.CLOSE,
|
|
4011
|
+
1.15
|
|
4012
|
+
],
|
|
4013
|
+
biggr: [
|
|
4014
|
+
"MakeBig",
|
|
4015
|
+
p.TEXCLASS.CLOSE,
|
|
4016
|
+
1.45
|
|
4017
|
+
],
|
|
4018
|
+
Biggr: [
|
|
4019
|
+
"MakeBig",
|
|
4020
|
+
p.TEXCLASS.CLOSE,
|
|
4021
|
+
1.75
|
|
4022
|
+
],
|
|
4023
|
+
bigm: [
|
|
4024
|
+
"MakeBig",
|
|
4025
|
+
p.TEXCLASS.REL,
|
|
4026
|
+
.85
|
|
4027
|
+
],
|
|
4028
|
+
Bigm: [
|
|
4029
|
+
"MakeBig",
|
|
4030
|
+
p.TEXCLASS.REL,
|
|
4031
|
+
1.15
|
|
4032
|
+
],
|
|
4033
|
+
biggm: [
|
|
4034
|
+
"MakeBig",
|
|
4035
|
+
p.TEXCLASS.REL,
|
|
4036
|
+
1.45
|
|
4037
|
+
],
|
|
4038
|
+
Biggm: [
|
|
4039
|
+
"MakeBig",
|
|
4040
|
+
p.TEXCLASS.REL,
|
|
4041
|
+
1.75
|
|
4042
|
+
],
|
|
4043
|
+
mathord: ["TeXAtom", p.TEXCLASS.ORD],
|
|
4044
|
+
mathop: ["TeXAtom", p.TEXCLASS.OP],
|
|
4045
|
+
mathopen: ["TeXAtom", p.TEXCLASS.OPEN],
|
|
4046
|
+
mathclose: ["TeXAtom", p.TEXCLASS.CLOSE],
|
|
4047
|
+
mathbin: ["TeXAtom", p.TEXCLASS.BIN],
|
|
4048
|
+
mathrel: ["TeXAtom", p.TEXCLASS.REL],
|
|
4049
|
+
mathpunct: ["TeXAtom", p.TEXCLASS.PUNCT],
|
|
4050
|
+
mathinner: ["TeXAtom", p.TEXCLASS.INNER],
|
|
4051
|
+
vcenter: ["TeXAtom", p.TEXCLASS.VCENTER],
|
|
4052
|
+
buildrel: "BuildRel",
|
|
4053
|
+
hbox: ["HBox", 0],
|
|
4054
|
+
text: "HBox",
|
|
4055
|
+
mbox: ["HBox", 0],
|
|
4056
|
+
fbox: "FBox",
|
|
4057
|
+
boxed: [
|
|
4058
|
+
"Macro",
|
|
4059
|
+
"\\fbox{$\\displaystyle{#1}$}",
|
|
4060
|
+
1
|
|
4061
|
+
],
|
|
4062
|
+
framebox: "FrameBox",
|
|
4063
|
+
strut: "Strut",
|
|
4064
|
+
mathstrut: ["Macro", "\\vphantom{(}"],
|
|
4065
|
+
phantom: "Phantom",
|
|
4066
|
+
vphantom: [
|
|
4067
|
+
"Phantom",
|
|
4068
|
+
1,
|
|
4069
|
+
0
|
|
4070
|
+
],
|
|
4071
|
+
hphantom: [
|
|
4072
|
+
"Phantom",
|
|
4073
|
+
0,
|
|
4074
|
+
1
|
|
4075
|
+
],
|
|
4076
|
+
smash: "Smash",
|
|
4077
|
+
acute: ["Accent", "00B4"],
|
|
4078
|
+
grave: ["Accent", "0060"],
|
|
4079
|
+
ddot: ["Accent", "00A8"],
|
|
4080
|
+
tilde: ["Accent", "007E"],
|
|
4081
|
+
bar: ["Accent", "00AF"],
|
|
4082
|
+
breve: ["Accent", "02D8"],
|
|
4083
|
+
check: ["Accent", "02C7"],
|
|
4084
|
+
hat: ["Accent", "005E"],
|
|
4085
|
+
vec: ["Accent", "2192"],
|
|
4086
|
+
dot: ["Accent", "02D9"],
|
|
4087
|
+
widetilde: [
|
|
4088
|
+
"Accent",
|
|
4089
|
+
"007E",
|
|
4090
|
+
1
|
|
4091
|
+
],
|
|
4092
|
+
widehat: [
|
|
4093
|
+
"Accent",
|
|
4094
|
+
"005E",
|
|
4095
|
+
1
|
|
4096
|
+
],
|
|
4097
|
+
matrix: "Matrix",
|
|
4098
|
+
array: "Matrix",
|
|
4099
|
+
pmatrix: [
|
|
4100
|
+
"Matrix",
|
|
4101
|
+
"(",
|
|
4102
|
+
")"
|
|
4103
|
+
],
|
|
4104
|
+
cases: [
|
|
4105
|
+
"Matrix",
|
|
4106
|
+
"{",
|
|
4107
|
+
"",
|
|
4108
|
+
"left left",
|
|
4109
|
+
null,
|
|
4110
|
+
".1em",
|
|
4111
|
+
null,
|
|
4112
|
+
!0
|
|
4113
|
+
],
|
|
4114
|
+
eqalign: [
|
|
4115
|
+
"Matrix",
|
|
4116
|
+
null,
|
|
4117
|
+
null,
|
|
4118
|
+
"right left",
|
|
4119
|
+
(0, m.em)(m.MATHSPACE.thickmathspace),
|
|
4120
|
+
".5em",
|
|
4121
|
+
"D"
|
|
4122
|
+
],
|
|
4123
|
+
displaylines: [
|
|
4124
|
+
"Matrix",
|
|
4125
|
+
null,
|
|
4126
|
+
null,
|
|
4127
|
+
"center",
|
|
4128
|
+
null,
|
|
4129
|
+
".5em",
|
|
4130
|
+
"D"
|
|
4131
|
+
],
|
|
4132
|
+
cr: "Cr",
|
|
4133
|
+
"\\": "CrLaTeX",
|
|
4134
|
+
newline: ["CrLaTeX", !0],
|
|
4135
|
+
hline: ["HLine", "solid"],
|
|
4136
|
+
hdashline: ["HLine", "dashed"],
|
|
4137
|
+
eqalignno: [
|
|
4138
|
+
"Matrix",
|
|
4139
|
+
null,
|
|
4140
|
+
null,
|
|
4141
|
+
"right left",
|
|
4142
|
+
(0, m.em)(m.MATHSPACE.thickmathspace),
|
|
4143
|
+
".5em",
|
|
4144
|
+
"D",
|
|
4145
|
+
null,
|
|
4146
|
+
"right"
|
|
4147
|
+
],
|
|
4148
|
+
leqalignno: [
|
|
4149
|
+
"Matrix",
|
|
4150
|
+
null,
|
|
4151
|
+
null,
|
|
4152
|
+
"right left",
|
|
4153
|
+
(0, m.em)(m.MATHSPACE.thickmathspace),
|
|
4154
|
+
".5em",
|
|
4155
|
+
"D",
|
|
4156
|
+
null,
|
|
4157
|
+
"left"
|
|
4158
|
+
],
|
|
4159
|
+
hfill: "HFill",
|
|
4160
|
+
hfil: "HFill",
|
|
4161
|
+
hfilll: "HFill",
|
|
4162
|
+
bmod: ["Macro", "\\mmlToken{mo}[lspace=\"thickmathspace\" rspace=\"thickmathspace\"]{mod}"],
|
|
4163
|
+
pmod: [
|
|
4164
|
+
"Macro",
|
|
4165
|
+
"\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}",
|
|
4166
|
+
1
|
|
4167
|
+
],
|
|
4168
|
+
mod: [
|
|
4169
|
+
"Macro",
|
|
4170
|
+
"\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1",
|
|
4171
|
+
1
|
|
4172
|
+
],
|
|
4173
|
+
pod: [
|
|
4174
|
+
"Macro",
|
|
4175
|
+
"\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)",
|
|
4176
|
+
1
|
|
4177
|
+
],
|
|
4178
|
+
iff: ["Macro", "\\;\\Longleftrightarrow\\;"],
|
|
4179
|
+
skew: [
|
|
4180
|
+
"Macro",
|
|
4181
|
+
"{{#2{#3\\mkern#1mu}\\mkern-#1mu}{}}",
|
|
4182
|
+
3
|
|
4183
|
+
],
|
|
4184
|
+
pmb: [
|
|
4185
|
+
"Macro",
|
|
4186
|
+
"\\rlap{#1}\\kern1px{#1}",
|
|
4187
|
+
1
|
|
4188
|
+
],
|
|
4189
|
+
TeX: ["Macro", "T\\kern-.14em\\lower.5ex{E}\\kern-.115em X"],
|
|
4190
|
+
LaTeX: ["Macro", "L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX"],
|
|
4191
|
+
" ": ["Macro", "\\text{ }"],
|
|
4192
|
+
not: "Not",
|
|
4193
|
+
dots: "Dots",
|
|
4194
|
+
space: "Tilde",
|
|
4195
|
+
"\xA0": "Tilde",
|
|
4196
|
+
begin: "BeginEnd",
|
|
4197
|
+
end: "BeginEnd",
|
|
4198
|
+
label: "HandleLabel",
|
|
4199
|
+
ref: "HandleRef",
|
|
4200
|
+
nonumber: "HandleNoTag",
|
|
4201
|
+
mathchoice: "MathChoice",
|
|
4202
|
+
mmlToken: "MmlToken"
|
|
4203
|
+
}, c.default), new o.EnvironmentMap("environment", u.default.environment, {
|
|
4204
|
+
array: ["AlignedArray"],
|
|
4205
|
+
equation: [
|
|
4206
|
+
"Equation",
|
|
4207
|
+
null,
|
|
4208
|
+
!0
|
|
4209
|
+
],
|
|
4210
|
+
eqnarray: [
|
|
4211
|
+
"EqnArray",
|
|
4212
|
+
null,
|
|
4213
|
+
!0,
|
|
4214
|
+
!0,
|
|
4215
|
+
"rcl",
|
|
4216
|
+
d.default.cols(0, m.MATHSPACE.thickmathspace),
|
|
4217
|
+
".5em"
|
|
4218
|
+
]
|
|
4219
|
+
}, c.default), new o.CharacterMap("not_remap", null, {
|
|
4220
|
+
"←": "↚",
|
|
4221
|
+
"→": "↛",
|
|
4222
|
+
"↔": "↮",
|
|
4223
|
+
"⇐": "⇍",
|
|
4224
|
+
"⇒": "⇏",
|
|
4225
|
+
"⇔": "⇎",
|
|
4226
|
+
"∈": "∉",
|
|
4227
|
+
"∋": "∌",
|
|
4228
|
+
"∣": "∤",
|
|
4229
|
+
"∥": "∦",
|
|
4230
|
+
"∼": "≁",
|
|
4231
|
+
"~": "≁",
|
|
4232
|
+
"≃": "≄",
|
|
4233
|
+
"≅": "≇",
|
|
4234
|
+
"≈": "≉",
|
|
4235
|
+
"≍": "≭",
|
|
4236
|
+
"=": "≠",
|
|
4237
|
+
"≡": "≢",
|
|
4238
|
+
"<": "≮",
|
|
4239
|
+
">": "≯",
|
|
4240
|
+
"≤": "≰",
|
|
4241
|
+
"≥": "≱",
|
|
4242
|
+
"≲": "≴",
|
|
4243
|
+
"≳": "≵",
|
|
4244
|
+
"≶": "≸",
|
|
4245
|
+
"≷": "≹",
|
|
4246
|
+
"≺": "⊀",
|
|
4247
|
+
"≻": "⊁",
|
|
4248
|
+
"⊂": "⊄",
|
|
4249
|
+
"⊃": "⊅",
|
|
4250
|
+
"⊆": "⊈",
|
|
4251
|
+
"⊇": "⊉",
|
|
4252
|
+
"⊢": "⊬",
|
|
4253
|
+
"⊨": "⊭",
|
|
4254
|
+
"⊩": "⊮",
|
|
4255
|
+
"⊫": "⊯",
|
|
4256
|
+
"≼": "⋠",
|
|
4257
|
+
"≽": "⋡",
|
|
4258
|
+
"⊑": "⋢",
|
|
4259
|
+
"⊒": "⋣",
|
|
4260
|
+
"⊲": "⋪",
|
|
4261
|
+
"⊳": "⋫",
|
|
4262
|
+
"⊴": "⋬",
|
|
4263
|
+
"⊵": "⋭",
|
|
4264
|
+
"∃": "∄"
|
|
4265
|
+
});
|
|
4266
|
+
})), k = /* @__PURE__ */ e(((e) => {
|
|
4267
|
+
var t = e && e.__extends || (function() {
|
|
4268
|
+
var e = function(t, n) {
|
|
4269
|
+
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
4270
|
+
e.__proto__ = t;
|
|
4271
|
+
} || function(e, t) {
|
|
4272
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
4273
|
+
}, e(t, n);
|
|
4274
|
+
};
|
|
4275
|
+
return function(t, n) {
|
|
4276
|
+
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
4277
|
+
e(t, n);
|
|
4278
|
+
function r() {
|
|
4279
|
+
this.constructor = t;
|
|
4280
|
+
}
|
|
4281
|
+
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
4282
|
+
};
|
|
4283
|
+
})(), n = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
4284
|
+
r === void 0 && (r = n);
|
|
4285
|
+
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
4286
|
+
(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
|
|
4287
|
+
enumerable: !0,
|
|
4288
|
+
get: function() {
|
|
4289
|
+
return t[n];
|
|
4290
|
+
}
|
|
4291
|
+
}), Object.defineProperty(e, r, i);
|
|
4292
|
+
}) : (function(e, t, n, r) {
|
|
4293
|
+
r === void 0 && (r = n), e[r] = t[n];
|
|
4294
|
+
})), r = e && e.__setModuleDefault || (Object.create ? (function(e, t) {
|
|
4295
|
+
Object.defineProperty(e, "default", {
|
|
4296
|
+
enumerable: !0,
|
|
4297
|
+
value: t
|
|
4298
|
+
});
|
|
4299
|
+
}) : function(e, t) {
|
|
4300
|
+
e.default = t;
|
|
4301
|
+
}), i = e && e.__importStar || function(e) {
|
|
4302
|
+
if (e && e.__esModule) return e;
|
|
4303
|
+
var t = {};
|
|
4304
|
+
if (e != null) for (var i in e) i !== "default" && Object.prototype.hasOwnProperty.call(e, i) && n(t, e, i);
|
|
4305
|
+
return r(t, e), t;
|
|
4306
|
+
}, a = e && e.__values || function(e) {
|
|
4307
|
+
var t = typeof Symbol == "function" && Symbol.iterator, n = t && e[t], r = 0;
|
|
4308
|
+
if (n) return n.call(e);
|
|
4309
|
+
if (e && typeof e.length == "number") return { next: function() {
|
|
4310
|
+
return e && r >= e.length && (e = void 0), {
|
|
4311
|
+
value: e && e[r++],
|
|
4312
|
+
done: !e
|
|
4313
|
+
};
|
|
4314
|
+
} };
|
|
4315
|
+
throw TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
4316
|
+
}, s = e && e.__importDefault || function(e) {
|
|
4317
|
+
return e && e.__esModule ? e : { default: e };
|
|
4318
|
+
}, c;
|
|
4319
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.BaseConfiguration = e.BaseTags = e.Other = void 0;
|
|
4320
|
+
var l = x(), f = b(), p = s(d()), m = s(u()), h = C(), g = i(w()), _ = y();
|
|
4321
|
+
O();
|
|
4322
|
+
var v = o();
|
|
4323
|
+
new h.CharacterMap("remap", null, {
|
|
4324
|
+
"-": "−",
|
|
4325
|
+
"*": "∗",
|
|
4326
|
+
"`": "‘"
|
|
4327
|
+
});
|
|
4328
|
+
function S(e, t) {
|
|
4329
|
+
var n = e.stack.env.font ? { mathvariant: e.stack.env.font } : {}, r = f.MapHandler.getMap("remap").lookup(t), i = (0, v.getRange)(t), a = i ? i[3] : "mo", o = e.create("token", a, n, r ? r.char : t);
|
|
4330
|
+
i[4] && o.attributes.set("mathvariant", i[4]), a === "mo" && (m.default.setProperty(o, "fixStretchy", !0), e.configuration.addNode("fixStretchy", o)), e.Push(o);
|
|
4331
|
+
}
|
|
4332
|
+
e.Other = S;
|
|
4333
|
+
function T(e, t) {
|
|
4334
|
+
throw new p.default("UndefinedControlSequence", "Undefined control sequence %1", "\\" + t);
|
|
4335
|
+
}
|
|
4336
|
+
function E(e, t) {
|
|
4337
|
+
throw new p.default("UnknownEnv", "Unknown environment '%1'", t);
|
|
4338
|
+
}
|
|
4339
|
+
function D(e) {
|
|
4340
|
+
var t, n, r = e.data;
|
|
4341
|
+
try {
|
|
4342
|
+
for (var i = a(r.getList("nonscript")), o = i.next(); !o.done; o = i.next()) {
|
|
4343
|
+
var s = o.value;
|
|
4344
|
+
if (s.attributes.get("scriptlevel") > 0) {
|
|
4345
|
+
var c = s.parent;
|
|
4346
|
+
if (c.childNodes.splice(c.childIndex(s), 1), r.removeFromList(s.kind, [s]), s.isKind("mrow")) {
|
|
4347
|
+
var l = s.childNodes[0];
|
|
4348
|
+
r.removeFromList("mstyle", [l]), r.removeFromList("mspace", l.childNodes[0].childNodes);
|
|
4349
|
+
}
|
|
4350
|
+
} else s.isKind("mrow") && (s.parent.replaceChild(s.childNodes[0], s), r.removeFromList("mrow", [s]));
|
|
4351
|
+
}
|
|
4352
|
+
} catch (e) {
|
|
4353
|
+
t = { error: e };
|
|
4354
|
+
} finally {
|
|
4355
|
+
try {
|
|
4356
|
+
o && !o.done && (n = i.return) && n.call(i);
|
|
4357
|
+
} finally {
|
|
4358
|
+
if (t) throw t.error;
|
|
4359
|
+
}
|
|
4360
|
+
}
|
|
4361
|
+
}
|
|
4362
|
+
var k = function(e) {
|
|
4363
|
+
t(n, e);
|
|
4364
|
+
function n() {
|
|
4365
|
+
return e !== null && e.apply(this, arguments) || this;
|
|
4366
|
+
}
|
|
4367
|
+
return n;
|
|
4368
|
+
}(_.AbstractTags);
|
|
4369
|
+
e.BaseTags = k, e.BaseConfiguration = l.Configuration.create("base", {
|
|
4370
|
+
handler: {
|
|
4371
|
+
character: [
|
|
4372
|
+
"command",
|
|
4373
|
+
"special",
|
|
4374
|
+
"letter",
|
|
4375
|
+
"digit"
|
|
4376
|
+
],
|
|
4377
|
+
delimiter: ["delimiter"],
|
|
4378
|
+
macro: [
|
|
4379
|
+
"delimiter",
|
|
4380
|
+
"macros",
|
|
4381
|
+
"mathchar0mi",
|
|
4382
|
+
"mathchar0mo",
|
|
4383
|
+
"mathchar7"
|
|
4384
|
+
],
|
|
4385
|
+
environment: ["environment"]
|
|
4386
|
+
},
|
|
4387
|
+
fallback: {
|
|
4388
|
+
character: S,
|
|
4389
|
+
macro: T,
|
|
4390
|
+
environment: E
|
|
4391
|
+
},
|
|
4392
|
+
items: (c = {}, c[g.StartItem.prototype.kind] = g.StartItem, c[g.StopItem.prototype.kind] = g.StopItem, c[g.OpenItem.prototype.kind] = g.OpenItem, c[g.CloseItem.prototype.kind] = g.CloseItem, c[g.PrimeItem.prototype.kind] = g.PrimeItem, c[g.SubsupItem.prototype.kind] = g.SubsupItem, c[g.OverItem.prototype.kind] = g.OverItem, c[g.LeftItem.prototype.kind] = g.LeftItem, c[g.Middle.prototype.kind] = g.Middle, c[g.RightItem.prototype.kind] = g.RightItem, c[g.BeginItem.prototype.kind] = g.BeginItem, c[g.EndItem.prototype.kind] = g.EndItem, c[g.StyleItem.prototype.kind] = g.StyleItem, c[g.PositionItem.prototype.kind] = g.PositionItem, c[g.CellItem.prototype.kind] = g.CellItem, c[g.MmlItem.prototype.kind] = g.MmlItem, c[g.FnItem.prototype.kind] = g.FnItem, c[g.NotItem.prototype.kind] = g.NotItem, c[g.NonscriptItem.prototype.kind] = g.NonscriptItem, c[g.DotsItem.prototype.kind] = g.DotsItem, c[g.ArrayItem.prototype.kind] = g.ArrayItem, c[g.EqnArrayItem.prototype.kind] = g.EqnArrayItem, c[g.EquationItem.prototype.kind] = g.EquationItem, c),
|
|
4393
|
+
options: {
|
|
4394
|
+
maxMacros: 1e3,
|
|
4395
|
+
baseURL: typeof document > "u" || document.getElementsByTagName("base").length === 0 ? "" : String(document.location).replace(/#.*$/, "")
|
|
4396
|
+
},
|
|
4397
|
+
tags: { base: k },
|
|
4398
|
+
postprocessors: [[D, -4]]
|
|
4399
|
+
});
|
|
4400
|
+
}));
|
|
4401
|
+
//#endregion
|
|
4402
|
+
export { u as _, w as a, x as c, _ as d, h as f, d as g, f as h, T as i, y as l, p as m, D as n, C as o, m as p, E as r, S as s, k as t, v as u };
|