@pie-element/venn-classification 0.1.4-next.20261007184841 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -38928,7 +38928,7 @@ var H$1 = [
38928
38928
  "style",
38929
38929
  "foreignobject"
38930
38930
  ];
38931
- var U = [
38931
+ var U$1 = [
38932
38932
  "onerror",
38933
38933
  "onload",
38934
38934
  "onclick",
@@ -38947,7 +38947,7 @@ var U = [
38947
38947
  "formaction",
38948
38948
  "xlink:href"
38949
38949
  ];
38950
- var W = /* @__PURE__ */ new Set([
38950
+ var W$1 = /* @__PURE__ */ new Set([
38951
38951
  "iframe",
38952
38952
  "object",
38953
38953
  "mstack",
@@ -38961,8 +38961,8 @@ var W = /* @__PURE__ */ new Set([
38961
38961
  "annotation",
38962
38962
  "none"
38963
38963
  ]);
38964
- var G = /^[a-z_][\w.-]*:[a-z][\w.-]*$/;
38965
- var K = [
38964
+ var G$1 = /^[a-z_][\w.-]*:[a-z][\w.-]*$/;
38965
+ var K$1 = [
38966
38966
  "alignment",
38967
38967
  "target",
38968
38968
  "allow",
@@ -38983,13 +38983,13 @@ var K = [
38983
38983
  "mslinethickness",
38984
38984
  "linebreak"
38985
38985
  ];
38986
- var q = /^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/;
38987
- var J = "data-pie-play-audio";
38988
- var Y = {
38989
- ADD_TAGS: (e) => W.has(e) || G.test(e),
38990
- ADD_ATTR: K,
38986
+ var q$1 = /^\s*document\.getElementById\((['"])([^'"]+)\1\)\.play\(\)\s*;?\s*(?:return\s+false\s*;?\s*)?$/;
38987
+ var J$1 = "data-pie-play-audio";
38988
+ var Y$1 = {
38989
+ ADD_TAGS: (e) => W$1.has(e) || G$1.test(e),
38990
+ ADD_ATTR: K$1,
38991
38991
  FORBID_TAGS: H$1,
38992
- FORBID_ATTR: U,
38992
+ FORBID_ATTR: U$1,
38993
38993
  ALLOW_UNKNOWN_PROTOCOLS: !1,
38994
38994
  RETURN_TRUSTED_TYPE: !1
38995
38995
  };
@@ -38997,7 +38997,7 @@ var te$1 = !1;
38997
38997
  function ne$1(e) {
38998
38998
  for (let t of e.composedPath()) {
38999
38999
  if (!(t instanceof Element)) continue;
39000
- let n = t.getAttribute(J);
39000
+ let n = t.getAttribute(J$1);
39001
39001
  if (n === null) continue;
39002
39002
  e.preventDefault();
39003
39003
  let r = t.getRootNode().getElementById?.(n) ?? document.getElementById(n);
@@ -39005,25 +39005,25 @@ function ne$1(e) {
39005
39005
  return;
39006
39006
  }
39007
39007
  }
39008
- var X = null;
39008
+ var X$1 = null;
39009
39009
  function re$1() {
39010
- return X || (X = purify_default(window), X.addHook("beforeSanitizeAttributes", (e) => {
39010
+ return X$1 || (X$1 = purify_default(window), X$1.addHook("beforeSanitizeAttributes", (e) => {
39011
39011
  if (e.nodeName !== "A") return;
39012
- let t = q.exec(e.getAttribute("onclick") ?? "")?.[2];
39012
+ let t = q$1.exec(e.getAttribute("onclick") ?? "")?.[2];
39013
39013
  t !== void 0 && (e.removeAttribute("onclick"), e.setAttribute("data-pie-play-audio", t), te$1 || (te$1 = (document.addEventListener("click", ne$1), !0)));
39014
- }), X.addHook("afterSanitizeAttributes", v$1), X);
39014
+ }), X$1.addHook("afterSanitizeAttributes", v$1), X$1);
39015
39015
  }
39016
- var Z = 1e6;
39016
+ var Z$1 = 1e6;
39017
39017
  var Q$1 = /* @__PURE__ */ new Map();
39018
39018
  var $$1 = 0;
39019
39019
  function ie$1(t) {
39020
39020
  if (t == null || t === "" || !purify_default.isSupported) return "";
39021
39021
  let n = typeof t == "string" ? t : String(t), r = Q$1.get(n);
39022
39022
  if (r !== void 0) return r;
39023
- let i = String(re$1().sanitize(n, Y)), a = n.length + i.length;
39024
- if (a > Z) return i;
39023
+ let i = String(re$1().sanitize(n, Y$1)), a = n.length + i.length;
39024
+ if (a > Z$1) return i;
39025
39025
  for (let [e, t] of Q$1) {
39026
- if ($$1 + a <= Z) break;
39026
+ if ($$1 + a <= Z$1) break;
39027
39027
  Q$1.delete(e), $$1 -= e.length + t.length;
39028
39028
  }
39029
39029
  return Q$1.set(n, i), $$1 += a, i;
@@ -39172,82 +39172,82 @@ var oe = globalThis;
39172
39172
  var b = "PIE-MJX-CHTML-styles";
39173
39173
  var se = ["MJX-CHTML-styles", "MJX-SVG-styles"];
39174
39174
  var ce = re;
39175
- var x = "http://www.w3.org/1998/Math/MathML";
39176
- var le = /^([a-z_][\w.-]*):math$/;
39177
- var ue = /^[a-z][a-z0-9-]*$/;
39178
- function de(e) {
39175
+ var le = "http://www.w3.org/1998/Math/MathML";
39176
+ var ue = /^([a-z_][\w.-]*):math$/;
39177
+ var de = /^[a-z][a-z0-9-]*$/;
39178
+ function fe(e) {
39179
39179
  for (let t of e.querySelectorAll("*")) {
39180
- let n = le.exec(t.tagName.toLowerCase())?.[1];
39181
- !n || !e.contains(t) || t.closest("mjx-container") || t.replaceWith(S(t, `${n}:`));
39180
+ let n = ue.exec(t.tagName.toLowerCase())?.[1];
39181
+ !n || !e.contains(t) || t.closest("mjx-container") || t.replaceWith(pe(t, `${n}:`));
39182
39182
  }
39183
39183
  }
39184
- function S(e, t) {
39184
+ function pe(e, t) {
39185
39185
  let n = e.tagName.toLowerCase().slice(t.length);
39186
- if (!ue.test(n)) return e;
39187
- let r = e.ownerDocument.createElementNS(x, n);
39186
+ if (!de.test(n)) return e;
39187
+ let r = e.ownerDocument.createElementNS(le, n);
39188
39188
  for (let t of e.attributes) r.setAttribute(t.name, t.value);
39189
39189
  for (let n of [...e.childNodes]) {
39190
39190
  let e = n instanceof Element && n.tagName.toLowerCase().startsWith(t);
39191
- r.appendChild(e ? S(n, t) : n);
39191
+ r.appendChild(e ? pe(n, t) : n);
39192
39192
  }
39193
39193
  return r;
39194
39194
  }
39195
- var fe = /* @__PURE__ */ new Set([
39195
+ var me = /* @__PURE__ */ new Set([
39196
39196
  "updiagonalstrike",
39197
39197
  "downdiagonalstrike",
39198
39198
  "verticalstrike",
39199
39199
  "horizontalstrike"
39200
39200
  ]);
39201
- var pe = {
39201
+ var he = {
39202
39202
  thin: "0.035em",
39203
39203
  medium: "0.07em",
39204
39204
  thick: "0.14em"
39205
39205
  };
39206
- var me = {
39206
+ var ge = {
39207
39207
  tight: "0em",
39208
39208
  medium: "0.1em",
39209
39209
  loose: "0.2em"
39210
39210
  };
39211
- var he = /^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/;
39212
- var ge = /^(#[0-9a-f]{3,8}|[a-z]+)$/i;
39213
- var _e = /^(\d+(\.\d*)?|\.\d+)$/;
39214
- var ve = /* @__PURE__ */ new Set([
39211
+ var _e = /^(\d+(\.\d*)?|\.\d+)(em|ex|px|pt|pc|in|cm|mm)$/;
39212
+ var ve = /^(#[0-9a-f]{3,8}|[a-z]+)$/i;
39213
+ var ye = /^(\d+(\.\d*)?|\.\d+)$/;
39214
+ var be = /* @__PURE__ */ new Set([
39215
39215
  "mn",
39216
39216
  "mo",
39217
39217
  "mi",
39218
39218
  "mtext"
39219
39219
  ]);
39220
- var ye = /* @__PURE__ */ new Set([
39220
+ var xe = /* @__PURE__ */ new Set([
39221
39221
  "stackalign",
39222
39222
  "charalign",
39223
39223
  "charspacing",
39224
39224
  "longdivstyle"
39225
39225
  ]);
39226
- function C(e, t, n = [], r = {}) {
39227
- let i = e.createElementNS(x, t);
39226
+ function x(e, t, n = [], r = {}) {
39227
+ let i = e.createElementNS(le, t);
39228
39228
  for (let [e, t] of Object.entries(r)) i.setAttribute(e, t);
39229
39229
  for (let e of n) e && i.appendChild(e);
39230
39230
  return i;
39231
39231
  }
39232
- function w(e, t) {
39233
- let n = C(e.document, "mo");
39232
+ function S(e, t) {
39233
+ let n = x(e.document, "mo");
39234
39234
  return n.textContent = t, n;
39235
39235
  }
39236
- function be(e) {
39237
- let t = C(e.document, "mn");
39238
- return t.textContent = "0", C(e.document, "mphantom", [t]);
39236
+ function Se(e) {
39237
+ let t = x(e.document, "mn");
39238
+ return t.textContent = "0", x(e.document, "mphantom", [t]);
39239
39239
  }
39240
- function T(e, t) {
39240
+ function C(e, t) {
39241
39241
  return e.getAttribute(t)?.trim().toLowerCase() || void 0;
39242
39242
  }
39243
- function E(e, t) {
39243
+ function w(e, t) {
39244
39244
  let n = Number.parseInt(e.getAttribute(t) ?? "", 10);
39245
39245
  return Number.isFinite(n) ? n : 0;
39246
39246
  }
39247
- function D(e) {
39247
+ function T(e) {
39248
39248
  return e.localName === "none" || e.localName === "mrow" && e.children.length === 0 && !e.textContent?.trim();
39249
39249
  }
39250
- function O(e, t, n = e) {
39250
+ function E(e, t, n = e) {
39251
39251
  switch (t) {
39252
39252
  case "left": return 0;
39253
39253
  case "center": return Math.floor(e / 2);
@@ -39255,14 +39255,14 @@ function O(e, t, n = e) {
39255
39255
  default: return n;
39256
39256
  }
39257
39257
  }
39258
- function k(e, t, n) {
39258
+ function D(e, t, n) {
39259
39259
  let r = [], i, a, o = (e, t) => {
39260
39260
  let s = (e) => t.reduceRight((e, t) => {
39261
39261
  let n = t.cloneNode(!1);
39262
39262
  return n.appendChild(e), n;
39263
39263
  }, e);
39264
39264
  if (e.localName === "mstyle") for (let n of [...e.children]) o(n, [...t, e]);
39265
- else if (D(e)) r.push(null);
39265
+ else if (T(e)) r.push(null);
39266
39266
  else if (e.localName === "mn" && e.children.length === 0) {
39267
39267
  let t = [...(e.textContent ?? "").trim()];
39268
39268
  for (let a of t) {
@@ -39271,28 +39271,28 @@ function k(e, t, n) {
39271
39271
  t.textContent = a, r.push(s(t));
39272
39272
  }
39273
39273
  t.length && (a ?? (a = r.length));
39274
- } else ve.has(e.localName) && e.textContent?.trim() === n.decimalPoint && (i ?? (i = r.length)), r.push(s(e));
39274
+ } else be.has(e.localName) && e.textContent?.trim() === n.decimalPoint && (i ?? (i = r.length)), r.push(s(e));
39275
39275
  };
39276
39276
  for (let t of e) o(t, []);
39277
39277
  return {
39278
39278
  kind: "digits",
39279
39279
  cells: r,
39280
- anchor: O(r.length, n.stackAlign, i ?? a),
39280
+ anchor: E(r.length, n.stackAlign, i ?? a),
39281
39281
  position: t
39282
39282
  };
39283
39283
  }
39284
- function xe(e) {
39285
- return (e ?? "").toLowerCase().split(/\s+/).filter((e) => fe.has(e));
39284
+ function O(e) {
39285
+ return (e ?? "").toLowerCase().split(/\s+/).filter((e) => me.has(e));
39286
39286
  }
39287
- function Se(e, t) {
39288
- let n = [...e.children].filter((e) => !D(e));
39289
- return n.length <= 1 ? n[0] ?? null : C(t.document, "mrow", n);
39287
+ function Ce(e, t) {
39288
+ let n = [...e.children].filter((e) => !T(e));
39289
+ return n.length <= 1 ? n[0] ?? null : x(t.document, "mrow", n);
39290
39290
  }
39291
- function Ce(e, t, n) {
39292
- let r = T(e, "location") ?? "n", i = xe(e.getAttribute("crossout")), a = [...e.children].map((e) => D(e) ? null : e.localName === "mscarry" ? {
39293
- content: Se(e, n),
39294
- location: T(e, "location") ?? r,
39295
- crossout: e.hasAttribute("crossout") ? xe(e.getAttribute("crossout")) : i
39291
+ function we(e, t, n) {
39292
+ let r = C(e, "location") ?? "n", i = O(e.getAttribute("crossout")), a = [...e.children].map((e) => T(e) ? null : e.localName === "mscarry" ? {
39293
+ content: Ce(e, n),
39294
+ location: C(e, "location") ?? r,
39295
+ crossout: e.hasAttribute("crossout") ? O(e.getAttribute("crossout")) : i
39296
39296
  } : {
39297
39297
  content: e,
39298
39298
  location: r,
@@ -39301,60 +39301,60 @@ function Ce(e, t, n) {
39301
39301
  return {
39302
39302
  kind: "carries",
39303
39303
  carries: a,
39304
- anchor: O(a.length, n.stackAlign),
39304
+ anchor: E(a.length, n.stackAlign),
39305
39305
  position: t,
39306
- scale: _e.test(o) ? o : "0.6"
39306
+ scale: ye.test(o) ? o : "0.6"
39307
39307
  };
39308
39308
  }
39309
- function we(e) {
39310
- let t = T(e, "mslinethickness") ?? "medium", n = pe[t] ?? (he.test(t) ? t : "0.07em"), r = e.getAttribute("mathcolor")?.trim() ?? "";
39311
- return `${n} solid ${ge.test(r) ? r : "currentColor"}`;
39309
+ function k(e) {
39310
+ let t = C(e, "mslinethickness") ?? "medium", n = he[t] ?? (_e.test(t) ? t : "0.07em"), r = e.getAttribute("mathcolor")?.trim() ?? "";
39311
+ return `${n} solid ${ve.test(r) ? r : "currentColor"}`;
39312
39312
  }
39313
39313
  function Te(e, t, n) {
39314
- let r = Math.max(0, E(e, "length"));
39314
+ let r = Math.max(0, w(e, "length"));
39315
39315
  return {
39316
39316
  kind: "line",
39317
39317
  length: r,
39318
- anchor: O(r, n.stackAlign),
39318
+ anchor: E(r, n.stackAlign),
39319
39319
  position: t,
39320
- border: we(e)
39320
+ border: k(e)
39321
39321
  };
39322
39322
  }
39323
39323
  function A(e, t, n, r, i) {
39324
39324
  e.forEach((e, a) => {
39325
- let o = t + a * n + E(e, "position");
39325
+ let o = t + a * n + w(e, "position");
39326
39326
  switch (e.localName) {
39327
39327
  case "msgroup":
39328
- A([...e.children], o, E(e, "shift"), r, i);
39328
+ A([...e.children], o, w(e, "shift"), r, i);
39329
39329
  break;
39330
39330
  case "msline":
39331
39331
  i.push(Te(e, o, r));
39332
39332
  break;
39333
39333
  case "mscarries":
39334
- i.push(Ce(e, o, r));
39334
+ i.push(we(e, o, r));
39335
39335
  break;
39336
39336
  case "msrow":
39337
39337
  case "mrow":
39338
- i.push(k([...e.children], o, r));
39338
+ i.push(D([...e.children], o, r));
39339
39339
  break;
39340
- default: i.push(k([e], o, r));
39340
+ default: i.push(D([e], o, r));
39341
39341
  }
39342
39342
  });
39343
39343
  }
39344
39344
  function j(e) {
39345
39345
  return -e.anchor - e.position;
39346
39346
  }
39347
- function Ee(e) {
39347
+ function M(e) {
39348
39348
  return e.kind === "digits" ? e.cells.length : e.kind === "carries" ? e.carries.length : e.length;
39349
39349
  }
39350
- function De(e) {
39351
- return j(e) + Ee(e) - 1;
39350
+ function N(e) {
39351
+ return j(e) + M(e) - 1;
39352
39352
  }
39353
- function Oe(e, t, n, r) {
39354
- let i = (e) => C(r.document, "mpadded", [t], {
39353
+ function Ee(e, t, n, r) {
39354
+ let i = (e) => x(r.document, "mpadded", [t], {
39355
39355
  width: "0",
39356
39356
  ...e ? { lspace: e } : {}
39357
- }), a = (e, t) => C(r.document, e, t);
39357
+ }), a = (e, t) => x(r.document, e, t);
39358
39358
  switch (n) {
39359
39359
  case "s": return a("munder", [e, i("-0.5width")]);
39360
39360
  case "ne": return a("msup", [e, i()]);
@@ -39376,41 +39376,41 @@ function Oe(e, t, n, r) {
39376
39376
  default: return a("mover", [e, i("-0.5width")]);
39377
39377
  }
39378
39378
  }
39379
- function ke(e, t, n) {
39380
- let r = C(n.document, "menclose", [e], {
39379
+ function De(e, t, n) {
39380
+ let r = x(n.document, "menclose", [e], {
39381
39381
  notation: t.join(" "),
39382
39382
  "data-padding": "0.1em",
39383
39383
  "data-thickness": "0.067em"
39384
39384
  }), i = t.some((e) => e.endsWith("diagonalstrike")) ? .167 : t.includes("horizontalstrike") ? .1 : 0;
39385
- return i ? C(n.document, "mpadded", [r], {
39385
+ return i ? x(n.document, "mpadded", [r], {
39386
39386
  lspace: `-${i}em`,
39387
39387
  width: `-${2 * i}em`
39388
39388
  }) : r;
39389
39389
  }
39390
- function Ae(e, t, n, r, i) {
39391
- let a = e && t.crossout.length ? ke(e, t.crossout, i) : e;
39390
+ function Oe(e, t, n, r, i) {
39391
+ let a = e && t.crossout.length ? De(e, t.crossout, i) : e;
39392
39392
  if (!t.content) return a;
39393
- let o = C(i.document, "mstyle", [t.content], { scriptsizemultiplier: r });
39394
- return Oe(a ?? be(i), o, n, i);
39393
+ let o = x(i.document, "mstyle", [t.content], { scriptsizemultiplier: r });
39394
+ return Ee(a ?? Se(i), o, n, i);
39395
39395
  }
39396
- function je(e, t) {
39396
+ function P(e, t) {
39397
39397
  return e.carries[t - j(e)] ?? null;
39398
39398
  }
39399
- function Me(e, t, n, r) {
39399
+ function ke(e, t, n, r) {
39400
39400
  let i = e.content;
39401
39401
  n.forEach((e, a) => {
39402
- let o = n.length - 1 - a, s = n[o], c = je(s, t), l = n.slice(0, o).some((e) => je(e, t));
39402
+ let o = n.length - 1 - a, s = n[o], c = P(s, t), l = n.slice(0, o).some((e) => P(e, t));
39403
39403
  if (!c && !l) return;
39404
39404
  let u = c ?? {
39405
- content: be(r),
39405
+ content: Se(r),
39406
39406
  location: "n",
39407
39407
  crossout: []
39408
39408
  }, d = a === 0 ? u.location : "n";
39409
- i = Ae(i, u, d, s.scale, r);
39409
+ i = Oe(i, u, d, s.scale, r);
39410
39410
  }), e.content = i;
39411
39411
  }
39412
- function Ne(e, t) {
39413
- let n = e.filter((e) => Ee(e) > 0), r = Math.min(0, ...n.map(j)), i = Math.max(r, ...n.map(De)) - r + 1, a = -r, o = [], s = /* @__PURE__ */ new Map(), c = () => Array.from({ length: i }, () => ({
39412
+ function F(e, t) {
39413
+ let n = e.filter((e) => M(e) > 0), r = Math.min(0, ...n.map(j)), i = Math.max(r, ...n.map(N)) - r + 1, a = -r, o = [], s = /* @__PURE__ */ new Map(), c = () => Array.from({ length: i }, () => ({
39414
39414
  content: null,
39415
39415
  borders: {}
39416
39416
  })), l = (e) => e.length === 0 ? Array.from({ length: i }, (e, t) => t) : Array.from({ length: e.length }, (t, n) => a + j(e) + n), u = [], d = [], f = (e) => {
@@ -39418,7 +39418,7 @@ function Ne(e, t) {
39418
39418
  e.cells.forEach((t, r) => {
39419
39419
  n[a + j(e) + r].content = t;
39420
39420
  }), u.length && n.forEach((e, n) => {
39421
- Me(e, n - a, u, t);
39421
+ ke(e, n - a, u, t);
39422
39422
  });
39423
39423
  for (let e of d) for (let t of l(e)) n[t].borders.top = e.border;
39424
39424
  u = [], d = [], s.set(e, o.length), o.push(n);
@@ -39438,43 +39438,43 @@ function Ne(e, t) {
39438
39438
  origin: a
39439
39439
  };
39440
39440
  }
39441
- function Pe(e, { rows: t }, n) {
39442
- let r = C(n.document, "mtable", t.map((e) => C(n.document, "mtr", e.map((e) => {
39441
+ function Ae(e, { rows: t }, n) {
39442
+ let r = x(n.document, "mtable", t.map((e) => x(n.document, "mtr", e.map((e) => {
39443
39443
  let t = Object.entries(e.borders).map(([e, t]) => `border-${e}:${t}`).join(";");
39444
- return C(n.document, "mtd", [e.content], {
39444
+ return x(n.document, "mtd", [e.content], {
39445
39445
  ...t ? { style: t } : {},
39446
39446
  ...e.align ? { columnalign: e.align } : {}
39447
39447
  });
39448
39448
  }))));
39449
- for (let { name: t, value: n } of [...e.attributes]) ye.has(t) || r.setAttribute(t, n);
39450
- let i = T(e, "charspacing") ?? "medium", a = T(e, "charalign");
39451
- return r.setAttribute("columnspacing", me[i] ?? (he.test(i) ? i : me.medium)), r.setAttribute("columnalign", a === "left" || a === "center" ? a : "right"), r.setAttribute("rowspacing", "0"), r.setAttribute("align", e.getAttribute("align") ?? "baseline"), r;
39449
+ for (let { name: t, value: n } of [...e.attributes]) xe.has(t) || r.setAttribute(t, n);
39450
+ let i = C(e, "charspacing") ?? "medium", a = C(e, "charalign");
39451
+ return r.setAttribute("columnspacing", ge[i] ?? (_e.test(i) ? i : ge.medium)), r.setAttribute("columnalign", a === "left" || a === "center" ? a : "right"), r.setAttribute("rowspacing", "0"), r.setAttribute("align", e.getAttribute("align") ?? "baseline"), r;
39452
39452
  }
39453
- function Fe(e) {
39453
+ function je(e) {
39454
39454
  return {
39455
39455
  document: e.ownerDocument,
39456
- stackAlign: T(e, "stackalign") ?? "decimalpoint",
39456
+ stackAlign: C(e, "stackalign") ?? "decimalpoint",
39457
39457
  decimalPoint: e.closest("[decimalpoint]")?.getAttribute("decimalpoint")?.trim().charAt(0) || "."
39458
39458
  };
39459
39459
  }
39460
- function Ie(e) {
39461
- let t = Fe(e), n = [];
39462
- return A([...e.children], 0, 0, t, n), Pe(e, Ne(n, t), t);
39460
+ function Me(e) {
39461
+ let t = je(e), n = [];
39462
+ return A([...e.children], 0, 0, t, n), Ae(e, F(n, t), t);
39463
39463
  }
39464
- function M(e, t, n, r, i, a) {
39464
+ function I(e, t, n, r, i, a) {
39465
39465
  for (let o = n; o <= r; o++) e[t][o].borders[i] = a;
39466
39466
  }
39467
- function Le(e, t) {
39468
- let n = w(t, ")");
39469
- return n.setAttribute("minsize", "1.2em"), [C(t.document, "mrow", [e, C(t.document, "mspace", [], { width: "0.2em" })]), C(t.document, "mpadded", [n], {
39467
+ function Ne(e, t) {
39468
+ let n = S(t, ")");
39469
+ return n.setAttribute("minsize", "1.2em"), [x(t.document, "mrow", [e, x(t.document, "mspace", [], { width: "0.2em" })]), x(t.document, "mpadded", [n], {
39470
39470
  voffset: "0.1em",
39471
39471
  lspace: "-0.15em",
39472
39472
  depth: "-0.2em",
39473
39473
  height: "-0.2em"
39474
39474
  })];
39475
39475
  }
39476
- function Re(e) {
39477
- let t = Fe(e), [n, r, ...i] = [...e.children], a = n && !D(n) ? n : null, o = r && !D(r) ? r : null, s = T(e, "longdivstyle") ?? "lefttop", c = we(e), l = [];
39476
+ function Pe(e) {
39477
+ let t = je(e), [n, r, ...i] = [...e.children], a = n && !T(n) ? n : null, o = r && !T(r) ? r : null, s = C(e, "longdivstyle") ?? "lefttop", c = k(e), l = [];
39478
39478
  A(i, 0, 0, t, l);
39479
39479
  let u = l.find((e) => e.kind === "digits");
39480
39480
  u || (u = {
@@ -39487,51 +39487,51 @@ function Re(e) {
39487
39487
  u.cells.unshift(...e), u.anchor += e.length;
39488
39488
  }, p = (...e) => {
39489
39489
  let n = e.flatMap((e) => e ? e.localName === "mrow" ? [...e.children] : [e] : []);
39490
- u.cells.push(...k(n, 0, t).cells);
39490
+ u.cells.push(...D(n, 0, t).cells);
39491
39491
  };
39492
39492
  switch (s) {
39493
39493
  case "left/\\right":
39494
- f(a, w(t, "/")), p(w(t, "\\"), o);
39494
+ f(a, S(t, "/")), p(S(t, "\\"), o);
39495
39495
  break;
39496
39496
  case "left)(right":
39497
- f(a, w(t, ")")), p(w(t, "("), o);
39497
+ f(a, S(t, ")")), p(S(t, "("), o);
39498
39498
  break;
39499
39499
  case ":right=right":
39500
- p(w(t, ":"), a, w(t, "="), o);
39500
+ p(S(t, ":"), a, S(t, "="), o);
39501
39501
  break;
39502
39502
  case "righttop":
39503
39503
  case "stackedleftlinetop":
39504
39504
  case "lefttop":
39505
- o && A([o], 0, 0, t, d), l.splice(l.indexOf(u), 0, ...d), s === "righttop" ? p(a) : s === "stackedleftlinetop" ? f(a) : f(...Le(a, t));
39505
+ o && A([o], 0, 0, t, d), l.splice(l.indexOf(u), 0, ...d), s === "righttop" ? p(a) : s === "stackedleftlinetop" ? f(a) : f(...Ne(a, t));
39506
39506
  break;
39507
39507
  }
39508
- let m = Ne(l, t), h = m.rows, g = m.rowOf.get(u) ?? 0, _ = (e) => m.origin + j(u) + e, v = Math.max(_(u.cells.length - 1), ...d.map((e) => m.origin + De(e)));
39508
+ let m = F(l, t), h = m.rows, g = m.rowOf.get(u) ?? 0, _ = (e) => m.origin + j(u) + e, v = Math.max(_(u.cells.length - 1), ...d.map((e) => m.origin + N(e)));
39509
39509
  switch (s) {
39510
39510
  case "left/\\right":
39511
39511
  case "left)(right":
39512
39512
  case ":right=right": break;
39513
39513
  case "righttop": {
39514
39514
  let e = h[g][_(u.cells.length - 1)];
39515
- e.borders.left = c, e.borders.bottom = c, M(h, g, _(0), _(u.cells.length - 1), "top", c);
39515
+ e.borders.left = c, e.borders.bottom = c, I(h, g, _(0), _(u.cells.length - 1), "top", c);
39516
39516
  break;
39517
39517
  }
39518
39518
  case "stackedleftlinetop": {
39519
39519
  let e = h[g][_(0)];
39520
- e.borders.right = c, e.borders.bottom = c, M(h, g, _(1), v, "top", c);
39520
+ e.borders.right = c, e.borders.bottom = c, I(h, g, _(1), v, "top", c);
39521
39521
  break;
39522
39522
  }
39523
39523
  case "stackedrightright":
39524
39524
  case "mediumstackedrightright":
39525
39525
  case "shortstackedrightright":
39526
39526
  case "stackedleftleft":
39527
- ze(h, g, s, a, o, c, t);
39527
+ Fe(h, g, s, a, o, c, t);
39528
39528
  break;
39529
- default: M(h, g, _(1), v, "top", c);
39529
+ default: I(h, g, _(1), v, "top", c);
39530
39530
  }
39531
- return Pe(e, m, t);
39531
+ return Ae(e, m, t);
39532
39532
  }
39533
- function ze(e, t, n, r, i, a, o) {
39534
- let s = n === "stackedleftleft", c = s ? "right" : "left", l = (e) => e && C(o.document, "mpadded", [e], {
39533
+ function Fe(e, t, n, r, i, a, o) {
39534
+ let s = n === "stackedleftleft", c = s ? "right" : "left", l = (e) => e && x(o.document, "mpadded", [e], {
39535
39535
  lspace: "0.2em",
39536
39536
  width: "+0.4em"
39537
39537
  });
@@ -39550,135 +39550,423 @@ function ze(e, t, n, r, i, a, o) {
39550
39550
  }) : o === t + 1 ? (u.content = l(i), n !== "shortstackedrightright" && (u.borders[c] = a)) : o > t + 1 && (n === "stackedrightright" || s) && (u.borders[c] = a), s ? e.unshift(u) : e.push(u);
39551
39551
  });
39552
39552
  }
39553
- function Be(e) {
39554
- for (let t of [...e.querySelectorAll("mstack, mlongdiv")]) !t.closest("math") || t.closest("mjx-container") || t.replaceWith(t.localName === "mstack" ? Ie(t) : Re(t));
39555
- }
39556
- var Ve = "PIE-MJX-explorer-styles";
39557
- var N = "var(--pie-text, black)";
39558
- var He = "var(--pie-background, #ffffff)";
39559
- var Ue = "var(--pie-border-dark, #66686A)";
39560
- var P = "var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))";
39561
- var F = `color-mix(in srgb, ${P} 15%, transparent)`;
39562
- var We = `
39553
+ function Ie(e) {
39554
+ for (let t of [...e.querySelectorAll("mstack, mlongdiv")]) !t.closest("math") || t.closest("mjx-container") || t.replaceWith(t.localName === "mstack" ? Me(t) : Pe(t));
39555
+ }
39556
+ var Le = "PIE-MJX-explorer-styles";
39557
+ var L = "var(--pie-text, black)";
39558
+ var Re = "var(--pie-background, #ffffff)";
39559
+ var ze = "var(--pie-border-dark, #66686A)";
39560
+ var R = "var(--pie-focus-outline, var(--pie-button-focus-outline, var(--pie-focus-checked-border, #1565C0)))";
39561
+ var z = `color-mix(in srgb, ${R} 15%, transparent)`;
39562
+ var Be = `
39563
39563
  :root mjx-container [data-sre-highlight-1]:not([data-mjx-collapsed], rect) {
39564
- color: ${N} !important;
39565
- fill: ${N} !important;
39564
+ color: ${L} !important;
39565
+ fill: ${L} !important;
39566
39566
  }
39567
39567
  :root mjx-container:not([data-mjx-clone-container]) [data-sre-highlight-1]:not([data-sre-enclosed], rect) {
39568
- background-color: ${F} !important;
39568
+ background-color: ${z} !important;
39569
39569
  }
39570
39570
  :root mjx-container rect[data-sre-highlight-1]:not([data-sre-enclosed]) {
39571
- fill: ${F} !important;
39571
+ fill: ${z} !important;
39572
39572
  }
39573
39573
  :root mjx-container .mjx-selected {
39574
- outline: 2px solid ${P} !important;
39574
+ outline: 2px solid ${R} !important;
39575
39575
  }
39576
39576
  :root mjx-container [data-sre-highlight-2] {
39577
- color: ${N} !important;
39577
+ color: ${L} !important;
39578
39578
  background-color: transparent !important;
39579
- fill: ${N} !important;
39580
- outline: 2px dashed ${P} !important;
39579
+ fill: ${L} !important;
39580
+ outline: 2px dashed ${R} !important;
39581
39581
  }
39582
39582
  :root mjx-container rect[data-sre-highlight-2] {
39583
39583
  fill: transparent !important;
39584
- stroke: ${P} !important;
39584
+ stroke: ${R} !important;
39585
39585
  stroke-width: 2px !important;
39586
39586
  vector-effect: non-scaling-stroke;
39587
39587
  }
39588
39588
  :root .MJX_LiveRegion, :root .MJX_HoverRegion, :root .MJX_ToolTip {
39589
- color: ${N} !important;
39590
- background-color: ${He} !important;
39591
- border-color: ${Ue} !important;
39589
+ color: ${L} !important;
39590
+ background-color: ${Re} !important;
39591
+ border-color: ${ze} !important;
39592
39592
  }
39593
39593
  :root .MJX_LiveRegion > div, :root .MJX_HoverRegion > div {
39594
- color: ${N} !important;
39595
- background-color: ${F} !important;
39594
+ color: ${L} !important;
39595
+ background-color: ${z} !important;
39596
39596
  }
39597
39597
  `;
39598
- function Ge(e = document) {
39598
+ function Ve(e = document) {
39599
39599
  if (e.getElementById("PIE-MJX-explorer-styles")) return;
39600
39600
  let t = e.createElement("style");
39601
- t.id = Ve, t.textContent = We, e.head.appendChild(t);
39601
+ t.id = Le, t.textContent = Be, e.head.appendChild(t);
39602
+ }
39603
+ var He = /[⁡-⁤]/g;
39604
+ var Ue = {
39605
+ "+": "positive",
39606
+ "-": "negative",
39607
+ "−": "negative",
39608
+ "±": "plus or minus",
39609
+ "∓": "minus or plus"
39610
+ };
39611
+ var We = {
39612
+ "(": "open parenthesis",
39613
+ "[": "open bracket",
39614
+ "{": "open brace",
39615
+ "⟨": "open angle bracket",
39616
+ "⌊": "open floor",
39617
+ "⌈": "open ceiling"
39618
+ };
39619
+ var Ge = {
39620
+ ")": "close parenthesis",
39621
+ "]": "close bracket",
39622
+ "}": "close brace",
39623
+ "⟩": "close angle bracket",
39624
+ "⌋": "close floor",
39625
+ "⌉": "close ceiling"
39626
+ };
39627
+ var B = {
39628
+ "!": "factorial",
39629
+ "%": "percent",
39630
+ "°": "degrees",
39631
+ "′": "prime",
39632
+ "″": "double prime"
39633
+ };
39634
+ var Ke = {
39635
+ "+": "plus",
39636
+ "-": "minus",
39637
+ "−": "minus",
39638
+ "±": "plus or minus",
39639
+ "∓": "minus or plus",
39640
+ "×": "times",
39641
+ "⋅": "times",
39642
+ "·": "times",
39643
+ "*": "times",
39644
+ "÷": "divided by",
39645
+ "/": "divided by",
39646
+ "=": "equals",
39647
+ "≠": "does not equal",
39648
+ "<": "is less than",
39649
+ ">": "is greater than",
39650
+ "≤": "is less than or equal to",
39651
+ "≥": "is greater than or equal to",
39652
+ "≈": "is approximately equal to",
39653
+ "≡": "is equivalent to",
39654
+ "∝": "is proportional to",
39655
+ "∈": "is an element of",
39656
+ "∉": "is not an element of",
39657
+ "⊂": "is a subset of",
39658
+ "⊆": "is a subset of or equal to",
39659
+ "∪": "union",
39660
+ "∩": "intersection",
39661
+ "→": "right arrow",
39662
+ "←": "left arrow",
39663
+ "⇒": "implies",
39664
+ "⇔": "if and only if",
39665
+ "∑": "sum",
39666
+ "∏": "product",
39667
+ "∫": "integral",
39668
+ "∞": "infinity",
39669
+ "∠": "angle",
39670
+ "⊥": "is perpendicular to",
39671
+ "∥": "is parallel to",
39672
+ "∴": "therefore",
39673
+ ",": "comma",
39674
+ ";": "semicolon",
39675
+ ":": "colon",
39676
+ "|": "vertical bar",
39677
+ "‖": "double vertical bar",
39678
+ ...We,
39679
+ ...Ge,
39680
+ ...B
39681
+ };
39682
+ var qe = /* @__PURE__ */ new Set(["|", "‖"]);
39683
+ var Je = /* @__PURE__ */ new Set([
39684
+ "∑",
39685
+ "∏",
39686
+ "∫",
39687
+ "∪",
39688
+ "∩"
39689
+ ]);
39690
+ var Ye = {
39691
+ α: "alpha",
39692
+ β: "beta",
39693
+ γ: "gamma",
39694
+ δ: "delta",
39695
+ ε: "epsilon",
39696
+ θ: "theta",
39697
+ λ: "lambda",
39698
+ μ: "mu",
39699
+ π: "pi",
39700
+ ρ: "rho",
39701
+ σ: "sigma",
39702
+ τ: "tau",
39703
+ φ: "phi",
39704
+ ω: "omega",
39705
+ Δ: "capital delta",
39706
+ Σ: "capital sigma",
39707
+ Ω: "capital omega",
39708
+ "∞": "infinity",
39709
+ sin: "sine",
39710
+ cos: "cosine",
39711
+ tan: "tangent",
39712
+ sec: "secant",
39713
+ csc: "cosecant",
39714
+ cot: "cotangent",
39715
+ ln: "natural log",
39716
+ lim: "limit"
39717
+ };
39718
+ var Xe = {
39719
+ "¯": "bar",
39720
+ "‾": "bar",
39721
+ "―": "bar",
39722
+ "^": "hat",
39723
+ ˆ: "hat",
39724
+ "~": "tilde",
39725
+ "˜": "tilde",
39726
+ "→": "vector",
39727
+ "⃗": "vector",
39728
+ "˙": "dot"
39729
+ };
39730
+ var V = (e) => (e.textContent ?? "").replace(He, "").replace(/\s+/g, " ").trim();
39731
+ var H = (e) => e.replace(/\s+/g, " ").trim();
39732
+ var U = (e) => [...e.children];
39733
+ function W(e) {
39734
+ return !e || [
39735
+ "mn",
39736
+ "mi",
39737
+ "mtext",
39738
+ "mo"
39739
+ ].includes(e.localName) ? !0 : ["mrow", "mstyle"].includes(e.localName) && e.children.length === 1 ? W(e.children[0]) : !1;
39740
+ }
39741
+ function Ze(e) {
39742
+ let t = e ? V(e) : "";
39743
+ return /^\d{1,3}$/.test(t) ? Number(t) : void 0;
39744
+ }
39745
+ function Qe(e) {
39746
+ return `${e}${e % 100 >= 11 && e % 100 <= 13 ? "th" : {
39747
+ 1: "st",
39748
+ 2: "nd",
39749
+ 3: "rd"
39750
+ }[e % 10] ?? "th"}`;
39751
+ }
39752
+ function $e(e) {
39753
+ return Ye[e] ?? e;
39754
+ }
39755
+ function G(e) {
39756
+ return Ke[e] ?? e;
39757
+ }
39758
+ function K(e) {
39759
+ let t = [], n = !1;
39760
+ for (let r of e) {
39761
+ if (r.localName !== "mo") {
39762
+ t.push(q(r)), n = !0;
39763
+ continue;
39764
+ }
39765
+ let e = V(r);
39766
+ e && (!n && Ue[e] ? t.push(Ue[e]) : e in B ? t.push(B[e]) : (t.push(G(e)), n = e in Ge || qe.has(e) && n));
39767
+ }
39768
+ return t.filter(Boolean).join(" ");
39769
+ }
39770
+ function et(e) {
39771
+ let [t, ...n] = e, r = n[n.length - 1], i = (e) => e?.localName === "mo" && ["|", "‖"].includes(V(e)), a = n.slice(0, -1);
39772
+ if (a.length && i(t) && i(r) && V(t) === V(r) && !a.some(i)) {
39773
+ let e = H(K(a));
39774
+ return V(t) === "|" ? `absolute value of ${e} end absolute value` : `norm of ${e} end norm`;
39775
+ }
39776
+ return K(e);
39777
+ }
39778
+ function tt(e, t) {
39779
+ let n = e ? q(e) : "", r = t ? q(t) : "";
39780
+ return W(e) && W(t) ? `${n} over ${r}` : `the fraction with numerator ${n} and denominator ${r}`;
39781
+ }
39782
+ function nt(e, t, n) {
39783
+ return n ? `${t} of ${e}` : `${t} of ${e} end root`;
39784
+ }
39785
+ function rt(e, t) {
39786
+ let n = t ? V(t) : "";
39787
+ if (t && W(t)) {
39788
+ if (n === "2") return `${e} squared`;
39789
+ if (n === "3") return `${e} cubed`;
39790
+ if (n in B) return `${e} ${B[n]}`;
39791
+ }
39792
+ let r = t ? q(t) : "";
39793
+ return W(t) ? `${e} to the power of ${r}` : `${e} to the power of ${r} end power`;
39602
39794
  }
39603
- var I = Symbol.for("@pie-element/shared-math-rendering-mathjax/speech-worker-failed");
39604
- function Ke() {
39795
+ function it(e, t) {
39796
+ let n = t ? q(t) : "";
39797
+ return W(t) ? `${e} sub ${n}` : `${e} sub ${n} end sub`;
39798
+ }
39799
+ function at(e, t, n) {
39800
+ let r = V(e);
39801
+ if (r === "lim") return `limit as ${t ? q(t) : ""} of`;
39802
+ if (!Je.has(r)) return;
39803
+ let i = t ? `from ${q(t)}` : "", a = n ? `to ${q(n)}` : "";
39804
+ return `${G(r)} ${i} ${a} of`;
39805
+ }
39806
+ function ot(e) {
39807
+ let t = U(e).filter((e) => ["mtr", "mlabeledtr"].includes(e.localName)), n = t.map((e) => U(e).filter((e) => e.localName === "mtd")), r = Math.max(0, ...n.map((e) => e.length)), i = n.map((e, t) => `row ${t + 1}: ${e.map((e) => H(K(U(e)))).join(", ")}`);
39808
+ return `table with ${t.length} ${t.length === 1 ? "row" : "rows"} and ${r} ${r === 1 ? "column" : "columns"}. ${i.join(". ")}`;
39809
+ }
39810
+ function st(e) {
39811
+ let t = e.getAttribute("open") ?? "(", n = e.getAttribute("close") ?? ")", r = (e.getAttribute("separators") ?? ",").replace(/\s+/g, "").split(""), i = U(e).map((e, t, n) => t < n.length - 1 ? `${q(e)} ${G(r[Math.min(t, r.length - 1)] ?? ",")}` : q(e));
39812
+ return [
39813
+ G(t),
39814
+ ...i,
39815
+ G(n)
39816
+ ].filter(Boolean).join(" ");
39817
+ }
39818
+ function q(e) {
39819
+ let t = U(e);
39820
+ switch (e.localName) {
39821
+ case "mi": return $e(V(e));
39822
+ case "mn":
39823
+ case "mtext":
39824
+ case "ms": return V(e);
39825
+ case "mo": return G(V(e));
39826
+ case "mspace":
39827
+ case "mphantom":
39828
+ case "annotation":
39829
+ case "annotation-xml": return "";
39830
+ case "semantics": return t[0] ? q(t[0]) : "";
39831
+ case "mfrac": return tt(t[0], t[1]);
39832
+ case "msqrt": return nt(H(K(t)), "square root", t.length === 1 && W(t[0]));
39833
+ case "mroot": {
39834
+ let e = Ze(t[1]), n = e === 2 ? "square root" : e === 3 ? "cube root" : e ? `${Qe(e)} root` : `root with index ${t[1] ? q(t[1]) : ""}`;
39835
+ return nt(t[0] ? q(t[0]) : "", n, W(t[0]));
39836
+ }
39837
+ case "msup": return rt(t[0] ? q(t[0]) : "", t[1]);
39838
+ case "msub": return it(t[0] ? q(t[0]) : "", t[1]);
39839
+ case "msubsup": return (t[0] ? at(t[0], t[1], t[2]) : void 0) || rt(it(t[0] ? q(t[0]) : "", t[1]), t[2]);
39840
+ case "munder":
39841
+ case "mover":
39842
+ case "munderover": {
39843
+ let [n, r, i] = t, a = e.localName === "mover" ? void 0 : r, o = e.localName === "munder" ? void 0 : e.localName === "mover" ? r : i, s = n ? at(n, a, o) : void 0;
39844
+ if (s) return s;
39845
+ let c = n ? q(n) : "", l = e.localName === "mover" && r ? Xe[V(r)] : void 0;
39846
+ return l ? l === "vector" ? `vector ${c}` : `${c} ${l}` : [
39847
+ c,
39848
+ a ? `with ${q(a)} below` : "",
39849
+ o ? `with ${q(o)} above` : ""
39850
+ ].filter(Boolean).join(" ");
39851
+ }
39852
+ case "mfenced": return st(e);
39853
+ case "mtable": return ot(e);
39854
+ case "mrow":
39855
+ case "math": return et(t);
39856
+ default: return t.length ? K(t) : V(e);
39857
+ }
39858
+ }
39859
+ function ct(e) {
39860
+ return H(q(e));
39861
+ }
39862
+ var lt = [
39863
+ "a[href]",
39864
+ "button",
39865
+ "label",
39866
+ "summary",
39867
+ ...[
39868
+ "button",
39869
+ "checkbox",
39870
+ "combobox",
39871
+ "link",
39872
+ "menuitem",
39873
+ "menuitemcheckbox",
39874
+ "menuitemradio",
39875
+ "option",
39876
+ "radio",
39877
+ "switch",
39878
+ "tab",
39879
+ "treeitem"
39880
+ ].map((e) => `[role="${e}"]`)
39881
+ ].join(", ");
39882
+ function ut(e) {
39883
+ if (e.hasAttribute("aria-label") || !e.closest(lt)) return;
39884
+ let t = e.querySelector("math"), n = t ? ct(t) : "";
39885
+ n && e.setAttribute("aria-label", n);
39886
+ }
39887
+ function J(e) {
39888
+ for (let t of e.querySelectorAll("mjx-container")) ut(t);
39889
+ }
39890
+ var dt = Symbol.for("@pie-element/shared-math-rendering-mathjax/speech-worker-failed");
39891
+ function ft() {
39605
39892
  let e = globalThis;
39606
- e[I] || (e[I] = !0, console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${t}`));
39893
+ e[dt] || (e[dt] = !0, console.warn(`[math-rendering] MathJax's speech worker did not start, so speech, braille and the explorer are off. A content security policy must allow blob: workers, and scripts and fetches from the asset root. See ${t}`));
39607
39894
  }
39608
- function qe(e) {
39895
+ function pt(e) {
39609
39896
  let t = e.webworker;
39610
39897
  if (!t || t.ready) return;
39611
39898
  e.options ?? (e.options = {});
39612
39899
  let n = e.options;
39613
- n.enableSpeech = !1, n.enableBraille = !1, n.speechError = () => {}, t.Post = () => Promise.reject(/* @__PURE__ */ Error("The speech worker did not start")), t.Terminate(), Ke();
39900
+ n.enableSpeech = !1, n.enableBraille = !1, n.speechError = () => {}, t.Post = () => Promise.reject(/* @__PURE__ */ Error("The speech worker did not start")), t.Terminate(), ft();
39614
39901
  }
39615
- function Je(e) {
39902
+ function mt(e) {
39616
39903
  let t = e?.adaptor, n = t?.createWorker;
39617
39904
  !e || !t || !n || (t.createWorker = async (r, i) => {
39618
39905
  let a = await n.call(t, r, i);
39619
- return a.addEventListener("error", () => qe(e), { once: !0 }), a;
39906
+ return a.addEventListener("error", () => pt(e), { once: !0 }), a;
39620
39907
  });
39621
39908
  }
39622
39909
  `${i}`;
39623
- var Ye = {
39910
+ var ht = {
39624
39911
  parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
39625
39912
  overarc: "\\overparen",
39626
39913
  napprox: "\\not\\approx",
39627
39914
  longdiv: "\\enclose{longdiv}",
39628
39915
  abs: ["\\left|#1\\right|", 1]
39629
39916
  };
39630
- var Xe = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)";
39631
- var Ze = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/;
39632
- var Qe = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/;
39633
- var $e = /\\embed\{newLine\}\[\]/g;
39634
- var et = [
39917
+ var gt = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)";
39918
+ var _t = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/;
39919
+ var vt = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/;
39920
+ var yt = /\\embed\{newLine\}\[\]/g;
39921
+ var bt = [
39635
39922
  ["$$", "$$"],
39636
39923
  ["$", "$"],
39637
39924
  ["\\[", "\\]"],
39638
39925
  ["\\(", "\\)"]
39639
39926
  ];
39640
- var L = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
39641
- var tt = "MJX-CHTML-styles";
39642
- var nt = "PIE-MJX-SVG-styles";
39643
- var R = "PIE-MathJax-Menu-Settings";
39644
- var rt = { "mjx-container[overflow=\"linebreak\"][display]": {
39927
+ var xt = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading");
39928
+ var St = "MJX-CHTML-styles";
39929
+ var Ct = "PIE-MJX-SVG-styles";
39930
+ var Y = "PIE-MathJax-Menu-Settings";
39931
+ var wt = { "mjx-container[overflow=\"linebreak\"][display]": {
39645
39932
  overflow: "auto clip",
39646
39933
  "min-width": "initial !important"
39647
39934
  } };
39648
- var it = 200;
39649
- var at = 201;
39650
- function z(e) {
39935
+ var Tt = 200;
39936
+ var Et = 201;
39937
+ var Dt = 202;
39938
+ function X(e) {
39651
39939
  let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
39652
39940
  for (let e of t) for (let t of [e, ...e.querySelectorAll("[data-latex],[data-latex-item]")]) t.removeAttribute("data-latex"), t.removeAttribute("data-latex-item");
39653
39941
  }
39654
- function B(e) {
39655
- for (let [t, n] of et) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
39942
+ function Ot(e) {
39943
+ for (let [t, n] of bt) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
39656
39944
  return e;
39657
39945
  }
39658
- function ot(e) {
39659
- return B(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
39946
+ function kt(e) {
39947
+ return Ot(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
39660
39948
  }
39661
- var st = "mathjax_ignore";
39662
- var V = "mathjax_process";
39663
- function ct(e, t) {
39664
- let n = e.closest(`.${st}, .${V}`);
39665
- return n !== null && t.contains(n) && !n.classList.contains(V);
39949
+ var At = "mathjax_ignore";
39950
+ var jt = "mathjax_process";
39951
+ function Mt(e, t) {
39952
+ let n = e.closest(`.${At}, .${jt}`);
39953
+ return n !== null && t.contains(n) && !n.classList.contains(jt);
39666
39954
  }
39667
- function lt(e) {
39955
+ function Nt(e) {
39668
39956
  for (let t of e.querySelectorAll("[data-latex]")) {
39669
- if (t.dataset.mathHandled || t.closest("mjx-container") || ct(t, e)) continue;
39957
+ if (t.dataset.mathHandled || t.closest("mjx-container") || Mt(t, e)) continue;
39670
39958
  let n = t.textContent;
39671
- n && (t.textContent = `\\(${ot(n)}\\)`.replace($e, "\\newline "), t.dataset.mathHandled = "true");
39959
+ n && (t.textContent = `\\(${kt(n)}\\)`.replace(yt, "\\newline "), t.dataset.mathHandled = "true");
39672
39960
  }
39673
39961
  }
39674
- function ut(e) {
39962
+ function Pt(e) {
39675
39963
  for (let t of e.querySelectorAll("math")) t.closest("mjx-container") || t.setAttribute("displaystyle", "true");
39676
39964
  }
39677
- function dt(e, t) {
39965
+ function Ft(e, t) {
39678
39966
  for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
39679
- return (t ? Qe : Ze).test(e.textContent ?? "");
39967
+ return (t ? vt : _t).test(e.textContent ?? "");
39680
39968
  }
39681
- function ft(e) {
39969
+ function It(e) {
39682
39970
  return new Promise((t, n) => {
39683
39971
  let { useSingleDollar: r = !1, accessibility: i = !0, loadFonts: a = !0, srcUrl: o } = e, s = d(e, import.meta.url), c = {
39684
39972
  loader: {
@@ -39686,17 +39974,17 @@ function ft(e) {
39686
39974
  failed: (e) => n(e),
39687
39975
  "output/svg": { ready: (e) => {
39688
39976
  let t = y();
39689
- return pt(t) && mt(t), e;
39977
+ return Lt(t) && Rt(t), e;
39690
39978
  } }
39691
39979
  },
39692
39980
  startup: {
39693
39981
  typeset: !1,
39694
39982
  ready: () => {
39695
- let e = y(), r = e?.startup, i = pt(e);
39696
- i && (mt(e), ht(e, s.speechLocales), f(e?._?.a11y?.sre_ts?.locales, s.speechLocales)), r?.defaultReady?.(), i && (gt(r?.document), r?.document?.addStyles?.(rt), Je(r?.document)), Promise.resolve(r?.promise).then(() => t(), n);
39983
+ let e = y(), r = e?.startup, i = Lt(e);
39984
+ i && (Rt(e), zt(e, s.speechLocales), f(e?._?.a11y?.sre_ts?.locales, s.speechLocales)), r?.defaultReady?.(), i && (Bt(r?.document), Vt(r?.document), r?.document?.addStyles?.(wt), mt(r?.document)), Promise.resolve(r?.promise).then(() => t(), n);
39697
39985
  }
39698
39986
  },
39699
- tex: { macros: { ...Ye } },
39987
+ tex: { macros: { ...ht } },
39700
39988
  output: { displayOverflow: "linebreak" },
39701
39989
  options: {
39702
39990
  enableMenu: i,
@@ -39708,7 +39996,7 @@ function ft(e) {
39708
39996
  a11y: { inTabOrder: !1 }
39709
39997
  }
39710
39998
  };
39711
- r && c.tex && (console.warn(Xe), c.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], c.tex.processEscapes = !0), a || (c.chtml = { fontURL: "" });
39999
+ r && c.tex && (console.warn(gt), c.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], c.tex.processEscapes = !0), a || (c.chtml = { fontURL: "" });
39712
40000
  let l = p(s.speechLocales);
39713
40001
  l && c.options && (c.options.sre = { locale: l }), ae(c, {
39714
40002
  ...s,
@@ -39718,77 +40006,86 @@ function ft(e) {
39718
40006
  }, n);
39719
40007
  });
39720
40008
  }
39721
- function pt(e) {
40009
+ function Lt(e) {
39722
40010
  return !!e?.version?.startsWith("4.");
39723
40011
  }
39724
- function mt(e) {
40012
+ function Rt(e) {
39725
40013
  let t = e?._?.output, n = t?.chtml_ts?.CHTML;
39726
40014
  n && (n.STYLESHEETID = b);
39727
40015
  let r = t?.svg_ts?.SVG;
39728
- r && (r.STYLESHEETID = nt);
40016
+ r && (r.STYLESHEETID = Ct);
39729
40017
  }
39730
- function ht(e, t) {
40018
+ function zt(e, t) {
39731
40019
  let n = e?._?.ui?.menu?.Menu?.Menu;
39732
40020
  if (n) {
39733
- n.MENU_STORAGE = R;
40021
+ n.MENU_STORAGE = Y;
39734
40022
  try {
39735
- let e = localStorage.getItem(R);
40023
+ let e = localStorage.getItem(Y);
39736
40024
  if (!e) return;
39737
40025
  let { assistiveMml: n, locale: r, ...i } = JSON.parse(e), a = r === void 0 || !t || t.has(r);
39738
40026
  if (n === void 0 && a) return;
39739
- a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(R, JSON.stringify(i)) : localStorage.removeItem(R);
40027
+ a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(Y, JSON.stringify(i)) : localStorage.removeItem(Y);
39740
40028
  } catch {}
39741
40029
  }
39742
40030
  }
39743
- function gt(e) {
40031
+ function Bt(e) {
39744
40032
  if (!e) return;
39745
40033
  let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
39746
40034
  let n = e.typesetRoot;
39747
- !n || t.has(n) || (z(n), t.add(n));
40035
+ !n || t.has(n) || (X(n), t.add(n));
39748
40036
  };
39749
- e.addRenderAction?.("pie-strip-latex", at, (e) => {
40037
+ e.addRenderAction?.("pie-strip-latex", Et, (e) => {
39750
40038
  for (let t of e.math ?? []) n(t);
39751
40039
  return !1;
39752
40040
  }, (e) => {
39753
40041
  let t = e.typesetRoot;
39754
- return t && z(t), !1;
40042
+ return t && X(t), !1;
39755
40043
  });
39756
40044
  let r = e.outputJax?.chtmlStyles;
39757
- r?.id === tt && (r.id = b), yt();
40045
+ r?.id === St && (r.id = b), Ut();
39758
40046
  }
39759
- function _t(e) {
40047
+ function Vt(e) {
40048
+ let t = (e) => {
40049
+ e.typesetRoot && ut(e.typesetRoot);
40050
+ };
40051
+ e?.addRenderAction?.("pie-name-math", Dt, (e) => {
40052
+ for (let n of e.math ?? []) t(n);
40053
+ return !1;
40054
+ }, (e) => (t(e), !1));
40055
+ }
40056
+ function Z(e) {
39760
40057
  return e instanceof HTMLStyleElement && se.includes(e.id);
39761
40058
  }
39762
- function vt(e) {
40059
+ function Ht(e) {
39763
40060
  ne("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
39764
40061
  }
39765
- function yt() {
39766
- let e = document.head, t = [...e.children].find(_t);
40062
+ function Ut() {
40063
+ let e = document.head, t = [...e.children].find(Z);
39767
40064
  if (t) {
39768
- vt(t);
40065
+ Ht(t);
39769
40066
  return;
39770
40067
  }
39771
40068
  let n = new MutationObserver((e) => {
39772
40069
  for (let t of e) {
39773
- let e = [...t.addedNodes].find(_t);
40070
+ let e = [...t.addedNodes].find(Z);
39774
40071
  if (e) {
39775
- vt(e), n.disconnect();
40072
+ Ht(e), n.disconnect();
39776
40073
  return;
39777
40074
  }
39778
40075
  }
39779
40076
  });
39780
40077
  n.observe(e, { childList: !0 });
39781
40078
  }
39782
- function bt(e) {
40079
+ function Wt(e) {
39783
40080
  let t = e?.math;
39784
40081
  if (!t?.remove) return;
39785
- let n = [...t].filter((e) => (e.state?.() ?? 0) >= it && e.typesetRoot?.isConnected === !1);
40082
+ let n = [...t].filter((e) => (e.state?.() ?? 0) >= Tt && e.typesetRoot?.isConnected === !1);
39786
40083
  if (n.length !== 0) {
39787
40084
  for (let e of [...n].reverse()) e.clear?.();
39788
40085
  t.remove(...n);
39789
40086
  }
39790
40087
  }
39791
- function xt(e) {
40088
+ function Gt(e) {
39792
40089
  return new Promise((t, n) => {
39793
40090
  let r = e.startup ?? {};
39794
40091
  e.startup = r;
@@ -39799,110 +40096,82 @@ function xt(e) {
39799
40096
  };
39800
40097
  });
39801
40098
  }
39802
- function St(e) {
40099
+ function Kt(e) {
39803
40100
  let t = y();
39804
- return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : xt(t) : ft(e);
40101
+ return t ? t.version ? t.startup?.promise ? Promise.resolve(t.startup.promise).then(() => void 0) : Promise.resolve() : Gt(t) : It(e);
39805
40102
  }
39806
- function Ct(e) {
39807
- return St(e).then(() => {
40103
+ function qt(e) {
40104
+ return Kt(e).then(() => {
39808
40105
  let e = y();
39809
40106
  e && typeof e.typesetPromise != "function" && console.warn("[mathjax-renderer] MathJax on this page has no typesetPromise; math stays untypeset.");
39810
40107
  });
39811
40108
  }
39812
- function wt(e) {
39813
- let t = oe, n = t[L];
39814
- return n || (n = Ct(e), t[L] = n), n;
40109
+ function Jt(e) {
40110
+ let t = oe, n = t[xt];
40111
+ return n || (n = qt(e), t[xt] = n), n;
39815
40112
  }
39816
- function Tt(e = {}) {
40113
+ function Yt(e = {}) {
39817
40114
  let t = e.useSingleDollar ?? !1;
39818
40115
  return async (n) => {
39819
40116
  if (typeof window > "u") return;
39820
40117
  let r = ce();
39821
- r && ne("mathjax-3-global", `window.MathJax is MathJax ${r}`), lt(n), de(n), ut(n), Be(n);
39822
- let i = wt(e);
39823
- if (!dt(n, t)) {
40118
+ r && ne("mathjax-3-global", `window.MathJax is MathJax ${r}`), Nt(n), fe(n), Pt(n), Ie(n);
40119
+ let i = Jt(e);
40120
+ if (!Ft(n, t)) {
39824
40121
  i.catch(() => {});
39825
40122
  return;
39826
40123
  }
39827
40124
  await i;
39828
40125
  let a = y();
39829
40126
  if (await a?.startup?.promise, typeof a?.typesetPromise == "function") {
39830
- Ge(), bt(a.startup?.document);
40127
+ Ve(), Wt(a.startup?.document);
39831
40128
  try {
39832
40129
  await a.typesetPromise([n]);
39833
40130
  } catch (e) {
39834
40131
  throw a.typesetClear?.([n]), e;
39835
40132
  }
39836
- z(n);
40133
+ X(n), J(n);
39837
40134
  }
39838
40135
  };
39839
40136
  }
39840
- var kt = {
39841
- "(": "open parenthesis",
39842
- "[": "open bracket",
39843
- "{": "open brace",
39844
- "⟨": "open angle bracket",
39845
- "⌊": "open floor",
39846
- "⌈": "open ceiling"
39847
- };
39848
- var At = {
39849
- ")": "close parenthesis",
39850
- "]": "close bracket",
39851
- "}": "close brace",
39852
- "⟩": "close angle bracket",
39853
- "⌋": "close floor",
39854
- "⌉": "close ceiling"
39855
- };
39856
- var H = {
39857
- "!": "factorial",
39858
- "%": "percent",
39859
- "°": "degrees",
39860
- "′": "prime",
39861
- "″": "double prime"
39862
- };
39863
- ({
39864
- ...kt,
39865
- ...At,
39866
- ...H
39867
- });
39868
- var $t = "@pie-lib/math-rendering";
39869
- var en = "@pie-lib/math-rendering@2";
39870
- var tn = "pie-print";
39871
- var nn = 50;
39872
- var rn = 1e4;
39873
- var an = null;
39874
- function on() {
39875
- return !!window[en]?.opts?.useSingleDollar;
40137
+ var Zt = "@pie-lib/math-rendering";
40138
+ var Qt = "@pie-lib/math-rendering@2";
40139
+ var $t = "pie-print";
40140
+ var en = 50;
40141
+ var tn = 1e4;
40142
+ var nn = null;
40143
+ function rn() {
40144
+ return !!window[Qt]?.opts?.useSingleDollar;
39876
40145
  }
39877
- function sn() {
39878
- return an || (an = Tt({ useSingleDollar: on() })), an;
40146
+ function an() {
40147
+ return nn || (nn = Yt({ useSingleDollar: rn() })), nn;
39879
40148
  }
39880
40149
  function Q() {
39881
40150
  if (typeof window > "u") return null;
39882
- let e = window[$t];
40151
+ let e = window[Zt];
39883
40152
  return typeof e?.renderMath == "function" && e.renderMath !== $ ? e : null;
39884
40153
  }
39885
- function cn(e) {
40154
+ function on(e) {
39886
40155
  let t = e;
39887
40156
  for (; t;) {
39888
- if (t instanceof Element && t.localName === tn) return t;
40157
+ if (t instanceof Element && t.localName === $t) return t;
39889
40158
  t = t instanceof ShadowRoot ? t.host : t.parentNode;
39890
40159
  }
39891
40160
  return null;
39892
40161
  }
39893
- function ln() {
40162
+ function sn() {
39894
40163
  let e = window.renderMath;
39895
40164
  return typeof e == "function" ? e : null;
39896
40165
  }
39897
- async function un(e) {
39898
- let t = cn(e);
40166
+ async function cn(e) {
40167
+ let t = on(e);
39899
40168
  if (!t) return null;
39900
- let n = ln();
40169
+ let n = sn();
39901
40170
  if (n || t.mathRenderingModuleUrlImported !== !0) return n;
39902
- let r = Date.now() + rn;
40171
+ let r = Date.now() + tn;
39903
40172
  for (; Date.now() < r;) {
39904
- await new Promise((e) => setTimeout(e, nn));
39905
- let e = ln();
40173
+ await new Promise((e) => setTimeout(e, en));
40174
+ let e = sn();
39906
40175
  if (e) return e;
39907
40176
  }
39908
40177
  return null;
@@ -39911,8 +40180,8 @@ var $ = async (e) => {
39911
40180
  if (typeof window > "u") return;
39912
40181
  let t = typeof e == "string", n;
39913
40182
  t ? (n = document.createElement("div"), n.innerHTML = e) : n = e || document.body;
39914
- let r = Q(), i = r || t ? null : await un(n);
39915
- return r ? await r.renderMath?.(n) : i && i !== $ ? await i(n) : await sn()(n), t ? n.innerHTML : void 0;
40183
+ let r = Q(), i = r || t ? null : await cn(n);
40184
+ return r ? (await r.renderMath?.(n), J(n)) : i && i !== $ ? (await i(n), J(n)) : await an()(n), t ? n.innerHTML : void 0;
39916
40185
  };
39917
40186
  //#endregion
39918
40187
  //#region src/delivery/tile-accessible-name.ts