diff --git "a/src/backend/gradio_motioncanvasplayer/templates/component/index.js" "b/src/backend/gradio_motioncanvasplayer/templates/component/index.js"
new file mode 100644--- /dev/null
+++ "b/src/backend/gradio_motioncanvasplayer/templates/component/index.js"
@@ -0,0 +1,20398 @@
+var Yo = Object.defineProperty;
+var ci = (n) => {
+ throw TypeError(n);
+};
+var Xo = (n, e, t) => e in n ? Yo(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
+var pe = (n, e, t) => Xo(n, typeof e != "symbol" ? e + "" : e, t), Zo = (n, e, t) => e.has(n) || ci("Cannot " + t);
+var hi = (n, e, t) => e.has(n) ? ci("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t);
+var _r = (n, e, t) => (Zo(n, e, "access private method"), t);
+class an {
+ constructor() {
+ this.subscribable = new al(this), this.subscribers = /* @__PURE__ */ new Set();
+ }
+ /**
+ * {@inheritDoc Subscribable.subscribe}
+ */
+ subscribe(e) {
+ return this.subscribers.add(e), () => this.unsubscribe(e);
+ }
+ /**
+ * {@inheritDoc Subscribable.unsubscribe}
+ */
+ unsubscribe(e) {
+ this.subscribers.delete(e);
+ }
+ /**
+ * Unsubscribe all subscribers from the event.
+ */
+ clear() {
+ this.subscribers.clear();
+ }
+ notifySubscribers(e) {
+ return [...this.subscribers].map((t) => t(e));
+ }
+}
+class al {
+ constructor(e) {
+ this.dispatcher = e;
+ }
+ /**
+ * Subscribe to the event.
+ *
+ * @param handler - The handler to invoke when the event occurs.
+ *
+ * @returns A callback function that cancels the subscription.
+ */
+ subscribe(e) {
+ return this.dispatcher.subscribe(e);
+ }
+ /**
+ * Unsubscribe from the event.
+ *
+ * @param handler - The handler to unsubscribe.
+ */
+ unsubscribe(e) {
+ this.dispatcher.unsubscribe(e);
+ }
+}
+class Ko extends an {
+ async dispatch(e) {
+ await Promise.all(this.notifySubscribers(e));
+ }
+}
+class Qo extends an {
+ dispatch(e) {
+ this.notifySubscribers(e);
+ }
+}
+class Jo extends an {
+ constructor() {
+ super(...arguments), this.value = !1;
+ }
+ /**
+ * Notify all current and future subscribers.
+ */
+ raise() {
+ this.value || (this.value = !0, this.notifySubscribers());
+ }
+ /**
+ * Stop notifying future subscribers.
+ */
+ reset() {
+ this.value = !1;
+ }
+ /**
+ * Are subscribers being notified?
+ */
+ isRaised() {
+ return this.value;
+ }
+ subscribe(e) {
+ const t = super.subscribe(e);
+ return this.value && e(), t;
+ }
+}
+class g0 extends an {
+ /**
+ * {@inheritDoc SubscribableValueEvent.current}
+ */
+ get current() {
+ return this.value;
+ }
+ /**
+ * Set the current value of this dispatcher.
+ *
+ * @remarks
+ * Setting the value will immediately notify all subscribers.
+ *
+ * @param value - The new value.
+ */
+ set current(e) {
+ this.value = e, this.notifySubscribers(e);
+ }
+ /**
+ * @param value - The initial value.
+ */
+ constructor(e) {
+ super(), this.value = e, this.subscribable = new eu(this);
+ }
+ /**
+ * {@inheritDoc SubscribableValueEvent.subscribe}
+ */
+ subscribe(e, t = !0) {
+ const r = super.subscribe(e);
+ return t && e(this.value), r;
+ }
+}
+class eu extends al {
+ /**
+ * Get the most recent value of this dispatcher.
+ */
+ get current() {
+ return this.dispatcher.current;
+ }
+ /**
+ * Subscribe to the event.
+ *
+ * Subscribing will immediately invoke the handler with the most recent value.
+ *
+ * @param handler - The handler to invoke when the event occurs.
+ * @param dispatchImmediately - Whether the handler should be immediately
+ * invoked with the most recent value.
+ *
+ * @returns Callback function that cancels the subscription.
+ */
+ subscribe(e, t = !0) {
+ return this.dispatcher.subscribe(e, t);
+ }
+}
+class il extends Error {
+ constructor(e, t) {
+ typeof e == "string" ? (super(e), this.remarks = t) : (super(e.message), this.remarks = e.remarks, this.object = e.object, this.durationMs = e.durationMs, this.inspect = e.inspect);
+ }
+}
+class tu {
+ constructor() {
+ this.resolveCurrent = null, this.current = null;
+ }
+ async acquire() {
+ for (; this.current; )
+ await this.current;
+ this.current = new Promise((e) => {
+ this.resolveCurrent = e;
+ });
+ }
+ release() {
+ var e;
+ this.current = null, (e = this.resolveCurrent) == null || e.call(this), this.resolveCurrent = null;
+ }
+}
+const sl = [];
+function ru() {
+ const n = sl.at(-1);
+ if (!n)
+ throw new Error("The scene is not available in the current context.");
+ return n;
+}
+function ll() {
+ var n;
+ return ((n = sl.at(-1)) == null ? void 0 : n.logger) ?? console;
+}
+const nu = [];
+function va() {
+ const n = nu.at(-1);
+ if (!n)
+ throw new il("The thread is not available in the current context.", `
useThread() can only be called from within generator functions.
+ It's not available during rendering.
+`);
+ return n;
+}
+function au(n) {
+ return {
+ message: n.message,
+ stack: n.stack,
+ remarks: n.remarks
+ };
+}
+var q0;
+(function(n) {
+ n[n.Playing = 0] = "Playing", n[n.Rendering = 1] = "Rendering", n[n.Paused = 2] = "Paused", n[n.Presenting = 3] = "Presenting";
+})(q0 || (q0 = {}));
+class iu {
+ constructor() {
+ this.frame = 0, this.speed = 1, this.fps = 30, this.duration = 0, this.finished = !1, this.slides = [], this.previousScene = null, this.state = q0.Paused, this.currentSceneReference = null, this.scenes = new g0([]);
+ }
+ /**
+ * Triggered when the active scene changes.
+ *
+ * @eventProperty
+ */
+ get onSceneChanged() {
+ if (this.currentSceneReference === null)
+ throw new Error("PlaybackManager has not been properly initialized");
+ return this.currentSceneReference.subscribable;
+ }
+ /**
+ * Triggered when the scenes get recalculated.
+ *
+ * @remarks
+ * This event indicates that the timing of at least one scene has changed.
+ *
+ * @eventProperty
+ */
+ get onScenesRecalculated() {
+ return this.scenes.subscribable;
+ }
+ get currentScene() {
+ if (this.currentSceneReference === null)
+ throw new Error("PlaybackManager has not been properly initialized");
+ return this.currentSceneReference.current;
+ }
+ set currentScene(e) {
+ if (!e)
+ throw new Error("Invalid scene.");
+ this.currentSceneReference ?? (this.currentSceneReference = new g0(e)), this.currentSceneReference.current = e;
+ }
+ setup(e) {
+ this.scenes.current = e, this.currentScene = e[0];
+ }
+ async progress() {
+ return this.finished = await this.next(), this.finished;
+ }
+ async seek(e) {
+ if (e <= this.frame || this.currentScene.isCached() && this.currentScene.lastFrame < e) {
+ const t = this.findBestScene(e);
+ t !== this.currentScene ? (this.previousScene = null, this.currentScene = t, this.frame = this.currentScene.firstFrame, await this.currentScene.reset()) : this.frame >= e && (this.previousScene = null, this.frame = this.currentScene.firstFrame, await this.currentScene.reset());
+ }
+ for (this.finished = !1; this.frame < e && !this.finished; )
+ this.finished = await this.next();
+ return this.finished;
+ }
+ async goBack() {
+ let e = this.currentScene.slides.getCurrent();
+ if (e && this.currentScene.slides.isWaiting()) {
+ const t = this.slides.indexOf(e);
+ e = this.slides[t - 1];
+ }
+ await this.seekSlide(e);
+ }
+ async goForward() {
+ const e = this.currentScene.slides.getCurrent(), t = this.slides.indexOf(e);
+ await this.seekSlide(this.slides[t + 1]);
+ }
+ async goTo(e) {
+ await this.seekSlide(this.slides.find((t) => t.id === e));
+ }
+ async seekSlide(e = null) {
+ if (!e)
+ return;
+ const { id: t, scene: r } = e;
+ for ((this.currentScene !== r || this.currentScene.slides.didHappen(t)) && (this.previousScene = null, this.currentScene = r, this.frame = this.currentScene.firstFrame, this.currentScene.slides.setTarget(t), await this.currentScene.reset()), this.finished = !1, this.currentScene.slides.setTarget(t); !this.currentScene.slides.isWaitingFor(t) && !this.finished; )
+ this.finished = await this.next();
+ return this.currentScene.slides.setTarget(null), this.finished;
+ }
+ async reset() {
+ this.previousScene = null, this.currentScene = this.scenes.current[0], this.frame = 0, this.finished = !1, await this.currentScene.reset();
+ }
+ reload(e) {
+ this.scenes.current.forEach((t) => t.reload(e));
+ }
+ async recalculate() {
+ this.previousScene = null, this.slides = [];
+ const e = this.speed;
+ this.frame = 0, this.speed = 1;
+ const t = [];
+ try {
+ for (const r of this.scenes.current)
+ await r.recalculate((a) => {
+ this.frame = a;
+ }), this.slides.push(...r.slides.onChanged.current), t.push(r);
+ } finally {
+ this.speed = e;
+ }
+ this.scenes.current = t, this.duration = this.frame;
+ }
+ async next() {
+ if (this.previousScene && (await this.previousScene.next(), this.currentScene.isFinished() && (this.previousScene = null)), this.frame += this.speed, this.currentScene.isFinished())
+ return !0;
+ if (await this.currentScene.next(), this.previousScene && this.currentScene.isAfterTransitionIn() && (this.previousScene = null), this.currentScene.canTransitionOut()) {
+ this.previousScene = this.currentScene;
+ const e = this.getNextScene(this.previousScene);
+ e && (this.currentScene = e, await this.currentScene.reset(this.previousScene)), (!e || this.currentScene.isAfterTransitionIn()) && (this.previousScene = null);
+ }
+ return this.currentScene.isFinished();
+ }
+ findBestScene(e) {
+ let t = this.scenes.current[0];
+ for (const r of this.scenes.current) {
+ if (!r.isCached() || r.lastFrame > e)
+ return r;
+ t = r;
+ }
+ return t;
+ }
+ getNextScene(e) {
+ const t = this.scenes.current;
+ if (!e)
+ return t[0];
+ const r = t.findIndex((a) => a === e);
+ return r < 0 ? null : t[r + 1] ?? null;
+ }
+}
+class su {
+ constructor(e) {
+ this.playback = e;
+ }
+ /**
+ * Convert seconds to frames using the current framerate.
+ *
+ * @param seconds - The seconds to convert.
+ */
+ secondsToFrames(e) {
+ return Math.ceil(e * this.playback.fps);
+ }
+ /**
+ * Convert frames to seconds using the current framerate.
+ *
+ * @param frames - The frames to convert.
+ */
+ framesToSeconds(e) {
+ return e / this.playback.fps;
+ }
+ get time() {
+ return this.framesToSeconds(this.playback.frame);
+ }
+ get frame() {
+ return this.playback.frame;
+ }
+ get speed() {
+ return this.playback.speed;
+ }
+ get fps() {
+ return this.playback.fps;
+ }
+ get state() {
+ return this.playback.state;
+ }
+ /**
+ * The time passed since the last frame in seconds.
+ */
+ get deltaTime() {
+ return this.framesToSeconds(1) * this.speed;
+ }
+}
+class lu {
+ get onDataChanged() {
+ return this.data.subscribable;
+ }
+ constructor(e) {
+ this.logger = e, this.data = new g0(null), this.context = new AudioContext(), this.audioElement = new Audio(), this.source = null, this.error = !1, this.abortController = null, this.offset = 0;
+ }
+ getTime() {
+ return this.toAbsoluteTime(this.audioElement.currentTime);
+ }
+ setTime(e) {
+ this.audioElement.currentTime = this.toRelativeTime(e);
+ }
+ setOffset(e) {
+ this.offset = e;
+ }
+ setMuted(e) {
+ this.audioElement.muted = e;
+ }
+ setVolume(e) {
+ this.audioElement.volume = e;
+ }
+ setSource(e) {
+ var t;
+ this.source = e, this.audioElement.src = e, (t = this.abortController) == null || t.abort(), this.abortController = new AbortController(), this.loadData(this.abortController.signal).catch((r) => {
+ r.name !== "AbortError" && this.logger.error(r);
+ });
+ }
+ isInRange(e) {
+ return e >= this.offset && e < this.audioElement.duration;
+ }
+ toRelativeTime(e) {
+ return Math.max(0, e - this.offset);
+ }
+ toAbsoluteTime(e) {
+ return e + this.offset;
+ }
+ isReady() {
+ return this.source && !this.error;
+ }
+ /**
+ * Pause/resume the audio.
+ *
+ * @param isPaused - Whether the audio should be paused or resumed.
+ *
+ * @returns `true` if the audio successfully started playing.
+ */
+ async setPaused(e) {
+ if (this.source && this.audioElement.paused !== e)
+ if (e)
+ this.audioElement.pause();
+ else
+ try {
+ return await this.audioElement.play(), this.error = !1, !0;
+ } catch (t) {
+ this.error || ll().error(t), this.error = !0;
+ }
+ return !1;
+ }
+ async loadData(e) {
+ if (this.data.current = null, !this.source)
+ return;
+ const r = await (await fetch(this.source, { signal: e })).arrayBuffer();
+ if (e.aborted)
+ return;
+ let a;
+ try {
+ a = await this.decodeAudioData(r);
+ } catch {
+ return;
+ }
+ if (e.aborted)
+ return;
+ const i = 256, s = ~~(a.length / i), l = [];
+ let u = 0;
+ for (let h = 0; h < a.numberOfChannels; h++) {
+ const d = a.getChannelData(h);
+ for (let f = 0; f < s; f++) {
+ const p = ~~(f * i), v = ~~(p + i);
+ let w = d[p], D = w;
+ for (let C = p; C < v; C++) {
+ const $ = d[C];
+ $ > D && (D = $), $ < w && (w = $);
+ }
+ (h === 0 || D > l[f * 2]) && (l[f * 2] = D), (h === 0 || w < l[f * 2 + 1]) && (l[f * 2 + 1] = w), D > u && (u = D), Math.abs(w) > u && (u = Math.abs(w));
+ }
+ }
+ this.data.current = {
+ peaks: l,
+ absoluteMax: u,
+ length: s,
+ sampleRate: a.sampleRate / i * 2
+ };
+ }
+ decodeAudioData(e) {
+ return new Promise((t, r) => this.context.decodeAudioData(e, t, r).catch(r));
+ }
+}
+class ou {
+ get onChanged() {
+ return this.events.subscribable;
+ }
+ constructor(e) {
+ this.scene = e, this.events = new g0([]), this.registeredEvents = /* @__PURE__ */ new Map(), this.lookup = /* @__PURE__ */ new Map(), this.collisionLookup = /* @__PURE__ */ new Set(), this.previousReference = [], this.didEventsChange = !1, this.preserveTiming = !0, this.handleReload = () => {
+ this.registeredEvents.clear(), this.collisionLookup.clear();
+ }, this.handleRecalculated = () => {
+ var t;
+ this.preserveTiming = !0, this.events.current = [...this.registeredEvents.values()], (this.didEventsChange || (((t = this.previousReference) == null ? void 0 : t.length) ?? 0) !== this.events.current.length) && (this.didEventsChange = !1, this.previousReference = [...this.registeredEvents.values()].map((r) => ({
+ name: r.name,
+ targetTime: r.targetTime
+ })), this.scene.meta.timeEvents.set(this.previousReference));
+ }, this.handleReset = () => {
+ this.collisionLookup.clear();
+ }, this.handleMetaChanged = (t) => {
+ t !== this.previousReference && (this.previousReference = t, this.load(t), this.scene.reload());
+ }, this.previousReference = e.meta.timeEvents.get(), this.load(this.previousReference), e.onReloaded.subscribe(this.handleReload), e.onRecalculated.subscribe(this.handleRecalculated), e.onReset.subscribe(this.handleReset), e.meta.timeEvents.onChanged.subscribe(this.handleMetaChanged, !1);
+ }
+ set(e, t, r = !0) {
+ let a = this.lookup.get(e);
+ !a || a.offset === t || (this.preserveTiming = r, a = {
+ ...a,
+ targetTime: a.initialTime + t,
+ offset: t
+ }, this.lookup.set(e, a), this.registeredEvents.set(e, a), this.events.current = [...this.registeredEvents.values()], this.didEventsChange = !0, this.scene.reload());
+ }
+ register(e, t) {
+ if (this.collisionLookup.has(e))
+ return this.scene.logger.error({
+ message: `name "${e}" has already been used for another event name.`,
+ stack: new Error().stack
+ }), 0;
+ this.collisionLookup.add(e);
+ let r = this.lookup.get(e);
+ if (!r)
+ this.didEventsChange = !0, r = {
+ name: e,
+ initialTime: t,
+ targetTime: t,
+ offset: 0,
+ stack: new Error().stack
+ }, this.lookup.set(e, r);
+ else {
+ let a = !1;
+ const i = { ...r }, s = new Error().stack;
+ i.stack !== s && (i.stack = s, a = !0), i.initialTime !== t && (i.initialTime = t, a = !0);
+ const l = Math.max(0, i.targetTime - i.initialTime);
+ this.preserveTiming && i.offset !== l && (i.offset = l, a = !0);
+ const u = i.initialTime + i.offset;
+ !this.preserveTiming && i.targetTime !== u && (this.didEventsChange = !0, i.targetTime = u, a = !0), a && (r = i, this.lookup.set(e, r));
+ }
+ return this.registeredEvents.set(e, r), r.offset;
+ }
+ load(e) {
+ for (const t of e) {
+ if (typeof t.name != "string")
+ continue;
+ const r = this.lookup.get(t.name) ?? {
+ name: t.name,
+ initialTime: 0,
+ offset: 0
+ };
+ this.lookup.set(t.name, {
+ ...r,
+ targetTime: t.targetTime ?? 0
+ });
+ }
+ }
+}
+const di = /^\/\/# sourceURL=(.*)$/gm, uu = /ERROR: \d+:(\d+): (.*)/g, cu = /^'([^']+)'/;
+class hu {
+ constructor(e) {
+ this.logger = e, this.gl = null, this.currentOwner = null, this.programLookup = /* @__PURE__ */ new Map();
+ }
+ borrow(e) {
+ var t;
+ return this.currentOwner === e ? this.gl : ((t = this.currentOwner) == null || t.teardown(this.gl), this.currentOwner = e, this.currentOwner.setup(this.getGL()), this.gl);
+ }
+ /**
+ * Dispose the WebGL context to free up resources.
+ */
+ dispose() {
+ var e, t;
+ if (this.gl) {
+ (e = this.currentOwner) == null || e.teardown(this.gl), this.currentOwner = null, this.gl.useProgram(null);
+ for (const { program: r, fragment: a, vertex: i } of this.programLookup.values())
+ this.gl.deleteProgram(r), this.gl.deleteShader(a), this.gl.deleteShader(i);
+ this.programLookup.clear(), (t = this.gl.getExtension("WEBGL_lose_context")) == null || t.loseContext(), this.gl.canvas.remove(), this.gl = null;
+ }
+ }
+ getProgram(e, t) {
+ const r = `${e}#${t}`;
+ if (this.programLookup.has(r))
+ return this.programLookup.get(r).program;
+ const a = this.getGL(), i = this.getShader(a.FRAGMENT_SHADER, e), s = this.getShader(a.VERTEX_SHADER, t);
+ if (!i || !s)
+ return null;
+ const l = a.createProgram();
+ return a.attachShader(l, i), a.attachShader(l, s), a.linkProgram(l), a.getProgramParameter(l, a.LINK_STATUS) ? (this.programLookup.set(r, {
+ program: l,
+ fragment: i,
+ vertex: s
+ }), l) : (this.logger.error({
+ message: "Failed to initialize the shader program.",
+ remarks: a.getProgramInfoLog(l) ?? void 0,
+ stack: new Error().stack
+ }), a.deleteProgram(l), null);
+ }
+ getShader(e, t) {
+ const r = this.getGL(), a = r.createShader(e);
+ if (r.shaderSource(a, t), r.compileShader(a), !r.getShaderParameter(a, r.COMPILE_STATUS)) {
+ const i = r.getShaderInfoLog(a);
+ return du(this.logger, i, t), r.deleteShader(a), null;
+ }
+ return a;
+ }
+ getGL() {
+ if (this.gl)
+ return this.gl;
+ if (this.gl = document.createElement("canvas").getContext("webgl2", {
+ depth: !1,
+ premultipliedAlpha: !1,
+ stencil: !1,
+ powerPreference: "high-performance"
+ }), !this.gl)
+ throw new Error("Failed to initialize WebGL.");
+ return this.gl;
+ }
+}
+function du(n, e, t) {
+ let r = null;
+ di.lastIndex = 0;
+ const a = di.exec(t);
+ if (a) {
+ const l = new URL(a[1], window.location.origin);
+ l.searchParams.set("t", Date.now().toString()), r = l.toString();
+ }
+ if (!e)
+ return n.error({
+ message: "Unknown shader compilation error.",
+ stack: wn(r, 1, 0)
+ }), null;
+ let i = !1, s;
+ for (; s = uu.exec(e); ) {
+ const [, l, u] = s;
+ let h = 0;
+ const d = u.match(cu);
+ if (d) {
+ const p = t.split(`
+`)[parseInt(l) - 1].indexOf(d[1]);
+ if (p !== -1 && (h = p), d[1] === "include" && t.split(`
+`).find((w) => w.startsWith("#include"))) {
+ i = !0, n.error({
+ message: `Shader compilation error: ${u}`,
+ remarks: `The #include directive requires the use of a preprocessor.
+Make sure to import the shader from a file:
+import shader from './shader.glsl';
Do NOT use the raw loader:
+import shader from './shader.glsl?raw';
Do NOT use #include in an inline string:
+const shader = \`\\
+#include "example.glsl"
+\`;
Learn more about working with shaders.
+`
+ });
+ break;
+ }
+ }
+ i = !0, n.error({
+ message: `Shader compilation error: ${u}`,
+ stack: wn(r, l, h)
+ });
+ }
+ i || n.error({
+ message: `Shader compilation error: ${e}`,
+ stack: wn(r, 1, 0)
+ });
+}
+function wn(n, e, t) {
+ if (n)
+ return navigator.userAgent.toLowerCase().includes("chrome") ? ` at (${n}:${e}:${t})` : `@${n}:${e}:${t}`;
+}
+const mi = 1 / 50;
+class mu {
+ /**
+ * Triggered during each iteration of the update loop when the frame is ready
+ * to be rendered.
+ *
+ * @remarks
+ * Player does not perform any rendering on its own. For the animation to be
+ * visible, another class must subscribe to this event and perform the
+ * rendering itself. {@link Stage} can be used to display the animation.
+ *
+ * @eventProperty
+ */
+ get onRender() {
+ return this.render.subscribable;
+ }
+ get onStateChanged() {
+ return this.playerState.subscribable;
+ }
+ get onFrameChanged() {
+ return this.frame.subscribable;
+ }
+ get onDurationChanged() {
+ return this.duration.subscribable;
+ }
+ /**
+ * Triggered right after recalculation finishes.
+ *
+ * @remarks
+ * Can be used to provide visual feedback.
+ *
+ * @eventProperty
+ */
+ get onRecalculated() {
+ return this.recalculated.subscribable;
+ }
+ get startFrame() {
+ return Math.min(this.playback.duration, this.status.secondsToFrames(this.startTime));
+ }
+ get endFrame() {
+ return Math.min(this.playback.duration, this.status.secondsToFrames(this.endTime));
+ }
+ get finished() {
+ return this.playback.finished || this.playback.frame >= this.endFrame;
+ }
+ constructor(e, t = {}, r = {}, a = -1) {
+ var s, l, u;
+ this.project = e, this.settings = t, this.initialState = r, this.initialFrame = a, this.render = new Ko(), this.frame = new g0(0), this.duration = new g0(0), this.recalculated = new Qo(), this.lock = new tu(), this.startTime = 0, this.endTime = 1 / 0, this.requestId = null, this.renderTime = 0, this.requestedSeek = -1, this.requestedRender = !1, this.requestedRecalculation = !0, this.active = !1, this.playerState = new g0({
+ loop: !0,
+ muted: !0,
+ volume: 1,
+ speed: 1,
+ ...r,
+ paused: !0
+ }), this.sharedWebGLContext = new hu(this.project.logger), this.requestedSeek = a, this.logger = this.project.logger, this.playback = new iu(), this.status = new su(this.playback), this.audio = new lu(this.logger), this.size = t.size ?? new B(1920, 1080), this.resolutionScale = t.resolutionScale ?? 1, this.startTime = ((s = t.range) == null ? void 0 : s[0]) ?? 0, this.endTime = ((l = t.range) == null ? void 0 : l[1]) ?? 1 / 0, this.playback.fps = t.fps ?? 60, this.audio.setOffset(t.audioOffset ?? 0), e.audio && this.audio.setSource(e.audio);
+ const i = [];
+ for (const h of e.scenes) {
+ const d = new h.klass({
+ ...h,
+ playback: this.status,
+ logger: this.project.logger,
+ size: this.size,
+ resolutionScale: this.resolutionScale,
+ timeEventsClass: ou,
+ sharedWebGLContext: this.sharedWebGLContext,
+ experimentalFeatures: e.experimentalFeatures
+ });
+ (u = h.onReplaced) == null || u.subscribe((f) => {
+ d.reload(f);
+ }, !1), d.onReloaded.subscribe(() => this.requestRecalculation()), d.variables.updateSignals(e.variables ?? {}), i.push(d);
+ }
+ this.playback.setup(i), this.activate();
+ }
+ async configure(e) {
+ await this.lock.acquire();
+ let t = this.playback.frame, r = !1;
+ this.startTime = e.range[0], this.endTime = e.range[1];
+ const a = Math.max(1, e.fps);
+ if (this.playback.fps !== a) {
+ const i = a / this.playback.fps;
+ this.playback.fps = a, t = Math.floor(t * i), r = !0;
+ }
+ (!e.size.exactlyEquals(this.size) || e.resolutionScale !== this.resolutionScale) && (this.size = e.size, this.resolutionScale = e.resolutionScale, this.playback.reload({
+ size: this.size,
+ resolutionScale: this.resolutionScale
+ })), e.audioOffset !== void 0 && this.audio.setOffset(e.audioOffset), this.lock.release(), r && (this.playback.reload(), this.frame.current = t, this.requestRecalculation(), this.requestedSeek = t);
+ }
+ /**
+ * Whether the given frame is inside the animation range.
+ *
+ * @param frame - The frame to check.
+ */
+ isInRange(e) {
+ return e >= 0 && e <= this.playback.duration;
+ }
+ /**
+ * Whether the given frame is inside the user-defined range.
+ *
+ * @param frame - The frame to check.
+ */
+ isInUserRange(e) {
+ return e >= this.startFrame && e <= this.endFrame;
+ }
+ requestSeek(e) {
+ this.requestedSeek = this.clampRange(e);
+ }
+ requestPreviousFrame() {
+ this.requestedSeek = this.frame.current - this.playback.speed;
+ }
+ requestNextFrame() {
+ this.requestedSeek = this.frame.current + this.playback.speed;
+ }
+ requestReset() {
+ this.requestedSeek = 0;
+ }
+ requestRender() {
+ this.requestedRender = !0;
+ }
+ toggleLoop(e = !this.playerState.current.loop) {
+ e !== this.playerState.current.loop && (this.playerState.current = {
+ ...this.playerState.current,
+ loop: e
+ });
+ }
+ togglePlayback(e = this.playerState.current.paused) {
+ e === this.playerState.current.paused && (this.playerState.current = {
+ ...this.playerState.current,
+ paused: !e
+ }, e && !this.playerState.current.loop && this.playback.frame === this.playback.duration && this.requestReset());
+ }
+ toggleAudio(e = this.playerState.current.muted) {
+ e === this.playerState.current.muted && (this.playerState.current = {
+ ...this.playerState.current,
+ muted: !e
+ });
+ }
+ setAudioVolume(e) {
+ const t = Hr(0, 1, e);
+ t !== this.playerState.current.volume && (this.playerState.current = {
+ ...this.playerState.current,
+ volume: t
+ });
+ }
+ addAudioVolume(e) {
+ this.setAudioVolume(this.playerState.current.volume + e);
+ }
+ setSpeed(e) {
+ e !== this.playerState.current.speed && (this.playback.speed = e, this.playback.reload(), this.playerState.current = {
+ ...this.playerState.current,
+ speed: e
+ }, this.requestRecalculation());
+ }
+ setVariables(e) {
+ for (const t of this.playback.onScenesRecalculated.current)
+ t.variables.updateSignals(e);
+ }
+ /**
+ * Activate the player.
+ *
+ * @remarks
+ * A player needs to be active in order for the update loop to run. Each
+ * player is active by default.
+ */
+ activate() {
+ this.active = !0, this.request();
+ }
+ /**
+ * Deactivate the player.
+ *
+ * @remarks
+ * Deactivating the player prevents its update loop from running. This should
+ * be done before disposing the player, to prevent it from running in the
+ * background.
+ *
+ * Just pausing the player does not stop the loop.
+ */
+ deactivate() {
+ this.active = !1, this.sharedWebGLContext.dispose(), this.requestId !== null && (cancelAnimationFrame(this.requestId), this.requestId = null);
+ }
+ requestRecalculation() {
+ this.requestedRecalculation = !0, this.request();
+ }
+ async prepare() {
+ const e = {
+ ...this.playerState.current,
+ seek: this.requestedSeek,
+ render: this.requestedRender
+ };
+ if (this.requestedSeek = -1, this.requestedRender = !1, this.requestedRecalculation) {
+ e.seek < 0 && (e.seek = this.playback.frame);
+ try {
+ await this.playback.recalculate(), this.duration.current = this.playback.frame, this.recalculated.dispatch();
+ } catch (r) {
+ throw this.requestSeek(e.seek), r;
+ } finally {
+ this.requestedRecalculation = !1;
+ }
+ }
+ (!e.loop && this.finished && !e.paused && e.seek < 0 || this.endFrame === this.startFrame) && (this.togglePlayback(!1), e.paused = !0, e.seek = this.endFrame === this.startFrame ? e.seek : this.startFrame), e.loop && (e.seek > this.endFrame || this.finished && !e.paused) && this.startFrame !== this.endTime && (e.seek = this.startFrame);
+ const t = e.paused || this.finished || !this.audio.isInRange(this.status.time);
+ return await this.audio.setPaused(t) && this.syncAudio(-3), this.audio.setMuted(e.muted), this.audio.setVolume(e.volume), e;
+ }
+ async run() {
+ const e = await this.prepare(), t = this.playback.state;
+ if (this.playback.state = e.paused ? q0.Paused : q0.Playing, e.seek >= 0 || !this.isInUserRange(this.status.frame)) {
+ const r = e.seek < 0 ? this.status.frame : e.seek, a = this.clampRange(r);
+ this.logger.profile("seek time"), await this.playback.seek(a), this.logger.profile("seek time"), this.syncAudio(-3);
+ } else if (e.paused || e.speed === 1 && this.audio.isReady() && this.audio.isInRange(this.status.time) && this.audio.getTime() < this.status.time) {
+ (e.render || e.paused && t !== q0.Paused) && await this.render.dispatch(), !e.paused && this.status.time > this.audio.getTime() + mi && this.syncAudio(), this.request();
+ return;
+ } else if (this.audio.isReady() && e.speed === 1 && this.audio.isInRange(this.status.time) && this.status.framesToSeconds(this.playback.frame + 1) < this.audio.getTime() - mi) {
+ const r = this.status.secondsToFrames(this.audio.getTime());
+ await this.playback.seek(r);
+ } else this.status.frame < this.endFrame && (await this.playback.progress(), e.speed !== 1 && this.syncAudio());
+ !e.paused && this.playback.currentScene.slides.isWaiting() && (this.togglePlayback(!1), e.paused = !0), await this.render.dispatch(), this.frame.current = this.playback.frame, this.request();
+ }
+ request() {
+ this.active && (this.requestId ?? (this.requestId = requestAnimationFrame(async (e) => {
+ if (this.requestId = null, e - this.renderTime >= 1e3 / (this.status.fps + 5)) {
+ this.renderTime = e, await this.lock.acquire();
+ try {
+ await this.run();
+ } catch (t) {
+ this.logger.error(t);
+ }
+ this.lock.release();
+ } else
+ this.request();
+ })));
+ }
+ clampRange(e) {
+ return Hr(this.startFrame, this.endFrame, e);
+ }
+ syncAudio(e = 0) {
+ this.audio.setTime(this.status.framesToSeconds(this.playback.frame + e));
+ }
+}
+class fu {
+ get canvasSize() {
+ return this.size.scale(this.resolutionScale);
+ }
+ constructor() {
+ this.background = null, this.resolutionScale = 1, this.colorSpace = "srgb", this.size = B.zero, this.finalBuffer = document.createElement("canvas"), this.currentBuffer = document.createElement("canvas"), this.previousBuffer = document.createElement("canvas");
+ const e = this.colorSpace;
+ this.context = E0({ colorSpace: e }, this.finalBuffer), this.currentContext = E0({ colorSpace: e }, this.currentBuffer), this.previousContext = E0({ colorSpace: e }, this.previousBuffer);
+ }
+ configure({ colorSpace: e = this.colorSpace, size: t = this.size, resolutionScale: r = this.resolutionScale, background: a = this.background }) {
+ e !== this.colorSpace && (this.colorSpace = e, this.context = E0({ colorSpace: e }, this.finalBuffer), this.currentContext = E0({ colorSpace: e }, this.currentBuffer), this.previousContext = E0({ colorSpace: e }, this.previousBuffer)), (!t.exactlyEquals(this.size) || r !== this.resolutionScale) && (this.resolutionScale = r, this.size = t, this.resizeCanvas(this.context), this.resizeCanvas(this.currentContext), this.resizeCanvas(this.previousContext)), this.background = typeof a == "string" ? a : (a == null ? void 0 : a.serialize()) ?? null;
+ }
+ async render(e, t) {
+ const r = t ? ul(e.previousOnTop) : !1;
+ t && await t.render(this.previousContext), await e.render(this.currentContext);
+ const a = this.canvasSize;
+ this.context.clearRect(0, 0, a.width, a.height), this.background && (this.context.save(), this.context.fillStyle = this.background, this.context.fillRect(0, 0, a.width, a.height), this.context.restore()), t && !r && this.context.drawImage(this.previousBuffer, 0, 0), this.context.drawImage(this.currentBuffer, 0, 0), r && this.context.drawImage(this.previousBuffer, 0, 0);
+ }
+ resizeCanvas(e) {
+ const t = this.canvasSize;
+ e.canvas.width = t.width, e.canvas.height = t.height;
+ }
+}
+function E0(n, e = document.createElement("canvas")) {
+ const t = e.getContext("2d", n);
+ if (!t)
+ throw new Error("Could not create a 2D context.");
+ return t;
+}
+const pu = 180 / Math.PI, Qn = Math.PI / 180;
+function gu(n) {
+ const e = ru(), t = va();
+ return e.timeEvents.register(n, t.time());
+}
+const vu = [];
+function _u() {
+ const n = vu.at(-1);
+ if (!n)
+ throw new Error("The playback is not available in the current context.");
+ return n;
+}
+function _a(n, ...e) {
+ const t = { [n.name]: n }, r = Object.getOwnPropertyDescriptor(t, n.name);
+ if (r)
+ for (let a = e.length - 1; a >= 0; a--)
+ e[a](t, n.name, r);
+}
+function ba(n) {
+ return function(e, t, r) {
+ r.value.prototype.name = t, r.value.prototype.threadable = !0;
+ };
+}
+_a(bu, ba());
+function* bu(n, e) {
+ yield* ya(gu(n)), e && (yield* e);
+}
+_a(ya, ba());
+function* ya(n = 0, e) {
+ const t = va(), r = _u().framesToSeconds(1), a = t.time() + n;
+ for (; a - r > t.fixed; )
+ yield;
+ t.time(a), e && (yield* e);
+}
+function fi(n, e) {
+ let t;
+ return typeof n == "string" ? (t = e(), pi(t, n)) : (t = n(), pi(t, t)), t;
+}
+function pi(n, e) {
+ const t = Object.getPrototypeOf(n);
+ t.threadable || (t.threadable = !0, t.name = typeof e == "string" ? e : yu(e));
+}
+function yu(n) {
+ return Object.getPrototypeOf(n).name ?? null;
+}
+function s0(n, e, t) {
+ return n + (e - n) * t;
+}
+function Hr(n, e, t) {
+ return t < n ? n : t > e ? e : t;
+}
+function wu(n, e, t) {
+ let r = e;
+ t > 1 ? t = 1 / t : r = !r;
+ const a = r ? Math.acos(Hr(-1, 1, 1 - n)) : Math.asin(n), i = s0(a, s0(0, Math.PI / 2, n), t);
+ let s = Math.sin(i), l = 1 - Math.cos(i);
+ return e && ([s, l] = [l, s]), new B(s, l);
+}
+function ku(n, e = 0, t = 1) {
+ return n = n < 0.5 ? 4 * n * n * n : 1 - Math.pow(-2 * n + 2, 3) / 2, s0(e, t, n);
+}
+_a(ol, ba());
+function* ol(n, e, t) {
+ const r = va(), a = r.time(), i = r.time() + n;
+ for (e(0, 0); i > r.fixed; ) {
+ const s = r.fixed - a, l = s / n;
+ s > 0 && e(l, s), yield;
+ }
+ r.time(i), e(1, n), t == null || t(1, n);
+}
+class et {
+ static collectPromise(e, t = null) {
+ const r = {
+ promise: e,
+ value: t,
+ stack: new Error().stack
+ }, a = this.collectionStack.at(-1);
+ return a && (r.owner = a.owner), e.then((i) => {
+ r.value = i, a == null || a.markDirty();
+ }), this.promises.push(r), r;
+ }
+ static hasPromises() {
+ return this.promises.length > 0;
+ }
+ static async consumePromises() {
+ const e = [...this.promises];
+ return await Promise.all(e.map((t) => t.promise)), this.promises = this.promises.filter((t) => !e.includes(t)), e;
+ }
+ constructor(e) {
+ this.owner = e, this.dependencies = /* @__PURE__ */ new Set(), this.event = new Jo(), this.markDirty = () => this.event.raise(), this.invokable = this.invoke.bind(this), Object.defineProperty(this.invokable, "context", {
+ value: this
+ }), Object.defineProperty(this.invokable, "toPromise", {
+ value: this.toPromise.bind(this)
+ });
+ }
+ invoke() {
+ }
+ startCollecting() {
+ if (et.collectionSet.has(this))
+ throw new il("A circular dependency occurred between signals.", `This can happen when signals reference each other in a loop.
+ Try using the attached stack trace to locate said loop.`);
+ et.collectionSet.add(this), et.collectionStack.push(this);
+ }
+ finishCollecting() {
+ if (et.collectionSet.delete(this), et.collectionStack.pop() !== this)
+ throw new Error("collectStart/collectEnd was called out of order.");
+ }
+ clearDependencies() {
+ this.dependencies.forEach((e) => e.unsubscribe(this.markDirty)), this.dependencies.clear();
+ }
+ collect() {
+ const e = et.collectionStack.at(-1);
+ e && (e.dependencies.add(this.event.subscribable), this.event.subscribe(e.markDirty));
+ }
+ dispose() {
+ this.clearDependencies(), this.event.clear(), this.owner = null;
+ }
+ async toPromise() {
+ do
+ await et.consumePromises(), this.invokable();
+ while (et.hasPromises());
+ return this.invokable;
+ }
+}
+et.collectionSet = /* @__PURE__ */ new Set();
+et.collectionStack = [];
+et.promises = [];
+const gi = Symbol.for("@motion-canvas/core/signals/default");
+function I0(n) {
+ return typeof n == "function";
+}
+function Su(n, e) {
+ return I0(n) ? () => e(n()) : e(n);
+}
+function ul(n) {
+ return I0(n) ? n() : n;
+}
+class vi extends et {
+ constructor(e, t, r = void 0, a = (s) => s, i = {}) {
+ super(r), this.initial = e, this.interpolation = t, this.parser = a, this.tweening = !1, Object.defineProperty(this.invokable, "reset", {
+ value: this.reset.bind(this)
+ }), Object.defineProperty(this.invokable, "save", {
+ value: this.save.bind(this)
+ }), Object.defineProperty(this.invokable, "isInitial", {
+ value: this.isInitial.bind(this)
+ }), this.initial !== void 0 && (this.current = this.initial, this.markDirty(), I0(this.initial) || (this.last = this.parse(this.initial))), this.extensions = {
+ getter: this.getter.bind(this),
+ setter: this.setter.bind(this),
+ tweener: this.tweener.bind(this),
+ ...i
+ };
+ }
+ toSignal() {
+ return this.invokable;
+ }
+ parse(e) {
+ return this.parser(e);
+ }
+ set(e) {
+ return this.extensions.setter(e), this.owner;
+ }
+ setter(e) {
+ return e === gi && (e = this.initial), this.current === e ? this.owner : (this.current = e, this.clearDependencies(), I0(e) || (this.last = this.parse(e)), this.markDirty(), this.owner);
+ }
+ get() {
+ return this.extensions.getter();
+ }
+ getter() {
+ var e;
+ if (this.event.isRaised() && I0(this.current)) {
+ this.clearDependencies(), this.startCollecting();
+ try {
+ this.last = this.parse(this.current());
+ } catch (t) {
+ ll().error({
+ ...au(t),
+ inspect: (e = this.owner) == null ? void 0 : e.key
+ });
+ }
+ this.finishCollecting();
+ }
+ return this.event.reset(), this.collect(), this.last;
+ }
+ invoke(e, t, r = ku, a = this.interpolation) {
+ return e === void 0 ? this.get() : t === void 0 ? this.set(e) : this.createQueue(r, a).to(e, t);
+ }
+ createQueue(e, t) {
+ const r = this.get(), a = [], i = fi("animation chain", function* () {
+ for (; a.length > 0; )
+ yield* a.shift();
+ });
+ return i.to = (s, l, u = e, h = t) => (e = u, t = h, a.push(this.tween(s, l, u, h)), i), i.back = (s, l = e, u = t) => (e = l, t = u, a.push(this.tween(r, s, e, t)), i), i.wait = (s) => (a.push(ya(s)), i), i.run = (s) => (a.push(s), i), i.do = (s) => (a.push(fi(function* () {
+ s();
+ })), i), i;
+ }
+ *tween(e, t, r, a) {
+ e === gi && (e = this.initial), this.tweening = !0, yield* this.extensions.tweener(e, t, r, a), this.set(e), this.tweening = !1;
+ }
+ *tweener(e, t, r, a) {
+ const i = this.get();
+ yield* ol(t, (s) => {
+ this.set(a(i, this.parse(ul(e)), r(s)));
+ });
+ }
+ dispose() {
+ super.dispose(), this.initial = void 0, this.current = void 0, this.last = void 0;
+ }
+ /**
+ * Reset the signal to its initial value (if one has been set).
+ *
+ * @example
+ * ```ts
+ * const signal = createSignal(7);
+ *
+ * signal.reset();
+ * // same as:
+ * signal(7);
+ * ```
+ */
+ reset() {
+ return this.initial !== void 0 && this.set(this.initial), this.owner;
+ }
+ /**
+ * Compute the current value of the signal and immediately set it.
+ *
+ * @remarks
+ * This method can be used to stop the signal from updating while keeping its
+ * current value.
+ *
+ * @example
+ * ```ts
+ * signal.save();
+ * // same as:
+ * signal(signal());
+ * ```
+ */
+ save() {
+ return this.set(this.get());
+ }
+ /**
+ * Check if the signal is currently using its initial value.
+ *
+ * @example
+ * ```ts
+ *
+ * const signal = createSignal(0);
+ * signal.isInitial(); // true
+ *
+ * signal(5);
+ * signal.isInitial(); // false
+ *
+ * signal(DEFAULT);
+ * signal.isInitial(); // true
+ * ```
+ */
+ isInitial() {
+ return this.collect(), this.current === this.initial;
+ }
+ /**
+ * Get the initial value of this signal.
+ */
+ getInitial() {
+ return this.initial;
+ }
+ /**
+ * Get the raw value of this signal.
+ *
+ * @remarks
+ * If the signal was provided with a factory function, the function itself
+ * will be returned, without invoking it.
+ *
+ * This method can be used to create copies of signals.
+ *
+ * @example
+ * ```ts
+ * const a = createSignal(2);
+ * const b = createSignal(() => a);
+ * // b() == 2
+ *
+ * const bClone = createSignal(b.raw());
+ * // bClone() == 2
+ *
+ * a(4);
+ * // b() == 4
+ * // bClone() == 4
+ * ```
+ */
+ raw() {
+ return this.current;
+ }
+ /**
+ * Is the signal undergoing a tween?
+ */
+ isTweening() {
+ return this.tweening;
+ }
+}
+class xu extends vi {
+ constructor(e, t, r, a, i = void 0, s = {}) {
+ var l;
+ super(void 0, a, i, t, s), this.entries = e, this.signals = [], this.parser = t;
+ for (const u of e) {
+ let h, d;
+ Array.isArray(u) ? ([h, d] = u, (l = d.context).owner ?? (l.owner = this)) : (h = u, d = new vi(Su(r, (f) => t(f)[u]), s0, i ?? this.invokable).toSignal()), this.signals.push([h, d]), Object.defineProperty(this.invokable, h, { value: d });
+ }
+ }
+ toSignal() {
+ return this.invokable;
+ }
+ parse(e) {
+ return this.parser(e);
+ }
+ getter() {
+ return this.parse(Object.fromEntries(this.signals.map(([e, t]) => [e, t()])));
+ }
+ setter(e) {
+ if (I0(e))
+ for (const [t, r] of this.signals)
+ r(() => this.parser(e())[t]);
+ else {
+ const t = this.parse(e);
+ for (const [r, a] of this.signals)
+ a(t[r]);
+ }
+ return this.owner;
+ }
+ reset() {
+ for (const [, e] of this.signals)
+ e.reset();
+ return this.owner;
+ }
+ save() {
+ for (const [, e] of this.signals)
+ e.save();
+ return this.owner;
+ }
+ isInitial() {
+ for (const [, e] of this.signals)
+ if (!e.isInitial())
+ return !1;
+ return !0;
+ }
+ raw() {
+ return Object.fromEntries(this.signals.map(([e, t]) => [e, t.context.raw()]));
+ }
+}
+class Du extends xu {
+ constructor(e, t, r, a, i = void 0, s = {}) {
+ super(e, t, r, a, i, s), Object.defineProperty(this.invokable, "edit", {
+ value: this.edit.bind(this)
+ }), Object.defineProperty(this.invokable, "mul", {
+ value: this.mul.bind(this)
+ }), Object.defineProperty(this.invokable, "div", {
+ value: this.div.bind(this)
+ }), Object.defineProperty(this.invokable, "add", {
+ value: this.add.bind(this)
+ }), Object.defineProperty(this.invokable, "sub", {
+ value: this.sub.bind(this)
+ }), Object.defineProperty(this.invokable, "dot", {
+ value: this.dot.bind(this)
+ }), Object.defineProperty(this.invokable, "cross", {
+ value: this.cross.bind(this)
+ }), Object.defineProperty(this.invokable, "mod", {
+ value: this.mod.bind(this)
+ });
+ }
+ toSignal() {
+ return this.invokable;
+ }
+ edit(e, t, r, a) {
+ const i = e(this.get());
+ return this.invoke(i, t, r, a);
+ }
+ mul(e, t, r, a) {
+ const i = (s) => s.mul(e);
+ return t === void 0 ? this.edit(i) : this.edit(i, t, r, a);
+ }
+ div(e, t, r, a) {
+ const i = (s) => s.div(e);
+ return t === void 0 ? this.edit(i) : this.edit(i, t, r, a);
+ }
+ add(e, t, r, a) {
+ const i = (s) => s.add(e);
+ return t === void 0 ? this.edit(i) : this.edit(i, t, r, a);
+ }
+ sub(e, t, r, a) {
+ const i = (s) => s.sub(e);
+ return t === void 0 ? this.edit(i) : this.edit(i, t, r, a);
+ }
+ dot(e, t, r, a) {
+ const i = (s) => s.dot(e);
+ return t === void 0 ? this.edit(i) : this.edit(i, t, r, a);
+ }
+ cross(e, t, r, a) {
+ const i = (s) => s.cross(e);
+ return t === void 0 ? this.edit(i) : this.edit(i, t, r, a);
+ }
+ mod(e, t, r, a) {
+ const i = (s) => s.mod(e);
+ return t === void 0 ? this.edit(i) : this.edit(i, t, r, a);
+ }
+}
+const cl = 1e-6;
+class De {
+ static fromRotation(e) {
+ return De.identity.rotate(e);
+ }
+ static fromTranslation(e) {
+ return De.identity.translate(new B(e));
+ }
+ static fromScaling(e) {
+ return De.identity.scale(new B(e));
+ }
+ get x() {
+ return new B(this.values[0], this.values[1]);
+ }
+ get y() {
+ return new B(this.values[2], this.values[3]);
+ }
+ get scaleX() {
+ return this.values[0];
+ }
+ set scaleX(e) {
+ this.values[0] = this.x.normalized.scale(e).x;
+ }
+ get skewX() {
+ return this.values[1];
+ }
+ set skewX(e) {
+ this.values[1] = e;
+ }
+ get scaleY() {
+ return this.values[3];
+ }
+ set scaleY(e) {
+ this.values[3] = this.y.normalized.scale(e).y;
+ }
+ get skewY() {
+ return this.values[2];
+ }
+ set skewY(e) {
+ this.values[2] = e;
+ }
+ get translateX() {
+ return this.values[4];
+ }
+ set translateX(e) {
+ this.values[4] = e;
+ }
+ get translateY() {
+ return this.values[5];
+ }
+ set translateY(e) {
+ this.values[5] = e;
+ }
+ get rotation() {
+ return B.degrees(this.values[0], this.values[1]);
+ }
+ set rotation(e) {
+ const t = this.rotate(e - this.rotation);
+ this.values[0] = t.values[0], this.values[1] = t.values[1], this.values[2] = t.values[2], this.values[3] = t.values[3];
+ }
+ get translation() {
+ return new B(this.values[4], this.values[5]);
+ }
+ set translation(e) {
+ const t = new B(e);
+ this.values[4] = t.x, this.values[5] = t.y;
+ }
+ get scaling() {
+ return new B(this.values[0], this.values[3]);
+ }
+ set scaling(e) {
+ const t = new B(e), r = new B(this.values[0], this.values[1]).normalized, a = new B(this.values[2], this.values[3]).normalized;
+ this.values[0] = r.x * t.x, this.values[1] = r.y * t.y, this.values[2] = a.x * t.x, this.values[3] = a.y * t.y;
+ }
+ /**
+ * Get the inverse of the matrix.
+ *
+ * @remarks
+ * If the matrix is not invertible, i.e. its determinant is `0`, this will
+ * return `null`, instead.
+ *
+ * @example
+ * ```ts
+ * const matrix = new Matrix2D(
+ * [1, 2],
+ * [3, 4],
+ * [5, 6],
+ * );
+ *
+ * const inverse = matrix.inverse;
+ * // => Matrix2D(
+ * // [-2, 1],
+ * // [1.5, -0.5],
+ * // [1, -2],
+ * // )
+ * ```
+ */
+ get inverse() {
+ const e = this.values[0], t = this.values[1], r = this.values[2], a = this.values[3], i = this.values[4], s = this.values[5];
+ let l = e * a - t * r;
+ return l ? (l = 1 / l, new De(a * l, -t * l, -r * l, e * l, (r * s - a * i) * l, (t * i - e * s) * l)) : null;
+ }
+ /**
+ * Get the determinant of the matrix.
+ */
+ get determinant() {
+ return this.values[0] * this.values[3] - this.values[1] * this.values[2];
+ }
+ get domMatrix() {
+ return new DOMMatrix([
+ this.values[0],
+ this.values[1],
+ this.values[2],
+ this.values[3],
+ this.values[4],
+ this.values[5]
+ ]);
+ }
+ constructor(e, t, r, a, i, s) {
+ if (this.values = new Float32Array(6), arguments.length === 0) {
+ this.values = new Float32Array([1, 0, 0, 1, 0, 0]);
+ return;
+ }
+ if (arguments.length === 6) {
+ this.values[0] = e, this.values[1] = t, this.values[2] = r, this.values[3] = a, this.values[4] = i, this.values[5] = s;
+ return;
+ }
+ if (e instanceof DOMMatrix) {
+ this.values[0] = e.m11, this.values[1] = e.m12, this.values[2] = e.m21, this.values[3] = e.m22, this.values[4] = e.m41, this.values[5] = e.m42;
+ return;
+ }
+ if (e instanceof De) {
+ this.values = e.values;
+ return;
+ }
+ if (Array.isArray(e)) {
+ if (e.length === 2) {
+ this.values[0] = e[0], this.values[1] = e[1], this.values[2] = t[0], this.values[3] = t[1], this.values[4] = r[0], this.values[5] = r[1];
+ return;
+ }
+ if (e.length === 3) {
+ const d = new B(e[0]), f = new B(e[1]), p = new B(e[2]);
+ this.values[0] = d.x, this.values[1] = d.y, this.values[2] = f.x, this.values[3] = f.y, this.values[4] = p.x, this.values[5] = p.y;
+ return;
+ }
+ this.values[0] = e[0], this.values[1] = e[1], this.values[2] = e[2], this.values[3] = e[3], this.values[4] = e[4], this.values[5] = e[5];
+ return;
+ }
+ const l = new B(e), u = new B(t), h = new B(r);
+ this.values[0] = l.x, this.values[1] = l.y, this.values[2] = u.x, this.values[3] = u.y, this.values[4] = h.x, this.values[5] = h.y;
+ }
+ /**
+ * Get the nth component vector of the matrix. Only defined for 0, 1, and 2.
+ *
+ * @example
+ * ```ts
+ * const matrix = new Matrix2D(
+ * [1, 0],
+ * [0, 0],
+ * [1, 0],
+ * );
+ *
+ * const x = matrix.column(0);
+ * // Vector2(1, 0)
+ *
+ * const y = matrix.column(1);
+ * // Vector2(0, 0)
+ *
+ * const z = matrix.column(1);
+ * // Vector2(1, 0)
+ * ```
+ *
+ * @param index - The index of the component vector to retrieve.
+ */
+ column(e) {
+ return new B(this.values[e * 2], this.values[e * 2 + 1]);
+ }
+ /**
+ * Returns the nth row of the matrix. Only defined for 0 and 1.
+ *
+ * @example
+ * ```ts
+ * const matrix = new Matrix2D(
+ * [1, 0],
+ * [0, 0],
+ * [1, 0],
+ * );
+ *
+ * const firstRow = matrix.column(0);
+ * // [1, 0, 1]
+ *
+ * const secondRow = matrix.column(1);
+ * // [0, 0, 0]
+ * ```
+ *
+ * @param index - The index of the row to retrieve.
+ */
+ row(e) {
+ return [this.values[e], this.values[e + 2], this.values[e + 4]];
+ }
+ /**
+ * Returns the matrix product of this matrix with the provided matrix.
+ *
+ * @remarks
+ * This method returns a new matrix representing the result of the
+ * computation. It will not modify the source matrix.
+ *
+ * @example
+ * ```ts
+ * const a = new Matrix2D(
+ * [1, 2],
+ * [0, 1],
+ * [1, 1],
+ * );
+ * const b = new Matrix2D(
+ * [2, 1],
+ * [1, 1],
+ * [1, 1],
+ * );
+ *
+ * const result = a.mul(b);
+ * // => Matrix2D(
+ * // [2, 5],
+ * // [1, 3],
+ * // [2, 4],
+ * // )
+ * ```
+ *
+ * @param other - The matrix to multiply with
+ */
+ mul(e) {
+ const t = this.values[0], r = this.values[1], a = this.values[2], i = this.values[3], s = this.values[4], l = this.values[5], u = e.values[0], h = e.values[1], d = e.values[2], f = e.values[3], p = e.values[4], v = e.values[5];
+ return new De(t * u + a * h, r * u + i * h, t * d + a * f, r * d + i * f, t * p + a * v + s, r * p + i * v + l);
+ }
+ /**
+ * Rotate the matrix by the provided angle. By default, the angle is
+ * provided in degrees.
+ *
+ * @remarks
+ * This method returns a new matrix representing the result of the
+ * computation. It will not modify the source matrix.
+ *
+ * @example
+ * ```ts
+ * const a = new Matrix2D(
+ * [1, 2],
+ * [3, 4],
+ * [5, 6],
+ * );
+ *
+ * const result = a.rotate(90);
+ * // => Matrix2D(
+ * // [3, 4],
+ * // [-1, -2],
+ * // [5, 6],
+ * // )
+ *
+ * // Provide the angle in radians
+ * const result = a.rotate(Math.PI * 0.5, true);
+ * // => Matrix2D(
+ * // [3, 4],
+ * // [-1, -2],
+ * // [5, 6],
+ * // )
+ * ```
+ *
+ * @param angle - The angle by which to rotate the matrix.
+ * @param degrees - Whether the angle is provided in degrees.
+ */
+ rotate(e, t = !0) {
+ t && (e *= Qn);
+ const r = this.values[0], a = this.values[1], i = this.values[2], s = this.values[3], l = this.values[4], u = this.values[5], h = Math.sin(e), d = Math.cos(e);
+ return new De(r * d + i * h, a * d + s * h, r * -h + i * d, a * -h + s * d, l, u);
+ }
+ /**
+ * Scale the x and y component vectors of the matrix.
+ *
+ * @remarks
+ * If `vec` is provided as a vector, the x and y component vectors of the
+ * matrix will be scaled by the x and y parts of the vector, respectively.
+ *
+ * If `vec` is provided as a scalar, the x and y component vectors will be
+ * scaled uniformly by this factor.
+ *
+ * This method returns a new matrix representing the result of the
+ * computation. It will not modify the source matrix.
+ *
+ * @example
+ * ```ts
+ * const matrix = new Matrix2D(
+ * [1, 2],
+ * [3, 4],
+ * [5, 6],
+ * );
+ *
+ * const result1 = matrix.scale([2, 3]);
+ * // => new Matrix2D(
+ * // [2, 4],
+ * // [9, 12],
+ * // [5, 6],
+ * // )
+ *
+ * const result2 = matrix.scale(2);
+ * // => new Matrix2D(
+ * // [2, 4],
+ * // [6, 8],
+ * // [5, 6],
+ * // )
+ * ```
+ *
+ * @param vec - The factor by which to scale the matrix
+ */
+ scale(e) {
+ const t = new B(e);
+ return new De(this.values[0] * t.x, this.values[1] * t.x, this.values[2] * t.y, this.values[3] * t.y, this.values[4], this.values[5]);
+ }
+ /**
+ * Multiply each value of the matrix by a scalar.
+ *
+ * * @example
+ * ```ts
+ * const matrix = new Matrix2D(
+ * [1, 2],
+ * [3, 4],
+ * [5, 6],
+ * );
+ *
+ * const result1 = matrix.mulScalar(2);
+ * // => new Matrix2D(
+ * // [2, 4],
+ * // [6, 8],
+ * // [10, 12],
+ * // )
+ * ```
+ *
+ * @param s - The value by which to scale each term
+ */
+ mulScalar(e) {
+ return new De(this.values[0] * e, this.values[1] * e, this.values[2] * e, this.values[3] * e, this.values[4] * e, this.values[5] * e);
+ }
+ /**
+ * Translate the matrix by the dimensions of the provided vector.
+ *
+ * @remarks
+ * If `vec` is provided as a scalar, matrix will be translated uniformly
+ * by this factor.
+ *
+ * This method returns a new matrix representing the result of the
+ * computation. It will not modify the source matrix.
+ *
+ * @example
+ * ```ts
+ * const matrix = new Matrix2D(
+ * [1, 2],
+ * [3, 4],
+ * [5, 6],
+ * );
+ *
+ * const result1 = matrix.translate([2, 3]);
+ * // => new Matrix2D(
+ * // [1, 2],
+ * // [3, 4],
+ * // [16, 22],
+ * // )
+ *
+ * const result2 = matrix.translate(2);
+ * // => new Matrix2D(
+ * // [1, 2],
+ * // [3, 4],
+ * // [13, 18],
+ * // )
+ * ```
+ *
+ * @param vec - The vector by which to translate the matrix
+ */
+ translate(e) {
+ const t = new B(e);
+ return new De(this.values[0], this.values[1], this.values[2], this.values[3], this.values[0] * t.x + this.values[2] * t.y + this.values[4], this.values[1] * t.x + this.values[3] * t.y + this.values[5]);
+ }
+ /**
+ * Add the provided matrix to this matrix.
+ *
+ * @remarks
+ * This method returns a new matrix representing the result of the
+ * computation. It will not modify the source matrix.
+ *
+ * @example
+ * ```ts
+ * const a = new Matrix2D(
+ * [1, 2],
+ * [3, 4],
+ * [5, 6],
+ * );
+ * const a = new Matrix2D(
+ * [7, 8],
+ * [9, 10],
+ * [11, 12],
+ * );
+ *
+ * const result = a.add(b);
+ * // => Matrix2D(
+ * // [8, 10],
+ * // [12, 14],
+ * // [16, 18],
+ * // )
+ * ```
+ *
+ * @param other - The matrix to add
+ */
+ add(e) {
+ return new De(this.values[0] + e.values[0], this.values[1] + e.values[1], this.values[2] + e.values[2], this.values[3] + e.values[3], this.values[4] + e.values[4], this.values[5] + e.values[5]);
+ }
+ /**
+ * Subtract the provided matrix from this matrix.
+ *
+ * @remarks
+ * This method returns a new matrix representing the result of the
+ * computation. It will not modify the source matrix.
+ *
+ * @example
+ * ```ts
+ * const a = new Matrix2D(
+ * [1, 2],
+ * [3, 4],
+ * [5, 6],
+ * );
+ * const a = new Matrix2D(
+ * [7, 8],
+ * [9, 10],
+ * [11, 12],
+ * );
+ *
+ * const result = a.sub(b);
+ * // => Matrix2D(
+ * // [-6, -6],
+ * // [-6, -6],
+ * // [-6, -6],
+ * // )
+ * ```
+ *
+ * @param other - The matrix to subract
+ */
+ sub(e) {
+ return new De(this.values[0] - e.values[0], this.values[1] - e.values[1], this.values[2] - e.values[2], this.values[3] - e.values[3], this.values[4] - e.values[4], this.values[5] - e.values[5]);
+ }
+ toSymbol() {
+ return De.symbol;
+ }
+ toUniform(e, t) {
+ e.uniformMatrix3fv(t, !1, [
+ this.values[0],
+ this.values[1],
+ 0,
+ this.values[2],
+ this.values[3],
+ 0,
+ this.values[4],
+ this.values[5],
+ 1
+ ]);
+ }
+ equals(e, t = cl) {
+ return Math.abs(this.values[0] - e.values[0]) <= t + Number.EPSILON && Math.abs(this.values[1] - e.values[1]) <= t + Number.EPSILON && Math.abs(this.values[2] - e.values[2]) <= t + Number.EPSILON && Math.abs(this.values[3] - e.values[3]) <= t + Number.EPSILON && Math.abs(this.values[4] - e.values[4]) <= t + Number.EPSILON && Math.abs(this.values[5] - e.values[5]) <= t + Number.EPSILON;
+ }
+ exactlyEquals(e) {
+ return this.values[0] === e.values[0] && this.values[1] === e.values[1] && this.values[2] === e.values[2] && this.values[3] === e.values[3] && this.values[4] === e.values[4] && this.values[5] === e.values[5];
+ }
+}
+De.symbol = Symbol.for("@motion-canvas/core/types/Matrix2D");
+De.identity = new De(1, 0, 0, 1, 0, 0);
+De.zero = new De(0, 0, 0, 0, 0, 0);
+var _i;
+(function(n) {
+ n[n.Vertical = 1] = "Vertical", n[n.Horizontal = 2] = "Horizontal";
+})(_i || (_i = {}));
+var z0;
+(function(n) {
+ n[n.Top = 4] = "Top", n[n.Bottom = 8] = "Bottom", n[n.Left = 16] = "Left", n[n.Right = 32] = "Right";
+})(z0 || (z0 = {}));
+var Jn;
+(function(n) {
+ n[n.Middle = 3] = "Middle", n[n.Top = 5] = "Top", n[n.Bottom = 9] = "Bottom", n[n.Left = 18] = "Left", n[n.Right = 34] = "Right", n[n.TopLeft = 20] = "TopLeft", n[n.TopRight = 36] = "TopRight", n[n.BottomLeft = 24] = "BottomLeft", n[n.BottomRight = 40] = "BottomRight";
+})(Jn || (Jn = {}));
+class B {
+ static createSignal(e, t = B.lerp, r) {
+ return new Du(["x", "y"], (a) => new B(a), e, t, r).toSignal();
+ }
+ static lerp(e, t, r) {
+ let a, i;
+ return typeof r == "number" ? a = i = r : (a = r.x, i = r.y), new B(s0(e.x, t.x, a), s0(e.y, t.y, i));
+ }
+ static arcLerp(e, t, r, a = !1, i) {
+ return i ?? (i = e.sub(t).ctg), B.lerp(e, t, wu(r, a, i));
+ }
+ static createArcLerp(e, t) {
+ return (r, a, i) => B.arcLerp(r, a, i, e, t);
+ }
+ /**
+ * Interpolates between two vectors on the polar plane by interpolating
+ * the angles and magnitudes of the vectors individually.
+ *
+ * @param from - The starting vector.
+ * @param to - The target vector.
+ * @param value - The t-value of the interpolation.
+ * @param counterclockwise - Whether the vector should get rotated
+ * counterclockwise. Defaults to `false`.
+ * @param origin - The center of rotation. Defaults to the origin.
+ *
+ * @remarks
+ * This function is useful when used in conjunction with {@link rotate} to
+ * animate an object's position on a circular arc (see examples).
+ *
+ * @example
+ * Animating an object in a circle around the origin
+ * ```tsx
+ * circle().position(
+ * circle().position().rotate(180),
+ * 1,
+ * easeInOutCubic,
+ * Vector2.polarLerp
+ * );
+ * ```
+ * @example
+ * Rotating an object around the point `[-200, 100]`
+ * ```ts
+ * circle().position(
+ * circle().position().rotate(180, [-200, 100]),
+ * 1,
+ * easeInOutCubic,
+ * Vector2.createPolarLerp(false, [-200, 100]),
+ * );
+ * ```
+ * @example
+ * Rotating an object counterclockwise around the origin
+ * ```ts
+ * circle().position(
+ * circle().position().rotate(180),
+ * 1,
+ * easeInOutCubic,
+ * Vector2.createPolarLerp(true),
+ * );
+ * ```
+ */
+ static polarLerp(e, t, r, a = !1, i = B.zero) {
+ e = e.sub(i), t = t.sub(i);
+ const s = e.degrees;
+ let l = t.degrees;
+ s > l !== a && (l = l + (a ? -360 : 360));
+ const h = s0(s, l, r) * Qn, d = s0(e.magnitude, t.magnitude, r);
+ return new B(d * Math.cos(h) + i.x, d * Math.sin(h) + i.y);
+ }
+ /**
+ * Helper function to create a {@link Vector2.polarLerp} interpolation
+ * function with additional parameters.
+ *
+ * @param counterclockwise - Whether the point should get rotated
+ * counterclockwise.
+ * @param center - The center of rotation. Defaults to the origin.
+ */
+ static createPolarLerp(e = !1, t = B.zero) {
+ return (r, a, i) => B.polarLerp(r, a, i, e, new B(t));
+ }
+ static fromOrigin(e) {
+ const t = new B();
+ return e === Jn.Middle || (e & z0.Left ? t.x = -1 : e & z0.Right && (t.x = 1), e & z0.Top ? t.y = -1 : e & z0.Bottom && (t.y = 1)), t;
+ }
+ static fromScalar(e) {
+ return new B(e, e);
+ }
+ static fromRadians(e) {
+ return new B(Math.cos(e), Math.sin(e));
+ }
+ static fromDegrees(e) {
+ return B.fromRadians(e * Qn);
+ }
+ /**
+ * Return the angle in radians between the vector described by x and y and the
+ * positive x-axis.
+ *
+ * @param x - The x component of the vector.
+ * @param y - The y component of the vector.
+ */
+ static radians(e, t) {
+ return Math.atan2(t, e);
+ }
+ /**
+ * Return the angle in degrees between the vector described by x and y and the
+ * positive x-axis.
+ *
+ * @param x - The x component of the vector.
+ * @param y - The y component of the vector.
+ *
+ * @remarks
+ * The returned angle will be between -180 and 180 degrees.
+ */
+ static degrees(e, t) {
+ return B.radians(e, t) * pu;
+ }
+ static magnitude(e, t) {
+ return Math.sqrt(e * e + t * t);
+ }
+ static squaredMagnitude(e, t) {
+ return e * e + t * t;
+ }
+ static angleBetween(e, t) {
+ return Math.acos(Hr(-1, 1, e.dot(t) / (e.magnitude * t.magnitude))) * (e.cross(t) >= 0 ? 1 : -1);
+ }
+ get width() {
+ return this.x;
+ }
+ set width(e) {
+ this.x = e;
+ }
+ get height() {
+ return this.y;
+ }
+ set height(e) {
+ this.y = e;
+ }
+ get magnitude() {
+ return B.magnitude(this.x, this.y);
+ }
+ get squaredMagnitude() {
+ return B.squaredMagnitude(this.x, this.y);
+ }
+ get normalized() {
+ return this.scale(1 / B.magnitude(this.x, this.y));
+ }
+ get safe() {
+ return new B(isNaN(this.x) ? 0 : this.x, isNaN(this.y) ? 0 : this.y);
+ }
+ get flipped() {
+ return new B(-this.x, -this.y);
+ }
+ get floored() {
+ return new B(Math.floor(this.x), Math.floor(this.y));
+ }
+ get rounded() {
+ return new B(Math.round(this.x), Math.round(this.y));
+ }
+ get ceiled() {
+ return new B(Math.ceil(this.x), Math.ceil(this.y));
+ }
+ get perpendicular() {
+ return new B(this.y, -this.x);
+ }
+ /**
+ * Return the angle in radians between the vector and the positive x-axis.
+ */
+ get radians() {
+ return B.radians(this.x, this.y);
+ }
+ /**
+ * Return the angle in degrees between the vector and the positive x-axis.
+ *
+ * @remarks
+ * The returned angle will be between -180 and 180 degrees.
+ */
+ get degrees() {
+ return B.degrees(this.x, this.y);
+ }
+ get ctg() {
+ return this.x / this.y;
+ }
+ constructor(e, t) {
+ if (this.x = 0, this.y = 0, e != null) {
+ if (typeof e != "object") {
+ this.x = e, this.y = t ?? e;
+ return;
+ }
+ if (Array.isArray(e)) {
+ this.x = e[0], this.y = e[1];
+ return;
+ }
+ if ("width" in e) {
+ this.x = e.width, this.y = e.height;
+ return;
+ }
+ this.x = e.x, this.y = e.y;
+ }
+ }
+ lerp(e, t) {
+ return B.lerp(this, e, t);
+ }
+ getOriginOffset(e) {
+ const t = B.fromOrigin(e);
+ return t.x *= this.x / 2, t.y *= this.y / 2, t;
+ }
+ scale(e) {
+ return new B(this.x * e, this.y * e);
+ }
+ transformAsPoint(e) {
+ const t = new De(e);
+ return new B(this.x * t.scaleX + this.y * t.skewY + t.translateX, this.x * t.skewX + this.y * t.scaleY + t.translateY);
+ }
+ transform(e) {
+ const t = new De(e);
+ return new B(this.x * t.scaleX + this.y * t.skewY, this.x * t.skewX + this.y * t.scaleY);
+ }
+ mul(e) {
+ const t = new B(e);
+ return new B(this.x * t.x, this.y * t.y);
+ }
+ div(e) {
+ const t = new B(e);
+ return new B(this.x / t.x, this.y / t.y);
+ }
+ add(e) {
+ const t = new B(e);
+ return new B(this.x + t.x, this.y + t.y);
+ }
+ sub(e) {
+ const t = new B(e);
+ return new B(this.x - t.x, this.y - t.y);
+ }
+ dot(e) {
+ const t = new B(e);
+ return this.x * t.x + this.y * t.y;
+ }
+ cross(e) {
+ const t = new B(e);
+ return this.x * t.y - this.y * t.x;
+ }
+ mod(e) {
+ const t = new B(e);
+ return new B(this.x % t.x, this.y % t.y);
+ }
+ /**
+ * Rotate the vector around a point by the provided angle.
+ *
+ * @param angle - The angle by which to rotate in degrees.
+ * @param center - The center of rotation. Defaults to the origin.
+ */
+ rotate(e, t = B.zero) {
+ const r = new B(t), a = De.fromTranslation(r).rotate(e).translate(r.flipped);
+ return this.transformAsPoint(a);
+ }
+ addX(e) {
+ return new B(this.x + e, this.y);
+ }
+ addY(e) {
+ return new B(this.x, this.y + e);
+ }
+ /**
+ * Transform the components of the vector.
+ *
+ * @example
+ * Raise the components to the power of 2.
+ * ```ts
+ * const vector = new Vector2(2, 3);
+ * const result = vector.transform(value => value ** 2);
+ * ```
+ *
+ * @param callback - A callback to apply to each component.
+ */
+ map(e) {
+ return new B(e(this.x, 0), e(this.y, 1));
+ }
+ toSymbol() {
+ return B.symbol;
+ }
+ toString() {
+ return `Vector2(${this.x}, ${this.y})`;
+ }
+ toArray() {
+ return [this.x, this.y];
+ }
+ toUniform(e, t) {
+ e.uniform2f(t, this.x, this.y);
+ }
+ serialize() {
+ return { x: this.x, y: this.y };
+ }
+ /**
+ * Check if two vectors are exactly equal to each other.
+ *
+ * @remarks
+ * If you need to compensate for floating point inaccuracies, use the
+ * {@link equals} method, instead.
+ *
+ * @param other - The vector to compare.
+ */
+ exactlyEquals(e) {
+ return this.x === e.x && this.y === e.y;
+ }
+ /**
+ * Check if two vectors are equal to each other.
+ *
+ * @remarks
+ * This method allows passing an allowed error margin when comparing vectors
+ * to compensate for floating point inaccuracies. To check if two vectors are
+ * exactly equal, use the {@link exactlyEquals} method, instead.
+ *
+ * @param other - The vector to compare.
+ * @param threshold - The allowed error threshold when comparing the vectors.
+ */
+ equals(e, t = cl) {
+ return Math.abs(this.x - e.x) <= t + Number.EPSILON && Math.abs(this.y - e.y) <= t + Number.EPSILON;
+ }
+ *[Symbol.iterator]() {
+ yield this.x, yield this.y;
+ }
+}
+B.symbol = Symbol.for("@motion-canvas/core/types/Vector2");
+B.zero = new B();
+B.one = new B(1, 1);
+B.right = new B(1, 0);
+B.left = new B(-1, 0);
+B.up = new B(0, 1);
+B.down = new B(0, -1);
+B.top = new B(0, -1);
+B.bottom = new B(0, 1);
+B.topLeft = new B(-1, -1);
+B.topRight = new B(1, -1);
+B.bottomLeft = new B(-1, 1);
+B.bottomRight = new B(1, 1);
+var bi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Au = Object.defineProperty, Cu = (n, e, t) => e in n ? Au(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, ze = (n, e, t) => (Cu(n, typeof e != "symbol" ? e + "" : e, t), t);
+const Fu = `.initial{display:none}.state-initial .initial{display:block}.loading{display:none}.state-loading .loading{display:block}.ready{display:none}.state-ready .ready{display:block}.error{display:none}.state-error .error{display:block}:host{position:relative;display:block}.overlay{position:absolute;left:0;right:0;top:0;bottom:0;display:flex;align-items:center;justify-content:center;opacity:0;background-color:#0000008a;transition:opacity .1s}.overlay.state-ready:not(.auto){cursor:pointer}.overlay.playing:not(.hover):hover{cursor:none}.overlay.hover,.overlay.state-ready:focus-within,.overlay.state-ready:not(.playing){opacity:1}.overlay.hover .button,.overlay.state-ready:focus-within .button,.overlay.state-ready:not(.playing) .button{scale:1;transition:scale .1s ease-out}.overlay.state-loading,.overlay.state-error{opacity:1;transition:opacity 1s}.overlay.state-ready.auto{opacity:0}.button{width:50%;max-width:96px;aspect-ratio:1;scale:.5;transition:scale .1s ease-in,opacity .1s;background-color:transparent;border:none;background-size:100% 100%;background-repeat:no-repeat;opacity:.54;cursor:inherit;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iI2ZmZmZmZiI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDJDNi40OCAyIDIgNi40OCAyIDEyczQuNDggMTAgMTAgMTAgMTAtNC40OCAxMC0xMFMxNy41MiAyIDEyIDJ6bS0yIDE0LjV2LTlsNiA0LjUtNiA0LjV6Ii8+PC9zdmc+)}.playing .button{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjI0cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0cHgiIGZpbGw9IiNmZmZmZmYiPjxnPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjxyZWN0IGZpbGw9Im5vbmUiIGhlaWdodD0iMjQiIHdpZHRoPSIyNCIvPjwvZz48Zz48Zy8+PHBhdGggZD0iTTEyLDJDNi40OCwyLDIsNi40OCwyLDEyczQuNDgsMTAsMTAsMTBzMTAtNC40OCwxMC0xMFMxNy41MiwyLDEyLDJ6IE0xMSwxNkg5VjhoMlYxNnogTTE1LDE2aC0yVjhoMlYxNnoiLz48L2c+PC9zdmc+)}.button:focus,.overlay:hover .button{opacity:.87}.auto .button{display:none}.canvas{width:100%;display:block;opacity:0;transition:opacity .1s}.canvas.state-ready{opacity:1}.message{font-family:JetBrains Mono,sans-serif;text-align:center;font-size:20px;padding:8px 16px;margin:16px;border-radius:4px;color:#fff9;background-color:#000000de}.loader{width:50%;max-width:96px;display:none;rotate:-90deg;animation:stroke 2s cubic-bezier(.5,0,.5,1) infinite,rotate 2s linear infinite}@keyframes stroke{0%{stroke-dasharray:5.6548667765px 50.8938009883px;stroke-dashoffset:2.8274333882px}50%{stroke-dasharray:50.8938009883px 5.6548667765px;stroke-dashoffset:-2.8274333882px}to{stroke-dasharray:5.6548667765px 50.8938009883px;stroke-dashoffset:-53.7212343766px}}@keyframes rotate{0%{rotate:-110deg}to{rotate:250deg}}
+`, Eu = `
+
+
+ An error occurred while loading the animation.
+
+
+
+`, Tu = `${Eu}`, yi = "motion-canvas-player";
+class $u extends HTMLElement {
+ constructor() {
+ super(), ze(this, "root"), ze(this, "canvas"), ze(this, "overlay"), ze(this, "button"), ze(this, "state", "initial"), ze(this, "project", null), ze(this, "player", null), ze(this, "defaultSettings"), ze(this, "abortController", null), ze(this, "mouseMoveId", null), ze(this, "finished", !1), ze(this, "playing", !1), ze(this, "connected", !1), ze(this, "stage", new fu()), ze(this, "handleMouseMove", () => {
+ this.mouseMoveId && clearTimeout(this.mouseMoveId), this.hover && !this.playing && this.setPlaying(!0), this.mouseMoveId = window.setTimeout(() => {
+ this.mouseMoveId = null, this.updateClass();
+ }, 2e3), this.updateClass();
+ }), ze(this, "handleMouseLeave", () => {
+ this.hover && this.setPlaying(!1), this.mouseMoveId && (clearTimeout(this.mouseMoveId), this.mouseMoveId = null, this.updateClass());
+ }), ze(this, "handleMouseDown", (e) => {
+ e.preventDefault();
+ }), ze(this, "handleClick", () => {
+ this.auto || (this.handleMouseMove(), this.setPlaying(!this.playing), this.button.animate(
+ [
+ { scale: "0.9" },
+ {
+ scale: "1",
+ easing: "ease-out"
+ }
+ ],
+ { duration: 200 }
+ ));
+ }), ze(this, "render", async () => {
+ this.player && await this.stage.render(
+ this.player.playback.currentScene,
+ this.player.playback.previousScene
+ );
+ }), this.root = this.attachShadow({ mode: "open" }), this.root.innerHTML = Tu, this.overlay = this.root.querySelector(".overlay"), this.button = this.root.querySelector(".button"), this.canvas = this.stage.finalBuffer, this.canvas.classList.add("canvas"), this.root.prepend(this.canvas), this.overlay.addEventListener("click", this.handleClick), this.overlay.addEventListener("mousemove", this.handleMouseMove), this.overlay.addEventListener("mouseleave", this.handleMouseLeave), this.button.addEventListener("mousedown", this.handleMouseDown), this.setState(
+ "initial"
+ /* Initial */
+ );
+ }
+ static get observedAttributes() {
+ return ["src", "quality", "width", "height", "auto", "variables"];
+ }
+ get auto() {
+ return !!this.getAttribute("auto");
+ }
+ get hover() {
+ return this.getAttribute("auto") === "hover";
+ }
+ get quality() {
+ const e = this.getAttribute("quality");
+ return e ? parseFloat(e) : this.defaultSettings.resolutionScale;
+ }
+ get width() {
+ const e = this.getAttribute("width");
+ return e ? parseFloat(e) : this.defaultSettings.size.width;
+ }
+ get height() {
+ const e = this.getAttribute("height");
+ return e ? parseFloat(e) : this.defaultSettings.size.height;
+ }
+ get variables() {
+ try {
+ const e = this.getAttribute("variables");
+ return e ? JSON.parse(e) : {};
+ } catch {
+ return this.project.logger.warn("Project variables could not be parsed."), {};
+ }
+ }
+ setState(e) {
+ this.state = e, this.setPlaying(this.playing);
+ }
+ setPlaying(e) {
+ var t, r;
+ this.state === "ready" && (e || this.auto && !this.hover) ? ((t = this.player) == null || t.togglePlayback(!0), this.playing = !0) : ((r = this.player) == null || r.togglePlayback(!1), this.playing = !1), this.updateClass();
+ }
+ updateClass() {
+ this.overlay.className = `overlay state-${this.state}`, this.canvas.className = `canvas state-${this.state}`, this.overlay.classList.toggle("playing", this.playing), this.overlay.classList.toggle("auto", this.auto), this.overlay.classList.toggle("hover", this.mouseMoveId !== null), this.connected && (this.mouseMoveId !== null || !this.playing ? this.dataset.overlay = "" : delete this.dataset.overlay);
+ }
+ async updateSource(e) {
+ var t, r, a, i;
+ this.setState(
+ "initial"
+ /* Initial */
+ ), (t = this.abortController) == null || t.abort(), this.abortController = new AbortController();
+ let s;
+ try {
+ const u = import(
+ /* webpackIgnore: true */
+ /* @vite-ignore */
+ e
+ ), h = new Promise((d) => setTimeout(d, 200));
+ await Promise.any([h, u]), this.setState(
+ "loading"
+ /* Loading */
+ ), s = (await u).default;
+ } catch (u) {
+ console.error(u), this.setState(
+ "error"
+ /* Error */
+ );
+ return;
+ }
+ this.defaultSettings = s.meta.getFullRenderingSettings();
+ const l = new mu(s);
+ l.setVariables(this.variables), this.finished = !1, (r = this.player) == null || r.onRender.unsubscribe(this.render), (a = this.player) == null || a.togglePlayback(!1), (i = this.player) == null || i.deactivate(), this.project = s, this.player = l, this.updateSettings(), this.player.onRender.subscribe(this.render), this.player.togglePlayback(this.playing), this.setState(
+ "ready"
+ /* Ready */
+ );
+ }
+ attributeChangedCallback(e, t, r) {
+ var a;
+ switch (e) {
+ case "auto":
+ this.setPlaying(this.playing);
+ break;
+ case "src":
+ this.updateSource(r);
+ break;
+ case "quality":
+ case "width":
+ case "height":
+ this.updateSettings();
+ break;
+ case "variables":
+ (a = this.player) == null || a.setVariables(this.variables);
+ }
+ }
+ disconnectedCallback() {
+ var e, t;
+ this.connected = !1, (e = this.player) == null || e.deactivate(), (t = this.player) == null || t.onRender.unsubscribe(this.render);
+ }
+ connectedCallback() {
+ var e, t;
+ this.connected = !0, (e = this.player) == null || e.activate(), (t = this.player) == null || t.onRender.subscribe(this.render);
+ }
+ updateSettings() {
+ if (this.player) {
+ const e = {
+ ...this.defaultSettings,
+ size: new B(this.width, this.height),
+ resolutionScale: this.quality
+ };
+ this.stage.configure(e), this.player.configure(e);
+ }
+ }
+}
+customElements.get(yi) || customElements.define(yi, $u);
+const {
+ SvelteComponent: Mu,
+ assign: zu,
+ attr: wi,
+ children: hl,
+ claim_element: dl,
+ detach: Ur,
+ element: ml,
+ get_spread_update: Bu,
+ init: Ru,
+ insert_hydration: fl,
+ listen: qu,
+ noop: ki,
+ safe_not_equal: Iu,
+ set_attributes: Si,
+ src_url_equal: Nu,
+ toggle_class: Gr
+} = window.__gradio__svelte__internal, { createEventDispatcher: Lu } = window.__gradio__svelte__internal;
+function xi(n) {
+ let e, t, r = [
+ {
+ src: t = /*value*/
+ n[1]
+ },
+ /*mcPlayerAdditionalAttributes*/
+ n[3]
+ ], a = {};
+ for (let i = 0; i < r.length; i += 1)
+ a = zu(a, r[i]);
+ return {
+ c() {
+ e = ml("motion-canvas-player"), this.h();
+ },
+ l(i) {
+ e = dl(i, "MOTION-CANVAS-PLAYER", { src: !0 }), hl(e).forEach(Ur), this.h();
+ },
+ h() {
+ Si(e, a), Gr(e, "svelte-py6oj0", !0);
+ },
+ m(i, s) {
+ fl(i, e, s);
+ },
+ p(i, s) {
+ Si(e, a = Bu(r, [
+ s & /*value*/
+ 2 && !Nu(e.src, t = /*value*/
+ i[1]) && { src: t },
+ s & /*mcPlayerAdditionalAttributes*/
+ 8 && /*mcPlayerAdditionalAttributes*/
+ i[3]
+ ])), Gr(e, "svelte-py6oj0", !0);
+ },
+ d(i) {
+ i && Ur(e);
+ }
+ };
+}
+function Ou(n) {
+ let e, t, r, a, i = (
+ /*value*/
+ n[1] && xi(n)
+ );
+ return {
+ c() {
+ e = ml("div"), i && i.c(), this.h();
+ },
+ l(s) {
+ e = dl(s, "DIV", { class: !0 });
+ var l = hl(e);
+ i && i.l(l), l.forEach(Ur), this.h();
+ },
+ h() {
+ wi(e, "class", t = "prose " + /*elem_classes*/
+ n[0].join(" ") + " svelte-py6oj0"), Gr(e, "hide", !/*visible*/
+ n[2]);
+ },
+ m(s, l) {
+ fl(s, e, l), i && i.m(e, null), r || (a = qu(
+ e,
+ "click",
+ /*click_handler*/
+ n[10]
+ ), r = !0);
+ },
+ p(s, [l]) {
+ /*value*/
+ s[1] ? i ? i.p(s, l) : (i = xi(s), i.c(), i.m(e, null)) : i && (i.d(1), i = null), l & /*elem_classes*/
+ 1 && t !== (t = "prose " + /*elem_classes*/
+ s[0].join(" ") + " svelte-py6oj0") && wi(e, "class", t), l & /*elem_classes, visible*/
+ 5 && Gr(e, "hide", !/*visible*/
+ s[2]);
+ },
+ i: ki,
+ o: ki,
+ d(s) {
+ s && Ur(e), i && i.d(), r = !1, a();
+ }
+ };
+}
+function Pu(n, e, t) {
+ let { elem_classes: r = [] } = e, { value: a } = e, { width: i } = e, { height: s } = e, { auto: l } = e, { quality: u } = e, { variables: h } = e, { visible: d = !0 } = e;
+ const f = Lu();
+ let p = {};
+ i && (p.width = i), s && (p.height = s), l && (p.auto = l), u && (p.quality = u), h && (p.variables = h);
+ const v = () => f("click");
+ return n.$$set = (w) => {
+ "elem_classes" in w && t(0, r = w.elem_classes), "value" in w && t(1, a = w.value), "width" in w && t(5, i = w.width), "height" in w && t(6, s = w.height), "auto" in w && t(7, l = w.auto), "quality" in w && t(8, u = w.quality), "variables" in w && t(9, h = w.variables), "visible" in w && t(2, d = w.visible);
+ }, n.$$.update = () => {
+ n.$$.dirty & /*value*/
+ 2 && f("change");
+ }, [
+ r,
+ a,
+ d,
+ p,
+ f,
+ i,
+ s,
+ l,
+ u,
+ h,
+ v
+ ];
+}
+class Hu extends Mu {
+ constructor(e) {
+ super(), Ru(this, e, Pu, Ou, Iu, {
+ elem_classes: 0,
+ value: 1,
+ width: 5,
+ height: 6,
+ auto: 7,
+ quality: 8,
+ variables: 9,
+ visible: 2
+ });
+ }
+}
+function B0(n) {
+ let e = ["", "k", "M", "G", "T", "P", "E", "Z"], t = 0;
+ for (; n > 1e3 && t < e.length - 1; )
+ n /= 1e3, t++;
+ let r = e[t];
+ return (Number.isInteger(n) ? n : n.toFixed(1)) + r;
+}
+function Nr() {
+}
+function Uu(n, e) {
+ return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
+}
+const pl = typeof window < "u";
+let Di = pl ? () => window.performance.now() : () => Date.now(), gl = pl ? (n) => requestAnimationFrame(n) : Nr;
+const N0 = /* @__PURE__ */ new Set();
+function vl(n) {
+ N0.forEach((e) => {
+ e.c(n) || (N0.delete(e), e.f());
+ }), N0.size !== 0 && gl(vl);
+}
+function Gu(n) {
+ let e;
+ return N0.size === 0 && gl(vl), {
+ promise: new Promise((t) => {
+ N0.add(e = { c: n, f: t });
+ }),
+ abort() {
+ N0.delete(e);
+ }
+ };
+}
+const T0 = [];
+function ju(n, e = Nr) {
+ let t;
+ const r = /* @__PURE__ */ new Set();
+ function a(l) {
+ if (Uu(n, l) && (n = l, t)) {
+ const u = !T0.length;
+ for (const h of r)
+ h[1](), T0.push(h, n);
+ if (u) {
+ for (let h = 0; h < T0.length; h += 2)
+ T0[h][0](T0[h + 1]);
+ T0.length = 0;
+ }
+ }
+ }
+ function i(l) {
+ a(l(n));
+ }
+ function s(l, u = Nr) {
+ const h = [l, u];
+ return r.add(h), r.size === 1 && (t = e(a, i) || Nr), l(n), () => {
+ r.delete(h), r.size === 0 && t && (t(), t = null);
+ };
+ }
+ return { set: a, update: i, subscribe: s };
+}
+function Ai(n) {
+ return Object.prototype.toString.call(n) === "[object Date]";
+}
+function ea(n, e, t, r) {
+ if (typeof t == "number" || Ai(t)) {
+ const a = r - t, i = (t - e) / (n.dt || 1 / 60), s = n.opts.stiffness * a, l = n.opts.damping * i, u = (s - l) * n.inv_mass, h = (i + u) * n.dt;
+ return Math.abs(h) < n.opts.precision && Math.abs(a) < n.opts.precision ? r : (n.settled = !1, Ai(t) ? new Date(t.getTime() + h) : t + h);
+ } else {
+ if (Array.isArray(t))
+ return t.map(
+ (a, i) => ea(n, e[i], t[i], r[i])
+ );
+ if (typeof t == "object") {
+ const a = {};
+ for (const i in t)
+ a[i] = ea(n, e[i], t[i], r[i]);
+ return a;
+ } else
+ throw new Error(`Cannot spring ${typeof t} values`);
+ }
+}
+function Ci(n, e = {}) {
+ const t = ju(n), { stiffness: r = 0.15, damping: a = 0.8, precision: i = 0.01 } = e;
+ let s, l, u, h = n, d = n, f = 1, p = 0, v = !1;
+ function w(C, $ = {}) {
+ d = C;
+ const k = u = {};
+ return n == null || $.hard || D.stiffness >= 1 && D.damping >= 1 ? (v = !0, s = Di(), h = C, t.set(n = d), Promise.resolve()) : ($.soft && (p = 1 / (($.soft === !0 ? 0.5 : +$.soft) * 60), f = 0), l || (s = Di(), v = !1, l = Gu((_) => {
+ if (v)
+ return v = !1, l = null, !1;
+ f = Math.min(f + p, 1);
+ const A = {
+ inv_mass: f,
+ opts: D,
+ settled: !0,
+ dt: (_ - s) * 60 / 1e3
+ }, E = ea(A, h, n, d);
+ return s = _, h = n, t.set(n = E), A.settled && (l = null), !A.settled;
+ })), new Promise((_) => {
+ l.promise.then(() => {
+ k === u && _();
+ });
+ }));
+ }
+ const D = {
+ set: w,
+ update: (C, $) => w(C(d, n), $),
+ subscribe: t.subscribe,
+ stiffness: r,
+ damping: a,
+ precision: i
+ };
+ return D;
+}
+const {
+ SvelteComponent: Vu,
+ append_hydration: vt,
+ attr: ae,
+ children: at,
+ claim_element: Wu,
+ claim_svg_element: _t,
+ component_subscribe: Fi,
+ detach: Je,
+ element: Yu,
+ init: Xu,
+ insert_hydration: Zu,
+ noop: Ei,
+ safe_not_equal: Ku,
+ set_style: br,
+ svg_element: bt,
+ toggle_class: Ti
+} = window.__gradio__svelte__internal, { onMount: Qu } = window.__gradio__svelte__internal;
+function Ju(n) {
+ let e, t, r, a, i, s, l, u, h, d, f, p;
+ return {
+ c() {
+ e = Yu("div"), t = bt("svg"), r = bt("g"), a = bt("path"), i = bt("path"), s = bt("path"), l = bt("path"), u = bt("g"), h = bt("path"), d = bt("path"), f = bt("path"), p = bt("path"), this.h();
+ },
+ l(v) {
+ e = Wu(v, "DIV", { class: !0 });
+ var w = at(e);
+ t = _t(w, "svg", {
+ viewBox: !0,
+ fill: !0,
+ xmlns: !0,
+ class: !0
+ });
+ var D = at(t);
+ r = _t(D, "g", { style: !0 });
+ var C = at(r);
+ a = _t(C, "path", {
+ d: !0,
+ fill: !0,
+ "fill-opacity": !0,
+ class: !0
+ }), at(a).forEach(Je), i = _t(C, "path", { d: !0, fill: !0, class: !0 }), at(i).forEach(Je), s = _t(C, "path", {
+ d: !0,
+ fill: !0,
+ "fill-opacity": !0,
+ class: !0
+ }), at(s).forEach(Je), l = _t(C, "path", { d: !0, fill: !0, class: !0 }), at(l).forEach(Je), C.forEach(Je), u = _t(D, "g", { style: !0 });
+ var $ = at(u);
+ h = _t($, "path", {
+ d: !0,
+ fill: !0,
+ "fill-opacity": !0,
+ class: !0
+ }), at(h).forEach(Je), d = _t($, "path", { d: !0, fill: !0, class: !0 }), at(d).forEach(Je), f = _t($, "path", {
+ d: !0,
+ fill: !0,
+ "fill-opacity": !0,
+ class: !0
+ }), at(f).forEach(Je), p = _t($, "path", { d: !0, fill: !0, class: !0 }), at(p).forEach(Je), $.forEach(Je), D.forEach(Je), w.forEach(Je), this.h();
+ },
+ h() {
+ ae(a, "d", "M255.926 0.754768L509.702 139.936V221.027L255.926 81.8465V0.754768Z"), ae(a, "fill", "#FF7C00"), ae(a, "fill-opacity", "0.4"), ae(a, "class", "svelte-43sxxs"), ae(i, "d", "M509.69 139.936L254.981 279.641V361.255L509.69 221.55V139.936Z"), ae(i, "fill", "#FF7C00"), ae(i, "class", "svelte-43sxxs"), ae(s, "d", "M0.250138 139.937L254.981 279.641V361.255L0.250138 221.55V139.937Z"), ae(s, "fill", "#FF7C00"), ae(s, "fill-opacity", "0.4"), ae(s, "class", "svelte-43sxxs"), ae(l, "d", "M255.923 0.232622L0.236328 139.936V221.55L255.923 81.8469V0.232622Z"), ae(l, "fill", "#FF7C00"), ae(l, "class", "svelte-43sxxs"), br(r, "transform", "translate(" + /*$top*/
+ n[1][0] + "px, " + /*$top*/
+ n[1][1] + "px)"), ae(h, "d", "M255.926 141.5L509.702 280.681V361.773L255.926 222.592V141.5Z"), ae(h, "fill", "#FF7C00"), ae(h, "fill-opacity", "0.4"), ae(h, "class", "svelte-43sxxs"), ae(d, "d", "M509.69 280.679L254.981 420.384V501.998L509.69 362.293V280.679Z"), ae(d, "fill", "#FF7C00"), ae(d, "class", "svelte-43sxxs"), ae(f, "d", "M0.250138 280.681L254.981 420.386V502L0.250138 362.295V280.681Z"), ae(f, "fill", "#FF7C00"), ae(f, "fill-opacity", "0.4"), ae(f, "class", "svelte-43sxxs"), ae(p, "d", "M255.923 140.977L0.236328 280.68V362.294L255.923 222.591V140.977Z"), ae(p, "fill", "#FF7C00"), ae(p, "class", "svelte-43sxxs"), br(u, "transform", "translate(" + /*$bottom*/
+ n[2][0] + "px, " + /*$bottom*/
+ n[2][1] + "px)"), ae(t, "viewBox", "-1200 -1200 3000 3000"), ae(t, "fill", "none"), ae(t, "xmlns", "http://www.w3.org/2000/svg"), ae(t, "class", "svelte-43sxxs"), ae(e, "class", "svelte-43sxxs"), Ti(
+ e,
+ "margin",
+ /*margin*/
+ n[0]
+ );
+ },
+ m(v, w) {
+ Zu(v, e, w), vt(e, t), vt(t, r), vt(r, a), vt(r, i), vt(r, s), vt(r, l), vt(t, u), vt(u, h), vt(u, d), vt(u, f), vt(u, p);
+ },
+ p(v, [w]) {
+ w & /*$top*/
+ 2 && br(r, "transform", "translate(" + /*$top*/
+ v[1][0] + "px, " + /*$top*/
+ v[1][1] + "px)"), w & /*$bottom*/
+ 4 && br(u, "transform", "translate(" + /*$bottom*/
+ v[2][0] + "px, " + /*$bottom*/
+ v[2][1] + "px)"), w & /*margin*/
+ 1 && Ti(
+ e,
+ "margin",
+ /*margin*/
+ v[0]
+ );
+ },
+ i: Ei,
+ o: Ei,
+ d(v) {
+ v && Je(e);
+ }
+ };
+}
+function e1(n, e, t) {
+ let r, a;
+ var i = this && this.__awaiter || function(v, w, D, C) {
+ function $(k) {
+ return k instanceof D ? k : new D(function(_) {
+ _(k);
+ });
+ }
+ return new (D || (D = Promise))(function(k, _) {
+ function A(T) {
+ try {
+ M(C.next(T));
+ } catch (P) {
+ _(P);
+ }
+ }
+ function E(T) {
+ try {
+ M(C.throw(T));
+ } catch (P) {
+ _(P);
+ }
+ }
+ function M(T) {
+ T.done ? k(T.value) : $(T.value).then(A, E);
+ }
+ M((C = C.apply(v, w || [])).next());
+ });
+ };
+ let { margin: s = !0 } = e;
+ const l = Ci([0, 0]);
+ Fi(n, l, (v) => t(1, r = v));
+ const u = Ci([0, 0]);
+ Fi(n, u, (v) => t(2, a = v));
+ let h;
+ function d() {
+ return i(this, void 0, void 0, function* () {
+ yield Promise.all([l.set([125, 140]), u.set([-125, -140])]), yield Promise.all([l.set([-125, 140]), u.set([125, -140])]), yield Promise.all([l.set([-125, 0]), u.set([125, -0])]), yield Promise.all([l.set([125, 0]), u.set([-125, 0])]);
+ });
+ }
+ function f() {
+ return i(this, void 0, void 0, function* () {
+ yield d(), h || f();
+ });
+ }
+ function p() {
+ return i(this, void 0, void 0, function* () {
+ yield Promise.all([l.set([125, 0]), u.set([-125, 0])]), f();
+ });
+ }
+ return Qu(() => (p(), () => h = !0)), n.$$set = (v) => {
+ "margin" in v && t(0, s = v.margin);
+ }, [s, r, a, l, u];
+}
+class t1 extends Vu {
+ constructor(e) {
+ super(), Xu(this, e, e1, Ju, Ku, { margin: 0 });
+ }
+}
+const {
+ SvelteComponent: r1,
+ append_hydration: ta,
+ assign: n1,
+ attr: Pe,
+ binding_callbacks: a1,
+ children: rr,
+ claim_element: _l,
+ claim_space: bl,
+ claim_svg_element: kn,
+ create_slot: i1,
+ detach: $t,
+ element: yl,
+ empty: $i,
+ get_all_dirty_from_scope: s1,
+ get_slot_changes: l1,
+ get_spread_update: o1,
+ init: u1,
+ insert_hydration: lr,
+ listen: c1,
+ noop: h1,
+ safe_not_equal: d1,
+ set_dynamic_element_data: Mi,
+ set_style: ce,
+ space: wl,
+ svg_element: Sn,
+ toggle_class: Re,
+ transition_in: kl,
+ transition_out: Sl,
+ update_slot_base: m1
+} = window.__gradio__svelte__internal;
+function zi(n) {
+ let e, t, r, a, i;
+ return {
+ c() {
+ e = Sn("svg"), t = Sn("line"), r = Sn("line"), this.h();
+ },
+ l(s) {
+ e = kn(s, "svg", { class: !0, xmlns: !0, viewBox: !0 });
+ var l = rr(e);
+ t = kn(l, "line", {
+ x1: !0,
+ y1: !0,
+ x2: !0,
+ y2: !0,
+ stroke: !0,
+ "stroke-width": !0
+ }), rr(t).forEach($t), r = kn(l, "line", {
+ x1: !0,
+ y1: !0,
+ x2: !0,
+ y2: !0,
+ stroke: !0,
+ "stroke-width": !0
+ }), rr(r).forEach($t), l.forEach($t), this.h();
+ },
+ h() {
+ Pe(t, "x1", "1"), Pe(t, "y1", "9"), Pe(t, "x2", "9"), Pe(t, "y2", "1"), Pe(t, "stroke", "gray"), Pe(t, "stroke-width", "0.5"), Pe(r, "x1", "5"), Pe(r, "y1", "9"), Pe(r, "x2", "9"), Pe(r, "y2", "5"), Pe(r, "stroke", "gray"), Pe(r, "stroke-width", "0.5"), Pe(e, "class", "resize-handle svelte-239wnu"), Pe(e, "xmlns", "http://www.w3.org/2000/svg"), Pe(e, "viewBox", "0 0 10 10");
+ },
+ m(s, l) {
+ lr(s, e, l), ta(e, t), ta(e, r), a || (i = c1(
+ e,
+ "mousedown",
+ /*resize*/
+ n[27]
+ ), a = !0);
+ },
+ p: h1,
+ d(s) {
+ s && $t(e), a = !1, i();
+ }
+ };
+}
+function f1(n) {
+ var f;
+ let e, t, r, a, i;
+ const s = (
+ /*#slots*/
+ n[31].default
+ ), l = i1(
+ s,
+ n,
+ /*$$scope*/
+ n[30],
+ null
+ );
+ let u = (
+ /*resizable*/
+ n[19] && zi(n)
+ ), h = [
+ { "data-testid": (
+ /*test_id*/
+ n[11]
+ ) },
+ { id: (
+ /*elem_id*/
+ n[6]
+ ) },
+ {
+ class: r = "block " + /*elem_classes*/
+ (((f = n[7]) == null ? void 0 : f.join(" ")) || "") + " svelte-239wnu"
+ },
+ {
+ dir: a = /*rtl*/
+ n[20] ? "rtl" : "ltr"
+ }
+ ], d = {};
+ for (let p = 0; p < h.length; p += 1)
+ d = n1(d, h[p]);
+ return {
+ c() {
+ e = yl(
+ /*tag*/
+ n[25]
+ ), l && l.c(), t = wl(), u && u.c(), this.h();
+ },
+ l(p) {
+ e = _l(
+ p,
+ /*tag*/
+ (n[25] || "null").toUpperCase(),
+ {
+ "data-testid": !0,
+ id: !0,
+ class: !0,
+ dir: !0
+ }
+ );
+ var v = rr(e);
+ l && l.l(v), t = bl(v), u && u.l(v), v.forEach($t), this.h();
+ },
+ h() {
+ Mi(
+ /*tag*/
+ n[25]
+ )(e, d), Re(
+ e,
+ "hidden",
+ /*visible*/
+ n[14] === !1
+ ), Re(
+ e,
+ "padded",
+ /*padding*/
+ n[10]
+ ), Re(
+ e,
+ "flex",
+ /*flex*/
+ n[1]
+ ), Re(
+ e,
+ "border_focus",
+ /*border_mode*/
+ n[9] === "focus"
+ ), Re(
+ e,
+ "border_contrast",
+ /*border_mode*/
+ n[9] === "contrast"
+ ), Re(e, "hide-container", !/*explicit_call*/
+ n[12] && !/*container*/
+ n[13]), Re(
+ e,
+ "fullscreen",
+ /*fullscreen*/
+ n[0]
+ ), Re(
+ e,
+ "animating",
+ /*fullscreen*/
+ n[0] && /*preexpansionBoundingRect*/
+ n[24] !== null
+ ), Re(
+ e,
+ "auto-margin",
+ /*scale*/
+ n[17] === null
+ ), ce(
+ e,
+ "height",
+ /*fullscreen*/
+ n[0] ? void 0 : (
+ /*get_dimension*/
+ n[26](
+ /*height*/
+ n[2]
+ )
+ )
+ ), ce(
+ e,
+ "min-height",
+ /*fullscreen*/
+ n[0] ? void 0 : (
+ /*get_dimension*/
+ n[26](
+ /*min_height*/
+ n[3]
+ )
+ )
+ ), ce(
+ e,
+ "max-height",
+ /*fullscreen*/
+ n[0] ? void 0 : (
+ /*get_dimension*/
+ n[26](
+ /*max_height*/
+ n[4]
+ )
+ )
+ ), ce(
+ e,
+ "--start-top",
+ /*preexpansionBoundingRect*/
+ n[24] ? `${/*preexpansionBoundingRect*/
+ n[24].top}px` : "0px"
+ ), ce(
+ e,
+ "--start-left",
+ /*preexpansionBoundingRect*/
+ n[24] ? `${/*preexpansionBoundingRect*/
+ n[24].left}px` : "0px"
+ ), ce(
+ e,
+ "--start-width",
+ /*preexpansionBoundingRect*/
+ n[24] ? `${/*preexpansionBoundingRect*/
+ n[24].width}px` : "0px"
+ ), ce(
+ e,
+ "--start-height",
+ /*preexpansionBoundingRect*/
+ n[24] ? `${/*preexpansionBoundingRect*/
+ n[24].height}px` : "0px"
+ ), ce(
+ e,
+ "width",
+ /*fullscreen*/
+ n[0] ? void 0 : typeof /*width*/
+ n[5] == "number" ? `calc(min(${/*width*/
+ n[5]}px, 100%))` : (
+ /*get_dimension*/
+ n[26](
+ /*width*/
+ n[5]
+ )
+ )
+ ), ce(
+ e,
+ "border-style",
+ /*variant*/
+ n[8]
+ ), ce(
+ e,
+ "overflow",
+ /*allow_overflow*/
+ n[15] ? (
+ /*overflow_behavior*/
+ n[16]
+ ) : "hidden"
+ ), ce(
+ e,
+ "flex-grow",
+ /*scale*/
+ n[17]
+ ), ce(e, "min-width", `calc(min(${/*min_width*/
+ n[18]}px, 100%))`), ce(e, "border-width", "var(--block-border-width)");
+ },
+ m(p, v) {
+ lr(p, e, v), l && l.m(e, null), ta(e, t), u && u.m(e, null), n[32](e), i = !0;
+ },
+ p(p, v) {
+ var w;
+ l && l.p && (!i || v[0] & /*$$scope*/
+ 1073741824) && m1(
+ l,
+ s,
+ p,
+ /*$$scope*/
+ p[30],
+ i ? l1(
+ s,
+ /*$$scope*/
+ p[30],
+ v,
+ null
+ ) : s1(
+ /*$$scope*/
+ p[30]
+ ),
+ null
+ ), /*resizable*/
+ p[19] ? u ? u.p(p, v) : (u = zi(p), u.c(), u.m(e, null)) : u && (u.d(1), u = null), Mi(
+ /*tag*/
+ p[25]
+ )(e, d = o1(h, [
+ (!i || v[0] & /*test_id*/
+ 2048) && { "data-testid": (
+ /*test_id*/
+ p[11]
+ ) },
+ (!i || v[0] & /*elem_id*/
+ 64) && { id: (
+ /*elem_id*/
+ p[6]
+ ) },
+ (!i || v[0] & /*elem_classes*/
+ 128 && r !== (r = "block " + /*elem_classes*/
+ (((w = p[7]) == null ? void 0 : w.join(" ")) || "") + " svelte-239wnu")) && { class: r },
+ (!i || v[0] & /*rtl*/
+ 1048576 && a !== (a = /*rtl*/
+ p[20] ? "rtl" : "ltr")) && { dir: a }
+ ])), Re(
+ e,
+ "hidden",
+ /*visible*/
+ p[14] === !1
+ ), Re(
+ e,
+ "padded",
+ /*padding*/
+ p[10]
+ ), Re(
+ e,
+ "flex",
+ /*flex*/
+ p[1]
+ ), Re(
+ e,
+ "border_focus",
+ /*border_mode*/
+ p[9] === "focus"
+ ), Re(
+ e,
+ "border_contrast",
+ /*border_mode*/
+ p[9] === "contrast"
+ ), Re(e, "hide-container", !/*explicit_call*/
+ p[12] && !/*container*/
+ p[13]), Re(
+ e,
+ "fullscreen",
+ /*fullscreen*/
+ p[0]
+ ), Re(
+ e,
+ "animating",
+ /*fullscreen*/
+ p[0] && /*preexpansionBoundingRect*/
+ p[24] !== null
+ ), Re(
+ e,
+ "auto-margin",
+ /*scale*/
+ p[17] === null
+ ), v[0] & /*fullscreen, height*/
+ 5 && ce(
+ e,
+ "height",
+ /*fullscreen*/
+ p[0] ? void 0 : (
+ /*get_dimension*/
+ p[26](
+ /*height*/
+ p[2]
+ )
+ )
+ ), v[0] & /*fullscreen, min_height*/
+ 9 && ce(
+ e,
+ "min-height",
+ /*fullscreen*/
+ p[0] ? void 0 : (
+ /*get_dimension*/
+ p[26](
+ /*min_height*/
+ p[3]
+ )
+ )
+ ), v[0] & /*fullscreen, max_height*/
+ 17 && ce(
+ e,
+ "max-height",
+ /*fullscreen*/
+ p[0] ? void 0 : (
+ /*get_dimension*/
+ p[26](
+ /*max_height*/
+ p[4]
+ )
+ )
+ ), v[0] & /*preexpansionBoundingRect*/
+ 16777216 && ce(
+ e,
+ "--start-top",
+ /*preexpansionBoundingRect*/
+ p[24] ? `${/*preexpansionBoundingRect*/
+ p[24].top}px` : "0px"
+ ), v[0] & /*preexpansionBoundingRect*/
+ 16777216 && ce(
+ e,
+ "--start-left",
+ /*preexpansionBoundingRect*/
+ p[24] ? `${/*preexpansionBoundingRect*/
+ p[24].left}px` : "0px"
+ ), v[0] & /*preexpansionBoundingRect*/
+ 16777216 && ce(
+ e,
+ "--start-width",
+ /*preexpansionBoundingRect*/
+ p[24] ? `${/*preexpansionBoundingRect*/
+ p[24].width}px` : "0px"
+ ), v[0] & /*preexpansionBoundingRect*/
+ 16777216 && ce(
+ e,
+ "--start-height",
+ /*preexpansionBoundingRect*/
+ p[24] ? `${/*preexpansionBoundingRect*/
+ p[24].height}px` : "0px"
+ ), v[0] & /*fullscreen, width*/
+ 33 && ce(
+ e,
+ "width",
+ /*fullscreen*/
+ p[0] ? void 0 : typeof /*width*/
+ p[5] == "number" ? `calc(min(${/*width*/
+ p[5]}px, 100%))` : (
+ /*get_dimension*/
+ p[26](
+ /*width*/
+ p[5]
+ )
+ )
+ ), v[0] & /*variant*/
+ 256 && ce(
+ e,
+ "border-style",
+ /*variant*/
+ p[8]
+ ), v[0] & /*allow_overflow, overflow_behavior*/
+ 98304 && ce(
+ e,
+ "overflow",
+ /*allow_overflow*/
+ p[15] ? (
+ /*overflow_behavior*/
+ p[16]
+ ) : "hidden"
+ ), v[0] & /*scale*/
+ 131072 && ce(
+ e,
+ "flex-grow",
+ /*scale*/
+ p[17]
+ ), v[0] & /*min_width*/
+ 262144 && ce(e, "min-width", `calc(min(${/*min_width*/
+ p[18]}px, 100%))`);
+ },
+ i(p) {
+ i || (kl(l, p), i = !0);
+ },
+ o(p) {
+ Sl(l, p), i = !1;
+ },
+ d(p) {
+ p && $t(e), l && l.d(p), u && u.d(), n[32](null);
+ }
+ };
+}
+function Bi(n) {
+ let e;
+ return {
+ c() {
+ e = yl("div"), this.h();
+ },
+ l(t) {
+ e = _l(t, "DIV", { class: !0 }), rr(e).forEach($t), this.h();
+ },
+ h() {
+ Pe(e, "class", "placeholder svelte-239wnu"), ce(
+ e,
+ "height",
+ /*placeholder_height*/
+ n[22] + "px"
+ ), ce(
+ e,
+ "width",
+ /*placeholder_width*/
+ n[23] + "px"
+ );
+ },
+ m(t, r) {
+ lr(t, e, r);
+ },
+ p(t, r) {
+ r[0] & /*placeholder_height*/
+ 4194304 && ce(
+ e,
+ "height",
+ /*placeholder_height*/
+ t[22] + "px"
+ ), r[0] & /*placeholder_width*/
+ 8388608 && ce(
+ e,
+ "width",
+ /*placeholder_width*/
+ t[23] + "px"
+ );
+ },
+ d(t) {
+ t && $t(e);
+ }
+ };
+}
+function p1(n) {
+ let e, t, r, a = (
+ /*tag*/
+ n[25] && f1(n)
+ ), i = (
+ /*fullscreen*/
+ n[0] && Bi(n)
+ );
+ return {
+ c() {
+ a && a.c(), e = wl(), i && i.c(), t = $i();
+ },
+ l(s) {
+ a && a.l(s), e = bl(s), i && i.l(s), t = $i();
+ },
+ m(s, l) {
+ a && a.m(s, l), lr(s, e, l), i && i.m(s, l), lr(s, t, l), r = !0;
+ },
+ p(s, l) {
+ /*tag*/
+ s[25] && a.p(s, l), /*fullscreen*/
+ s[0] ? i ? i.p(s, l) : (i = Bi(s), i.c(), i.m(t.parentNode, t)) : i && (i.d(1), i = null);
+ },
+ i(s) {
+ r || (kl(a, s), r = !0);
+ },
+ o(s) {
+ Sl(a, s), r = !1;
+ },
+ d(s) {
+ s && ($t(e), $t(t)), a && a.d(s), i && i.d(s);
+ }
+ };
+}
+function g1(n, e, t) {
+ let { $$slots: r = {}, $$scope: a } = e, { height: i = void 0 } = e, { min_height: s = void 0 } = e, { max_height: l = void 0 } = e, { width: u = void 0 } = e, { elem_id: h = "" } = e, { elem_classes: d = [] } = e, { variant: f = "solid" } = e, { border_mode: p = "base" } = e, { padding: v = !0 } = e, { type: w = "normal" } = e, { test_id: D = void 0 } = e, { explicit_call: C = !1 } = e, { container: $ = !0 } = e, { visible: k = !0 } = e, { allow_overflow: _ = !0 } = e, { overflow_behavior: A = "auto" } = e, { scale: E = null } = e, { min_width: M = 0 } = e, { flex: T = !1 } = e, { resizable: P = !1 } = e, { rtl: I = !1 } = e, { fullscreen: K = !1 } = e, j = K, J, $e = w === "fieldset" ? "fieldset" : "div", se = 0, ge = 0, fe = null;
+ function qe(R) {
+ K && R.key === "Escape" && t(0, K = !1);
+ }
+ const oe = (R) => {
+ if (R !== void 0) {
+ if (typeof R == "number")
+ return R + "px";
+ if (typeof R == "string")
+ return R;
+ }
+ }, Ae = (R) => {
+ let le = R.clientY;
+ const ue = (L) => {
+ const He = L.clientY - le;
+ le = L.clientY, t(21, J.style.height = `${J.offsetHeight + He}px`, J);
+ }, Ee = () => {
+ window.removeEventListener("mousemove", ue), window.removeEventListener("mouseup", Ee);
+ };
+ window.addEventListener("mousemove", ue), window.addEventListener("mouseup", Ee);
+ };
+ function be(R) {
+ a1[R ? "unshift" : "push"](() => {
+ J = R, t(21, J);
+ });
+ }
+ return n.$$set = (R) => {
+ "height" in R && t(2, i = R.height), "min_height" in R && t(3, s = R.min_height), "max_height" in R && t(4, l = R.max_height), "width" in R && t(5, u = R.width), "elem_id" in R && t(6, h = R.elem_id), "elem_classes" in R && t(7, d = R.elem_classes), "variant" in R && t(8, f = R.variant), "border_mode" in R && t(9, p = R.border_mode), "padding" in R && t(10, v = R.padding), "type" in R && t(28, w = R.type), "test_id" in R && t(11, D = R.test_id), "explicit_call" in R && t(12, C = R.explicit_call), "container" in R && t(13, $ = R.container), "visible" in R && t(14, k = R.visible), "allow_overflow" in R && t(15, _ = R.allow_overflow), "overflow_behavior" in R && t(16, A = R.overflow_behavior), "scale" in R && t(17, E = R.scale), "min_width" in R && t(18, M = R.min_width), "flex" in R && t(1, T = R.flex), "resizable" in R && t(19, P = R.resizable), "rtl" in R && t(20, I = R.rtl), "fullscreen" in R && t(0, K = R.fullscreen), "$$scope" in R && t(30, a = R.$$scope);
+ }, n.$$.update = () => {
+ n.$$.dirty[0] & /*fullscreen, old_fullscreen, element*/
+ 538968065 && K !== j && (t(29, j = K), K ? (t(24, fe = J.getBoundingClientRect()), t(22, se = J.offsetHeight), t(23, ge = J.offsetWidth), window.addEventListener("keydown", qe)) : (t(24, fe = null), window.removeEventListener("keydown", qe))), n.$$.dirty[0] & /*visible*/
+ 16384 && (k || t(1, T = !1));
+ }, [
+ K,
+ T,
+ i,
+ s,
+ l,
+ u,
+ h,
+ d,
+ f,
+ p,
+ v,
+ D,
+ C,
+ $,
+ k,
+ _,
+ A,
+ E,
+ M,
+ P,
+ I,
+ J,
+ se,
+ ge,
+ fe,
+ $e,
+ oe,
+ Ae,
+ w,
+ j,
+ a,
+ r,
+ be
+ ];
+}
+class v1 extends r1 {
+ constructor(e) {
+ super(), u1(
+ this,
+ e,
+ g1,
+ p1,
+ d1,
+ {
+ height: 2,
+ min_height: 3,
+ max_height: 4,
+ width: 5,
+ elem_id: 6,
+ elem_classes: 7,
+ variant: 8,
+ border_mode: 9,
+ padding: 10,
+ type: 28,
+ test_id: 11,
+ explicit_call: 12,
+ container: 13,
+ visible: 14,
+ allow_overflow: 15,
+ overflow_behavior: 16,
+ scale: 17,
+ min_width: 18,
+ flex: 1,
+ resizable: 19,
+ rtl: 20,
+ fullscreen: 0
+ },
+ null,
+ [-1, -1]
+ );
+ }
+}
+class wa {
+ // The + prefix indicates that these fields aren't writeable
+ // Lexer holding the input string.
+ // Start offset, zero-based inclusive.
+ // End offset, zero-based exclusive.
+ constructor(e, t, r) {
+ this.lexer = void 0, this.start = void 0, this.end = void 0, this.lexer = e, this.start = t, this.end = r;
+ }
+ /**
+ * Merges two `SourceLocation`s from location providers, given they are
+ * provided in order of appearance.
+ * - Returns the first one's location if only the first is provided.
+ * - Returns a merged range of the first and the last if both are provided
+ * and their lexers match.
+ * - Otherwise, returns null.
+ */
+ static range(e, t) {
+ return t ? !e || !e.loc || !t.loc || e.loc.lexer !== t.loc.lexer ? null : new wa(e.loc.lexer, e.loc.start, t.loc.end) : e && e.loc;
+ }
+}
+class ka {
+ // don't expand the token
+ // used in \noexpand
+ constructor(e, t) {
+ this.text = void 0, this.loc = void 0, this.noexpand = void 0, this.treatAsRelax = void 0, this.text = e, this.loc = t;
+ }
+ /**
+ * Given a pair of tokens (this and endToken), compute a `Token` encompassing
+ * the whole input range enclosed by these two.
+ */
+ range(e, t) {
+ return new ka(t, wa.range(this, e));
+ }
+}
+class W {
+ // Error start position based on passed-in Token or ParseNode.
+ // Length of affected text based on passed-in Token or ParseNode.
+ // The underlying error message without any context added.
+ constructor(e, t) {
+ this.name = void 0, this.position = void 0, this.length = void 0, this.rawMessage = void 0;
+ var r = "KaTeX parse error: " + e, a, i, s = t && t.loc;
+ if (s && s.start <= s.end) {
+ var l = s.lexer.input;
+ a = s.start, i = s.end, a === l.length ? r += " at end of input: " : r += " at position " + (a + 1) + ": ";
+ var u = l.slice(a, i).replace(/[^]/g, "$&̲"), h;
+ a > 15 ? h = "…" + l.slice(a - 15, a) : h = l.slice(0, a);
+ var d;
+ i + 15 < l.length ? d = l.slice(i, i + 15) + "…" : d = l.slice(i), r += h + u + d;
+ }
+ var f = new Error(r);
+ return f.name = "ParseError", f.__proto__ = W.prototype, f.position = a, a != null && i != null && (f.length = i - a), f.rawMessage = e, f;
+ }
+}
+W.prototype.__proto__ = Error.prototype;
+var _1 = function(e, t) {
+ return e.indexOf(t) !== -1;
+}, b1 = function(e, t) {
+ return e === void 0 ? t : e;
+}, y1 = /([A-Z])/g, w1 = function(e) {
+ return e.replace(y1, "-$1").toLowerCase();
+}, k1 = {
+ "&": "&",
+ ">": ">",
+ "<": "<",
+ '"': """,
+ "'": "'"
+}, S1 = /[&><"']/g;
+function x1(n) {
+ return String(n).replace(S1, (e) => k1[e]);
+}
+var xl = function n(e) {
+ return e.type === "ordgroup" || e.type === "color" ? e.body.length === 1 ? n(e.body[0]) : e : e.type === "font" ? n(e.body) : e;
+}, D1 = function(e) {
+ var t = xl(e);
+ return t.type === "mathord" || t.type === "textord" || t.type === "atom";
+}, A1 = function(e) {
+ if (!e)
+ throw new Error("Expected non-null, but got " + String(e));
+ return e;
+}, C1 = function(e) {
+ var t = /^[\x00-\x20]*([^\\/#?]*?)(:|*58|*3a|&colon)/i.exec(e);
+ return t ? t[2] !== ":" || !/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1]) ? null : t[1].toLowerCase() : "_relative";
+}, Z = {
+ contains: _1,
+ deflt: b1,
+ escape: x1,
+ hyphenate: w1,
+ getBaseElem: xl,
+ isCharacterBox: D1,
+ protocolFromUrl: C1
+};
+class n0 {
+ constructor(e, t, r) {
+ this.id = void 0, this.size = void 0, this.cramped = void 0, this.id = e, this.size = t, this.cramped = r;
+ }
+ /**
+ * Get the style of a superscript given a base in the current style.
+ */
+ sup() {
+ return Tt[F1[this.id]];
+ }
+ /**
+ * Get the style of a subscript given a base in the current style.
+ */
+ sub() {
+ return Tt[E1[this.id]];
+ }
+ /**
+ * Get the style of a fraction numerator given the fraction in the current
+ * style.
+ */
+ fracNum() {
+ return Tt[T1[this.id]];
+ }
+ /**
+ * Get the style of a fraction denominator given the fraction in the current
+ * style.
+ */
+ fracDen() {
+ return Tt[$1[this.id]];
+ }
+ /**
+ * Get the cramped version of a style (in particular, cramping a cramped style
+ * doesn't change the style).
+ */
+ cramp() {
+ return Tt[M1[this.id]];
+ }
+ /**
+ * Get a text or display version of this style.
+ */
+ text() {
+ return Tt[z1[this.id]];
+ }
+ /**
+ * Return true if this style is tightly spaced (scriptstyle/scriptscriptstyle)
+ */
+ isTight() {
+ return this.size >= 2;
+ }
+}
+var Sa = 0, jr = 1, L0 = 2, Jt = 3, or = 4, lt = 5, O0 = 6, Ve = 7, Tt = [new n0(Sa, 0, !1), new n0(jr, 0, !0), new n0(L0, 1, !1), new n0(Jt, 1, !0), new n0(or, 2, !1), new n0(lt, 2, !0), new n0(O0, 3, !1), new n0(Ve, 3, !0)], F1 = [or, lt, or, lt, O0, Ve, O0, Ve], E1 = [lt, lt, lt, lt, Ve, Ve, Ve, Ve], T1 = [L0, Jt, or, lt, O0, Ve, O0, Ve], $1 = [Jt, Jt, lt, lt, Ve, Ve, Ve, Ve], M1 = [jr, jr, Jt, Jt, lt, lt, Ve, Ve], z1 = [Sa, jr, L0, Jt, L0, Jt, L0, Jt], Q = {
+ DISPLAY: Tt[Sa],
+ TEXT: Tt[L0],
+ SCRIPT: Tt[or],
+ SCRIPTSCRIPT: Tt[O0]
+}, ra = [{
+ // Latin characters beyond the Latin-1 characters we have metrics for.
+ // Needed for Czech, Hungarian and Turkish text, for example.
+ name: "latin",
+ blocks: [
+ [256, 591],
+ // Latin Extended-A and Latin Extended-B
+ [768, 879]
+ // Combining Diacritical marks
+ ]
+}, {
+ // The Cyrillic script used by Russian and related languages.
+ // A Cyrillic subset used to be supported as explicitly defined
+ // symbols in symbols.js
+ name: "cyrillic",
+ blocks: [[1024, 1279]]
+}, {
+ // Armenian
+ name: "armenian",
+ blocks: [[1328, 1423]]
+}, {
+ // The Brahmic scripts of South and Southeast Asia
+ // Devanagari (0900–097F)
+ // Bengali (0980–09FF)
+ // Gurmukhi (0A00–0A7F)
+ // Gujarati (0A80–0AFF)
+ // Oriya (0B00–0B7F)
+ // Tamil (0B80–0BFF)
+ // Telugu (0C00–0C7F)
+ // Kannada (0C80–0CFF)
+ // Malayalam (0D00–0D7F)
+ // Sinhala (0D80–0DFF)
+ // Thai (0E00–0E7F)
+ // Lao (0E80–0EFF)
+ // Tibetan (0F00–0FFF)
+ // Myanmar (1000–109F)
+ name: "brahmic",
+ blocks: [[2304, 4255]]
+}, {
+ name: "georgian",
+ blocks: [[4256, 4351]]
+}, {
+ // Chinese and Japanese.
+ // The "k" in cjk is for Korean, but we've separated Korean out
+ name: "cjk",
+ blocks: [
+ [12288, 12543],
+ // CJK symbols and punctuation, Hiragana, Katakana
+ [19968, 40879],
+ // CJK ideograms
+ [65280, 65376]
+ // Fullwidth punctuation
+ // TODO: add halfwidth Katakana and Romanji glyphs
+ ]
+}, {
+ // Korean
+ name: "hangul",
+ blocks: [[44032, 55215]]
+}];
+function B1(n) {
+ for (var e = 0; e < ra.length; e++)
+ for (var t = ra[e], r = 0; r < t.blocks.length; r++) {
+ var a = t.blocks[r];
+ if (n >= a[0] && n <= a[1])
+ return t.name;
+ }
+ return null;
+}
+var Lr = [];
+ra.forEach((n) => n.blocks.forEach((e) => Lr.push(...e)));
+function R1(n) {
+ for (var e = 0; e < Lr.length; e += 2)
+ if (n >= Lr[e] && n <= Lr[e + 1])
+ return !0;
+ return !1;
+}
+var $0 = 80, q1 = function(e, t) {
+ return "M95," + (622 + e + t) + `
+c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
+c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
+c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
+s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
+c69,-144,104.5,-217.7,106.5,-221
+l` + e / 2.075 + " -" + e + `
+c5.3,-9.3,12,-14,20,-14
+H400000v` + (40 + e) + `H845.2724
+s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
+c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
+M` + (834 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
+}, I1 = function(e, t) {
+ return "M263," + (601 + e + t) + `c0.7,0,18,39.7,52,119
+c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
+c340,-704.7,510.7,-1060.3,512,-1067
+l` + e / 2.084 + " -" + e + `
+c4.7,-7.3,11,-11,19,-11
+H40000v` + (40 + e) + `H1012.3
+s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
+c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
+s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
+c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
+M` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
+}, N1 = function(e, t) {
+ return "M983 " + (10 + e + t) + `
+l` + e / 3.13 + " -" + e + `
+c4,-6.7,10,-10,18,-10 H400000v` + (40 + e) + `
+H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
+s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
+c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
+c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
+c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
+c53.7,-170.3,84.5,-266.8,92.5,-289.5z
+M` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "h-400000z";
+}, L1 = function(e, t) {
+ return "M424," + (2398 + e + t) + `
+c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
+c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
+s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
+s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
+l` + e / 4.223 + " -" + e + `c4,-6.7,10,-10,18,-10 H400000
+v` + (40 + e) + `H1014.6
+s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
+c-2,6,-10,9,-24,9
+c-8,0,-12,-0.7,-12,-2z M` + (1001 + e) + " " + t + `
+h400000v` + (40 + e) + "h-400000z";
+}, O1 = function(e, t) {
+ return "M473," + (2713 + e + t) + `
+c339.3,-1799.3,509.3,-2700,510,-2702 l` + e / 5.298 + " -" + e + `
+c3.3,-7.3,9.3,-11,18,-11 H400000v` + (40 + e) + `H1017.7
+s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
+c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
+c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
+s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
+606zM` + (1001 + e) + " " + t + "h400000v" + (40 + e) + "H1017.7z";
+}, P1 = function(e) {
+ var t = e / 2;
+ return "M400000 " + e + " H0 L" + t + " 0 l65 45 L145 " + (e - 80) + " H400000z";
+}, H1 = function(e, t, r) {
+ var a = r - 54 - t - e;
+ return "M702 " + (e + t) + "H400000" + (40 + e) + `
+H742v` + a + `l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
+h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
+c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
+219 661 l218 661zM702 ` + t + "H400000v" + (40 + e) + "H742z";
+}, U1 = function(e, t, r) {
+ t = 1e3 * t;
+ var a = "";
+ switch (e) {
+ case "sqrtMain":
+ a = q1(t, $0);
+ break;
+ case "sqrtSize1":
+ a = I1(t, $0);
+ break;
+ case "sqrtSize2":
+ a = N1(t, $0);
+ break;
+ case "sqrtSize3":
+ a = L1(t, $0);
+ break;
+ case "sqrtSize4":
+ a = O1(t, $0);
+ break;
+ case "sqrtTall":
+ a = H1(t, $0, r);
+ }
+ return a;
+}, G1 = function(e, t) {
+ switch (e) {
+ case "⎜":
+ return "M291 0 H417 V" + t + " H291z M291 0 H417 V" + t + " H291z";
+ case "∣":
+ return "M145 0 H188 V" + t + " H145z M145 0 H188 V" + t + " H145z";
+ case "∥":
+ return "M145 0 H188 V" + t + " H145z M145 0 H188 V" + t + " H145z" + ("M367 0 H410 V" + t + " H367z M367 0 H410 V" + t + " H367z");
+ case "⎟":
+ return "M457 0 H583 V" + t + " H457z M457 0 H583 V" + t + " H457z";
+ case "⎢":
+ return "M319 0 H403 V" + t + " H319z M319 0 H403 V" + t + " H319z";
+ case "⎥":
+ return "M263 0 H347 V" + t + " H263z M263 0 H347 V" + t + " H263z";
+ case "⎪":
+ return "M384 0 H504 V" + t + " H384z M384 0 H504 V" + t + " H384z";
+ case "⏐":
+ return "M312 0 H355 V" + t + " H312z M312 0 H355 V" + t + " H312z";
+ case "‖":
+ return "M257 0 H300 V" + t + " H257z M257 0 H300 V" + t + " H257z" + ("M478 0 H521 V" + t + " H478z M478 0 H521 V" + t + " H478z");
+ default:
+ return "";
+ }
+}, Ri = {
+ // The doubleleftarrow geometry is from glyph U+21D0 in the font KaTeX Main
+ doubleleftarrow: `M262 157
+l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
+ 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
+ 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
+c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
+ 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
+-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
+-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
+m8 0v40h399730v-40zm0 194v40h399730v-40z`,
+ // doublerightarrow is from glyph U+21D2 in font KaTeX Main
+ doublerightarrow: `M399738 392l
+-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
+ 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
+-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
+-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
+-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
+c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
+-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,
+ // leftarrow is from glyph U+2190 in font KaTeX Main
+ leftarrow: `M400000 241H110l3-3c68.7-52.7 113.7-120
+ 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
+-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
+c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
+ 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
+ 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
+ l-3-3h399890zM100 241v40h399900v-40z`,
+ // overbrace is from glyphs U+23A9/23A8/23A7 in font KaTeX_Size4-Regular
+ leftbrace: `M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
+-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
+ 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,
+ leftbraceunder: `M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
+ 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
+-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,
+ // overgroup is from the MnSymbol package (public domain)
+ leftgroup: `M400000 80
+H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
+ 435 0h399565z`,
+ leftgroupunder: `M400000 262
+H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
+ 435 219h399565z`,
+ // Harpoons are from glyph U+21BD in font KaTeX Main
+ leftharpoon: `M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
+-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
+-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
+-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,
+ leftharpoonplus: `M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
+ 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
+-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
+-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
+m0 0v40h400000v-40z`,
+ leftharpoondown: `M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
+ 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
+-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,
+ leftharpoondownplus: `M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
+ 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
+-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
+v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,
+ // hook is from glyph U+21A9 in font KaTeX Main
+ lefthook: `M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
+-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
+-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
+ 71.5 23h399859zM103 281v-40h399897v40z`,
+ leftlinesegment: `M40 281 V428 H0 V94 H40 V241 H400000 v40z
+M40 281 V428 H0 V94 H40 V241 H400000 v40z`,
+ leftmapsto: `M40 281 V448H0V74H40V241H400000v40z
+M40 281 V448H0V74H40V241H400000v40z`,
+ // tofrom is from glyph U+21C4 in font KaTeX AMS Regular
+ leftToFrom: `M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
+-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
+c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,
+ longequal: `M0 50 h400000 v40H0z m0 194h40000v40H0z
+M0 50 h400000 v40H0z m0 194h40000v40H0z`,
+ midbrace: `M200428 334
+c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
+-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
+ 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,
+ midbraceunder: `M199572 214
+c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
+ 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
+-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,
+ oiintSize1: `M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
+-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
+m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
+60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,
+ oiintSize2: `M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
+-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
+m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
+c0 110 84 276 504 276s502.4-166 502.4-276z`,
+ oiiintSize1: `M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
+-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
+m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
+85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,
+ oiiintSize2: `M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
+-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
+m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
+c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,
+ rightarrow: `M0 241v40h399891c-47.3 35.3-84 78-110 128
+-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
+ 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
+ 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
+-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
+-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
+ 151.7 139 205zm0 0v40h399900v-40z`,
+ rightbrace: `M400000 542l
+-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
+s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
+c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,
+ rightbraceunder: `M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
+-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,
+ rightgroup: `M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
+ 3-1 3-3v-38c-76-158-257-219-435-219H0z`,
+ rightgroupunder: `M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
+ 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,
+ rightharpoon: `M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
+-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
+-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
+ 69.2 92 94.5zm0 0v40h399900v-40z`,
+ rightharpoonplus: `M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
+-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
+ 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
+m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,
+ rightharpoondown: `M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
+ 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
+-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
+-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,
+ rightharpoondownplus: `M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
+ 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
+ 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
+-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
+m0-194v40h400000v-40zm0 0v40h400000v-40z`,
+ righthook: `M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
+ 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
+-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,
+ rightlinesegment: `M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
+M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,
+ rightToFrom: `M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
+-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
+-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,
+ // twoheadleftarrow is from glyph U+219E in font KaTeX AMS Regular
+ twoheadleftarrow: `M0 167c68 40
+ 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
+-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
+-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
+-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
+ 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,
+ twoheadrightarrow: `M400000 167
+c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
+ 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
+-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
+ 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,
+ // tilde1 is a modified version of a glyph from the MnSymbol package
+ tilde1: `M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
+-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
+ 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
+-68.267.847-113-73.952-191-73.952z`,
+ // ditto tilde2, tilde3, & tilde4
+ tilde2: `M344 55.266c-142 0-300.638 81.316-311.5 86.418
+-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
+c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
+ 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,
+ tilde3: `M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
+-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
+ -338 0-409-156.573-744-156.573z`,
+ tilde4: `M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
+-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
+ -175.236-744-175.236z`,
+ // vec is from glyph U+20D7 in font KaTeX Main
+ vec: `M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
+3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
+10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
+-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
+-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
+H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
+c-16-25.333-24-45-24-59z`,
+ // widehat1 is a modified version of a glyph from the MnSymbol package
+ widehat1: `M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
+c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,
+ // ditto widehat2, widehat3, & widehat4
+ widehat2: `M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
+-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
+ widehat3: `M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
+-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
+ widehat4: `M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
+-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,
+ // widecheck paths are all inverted versions of widehat
+ widecheck1: `M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
+-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,
+ widecheck2: `M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
+-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
+ widecheck3: `M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
+-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
+ widecheck4: `M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
+-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,
+ // The next ten paths support reaction arrows from the mhchem package.
+ // Arrows for \ce{<-->} are offset from xAxis by 0.22ex, per mhchem in LaTeX
+ // baraboveleftarrow is mostly from glyph U+2190 in font KaTeX Main
+ baraboveleftarrow: `M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
+c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
+c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
+s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
+121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
+s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
+c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
+M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,
+ // rightarrowabovebar is mostly from glyph U+2192, KaTeX Main
+ rightarrowabovebar: `M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
+-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
+13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
+-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
+-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
+-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
+151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,
+ // The short left harpoon has 0.5em (i.e. 500 units) kern on the left end.
+ // Ref from mhchem.sty: \rlap{\raisebox{-.22ex}{$\kern0.5em
+ baraboveshortleftharpoon: `M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
+c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
+c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
+c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
+c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
+M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,
+ rightharpoonaboveshortbar: `M0,241 l0,40c399126,0,399993,0,399993,0
+c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
+-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
+c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
+M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,
+ shortbaraboveleftharpoon: `M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
+c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
+1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
+-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
+M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,
+ shortrightharpoonabovebar: `M53,241l0,40c398570,0,399437,0,399437,0
+c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
+-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
+c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
+M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`
+}, j1 = function(e, t) {
+ switch (e) {
+ case "lbrack":
+ return "M403 1759 V84 H666 V0 H319 V1759 v" + t + ` v1759 h347 v-84
+H403z M403 1759 V0 H319 V1759 v` + t + " v1759 h84z";
+ case "rbrack":
+ return "M347 1759 V0 H0 V84 H263 V1759 v" + t + ` v1759 H0 v84 H347z
+M347 1759 V0 H263 V1759 v` + t + " v1759 h84z";
+ case "vert":
+ return "M145 15 v585 v" + t + ` v585 c2.667,10,9.667,15,21,15
+c10,0,16.667,-5,20,-15 v-585 v` + -t + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
+c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + t + " v585 h43z";
+ case "doublevert":
+ return "M145 15 v585 v" + t + ` v585 c2.667,10,9.667,15,21,15
+c10,0,16.667,-5,20,-15 v-585 v` + -t + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
+c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v` + t + ` v585 h43z
+M367 15 v585 v` + t + ` v585 c2.667,10,9.667,15,21,15
+c10,0,16.667,-5,20,-15 v-585 v` + -t + ` v-585 c-2.667,-10,-9.667,-15,-21,-15
+c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v` + t + " v585 h43z";
+ case "lfloor":
+ return "M319 602 V0 H403 V602 v" + t + ` v1715 h263 v84 H319z
+MM319 602 V0 H403 V602 v` + t + " v1715 H319z";
+ case "rfloor":
+ return "M319 602 V0 H403 V602 v" + t + ` v1799 H0 v-84 H319z
+MM319 602 V0 H403 V602 v` + t + " v1715 H319z";
+ case "lceil":
+ return "M403 1759 V84 H666 V0 H319 V1759 v" + t + ` v602 h84z
+M403 1759 V0 H319 V1759 v` + t + " v602 h84z";
+ case "rceil":
+ return "M347 1759 V0 H0 V84 H263 V1759 v" + t + ` v602 h84z
+M347 1759 V0 h-84 V1759 v` + t + " v602 h84z";
+ case "lparen":
+ return `M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
+c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
+-36,557 l0,` + (t + 84) + `c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
+949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
+c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
+-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
+l0,-` + (t + 92) + `c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
+-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;
+ case "rparen":
+ return `M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
+63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
+c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,` + (t + 9) + `
+c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
+c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
+c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
+c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
+l0,-` + (t + 144) + `c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
+-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;
+ default:
+ throw new Error("Unknown stretchy delimiter.");
+ }
+};
+class cr {
+ // HtmlDomNode
+ // Never used; needed for satisfying interface.
+ constructor(e) {
+ this.children = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.children = e, this.classes = [], this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = {};
+ }
+ hasClass(e) {
+ return Z.contains(this.classes, e);
+ }
+ /** Convert the fragment into a node. */
+ toNode() {
+ for (var e = document.createDocumentFragment(), t = 0; t < this.children.length; t++)
+ e.appendChild(this.children[t].toNode());
+ return e;
+ }
+ /** Convert the fragment into HTML markup. */
+ toMarkup() {
+ for (var e = "", t = 0; t < this.children.length; t++)
+ e += this.children[t].toMarkup();
+ return e;
+ }
+ /**
+ * Converts the math node into a string, similar to innerText. Applies to
+ * MathDomNode's only.
+ */
+ toText() {
+ var e = (t) => t.toText();
+ return this.children.map(e).join("");
+ }
+}
+var Qt = {
+ "AMS-Regular": {
+ 32: [0, 0, 0, 0, 0.25],
+ 65: [0, 0.68889, 0, 0, 0.72222],
+ 66: [0, 0.68889, 0, 0, 0.66667],
+ 67: [0, 0.68889, 0, 0, 0.72222],
+ 68: [0, 0.68889, 0, 0, 0.72222],
+ 69: [0, 0.68889, 0, 0, 0.66667],
+ 70: [0, 0.68889, 0, 0, 0.61111],
+ 71: [0, 0.68889, 0, 0, 0.77778],
+ 72: [0, 0.68889, 0, 0, 0.77778],
+ 73: [0, 0.68889, 0, 0, 0.38889],
+ 74: [0.16667, 0.68889, 0, 0, 0.5],
+ 75: [0, 0.68889, 0, 0, 0.77778],
+ 76: [0, 0.68889, 0, 0, 0.66667],
+ 77: [0, 0.68889, 0, 0, 0.94445],
+ 78: [0, 0.68889, 0, 0, 0.72222],
+ 79: [0.16667, 0.68889, 0, 0, 0.77778],
+ 80: [0, 0.68889, 0, 0, 0.61111],
+ 81: [0.16667, 0.68889, 0, 0, 0.77778],
+ 82: [0, 0.68889, 0, 0, 0.72222],
+ 83: [0, 0.68889, 0, 0, 0.55556],
+ 84: [0, 0.68889, 0, 0, 0.66667],
+ 85: [0, 0.68889, 0, 0, 0.72222],
+ 86: [0, 0.68889, 0, 0, 0.72222],
+ 87: [0, 0.68889, 0, 0, 1],
+ 88: [0, 0.68889, 0, 0, 0.72222],
+ 89: [0, 0.68889, 0, 0, 0.72222],
+ 90: [0, 0.68889, 0, 0, 0.66667],
+ 107: [0, 0.68889, 0, 0, 0.55556],
+ 160: [0, 0, 0, 0, 0.25],
+ 165: [0, 0.675, 0.025, 0, 0.75],
+ 174: [0.15559, 0.69224, 0, 0, 0.94666],
+ 240: [0, 0.68889, 0, 0, 0.55556],
+ 295: [0, 0.68889, 0, 0, 0.54028],
+ 710: [0, 0.825, 0, 0, 2.33334],
+ 732: [0, 0.9, 0, 0, 2.33334],
+ 770: [0, 0.825, 0, 0, 2.33334],
+ 771: [0, 0.9, 0, 0, 2.33334],
+ 989: [0.08167, 0.58167, 0, 0, 0.77778],
+ 1008: [0, 0.43056, 0.04028, 0, 0.66667],
+ 8245: [0, 0.54986, 0, 0, 0.275],
+ 8463: [0, 0.68889, 0, 0, 0.54028],
+ 8487: [0, 0.68889, 0, 0, 0.72222],
+ 8498: [0, 0.68889, 0, 0, 0.55556],
+ 8502: [0, 0.68889, 0, 0, 0.66667],
+ 8503: [0, 0.68889, 0, 0, 0.44445],
+ 8504: [0, 0.68889, 0, 0, 0.66667],
+ 8513: [0, 0.68889, 0, 0, 0.63889],
+ 8592: [-0.03598, 0.46402, 0, 0, 0.5],
+ 8594: [-0.03598, 0.46402, 0, 0, 0.5],
+ 8602: [-0.13313, 0.36687, 0, 0, 1],
+ 8603: [-0.13313, 0.36687, 0, 0, 1],
+ 8606: [0.01354, 0.52239, 0, 0, 1],
+ 8608: [0.01354, 0.52239, 0, 0, 1],
+ 8610: [0.01354, 0.52239, 0, 0, 1.11111],
+ 8611: [0.01354, 0.52239, 0, 0, 1.11111],
+ 8619: [0, 0.54986, 0, 0, 1],
+ 8620: [0, 0.54986, 0, 0, 1],
+ 8621: [-0.13313, 0.37788, 0, 0, 1.38889],
+ 8622: [-0.13313, 0.36687, 0, 0, 1],
+ 8624: [0, 0.69224, 0, 0, 0.5],
+ 8625: [0, 0.69224, 0, 0, 0.5],
+ 8630: [0, 0.43056, 0, 0, 1],
+ 8631: [0, 0.43056, 0, 0, 1],
+ 8634: [0.08198, 0.58198, 0, 0, 0.77778],
+ 8635: [0.08198, 0.58198, 0, 0, 0.77778],
+ 8638: [0.19444, 0.69224, 0, 0, 0.41667],
+ 8639: [0.19444, 0.69224, 0, 0, 0.41667],
+ 8642: [0.19444, 0.69224, 0, 0, 0.41667],
+ 8643: [0.19444, 0.69224, 0, 0, 0.41667],
+ 8644: [0.1808, 0.675, 0, 0, 1],
+ 8646: [0.1808, 0.675, 0, 0, 1],
+ 8647: [0.1808, 0.675, 0, 0, 1],
+ 8648: [0.19444, 0.69224, 0, 0, 0.83334],
+ 8649: [0.1808, 0.675, 0, 0, 1],
+ 8650: [0.19444, 0.69224, 0, 0, 0.83334],
+ 8651: [0.01354, 0.52239, 0, 0, 1],
+ 8652: [0.01354, 0.52239, 0, 0, 1],
+ 8653: [-0.13313, 0.36687, 0, 0, 1],
+ 8654: [-0.13313, 0.36687, 0, 0, 1],
+ 8655: [-0.13313, 0.36687, 0, 0, 1],
+ 8666: [0.13667, 0.63667, 0, 0, 1],
+ 8667: [0.13667, 0.63667, 0, 0, 1],
+ 8669: [-0.13313, 0.37788, 0, 0, 1],
+ 8672: [-0.064, 0.437, 0, 0, 1.334],
+ 8674: [-0.064, 0.437, 0, 0, 1.334],
+ 8705: [0, 0.825, 0, 0, 0.5],
+ 8708: [0, 0.68889, 0, 0, 0.55556],
+ 8709: [0.08167, 0.58167, 0, 0, 0.77778],
+ 8717: [0, 0.43056, 0, 0, 0.42917],
+ 8722: [-0.03598, 0.46402, 0, 0, 0.5],
+ 8724: [0.08198, 0.69224, 0, 0, 0.77778],
+ 8726: [0.08167, 0.58167, 0, 0, 0.77778],
+ 8733: [0, 0.69224, 0, 0, 0.77778],
+ 8736: [0, 0.69224, 0, 0, 0.72222],
+ 8737: [0, 0.69224, 0, 0, 0.72222],
+ 8738: [0.03517, 0.52239, 0, 0, 0.72222],
+ 8739: [0.08167, 0.58167, 0, 0, 0.22222],
+ 8740: [0.25142, 0.74111, 0, 0, 0.27778],
+ 8741: [0.08167, 0.58167, 0, 0, 0.38889],
+ 8742: [0.25142, 0.74111, 0, 0, 0.5],
+ 8756: [0, 0.69224, 0, 0, 0.66667],
+ 8757: [0, 0.69224, 0, 0, 0.66667],
+ 8764: [-0.13313, 0.36687, 0, 0, 0.77778],
+ 8765: [-0.13313, 0.37788, 0, 0, 0.77778],
+ 8769: [-0.13313, 0.36687, 0, 0, 0.77778],
+ 8770: [-0.03625, 0.46375, 0, 0, 0.77778],
+ 8774: [0.30274, 0.79383, 0, 0, 0.77778],
+ 8776: [-0.01688, 0.48312, 0, 0, 0.77778],
+ 8778: [0.08167, 0.58167, 0, 0, 0.77778],
+ 8782: [0.06062, 0.54986, 0, 0, 0.77778],
+ 8783: [0.06062, 0.54986, 0, 0, 0.77778],
+ 8785: [0.08198, 0.58198, 0, 0, 0.77778],
+ 8786: [0.08198, 0.58198, 0, 0, 0.77778],
+ 8787: [0.08198, 0.58198, 0, 0, 0.77778],
+ 8790: [0, 0.69224, 0, 0, 0.77778],
+ 8791: [0.22958, 0.72958, 0, 0, 0.77778],
+ 8796: [0.08198, 0.91667, 0, 0, 0.77778],
+ 8806: [0.25583, 0.75583, 0, 0, 0.77778],
+ 8807: [0.25583, 0.75583, 0, 0, 0.77778],
+ 8808: [0.25142, 0.75726, 0, 0, 0.77778],
+ 8809: [0.25142, 0.75726, 0, 0, 0.77778],
+ 8812: [0.25583, 0.75583, 0, 0, 0.5],
+ 8814: [0.20576, 0.70576, 0, 0, 0.77778],
+ 8815: [0.20576, 0.70576, 0, 0, 0.77778],
+ 8816: [0.30274, 0.79383, 0, 0, 0.77778],
+ 8817: [0.30274, 0.79383, 0, 0, 0.77778],
+ 8818: [0.22958, 0.72958, 0, 0, 0.77778],
+ 8819: [0.22958, 0.72958, 0, 0, 0.77778],
+ 8822: [0.1808, 0.675, 0, 0, 0.77778],
+ 8823: [0.1808, 0.675, 0, 0, 0.77778],
+ 8828: [0.13667, 0.63667, 0, 0, 0.77778],
+ 8829: [0.13667, 0.63667, 0, 0, 0.77778],
+ 8830: [0.22958, 0.72958, 0, 0, 0.77778],
+ 8831: [0.22958, 0.72958, 0, 0, 0.77778],
+ 8832: [0.20576, 0.70576, 0, 0, 0.77778],
+ 8833: [0.20576, 0.70576, 0, 0, 0.77778],
+ 8840: [0.30274, 0.79383, 0, 0, 0.77778],
+ 8841: [0.30274, 0.79383, 0, 0, 0.77778],
+ 8842: [0.13597, 0.63597, 0, 0, 0.77778],
+ 8843: [0.13597, 0.63597, 0, 0, 0.77778],
+ 8847: [0.03517, 0.54986, 0, 0, 0.77778],
+ 8848: [0.03517, 0.54986, 0, 0, 0.77778],
+ 8858: [0.08198, 0.58198, 0, 0, 0.77778],
+ 8859: [0.08198, 0.58198, 0, 0, 0.77778],
+ 8861: [0.08198, 0.58198, 0, 0, 0.77778],
+ 8862: [0, 0.675, 0, 0, 0.77778],
+ 8863: [0, 0.675, 0, 0, 0.77778],
+ 8864: [0, 0.675, 0, 0, 0.77778],
+ 8865: [0, 0.675, 0, 0, 0.77778],
+ 8872: [0, 0.69224, 0, 0, 0.61111],
+ 8873: [0, 0.69224, 0, 0, 0.72222],
+ 8874: [0, 0.69224, 0, 0, 0.88889],
+ 8876: [0, 0.68889, 0, 0, 0.61111],
+ 8877: [0, 0.68889, 0, 0, 0.61111],
+ 8878: [0, 0.68889, 0, 0, 0.72222],
+ 8879: [0, 0.68889, 0, 0, 0.72222],
+ 8882: [0.03517, 0.54986, 0, 0, 0.77778],
+ 8883: [0.03517, 0.54986, 0, 0, 0.77778],
+ 8884: [0.13667, 0.63667, 0, 0, 0.77778],
+ 8885: [0.13667, 0.63667, 0, 0, 0.77778],
+ 8888: [0, 0.54986, 0, 0, 1.11111],
+ 8890: [0.19444, 0.43056, 0, 0, 0.55556],
+ 8891: [0.19444, 0.69224, 0, 0, 0.61111],
+ 8892: [0.19444, 0.69224, 0, 0, 0.61111],
+ 8901: [0, 0.54986, 0, 0, 0.27778],
+ 8903: [0.08167, 0.58167, 0, 0, 0.77778],
+ 8905: [0.08167, 0.58167, 0, 0, 0.77778],
+ 8906: [0.08167, 0.58167, 0, 0, 0.77778],
+ 8907: [0, 0.69224, 0, 0, 0.77778],
+ 8908: [0, 0.69224, 0, 0, 0.77778],
+ 8909: [-0.03598, 0.46402, 0, 0, 0.77778],
+ 8910: [0, 0.54986, 0, 0, 0.76042],
+ 8911: [0, 0.54986, 0, 0, 0.76042],
+ 8912: [0.03517, 0.54986, 0, 0, 0.77778],
+ 8913: [0.03517, 0.54986, 0, 0, 0.77778],
+ 8914: [0, 0.54986, 0, 0, 0.66667],
+ 8915: [0, 0.54986, 0, 0, 0.66667],
+ 8916: [0, 0.69224, 0, 0, 0.66667],
+ 8918: [0.0391, 0.5391, 0, 0, 0.77778],
+ 8919: [0.0391, 0.5391, 0, 0, 0.77778],
+ 8920: [0.03517, 0.54986, 0, 0, 1.33334],
+ 8921: [0.03517, 0.54986, 0, 0, 1.33334],
+ 8922: [0.38569, 0.88569, 0, 0, 0.77778],
+ 8923: [0.38569, 0.88569, 0, 0, 0.77778],
+ 8926: [0.13667, 0.63667, 0, 0, 0.77778],
+ 8927: [0.13667, 0.63667, 0, 0, 0.77778],
+ 8928: [0.30274, 0.79383, 0, 0, 0.77778],
+ 8929: [0.30274, 0.79383, 0, 0, 0.77778],
+ 8934: [0.23222, 0.74111, 0, 0, 0.77778],
+ 8935: [0.23222, 0.74111, 0, 0, 0.77778],
+ 8936: [0.23222, 0.74111, 0, 0, 0.77778],
+ 8937: [0.23222, 0.74111, 0, 0, 0.77778],
+ 8938: [0.20576, 0.70576, 0, 0, 0.77778],
+ 8939: [0.20576, 0.70576, 0, 0, 0.77778],
+ 8940: [0.30274, 0.79383, 0, 0, 0.77778],
+ 8941: [0.30274, 0.79383, 0, 0, 0.77778],
+ 8994: [0.19444, 0.69224, 0, 0, 0.77778],
+ 8995: [0.19444, 0.69224, 0, 0, 0.77778],
+ 9416: [0.15559, 0.69224, 0, 0, 0.90222],
+ 9484: [0, 0.69224, 0, 0, 0.5],
+ 9488: [0, 0.69224, 0, 0, 0.5],
+ 9492: [0, 0.37788, 0, 0, 0.5],
+ 9496: [0, 0.37788, 0, 0, 0.5],
+ 9585: [0.19444, 0.68889, 0, 0, 0.88889],
+ 9586: [0.19444, 0.74111, 0, 0, 0.88889],
+ 9632: [0, 0.675, 0, 0, 0.77778],
+ 9633: [0, 0.675, 0, 0, 0.77778],
+ 9650: [0, 0.54986, 0, 0, 0.72222],
+ 9651: [0, 0.54986, 0, 0, 0.72222],
+ 9654: [0.03517, 0.54986, 0, 0, 0.77778],
+ 9660: [0, 0.54986, 0, 0, 0.72222],
+ 9661: [0, 0.54986, 0, 0, 0.72222],
+ 9664: [0.03517, 0.54986, 0, 0, 0.77778],
+ 9674: [0.11111, 0.69224, 0, 0, 0.66667],
+ 9733: [0.19444, 0.69224, 0, 0, 0.94445],
+ 10003: [0, 0.69224, 0, 0, 0.83334],
+ 10016: [0, 0.69224, 0, 0, 0.83334],
+ 10731: [0.11111, 0.69224, 0, 0, 0.66667],
+ 10846: [0.19444, 0.75583, 0, 0, 0.61111],
+ 10877: [0.13667, 0.63667, 0, 0, 0.77778],
+ 10878: [0.13667, 0.63667, 0, 0, 0.77778],
+ 10885: [0.25583, 0.75583, 0, 0, 0.77778],
+ 10886: [0.25583, 0.75583, 0, 0, 0.77778],
+ 10887: [0.13597, 0.63597, 0, 0, 0.77778],
+ 10888: [0.13597, 0.63597, 0, 0, 0.77778],
+ 10889: [0.26167, 0.75726, 0, 0, 0.77778],
+ 10890: [0.26167, 0.75726, 0, 0, 0.77778],
+ 10891: [0.48256, 0.98256, 0, 0, 0.77778],
+ 10892: [0.48256, 0.98256, 0, 0, 0.77778],
+ 10901: [0.13667, 0.63667, 0, 0, 0.77778],
+ 10902: [0.13667, 0.63667, 0, 0, 0.77778],
+ 10933: [0.25142, 0.75726, 0, 0, 0.77778],
+ 10934: [0.25142, 0.75726, 0, 0, 0.77778],
+ 10935: [0.26167, 0.75726, 0, 0, 0.77778],
+ 10936: [0.26167, 0.75726, 0, 0, 0.77778],
+ 10937: [0.26167, 0.75726, 0, 0, 0.77778],
+ 10938: [0.26167, 0.75726, 0, 0, 0.77778],
+ 10949: [0.25583, 0.75583, 0, 0, 0.77778],
+ 10950: [0.25583, 0.75583, 0, 0, 0.77778],
+ 10955: [0.28481, 0.79383, 0, 0, 0.77778],
+ 10956: [0.28481, 0.79383, 0, 0, 0.77778],
+ 57350: [0.08167, 0.58167, 0, 0, 0.22222],
+ 57351: [0.08167, 0.58167, 0, 0, 0.38889],
+ 57352: [0.08167, 0.58167, 0, 0, 0.77778],
+ 57353: [0, 0.43056, 0.04028, 0, 0.66667],
+ 57356: [0.25142, 0.75726, 0, 0, 0.77778],
+ 57357: [0.25142, 0.75726, 0, 0, 0.77778],
+ 57358: [0.41951, 0.91951, 0, 0, 0.77778],
+ 57359: [0.30274, 0.79383, 0, 0, 0.77778],
+ 57360: [0.30274, 0.79383, 0, 0, 0.77778],
+ 57361: [0.41951, 0.91951, 0, 0, 0.77778],
+ 57366: [0.25142, 0.75726, 0, 0, 0.77778],
+ 57367: [0.25142, 0.75726, 0, 0, 0.77778],
+ 57368: [0.25142, 0.75726, 0, 0, 0.77778],
+ 57369: [0.25142, 0.75726, 0, 0, 0.77778],
+ 57370: [0.13597, 0.63597, 0, 0, 0.77778],
+ 57371: [0.13597, 0.63597, 0, 0, 0.77778]
+ },
+ "Caligraphic-Regular": {
+ 32: [0, 0, 0, 0, 0.25],
+ 65: [0, 0.68333, 0, 0.19445, 0.79847],
+ 66: [0, 0.68333, 0.03041, 0.13889, 0.65681],
+ 67: [0, 0.68333, 0.05834, 0.13889, 0.52653],
+ 68: [0, 0.68333, 0.02778, 0.08334, 0.77139],
+ 69: [0, 0.68333, 0.08944, 0.11111, 0.52778],
+ 70: [0, 0.68333, 0.09931, 0.11111, 0.71875],
+ 71: [0.09722, 0.68333, 0.0593, 0.11111, 0.59487],
+ 72: [0, 0.68333, 965e-5, 0.11111, 0.84452],
+ 73: [0, 0.68333, 0.07382, 0, 0.54452],
+ 74: [0.09722, 0.68333, 0.18472, 0.16667, 0.67778],
+ 75: [0, 0.68333, 0.01445, 0.05556, 0.76195],
+ 76: [0, 0.68333, 0, 0.13889, 0.68972],
+ 77: [0, 0.68333, 0, 0.13889, 1.2009],
+ 78: [0, 0.68333, 0.14736, 0.08334, 0.82049],
+ 79: [0, 0.68333, 0.02778, 0.11111, 0.79611],
+ 80: [0, 0.68333, 0.08222, 0.08334, 0.69556],
+ 81: [0.09722, 0.68333, 0, 0.11111, 0.81667],
+ 82: [0, 0.68333, 0, 0.08334, 0.8475],
+ 83: [0, 0.68333, 0.075, 0.13889, 0.60556],
+ 84: [0, 0.68333, 0.25417, 0, 0.54464],
+ 85: [0, 0.68333, 0.09931, 0.08334, 0.62583],
+ 86: [0, 0.68333, 0.08222, 0, 0.61278],
+ 87: [0, 0.68333, 0.08222, 0.08334, 0.98778],
+ 88: [0, 0.68333, 0.14643, 0.13889, 0.7133],
+ 89: [0.09722, 0.68333, 0.08222, 0.08334, 0.66834],
+ 90: [0, 0.68333, 0.07944, 0.13889, 0.72473],
+ 160: [0, 0, 0, 0, 0.25]
+ },
+ "Fraktur-Regular": {
+ 32: [0, 0, 0, 0, 0.25],
+ 33: [0, 0.69141, 0, 0, 0.29574],
+ 34: [0, 0.69141, 0, 0, 0.21471],
+ 38: [0, 0.69141, 0, 0, 0.73786],
+ 39: [0, 0.69141, 0, 0, 0.21201],
+ 40: [0.24982, 0.74947, 0, 0, 0.38865],
+ 41: [0.24982, 0.74947, 0, 0, 0.38865],
+ 42: [0, 0.62119, 0, 0, 0.27764],
+ 43: [0.08319, 0.58283, 0, 0, 0.75623],
+ 44: [0, 0.10803, 0, 0, 0.27764],
+ 45: [0.08319, 0.58283, 0, 0, 0.75623],
+ 46: [0, 0.10803, 0, 0, 0.27764],
+ 47: [0.24982, 0.74947, 0, 0, 0.50181],
+ 48: [0, 0.47534, 0, 0, 0.50181],
+ 49: [0, 0.47534, 0, 0, 0.50181],
+ 50: [0, 0.47534, 0, 0, 0.50181],
+ 51: [0.18906, 0.47534, 0, 0, 0.50181],
+ 52: [0.18906, 0.47534, 0, 0, 0.50181],
+ 53: [0.18906, 0.47534, 0, 0, 0.50181],
+ 54: [0, 0.69141, 0, 0, 0.50181],
+ 55: [0.18906, 0.47534, 0, 0, 0.50181],
+ 56: [0, 0.69141, 0, 0, 0.50181],
+ 57: [0.18906, 0.47534, 0, 0, 0.50181],
+ 58: [0, 0.47534, 0, 0, 0.21606],
+ 59: [0.12604, 0.47534, 0, 0, 0.21606],
+ 61: [-0.13099, 0.36866, 0, 0, 0.75623],
+ 63: [0, 0.69141, 0, 0, 0.36245],
+ 65: [0, 0.69141, 0, 0, 0.7176],
+ 66: [0, 0.69141, 0, 0, 0.88397],
+ 67: [0, 0.69141, 0, 0, 0.61254],
+ 68: [0, 0.69141, 0, 0, 0.83158],
+ 69: [0, 0.69141, 0, 0, 0.66278],
+ 70: [0.12604, 0.69141, 0, 0, 0.61119],
+ 71: [0, 0.69141, 0, 0, 0.78539],
+ 72: [0.06302, 0.69141, 0, 0, 0.7203],
+ 73: [0, 0.69141, 0, 0, 0.55448],
+ 74: [0.12604, 0.69141, 0, 0, 0.55231],
+ 75: [0, 0.69141, 0, 0, 0.66845],
+ 76: [0, 0.69141, 0, 0, 0.66602],
+ 77: [0, 0.69141, 0, 0, 1.04953],
+ 78: [0, 0.69141, 0, 0, 0.83212],
+ 79: [0, 0.69141, 0, 0, 0.82699],
+ 80: [0.18906, 0.69141, 0, 0, 0.82753],
+ 81: [0.03781, 0.69141, 0, 0, 0.82699],
+ 82: [0, 0.69141, 0, 0, 0.82807],
+ 83: [0, 0.69141, 0, 0, 0.82861],
+ 84: [0, 0.69141, 0, 0, 0.66899],
+ 85: [0, 0.69141, 0, 0, 0.64576],
+ 86: [0, 0.69141, 0, 0, 0.83131],
+ 87: [0, 0.69141, 0, 0, 1.04602],
+ 88: [0, 0.69141, 0, 0, 0.71922],
+ 89: [0.18906, 0.69141, 0, 0, 0.83293],
+ 90: [0.12604, 0.69141, 0, 0, 0.60201],
+ 91: [0.24982, 0.74947, 0, 0, 0.27764],
+ 93: [0.24982, 0.74947, 0, 0, 0.27764],
+ 94: [0, 0.69141, 0, 0, 0.49965],
+ 97: [0, 0.47534, 0, 0, 0.50046],
+ 98: [0, 0.69141, 0, 0, 0.51315],
+ 99: [0, 0.47534, 0, 0, 0.38946],
+ 100: [0, 0.62119, 0, 0, 0.49857],
+ 101: [0, 0.47534, 0, 0, 0.40053],
+ 102: [0.18906, 0.69141, 0, 0, 0.32626],
+ 103: [0.18906, 0.47534, 0, 0, 0.5037],
+ 104: [0.18906, 0.69141, 0, 0, 0.52126],
+ 105: [0, 0.69141, 0, 0, 0.27899],
+ 106: [0, 0.69141, 0, 0, 0.28088],
+ 107: [0, 0.69141, 0, 0, 0.38946],
+ 108: [0, 0.69141, 0, 0, 0.27953],
+ 109: [0, 0.47534, 0, 0, 0.76676],
+ 110: [0, 0.47534, 0, 0, 0.52666],
+ 111: [0, 0.47534, 0, 0, 0.48885],
+ 112: [0.18906, 0.52396, 0, 0, 0.50046],
+ 113: [0.18906, 0.47534, 0, 0, 0.48912],
+ 114: [0, 0.47534, 0, 0, 0.38919],
+ 115: [0, 0.47534, 0, 0, 0.44266],
+ 116: [0, 0.62119, 0, 0, 0.33301],
+ 117: [0, 0.47534, 0, 0, 0.5172],
+ 118: [0, 0.52396, 0, 0, 0.5118],
+ 119: [0, 0.52396, 0, 0, 0.77351],
+ 120: [0.18906, 0.47534, 0, 0, 0.38865],
+ 121: [0.18906, 0.47534, 0, 0, 0.49884],
+ 122: [0.18906, 0.47534, 0, 0, 0.39054],
+ 160: [0, 0, 0, 0, 0.25],
+ 8216: [0, 0.69141, 0, 0, 0.21471],
+ 8217: [0, 0.69141, 0, 0, 0.21471],
+ 58112: [0, 0.62119, 0, 0, 0.49749],
+ 58113: [0, 0.62119, 0, 0, 0.4983],
+ 58114: [0.18906, 0.69141, 0, 0, 0.33328],
+ 58115: [0.18906, 0.69141, 0, 0, 0.32923],
+ 58116: [0.18906, 0.47534, 0, 0, 0.50343],
+ 58117: [0, 0.69141, 0, 0, 0.33301],
+ 58118: [0, 0.62119, 0, 0, 0.33409],
+ 58119: [0, 0.47534, 0, 0, 0.50073]
+ },
+ "Main-Bold": {
+ 32: [0, 0, 0, 0, 0.25],
+ 33: [0, 0.69444, 0, 0, 0.35],
+ 34: [0, 0.69444, 0, 0, 0.60278],
+ 35: [0.19444, 0.69444, 0, 0, 0.95833],
+ 36: [0.05556, 0.75, 0, 0, 0.575],
+ 37: [0.05556, 0.75, 0, 0, 0.95833],
+ 38: [0, 0.69444, 0, 0, 0.89444],
+ 39: [0, 0.69444, 0, 0, 0.31944],
+ 40: [0.25, 0.75, 0, 0, 0.44722],
+ 41: [0.25, 0.75, 0, 0, 0.44722],
+ 42: [0, 0.75, 0, 0, 0.575],
+ 43: [0.13333, 0.63333, 0, 0, 0.89444],
+ 44: [0.19444, 0.15556, 0, 0, 0.31944],
+ 45: [0, 0.44444, 0, 0, 0.38333],
+ 46: [0, 0.15556, 0, 0, 0.31944],
+ 47: [0.25, 0.75, 0, 0, 0.575],
+ 48: [0, 0.64444, 0, 0, 0.575],
+ 49: [0, 0.64444, 0, 0, 0.575],
+ 50: [0, 0.64444, 0, 0, 0.575],
+ 51: [0, 0.64444, 0, 0, 0.575],
+ 52: [0, 0.64444, 0, 0, 0.575],
+ 53: [0, 0.64444, 0, 0, 0.575],
+ 54: [0, 0.64444, 0, 0, 0.575],
+ 55: [0, 0.64444, 0, 0, 0.575],
+ 56: [0, 0.64444, 0, 0, 0.575],
+ 57: [0, 0.64444, 0, 0, 0.575],
+ 58: [0, 0.44444, 0, 0, 0.31944],
+ 59: [0.19444, 0.44444, 0, 0, 0.31944],
+ 60: [0.08556, 0.58556, 0, 0, 0.89444],
+ 61: [-0.10889, 0.39111, 0, 0, 0.89444],
+ 62: [0.08556, 0.58556, 0, 0, 0.89444],
+ 63: [0, 0.69444, 0, 0, 0.54305],
+ 64: [0, 0.69444, 0, 0, 0.89444],
+ 65: [0, 0.68611, 0, 0, 0.86944],
+ 66: [0, 0.68611, 0, 0, 0.81805],
+ 67: [0, 0.68611, 0, 0, 0.83055],
+ 68: [0, 0.68611, 0, 0, 0.88194],
+ 69: [0, 0.68611, 0, 0, 0.75555],
+ 70: [0, 0.68611, 0, 0, 0.72361],
+ 71: [0, 0.68611, 0, 0, 0.90416],
+ 72: [0, 0.68611, 0, 0, 0.9],
+ 73: [0, 0.68611, 0, 0, 0.43611],
+ 74: [0, 0.68611, 0, 0, 0.59444],
+ 75: [0, 0.68611, 0, 0, 0.90138],
+ 76: [0, 0.68611, 0, 0, 0.69166],
+ 77: [0, 0.68611, 0, 0, 1.09166],
+ 78: [0, 0.68611, 0, 0, 0.9],
+ 79: [0, 0.68611, 0, 0, 0.86388],
+ 80: [0, 0.68611, 0, 0, 0.78611],
+ 81: [0.19444, 0.68611, 0, 0, 0.86388],
+ 82: [0, 0.68611, 0, 0, 0.8625],
+ 83: [0, 0.68611, 0, 0, 0.63889],
+ 84: [0, 0.68611, 0, 0, 0.8],
+ 85: [0, 0.68611, 0, 0, 0.88472],
+ 86: [0, 0.68611, 0.01597, 0, 0.86944],
+ 87: [0, 0.68611, 0.01597, 0, 1.18888],
+ 88: [0, 0.68611, 0, 0, 0.86944],
+ 89: [0, 0.68611, 0.02875, 0, 0.86944],
+ 90: [0, 0.68611, 0, 0, 0.70277],
+ 91: [0.25, 0.75, 0, 0, 0.31944],
+ 92: [0.25, 0.75, 0, 0, 0.575],
+ 93: [0.25, 0.75, 0, 0, 0.31944],
+ 94: [0, 0.69444, 0, 0, 0.575],
+ 95: [0.31, 0.13444, 0.03194, 0, 0.575],
+ 97: [0, 0.44444, 0, 0, 0.55902],
+ 98: [0, 0.69444, 0, 0, 0.63889],
+ 99: [0, 0.44444, 0, 0, 0.51111],
+ 100: [0, 0.69444, 0, 0, 0.63889],
+ 101: [0, 0.44444, 0, 0, 0.52708],
+ 102: [0, 0.69444, 0.10903, 0, 0.35139],
+ 103: [0.19444, 0.44444, 0.01597, 0, 0.575],
+ 104: [0, 0.69444, 0, 0, 0.63889],
+ 105: [0, 0.69444, 0, 0, 0.31944],
+ 106: [0.19444, 0.69444, 0, 0, 0.35139],
+ 107: [0, 0.69444, 0, 0, 0.60694],
+ 108: [0, 0.69444, 0, 0, 0.31944],
+ 109: [0, 0.44444, 0, 0, 0.95833],
+ 110: [0, 0.44444, 0, 0, 0.63889],
+ 111: [0, 0.44444, 0, 0, 0.575],
+ 112: [0.19444, 0.44444, 0, 0, 0.63889],
+ 113: [0.19444, 0.44444, 0, 0, 0.60694],
+ 114: [0, 0.44444, 0, 0, 0.47361],
+ 115: [0, 0.44444, 0, 0, 0.45361],
+ 116: [0, 0.63492, 0, 0, 0.44722],
+ 117: [0, 0.44444, 0, 0, 0.63889],
+ 118: [0, 0.44444, 0.01597, 0, 0.60694],
+ 119: [0, 0.44444, 0.01597, 0, 0.83055],
+ 120: [0, 0.44444, 0, 0, 0.60694],
+ 121: [0.19444, 0.44444, 0.01597, 0, 0.60694],
+ 122: [0, 0.44444, 0, 0, 0.51111],
+ 123: [0.25, 0.75, 0, 0, 0.575],
+ 124: [0.25, 0.75, 0, 0, 0.31944],
+ 125: [0.25, 0.75, 0, 0, 0.575],
+ 126: [0.35, 0.34444, 0, 0, 0.575],
+ 160: [0, 0, 0, 0, 0.25],
+ 163: [0, 0.69444, 0, 0, 0.86853],
+ 168: [0, 0.69444, 0, 0, 0.575],
+ 172: [0, 0.44444, 0, 0, 0.76666],
+ 176: [0, 0.69444, 0, 0, 0.86944],
+ 177: [0.13333, 0.63333, 0, 0, 0.89444],
+ 184: [0.17014, 0, 0, 0, 0.51111],
+ 198: [0, 0.68611, 0, 0, 1.04166],
+ 215: [0.13333, 0.63333, 0, 0, 0.89444],
+ 216: [0.04861, 0.73472, 0, 0, 0.89444],
+ 223: [0, 0.69444, 0, 0, 0.59722],
+ 230: [0, 0.44444, 0, 0, 0.83055],
+ 247: [0.13333, 0.63333, 0, 0, 0.89444],
+ 248: [0.09722, 0.54167, 0, 0, 0.575],
+ 305: [0, 0.44444, 0, 0, 0.31944],
+ 338: [0, 0.68611, 0, 0, 1.16944],
+ 339: [0, 0.44444, 0, 0, 0.89444],
+ 567: [0.19444, 0.44444, 0, 0, 0.35139],
+ 710: [0, 0.69444, 0, 0, 0.575],
+ 711: [0, 0.63194, 0, 0, 0.575],
+ 713: [0, 0.59611, 0, 0, 0.575],
+ 714: [0, 0.69444, 0, 0, 0.575],
+ 715: [0, 0.69444, 0, 0, 0.575],
+ 728: [0, 0.69444, 0, 0, 0.575],
+ 729: [0, 0.69444, 0, 0, 0.31944],
+ 730: [0, 0.69444, 0, 0, 0.86944],
+ 732: [0, 0.69444, 0, 0, 0.575],
+ 733: [0, 0.69444, 0, 0, 0.575],
+ 915: [0, 0.68611, 0, 0, 0.69166],
+ 916: [0, 0.68611, 0, 0, 0.95833],
+ 920: [0, 0.68611, 0, 0, 0.89444],
+ 923: [0, 0.68611, 0, 0, 0.80555],
+ 926: [0, 0.68611, 0, 0, 0.76666],
+ 928: [0, 0.68611, 0, 0, 0.9],
+ 931: [0, 0.68611, 0, 0, 0.83055],
+ 933: [0, 0.68611, 0, 0, 0.89444],
+ 934: [0, 0.68611, 0, 0, 0.83055],
+ 936: [0, 0.68611, 0, 0, 0.89444],
+ 937: [0, 0.68611, 0, 0, 0.83055],
+ 8211: [0, 0.44444, 0.03194, 0, 0.575],
+ 8212: [0, 0.44444, 0.03194, 0, 1.14999],
+ 8216: [0, 0.69444, 0, 0, 0.31944],
+ 8217: [0, 0.69444, 0, 0, 0.31944],
+ 8220: [0, 0.69444, 0, 0, 0.60278],
+ 8221: [0, 0.69444, 0, 0, 0.60278],
+ 8224: [0.19444, 0.69444, 0, 0, 0.51111],
+ 8225: [0.19444, 0.69444, 0, 0, 0.51111],
+ 8242: [0, 0.55556, 0, 0, 0.34444],
+ 8407: [0, 0.72444, 0.15486, 0, 0.575],
+ 8463: [0, 0.69444, 0, 0, 0.66759],
+ 8465: [0, 0.69444, 0, 0, 0.83055],
+ 8467: [0, 0.69444, 0, 0, 0.47361],
+ 8472: [0.19444, 0.44444, 0, 0, 0.74027],
+ 8476: [0, 0.69444, 0, 0, 0.83055],
+ 8501: [0, 0.69444, 0, 0, 0.70277],
+ 8592: [-0.10889, 0.39111, 0, 0, 1.14999],
+ 8593: [0.19444, 0.69444, 0, 0, 0.575],
+ 8594: [-0.10889, 0.39111, 0, 0, 1.14999],
+ 8595: [0.19444, 0.69444, 0, 0, 0.575],
+ 8596: [-0.10889, 0.39111, 0, 0, 1.14999],
+ 8597: [0.25, 0.75, 0, 0, 0.575],
+ 8598: [0.19444, 0.69444, 0, 0, 1.14999],
+ 8599: [0.19444, 0.69444, 0, 0, 1.14999],
+ 8600: [0.19444, 0.69444, 0, 0, 1.14999],
+ 8601: [0.19444, 0.69444, 0, 0, 1.14999],
+ 8636: [-0.10889, 0.39111, 0, 0, 1.14999],
+ 8637: [-0.10889, 0.39111, 0, 0, 1.14999],
+ 8640: [-0.10889, 0.39111, 0, 0, 1.14999],
+ 8641: [-0.10889, 0.39111, 0, 0, 1.14999],
+ 8656: [-0.10889, 0.39111, 0, 0, 1.14999],
+ 8657: [0.19444, 0.69444, 0, 0, 0.70277],
+ 8658: [-0.10889, 0.39111, 0, 0, 1.14999],
+ 8659: [0.19444, 0.69444, 0, 0, 0.70277],
+ 8660: [-0.10889, 0.39111, 0, 0, 1.14999],
+ 8661: [0.25, 0.75, 0, 0, 0.70277],
+ 8704: [0, 0.69444, 0, 0, 0.63889],
+ 8706: [0, 0.69444, 0.06389, 0, 0.62847],
+ 8707: [0, 0.69444, 0, 0, 0.63889],
+ 8709: [0.05556, 0.75, 0, 0, 0.575],
+ 8711: [0, 0.68611, 0, 0, 0.95833],
+ 8712: [0.08556, 0.58556, 0, 0, 0.76666],
+ 8715: [0.08556, 0.58556, 0, 0, 0.76666],
+ 8722: [0.13333, 0.63333, 0, 0, 0.89444],
+ 8723: [0.13333, 0.63333, 0, 0, 0.89444],
+ 8725: [0.25, 0.75, 0, 0, 0.575],
+ 8726: [0.25, 0.75, 0, 0, 0.575],
+ 8727: [-0.02778, 0.47222, 0, 0, 0.575],
+ 8728: [-0.02639, 0.47361, 0, 0, 0.575],
+ 8729: [-0.02639, 0.47361, 0, 0, 0.575],
+ 8730: [0.18, 0.82, 0, 0, 0.95833],
+ 8733: [0, 0.44444, 0, 0, 0.89444],
+ 8734: [0, 0.44444, 0, 0, 1.14999],
+ 8736: [0, 0.69224, 0, 0, 0.72222],
+ 8739: [0.25, 0.75, 0, 0, 0.31944],
+ 8741: [0.25, 0.75, 0, 0, 0.575],
+ 8743: [0, 0.55556, 0, 0, 0.76666],
+ 8744: [0, 0.55556, 0, 0, 0.76666],
+ 8745: [0, 0.55556, 0, 0, 0.76666],
+ 8746: [0, 0.55556, 0, 0, 0.76666],
+ 8747: [0.19444, 0.69444, 0.12778, 0, 0.56875],
+ 8764: [-0.10889, 0.39111, 0, 0, 0.89444],
+ 8768: [0.19444, 0.69444, 0, 0, 0.31944],
+ 8771: [222e-5, 0.50222, 0, 0, 0.89444],
+ 8773: [0.027, 0.638, 0, 0, 0.894],
+ 8776: [0.02444, 0.52444, 0, 0, 0.89444],
+ 8781: [222e-5, 0.50222, 0, 0, 0.89444],
+ 8801: [222e-5, 0.50222, 0, 0, 0.89444],
+ 8804: [0.19667, 0.69667, 0, 0, 0.89444],
+ 8805: [0.19667, 0.69667, 0, 0, 0.89444],
+ 8810: [0.08556, 0.58556, 0, 0, 1.14999],
+ 8811: [0.08556, 0.58556, 0, 0, 1.14999],
+ 8826: [0.08556, 0.58556, 0, 0, 0.89444],
+ 8827: [0.08556, 0.58556, 0, 0, 0.89444],
+ 8834: [0.08556, 0.58556, 0, 0, 0.89444],
+ 8835: [0.08556, 0.58556, 0, 0, 0.89444],
+ 8838: [0.19667, 0.69667, 0, 0, 0.89444],
+ 8839: [0.19667, 0.69667, 0, 0, 0.89444],
+ 8846: [0, 0.55556, 0, 0, 0.76666],
+ 8849: [0.19667, 0.69667, 0, 0, 0.89444],
+ 8850: [0.19667, 0.69667, 0, 0, 0.89444],
+ 8851: [0, 0.55556, 0, 0, 0.76666],
+ 8852: [0, 0.55556, 0, 0, 0.76666],
+ 8853: [0.13333, 0.63333, 0, 0, 0.89444],
+ 8854: [0.13333, 0.63333, 0, 0, 0.89444],
+ 8855: [0.13333, 0.63333, 0, 0, 0.89444],
+ 8856: [0.13333, 0.63333, 0, 0, 0.89444],
+ 8857: [0.13333, 0.63333, 0, 0, 0.89444],
+ 8866: [0, 0.69444, 0, 0, 0.70277],
+ 8867: [0, 0.69444, 0, 0, 0.70277],
+ 8868: [0, 0.69444, 0, 0, 0.89444],
+ 8869: [0, 0.69444, 0, 0, 0.89444],
+ 8900: [-0.02639, 0.47361, 0, 0, 0.575],
+ 8901: [-0.02639, 0.47361, 0, 0, 0.31944],
+ 8902: [-0.02778, 0.47222, 0, 0, 0.575],
+ 8968: [0.25, 0.75, 0, 0, 0.51111],
+ 8969: [0.25, 0.75, 0, 0, 0.51111],
+ 8970: [0.25, 0.75, 0, 0, 0.51111],
+ 8971: [0.25, 0.75, 0, 0, 0.51111],
+ 8994: [-0.13889, 0.36111, 0, 0, 1.14999],
+ 8995: [-0.13889, 0.36111, 0, 0, 1.14999],
+ 9651: [0.19444, 0.69444, 0, 0, 1.02222],
+ 9657: [-0.02778, 0.47222, 0, 0, 0.575],
+ 9661: [0.19444, 0.69444, 0, 0, 1.02222],
+ 9667: [-0.02778, 0.47222, 0, 0, 0.575],
+ 9711: [0.19444, 0.69444, 0, 0, 1.14999],
+ 9824: [0.12963, 0.69444, 0, 0, 0.89444],
+ 9825: [0.12963, 0.69444, 0, 0, 0.89444],
+ 9826: [0.12963, 0.69444, 0, 0, 0.89444],
+ 9827: [0.12963, 0.69444, 0, 0, 0.89444],
+ 9837: [0, 0.75, 0, 0, 0.44722],
+ 9838: [0.19444, 0.69444, 0, 0, 0.44722],
+ 9839: [0.19444, 0.69444, 0, 0, 0.44722],
+ 10216: [0.25, 0.75, 0, 0, 0.44722],
+ 10217: [0.25, 0.75, 0, 0, 0.44722],
+ 10815: [0, 0.68611, 0, 0, 0.9],
+ 10927: [0.19667, 0.69667, 0, 0, 0.89444],
+ 10928: [0.19667, 0.69667, 0, 0, 0.89444],
+ 57376: [0.19444, 0.69444, 0, 0, 0]
+ },
+ "Main-BoldItalic": {
+ 32: [0, 0, 0, 0, 0.25],
+ 33: [0, 0.69444, 0.11417, 0, 0.38611],
+ 34: [0, 0.69444, 0.07939, 0, 0.62055],
+ 35: [0.19444, 0.69444, 0.06833, 0, 0.94444],
+ 37: [0.05556, 0.75, 0.12861, 0, 0.94444],
+ 38: [0, 0.69444, 0.08528, 0, 0.88555],
+ 39: [0, 0.69444, 0.12945, 0, 0.35555],
+ 40: [0.25, 0.75, 0.15806, 0, 0.47333],
+ 41: [0.25, 0.75, 0.03306, 0, 0.47333],
+ 42: [0, 0.75, 0.14333, 0, 0.59111],
+ 43: [0.10333, 0.60333, 0.03306, 0, 0.88555],
+ 44: [0.19444, 0.14722, 0, 0, 0.35555],
+ 45: [0, 0.44444, 0.02611, 0, 0.41444],
+ 46: [0, 0.14722, 0, 0, 0.35555],
+ 47: [0.25, 0.75, 0.15806, 0, 0.59111],
+ 48: [0, 0.64444, 0.13167, 0, 0.59111],
+ 49: [0, 0.64444, 0.13167, 0, 0.59111],
+ 50: [0, 0.64444, 0.13167, 0, 0.59111],
+ 51: [0, 0.64444, 0.13167, 0, 0.59111],
+ 52: [0.19444, 0.64444, 0.13167, 0, 0.59111],
+ 53: [0, 0.64444, 0.13167, 0, 0.59111],
+ 54: [0, 0.64444, 0.13167, 0, 0.59111],
+ 55: [0.19444, 0.64444, 0.13167, 0, 0.59111],
+ 56: [0, 0.64444, 0.13167, 0, 0.59111],
+ 57: [0, 0.64444, 0.13167, 0, 0.59111],
+ 58: [0, 0.44444, 0.06695, 0, 0.35555],
+ 59: [0.19444, 0.44444, 0.06695, 0, 0.35555],
+ 61: [-0.10889, 0.39111, 0.06833, 0, 0.88555],
+ 63: [0, 0.69444, 0.11472, 0, 0.59111],
+ 64: [0, 0.69444, 0.09208, 0, 0.88555],
+ 65: [0, 0.68611, 0, 0, 0.86555],
+ 66: [0, 0.68611, 0.0992, 0, 0.81666],
+ 67: [0, 0.68611, 0.14208, 0, 0.82666],
+ 68: [0, 0.68611, 0.09062, 0, 0.87555],
+ 69: [0, 0.68611, 0.11431, 0, 0.75666],
+ 70: [0, 0.68611, 0.12903, 0, 0.72722],
+ 71: [0, 0.68611, 0.07347, 0, 0.89527],
+ 72: [0, 0.68611, 0.17208, 0, 0.8961],
+ 73: [0, 0.68611, 0.15681, 0, 0.47166],
+ 74: [0, 0.68611, 0.145, 0, 0.61055],
+ 75: [0, 0.68611, 0.14208, 0, 0.89499],
+ 76: [0, 0.68611, 0, 0, 0.69777],
+ 77: [0, 0.68611, 0.17208, 0, 1.07277],
+ 78: [0, 0.68611, 0.17208, 0, 0.8961],
+ 79: [0, 0.68611, 0.09062, 0, 0.85499],
+ 80: [0, 0.68611, 0.0992, 0, 0.78721],
+ 81: [0.19444, 0.68611, 0.09062, 0, 0.85499],
+ 82: [0, 0.68611, 0.02559, 0, 0.85944],
+ 83: [0, 0.68611, 0.11264, 0, 0.64999],
+ 84: [0, 0.68611, 0.12903, 0, 0.7961],
+ 85: [0, 0.68611, 0.17208, 0, 0.88083],
+ 86: [0, 0.68611, 0.18625, 0, 0.86555],
+ 87: [0, 0.68611, 0.18625, 0, 1.15999],
+ 88: [0, 0.68611, 0.15681, 0, 0.86555],
+ 89: [0, 0.68611, 0.19803, 0, 0.86555],
+ 90: [0, 0.68611, 0.14208, 0, 0.70888],
+ 91: [0.25, 0.75, 0.1875, 0, 0.35611],
+ 93: [0.25, 0.75, 0.09972, 0, 0.35611],
+ 94: [0, 0.69444, 0.06709, 0, 0.59111],
+ 95: [0.31, 0.13444, 0.09811, 0, 0.59111],
+ 97: [0, 0.44444, 0.09426, 0, 0.59111],
+ 98: [0, 0.69444, 0.07861, 0, 0.53222],
+ 99: [0, 0.44444, 0.05222, 0, 0.53222],
+ 100: [0, 0.69444, 0.10861, 0, 0.59111],
+ 101: [0, 0.44444, 0.085, 0, 0.53222],
+ 102: [0.19444, 0.69444, 0.21778, 0, 0.4],
+ 103: [0.19444, 0.44444, 0.105, 0, 0.53222],
+ 104: [0, 0.69444, 0.09426, 0, 0.59111],
+ 105: [0, 0.69326, 0.11387, 0, 0.35555],
+ 106: [0.19444, 0.69326, 0.1672, 0, 0.35555],
+ 107: [0, 0.69444, 0.11111, 0, 0.53222],
+ 108: [0, 0.69444, 0.10861, 0, 0.29666],
+ 109: [0, 0.44444, 0.09426, 0, 0.94444],
+ 110: [0, 0.44444, 0.09426, 0, 0.64999],
+ 111: [0, 0.44444, 0.07861, 0, 0.59111],
+ 112: [0.19444, 0.44444, 0.07861, 0, 0.59111],
+ 113: [0.19444, 0.44444, 0.105, 0, 0.53222],
+ 114: [0, 0.44444, 0.11111, 0, 0.50167],
+ 115: [0, 0.44444, 0.08167, 0, 0.48694],
+ 116: [0, 0.63492, 0.09639, 0, 0.385],
+ 117: [0, 0.44444, 0.09426, 0, 0.62055],
+ 118: [0, 0.44444, 0.11111, 0, 0.53222],
+ 119: [0, 0.44444, 0.11111, 0, 0.76777],
+ 120: [0, 0.44444, 0.12583, 0, 0.56055],
+ 121: [0.19444, 0.44444, 0.105, 0, 0.56166],
+ 122: [0, 0.44444, 0.13889, 0, 0.49055],
+ 126: [0.35, 0.34444, 0.11472, 0, 0.59111],
+ 160: [0, 0, 0, 0, 0.25],
+ 168: [0, 0.69444, 0.11473, 0, 0.59111],
+ 176: [0, 0.69444, 0, 0, 0.94888],
+ 184: [0.17014, 0, 0, 0, 0.53222],
+ 198: [0, 0.68611, 0.11431, 0, 1.02277],
+ 216: [0.04861, 0.73472, 0.09062, 0, 0.88555],
+ 223: [0.19444, 0.69444, 0.09736, 0, 0.665],
+ 230: [0, 0.44444, 0.085, 0, 0.82666],
+ 248: [0.09722, 0.54167, 0.09458, 0, 0.59111],
+ 305: [0, 0.44444, 0.09426, 0, 0.35555],
+ 338: [0, 0.68611, 0.11431, 0, 1.14054],
+ 339: [0, 0.44444, 0.085, 0, 0.82666],
+ 567: [0.19444, 0.44444, 0.04611, 0, 0.385],
+ 710: [0, 0.69444, 0.06709, 0, 0.59111],
+ 711: [0, 0.63194, 0.08271, 0, 0.59111],
+ 713: [0, 0.59444, 0.10444, 0, 0.59111],
+ 714: [0, 0.69444, 0.08528, 0, 0.59111],
+ 715: [0, 0.69444, 0, 0, 0.59111],
+ 728: [0, 0.69444, 0.10333, 0, 0.59111],
+ 729: [0, 0.69444, 0.12945, 0, 0.35555],
+ 730: [0, 0.69444, 0, 0, 0.94888],
+ 732: [0, 0.69444, 0.11472, 0, 0.59111],
+ 733: [0, 0.69444, 0.11472, 0, 0.59111],
+ 915: [0, 0.68611, 0.12903, 0, 0.69777],
+ 916: [0, 0.68611, 0, 0, 0.94444],
+ 920: [0, 0.68611, 0.09062, 0, 0.88555],
+ 923: [0, 0.68611, 0, 0, 0.80666],
+ 926: [0, 0.68611, 0.15092, 0, 0.76777],
+ 928: [0, 0.68611, 0.17208, 0, 0.8961],
+ 931: [0, 0.68611, 0.11431, 0, 0.82666],
+ 933: [0, 0.68611, 0.10778, 0, 0.88555],
+ 934: [0, 0.68611, 0.05632, 0, 0.82666],
+ 936: [0, 0.68611, 0.10778, 0, 0.88555],
+ 937: [0, 0.68611, 0.0992, 0, 0.82666],
+ 8211: [0, 0.44444, 0.09811, 0, 0.59111],
+ 8212: [0, 0.44444, 0.09811, 0, 1.18221],
+ 8216: [0, 0.69444, 0.12945, 0, 0.35555],
+ 8217: [0, 0.69444, 0.12945, 0, 0.35555],
+ 8220: [0, 0.69444, 0.16772, 0, 0.62055],
+ 8221: [0, 0.69444, 0.07939, 0, 0.62055]
+ },
+ "Main-Italic": {
+ 32: [0, 0, 0, 0, 0.25],
+ 33: [0, 0.69444, 0.12417, 0, 0.30667],
+ 34: [0, 0.69444, 0.06961, 0, 0.51444],
+ 35: [0.19444, 0.69444, 0.06616, 0, 0.81777],
+ 37: [0.05556, 0.75, 0.13639, 0, 0.81777],
+ 38: [0, 0.69444, 0.09694, 0, 0.76666],
+ 39: [0, 0.69444, 0.12417, 0, 0.30667],
+ 40: [0.25, 0.75, 0.16194, 0, 0.40889],
+ 41: [0.25, 0.75, 0.03694, 0, 0.40889],
+ 42: [0, 0.75, 0.14917, 0, 0.51111],
+ 43: [0.05667, 0.56167, 0.03694, 0, 0.76666],
+ 44: [0.19444, 0.10556, 0, 0, 0.30667],
+ 45: [0, 0.43056, 0.02826, 0, 0.35778],
+ 46: [0, 0.10556, 0, 0, 0.30667],
+ 47: [0.25, 0.75, 0.16194, 0, 0.51111],
+ 48: [0, 0.64444, 0.13556, 0, 0.51111],
+ 49: [0, 0.64444, 0.13556, 0, 0.51111],
+ 50: [0, 0.64444, 0.13556, 0, 0.51111],
+ 51: [0, 0.64444, 0.13556, 0, 0.51111],
+ 52: [0.19444, 0.64444, 0.13556, 0, 0.51111],
+ 53: [0, 0.64444, 0.13556, 0, 0.51111],
+ 54: [0, 0.64444, 0.13556, 0, 0.51111],
+ 55: [0.19444, 0.64444, 0.13556, 0, 0.51111],
+ 56: [0, 0.64444, 0.13556, 0, 0.51111],
+ 57: [0, 0.64444, 0.13556, 0, 0.51111],
+ 58: [0, 0.43056, 0.0582, 0, 0.30667],
+ 59: [0.19444, 0.43056, 0.0582, 0, 0.30667],
+ 61: [-0.13313, 0.36687, 0.06616, 0, 0.76666],
+ 63: [0, 0.69444, 0.1225, 0, 0.51111],
+ 64: [0, 0.69444, 0.09597, 0, 0.76666],
+ 65: [0, 0.68333, 0, 0, 0.74333],
+ 66: [0, 0.68333, 0.10257, 0, 0.70389],
+ 67: [0, 0.68333, 0.14528, 0, 0.71555],
+ 68: [0, 0.68333, 0.09403, 0, 0.755],
+ 69: [0, 0.68333, 0.12028, 0, 0.67833],
+ 70: [0, 0.68333, 0.13305, 0, 0.65277],
+ 71: [0, 0.68333, 0.08722, 0, 0.77361],
+ 72: [0, 0.68333, 0.16389, 0, 0.74333],
+ 73: [0, 0.68333, 0.15806, 0, 0.38555],
+ 74: [0, 0.68333, 0.14028, 0, 0.525],
+ 75: [0, 0.68333, 0.14528, 0, 0.76888],
+ 76: [0, 0.68333, 0, 0, 0.62722],
+ 77: [0, 0.68333, 0.16389, 0, 0.89666],
+ 78: [0, 0.68333, 0.16389, 0, 0.74333],
+ 79: [0, 0.68333, 0.09403, 0, 0.76666],
+ 80: [0, 0.68333, 0.10257, 0, 0.67833],
+ 81: [0.19444, 0.68333, 0.09403, 0, 0.76666],
+ 82: [0, 0.68333, 0.03868, 0, 0.72944],
+ 83: [0, 0.68333, 0.11972, 0, 0.56222],
+ 84: [0, 0.68333, 0.13305, 0, 0.71555],
+ 85: [0, 0.68333, 0.16389, 0, 0.74333],
+ 86: [0, 0.68333, 0.18361, 0, 0.74333],
+ 87: [0, 0.68333, 0.18361, 0, 0.99888],
+ 88: [0, 0.68333, 0.15806, 0, 0.74333],
+ 89: [0, 0.68333, 0.19383, 0, 0.74333],
+ 90: [0, 0.68333, 0.14528, 0, 0.61333],
+ 91: [0.25, 0.75, 0.1875, 0, 0.30667],
+ 93: [0.25, 0.75, 0.10528, 0, 0.30667],
+ 94: [0, 0.69444, 0.06646, 0, 0.51111],
+ 95: [0.31, 0.12056, 0.09208, 0, 0.51111],
+ 97: [0, 0.43056, 0.07671, 0, 0.51111],
+ 98: [0, 0.69444, 0.06312, 0, 0.46],
+ 99: [0, 0.43056, 0.05653, 0, 0.46],
+ 100: [0, 0.69444, 0.10333, 0, 0.51111],
+ 101: [0, 0.43056, 0.07514, 0, 0.46],
+ 102: [0.19444, 0.69444, 0.21194, 0, 0.30667],
+ 103: [0.19444, 0.43056, 0.08847, 0, 0.46],
+ 104: [0, 0.69444, 0.07671, 0, 0.51111],
+ 105: [0, 0.65536, 0.1019, 0, 0.30667],
+ 106: [0.19444, 0.65536, 0.14467, 0, 0.30667],
+ 107: [0, 0.69444, 0.10764, 0, 0.46],
+ 108: [0, 0.69444, 0.10333, 0, 0.25555],
+ 109: [0, 0.43056, 0.07671, 0, 0.81777],
+ 110: [0, 0.43056, 0.07671, 0, 0.56222],
+ 111: [0, 0.43056, 0.06312, 0, 0.51111],
+ 112: [0.19444, 0.43056, 0.06312, 0, 0.51111],
+ 113: [0.19444, 0.43056, 0.08847, 0, 0.46],
+ 114: [0, 0.43056, 0.10764, 0, 0.42166],
+ 115: [0, 0.43056, 0.08208, 0, 0.40889],
+ 116: [0, 0.61508, 0.09486, 0, 0.33222],
+ 117: [0, 0.43056, 0.07671, 0, 0.53666],
+ 118: [0, 0.43056, 0.10764, 0, 0.46],
+ 119: [0, 0.43056, 0.10764, 0, 0.66444],
+ 120: [0, 0.43056, 0.12042, 0, 0.46389],
+ 121: [0.19444, 0.43056, 0.08847, 0, 0.48555],
+ 122: [0, 0.43056, 0.12292, 0, 0.40889],
+ 126: [0.35, 0.31786, 0.11585, 0, 0.51111],
+ 160: [0, 0, 0, 0, 0.25],
+ 168: [0, 0.66786, 0.10474, 0, 0.51111],
+ 176: [0, 0.69444, 0, 0, 0.83129],
+ 184: [0.17014, 0, 0, 0, 0.46],
+ 198: [0, 0.68333, 0.12028, 0, 0.88277],
+ 216: [0.04861, 0.73194, 0.09403, 0, 0.76666],
+ 223: [0.19444, 0.69444, 0.10514, 0, 0.53666],
+ 230: [0, 0.43056, 0.07514, 0, 0.71555],
+ 248: [0.09722, 0.52778, 0.09194, 0, 0.51111],
+ 338: [0, 0.68333, 0.12028, 0, 0.98499],
+ 339: [0, 0.43056, 0.07514, 0, 0.71555],
+ 710: [0, 0.69444, 0.06646, 0, 0.51111],
+ 711: [0, 0.62847, 0.08295, 0, 0.51111],
+ 713: [0, 0.56167, 0.10333, 0, 0.51111],
+ 714: [0, 0.69444, 0.09694, 0, 0.51111],
+ 715: [0, 0.69444, 0, 0, 0.51111],
+ 728: [0, 0.69444, 0.10806, 0, 0.51111],
+ 729: [0, 0.66786, 0.11752, 0, 0.30667],
+ 730: [0, 0.69444, 0, 0, 0.83129],
+ 732: [0, 0.66786, 0.11585, 0, 0.51111],
+ 733: [0, 0.69444, 0.1225, 0, 0.51111],
+ 915: [0, 0.68333, 0.13305, 0, 0.62722],
+ 916: [0, 0.68333, 0, 0, 0.81777],
+ 920: [0, 0.68333, 0.09403, 0, 0.76666],
+ 923: [0, 0.68333, 0, 0, 0.69222],
+ 926: [0, 0.68333, 0.15294, 0, 0.66444],
+ 928: [0, 0.68333, 0.16389, 0, 0.74333],
+ 931: [0, 0.68333, 0.12028, 0, 0.71555],
+ 933: [0, 0.68333, 0.11111, 0, 0.76666],
+ 934: [0, 0.68333, 0.05986, 0, 0.71555],
+ 936: [0, 0.68333, 0.11111, 0, 0.76666],
+ 937: [0, 0.68333, 0.10257, 0, 0.71555],
+ 8211: [0, 0.43056, 0.09208, 0, 0.51111],
+ 8212: [0, 0.43056, 0.09208, 0, 1.02222],
+ 8216: [0, 0.69444, 0.12417, 0, 0.30667],
+ 8217: [0, 0.69444, 0.12417, 0, 0.30667],
+ 8220: [0, 0.69444, 0.1685, 0, 0.51444],
+ 8221: [0, 0.69444, 0.06961, 0, 0.51444],
+ 8463: [0, 0.68889, 0, 0, 0.54028]
+ },
+ "Main-Regular": {
+ 32: [0, 0, 0, 0, 0.25],
+ 33: [0, 0.69444, 0, 0, 0.27778],
+ 34: [0, 0.69444, 0, 0, 0.5],
+ 35: [0.19444, 0.69444, 0, 0, 0.83334],
+ 36: [0.05556, 0.75, 0, 0, 0.5],
+ 37: [0.05556, 0.75, 0, 0, 0.83334],
+ 38: [0, 0.69444, 0, 0, 0.77778],
+ 39: [0, 0.69444, 0, 0, 0.27778],
+ 40: [0.25, 0.75, 0, 0, 0.38889],
+ 41: [0.25, 0.75, 0, 0, 0.38889],
+ 42: [0, 0.75, 0, 0, 0.5],
+ 43: [0.08333, 0.58333, 0, 0, 0.77778],
+ 44: [0.19444, 0.10556, 0, 0, 0.27778],
+ 45: [0, 0.43056, 0, 0, 0.33333],
+ 46: [0, 0.10556, 0, 0, 0.27778],
+ 47: [0.25, 0.75, 0, 0, 0.5],
+ 48: [0, 0.64444, 0, 0, 0.5],
+ 49: [0, 0.64444, 0, 0, 0.5],
+ 50: [0, 0.64444, 0, 0, 0.5],
+ 51: [0, 0.64444, 0, 0, 0.5],
+ 52: [0, 0.64444, 0, 0, 0.5],
+ 53: [0, 0.64444, 0, 0, 0.5],
+ 54: [0, 0.64444, 0, 0, 0.5],
+ 55: [0, 0.64444, 0, 0, 0.5],
+ 56: [0, 0.64444, 0, 0, 0.5],
+ 57: [0, 0.64444, 0, 0, 0.5],
+ 58: [0, 0.43056, 0, 0, 0.27778],
+ 59: [0.19444, 0.43056, 0, 0, 0.27778],
+ 60: [0.0391, 0.5391, 0, 0, 0.77778],
+ 61: [-0.13313, 0.36687, 0, 0, 0.77778],
+ 62: [0.0391, 0.5391, 0, 0, 0.77778],
+ 63: [0, 0.69444, 0, 0, 0.47222],
+ 64: [0, 0.69444, 0, 0, 0.77778],
+ 65: [0, 0.68333, 0, 0, 0.75],
+ 66: [0, 0.68333, 0, 0, 0.70834],
+ 67: [0, 0.68333, 0, 0, 0.72222],
+ 68: [0, 0.68333, 0, 0, 0.76389],
+ 69: [0, 0.68333, 0, 0, 0.68056],
+ 70: [0, 0.68333, 0, 0, 0.65278],
+ 71: [0, 0.68333, 0, 0, 0.78472],
+ 72: [0, 0.68333, 0, 0, 0.75],
+ 73: [0, 0.68333, 0, 0, 0.36111],
+ 74: [0, 0.68333, 0, 0, 0.51389],
+ 75: [0, 0.68333, 0, 0, 0.77778],
+ 76: [0, 0.68333, 0, 0, 0.625],
+ 77: [0, 0.68333, 0, 0, 0.91667],
+ 78: [0, 0.68333, 0, 0, 0.75],
+ 79: [0, 0.68333, 0, 0, 0.77778],
+ 80: [0, 0.68333, 0, 0, 0.68056],
+ 81: [0.19444, 0.68333, 0, 0, 0.77778],
+ 82: [0, 0.68333, 0, 0, 0.73611],
+ 83: [0, 0.68333, 0, 0, 0.55556],
+ 84: [0, 0.68333, 0, 0, 0.72222],
+ 85: [0, 0.68333, 0, 0, 0.75],
+ 86: [0, 0.68333, 0.01389, 0, 0.75],
+ 87: [0, 0.68333, 0.01389, 0, 1.02778],
+ 88: [0, 0.68333, 0, 0, 0.75],
+ 89: [0, 0.68333, 0.025, 0, 0.75],
+ 90: [0, 0.68333, 0, 0, 0.61111],
+ 91: [0.25, 0.75, 0, 0, 0.27778],
+ 92: [0.25, 0.75, 0, 0, 0.5],
+ 93: [0.25, 0.75, 0, 0, 0.27778],
+ 94: [0, 0.69444, 0, 0, 0.5],
+ 95: [0.31, 0.12056, 0.02778, 0, 0.5],
+ 97: [0, 0.43056, 0, 0, 0.5],
+ 98: [0, 0.69444, 0, 0, 0.55556],
+ 99: [0, 0.43056, 0, 0, 0.44445],
+ 100: [0, 0.69444, 0, 0, 0.55556],
+ 101: [0, 0.43056, 0, 0, 0.44445],
+ 102: [0, 0.69444, 0.07778, 0, 0.30556],
+ 103: [0.19444, 0.43056, 0.01389, 0, 0.5],
+ 104: [0, 0.69444, 0, 0, 0.55556],
+ 105: [0, 0.66786, 0, 0, 0.27778],
+ 106: [0.19444, 0.66786, 0, 0, 0.30556],
+ 107: [0, 0.69444, 0, 0, 0.52778],
+ 108: [0, 0.69444, 0, 0, 0.27778],
+ 109: [0, 0.43056, 0, 0, 0.83334],
+ 110: [0, 0.43056, 0, 0, 0.55556],
+ 111: [0, 0.43056, 0, 0, 0.5],
+ 112: [0.19444, 0.43056, 0, 0, 0.55556],
+ 113: [0.19444, 0.43056, 0, 0, 0.52778],
+ 114: [0, 0.43056, 0, 0, 0.39167],
+ 115: [0, 0.43056, 0, 0, 0.39445],
+ 116: [0, 0.61508, 0, 0, 0.38889],
+ 117: [0, 0.43056, 0, 0, 0.55556],
+ 118: [0, 0.43056, 0.01389, 0, 0.52778],
+ 119: [0, 0.43056, 0.01389, 0, 0.72222],
+ 120: [0, 0.43056, 0, 0, 0.52778],
+ 121: [0.19444, 0.43056, 0.01389, 0, 0.52778],
+ 122: [0, 0.43056, 0, 0, 0.44445],
+ 123: [0.25, 0.75, 0, 0, 0.5],
+ 124: [0.25, 0.75, 0, 0, 0.27778],
+ 125: [0.25, 0.75, 0, 0, 0.5],
+ 126: [0.35, 0.31786, 0, 0, 0.5],
+ 160: [0, 0, 0, 0, 0.25],
+ 163: [0, 0.69444, 0, 0, 0.76909],
+ 167: [0.19444, 0.69444, 0, 0, 0.44445],
+ 168: [0, 0.66786, 0, 0, 0.5],
+ 172: [0, 0.43056, 0, 0, 0.66667],
+ 176: [0, 0.69444, 0, 0, 0.75],
+ 177: [0.08333, 0.58333, 0, 0, 0.77778],
+ 182: [0.19444, 0.69444, 0, 0, 0.61111],
+ 184: [0.17014, 0, 0, 0, 0.44445],
+ 198: [0, 0.68333, 0, 0, 0.90278],
+ 215: [0.08333, 0.58333, 0, 0, 0.77778],
+ 216: [0.04861, 0.73194, 0, 0, 0.77778],
+ 223: [0, 0.69444, 0, 0, 0.5],
+ 230: [0, 0.43056, 0, 0, 0.72222],
+ 247: [0.08333, 0.58333, 0, 0, 0.77778],
+ 248: [0.09722, 0.52778, 0, 0, 0.5],
+ 305: [0, 0.43056, 0, 0, 0.27778],
+ 338: [0, 0.68333, 0, 0, 1.01389],
+ 339: [0, 0.43056, 0, 0, 0.77778],
+ 567: [0.19444, 0.43056, 0, 0, 0.30556],
+ 710: [0, 0.69444, 0, 0, 0.5],
+ 711: [0, 0.62847, 0, 0, 0.5],
+ 713: [0, 0.56778, 0, 0, 0.5],
+ 714: [0, 0.69444, 0, 0, 0.5],
+ 715: [0, 0.69444, 0, 0, 0.5],
+ 728: [0, 0.69444, 0, 0, 0.5],
+ 729: [0, 0.66786, 0, 0, 0.27778],
+ 730: [0, 0.69444, 0, 0, 0.75],
+ 732: [0, 0.66786, 0, 0, 0.5],
+ 733: [0, 0.69444, 0, 0, 0.5],
+ 915: [0, 0.68333, 0, 0, 0.625],
+ 916: [0, 0.68333, 0, 0, 0.83334],
+ 920: [0, 0.68333, 0, 0, 0.77778],
+ 923: [0, 0.68333, 0, 0, 0.69445],
+ 926: [0, 0.68333, 0, 0, 0.66667],
+ 928: [0, 0.68333, 0, 0, 0.75],
+ 931: [0, 0.68333, 0, 0, 0.72222],
+ 933: [0, 0.68333, 0, 0, 0.77778],
+ 934: [0, 0.68333, 0, 0, 0.72222],
+ 936: [0, 0.68333, 0, 0, 0.77778],
+ 937: [0, 0.68333, 0, 0, 0.72222],
+ 8211: [0, 0.43056, 0.02778, 0, 0.5],
+ 8212: [0, 0.43056, 0.02778, 0, 1],
+ 8216: [0, 0.69444, 0, 0, 0.27778],
+ 8217: [0, 0.69444, 0, 0, 0.27778],
+ 8220: [0, 0.69444, 0, 0, 0.5],
+ 8221: [0, 0.69444, 0, 0, 0.5],
+ 8224: [0.19444, 0.69444, 0, 0, 0.44445],
+ 8225: [0.19444, 0.69444, 0, 0, 0.44445],
+ 8230: [0, 0.123, 0, 0, 1.172],
+ 8242: [0, 0.55556, 0, 0, 0.275],
+ 8407: [0, 0.71444, 0.15382, 0, 0.5],
+ 8463: [0, 0.68889, 0, 0, 0.54028],
+ 8465: [0, 0.69444, 0, 0, 0.72222],
+ 8467: [0, 0.69444, 0, 0.11111, 0.41667],
+ 8472: [0.19444, 0.43056, 0, 0.11111, 0.63646],
+ 8476: [0, 0.69444, 0, 0, 0.72222],
+ 8501: [0, 0.69444, 0, 0, 0.61111],
+ 8592: [-0.13313, 0.36687, 0, 0, 1],
+ 8593: [0.19444, 0.69444, 0, 0, 0.5],
+ 8594: [-0.13313, 0.36687, 0, 0, 1],
+ 8595: [0.19444, 0.69444, 0, 0, 0.5],
+ 8596: [-0.13313, 0.36687, 0, 0, 1],
+ 8597: [0.25, 0.75, 0, 0, 0.5],
+ 8598: [0.19444, 0.69444, 0, 0, 1],
+ 8599: [0.19444, 0.69444, 0, 0, 1],
+ 8600: [0.19444, 0.69444, 0, 0, 1],
+ 8601: [0.19444, 0.69444, 0, 0, 1],
+ 8614: [0.011, 0.511, 0, 0, 1],
+ 8617: [0.011, 0.511, 0, 0, 1.126],
+ 8618: [0.011, 0.511, 0, 0, 1.126],
+ 8636: [-0.13313, 0.36687, 0, 0, 1],
+ 8637: [-0.13313, 0.36687, 0, 0, 1],
+ 8640: [-0.13313, 0.36687, 0, 0, 1],
+ 8641: [-0.13313, 0.36687, 0, 0, 1],
+ 8652: [0.011, 0.671, 0, 0, 1],
+ 8656: [-0.13313, 0.36687, 0, 0, 1],
+ 8657: [0.19444, 0.69444, 0, 0, 0.61111],
+ 8658: [-0.13313, 0.36687, 0, 0, 1],
+ 8659: [0.19444, 0.69444, 0, 0, 0.61111],
+ 8660: [-0.13313, 0.36687, 0, 0, 1],
+ 8661: [0.25, 0.75, 0, 0, 0.61111],
+ 8704: [0, 0.69444, 0, 0, 0.55556],
+ 8706: [0, 0.69444, 0.05556, 0.08334, 0.5309],
+ 8707: [0, 0.69444, 0, 0, 0.55556],
+ 8709: [0.05556, 0.75, 0, 0, 0.5],
+ 8711: [0, 0.68333, 0, 0, 0.83334],
+ 8712: [0.0391, 0.5391, 0, 0, 0.66667],
+ 8715: [0.0391, 0.5391, 0, 0, 0.66667],
+ 8722: [0.08333, 0.58333, 0, 0, 0.77778],
+ 8723: [0.08333, 0.58333, 0, 0, 0.77778],
+ 8725: [0.25, 0.75, 0, 0, 0.5],
+ 8726: [0.25, 0.75, 0, 0, 0.5],
+ 8727: [-0.03472, 0.46528, 0, 0, 0.5],
+ 8728: [-0.05555, 0.44445, 0, 0, 0.5],
+ 8729: [-0.05555, 0.44445, 0, 0, 0.5],
+ 8730: [0.2, 0.8, 0, 0, 0.83334],
+ 8733: [0, 0.43056, 0, 0, 0.77778],
+ 8734: [0, 0.43056, 0, 0, 1],
+ 8736: [0, 0.69224, 0, 0, 0.72222],
+ 8739: [0.25, 0.75, 0, 0, 0.27778],
+ 8741: [0.25, 0.75, 0, 0, 0.5],
+ 8743: [0, 0.55556, 0, 0, 0.66667],
+ 8744: [0, 0.55556, 0, 0, 0.66667],
+ 8745: [0, 0.55556, 0, 0, 0.66667],
+ 8746: [0, 0.55556, 0, 0, 0.66667],
+ 8747: [0.19444, 0.69444, 0.11111, 0, 0.41667],
+ 8764: [-0.13313, 0.36687, 0, 0, 0.77778],
+ 8768: [0.19444, 0.69444, 0, 0, 0.27778],
+ 8771: [-0.03625, 0.46375, 0, 0, 0.77778],
+ 8773: [-0.022, 0.589, 0, 0, 0.778],
+ 8776: [-0.01688, 0.48312, 0, 0, 0.77778],
+ 8781: [-0.03625, 0.46375, 0, 0, 0.77778],
+ 8784: [-0.133, 0.673, 0, 0, 0.778],
+ 8801: [-0.03625, 0.46375, 0, 0, 0.77778],
+ 8804: [0.13597, 0.63597, 0, 0, 0.77778],
+ 8805: [0.13597, 0.63597, 0, 0, 0.77778],
+ 8810: [0.0391, 0.5391, 0, 0, 1],
+ 8811: [0.0391, 0.5391, 0, 0, 1],
+ 8826: [0.0391, 0.5391, 0, 0, 0.77778],
+ 8827: [0.0391, 0.5391, 0, 0, 0.77778],
+ 8834: [0.0391, 0.5391, 0, 0, 0.77778],
+ 8835: [0.0391, 0.5391, 0, 0, 0.77778],
+ 8838: [0.13597, 0.63597, 0, 0, 0.77778],
+ 8839: [0.13597, 0.63597, 0, 0, 0.77778],
+ 8846: [0, 0.55556, 0, 0, 0.66667],
+ 8849: [0.13597, 0.63597, 0, 0, 0.77778],
+ 8850: [0.13597, 0.63597, 0, 0, 0.77778],
+ 8851: [0, 0.55556, 0, 0, 0.66667],
+ 8852: [0, 0.55556, 0, 0, 0.66667],
+ 8853: [0.08333, 0.58333, 0, 0, 0.77778],
+ 8854: [0.08333, 0.58333, 0, 0, 0.77778],
+ 8855: [0.08333, 0.58333, 0, 0, 0.77778],
+ 8856: [0.08333, 0.58333, 0, 0, 0.77778],
+ 8857: [0.08333, 0.58333, 0, 0, 0.77778],
+ 8866: [0, 0.69444, 0, 0, 0.61111],
+ 8867: [0, 0.69444, 0, 0, 0.61111],
+ 8868: [0, 0.69444, 0, 0, 0.77778],
+ 8869: [0, 0.69444, 0, 0, 0.77778],
+ 8872: [0.249, 0.75, 0, 0, 0.867],
+ 8900: [-0.05555, 0.44445, 0, 0, 0.5],
+ 8901: [-0.05555, 0.44445, 0, 0, 0.27778],
+ 8902: [-0.03472, 0.46528, 0, 0, 0.5],
+ 8904: [5e-3, 0.505, 0, 0, 0.9],
+ 8942: [0.03, 0.903, 0, 0, 0.278],
+ 8943: [-0.19, 0.313, 0, 0, 1.172],
+ 8945: [-0.1, 0.823, 0, 0, 1.282],
+ 8968: [0.25, 0.75, 0, 0, 0.44445],
+ 8969: [0.25, 0.75, 0, 0, 0.44445],
+ 8970: [0.25, 0.75, 0, 0, 0.44445],
+ 8971: [0.25, 0.75, 0, 0, 0.44445],
+ 8994: [-0.14236, 0.35764, 0, 0, 1],
+ 8995: [-0.14236, 0.35764, 0, 0, 1],
+ 9136: [0.244, 0.744, 0, 0, 0.412],
+ 9137: [0.244, 0.745, 0, 0, 0.412],
+ 9651: [0.19444, 0.69444, 0, 0, 0.88889],
+ 9657: [-0.03472, 0.46528, 0, 0, 0.5],
+ 9661: [0.19444, 0.69444, 0, 0, 0.88889],
+ 9667: [-0.03472, 0.46528, 0, 0, 0.5],
+ 9711: [0.19444, 0.69444, 0, 0, 1],
+ 9824: [0.12963, 0.69444, 0, 0, 0.77778],
+ 9825: [0.12963, 0.69444, 0, 0, 0.77778],
+ 9826: [0.12963, 0.69444, 0, 0, 0.77778],
+ 9827: [0.12963, 0.69444, 0, 0, 0.77778],
+ 9837: [0, 0.75, 0, 0, 0.38889],
+ 9838: [0.19444, 0.69444, 0, 0, 0.38889],
+ 9839: [0.19444, 0.69444, 0, 0, 0.38889],
+ 10216: [0.25, 0.75, 0, 0, 0.38889],
+ 10217: [0.25, 0.75, 0, 0, 0.38889],
+ 10222: [0.244, 0.744, 0, 0, 0.412],
+ 10223: [0.244, 0.745, 0, 0, 0.412],
+ 10229: [0.011, 0.511, 0, 0, 1.609],
+ 10230: [0.011, 0.511, 0, 0, 1.638],
+ 10231: [0.011, 0.511, 0, 0, 1.859],
+ 10232: [0.024, 0.525, 0, 0, 1.609],
+ 10233: [0.024, 0.525, 0, 0, 1.638],
+ 10234: [0.024, 0.525, 0, 0, 1.858],
+ 10236: [0.011, 0.511, 0, 0, 1.638],
+ 10815: [0, 0.68333, 0, 0, 0.75],
+ 10927: [0.13597, 0.63597, 0, 0, 0.77778],
+ 10928: [0.13597, 0.63597, 0, 0, 0.77778],
+ 57376: [0.19444, 0.69444, 0, 0, 0]
+ },
+ "Math-BoldItalic": {
+ 32: [0, 0, 0, 0, 0.25],
+ 48: [0, 0.44444, 0, 0, 0.575],
+ 49: [0, 0.44444, 0, 0, 0.575],
+ 50: [0, 0.44444, 0, 0, 0.575],
+ 51: [0.19444, 0.44444, 0, 0, 0.575],
+ 52: [0.19444, 0.44444, 0, 0, 0.575],
+ 53: [0.19444, 0.44444, 0, 0, 0.575],
+ 54: [0, 0.64444, 0, 0, 0.575],
+ 55: [0.19444, 0.44444, 0, 0, 0.575],
+ 56: [0, 0.64444, 0, 0, 0.575],
+ 57: [0.19444, 0.44444, 0, 0, 0.575],
+ 65: [0, 0.68611, 0, 0, 0.86944],
+ 66: [0, 0.68611, 0.04835, 0, 0.8664],
+ 67: [0, 0.68611, 0.06979, 0, 0.81694],
+ 68: [0, 0.68611, 0.03194, 0, 0.93812],
+ 69: [0, 0.68611, 0.05451, 0, 0.81007],
+ 70: [0, 0.68611, 0.15972, 0, 0.68889],
+ 71: [0, 0.68611, 0, 0, 0.88673],
+ 72: [0, 0.68611, 0.08229, 0, 0.98229],
+ 73: [0, 0.68611, 0.07778, 0, 0.51111],
+ 74: [0, 0.68611, 0.10069, 0, 0.63125],
+ 75: [0, 0.68611, 0.06979, 0, 0.97118],
+ 76: [0, 0.68611, 0, 0, 0.75555],
+ 77: [0, 0.68611, 0.11424, 0, 1.14201],
+ 78: [0, 0.68611, 0.11424, 0, 0.95034],
+ 79: [0, 0.68611, 0.03194, 0, 0.83666],
+ 80: [0, 0.68611, 0.15972, 0, 0.72309],
+ 81: [0.19444, 0.68611, 0, 0, 0.86861],
+ 82: [0, 0.68611, 421e-5, 0, 0.87235],
+ 83: [0, 0.68611, 0.05382, 0, 0.69271],
+ 84: [0, 0.68611, 0.15972, 0, 0.63663],
+ 85: [0, 0.68611, 0.11424, 0, 0.80027],
+ 86: [0, 0.68611, 0.25555, 0, 0.67778],
+ 87: [0, 0.68611, 0.15972, 0, 1.09305],
+ 88: [0, 0.68611, 0.07778, 0, 0.94722],
+ 89: [0, 0.68611, 0.25555, 0, 0.67458],
+ 90: [0, 0.68611, 0.06979, 0, 0.77257],
+ 97: [0, 0.44444, 0, 0, 0.63287],
+ 98: [0, 0.69444, 0, 0, 0.52083],
+ 99: [0, 0.44444, 0, 0, 0.51342],
+ 100: [0, 0.69444, 0, 0, 0.60972],
+ 101: [0, 0.44444, 0, 0, 0.55361],
+ 102: [0.19444, 0.69444, 0.11042, 0, 0.56806],
+ 103: [0.19444, 0.44444, 0.03704, 0, 0.5449],
+ 104: [0, 0.69444, 0, 0, 0.66759],
+ 105: [0, 0.69326, 0, 0, 0.4048],
+ 106: [0.19444, 0.69326, 0.0622, 0, 0.47083],
+ 107: [0, 0.69444, 0.01852, 0, 0.6037],
+ 108: [0, 0.69444, 88e-4, 0, 0.34815],
+ 109: [0, 0.44444, 0, 0, 1.0324],
+ 110: [0, 0.44444, 0, 0, 0.71296],
+ 111: [0, 0.44444, 0, 0, 0.58472],
+ 112: [0.19444, 0.44444, 0, 0, 0.60092],
+ 113: [0.19444, 0.44444, 0.03704, 0, 0.54213],
+ 114: [0, 0.44444, 0.03194, 0, 0.5287],
+ 115: [0, 0.44444, 0, 0, 0.53125],
+ 116: [0, 0.63492, 0, 0, 0.41528],
+ 117: [0, 0.44444, 0, 0, 0.68102],
+ 118: [0, 0.44444, 0.03704, 0, 0.56666],
+ 119: [0, 0.44444, 0.02778, 0, 0.83148],
+ 120: [0, 0.44444, 0, 0, 0.65903],
+ 121: [0.19444, 0.44444, 0.03704, 0, 0.59028],
+ 122: [0, 0.44444, 0.04213, 0, 0.55509],
+ 160: [0, 0, 0, 0, 0.25],
+ 915: [0, 0.68611, 0.15972, 0, 0.65694],
+ 916: [0, 0.68611, 0, 0, 0.95833],
+ 920: [0, 0.68611, 0.03194, 0, 0.86722],
+ 923: [0, 0.68611, 0, 0, 0.80555],
+ 926: [0, 0.68611, 0.07458, 0, 0.84125],
+ 928: [0, 0.68611, 0.08229, 0, 0.98229],
+ 931: [0, 0.68611, 0.05451, 0, 0.88507],
+ 933: [0, 0.68611, 0.15972, 0, 0.67083],
+ 934: [0, 0.68611, 0, 0, 0.76666],
+ 936: [0, 0.68611, 0.11653, 0, 0.71402],
+ 937: [0, 0.68611, 0.04835, 0, 0.8789],
+ 945: [0, 0.44444, 0, 0, 0.76064],
+ 946: [0.19444, 0.69444, 0.03403, 0, 0.65972],
+ 947: [0.19444, 0.44444, 0.06389, 0, 0.59003],
+ 948: [0, 0.69444, 0.03819, 0, 0.52222],
+ 949: [0, 0.44444, 0, 0, 0.52882],
+ 950: [0.19444, 0.69444, 0.06215, 0, 0.50833],
+ 951: [0.19444, 0.44444, 0.03704, 0, 0.6],
+ 952: [0, 0.69444, 0.03194, 0, 0.5618],
+ 953: [0, 0.44444, 0, 0, 0.41204],
+ 954: [0, 0.44444, 0, 0, 0.66759],
+ 955: [0, 0.69444, 0, 0, 0.67083],
+ 956: [0.19444, 0.44444, 0, 0, 0.70787],
+ 957: [0, 0.44444, 0.06898, 0, 0.57685],
+ 958: [0.19444, 0.69444, 0.03021, 0, 0.50833],
+ 959: [0, 0.44444, 0, 0, 0.58472],
+ 960: [0, 0.44444, 0.03704, 0, 0.68241],
+ 961: [0.19444, 0.44444, 0, 0, 0.6118],
+ 962: [0.09722, 0.44444, 0.07917, 0, 0.42361],
+ 963: [0, 0.44444, 0.03704, 0, 0.68588],
+ 964: [0, 0.44444, 0.13472, 0, 0.52083],
+ 965: [0, 0.44444, 0.03704, 0, 0.63055],
+ 966: [0.19444, 0.44444, 0, 0, 0.74722],
+ 967: [0.19444, 0.44444, 0, 0, 0.71805],
+ 968: [0.19444, 0.69444, 0.03704, 0, 0.75833],
+ 969: [0, 0.44444, 0.03704, 0, 0.71782],
+ 977: [0, 0.69444, 0, 0, 0.69155],
+ 981: [0.19444, 0.69444, 0, 0, 0.7125],
+ 982: [0, 0.44444, 0.03194, 0, 0.975],
+ 1009: [0.19444, 0.44444, 0, 0, 0.6118],
+ 1013: [0, 0.44444, 0, 0, 0.48333],
+ 57649: [0, 0.44444, 0, 0, 0.39352],
+ 57911: [0.19444, 0.44444, 0, 0, 0.43889]
+ },
+ "Math-Italic": {
+ 32: [0, 0, 0, 0, 0.25],
+ 48: [0, 0.43056, 0, 0, 0.5],
+ 49: [0, 0.43056, 0, 0, 0.5],
+ 50: [0, 0.43056, 0, 0, 0.5],
+ 51: [0.19444, 0.43056, 0, 0, 0.5],
+ 52: [0.19444, 0.43056, 0, 0, 0.5],
+ 53: [0.19444, 0.43056, 0, 0, 0.5],
+ 54: [0, 0.64444, 0, 0, 0.5],
+ 55: [0.19444, 0.43056, 0, 0, 0.5],
+ 56: [0, 0.64444, 0, 0, 0.5],
+ 57: [0.19444, 0.43056, 0, 0, 0.5],
+ 65: [0, 0.68333, 0, 0.13889, 0.75],
+ 66: [0, 0.68333, 0.05017, 0.08334, 0.75851],
+ 67: [0, 0.68333, 0.07153, 0.08334, 0.71472],
+ 68: [0, 0.68333, 0.02778, 0.05556, 0.82792],
+ 69: [0, 0.68333, 0.05764, 0.08334, 0.7382],
+ 70: [0, 0.68333, 0.13889, 0.08334, 0.64306],
+ 71: [0, 0.68333, 0, 0.08334, 0.78625],
+ 72: [0, 0.68333, 0.08125, 0.05556, 0.83125],
+ 73: [0, 0.68333, 0.07847, 0.11111, 0.43958],
+ 74: [0, 0.68333, 0.09618, 0.16667, 0.55451],
+ 75: [0, 0.68333, 0.07153, 0.05556, 0.84931],
+ 76: [0, 0.68333, 0, 0.02778, 0.68056],
+ 77: [0, 0.68333, 0.10903, 0.08334, 0.97014],
+ 78: [0, 0.68333, 0.10903, 0.08334, 0.80347],
+ 79: [0, 0.68333, 0.02778, 0.08334, 0.76278],
+ 80: [0, 0.68333, 0.13889, 0.08334, 0.64201],
+ 81: [0.19444, 0.68333, 0, 0.08334, 0.79056],
+ 82: [0, 0.68333, 773e-5, 0.08334, 0.75929],
+ 83: [0, 0.68333, 0.05764, 0.08334, 0.6132],
+ 84: [0, 0.68333, 0.13889, 0.08334, 0.58438],
+ 85: [0, 0.68333, 0.10903, 0.02778, 0.68278],
+ 86: [0, 0.68333, 0.22222, 0, 0.58333],
+ 87: [0, 0.68333, 0.13889, 0, 0.94445],
+ 88: [0, 0.68333, 0.07847, 0.08334, 0.82847],
+ 89: [0, 0.68333, 0.22222, 0, 0.58056],
+ 90: [0, 0.68333, 0.07153, 0.08334, 0.68264],
+ 97: [0, 0.43056, 0, 0, 0.52859],
+ 98: [0, 0.69444, 0, 0, 0.42917],
+ 99: [0, 0.43056, 0, 0.05556, 0.43276],
+ 100: [0, 0.69444, 0, 0.16667, 0.52049],
+ 101: [0, 0.43056, 0, 0.05556, 0.46563],
+ 102: [0.19444, 0.69444, 0.10764, 0.16667, 0.48959],
+ 103: [0.19444, 0.43056, 0.03588, 0.02778, 0.47697],
+ 104: [0, 0.69444, 0, 0, 0.57616],
+ 105: [0, 0.65952, 0, 0, 0.34451],
+ 106: [0.19444, 0.65952, 0.05724, 0, 0.41181],
+ 107: [0, 0.69444, 0.03148, 0, 0.5206],
+ 108: [0, 0.69444, 0.01968, 0.08334, 0.29838],
+ 109: [0, 0.43056, 0, 0, 0.87801],
+ 110: [0, 0.43056, 0, 0, 0.60023],
+ 111: [0, 0.43056, 0, 0.05556, 0.48472],
+ 112: [0.19444, 0.43056, 0, 0.08334, 0.50313],
+ 113: [0.19444, 0.43056, 0.03588, 0.08334, 0.44641],
+ 114: [0, 0.43056, 0.02778, 0.05556, 0.45116],
+ 115: [0, 0.43056, 0, 0.05556, 0.46875],
+ 116: [0, 0.61508, 0, 0.08334, 0.36111],
+ 117: [0, 0.43056, 0, 0.02778, 0.57246],
+ 118: [0, 0.43056, 0.03588, 0.02778, 0.48472],
+ 119: [0, 0.43056, 0.02691, 0.08334, 0.71592],
+ 120: [0, 0.43056, 0, 0.02778, 0.57153],
+ 121: [0.19444, 0.43056, 0.03588, 0.05556, 0.49028],
+ 122: [0, 0.43056, 0.04398, 0.05556, 0.46505],
+ 160: [0, 0, 0, 0, 0.25],
+ 915: [0, 0.68333, 0.13889, 0.08334, 0.61528],
+ 916: [0, 0.68333, 0, 0.16667, 0.83334],
+ 920: [0, 0.68333, 0.02778, 0.08334, 0.76278],
+ 923: [0, 0.68333, 0, 0.16667, 0.69445],
+ 926: [0, 0.68333, 0.07569, 0.08334, 0.74236],
+ 928: [0, 0.68333, 0.08125, 0.05556, 0.83125],
+ 931: [0, 0.68333, 0.05764, 0.08334, 0.77986],
+ 933: [0, 0.68333, 0.13889, 0.05556, 0.58333],
+ 934: [0, 0.68333, 0, 0.08334, 0.66667],
+ 936: [0, 0.68333, 0.11, 0.05556, 0.61222],
+ 937: [0, 0.68333, 0.05017, 0.08334, 0.7724],
+ 945: [0, 0.43056, 37e-4, 0.02778, 0.6397],
+ 946: [0.19444, 0.69444, 0.05278, 0.08334, 0.56563],
+ 947: [0.19444, 0.43056, 0.05556, 0, 0.51773],
+ 948: [0, 0.69444, 0.03785, 0.05556, 0.44444],
+ 949: [0, 0.43056, 0, 0.08334, 0.46632],
+ 950: [0.19444, 0.69444, 0.07378, 0.08334, 0.4375],
+ 951: [0.19444, 0.43056, 0.03588, 0.05556, 0.49653],
+ 952: [0, 0.69444, 0.02778, 0.08334, 0.46944],
+ 953: [0, 0.43056, 0, 0.05556, 0.35394],
+ 954: [0, 0.43056, 0, 0, 0.57616],
+ 955: [0, 0.69444, 0, 0, 0.58334],
+ 956: [0.19444, 0.43056, 0, 0.02778, 0.60255],
+ 957: [0, 0.43056, 0.06366, 0.02778, 0.49398],
+ 958: [0.19444, 0.69444, 0.04601, 0.11111, 0.4375],
+ 959: [0, 0.43056, 0, 0.05556, 0.48472],
+ 960: [0, 0.43056, 0.03588, 0, 0.57003],
+ 961: [0.19444, 0.43056, 0, 0.08334, 0.51702],
+ 962: [0.09722, 0.43056, 0.07986, 0.08334, 0.36285],
+ 963: [0, 0.43056, 0.03588, 0, 0.57141],
+ 964: [0, 0.43056, 0.1132, 0.02778, 0.43715],
+ 965: [0, 0.43056, 0.03588, 0.02778, 0.54028],
+ 966: [0.19444, 0.43056, 0, 0.08334, 0.65417],
+ 967: [0.19444, 0.43056, 0, 0.05556, 0.62569],
+ 968: [0.19444, 0.69444, 0.03588, 0.11111, 0.65139],
+ 969: [0, 0.43056, 0.03588, 0, 0.62245],
+ 977: [0, 0.69444, 0, 0.08334, 0.59144],
+ 981: [0.19444, 0.69444, 0, 0.08334, 0.59583],
+ 982: [0, 0.43056, 0.02778, 0, 0.82813],
+ 1009: [0.19444, 0.43056, 0, 0.08334, 0.51702],
+ 1013: [0, 0.43056, 0, 0.05556, 0.4059],
+ 57649: [0, 0.43056, 0, 0.02778, 0.32246],
+ 57911: [0.19444, 0.43056, 0, 0.08334, 0.38403]
+ },
+ "SansSerif-Bold": {
+ 32: [0, 0, 0, 0, 0.25],
+ 33: [0, 0.69444, 0, 0, 0.36667],
+ 34: [0, 0.69444, 0, 0, 0.55834],
+ 35: [0.19444, 0.69444, 0, 0, 0.91667],
+ 36: [0.05556, 0.75, 0, 0, 0.55],
+ 37: [0.05556, 0.75, 0, 0, 1.02912],
+ 38: [0, 0.69444, 0, 0, 0.83056],
+ 39: [0, 0.69444, 0, 0, 0.30556],
+ 40: [0.25, 0.75, 0, 0, 0.42778],
+ 41: [0.25, 0.75, 0, 0, 0.42778],
+ 42: [0, 0.75, 0, 0, 0.55],
+ 43: [0.11667, 0.61667, 0, 0, 0.85556],
+ 44: [0.10556, 0.13056, 0, 0, 0.30556],
+ 45: [0, 0.45833, 0, 0, 0.36667],
+ 46: [0, 0.13056, 0, 0, 0.30556],
+ 47: [0.25, 0.75, 0, 0, 0.55],
+ 48: [0, 0.69444, 0, 0, 0.55],
+ 49: [0, 0.69444, 0, 0, 0.55],
+ 50: [0, 0.69444, 0, 0, 0.55],
+ 51: [0, 0.69444, 0, 0, 0.55],
+ 52: [0, 0.69444, 0, 0, 0.55],
+ 53: [0, 0.69444, 0, 0, 0.55],
+ 54: [0, 0.69444, 0, 0, 0.55],
+ 55: [0, 0.69444, 0, 0, 0.55],
+ 56: [0, 0.69444, 0, 0, 0.55],
+ 57: [0, 0.69444, 0, 0, 0.55],
+ 58: [0, 0.45833, 0, 0, 0.30556],
+ 59: [0.10556, 0.45833, 0, 0, 0.30556],
+ 61: [-0.09375, 0.40625, 0, 0, 0.85556],
+ 63: [0, 0.69444, 0, 0, 0.51945],
+ 64: [0, 0.69444, 0, 0, 0.73334],
+ 65: [0, 0.69444, 0, 0, 0.73334],
+ 66: [0, 0.69444, 0, 0, 0.73334],
+ 67: [0, 0.69444, 0, 0, 0.70278],
+ 68: [0, 0.69444, 0, 0, 0.79445],
+ 69: [0, 0.69444, 0, 0, 0.64167],
+ 70: [0, 0.69444, 0, 0, 0.61111],
+ 71: [0, 0.69444, 0, 0, 0.73334],
+ 72: [0, 0.69444, 0, 0, 0.79445],
+ 73: [0, 0.69444, 0, 0, 0.33056],
+ 74: [0, 0.69444, 0, 0, 0.51945],
+ 75: [0, 0.69444, 0, 0, 0.76389],
+ 76: [0, 0.69444, 0, 0, 0.58056],
+ 77: [0, 0.69444, 0, 0, 0.97778],
+ 78: [0, 0.69444, 0, 0, 0.79445],
+ 79: [0, 0.69444, 0, 0, 0.79445],
+ 80: [0, 0.69444, 0, 0, 0.70278],
+ 81: [0.10556, 0.69444, 0, 0, 0.79445],
+ 82: [0, 0.69444, 0, 0, 0.70278],
+ 83: [0, 0.69444, 0, 0, 0.61111],
+ 84: [0, 0.69444, 0, 0, 0.73334],
+ 85: [0, 0.69444, 0, 0, 0.76389],
+ 86: [0, 0.69444, 0.01528, 0, 0.73334],
+ 87: [0, 0.69444, 0.01528, 0, 1.03889],
+ 88: [0, 0.69444, 0, 0, 0.73334],
+ 89: [0, 0.69444, 0.0275, 0, 0.73334],
+ 90: [0, 0.69444, 0, 0, 0.67223],
+ 91: [0.25, 0.75, 0, 0, 0.34306],
+ 93: [0.25, 0.75, 0, 0, 0.34306],
+ 94: [0, 0.69444, 0, 0, 0.55],
+ 95: [0.35, 0.10833, 0.03056, 0, 0.55],
+ 97: [0, 0.45833, 0, 0, 0.525],
+ 98: [0, 0.69444, 0, 0, 0.56111],
+ 99: [0, 0.45833, 0, 0, 0.48889],
+ 100: [0, 0.69444, 0, 0, 0.56111],
+ 101: [0, 0.45833, 0, 0, 0.51111],
+ 102: [0, 0.69444, 0.07639, 0, 0.33611],
+ 103: [0.19444, 0.45833, 0.01528, 0, 0.55],
+ 104: [0, 0.69444, 0, 0, 0.56111],
+ 105: [0, 0.69444, 0, 0, 0.25556],
+ 106: [0.19444, 0.69444, 0, 0, 0.28611],
+ 107: [0, 0.69444, 0, 0, 0.53056],
+ 108: [0, 0.69444, 0, 0, 0.25556],
+ 109: [0, 0.45833, 0, 0, 0.86667],
+ 110: [0, 0.45833, 0, 0, 0.56111],
+ 111: [0, 0.45833, 0, 0, 0.55],
+ 112: [0.19444, 0.45833, 0, 0, 0.56111],
+ 113: [0.19444, 0.45833, 0, 0, 0.56111],
+ 114: [0, 0.45833, 0.01528, 0, 0.37222],
+ 115: [0, 0.45833, 0, 0, 0.42167],
+ 116: [0, 0.58929, 0, 0, 0.40417],
+ 117: [0, 0.45833, 0, 0, 0.56111],
+ 118: [0, 0.45833, 0.01528, 0, 0.5],
+ 119: [0, 0.45833, 0.01528, 0, 0.74445],
+ 120: [0, 0.45833, 0, 0, 0.5],
+ 121: [0.19444, 0.45833, 0.01528, 0, 0.5],
+ 122: [0, 0.45833, 0, 0, 0.47639],
+ 126: [0.35, 0.34444, 0, 0, 0.55],
+ 160: [0, 0, 0, 0, 0.25],
+ 168: [0, 0.69444, 0, 0, 0.55],
+ 176: [0, 0.69444, 0, 0, 0.73334],
+ 180: [0, 0.69444, 0, 0, 0.55],
+ 184: [0.17014, 0, 0, 0, 0.48889],
+ 305: [0, 0.45833, 0, 0, 0.25556],
+ 567: [0.19444, 0.45833, 0, 0, 0.28611],
+ 710: [0, 0.69444, 0, 0, 0.55],
+ 711: [0, 0.63542, 0, 0, 0.55],
+ 713: [0, 0.63778, 0, 0, 0.55],
+ 728: [0, 0.69444, 0, 0, 0.55],
+ 729: [0, 0.69444, 0, 0, 0.30556],
+ 730: [0, 0.69444, 0, 0, 0.73334],
+ 732: [0, 0.69444, 0, 0, 0.55],
+ 733: [0, 0.69444, 0, 0, 0.55],
+ 915: [0, 0.69444, 0, 0, 0.58056],
+ 916: [0, 0.69444, 0, 0, 0.91667],
+ 920: [0, 0.69444, 0, 0, 0.85556],
+ 923: [0, 0.69444, 0, 0, 0.67223],
+ 926: [0, 0.69444, 0, 0, 0.73334],
+ 928: [0, 0.69444, 0, 0, 0.79445],
+ 931: [0, 0.69444, 0, 0, 0.79445],
+ 933: [0, 0.69444, 0, 0, 0.85556],
+ 934: [0, 0.69444, 0, 0, 0.79445],
+ 936: [0, 0.69444, 0, 0, 0.85556],
+ 937: [0, 0.69444, 0, 0, 0.79445],
+ 8211: [0, 0.45833, 0.03056, 0, 0.55],
+ 8212: [0, 0.45833, 0.03056, 0, 1.10001],
+ 8216: [0, 0.69444, 0, 0, 0.30556],
+ 8217: [0, 0.69444, 0, 0, 0.30556],
+ 8220: [0, 0.69444, 0, 0, 0.55834],
+ 8221: [0, 0.69444, 0, 0, 0.55834]
+ },
+ "SansSerif-Italic": {
+ 32: [0, 0, 0, 0, 0.25],
+ 33: [0, 0.69444, 0.05733, 0, 0.31945],
+ 34: [0, 0.69444, 316e-5, 0, 0.5],
+ 35: [0.19444, 0.69444, 0.05087, 0, 0.83334],
+ 36: [0.05556, 0.75, 0.11156, 0, 0.5],
+ 37: [0.05556, 0.75, 0.03126, 0, 0.83334],
+ 38: [0, 0.69444, 0.03058, 0, 0.75834],
+ 39: [0, 0.69444, 0.07816, 0, 0.27778],
+ 40: [0.25, 0.75, 0.13164, 0, 0.38889],
+ 41: [0.25, 0.75, 0.02536, 0, 0.38889],
+ 42: [0, 0.75, 0.11775, 0, 0.5],
+ 43: [0.08333, 0.58333, 0.02536, 0, 0.77778],
+ 44: [0.125, 0.08333, 0, 0, 0.27778],
+ 45: [0, 0.44444, 0.01946, 0, 0.33333],
+ 46: [0, 0.08333, 0, 0, 0.27778],
+ 47: [0.25, 0.75, 0.13164, 0, 0.5],
+ 48: [0, 0.65556, 0.11156, 0, 0.5],
+ 49: [0, 0.65556, 0.11156, 0, 0.5],
+ 50: [0, 0.65556, 0.11156, 0, 0.5],
+ 51: [0, 0.65556, 0.11156, 0, 0.5],
+ 52: [0, 0.65556, 0.11156, 0, 0.5],
+ 53: [0, 0.65556, 0.11156, 0, 0.5],
+ 54: [0, 0.65556, 0.11156, 0, 0.5],
+ 55: [0, 0.65556, 0.11156, 0, 0.5],
+ 56: [0, 0.65556, 0.11156, 0, 0.5],
+ 57: [0, 0.65556, 0.11156, 0, 0.5],
+ 58: [0, 0.44444, 0.02502, 0, 0.27778],
+ 59: [0.125, 0.44444, 0.02502, 0, 0.27778],
+ 61: [-0.13, 0.37, 0.05087, 0, 0.77778],
+ 63: [0, 0.69444, 0.11809, 0, 0.47222],
+ 64: [0, 0.69444, 0.07555, 0, 0.66667],
+ 65: [0, 0.69444, 0, 0, 0.66667],
+ 66: [0, 0.69444, 0.08293, 0, 0.66667],
+ 67: [0, 0.69444, 0.11983, 0, 0.63889],
+ 68: [0, 0.69444, 0.07555, 0, 0.72223],
+ 69: [0, 0.69444, 0.11983, 0, 0.59722],
+ 70: [0, 0.69444, 0.13372, 0, 0.56945],
+ 71: [0, 0.69444, 0.11983, 0, 0.66667],
+ 72: [0, 0.69444, 0.08094, 0, 0.70834],
+ 73: [0, 0.69444, 0.13372, 0, 0.27778],
+ 74: [0, 0.69444, 0.08094, 0, 0.47222],
+ 75: [0, 0.69444, 0.11983, 0, 0.69445],
+ 76: [0, 0.69444, 0, 0, 0.54167],
+ 77: [0, 0.69444, 0.08094, 0, 0.875],
+ 78: [0, 0.69444, 0.08094, 0, 0.70834],
+ 79: [0, 0.69444, 0.07555, 0, 0.73611],
+ 80: [0, 0.69444, 0.08293, 0, 0.63889],
+ 81: [0.125, 0.69444, 0.07555, 0, 0.73611],
+ 82: [0, 0.69444, 0.08293, 0, 0.64584],
+ 83: [0, 0.69444, 0.09205, 0, 0.55556],
+ 84: [0, 0.69444, 0.13372, 0, 0.68056],
+ 85: [0, 0.69444, 0.08094, 0, 0.6875],
+ 86: [0, 0.69444, 0.1615, 0, 0.66667],
+ 87: [0, 0.69444, 0.1615, 0, 0.94445],
+ 88: [0, 0.69444, 0.13372, 0, 0.66667],
+ 89: [0, 0.69444, 0.17261, 0, 0.66667],
+ 90: [0, 0.69444, 0.11983, 0, 0.61111],
+ 91: [0.25, 0.75, 0.15942, 0, 0.28889],
+ 93: [0.25, 0.75, 0.08719, 0, 0.28889],
+ 94: [0, 0.69444, 0.0799, 0, 0.5],
+ 95: [0.35, 0.09444, 0.08616, 0, 0.5],
+ 97: [0, 0.44444, 981e-5, 0, 0.48056],
+ 98: [0, 0.69444, 0.03057, 0, 0.51667],
+ 99: [0, 0.44444, 0.08336, 0, 0.44445],
+ 100: [0, 0.69444, 0.09483, 0, 0.51667],
+ 101: [0, 0.44444, 0.06778, 0, 0.44445],
+ 102: [0, 0.69444, 0.21705, 0, 0.30556],
+ 103: [0.19444, 0.44444, 0.10836, 0, 0.5],
+ 104: [0, 0.69444, 0.01778, 0, 0.51667],
+ 105: [0, 0.67937, 0.09718, 0, 0.23889],
+ 106: [0.19444, 0.67937, 0.09162, 0, 0.26667],
+ 107: [0, 0.69444, 0.08336, 0, 0.48889],
+ 108: [0, 0.69444, 0.09483, 0, 0.23889],
+ 109: [0, 0.44444, 0.01778, 0, 0.79445],
+ 110: [0, 0.44444, 0.01778, 0, 0.51667],
+ 111: [0, 0.44444, 0.06613, 0, 0.5],
+ 112: [0.19444, 0.44444, 0.0389, 0, 0.51667],
+ 113: [0.19444, 0.44444, 0.04169, 0, 0.51667],
+ 114: [0, 0.44444, 0.10836, 0, 0.34167],
+ 115: [0, 0.44444, 0.0778, 0, 0.38333],
+ 116: [0, 0.57143, 0.07225, 0, 0.36111],
+ 117: [0, 0.44444, 0.04169, 0, 0.51667],
+ 118: [0, 0.44444, 0.10836, 0, 0.46111],
+ 119: [0, 0.44444, 0.10836, 0, 0.68334],
+ 120: [0, 0.44444, 0.09169, 0, 0.46111],
+ 121: [0.19444, 0.44444, 0.10836, 0, 0.46111],
+ 122: [0, 0.44444, 0.08752, 0, 0.43472],
+ 126: [0.35, 0.32659, 0.08826, 0, 0.5],
+ 160: [0, 0, 0, 0, 0.25],
+ 168: [0, 0.67937, 0.06385, 0, 0.5],
+ 176: [0, 0.69444, 0, 0, 0.73752],
+ 184: [0.17014, 0, 0, 0, 0.44445],
+ 305: [0, 0.44444, 0.04169, 0, 0.23889],
+ 567: [0.19444, 0.44444, 0.04169, 0, 0.26667],
+ 710: [0, 0.69444, 0.0799, 0, 0.5],
+ 711: [0, 0.63194, 0.08432, 0, 0.5],
+ 713: [0, 0.60889, 0.08776, 0, 0.5],
+ 714: [0, 0.69444, 0.09205, 0, 0.5],
+ 715: [0, 0.69444, 0, 0, 0.5],
+ 728: [0, 0.69444, 0.09483, 0, 0.5],
+ 729: [0, 0.67937, 0.07774, 0, 0.27778],
+ 730: [0, 0.69444, 0, 0, 0.73752],
+ 732: [0, 0.67659, 0.08826, 0, 0.5],
+ 733: [0, 0.69444, 0.09205, 0, 0.5],
+ 915: [0, 0.69444, 0.13372, 0, 0.54167],
+ 916: [0, 0.69444, 0, 0, 0.83334],
+ 920: [0, 0.69444, 0.07555, 0, 0.77778],
+ 923: [0, 0.69444, 0, 0, 0.61111],
+ 926: [0, 0.69444, 0.12816, 0, 0.66667],
+ 928: [0, 0.69444, 0.08094, 0, 0.70834],
+ 931: [0, 0.69444, 0.11983, 0, 0.72222],
+ 933: [0, 0.69444, 0.09031, 0, 0.77778],
+ 934: [0, 0.69444, 0.04603, 0, 0.72222],
+ 936: [0, 0.69444, 0.09031, 0, 0.77778],
+ 937: [0, 0.69444, 0.08293, 0, 0.72222],
+ 8211: [0, 0.44444, 0.08616, 0, 0.5],
+ 8212: [0, 0.44444, 0.08616, 0, 1],
+ 8216: [0, 0.69444, 0.07816, 0, 0.27778],
+ 8217: [0, 0.69444, 0.07816, 0, 0.27778],
+ 8220: [0, 0.69444, 0.14205, 0, 0.5],
+ 8221: [0, 0.69444, 316e-5, 0, 0.5]
+ },
+ "SansSerif-Regular": {
+ 32: [0, 0, 0, 0, 0.25],
+ 33: [0, 0.69444, 0, 0, 0.31945],
+ 34: [0, 0.69444, 0, 0, 0.5],
+ 35: [0.19444, 0.69444, 0, 0, 0.83334],
+ 36: [0.05556, 0.75, 0, 0, 0.5],
+ 37: [0.05556, 0.75, 0, 0, 0.83334],
+ 38: [0, 0.69444, 0, 0, 0.75834],
+ 39: [0, 0.69444, 0, 0, 0.27778],
+ 40: [0.25, 0.75, 0, 0, 0.38889],
+ 41: [0.25, 0.75, 0, 0, 0.38889],
+ 42: [0, 0.75, 0, 0, 0.5],
+ 43: [0.08333, 0.58333, 0, 0, 0.77778],
+ 44: [0.125, 0.08333, 0, 0, 0.27778],
+ 45: [0, 0.44444, 0, 0, 0.33333],
+ 46: [0, 0.08333, 0, 0, 0.27778],
+ 47: [0.25, 0.75, 0, 0, 0.5],
+ 48: [0, 0.65556, 0, 0, 0.5],
+ 49: [0, 0.65556, 0, 0, 0.5],
+ 50: [0, 0.65556, 0, 0, 0.5],
+ 51: [0, 0.65556, 0, 0, 0.5],
+ 52: [0, 0.65556, 0, 0, 0.5],
+ 53: [0, 0.65556, 0, 0, 0.5],
+ 54: [0, 0.65556, 0, 0, 0.5],
+ 55: [0, 0.65556, 0, 0, 0.5],
+ 56: [0, 0.65556, 0, 0, 0.5],
+ 57: [0, 0.65556, 0, 0, 0.5],
+ 58: [0, 0.44444, 0, 0, 0.27778],
+ 59: [0.125, 0.44444, 0, 0, 0.27778],
+ 61: [-0.13, 0.37, 0, 0, 0.77778],
+ 63: [0, 0.69444, 0, 0, 0.47222],
+ 64: [0, 0.69444, 0, 0, 0.66667],
+ 65: [0, 0.69444, 0, 0, 0.66667],
+ 66: [0, 0.69444, 0, 0, 0.66667],
+ 67: [0, 0.69444, 0, 0, 0.63889],
+ 68: [0, 0.69444, 0, 0, 0.72223],
+ 69: [0, 0.69444, 0, 0, 0.59722],
+ 70: [0, 0.69444, 0, 0, 0.56945],
+ 71: [0, 0.69444, 0, 0, 0.66667],
+ 72: [0, 0.69444, 0, 0, 0.70834],
+ 73: [0, 0.69444, 0, 0, 0.27778],
+ 74: [0, 0.69444, 0, 0, 0.47222],
+ 75: [0, 0.69444, 0, 0, 0.69445],
+ 76: [0, 0.69444, 0, 0, 0.54167],
+ 77: [0, 0.69444, 0, 0, 0.875],
+ 78: [0, 0.69444, 0, 0, 0.70834],
+ 79: [0, 0.69444, 0, 0, 0.73611],
+ 80: [0, 0.69444, 0, 0, 0.63889],
+ 81: [0.125, 0.69444, 0, 0, 0.73611],
+ 82: [0, 0.69444, 0, 0, 0.64584],
+ 83: [0, 0.69444, 0, 0, 0.55556],
+ 84: [0, 0.69444, 0, 0, 0.68056],
+ 85: [0, 0.69444, 0, 0, 0.6875],
+ 86: [0, 0.69444, 0.01389, 0, 0.66667],
+ 87: [0, 0.69444, 0.01389, 0, 0.94445],
+ 88: [0, 0.69444, 0, 0, 0.66667],
+ 89: [0, 0.69444, 0.025, 0, 0.66667],
+ 90: [0, 0.69444, 0, 0, 0.61111],
+ 91: [0.25, 0.75, 0, 0, 0.28889],
+ 93: [0.25, 0.75, 0, 0, 0.28889],
+ 94: [0, 0.69444, 0, 0, 0.5],
+ 95: [0.35, 0.09444, 0.02778, 0, 0.5],
+ 97: [0, 0.44444, 0, 0, 0.48056],
+ 98: [0, 0.69444, 0, 0, 0.51667],
+ 99: [0, 0.44444, 0, 0, 0.44445],
+ 100: [0, 0.69444, 0, 0, 0.51667],
+ 101: [0, 0.44444, 0, 0, 0.44445],
+ 102: [0, 0.69444, 0.06944, 0, 0.30556],
+ 103: [0.19444, 0.44444, 0.01389, 0, 0.5],
+ 104: [0, 0.69444, 0, 0, 0.51667],
+ 105: [0, 0.67937, 0, 0, 0.23889],
+ 106: [0.19444, 0.67937, 0, 0, 0.26667],
+ 107: [0, 0.69444, 0, 0, 0.48889],
+ 108: [0, 0.69444, 0, 0, 0.23889],
+ 109: [0, 0.44444, 0, 0, 0.79445],
+ 110: [0, 0.44444, 0, 0, 0.51667],
+ 111: [0, 0.44444, 0, 0, 0.5],
+ 112: [0.19444, 0.44444, 0, 0, 0.51667],
+ 113: [0.19444, 0.44444, 0, 0, 0.51667],
+ 114: [0, 0.44444, 0.01389, 0, 0.34167],
+ 115: [0, 0.44444, 0, 0, 0.38333],
+ 116: [0, 0.57143, 0, 0, 0.36111],
+ 117: [0, 0.44444, 0, 0, 0.51667],
+ 118: [0, 0.44444, 0.01389, 0, 0.46111],
+ 119: [0, 0.44444, 0.01389, 0, 0.68334],
+ 120: [0, 0.44444, 0, 0, 0.46111],
+ 121: [0.19444, 0.44444, 0.01389, 0, 0.46111],
+ 122: [0, 0.44444, 0, 0, 0.43472],
+ 126: [0.35, 0.32659, 0, 0, 0.5],
+ 160: [0, 0, 0, 0, 0.25],
+ 168: [0, 0.67937, 0, 0, 0.5],
+ 176: [0, 0.69444, 0, 0, 0.66667],
+ 184: [0.17014, 0, 0, 0, 0.44445],
+ 305: [0, 0.44444, 0, 0, 0.23889],
+ 567: [0.19444, 0.44444, 0, 0, 0.26667],
+ 710: [0, 0.69444, 0, 0, 0.5],
+ 711: [0, 0.63194, 0, 0, 0.5],
+ 713: [0, 0.60889, 0, 0, 0.5],
+ 714: [0, 0.69444, 0, 0, 0.5],
+ 715: [0, 0.69444, 0, 0, 0.5],
+ 728: [0, 0.69444, 0, 0, 0.5],
+ 729: [0, 0.67937, 0, 0, 0.27778],
+ 730: [0, 0.69444, 0, 0, 0.66667],
+ 732: [0, 0.67659, 0, 0, 0.5],
+ 733: [0, 0.69444, 0, 0, 0.5],
+ 915: [0, 0.69444, 0, 0, 0.54167],
+ 916: [0, 0.69444, 0, 0, 0.83334],
+ 920: [0, 0.69444, 0, 0, 0.77778],
+ 923: [0, 0.69444, 0, 0, 0.61111],
+ 926: [0, 0.69444, 0, 0, 0.66667],
+ 928: [0, 0.69444, 0, 0, 0.70834],
+ 931: [0, 0.69444, 0, 0, 0.72222],
+ 933: [0, 0.69444, 0, 0, 0.77778],
+ 934: [0, 0.69444, 0, 0, 0.72222],
+ 936: [0, 0.69444, 0, 0, 0.77778],
+ 937: [0, 0.69444, 0, 0, 0.72222],
+ 8211: [0, 0.44444, 0.02778, 0, 0.5],
+ 8212: [0, 0.44444, 0.02778, 0, 1],
+ 8216: [0, 0.69444, 0, 0, 0.27778],
+ 8217: [0, 0.69444, 0, 0, 0.27778],
+ 8220: [0, 0.69444, 0, 0, 0.5],
+ 8221: [0, 0.69444, 0, 0, 0.5]
+ },
+ "Script-Regular": {
+ 32: [0, 0, 0, 0, 0.25],
+ 65: [0, 0.7, 0.22925, 0, 0.80253],
+ 66: [0, 0.7, 0.04087, 0, 0.90757],
+ 67: [0, 0.7, 0.1689, 0, 0.66619],
+ 68: [0, 0.7, 0.09371, 0, 0.77443],
+ 69: [0, 0.7, 0.18583, 0, 0.56162],
+ 70: [0, 0.7, 0.13634, 0, 0.89544],
+ 71: [0, 0.7, 0.17322, 0, 0.60961],
+ 72: [0, 0.7, 0.29694, 0, 0.96919],
+ 73: [0, 0.7, 0.19189, 0, 0.80907],
+ 74: [0.27778, 0.7, 0.19189, 0, 1.05159],
+ 75: [0, 0.7, 0.31259, 0, 0.91364],
+ 76: [0, 0.7, 0.19189, 0, 0.87373],
+ 77: [0, 0.7, 0.15981, 0, 1.08031],
+ 78: [0, 0.7, 0.3525, 0, 0.9015],
+ 79: [0, 0.7, 0.08078, 0, 0.73787],
+ 80: [0, 0.7, 0.08078, 0, 1.01262],
+ 81: [0, 0.7, 0.03305, 0, 0.88282],
+ 82: [0, 0.7, 0.06259, 0, 0.85],
+ 83: [0, 0.7, 0.19189, 0, 0.86767],
+ 84: [0, 0.7, 0.29087, 0, 0.74697],
+ 85: [0, 0.7, 0.25815, 0, 0.79996],
+ 86: [0, 0.7, 0.27523, 0, 0.62204],
+ 87: [0, 0.7, 0.27523, 0, 0.80532],
+ 88: [0, 0.7, 0.26006, 0, 0.94445],
+ 89: [0, 0.7, 0.2939, 0, 0.70961],
+ 90: [0, 0.7, 0.24037, 0, 0.8212],
+ 160: [0, 0, 0, 0, 0.25]
+ },
+ "Size1-Regular": {
+ 32: [0, 0, 0, 0, 0.25],
+ 40: [0.35001, 0.85, 0, 0, 0.45834],
+ 41: [0.35001, 0.85, 0, 0, 0.45834],
+ 47: [0.35001, 0.85, 0, 0, 0.57778],
+ 91: [0.35001, 0.85, 0, 0, 0.41667],
+ 92: [0.35001, 0.85, 0, 0, 0.57778],
+ 93: [0.35001, 0.85, 0, 0, 0.41667],
+ 123: [0.35001, 0.85, 0, 0, 0.58334],
+ 125: [0.35001, 0.85, 0, 0, 0.58334],
+ 160: [0, 0, 0, 0, 0.25],
+ 710: [0, 0.72222, 0, 0, 0.55556],
+ 732: [0, 0.72222, 0, 0, 0.55556],
+ 770: [0, 0.72222, 0, 0, 0.55556],
+ 771: [0, 0.72222, 0, 0, 0.55556],
+ 8214: [-99e-5, 0.601, 0, 0, 0.77778],
+ 8593: [1e-5, 0.6, 0, 0, 0.66667],
+ 8595: [1e-5, 0.6, 0, 0, 0.66667],
+ 8657: [1e-5, 0.6, 0, 0, 0.77778],
+ 8659: [1e-5, 0.6, 0, 0, 0.77778],
+ 8719: [0.25001, 0.75, 0, 0, 0.94445],
+ 8720: [0.25001, 0.75, 0, 0, 0.94445],
+ 8721: [0.25001, 0.75, 0, 0, 1.05556],
+ 8730: [0.35001, 0.85, 0, 0, 1],
+ 8739: [-599e-5, 0.606, 0, 0, 0.33333],
+ 8741: [-599e-5, 0.606, 0, 0, 0.55556],
+ 8747: [0.30612, 0.805, 0.19445, 0, 0.47222],
+ 8748: [0.306, 0.805, 0.19445, 0, 0.47222],
+ 8749: [0.306, 0.805, 0.19445, 0, 0.47222],
+ 8750: [0.30612, 0.805, 0.19445, 0, 0.47222],
+ 8896: [0.25001, 0.75, 0, 0, 0.83334],
+ 8897: [0.25001, 0.75, 0, 0, 0.83334],
+ 8898: [0.25001, 0.75, 0, 0, 0.83334],
+ 8899: [0.25001, 0.75, 0, 0, 0.83334],
+ 8968: [0.35001, 0.85, 0, 0, 0.47222],
+ 8969: [0.35001, 0.85, 0, 0, 0.47222],
+ 8970: [0.35001, 0.85, 0, 0, 0.47222],
+ 8971: [0.35001, 0.85, 0, 0, 0.47222],
+ 9168: [-99e-5, 0.601, 0, 0, 0.66667],
+ 10216: [0.35001, 0.85, 0, 0, 0.47222],
+ 10217: [0.35001, 0.85, 0, 0, 0.47222],
+ 10752: [0.25001, 0.75, 0, 0, 1.11111],
+ 10753: [0.25001, 0.75, 0, 0, 1.11111],
+ 10754: [0.25001, 0.75, 0, 0, 1.11111],
+ 10756: [0.25001, 0.75, 0, 0, 0.83334],
+ 10758: [0.25001, 0.75, 0, 0, 0.83334]
+ },
+ "Size2-Regular": {
+ 32: [0, 0, 0, 0, 0.25],
+ 40: [0.65002, 1.15, 0, 0, 0.59722],
+ 41: [0.65002, 1.15, 0, 0, 0.59722],
+ 47: [0.65002, 1.15, 0, 0, 0.81111],
+ 91: [0.65002, 1.15, 0, 0, 0.47222],
+ 92: [0.65002, 1.15, 0, 0, 0.81111],
+ 93: [0.65002, 1.15, 0, 0, 0.47222],
+ 123: [0.65002, 1.15, 0, 0, 0.66667],
+ 125: [0.65002, 1.15, 0, 0, 0.66667],
+ 160: [0, 0, 0, 0, 0.25],
+ 710: [0, 0.75, 0, 0, 1],
+ 732: [0, 0.75, 0, 0, 1],
+ 770: [0, 0.75, 0, 0, 1],
+ 771: [0, 0.75, 0, 0, 1],
+ 8719: [0.55001, 1.05, 0, 0, 1.27778],
+ 8720: [0.55001, 1.05, 0, 0, 1.27778],
+ 8721: [0.55001, 1.05, 0, 0, 1.44445],
+ 8730: [0.65002, 1.15, 0, 0, 1],
+ 8747: [0.86225, 1.36, 0.44445, 0, 0.55556],
+ 8748: [0.862, 1.36, 0.44445, 0, 0.55556],
+ 8749: [0.862, 1.36, 0.44445, 0, 0.55556],
+ 8750: [0.86225, 1.36, 0.44445, 0, 0.55556],
+ 8896: [0.55001, 1.05, 0, 0, 1.11111],
+ 8897: [0.55001, 1.05, 0, 0, 1.11111],
+ 8898: [0.55001, 1.05, 0, 0, 1.11111],
+ 8899: [0.55001, 1.05, 0, 0, 1.11111],
+ 8968: [0.65002, 1.15, 0, 0, 0.52778],
+ 8969: [0.65002, 1.15, 0, 0, 0.52778],
+ 8970: [0.65002, 1.15, 0, 0, 0.52778],
+ 8971: [0.65002, 1.15, 0, 0, 0.52778],
+ 10216: [0.65002, 1.15, 0, 0, 0.61111],
+ 10217: [0.65002, 1.15, 0, 0, 0.61111],
+ 10752: [0.55001, 1.05, 0, 0, 1.51112],
+ 10753: [0.55001, 1.05, 0, 0, 1.51112],
+ 10754: [0.55001, 1.05, 0, 0, 1.51112],
+ 10756: [0.55001, 1.05, 0, 0, 1.11111],
+ 10758: [0.55001, 1.05, 0, 0, 1.11111]
+ },
+ "Size3-Regular": {
+ 32: [0, 0, 0, 0, 0.25],
+ 40: [0.95003, 1.45, 0, 0, 0.73611],
+ 41: [0.95003, 1.45, 0, 0, 0.73611],
+ 47: [0.95003, 1.45, 0, 0, 1.04445],
+ 91: [0.95003, 1.45, 0, 0, 0.52778],
+ 92: [0.95003, 1.45, 0, 0, 1.04445],
+ 93: [0.95003, 1.45, 0, 0, 0.52778],
+ 123: [0.95003, 1.45, 0, 0, 0.75],
+ 125: [0.95003, 1.45, 0, 0, 0.75],
+ 160: [0, 0, 0, 0, 0.25],
+ 710: [0, 0.75, 0, 0, 1.44445],
+ 732: [0, 0.75, 0, 0, 1.44445],
+ 770: [0, 0.75, 0, 0, 1.44445],
+ 771: [0, 0.75, 0, 0, 1.44445],
+ 8730: [0.95003, 1.45, 0, 0, 1],
+ 8968: [0.95003, 1.45, 0, 0, 0.58334],
+ 8969: [0.95003, 1.45, 0, 0, 0.58334],
+ 8970: [0.95003, 1.45, 0, 0, 0.58334],
+ 8971: [0.95003, 1.45, 0, 0, 0.58334],
+ 10216: [0.95003, 1.45, 0, 0, 0.75],
+ 10217: [0.95003, 1.45, 0, 0, 0.75]
+ },
+ "Size4-Regular": {
+ 32: [0, 0, 0, 0, 0.25],
+ 40: [1.25003, 1.75, 0, 0, 0.79167],
+ 41: [1.25003, 1.75, 0, 0, 0.79167],
+ 47: [1.25003, 1.75, 0, 0, 1.27778],
+ 91: [1.25003, 1.75, 0, 0, 0.58334],
+ 92: [1.25003, 1.75, 0, 0, 1.27778],
+ 93: [1.25003, 1.75, 0, 0, 0.58334],
+ 123: [1.25003, 1.75, 0, 0, 0.80556],
+ 125: [1.25003, 1.75, 0, 0, 0.80556],
+ 160: [0, 0, 0, 0, 0.25],
+ 710: [0, 0.825, 0, 0, 1.8889],
+ 732: [0, 0.825, 0, 0, 1.8889],
+ 770: [0, 0.825, 0, 0, 1.8889],
+ 771: [0, 0.825, 0, 0, 1.8889],
+ 8730: [1.25003, 1.75, 0, 0, 1],
+ 8968: [1.25003, 1.75, 0, 0, 0.63889],
+ 8969: [1.25003, 1.75, 0, 0, 0.63889],
+ 8970: [1.25003, 1.75, 0, 0, 0.63889],
+ 8971: [1.25003, 1.75, 0, 0, 0.63889],
+ 9115: [0.64502, 1.155, 0, 0, 0.875],
+ 9116: [1e-5, 0.6, 0, 0, 0.875],
+ 9117: [0.64502, 1.155, 0, 0, 0.875],
+ 9118: [0.64502, 1.155, 0, 0, 0.875],
+ 9119: [1e-5, 0.6, 0, 0, 0.875],
+ 9120: [0.64502, 1.155, 0, 0, 0.875],
+ 9121: [0.64502, 1.155, 0, 0, 0.66667],
+ 9122: [-99e-5, 0.601, 0, 0, 0.66667],
+ 9123: [0.64502, 1.155, 0, 0, 0.66667],
+ 9124: [0.64502, 1.155, 0, 0, 0.66667],
+ 9125: [-99e-5, 0.601, 0, 0, 0.66667],
+ 9126: [0.64502, 1.155, 0, 0, 0.66667],
+ 9127: [1e-5, 0.9, 0, 0, 0.88889],
+ 9128: [0.65002, 1.15, 0, 0, 0.88889],
+ 9129: [0.90001, 0, 0, 0, 0.88889],
+ 9130: [0, 0.3, 0, 0, 0.88889],
+ 9131: [1e-5, 0.9, 0, 0, 0.88889],
+ 9132: [0.65002, 1.15, 0, 0, 0.88889],
+ 9133: [0.90001, 0, 0, 0, 0.88889],
+ 9143: [0.88502, 0.915, 0, 0, 1.05556],
+ 10216: [1.25003, 1.75, 0, 0, 0.80556],
+ 10217: [1.25003, 1.75, 0, 0, 0.80556],
+ 57344: [-499e-5, 0.605, 0, 0, 1.05556],
+ 57345: [-499e-5, 0.605, 0, 0, 1.05556],
+ 57680: [0, 0.12, 0, 0, 0.45],
+ 57681: [0, 0.12, 0, 0, 0.45],
+ 57682: [0, 0.12, 0, 0, 0.45],
+ 57683: [0, 0.12, 0, 0, 0.45]
+ },
+ "Typewriter-Regular": {
+ 32: [0, 0, 0, 0, 0.525],
+ 33: [0, 0.61111, 0, 0, 0.525],
+ 34: [0, 0.61111, 0, 0, 0.525],
+ 35: [0, 0.61111, 0, 0, 0.525],
+ 36: [0.08333, 0.69444, 0, 0, 0.525],
+ 37: [0.08333, 0.69444, 0, 0, 0.525],
+ 38: [0, 0.61111, 0, 0, 0.525],
+ 39: [0, 0.61111, 0, 0, 0.525],
+ 40: [0.08333, 0.69444, 0, 0, 0.525],
+ 41: [0.08333, 0.69444, 0, 0, 0.525],
+ 42: [0, 0.52083, 0, 0, 0.525],
+ 43: [-0.08056, 0.53055, 0, 0, 0.525],
+ 44: [0.13889, 0.125, 0, 0, 0.525],
+ 45: [-0.08056, 0.53055, 0, 0, 0.525],
+ 46: [0, 0.125, 0, 0, 0.525],
+ 47: [0.08333, 0.69444, 0, 0, 0.525],
+ 48: [0, 0.61111, 0, 0, 0.525],
+ 49: [0, 0.61111, 0, 0, 0.525],
+ 50: [0, 0.61111, 0, 0, 0.525],
+ 51: [0, 0.61111, 0, 0, 0.525],
+ 52: [0, 0.61111, 0, 0, 0.525],
+ 53: [0, 0.61111, 0, 0, 0.525],
+ 54: [0, 0.61111, 0, 0, 0.525],
+ 55: [0, 0.61111, 0, 0, 0.525],
+ 56: [0, 0.61111, 0, 0, 0.525],
+ 57: [0, 0.61111, 0, 0, 0.525],
+ 58: [0, 0.43056, 0, 0, 0.525],
+ 59: [0.13889, 0.43056, 0, 0, 0.525],
+ 60: [-0.05556, 0.55556, 0, 0, 0.525],
+ 61: [-0.19549, 0.41562, 0, 0, 0.525],
+ 62: [-0.05556, 0.55556, 0, 0, 0.525],
+ 63: [0, 0.61111, 0, 0, 0.525],
+ 64: [0, 0.61111, 0, 0, 0.525],
+ 65: [0, 0.61111, 0, 0, 0.525],
+ 66: [0, 0.61111, 0, 0, 0.525],
+ 67: [0, 0.61111, 0, 0, 0.525],
+ 68: [0, 0.61111, 0, 0, 0.525],
+ 69: [0, 0.61111, 0, 0, 0.525],
+ 70: [0, 0.61111, 0, 0, 0.525],
+ 71: [0, 0.61111, 0, 0, 0.525],
+ 72: [0, 0.61111, 0, 0, 0.525],
+ 73: [0, 0.61111, 0, 0, 0.525],
+ 74: [0, 0.61111, 0, 0, 0.525],
+ 75: [0, 0.61111, 0, 0, 0.525],
+ 76: [0, 0.61111, 0, 0, 0.525],
+ 77: [0, 0.61111, 0, 0, 0.525],
+ 78: [0, 0.61111, 0, 0, 0.525],
+ 79: [0, 0.61111, 0, 0, 0.525],
+ 80: [0, 0.61111, 0, 0, 0.525],
+ 81: [0.13889, 0.61111, 0, 0, 0.525],
+ 82: [0, 0.61111, 0, 0, 0.525],
+ 83: [0, 0.61111, 0, 0, 0.525],
+ 84: [0, 0.61111, 0, 0, 0.525],
+ 85: [0, 0.61111, 0, 0, 0.525],
+ 86: [0, 0.61111, 0, 0, 0.525],
+ 87: [0, 0.61111, 0, 0, 0.525],
+ 88: [0, 0.61111, 0, 0, 0.525],
+ 89: [0, 0.61111, 0, 0, 0.525],
+ 90: [0, 0.61111, 0, 0, 0.525],
+ 91: [0.08333, 0.69444, 0, 0, 0.525],
+ 92: [0.08333, 0.69444, 0, 0, 0.525],
+ 93: [0.08333, 0.69444, 0, 0, 0.525],
+ 94: [0, 0.61111, 0, 0, 0.525],
+ 95: [0.09514, 0, 0, 0, 0.525],
+ 96: [0, 0.61111, 0, 0, 0.525],
+ 97: [0, 0.43056, 0, 0, 0.525],
+ 98: [0, 0.61111, 0, 0, 0.525],
+ 99: [0, 0.43056, 0, 0, 0.525],
+ 100: [0, 0.61111, 0, 0, 0.525],
+ 101: [0, 0.43056, 0, 0, 0.525],
+ 102: [0, 0.61111, 0, 0, 0.525],
+ 103: [0.22222, 0.43056, 0, 0, 0.525],
+ 104: [0, 0.61111, 0, 0, 0.525],
+ 105: [0, 0.61111, 0, 0, 0.525],
+ 106: [0.22222, 0.61111, 0, 0, 0.525],
+ 107: [0, 0.61111, 0, 0, 0.525],
+ 108: [0, 0.61111, 0, 0, 0.525],
+ 109: [0, 0.43056, 0, 0, 0.525],
+ 110: [0, 0.43056, 0, 0, 0.525],
+ 111: [0, 0.43056, 0, 0, 0.525],
+ 112: [0.22222, 0.43056, 0, 0, 0.525],
+ 113: [0.22222, 0.43056, 0, 0, 0.525],
+ 114: [0, 0.43056, 0, 0, 0.525],
+ 115: [0, 0.43056, 0, 0, 0.525],
+ 116: [0, 0.55358, 0, 0, 0.525],
+ 117: [0, 0.43056, 0, 0, 0.525],
+ 118: [0, 0.43056, 0, 0, 0.525],
+ 119: [0, 0.43056, 0, 0, 0.525],
+ 120: [0, 0.43056, 0, 0, 0.525],
+ 121: [0.22222, 0.43056, 0, 0, 0.525],
+ 122: [0, 0.43056, 0, 0, 0.525],
+ 123: [0.08333, 0.69444, 0, 0, 0.525],
+ 124: [0.08333, 0.69444, 0, 0, 0.525],
+ 125: [0.08333, 0.69444, 0, 0, 0.525],
+ 126: [0, 0.61111, 0, 0, 0.525],
+ 127: [0, 0.61111, 0, 0, 0.525],
+ 160: [0, 0, 0, 0, 0.525],
+ 176: [0, 0.61111, 0, 0, 0.525],
+ 184: [0.19445, 0, 0, 0, 0.525],
+ 305: [0, 0.43056, 0, 0, 0.525],
+ 567: [0.22222, 0.43056, 0, 0, 0.525],
+ 711: [0, 0.56597, 0, 0, 0.525],
+ 713: [0, 0.56555, 0, 0, 0.525],
+ 714: [0, 0.61111, 0, 0, 0.525],
+ 715: [0, 0.61111, 0, 0, 0.525],
+ 728: [0, 0.61111, 0, 0, 0.525],
+ 730: [0, 0.61111, 0, 0, 0.525],
+ 770: [0, 0.61111, 0, 0, 0.525],
+ 771: [0, 0.61111, 0, 0, 0.525],
+ 776: [0, 0.61111, 0, 0, 0.525],
+ 915: [0, 0.61111, 0, 0, 0.525],
+ 916: [0, 0.61111, 0, 0, 0.525],
+ 920: [0, 0.61111, 0, 0, 0.525],
+ 923: [0, 0.61111, 0, 0, 0.525],
+ 926: [0, 0.61111, 0, 0, 0.525],
+ 928: [0, 0.61111, 0, 0, 0.525],
+ 931: [0, 0.61111, 0, 0, 0.525],
+ 933: [0, 0.61111, 0, 0, 0.525],
+ 934: [0, 0.61111, 0, 0, 0.525],
+ 936: [0, 0.61111, 0, 0, 0.525],
+ 937: [0, 0.61111, 0, 0, 0.525],
+ 8216: [0, 0.61111, 0, 0, 0.525],
+ 8217: [0, 0.61111, 0, 0, 0.525],
+ 8242: [0, 0.61111, 0, 0, 0.525],
+ 9251: [0.11111, 0.21944, 0, 0, 0.525]
+ }
+}, qi = {
+ // Latin-1
+ Å: "A",
+ Ð: "D",
+ Þ: "o",
+ å: "a",
+ ð: "d",
+ þ: "o",
+ // Cyrillic
+ А: "A",
+ Б: "B",
+ В: "B",
+ Г: "F",
+ Д: "A",
+ Е: "E",
+ Ж: "K",
+ З: "3",
+ И: "N",
+ Й: "N",
+ К: "K",
+ Л: "N",
+ М: "M",
+ Н: "H",
+ О: "O",
+ П: "N",
+ Р: "P",
+ С: "C",
+ Т: "T",
+ У: "y",
+ Ф: "O",
+ Х: "X",
+ Ц: "U",
+ Ч: "h",
+ Ш: "W",
+ Щ: "W",
+ Ъ: "B",
+ Ы: "X",
+ Ь: "B",
+ Э: "3",
+ Ю: "X",
+ Я: "R",
+ а: "a",
+ б: "b",
+ в: "a",
+ г: "r",
+ д: "y",
+ е: "e",
+ ж: "m",
+ з: "e",
+ и: "n",
+ й: "n",
+ к: "n",
+ л: "n",
+ м: "m",
+ н: "n",
+ о: "o",
+ п: "n",
+ р: "p",
+ с: "c",
+ т: "o",
+ у: "y",
+ ф: "b",
+ х: "x",
+ ц: "n",
+ ч: "n",
+ ш: "w",
+ щ: "w",
+ ъ: "a",
+ ы: "m",
+ ь: "a",
+ э: "e",
+ ю: "m",
+ я: "r"
+};
+function xa(n, e, t) {
+ if (!Qt[e])
+ throw new Error("Font metrics not found for font: " + e + ".");
+ var r = n.charCodeAt(0), a = Qt[e][r];
+ if (!a && n[0] in qi && (r = qi[n[0]].charCodeAt(0), a = Qt[e][r]), !a && t === "text" && R1(r) && (a = Qt[e][77]), a)
+ return {
+ depth: a[0],
+ height: a[1],
+ italic: a[2],
+ skew: a[3],
+ width: a[4]
+ };
+}
+var na = {
+ // https://en.wikibooks.org/wiki/LaTeX/Lengths and
+ // https://tex.stackexchange.com/a/8263
+ pt: 1,
+ // TeX point
+ mm: 7227 / 2540,
+ // millimeter
+ cm: 7227 / 254,
+ // centimeter
+ in: 72.27,
+ // inch
+ bp: 803 / 800,
+ // big (PostScript) points
+ pc: 12,
+ // pica
+ dd: 1238 / 1157,
+ // didot
+ cc: 14856 / 1157,
+ // cicero (12 didot)
+ nd: 685 / 642,
+ // new didot
+ nc: 1370 / 107,
+ // new cicero (12 new didot)
+ sp: 1 / 65536,
+ // scaled point (TeX's internal smallest unit)
+ // https://tex.stackexchange.com/a/41371
+ px: 803 / 800
+ // \pdfpxdimen defaults to 1 bp in pdfTeX and LuaTeX
+}, V1 = {
+ ex: !0,
+ em: !0,
+ mu: !0
+}, W1 = function(e) {
+ return typeof e != "string" && (e = e.unit), e in na || e in V1 || e === "ex";
+}, we = function(e, t) {
+ var r;
+ if (e.unit in na)
+ r = na[e.unit] / t.fontMetrics().ptPerEm / t.sizeMultiplier;
+ else if (e.unit === "mu")
+ r = t.fontMetrics().cssEmPerMu;
+ else {
+ var a;
+ if (t.style.isTight() ? a = t.havingStyle(t.style.text()) : a = t, e.unit === "ex")
+ r = a.fontMetrics().xHeight;
+ else if (e.unit === "em")
+ r = a.fontMetrics().quad;
+ else
+ throw new W("Invalid unit: '" + e.unit + "'");
+ a !== t && (r *= a.sizeMultiplier / t.sizeMultiplier);
+ }
+ return Math.min(e.number * r, t.maxSize);
+}, O = function(e) {
+ return +e.toFixed(4) + "em";
+}, o0 = function(e) {
+ return e.filter((t) => t).join(" ");
+}, Dl = function(e, t, r) {
+ if (this.classes = e || [], this.attributes = {}, this.height = 0, this.depth = 0, this.maxFontSize = 0, this.style = r || {}, t) {
+ t.style.isTight() && this.classes.push("mtight");
+ var a = t.getColor();
+ a && (this.style.color = a);
+ }
+}, Al = function(e) {
+ var t = document.createElement(e);
+ t.className = o0(this.classes);
+ for (var r in this.style)
+ this.style.hasOwnProperty(r) && (t.style[r] = this.style[r]);
+ for (var a in this.attributes)
+ this.attributes.hasOwnProperty(a) && t.setAttribute(a, this.attributes[a]);
+ for (var i = 0; i < this.children.length; i++)
+ t.appendChild(this.children[i].toNode());
+ return t;
+}, Y1 = /[\s"'>/=\x00-\x1f]/, Cl = function(e) {
+ var t = "<" + e;
+ this.classes.length && (t += ' class="' + Z.escape(o0(this.classes)) + '"');
+ var r = "";
+ for (var a in this.style)
+ this.style.hasOwnProperty(a) && (r += Z.hyphenate(a) + ":" + this.style[a] + ";");
+ r && (t += ' style="' + Z.escape(r) + '"');
+ for (var i in this.attributes)
+ if (this.attributes.hasOwnProperty(i)) {
+ if (Y1.test(i))
+ throw new W("Invalid attribute name '" + i + "'");
+ t += " " + i + '="' + Z.escape(this.attributes[i]) + '"';
+ }
+ t += ">";
+ for (var s = 0; s < this.children.length; s++)
+ t += this.children[s].toMarkup();
+ return t += "" + e + ">", t;
+};
+class sn {
+ constructor(e, t, r, a) {
+ this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.width = void 0, this.maxFontSize = void 0, this.style = void 0, Dl.call(this, e, r, a), this.children = t || [];
+ }
+ /**
+ * Sets an arbitrary attribute on the span. Warning: use this wisely. Not
+ * all browsers support attributes the same, and having too many custom
+ * attributes is probably bad.
+ */
+ setAttribute(e, t) {
+ this.attributes[e] = t;
+ }
+ hasClass(e) {
+ return Z.contains(this.classes, e);
+ }
+ toNode() {
+ return Al.call(this, "span");
+ }
+ toMarkup() {
+ return Cl.call(this, "span");
+ }
+}
+class Fl {
+ constructor(e, t, r, a) {
+ this.children = void 0, this.attributes = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, Dl.call(this, t, a), this.children = r || [], this.setAttribute("href", e);
+ }
+ setAttribute(e, t) {
+ this.attributes[e] = t;
+ }
+ hasClass(e) {
+ return Z.contains(this.classes, e);
+ }
+ toNode() {
+ return Al.call(this, "a");
+ }
+ toMarkup() {
+ return Cl.call(this, "a");
+ }
+}
+class X1 {
+ constructor(e, t, r) {
+ this.src = void 0, this.alt = void 0, this.classes = void 0, this.height = void 0, this.depth = void 0, this.maxFontSize = void 0, this.style = void 0, this.alt = t, this.src = e, this.classes = ["mord"], this.style = r;
+ }
+ hasClass(e) {
+ return Z.contains(this.classes, e);
+ }
+ toNode() {
+ var e = document.createElement("img");
+ e.src = this.src, e.alt = this.alt, e.className = "mord";
+ for (var t in this.style)
+ this.style.hasOwnProperty(t) && (e.style[t] = this.style[t]);
+ return e;
+ }
+ toMarkup() {
+ var e = '
" , e; + } +} +var Z1 = { + î: "ı̂", + ï: "ı̈", + í: "ı́", + 'ī': '\u0131\u0304', enable when we add Extended Latin + ì: "ı̀" +}; +class Lt { + constructor(e, t, r, a, i, s, l, u) { + this.text = void 0, this.height = void 0, this.depth = void 0, this.italic = void 0, this.skew = void 0, this.width = void 0, this.maxFontSize = void 0, this.classes = void 0, this.style = void 0, this.text = e, this.height = t || 0, this.depth = r || 0, this.italic = a || 0, this.skew = i || 0, this.width = s || 0, this.classes = l || [], this.style = u || {}, this.maxFontSize = 0; + var h = B1(this.text.charCodeAt(0)); + h && this.classes.push(h + "_fallback"), [îïíì] .test(this.text) && (this.text = Z1[this.text]); + } + hasClass(e) { + return Z.contains(this.classes, e); + } + ** + * Creates a text node or span from a symbol node. Note that a span is only + * created if it is needed. + * + toNode() { + var e = document.createTextNode(this.text), t = null; + this.italic> 0 && (t = document.createElement("span"), t.style.marginRight = O(this.italic)), this.classes.length > 0 && (t = t || document.createElement("span"), t.className = o0(this.classes));
+ for (var r in this.style)
+ this.style.hasOwnProperty(r) && (t = t || document.createElement("span"), t.style[r] = this.style[r]);
+ return t ? (t.appendChild(e), t) : e;
+ }
+ /**
+ * Creates markup for a symbol node.
+ */
+ toMarkup() {
+ var e = !1, t = " 0 && (r += "margin-right:" + this.italic + "em;");
+ for (var a in this.style)
+ this.style.hasOwnProperty(a) && (r += Z.hyphenate(a) + ":" + this.style[a] + ";");
+ r && (e = !0, t += ' style="' + Z.escape(r) + '"');
+ var i = Z.escape(this.text);
+ return e ? (t += ">", t += i, t += "", t) : i;
+ }
+}
+class u0 {
+ constructor(e, t) {
+ this.children = void 0, this.attributes = void 0, this.children = e || [], this.attributes = t || {};
+ }
+ toNode() {
+ var e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "svg");
+ for (var r in this.attributes)
+ Object.prototype.hasOwnProperty.call(this.attributes, r) && t.setAttribute(r, this.attributes[r]);
+ for (var a = 0; a < this.children.length; a++)
+ t.appendChild(this.children[a].toNode());
+ return t;
+ }
+ toMarkup() {
+ var e = '", e;
+ }
+}
+class v0 {
+ constructor(e, t) {
+ this.pathName = void 0, this.alternate = void 0, this.pathName = e, this.alternate = t;
+ }
+ toNode() {
+ var e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "path");
+ return this.alternate ? t.setAttribute("d", this.alternate) : t.setAttribute("d", Ri[this.pathName]), t;
+ }
+ toMarkup() {
+ return this.alternate ? '' : '';
+ }
+}
+class Ii {
+ constructor(e) {
+ this.attributes = void 0, this.attributes = e || {};
+ }
+ toNode() {
+ var e = "http://www.w3.org/2000/svg", t = document.createElementNS(e, "line");
+ for (var r in this.attributes)
+ Object.prototype.hasOwnProperty.call(this.attributes, r) && t.setAttribute(r, this.attributes[r]);
+ return t;
+ }
+ toMarkup() {
+ var e = "", e;
+ }
+}
+function Ni(n) {
+ if (n instanceof Lt)
+ return n;
+ throw new Error("Expected symbolNode but got " + String(n) + ".");
+}
+function K1(n) {
+ if (n instanceof sn)
+ return n;
+ throw new Error("Expected span but got " + String(n) + ".");
+}
+var Q1 = {
+ "accent-token": 1,
+ mathord: 1,
+ "op-token": 1,
+ spacing: 1,
+ textord: 1
+}, Fe = {
+ math: {},
+ text: {}
+};
+function o(n, e, t, r, a, i) {
+ Fe[n][a] = {
+ font: e,
+ group: t,
+ replace: r
+ }, i && r && (Fe[n][r] = Fe[n][a]);
+}
+var c = "math", z = "text", m = "main", b = "ams", _e = "accent-token", U = "bin", Xe = "close", H0 = "inner", X = "mathord", Te = "op-token", rt = "open", ln = "punct", y = "rel", r0 = "spacing", S = "textord";
+o(c, m, y, "≡", "\\equiv", !0);
+o(c, m, y, "≺", "\\prec", !0);
+o(c, m, y, "≻", "\\succ", !0);
+o(c, m, y, "∼", "\\sim", !0);
+o(c, m, y, "⊥", "\\perp");
+o(c, m, y, "⪯", "\\preceq", !0);
+o(c, m, y, "⪰", "\\succeq", !0);
+o(c, m, y, "≃", "\\simeq", !0);
+o(c, m, y, "∣", "\\mid", !0);
+o(c, m, y, "≪", "\\ll", !0);
+o(c, m, y, "≫", "\\gg", !0);
+o(c, m, y, "≍", "\\asymp", !0);
+o(c, m, y, "∥", "\\parallel");
+o(c, m, y, "⋈", "\\bowtie", !0);
+o(c, m, y, "⌣", "\\smile", !0);
+o(c, m, y, "⊑", "\\sqsubseteq", !0);
+o(c, m, y, "⊒", "\\sqsupseteq", !0);
+o(c, m, y, "≐", "\\doteq", !0);
+o(c, m, y, "⌢", "\\frown", !0);
+o(c, m, y, "∋", "\\ni", !0);
+o(c, m, y, "∝", "\\propto", !0);
+o(c, m, y, "⊢", "\\vdash", !0);
+o(c, m, y, "⊣", "\\dashv", !0);
+o(c, m, y, "∋", "\\owns");
+o(c, m, ln, ".", "\\ldotp");
+o(c, m, ln, "⋅", "\\cdotp");
+o(c, m, S, "#", "\\#");
+o(z, m, S, "#", "\\#");
+o(c, m, S, "&", "\\&");
+o(z, m, S, "&", "\\&");
+o(c, m, S, "ℵ", "\\aleph", !0);
+o(c, m, S, "∀", "\\forall", !0);
+o(c, m, S, "ℏ", "\\hbar", !0);
+o(c, m, S, "∃", "\\exists", !0);
+o(c, m, S, "∇", "\\nabla", !0);
+o(c, m, S, "♭", "\\flat", !0);
+o(c, m, S, "ℓ", "\\ell", !0);
+o(c, m, S, "♮", "\\natural", !0);
+o(c, m, S, "♣", "\\clubsuit", !0);
+o(c, m, S, "℘", "\\wp", !0);
+o(c, m, S, "♯", "\\sharp", !0);
+o(c, m, S, "♢", "\\diamondsuit", !0);
+o(c, m, S, "ℜ", "\\Re", !0);
+o(c, m, S, "♡", "\\heartsuit", !0);
+o(c, m, S, "ℑ", "\\Im", !0);
+o(c, m, S, "♠", "\\spadesuit", !0);
+o(c, m, S, "§", "\\S", !0);
+o(z, m, S, "§", "\\S");
+o(c, m, S, "¶", "\\P", !0);
+o(z, m, S, "¶", "\\P");
+o(c, m, S, "†", "\\dag");
+o(z, m, S, "†", "\\dag");
+o(z, m, S, "†", "\\textdagger");
+o(c, m, S, "‡", "\\ddag");
+o(z, m, S, "‡", "\\ddag");
+o(z, m, S, "‡", "\\textdaggerdbl");
+o(c, m, Xe, "⎱", "\\rmoustache", !0);
+o(c, m, rt, "⎰", "\\lmoustache", !0);
+o(c, m, Xe, "⟯", "\\rgroup", !0);
+o(c, m, rt, "⟮", "\\lgroup", !0);
+o(c, m, U, "∓", "\\mp", !0);
+o(c, m, U, "⊖", "\\ominus", !0);
+o(c, m, U, "⊎", "\\uplus", !0);
+o(c, m, U, "⊓", "\\sqcap", !0);
+o(c, m, U, "∗", "\\ast");
+o(c, m, U, "⊔", "\\sqcup", !0);
+o(c, m, U, "◯", "\\bigcirc", !0);
+o(c, m, U, "∙", "\\bullet", !0);
+o(c, m, U, "‡", "\\ddagger");
+o(c, m, U, "≀", "\\wr", !0);
+o(c, m, U, "⨿", "\\amalg");
+o(c, m, U, "&", "\\And");
+o(c, m, y, "⟵", "\\longleftarrow", !0);
+o(c, m, y, "⇐", "\\Leftarrow", !0);
+o(c, m, y, "⟸", "\\Longleftarrow", !0);
+o(c, m, y, "⟶", "\\longrightarrow", !0);
+o(c, m, y, "⇒", "\\Rightarrow", !0);
+o(c, m, y, "⟹", "\\Longrightarrow", !0);
+o(c, m, y, "↔", "\\leftrightarrow", !0);
+o(c, m, y, "⟷", "\\longleftrightarrow", !0);
+o(c, m, y, "⇔", "\\Leftrightarrow", !0);
+o(c, m, y, "⟺", "\\Longleftrightarrow", !0);
+o(c, m, y, "↦", "\\mapsto", !0);
+o(c, m, y, "⟼", "\\longmapsto", !0);
+o(c, m, y, "↗", "\\nearrow", !0);
+o(c, m, y, "↩", "\\hookleftarrow", !0);
+o(c, m, y, "↪", "\\hookrightarrow", !0);
+o(c, m, y, "↘", "\\searrow", !0);
+o(c, m, y, "↼", "\\leftharpoonup", !0);
+o(c, m, y, "⇀", "\\rightharpoonup", !0);
+o(c, m, y, "↙", "\\swarrow", !0);
+o(c, m, y, "↽", "\\leftharpoondown", !0);
+o(c, m, y, "⇁", "\\rightharpoondown", !0);
+o(c, m, y, "↖", "\\nwarrow", !0);
+o(c, m, y, "⇌", "\\rightleftharpoons", !0);
+o(c, b, y, "≮", "\\nless", !0);
+o(c, b, y, "", "\\@nleqslant");
+o(c, b, y, "", "\\@nleqq");
+o(c, b, y, "⪇", "\\lneq", !0);
+o(c, b, y, "≨", "\\lneqq", !0);
+o(c, b, y, "", "\\@lvertneqq");
+o(c, b, y, "⋦", "\\lnsim", !0);
+o(c, b, y, "⪉", "\\lnapprox", !0);
+o(c, b, y, "⊀", "\\nprec", !0);
+o(c, b, y, "⋠", "\\npreceq", !0);
+o(c, b, y, "⋨", "\\precnsim", !0);
+o(c, b, y, "⪹", "\\precnapprox", !0);
+o(c, b, y, "≁", "\\nsim", !0);
+o(c, b, y, "", "\\@nshortmid");
+o(c, b, y, "∤", "\\nmid", !0);
+o(c, b, y, "⊬", "\\nvdash", !0);
+o(c, b, y, "⊭", "\\nvDash", !0);
+o(c, b, y, "⋪", "\\ntriangleleft");
+o(c, b, y, "⋬", "\\ntrianglelefteq", !0);
+o(c, b, y, "⊊", "\\subsetneq", !0);
+o(c, b, y, "", "\\@varsubsetneq");
+o(c, b, y, "⫋", "\\subsetneqq", !0);
+o(c, b, y, "", "\\@varsubsetneqq");
+o(c, b, y, "≯", "\\ngtr", !0);
+o(c, b, y, "", "\\@ngeqslant");
+o(c, b, y, "", "\\@ngeqq");
+o(c, b, y, "⪈", "\\gneq", !0);
+o(c, b, y, "≩", "\\gneqq", !0);
+o(c, b, y, "", "\\@gvertneqq");
+o(c, b, y, "⋧", "\\gnsim", !0);
+o(c, b, y, "⪊", "\\gnapprox", !0);
+o(c, b, y, "⊁", "\\nsucc", !0);
+o(c, b, y, "⋡", "\\nsucceq", !0);
+o(c, b, y, "⋩", "\\succnsim", !0);
+o(c, b, y, "⪺", "\\succnapprox", !0);
+o(c, b, y, "≆", "\\ncong", !0);
+o(c, b, y, "", "\\@nshortparallel");
+o(c, b, y, "∦", "\\nparallel", !0);
+o(c, b, y, "⊯", "\\nVDash", !0);
+o(c, b, y, "⋫", "\\ntriangleright");
+o(c, b, y, "⋭", "\\ntrianglerighteq", !0);
+o(c, b, y, "", "\\@nsupseteqq");
+o(c, b, y, "⊋", "\\supsetneq", !0);
+o(c, b, y, "", "\\@varsupsetneq");
+o(c, b, y, "⫌", "\\supsetneqq", !0);
+o(c, b, y, "", "\\@varsupsetneqq");
+o(c, b, y, "⊮", "\\nVdash", !0);
+o(c, b, y, "⪵", "\\precneqq", !0);
+o(c, b, y, "⪶", "\\succneqq", !0);
+o(c, b, y, "", "\\@nsubseteqq");
+o(c, b, U, "⊴", "\\unlhd");
+o(c, b, U, "⊵", "\\unrhd");
+o(c, b, y, "↚", "\\nleftarrow", !0);
+o(c, b, y, "↛", "\\nrightarrow", !0);
+o(c, b, y, "⇍", "\\nLeftarrow", !0);
+o(c, b, y, "⇏", "\\nRightarrow", !0);
+o(c, b, y, "↮", "\\nleftrightarrow", !0);
+o(c, b, y, "⇎", "\\nLeftrightarrow", !0);
+o(c, b, y, "△", "\\vartriangle");
+o(c, b, S, "ℏ", "\\hslash");
+o(c, b, S, "▽", "\\triangledown");
+o(c, b, S, "◊", "\\lozenge");
+o(c, b, S, "Ⓢ", "\\circledS");
+o(c, b, S, "®", "\\circledR");
+o(z, b, S, "®", "\\circledR");
+o(c, b, S, "∡", "\\measuredangle", !0);
+o(c, b, S, "∄", "\\nexists");
+o(c, b, S, "℧", "\\mho");
+o(c, b, S, "Ⅎ", "\\Finv", !0);
+o(c, b, S, "⅁", "\\Game", !0);
+o(c, b, S, "‵", "\\backprime");
+o(c, b, S, "▲", "\\blacktriangle");
+o(c, b, S, "▼", "\\blacktriangledown");
+o(c, b, S, "■", "\\blacksquare");
+o(c, b, S, "⧫", "\\blacklozenge");
+o(c, b, S, "★", "\\bigstar");
+o(c, b, S, "∢", "\\sphericalangle", !0);
+o(c, b, S, "∁", "\\complement", !0);
+o(c, b, S, "ð", "\\eth", !0);
+o(z, m, S, "ð", "ð");
+o(c, b, S, "╱", "\\diagup");
+o(c, b, S, "╲", "\\diagdown");
+o(c, b, S, "□", "\\square");
+o(c, b, S, "□", "\\Box");
+o(c, b, S, "◊", "\\Diamond");
+o(c, b, S, "¥", "\\yen", !0);
+o(z, b, S, "¥", "\\yen", !0);
+o(c, b, S, "✓", "\\checkmark", !0);
+o(z, b, S, "✓", "\\checkmark");
+o(c, b, S, "ℶ", "\\beth", !0);
+o(c, b, S, "ℸ", "\\daleth", !0);
+o(c, b, S, "ℷ", "\\gimel", !0);
+o(c, b, S, "ϝ", "\\digamma", !0);
+o(c, b, S, "ϰ", "\\varkappa");
+o(c, b, rt, "┌", "\\@ulcorner", !0);
+o(c, b, Xe, "┐", "\\@urcorner", !0);
+o(c, b, rt, "└", "\\@llcorner", !0);
+o(c, b, Xe, "┘", "\\@lrcorner", !0);
+o(c, b, y, "≦", "\\leqq", !0);
+o(c, b, y, "⩽", "\\leqslant", !0);
+o(c, b, y, "⪕", "\\eqslantless", !0);
+o(c, b, y, "≲", "\\lesssim", !0);
+o(c, b, y, "⪅", "\\lessapprox", !0);
+o(c, b, y, "≊", "\\approxeq", !0);
+o(c, b, U, "⋖", "\\lessdot");
+o(c, b, y, "⋘", "\\lll", !0);
+o(c, b, y, "≶", "\\lessgtr", !0);
+o(c, b, y, "⋚", "\\lesseqgtr", !0);
+o(c, b, y, "⪋", "\\lesseqqgtr", !0);
+o(c, b, y, "≑", "\\doteqdot");
+o(c, b, y, "≓", "\\risingdotseq", !0);
+o(c, b, y, "≒", "\\fallingdotseq", !0);
+o(c, b, y, "∽", "\\backsim", !0);
+o(c, b, y, "⋍", "\\backsimeq", !0);
+o(c, b, y, "⫅", "\\subseteqq", !0);
+o(c, b, y, "⋐", "\\Subset", !0);
+o(c, b, y, "⊏", "\\sqsubset", !0);
+o(c, b, y, "≼", "\\preccurlyeq", !0);
+o(c, b, y, "⋞", "\\curlyeqprec", !0);
+o(c, b, y, "≾", "\\precsim", !0);
+o(c, b, y, "⪷", "\\precapprox", !0);
+o(c, b, y, "⊲", "\\vartriangleleft");
+o(c, b, y, "⊴", "\\trianglelefteq");
+o(c, b, y, "⊨", "\\vDash", !0);
+o(c, b, y, "⊪", "\\Vvdash", !0);
+o(c, b, y, "⌣", "\\smallsmile");
+o(c, b, y, "⌢", "\\smallfrown");
+o(c, b, y, "≏", "\\bumpeq", !0);
+o(c, b, y, "≎", "\\Bumpeq", !0);
+o(c, b, y, "≧", "\\geqq", !0);
+o(c, b, y, "⩾", "\\geqslant", !0);
+o(c, b, y, "⪖", "\\eqslantgtr", !0);
+o(c, b, y, "≳", "\\gtrsim", !0);
+o(c, b, y, "⪆", "\\gtrapprox", !0);
+o(c, b, U, "⋗", "\\gtrdot");
+o(c, b, y, "⋙", "\\ggg", !0);
+o(c, b, y, "≷", "\\gtrless", !0);
+o(c, b, y, "⋛", "\\gtreqless", !0);
+o(c, b, y, "⪌", "\\gtreqqless", !0);
+o(c, b, y, "≖", "\\eqcirc", !0);
+o(c, b, y, "≗", "\\circeq", !0);
+o(c, b, y, "≜", "\\triangleq", !0);
+o(c, b, y, "∼", "\\thicksim");
+o(c, b, y, "≈", "\\thickapprox");
+o(c, b, y, "⫆", "\\supseteqq", !0);
+o(c, b, y, "⋑", "\\Supset", !0);
+o(c, b, y, "⊐", "\\sqsupset", !0);
+o(c, b, y, "≽", "\\succcurlyeq", !0);
+o(c, b, y, "⋟", "\\curlyeqsucc", !0);
+o(c, b, y, "≿", "\\succsim", !0);
+o(c, b, y, "⪸", "\\succapprox", !0);
+o(c, b, y, "⊳", "\\vartriangleright");
+o(c, b, y, "⊵", "\\trianglerighteq");
+o(c, b, y, "⊩", "\\Vdash", !0);
+o(c, b, y, "∣", "\\shortmid");
+o(c, b, y, "∥", "\\shortparallel");
+o(c, b, y, "≬", "\\between", !0);
+o(c, b, y, "⋔", "\\pitchfork", !0);
+o(c, b, y, "∝", "\\varpropto");
+o(c, b, y, "◀", "\\blacktriangleleft");
+o(c, b, y, "∴", "\\therefore", !0);
+o(c, b, y, "∍", "\\backepsilon");
+o(c, b, y, "▶", "\\blacktriangleright");
+o(c, b, y, "∵", "\\because", !0);
+o(c, b, y, "⋘", "\\llless");
+o(c, b, y, "⋙", "\\gggtr");
+o(c, b, U, "⊲", "\\lhd");
+o(c, b, U, "⊳", "\\rhd");
+o(c, b, y, "≂", "\\eqsim", !0);
+o(c, m, y, "⋈", "\\Join");
+o(c, b, y, "≑", "\\Doteq", !0);
+o(c, b, U, "∔", "\\dotplus", !0);
+o(c, b, U, "∖", "\\smallsetminus");
+o(c, b, U, "⋒", "\\Cap", !0);
+o(c, b, U, "⋓", "\\Cup", !0);
+o(c, b, U, "⩞", "\\doublebarwedge", !0);
+o(c, b, U, "⊟", "\\boxminus", !0);
+o(c, b, U, "⊞", "\\boxplus", !0);
+o(c, b, U, "⋇", "\\divideontimes", !0);
+o(c, b, U, "⋉", "\\ltimes", !0);
+o(c, b, U, "⋊", "\\rtimes", !0);
+o(c, b, U, "⋋", "\\leftthreetimes", !0);
+o(c, b, U, "⋌", "\\rightthreetimes", !0);
+o(c, b, U, "⋏", "\\curlywedge", !0);
+o(c, b, U, "⋎", "\\curlyvee", !0);
+o(c, b, U, "⊝", "\\circleddash", !0);
+o(c, b, U, "⊛", "\\circledast", !0);
+o(c, b, U, "⋅", "\\centerdot");
+o(c, b, U, "⊺", "\\intercal", !0);
+o(c, b, U, "⋒", "\\doublecap");
+o(c, b, U, "⋓", "\\doublecup");
+o(c, b, U, "⊠", "\\boxtimes", !0);
+o(c, b, y, "⇢", "\\dashrightarrow", !0);
+o(c, b, y, "⇠", "\\dashleftarrow", !0);
+o(c, b, y, "⇇", "\\leftleftarrows", !0);
+o(c, b, y, "⇆", "\\leftrightarrows", !0);
+o(c, b, y, "⇚", "\\Lleftarrow", !0);
+o(c, b, y, "↞", "\\twoheadleftarrow", !0);
+o(c, b, y, "↢", "\\leftarrowtail", !0);
+o(c, b, y, "↫", "\\looparrowleft", !0);
+o(c, b, y, "⇋", "\\leftrightharpoons", !0);
+o(c, b, y, "↶", "\\curvearrowleft", !0);
+o(c, b, y, "↺", "\\circlearrowleft", !0);
+o(c, b, y, "↰", "\\Lsh", !0);
+o(c, b, y, "⇈", "\\upuparrows", !0);
+o(c, b, y, "↿", "\\upharpoonleft", !0);
+o(c, b, y, "⇃", "\\downharpoonleft", !0);
+o(c, m, y, "⊶", "\\origof", !0);
+o(c, m, y, "⊷", "\\imageof", !0);
+o(c, b, y, "⊸", "\\multimap", !0);
+o(c, b, y, "↭", "\\leftrightsquigarrow", !0);
+o(c, b, y, "⇉", "\\rightrightarrows", !0);
+o(c, b, y, "⇄", "\\rightleftarrows", !0);
+o(c, b, y, "↠", "\\twoheadrightarrow", !0);
+o(c, b, y, "↣", "\\rightarrowtail", !0);
+o(c, b, y, "↬", "\\looparrowright", !0);
+o(c, b, y, "↷", "\\curvearrowright", !0);
+o(c, b, y, "↻", "\\circlearrowright", !0);
+o(c, b, y, "↱", "\\Rsh", !0);
+o(c, b, y, "⇊", "\\downdownarrows", !0);
+o(c, b, y, "↾", "\\upharpoonright", !0);
+o(c, b, y, "⇂", "\\downharpoonright", !0);
+o(c, b, y, "⇝", "\\rightsquigarrow", !0);
+o(c, b, y, "⇝", "\\leadsto");
+o(c, b, y, "⇛", "\\Rrightarrow", !0);
+o(c, b, y, "↾", "\\restriction");
+o(c, m, S, "‘", "`");
+o(c, m, S, "$", "\\$");
+o(z, m, S, "$", "\\$");
+o(z, m, S, "$", "\\textdollar");
+o(c, m, S, "%", "\\%");
+o(z, m, S, "%", "\\%");
+o(c, m, S, "_", "\\_");
+o(z, m, S, "_", "\\_");
+o(z, m, S, "_", "\\textunderscore");
+o(c, m, S, "∠", "\\angle", !0);
+o(c, m, S, "∞", "\\infty", !0);
+o(c, m, S, "′", "\\prime");
+o(c, m, S, "△", "\\triangle");
+o(c, m, S, "Γ", "\\Gamma", !0);
+o(c, m, S, "Δ", "\\Delta", !0);
+o(c, m, S, "Θ", "\\Theta", !0);
+o(c, m, S, "Λ", "\\Lambda", !0);
+o(c, m, S, "Ξ", "\\Xi", !0);
+o(c, m, S, "Π", "\\Pi", !0);
+o(c, m, S, "Σ", "\\Sigma", !0);
+o(c, m, S, "Υ", "\\Upsilon", !0);
+o(c, m, S, "Φ", "\\Phi", !0);
+o(c, m, S, "Ψ", "\\Psi", !0);
+o(c, m, S, "Ω", "\\Omega", !0);
+o(c, m, S, "A", "Α");
+o(c, m, S, "B", "Β");
+o(c, m, S, "E", "Ε");
+o(c, m, S, "Z", "Ζ");
+o(c, m, S, "H", "Η");
+o(c, m, S, "I", "Ι");
+o(c, m, S, "K", "Κ");
+o(c, m, S, "M", "Μ");
+o(c, m, S, "N", "Ν");
+o(c, m, S, "O", "Ο");
+o(c, m, S, "P", "Ρ");
+o(c, m, S, "T", "Τ");
+o(c, m, S, "X", "Χ");
+o(c, m, S, "¬", "\\neg", !0);
+o(c, m, S, "¬", "\\lnot");
+o(c, m, S, "⊤", "\\top");
+o(c, m, S, "⊥", "\\bot");
+o(c, m, S, "∅", "\\emptyset");
+o(c, b, S, "∅", "\\varnothing");
+o(c, m, X, "α", "\\alpha", !0);
+o(c, m, X, "β", "\\beta", !0);
+o(c, m, X, "γ", "\\gamma", !0);
+o(c, m, X, "δ", "\\delta", !0);
+o(c, m, X, "ϵ", "\\epsilon", !0);
+o(c, m, X, "ζ", "\\zeta", !0);
+o(c, m, X, "η", "\\eta", !0);
+o(c, m, X, "θ", "\\theta", !0);
+o(c, m, X, "ι", "\\iota", !0);
+o(c, m, X, "κ", "\\kappa", !0);
+o(c, m, X, "λ", "\\lambda", !0);
+o(c, m, X, "μ", "\\mu", !0);
+o(c, m, X, "ν", "\\nu", !0);
+o(c, m, X, "ξ", "\\xi", !0);
+o(c, m, X, "ο", "\\omicron", !0);
+o(c, m, X, "π", "\\pi", !0);
+o(c, m, X, "ρ", "\\rho", !0);
+o(c, m, X, "σ", "\\sigma", !0);
+o(c, m, X, "τ", "\\tau", !0);
+o(c, m, X, "υ", "\\upsilon", !0);
+o(c, m, X, "ϕ", "\\phi", !0);
+o(c, m, X, "χ", "\\chi", !0);
+o(c, m, X, "ψ", "\\psi", !0);
+o(c, m, X, "ω", "\\omega", !0);
+o(c, m, X, "ε", "\\varepsilon", !0);
+o(c, m, X, "ϑ", "\\vartheta", !0);
+o(c, m, X, "ϖ", "\\varpi", !0);
+o(c, m, X, "ϱ", "\\varrho", !0);
+o(c, m, X, "ς", "\\varsigma", !0);
+o(c, m, X, "φ", "\\varphi", !0);
+o(c, m, U, "∗", "*", !0);
+o(c, m, U, "+", "+");
+o(c, m, U, "−", "-", !0);
+o(c, m, U, "⋅", "\\cdot", !0);
+o(c, m, U, "∘", "\\circ", !0);
+o(c, m, U, "÷", "\\div", !0);
+o(c, m, U, "±", "\\pm", !0);
+o(c, m, U, "×", "\\times", !0);
+o(c, m, U, "∩", "\\cap", !0);
+o(c, m, U, "∪", "\\cup", !0);
+o(c, m, U, "∖", "\\setminus", !0);
+o(c, m, U, "∧", "\\land");
+o(c, m, U, "∨", "\\lor");
+o(c, m, U, "∧", "\\wedge", !0);
+o(c, m, U, "∨", "\\vee", !0);
+o(c, m, S, "√", "\\surd");
+o(c, m, rt, "⟨", "\\langle", !0);
+o(c, m, rt, "∣", "\\lvert");
+o(c, m, rt, "∥", "\\lVert");
+o(c, m, Xe, "?", "?");
+o(c, m, Xe, "!", "!");
+o(c, m, Xe, "⟩", "\\rangle", !0);
+o(c, m, Xe, "∣", "\\rvert");
+o(c, m, Xe, "∥", "\\rVert");
+o(c, m, y, "=", "=");
+o(c, m, y, ":", ":");
+o(c, m, y, "≈", "\\approx", !0);
+o(c, m, y, "≅", "\\cong", !0);
+o(c, m, y, "≥", "\\ge");
+o(c, m, y, "≥", "\\geq", !0);
+o(c, m, y, "←", "\\gets");
+o(c, m, y, ">", "\\gt", !0);
+o(c, m, y, "∈", "\\in", !0);
+o(c, m, y, "", "\\@not");
+o(c, m, y, "⊂", "\\subset", !0);
+o(c, m, y, "⊃", "\\supset", !0);
+o(c, m, y, "⊆", "\\subseteq", !0);
+o(c, m, y, "⊇", "\\supseteq", !0);
+o(c, b, y, "⊈", "\\nsubseteq", !0);
+o(c, b, y, "⊉", "\\nsupseteq", !0);
+o(c, m, y, "⊨", "\\models");
+o(c, m, y, "←", "\\leftarrow", !0);
+o(c, m, y, "≤", "\\le");
+o(c, m, y, "≤", "\\leq", !0);
+o(c, m, y, "<", "\\lt", !0);
+o(c, m, y, "→", "\\rightarrow", !0);
+o(c, m, y, "→", "\\to");
+o(c, b, y, "≱", "\\ngeq", !0);
+o(c, b, y, "≰", "\\nleq", !0);
+o(c, m, r0, " ", "\\ ");
+o(c, m, r0, " ", "\\space");
+o(c, m, r0, " ", "\\nobreakspace");
+o(z, m, r0, " ", "\\ ");
+o(z, m, r0, " ", " ");
+o(z, m, r0, " ", "\\space");
+o(z, m, r0, " ", "\\nobreakspace");
+o(c, m, r0, null, "\\nobreak");
+o(c, m, r0, null, "\\allowbreak");
+o(c, m, ln, ",", ",");
+o(c, m, ln, ";", ";");
+o(c, b, U, "⊼", "\\barwedge", !0);
+o(c, b, U, "⊻", "\\veebar", !0);
+o(c, m, U, "⊙", "\\odot", !0);
+o(c, m, U, "⊕", "\\oplus", !0);
+o(c, m, U, "⊗", "\\otimes", !0);
+o(c, m, S, "∂", "\\partial", !0);
+o(c, m, U, "⊘", "\\oslash", !0);
+o(c, b, U, "⊚", "\\circledcirc", !0);
+o(c, b, U, "⊡", "\\boxdot", !0);
+o(c, m, U, "△", "\\bigtriangleup");
+o(c, m, U, "▽", "\\bigtriangledown");
+o(c, m, U, "†", "\\dagger");
+o(c, m, U, "⋄", "\\diamond");
+o(c, m, U, "⋆", "\\star");
+o(c, m, U, "◃", "\\triangleleft");
+o(c, m, U, "▹", "\\triangleright");
+o(c, m, rt, "{", "\\{");
+o(z, m, S, "{", "\\{");
+o(z, m, S, "{", "\\textbraceleft");
+o(c, m, Xe, "}", "\\}");
+o(z, m, S, "}", "\\}");
+o(z, m, S, "}", "\\textbraceright");
+o(c, m, rt, "{", "\\lbrace");
+o(c, m, Xe, "}", "\\rbrace");
+o(c, m, rt, "[", "\\lbrack", !0);
+o(z, m, S, "[", "\\lbrack", !0);
+o(c, m, Xe, "]", "\\rbrack", !0);
+o(z, m, S, "]", "\\rbrack", !0);
+o(c, m, rt, "(", "\\lparen", !0);
+o(c, m, Xe, ")", "\\rparen", !0);
+o(z, m, S, "<", "\\textless", !0);
+o(z, m, S, ">", "\\textgreater", !0);
+o(c, m, rt, "⌊", "\\lfloor", !0);
+o(c, m, Xe, "⌋", "\\rfloor", !0);
+o(c, m, rt, "⌈", "\\lceil", !0);
+o(c, m, Xe, "⌉", "\\rceil", !0);
+o(c, m, S, "\\", "\\backslash");
+o(c, m, S, "∣", "|");
+o(c, m, S, "∣", "\\vert");
+o(z, m, S, "|", "\\textbar", !0);
+o(c, m, S, "∥", "\\|");
+o(c, m, S, "∥", "\\Vert");
+o(z, m, S, "∥", "\\textbardbl");
+o(z, m, S, "~", "\\textasciitilde");
+o(z, m, S, "\\", "\\textbackslash");
+o(z, m, S, "^", "\\textasciicircum");
+o(c, m, y, "↑", "\\uparrow", !0);
+o(c, m, y, "⇑", "\\Uparrow", !0);
+o(c, m, y, "↓", "\\downarrow", !0);
+o(c, m, y, "⇓", "\\Downarrow", !0);
+o(c, m, y, "↕", "\\updownarrow", !0);
+o(c, m, y, "⇕", "\\Updownarrow", !0);
+o(c, m, Te, "∐", "\\coprod");
+o(c, m, Te, "⋁", "\\bigvee");
+o(c, m, Te, "⋀", "\\bigwedge");
+o(c, m, Te, "⨄", "\\biguplus");
+o(c, m, Te, "⋂", "\\bigcap");
+o(c, m, Te, "⋃", "\\bigcup");
+o(c, m, Te, "∫", "\\int");
+o(c, m, Te, "∫", "\\intop");
+o(c, m, Te, "∬", "\\iint");
+o(c, m, Te, "∭", "\\iiint");
+o(c, m, Te, "∏", "\\prod");
+o(c, m, Te, "∑", "\\sum");
+o(c, m, Te, "⨂", "\\bigotimes");
+o(c, m, Te, "⨁", "\\bigoplus");
+o(c, m, Te, "⨀", "\\bigodot");
+o(c, m, Te, "∮", "\\oint");
+o(c, m, Te, "∯", "\\oiint");
+o(c, m, Te, "∰", "\\oiiint");
+o(c, m, Te, "⨆", "\\bigsqcup");
+o(c, m, Te, "∫", "\\smallint");
+o(z, m, H0, "…", "\\textellipsis");
+o(c, m, H0, "…", "\\mathellipsis");
+o(z, m, H0, "…", "\\ldots", !0);
+o(c, m, H0, "…", "\\ldots", !0);
+o(c, m, H0, "⋯", "\\@cdots", !0);
+o(c, m, H0, "⋱", "\\ddots", !0);
+o(c, m, S, "⋮", "\\varvdots");
+o(z, m, S, "⋮", "\\varvdots");
+o(c, m, _e, "ˊ", "\\acute");
+o(c, m, _e, "ˋ", "\\grave");
+o(c, m, _e, "¨", "\\ddot");
+o(c, m, _e, "~", "\\tilde");
+o(c, m, _e, "ˉ", "\\bar");
+o(c, m, _e, "˘", "\\breve");
+o(c, m, _e, "ˇ", "\\check");
+o(c, m, _e, "^", "\\hat");
+o(c, m, _e, "⃗", "\\vec");
+o(c, m, _e, "˙", "\\dot");
+o(c, m, _e, "˚", "\\mathring");
+o(c, m, X, "", "\\@imath");
+o(c, m, X, "", "\\@jmath");
+o(c, m, S, "ı", "ı");
+o(c, m, S, "ȷ", "ȷ");
+o(z, m, S, "ı", "\\i", !0);
+o(z, m, S, "ȷ", "\\j", !0);
+o(z, m, S, "ß", "\\ss", !0);
+o(z, m, S, "æ", "\\ae", !0);
+o(z, m, S, "œ", "\\oe", !0);
+o(z, m, S, "ø", "\\o", !0);
+o(z, m, S, "Æ", "\\AE", !0);
+o(z, m, S, "Œ", "\\OE", !0);
+o(z, m, S, "Ø", "\\O", !0);
+o(z, m, _e, "ˊ", "\\'");
+o(z, m, _e, "ˋ", "\\`");
+o(z, m, _e, "ˆ", "\\^");
+o(z, m, _e, "˜", "\\~");
+o(z, m, _e, "ˉ", "\\=");
+o(z, m, _e, "˘", "\\u");
+o(z, m, _e, "˙", "\\.");
+o(z, m, _e, "¸", "\\c");
+o(z, m, _e, "˚", "\\r");
+o(z, m, _e, "ˇ", "\\v");
+o(z, m, _e, "¨", '\\"');
+o(z, m, _e, "˝", "\\H");
+o(z, m, _e, "◯", "\\textcircled");
+var El = {
+ "--": !0,
+ "---": !0,
+ "``": !0,
+ "''": !0
+};
+o(z, m, S, "–", "--", !0);
+o(z, m, S, "–", "\\textendash");
+o(z, m, S, "—", "---", !0);
+o(z, m, S, "—", "\\textemdash");
+o(z, m, S, "‘", "`", !0);
+o(z, m, S, "‘", "\\textquoteleft");
+o(z, m, S, "’", "'", !0);
+o(z, m, S, "’", "\\textquoteright");
+o(z, m, S, "“", "``", !0);
+o(z, m, S, "“", "\\textquotedblleft");
+o(z, m, S, "”", "''", !0);
+o(z, m, S, "”", "\\textquotedblright");
+o(c, m, S, "°", "\\degree", !0);
+o(z, m, S, "°", "\\degree");
+o(z, m, S, "°", "\\textdegree", !0);
+o(c, m, S, "£", "\\pounds");
+o(c, m, S, "£", "\\mathsterling", !0);
+o(z, m, S, "£", "\\pounds");
+o(z, m, S, "£", "\\textsterling", !0);
+o(c, b, S, "✠", "\\maltese");
+o(z, b, S, "✠", "\\maltese");
+var Li = '0123456789/@."';
+for (var xn = 0; xn < Li.length; xn++) {
+ var Oi = Li.charAt(xn);
+ o(c, m, S, Oi, Oi);
+}
+var Pi = '0123456789!@*()-=+";:?/.,';
+for (var Dn = 0; Dn < Pi.length; Dn++) {
+ var Hi = Pi.charAt(Dn);
+ o(z, m, S, Hi, Hi);
+}
+var Vr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+for (var An = 0; An < Vr.length; An++) {
+ var yr = Vr.charAt(An);
+ o(c, m, X, yr, yr), o(z, m, S, yr, yr);
+}
+o(c, b, S, "C", "ℂ");
+o(z, b, S, "C", "ℂ");
+o(c, b, S, "H", "ℍ");
+o(z, b, S, "H", "ℍ");
+o(c, b, S, "N", "ℕ");
+o(z, b, S, "N", "ℕ");
+o(c, b, S, "P", "ℙ");
+o(z, b, S, "P", "ℙ");
+o(c, b, S, "Q", "ℚ");
+o(z, b, S, "Q", "ℚ");
+o(c, b, S, "R", "ℝ");
+o(z, b, S, "R", "ℝ");
+o(c, b, S, "Z", "ℤ");
+o(z, b, S, "Z", "ℤ");
+o(c, m, X, "h", "ℎ");
+o(z, m, X, "h", "ℎ");
+var ee = "";
+for (var Ge = 0; Ge < Vr.length; Ge++) {
+ var xe = Vr.charAt(Ge);
+ ee = String.fromCharCode(55349, 56320 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee), ee = String.fromCharCode(55349, 56372 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee), ee = String.fromCharCode(55349, 56424 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee), ee = String.fromCharCode(55349, 56580 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee), ee = String.fromCharCode(55349, 56684 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee), ee = String.fromCharCode(55349, 56736 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee), ee = String.fromCharCode(55349, 56788 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee), ee = String.fromCharCode(55349, 56840 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee), ee = String.fromCharCode(55349, 56944 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee), Ge < 26 && (ee = String.fromCharCode(55349, 56632 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee), ee = String.fromCharCode(55349, 56476 + Ge), o(c, m, X, xe, ee), o(z, m, S, xe, ee));
+}
+ee = "𝕜";
+o(c, m, X, "k", ee);
+o(z, m, S, "k", ee);
+for (var d0 = 0; d0 < 10; d0++) {
+ var a0 = d0.toString();
+ ee = String.fromCharCode(55349, 57294 + d0), o(c, m, X, a0, ee), o(z, m, S, a0, ee), ee = String.fromCharCode(55349, 57314 + d0), o(c, m, X, a0, ee), o(z, m, S, a0, ee), ee = String.fromCharCode(55349, 57324 + d0), o(c, m, X, a0, ee), o(z, m, S, a0, ee), ee = String.fromCharCode(55349, 57334 + d0), o(c, m, X, a0, ee), o(z, m, S, a0, ee);
+}
+var Ui = "ÐÞþ";
+for (var Cn = 0; Cn < Ui.length; Cn++) {
+ var wr = Ui.charAt(Cn);
+ o(c, m, X, wr, wr), o(z, m, S, wr, wr);
+}
+var kr = [
+ ["mathbf", "textbf", "Main-Bold"],
+ // A-Z bold upright
+ ["mathbf", "textbf", "Main-Bold"],
+ // a-z bold upright
+ ["mathnormal", "textit", "Math-Italic"],
+ // A-Z italic
+ ["mathnormal", "textit", "Math-Italic"],
+ // a-z italic
+ ["boldsymbol", "boldsymbol", "Main-BoldItalic"],
+ // A-Z bold italic
+ ["boldsymbol", "boldsymbol", "Main-BoldItalic"],
+ // a-z bold italic
+ // Map fancy A-Z letters to script, not calligraphic.
+ // This aligns with unicode-math and math fonts (except Cambria Math).
+ ["mathscr", "textscr", "Script-Regular"],
+ // A-Z script
+ ["", "", ""],
+ // a-z script. No font
+ ["", "", ""],
+ // A-Z bold script. No font
+ ["", "", ""],
+ // a-z bold script. No font
+ ["mathfrak", "textfrak", "Fraktur-Regular"],
+ // A-Z Fraktur
+ ["mathfrak", "textfrak", "Fraktur-Regular"],
+ // a-z Fraktur
+ ["mathbb", "textbb", "AMS-Regular"],
+ // A-Z double-struck
+ ["mathbb", "textbb", "AMS-Regular"],
+ // k double-struck
+ // Note that we are using a bold font, but font metrics for regular Fraktur.
+ ["mathboldfrak", "textboldfrak", "Fraktur-Regular"],
+ // A-Z bold Fraktur
+ ["mathboldfrak", "textboldfrak", "Fraktur-Regular"],
+ // a-z bold Fraktur
+ ["mathsf", "textsf", "SansSerif-Regular"],
+ // A-Z sans-serif
+ ["mathsf", "textsf", "SansSerif-Regular"],
+ // a-z sans-serif
+ ["mathboldsf", "textboldsf", "SansSerif-Bold"],
+ // A-Z bold sans-serif
+ ["mathboldsf", "textboldsf", "SansSerif-Bold"],
+ // a-z bold sans-serif
+ ["mathitsf", "textitsf", "SansSerif-Italic"],
+ // A-Z italic sans-serif
+ ["mathitsf", "textitsf", "SansSerif-Italic"],
+ // a-z italic sans-serif
+ ["", "", ""],
+ // A-Z bold italic sans. No font
+ ["", "", ""],
+ // a-z bold italic sans. No font
+ ["mathtt", "texttt", "Typewriter-Regular"],
+ // A-Z monospace
+ ["mathtt", "texttt", "Typewriter-Regular"]
+ // a-z monospace
+], Gi = [
+ ["mathbf", "textbf", "Main-Bold"],
+ // 0-9 bold
+ ["", "", ""],
+ // 0-9 double-struck. No KaTeX font.
+ ["mathsf", "textsf", "SansSerif-Regular"],
+ // 0-9 sans-serif
+ ["mathboldsf", "textboldsf", "SansSerif-Bold"],
+ // 0-9 bold sans-serif
+ ["mathtt", "texttt", "Typewriter-Regular"]
+ // 0-9 monospace
+], J1 = function(e, t) {
+ var r = e.charCodeAt(0), a = e.charCodeAt(1), i = (r - 55296) * 1024 + (a - 56320) + 65536, s = t === "math" ? 0 : 1;
+ if (119808 <= i && i < 120484) {
+ var l = Math.floor((i - 119808) / 26);
+ return [kr[l][2], kr[l][s]];
+ } else if (120782 <= i && i <= 120831) {
+ var u = Math.floor((i - 120782) / 10);
+ return [Gi[u][2], Gi[u][s]];
+ } else {
+ if (i === 120485 || i === 120486)
+ return [kr[0][2], kr[0][s]];
+ if (120486 < i && i < 120782)
+ return ["", ""];
+ throw new W("Unsupported character: " + e);
+ }
+}, on = function(e, t, r) {
+ return Fe[r][e] && Fe[r][e].replace && (e = Fe[r][e].replace), {
+ value: e,
+ metrics: xa(e, t, r)
+ };
+}, kt = function(e, t, r, a, i) {
+ var s = on(e, t, r), l = s.metrics;
+ e = s.value;
+ var u;
+ if (l) {
+ var h = l.italic;
+ (r === "text" || a && a.font === "mathit") && (h = 0), u = new Lt(e, l.height, l.depth, h, l.skew, l.width, i);
+ } else
+ typeof console < "u" && console.warn("No character metrics " + ("for '" + e + "' in style '" + t + "' and mode '" + r + "'")), u = new Lt(e, 0, 0, 0, 0, 0, i);
+ if (a) {
+ u.maxFontSize = a.sizeMultiplier, a.style.isTight() && u.classes.push("mtight");
+ var d = a.getColor();
+ d && (u.style.color = d);
+ }
+ return u;
+}, ec = function(e, t, r, a) {
+ return a === void 0 && (a = []), r.font === "boldsymbol" && on(e, "Main-Bold", t).metrics ? kt(e, "Main-Bold", t, r, a.concat(["mathbf"])) : e === "\\" || Fe[t][e].font === "main" ? kt(e, "Main-Regular", t, r, a) : kt(e, "AMS-Regular", t, r, a.concat(["amsrm"]));
+}, tc = function(e, t, r, a, i) {
+ return i !== "textord" && on(e, "Math-BoldItalic", t).metrics ? {
+ fontName: "Math-BoldItalic",
+ fontClass: "boldsymbol"
+ } : {
+ fontName: "Main-Bold",
+ fontClass: "mathbf"
+ };
+}, rc = function(e, t, r) {
+ var a = e.mode, i = e.text, s = ["mord"], l = a === "math" || a === "text" && t.font, u = l ? t.font : t.fontFamily, h = "", d = "";
+ if (i.charCodeAt(0) === 55349 && ([h, d] = J1(i, a)), h.length > 0)
+ return kt(i, h, a, t, s.concat(d));
+ if (u) {
+ var f, p;
+ if (u === "boldsymbol") {
+ var v = tc(i, a, t, s, r);
+ f = v.fontName, p = [v.fontClass];
+ } else l ? (f = Ml[u].fontName, p = [u]) : (f = Sr(u, t.fontWeight, t.fontShape), p = [u, t.fontWeight, t.fontShape]);
+ if (on(i, f, a).metrics)
+ return kt(i, f, a, t, s.concat(p));
+ if (El.hasOwnProperty(i) && f.slice(0, 10) === "Typewriter") {
+ for (var w = [], D = 0; D < i.length; D++)
+ w.push(kt(i[D], f, a, t, s.concat(p)));
+ return $l(w);
+ }
+ }
+ if (r === "mathord")
+ return kt(i, "Math-Italic", a, t, s.concat(["mathnormal"]));
+ if (r === "textord") {
+ var C = Fe[a][i] && Fe[a][i].font;
+ if (C === "ams") {
+ var $ = Sr("amsrm", t.fontWeight, t.fontShape);
+ return kt(i, $, a, t, s.concat("amsrm", t.fontWeight, t.fontShape));
+ } else if (C === "main" || !C) {
+ var k = Sr("textrm", t.fontWeight, t.fontShape);
+ return kt(i, k, a, t, s.concat(t.fontWeight, t.fontShape));
+ } else {
+ var _ = Sr(C, t.fontWeight, t.fontShape);
+ return kt(i, _, a, t, s.concat(_, t.fontWeight, t.fontShape));
+ }
+ } else
+ throw new Error("unexpected type: " + r + " in makeOrd");
+}, nc = (n, e) => {
+ if (o0(n.classes) !== o0(e.classes) || n.skew !== e.skew || n.maxFontSize !== e.maxFontSize)
+ return !1;
+ if (n.classes.length === 1) {
+ var t = n.classes[0];
+ if (t === "mbin" || t === "mord")
+ return !1;
+ }
+ for (var r in n.style)
+ if (n.style.hasOwnProperty(r) && n.style[r] !== e.style[r])
+ return !1;
+ for (var a in e.style)
+ if (e.style.hasOwnProperty(a) && n.style[a] !== e.style[a])
+ return !1;
+ return !0;
+}, ac = (n) => {
+ for (var e = 0; e < n.length - 1; e++) {
+ var t = n[e], r = n[e + 1];
+ t instanceof Lt && r instanceof Lt && nc(t, r) && (t.text += r.text, t.height = Math.max(t.height, r.height), t.depth = Math.max(t.depth, r.depth), t.italic = r.italic, n.splice(e + 1, 1), e--);
+ }
+ return n;
+}, Da = function(e) {
+ for (var t = 0, r = 0, a = 0, i = 0; i < e.children.length; i++) {
+ var s = e.children[i];
+ s.height > t && (t = s.height), s.depth > r && (r = s.depth), s.maxFontSize > a && (a = s.maxFontSize);
+ }
+ e.height = t, e.depth = r, e.maxFontSize = a;
+}, Ke = function(e, t, r, a) {
+ var i = new sn(e, t, r, a);
+ return Da(i), i;
+}, Tl = (n, e, t, r) => new sn(n, e, t, r), ic = function(e, t, r) {
+ var a = Ke([e], [], t);
+ return a.height = Math.max(r || t.fontMetrics().defaultRuleThickness, t.minRuleThickness), a.style.borderBottomWidth = O(a.height), a.maxFontSize = 1, a;
+}, sc = function(e, t, r, a) {
+ var i = new Fl(e, t, r, a);
+ return Da(i), i;
+}, $l = function(e) {
+ var t = new cr(e);
+ return Da(t), t;
+}, lc = function(e, t) {
+ return e instanceof cr ? Ke([], [e], t) : e;
+}, oc = function(e) {
+ if (e.positionType === "individualShift") {
+ for (var t = e.children, r = [t[0]], a = -t[0].shift - t[0].elem.depth, i = a, s = 1; s < t.length; s++) {
+ var l = -t[s].shift - i - t[s].elem.depth, u = l - (t[s - 1].elem.height + t[s - 1].elem.depth);
+ i = i + l, r.push({
+ type: "kern",
+ size: u
+ }), r.push(t[s]);
+ }
+ return {
+ children: r,
+ depth: a
+ };
+ }
+ var h;
+ if (e.positionType === "top") {
+ for (var d = e.positionData, f = 0; f < e.children.length; f++) {
+ var p = e.children[f];
+ d -= p.type === "kern" ? p.size : p.elem.height + p.elem.depth;
+ }
+ h = d;
+ } else if (e.positionType === "bottom")
+ h = -e.positionData;
+ else {
+ var v = e.children[0];
+ if (v.type !== "elem")
+ throw new Error('First child must have type "elem".');
+ if (e.positionType === "shift")
+ h = -v.elem.depth - e.positionData;
+ else if (e.positionType === "firstBaseline")
+ h = -v.elem.depth;
+ else
+ throw new Error("Invalid positionType " + e.positionType + ".");
+ }
+ return {
+ children: e.children,
+ depth: h
+ };
+}, uc = function(e, t) {
+ for (var {
+ children: r,
+ depth: a
+ } = oc(e), i = 0, s = 0; s < r.length; s++) {
+ var l = r[s];
+ if (l.type === "elem") {
+ var u = l.elem;
+ i = Math.max(i, u.maxFontSize, u.height);
+ }
+ }
+ i += 2;
+ var h = Ke(["pstrut"], []);
+ h.style.height = O(i);
+ for (var d = [], f = a, p = a, v = a, w = 0; w < r.length; w++) {
+ var D = r[w];
+ if (D.type === "kern")
+ v += D.size;
+ else {
+ var C = D.elem, $ = D.wrapperClasses || [], k = D.wrapperStyle || {}, _ = Ke($, [h, C], void 0, k);
+ _.style.top = O(-i - v - C.depth), D.marginLeft && (_.style.marginLeft = D.marginLeft), D.marginRight && (_.style.marginRight = D.marginRight), d.push(_), v += C.height + C.depth;
+ }
+ f = Math.min(f, v), p = Math.max(p, v);
+ }
+ var A = Ke(["vlist"], d);
+ A.style.height = O(p);
+ var E;
+ if (f < 0) {
+ var M = Ke([], []), T = Ke(["vlist"], [M]);
+ T.style.height = O(-f);
+ var P = Ke(["vlist-s"], [new Lt("")]);
+ E = [Ke(["vlist-r"], [A, P]), Ke(["vlist-r"], [T])];
+ } else
+ E = [Ke(["vlist-r"], [A])];
+ var I = Ke(["vlist-t"], E);
+ return E.length === 2 && I.classes.push("vlist-t2"), I.height = p, I.depth = -f, I;
+}, cc = (n, e) => {
+ var t = Ke(["mspace"], [], e), r = we(n, e);
+ return t.style.marginRight = O(r), t;
+}, Sr = function(e, t, r) {
+ var a = "";
+ switch (e) {
+ case "amsrm":
+ a = "AMS";
+ break;
+ case "textrm":
+ a = "Main";
+ break;
+ case "textsf":
+ a = "SansSerif";
+ break;
+ case "texttt":
+ a = "Typewriter";
+ break;
+ default:
+ a = e;
+ }
+ var i;
+ return t === "textbf" && r === "textit" ? i = "BoldItalic" : t === "textbf" ? i = "Bold" : t === "textit" ? i = "Italic" : i = "Regular", a + "-" + i;
+}, Ml = {
+ // styles
+ mathbf: {
+ variant: "bold",
+ fontName: "Main-Bold"
+ },
+ mathrm: {
+ variant: "normal",
+ fontName: "Main-Regular"
+ },
+ textit: {
+ variant: "italic",
+ fontName: "Main-Italic"
+ },
+ mathit: {
+ variant: "italic",
+ fontName: "Main-Italic"
+ },
+ mathnormal: {
+ variant: "italic",
+ fontName: "Math-Italic"
+ },
+ mathsfit: {
+ variant: "sans-serif-italic",
+ fontName: "SansSerif-Italic"
+ },
+ // "boldsymbol" is missing because they require the use of multiple fonts:
+ // Math-BoldItalic and Main-Bold. This is handled by a special case in
+ // makeOrd which ends up calling boldsymbol.
+ // families
+ mathbb: {
+ variant: "double-struck",
+ fontName: "AMS-Regular"
+ },
+ mathcal: {
+ variant: "script",
+ fontName: "Caligraphic-Regular"
+ },
+ mathfrak: {
+ variant: "fraktur",
+ fontName: "Fraktur-Regular"
+ },
+ mathscr: {
+ variant: "script",
+ fontName: "Script-Regular"
+ },
+ mathsf: {
+ variant: "sans-serif",
+ fontName: "SansSerif-Regular"
+ },
+ mathtt: {
+ variant: "monospace",
+ fontName: "Typewriter-Regular"
+ }
+}, zl = {
+ // path, width, height
+ vec: ["vec", 0.471, 0.714],
+ // values from the font glyph
+ oiintSize1: ["oiintSize1", 0.957, 0.499],
+ // oval to overlay the integrand
+ oiintSize2: ["oiintSize2", 1.472, 0.659],
+ oiiintSize1: ["oiiintSize1", 1.304, 0.499],
+ oiiintSize2: ["oiiintSize2", 1.98, 0.659]
+}, hc = function(e, t) {
+ var [r, a, i] = zl[e], s = new v0(r), l = new u0([s], {
+ width: O(a),
+ height: O(i),
+ // Override CSS rule `.katex svg { width: 100% }`
+ style: "width:" + O(a),
+ viewBox: "0 0 " + 1e3 * a + " " + 1e3 * i,
+ preserveAspectRatio: "xMinYMin"
+ }), u = Tl(["overlay"], [l], t);
+ return u.height = i, u.style.height = O(i), u.style.width = O(a), u;
+}, F = {
+ fontMap: Ml,
+ makeSymbol: kt,
+ mathsym: ec,
+ makeSpan: Ke,
+ makeSvgSpan: Tl,
+ makeLineSpan: ic,
+ makeAnchor: sc,
+ makeFragment: $l,
+ wrapFragment: lc,
+ makeVList: uc,
+ makeOrd: rc,
+ makeGlue: cc,
+ staticSvg: hc,
+ svgData: zl,
+ tryCombineChars: ac
+}, ye = {
+ number: 3,
+ unit: "mu"
+}, m0 = {
+ number: 4,
+ unit: "mu"
+}, Xt = {
+ number: 5,
+ unit: "mu"
+}, dc = {
+ mord: {
+ mop: ye,
+ mbin: m0,
+ mrel: Xt,
+ minner: ye
+ },
+ mop: {
+ mord: ye,
+ mop: ye,
+ mrel: Xt,
+ minner: ye
+ },
+ mbin: {
+ mord: m0,
+ mop: m0,
+ mopen: m0,
+ minner: m0
+ },
+ mrel: {
+ mord: Xt,
+ mop: Xt,
+ mopen: Xt,
+ minner: Xt
+ },
+ mopen: {},
+ mclose: {
+ mop: ye,
+ mbin: m0,
+ mrel: Xt,
+ minner: ye
+ },
+ mpunct: {
+ mord: ye,
+ mop: ye,
+ mrel: Xt,
+ mopen: ye,
+ mclose: ye,
+ mpunct: ye,
+ minner: ye
+ },
+ minner: {
+ mord: ye,
+ mop: ye,
+ mbin: m0,
+ mrel: Xt,
+ mopen: ye,
+ mpunct: ye,
+ minner: ye
+ }
+}, mc = {
+ mord: {
+ mop: ye
+ },
+ mop: {
+ mord: ye,
+ mop: ye
+ },
+ mbin: {},
+ mrel: {},
+ mopen: {},
+ mclose: {
+ mop: ye
+ },
+ mpunct: {},
+ minner: {
+ mop: ye
+ }
+}, Bl = {}, Wr = {}, Yr = {};
+function H(n) {
+ for (var {
+ type: e,
+ names: t,
+ props: r,
+ handler: a,
+ htmlBuilder: i,
+ mathmlBuilder: s
+ } = n, l = {
+ type: e,
+ numArgs: r.numArgs,
+ argTypes: r.argTypes,
+ allowedInArgument: !!r.allowedInArgument,
+ allowedInText: !!r.allowedInText,
+ allowedInMath: r.allowedInMath === void 0 ? !0 : r.allowedInMath,
+ numOptionalArgs: r.numOptionalArgs || 0,
+ infix: !!r.infix,
+ primitive: !!r.primitive,
+ handler: a
+ }, u = 0; u < t.length; ++u)
+ Bl[t[u]] = l;
+ e && (i && (Wr[e] = i), s && (Yr[e] = s));
+}
+function y0(n) {
+ var {
+ type: e,
+ htmlBuilder: t,
+ mathmlBuilder: r
+ } = n;
+ H({
+ type: e,
+ names: [],
+ props: {
+ numArgs: 0
+ },
+ handler() {
+ throw new Error("Should never be called.");
+ },
+ htmlBuilder: t,
+ mathmlBuilder: r
+ });
+}
+var Xr = function(e) {
+ return e.type === "ordgroup" && e.body.length === 1 ? e.body[0] : e;
+}, Ce = function(e) {
+ return e.type === "ordgroup" ? e.body : [e];
+}, P0 = F.makeSpan, fc = ["leftmost", "mbin", "mopen", "mrel", "mop", "mpunct"], pc = ["rightmost", "mrel", "mclose", "mpunct"], gc = {
+ display: Q.DISPLAY,
+ text: Q.TEXT,
+ script: Q.SCRIPT,
+ scriptscript: Q.SCRIPTSCRIPT
+}, vc = {
+ mord: "mord",
+ mop: "mop",
+ mbin: "mbin",
+ mrel: "mrel",
+ mopen: "mopen",
+ mclose: "mclose",
+ mpunct: "mpunct",
+ minner: "minner"
+}, Ie = function(e, t, r, a) {
+ a === void 0 && (a = [null, null]);
+ for (var i = [], s = 0; s < e.length; s++) {
+ var l = ie(e[s], t);
+ if (l instanceof cr) {
+ var u = l.children;
+ i.push(...u);
+ } else
+ i.push(l);
+ }
+ if (F.tryCombineChars(i), !r)
+ return i;
+ var h = t;
+ if (e.length === 1) {
+ var d = e[0];
+ d.type === "sizing" ? h = t.havingSize(d.size) : d.type === "styling" && (h = t.havingStyle(gc[d.style]));
+ }
+ var f = P0([a[0] || "leftmost"], [], t), p = P0([a[1] || "rightmost"], [], t), v = r === "root";
+ return ji(i, (w, D) => {
+ var C = D.classes[0], $ = w.classes[0];
+ C === "mbin" && Z.contains(pc, $) ? D.classes[0] = "mord" : $ === "mbin" && Z.contains(fc, C) && (w.classes[0] = "mord");
+ }, {
+ node: f
+ }, p, v), ji(i, (w, D) => {
+ var C = aa(D), $ = aa(w), k = C && $ ? w.hasClass("mtight") ? mc[C][$] : dc[C][$] : null;
+ if (k)
+ return F.makeGlue(k, h);
+ }, {
+ node: f
+ }, p, v), i;
+}, ji = function n(e, t, r, a, i) {
+ a && e.push(a);
+ for (var s = 0; s < e.length; s++) {
+ var l = e[s], u = Rl(l);
+ if (u) {
+ n(u.children, t, r, null, i);
+ continue;
+ }
+ var h = !l.hasClass("mspace");
+ if (h) {
+ var d = t(l, r.node);
+ d && (r.insertAfter ? r.insertAfter(d) : (e.unshift(d), s++));
+ }
+ h ? r.node = l : i && l.hasClass("newline") && (r.node = P0(["leftmost"])), r.insertAfter = /* @__PURE__ */ ((f) => (p) => {
+ e.splice(f + 1, 0, p), s++;
+ })(s);
+ }
+ a && e.pop();
+}, Rl = function(e) {
+ return e instanceof cr || e instanceof Fl || e instanceof sn && e.hasClass("enclosing") ? e : null;
+}, _c = function n(e, t) {
+ var r = Rl(e);
+ if (r) {
+ var a = r.children;
+ if (a.length) {
+ if (t === "right")
+ return n(a[a.length - 1], "right");
+ if (t === "left")
+ return n(a[0], "left");
+ }
+ }
+ return e;
+}, aa = function(e, t) {
+ return e ? (t && (e = _c(e, t)), vc[e.classes[0]] || null) : null;
+}, ur = function(e, t) {
+ var r = ["nulldelimiter"].concat(e.baseSizingClasses());
+ return P0(t.concat(r));
+}, ie = function(e, t, r) {
+ if (!e)
+ return P0();
+ if (Wr[e.type]) {
+ var a = Wr[e.type](e, t);
+ if (r && t.size !== r.size) {
+ a = P0(t.sizingClasses(r), [a], t);
+ var i = t.sizeMultiplier / r.sizeMultiplier;
+ a.height *= i, a.depth *= i;
+ }
+ return a;
+ } else
+ throw new W("Got group of unknown type: '" + e.type + "'");
+};
+function ql(n) {
+ return new cr(n);
+}
+class st {
+ constructor(e, t, r) {
+ this.type = void 0, this.attributes = void 0, this.children = void 0, this.classes = void 0, this.type = e, this.attributes = {}, this.children = t || [], this.classes = r || [];
+ }
+ /**
+ * Sets an attribute on a MathML node. MathML depends on attributes to convey a
+ * semantic content, so this is used heavily.
+ */
+ setAttribute(e, t) {
+ this.attributes[e] = t;
+ }
+ /**
+ * Gets an attribute on a MathML node.
+ */
+ getAttribute(e) {
+ return this.attributes[e];
+ }
+ /**
+ * Converts the math node into a MathML-namespaced DOM element.
+ */
+ toNode() {
+ var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", this.type);
+ for (var t in this.attributes)
+ Object.prototype.hasOwnProperty.call(this.attributes, t) && e.setAttribute(t, this.attributes[t]);
+ this.classes.length > 0 && (e.className = o0(this.classes));
+ for (var r = 0; r < this.children.length; r++)
+ if (this.children[r] instanceof Mt && this.children[r + 1] instanceof Mt) {
+ for (var a = this.children[r].toText() + this.children[++r].toText(); this.children[r + 1] instanceof Mt; )
+ a += this.children[++r].toText();
+ e.appendChild(new Mt(a).toNode());
+ } else
+ e.appendChild(this.children[r].toNode());
+ return e;
+ }
+ /**
+ * Converts the math node into an HTML markup string.
+ */
+ toMarkup() {
+ var e = "<" + this.type;
+ for (var t in this.attributes)
+ Object.prototype.hasOwnProperty.call(this.attributes, t) && (e += " " + t + '="', e += Z.escape(this.attributes[t]), e += '"');
+ this.classes.length > 0 && (e += ' class ="' + Z.escape(o0(this.classes)) + '"'), e += ">";
+ for (var r = 0; r < this.children.length; r++)
+ e += this.children[r].toMarkup();
+ return e += "" + this.type + ">", e;
+ }
+ /**
+ * Converts the math node into a string, similar to innerText, but escaped.
+ */
+ toText() {
+ return this.children.map((e) => e.toText()).join("");
+ }
+}
+class Mt {
+ constructor(e) {
+ this.text = void 0, this.text = e;
+ }
+ /**
+ * Converts the text node into a DOM text node.
+ */
+ toNode() {
+ return document.createTextNode(this.text);
+ }
+ /**
+ * Converts the text node into escaped HTML markup
+ * (representing the text itself).
+ */
+ toMarkup() {
+ return Z.escape(this.toText());
+ }
+ /**
+ * Converts the text node into a string
+ * (representing the text itself).
+ */
+ toText() {
+ return this.text;
+ }
+}
+class bc {
+ /**
+ * Create a Space node with width given in CSS ems.
+ */
+ constructor(e) {
+ this.width = void 0, this.character = void 0, this.width = e, e >= 0.05555 && e <= 0.05556 ? this.character = " " : e >= 0.1666 && e <= 0.1667 ? this.character = " " : e >= 0.2222 && e <= 0.2223 ? this.character = " " : e >= 0.2777 && e <= 0.2778 ? this.character = " " : e >= -0.05556 && e <= -0.05555 ? this.character = " " : e >= -0.1667 && e <= -0.1666 ? this.character = " " : e >= -0.2223 && e <= -0.2222 ? this.character = " " : e >= -0.2778 && e <= -0.2777 ? this.character = " " : this.character = null;
+ }
+ /**
+ * Converts the math node into a MathML-namespaced DOM element.
+ */
+ toNode() {
+ if (this.character)
+ return document.createTextNode(this.character);
+ var e = document.createElementNS("http://www.w3.org/1998/Math/MathML", "mspace");
+ return e.setAttribute("width", O(this.width)), e;
+ }
+ /**
+ * Converts the math node into an HTML markup string.
+ */
+ toMarkup() {
+ return this.character ? "" + this.character + "" : '';
+ }
+ /**
+ * Converts the math node into a string, similar to innerText.
+ */
+ toText() {
+ return this.character ? this.character : " ";
+ }
+}
+var q = {
+ MathNode: st,
+ TextNode: Mt,
+ SpaceNode: bc,
+ newDocumentFragment: ql
+}, ct = function(e, t, r) {
+ return Fe[t][e] && Fe[t][e].replace && e.charCodeAt(0) !== 55349 && !(El.hasOwnProperty(e) && r && (r.fontFamily && r.fontFamily.slice(4, 6) === "tt" || r.font && r.font.slice(4, 6) === "tt")) && (e = Fe[t][e].replace), new q.TextNode(e);
+}, Aa = function(e) {
+ return e.length === 1 ? e[0] : new q.MathNode("mrow", e);
+}, Ca = function(e, t) {
+ if (t.fontFamily === "texttt")
+ return "monospace";
+ if (t.fontFamily === "textsf")
+ return t.fontShape === "textit" && t.fontWeight === "textbf" ? "sans-serif-bold-italic" : t.fontShape === "textit" ? "sans-serif-italic" : t.fontWeight === "textbf" ? "bold-sans-serif" : "sans-serif";
+ if (t.fontShape === "textit" && t.fontWeight === "textbf")
+ return "bold-italic";
+ if (t.fontShape === "textit")
+ return "italic";
+ if (t.fontWeight === "textbf")
+ return "bold";
+ var r = t.font;
+ if (!r || r === "mathnormal")
+ return null;
+ var a = e.mode;
+ if (r === "mathit")
+ return "italic";
+ if (r === "boldsymbol")
+ return e.type === "textord" ? "bold" : "bold-italic";
+ if (r === "mathbf")
+ return "bold";
+ if (r === "mathbb")
+ return "double-struck";
+ if (r === "mathsfit")
+ return "sans-serif-italic";
+ if (r === "mathfrak")
+ return "fraktur";
+ if (r === "mathscr" || r === "mathcal")
+ return "script";
+ if (r === "mathsf")
+ return "sans-serif";
+ if (r === "mathtt")
+ return "monospace";
+ var i = e.text;
+ if (Z.contains(["\\imath", "\\jmath"], i))
+ return null;
+ Fe[a][i] && Fe[a][i].replace && (i = Fe[a][i].replace);
+ var s = F.fontMap[r].fontName;
+ return xa(i, s, a) ? F.fontMap[r].variant : null;
+};
+function Fn(n) {
+ if (!n)
+ return !1;
+ if (n.type === "mi" && n.children.length === 1) {
+ var e = n.children[0];
+ return e instanceof Mt && e.text === ".";
+ } else if (n.type === "mo" && n.children.length === 1 && n.getAttribute("separator") === "true" && n.getAttribute("lspace") === "0em" && n.getAttribute("rspace") === "0em") {
+ var t = n.children[0];
+ return t instanceof Mt && t.text === ",";
+ } else
+ return !1;
+}
+var nt = function(e, t, r) {
+ if (e.length === 1) {
+ var a = me(e[0], t);
+ return r && a instanceof st && a.type === "mo" && (a.setAttribute("lspace", "0em"), a.setAttribute("rspace", "0em")), [a];
+ }
+ for (var i = [], s, l = 0; l < e.length; l++) {
+ var u = me(e[l], t);
+ if (u instanceof st && s instanceof st) {
+ if (u.type === "mtext" && s.type === "mtext" && u.getAttribute("mathvariant") === s.getAttribute("mathvariant")) {
+ s.children.push(...u.children);
+ continue;
+ } else if (u.type === "mn" && s.type === "mn") {
+ s.children.push(...u.children);
+ continue;
+ } else if (Fn(u) && s.type === "mn") {
+ s.children.push(...u.children);
+ continue;
+ } else if (u.type === "mn" && Fn(s))
+ u.children = [...s.children, ...u.children], i.pop();
+ else if ((u.type === "msup" || u.type === "msub") && u.children.length >= 1 && (s.type === "mn" || Fn(s))) {
+ var h = u.children[0];
+ h instanceof st && h.type === "mn" && (h.children = [...s.children, ...h.children], i.pop());
+ } else if (s.type === "mi" && s.children.length === 1) {
+ var d = s.children[0];
+ if (d instanceof Mt && d.text === "̸" && (u.type === "mo" || u.type === "mi" || u.type === "mn")) {
+ var f = u.children[0];
+ f instanceof Mt && f.text.length > 0 && (f.text = f.text.slice(0, 1) + "̸" + f.text.slice(1), i.pop());
+ }
+ }
+ }
+ i.push(u), s = u;
+ }
+ return i;
+}, c0 = function(e, t, r) {
+ return Aa(nt(e, t, r));
+}, me = function(e, t) {
+ if (!e)
+ return new q.MathNode("mrow");
+ if (Yr[e.type]) {
+ var r = Yr[e.type](e, t);
+ return r;
+ } else
+ throw new W("Got group of unknown type: '" + e.type + "'");
+}, yc = {
+ widehat: "^",
+ widecheck: "ˇ",
+ widetilde: "~",
+ utilde: "~",
+ overleftarrow: "←",
+ underleftarrow: "←",
+ xleftarrow: "←",
+ overrightarrow: "→",
+ underrightarrow: "→",
+ xrightarrow: "��",
+ underbrace: "⏟",
+ overbrace: "⏞",
+ overgroup: "⏠",
+ undergroup: "⏡",
+ overleftrightarrow: "↔",
+ underleftrightarrow: "↔",
+ xleftrightarrow: "↔",
+ Overrightarrow: "⇒",
+ xRightarrow: "⇒",
+ overleftharpoon: "↼",
+ xleftharpoonup: "↼",
+ overrightharpoon: "⇀",
+ xrightharpoonup: "⇀",
+ xLeftarrow: "⇐",
+ xLeftrightarrow: "⇔",
+ xhookleftarrow: "↩",
+ xhookrightarrow: "↪",
+ xmapsto: "↦",
+ xrightharpoondown: "⇁",
+ xleftharpoondown: "↽",
+ xrightleftharpoons: "⇌",
+ xleftrightharpoons: "⇋",
+ xtwoheadleftarrow: "↞",
+ xtwoheadrightarrow: "↠",
+ xlongequal: "=",
+ xtofrom: "⇄",
+ xrightleftarrows: "⇄",
+ xrightequilibrium: "⇌",
+ // Not a perfect match.
+ xleftequilibrium: "⇋",
+ // None better available.
+ "\\cdrightarrow": "→",
+ "\\cdleftarrow": "←",
+ "\\cdlongequal": "="
+}, wc = function(e) {
+ var t = new q.MathNode("mo", [new q.TextNode(yc[e.replace(/^\\/, "")])]);
+ return t.setAttribute("stretchy", "true"), t;
+}, kc = {
+ // path(s), minWidth, height, align
+ overrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
+ overleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
+ underrightarrow: [["rightarrow"], 0.888, 522, "xMaxYMin"],
+ underleftarrow: [["leftarrow"], 0.888, 522, "xMinYMin"],
+ xrightarrow: [["rightarrow"], 1.469, 522, "xMaxYMin"],
+ "\\cdrightarrow": [["rightarrow"], 3, 522, "xMaxYMin"],
+ // CD minwwidth2.5pc
+ xleftarrow: [["leftarrow"], 1.469, 522, "xMinYMin"],
+ "\\cdleftarrow": [["leftarrow"], 3, 522, "xMinYMin"],
+ Overrightarrow: [["doublerightarrow"], 0.888, 560, "xMaxYMin"],
+ xRightarrow: [["doublerightarrow"], 1.526, 560, "xMaxYMin"],
+ xLeftarrow: [["doubleleftarrow"], 1.526, 560, "xMinYMin"],
+ overleftharpoon: [["leftharpoon"], 0.888, 522, "xMinYMin"],
+ xleftharpoonup: [["leftharpoon"], 0.888, 522, "xMinYMin"],
+ xleftharpoondown: [["leftharpoondown"], 0.888, 522, "xMinYMin"],
+ overrightharpoon: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
+ xrightharpoonup: [["rightharpoon"], 0.888, 522, "xMaxYMin"],
+ xrightharpoondown: [["rightharpoondown"], 0.888, 522, "xMaxYMin"],
+ xlongequal: [["longequal"], 0.888, 334, "xMinYMin"],
+ "\\cdlongequal": [["longequal"], 3, 334, "xMinYMin"],
+ xtwoheadleftarrow: [["twoheadleftarrow"], 0.888, 334, "xMinYMin"],
+ xtwoheadrightarrow: [["twoheadrightarrow"], 0.888, 334, "xMaxYMin"],
+ overleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
+ overbrace: [["leftbrace", "midbrace", "rightbrace"], 1.6, 548],
+ underbrace: [["leftbraceunder", "midbraceunder", "rightbraceunder"], 1.6, 548],
+ underleftrightarrow: [["leftarrow", "rightarrow"], 0.888, 522],
+ xleftrightarrow: [["leftarrow", "rightarrow"], 1.75, 522],
+ xLeftrightarrow: [["doubleleftarrow", "doublerightarrow"], 1.75, 560],
+ xrightleftharpoons: [["leftharpoondownplus", "rightharpoonplus"], 1.75, 716],
+ xleftrightharpoons: [["leftharpoonplus", "rightharpoondownplus"], 1.75, 716],
+ xhookleftarrow: [["leftarrow", "righthook"], 1.08, 522],
+ xhookrightarrow: [["lefthook", "rightarrow"], 1.08, 522],
+ overlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
+ underlinesegment: [["leftlinesegment", "rightlinesegment"], 0.888, 522],
+ overgroup: [["leftgroup", "rightgroup"], 0.888, 342],
+ undergroup: [["leftgroupunder", "rightgroupunder"], 0.888, 342],
+ xmapsto: [["leftmapsto", "rightarrow"], 1.5, 522],
+ xtofrom: [["leftToFrom", "rightToFrom"], 1.75, 528],
+ // The next three arrows are from the mhchem package.
+ // In mhchem.sty, min-length is 2.0em. But these arrows might appear in the
+ // document as \xrightarrow or \xrightleftharpoons. Those have
+ // min-length = 1.75em, so we set min-length on these next three to match.
+ xrightleftarrows: [["baraboveleftarrow", "rightarrowabovebar"], 1.75, 901],
+ xrightequilibrium: [["baraboveshortleftharpoon", "rightharpoonaboveshortbar"], 1.75, 716],
+ xleftequilibrium: [["shortbaraboveleftharpoon", "shortrightharpoonabovebar"], 1.75, 716]
+}, Sc = function(e) {
+ return e.type === "ordgroup" ? e.body.length : 1;
+}, xc = function(e, t) {
+ function r() {
+ var l = 4e5, u = e.label.slice(1);
+ if (Z.contains(["widehat", "widecheck", "widetilde", "utilde"], u)) {
+ var h = e, d = Sc(h.base), f, p, v;
+ if (d > 5)
+ u === "widehat" || u === "widecheck" ? (f = 420, l = 2364, v = 0.42, p = u + "4") : (f = 312, l = 2340, v = 0.34, p = "tilde4");
+ else {
+ var w = [1, 1, 2, 2, 3, 3][d];
+ u === "widehat" || u === "widecheck" ? (l = [0, 1062, 2364, 2364, 2364][w], f = [0, 239, 300, 360, 420][w], v = [0, 0.24, 0.3, 0.3, 0.36, 0.42][w], p = u + w) : (l = [0, 600, 1033, 2339, 2340][w], f = [0, 260, 286, 306, 312][w], v = [0, 0.26, 0.286, 0.3, 0.306, 0.34][w], p = "tilde" + w);
+ }
+ var D = new v0(p), C = new u0([D], {
+ width: "100%",
+ height: O(v),
+ viewBox: "0 0 " + l + " " + f,
+ preserveAspectRatio: "none"
+ });
+ return {
+ span: F.makeSvgSpan([], [C], t),
+ minWidth: 0,
+ height: v
+ };
+ } else {
+ var $ = [], k = kc[u], [_, A, E] = k, M = E / 1e3, T = _.length, P, I;
+ if (T === 1) {
+ var K = k[3];
+ P = ["hide-tail"], I = [K];
+ } else if (T === 2)
+ P = ["halfarrow-left", "halfarrow-right"], I = ["xMinYMin", "xMaxYMin"];
+ else if (T === 3)
+ P = ["brace-left", "brace-center", "brace-right"], I = ["xMinYMin", "xMidYMin", "xMaxYMin"];
+ else
+ throw new Error(`Correct katexImagesData or update code here to support
+ ` + T + " children.");
+ for (var j = 0; j < T; j++) {
+ var J = new v0(_[j]), $e = new u0([J], {
+ width: "400em",
+ height: O(M),
+ viewBox: "0 0 " + l + " " + E,
+ preserveAspectRatio: I[j] + " slice"
+ }), se = F.makeSvgSpan([P[j]], [$e], t);
+ if (T === 1)
+ return {
+ span: se,
+ minWidth: A,
+ height: M
+ };
+ se.style.height = O(M), $.push(se);
+ }
+ return {
+ span: F.makeSpan(["stretchy"], $, t),
+ minWidth: A,
+ height: M
+ };
+ }
+ }
+ var {
+ span: a,
+ minWidth: i,
+ height: s
+ } = r();
+ return a.height = s, a.style.height = O(s), i > 0 && (a.style.minWidth = O(i)), a;
+}, Dc = function(e, t, r, a, i) {
+ var s, l = e.height + e.depth + r + a;
+ if (/fbox|color|angl/.test(t)) {
+ if (s = F.makeSpan(["stretchy", t], [], i), t === "fbox") {
+ var u = i.color && i.getColor();
+ u && (s.style.borderColor = u);
+ }
+ } else {
+ var h = [];
+ /^[bx]cancel$/.test(t) && h.push(new Ii({
+ x1: "0",
+ y1: "0",
+ x2: "100%",
+ y2: "100%",
+ "stroke-width": "0.046em"
+ })), /^x?cancel$/.test(t) && h.push(new Ii({
+ x1: "0",
+ y1: "100%",
+ x2: "100%",
+ y2: "0",
+ "stroke-width": "0.046em"
+ }));
+ var d = new u0(h, {
+ width: "100%",
+ height: O(l)
+ });
+ s = F.makeSvgSpan([], [d], i);
+ }
+ return s.height = l, s.style.height = O(l), s;
+}, t0 = {
+ encloseSpan: Dc,
+ mathMLnode: wc,
+ svgSpan: xc
+};
+function re(n, e) {
+ if (!n || n.type !== e)
+ throw new Error("Expected node of type " + e + ", but got " + (n ? "node of type " + n.type : String(n)));
+ return n;
+}
+function Fa(n) {
+ var e = un(n);
+ if (!e)
+ throw new Error("Expected node of symbol group type, but got " + (n ? "node of type " + n.type : String(n)));
+ return e;
+}
+function un(n) {
+ return n && (n.type === "atom" || Q1.hasOwnProperty(n.type)) ? n : null;
+}
+var Ea = (n, e) => {
+ var t, r, a;
+ n && n.type === "supsub" ? (r = re(n.base, "accent"), t = r.base, n.base = t, a = K1(ie(n, e)), n.base = r) : (r = re(n, "accent"), t = r.base);
+ var i = ie(t, e.havingCrampedStyle()), s = r.isShifty && Z.isCharacterBox(t), l = 0;
+ if (s) {
+ var u = Z.getBaseElem(t), h = ie(u, e.havingCrampedStyle());
+ l = Ni(h).skew;
+ }
+ var d = r.label === "\\c", f = d ? i.height + i.depth : Math.min(i.height, e.fontMetrics().xHeight), p;
+ if (r.isStretchy)
+ p = t0.svgSpan(r, e), p = F.makeVList({
+ positionType: "firstBaseline",
+ children: [{
+ type: "elem",
+ elem: i
+ }, {
+ type: "elem",
+ elem: p,
+ wrapperClasses: ["svg-align"],
+ wrapperStyle: l > 0 ? {
+ width: "calc(100% - " + O(2 * l) + ")",
+ marginLeft: O(2 * l)
+ } : void 0
+ }]
+ }, e);
+ else {
+ var v, w;
+ r.label === "\\vec" ? (v = F.staticSvg("vec", e), w = F.svgData.vec[1]) : (v = F.makeOrd({
+ mode: r.mode,
+ text: r.label
+ }, e, "textord"), v = Ni(v), v.italic = 0, w = v.width, d && (f += v.depth)), p = F.makeSpan(["accent-body"], [v]);
+ var D = r.label === "\\textcircled";
+ D && (p.classes.push("accent-full"), f = i.height);
+ var C = l;
+ D || (C -= w / 2), p.style.left = O(C), r.label === "\\textcircled" && (p.style.top = ".2em"), p = F.makeVList({
+ positionType: "firstBaseline",
+ children: [{
+ type: "elem",
+ elem: i
+ }, {
+ type: "kern",
+ size: -f
+ }, {
+ type: "elem",
+ elem: p
+ }]
+ }, e);
+ }
+ var $ = F.makeSpan(["mord", "accent"], [p], e);
+ return a ? (a.children[0] = $, a.height = Math.max($.height, a.height), a.classes[0] = "mord", a) : $;
+}, Il = (n, e) => {
+ var t = n.isStretchy ? t0.mathMLnode(n.label) : new q.MathNode("mo", [ct(n.label, n.mode)]), r = new q.MathNode("mover", [me(n.base, e), t]);
+ return r.setAttribute("accent", "true"), r;
+}, Ac = new RegExp(["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring"].map((n) => "\\" + n).join("|"));
+H({
+ type: "accent",
+ names: ["\\acute", "\\grave", "\\ddot", "\\tilde", "\\bar", "\\breve", "\\check", "\\hat", "\\vec", "\\dot", "\\mathring", "\\widecheck", "\\widehat", "\\widetilde", "\\overrightarrow", "\\overleftarrow", "\\Overrightarrow", "\\overleftrightarrow", "\\overgroup", "\\overlinesegment", "\\overleftharpoon", "\\overrightharpoon"],
+ props: {
+ numArgs: 1
+ },
+ handler: (n, e) => {
+ var t = Xr(e[0]), r = !Ac.test(n.funcName), a = !r || n.funcName === "\\widehat" || n.funcName === "\\widetilde" || n.funcName === "\\widecheck";
+ return {
+ type: "accent",
+ mode: n.parser.mode,
+ label: n.funcName,
+ isStretchy: r,
+ isShifty: a,
+ base: t
+ };
+ },
+ htmlBuilder: Ea,
+ mathmlBuilder: Il
+});
+H({
+ type: "accent",
+ names: ["\\'", "\\`", "\\^", "\\~", "\\=", "\\u", "\\.", '\\"', "\\c", "\\r", "\\H", "\\v", "\\textcircled"],
+ props: {
+ numArgs: 1,
+ allowedInText: !0,
+ allowedInMath: !0,
+ // unless in strict mode
+ argTypes: ["primitive"]
+ },
+ handler: (n, e) => {
+ var t = e[0], r = n.parser.mode;
+ return r === "math" && (n.parser.settings.reportNonstrict("mathVsTextAccents", "LaTeX's accent " + n.funcName + " works only in text mode"), r = "text"), {
+ type: "accent",
+ mode: r,
+ label: n.funcName,
+ isStretchy: !1,
+ isShifty: !0,
+ base: t
+ };
+ },
+ htmlBuilder: Ea,
+ mathmlBuilder: Il
+});
+H({
+ type: "accentUnder",
+ names: ["\\underleftarrow", "\\underrightarrow", "\\underleftrightarrow", "\\undergroup", "\\underlinesegment", "\\utilde"],
+ props: {
+ numArgs: 1
+ },
+ handler: (n, e) => {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[0];
+ return {
+ type: "accentUnder",
+ mode: t.mode,
+ label: r,
+ base: a
+ };
+ },
+ htmlBuilder: (n, e) => {
+ var t = ie(n.base, e), r = t0.svgSpan(n, e), a = n.label === "\\utilde" ? 0.12 : 0, i = F.makeVList({
+ positionType: "top",
+ positionData: t.height,
+ children: [{
+ type: "elem",
+ elem: r,
+ wrapperClasses: ["svg-align"]
+ }, {
+ type: "kern",
+ size: a
+ }, {
+ type: "elem",
+ elem: t
+ }]
+ }, e);
+ return F.makeSpan(["mord", "accentunder"], [i], e);
+ },
+ mathmlBuilder: (n, e) => {
+ var t = t0.mathMLnode(n.label), r = new q.MathNode("munder", [me(n.base, e), t]);
+ return r.setAttribute("accentunder", "true"), r;
+ }
+});
+var xr = (n) => {
+ var e = new q.MathNode("mpadded", n ? [n] : []);
+ return e.setAttribute("width", "+0.6em"), e.setAttribute("lspace", "0.3em"), e;
+};
+H({
+ type: "xArrow",
+ names: [
+ "\\xleftarrow",
+ "\\xrightarrow",
+ "\\xLeftarrow",
+ "\\xRightarrow",
+ "\\xleftrightarrow",
+ "\\xLeftrightarrow",
+ "\\xhookleftarrow",
+ "\\xhookrightarrow",
+ "\\xmapsto",
+ "\\xrightharpoondown",
+ "\\xrightharpoonup",
+ "\\xleftharpoondown",
+ "\\xleftharpoonup",
+ "\\xrightleftharpoons",
+ "\\xleftrightharpoons",
+ "\\xlongequal",
+ "\\xtwoheadrightarrow",
+ "\\xtwoheadleftarrow",
+ "\\xtofrom",
+ // The next 3 functions are here to support the mhchem extension.
+ // Direct use of these functions is discouraged and may break someday.
+ "\\xrightleftarrows",
+ "\\xrightequilibrium",
+ "\\xleftequilibrium",
+ // The next 3 functions are here only to support the {CD} environment.
+ "\\\\cdrightarrow",
+ "\\\\cdleftarrow",
+ "\\\\cdlongequal"
+ ],
+ props: {
+ numArgs: 1,
+ numOptionalArgs: 1
+ },
+ handler(n, e, t) {
+ var {
+ parser: r,
+ funcName: a
+ } = n;
+ return {
+ type: "xArrow",
+ mode: r.mode,
+ label: a,
+ body: e[0],
+ below: t[0]
+ };
+ },
+ // Flow is unable to correctly infer the type of `group`, even though it's
+ // unambiguously determined from the passed-in `type` above.
+ htmlBuilder(n, e) {
+ var t = e.style, r = e.havingStyle(t.sup()), a = F.wrapFragment(ie(n.body, r, e), e), i = n.label.slice(0, 2) === "\\x" ? "x" : "cd";
+ a.classes.push(i + "-arrow-pad");
+ var s;
+ n.below && (r = e.havingStyle(t.sub()), s = F.wrapFragment(ie(n.below, r, e), e), s.classes.push(i + "-arrow-pad"));
+ var l = t0.svgSpan(n, e), u = -e.fontMetrics().axisHeight + 0.5 * l.height, h = -e.fontMetrics().axisHeight - 0.5 * l.height - 0.111;
+ (a.depth > 0.25 || n.label === "\\xleftequilibrium") && (h -= a.depth);
+ var d;
+ if (s) {
+ var f = -e.fontMetrics().axisHeight + s.height + 0.5 * l.height + 0.111;
+ d = F.makeVList({
+ positionType: "individualShift",
+ children: [{
+ type: "elem",
+ elem: a,
+ shift: h
+ }, {
+ type: "elem",
+ elem: l,
+ shift: u
+ }, {
+ type: "elem",
+ elem: s,
+ shift: f
+ }]
+ }, e);
+ } else
+ d = F.makeVList({
+ positionType: "individualShift",
+ children: [{
+ type: "elem",
+ elem: a,
+ shift: h
+ }, {
+ type: "elem",
+ elem: l,
+ shift: u
+ }]
+ }, e);
+ return d.children[0].children[0].children[1].classes.push("svg-align"), F.makeSpan(["mrel", "x-arrow"], [d], e);
+ },
+ mathmlBuilder(n, e) {
+ var t = t0.mathMLnode(n.label);
+ t.setAttribute("minsize", n.label.charAt(0) === "x" ? "1.75em" : "3.0em");
+ var r;
+ if (n.body) {
+ var a = xr(me(n.body, e));
+ if (n.below) {
+ var i = xr(me(n.below, e));
+ r = new q.MathNode("munderover", [t, i, a]);
+ } else
+ r = new q.MathNode("mover", [t, a]);
+ } else if (n.below) {
+ var s = xr(me(n.below, e));
+ r = new q.MathNode("munder", [t, s]);
+ } else
+ r = xr(), r = new q.MathNode("mover", [t, r]);
+ return r;
+ }
+});
+var Cc = F.makeSpan;
+function Nl(n, e) {
+ var t = Ie(n.body, e, !0);
+ return Cc([n.mclass], t, e);
+}
+function Ll(n, e) {
+ var t, r = nt(n.body, e);
+ return n.mclass === "minner" ? t = new q.MathNode("mpadded", r) : n.mclass === "mord" ? n.isCharacterBox ? (t = r[0], t.type = "mi") : t = new q.MathNode("mi", r) : (n.isCharacterBox ? (t = r[0], t.type = "mo") : t = new q.MathNode("mo", r), n.mclass === "mbin" ? (t.attributes.lspace = "0.22em", t.attributes.rspace = "0.22em") : n.mclass === "mpunct" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0.17em") : n.mclass === "mopen" || n.mclass === "mclose" ? (t.attributes.lspace = "0em", t.attributes.rspace = "0em") : n.mclass === "minner" && (t.attributes.lspace = "0.0556em", t.attributes.width = "+0.1111em")), t;
+}
+H({
+ type: "mclass",
+ names: ["\\mathord", "\\mathbin", "\\mathrel", "\\mathopen", "\\mathclose", "\\mathpunct", "\\mathinner"],
+ props: {
+ numArgs: 1,
+ primitive: !0
+ },
+ handler(n, e) {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[0];
+ return {
+ type: "mclass",
+ mode: t.mode,
+ mclass: "m" + r.slice(5),
+ // TODO(kevinb): don't prefix with 'm'
+ body: Ce(a),
+ isCharacterBox: Z.isCharacterBox(a)
+ };
+ },
+ htmlBuilder: Nl,
+ mathmlBuilder: Ll
+});
+var cn = (n) => {
+ var e = n.type === "ordgroup" && n.body.length ? n.body[0] : n;
+ return e.type === "atom" && (e.family === "bin" || e.family === "rel") ? "m" + e.family : "mord";
+};
+H({
+ type: "mclass",
+ names: ["\\@binrel"],
+ props: {
+ numArgs: 2
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n;
+ return {
+ type: "mclass",
+ mode: t.mode,
+ mclass: cn(e[0]),
+ body: Ce(e[1]),
+ isCharacterBox: Z.isCharacterBox(e[1])
+ };
+ }
+});
+H({
+ type: "mclass",
+ names: ["\\stackrel", "\\overset", "\\underset"],
+ props: {
+ numArgs: 2
+ },
+ handler(n, e) {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[1], i = e[0], s;
+ r !== "\\stackrel" ? s = cn(a) : s = "mrel";
+ var l = {
+ type: "op",
+ mode: a.mode,
+ limits: !0,
+ alwaysHandleSupSub: !0,
+ parentIsSupSub: !1,
+ symbol: !1,
+ suppressBaseShift: r !== "\\stackrel",
+ body: Ce(a)
+ }, u = {
+ type: "supsub",
+ mode: i.mode,
+ base: l,
+ sup: r === "\\underset" ? null : i,
+ sub: r === "\\underset" ? i : null
+ };
+ return {
+ type: "mclass",
+ mode: t.mode,
+ mclass: s,
+ body: [u],
+ isCharacterBox: Z.isCharacterBox(u)
+ };
+ },
+ htmlBuilder: Nl,
+ mathmlBuilder: Ll
+});
+H({
+ type: "pmb",
+ names: ["\\pmb"],
+ props: {
+ numArgs: 1,
+ allowedInText: !0
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n;
+ return {
+ type: "pmb",
+ mode: t.mode,
+ mclass: cn(e[0]),
+ body: Ce(e[0])
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = Ie(n.body, e, !0), r = F.makeSpan([n.mclass], t, e);
+ return r.style.textShadow = "0.02em 0.01em 0.04px", r;
+ },
+ mathmlBuilder(n, e) {
+ var t = nt(n.body, e), r = new q.MathNode("mstyle", t);
+ return r.setAttribute("style", "text-shadow: 0.02em 0.01em 0.04px"), r;
+ }
+});
+var Fc = {
+ ">": "\\\\cdrightarrow",
+ "<": "\\\\cdleftarrow",
+ "=": "\\\\cdlongequal",
+ A: "\\uparrow",
+ V: "\\downarrow",
+ "|": "\\Vert",
+ ".": "no arrow"
+}, Vi = () => ({
+ type: "styling",
+ body: [],
+ mode: "math",
+ style: "display"
+}), Wi = (n) => n.type === "textord" && n.text === "@", Ec = (n, e) => (n.type === "mathord" || n.type === "atom") && n.text === e;
+function Tc(n, e, t) {
+ var r = Fc[n];
+ switch (r) {
+ case "\\\\cdrightarrow":
+ case "\\\\cdleftarrow":
+ return t.callFunction(r, [e[0]], [e[1]]);
+ case "\\uparrow":
+ case "\\downarrow": {
+ var a = t.callFunction("\\\\cdleft", [e[0]], []), i = {
+ type: "atom",
+ text: r,
+ mode: "math",
+ family: "rel"
+ }, s = t.callFunction("\\Big", [i], []), l = t.callFunction("\\\\cdright", [e[1]], []), u = {
+ type: "ordgroup",
+ mode: "math",
+ body: [a, s, l]
+ };
+ return t.callFunction("\\\\cdparent", [u], []);
+ }
+ case "\\\\cdlongequal":
+ return t.callFunction("\\\\cdlongequal", [], []);
+ case "\\Vert": {
+ var h = {
+ type: "textord",
+ text: "\\Vert",
+ mode: "math"
+ };
+ return t.callFunction("\\Big", [h], []);
+ }
+ default:
+ return {
+ type: "textord",
+ text: " ",
+ mode: "math"
+ };
+ }
+}
+function $c(n) {
+ var e = [];
+ for (n.gullet.beginGroup(), n.gullet.macros.set("\\cr", "\\\\\\relax"), n.gullet.beginGroup(); ; ) {
+ e.push(n.parseExpression(!1, "\\\\")), n.gullet.endGroup(), n.gullet.beginGroup();
+ var t = n.fetch().text;
+ if (t === "&" || t === "\\\\")
+ n.consume();
+ else if (t === "\\end") {
+ e[e.length - 1].length === 0 && e.pop();
+ break;
+ } else
+ throw new W("Expected \\\\ or \\cr or \\end", n.nextToken);
+ }
+ for (var r = [], a = [r], i = 0; i < e.length; i++) {
+ for (var s = e[i], l = Vi(), u = 0; u < s.length; u++)
+ if (!Wi(s[u]))
+ l.body.push(s[u]);
+ else {
+ r.push(l), u += 1;
+ var h = Fa(s[u]).text, d = new Array(2);
+ if (d[0] = {
+ type: "ordgroup",
+ mode: "math",
+ body: []
+ }, d[1] = {
+ type: "ordgroup",
+ mode: "math",
+ body: []
+ }, !("=|.".indexOf(h) > -1)) if ("<>AV".indexOf(h) > -1)
+ for (var f = 0; f < 2; f++) {
+ for (var p = !0, v = u + 1; v < s.length; v++) {
+ if (Ec(s[v], h)) {
+ p = !1, u = v;
+ break;
+ }
+ if (Wi(s[v]))
+ throw new W("Missing a " + h + " character to complete a CD arrow.", s[v]);
+ d[f].body.push(s[v]);
+ }
+ if (p)
+ throw new W("Missing a " + h + " character to complete a CD arrow.", s[u]);
+ }
+ else
+ throw new W('Expected one of "<>AV=|." after @', s[u]);
+ var w = Tc(h, d, n), D = {
+ type: "styling",
+ body: [w],
+ mode: "math",
+ style: "display"
+ // CD is always displaystyle.
+ };
+ r.push(D), l = Vi();
+ }
+ i % 2 === 0 ? r.push(l) : r.shift(), r = [], a.push(r);
+ }
+ n.gullet.endGroup(), n.gullet.endGroup();
+ var C = new Array(a[0].length).fill({
+ type: "align",
+ align: "c",
+ pregap: 0.25,
+ // CD package sets \enskip between columns.
+ postgap: 0.25
+ // So pre and post each get half an \enskip, i.e. 0.25em.
+ });
+ return {
+ type: "array",
+ mode: "math",
+ body: a,
+ arraystretch: 1,
+ addJot: !0,
+ rowGaps: [null],
+ cols: C,
+ colSeparationType: "CD",
+ hLinesBeforeRow: new Array(a.length + 1).fill([])
+ };
+}
+H({
+ type: "cdlabel",
+ names: ["\\\\cdleft", "\\\\cdright"],
+ props: {
+ numArgs: 1
+ },
+ handler(n, e) {
+ var {
+ parser: t,
+ funcName: r
+ } = n;
+ return {
+ type: "cdlabel",
+ mode: t.mode,
+ side: r.slice(4),
+ label: e[0]
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = e.havingStyle(e.style.sup()), r = F.wrapFragment(ie(n.label, t, e), e);
+ return r.classes.push("cd-label-" + n.side), r.style.bottom = O(0.8 - r.depth), r.height = 0, r.depth = 0, r;
+ },
+ mathmlBuilder(n, e) {
+ var t = new q.MathNode("mrow", [me(n.label, e)]);
+ return t = new q.MathNode("mpadded", [t]), t.setAttribute("width", "0"), n.side === "left" && t.setAttribute("lspace", "-1width"), t.setAttribute("voffset", "0.7em"), t = new q.MathNode("mstyle", [t]), t.setAttribute("displaystyle", "false"), t.setAttribute("scriptlevel", "1"), t;
+ }
+});
+H({
+ type: "cdlabelparent",
+ names: ["\\\\cdparent"],
+ props: {
+ numArgs: 1
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n;
+ return {
+ type: "cdlabelparent",
+ mode: t.mode,
+ fragment: e[0]
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = F.wrapFragment(ie(n.fragment, e), e);
+ return t.classes.push("cd-vert-arrow"), t;
+ },
+ mathmlBuilder(n, e) {
+ return new q.MathNode("mrow", [me(n.fragment, e)]);
+ }
+});
+H({
+ type: "textord",
+ names: ["\\@char"],
+ props: {
+ numArgs: 1,
+ allowedInText: !0
+ },
+ handler(n, e) {
+ for (var {
+ parser: t
+ } = n, r = re(e[0], "ordgroup"), a = r.body, i = "", s = 0; s < a.length; s++) {
+ var l = re(a[s], "textord");
+ i += l.text;
+ }
+ var u = parseInt(i), h;
+ if (isNaN(u))
+ throw new W("\\@char has non-numeric argument " + i);
+ if (u < 0 || u >= 1114111)
+ throw new W("\\@char with invalid code point " + i);
+ return u <= 65535 ? h = String.fromCharCode(u) : (u -= 65536, h = String.fromCharCode((u >> 10) + 55296, (u & 1023) + 56320)), {
+ type: "textord",
+ mode: t.mode,
+ text: h
+ };
+ }
+});
+var Ol = (n, e) => {
+ var t = Ie(n.body, e.withColor(n.color), !1);
+ return F.makeFragment(t);
+}, Pl = (n, e) => {
+ var t = nt(n.body, e.withColor(n.color)), r = new q.MathNode("mstyle", t);
+ return r.setAttribute("mathcolor", n.color), r;
+};
+H({
+ type: "color",
+ names: ["\\textcolor"],
+ props: {
+ numArgs: 2,
+ allowedInText: !0,
+ argTypes: ["color", "original"]
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n, r = re(e[0], "color-token").color, a = e[1];
+ return {
+ type: "color",
+ mode: t.mode,
+ color: r,
+ body: Ce(a)
+ };
+ },
+ htmlBuilder: Ol,
+ mathmlBuilder: Pl
+});
+H({
+ type: "color",
+ names: ["\\color"],
+ props: {
+ numArgs: 1,
+ allowedInText: !0,
+ argTypes: ["color"]
+ },
+ handler(n, e) {
+ var {
+ parser: t,
+ breakOnTokenText: r
+ } = n, a = re(e[0], "color-token").color;
+ t.gullet.macros.set("\\current@color", a);
+ var i = t.parseExpression(!0, r);
+ return {
+ type: "color",
+ mode: t.mode,
+ color: a,
+ body: i
+ };
+ },
+ htmlBuilder: Ol,
+ mathmlBuilder: Pl
+});
+H({
+ type: "cr",
+ names: ["\\\\"],
+ props: {
+ numArgs: 0,
+ numOptionalArgs: 0,
+ allowedInText: !0
+ },
+ handler(n, e, t) {
+ var {
+ parser: r
+ } = n, a = r.gullet.future().text === "[" ? r.parseSizeGroup(!0) : null, i = !r.settings.displayMode || !r.settings.useStrictBehavior("newLineInDisplayMode", "In LaTeX, \\\\ or \\newline does nothing in display mode");
+ return {
+ type: "cr",
+ mode: r.mode,
+ newLine: i,
+ size: a && re(a, "size").value
+ };
+ },
+ // The following builders are called only at the top level,
+ // not within tabular/array environments.
+ htmlBuilder(n, e) {
+ var t = F.makeSpan(["mspace"], [], e);
+ return n.newLine && (t.classes.push("newline"), n.size && (t.style.marginTop = O(we(n.size, e)))), t;
+ },
+ mathmlBuilder(n, e) {
+ var t = new q.MathNode("mspace");
+ return n.newLine && (t.setAttribute("linebreak", "newline"), n.size && t.setAttribute("height", O(we(n.size, e)))), t;
+ }
+});
+var ia = {
+ "\\global": "\\global",
+ "\\long": "\\\\globallong",
+ "\\\\globallong": "\\\\globallong",
+ "\\def": "\\gdef",
+ "\\gdef": "\\gdef",
+ "\\edef": "\\xdef",
+ "\\xdef": "\\xdef",
+ "\\let": "\\\\globallet",
+ "\\futurelet": "\\\\globalfuture"
+}, Hl = (n) => {
+ var e = n.text;
+ if (/^(?:[\\{}$^_]|EOF)$/.test(e))
+ throw new W("Expected a control sequence", n);
+ return e;
+}, Mc = (n) => {
+ var e = n.gullet.popToken();
+ return e.text === "=" && (e = n.gullet.popToken(), e.text === " " && (e = n.gullet.popToken())), e;
+}, Ul = (n, e, t, r) => {
+ var a = n.gullet.macros.get(t.text);
+ a == null && (t.noexpand = !0, a = {
+ tokens: [t],
+ numArgs: 0,
+ // reproduce the same behavior in expansion
+ unexpandable: !n.gullet.isExpandable(t.text)
+ }), n.gullet.macros.set(e, a, r);
+};
+H({
+ type: "internal",
+ names: [
+ "\\global",
+ "\\long",
+ "\\\\globallong"
+ // can’t be entered directly
+ ],
+ props: {
+ numArgs: 0,
+ allowedInText: !0
+ },
+ handler(n) {
+ var {
+ parser: e,
+ funcName: t
+ } = n;
+ e.consumeSpaces();
+ var r = e.fetch();
+ if (ia[r.text])
+ return (t === "\\global" || t === "\\\\globallong") && (r.text = ia[r.text]), re(e.parseFunction(), "internal");
+ throw new W("Invalid token after macro prefix", r);
+ }
+});
+H({
+ type: "internal",
+ names: ["\\def", "\\gdef", "\\edef", "\\xdef"],
+ props: {
+ numArgs: 0,
+ allowedInText: !0,
+ primitive: !0
+ },
+ handler(n) {
+ var {
+ parser: e,
+ funcName: t
+ } = n, r = e.gullet.popToken(), a = r.text;
+ if (/^(?:[\\{}$^_]|EOF)$/.test(a))
+ throw new W("Expected a control sequence", r);
+ for (var i = 0, s, l = [[]]; e.gullet.future().text !== "{"; )
+ if (r = e.gullet.popToken(), r.text === "#") {
+ if (e.gullet.future().text === "{") {
+ s = e.gullet.future(), l[i].push("{");
+ break;
+ }
+ if (r = e.gullet.popToken(), !/^[1-9]$/.test(r.text))
+ throw new W('Invalid argument number "' + r.text + '"');
+ if (parseInt(r.text) !== i + 1)
+ throw new W('Argument number "' + r.text + '" out of order');
+ i++, l.push([]);
+ } else {
+ if (r.text === "EOF")
+ throw new W("Expected a macro definition");
+ l[i].push(r.text);
+ }
+ var {
+ tokens: u
+ } = e.gullet.consumeArg();
+ return s && u.unshift(s), (t === "\\edef" || t === "\\xdef") && (u = e.gullet.expandTokens(u), u.reverse()), e.gullet.macros.set(a, {
+ tokens: u,
+ numArgs: i,
+ delimiters: l
+ }, t === ia[t]), {
+ type: "internal",
+ mode: e.mode
+ };
+ }
+});
+H({
+ type: "internal",
+ names: [
+ "\\let",
+ "\\\\globallet"
+ // can’t be entered directly
+ ],
+ props: {
+ numArgs: 0,
+ allowedInText: !0,
+ primitive: !0
+ },
+ handler(n) {
+ var {
+ parser: e,
+ funcName: t
+ } = n, r = Hl(e.gullet.popToken());
+ e.gullet.consumeSpaces();
+ var a = Mc(e);
+ return Ul(e, r, a, t === "\\\\globallet"), {
+ type: "internal",
+ mode: e.mode
+ };
+ }
+});
+H({
+ type: "internal",
+ names: [
+ "\\futurelet",
+ "\\\\globalfuture"
+ // can’t be entered directly
+ ],
+ props: {
+ numArgs: 0,
+ allowedInText: !0,
+ primitive: !0
+ },
+ handler(n) {
+ var {
+ parser: e,
+ funcName: t
+ } = n, r = Hl(e.gullet.popToken()), a = e.gullet.popToken(), i = e.gullet.popToken();
+ return Ul(e, r, i, t === "\\\\globalfuture"), e.gullet.pushToken(i), e.gullet.pushToken(a), {
+ type: "internal",
+ mode: e.mode
+ };
+ }
+});
+var tr = function(e, t, r) {
+ var a = Fe.math[e] && Fe.math[e].replace, i = xa(a || e, t, r);
+ if (!i)
+ throw new Error("Unsupported symbol " + e + " and font size " + t + ".");
+ return i;
+}, Ta = function(e, t, r, a) {
+ var i = r.havingBaseStyle(t), s = F.makeSpan(a.concat(i.sizingClasses(r)), [e], r), l = i.sizeMultiplier / r.sizeMultiplier;
+ return s.height *= l, s.depth *= l, s.maxFontSize = i.sizeMultiplier, s;
+}, Gl = function(e, t, r) {
+ var a = t.havingBaseStyle(r), i = (1 - t.sizeMultiplier / a.sizeMultiplier) * t.fontMetrics().axisHeight;
+ e.classes.push("delimcenter"), e.style.top = O(i), e.height -= i, e.depth += i;
+}, zc = function(e, t, r, a, i, s) {
+ var l = F.makeSymbol(e, "Main-Regular", i, a), u = Ta(l, t, a, s);
+ return r && Gl(u, a, t), u;
+}, Bc = function(e, t, r, a) {
+ return F.makeSymbol(e, "Size" + t + "-Regular", r, a);
+}, jl = function(e, t, r, a, i, s) {
+ var l = Bc(e, t, i, a), u = Ta(F.makeSpan(["delimsizing", "size" + t], [l], a), Q.TEXT, a, s);
+ return r && Gl(u, a, Q.TEXT), u;
+}, En = function(e, t, r) {
+ var a;
+ t === "Size1-Regular" ? a = "delim-size1" : a = "delim-size4";
+ var i = F.makeSpan(["delimsizinginner", a], [F.makeSpan([], [F.makeSymbol(e, t, r)])]);
+ return {
+ type: "elem",
+ elem: i
+ };
+}, Tn = function(e, t, r) {
+ var a = Qt["Size4-Regular"][e.charCodeAt(0)] ? Qt["Size4-Regular"][e.charCodeAt(0)][4] : Qt["Size1-Regular"][e.charCodeAt(0)][4], i = new v0("inner", G1(e, Math.round(1e3 * t))), s = new u0([i], {
+ width: O(a),
+ height: O(t),
+ // Override CSS rule `.katex svg { width: 100% }`
+ style: "width:" + O(a),
+ viewBox: "0 0 " + 1e3 * a + " " + Math.round(1e3 * t),
+ preserveAspectRatio: "xMinYMin"
+ }), l = F.makeSvgSpan([], [s], r);
+ return l.height = t, l.style.height = O(t), l.style.width = O(a), {
+ type: "elem",
+ elem: l
+ };
+}, sa = 8e-3, Dr = {
+ type: "kern",
+ size: -1 * sa
+}, Rc = ["|", "\\lvert", "\\rvert", "\\vert"], qc = ["\\|", "\\lVert", "\\rVert", "\\Vert"], Vl = function(e, t, r, a, i, s) {
+ var l, u, h, d, f = "", p = 0;
+ l = h = d = e, u = null;
+ var v = "Size1-Regular";
+ e === "\\uparrow" ? h = d = "⏐" : e === "\\Uparrow" ? h = d = "‖" : e === "\\downarrow" ? l = h = "⏐" : e === "\\Downarrow" ? l = h = "‖" : e === "\\updownarrow" ? (l = "\\uparrow", h = "⏐", d = "\\downarrow") : e === "\\Updownarrow" ? (l = "\\Uparrow", h = "‖", d = "\\Downarrow") : Z.contains(Rc, e) ? (h = "∣", f = "vert", p = 333) : Z.contains(qc, e) ? (h = "∥", f = "doublevert", p = 556) : e === "[" || e === "\\lbrack" ? (l = "⎡", h = "⎢", d = "⎣", v = "Size4-Regular", f = "lbrack", p = 667) : e === "]" || e === "\\rbrack" ? (l = "⎤", h = "⎥", d = "⎦", v = "Size4-Regular", f = "rbrack", p = 667) : e === "\\lfloor" || e === "⌊" ? (h = l = "⎢", d = "⎣", v = "Size4-Regular", f = "lfloor", p = 667) : e === "\\lceil" || e === "⌈" ? (l = "⎡", h = d = "⎢", v = "Size4-Regular", f = "lceil", p = 667) : e === "\\rfloor" || e === "⌋" ? (h = l = "⎥", d = "⎦", v = "Size4-Regular", f = "rfloor", p = 667) : e === "\\rceil" || e === "⌉" ? (l = "⎤", h = d = "⎥", v = "Size4-Regular", f = "rceil", p = 667) : e === "(" || e === "\\lparen" ? (l = "⎛", h = "⎜", d = "⎝", v = "Size4-Regular", f = "lparen", p = 875) : e === ")" || e === "\\rparen" ? (l = "⎞", h = "⎟", d = "⎠", v = "Size4-Regular", f = "rparen", p = 875) : e === "\\{" || e === "\\lbrace" ? (l = "⎧", u = "⎨", d = "⎩", h = "⎪", v = "Size4-Regular") : e === "\\}" || e === "\\rbrace" ? (l = "⎫", u = "⎬", d = "⎭", h = "⎪", v = "Size4-Regular") : e === "\\lgroup" || e === "⟮" ? (l = "⎧", d = "⎩", h = "⎪", v = "Size4-Regular") : e === "\\rgroup" || e === "⟯" ? (l = "⎫", d = "⎭", h = "⎪", v = "Size4-Regular") : e === "\\lmoustache" || e === "⎰" ? (l = "⎧", d = "⎭", h = "⎪", v = "Size4-Regular") : (e === "\\rmoustache" || e === "⎱") && (l = "⎫", d = "⎩", h = "⎪", v = "Size4-Regular");
+ var w = tr(l, v, i), D = w.height + w.depth, C = tr(h, v, i), $ = C.height + C.depth, k = tr(d, v, i), _ = k.height + k.depth, A = 0, E = 1;
+ if (u !== null) {
+ var M = tr(u, v, i);
+ A = M.height + M.depth, E = 2;
+ }
+ var T = D + _ + A, P = Math.max(0, Math.ceil((t - T) / (E * $))), I = T + P * E * $, K = a.fontMetrics().axisHeight;
+ r && (K *= a.sizeMultiplier);
+ var j = I / 2 - K, J = [];
+ if (f.length > 0) {
+ var $e = I - D - _, se = Math.round(I * 1e3), ge = j1(f, Math.round($e * 1e3)), fe = new v0(f, ge), qe = (p / 1e3).toFixed(3) + "em", oe = (se / 1e3).toFixed(3) + "em", Ae = new u0([fe], {
+ width: qe,
+ height: oe,
+ viewBox: "0 0 " + p + " " + se
+ }), be = F.makeSvgSpan([], [Ae], a);
+ be.height = se / 1e3, be.style.width = qe, be.style.height = oe, J.push({
+ type: "elem",
+ elem: be
+ });
+ } else {
+ if (J.push(En(d, v, i)), J.push(Dr), u === null) {
+ var R = I - D - _ + 2 * sa;
+ J.push(Tn(h, R, a));
+ } else {
+ var le = (I - D - _ - A) / 2 + 2 * sa;
+ J.push(Tn(h, le, a)), J.push(Dr), J.push(En(u, v, i)), J.push(Dr), J.push(Tn(h, le, a));
+ }
+ J.push(Dr), J.push(En(l, v, i));
+ }
+ var ue = a.havingBaseStyle(Q.TEXT), Ee = F.makeVList({
+ positionType: "bottom",
+ positionData: j,
+ children: J
+ }, ue);
+ return Ta(F.makeSpan(["delimsizing", "mult"], [Ee], ue), Q.TEXT, a, s);
+}, $n = 80, Mn = 0.08, zn = function(e, t, r, a, i) {
+ var s = U1(e, a, r), l = new v0(e, s), u = new u0([l], {
+ // Note: 1000:1 ratio of viewBox to document em width.
+ width: "400em",
+ height: O(t),
+ viewBox: "0 0 400000 " + r,
+ preserveAspectRatio: "xMinYMin slice"
+ });
+ return F.makeSvgSpan(["hide-tail"], [u], i);
+}, Ic = function(e, t) {
+ var r = t.havingBaseSizing(), a = Zl("\\surd", e * r.sizeMultiplier, Xl, r), i = r.sizeMultiplier, s = Math.max(0, t.minRuleThickness - t.fontMetrics().sqrtRuleThickness), l, u = 0, h = 0, d = 0, f;
+ return a.type === "small" ? (d = 1e3 + 1e3 * s + $n, e < 1 ? i = 1 : e < 1.4 && (i = 0.7), u = (1 + s + Mn) / i, h = (1 + s) / i, l = zn("sqrtMain", u, d, s, t), l.style.minWidth = "0.853em", f = 0.833 / i) : a.type === "large" ? (d = (1e3 + $n) * nr[a.size], h = (nr[a.size] + s) / i, u = (nr[a.size] + s + Mn) / i, l = zn("sqrtSize" + a.size, u, d, s, t), l.style.minWidth = "1.02em", f = 1 / i) : (u = e + s + Mn, h = e + s, d = Math.floor(1e3 * e + s) + $n, l = zn("sqrtTall", u, d, s, t), l.style.minWidth = "0.742em", f = 1.056), l.height = h, l.style.height = O(u), {
+ span: l,
+ advanceWidth: f,
+ // Calculate the actual line width.
+ // This actually should depend on the chosen font -- e.g. \boldmath
+ // should use the thicker surd symbols from e.g. KaTeX_Main-Bold, and
+ // have thicker rules.
+ ruleWidth: (t.fontMetrics().sqrtRuleThickness + s) * i
+ };
+}, Wl = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "\\surd"], Nc = ["\\uparrow", "\\downarrow", "\\updownarrow", "\\Uparrow", "\\Downarrow", "\\Updownarrow", "|", "\\|", "\\vert", "\\Vert", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱"], Yl = ["<", ">", "\\langle", "\\rangle", "/", "\\backslash", "\\lt", "\\gt"], nr = [0, 1.2, 1.8, 2.4, 3], Lc = function(e, t, r, a, i) {
+ if (e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle"), Z.contains(Wl, e) || Z.contains(Yl, e))
+ return jl(e, t, !1, r, a, i);
+ if (Z.contains(Nc, e))
+ return Vl(e, nr[t], !1, r, a, i);
+ throw new W("Illegal delimiter: '" + e + "'");
+}, Oc = [{
+ type: "small",
+ style: Q.SCRIPTSCRIPT
+}, {
+ type: "small",
+ style: Q.SCRIPT
+}, {
+ type: "small",
+ style: Q.TEXT
+}, {
+ type: "large",
+ size: 1
+}, {
+ type: "large",
+ size: 2
+}, {
+ type: "large",
+ size: 3
+}, {
+ type: "large",
+ size: 4
+}], Pc = [{
+ type: "small",
+ style: Q.SCRIPTSCRIPT
+}, {
+ type: "small",
+ style: Q.SCRIPT
+}, {
+ type: "small",
+ style: Q.TEXT
+}, {
+ type: "stack"
+}], Xl = [{
+ type: "small",
+ style: Q.SCRIPTSCRIPT
+}, {
+ type: "small",
+ style: Q.SCRIPT
+}, {
+ type: "small",
+ style: Q.TEXT
+}, {
+ type: "large",
+ size: 1
+}, {
+ type: "large",
+ size: 2
+}, {
+ type: "large",
+ size: 3
+}, {
+ type: "large",
+ size: 4
+}, {
+ type: "stack"
+}], Hc = function(e) {
+ if (e.type === "small")
+ return "Main-Regular";
+ if (e.type === "large")
+ return "Size" + e.size + "-Regular";
+ if (e.type === "stack")
+ return "Size4-Regular";
+ throw new Error("Add support for delim type '" + e.type + "' here.");
+}, Zl = function(e, t, r, a) {
+ for (var i = Math.min(2, 3 - a.style.size), s = i; s < r.length && r[s].type !== "stack"; s++) {
+ var l = tr(e, Hc(r[s]), "math"), u = l.height + l.depth;
+ if (r[s].type === "small") {
+ var h = a.havingBaseStyle(r[s].style);
+ u *= h.sizeMultiplier;
+ }
+ if (u > t)
+ return r[s];
+ }
+ return r[r.length - 1];
+}, Kl = function(e, t, r, a, i, s) {
+ e === "<" || e === "\\lt" || e === "⟨" ? e = "\\langle" : (e === ">" || e === "\\gt" || e === "⟩") && (e = "\\rangle");
+ var l;
+ Z.contains(Yl, e) ? l = Oc : Z.contains(Wl, e) ? l = Xl : l = Pc;
+ var u = Zl(e, t, l, a);
+ return u.type === "small" ? zc(e, u.style, r, a, i, s) : u.type === "large" ? jl(e, u.size, r, a, i, s) : Vl(e, t, r, a, i, s);
+}, Uc = function(e, t, r, a, i, s) {
+ var l = a.fontMetrics().axisHeight * a.sizeMultiplier, u = 901, h = 5 / a.fontMetrics().ptPerEm, d = Math.max(t - l, r + l), f = Math.max(
+ // In real TeX, calculations are done using integral values which are
+ // 65536 per pt, or 655360 per em. So, the division here truncates in
+ // TeX but doesn't here, producing different results. If we wanted to
+ // exactly match TeX's calculation, we could do
+ // Math.floor(655360 * maxDistFromAxis / 500) *
+ // delimiterFactor / 655360
+ // (To see the difference, compare
+ // x^{x^{\left(\rule{0.1em}{0.68em}\right)}}
+ // in TeX and KaTeX)
+ d / 500 * u,
+ 2 * d - h
+ );
+ return Kl(e, f, !0, a, i, s);
+}, e0 = {
+ sqrtImage: Ic,
+ sizedDelim: Lc,
+ sizeToMaxHeight: nr,
+ customSizedDelim: Kl,
+ leftRightDelim: Uc
+}, Yi = {
+ "\\bigl": {
+ mclass: "mopen",
+ size: 1
+ },
+ "\\Bigl": {
+ mclass: "mopen",
+ size: 2
+ },
+ "\\biggl": {
+ mclass: "mopen",
+ size: 3
+ },
+ "\\Biggl": {
+ mclass: "mopen",
+ size: 4
+ },
+ "\\bigr": {
+ mclass: "mclose",
+ size: 1
+ },
+ "\\Bigr": {
+ mclass: "mclose",
+ size: 2
+ },
+ "\\biggr": {
+ mclass: "mclose",
+ size: 3
+ },
+ "\\Biggr": {
+ mclass: "mclose",
+ size: 4
+ },
+ "\\bigm": {
+ mclass: "mrel",
+ size: 1
+ },
+ "\\Bigm": {
+ mclass: "mrel",
+ size: 2
+ },
+ "\\biggm": {
+ mclass: "mrel",
+ size: 3
+ },
+ "\\Biggm": {
+ mclass: "mrel",
+ size: 4
+ },
+ "\\big": {
+ mclass: "mord",
+ size: 1
+ },
+ "\\Big": {
+ mclass: "mord",
+ size: 2
+ },
+ "\\bigg": {
+ mclass: "mord",
+ size: 3
+ },
+ "\\Bigg": {
+ mclass: "mord",
+ size: 4
+ }
+}, Gc = ["(", "\\lparen", ")", "\\rparen", "[", "\\lbrack", "]", "\\rbrack", "\\{", "\\lbrace", "\\}", "\\rbrace", "\\lfloor", "\\rfloor", "⌊", "⌋", "\\lceil", "\\rceil", "⌈", "⌉", "<", ">", "\\langle", "⟨", "\\rangle", "⟩", "\\lt", "\\gt", "\\lvert", "\\rvert", "\\lVert", "\\rVert", "\\lgroup", "\\rgroup", "⟮", "⟯", "\\lmoustache", "\\rmoustache", "⎰", "⎱", "/", "\\backslash", "|", "\\vert", "\\|", "\\Vert", "\\uparrow", "\\Uparrow", "\\downarrow", "\\Downarrow", "\\updownarrow", "\\Updownarrow", "."];
+function hn(n, e) {
+ var t = un(n);
+ if (t && Z.contains(Gc, t.text))
+ return t;
+ throw t ? new W("Invalid delimiter '" + t.text + "' after '" + e.funcName + "'", n) : new W("Invalid delimiter type '" + n.type + "'", n);
+}
+H({
+ type: "delimsizing",
+ names: ["\\bigl", "\\Bigl", "\\biggl", "\\Biggl", "\\bigr", "\\Bigr", "\\biggr", "\\Biggr", "\\bigm", "\\Bigm", "\\biggm", "\\Biggm", "\\big", "\\Big", "\\bigg", "\\Bigg"],
+ props: {
+ numArgs: 1,
+ argTypes: ["primitive"]
+ },
+ handler: (n, e) => {
+ var t = hn(e[0], n);
+ return {
+ type: "delimsizing",
+ mode: n.parser.mode,
+ size: Yi[n.funcName].size,
+ mclass: Yi[n.funcName].mclass,
+ delim: t.text
+ };
+ },
+ htmlBuilder: (n, e) => n.delim === "." ? F.makeSpan([n.mclass]) : e0.sizedDelim(n.delim, n.size, e, n.mode, [n.mclass]),
+ mathmlBuilder: (n) => {
+ var e = [];
+ n.delim !== "." && e.push(ct(n.delim, n.mode));
+ var t = new q.MathNode("mo", e);
+ n.mclass === "mopen" || n.mclass === "mclose" ? t.setAttribute("fence", "true") : t.setAttribute("fence", "false"), t.setAttribute("stretchy", "true");
+ var r = O(e0.sizeToMaxHeight[n.size]);
+ return t.setAttribute("minsize", r), t.setAttribute("maxsize", r), t;
+ }
+});
+function Xi(n) {
+ if (!n.body)
+ throw new Error("Bug: The leftright ParseNode wasn't fully parsed.");
+}
+H({
+ type: "leftright-right",
+ names: ["\\right"],
+ props: {
+ numArgs: 1,
+ primitive: !0
+ },
+ handler: (n, e) => {
+ var t = n.parser.gullet.macros.get("\\current@color");
+ if (t && typeof t != "string")
+ throw new W("\\current@color set to non-string in \\right");
+ return {
+ type: "leftright-right",
+ mode: n.parser.mode,
+ delim: hn(e[0], n).text,
+ color: t
+ // undefined if not set via \color
+ };
+ }
+});
+H({
+ type: "leftright",
+ names: ["\\left"],
+ props: {
+ numArgs: 1,
+ primitive: !0
+ },
+ handler: (n, e) => {
+ var t = hn(e[0], n), r = n.parser;
+ ++r.leftrightDepth;
+ var a = r.parseExpression(!1);
+ --r.leftrightDepth, r.expect("\\right", !1);
+ var i = re(r.parseFunction(), "leftright-right");
+ return {
+ type: "leftright",
+ mode: r.mode,
+ body: a,
+ left: t.text,
+ right: i.delim,
+ rightColor: i.color
+ };
+ },
+ htmlBuilder: (n, e) => {
+ Xi(n);
+ for (var t = Ie(n.body, e, !0, ["mopen", "mclose"]), r = 0, a = 0, i = !1, s = 0; s < t.length; s++)
+ t[s].isMiddle ? i = !0 : (r = Math.max(t[s].height, r), a = Math.max(t[s].depth, a));
+ r *= e.sizeMultiplier, a *= e.sizeMultiplier;
+ var l;
+ if (n.left === "." ? l = ur(e, ["mopen"]) : l = e0.leftRightDelim(n.left, r, a, e, n.mode, ["mopen"]), t.unshift(l), i)
+ for (var u = 1; u < t.length; u++) {
+ var h = t[u], d = h.isMiddle;
+ d && (t[u] = e0.leftRightDelim(d.delim, r, a, d.options, n.mode, []));
+ }
+ var f;
+ if (n.right === ".")
+ f = ur(e, ["mclose"]);
+ else {
+ var p = n.rightColor ? e.withColor(n.rightColor) : e;
+ f = e0.leftRightDelim(n.right, r, a, p, n.mode, ["mclose"]);
+ }
+ return t.push(f), F.makeSpan(["minner"], t, e);
+ },
+ mathmlBuilder: (n, e) => {
+ Xi(n);
+ var t = nt(n.body, e);
+ if (n.left !== ".") {
+ var r = new q.MathNode("mo", [ct(n.left, n.mode)]);
+ r.setAttribute("fence", "true"), t.unshift(r);
+ }
+ if (n.right !== ".") {
+ var a = new q.MathNode("mo", [ct(n.right, n.mode)]);
+ a.setAttribute("fence", "true"), n.rightColor && a.setAttribute("mathcolor", n.rightColor), t.push(a);
+ }
+ return Aa(t);
+ }
+});
+H({
+ type: "middle",
+ names: ["\\middle"],
+ props: {
+ numArgs: 1,
+ primitive: !0
+ },
+ handler: (n, e) => {
+ var t = hn(e[0], n);
+ if (!n.parser.leftrightDepth)
+ throw new W("\\middle without preceding \\left", t);
+ return {
+ type: "middle",
+ mode: n.parser.mode,
+ delim: t.text
+ };
+ },
+ htmlBuilder: (n, e) => {
+ var t;
+ if (n.delim === ".")
+ t = ur(e, []);
+ else {
+ t = e0.sizedDelim(n.delim, 1, e, n.mode, []);
+ var r = {
+ delim: n.delim,
+ options: e
+ };
+ t.isMiddle = r;
+ }
+ return t;
+ },
+ mathmlBuilder: (n, e) => {
+ var t = n.delim === "\\vert" || n.delim === "|" ? ct("|", "text") : ct(n.delim, n.mode), r = new q.MathNode("mo", [t]);
+ return r.setAttribute("fence", "true"), r.setAttribute("lspace", "0.05em"), r.setAttribute("rspace", "0.05em"), r;
+ }
+});
+var $a = (n, e) => {
+ var t = F.wrapFragment(ie(n.body, e), e), r = n.label.slice(1), a = e.sizeMultiplier, i, s = 0, l = Z.isCharacterBox(n.body);
+ if (r === "sout")
+ i = F.makeSpan(["stretchy", "sout"]), i.height = e.fontMetrics().defaultRuleThickness / a, s = -0.5 * e.fontMetrics().xHeight;
+ else if (r === "phase") {
+ var u = we({
+ number: 0.6,
+ unit: "pt"
+ }, e), h = we({
+ number: 0.35,
+ unit: "ex"
+ }, e), d = e.havingBaseSizing();
+ a = a / d.sizeMultiplier;
+ var f = t.height + t.depth + u + h;
+ t.style.paddingLeft = O(f / 2 + u);
+ var p = Math.floor(1e3 * f * a), v = P1(p), w = new u0([new v0("phase", v)], {
+ width: "400em",
+ height: O(p / 1e3),
+ viewBox: "0 0 400000 " + p,
+ preserveAspectRatio: "xMinYMin slice"
+ });
+ i = F.makeSvgSpan(["hide-tail"], [w], e), i.style.height = O(f), s = t.depth + u + h;
+ } else {
+ /cancel/.test(r) ? l || t.classes.push("cancel-pad") : r === "angl" ? t.classes.push("anglpad") : t.classes.push("boxpad");
+ var D = 0, C = 0, $ = 0;
+ /box/.test(r) ? ($ = Math.max(
+ e.fontMetrics().fboxrule,
+ // default
+ e.minRuleThickness
+ // User override.
+ ), D = e.fontMetrics().fboxsep + (r === "colorbox" ? 0 : $), C = D) : r === "angl" ? ($ = Math.max(e.fontMetrics().defaultRuleThickness, e.minRuleThickness), D = 4 * $, C = Math.max(0, 0.25 - t.depth)) : (D = l ? 0.2 : 0, C = D), i = t0.encloseSpan(t, r, D, C, e), /fbox|boxed|fcolorbox/.test(r) ? (i.style.borderStyle = "solid", i.style.borderWidth = O($)) : r === "angl" && $ !== 0.049 && (i.style.borderTopWidth = O($), i.style.borderRightWidth = O($)), s = t.depth + C, n.backgroundColor && (i.style.backgroundColor = n.backgroundColor, n.borderColor && (i.style.borderColor = n.borderColor));
+ }
+ var k;
+ if (n.backgroundColor)
+ k = F.makeVList({
+ positionType: "individualShift",
+ children: [
+ // Put the color background behind inner;
+ {
+ type: "elem",
+ elem: i,
+ shift: s
+ },
+ {
+ type: "elem",
+ elem: t,
+ shift: 0
+ }
+ ]
+ }, e);
+ else {
+ var _ = /cancel|phase/.test(r) ? ["svg-align"] : [];
+ k = F.makeVList({
+ positionType: "individualShift",
+ children: [
+ // Write the \cancel stroke on top of inner.
+ {
+ type: "elem",
+ elem: t,
+ shift: 0
+ },
+ {
+ type: "elem",
+ elem: i,
+ shift: s,
+ wrapperClasses: _
+ }
+ ]
+ }, e);
+ }
+ return /cancel/.test(r) && (k.height = t.height, k.depth = t.depth), /cancel/.test(r) && !l ? F.makeSpan(["mord", "cancel-lap"], [k], e) : F.makeSpan(["mord"], [k], e);
+}, Ma = (n, e) => {
+ var t = 0, r = new q.MathNode(n.label.indexOf("colorbox") > -1 ? "mpadded" : "menclose", [me(n.body, e)]);
+ switch (n.label) {
+ case "\\cancel":
+ r.setAttribute("notation", "updiagonalstrike");
+ break;
+ case "\\bcancel":
+ r.setAttribute("notation", "downdiagonalstrike");
+ break;
+ case "\\phase":
+ r.setAttribute("notation", "phasorangle");
+ break;
+ case "\\sout":
+ r.setAttribute("notation", "horizontalstrike");
+ break;
+ case "\\fbox":
+ r.setAttribute("notation", "box");
+ break;
+ case "\\angl":
+ r.setAttribute("notation", "actuarial");
+ break;
+ case "\\fcolorbox":
+ case "\\colorbox":
+ if (t = e.fontMetrics().fboxsep * e.fontMetrics().ptPerEm, r.setAttribute("width", "+" + 2 * t + "pt"), r.setAttribute("height", "+" + 2 * t + "pt"), r.setAttribute("lspace", t + "pt"), r.setAttribute("voffset", t + "pt"), n.label === "\\fcolorbox") {
+ var a = Math.max(
+ e.fontMetrics().fboxrule,
+ // default
+ e.minRuleThickness
+ // user override
+ );
+ r.setAttribute("style", "border: " + a + "em solid " + String(n.borderColor));
+ }
+ break;
+ case "\\xcancel":
+ r.setAttribute("notation", "updiagonalstrike downdiagonalstrike");
+ break;
+ }
+ return n.backgroundColor && r.setAttribute("mathbackground", n.backgroundColor), r;
+};
+H({
+ type: "enclose",
+ names: ["\\colorbox"],
+ props: {
+ numArgs: 2,
+ allowedInText: !0,
+ argTypes: ["color", "text"]
+ },
+ handler(n, e, t) {
+ var {
+ parser: r,
+ funcName: a
+ } = n, i = re(e[0], "color-token").color, s = e[1];
+ return {
+ type: "enclose",
+ mode: r.mode,
+ label: a,
+ backgroundColor: i,
+ body: s
+ };
+ },
+ htmlBuilder: $a,
+ mathmlBuilder: Ma
+});
+H({
+ type: "enclose",
+ names: ["\\fcolorbox"],
+ props: {
+ numArgs: 3,
+ allowedInText: !0,
+ argTypes: ["color", "color", "text"]
+ },
+ handler(n, e, t) {
+ var {
+ parser: r,
+ funcName: a
+ } = n, i = re(e[0], "color-token").color, s = re(e[1], "color-token").color, l = e[2];
+ return {
+ type: "enclose",
+ mode: r.mode,
+ label: a,
+ backgroundColor: s,
+ borderColor: i,
+ body: l
+ };
+ },
+ htmlBuilder: $a,
+ mathmlBuilder: Ma
+});
+H({
+ type: "enclose",
+ names: ["\\fbox"],
+ props: {
+ numArgs: 1,
+ argTypes: ["hbox"],
+ allowedInText: !0
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n;
+ return {
+ type: "enclose",
+ mode: t.mode,
+ label: "\\fbox",
+ body: e[0]
+ };
+ }
+});
+H({
+ type: "enclose",
+ names: ["\\cancel", "\\bcancel", "\\xcancel", "\\sout", "\\phase"],
+ props: {
+ numArgs: 1
+ },
+ handler(n, e) {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[0];
+ return {
+ type: "enclose",
+ mode: t.mode,
+ label: r,
+ body: a
+ };
+ },
+ htmlBuilder: $a,
+ mathmlBuilder: Ma
+});
+H({
+ type: "enclose",
+ names: ["\\angl"],
+ props: {
+ numArgs: 1,
+ argTypes: ["hbox"],
+ allowedInText: !1
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n;
+ return {
+ type: "enclose",
+ mode: t.mode,
+ label: "\\angl",
+ body: e[0]
+ };
+ }
+});
+var Ql = {};
+function Ot(n) {
+ for (var {
+ type: e,
+ names: t,
+ props: r,
+ handler: a,
+ htmlBuilder: i,
+ mathmlBuilder: s
+ } = n, l = {
+ type: e,
+ numArgs: r.numArgs || 0,
+ allowedInText: !1,
+ numOptionalArgs: 0,
+ handler: a
+ }, u = 0; u < t.length; ++u)
+ Ql[t[u]] = l;
+ i && (Wr[e] = i), s && (Yr[e] = s);
+}
+var jc = {};
+function g(n, e) {
+ jc[n] = e;
+}
+function Zi(n) {
+ var e = [];
+ n.consumeSpaces();
+ var t = n.fetch().text;
+ for (t === "\\relax" && (n.consume(), n.consumeSpaces(), t = n.fetch().text); t === "\\hline" || t === "\\hdashline"; )
+ n.consume(), e.push(t === "\\hdashline"), n.consumeSpaces(), t = n.fetch().text;
+ return e;
+}
+var dn = (n) => {
+ var e = n.parser.settings;
+ if (!e.displayMode)
+ throw new W("{" + n.envName + "} can be used only in display mode.");
+};
+function za(n) {
+ if (n.indexOf("ed") === -1)
+ return n.indexOf("*") === -1;
+}
+function h0(n, e, t) {
+ var {
+ hskipBeforeAndAfter: r,
+ addJot: a,
+ cols: i,
+ arraystretch: s,
+ colSeparationType: l,
+ autoTag: u,
+ singleRow: h,
+ emptySingleRow: d,
+ maxNumCols: f,
+ leqno: p
+ } = e;
+ if (n.gullet.beginGroup(), h || n.gullet.macros.set("\\cr", "\\\\\\relax"), !s) {
+ var v = n.gullet.expandMacroAsText("\\arraystretch");
+ if (v == null)
+ s = 1;
+ else if (s = parseFloat(v), !s || s < 0)
+ throw new W("Invalid \\arraystretch: " + v);
+ }
+ n.gullet.beginGroup();
+ var w = [], D = [w], C = [], $ = [], k = u != null ? [] : void 0;
+ function _() {
+ u && n.gullet.macros.set("\\@eqnsw", "1", !0);
+ }
+ function A() {
+ k && (n.gullet.macros.get("\\df@tag") ? (k.push(n.subparse([new ka("\\df@tag")])), n.gullet.macros.set("\\df@tag", void 0, !0)) : k.push(!!u && n.gullet.macros.get("\\@eqnsw") === "1"));
+ }
+ for (_(), $.push(Zi(n)); ; ) {
+ var E = n.parseExpression(!1, h ? "\\end" : "\\\\");
+ n.gullet.endGroup(), n.gullet.beginGroup(), E = {
+ type: "ordgroup",
+ mode: n.mode,
+ body: E
+ }, t && (E = {
+ type: "styling",
+ mode: n.mode,
+ style: t,
+ body: [E]
+ }), w.push(E);
+ var M = n.fetch().text;
+ if (M === "&") {
+ if (f && w.length === f) {
+ if (h || l)
+ throw new W("Too many tab characters: &", n.nextToken);
+ n.settings.reportNonstrict("textEnv", "Too few columns specified in the {array} column argument.");
+ }
+ n.consume();
+ } else if (M === "\\end") {
+ A(), w.length === 1 && E.type === "styling" && E.body[0].body.length === 0 && (D.length > 1 || !d) && D.pop(), $.length < D.length + 1 && $.push([]);
+ break;
+ } else if (M === "\\\\") {
+ n.consume();
+ var T = void 0;
+ n.gullet.future().text !== " " && (T = n.parseSizeGroup(!0)), C.push(T ? T.value : null), A(), $.push(Zi(n)), w = [], D.push(w), _();
+ } else
+ throw new W("Expected & or \\\\ or \\cr or \\end", n.nextToken);
+ }
+ return n.gullet.endGroup(), n.gullet.endGroup(), {
+ type: "array",
+ mode: n.mode,
+ addJot: a,
+ arraystretch: s,
+ body: D,
+ cols: i,
+ rowGaps: C,
+ hskipBeforeAndAfter: r,
+ hLinesBeforeRow: $,
+ colSeparationType: l,
+ tags: k,
+ leqno: p
+ };
+}
+function Ba(n) {
+ return n.slice(0, 1) === "d" ? "display" : "text";
+}
+var Pt = function(e, t) {
+ var r, a, i = e.body.length, s = e.hLinesBeforeRow, l = 0, u = new Array(i), h = [], d = Math.max(
+ // From LaTeX \showthe\arrayrulewidth. Equals 0.04 em.
+ t.fontMetrics().arrayRuleWidth,
+ t.minRuleThickness
+ // User override.
+ ), f = 1 / t.fontMetrics().ptPerEm, p = 5 * f;
+ if (e.colSeparationType && e.colSeparationType === "small") {
+ var v = t.havingStyle(Q.SCRIPT).sizeMultiplier;
+ p = 0.2778 * (v / t.sizeMultiplier);
+ }
+ var w = e.colSeparationType === "CD" ? we({
+ number: 3,
+ unit: "ex"
+ }, t) : 12 * f, D = 3 * f, C = e.arraystretch * w, $ = 0.7 * C, k = 0.3 * C, _ = 0;
+ function A(Gt) {
+ for (var jt = 0; jt < Gt.length; ++jt)
+ jt > 0 && (_ += 0.25), h.push({
+ pos: _,
+ isDashed: Gt[jt]
+ });
+ }
+ for (A(s[0]), r = 0; r < e.body.length; ++r) {
+ var E = e.body[r], M = $, T = k;
+ l < E.length && (l = E.length);
+ var P = new Array(E.length);
+ for (a = 0; a < E.length; ++a) {
+ var I = ie(E[a], t);
+ T < I.depth && (T = I.depth), M < I.height && (M = I.height), P[a] = I;
+ }
+ var K = e.rowGaps[r], j = 0;
+ K && (j = we(K, t), j > 0 && (j += k, T < j && (T = j), j = 0)), e.addJot && (T += D), P.height = M, P.depth = T, _ += M, P.pos = _, _ += T + j, u[r] = P, A(s[r + 1]);
+ }
+ var J = _ / 2 + t.fontMetrics().axisHeight, $e = e.cols || [], se = [], ge, fe, qe = [];
+ if (e.tags && e.tags.some((Gt) => Gt))
+ for (r = 0; r < i; ++r) {
+ var oe = u[r], Ae = oe.pos - J, be = e.tags[r], R = void 0;
+ be === !0 ? R = F.makeSpan(["eqn-num"], [], t) : be === !1 ? R = F.makeSpan([], [], t) : R = F.makeSpan([], Ie(be, t, !0), t), R.depth = oe.depth, R.height = oe.height, qe.push({
+ type: "elem",
+ elem: R,
+ shift: Ae
+ });
+ }
+ for (
+ a = 0, fe = 0;
+ // Continue while either there are more columns or more column
+ // descriptions, so trailing separators don't get lost.
+ a < l || fe < $e.length;
+ ++a, ++fe
+ ) {
+ for (var le = $e[fe] || {}, ue = !0; le.type === "separator"; ) {
+ if (ue || (ge = F.makeSpan(["arraycolsep"], []), ge.style.width = O(t.fontMetrics().doubleRuleSep), se.push(ge)), le.separator === "|" || le.separator === ":") {
+ var Ee = le.separator === "|" ? "solid" : "dashed", L = F.makeSpan(["vertical-separator"], [], t);
+ L.style.height = O(_), L.style.borderRightWidth = O(d), L.style.borderRightStyle = Ee, L.style.margin = "0 " + O(-d / 2);
+ var He = _ - J;
+ He && (L.style.verticalAlign = O(-He)), se.push(L);
+ } else
+ throw new W("Invalid separator type: " + le.separator);
+ fe++, le = $e[fe] || {}, ue = !1;
+ }
+ if (!(a >= l)) {
+ var Ue = void 0;
+ (a > 0 || e.hskipBeforeAndAfter) && (Ue = Z.deflt(le.pregap, p), Ue !== 0 && (ge = F.makeSpan(["arraycolsep"], []), ge.style.width = O(Ue), se.push(ge)));
+ var Qe = [];
+ for (r = 0; r < i; ++r) {
+ var ft = u[r], pt = ft[a];
+ if (pt) {
+ var Ut = ft.pos - J;
+ pt.depth = ft.depth, pt.height = ft.height, Qe.push({
+ type: "elem",
+ elem: pt,
+ shift: Ut
+ });
+ }
+ }
+ Qe = F.makeVList({
+ positionType: "individualShift",
+ children: Qe
+ }, t), Qe = F.makeSpan(["col-align-" + (le.align || "c")], [Qe]), se.push(Qe), (a < l - 1 || e.hskipBeforeAndAfter) && (Ue = Z.deflt(le.postgap, p), Ue !== 0 && (ge = F.makeSpan(["arraycolsep"], []), ge.style.width = O(Ue), se.push(ge)));
+ }
+ }
+ if (u = F.makeSpan(["mtable"], se), h.length > 0) {
+ for (var Dt = F.makeLineSpan("hline", t, d), At = F.makeLineSpan("hdashline", t, d), gt = [{
+ type: "elem",
+ elem: u,
+ shift: 0
+ }]; h.length > 0; ) {
+ var k0 = h.pop(), S0 = k0.pos - J;
+ k0.isDashed ? gt.push({
+ type: "elem",
+ elem: At,
+ shift: S0
+ }) : gt.push({
+ type: "elem",
+ elem: Dt,
+ shift: S0
+ });
+ }
+ u = F.makeVList({
+ positionType: "individualShift",
+ children: gt
+ }, t);
+ }
+ if (qe.length === 0)
+ return F.makeSpan(["mord"], [u], t);
+ var Ct = F.makeVList({
+ positionType: "individualShift",
+ children: qe
+ }, t);
+ return Ct = F.makeSpan(["tag"], [Ct], t), F.makeFragment([u, Ct]);
+}, Vc = {
+ c: "center ",
+ l: "left ",
+ r: "right "
+}, Ht = function(e, t) {
+ for (var r = [], a = new q.MathNode("mtd", [], ["mtr-glue"]), i = new q.MathNode("mtd", [], ["mml-eqn-num"]), s = 0; s < e.body.length; s++) {
+ for (var l = e.body[s], u = [], h = 0; h < l.length; h++)
+ u.push(new q.MathNode("mtd", [me(l[h], t)]));
+ e.tags && e.tags[s] && (u.unshift(a), u.push(a), e.leqno ? u.unshift(i) : u.push(i)), r.push(new q.MathNode("mtr", u));
+ }
+ var d = new q.MathNode("mtable", r), f = e.arraystretch === 0.5 ? 0.1 : 0.16 + e.arraystretch - 1 + (e.addJot ? 0.09 : 0);
+ d.setAttribute("rowspacing", O(f));
+ var p = "", v = "";
+ if (e.cols && e.cols.length > 0) {
+ var w = e.cols, D = "", C = !1, $ = 0, k = w.length;
+ w[0].type === "separator" && (p += "top ", $ = 1), w[w.length - 1].type === "separator" && (p += "bottom ", k -= 1);
+ for (var _ = $; _ < k; _++)
+ w[_].type === "align" ? (v += Vc[w[_].align], C && (D += "none "), C = !0) : w[_].type === "separator" && C && (D += w[_].separator === "|" ? "solid " : "dashed ", C = !1);
+ d.setAttribute("columnalign", v.trim()), /[sd]/.test(D) && d.setAttribute("columnlines", D.trim());
+ }
+ if (e.colSeparationType === "align") {
+ for (var A = e.cols || [], E = "", M = 1; M < A.length; M++)
+ E += M % 2 ? "0em " : "1em ";
+ d.setAttribute("columnspacing", E.trim());
+ } else e.colSeparationType === "alignat" || e.colSeparationType === "gather" ? d.setAttribute("columnspacing", "0em") : e.colSeparationType === "small" ? d.setAttribute("columnspacing", "0.2778em") : e.colSeparationType === "CD" ? d.setAttribute("columnspacing", "0.5em") : d.setAttribute("columnspacing", "1em");
+ var T = "", P = e.hLinesBeforeRow;
+ p += P[0].length > 0 ? "left " : "", p += P[P.length - 1].length > 0 ? "right " : "";
+ for (var I = 1; I < P.length - 1; I++)
+ T += P[I].length === 0 ? "none " : P[I][0] ? "dashed " : "solid ";
+ return /[sd]/.test(T) && d.setAttribute("rowlines", T.trim()), p !== "" && (d = new q.MathNode("menclose", [d]), d.setAttribute("notation", p.trim())), e.arraystretch && e.arraystretch < 1 && (d = new q.MathNode("mstyle", [d]), d.setAttribute("scriptlevel", "1")), d;
+}, Jl = function(e, t) {
+ e.envName.indexOf("ed") === -1 && dn(e);
+ var r = [], a = e.envName.indexOf("at") > -1 ? "alignat" : "align", i = e.envName === "split", s = h0(e.parser, {
+ cols: r,
+ addJot: !0,
+ autoTag: i ? void 0 : za(e.envName),
+ emptySingleRow: !0,
+ colSeparationType: a,
+ maxNumCols: i ? 2 : void 0,
+ leqno: e.parser.settings.leqno
+ }, "display"), l, u = 0, h = {
+ type: "ordgroup",
+ mode: e.mode,
+ body: []
+ };
+ if (t[0] && t[0].type === "ordgroup") {
+ for (var d = "", f = 0; f < t[0].body.length; f++) {
+ var p = re(t[0].body[f], "textord");
+ d += p.text;
+ }
+ l = Number(d), u = l * 2;
+ }
+ var v = !u;
+ s.body.forEach(function($) {
+ for (var k = 1; k < $.length; k += 2) {
+ var _ = re($[k], "styling"), A = re(_.body[0], "ordgroup");
+ A.body.unshift(h);
+ }
+ if (v)
+ u < $.length && (u = $.length);
+ else {
+ var E = $.length / 2;
+ if (l < E)
+ throw new W("Too many math in a row: " + ("expected " + l + ", but got " + E), $[0]);
+ }
+ });
+ for (var w = 0; w < u; ++w) {
+ var D = "r", C = 0;
+ w % 2 === 1 ? D = "l" : w > 0 && v && (C = 1), r[w] = {
+ type: "align",
+ align: D,
+ pregap: C,
+ postgap: 0
+ };
+ }
+ return s.colSeparationType = v ? "align" : "alignat", s;
+};
+Ot({
+ type: "array",
+ names: ["array", "darray"],
+ props: {
+ numArgs: 1
+ },
+ handler(n, e) {
+ var t = un(e[0]), r = t ? [e[0]] : re(e[0], "ordgroup").body, a = r.map(function(s) {
+ var l = Fa(s), u = l.text;
+ if ("lcr".indexOf(u) !== -1)
+ return {
+ type: "align",
+ align: u
+ };
+ if (u === "|")
+ return {
+ type: "separator",
+ separator: "|"
+ };
+ if (u === ":")
+ return {
+ type: "separator",
+ separator: ":"
+ };
+ throw new W("Unknown column alignment: " + u, s);
+ }), i = {
+ cols: a,
+ hskipBeforeAndAfter: !0,
+ // \@preamble in lttab.dtx
+ maxNumCols: a.length
+ };
+ return h0(n.parser, i, Ba(n.envName));
+ },
+ htmlBuilder: Pt,
+ mathmlBuilder: Ht
+});
+Ot({
+ type: "array",
+ names: ["matrix", "pmatrix", "bmatrix", "Bmatrix", "vmatrix", "Vmatrix", "matrix*", "pmatrix*", "bmatrix*", "Bmatrix*", "vmatrix*", "Vmatrix*"],
+ props: {
+ numArgs: 0
+ },
+ handler(n) {
+ var e = {
+ matrix: null,
+ pmatrix: ["(", ")"],
+ bmatrix: ["[", "]"],
+ Bmatrix: ["\\{", "\\}"],
+ vmatrix: ["|", "|"],
+ Vmatrix: ["\\Vert", "\\Vert"]
+ }[n.envName.replace("*", "")], t = "c", r = {
+ hskipBeforeAndAfter: !1,
+ cols: [{
+ type: "align",
+ align: t
+ }]
+ };
+ if (n.envName.charAt(n.envName.length - 1) === "*") {
+ var a = n.parser;
+ if (a.consumeSpaces(), a.fetch().text === "[") {
+ if (a.consume(), a.consumeSpaces(), t = a.fetch().text, "lcr".indexOf(t) === -1)
+ throw new W("Expected l or c or r", a.nextToken);
+ a.consume(), a.consumeSpaces(), a.expect("]"), a.consume(), r.cols = [{
+ type: "align",
+ align: t
+ }];
+ }
+ }
+ var i = h0(n.parser, r, Ba(n.envName)), s = Math.max(0, ...i.body.map((l) => l.length));
+ return i.cols = new Array(s).fill({
+ type: "align",
+ align: t
+ }), e ? {
+ type: "leftright",
+ mode: n.mode,
+ body: [i],
+ left: e[0],
+ right: e[1],
+ rightColor: void 0
+ // \right uninfluenced by \color in array
+ } : i;
+ },
+ htmlBuilder: Pt,
+ mathmlBuilder: Ht
+});
+Ot({
+ type: "array",
+ names: ["smallmatrix"],
+ props: {
+ numArgs: 0
+ },
+ handler(n) {
+ var e = {
+ arraystretch: 0.5
+ }, t = h0(n.parser, e, "script");
+ return t.colSeparationType = "small", t;
+ },
+ htmlBuilder: Pt,
+ mathmlBuilder: Ht
+});
+Ot({
+ type: "array",
+ names: ["subarray"],
+ props: {
+ numArgs: 1
+ },
+ handler(n, e) {
+ var t = un(e[0]), r = t ? [e[0]] : re(e[0], "ordgroup").body, a = r.map(function(s) {
+ var l = Fa(s), u = l.text;
+ if ("lc".indexOf(u) !== -1)
+ return {
+ type: "align",
+ align: u
+ };
+ throw new W("Unknown column alignment: " + u, s);
+ });
+ if (a.length > 1)
+ throw new W("{subarray} can contain only one column");
+ var i = {
+ cols: a,
+ hskipBeforeAndAfter: !1,
+ arraystretch: 0.5
+ };
+ if (i = h0(n.parser, i, "script"), i.body.length > 0 && i.body[0].length > 1)
+ throw new W("{subarray} can contain only one column");
+ return i;
+ },
+ htmlBuilder: Pt,
+ mathmlBuilder: Ht
+});
+Ot({
+ type: "array",
+ names: ["cases", "dcases", "rcases", "drcases"],
+ props: {
+ numArgs: 0
+ },
+ handler(n) {
+ var e = {
+ arraystretch: 1.2,
+ cols: [{
+ type: "align",
+ align: "l",
+ pregap: 0,
+ // TODO(kevinb) get the current style.
+ // For now we use the metrics for TEXT style which is what we were
+ // doing before. Before attempting to get the current style we
+ // should look at TeX's behavior especially for \over and matrices.
+ postgap: 1
+ /* 1em quad */
+ }, {
+ type: "align",
+ align: "l",
+ pregap: 0,
+ postgap: 0
+ }]
+ }, t = h0(n.parser, e, Ba(n.envName));
+ return {
+ type: "leftright",
+ mode: n.mode,
+ body: [t],
+ left: n.envName.indexOf("r") > -1 ? "." : "\\{",
+ right: n.envName.indexOf("r") > -1 ? "\\}" : ".",
+ rightColor: void 0
+ };
+ },
+ htmlBuilder: Pt,
+ mathmlBuilder: Ht
+});
+Ot({
+ type: "array",
+ names: ["align", "align*", "aligned", "split"],
+ props: {
+ numArgs: 0
+ },
+ handler: Jl,
+ htmlBuilder: Pt,
+ mathmlBuilder: Ht
+});
+Ot({
+ type: "array",
+ names: ["gathered", "gather", "gather*"],
+ props: {
+ numArgs: 0
+ },
+ handler(n) {
+ Z.contains(["gather", "gather*"], n.envName) && dn(n);
+ var e = {
+ cols: [{
+ type: "align",
+ align: "c"
+ }],
+ addJot: !0,
+ colSeparationType: "gather",
+ autoTag: za(n.envName),
+ emptySingleRow: !0,
+ leqno: n.parser.settings.leqno
+ };
+ return h0(n.parser, e, "display");
+ },
+ htmlBuilder: Pt,
+ mathmlBuilder: Ht
+});
+Ot({
+ type: "array",
+ names: ["alignat", "alignat*", "alignedat"],
+ props: {
+ numArgs: 1
+ },
+ handler: Jl,
+ htmlBuilder: Pt,
+ mathmlBuilder: Ht
+});
+Ot({
+ type: "array",
+ names: ["equation", "equation*"],
+ props: {
+ numArgs: 0
+ },
+ handler(n) {
+ dn(n);
+ var e = {
+ autoTag: za(n.envName),
+ emptySingleRow: !0,
+ singleRow: !0,
+ maxNumCols: 1,
+ leqno: n.parser.settings.leqno
+ };
+ return h0(n.parser, e, "display");
+ },
+ htmlBuilder: Pt,
+ mathmlBuilder: Ht
+});
+Ot({
+ type: "array",
+ names: ["CD"],
+ props: {
+ numArgs: 0
+ },
+ handler(n) {
+ return dn(n), $c(n.parser);
+ },
+ htmlBuilder: Pt,
+ mathmlBuilder: Ht
+});
+g("\\nonumber", "\\gdef\\@eqnsw{0}");
+g("\\notag", "\\nonumber");
+H({
+ type: "text",
+ // Doesn't matter what this is.
+ names: ["\\hline", "\\hdashline"],
+ props: {
+ numArgs: 0,
+ allowedInText: !0,
+ allowedInMath: !0
+ },
+ handler(n, e) {
+ throw new W(n.funcName + " valid only within array environment");
+ }
+});
+var Ki = Ql;
+H({
+ type: "environment",
+ names: ["\\begin", "\\end"],
+ props: {
+ numArgs: 1,
+ argTypes: ["text"]
+ },
+ handler(n, e) {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[0];
+ if (a.type !== "ordgroup")
+ throw new W("Invalid environment name", a);
+ for (var i = "", s = 0; s < a.body.length; ++s)
+ i += re(a.body[s], "textord").text;
+ if (r === "\\begin") {
+ if (!Ki.hasOwnProperty(i))
+ throw new W("No such environment: " + i, a);
+ var l = Ki[i], {
+ args: u,
+ optArgs: h
+ } = t.parseArguments("\\begin{" + i + "}", l), d = {
+ mode: t.mode,
+ envName: i,
+ parser: t
+ }, f = l.handler(d, u, h);
+ t.expect("\\end", !1);
+ var p = t.nextToken, v = re(t.parseFunction(), "environment");
+ if (v.name !== i)
+ throw new W("Mismatch: \\begin{" + i + "} matched by \\end{" + v.name + "}", p);
+ return f;
+ }
+ return {
+ type: "environment",
+ mode: t.mode,
+ name: i,
+ nameGroup: a
+ };
+ }
+});
+var eo = (n, e) => {
+ var t = n.font, r = e.withFont(t);
+ return ie(n.body, r);
+}, to = (n, e) => {
+ var t = n.font, r = e.withFont(t);
+ return me(n.body, r);
+}, Qi = {
+ "\\Bbb": "\\mathbb",
+ "\\bold": "\\mathbf",
+ "\\frak": "\\mathfrak",
+ "\\bm": "\\boldsymbol"
+};
+H({
+ type: "font",
+ names: [
+ // styles, except \boldsymbol defined below
+ "\\mathrm",
+ "\\mathit",
+ "\\mathbf",
+ "\\mathnormal",
+ "\\mathsfit",
+ // families
+ "\\mathbb",
+ "\\mathcal",
+ "\\mathfrak",
+ "\\mathscr",
+ "\\mathsf",
+ "\\mathtt",
+ // aliases, except \bm defined below
+ "\\Bbb",
+ "\\bold",
+ "\\frak"
+ ],
+ props: {
+ numArgs: 1,
+ allowedInArgument: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = Xr(e[0]), i = r;
+ return i in Qi && (i = Qi[i]), {
+ type: "font",
+ mode: t.mode,
+ font: i.slice(1),
+ body: a
+ };
+ },
+ htmlBuilder: eo,
+ mathmlBuilder: to
+});
+H({
+ type: "mclass",
+ names: ["\\boldsymbol", "\\bm"],
+ props: {
+ numArgs: 1
+ },
+ handler: (n, e) => {
+ var {
+ parser: t
+ } = n, r = e[0], a = Z.isCharacterBox(r);
+ return {
+ type: "mclass",
+ mode: t.mode,
+ mclass: cn(r),
+ body: [{
+ type: "font",
+ mode: t.mode,
+ font: "boldsymbol",
+ body: r
+ }],
+ isCharacterBox: a
+ };
+ }
+});
+H({
+ type: "font",
+ names: ["\\rm", "\\sf", "\\tt", "\\bf", "\\it", "\\cal"],
+ props: {
+ numArgs: 0,
+ allowedInText: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t,
+ funcName: r,
+ breakOnTokenText: a
+ } = n, {
+ mode: i
+ } = t, s = t.parseExpression(!0, a), l = "math" + r.slice(1);
+ return {
+ type: "font",
+ mode: i,
+ font: l,
+ body: {
+ type: "ordgroup",
+ mode: t.mode,
+ body: s
+ }
+ };
+ },
+ htmlBuilder: eo,
+ mathmlBuilder: to
+});
+var ro = (n, e) => {
+ var t = e;
+ return n === "display" ? t = t.id >= Q.SCRIPT.id ? t.text() : Q.DISPLAY : n === "text" && t.size === Q.DISPLAY.size ? t = Q.TEXT : n === "script" ? t = Q.SCRIPT : n === "scriptscript" && (t = Q.SCRIPTSCRIPT), t;
+}, Ra = (n, e) => {
+ var t = ro(n.size, e.style), r = t.fracNum(), a = t.fracDen(), i;
+ i = e.havingStyle(r);
+ var s = ie(n.numer, i, e);
+ if (n.continued) {
+ var l = 8.5 / e.fontMetrics().ptPerEm, u = 3.5 / e.fontMetrics().ptPerEm;
+ s.height = s.height < l ? l : s.height, s.depth = s.depth < u ? u : s.depth;
+ }
+ i = e.havingStyle(a);
+ var h = ie(n.denom, i, e), d, f, p;
+ n.hasBarLine ? (n.barSize ? (f = we(n.barSize, e), d = F.makeLineSpan("frac-line", e, f)) : d = F.makeLineSpan("frac-line", e), f = d.height, p = d.height) : (d = null, f = 0, p = e.fontMetrics().defaultRuleThickness);
+ var v, w, D;
+ t.size === Q.DISPLAY.size || n.size === "display" ? (v = e.fontMetrics().num1, f > 0 ? w = 3 * p : w = 7 * p, D = e.fontMetrics().denom1) : (f > 0 ? (v = e.fontMetrics().num2, w = p) : (v = e.fontMetrics().num3, w = 3 * p), D = e.fontMetrics().denom2);
+ var C;
+ if (d) {
+ var k = e.fontMetrics().axisHeight;
+ v - s.depth - (k + 0.5 * f) < w && (v += w - (v - s.depth - (k + 0.5 * f))), k - 0.5 * f - (h.height - D) < w && (D += w - (k - 0.5 * f - (h.height - D)));
+ var _ = -(k - 0.5 * f);
+ C = F.makeVList({
+ positionType: "individualShift",
+ children: [{
+ type: "elem",
+ elem: h,
+ shift: D
+ }, {
+ type: "elem",
+ elem: d,
+ shift: _
+ }, {
+ type: "elem",
+ elem: s,
+ shift: -v
+ }]
+ }, e);
+ } else {
+ var $ = v - s.depth - (h.height - D);
+ $ < w && (v += 0.5 * (w - $), D += 0.5 * (w - $)), C = F.makeVList({
+ positionType: "individualShift",
+ children: [{
+ type: "elem",
+ elem: h,
+ shift: D
+ }, {
+ type: "elem",
+ elem: s,
+ shift: -v
+ }]
+ }, e);
+ }
+ i = e.havingStyle(t), C.height *= i.sizeMultiplier / e.sizeMultiplier, C.depth *= i.sizeMultiplier / e.sizeMultiplier;
+ var A;
+ t.size === Q.DISPLAY.size ? A = e.fontMetrics().delim1 : t.size === Q.SCRIPTSCRIPT.size ? A = e.havingStyle(Q.SCRIPT).fontMetrics().delim2 : A = e.fontMetrics().delim2;
+ var E, M;
+ return n.leftDelim == null ? E = ur(e, ["mopen"]) : E = e0.customSizedDelim(n.leftDelim, A, !0, e.havingStyle(t), n.mode, ["mopen"]), n.continued ? M = F.makeSpan([]) : n.rightDelim == null ? M = ur(e, ["mclose"]) : M = e0.customSizedDelim(n.rightDelim, A, !0, e.havingStyle(t), n.mode, ["mclose"]), F.makeSpan(["mord"].concat(i.sizingClasses(e)), [E, F.makeSpan(["mfrac"], [C]), M], e);
+}, qa = (n, e) => {
+ var t = new q.MathNode("mfrac", [me(n.numer, e), me(n.denom, e)]);
+ if (!n.hasBarLine)
+ t.setAttribute("linethickness", "0px");
+ else if (n.barSize) {
+ var r = we(n.barSize, e);
+ t.setAttribute("linethickness", O(r));
+ }
+ var a = ro(n.size, e.style);
+ if (a.size !== e.style.size) {
+ t = new q.MathNode("mstyle", [t]);
+ var i = a.size === Q.DISPLAY.size ? "true" : "false";
+ t.setAttribute("displaystyle", i), t.setAttribute("scriptlevel", "0");
+ }
+ if (n.leftDelim != null || n.rightDelim != null) {
+ var s = [];
+ if (n.leftDelim != null) {
+ var l = new q.MathNode("mo", [new q.TextNode(n.leftDelim.replace("\\", ""))]);
+ l.setAttribute("fence", "true"), s.push(l);
+ }
+ if (s.push(t), n.rightDelim != null) {
+ var u = new q.MathNode("mo", [new q.TextNode(n.rightDelim.replace("\\", ""))]);
+ u.setAttribute("fence", "true"), s.push(u);
+ }
+ return Aa(s);
+ }
+ return t;
+};
+H({
+ type: "genfrac",
+ names: [
+ "\\dfrac",
+ "\\frac",
+ "\\tfrac",
+ "\\dbinom",
+ "\\binom",
+ "\\tbinom",
+ "\\\\atopfrac",
+ // can’t be entered directly
+ "\\\\bracefrac",
+ "\\\\brackfrac"
+ // ditto
+ ],
+ props: {
+ numArgs: 2,
+ allowedInArgument: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[0], i = e[1], s, l = null, u = null, h = "auto";
+ switch (r) {
+ case "\\dfrac":
+ case "\\frac":
+ case "\\tfrac":
+ s = !0;
+ break;
+ case "\\\\atopfrac":
+ s = !1;
+ break;
+ case "\\dbinom":
+ case "\\binom":
+ case "\\tbinom":
+ s = !1, l = "(", u = ")";
+ break;
+ case "\\\\bracefrac":
+ s = !1, l = "\\{", u = "\\}";
+ break;
+ case "\\\\brackfrac":
+ s = !1, l = "[", u = "]";
+ break;
+ default:
+ throw new Error("Unrecognized genfrac command");
+ }
+ switch (r) {
+ case "\\dfrac":
+ case "\\dbinom":
+ h = "display";
+ break;
+ case "\\tfrac":
+ case "\\tbinom":
+ h = "text";
+ break;
+ }
+ return {
+ type: "genfrac",
+ mode: t.mode,
+ continued: !1,
+ numer: a,
+ denom: i,
+ hasBarLine: s,
+ leftDelim: l,
+ rightDelim: u,
+ size: h,
+ barSize: null
+ };
+ },
+ htmlBuilder: Ra,
+ mathmlBuilder: qa
+});
+H({
+ type: "genfrac",
+ names: ["\\cfrac"],
+ props: {
+ numArgs: 2
+ },
+ handler: (n, e) => {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[0], i = e[1];
+ return {
+ type: "genfrac",
+ mode: t.mode,
+ continued: !0,
+ numer: a,
+ denom: i,
+ hasBarLine: !0,
+ leftDelim: null,
+ rightDelim: null,
+ size: "display",
+ barSize: null
+ };
+ }
+});
+H({
+ type: "infix",
+ names: ["\\over", "\\choose", "\\atop", "\\brace", "\\brack"],
+ props: {
+ numArgs: 0,
+ infix: !0
+ },
+ handler(n) {
+ var {
+ parser: e,
+ funcName: t,
+ token: r
+ } = n, a;
+ switch (t) {
+ case "\\over":
+ a = "\\frac";
+ break;
+ case "\\choose":
+ a = "\\binom";
+ break;
+ case "\\atop":
+ a = "\\\\atopfrac";
+ break;
+ case "\\brace":
+ a = "\\\\bracefrac";
+ break;
+ case "\\brack":
+ a = "\\\\brackfrac";
+ break;
+ default:
+ throw new Error("Unrecognized infix genfrac command");
+ }
+ return {
+ type: "infix",
+ mode: e.mode,
+ replaceWith: a,
+ token: r
+ };
+ }
+});
+var Ji = ["display", "text", "script", "scriptscript"], es = function(e) {
+ var t = null;
+ return e.length > 0 && (t = e, t = t === "." ? null : t), t;
+};
+H({
+ type: "genfrac",
+ names: ["\\genfrac"],
+ props: {
+ numArgs: 6,
+ allowedInArgument: !0,
+ argTypes: ["math", "math", "size", "text", "math", "math"]
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n, r = e[4], a = e[5], i = Xr(e[0]), s = i.type === "atom" && i.family === "open" ? es(i.text) : null, l = Xr(e[1]), u = l.type === "atom" && l.family === "close" ? es(l.text) : null, h = re(e[2], "size"), d, f = null;
+ h.isBlank ? d = !0 : (f = h.value, d = f.number > 0);
+ var p = "auto", v = e[3];
+ if (v.type === "ordgroup") {
+ if (v.body.length > 0) {
+ var w = re(v.body[0], "textord");
+ p = Ji[Number(w.text)];
+ }
+ } else
+ v = re(v, "textord"), p = Ji[Number(v.text)];
+ return {
+ type: "genfrac",
+ mode: t.mode,
+ numer: r,
+ denom: a,
+ continued: !1,
+ hasBarLine: d,
+ barSize: f,
+ leftDelim: s,
+ rightDelim: u,
+ size: p
+ };
+ },
+ htmlBuilder: Ra,
+ mathmlBuilder: qa
+});
+H({
+ type: "infix",
+ names: ["\\above"],
+ props: {
+ numArgs: 1,
+ argTypes: ["size"],
+ infix: !0
+ },
+ handler(n, e) {
+ var {
+ parser: t,
+ funcName: r,
+ token: a
+ } = n;
+ return {
+ type: "infix",
+ mode: t.mode,
+ replaceWith: "\\\\abovefrac",
+ size: re(e[0], "size").value,
+ token: a
+ };
+ }
+});
+H({
+ type: "genfrac",
+ names: ["\\\\abovefrac"],
+ props: {
+ numArgs: 3,
+ argTypes: ["math", "size", "math"]
+ },
+ handler: (n, e) => {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[0], i = A1(re(e[1], "infix").size), s = e[2], l = i.number > 0;
+ return {
+ type: "genfrac",
+ mode: t.mode,
+ numer: a,
+ denom: s,
+ continued: !1,
+ hasBarLine: l,
+ barSize: i,
+ leftDelim: null,
+ rightDelim: null,
+ size: "auto"
+ };
+ },
+ htmlBuilder: Ra,
+ mathmlBuilder: qa
+});
+var no = (n, e) => {
+ var t = e.style, r, a;
+ n.type === "supsub" ? (r = n.sup ? ie(n.sup, e.havingStyle(t.sup()), e) : ie(n.sub, e.havingStyle(t.sub()), e), a = re(n.base, "horizBrace")) : a = re(n, "horizBrace");
+ var i = ie(a.base, e.havingBaseStyle(Q.DISPLAY)), s = t0.svgSpan(a, e), l;
+ if (a.isOver ? (l = F.makeVList({
+ positionType: "firstBaseline",
+ children: [{
+ type: "elem",
+ elem: i
+ }, {
+ type: "kern",
+ size: 0.1
+ }, {
+ type: "elem",
+ elem: s
+ }]
+ }, e), l.children[0].children[0].children[1].classes.push("svg-align")) : (l = F.makeVList({
+ positionType: "bottom",
+ positionData: i.depth + 0.1 + s.height,
+ children: [{
+ type: "elem",
+ elem: s
+ }, {
+ type: "kern",
+ size: 0.1
+ }, {
+ type: "elem",
+ elem: i
+ }]
+ }, e), l.children[0].children[0].children[0].classes.push("svg-align")), r) {
+ var u = F.makeSpan(["mord", a.isOver ? "mover" : "munder"], [l], e);
+ a.isOver ? l = F.makeVList({
+ positionType: "firstBaseline",
+ children: [{
+ type: "elem",
+ elem: u
+ }, {
+ type: "kern",
+ size: 0.2
+ }, {
+ type: "elem",
+ elem: r
+ }]
+ }, e) : l = F.makeVList({
+ positionType: "bottom",
+ positionData: u.depth + 0.2 + r.height + r.depth,
+ children: [{
+ type: "elem",
+ elem: r
+ }, {
+ type: "kern",
+ size: 0.2
+ }, {
+ type: "elem",
+ elem: u
+ }]
+ }, e);
+ }
+ return F.makeSpan(["mord", a.isOver ? "mover" : "munder"], [l], e);
+}, Wc = (n, e) => {
+ var t = t0.mathMLnode(n.label);
+ return new q.MathNode(n.isOver ? "mover" : "munder", [me(n.base, e), t]);
+};
+H({
+ type: "horizBrace",
+ names: ["\\overbrace", "\\underbrace"],
+ props: {
+ numArgs: 1
+ },
+ handler(n, e) {
+ var {
+ parser: t,
+ funcName: r
+ } = n;
+ return {
+ type: "horizBrace",
+ mode: t.mode,
+ label: r,
+ isOver: /^\\over/.test(r),
+ base: e[0]
+ };
+ },
+ htmlBuilder: no,
+ mathmlBuilder: Wc
+});
+H({
+ type: "href",
+ names: ["\\href"],
+ props: {
+ numArgs: 2,
+ argTypes: ["url", "original"],
+ allowedInText: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t
+ } = n, r = e[1], a = re(e[0], "url").url;
+ return t.settings.isTrusted({
+ command: "\\href",
+ url: a
+ }) ? {
+ type: "href",
+ mode: t.mode,
+ href: a,
+ body: Ce(r)
+ } : t.formatUnsupportedCmd("\\href");
+ },
+ htmlBuilder: (n, e) => {
+ var t = Ie(n.body, e, !1);
+ return F.makeAnchor(n.href, [], t, e);
+ },
+ mathmlBuilder: (n, e) => {
+ var t = c0(n.body, e);
+ return t instanceof st || (t = new st("mrow", [t])), t.setAttribute("href", n.href), t;
+ }
+});
+H({
+ type: "href",
+ names: ["\\url"],
+ props: {
+ numArgs: 1,
+ argTypes: ["url"],
+ allowedInText: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t
+ } = n, r = re(e[0], "url").url;
+ if (!t.settings.isTrusted({
+ command: "\\url",
+ url: r
+ }))
+ return t.formatUnsupportedCmd("\\url");
+ for (var a = [], i = 0; i < r.length; i++) {
+ var s = r[i];
+ s === "~" && (s = "\\textasciitilde"), a.push({
+ type: "textord",
+ mode: "text",
+ text: s
+ });
+ }
+ var l = {
+ type: "text",
+ mode: t.mode,
+ font: "\\texttt",
+ body: a
+ };
+ return {
+ type: "href",
+ mode: t.mode,
+ href: r,
+ body: Ce(l)
+ };
+ }
+});
+H({
+ type: "hbox",
+ names: ["\\hbox"],
+ props: {
+ numArgs: 1,
+ argTypes: ["text"],
+ allowedInText: !0,
+ primitive: !0
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n;
+ return {
+ type: "hbox",
+ mode: t.mode,
+ body: Ce(e[0])
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = Ie(n.body, e, !1);
+ return F.makeFragment(t);
+ },
+ mathmlBuilder(n, e) {
+ return new q.MathNode("mrow", nt(n.body, e));
+ }
+});
+H({
+ type: "html",
+ names: ["\\htmlClass", "\\htmlId", "\\htmlStyle", "\\htmlData"],
+ props: {
+ numArgs: 2,
+ argTypes: ["raw", "original"],
+ allowedInText: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t,
+ funcName: r,
+ token: a
+ } = n, i = re(e[0], "raw").string, s = e[1];
+ t.settings.strict && t.settings.reportNonstrict("htmlExtension", "HTML extension is disabled on strict mode");
+ var l, u = {};
+ switch (r) {
+ case "\\htmlClass":
+ u.class = i, l = {
+ command: "\\htmlClass",
+ class: i
+ };
+ break;
+ case "\\htmlId":
+ u.id = i, l = {
+ command: "\\htmlId",
+ id: i
+ };
+ break;
+ case "\\htmlStyle":
+ u.style = i, l = {
+ command: "\\htmlStyle",
+ style: i
+ };
+ break;
+ case "\\htmlData": {
+ for (var h = i.split(","), d = 0; d < h.length; d++) {
+ var f = h[d].split("=");
+ if (f.length !== 2)
+ throw new W("Error parsing key-value for \\htmlData");
+ u["data-" + f[0].trim()] = f[1].trim();
+ }
+ l = {
+ command: "\\htmlData",
+ attributes: u
+ };
+ break;
+ }
+ default:
+ throw new Error("Unrecognized html command");
+ }
+ return t.settings.isTrusted(l) ? {
+ type: "html",
+ mode: t.mode,
+ attributes: u,
+ body: Ce(s)
+ } : t.formatUnsupportedCmd(r);
+ },
+ htmlBuilder: (n, e) => {
+ var t = Ie(n.body, e, !1), r = ["enclosing"];
+ n.attributes.class && r.push(...n.attributes.class.trim().split(/\s+/));
+ var a = F.makeSpan(r, t, e);
+ for (var i in n.attributes)
+ i !== "class" && n.attributes.hasOwnProperty(i) && a.setAttribute(i, n.attributes[i]);
+ return a;
+ },
+ mathmlBuilder: (n, e) => c0(n.body, e)
+});
+H({
+ type: "htmlmathml",
+ names: ["\\html@mathml"],
+ props: {
+ numArgs: 2,
+ allowedInText: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t
+ } = n;
+ return {
+ type: "htmlmathml",
+ mode: t.mode,
+ html: Ce(e[0]),
+ mathml: Ce(e[1])
+ };
+ },
+ htmlBuilder: (n, e) => {
+ var t = Ie(n.html, e, !1);
+ return F.makeFragment(t);
+ },
+ mathmlBuilder: (n, e) => c0(n.mathml, e)
+});
+var Bn = function(e) {
+ if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))
+ return {
+ number: +e,
+ unit: "bp"
+ };
+ var t = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);
+ if (!t)
+ throw new W("Invalid size: '" + e + "' in \\includegraphics");
+ var r = {
+ number: +(t[1] + t[2]),
+ // sign + magnitude, cast to number
+ unit: t[3]
+ };
+ if (!W1(r))
+ throw new W("Invalid unit: '" + r.unit + "' in \\includegraphics.");
+ return r;
+};
+H({
+ type: "includegraphics",
+ names: ["\\includegraphics"],
+ props: {
+ numArgs: 1,
+ numOptionalArgs: 1,
+ argTypes: ["raw", "url"],
+ allowedInText: !1
+ },
+ handler: (n, e, t) => {
+ var {
+ parser: r
+ } = n, a = {
+ number: 0,
+ unit: "em"
+ }, i = {
+ number: 0.9,
+ unit: "em"
+ }, s = {
+ number: 0,
+ unit: "em"
+ }, l = "";
+ if (t[0])
+ for (var u = re(t[0], "raw").string, h = u.split(","), d = 0; d < h.length; d++) {
+ var f = h[d].split("=");
+ if (f.length === 2) {
+ var p = f[1].trim();
+ switch (f[0].trim()) {
+ case "alt":
+ l = p;
+ break;
+ case "width":
+ a = Bn(p);
+ break;
+ case "height":
+ i = Bn(p);
+ break;
+ case "totalheight":
+ s = Bn(p);
+ break;
+ default:
+ throw new W("Invalid key: '" + f[0] + "' in \\includegraphics.");
+ }
+ }
+ }
+ var v = re(e[0], "url").url;
+ return l === "" && (l = v, l = l.replace(/^.*[\\/]/, ""), l = l.substring(0, l.lastIndexOf("."))), r.settings.isTrusted({
+ command: "\\includegraphics",
+ url: v
+ }) ? {
+ type: "includegraphics",
+ mode: r.mode,
+ alt: l,
+ width: a,
+ height: i,
+ totalheight: s,
+ src: v
+ } : r.formatUnsupportedCmd("\\includegraphics");
+ },
+ htmlBuilder: (n, e) => {
+ var t = we(n.height, e), r = 0;
+ n.totalheight.number > 0 && (r = we(n.totalheight, e) - t);
+ var a = 0;
+ n.width.number > 0 && (a = we(n.width, e));
+ var i = {
+ height: O(t + r)
+ };
+ a > 0 && (i.width = O(a)), r > 0 && (i.verticalAlign = O(-r));
+ var s = new X1(n.src, n.alt, i);
+ return s.height = t, s.depth = r, s;
+ },
+ mathmlBuilder: (n, e) => {
+ var t = new q.MathNode("mglyph", []);
+ t.setAttribute("alt", n.alt);
+ var r = we(n.height, e), a = 0;
+ if (n.totalheight.number > 0 && (a = we(n.totalheight, e) - r, t.setAttribute("valign", O(-a))), t.setAttribute("height", O(r + a)), n.width.number > 0) {
+ var i = we(n.width, e);
+ t.setAttribute("width", O(i));
+ }
+ return t.setAttribute("src", n.src), t;
+ }
+});
+H({
+ type: "kern",
+ names: ["\\kern", "\\mkern", "\\hskip", "\\mskip"],
+ props: {
+ numArgs: 1,
+ argTypes: ["size"],
+ primitive: !0,
+ allowedInText: !0
+ },
+ handler(n, e) {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = re(e[0], "size");
+ if (t.settings.strict) {
+ var i = r[1] === "m", s = a.value.unit === "mu";
+ i ? (s || t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + r + " supports only mu units, " + ("not " + a.value.unit + " units")), t.mode !== "math" && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + r + " works only in math mode")) : s && t.settings.reportNonstrict("mathVsTextUnits", "LaTeX's " + r + " doesn't support mu units");
+ }
+ return {
+ type: "kern",
+ mode: t.mode,
+ dimension: a.value
+ };
+ },
+ htmlBuilder(n, e) {
+ return F.makeGlue(n.dimension, e);
+ },
+ mathmlBuilder(n, e) {
+ var t = we(n.dimension, e);
+ return new q.SpaceNode(t);
+ }
+});
+H({
+ type: "lap",
+ names: ["\\mathllap", "\\mathrlap", "\\mathclap"],
+ props: {
+ numArgs: 1,
+ allowedInText: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[0];
+ return {
+ type: "lap",
+ mode: t.mode,
+ alignment: r.slice(5),
+ body: a
+ };
+ },
+ htmlBuilder: (n, e) => {
+ var t;
+ n.alignment === "clap" ? (t = F.makeSpan([], [ie(n.body, e)]), t = F.makeSpan(["inner"], [t], e)) : t = F.makeSpan(["inner"], [ie(n.body, e)]);
+ var r = F.makeSpan(["fix"], []), a = F.makeSpan([n.alignment], [t, r], e), i = F.makeSpan(["strut"]);
+ return i.style.height = O(a.height + a.depth), a.depth && (i.style.verticalAlign = O(-a.depth)), a.children.unshift(i), a = F.makeSpan(["thinbox"], [a], e), F.makeSpan(["mord", "vbox"], [a], e);
+ },
+ mathmlBuilder: (n, e) => {
+ var t = new q.MathNode("mpadded", [me(n.body, e)]);
+ if (n.alignment !== "rlap") {
+ var r = n.alignment === "llap" ? "-1" : "-0.5";
+ t.setAttribute("lspace", r + "width");
+ }
+ return t.setAttribute("width", "0px"), t;
+ }
+});
+H({
+ type: "styling",
+ names: ["\\(", "$"],
+ props: {
+ numArgs: 0,
+ allowedInText: !0,
+ allowedInMath: !1
+ },
+ handler(n, e) {
+ var {
+ funcName: t,
+ parser: r
+ } = n, a = r.mode;
+ r.switchMode("math");
+ var i = t === "\\(" ? "\\)" : "$", s = r.parseExpression(!1, i);
+ return r.expect(i), r.switchMode(a), {
+ type: "styling",
+ mode: r.mode,
+ style: "text",
+ body: s
+ };
+ }
+});
+H({
+ type: "text",
+ // Doesn't matter what this is.
+ names: ["\\)", "\\]"],
+ props: {
+ numArgs: 0,
+ allowedInText: !0,
+ allowedInMath: !1
+ },
+ handler(n, e) {
+ throw new W("Mismatched " + n.funcName);
+ }
+});
+var ts = (n, e) => {
+ switch (e.style.size) {
+ case Q.DISPLAY.size:
+ return n.display;
+ case Q.TEXT.size:
+ return n.text;
+ case Q.SCRIPT.size:
+ return n.script;
+ case Q.SCRIPTSCRIPT.size:
+ return n.scriptscript;
+ default:
+ return n.text;
+ }
+};
+H({
+ type: "mathchoice",
+ names: ["\\mathchoice"],
+ props: {
+ numArgs: 4,
+ primitive: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t
+ } = n;
+ return {
+ type: "mathchoice",
+ mode: t.mode,
+ display: Ce(e[0]),
+ text: Ce(e[1]),
+ script: Ce(e[2]),
+ scriptscript: Ce(e[3])
+ };
+ },
+ htmlBuilder: (n, e) => {
+ var t = ts(n, e), r = Ie(t, e, !1);
+ return F.makeFragment(r);
+ },
+ mathmlBuilder: (n, e) => {
+ var t = ts(n, e);
+ return c0(t, e);
+ }
+});
+var ao = (n, e, t, r, a, i, s) => {
+ n = F.makeSpan([], [n]);
+ var l = t && Z.isCharacterBox(t), u, h;
+ if (e) {
+ var d = ie(e, r.havingStyle(a.sup()), r);
+ h = {
+ elem: d,
+ kern: Math.max(r.fontMetrics().bigOpSpacing1, r.fontMetrics().bigOpSpacing3 - d.depth)
+ };
+ }
+ if (t) {
+ var f = ie(t, r.havingStyle(a.sub()), r);
+ u = {
+ elem: f,
+ kern: Math.max(r.fontMetrics().bigOpSpacing2, r.fontMetrics().bigOpSpacing4 - f.height)
+ };
+ }
+ var p;
+ if (h && u) {
+ var v = r.fontMetrics().bigOpSpacing5 + u.elem.height + u.elem.depth + u.kern + n.depth + s;
+ p = F.makeVList({
+ positionType: "bottom",
+ positionData: v,
+ children: [{
+ type: "kern",
+ size: r.fontMetrics().bigOpSpacing5
+ }, {
+ type: "elem",
+ elem: u.elem,
+ marginLeft: O(-i)
+ }, {
+ type: "kern",
+ size: u.kern
+ }, {
+ type: "elem",
+ elem: n
+ }, {
+ type: "kern",
+ size: h.kern
+ }, {
+ type: "elem",
+ elem: h.elem,
+ marginLeft: O(i)
+ }, {
+ type: "kern",
+ size: r.fontMetrics().bigOpSpacing5
+ }]
+ }, r);
+ } else if (u) {
+ var w = n.height - s;
+ p = F.makeVList({
+ positionType: "top",
+ positionData: w,
+ children: [{
+ type: "kern",
+ size: r.fontMetrics().bigOpSpacing5
+ }, {
+ type: "elem",
+ elem: u.elem,
+ marginLeft: O(-i)
+ }, {
+ type: "kern",
+ size: u.kern
+ }, {
+ type: "elem",
+ elem: n
+ }]
+ }, r);
+ } else if (h) {
+ var D = n.depth + s;
+ p = F.makeVList({
+ positionType: "bottom",
+ positionData: D,
+ children: [{
+ type: "elem",
+ elem: n
+ }, {
+ type: "kern",
+ size: h.kern
+ }, {
+ type: "elem",
+ elem: h.elem,
+ marginLeft: O(i)
+ }, {
+ type: "kern",
+ size: r.fontMetrics().bigOpSpacing5
+ }]
+ }, r);
+ } else
+ return n;
+ var C = [p];
+ if (u && i !== 0 && !l) {
+ var $ = F.makeSpan(["mspace"], [], r);
+ $.style.marginRight = O(i), C.unshift($);
+ }
+ return F.makeSpan(["mop", "op-limits"], C, r);
+}, io = ["\\smallint"], U0 = (n, e) => {
+ var t, r, a = !1, i;
+ n.type === "supsub" ? (t = n.sup, r = n.sub, i = re(n.base, "op"), a = !0) : i = re(n, "op");
+ var s = e.style, l = !1;
+ s.size === Q.DISPLAY.size && i.symbol && !Z.contains(io, i.name) && (l = !0);
+ var u;
+ if (i.symbol) {
+ var h = l ? "Size2-Regular" : "Size1-Regular", d = "";
+ if ((i.name === "\\oiint" || i.name === "\\oiiint") && (d = i.name.slice(1), i.name = d === "oiint" ? "\\iint" : "\\iiint"), u = F.makeSymbol(i.name, h, "math", e, ["mop", "op-symbol", l ? "large-op" : "small-op"]), d.length > 0) {
+ var f = u.italic, p = F.staticSvg(d + "Size" + (l ? "2" : "1"), e);
+ u = F.makeVList({
+ positionType: "individualShift",
+ children: [{
+ type: "elem",
+ elem: u,
+ shift: 0
+ }, {
+ type: "elem",
+ elem: p,
+ shift: l ? 0.08 : 0
+ }]
+ }, e), i.name = "\\" + d, u.classes.unshift("mop"), u.italic = f;
+ }
+ } else if (i.body) {
+ var v = Ie(i.body, e, !0);
+ v.length === 1 && v[0] instanceof Lt ? (u = v[0], u.classes[0] = "mop") : u = F.makeSpan(["mop"], v, e);
+ } else {
+ for (var w = [], D = 1; D < i.name.length; D++)
+ w.push(F.mathsym(i.name[D], i.mode, e));
+ u = F.makeSpan(["mop"], w, e);
+ }
+ var C = 0, $ = 0;
+ return (u instanceof Lt || i.name === "\\oiint" || i.name === "\\oiiint") && !i.suppressBaseShift && (C = (u.height - u.depth) / 2 - e.fontMetrics().axisHeight, $ = u.italic), a ? ao(u, t, r, e, s, $, C) : (C && (u.style.position = "relative", u.style.top = O(C)), u);
+}, hr = (n, e) => {
+ var t;
+ if (n.symbol)
+ t = new st("mo", [ct(n.name, n.mode)]), Z.contains(io, n.name) && t.setAttribute("largeop", "false");
+ else if (n.body)
+ t = new st("mo", nt(n.body, e));
+ else {
+ t = new st("mi", [new Mt(n.name.slice(1))]);
+ var r = new st("mo", [ct("", "text")]);
+ n.parentIsSupSub ? t = new st("mrow", [t, r]) : t = ql([t, r]);
+ }
+ return t;
+}, Yc = {
+ "∏": "\\prod",
+ "∐": "\\coprod",
+ "∑": "\\sum",
+ "⋀": "\\bigwedge",
+ "⋁": "\\bigvee",
+ "⋂": "\\bigcap",
+ "⋃": "\\bigcup",
+ "⨀": "\\bigodot",
+ "⨁": "\\bigoplus",
+ "⨂": "\\bigotimes",
+ "⨄": "\\biguplus",
+ "⨆": "\\bigsqcup"
+};
+H({
+ type: "op",
+ names: ["\\coprod", "\\bigvee", "\\bigwedge", "\\biguplus", "\\bigcap", "\\bigcup", "\\intop", "\\prod", "\\sum", "\\bigotimes", "\\bigoplus", "\\bigodot", "\\bigsqcup", "\\smallint", "∏", "∐", "∑", "⋀", "⋁", "⋂", "⋃", "⨀", "⨁", "⨂", "⨄", "⨆"],
+ props: {
+ numArgs: 0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = r;
+ return a.length === 1 && (a = Yc[a]), {
+ type: "op",
+ mode: t.mode,
+ limits: !0,
+ parentIsSupSub: !1,
+ symbol: !0,
+ name: a
+ };
+ },
+ htmlBuilder: U0,
+ mathmlBuilder: hr
+});
+H({
+ type: "op",
+ names: ["\\mathop"],
+ props: {
+ numArgs: 1,
+ primitive: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t
+ } = n, r = e[0];
+ return {
+ type: "op",
+ mode: t.mode,
+ limits: !1,
+ parentIsSupSub: !1,
+ symbol: !1,
+ body: Ce(r)
+ };
+ },
+ htmlBuilder: U0,
+ mathmlBuilder: hr
+});
+var Xc = {
+ "∫": "\\int",
+ "∬": "\\iint",
+ "∭": "\\iiint",
+ "∮": "\\oint",
+ "∯": "\\oiint",
+ "∰": "\\oiiint"
+};
+H({
+ type: "op",
+ names: ["\\arcsin", "\\arccos", "\\arctan", "\\arctg", "\\arcctg", "\\arg", "\\ch", "\\cos", "\\cosec", "\\cosh", "\\cot", "\\cotg", "\\coth", "\\csc", "\\ctg", "\\cth", "\\deg", "\\dim", "\\exp", "\\hom", "\\ker", "\\lg", "\\ln", "\\log", "\\sec", "\\sin", "\\sinh", "\\sh", "\\tan", "\\tanh", "\\tg", "\\th"],
+ props: {
+ numArgs: 0
+ },
+ handler(n) {
+ var {
+ parser: e,
+ funcName: t
+ } = n;
+ return {
+ type: "op",
+ mode: e.mode,
+ limits: !1,
+ parentIsSupSub: !1,
+ symbol: !1,
+ name: t
+ };
+ },
+ htmlBuilder: U0,
+ mathmlBuilder: hr
+});
+H({
+ type: "op",
+ names: ["\\det", "\\gcd", "\\inf", "\\lim", "\\max", "\\min", "\\Pr", "\\sup"],
+ props: {
+ numArgs: 0
+ },
+ handler(n) {
+ var {
+ parser: e,
+ funcName: t
+ } = n;
+ return {
+ type: "op",
+ mode: e.mode,
+ limits: !0,
+ parentIsSupSub: !1,
+ symbol: !1,
+ name: t
+ };
+ },
+ htmlBuilder: U0,
+ mathmlBuilder: hr
+});
+H({
+ type: "op",
+ names: ["\\int", "\\iint", "\\iiint", "\\oint", "\\oiint", "\\oiiint", "∫", "∬", "∭", "∮", "∯", "∰"],
+ props: {
+ numArgs: 0
+ },
+ handler(n) {
+ var {
+ parser: e,
+ funcName: t
+ } = n, r = t;
+ return r.length === 1 && (r = Xc[r]), {
+ type: "op",
+ mode: e.mode,
+ limits: !1,
+ parentIsSupSub: !1,
+ symbol: !0,
+ name: r
+ };
+ },
+ htmlBuilder: U0,
+ mathmlBuilder: hr
+});
+var so = (n, e) => {
+ var t, r, a = !1, i;
+ n.type === "supsub" ? (t = n.sup, r = n.sub, i = re(n.base, "operatorname"), a = !0) : i = re(n, "operatorname");
+ var s;
+ if (i.body.length > 0) {
+ for (var l = i.body.map((f) => {
+ var p = f.text;
+ return typeof p == "string" ? {
+ type: "textord",
+ mode: f.mode,
+ text: p
+ } : f;
+ }), u = Ie(l, e.withFont("mathrm"), !0), h = 0; h < u.length; h++) {
+ var d = u[h];
+ d instanceof Lt && (d.text = d.text.replace(/\u2212/, "-").replace(/\u2217/, "*"));
+ }
+ s = F.makeSpan(["mop"], u, e);
+ } else
+ s = F.makeSpan(["mop"], [], e);
+ return a ? ao(s, t, r, e, e.style, 0, 0) : s;
+}, Zc = (n, e) => {
+ for (var t = nt(n.body, e.withFont("mathrm")), r = !0, a = 0; a < t.length; a++) {
+ var i = t[a];
+ if (!(i instanceof q.SpaceNode)) if (i instanceof q.MathNode)
+ switch (i.type) {
+ case "mi":
+ case "mn":
+ case "ms":
+ case "mspace":
+ case "mtext":
+ break;
+ case "mo": {
+ var s = i.children[0];
+ i.children.length === 1 && s instanceof q.TextNode ? s.text = s.text.replace(/\u2212/, "-").replace(/\u2217/, "*") : r = !1;
+ break;
+ }
+ default:
+ r = !1;
+ }
+ else
+ r = !1;
+ }
+ if (r) {
+ var l = t.map((d) => d.toText()).join("");
+ t = [new q.TextNode(l)];
+ }
+ var u = new q.MathNode("mi", t);
+ u.setAttribute("mathvariant", "normal");
+ var h = new q.MathNode("mo", [ct("", "text")]);
+ return n.parentIsSupSub ? new q.MathNode("mrow", [u, h]) : q.newDocumentFragment([u, h]);
+};
+H({
+ type: "operatorname",
+ names: ["\\operatorname@", "\\operatornamewithlimits"],
+ props: {
+ numArgs: 1
+ },
+ handler: (n, e) => {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[0];
+ return {
+ type: "operatorname",
+ mode: t.mode,
+ body: Ce(a),
+ alwaysHandleSupSub: r === "\\operatornamewithlimits",
+ limits: !1,
+ parentIsSupSub: !1
+ };
+ },
+ htmlBuilder: so,
+ mathmlBuilder: Zc
+});
+g("\\operatorname", "\\@ifstar\\operatornamewithlimits\\operatorname@");
+y0({
+ type: "ordgroup",
+ htmlBuilder(n, e) {
+ return n.semisimple ? F.makeFragment(Ie(n.body, e, !1)) : F.makeSpan(["mord"], Ie(n.body, e, !0), e);
+ },
+ mathmlBuilder(n, e) {
+ return c0(n.body, e, !0);
+ }
+});
+H({
+ type: "overline",
+ names: ["\\overline"],
+ props: {
+ numArgs: 1
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n, r = e[0];
+ return {
+ type: "overline",
+ mode: t.mode,
+ body: r
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = ie(n.body, e.havingCrampedStyle()), r = F.makeLineSpan("overline-line", e), a = e.fontMetrics().defaultRuleThickness, i = F.makeVList({
+ positionType: "firstBaseline",
+ children: [{
+ type: "elem",
+ elem: t
+ }, {
+ type: "kern",
+ size: 3 * a
+ }, {
+ type: "elem",
+ elem: r
+ }, {
+ type: "kern",
+ size: a
+ }]
+ }, e);
+ return F.makeSpan(["mord", "overline"], [i], e);
+ },
+ mathmlBuilder(n, e) {
+ var t = new q.MathNode("mo", [new q.TextNode("‾")]);
+ t.setAttribute("stretchy", "true");
+ var r = new q.MathNode("mover", [me(n.body, e), t]);
+ return r.setAttribute("accent", "true"), r;
+ }
+});
+H({
+ type: "phantom",
+ names: ["\\phantom"],
+ props: {
+ numArgs: 1,
+ allowedInText: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t
+ } = n, r = e[0];
+ return {
+ type: "phantom",
+ mode: t.mode,
+ body: Ce(r)
+ };
+ },
+ htmlBuilder: (n, e) => {
+ var t = Ie(n.body, e.withPhantom(), !1);
+ return F.makeFragment(t);
+ },
+ mathmlBuilder: (n, e) => {
+ var t = nt(n.body, e);
+ return new q.MathNode("mphantom", t);
+ }
+});
+H({
+ type: "hphantom",
+ names: ["\\hphantom"],
+ props: {
+ numArgs: 1,
+ allowedInText: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t
+ } = n, r = e[0];
+ return {
+ type: "hphantom",
+ mode: t.mode,
+ body: r
+ };
+ },
+ htmlBuilder: (n, e) => {
+ var t = F.makeSpan([], [ie(n.body, e.withPhantom())]);
+ if (t.height = 0, t.depth = 0, t.children)
+ for (var r = 0; r < t.children.length; r++)
+ t.children[r].height = 0, t.children[r].depth = 0;
+ return t = F.makeVList({
+ positionType: "firstBaseline",
+ children: [{
+ type: "elem",
+ elem: t
+ }]
+ }, e), F.makeSpan(["mord"], [t], e);
+ },
+ mathmlBuilder: (n, e) => {
+ var t = nt(Ce(n.body), e), r = new q.MathNode("mphantom", t), a = new q.MathNode("mpadded", [r]);
+ return a.setAttribute("height", "0px"), a.setAttribute("depth", "0px"), a;
+ }
+});
+H({
+ type: "vphantom",
+ names: ["\\vphantom"],
+ props: {
+ numArgs: 1,
+ allowedInText: !0
+ },
+ handler: (n, e) => {
+ var {
+ parser: t
+ } = n, r = e[0];
+ return {
+ type: "vphantom",
+ mode: t.mode,
+ body: r
+ };
+ },
+ htmlBuilder: (n, e) => {
+ var t = F.makeSpan(["inner"], [ie(n.body, e.withPhantom())]), r = F.makeSpan(["fix"], []);
+ return F.makeSpan(["mord", "rlap"], [t, r], e);
+ },
+ mathmlBuilder: (n, e) => {
+ var t = nt(Ce(n.body), e), r = new q.MathNode("mphantom", t), a = new q.MathNode("mpadded", [r]);
+ return a.setAttribute("width", "0px"), a;
+ }
+});
+H({
+ type: "raisebox",
+ names: ["\\raisebox"],
+ props: {
+ numArgs: 2,
+ argTypes: ["size", "hbox"],
+ allowedInText: !0
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n, r = re(e[0], "size").value, a = e[1];
+ return {
+ type: "raisebox",
+ mode: t.mode,
+ dy: r,
+ body: a
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = ie(n.body, e), r = we(n.dy, e);
+ return F.makeVList({
+ positionType: "shift",
+ positionData: -r,
+ children: [{
+ type: "elem",
+ elem: t
+ }]
+ }, e);
+ },
+ mathmlBuilder(n, e) {
+ var t = new q.MathNode("mpadded", [me(n.body, e)]), r = n.dy.number + n.dy.unit;
+ return t.setAttribute("voffset", r), t;
+ }
+});
+H({
+ type: "internal",
+ names: ["\\relax"],
+ props: {
+ numArgs: 0,
+ allowedInText: !0,
+ allowedInArgument: !0
+ },
+ handler(n) {
+ var {
+ parser: e
+ } = n;
+ return {
+ type: "internal",
+ mode: e.mode
+ };
+ }
+});
+H({
+ type: "rule",
+ names: ["\\rule"],
+ props: {
+ numArgs: 2,
+ numOptionalArgs: 1,
+ allowedInText: !0,
+ allowedInMath: !0,
+ argTypes: ["size", "size", "size"]
+ },
+ handler(n, e, t) {
+ var {
+ parser: r
+ } = n, a = t[0], i = re(e[0], "size"), s = re(e[1], "size");
+ return {
+ type: "rule",
+ mode: r.mode,
+ shift: a && re(a, "size").value,
+ width: i.value,
+ height: s.value
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = F.makeSpan(["mord", "rule"], [], e), r = we(n.width, e), a = we(n.height, e), i = n.shift ? we(n.shift, e) : 0;
+ return t.style.borderRightWidth = O(r), t.style.borderTopWidth = O(a), t.style.bottom = O(i), t.width = r, t.height = a + i, t.depth = -i, t.maxFontSize = a * 1.125 * e.sizeMultiplier, t;
+ },
+ mathmlBuilder(n, e) {
+ var t = we(n.width, e), r = we(n.height, e), a = n.shift ? we(n.shift, e) : 0, i = e.color && e.getColor() || "black", s = new q.MathNode("mspace");
+ s.setAttribute("mathbackground", i), s.setAttribute("width", O(t)), s.setAttribute("height", O(r));
+ var l = new q.MathNode("mpadded", [s]);
+ return a >= 0 ? l.setAttribute("height", O(a)) : (l.setAttribute("height", O(a)), l.setAttribute("depth", O(-a))), l.setAttribute("voffset", O(a)), l;
+ }
+});
+function lo(n, e, t) {
+ for (var r = Ie(n, e, !1), a = e.sizeMultiplier / t.sizeMultiplier, i = 0; i < r.length; i++) {
+ var s = r[i].classes.indexOf("sizing");
+ s < 0 ? Array.prototype.push.apply(r[i].classes, e.sizingClasses(t)) : r[i].classes[s + 1] === "reset-size" + e.size && (r[i].classes[s + 1] = "reset-size" + t.size), r[i].height *= a, r[i].depth *= a;
+ }
+ return F.makeFragment(r);
+}
+var rs = ["\\tiny", "\\sixptsize", "\\scriptsize", "\\footnotesize", "\\small", "\\normalsize", "\\large", "\\Large", "\\LARGE", "\\huge", "\\Huge"], Kc = (n, e) => {
+ var t = e.havingSize(n.size);
+ return lo(n.body, t, e);
+};
+H({
+ type: "sizing",
+ names: rs,
+ props: {
+ numArgs: 0,
+ allowedInText: !0
+ },
+ handler: (n, e) => {
+ var {
+ breakOnTokenText: t,
+ funcName: r,
+ parser: a
+ } = n, i = a.parseExpression(!1, t);
+ return {
+ type: "sizing",
+ mode: a.mode,
+ // Figure out what size to use based on the list of functions above
+ size: rs.indexOf(r) + 1,
+ body: i
+ };
+ },
+ htmlBuilder: Kc,
+ mathmlBuilder: (n, e) => {
+ var t = e.havingSize(n.size), r = nt(n.body, t), a = new q.MathNode("mstyle", r);
+ return a.setAttribute("mathsize", O(t.sizeMultiplier)), a;
+ }
+});
+H({
+ type: "smash",
+ names: ["\\smash"],
+ props: {
+ numArgs: 1,
+ numOptionalArgs: 1,
+ allowedInText: !0
+ },
+ handler: (n, e, t) => {
+ var {
+ parser: r
+ } = n, a = !1, i = !1, s = t[0] && re(t[0], "ordgroup");
+ if (s)
+ for (var l = "", u = 0; u < s.body.length; ++u) {
+ var h = s.body[u];
+ if (l = h.text, l === "t")
+ a = !0;
+ else if (l === "b")
+ i = !0;
+ else {
+ a = !1, i = !1;
+ break;
+ }
+ }
+ else
+ a = !0, i = !0;
+ var d = e[0];
+ return {
+ type: "smash",
+ mode: r.mode,
+ body: d,
+ smashHeight: a,
+ smashDepth: i
+ };
+ },
+ htmlBuilder: (n, e) => {
+ var t = F.makeSpan([], [ie(n.body, e)]);
+ if (!n.smashHeight && !n.smashDepth)
+ return t;
+ if (n.smashHeight && (t.height = 0, t.children))
+ for (var r = 0; r < t.children.length; r++)
+ t.children[r].height = 0;
+ if (n.smashDepth && (t.depth = 0, t.children))
+ for (var a = 0; a < t.children.length; a++)
+ t.children[a].depth = 0;
+ var i = F.makeVList({
+ positionType: "firstBaseline",
+ children: [{
+ type: "elem",
+ elem: t
+ }]
+ }, e);
+ return F.makeSpan(["mord"], [i], e);
+ },
+ mathmlBuilder: (n, e) => {
+ var t = new q.MathNode("mpadded", [me(n.body, e)]);
+ return n.smashHeight && t.setAttribute("height", "0px"), n.smashDepth && t.setAttribute("depth", "0px"), t;
+ }
+});
+H({
+ type: "sqrt",
+ names: ["\\sqrt"],
+ props: {
+ numArgs: 1,
+ numOptionalArgs: 1
+ },
+ handler(n, e, t) {
+ var {
+ parser: r
+ } = n, a = t[0], i = e[0];
+ return {
+ type: "sqrt",
+ mode: r.mode,
+ body: i,
+ index: a
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = ie(n.body, e.havingCrampedStyle());
+ t.height === 0 && (t.height = e.fontMetrics().xHeight), t = F.wrapFragment(t, e);
+ var r = e.fontMetrics(), a = r.defaultRuleThickness, i = a;
+ e.style.id < Q.TEXT.id && (i = e.fontMetrics().xHeight);
+ var s = a + i / 4, l = t.height + t.depth + s + a, {
+ span: u,
+ ruleWidth: h,
+ advanceWidth: d
+ } = e0.sqrtImage(l, e), f = u.height - h;
+ f > t.height + t.depth + s && (s = (s + f - t.height - t.depth) / 2);
+ var p = u.height - t.height - s - h;
+ t.style.paddingLeft = O(d);
+ var v = F.makeVList({
+ positionType: "firstBaseline",
+ children: [{
+ type: "elem",
+ elem: t,
+ wrapperClasses: ["svg-align"]
+ }, {
+ type: "kern",
+ size: -(t.height + p)
+ }, {
+ type: "elem",
+ elem: u
+ }, {
+ type: "kern",
+ size: h
+ }]
+ }, e);
+ if (n.index) {
+ var w = e.havingStyle(Q.SCRIPTSCRIPT), D = ie(n.index, w, e), C = 0.6 * (v.height - v.depth), $ = F.makeVList({
+ positionType: "shift",
+ positionData: -C,
+ children: [{
+ type: "elem",
+ elem: D
+ }]
+ }, e), k = F.makeSpan(["root"], [$]);
+ return F.makeSpan(["mord", "sqrt"], [k, v], e);
+ } else
+ return F.makeSpan(["mord", "sqrt"], [v], e);
+ },
+ mathmlBuilder(n, e) {
+ var {
+ body: t,
+ index: r
+ } = n;
+ return r ? new q.MathNode("mroot", [me(t, e), me(r, e)]) : new q.MathNode("msqrt", [me(t, e)]);
+ }
+});
+var ns = {
+ display: Q.DISPLAY,
+ text: Q.TEXT,
+ script: Q.SCRIPT,
+ scriptscript: Q.SCRIPTSCRIPT
+};
+H({
+ type: "styling",
+ names: ["\\displaystyle", "\\textstyle", "\\scriptstyle", "\\scriptscriptstyle"],
+ props: {
+ numArgs: 0,
+ allowedInText: !0,
+ primitive: !0
+ },
+ handler(n, e) {
+ var {
+ breakOnTokenText: t,
+ funcName: r,
+ parser: a
+ } = n, i = a.parseExpression(!0, t), s = r.slice(1, r.length - 5);
+ return {
+ type: "styling",
+ mode: a.mode,
+ // Figure out what style to use by pulling out the style from
+ // the function name
+ style: s,
+ body: i
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = ns[n.style], r = e.havingStyle(t).withFont("");
+ return lo(n.body, r, e);
+ },
+ mathmlBuilder(n, e) {
+ var t = ns[n.style], r = e.havingStyle(t), a = nt(n.body, r), i = new q.MathNode("mstyle", a), s = {
+ display: ["0", "true"],
+ text: ["0", "false"],
+ script: ["1", "false"],
+ scriptscript: ["2", "false"]
+ }, l = s[n.style];
+ return i.setAttribute("scriptlevel", l[0]), i.setAttribute("displaystyle", l[1]), i;
+ }
+});
+var Qc = function(e, t) {
+ var r = e.base;
+ if (r)
+ if (r.type === "op") {
+ var a = r.limits && (t.style.size === Q.DISPLAY.size || r.alwaysHandleSupSub);
+ return a ? U0 : null;
+ } else if (r.type === "operatorname") {
+ var i = r.alwaysHandleSupSub && (t.style.size === Q.DISPLAY.size || r.limits);
+ return i ? so : null;
+ } else {
+ if (r.type === "accent")
+ return Z.isCharacterBox(r.base) ? Ea : null;
+ if (r.type === "horizBrace") {
+ var s = !e.sub;
+ return s === r.isOver ? no : null;
+ } else
+ return null;
+ }
+ else return null;
+};
+y0({
+ type: "supsub",
+ htmlBuilder(n, e) {
+ var t = Qc(n, e);
+ if (t)
+ return t(n, e);
+ var {
+ base: r,
+ sup: a,
+ sub: i
+ } = n, s = ie(r, e), l, u, h = e.fontMetrics(), d = 0, f = 0, p = r && Z.isCharacterBox(r);
+ if (a) {
+ var v = e.havingStyle(e.style.sup());
+ l = ie(a, v, e), p || (d = s.height - v.fontMetrics().supDrop * v.sizeMultiplier / e.sizeMultiplier);
+ }
+ if (i) {
+ var w = e.havingStyle(e.style.sub());
+ u = ie(i, w, e), p || (f = s.depth + w.fontMetrics().subDrop * w.sizeMultiplier / e.sizeMultiplier);
+ }
+ var D;
+ e.style === Q.DISPLAY ? D = h.sup1 : e.style.cramped ? D = h.sup3 : D = h.sup2;
+ var C = e.sizeMultiplier, $ = O(0.5 / h.ptPerEm / C), k = null;
+ if (u) {
+ var _ = n.base && n.base.type === "op" && n.base.name && (n.base.name === "\\oiint" || n.base.name === "\\oiiint");
+ (s instanceof Lt || _) && (k = O(-s.italic));
+ }
+ var A;
+ if (l && u) {
+ d = Math.max(d, D, l.depth + 0.25 * h.xHeight), f = Math.max(f, h.sub2);
+ var E = h.defaultRuleThickness, M = 4 * E;
+ if (d - l.depth - (u.height - f) < M) {
+ f = M - (d - l.depth) + u.height;
+ var T = 0.8 * h.xHeight - (d - l.depth);
+ T > 0 && (d += T, f -= T);
+ }
+ var P = [{
+ type: "elem",
+ elem: u,
+ shift: f,
+ marginRight: $,
+ marginLeft: k
+ }, {
+ type: "elem",
+ elem: l,
+ shift: -d,
+ marginRight: $
+ }];
+ A = F.makeVList({
+ positionType: "individualShift",
+ children: P
+ }, e);
+ } else if (u) {
+ f = Math.max(f, h.sub1, u.height - 0.8 * h.xHeight);
+ var I = [{
+ type: "elem",
+ elem: u,
+ marginLeft: k,
+ marginRight: $
+ }];
+ A = F.makeVList({
+ positionType: "shift",
+ positionData: f,
+ children: I
+ }, e);
+ } else if (l)
+ d = Math.max(d, D, l.depth + 0.25 * h.xHeight), A = F.makeVList({
+ positionType: "shift",
+ positionData: -d,
+ children: [{
+ type: "elem",
+ elem: l,
+ marginRight: $
+ }]
+ }, e);
+ else
+ throw new Error("supsub must have either sup or sub.");
+ var K = aa(s, "right") || "mord";
+ return F.makeSpan([K], [s, F.makeSpan(["msupsub"], [A])], e);
+ },
+ mathmlBuilder(n, e) {
+ var t = !1, r, a;
+ n.base && n.base.type === "horizBrace" && (a = !!n.sup, a === n.base.isOver && (t = !0, r = n.base.isOver)), n.base && (n.base.type === "op" || n.base.type === "operatorname") && (n.base.parentIsSupSub = !0);
+ var i = [me(n.base, e)];
+ n.sub && i.push(me(n.sub, e)), n.sup && i.push(me(n.sup, e));
+ var s;
+ if (t)
+ s = r ? "mover" : "munder";
+ else if (n.sub)
+ if (n.sup) {
+ var h = n.base;
+ h && h.type === "op" && h.limits && e.style === Q.DISPLAY || h && h.type === "operatorname" && h.alwaysHandleSupSub && (e.style === Q.DISPLAY || h.limits) ? s = "munderover" : s = "msubsup";
+ } else {
+ var u = n.base;
+ u && u.type === "op" && u.limits && (e.style === Q.DISPLAY || u.alwaysHandleSupSub) || u && u.type === "operatorname" && u.alwaysHandleSupSub && (u.limits || e.style === Q.DISPLAY) ? s = "munder" : s = "msub";
+ }
+ else {
+ var l = n.base;
+ l && l.type === "op" && l.limits && (e.style === Q.DISPLAY || l.alwaysHandleSupSub) || l && l.type === "operatorname" && l.alwaysHandleSupSub && (l.limits || e.style === Q.DISPLAY) ? s = "mover" : s = "msup";
+ }
+ return new q.MathNode(s, i);
+ }
+});
+y0({
+ type: "atom",
+ htmlBuilder(n, e) {
+ return F.mathsym(n.text, n.mode, e, ["m" + n.family]);
+ },
+ mathmlBuilder(n, e) {
+ var t = new q.MathNode("mo", [ct(n.text, n.mode)]);
+ if (n.family === "bin") {
+ var r = Ca(n, e);
+ r === "bold-italic" && t.setAttribute("mathvariant", r);
+ } else n.family === "punct" ? t.setAttribute("separator", "true") : (n.family === "open" || n.family === "close") && t.setAttribute("stretchy", "false");
+ return t;
+ }
+});
+var oo = {
+ mi: "italic",
+ mn: "normal",
+ mtext: "normal"
+};
+y0({
+ type: "mathord",
+ htmlBuilder(n, e) {
+ return F.makeOrd(n, e, "mathord");
+ },
+ mathmlBuilder(n, e) {
+ var t = new q.MathNode("mi", [ct(n.text, n.mode, e)]), r = Ca(n, e) || "italic";
+ return r !== oo[t.type] && t.setAttribute("mathvariant", r), t;
+ }
+});
+y0({
+ type: "textord",
+ htmlBuilder(n, e) {
+ return F.makeOrd(n, e, "textord");
+ },
+ mathmlBuilder(n, e) {
+ var t = ct(n.text, n.mode, e), r = Ca(n, e) || "normal", a;
+ return n.mode === "text" ? a = new q.MathNode("mtext", [t]) : /[0-9]/.test(n.text) ? a = new q.MathNode("mn", [t]) : n.text === "\\prime" ? a = new q.MathNode("mo", [t]) : a = new q.MathNode("mi", [t]), r !== oo[a.type] && a.setAttribute("mathvariant", r), a;
+ }
+});
+var Rn = {
+ "\\nobreak": "nobreak",
+ "\\allowbreak": "allowbreak"
+}, qn = {
+ " ": {},
+ "\\ ": {},
+ "~": {
+ className: "nobreak"
+ },
+ "\\space": {},
+ "\\nobreakspace": {
+ className: "nobreak"
+ }
+};
+y0({
+ type: "spacing",
+ htmlBuilder(n, e) {
+ if (qn.hasOwnProperty(n.text)) {
+ var t = qn[n.text].className || "";
+ if (n.mode === "text") {
+ var r = F.makeOrd(n, e, "textord");
+ return r.classes.push(t), r;
+ } else
+ return F.makeSpan(["mspace", t], [F.mathsym(n.text, n.mode, e)], e);
+ } else {
+ if (Rn.hasOwnProperty(n.text))
+ return F.makeSpan(["mspace", Rn[n.text]], [], e);
+ throw new W('Unknown type of space "' + n.text + '"');
+ }
+ },
+ mathmlBuilder(n, e) {
+ var t;
+ if (qn.hasOwnProperty(n.text))
+ t = new q.MathNode("mtext", [new q.TextNode(" ")]);
+ else {
+ if (Rn.hasOwnProperty(n.text))
+ return new q.MathNode("mspace");
+ throw new W('Unknown type of space "' + n.text + '"');
+ }
+ return t;
+ }
+});
+var as = () => {
+ var n = new q.MathNode("mtd", []);
+ return n.setAttribute("width", "50%"), n;
+};
+y0({
+ type: "tag",
+ mathmlBuilder(n, e) {
+ var t = new q.MathNode("mtable", [new q.MathNode("mtr", [as(), new q.MathNode("mtd", [c0(n.body, e)]), as(), new q.MathNode("mtd", [c0(n.tag, e)])])]);
+ return t.setAttribute("width", "100%"), t;
+ }
+});
+var is = {
+ "\\text": void 0,
+ "\\textrm": "textrm",
+ "\\textsf": "textsf",
+ "\\texttt": "texttt",
+ "\\textnormal": "textrm"
+}, ss = {
+ "\\textbf": "textbf",
+ "\\textmd": "textmd"
+}, Jc = {
+ "\\textit": "textit",
+ "\\textup": "textup"
+}, ls = (n, e) => {
+ var t = n.font;
+ if (t) {
+ if (is[t])
+ return e.withTextFontFamily(is[t]);
+ if (ss[t])
+ return e.withTextFontWeight(ss[t]);
+ if (t === "\\emph")
+ return e.fontShape === "textit" ? e.withTextFontShape("textup") : e.withTextFontShape("textit");
+ } else return e;
+ return e.withTextFontShape(Jc[t]);
+};
+H({
+ type: "text",
+ names: [
+ // Font families
+ "\\text",
+ "\\textrm",
+ "\\textsf",
+ "\\texttt",
+ "\\textnormal",
+ // Font weights
+ "\\textbf",
+ "\\textmd",
+ // Font Shapes
+ "\\textit",
+ "\\textup",
+ "\\emph"
+ ],
+ props: {
+ numArgs: 1,
+ argTypes: ["text"],
+ allowedInArgument: !0,
+ allowedInText: !0
+ },
+ handler(n, e) {
+ var {
+ parser: t,
+ funcName: r
+ } = n, a = e[0];
+ return {
+ type: "text",
+ mode: t.mode,
+ body: Ce(a),
+ font: r
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = ls(n, e), r = Ie(n.body, t, !0);
+ return F.makeSpan(["mord", "text"], r, t);
+ },
+ mathmlBuilder(n, e) {
+ var t = ls(n, e);
+ return c0(n.body, t);
+ }
+});
+H({
+ type: "underline",
+ names: ["\\underline"],
+ props: {
+ numArgs: 1,
+ allowedInText: !0
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n;
+ return {
+ type: "underline",
+ mode: t.mode,
+ body: e[0]
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = ie(n.body, e), r = F.makeLineSpan("underline-line", e), a = e.fontMetrics().defaultRuleThickness, i = F.makeVList({
+ positionType: "top",
+ positionData: t.height,
+ children: [{
+ type: "kern",
+ size: a
+ }, {
+ type: "elem",
+ elem: r
+ }, {
+ type: "kern",
+ size: 3 * a
+ }, {
+ type: "elem",
+ elem: t
+ }]
+ }, e);
+ return F.makeSpan(["mord", "underline"], [i], e);
+ },
+ mathmlBuilder(n, e) {
+ var t = new q.MathNode("mo", [new q.TextNode("‾")]);
+ t.setAttribute("stretchy", "true");
+ var r = new q.MathNode("munder", [me(n.body, e), t]);
+ return r.setAttribute("accentunder", "true"), r;
+ }
+});
+H({
+ type: "vcenter",
+ names: ["\\vcenter"],
+ props: {
+ numArgs: 1,
+ argTypes: ["original"],
+ // In LaTeX, \vcenter can act only on a box.
+ allowedInText: !1
+ },
+ handler(n, e) {
+ var {
+ parser: t
+ } = n;
+ return {
+ type: "vcenter",
+ mode: t.mode,
+ body: e[0]
+ };
+ },
+ htmlBuilder(n, e) {
+ var t = ie(n.body, e), r = e.fontMetrics().axisHeight, a = 0.5 * (t.height - r - (t.depth + r));
+ return F.makeVList({
+ positionType: "shift",
+ positionData: a,
+ children: [{
+ type: "elem",
+ elem: t
+ }]
+ }, e);
+ },
+ mathmlBuilder(n, e) {
+ return new q.MathNode("mpadded", [me(n.body, e)], ["vcenter"]);
+ }
+});
+H({
+ type: "verb",
+ names: ["\\verb"],
+ props: {
+ numArgs: 0,
+ allowedInText: !0
+ },
+ handler(n, e, t) {
+ throw new W("\\verb ended by end of line instead of matching delimiter");
+ },
+ htmlBuilder(n, e) {
+ for (var t = os(n), r = [], a = e.havingStyle(e.style.text()), i = 0; i < t.length; i++) {
+ var s = t[i];
+ s === "~" && (s = "\\textasciitilde"), r.push(F.makeSymbol(s, "Typewriter-Regular", n.mode, a, ["mord", "texttt"]));
+ }
+ return F.makeSpan(["mord", "text"].concat(a.sizingClasses(e)), F.tryCombineChars(r), a);
+ },
+ mathmlBuilder(n, e) {
+ var t = new q.TextNode(os(n)), r = new q.MathNode("mtext", [t]);
+ return r.setAttribute("mathvariant", "monospace"), r;
+ }
+});
+var os = (n) => n.body.replace(/ /g, n.star ? "␣" : " "), eh = Bl;
+g("\\noexpand", function(n) {
+ var e = n.popToken();
+ return n.isExpandable(e.text) && (e.noexpand = !0, e.treatAsRelax = !0), {
+ tokens: [e],
+ numArgs: 0
+ };
+});
+g("\\expandafter", function(n) {
+ var e = n.popToken();
+ return n.expandOnce(!0), {
+ tokens: [e],
+ numArgs: 0
+ };
+});
+g("\\@firstoftwo", function(n) {
+ var e = n.consumeArgs(2);
+ return {
+ tokens: e[0],
+ numArgs: 0
+ };
+});
+g("\\@secondoftwo", function(n) {
+ var e = n.consumeArgs(2);
+ return {
+ tokens: e[1],
+ numArgs: 0
+ };
+});
+g("\\@ifnextchar", function(n) {
+ var e = n.consumeArgs(3);
+ n.consumeSpaces();
+ var t = n.future();
+ return e[0].length === 1 && e[0][0].text === t.text ? {
+ tokens: e[1],
+ numArgs: 0
+ } : {
+ tokens: e[2],
+ numArgs: 0
+ };
+});
+g("\\@ifstar", "\\@ifnextchar *{\\@firstoftwo{#1}}");
+g("\\TextOrMath", function(n) {
+ var e = n.consumeArgs(2);
+ return n.mode === "text" ? {
+ tokens: e[0],
+ numArgs: 0
+ } : {
+ tokens: e[1],
+ numArgs: 0
+ };
+});
+var us = {
+ 0: 0,
+ 1: 1,
+ 2: 2,
+ 3: 3,
+ 4: 4,
+ 5: 5,
+ 6: 6,
+ 7: 7,
+ 8: 8,
+ 9: 9,
+ a: 10,
+ A: 10,
+ b: 11,
+ B: 11,
+ c: 12,
+ C: 12,
+ d: 13,
+ D: 13,
+ e: 14,
+ E: 14,
+ f: 15,
+ F: 15
+};
+g("\\char", function(n) {
+ var e = n.popToken(), t, r = "";
+ if (e.text === "'")
+ t = 8, e = n.popToken();
+ else if (e.text === '"')
+ t = 16, e = n.popToken();
+ else if (e.text === "`")
+ if (e = n.popToken(), e.text[0] === "\\")
+ r = e.text.charCodeAt(1);
+ else {
+ if (e.text === "EOF")
+ throw new W("\\char` missing argument");
+ r = e.text.charCodeAt(0);
+ }
+ else
+ t = 10;
+ if (t) {
+ if (r = us[e.text], r == null || r >= t)
+ throw new W("Invalid base-" + t + " digit " + e.text);
+ for (var a; (a = us[n.future().text]) != null && a < t; )
+ r *= t, r += a, n.popToken();
+ }
+ return "\\@char{" + r + "}";
+});
+var Ia = (n, e, t, r) => {
+ var a = n.consumeArg().tokens;
+ if (a.length !== 1)
+ throw new W("\\newcommand's first argument must be a macro name");
+ var i = a[0].text, s = n.isDefined(i);
+ if (s && !e)
+ throw new W("\\newcommand{" + i + "} attempting to redefine " + (i + "; use \\renewcommand"));
+ if (!s && !t)
+ throw new W("\\renewcommand{" + i + "} when command " + i + " does not yet exist; use \\newcommand");
+ var l = 0;
+ if (a = n.consumeArg().tokens, a.length === 1 && a[0].text === "[") {
+ for (var u = "", h = n.expandNextToken(); h.text !== "]" && h.text !== "EOF"; )
+ u += h.text, h = n.expandNextToken();
+ if (!u.match(/^\s*[0-9]+\s*$/))
+ throw new W("Invalid number of arguments: " + u);
+ l = parseInt(u), a = n.consumeArg().tokens;
+ }
+ return s && r || n.macros.set(i, {
+ tokens: a,
+ numArgs: l
+ }), "";
+};
+g("\\newcommand", (n) => Ia(n, !1, !0, !1));
+g("\\renewcommand", (n) => Ia(n, !0, !1, !1));
+g("\\providecommand", (n) => Ia(n, !0, !0, !0));
+g("\\message", (n) => {
+ var e = n.consumeArgs(1)[0];
+ return console.log(e.reverse().map((t) => t.text).join("")), "";
+});
+g("\\errmessage", (n) => {
+ var e = n.consumeArgs(1)[0];
+ return console.error(e.reverse().map((t) => t.text).join("")), "";
+});
+g("\\show", (n) => {
+ var e = n.popToken(), t = e.text;
+ return console.log(e, n.macros.get(t), eh[t], Fe.math[t], Fe.text[t]), "";
+});
+g("\\bgroup", "{");
+g("\\egroup", "}");
+g("~", "\\nobreakspace");
+g("\\lq", "`");
+g("\\rq", "'");
+g("\\aa", "\\r a");
+g("\\AA", "\\r A");
+g("\\textcopyright", "\\html@mathml{\\textcircled{c}}{\\char`©}");
+g("\\copyright", "\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");
+g("\\textregistered", "\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");
+g("ℬ", "\\mathscr{B}");
+g("ℰ", "\\mathscr{E}");
+g("ℱ", "\\mathscr{F}");
+g("ℋ", "\\mathscr{H}");
+g("ℐ", "\\mathscr{I}");
+g("ℒ", "\\mathscr{L}");
+g("ℳ", "\\mathscr{M}");
+g("ℛ", "\\mathscr{R}");
+g("ℭ", "\\mathfrak{C}");
+g("ℌ", "\\mathfrak{H}");
+g("ℨ", "\\mathfrak{Z}");
+g("\\Bbbk", "\\Bbb{k}");
+g("·", "\\cdotp");
+g("\\llap", "\\mathllap{\\textrm{#1}}");
+g("\\rlap", "\\mathrlap{\\textrm{#1}}");
+g("\\clap", "\\mathclap{\\textrm{#1}}");
+g("\\mathstrut", "\\vphantom{(}");
+g("\\underbar", "\\underline{\\text{#1}}");
+g("\\not", '\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');
+g("\\neq", "\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");
+g("\\ne", "\\neq");
+g("≠", "\\neq");
+g("\\notin", "\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");
+g("∉", "\\notin");
+g("≘", "\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");
+g("≙", "\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");
+g("≚", "\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");
+g("≛", "\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");
+g("≝", "\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");
+g("≞", "\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");
+g("≟", "\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");
+g("⟂", "\\perp");
+g("‼", "\\mathclose{!\\mkern-0.8mu!}");
+g("���", "\\notni");
+g("⌜", "\\ulcorner");
+g("⌝", "\\urcorner");
+g("⌞", "\\llcorner");
+g("⌟", "\\lrcorner");
+g("©", "\\copyright");
+g("®", "\\textregistered");
+g("️", "\\textregistered");
+g("\\ulcorner", '\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');
+g("\\urcorner", '\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');
+g("\\llcorner", '\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');
+g("\\lrcorner", '\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');
+g("\\vdots", "{\\varvdots\\rule{0pt}{15pt}}");
+g("⋮", "\\vdots");
+g("\\varGamma", "\\mathit{\\Gamma}");
+g("\\varDelta", "\\mathit{\\Delta}");
+g("\\varTheta", "\\mathit{\\Theta}");
+g("\\varLambda", "\\mathit{\\Lambda}");
+g("\\varXi", "\\mathit{\\Xi}");
+g("\\varPi", "\\mathit{\\Pi}");
+g("\\varSigma", "\\mathit{\\Sigma}");
+g("\\varUpsilon", "\\mathit{\\Upsilon}");
+g("\\varPhi", "\\mathit{\\Phi}");
+g("\\varPsi", "\\mathit{\\Psi}");
+g("\\varOmega", "\\mathit{\\Omega}");
+g("\\substack", "\\begin{subarray}{c}#1\\end{subarray}");
+g("\\colon", "\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");
+g("\\boxed", "\\fbox{$\\displaystyle{#1}$}");
+g("\\iff", "\\DOTSB\\;\\Longleftrightarrow\\;");
+g("\\implies", "\\DOTSB\\;\\Longrightarrow\\;");
+g("\\impliedby", "\\DOTSB\\;\\Longleftarrow\\;");
+g("\\dddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");
+g("\\ddddot", "{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");
+var cs = {
+ ",": "\\dotsc",
+ "\\not": "\\dotsb",
+ // \keybin@ checks for the following:
+ "+": "\\dotsb",
+ "=": "\\dotsb",
+ "<": "\\dotsb",
+ ">": "\\dotsb",
+ "-": "\\dotsb",
+ "*": "\\dotsb",
+ ":": "\\dotsb",
+ // Symbols whose definition starts with \DOTSB:
+ "\\DOTSB": "\\dotsb",
+ "\\coprod": "\\dotsb",
+ "\\bigvee": "\\dotsb",
+ "\\bigwedge": "\\dotsb",
+ "\\biguplus": "\\dotsb",
+ "\\bigcap": "\\dotsb",
+ "\\bigcup": "\\dotsb",
+ "\\prod": "\\dotsb",
+ "\\sum": "\\dotsb",
+ "\\bigotimes": "\\dotsb",
+ "\\bigoplus": "\\dotsb",
+ "\\bigodot": "\\dotsb",
+ "\\bigsqcup": "\\dotsb",
+ "\\And": "\\dotsb",
+ "\\longrightarrow": "\\dotsb",
+ "\\Longrightarrow": "\\dotsb",
+ "\\longleftarrow": "\\dotsb",
+ "\\Longleftarrow": "\\dotsb",
+ "\\longleftrightarrow": "\\dotsb",
+ "\\Longleftrightarrow": "\\dotsb",
+ "\\mapsto": "\\dotsb",
+ "\\longmapsto": "\\dotsb",
+ "\\hookrightarrow": "\\dotsb",
+ "\\doteq": "\\dotsb",
+ // Symbols whose definition starts with \mathbin:
+ "\\mathbin": "\\dotsb",
+ // Symbols whose definition starts with \mathrel:
+ "\\mathrel": "\\dotsb",
+ "\\relbar": "\\dotsb",
+ "\\Relbar": "\\dotsb",
+ "\\xrightarrow": "\\dotsb",
+ "\\xleftarrow": "\\dotsb",
+ // Symbols whose definition starts with \DOTSI:
+ "\\DOTSI": "\\dotsi",
+ "\\int": "\\dotsi",
+ "\\oint": "\\dotsi",
+ "\\iint": "\\dotsi",
+ "\\iiint": "\\dotsi",
+ "\\iiiint": "\\dotsi",
+ "\\idotsint": "\\dotsi",
+ // Symbols whose definition starts with \DOTSX:
+ "\\DOTSX": "\\dotsx"
+};
+g("\\dots", function(n) {
+ var e = "\\dotso", t = n.expandAfterFuture().text;
+ return t in cs ? e = cs[t] : (t.slice(0, 4) === "\\not" || t in Fe.math && Z.contains(["bin", "rel"], Fe.math[t].group)) && (e = "\\dotsb"), e;
+});
+var Na = {
+ // \rightdelim@ checks for the following:
+ ")": !0,
+ "]": !0,
+ "\\rbrack": !0,
+ "\\}": !0,
+ "\\rbrace": !0,
+ "\\rangle": !0,
+ "\\rceil": !0,
+ "\\rfloor": !0,
+ "\\rgroup": !0,
+ "\\rmoustache": !0,
+ "\\right": !0,
+ "\\bigr": !0,
+ "\\biggr": !0,
+ "\\Bigr": !0,
+ "\\Biggr": !0,
+ // \extra@ also tests for the following:
+ $: !0,
+ // \extrap@ checks for the following:
+ ";": !0,
+ ".": !0,
+ ",": !0
+};
+g("\\dotso", function(n) {
+ var e = n.future().text;
+ return e in Na ? "\\ldots\\," : "\\ldots";
+});
+g("\\dotsc", function(n) {
+ var e = n.future().text;
+ return e in Na && e !== "," ? "\\ldots\\," : "\\ldots";
+});
+g("\\cdots", function(n) {
+ var e = n.future().text;
+ return e in Na ? "\\@cdots\\," : "\\@cdots";
+});
+g("\\dotsb", "\\cdots");
+g("\\dotsm", "\\cdots");
+g("\\dotsi", "\\!\\cdots");
+g("\\dotsx", "\\ldots\\,");
+g("\\DOTSI", "\\relax");
+g("\\DOTSB", "\\relax");
+g("\\DOTSX", "\\relax");
+g("\\tmspace", "\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");
+g("\\,", "\\tmspace+{3mu}{.1667em}");
+g("\\thinspace", "\\,");
+g("\\>", "\\mskip{4mu}");
+g("\\:", "\\tmspace+{4mu}{.2222em}");
+g("\\medspace", "\\:");
+g("\\;", "\\tmspace+{5mu}{.2777em}");
+g("\\thickspace", "\\;");
+g("\\!", "\\tmspace-{3mu}{.1667em}");
+g("\\negthinspace", "\\!");
+g("\\negmedspace", "\\tmspace-{4mu}{.2222em}");
+g("\\negthickspace", "\\tmspace-{5mu}{.277em}");
+g("\\enspace", "\\kern.5em ");
+g("\\enskip", "\\hskip.5em\\relax");
+g("\\quad", "\\hskip1em\\relax");
+g("\\qquad", "\\hskip2em\\relax");
+g("\\tag", "\\@ifstar\\tag@literal\\tag@paren");
+g("\\tag@paren", "\\tag@literal{({#1})}");
+g("\\tag@literal", (n) => {
+ if (n.macros.get("\\df@tag"))
+ throw new W("Multiple \\tag");
+ return "\\gdef\\df@tag{\\text{#1}}";
+});
+g("\\bmod", "\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");
+g("\\pod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");
+g("\\pmod", "\\pod{{\\rm mod}\\mkern6mu#1}");
+g("\\mod", "\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");
+g("\\newline", "\\\\\\relax");
+g("\\TeX", "\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");
+var uo = O(Qt["Main-Regular"][84][1] - 0.7 * Qt["Main-Regular"][65][1]);
+g("\\LaTeX", "\\textrm{\\html@mathml{" + ("L\\kern-.36em\\raisebox{" + uo + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{LaTeX}}");
+g("\\KaTeX", "\\textrm{\\html@mathml{" + ("K\\kern-.17em\\raisebox{" + uo + "}{\\scriptstyle A}") + "\\kern-.15em\\TeX}{KaTeX}}");
+g("\\hspace", "\\@ifstar\\@hspacer\\@hspace");
+g("\\@hspace", "\\hskip #1\\relax");
+g("\\@hspacer", "\\rule{0pt}{0pt}\\hskip #1\\relax");
+g("\\ordinarycolon", ":");
+g("\\vcentcolon", "\\mathrel{\\mathop\\ordinarycolon}");
+g("\\dblcolon", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');
+g("\\coloneqq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');
+g("\\Coloneqq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');
+g("\\coloneq", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');
+g("\\Coloneq", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');
+g("\\eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');
+g("\\Eqqcolon", '\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');
+g("\\eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');
+g("\\Eqcolon", '\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');
+g("\\colonapprox", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');
+g("\\Colonapprox", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');
+g("\\colonsim", '\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');
+g("\\Colonsim", '\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');
+g("∷", "\\dblcolon");
+g("∹", "\\eqcolon");
+g("≔", "\\coloneqq");
+g("≕", "\\eqqcolon");
+g("⩴", "\\Coloneqq");
+g("\\ratio", "\\vcentcolon");
+g("\\coloncolon", "\\dblcolon");
+g("\\colonequals", "\\coloneqq");
+g("\\coloncolonequals", "\\Coloneqq");
+g("\\equalscolon", "\\eqqcolon");
+g("\\equalscoloncolon", "\\Eqqcolon");
+g("\\colonminus", "\\coloneq");
+g("\\coloncolonminus", "\\Coloneq");
+g("\\minuscolon", "\\eqcolon");
+g("\\minuscoloncolon", "\\Eqcolon");
+g("\\coloncolonapprox", "\\Colonapprox");
+g("\\coloncolonsim", "\\Colonsim");
+g("\\simcolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");
+g("\\simcoloncolon", "\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");
+g("\\approxcolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");
+g("\\approxcoloncolon", "\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");
+g("\\notni", "\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");
+g("\\limsup", "\\DOTSB\\operatorname*{lim\\,sup}");
+g("\\liminf", "\\DOTSB\\operatorname*{lim\\,inf}");
+g("\\injlim", "\\DOTSB\\operatorname*{inj\\,lim}");
+g("\\projlim", "\\DOTSB\\operatorname*{proj\\,lim}");
+g("\\varlimsup", "\\DOTSB\\operatorname*{\\overline{lim}}");
+g("\\varliminf", "\\DOTSB\\operatorname*{\\underline{lim}}");
+g("\\varinjlim", "\\DOTSB\\operatorname*{\\underrightarrow{lim}}");
+g("\\varprojlim", "\\DOTSB\\operatorname*{\\underleftarrow{lim}}");
+g("\\gvertneqq", "\\html@mathml{\\@gvertneqq}{≩}");
+g("\\lvertneqq", "\\html@mathml{\\@lvertneqq}{≨}");
+g("\\ngeqq", "\\html@mathml{\\@ngeqq}{≱}");
+g("\\ngeqslant", "\\html@mathml{\\@ngeqslant}{≱}");
+g("\\nleqq", "\\html@mathml{\\@nleqq}{≰}");
+g("\\nleqslant", "\\html@mathml{\\@nleqslant}{≰}");
+g("\\nshortmid", "\\html@mathml{\\@nshortmid}{∤}");
+g("\\nshortparallel", "\\html@mathml{\\@nshortparallel}{∦}");
+g("\\nsubseteqq", "\\html@mathml{\\@nsubseteqq}{⊈}");
+g("\\nsupseteqq", "\\html@mathml{\\@nsupseteqq}{⊉}");
+g("\\varsubsetneq", "\\html@mathml{\\@varsubsetneq}{⊊}");
+g("\\varsubsetneqq", "\\html@mathml{\\@varsubsetneqq}{⫋}");
+g("\\varsupsetneq", "\\html@mathml{\\@varsupsetneq}{⊋}");
+g("\\varsupsetneqq", "\\html@mathml{\\@varsupsetneqq}{⫌}");
+g("\\imath", "\\html@mathml{\\@imath}{ı}");
+g("\\jmath", "\\html@mathml{\\@jmath}{ȷ}");
+g("\\llbracket", "\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");
+g("\\rrbracket", "\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");
+g("⟦", "\\llbracket");
+g("⟧", "\\rrbracket");
+g("\\lBrace", "\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");
+g("\\rBrace", "\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");
+g("⦃", "\\lBrace");
+g("⦄", "\\rBrace");
+g("\\minuso", "\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");
+g("⦵", "\\minuso");
+g("\\darr", "\\downarrow");
+g("\\dArr", "\\Downarrow");
+g("\\Darr", "\\Downarrow");
+g("\\lang", "\\langle");
+g("\\rang", "\\rangle");
+g("\\uarr", "\\uparrow");
+g("\\uArr", "\\Uparrow");
+g("\\Uarr", "\\Uparrow");
+g("\\N", "\\mathbb{N}");
+g("\\R", "\\mathbb{R}");
+g("\\Z", "\\mathbb{Z}");
+g("\\alef", "\\aleph");
+g("\\alefsym", "\\aleph");
+g("\\Alpha", "\\mathrm{A}");
+g("\\Beta", "\\mathrm{B}");
+g("\\bull", "\\bullet");
+g("\\Chi", "\\mathrm{X}");
+g("\\clubs", "\\clubsuit");
+g("\\cnums", "\\mathbb{C}");
+g("\\Complex", "\\mathbb{C}");
+g("\\Dagger", "\\ddagger");
+g("\\diamonds", "\\diamondsuit");
+g("\\empty", "\\emptyset");
+g("\\Epsilon", "\\mathrm{E}");
+g("\\Eta", "\\mathrm{H}");
+g("\\exist", "\\exists");
+g("\\harr", "\\leftrightarrow");
+g("\\hArr", "\\Leftrightarrow");
+g("\\Harr", "\\Leftrightarrow");
+g("\\hearts", "\\heartsuit");
+g("\\image", "\\Im");
+g("\\infin", "\\infty");
+g("\\Iota", "\\mathrm{I}");
+g("\\isin", "\\in");
+g("\\Kappa", "\\mathrm{K}");
+g("\\larr", "\\leftarrow");
+g("\\lArr", "\\Leftarrow");
+g("\\Larr", "\\Leftarrow");
+g("\\lrarr", "\\leftrightarrow");
+g("\\lrArr", "\\Leftrightarrow");
+g("\\Lrarr", "\\Leftrightarrow");
+g("\\Mu", "\\mathrm{M}");
+g("\\natnums", "\\mathbb{N}");
+g("\\Nu", "\\mathrm{N}");
+g("\\Omicron", "\\mathrm{O}");
+g("\\plusmn", "\\pm");
+g("\\rarr", "\\rightarrow");
+g("\\rArr", "\\Rightarrow");
+g("\\Rarr", "\\Rightarrow");
+g("\\real", "\\Re");
+g("\\reals", "\\mathbb{R}");
+g("\\Reals", "\\mathbb{R}");
+g("\\Rho", "\\mathrm{P}");
+g("\\sdot", "\\cdot");
+g("\\sect", "\\S");
+g("\\spades", "\\spadesuit");
+g("\\sub", "\\subset");
+g("\\sube", "\\subseteq");
+g("\\supe", "\\supseteq");
+g("\\Tau", "\\mathrm{T}");
+g("\\thetasym", "\\vartheta");
+g("\\weierp", "\\wp");
+g("\\Zeta", "\\mathrm{Z}");
+g("\\argmin", "\\DOTSB\\operatorname*{arg\\,min}");
+g("\\argmax", "\\DOTSB\\operatorname*{arg\\,max}");
+g("\\plim", "\\DOTSB\\mathop{\\operatorname{plim}}\\limits");
+g("\\bra", "\\mathinner{\\langle{#1}|}");
+g("\\ket", "\\mathinner{|{#1}\\rangle}");
+g("\\braket", "\\mathinner{\\langle{#1}\\rangle}");
+g("\\Bra", "\\left\\langle#1\\right|");
+g("\\Ket", "\\left|#1\\right\\rangle");
+var co = (n) => (e) => {
+ var t = e.consumeArg().tokens, r = e.consumeArg().tokens, a = e.consumeArg().tokens, i = e.consumeArg().tokens, s = e.macros.get("|"), l = e.macros.get("\\|");
+ e.macros.beginGroup();
+ var u = (f) => (p) => {
+ n && (p.macros.set("|", s), a.length && p.macros.set("\\|", l));
+ var v = f;
+ if (!f && a.length) {
+ var w = p.future();
+ w.text === "|" && (p.popToken(), v = !0);
+ }
+ return {
+ tokens: v ? a : r,
+ numArgs: 0
+ };
+ };
+ e.macros.set("|", u(!1)), a.length && e.macros.set("\\|", u(!0));
+ var h = e.consumeArg().tokens, d = e.expandTokens([
+ ...i,
+ ...h,
+ ...t
+ // reversed
+ ]);
+ return e.macros.endGroup(), {
+ tokens: d.reverse(),
+ numArgs: 0
+ };
+};
+g("\\bra@ket", co(!1));
+g("\\bra@set", co(!0));
+g("\\Braket", "\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");
+g("\\Set", "\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");
+g("\\set", "\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");
+g("\\angln", "{\\angl n}");
+g("\\blue", "\\textcolor{##6495ed}{#1}");
+g("\\orange", "\\textcolor{##ffa500}{#1}");
+g("\\pink", "\\textcolor{##ff00af}{#1}");
+g("\\red", "\\textcolor{##df0030}{#1}");
+g("\\green", "\\textcolor{##28ae7b}{#1}");
+g("\\gray", "\\textcolor{gray}{#1}");
+g("\\purple", "\\textcolor{##9d38bd}{#1}");
+g("\\blueA", "\\textcolor{##ccfaff}{#1}");
+g("\\blueB", "\\textcolor{##80f6ff}{#1}");
+g("\\blueC", "\\textcolor{##63d9ea}{#1}");
+g("\\blueD", "\\textcolor{##11accd}{#1}");
+g("\\blueE", "\\textcolor{##0c7f99}{#1}");
+g("\\tealA", "\\textcolor{##94fff5}{#1}");
+g("\\tealB", "\\textcolor{##26edd5}{#1}");
+g("\\tealC", "\\textcolor{##01d1c1}{#1}");
+g("\\tealD", "\\textcolor{##01a995}{#1}");
+g("\\tealE", "\\textcolor{##208170}{#1}");
+g("\\greenA", "\\textcolor{##b6ffb0}{#1}");
+g("\\greenB", "\\textcolor{##8af281}{#1}");
+g("\\greenC", "\\textcolor{##74cf70}{#1}");
+g("\\greenD", "\\textcolor{##1fab54}{#1}");
+g("\\greenE", "\\textcolor{##0d923f}{#1}");
+g("\\goldA", "\\textcolor{##ffd0a9}{#1}");
+g("\\goldB", "\\textcolor{##ffbb71}{#1}");
+g("\\goldC", "\\textcolor{##ff9c39}{#1}");
+g("\\goldD", "\\textcolor{##e07d10}{#1}");
+g("\\goldE", "\\textcolor{##a75a05}{#1}");
+g("\\redA", "\\textcolor{##fca9a9}{#1}");
+g("\\redB", "\\textcolor{##ff8482}{#1}");
+g("\\redC", "\\textcolor{##f9685d}{#1}");
+g("\\redD", "\\textcolor{##e84d39}{#1}");
+g("\\redE", "\\textcolor{##bc2612}{#1}");
+g("\\maroonA", "\\textcolor{##ffbde0}{#1}");
+g("\\maroonB", "\\textcolor{##ff92c6}{#1}");
+g("\\maroonC", "\\textcolor{##ed5fa6}{#1}");
+g("\\maroonD", "\\textcolor{##ca337c}{#1}");
+g("\\maroonE", "\\textcolor{##9e034e}{#1}");
+g("\\purpleA", "\\textcolor{##ddd7ff}{#1}");
+g("\\purpleB", "\\textcolor{##c6b9fc}{#1}");
+g("\\purpleC", "\\textcolor{##aa87ff}{#1}");
+g("\\purpleD", "\\textcolor{##7854ab}{#1}");
+g("\\purpleE", "\\textcolor{##543b78}{#1}");
+g("\\mintA", "\\textcolor{##f5f9e8}{#1}");
+g("\\mintB", "\\textcolor{##edf2df}{#1}");
+g("\\mintC", "\\textcolor{##e0e5cc}{#1}");
+g("\\grayA", "\\textcolor{##f6f7f7}{#1}");
+g("\\grayB", "\\textcolor{##f0f1f2}{#1}");
+g("\\grayC", "\\textcolor{##e3e5e6}{#1}");
+g("\\grayD", "\\textcolor{##d6d8da}{#1}");
+g("\\grayE", "\\textcolor{##babec2}{#1}");
+g("\\grayF", "\\textcolor{##888d93}{#1}");
+g("\\grayG", "\\textcolor{##626569}{#1}");
+g("\\grayH", "\\textcolor{##3b3e40}{#1}");
+g("\\grayI", "\\textcolor{##21242c}{#1}");
+g("\\kaBlue", "\\textcolor{##314453}{#1}");
+g("\\kaGreen", "\\textcolor{##71B307}{#1}");
+typeof document < "u" && document.compatMode !== "CSS1Compat" && typeof console < "u" && console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.");
+function La() {
+ return {
+ async: !1,
+ breaks: !1,
+ extensions: null,
+ gfm: !0,
+ hooks: null,
+ pedantic: !1,
+ renderer: null,
+ silent: !1,
+ tokenizer: null,
+ walkTokens: null
+ };
+}
+let w0 = La();
+function ho(n) {
+ w0 = n;
+}
+const mo = /[&<>"']/, th = new RegExp(mo.source, "g"), fo = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, rh = new RegExp(fo.source, "g"), nh = {
+ "&": "&",
+ "<": "<",
+ ">": ">",
+ '"': """,
+ "'": "'"
+}, hs = (n) => nh[n];
+function tt(n, e) {
+ if (e) {
+ if (mo.test(n))
+ return n.replace(th, hs);
+ } else if (fo.test(n))
+ return n.replace(rh, hs);
+ return n;
+}
+const ah = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
+function ih(n) {
+ return n.replace(ah, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
+}
+const sh = /(^|[^\[])\^/g;
+function de(n, e) {
+ let t = typeof n == "string" ? n : n.source;
+ e = e || "";
+ const r = {
+ replace: (a, i) => {
+ let s = typeof i == "string" ? i : i.source;
+ return s = s.replace(sh, "$1"), t = t.replace(a, s), r;
+ },
+ getRegex: () => new RegExp(t, e)
+ };
+ return r;
+}
+function ds(n) {
+ try {
+ n = encodeURI(n).replace(/%25/g, "%");
+ } catch {
+ return null;
+ }
+ return n;
+}
+const ar = { exec: () => null };
+function ms(n, e) {
+ const t = n.replace(/\|/g, (i, s, l) => {
+ let u = !1, h = s;
+ for (; --h >= 0 && l[h] === "\\"; )
+ u = !u;
+ return u ? "|" : " |";
+ }), r = t.split(/ \|/);
+ let a = 0;
+ if (r[0].trim() || r.shift(), r.length > 0 && !r[r.length - 1].trim() && r.pop(), e)
+ if (r.length > e)
+ r.splice(e);
+ else
+ for (; r.length < e; )
+ r.push("");
+ for (; a < r.length; a++)
+ r[a] = r[a].trim().replace(/\\\|/g, "|");
+ return r;
+}
+function Ar(n, e, t) {
+ const r = n.length;
+ if (r === 0)
+ return "";
+ let a = 0;
+ for (; a < r && n.charAt(r - a - 1) === e; )
+ a++;
+ return n.slice(0, r - a);
+}
+function lh(n, e) {
+ if (n.indexOf(e[1]) === -1)
+ return -1;
+ let t = 0;
+ for (let r = 0; r < n.length; r++)
+ if (n[r] === "\\")
+ r++;
+ else if (n[r] === e[0])
+ t++;
+ else if (n[r] === e[1] && (t--, t < 0))
+ return r;
+ return -1;
+}
+function fs(n, e, t, r) {
+ const a = e.href, i = e.title ? tt(e.title) : null, s = n[1].replace(/\\([\[\]])/g, "$1");
+ if (n[0].charAt(0) !== "!") {
+ r.state.inLink = !0;
+ const l = {
+ type: "link",
+ raw: t,
+ href: a,
+ title: i,
+ text: s,
+ tokens: r.inlineTokens(s)
+ };
+ return r.state.inLink = !1, l;
+ }
+ return {
+ type: "image",
+ raw: t,
+ href: a,
+ title: i,
+ text: tt(s)
+ };
+}
+function oh(n, e) {
+ const t = n.match(/^(\s+)(?:```)/);
+ if (t === null)
+ return e;
+ const r = t[1];
+ return e.split(`
+`).map((a) => {
+ const i = a.match(/^\s+/);
+ if (i === null)
+ return a;
+ const [s] = i;
+ return s.length >= r.length ? a.slice(r.length) : a;
+ }).join(`
+`);
+}
+class Zr {
+ // set by the lexer
+ constructor(e) {
+ pe(this, "options");
+ pe(this, "rules");
+ // set by the lexer
+ pe(this, "lexer");
+ this.options = e || w0;
+ }
+ space(e) {
+ const t = this.rules.block.newline.exec(e);
+ if (t && t[0].length > 0)
+ return {
+ type: "space",
+ raw: t[0]
+ };
+ }
+ code(e) {
+ const t = this.rules.block.code.exec(e);
+ if (t) {
+ const r = t[0].replace(/^ {1,4}/gm, "");
+ return {
+ type: "code",
+ raw: t[0],
+ codeBlockStyle: "indented",
+ text: this.options.pedantic ? r : Ar(r, `
+`)
+ };
+ }
+ }
+ fences(e) {
+ const t = this.rules.block.fences.exec(e);
+ if (t) {
+ const r = t[0], a = oh(r, t[3] || "");
+ return {
+ type: "code",
+ raw: r,
+ lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
+ text: a
+ };
+ }
+ }
+ heading(e) {
+ const t = this.rules.block.heading.exec(e);
+ if (t) {
+ let r = t[2].trim();
+ if (/#$/.test(r)) {
+ const a = Ar(r, "#");
+ (this.options.pedantic || !a || / $/.test(a)) && (r = a.trim());
+ }
+ return {
+ type: "heading",
+ raw: t[0],
+ depth: t[1].length,
+ text: r,
+ tokens: this.lexer.inline(r)
+ };
+ }
+ }
+ hr(e) {
+ const t = this.rules.block.hr.exec(e);
+ if (t)
+ return {
+ type: "hr",
+ raw: t[0]
+ };
+ }
+ blockquote(e) {
+ const t = this.rules.block.blockquote.exec(e);
+ if (t) {
+ let r = t[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
+ $1`);
+ r = Ar(r.replace(/^ *>[ \t]?/gm, ""), `
+`);
+ const a = this.lexer.state.top;
+ this.lexer.state.top = !0;
+ const i = this.lexer.blockTokens(r);
+ return this.lexer.state.top = a, {
+ type: "blockquote",
+ raw: t[0],
+ tokens: i,
+ text: r
+ };
+ }
+ }
+ list(e) {
+ let t = this.rules.block.list.exec(e);
+ if (t) {
+ let r = t[1].trim();
+ const a = r.length > 1, i = {
+ type: "list",
+ raw: "",
+ ordered: a,
+ start: a ? +r.slice(0, -1) : "",
+ loose: !1,
+ items: []
+ };
+ r = a ? `\\d{1,9}\\${r.slice(-1)}` : `\\${r}`, this.options.pedantic && (r = a ? r : "[*+-]");
+ const s = new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);
+ let l = "", u = "", h = !1;
+ for (; e; ) {
+ let d = !1;
+ if (!(t = s.exec(e)) || this.rules.block.hr.test(e))
+ break;
+ l = t[0], e = e.substring(l.length);
+ let f = t[2].split(`
+`, 1)[0].replace(/^\t+/, ($) => " ".repeat(3 * $.length)), p = e.split(`
+`, 1)[0], v = 0;
+ this.options.pedantic ? (v = 2, u = f.trimStart()) : (v = t[2].search(/[^ ]/), v = v > 4 ? 1 : v, u = f.slice(v), v += t[1].length);
+ let w = !1;
+ if (!f && /^ *$/.test(p) && (l += p + `
+`, e = e.substring(p.length + 1), d = !0), !d) {
+ const $ = new RegExp(`^ {0,${Math.min(3, v - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), k = new RegExp(`^ {0,${Math.min(3, v - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), _ = new RegExp(`^ {0,${Math.min(3, v - 1)}}(?:\`\`\`|~~~)`), A = new RegExp(`^ {0,${Math.min(3, v - 1)}}#`);
+ for (; e; ) {
+ const E = e.split(`
+`, 1)[0];
+ if (p = E, this.options.pedantic && (p = p.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), _.test(p) || A.test(p) || $.test(p) || k.test(e))
+ break;
+ if (p.search(/[^ ]/) >= v || !p.trim())
+ u += `
+` + p.slice(v);
+ else {
+ if (w || f.search(/[^ ]/) >= 4 || _.test(f) || A.test(f) || k.test(f))
+ break;
+ u += `
+` + p;
+ }
+ !w && !p.trim() && (w = !0), l += E + `
+`, e = e.substring(E.length + 1), f = p.slice(v);
+ }
+ }
+ i.loose || (h ? i.loose = !0 : /\n *\n *$/.test(l) && (h = !0));
+ let D = null, C;
+ this.options.gfm && (D = /^\[[ xX]\] /.exec(u), D && (C = D[0] !== "[ ] ", u = u.replace(/^\[[ xX]\] +/, ""))), i.items.push({
+ type: "list_item",
+ raw: l,
+ task: !!D,
+ checked: C,
+ loose: !1,
+ text: u,
+ tokens: []
+ }), i.raw += l;
+ }
+ i.items[i.items.length - 1].raw = l.trimEnd(), i.items[i.items.length - 1].text = u.trimEnd(), i.raw = i.raw.trimEnd();
+ for (let d = 0; d < i.items.length; d++)
+ if (this.lexer.state.top = !1, i.items[d].tokens = this.lexer.blockTokens(i.items[d].text, []), !i.loose) {
+ const f = i.items[d].tokens.filter((v) => v.type === "space"), p = f.length > 0 && f.some((v) => /\n.*\n/.test(v.raw));
+ i.loose = p;
+ }
+ if (i.loose)
+ for (let d = 0; d < i.items.length; d++)
+ i.items[d].loose = !0;
+ return i;
+ }
+ }
+ html(e) {
+ const t = this.rules.block.html.exec(e);
+ if (t)
+ return {
+ type: "html",
+ block: !0,
+ raw: t[0],
+ pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
+ text: t[0]
+ };
+ }
+ def(e) {
+ const t = this.rules.block.def.exec(e);
+ if (t) {
+ const r = t[1].toLowerCase().replace(/\s+/g, " "), a = t[2] ? t[2].replace(/^<(.*)>$/, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", i = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
+ return {
+ type: "def",
+ tag: r,
+ raw: t[0],
+ href: a,
+ title: i
+ };
+ }
+ }
+ table(e) {
+ const t = this.rules.block.table.exec(e);
+ if (!t || !/[:|]/.test(t[2]))
+ return;
+ const r = ms(t[1]), a = t[2].replace(/^\||\| *$/g, "").split("|"), i = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
+`) : [], s = {
+ type: "table",
+ raw: t[0],
+ header: [],
+ align: [],
+ rows: []
+ };
+ if (r.length === a.length) {
+ for (const l of a)
+ /^ *-+: *$/.test(l) ? s.align.push("right") : /^ *:-+: *$/.test(l) ? s.align.push("center") : /^ *:-+ *$/.test(l) ? s.align.push("left") : s.align.push(null);
+ for (const l of r)
+ s.header.push({
+ text: l,
+ tokens: this.lexer.inline(l)
+ });
+ for (const l of i)
+ s.rows.push(ms(l, s.header.length).map((u) => ({
+ text: u,
+ tokens: this.lexer.inline(u)
+ })));
+ return s;
+ }
+ }
+ lheading(e) {
+ const t = this.rules.block.lheading.exec(e);
+ if (t)
+ return {
+ type: "heading",
+ raw: t[0],
+ depth: t[2].charAt(0) === "=" ? 1 : 2,
+ text: t[1],
+ tokens: this.lexer.inline(t[1])
+ };
+ }
+ paragraph(e) {
+ const t = this.rules.block.paragraph.exec(e);
+ if (t) {
+ const r = t[1].charAt(t[1].length - 1) === `
+` ? t[1].slice(0, -1) : t[1];
+ return {
+ type: "paragraph",
+ raw: t[0],
+ text: r,
+ tokens: this.lexer.inline(r)
+ };
+ }
+ }
+ text(e) {
+ const t = this.rules.block.text.exec(e);
+ if (t)
+ return {
+ type: "text",
+ raw: t[0],
+ text: t[0],
+ tokens: this.lexer.inline(t[0])
+ };
+ }
+ escape(e) {
+ const t = this.rules.inline.escape.exec(e);
+ if (t)
+ return {
+ type: "escape",
+ raw: t[0],
+ text: tt(t[1])
+ };
+ }
+ tag(e) {
+ const t = this.rules.inline.tag.exec(e);
+ if (t)
+ return !this.lexer.state.inLink && /^/i.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && /^<(pre|code|kbd|script)(\s|>)/i.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && /^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
+ type: "html",
+ raw: t[0],
+ inLink: this.lexer.state.inLink,
+ inRawBlock: this.lexer.state.inRawBlock,
+ block: !1,
+ text: t[0]
+ };
+ }
+ link(e) {
+ const t = this.rules.inline.link.exec(e);
+ if (t) {
+ const r = t[2].trim();
+ if (!this.options.pedantic && /^$/.test(r))
+ return;
+ const s = Ar(r.slice(0, -1), "\\");
+ if ((r.length - s.length) % 2 === 0)
+ return;
+ } else {
+ const s = lh(t[2], "()");
+ if (s > -1) {
+ const u = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + s;
+ t[2] = t[2].substring(0, s), t[0] = t[0].substring(0, u).trim(), t[3] = "";
+ }
+ }
+ let a = t[2], i = "";
+ if (this.options.pedantic) {
+ const s = /^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(a);
+ s && (a = s[1], i = s[3]);
+ } else
+ i = t[3] ? t[3].slice(1, -1) : "";
+ return a = a.trim(), /^$/.test(r) ? a = a.slice(1) : a = a.slice(1, -1)), fs(t, {
+ href: a && a.replace(this.rules.inline.anyPunctuation, "$1"),
+ title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
+ }, t[0], this.lexer);
+ }
+ }
+ reflink(e, t) {
+ let r;
+ if ((r = this.rules.inline.reflink.exec(e)) || (r = this.rules.inline.nolink.exec(e))) {
+ const a = (r[2] || r[1]).replace(/\s+/g, " "), i = t[a.toLowerCase()];
+ if (!i) {
+ const s = r[0].charAt(0);
+ return {
+ type: "text",
+ raw: s,
+ text: s
+ };
+ }
+ return fs(r, i, r[0], this.lexer);
+ }
+ }
+ emStrong(e, t, r = "") {
+ let a = this.rules.inline.emStrongLDelim.exec(e);
+ if (!a || a[3] && r.match(/[\p{L}\p{N}]/u))
+ return;
+ if (!(a[1] || a[2] || "") || !r || this.rules.inline.punctuation.exec(r)) {
+ const s = [...a[0]].length - 1;
+ let l, u, h = s, d = 0;
+ const f = a[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
+ for (f.lastIndex = 0, t = t.slice(-1 * e.length + s); (a = f.exec(t)) != null; ) {
+ if (l = a[1] || a[2] || a[3] || a[4] || a[5] || a[6], !l)
+ continue;
+ if (u = [...l].length, a[3] || a[4]) {
+ h += u;
+ continue;
+ } else if ((a[5] || a[6]) && s % 3 && !((s + u) % 3)) {
+ d += u;
+ continue;
+ }
+ if (h -= u, h > 0)
+ continue;
+ u = Math.min(u, u + h + d);
+ const p = [...a[0]][0].length, v = e.slice(0, s + a.index + p + u);
+ if (Math.min(s, u) % 2) {
+ const D = v.slice(1, -1);
+ return {
+ type: "em",
+ raw: v,
+ text: D,
+ tokens: this.lexer.inlineTokens(D)
+ };
+ }
+ const w = v.slice(2, -2);
+ return {
+ type: "strong",
+ raw: v,
+ text: w,
+ tokens: this.lexer.inlineTokens(w)
+ };
+ }
+ }
+ }
+ codespan(e) {
+ const t = this.rules.inline.code.exec(e);
+ if (t) {
+ let r = t[2].replace(/\n/g, " ");
+ const a = /[^ ]/.test(r), i = /^ /.test(r) && / $/.test(r);
+ return a && i && (r = r.substring(1, r.length - 1)), r = tt(r, !0), {
+ type: "codespan",
+ raw: t[0],
+ text: r
+ };
+ }
+ }
+ br(e) {
+ const t = this.rules.inline.br.exec(e);
+ if (t)
+ return {
+ type: "br",
+ raw: t[0]
+ };
+ }
+ del(e) {
+ const t = this.rules.inline.del.exec(e);
+ if (t)
+ return {
+ type: "del",
+ raw: t[0],
+ text: t[2],
+ tokens: this.lexer.inlineTokens(t[2])
+ };
+ }
+ autolink(e) {
+ const t = this.rules.inline.autolink.exec(e);
+ if (t) {
+ let r, a;
+ return t[2] === "@" ? (r = tt(t[1]), a = "mailto:" + r) : (r = tt(t[1]), a = r), {
+ type: "link",
+ raw: t[0],
+ text: r,
+ href: a,
+ tokens: [
+ {
+ type: "text",
+ raw: r,
+ text: r
+ }
+ ]
+ };
+ }
+ }
+ url(e) {
+ var r;
+ let t;
+ if (t = this.rules.inline.url.exec(e)) {
+ let a, i;
+ if (t[2] === "@")
+ a = tt(t[0]), i = "mailto:" + a;
+ else {
+ let s;
+ do
+ s = t[0], t[0] = ((r = this.rules.inline._backpedal.exec(t[0])) == null ? void 0 : r[0]) ?? "";
+ while (s !== t[0]);
+ a = tt(t[0]), t[1] === "www." ? i = "http://" + t[0] : i = t[0];
+ }
+ return {
+ type: "link",
+ raw: t[0],
+ text: a,
+ href: i,
+ tokens: [
+ {
+ type: "text",
+ raw: a,
+ text: a
+ }
+ ]
+ };
+ }
+ }
+ inlineText(e) {
+ const t = this.rules.inline.text.exec(e);
+ if (t) {
+ let r;
+ return this.lexer.state.inRawBlock ? r = t[0] : r = tt(t[0]), {
+ type: "text",
+ raw: t[0],
+ text: r
+ };
+ }
+ }
+}
+const uh = /^(?: *(?:\n|$))+/, ch = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, hh = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, dr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, dh = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, po = /(?:[*+-]|\d{1,9}[.)])/, go = de(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, po).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), Oa = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, mh = /^[^\n]+/, Pa = /(?!\s*\])(?:\\.|[^\[\]\\])+/, fh = de(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", Pa).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ph = de(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, po).getRegex(), mn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Ha = /|$))/, gh = de("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", Ha).replace("tag", mn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), vo = de(Oa).replace("hr", dr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", mn).getRegex(), vh = de(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vo).getRegex(), Ua = {
+ blockquote: vh,
+ code: ch,
+ def: fh,
+ fences: hh,
+ heading: dh,
+ hr: dr,
+ html: gh,
+ lheading: go,
+ list: ph,
+ newline: uh,
+ paragraph: vo,
+ table: ar,
+ text: mh
+}, ps = de("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", dr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", mn).getRegex(), _h = {
+ ...Ua,
+ table: ps,
+ paragraph: de(Oa).replace("hr", dr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ps).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", mn).getRegex()
+}, bh = {
+ ...Ua,
+ html: de(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Ha).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
+ def: /^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
+ heading: /^(#{1,6})(.*)(?:\n+|$)/,
+ fences: ar,
+ // fences not supported
+ lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
+ paragraph: de(Oa).replace("hr", dr).replace("heading", ` *#{1,6} *[^
+]`).replace("lheading", go).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
+}, _o = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, yh = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, bo = /^( {2,}|\\)\n(?!\s*$)/, wh = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g, xh = de(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, mr).getRegex(), Dh = de("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, mr).getRegex(), Ah = de("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, mr).getRegex(), Ch = de(/\\([punct])/, "gu").replace(/punct/g, mr).getRegex(), Fh = de(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Eh = de(Ha).replace("(?:-->|$)", "-->").getRegex(), Th = de("^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment", Eh).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Kr = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, $h = de(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Kr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), yo = de(/^!?\[(label)\]\[(ref)\]/).replace("label", Kr).replace("ref", Pa).getRegex(), wo = de(/^!?\[(ref)\](?:\[\])?/).replace("ref", Pa).getRegex(), Mh = de("reflink|nolink(?!\\()", "g").replace("reflink", yo).replace("nolink", wo).getRegex(), Ga = {
+ _backpedal: ar,
+ // only used for GFM url
+ anyPunctuation: Ch,
+ autolink: Fh,
+ blockSkip: Sh,
+ br: bo,
+ code: yh,
+ del: ar,
+ emStrongLDelim: xh,
+ emStrongRDelimAst: Dh,
+ emStrongRDelimUnd: Ah,
+ escape: _o,
+ link: $h,
+ nolink: wo,
+ punctuation: kh,
+ reflink: yo,
+ reflinkSearch: Mh,
+ tag: Th,
+ text: wh,
+ url: ar
+}, zh = {
+ ...Ga,
+ link: de(/^!?\[(label)\]\((.*?)\)/).replace("label", Kr).getRegex(),
+ reflink: de(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Kr).getRegex()
+}, la = {
+ ...Ga,
+ escape: de(_o).replace("])", "~|])").getRegex(),
+ url: de(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
+ del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
+ text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\ u + " ".repeat(h.length));
+ let r, a, i, s;
+ for (; e; )
+ if (!(this.options.extensions && this.options.extensions.block && this.options.extensions.block.some((l) => (r = l.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1))) {
+ if (r = this.tokenizer.space(e)) {
+ e = e.substring(r.raw.length), r.raw.length === 1 && t.length > 0 ? t[t.length - 1].raw += `
+` : t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.code(e)) {
+ e = e.substring(r.raw.length), a = t[t.length - 1], a && (a.type === "paragraph" || a.type === "text") ? (a.raw += `
+` + r.raw, a.text += `
+` + r.text, this.inlineQueue[this.inlineQueue.length - 1].src = a.text) : t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.fences(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.heading(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.hr(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.blockquote(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.list(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.html(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.def(e)) {
+ e = e.substring(r.raw.length), a = t[t.length - 1], a && (a.type === "paragraph" || a.type === "text") ? (a.raw += `
+` + r.raw, a.text += `
+` + r.raw, this.inlineQueue[this.inlineQueue.length - 1].src = a.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = {
+ href: r.href,
+ title: r.title
+ });
+ continue;
+ }
+ if (r = this.tokenizer.table(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.lheading(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (i = e, this.options.extensions && this.options.extensions.startBlock) {
+ let l = 1 / 0;
+ const u = e.slice(1);
+ let h;
+ this.options.extensions.startBlock.forEach((d) => {
+ h = d.call({ lexer: this }, u), typeof h == "number" && h >= 0 && (l = Math.min(l, h));
+ }), l < 1 / 0 && l >= 0 && (i = e.substring(0, l + 1));
+ }
+ if (this.state.top && (r = this.tokenizer.paragraph(i))) {
+ a = t[t.length - 1], s && a.type === "paragraph" ? (a.raw += `
+` + r.raw, a.text += `
+` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = a.text) : t.push(r), s = i.length !== e.length, e = e.substring(r.raw.length);
+ continue;
+ }
+ if (r = this.tokenizer.text(e)) {
+ e = e.substring(r.raw.length), a = t[t.length - 1], a && a.type === "text" ? (a.raw += `
+` + r.raw, a.text += `
+` + r.text, this.inlineQueue.pop(), this.inlineQueue[this.inlineQueue.length - 1].src = a.text) : t.push(r);
+ continue;
+ }
+ if (e) {
+ const l = "Infinite loop on byte: " + e.charCodeAt(0);
+ if (this.options.silent) {
+ console.error(l);
+ break;
+ } else
+ throw new Error(l);
+ }
+ }
+ return this.state.top = !0, t;
+ }
+ inline(e, t = []) {
+ return this.inlineQueue.push({ src: e, tokens: t }), t;
+ }
+ /**
+ * Lexing/Compiling
+ */
+ inlineTokens(e, t = []) {
+ let r, a, i, s = e, l, u, h;
+ if (this.tokens.links) {
+ const d = Object.keys(this.tokens.links);
+ if (d.length > 0)
+ for (; (l = this.tokenizer.rules.inline.reflinkSearch.exec(s)) != null; )
+ d.includes(l[0].slice(l[0].lastIndexOf("[") + 1, -1)) && (s = s.slice(0, l.index) + "[" + "a".repeat(l[0].length - 2) + "]" + s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
+ }
+ for (; (l = this.tokenizer.rules.inline.blockSkip.exec(s)) != null; )
+ s = s.slice(0, l.index) + "[" + "a".repeat(l[0].length - 2) + "]" + s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
+ for (; (l = this.tokenizer.rules.inline.anyPunctuation.exec(s)) != null; )
+ s = s.slice(0, l.index) + "++" + s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
+ for (; e; )
+ if (u || (h = ""), u = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((d) => (r = d.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1))) {
+ if (r = this.tokenizer.escape(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.tag(e)) {
+ e = e.substring(r.raw.length), a = t[t.length - 1], a && r.type === "text" && a.type === "text" ? (a.raw += r.raw, a.text += r.text) : t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.link(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.reflink(e, this.tokens.links)) {
+ e = e.substring(r.raw.length), a = t[t.length - 1], a && r.type === "text" && a.type === "text" ? (a.raw += r.raw, a.text += r.text) : t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.emStrong(e, s, h)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.codespan(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.br(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.del(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (r = this.tokenizer.autolink(e)) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (!this.state.inLink && (r = this.tokenizer.url(e))) {
+ e = e.substring(r.raw.length), t.push(r);
+ continue;
+ }
+ if (i = e, this.options.extensions && this.options.extensions.startInline) {
+ let d = 1 / 0;
+ const f = e.slice(1);
+ let p;
+ this.options.extensions.startInline.forEach((v) => {
+ p = v.call({ lexer: this }, f), typeof p == "number" && p >= 0 && (d = Math.min(d, p));
+ }), d < 1 / 0 && d >= 0 && (i = e.substring(0, d + 1));
+ }
+ if (r = this.tokenizer.inlineText(i)) {
+ e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (h = r.raw.slice(-1)), u = !0, a = t[t.length - 1], a && a.type === "text" ? (a.raw += r.raw, a.text += r.text) : t.push(r);
+ continue;
+ }
+ if (e) {
+ const d = "Infinite loop on byte: " + e.charCodeAt(0);
+ if (this.options.silent) {
+ console.error(d);
+ break;
+ } else
+ throw new Error(d);
+ }
+ }
+ return t;
+ }
+}
+class Qr {
+ constructor(e) {
+ pe(this, "options");
+ this.options = e || w0;
+ }
+ code(e, t, r) {
+ var i;
+ const a = (i = (t || "").match(/^\S*/)) == null ? void 0 : i[0];
+ return e = e.replace(/\n$/, "") + `
+`, a ? '' + (r ? e : tt(e, !0)) + `
+` : "" + (r ? e : tt(e, !0)) + `
+`;
+ }
+ blockquote(e) {
+ return `
+${e}
+`;
+ }
+ html(e, t) {
+ return e;
+ }
+ heading(e, t, r) {
+ return `${e}
+`;
+ }
+ hr() {
+ return `
+`;
+ }
+ list(e, t, r) {
+ const a = t ? "ol" : "ul", i = t && r !== 1 ? ' start="' + r + '"' : "";
+ return "<" + a + i + `>
+` + e + "" + a + `>
+`;
+ }
+ listitem(e, t, r) {
+ return `${e}
+`;
+ }
+ checkbox(e) {
+ return "';
+ }
+ paragraph(e) {
+ return `${e}
+`;
+ }
+ table(e, t) {
+ return t && (t = `${t}`), `
+`;
+ }
+ tablerow(e) {
+ return `
+${e}
+`;
+ }
+ tablecell(e, t) {
+ const r = t.header ? "th" : "td";
+ return (t.align ? `<${r} align="${t.align}">` : `<${r}>`) + e + `${r}>
+`;
+ }
+ /**
+ * span level renderer
+ */
+ strong(e) {
+ return `${e}`;
+ }
+ em(e) {
+ return `${e}`;
+ }
+ codespan(e) {
+ return `${e}`;
+ }
+ br() {
+ return "
";
+ }
+ del(e) {
+ return `${e}`;
+ }
+ link(e, t, r) {
+ const a = ds(e);
+ if (a === null)
+ return r;
+ e = a;
+ let i = '" + r + "< a>", i;
+ }
+ image(e, t, r) {
+ const a = ds(e);
+ if (a === null)
+ return r;
+ e = a;
+ let i = `
" , i; + } + text(e) { + return e; + } +} +class ja { + no need for block level renderers + strong(e) { + return e; + } + em(e) { + return e; + } + codespan(e) { + return e; + } + del(e) { + return e; + } + html(e) { + return e; + } + text(e) { + return e; + } + link(e, t, r) { + return "" + r; + } + image(e, t, r) { + return "" + r; + } + br() { + return ""; + } +} +class Bt { + constructor(e) { + pe(this, "options"); + pe(this, "renderer"); + pe(this, "textRenderer"); + this.options = e || w0, this.options.renderer = this.options.renderer || new Qr(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new ja(); + } + ** + * Static Parse Method + * + static parse(e, t) { + return new Bt(t).parse(e); + } + ** + * Static Parse Inline Method + * + static parseInline(e, t) { + return new Bt(t).parseInline(e); + } + ** + * Parse Loop + * + parse(e, t = !0) { + let r = "" ; + for (let a = 0; a < e.length; a++) { + const i = e[a]; + if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[i.type]) { + const s = i, l = this.options.extensions.renderers[s.type].call({ parser: this }, s); + if (l !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(s.type)) { + r += l || ""; + continue; + } + } + switch (i.type) { + case "space": + continue; + case "hr": { + r += this.renderer.hr(); + continue; + } + case "heading": { + const s = i; + r += this.renderer.heading(this.parseInline(s.tokens), s.depth, ih(this.parseInline(s.tokens, this.textRenderer))); + continue; + } + case "code": { + const s = i; + r += this.renderer.code(s.text, s.lang, !!s.escaped); + continue; + } + case "table": { + const s = i; + let l = "" , u = "" ; + for (let d = 0; d < s.header.length; d++) + u += this.renderer.tablecell(this.parseInline(s.header[d].tokens), { header: !0, align: s.align[d] }); + l += this.renderer.tablerow(u); + let h = "" ; + for (let d = 0; d < s.rows.length; d++) { + const f = s.rows[d]; + u = "" ; + for (let p = 0; p < f.length; p++) + u += this.renderer.tablecell(this.parseInline(f[p].tokens), { header: !1, align: s.align[p] }); + h += this.renderer.tablerow(u); + } + r += this.renderer.table(l, h); + continue; + } + case "blockquote": { + const s = i, l = this.parse(s.tokens); + r += this.renderer.blockquote(l); + continue; + } + case "list": { + const s = i, l = s.ordered, u = s.start, h = s.loose; + let d = "" ; + for (let f = 0; f < s.items.length; f++) { + const p = s.items[f], v = p.checked, w = p.task; + let D = "" ; + if (p.task) { + const C = this.renderer.checkbox(!!v); + h ? p.tokens.length> 0 && p.tokens[0].type === "paragraph" ? (p.tokens[0].text = C + " " + p.tokens[0].text, p.tokens[0].tokens && p.tokens[0].tokens.length > 0 && p.tokens[0].tokens[0].type === "text" && (p.tokens[0].tokens[0].text = C + " " + p.tokens[0].tokens[0].text)) : p.tokens.unshift({
+ type: "text",
+ text: C + " "
+ }) : D += C + " ";
+ }
+ D += this.parse(p.tokens, h), d += this.renderer.listitem(D, w, !!v);
+ }
+ r += this.renderer.list(d, l, u);
+ continue;
+ }
+ case "html": {
+ const s = i;
+ r += this.renderer.html(s.text, s.block);
+ continue;
+ }
+ case "paragraph": {
+ const s = i;
+ r += this.renderer.paragraph(this.parseInline(s.tokens));
+ continue;
+ }
+ case "text": {
+ let s = i, l = s.tokens ? this.parseInline(s.tokens) : s.text;
+ for (; a + 1 < e.length && e[a + 1].type === "text"; )
+ s = e[++a], l += `
+` + (s.tokens ? this.parseInline(s.tokens) : s.text);
+ r += t ? this.renderer.paragraph(l) : l;
+ continue;
+ }
+ default: {
+ const s = 'Token with "' + i.type + '" type was not found.';
+ if (this.options.silent)
+ return console.error(s), "";
+ throw new Error(s);
+ }
+ }
+ }
+ return r;
+ }
+ /**
+ * Parse Inline Tokens
+ */
+ parseInline(e, t) {
+ t = t || this.renderer;
+ let r = "";
+ for (let a = 0; a < e.length; a++) {
+ const i = e[a];
+ if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[i.type]) {
+ const s = this.options.extensions.renderers[i.type].call({ parser: this }, i);
+ if (s !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
+ r += s || "";
+ continue;
+ }
+ }
+ switch (i.type) {
+ case "escape": {
+ const s = i;
+ r += t.text(s.text);
+ break;
+ }
+ case "html": {
+ const s = i;
+ r += t.html(s.text);
+ break;
+ }
+ case "link": {
+ const s = i;
+ r += t.link(s.href, s.title, this.parseInline(s.tokens, t));
+ break;
+ }
+ case "image": {
+ const s = i;
+ r += t.image(s.href, s.title, s.text);
+ break;
+ }
+ case "strong": {
+ const s = i;
+ r += t.strong(this.parseInline(s.tokens, t));
+ break;
+ }
+ case "em": {
+ const s = i;
+ r += t.em(this.parseInline(s.tokens, t));
+ break;
+ }
+ case "codespan": {
+ const s = i;
+ r += t.codespan(s.text);
+ break;
+ }
+ case "br": {
+ r += t.br();
+ break;
+ }
+ case "del": {
+ const s = i;
+ r += t.del(this.parseInline(s.tokens, t));
+ break;
+ }
+ case "text": {
+ const s = i;
+ r += t.text(s.text);
+ break;
+ }
+ default: {
+ const s = 'Token with "' + i.type + '" type was not found.';
+ if (this.options.silent)
+ return console.error(s), "";
+ throw new Error(s);
+ }
+ }
+ }
+ return r;
+ }
+}
+class ir {
+ constructor(e) {
+ pe(this, "options");
+ this.options = e || w0;
+ }
+ /**
+ * Process markdown before marked
+ */
+ preprocess(e) {
+ return e;
+ }
+ /**
+ * Process HTML after marked is finished
+ */
+ postprocess(e) {
+ return e;
+ }
+ /**
+ * Process all tokens before walk tokens
+ */
+ processAllTokens(e) {
+ return e;
+ }
+}
+pe(ir, "passThroughHooks", /* @__PURE__ */ new Set([
+ "preprocess",
+ "postprocess",
+ "processAllTokens"
+]));
+var b0, oa, ko;
+class Rh {
+ constructor(...e) {
+ hi(this, b0);
+ pe(this, "defaults", La());
+ pe(this, "options", this.setOptions);
+ pe(this, "parse", _r(this, b0, oa).call(this, zt.lex, Bt.parse));
+ pe(this, "parseInline", _r(this, b0, oa).call(this, zt.lexInline, Bt.parseInline));
+ pe(this, "Parser", Bt);
+ pe(this, "Renderer", Qr);
+ pe(this, "TextRenderer", ja);
+ pe(this, "Lexer", zt);
+ pe(this, "Tokenizer", Zr);
+ pe(this, "Hooks", ir);
+ this.use(...e);
+ }
+ /**
+ * Run callback for every token
+ */
+ walkTokens(e, t) {
+ var a, i;
+ let r = [];
+ for (const s of e)
+ switch (r = r.concat(t.call(this, s)), s.type) {
+ case "table": {
+ const l = s;
+ for (const u of l.header)
+ r = r.concat(this.walkTokens(u.tokens, t));
+ for (const u of l.rows)
+ for (const h of u)
+ r = r.concat(this.walkTokens(h.tokens, t));
+ break;
+ }
+ case "list": {
+ const l = s;
+ r = r.concat(this.walkTokens(l.items, t));
+ break;
+ }
+ default: {
+ const l = s;
+ (i = (a = this.defaults.extensions) == null ? void 0 : a.childTokens) != null && i[l.type] ? this.defaults.extensions.childTokens[l.type].forEach((u) => {
+ const h = l[u].flat(1 / 0);
+ r = r.concat(this.walkTokens(h, t));
+ }) : l.tokens && (r = r.concat(this.walkTokens(l.tokens, t)));
+ }
+ }
+ return r;
+ }
+ use(...e) {
+ const t = this.defaults.extensions || { renderers: {}, childTokens: {} };
+ return e.forEach((r) => {
+ const a = { ...r };
+ if (a.async = this.defaults.async || a.async || !1, r.extensions && (r.extensions.forEach((i) => {
+ if (!i.name)
+ throw new Error("extension name required");
+ if ("renderer" in i) {
+ const s = t.renderers[i.name];
+ s ? t.renderers[i.name] = function(...l) {
+ let u = i.renderer.apply(this, l);
+ return u === !1 && (u = s.apply(this, l)), u;
+ } : t.renderers[i.name] = i.renderer;
+ }
+ if ("tokenizer" in i) {
+ if (!i.level || i.level !== "block" && i.level !== "inline")
+ throw new Error("extension level must be 'block' or 'inline'");
+ const s = t[i.level];
+ s ? s.unshift(i.tokenizer) : t[i.level] = [i.tokenizer], i.start && (i.level === "block" ? t.startBlock ? t.startBlock.push(i.start) : t.startBlock = [i.start] : i.level === "inline" && (t.startInline ? t.startInline.push(i.start) : t.startInline = [i.start]));
+ }
+ "childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
+ }), a.extensions = t), r.renderer) {
+ const i = this.defaults.renderer || new Qr(this.defaults);
+ for (const s in r.renderer) {
+ if (!(s in i))
+ throw new Error(`renderer '${s}' does not exist`);
+ if (s === "options")
+ continue;
+ const l = s, u = r.renderer[l], h = i[l];
+ i[l] = (...d) => {
+ let f = u.apply(i, d);
+ return f === !1 && (f = h.apply(i, d)), f || "";
+ };
+ }
+ a.renderer = i;
+ }
+ if (r.tokenizer) {
+ const i = this.defaults.tokenizer || new Zr(this.defaults);
+ for (const s in r.tokenizer) {
+ if (!(s in i))
+ throw new Error(`tokenizer '${s}' does not exist`);
+ if (["options", "rules", "lexer"].includes(s))
+ continue;
+ const l = s, u = r.tokenizer[l], h = i[l];
+ i[l] = (...d) => {
+ let f = u.apply(i, d);
+ return f === !1 && (f = h.apply(i, d)), f;
+ };
+ }
+ a.tokenizer = i;
+ }
+ if (r.hooks) {
+ const i = this.defaults.hooks || new ir();
+ for (const s in r.hooks) {
+ if (!(s in i))
+ throw new Error(`hook '${s}' does not exist`);
+ if (s === "options")
+ continue;
+ const l = s, u = r.hooks[l], h = i[l];
+ ir.passThroughHooks.has(s) ? i[l] = (d) => {
+ if (this.defaults.async)
+ return Promise.resolve(u.call(i, d)).then((p) => h.call(i, p));
+ const f = u.call(i, d);
+ return h.call(i, f);
+ } : i[l] = (...d) => {
+ let f = u.apply(i, d);
+ return f === !1 && (f = h.apply(i, d)), f;
+ };
+ }
+ a.hooks = i;
+ }
+ if (r.walkTokens) {
+ const i = this.defaults.walkTokens, s = r.walkTokens;
+ a.walkTokens = function(l) {
+ let u = [];
+ return u.push(s.call(this, l)), i && (u = u.concat(i.call(this, l))), u;
+ };
+ }
+ this.defaults = { ...this.defaults, ...a };
+ }), this;
+ }
+ setOptions(e) {
+ return this.defaults = { ...this.defaults, ...e }, this;
+ }
+ lexer(e, t) {
+ return zt.lex(e, t ?? this.defaults);
+ }
+ parser(e, t) {
+ return Bt.parse(e, t ?? this.defaults);
+ }
+}
+b0 = new WeakSet(), oa = function(e, t) {
+ return (r, a) => {
+ const i = { ...a }, s = { ...this.defaults, ...i };
+ this.defaults.async === !0 && i.async === !1 && (s.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), s.async = !0);
+ const l = _r(this, b0, ko).call(this, !!s.silent, !!s.async);
+ if (typeof r > "u" || r === null)
+ return l(new Error("marked(): input parameter is undefined or null"));
+ if (typeof r != "string")
+ return l(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(r) + ", string expected"));
+ if (s.hooks && (s.hooks.options = s), s.async)
+ return Promise.resolve(s.hooks ? s.hooks.preprocess(r) : r).then((u) => e(u, s)).then((u) => s.hooks ? s.hooks.processAllTokens(u) : u).then((u) => s.walkTokens ? Promise.all(this.walkTokens(u, s.walkTokens)).then(() => u) : u).then((u) => t(u, s)).then((u) => s.hooks ? s.hooks.postprocess(u) : u).catch(l);
+ try {
+ s.hooks && (r = s.hooks.preprocess(r));
+ let u = e(r, s);
+ s.hooks && (u = s.hooks.processAllTokens(u)), s.walkTokens && this.walkTokens(u, s.walkTokens);
+ let h = t(u, s);
+ return s.hooks && (h = s.hooks.postprocess(h)), h;
+ } catch (u) {
+ return l(u);
+ }
+ };
+}, ko = function(e, t) {
+ return (r) => {
+ if (r.message += `
+Please report this to https://github.com/markedjs/marked.`, e) {
+ const a = "An error occurred:
" + tt(r.message + "", !0) + "
";
+ return t ? Promise.resolve(a) : a;
+ }
+ if (t)
+ return Promise.reject(r);
+ throw r;
+ };
+};
+const _0 = new Rh();
+function he(n, e) {
+ return _0.parse(n, e);
+}
+he.options = he.setOptions = function(n) {
+ return _0.setOptions(n), he.defaults = _0.defaults, ho(he.defaults), he;
+};
+he.getDefaults = La;
+he.defaults = w0;
+he.use = function(...n) {
+ return _0.use(...n), he.defaults = _0.defaults, ho(he.defaults), he;
+};
+he.walkTokens = function(n, e) {
+ return _0.walkTokens(n, e);
+};
+he.parseInline = _0.parseInline;
+he.Parser = Bt;
+he.parser = Bt.parse;
+he.Renderer = Qr;
+he.TextRenderer = ja;
+he.Lexer = zt;
+he.lexer = zt.lex;
+he.Tokenizer = Zr;
+he.Hooks = ir;
+he.parse = he;
+he.options;
+he.setOptions;
+he.use;
+he.walkTokens;
+he.parseInline;
+Bt.parse;
+zt.lex;
+const qh = /[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g, Ih = Object.hasOwnProperty;
+class So {
+ /**
+ * Create a new slug class.
+ */
+ constructor() {
+ this.occurrences, this.reset();
+ }
+ /**
+ * Generate a unique slug.
+ *
+ * Tracks previously generated slugs: repeated calls with the same value
+ * will result in different slugs.
+ * Use the `slug` function to get same slugs.
+ *
+ * @param {string} value
+ * String of text to slugify
+ * @param {boolean} [maintainCase=false]
+ * Keep the current case, otherwise make all lowercase
+ * @return {string}
+ * A unique slug string
+ */
+ slug(e, t) {
+ const r = this;
+ let a = Nh(e, t === !0);
+ const i = a;
+ for (; Ih.call(r.occurrences, a); )
+ r.occurrences[i]++, a = i + "-" + r.occurrences[i];
+ return r.occurrences[a] = 0, a;
+ }
+ /**
+ * Reset - Forget all previous slugs
+ *
+ * @return void
+ */
+ reset() {
+ this.occurrences = /* @__PURE__ */ Object.create(null);
+ }
+}
+function Nh(n, e) {
+ return typeof n != "string" ? "" : (e || (n = n.toLowerCase()), n.replace(qh, "").replace(/ /g, "-"));
+}
+new So();
+var Lh = { exports: {} };
+(function(n) {
+ var e = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
+ /**
+ * Prism: Lightweight, robust, elegant syntax highlighting
+ *
+ * @license MIT
+ * @author Lea Verou
+ * @namespace
+ * @public
+ */
+ var t = function(r) {
+ var a = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, i = 0, s = {}, l = {
+ /**
+ * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
+ * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
+ * additional languages or plugins yourself.
+ *
+ * By setting this value to `true`, Prism will not automatically highlight all code elements on the page.
+ *
+ * You obviously have to change this value before the automatic highlighting started. To do this, you can add an
+ * empty Prism object into the global scope before loading the Prism script like this:
+ *
+ * ```js
+ * window.Prism = window.Prism || {};
+ * Prism.manual = true;
+ * // add a new