@pie-element/drawing-response 13.0.6-next.20261018193205 → 13.0.6

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.
@@ -746,7 +746,7 @@ var An;
746
746
  function jn() {
747
747
  return An;
748
748
  }
749
- var Mn = import("./mathjax-CptWnMbQ-D44vQffT.js");
749
+ var Mn = import("./mathjax-DqXi3q4c-BaKVOXJh.js");
750
750
  Mn.catch(() => {});
751
751
  async function Nn(e, t) {
752
752
  let { createMathJax: n } = await Mn;
@@ -1445,25 +1445,7 @@ function mi(e) {
1445
1445
  function hi(e) {
1446
1446
  for (let t of e.querySelectorAll("mjx-container")) mi(t);
1447
1447
  }
1448
- var gi = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page", _i = "pie-mathjax-version-conflict", vi = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
1449
- function yi(e, t) {
1450
- if (typeof window > "u") return;
1451
- let n = globalThis;
1452
- n[vi] ??= {
1453
- logged: !1,
1454
- conditions: []
1455
- };
1456
- let r = n[vi];
1457
- if (r.conditions.includes(e)) return;
1458
- r.conditions.push(e);
1459
- let i = `[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${gi}`;
1460
- r.logged || (r.logged = !0, console.error(i)), window.dispatchEvent(new CustomEvent(_i, { detail: {
1461
- condition: e,
1462
- message: i,
1463
- docsUrl: gi
1464
- } }));
1465
- }
1466
- var bi = {
1448
+ var gi = {
1467
1449
  parallelogram: "\\lower.2em{\\Huge\\unicode{x25B1}}",
1468
1450
  overarc: "\\overparen",
1469
1451
  napprox: "\\not\\approx",
@@ -1471,36 +1453,54 @@ var bi = {
1471
1453
  abs: ["\\left|#1\\right|", 1],
1472
1454
  perpendicular: "\\perp",
1473
1455
  divide: "\\div"
1474
- }, xi = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", Si = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, Ci = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, wi = /\\embed\{newLine\}\[\]/g, Ti = [
1456
+ }, _i = /\\\(|\\\[|\$\$|\\\$|\\begin\{|\\(?:eq)?ref\{/, vi = /\\\(|\\\[|\$|\\begin\{|\\(?:eq)?ref\{/, yi = /\\embed\{newLine\}\[\]/g, bi = [
1475
1457
  ["$$", "$$"],
1476
1458
  ["$", "$"],
1477
1459
  ["\\[", "\\]"],
1478
1460
  ["\\(", "\\)"]
1479
- ], Ei = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), Di = "MJX-CHTML-styles", Oi = "PIE-MJX-SVG-styles", ki = "PIE-MathJax-Menu-Settings", Ai = { "mjx-container[overflow=\"linebreak\"][display]": {
1461
+ ];
1462
+ function xi(e) {
1463
+ for (let [t, n] of bi) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
1464
+ return e;
1465
+ }
1466
+ function Si(e) {
1467
+ return `\\(${xi(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e)}\\)`.replace(yi, "\\newline ");
1468
+ }
1469
+ var Ci = "mathjax_ignore", wi = "mathjax_process", Ti = "https://github.com/pie-framework/pie-players/blob/develop/docs/item-player/loading-strategies.md#one-mathjax-version-per-page", Ei = "pie-mathjax-version-conflict", Di = Symbol.for("@pie-element/shared-math-rendering-mathjax/unsupported-page");
1470
+ function Oi(e, t) {
1471
+ if (typeof window > "u") return;
1472
+ let n = globalThis;
1473
+ n[Di] ??= {
1474
+ logged: !1,
1475
+ conditions: []
1476
+ };
1477
+ let r = n[Di];
1478
+ if (r.conditions.includes(e)) return;
1479
+ r.conditions.push(e);
1480
+ let i = `[math-rendering] Unsupported page (${e}): ${t}. PIE supports one MathJax major version per page; with MathJax 3 and 4 on one page, math rendering is best effort and may break. See ${Ti}`;
1481
+ r.logged || (r.logged = !0, console.error(i)), window.dispatchEvent(new CustomEvent(Ei, { detail: {
1482
+ condition: e,
1483
+ message: i,
1484
+ docsUrl: Ti
1485
+ } }));
1486
+ }
1487
+ var ki = "[math-rendering] using $ is not advisable, please use $$..$$ or \\(...\\)", Ai = Symbol.for("@pie-element/shared-math-rendering-mathjax/loading"), ji = "MJX-CHTML-styles", Mi = "PIE-MJX-SVG-styles", Ni = "PIE-MathJax-Menu-Settings", Pi = { "mjx-container[overflow=\"linebreak\"][display]": {
1480
1488
  overflow: "auto clip",
1481
1489
  "min-width": "initial !important"
1482
- } }, ji = 200, Mi = 201, Ni = 202;
1483
- function Pi(e) {
1490
+ } }, Fi = 200, Ii = 201, Li = 202;
1491
+ function Ri(e) {
1484
1492
  let t = [...e.matches("mjx-container") ? [e] : [], ...e.querySelectorAll("mjx-container")];
1485
1493
  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");
1486
1494
  }
1487
- function Fi(e) {
1488
- for (let [t, n] of Ti) if (e.startsWith(t) && e.endsWith(n)) return e.substring(t.length, e.length - n.length);
1489
- return e;
1490
- }
1491
- function Ii(e) {
1492
- return Fi(e.includes("\\displaystyle") ? e.replace("\\displaystyle", "").trim() : e);
1493
- }
1494
- var Li = "mathjax_ignore", Ri = "mathjax_process";
1495
1495
  function zi(e, t) {
1496
- let n = e.closest(`.${Li}, .${Ri}`);
1497
- return n !== null && t.contains(n) && !n.classList.contains(Ri);
1496
+ let n = e.closest(`.${Ci}, .${wi}`);
1497
+ return n !== null && t.contains(n) && !n.classList.contains("mathjax_process");
1498
1498
  }
1499
1499
  function Bi(e) {
1500
1500
  for (let t of e.querySelectorAll("[data-latex]")) {
1501
1501
  if (t.dataset.mathHandled || t.closest("mjx-container") || zi(t, e)) continue;
1502
1502
  let n = t.textContent;
1503
- n && (t.textContent = `\\(${Ii(n)}\\)`.replace(wi, "\\newline "), t.dataset.mathHandled = "true");
1503
+ n && (t.textContent = Si(n), t.dataset.mathHandled = "true");
1504
1504
  }
1505
1505
  }
1506
1506
  function Vi(e) {
@@ -1508,7 +1508,7 @@ function Vi(e) {
1508
1508
  }
1509
1509
  function Hi(e, t) {
1510
1510
  for (let t of e.querySelectorAll("math")) if (!t.closest("mjx-assistive-mml")) return !0;
1511
- return (t ? Ci : Si).test(e.textContent ?? "");
1511
+ return (t ? vi : _i).test(e.textContent ?? "");
1512
1512
  }
1513
1513
  function Ui(e) {
1514
1514
  return new Promise((t, n) => {
@@ -1525,10 +1525,10 @@ function Ui(e) {
1525
1525
  typeset: !1,
1526
1526
  ready: () => {
1527
1527
  let e = jn(), r = e?.startup, i = Wi(e);
1528
- i && (Gi(e), Ki(e, s.speechLocales), vn(e?._?.a11y?.sre_ts?.locales, s.speechLocales)), r?.defaultReady?.(), i && (qi(r?.document), Ji(r?.document), r?.document?.addStyles?.(Ai), En(r?.document)), Promise.resolve(r?.promise).then(() => t(), n);
1528
+ i && (Gi(e), Ki(e, s.speechLocales), vn(e?._?.a11y?.sre_ts?.locales, s.speechLocales)), r?.defaultReady?.(), i && (qi(r?.document), Ji(r?.document), r?.document?.addStyles?.(Pi), En(r?.document)), Promise.resolve(r?.promise).then(() => t(), n);
1529
1529
  }
1530
1530
  },
1531
- tex: { macros: { ...bi } },
1531
+ tex: { macros: { ...gi } },
1532
1532
  output: { displayOverflow: "linebreak" },
1533
1533
  options: {
1534
1534
  enableMenu: i,
@@ -1540,7 +1540,7 @@ function Ui(e) {
1540
1540
  a11y: { inTabOrder: c }
1541
1541
  }
1542
1542
  };
1543
- r && l.tex && (console.warn(xi), l.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], l.tex.processEscapes = !0), a || (l.chtml = { fontURL: "" });
1543
+ r && l.tex && (console.warn(ki), l.tex.inlineMath = [["$", "$"], ["\\(", "\\)"]], l.tex.processEscapes = !0), a || (l.chtml = { fontURL: "" });
1544
1544
  let u = yn(s.speechLocales);
1545
1545
  u && l.options && (l.options.sre = { locale: u }), Nn(l, {
1546
1546
  ...s,
@@ -1557,18 +1557,18 @@ function Gi(e) {
1557
1557
  let t = e?._?.output, n = t?.chtml_ts?.CHTML;
1558
1558
  n && (n.STYLESHEETID = Rn);
1559
1559
  let r = t?.svg_ts?.SVG;
1560
- r && (r.STYLESHEETID = Oi);
1560
+ r && (r.STYLESHEETID = Mi);
1561
1561
  }
1562
1562
  function Ki(e, t) {
1563
1563
  let n = e?._?.ui?.menu?.Menu?.Menu;
1564
1564
  if (n) {
1565
- n.MENU_STORAGE = ki;
1565
+ n.MENU_STORAGE = Ni;
1566
1566
  try {
1567
- let e = localStorage.getItem(ki);
1567
+ let e = localStorage.getItem(Ni);
1568
1568
  if (!e) return;
1569
1569
  let { assistiveMml: n, locale: r, ...i } = JSON.parse(e), a = r === void 0 || !t || t.has(r);
1570
1570
  if (n === void 0 && a) return;
1571
- a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(ki, JSON.stringify(i)) : localStorage.removeItem(ki);
1571
+ a && r !== void 0 && (i.locale = r), Object.keys(i).length ? localStorage.setItem(Ni, JSON.stringify(i)) : localStorage.removeItem(Ni);
1572
1572
  } catch {}
1573
1573
  }
1574
1574
  }
@@ -1576,23 +1576,23 @@ function qi(e) {
1576
1576
  if (!e) return;
1577
1577
  let t = /* @__PURE__ */ new WeakSet(), n = (e) => {
1578
1578
  let n = e.typesetRoot;
1579
- !n || t.has(n) || (Pi(n), t.add(n));
1579
+ !n || t.has(n) || (Ri(n), t.add(n));
1580
1580
  };
1581
- e.addRenderAction?.("pie-strip-latex", Mi, (e) => {
1581
+ e.addRenderAction?.("pie-strip-latex", Ii, (e) => {
1582
1582
  for (let t of e.math ?? []) n(t);
1583
1583
  return !1;
1584
1584
  }, (e) => {
1585
1585
  let t = e.typesetRoot;
1586
- return t && Pi(t), !1;
1586
+ return t && Ri(t), !1;
1587
1587
  });
1588
1588
  let r = e.outputJax?.chtmlStyles;
1589
- r?.id === Di && (r.id = Rn), Zi();
1589
+ r?.id === ji && (r.id = Rn), Zi();
1590
1590
  }
1591
1591
  function Ji(e) {
1592
1592
  let t = (e) => {
1593
1593
  e.typesetRoot && mi(e.typesetRoot);
1594
1594
  };
1595
- e?.addRenderAction?.("pie-name-math", Ni, (e) => {
1595
+ e?.addRenderAction?.("pie-name-math", Li, (e) => {
1596
1596
  for (let n of e.math ?? []) t(n);
1597
1597
  return !1;
1598
1598
  }, (e) => (t(e), !1));
@@ -1601,7 +1601,7 @@ function Yi(e) {
1601
1601
  return e instanceof HTMLStyleElement && zn.includes(e.id);
1602
1602
  }
1603
1603
  function Xi(e) {
1604
- yi("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
1604
+ Oi("foreign-output-stylesheet", `another MathJax added <style id="${e.id}"> to <head>`);
1605
1605
  }
1606
1606
  function Zi() {
1607
1607
  let e = document.head, t = [...e.children].find(Yi);
@@ -1623,7 +1623,7 @@ function Zi() {
1623
1623
  function Qi(e) {
1624
1624
  let t = e?.math;
1625
1625
  if (!t?.remove) return;
1626
- let n = [...t].filter((e) => (e.state?.() ?? 0) >= ji && e.typesetRoot?.isConnected === !1);
1626
+ let n = [...t].filter((e) => (e.state?.() ?? 0) >= Fi && e.typesetRoot?.isConnected === !1);
1627
1627
  if (n.length !== 0) {
1628
1628
  for (let e of [...n].reverse()) e.clear?.();
1629
1629
  t.remove(...n);
@@ -1651,8 +1651,8 @@ function ta(e) {
1651
1651
  });
1652
1652
  }
1653
1653
  function na(e) {
1654
- let t = Pn, n = t[Ei];
1655
- return n || (n = ta(e), t[Ei] = n), n;
1654
+ let t = Pn, n = t[Ai];
1655
+ return n || (n = ta(e), t[Ai] = n), n;
1656
1656
  }
1657
1657
  function ra(e = {}) {
1658
1658
  let t = e.useSingleDollar ?? !1;
@@ -1673,7 +1673,7 @@ function ra(e = {}) {
1673
1673
  } catch (e) {
1674
1674
  throw i.typesetClear?.([n]), e;
1675
1675
  }
1676
- Pi(n), hi(n);
1676
+ Ri(n), hi(n);
1677
1677
  }
1678
1678
  };
1679
1679
  }
@@ -1724,7 +1724,7 @@ var ga = async (e) => {
1724
1724
  let n = fa()?.wrapMath?.(e, t);
1725
1725
  if (n != null) return n;
1726
1726
  let [r, i] = t === "dollar" || t === "double_dollar" ? ["$", "$"] : ["\\(", "\\)"];
1727
- return `${r}${Fi(e)}${i}`;
1727
+ return `${r}${xi(e)}${i}`;
1728
1728
  }, va = (e) => {
1729
1729
  let t = e.trim();
1730
1730
  return t.startsWith("\\[") && t.endsWith("\\]") ? {
@@ -15456,4 +15456,4 @@ var _w = (e, t) => {
15456
15456
  //#endregion
15457
15457
  export { qg as $, jv as A, Kt as At, $_ as B, Zy as C, Sn as Ct, Iv as D, Yt as Dt, ny as E, qt as Et, Sv as F, Ht as Ft, g_ as G, K_ as H, vv as I, Jt as It, t_ as J, h_ as K, cv as L, Qt as Lt, kv as M, Gt as Mt, Ov as N, $t as Nt, Pv as O, en as Ot, Q as P, tn as Pt, Xg as Q, ov as R, tb as S, On as St, ky as T, gn as Tt, F_ as U, q_ as V, P_ as W, $g as X, e_ as Y, Zg as Z, zb as _, xa as _t, VC as a, lf as at, Tb as b, va as bt, Ax as c, rd as ct, hx as d, W as dt, Sp as et, sx as f, rl as ft, Bb as g, Na as gt, Vb as h, Pa as ht, qC as i, dp as it, Av as j, Ut as jt, Nv as k, Wt as kt, Ex as l, G as lt, Zb as m, Hc as mt, uw as n, hp as nt, YS as o, Fd as ot, ix as p, Vc as pt, r_ as q, iw as r, pp as rt, Kx as s, Dd as st, bw as t, Y as tt, Tx as u, Uu as ut, Fb as v, ga as vt, Ny as w, nn as wt, pb as x, kn as xt, Db as y, _a as yt, nv as z };
15458
15458
 
15459
- //# sourceMappingURL=MenuItem-BEpyLX18.js.map
15459
+ //# sourceMappingURL=MenuItem-wZSbBJ_n.js.map